From 236e8961897365802c01ec314a69b04637cc24cf Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Apr 2026 02:01:23 +0000 Subject: [PATCH 1/8] fix(scim): block virtual keys when SCIM deprovisions/deactivates a user Previously, deleting a user via SCIM (`DELETE /scim/v2/Users/{id}`) or marking them inactive (`PATCH active=false` / `PUT active=false`) only touched the user row. Their virtual keys kept working because: - `litellm_verificationtoken` was never updated. - The auth path's combined-view query on the key never joined to the user's active state. - `get_user_object()` was wrapped in a silent `except` that set `user_obj=None` when the owning user record was gone, so requests proceeded normally. Changes: - Add `_set_user_keys_blocked(user_id, blocked)` in scim_v2.py that flips only mismatched rows via `update_many` and invalidates each affected token in the dual cache. - Cascade SCIM lifecycle events to keys: - `delete_user`: block all of the user's keys before deleting the user row (preserves spend/audit while orphaning safely). - `patch_user` / `update_user`: on `scim_active` transitions, block (false) or unblock (true) the user's keys. - Defense in depth in `user_api_key_auth`: reject the request when the loaded `user_obj` has `metadata.scim_active == False`, even if a cached key snuck past the per-key block. - `transform_litellm_user_to_scim_user` now reflects the real `scim_active` value instead of always returning `active=True`. Tests: - New `test_scim_key_deactivation.py` covering DELETE, PATCH active=false, PATCH active=true, no-op patches, and the helper's cache-invalidation contract. - New `test_scim_deactivated_user_key_is_rejected` exercising the auth-path defense. - Existing PATCH tests updated with verificationtoken mocks for the new code path. --- litellm/proxy/auth/user_api_key_auth.py | 13 + .../scim/scim_transformations.py | 9 +- .../management_endpoints/scim/scim_v2.py | 80 +++++ .../proxy/auth/test_user_api_key_auth.py | 110 ++++++- .../scim/test_scim_key_deactivation.py | 300 ++++++++++++++++++ .../scim/test_scim_patch_user.py | 7 + 6 files changed, 512 insertions(+), 7 deletions(-) create mode 100644 tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py diff --git a/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.py index b8db3cd2a7..996bb7f4c2 100644 --- a/litellm/proxy/auth/user_api_key_auth.py +++ b/litellm/proxy/auth/user_api_key_auth.py @@ -1266,6 +1266,19 @@ async def _user_api_key_auth_builder( # noqa: PLR0915 ) user_obj = None + # Defense in depth for SCIM-deprovisioned users: even if a + # cached key snuck past the blocked-flag check, refuse the + # request when the owning user has been marked inactive by + # the SCIM provider. + if ( + user_obj is not None + and isinstance(user_obj.metadata, dict) + and user_obj.metadata.get("scim_active") is False + ): + raise Exception( + f"User={valid_token.user_id} has been deactivated via SCIM. Keys owned by this user cannot be used." + ) + # Check 2a. Check if model has zero cost - if so, skip all budget checks model = get_model_from_request(request_data, route) skip_budget_checks = False diff --git a/litellm/proxy/management_endpoints/scim/scim_transformations.py b/litellm/proxy/management_endpoints/scim/scim_transformations.py index a741ddd697..68c06173fd 100644 --- a/litellm/proxy/management_endpoints/scim/scim_transformations.py +++ b/litellm/proxy/management_endpoints/scim/scim_transformations.py @@ -45,6 +45,13 @@ class ScimTransformations: if user.user_email and "@" in user.user_email: emails.append(SCIMUserEmail(value=user.user_email, primary=True)) + # Reflect SCIM-provider-controlled active state. Default to True for + # users that have never had the flag set (e.g. created before this + # field existed, or created outside SCIM). + metadata = user.metadata or {} + scim_active = metadata.get("scim_active") + active = True if scim_active is None else bool(scim_active) + return SCIMUser( schemas=["urn:ietf:params:scim:schemas:core:2.0:User"], id=user.user_id, @@ -56,7 +63,7 @@ class ScimTransformations: ), emails=emails, groups=groups, - active=True, + active=active, meta={ "resourceType": "User", "created": user_created_at, diff --git a/litellm/proxy/management_endpoints/scim/scim_v2.py b/litellm/proxy/management_endpoints/scim/scim_v2.py index 4c472ed7f2..8f332dcf48 100644 --- a/litellm/proxy/management_endpoints/scim/scim_v2.py +++ b/litellm/proxy/management_endpoints/scim/scim_v2.py @@ -38,6 +38,7 @@ from litellm.proxy._types import ( TeamMemberDeleteRequest, UserAPIKeyAuth, ) +from litellm.proxy.auth.auth_checks import _delete_cache_key_object from litellm.proxy.auth.user_api_key_auth import user_api_key_auth from litellm.proxy.management_endpoints.internal_user_endpoints import new_user from litellm.proxy.management_endpoints.scim.scim_transformations import ( @@ -336,6 +337,58 @@ async def _handle_team_membership_changes( ) +async def _set_user_keys_blocked(user_id: str, blocked: bool) -> int: + """ + Block or unblock all virtual keys owned by a user and invalidate them in + the in-memory/redis caches so the change takes effect immediately. + + Returns the number of keys whose state was flipped. Used by the SCIM + deprovisioning flow so a user's keys stop working the moment SCIM marks + the user inactive (or deletes them). + """ + from litellm.proxy.proxy_server import proxy_logging_obj, user_api_key_cache + + prisma_client = await _get_prisma_client_or_raise_exception() + + # Only flip keys whose current state differs — avoids touching keys that + # were already (un)blocked manually by an admin. + affected_keys = await prisma_client.db.litellm_verificationtoken.find_many( + where={"user_id": user_id, "blocked": not blocked}, + ) + if not affected_keys: + return 0 + + await prisma_client.db.litellm_verificationtoken.update_many( + where={"user_id": user_id, "blocked": not blocked}, + data={"blocked": blocked}, + ) + + for key_row in affected_keys: + await _delete_cache_key_object( + hashed_token=key_row.token, + user_api_key_cache=user_api_key_cache, + proxy_logging_obj=proxy_logging_obj, + ) + + verbose_proxy_logger.info( + "SCIM: %s %d virtual key(s) for user_id=%s", + "blocked" if blocked else "unblocked", + len(affected_keys), + user_id, + ) + return len(affected_keys) + + +def _scim_active_value(metadata: Optional[Dict[str, Any]]) -> Optional[bool]: + """Read the SCIM active flag from a user's metadata dict, if present.""" + if not metadata: + return None + value = metadata.get("scim_active") + if value is None: + return None + return bool(value) + + async def _create_user_if_not_exists( user_id: str, created_via: str = "scim_group" ) -> Optional[NewUserResponse]: @@ -928,6 +981,8 @@ async def update_user( prisma_client = await _get_prisma_client_or_raise_exception() existing_user = await _check_user_exists(user_id) + prev_active = _scim_active_value(existing_user.metadata) + # Extract data from SCIM user user_data = _extract_scim_user_data(user) @@ -963,6 +1018,13 @@ async def update_user( data=update_data, ) + # Cascade SCIM active transitions to virtual keys (mirrors PATCH). + new_active = _scim_active_value(metadata) + if new_active is not None and new_active != ( + True if prev_active is None else prev_active + ): + await _set_user_keys_blocked(user_id=user_id, blocked=not new_active) + # Convert back to SCIM format scim_user = await ScimTransformations.transform_litellm_user_to_scim_user( updated_user @@ -1009,6 +1071,12 @@ async def delete_user( where={"team_id": team.team_id}, data={"members": new_members} ) + # Block the user's virtual keys before deleting the user record. + # The user row going away leaves the keys orphaned; without this + # they'd keep working because the auth path silently tolerates a + # missing owner. + await _set_user_keys_blocked(user_id=user_id, blocked=True) + # Delete user await prisma_client.db.litellm_usertable.delete(where={"user_id": user_id}) @@ -1242,11 +1310,15 @@ async def patch_user( prisma_client = await _get_prisma_client_or_raise_exception() existing_user = await _check_user_exists(user_id) + prev_active = _scim_active_value(existing_user.metadata) + update_data, final_team_set = _apply_patch_ops( existing_user=existing_user, patch_ops=patch_ops, ) + new_active = _scim_active_value(update_data.get("metadata")) + # Handle team membership changes await _handle_team_membership_changes( user_id=user_id, @@ -1267,6 +1339,14 @@ async def patch_user( data=update_data, ) + # Cascade SCIM active transitions to virtual keys. Treat "previously + # unset" as active=True so a first-time PATCH with active=false still + # blocks any pre-existing keys. + if new_active is not None and new_active != ( + True if prev_active is None else prev_active + ): + await _set_user_keys_blocked(user_id=user_id, blocked=not new_active) + scim_user = await ScimTransformations.transform_litellm_user_to_scim_user( updated_user ) diff --git a/tests/test_litellm/proxy/auth/test_user_api_key_auth.py b/tests/test_litellm/proxy/auth/test_user_api_key_auth.py index 9c43ebcbe7..cc6a1f0bcc 100644 --- a/tests/test_litellm/proxy/auth/test_user_api_key_auth.py +++ b/tests/test_litellm/proxy/auth/test_user_api_key_auth.py @@ -798,6 +798,99 @@ async def test_proxy_admin_expired_key_from_cache(): setattr(_proxy_server_mod, attr, val) +@pytest.mark.asyncio +async def test_scim_deactivated_user_key_is_rejected(): + """A virtual key whose owning user has metadata.scim_active=False must be + rejected by the auth flow (defense in depth on top of key-level blocking). + """ + from fastapi import Request + from starlette.datastructures import URL + + from litellm.proxy.auth.user_api_key_auth import _user_api_key_auth_builder + from litellm.proxy.proxy_server import hash_token + + api_key = "sk-scim-deactivated-user-key" + hashed_key = hash_token(api_key) + + valid_token = UserAPIKeyAuth( + api_key=api_key, + token=hashed_key, + user_id="scim-disabled-user", + ) + deactivated_user = LiteLLM_UserTable( + user_id="scim-disabled-user", + metadata={"scim_active": False}, + ) + + mock_cache = AsyncMock() + mock_cache.async_get_cache = AsyncMock(return_value=None) + mock_cache.delete_cache = MagicMock() + + mock_proxy_logging_obj = MagicMock() + mock_proxy_logging_obj.internal_usage_cache = MagicMock() + mock_proxy_logging_obj.internal_usage_cache.dual_cache = AsyncMock() + mock_proxy_logging_obj.internal_usage_cache.dual_cache.async_delete_cache = ( + AsyncMock() + ) + mock_proxy_logging_obj.post_call_failure_hook = AsyncMock(return_value=None) + + mock_prisma_client = MagicMock() + + import litellm.proxy.proxy_server as _proxy_server_mod + + _attrs_to_set = { + "prisma_client": mock_prisma_client, + "user_api_key_cache": mock_cache, + "proxy_logging_obj": mock_proxy_logging_obj, + "master_key": "sk-master-key", + "general_settings": {}, + "llm_model_list": [], + "llm_router": None, + "open_telemetry_logger": None, + "model_max_budget_limiter": MagicMock(), + "user_custom_auth": None, + "jwt_handler": None, + "litellm_proxy_admin_name": "admin", + } + _original_values = { + attr: getattr(_proxy_server_mod, attr, None) for attr in _attrs_to_set + } + try: + for attr, val in _attrs_to_set.items(): + setattr(_proxy_server_mod, attr, val) + + request = Request(scope={"type": "http"}) + request._url = URL(url="/chat/completions") + + with ( + patch( + "litellm.proxy.auth.user_api_key_auth.get_key_object", + new_callable=AsyncMock, + return_value=valid_token, + ), + patch( + "litellm.proxy.auth.user_api_key_auth.get_user_object", + new_callable=AsyncMock, + return_value=deactivated_user, + ), + ): + with pytest.raises(ProxyException) as exc_info: + await _user_api_key_auth_builder( + request=request, + api_key=f"Bearer {api_key}", + azure_api_key_header="", + anthropic_api_key_header=None, + google_ai_studio_api_key_header=None, + azure_apim_header=None, + request_data={}, + ) + + assert "deactivated via SCIM" in str(exc_info.value.message) + finally: + for attr, val in _original_values.items(): + setattr(_proxy_server_mod, attr, val) + + @pytest.mark.asyncio async def test_return_user_api_key_auth_obj_user_spend_and_budget(): """ @@ -1752,7 +1845,11 @@ async def test_team_metadata_refreshed_from_team_object_during_auth(): from starlette.datastructures import URL from starlette.requests import Request - from litellm.proxy._types import LiteLLM_TeamTableCachedObj, LitellmUserRoles, UserAPIKeyAuth + from litellm.proxy._types import ( + LiteLLM_TeamTableCachedObj, + LitellmUserRoles, + UserAPIKeyAuth, + ) from litellm.proxy.auth.user_api_key_auth import _user_api_key_auth_builder api_key = "sk-test-team-metadata-refresh" @@ -1833,16 +1930,17 @@ async def test_team_metadata_refreshed_from_team_object_during_auth(): request_data={}, ) - assert result.team_metadata == {"guardrails": ["test-guardrail-333"]}, ( - f"team_metadata was not updated from fresh team object. Got: {result.team_metadata}" - ) + assert result.team_metadata == { + "guardrails": ["test-guardrail-333"] + }, f"team_metadata was not updated from fresh team object. Got: {result.team_metadata}" finally: for k, v in _originals.items(): setattr(_proxy_server_mod, k, v) - + + # --------------------------------------------------------------------------- - + # _run_centralized_common_checks — centralized authz gate # --------------------------------------------------------------------------- diff --git a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py new file mode 100644 index 0000000000..2b338d9716 --- /dev/null +++ b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py @@ -0,0 +1,300 @@ +"""Tests for SCIM-driven virtual key deactivation. + +When a SCIM provider deprovisions a user (DELETE) or marks them inactive +(PATCH/PUT with active=False), virtual keys owned by that user must stop +working immediately. Reactivating (active=True) must un-block them. +""" + +from unittest.mock import AsyncMock, MagicMock, patch + +import pytest + +from litellm.proxy._types import LiteLLM_UserTable +from litellm.proxy.management_endpoints.scim.scim_v2 import ( + _set_user_keys_blocked, + delete_user, + patch_user, +) +from litellm.types.proxy.management_endpoints.scim_v2 import ( + SCIMPatchOp, + SCIMPatchOperation, + SCIMUser, + SCIMUserEmail, + SCIMUserName, +) + + +def _build_token_row(token: str, user_id: str, blocked: bool): + row = MagicMock() + row.token = token + row.user_id = user_id + row.blocked = blocked + return row + + +def _build_prisma_with_keys(user_keys, mock_user=None, updated_user=None): + mock_client = MagicMock() + mock_db = MagicMock() + mock_client.db = mock_db + if mock_user is not None: + mock_db.litellm_usertable.find_unique = AsyncMock(return_value=mock_user) + if updated_user is not None: + mock_db.litellm_usertable.update = AsyncMock(return_value=updated_user) + mock_db.litellm_usertable.delete = AsyncMock(return_value=None) + mock_db.litellm_teamtable.find_unique = AsyncMock(return_value=None) + + mock_db.litellm_verificationtoken.find_many = AsyncMock(return_value=user_keys) + mock_db.litellm_verificationtoken.update_many = AsyncMock(return_value=None) + return mock_client, mock_db + + +@pytest.mark.asyncio +async def test_set_user_keys_blocked_flips_state_and_invalidates_cache(): + """_set_user_keys_blocked must update_many AND invalidate each token in the cache.""" + keys = [ + _build_token_row("hash-1", "user-x", blocked=False), + _build_token_row("hash-2", "user-x", blocked=False), + ] + mock_client, mock_db = _build_prisma_with_keys(keys) + + cache_deletions = [] + + async def fake_delete(hashed_token, user_api_key_cache, proxy_logging_obj): + cache_deletions.append(hashed_token) + + with ( + patch("litellm.proxy.proxy_server.prisma_client", mock_client), + patch("litellm.proxy.proxy_server.user_api_key_cache", MagicMock()), + patch("litellm.proxy.proxy_server.proxy_logging_obj", MagicMock()), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2._delete_cache_key_object", + AsyncMock(side_effect=fake_delete), + ), + ): + flipped = await _set_user_keys_blocked(user_id="user-x", blocked=True) + + assert flipped == 2 + mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( + where={"user_id": "user-x", "blocked": False}, + data={"blocked": True}, + ) + assert sorted(cache_deletions) == ["hash-1", "hash-2"] + + +@pytest.mark.asyncio +async def test_set_user_keys_blocked_noop_when_no_matching_keys(): + """If no keys match the desired flip, neither update_many nor cache delete runs.""" + mock_client, mock_db = _build_prisma_with_keys(user_keys=[]) + + with ( + patch("litellm.proxy.proxy_server.prisma_client", mock_client), + patch("litellm.proxy.proxy_server.user_api_key_cache", MagicMock()), + patch("litellm.proxy.proxy_server.proxy_logging_obj", MagicMock()), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2._delete_cache_key_object", + AsyncMock(), + ) as mocked_delete, + ): + flipped = await _set_user_keys_blocked(user_id="user-x", blocked=True) + + assert flipped == 0 + mock_db.litellm_verificationtoken.update_many.assert_not_called() + mocked_delete.assert_not_called() + + +@pytest.mark.asyncio +async def test_scim_delete_user_blocks_keys_before_deleting_user(): + """SCIM DELETE /Users/{id} must block the user's keys before removing the row.""" + user_id = "user-to-delete" + mock_user = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias=None, + teams=[], + metadata={}, + ) + keys = [_build_token_row("hash-a", user_id, blocked=False)] + mock_client, mock_db = _build_prisma_with_keys(keys, mock_user=mock_user) + + with ( + patch("litellm.proxy.proxy_server.prisma_client", mock_client), + patch("litellm.proxy.proxy_server.user_api_key_cache", MagicMock()), + patch("litellm.proxy.proxy_server.proxy_logging_obj", MagicMock()), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2._delete_cache_key_object", + AsyncMock(), + ), + ): + response = await delete_user(user_id=user_id) + + assert response.status_code == 204 + mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( + where={"user_id": user_id, "blocked": False}, + data={"blocked": True}, + ) + mock_db.litellm_usertable.delete.assert_awaited_once_with( + where={"user_id": user_id} + ) + + +@pytest.mark.asyncio +async def test_scim_patch_user_active_false_blocks_keys(): + user_id = "scim-user" + mock_user = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias=None, + teams=[], + metadata={"scim_active": True}, + ) + updated_user = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias=None, + teams=[], + metadata={"scim_active": False, "scim_metadata": {}}, + ) + keys = [_build_token_row("hash-z", user_id, blocked=False)] + mock_client, mock_db = _build_prisma_with_keys( + keys, mock_user=mock_user, updated_user=updated_user + ) + + patch_ops = SCIMPatchOp( + Operations=[SCIMPatchOperation(op="replace", path="active", value="False")] + ) + mock_scim_user = SCIMUser( + schemas=["urn:ietf:params:scim:schemas:core:2.0:User"], + id=user_id, + userName=user_id, + name=SCIMUserName(familyName="X", givenName="Y"), + emails=[SCIMUserEmail(value="x@example.com")], + active=False, + ) + + with ( + patch("litellm.proxy.proxy_server.prisma_client", mock_client), + patch("litellm.proxy.proxy_server.user_api_key_cache", MagicMock()), + patch("litellm.proxy.proxy_server.proxy_logging_obj", MagicMock()), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2.ScimTransformations.transform_litellm_user_to_scim_user", + AsyncMock(return_value=mock_scim_user), + ), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2._delete_cache_key_object", + AsyncMock(), + ), + ): + await patch_user(user_id=user_id, patch_ops=patch_ops) + + mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( + where={"user_id": user_id, "blocked": False}, + data={"blocked": True}, + ) + + +@pytest.mark.asyncio +async def test_scim_patch_user_active_true_unblocks_keys(): + user_id = "scim-user" + mock_user = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias=None, + teams=[], + metadata={"scim_active": False}, + ) + updated_user = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias=None, + teams=[], + metadata={"scim_active": True, "scim_metadata": {}}, + ) + keys = [_build_token_row("hash-r", user_id, blocked=True)] + mock_client, mock_db = _build_prisma_with_keys( + keys, mock_user=mock_user, updated_user=updated_user + ) + + patch_ops = SCIMPatchOp( + Operations=[SCIMPatchOperation(op="replace", path="active", value="True")] + ) + mock_scim_user = SCIMUser( + schemas=["urn:ietf:params:scim:schemas:core:2.0:User"], + id=user_id, + userName=user_id, + name=SCIMUserName(familyName="X", givenName="Y"), + emails=[SCIMUserEmail(value="x@example.com")], + active=True, + ) + + with ( + patch("litellm.proxy.proxy_server.prisma_client", mock_client), + patch("litellm.proxy.proxy_server.user_api_key_cache", MagicMock()), + patch("litellm.proxy.proxy_server.proxy_logging_obj", MagicMock()), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2.ScimTransformations.transform_litellm_user_to_scim_user", + AsyncMock(return_value=mock_scim_user), + ), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2._delete_cache_key_object", + AsyncMock(), + ), + ): + await patch_user(user_id=user_id, patch_ops=patch_ops) + + mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( + where={"user_id": user_id, "blocked": True}, + data={"blocked": False}, + ) + + +@pytest.mark.asyncio +async def test_scim_patch_user_no_active_change_does_not_touch_keys(): + """A patch that doesn't flip active must not call update_many on tokens.""" + user_id = "scim-user" + mock_user = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias="Old", + teams=[], + metadata={"scim_active": True}, + ) + updated_user = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias="New", + teams=[], + metadata={"scim_active": True, "scim_metadata": {}}, + ) + mock_client, mock_db = _build_prisma_with_keys( + user_keys=[], mock_user=mock_user, updated_user=updated_user + ) + + patch_ops = SCIMPatchOp( + Operations=[SCIMPatchOperation(op="replace", path="displayName", value="New")] + ) + mock_scim_user = SCIMUser( + schemas=["urn:ietf:params:scim:schemas:core:2.0:User"], + id=user_id, + userName=user_id, + name=SCIMUserName(familyName="X", givenName="Y"), + emails=[SCIMUserEmail(value="x@example.com")], + active=True, + ) + + with ( + patch("litellm.proxy.proxy_server.prisma_client", mock_client), + patch("litellm.proxy.proxy_server.user_api_key_cache", MagicMock()), + patch("litellm.proxy.proxy_server.proxy_logging_obj", MagicMock()), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2.ScimTransformations.transform_litellm_user_to_scim_user", + AsyncMock(return_value=mock_scim_user), + ), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2._delete_cache_key_object", + AsyncMock(), + ), + ): + await patch_user(user_id=user_id, patch_ops=patch_ops) + + mock_db.litellm_verificationtoken.find_many.assert_not_called() + mock_db.litellm_verificationtoken.update_many.assert_not_called() diff --git a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_patch_user.py b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_patch_user.py index 2c143a0a9a..2a2bed13bf 100644 --- a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_patch_user.py +++ b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_patch_user.py @@ -42,6 +42,9 @@ async def test_patch_user_updates_fields(): mock_db.litellm_usertable.find_unique = AsyncMock(return_value=mock_user) mock_db.litellm_usertable.update = AsyncMock(side_effect=mock_update) mock_db.litellm_teamtable.find_unique = AsyncMock(return_value=None) + # active=False triggers cascading key-block. No keys here, so return []. + mock_db.litellm_verificationtoken.find_many = AsyncMock(return_value=[]) + mock_db.litellm_verificationtoken.update_many = AsyncMock(return_value=None) # Mock the transformation function to return a proper SCIMUser mock_scim_user = SCIMUser( @@ -194,6 +197,8 @@ async def test_patch_user_deprovision_without_path(): mock_client.db = mock_db mock_db.litellm_usertable.find_unique = AsyncMock(return_value=mock_user) mock_db.litellm_usertable.update = AsyncMock(side_effect=mock_update) + mock_db.litellm_verificationtoken.find_many = AsyncMock(return_value=[]) + mock_db.litellm_verificationtoken.update_many = AsyncMock(return_value=None) mock_scim_user = SCIMUser( schemas=["urn:ietf:params:scim:schemas:core:2.0:User"], @@ -271,6 +276,8 @@ async def test_patch_user_multiple_fields_without_path(): mock_client.db = mock_db mock_db.litellm_usertable.find_unique = AsyncMock(return_value=mock_user) mock_db.litellm_usertable.update = AsyncMock(side_effect=mock_update) + mock_db.litellm_verificationtoken.find_many = AsyncMock(return_value=[]) + mock_db.litellm_verificationtoken.update_many = AsyncMock(return_value=None) mock_scim_user = SCIMUser( schemas=["urn:ietf:params:scim:schemas:core:2.0:User"], From 9aef4ee695edb4a9da9611afeb1a4a36d4a76323 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 30 Apr 2026 05:45:09 +0000 Subject: [PATCH 2/8] fix(scim): treat NULL blocked column as unblocked when deprovisioning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Prisma schema declares LiteLLM_VerificationToken.blocked as a nullable Boolean with no default, so virtual keys created via the key management endpoint persist with blocked=NULL. SQL equality (`blocked = false`) never matches NULL rows, so the previous `where={'blocked': not blocked}` filter silently skipped virtually all real keys when SCIM tried to block them. This made SCIM deprovisioning a no-op — and especially dangerous in DELETE flows where the user row is removed afterwards, leaving orphaned but fully-functional keys. Match both `False` and `None` when blocking, and only `True` when unblocking, so the state flip (and cache invalidation) actually fires for the keys it should. --- .../out/{404.html => 404/index.html} | 0 .../{_not-found.html => _not-found/index.html} | 0 .../index.html} | 0 .../index.html} | 0 .../{budgets.html => budgets/index.html} | 0 .../{caching.html => caching/index.html} | 0 .../index.html} | 0 .../{old-usage.html => old-usage/index.html} | 0 .../{prompts.html => prompts/index.html} | 0 .../index.html} | 0 .../{guardrails.html => guardrails/index.html} | 0 .../out/{login.html => login/index.html} | 0 .../out/{logs.html => logs/index.html} | 0 .../oauth/{callback.html => callback/index.html} | 0 .../out/{model-hub.html => model-hub/index.html} | 0 .../out/{model_hub.html => model_hub/index.html} | 0 .../index.html} | 0 .../index.html} | 0 .../{onboarding.html => onboarding/index.html} | 0 .../index.html} | 0 .../{playground.html => playground/index.html} | 0 .../out/{policies.html => policies/index.html} | 0 .../index.html} | 0 .../index.html} | 0 .../index.html} | 0 .../{ui-theme.html => ui-theme/index.html} | 0 .../out/{skills.html => skills/index.html} | 0 .../out/{teams.html => teams/index.html} | 0 .../out/{test-key.html => test-key/index.html} | 0 .../{mcp-servers.html => mcp-servers/index.html} | 0 .../index.html} | 0 .../out/{usage.html => usage/index.html} | 0 .../out/{users.html => users/index.html} | 0 .../index.html} | 0 .../proxy/management_endpoints/scim/scim_v2.py | 16 +++++++++++++--- .../scim/test_scim_key_deactivation.py | 15 ++++++++++++--- 36 files changed, 25 insertions(+), 6 deletions(-) rename litellm/proxy/_experimental/out/{404.html => 404/index.html} (100%) rename litellm/proxy/_experimental/out/{_not-found.html => _not-found/index.html} (100%) rename litellm/proxy/_experimental/out/{api-reference.html => api-reference/index.html} (100%) rename litellm/proxy/_experimental/out/experimental/{api-playground.html => api-playground/index.html} (100%) rename litellm/proxy/_experimental/out/experimental/{budgets.html => budgets/index.html} (100%) rename litellm/proxy/_experimental/out/experimental/{caching.html => caching/index.html} (100%) rename litellm/proxy/_experimental/out/experimental/{claude-code-plugins.html => claude-code-plugins/index.html} (100%) rename litellm/proxy/_experimental/out/experimental/{old-usage.html => old-usage/index.html} (100%) rename litellm/proxy/_experimental/out/experimental/{prompts.html => prompts/index.html} (100%) rename litellm/proxy/_experimental/out/experimental/{tag-management.html => tag-management/index.html} (100%) rename litellm/proxy/_experimental/out/{guardrails.html => guardrails/index.html} (100%) rename litellm/proxy/_experimental/out/{login.html => login/index.html} (100%) rename litellm/proxy/_experimental/out/{logs.html => logs/index.html} (100%) rename litellm/proxy/_experimental/out/mcp/oauth/{callback.html => callback/index.html} (100%) rename litellm/proxy/_experimental/out/{model-hub.html => model-hub/index.html} (100%) rename litellm/proxy/_experimental/out/{model_hub.html => model_hub/index.html} (100%) rename litellm/proxy/_experimental/out/{model_hub_table.html => model_hub_table/index.html} (100%) rename litellm/proxy/_experimental/out/{models-and-endpoints.html => models-and-endpoints/index.html} (100%) rename litellm/proxy/_experimental/out/{onboarding.html => onboarding/index.html} (100%) rename litellm/proxy/_experimental/out/{organizations.html => organizations/index.html} (100%) rename litellm/proxy/_experimental/out/{playground.html => playground/index.html} (100%) rename litellm/proxy/_experimental/out/{policies.html => policies/index.html} (100%) rename litellm/proxy/_experimental/out/settings/{admin-settings.html => admin-settings/index.html} (100%) rename litellm/proxy/_experimental/out/settings/{logging-and-alerts.html => logging-and-alerts/index.html} (100%) rename litellm/proxy/_experimental/out/settings/{router-settings.html => router-settings/index.html} (100%) rename litellm/proxy/_experimental/out/settings/{ui-theme.html => ui-theme/index.html} (100%) rename litellm/proxy/_experimental/out/{skills.html => skills/index.html} (100%) rename litellm/proxy/_experimental/out/{teams.html => teams/index.html} (100%) rename litellm/proxy/_experimental/out/{test-key.html => test-key/index.html} (100%) rename litellm/proxy/_experimental/out/tools/{mcp-servers.html => mcp-servers/index.html} (100%) rename litellm/proxy/_experimental/out/tools/{vector-stores.html => vector-stores/index.html} (100%) rename litellm/proxy/_experimental/out/{usage.html => usage/index.html} (100%) rename litellm/proxy/_experimental/out/{users.html => users/index.html} (100%) rename litellm/proxy/_experimental/out/{virtual-keys.html => virtual-keys/index.html} (100%) diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404/index.html similarity index 100% rename from litellm/proxy/_experimental/out/404.html rename to litellm/proxy/_experimental/out/404/index.html diff --git a/litellm/proxy/_experimental/out/_not-found.html b/litellm/proxy/_experimental/out/_not-found/index.html similarity index 100% rename from litellm/proxy/_experimental/out/_not-found.html rename to litellm/proxy/_experimental/out/_not-found/index.html diff --git a/litellm/proxy/_experimental/out/api-reference.html b/litellm/proxy/_experimental/out/api-reference/index.html similarity index 100% rename from litellm/proxy/_experimental/out/api-reference.html rename to litellm/proxy/_experimental/out/api-reference/index.html diff --git a/litellm/proxy/_experimental/out/experimental/api-playground.html b/litellm/proxy/_experimental/out/experimental/api-playground/index.html similarity index 100% rename from litellm/proxy/_experimental/out/experimental/api-playground.html rename to litellm/proxy/_experimental/out/experimental/api-playground/index.html diff --git a/litellm/proxy/_experimental/out/experimental/budgets.html b/litellm/proxy/_experimental/out/experimental/budgets/index.html similarity index 100% rename from litellm/proxy/_experimental/out/experimental/budgets.html rename to litellm/proxy/_experimental/out/experimental/budgets/index.html diff --git a/litellm/proxy/_experimental/out/experimental/caching.html b/litellm/proxy/_experimental/out/experimental/caching/index.html similarity index 100% rename from litellm/proxy/_experimental/out/experimental/caching.html rename to litellm/proxy/_experimental/out/experimental/caching/index.html diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins.html b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.html similarity index 100% rename from litellm/proxy/_experimental/out/experimental/claude-code-plugins.html rename to litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.html diff --git a/litellm/proxy/_experimental/out/experimental/old-usage.html b/litellm/proxy/_experimental/out/experimental/old-usage/index.html similarity index 100% rename from litellm/proxy/_experimental/out/experimental/old-usage.html rename to litellm/proxy/_experimental/out/experimental/old-usage/index.html diff --git a/litellm/proxy/_experimental/out/experimental/prompts.html b/litellm/proxy/_experimental/out/experimental/prompts/index.html similarity index 100% rename from litellm/proxy/_experimental/out/experimental/prompts.html rename to litellm/proxy/_experimental/out/experimental/prompts/index.html diff --git a/litellm/proxy/_experimental/out/experimental/tag-management.html b/litellm/proxy/_experimental/out/experimental/tag-management/index.html similarity index 100% rename from litellm/proxy/_experimental/out/experimental/tag-management.html rename to litellm/proxy/_experimental/out/experimental/tag-management/index.html diff --git a/litellm/proxy/_experimental/out/guardrails.html b/litellm/proxy/_experimental/out/guardrails/index.html similarity index 100% rename from litellm/proxy/_experimental/out/guardrails.html rename to litellm/proxy/_experimental/out/guardrails/index.html diff --git a/litellm/proxy/_experimental/out/login.html b/litellm/proxy/_experimental/out/login/index.html similarity index 100% rename from litellm/proxy/_experimental/out/login.html rename to litellm/proxy/_experimental/out/login/index.html diff --git a/litellm/proxy/_experimental/out/logs.html b/litellm/proxy/_experimental/out/logs/index.html similarity index 100% rename from litellm/proxy/_experimental/out/logs.html rename to litellm/proxy/_experimental/out/logs/index.html diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback.html b/litellm/proxy/_experimental/out/mcp/oauth/callback/index.html similarity index 100% rename from litellm/proxy/_experimental/out/mcp/oauth/callback.html rename to litellm/proxy/_experimental/out/mcp/oauth/callback/index.html diff --git a/litellm/proxy/_experimental/out/model-hub.html b/litellm/proxy/_experimental/out/model-hub/index.html similarity index 100% rename from litellm/proxy/_experimental/out/model-hub.html rename to litellm/proxy/_experimental/out/model-hub/index.html diff --git a/litellm/proxy/_experimental/out/model_hub.html b/litellm/proxy/_experimental/out/model_hub/index.html similarity index 100% rename from litellm/proxy/_experimental/out/model_hub.html rename to litellm/proxy/_experimental/out/model_hub/index.html diff --git a/litellm/proxy/_experimental/out/model_hub_table.html b/litellm/proxy/_experimental/out/model_hub_table/index.html similarity index 100% rename from litellm/proxy/_experimental/out/model_hub_table.html rename to litellm/proxy/_experimental/out/model_hub_table/index.html diff --git a/litellm/proxy/_experimental/out/models-and-endpoints.html b/litellm/proxy/_experimental/out/models-and-endpoints/index.html similarity index 100% rename from litellm/proxy/_experimental/out/models-and-endpoints.html rename to litellm/proxy/_experimental/out/models-and-endpoints/index.html diff --git a/litellm/proxy/_experimental/out/onboarding.html b/litellm/proxy/_experimental/out/onboarding/index.html similarity index 100% rename from litellm/proxy/_experimental/out/onboarding.html rename to litellm/proxy/_experimental/out/onboarding/index.html diff --git a/litellm/proxy/_experimental/out/organizations.html b/litellm/proxy/_experimental/out/organizations/index.html similarity index 100% rename from litellm/proxy/_experimental/out/organizations.html rename to litellm/proxy/_experimental/out/organizations/index.html diff --git a/litellm/proxy/_experimental/out/playground.html b/litellm/proxy/_experimental/out/playground/index.html similarity index 100% rename from litellm/proxy/_experimental/out/playground.html rename to litellm/proxy/_experimental/out/playground/index.html diff --git a/litellm/proxy/_experimental/out/policies.html b/litellm/proxy/_experimental/out/policies/index.html similarity index 100% rename from litellm/proxy/_experimental/out/policies.html rename to litellm/proxy/_experimental/out/policies/index.html diff --git a/litellm/proxy/_experimental/out/settings/admin-settings.html b/litellm/proxy/_experimental/out/settings/admin-settings/index.html similarity index 100% rename from litellm/proxy/_experimental/out/settings/admin-settings.html rename to litellm/proxy/_experimental/out/settings/admin-settings/index.html diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts.html b/litellm/proxy/_experimental/out/settings/logging-and-alerts/index.html similarity index 100% rename from litellm/proxy/_experimental/out/settings/logging-and-alerts.html rename to litellm/proxy/_experimental/out/settings/logging-and-alerts/index.html diff --git a/litellm/proxy/_experimental/out/settings/router-settings.html b/litellm/proxy/_experimental/out/settings/router-settings/index.html similarity index 100% rename from litellm/proxy/_experimental/out/settings/router-settings.html rename to litellm/proxy/_experimental/out/settings/router-settings/index.html diff --git a/litellm/proxy/_experimental/out/settings/ui-theme.html b/litellm/proxy/_experimental/out/settings/ui-theme/index.html similarity index 100% rename from litellm/proxy/_experimental/out/settings/ui-theme.html rename to litellm/proxy/_experimental/out/settings/ui-theme/index.html diff --git a/litellm/proxy/_experimental/out/skills.html b/litellm/proxy/_experimental/out/skills/index.html similarity index 100% rename from litellm/proxy/_experimental/out/skills.html rename to litellm/proxy/_experimental/out/skills/index.html diff --git a/litellm/proxy/_experimental/out/teams.html b/litellm/proxy/_experimental/out/teams/index.html similarity index 100% rename from litellm/proxy/_experimental/out/teams.html rename to litellm/proxy/_experimental/out/teams/index.html diff --git a/litellm/proxy/_experimental/out/test-key.html b/litellm/proxy/_experimental/out/test-key/index.html similarity index 100% rename from litellm/proxy/_experimental/out/test-key.html rename to litellm/proxy/_experimental/out/test-key/index.html diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers.html b/litellm/proxy/_experimental/out/tools/mcp-servers/index.html similarity index 100% rename from litellm/proxy/_experimental/out/tools/mcp-servers.html rename to litellm/proxy/_experimental/out/tools/mcp-servers/index.html diff --git a/litellm/proxy/_experimental/out/tools/vector-stores.html b/litellm/proxy/_experimental/out/tools/vector-stores/index.html similarity index 100% rename from litellm/proxy/_experimental/out/tools/vector-stores.html rename to litellm/proxy/_experimental/out/tools/vector-stores/index.html diff --git a/litellm/proxy/_experimental/out/usage.html b/litellm/proxy/_experimental/out/usage/index.html similarity index 100% rename from litellm/proxy/_experimental/out/usage.html rename to litellm/proxy/_experimental/out/usage/index.html diff --git a/litellm/proxy/_experimental/out/users.html b/litellm/proxy/_experimental/out/users/index.html similarity index 100% rename from litellm/proxy/_experimental/out/users.html rename to litellm/proxy/_experimental/out/users/index.html diff --git a/litellm/proxy/_experimental/out/virtual-keys.html b/litellm/proxy/_experimental/out/virtual-keys/index.html similarity index 100% rename from litellm/proxy/_experimental/out/virtual-keys.html rename to litellm/proxy/_experimental/out/virtual-keys/index.html diff --git a/litellm/proxy/management_endpoints/scim/scim_v2.py b/litellm/proxy/management_endpoints/scim/scim_v2.py index 8f332dcf48..92c8dc344a 100644 --- a/litellm/proxy/management_endpoints/scim/scim_v2.py +++ b/litellm/proxy/management_endpoints/scim/scim_v2.py @@ -351,15 +351,25 @@ async def _set_user_keys_blocked(user_id: str, blocked: bool) -> int: prisma_client = await _get_prisma_client_or_raise_exception() # Only flip keys whose current state differs — avoids touching keys that - # were already (un)blocked manually by an admin. + # were already (un)blocked manually by an admin. `blocked` is a nullable + # column with no default, so existing keys typically have `blocked=NULL`; + # we must treat NULL as "not blocked" so SQL equality on NULL doesn't + # silently skip them. + if blocked: + state_filter: Dict[str, Any] = {"OR": [{"blocked": False}, {"blocked": None}]} + else: + state_filter = {"blocked": True} + + where_clause: Dict[str, Any] = {"user_id": user_id, **state_filter} + affected_keys = await prisma_client.db.litellm_verificationtoken.find_many( - where={"user_id": user_id, "blocked": not blocked}, + where=where_clause, ) if not affected_keys: return 0 await prisma_client.db.litellm_verificationtoken.update_many( - where={"user_id": user_id, "blocked": not blocked}, + where=where_clause, data={"blocked": blocked}, ) diff --git a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py index 2b338d9716..e68aef9aed 100644 --- a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py +++ b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py @@ -75,7 +75,10 @@ async def test_set_user_keys_blocked_flips_state_and_invalidates_cache(): assert flipped == 2 mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( - where={"user_id": "user-x", "blocked": False}, + where={ + "user_id": "user-x", + "OR": [{"blocked": False}, {"blocked": None}], + }, data={"blocked": True}, ) assert sorted(cache_deletions) == ["hash-1", "hash-2"] @@ -129,7 +132,10 @@ async def test_scim_delete_user_blocks_keys_before_deleting_user(): assert response.status_code == 204 mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( - where={"user_id": user_id, "blocked": False}, + where={ + "user_id": user_id, + "OR": [{"blocked": False}, {"blocked": None}], + }, data={"blocked": True}, ) mock_db.litellm_usertable.delete.assert_awaited_once_with( @@ -187,7 +193,10 @@ async def test_scim_patch_user_active_false_blocks_keys(): await patch_user(user_id=user_id, patch_ops=patch_ops) mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( - where={"user_id": user_id, "blocked": False}, + where={ + "user_id": user_id, + "OR": [{"blocked": False}, {"blocked": None}], + }, data={"blocked": True}, ) From dc123d9f12d81244062761677e57dfa6c85931de Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Apr 2026 06:22:35 +0000 Subject: [PATCH 3/8] test(vertex_batch): set is_redirect=False on mocked AsyncHTTPHandler responses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The redirect-following added to async_safe_get checks response.is_redirect on every hop. Two vertex batch tests stub AsyncHTTPHandler.get with a bare MagicMock, whose default-truthy is_redirect made the redirect path fire, then crashed in httpx.URL().join() because headers.get('location') was also a MagicMock instead of a string. Set is_redirect=False explicitly so the mocked response models a non-redirect terminal response. Also tighten _extract_redirect_url to raise SSRFError on non-string Location values (defense-in-depth — a real httpx Response always returns str|None, but this avoids a confusing TypeError if anything else ever slips through). This is an unrelated CI fix piggybacked on the SCIM PR to unblock the batches test suite. --- litellm/litellm_core_utils/url_utils.py | 2 +- tests/batches_tests/test_openai_batches_and_files.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/litellm_core_utils/url_utils.py b/litellm/litellm_core_utils/url_utils.py index a65d0892aa..aabf4e84a3 100644 --- a/litellm/litellm_core_utils/url_utils.py +++ b/litellm/litellm_core_utils/url_utils.py @@ -205,7 +205,7 @@ _MAX_REDIRECTS = 10 def _extract_redirect_url(response: Any, request_url: str) -> str: """Extract and resolve the redirect target from a response's Location header.""" location = response.headers.get("location") - if not location: + if not isinstance(location, str) or not location: raise SSRFError("Redirect response has no Location header") # Resolve relative URLs against the request URL return str(httpx.URL(request_url).join(location)) diff --git a/tests/batches_tests/test_openai_batches_and_files.py b/tests/batches_tests/test_openai_batches_and_files.py index 0aed224c25..3f69aa01f9 100644 --- a/tests/batches_tests/test_openai_batches_and_files.py +++ b/tests/batches_tests/test_openai_batches_and_files.py @@ -558,6 +558,7 @@ async def test_avertex_batch_prediction(monkeypatch): mock_get_response.json.return_value = mock_vertex_batch_response mock_get_response.status_code = 200 mock_get_response.raise_for_status.return_value = None + mock_get_response.is_redirect = False mock_get.return_value = mock_get_response retrieved_batch = await litellm.aretrieve_batch( @@ -590,6 +591,7 @@ async def test_vertex_list_batches(monkeypatch): mock_get_response.json.return_value = mock_vertex_list_response mock_get_response.status_code = 200 mock_get_response.raise_for_status.return_value = None + mock_get_response.is_redirect = False mock_get.return_value = mock_get_response list_response = await litellm.alist_batches( From 8c409006ad9626ea2dde2f8f61b7b9f3cf4f75f2 Mon Sep 17 00:00:00 2001 From: mateo-berri Date: Fri, 1 May 2026 19:34:56 +0000 Subject: [PATCH 4/8] fix(scim): preserve admin-blocked keys across SCIM reactivation Tag each key SCIM blocks with metadata.scim_blocked=True. On reactivation unblock only those keys, leaving keys an admin blocked for unrelated reasons untouched. --- .../management_endpoints/scim/scim_v2.py | 73 +++++++++---- .../scim/test_scim_key_deactivation.py | 100 +++++++++++++----- 2 files changed, 125 insertions(+), 48 deletions(-) diff --git a/litellm/proxy/management_endpoints/scim/scim_v2.py b/litellm/proxy/management_endpoints/scim/scim_v2.py index 92c8dc344a..173acd41b3 100644 --- a/litellm/proxy/management_endpoints/scim/scim_v2.py +++ b/litellm/proxy/management_endpoints/scim/scim_v2.py @@ -337,41 +337,72 @@ async def _handle_team_membership_changes( ) +SCIM_BLOCKED_METADATA_KEY = "scim_blocked" + + +def _key_was_scim_blocked(metadata: Any) -> bool: + """True if a verification token carries the SCIM-block marker in metadata.""" + return ( + isinstance(metadata, dict) and metadata.get(SCIM_BLOCKED_METADATA_KEY) is True + ) + + async def _set_user_keys_blocked(user_id: str, blocked: bool) -> int: """ - Block or unblock all virtual keys owned by a user and invalidate them in - the in-memory/redis caches so the change takes effect immediately. + Block or unblock virtual keys owned by a user and invalidate them in the + in-memory/redis caches so the change takes effect immediately. - Returns the number of keys whose state was flipped. Used by the SCIM - deprovisioning flow so a user's keys stop working the moment SCIM marks - the user inactive (or deletes them). + Each key SCIM blocks is tagged with ``metadata.scim_blocked = True``. On + reactivation we only unblock keys carrying that marker, so a key an admin + blocked manually for unrelated reasons is left alone. + + Returns the number of keys whose state was flipped. """ from litellm.proxy.proxy_server import proxy_logging_obj, user_api_key_cache prisma_client = await _get_prisma_client_or_raise_exception() - # Only flip keys whose current state differs — avoids touching keys that - # were already (un)blocked manually by an admin. `blocked` is a nullable - # column with no default, so existing keys typically have `blocked=NULL`; - # we must treat NULL as "not blocked" so SQL equality on NULL doesn't - # silently skip them. if blocked: - state_filter: Dict[str, Any] = {"OR": [{"blocked": False}, {"blocked": None}]} + # Block keys that aren't already blocked. `blocked` is a nullable column + # with no default so existing rows typically hold NULL; treat NULL as + # "not blocked" so SQL equality on NULL doesn't silently skip them. + candidates = await prisma_client.db.litellm_verificationtoken.find_many( + where={ + "user_id": user_id, + "OR": [{"blocked": False}, {"blocked": None}], + }, + ) + affected_keys = candidates else: - state_filter = {"blocked": True} + # Only unblock keys that SCIM previously blocked. An admin-managed + # block has no `scim_blocked` marker and must not be reversed here. + candidates = await prisma_client.db.litellm_verificationtoken.find_many( + where={"user_id": user_id, "blocked": True}, + ) + affected_keys = [k for k in candidates if _key_was_scim_blocked(k.metadata)] - where_clause: Dict[str, Any] = {"user_id": user_id, **state_filter} - - affected_keys = await prisma_client.db.litellm_verificationtoken.find_many( - where=where_clause, - ) if not affected_keys: return 0 - await prisma_client.db.litellm_verificationtoken.update_many( - where=where_clause, - data={"blocked": blocked}, - ) + # Per-key updates: we need to add/remove the SCIM-block marker in JSON + # metadata, which `update_many` can't express. Cardinality is bounded by + # the number of keys a single user owns. + for key_row in affected_keys: + current_metadata: Dict[str, Any] = ( + dict(key_row.metadata) if isinstance(key_row.metadata, dict) else {} + ) + if blocked: + new_metadata = {**current_metadata, SCIM_BLOCKED_METADATA_KEY: True} + else: + new_metadata = { + k: v + for k, v in current_metadata.items() + if k != SCIM_BLOCKED_METADATA_KEY + } + await prisma_client.db.litellm_verificationtoken.update( + where={"token": key_row.token}, + data={"blocked": blocked, "metadata": safe_dumps(new_metadata)}, + ) for key_row in affected_keys: await _delete_cache_key_object( diff --git a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py index e68aef9aed..e14209ce06 100644 --- a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py +++ b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py @@ -24,11 +24,12 @@ from litellm.types.proxy.management_endpoints.scim_v2 import ( ) -def _build_token_row(token: str, user_id: str, blocked: bool): +def _build_token_row(token: str, user_id: str, blocked: bool, metadata=None): row = MagicMock() row.token = token row.user_id = user_id row.blocked = blocked + row.metadata = metadata if metadata is not None else {} return row @@ -45,6 +46,7 @@ def _build_prisma_with_keys(user_keys, mock_user=None, updated_user=None): mock_db.litellm_verificationtoken.find_many = AsyncMock(return_value=user_keys) mock_db.litellm_verificationtoken.update_many = AsyncMock(return_value=None) + mock_db.litellm_verificationtoken.update = AsyncMock(return_value=None) return mock_client, mock_db @@ -74,13 +76,17 @@ async def test_set_user_keys_blocked_flips_state_and_invalidates_cache(): flipped = await _set_user_keys_blocked(user_id="user-x", blocked=True) assert flipped == 2 - mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( - where={ - "user_id": "user-x", - "OR": [{"blocked": False}, {"blocked": None}], - }, - data={"blocked": True}, - ) + # Each key gets a per-row update that flips `blocked` and stamps the + # SCIM-block marker into metadata. + assert mock_db.litellm_verificationtoken.update.await_count == 2 + update_calls = mock_db.litellm_verificationtoken.update.await_args_list + seen_tokens = set() + for call in update_calls: + kwargs = call.kwargs or call[1] + seen_tokens.add(kwargs["where"]["token"]) + assert kwargs["data"]["blocked"] is True + assert '"scim_blocked": true' in kwargs["data"]["metadata"] + assert seen_tokens == {"hash-1", "hash-2"} assert sorted(cache_deletions) == ["hash-1", "hash-2"] @@ -101,10 +107,48 @@ async def test_set_user_keys_blocked_noop_when_no_matching_keys(): flipped = await _set_user_keys_blocked(user_id="user-x", blocked=True) assert flipped == 0 + mock_db.litellm_verificationtoken.update.assert_not_called() mock_db.litellm_verificationtoken.update_many.assert_not_called() mocked_delete.assert_not_called() +@pytest.mark.asyncio +async def test_set_user_keys_unblocked_skips_admin_blocked_keys(): + """Reactivation must leave keys an admin blocked (no scim_blocked marker) alone.""" + keys = [ + # SCIM-blocked: should be unblocked. + _build_token_row( + "hash-scim", "user-x", blocked=True, metadata={"scim_blocked": True} + ), + # Admin-blocked for unrelated reasons: must remain blocked. + _build_token_row("hash-admin", "user-x", blocked=True, metadata={}), + ] + mock_client, mock_db = _build_prisma_with_keys(keys) + + cache_deletions = [] + + async def fake_delete(hashed_token, user_api_key_cache, proxy_logging_obj): + cache_deletions.append(hashed_token) + + with ( + patch("litellm.proxy.proxy_server.prisma_client", mock_client), + patch("litellm.proxy.proxy_server.user_api_key_cache", MagicMock()), + patch("litellm.proxy.proxy_server.proxy_logging_obj", MagicMock()), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2._delete_cache_key_object", + AsyncMock(side_effect=fake_delete), + ), + ): + flipped = await _set_user_keys_blocked(user_id="user-x", blocked=False) + + assert flipped == 1 + mock_db.litellm_verificationtoken.update.assert_awaited_once() + update_kwargs = mock_db.litellm_verificationtoken.update.await_args.kwargs + assert update_kwargs["where"] == {"token": "hash-scim"} + assert update_kwargs["data"]["blocked"] is False + assert cache_deletions == ["hash-scim"] + + @pytest.mark.asyncio async def test_scim_delete_user_blocks_keys_before_deleting_user(): """SCIM DELETE /Users/{id} must block the user's keys before removing the row.""" @@ -131,13 +175,11 @@ async def test_scim_delete_user_blocks_keys_before_deleting_user(): response = await delete_user(user_id=user_id) assert response.status_code == 204 - mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( - where={ - "user_id": user_id, - "OR": [{"blocked": False}, {"blocked": None}], - }, - data={"blocked": True}, - ) + mock_db.litellm_verificationtoken.update.assert_awaited_once() + update_kwargs = mock_db.litellm_verificationtoken.update.await_args.kwargs + assert update_kwargs["where"] == {"token": "hash-a"} + assert update_kwargs["data"]["blocked"] is True + assert '"scim_blocked": true' in update_kwargs["data"]["metadata"] mock_db.litellm_usertable.delete.assert_awaited_once_with( where={"user_id": user_id} ) @@ -192,13 +234,11 @@ async def test_scim_patch_user_active_false_blocks_keys(): ): await patch_user(user_id=user_id, patch_ops=patch_ops) - mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( - where={ - "user_id": user_id, - "OR": [{"blocked": False}, {"blocked": None}], - }, - data={"blocked": True}, - ) + mock_db.litellm_verificationtoken.update.assert_awaited_once() + update_kwargs = mock_db.litellm_verificationtoken.update.await_args.kwargs + assert update_kwargs["where"] == {"token": "hash-z"} + assert update_kwargs["data"]["blocked"] is True + assert '"scim_blocked": true' in update_kwargs["data"]["metadata"] @pytest.mark.asyncio @@ -218,7 +258,11 @@ async def test_scim_patch_user_active_true_unblocks_keys(): teams=[], metadata={"scim_active": True, "scim_metadata": {}}, ) - keys = [_build_token_row("hash-r", user_id, blocked=True)] + keys = [ + _build_token_row( + "hash-r", user_id, blocked=True, metadata={"scim_blocked": True} + ) + ] mock_client, mock_db = _build_prisma_with_keys( keys, mock_user=mock_user, updated_user=updated_user ) @@ -250,10 +294,12 @@ async def test_scim_patch_user_active_true_unblocks_keys(): ): await patch_user(user_id=user_id, patch_ops=patch_ops) - mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with( - where={"user_id": user_id, "blocked": True}, - data={"blocked": False}, - ) + mock_db.litellm_verificationtoken.update.assert_awaited_once() + update_kwargs = mock_db.litellm_verificationtoken.update.await_args.kwargs + assert update_kwargs["where"] == {"token": "hash-r"} + assert update_kwargs["data"]["blocked"] is False + # SCIM-block marker is stripped on reactivation. + assert "scim_blocked" not in update_kwargs["data"]["metadata"] @pytest.mark.asyncio From be4f46683af81a02d4164cf16830e90c982ca5fa Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Fri, 1 May 2026 20:20:39 -0700 Subject: [PATCH 5/8] fix(scim): cascade FK cleanup on user delete and surface block status in UI SCIM DELETE /Users/{id} previously called litellm_usertable.delete without clearing rows that FK back to the user, so Postgres rejected the delete with LiteLLM_InvitationLink_user_id_fkey and the SCIM caller saw a 500. Add a helper to drop invitation_link, organization_membership, and team_membership rows before the user delete (mirrors /user/delete in internal_user_endpoints). Also add a Status column to the Virtual Keys and Internal Users tables so admins can see at a glance which keys are blocked and which users SCIM has deactivated. SCIM-blocked keys carry a tooltip explaining the origin. Pin the dashboard's Node version to 20 via .nvmrc to match CI. --- .../management_endpoints/scim/scim_v2.py | 26 ++++++ .../scim/test_scim_key_deactivation.py | 65 +++++++++++++ ui/litellm-dashboard/.nvmrc | 1 + .../VirtualKeysPage/VirtualKeysTable.test.tsx | 92 ++++++++++++++++++- .../VirtualKeysPage/VirtualKeysTable.tsx | 31 ++++++- .../src/components/view_users/columns.tsx | 26 +++++- .../src/components/view_users/table.test.tsx | 91 ++++++++++++++++++ .../src/components/view_users/types.ts | 1 + 8 files changed, 330 insertions(+), 3 deletions(-) create mode 100644 ui/litellm-dashboard/.nvmrc diff --git a/litellm/proxy/management_endpoints/scim/scim_v2.py b/litellm/proxy/management_endpoints/scim/scim_v2.py index 173acd41b3..5692ed5bc5 100644 --- a/litellm/proxy/management_endpoints/scim/scim_v2.py +++ b/litellm/proxy/management_endpoints/scim/scim_v2.py @@ -420,6 +420,30 @@ async def _set_user_keys_blocked(user_id: str, blocked: bool) -> int: return len(affected_keys) +async def _delete_rows_referencing_user(prisma_client: Any, *, user_id: str) -> None: + """Drop rows whose foreign keys reference ``LiteLLM_UserTable.user_id``. + + Required before deleting the user row itself, otherwise Postgres rejects + the user delete with an FK constraint violation (e.g. + ``LiteLLM_InvitationLink_user_id_fkey``). + """ + await prisma_client.db.litellm_invitationlink.delete_many( + where={ + "OR": [ + {"user_id": user_id}, + {"created_by": user_id}, + {"updated_by": user_id}, + ] + } + ) + await prisma_client.db.litellm_organizationmembership.delete_many( + where={"user_id": user_id} + ) + await prisma_client.db.litellm_teammembership.delete_many( + where={"user_id": user_id} + ) + + def _scim_active_value(metadata: Optional[Dict[str, Any]]) -> Optional[bool]: """Read the SCIM active flag from a user's metadata dict, if present.""" if not metadata: @@ -1118,6 +1142,8 @@ async def delete_user( # missing owner. await _set_user_keys_blocked(user_id=user_id, blocked=True) + await _delete_rows_referencing_user(prisma_client, user_id=user_id) + # Delete user await prisma_client.db.litellm_usertable.delete(where={"user_id": user_id}) diff --git a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py index e14209ce06..ad02c0e2a8 100644 --- a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py +++ b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py @@ -47,6 +47,9 @@ def _build_prisma_with_keys(user_keys, mock_user=None, updated_user=None): mock_db.litellm_verificationtoken.find_many = AsyncMock(return_value=user_keys) mock_db.litellm_verificationtoken.update_many = AsyncMock(return_value=None) mock_db.litellm_verificationtoken.update = AsyncMock(return_value=None) + mock_db.litellm_invitationlink.delete_many = AsyncMock(return_value=None) + mock_db.litellm_organizationmembership.delete_many = AsyncMock(return_value=None) + mock_db.litellm_teammembership.delete_many = AsyncMock(return_value=None) return mock_client, mock_db @@ -185,6 +188,68 @@ async def test_scim_delete_user_blocks_keys_before_deleting_user(): ) +@pytest.mark.asyncio +async def test_scim_delete_user_clears_fk_referenced_rows_before_user_delete(): + user_id = "user-with-invite" + mock_user = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias=None, + teams=[], + metadata={}, + ) + mock_client, mock_db = _build_prisma_with_keys(user_keys=[], mock_user=mock_user) + + call_order: list = [] + mock_db.litellm_invitationlink.delete_many = AsyncMock( + side_effect=lambda **kw: call_order.append(("invitation", kw)) or None + ) + mock_db.litellm_organizationmembership.delete_many = AsyncMock( + side_effect=lambda **kw: call_order.append(("orgmembership", kw)) or None + ) + mock_db.litellm_teammembership.delete_many = AsyncMock( + side_effect=lambda **kw: call_order.append(("teammembership", kw)) or None + ) + mock_db.litellm_usertable.delete = AsyncMock( + side_effect=lambda **kw: call_order.append(("user", kw)) or None + ) + + with ( + patch("litellm.proxy.proxy_server.prisma_client", mock_client), + patch("litellm.proxy.proxy_server.user_api_key_cache", MagicMock()), + patch("litellm.proxy.proxy_server.proxy_logging_obj", MagicMock()), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2._delete_cache_key_object", + AsyncMock(), + ), + ): + response = await delete_user(user_id=user_id) + + assert response.status_code == 204 + + mock_db.litellm_invitationlink.delete_many.assert_awaited_once() + inv_kwargs = mock_db.litellm_invitationlink.delete_many.await_args.kwargs + assert inv_kwargs == { + "where": { + "OR": [ + {"user_id": user_id}, + {"created_by": user_id}, + {"updated_by": user_id}, + ] + } + } + mock_db.litellm_organizationmembership.delete_many.assert_awaited_once_with( + where={"user_id": user_id} + ) + mock_db.litellm_teammembership.delete_many.assert_awaited_once_with( + where={"user_id": user_id} + ) + + stages = [stage for stage, _ in call_order] + assert stages.index("user") > stages.index("invitation") + assert stages.index("user") > stages.index("orgmembership") + + @pytest.mark.asyncio async def test_scim_patch_user_active_false_blocks_keys(): user_id = "scim-user" diff --git a/ui/litellm-dashboard/.nvmrc b/ui/litellm-dashboard/.nvmrc new file mode 100644 index 0000000000..209e3ef4b6 --- /dev/null +++ b/ui/litellm-dashboard/.nvmrc @@ -0,0 +1 @@ +20 diff --git a/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.test.tsx b/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.test.tsx index e6d144df65..98813f8462 100644 --- a/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.test.tsx +++ b/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.test.tsx @@ -1,4 +1,4 @@ -import { screen, waitFor, fireEvent } from "@testing-library/react"; +import { act, screen, waitFor, fireEvent } from "@testing-library/react"; import { vi, it, expect, beforeEach, MockedFunction } from "vitest"; import { renderWithProviders } from "../../../tests/test-utils"; import { VirtualKeysTable } from "./VirtualKeysTable"; @@ -974,3 +974,93 @@ describe("refetch button", () => { expect(screen.getByText("Fetch")).toBeInTheDocument(); }); }); + +describe("Status column reflects key.blocked / scim_blocked metadata", () => { + it("should render Active for a non-blocked key", async () => { + mockUseFilterLogic.mockReturnValue({ + filters: { + "Team ID": "", + "Organization ID": "", + "Key Alias": "", + "User ID": "", + "Sort By": "created_at", + "Sort Order": "desc", + }, + filteredKeys: [{ ...mockKey, blocked: false, metadata: {} }], + filteredTotalCount: null, + allTeams: [mockTeam], + allOrganizations: [mockOrganization], + handleFilterChange: vi.fn(), + handleFilterReset: vi.fn(), + }); + + renderWithProviders(); + + await waitFor(() => { + expect(screen.getByTestId(`key-status-${mockKey.token_id}`)).toHaveTextContent( + "Active", + ); + }); + }); + + it("should render Blocked when key.blocked is true", async () => { + mockUseFilterLogic.mockReturnValue({ + filters: { + "Team ID": "", + "Organization ID": "", + "Key Alias": "", + "User ID": "", + "Sort By": "created_at", + "Sort Order": "desc", + }, + filteredKeys: [{ ...mockKey, blocked: true, metadata: {} }], + filteredTotalCount: null, + allTeams: [mockTeam], + allOrganizations: [mockOrganization], + handleFilterChange: vi.fn(), + handleFilterReset: vi.fn(), + }); + + renderWithProviders(); + + await waitFor(() => { + expect(screen.getByTestId(`key-status-${mockKey.token_id}`)).toHaveTextContent( + "Blocked", + ); + }); + expect(screen.queryByText(/Blocked by SCIM/i)).not.toBeInTheDocument(); + }); + + it("should mark a SCIM-blocked key with the SCIM tooltip reason", async () => { + mockUseFilterLogic.mockReturnValue({ + filters: { + "Team ID": "", + "Organization ID": "", + "Key Alias": "", + "User ID": "", + "Sort By": "created_at", + "Sort Order": "desc", + }, + filteredKeys: [ + { ...mockKey, blocked: true, metadata: { scim_blocked: true } }, + ], + filteredTotalCount: null, + allTeams: [mockTeam], + allOrganizations: [mockOrganization], + handleFilterChange: vi.fn(), + handleFilterReset: vi.fn(), + }); + + renderWithProviders(); + + const tag = await screen.findByTestId(`key-status-${mockKey.token_id}`); + expect(tag).toHaveTextContent("Blocked"); + + act(() => { + fireEvent.mouseEnter(tag); + }); + await waitFor(() => { + expect(screen.getByText(/Blocked by SCIM/i)).toBeInTheDocument(); + }); + }); +}); diff --git a/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.tsx b/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.tsx index b30d4b6ce5..b48f0285f6 100644 --- a/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.tsx +++ b/ui/litellm-dashboard/src/components/VirtualKeysPage/VirtualKeysTable.tsx @@ -26,7 +26,7 @@ import { Text, } from "@tremor/react"; import { InfoCircleOutlined, SyncOutlined } from "@ant-design/icons"; -import { Button as AntButton, Popover, Skeleton, Tooltip, Typography } from "antd"; +import { Button as AntButton, Popover, Skeleton, Tag, Tooltip, Typography } from "antd"; import React, { useEffect, useDeferredValue, useMemo, useState } from "react"; import { getModelDisplayName } from "../key_team_helpers/fetch_available_models_team_key"; import { useFilterLogic } from "../key_team_helpers/filter_logic"; @@ -183,6 +183,35 @@ export function VirtualKeysTable({ teams, organizations, onSortChange, currentSo ); }, }, + { + id: "status", + header: "Status", + size: 100, + enableSorting: false, + cell: ({ row }) => { + const key = row.original; + if (key.blocked !== true) { + return ( + + Active + + ); + } + const isScimBlocked = + (key.metadata as Record | null | undefined) + ?.scim_blocked === true; + const reason = isScimBlocked + ? "Blocked by SCIM (external identity provider deactivated or deleted the owning user)." + : "Blocked. Requests using this key will be rejected with 401."; + return ( + + + Blocked + + + ); + }, + }, { id: "key_name", accessorKey: "key_name", diff --git a/ui/litellm-dashboard/src/components/view_users/columns.tsx b/ui/litellm-dashboard/src/components/view_users/columns.tsx index 4b9fad8f23..fa3661067f 100644 --- a/ui/litellm-dashboard/src/components/view_users/columns.tsx +++ b/ui/litellm-dashboard/src/components/view_users/columns.tsx @@ -1,6 +1,6 @@ import { ColumnDef } from "@tanstack/react-table"; import { Badge, Grid, Icon } from "@tremor/react"; -import { Tooltip, Checkbox } from "antd"; +import { Tooltip, Checkbox, Tag } from "antd"; import { UserInfo } from "./types"; import { PencilAltIcon, TrashIcon, InformationCircleIcon, RefreshIcon } from "@heroicons/react/outline"; import { CopyOutlined } from "@ant-design/icons"; @@ -54,6 +54,30 @@ export const columns = ( enableSorting: true, cell: ({ row }) => {row.original.user_email || "-"}, }, + { + id: "status", + header: "Status", + enableSorting: false, + cell: ({ row }) => { + const isScimInactive = + (row.original.metadata as Record | null | undefined) + ?.scim_active === false; + if (isScimInactive) { + return ( + + + Inactive + + + ); + } + return ( + + Active + + ); + }, + }, { header: "Global Proxy Role", accessorKey: "user_role", diff --git a/ui/litellm-dashboard/src/components/view_users/table.test.tsx b/ui/litellm-dashboard/src/components/view_users/table.test.tsx index 82f49d9618..783b99329b 100644 --- a/ui/litellm-dashboard/src/components/view_users/table.test.tsx +++ b/ui/litellm-dashboard/src/components/view_users/table.test.tsx @@ -1,6 +1,8 @@ import { act, fireEvent, render, screen } from "@testing-library/react"; import { describe, expect, it, vi } from "vitest"; +import { columns } from "./columns"; import { UserDataTable } from "./table"; +import { UserInfo } from "./types"; const defaultFilters = { email: "", @@ -100,6 +102,7 @@ describe("UserDataTable", () => { [ "User ID", "Email", + "Status", "Global Proxy Role", "User Alias", "Spend (USD)", @@ -113,4 +116,92 @@ describe("UserDataTable", () => { expect(screen.getByRole("columnheader", { name: header })).toBeInTheDocument(); }); }); + + it("should render the user-row Status cell as Active when scim_active is not set to false", () => { + const possibleUIRoles = { admin: { ui_label: "Admin" } }; + const handlers = { edit: vi.fn(), del: vi.fn(), reset: vi.fn(), click: vi.fn() }; + const cols = columns( + possibleUIRoles, + handlers.edit, + handlers.del, + handlers.reset, + handlers.click, + ); + const statusCol = cols.find((c) => (c as { id?: string }).id === "status"); + expect(statusCol).toBeDefined(); + + const baseUser: UserInfo = { + user_id: "u-active", + user_email: "active@example.com", + user_alias: null, + user_role: "admin", + spend: 0, + max_budget: null, + models: [], + key_count: 0, + created_at: "", + updated_at: "", + sso_user_id: null, + budget_duration: null, + }; + + const cellNoMetadata = (statusCol as any).cell({ row: { original: baseUser } }); + render(<>{cellNoMetadata}); + expect(screen.getByText("Active")).toBeInTheDocument(); + expect(screen.queryByText("Inactive")).not.toBeInTheDocument(); + }); + + it("should render the user-row Status cell as Inactive when scim_active is false", () => { + const possibleUIRoles = { admin: { ui_label: "Admin" } }; + const cols = columns(possibleUIRoles, vi.fn(), vi.fn(), vi.fn(), vi.fn()); + const statusCol = cols.find((c) => (c as { id?: string }).id === "status")!; + + const inactiveUser: UserInfo = { + user_id: "u-inactive", + user_email: "alex@acme.io", + user_alias: null, + user_role: "internal_user", + spend: 0, + max_budget: null, + models: [], + key_count: 1, + created_at: "", + updated_at: "", + sso_user_id: null, + budget_duration: null, + metadata: { scim_active: false }, + }; + + const cell = (statusCol as any).cell({ row: { original: inactiveUser } }); + render(<>{cell}); + expect(screen.getByText("Inactive")).toBeInTheDocument(); + expect(screen.queryByText("Active")).not.toBeInTheDocument(); + }); + + it("should treat scim_active=true as Active (not Inactive)", () => { + const possibleUIRoles = { admin: { ui_label: "Admin" } }; + const cols = columns(possibleUIRoles, vi.fn(), vi.fn(), vi.fn(), vi.fn()); + const statusCol = cols.find((c) => (c as { id?: string }).id === "status")!; + + const reactivated: UserInfo = { + user_id: "u-rehired", + user_email: "alex@acme.io", + user_alias: null, + user_role: "internal_user", + spend: 0, + max_budget: null, + models: [], + key_count: 1, + created_at: "", + updated_at: "", + sso_user_id: null, + budget_duration: null, + metadata: { scim_active: true }, + }; + + const cell = (statusCol as any).cell({ row: { original: reactivated } }); + render(<>{cell}); + expect(screen.getByText("Active")).toBeInTheDocument(); + expect(screen.queryByText("Inactive")).not.toBeInTheDocument(); + }); }); diff --git a/ui/litellm-dashboard/src/components/view_users/types.ts b/ui/litellm-dashboard/src/components/view_users/types.ts index 744aa00a88..7e1bae8284 100644 --- a/ui/litellm-dashboard/src/components/view_users/types.ts +++ b/ui/litellm-dashboard/src/components/view_users/types.ts @@ -11,4 +11,5 @@ export interface UserInfo { updated_at: string; sso_user_id: string | null; budget_duration: string | null; + metadata?: Record | null; } From 62a0b71785fe2c070165cc36b5438a5cb71d74ef Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Fri, 1 May 2026 20:21:02 -0700 Subject: [PATCH 6/8] chore: update Next.js build artifacts (2026-05-02 03:21 UTC, node v20.20.2) --- litellm/proxy/_experimental/out/404.html | 1 + .../_experimental/out/__next.__PAGE__.txt | 33 +- .../proxy/_experimental/out/__next._full.txt | 71 +-- .../proxy/_experimental/out/__next._head.txt | 2 +- .../proxy/_experimental/out/__next._index.txt | 4 +- .../proxy/_experimental/out/__next._tree.txt | 4 +- .../_next/static/chunks/05b999e05913f877.js | 7 + .../_next/static/chunks/05cc063d4c1cb77b.js | 1 + .../_next/static/chunks/0bcb5f632525f5f8.js | 420 ++++++++++++++++++ .../_next/static/chunks/0fa4668d6cf24773.js | 8 + .../_next/static/chunks/1189e4151a93f058.js | 10 + .../_next/static/chunks/18a5548f64cd2f73.js | 84 ++++ .../_next/static/chunks/1efbd5b35545b10a.js | 1 + .../_next/static/chunks/2888b590cf1e5a4a.js | 10 + .../_next/static/chunks/29eca5447bef7f55.js | 3 + .../_next/static/chunks/3003a112e50662f4.js | 1 + .../_next/static/chunks/38db69571fd2ddd2.js | 231 ++++++++++ .../_next/static/chunks/3c2d67ecf9619f2b.js | 1 + .../_next/static/chunks/3f8f8f2ea9713f7b.js | 1 + .../_next/static/chunks/41378fecd72892ff.js | 1 + .../_next/static/chunks/432e162c2ee31f73.js | 72 +++ .../_next/static/chunks/466ba0a8a546c4fd.js | 1 + .../_next/static/chunks/4d3700bffc110569.js | 1 + .../_next/static/chunks/520f8fdc54fcd4f0.js | 91 ++++ .../_next/static/chunks/5fe49a1e116126de.js | 3 + .../_next/static/chunks/656330759aeeb883.js | 3 + .../_next/static/chunks/67de745d18bddc74.css | 1 + .../_next/static/chunks/703b445810a4c51f.js | 1 + .../_next/static/chunks/7736882a2e4e2f73.js | 17 + .../_next/static/chunks/7fe89dd32bb4f5b6.js | 1 + .../_next/static/chunks/83b7a29872dd94fb.js | 1 + .../_next/static/chunks/844dee1ac01fba04.js | 8 + .../_next/static/chunks/8a408f05ec0cdac4.js | 1 + .../_next/static/chunks/8c6f8ac32c75a373.js | 1 + .../_next/static/chunks/914ef0e7b2f44614.js | 1 + .../_next/static/chunks/91a13e42c88cfff6.js | 1 + .../_next/static/chunks/9b3228c4ea02711c.js | 1 + .../_next/static/chunks/9ddd2809961d4f8c.js | 420 ++++++++++++++++++ .../_next/static/chunks/a542eaa81bba9029.js | 1 + .../_next/static/chunks/ba3052c7fda27695.js | 1 + .../_next/static/chunks/bdaa8fe6e6022114.js | 1 + .../_next/static/chunks/cbab30fb3f911abc.js | 1 + .../_next/static/chunks/cc5fe661d375c3b5.js | 1 + .../_next/static/chunks/ccda7c12f9795cba.js | 84 ++++ .../_next/static/chunks/d0510af52e5b6373.js | 1 + .../_next/static/chunks/d57a01eeb0a140e9.js | 1 + .../_next/static/chunks/d6ab357d1bbb53f0.js | 1 + .../_next/static/chunks/d705b57c88e51101.js | 1 + .../_next/static/chunks/de6dee28e382bd35.js | 8 + .../_next/static/chunks/e000783224957b5f.js | 8 + .../_next/static/chunks/e79e33b8b366ae69.js | 1 + .../_next/static/chunks/f27456ba72075ad9.js | 7 + .../_next/static/chunks/f4cb209365e2229d.js | 8 + .../gMHOlKxZQjZlw5mZpwC2b/_buildManifest.js | 16 + .../_clientMiddlewareManifest.json | 1 + .../gMHOlKxZQjZlw5mZpwC2b/_ssgManifest.js | 1 + .../lw0pr129QWvsGxcNhZmh0/_buildManifest.js | 16 + .../_clientMiddlewareManifest.json | 1 + .../lw0pr129QWvsGxcNhZmh0/_ssgManifest.js | 1 + .../proxy/_experimental/out/_not-found.html | 1 + .../proxy/_experimental/out/_not-found.txt | 4 +- .../out/_not-found/__next._full.txt | 4 +- .../out/_not-found/__next._head.txt | 2 +- .../out/_not-found/__next._index.txt | 4 +- .../_not-found/__next._not-found.__PAGE__.txt | 2 +- .../out/_not-found/__next._not-found.txt | 2 +- .../out/_not-found/__next._tree.txt | 4 +- .../_experimental/out/api-reference.html | 1 + .../proxy/_experimental/out/api-reference.txt | 10 +- ...KGRhc2hib2FyZCk.api-reference.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.api-reference.txt | 2 +- .../api-reference/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/api-reference/__next._full.txt | 10 +- .../out/api-reference/__next._head.txt | 2 +- .../out/api-reference/__next._index.txt | 4 +- .../out/api-reference/__next._tree.txt | 4 +- .../out/assets/logos/xecguard.svg | 4 + litellm/proxy/_experimental/out/chat.html | 1 + litellm/proxy/_experimental/out/chat.txt | 22 + .../_experimental/out/chat/__next._full.txt | 22 + .../_experimental/out/chat/__next._head.txt | 6 + .../_experimental/out/chat/__next._index.txt | 8 + .../_experimental/out/chat/__next._tree.txt | 4 + .../out/chat/__next.chat.__PAGE__.txt | 9 + .../_experimental/out/chat/__next.chat.txt | 4 + .../out/experimental/api-playground.html | 1 + .../out/experimental/api-playground.txt | 10 +- ...k.experimental.api-playground.__PAGE__.txt | 4 +- ...2hib2FyZCk.experimental.api-playground.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../api-playground/__next._full.txt | 10 +- .../api-playground/__next._head.txt | 2 +- .../api-playground/__next._index.txt | 4 +- .../api-playground/__next._tree.txt | 4 +- .../out/experimental/budgets.html | 1 + .../out/experimental/budgets.txt | 10 +- ...ib2FyZCk.experimental.budgets.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.experimental.budgets.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../budgets/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/experimental/budgets/__next._full.txt | 10 +- .../out/experimental/budgets/__next._head.txt | 2 +- .../experimental/budgets/__next._index.txt | 4 +- .../out/experimental/budgets/__next._tree.txt | 4 +- .../out/experimental/caching.html | 1 + .../out/experimental/caching.txt | 10 +- ...ib2FyZCk.experimental.caching.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.experimental.caching.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../caching/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/experimental/caching/__next._full.txt | 10 +- .../out/experimental/caching/__next._head.txt | 2 +- .../experimental/caching/__next._index.txt | 4 +- .../out/experimental/caching/__next._tree.txt | 4 +- .../out/experimental/claude-code-plugins.html | 1 + .../out/experimental/claude-code-plugins.txt | 10 +- ...erimental.claude-code-plugins.__PAGE__.txt | 4 +- ...FyZCk.experimental.claude-code-plugins.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../claude-code-plugins/__next._full.txt | 10 +- .../claude-code-plugins/__next._head.txt | 2 +- .../claude-code-plugins/__next._index.txt | 4 +- .../claude-code-plugins/__next._tree.txt | 4 +- .../out/experimental/old-usage.html | 1 + .../out/experimental/old-usage.txt | 12 +- ...2FyZCk.experimental.old-usage.__PAGE__.txt | 4 +- ...KGRhc2hib2FyZCk.experimental.old-usage.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../old-usage/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../experimental/old-usage/__next._full.txt | 12 +- .../experimental/old-usage/__next._head.txt | 2 +- .../experimental/old-usage/__next._index.txt | 4 +- .../experimental/old-usage/__next._tree.txt | 4 +- .../out/experimental/prompts.html | 1 + .../out/experimental/prompts.txt | 12 +- ...ib2FyZCk.experimental.prompts.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.experimental.prompts.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../prompts/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/experimental/prompts/__next._full.txt | 12 +- .../out/experimental/prompts/__next._head.txt | 2 +- .../experimental/prompts/__next._index.txt | 4 +- .../out/experimental/prompts/__next._tree.txt | 4 +- .../out/experimental/tag-management.html | 1 + .../out/experimental/tag-management.txt | 10 +- ...k.experimental.tag-management.__PAGE__.txt | 4 +- ...2hib2FyZCk.experimental.tag-management.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../tag-management/__next._full.txt | 10 +- .../tag-management/__next._head.txt | 2 +- .../tag-management/__next._index.txt | 4 +- .../tag-management/__next._tree.txt | 4 +- .../proxy/_experimental/out/guardrails.html | 1 + .../proxy/_experimental/out/guardrails.txt | 37 +- ...t.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.guardrails.txt | 2 +- .../guardrails/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/guardrails/__next._full.txt | 37 +- .../out/guardrails/__next._head.txt | 2 +- .../out/guardrails/__next._index.txt | 4 +- .../out/guardrails/__next._tree.txt | 4 +- litellm/proxy/_experimental/out/index.html | 2 +- litellm/proxy/_experimental/out/index.txt | 71 +-- litellm/proxy/_experimental/out/login.html | 1 + litellm/proxy/_experimental/out/login.txt | 4 +- .../_experimental/out/login/__next._full.txt | 4 +- .../_experimental/out/login/__next._head.txt | 2 +- .../_experimental/out/login/__next._index.txt | 4 +- .../_experimental/out/login/__next._tree.txt | 4 +- .../out/login/__next.login.__PAGE__.txt | 2 +- .../_experimental/out/login/__next.login.txt | 2 +- litellm/proxy/_experimental/out/logs.html | 1 + litellm/proxy/_experimental/out/logs.txt | 37 +- .../__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt | 4 +- .../out/logs/__next.!KGRhc2hib2FyZCk.logs.txt | 2 +- .../out/logs/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../_experimental/out/logs/__next._full.txt | 37 +- .../_experimental/out/logs/__next._head.txt | 2 +- .../_experimental/out/logs/__next._index.txt | 4 +- .../_experimental/out/logs/__next._tree.txt | 4 +- .../_experimental/out/mcp/oauth/callback.html | 1 + .../_experimental/out/mcp/oauth/callback.txt | 4 +- .../out/mcp/oauth/callback/__next._full.txt | 4 +- .../out/mcp/oauth/callback/__next._head.txt | 2 +- .../out/mcp/oauth/callback/__next._index.txt | 4 +- .../out/mcp/oauth/callback/__next._tree.txt | 4 +- .../__next.mcp.oauth.callback.__PAGE__.txt | 2 +- .../callback/__next.mcp.oauth.callback.txt | 2 +- .../mcp/oauth/callback/__next.mcp.oauth.txt | 2 +- .../out/mcp/oauth/callback/__next.mcp.txt | 2 +- .../proxy/_experimental/out/model-hub.html | 1 + litellm/proxy/_experimental/out/model-hub.txt | 37 +- ...xt.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.model-hub.txt | 2 +- .../out/model-hub/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/model-hub/__next._full.txt | 37 +- .../out/model-hub/__next._head.txt | 2 +- .../out/model-hub/__next._index.txt | 4 +- .../out/model-hub/__next._tree.txt | 4 +- .../proxy/_experimental/out/model_hub.html | 1 + litellm/proxy/_experimental/out/model_hub.txt | 6 +- .../out/model_hub/__next._full.txt | 6 +- .../out/model_hub/__next._head.txt | 2 +- .../out/model_hub/__next._index.txt | 4 +- .../out/model_hub/__next._tree.txt | 4 +- .../model_hub/__next.model_hub.__PAGE__.txt | 4 +- .../out/model_hub/__next.model_hub.txt | 2 +- .../_experimental/out/model_hub_table.html | 1 + .../_experimental/out/model_hub_table.txt | 8 +- .../out/model_hub_table/__next._full.txt | 8 +- .../out/model_hub_table/__next._head.txt | 2 +- .../out/model_hub_table/__next._index.txt | 4 +- .../out/model_hub_table/__next._tree.txt | 4 +- .../__next.model_hub_table.__PAGE__.txt | 4 +- .../__next.model_hub_table.txt | 2 +- .../out/models-and-endpoints.html | 1 + .../out/models-and-endpoints.txt | 12 +- ...ib2FyZCk.models-and-endpoints.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.models-and-endpoints.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/models-and-endpoints/__next._full.txt | 12 +- .../out/models-and-endpoints/__next._head.txt | 2 +- .../models-and-endpoints/__next._index.txt | 4 +- .../out/models-and-endpoints/__next._tree.txt | 4 +- .../proxy/_experimental/out/onboarding.html | 1 + .../proxy/_experimental/out/onboarding.txt | 4 +- .../out/onboarding/__next._full.txt | 4 +- .../out/onboarding/__next._head.txt | 2 +- .../out/onboarding/__next._index.txt | 4 +- .../out/onboarding/__next._tree.txt | 4 +- .../onboarding/__next.onboarding.__PAGE__.txt | 2 +- .../out/onboarding/__next.onboarding.txt | 2 +- .../_experimental/out/organizations.html | 1 + .../proxy/_experimental/out/organizations.txt | 10 +- ...KGRhc2hib2FyZCk.organizations.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.organizations.txt | 2 +- .../organizations/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/organizations/__next._full.txt | 10 +- .../out/organizations/__next._head.txt | 2 +- .../out/organizations/__next._index.txt | 4 +- .../out/organizations/__next._tree.txt | 4 +- .../proxy/_experimental/out/playground.html | 1 + .../proxy/_experimental/out/playground.txt | 37 +- ...t.!KGRhc2hib2FyZCk.playground.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.playground.txt | 2 +- .../playground/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/playground/__next._full.txt | 37 +- .../out/playground/__next._head.txt | 2 +- .../out/playground/__next._index.txt | 4 +- .../out/playground/__next._tree.txt | 4 +- litellm/proxy/_experimental/out/policies.html | 1 + litellm/proxy/_experimental/out/policies.txt | 37 +- ...ext.!KGRhc2hib2FyZCk.policies.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.policies.txt | 2 +- .../out/policies/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/policies/__next._full.txt | 37 +- .../out/policies/__next._head.txt | 2 +- .../out/policies/__next._index.txt | 4 +- .../out/policies/__next._tree.txt | 4 +- .../out/settings/admin-settings.html | 1 + .../out/settings/admin-settings.txt | 12 +- ...FyZCk.settings.admin-settings.__PAGE__.txt | 4 +- ...GRhc2hib2FyZCk.settings.admin-settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../settings/admin-settings/__next._full.txt | 12 +- .../settings/admin-settings/__next._head.txt | 2 +- .../settings/admin-settings/__next._index.txt | 4 +- .../settings/admin-settings/__next._tree.txt | 4 +- .../out/settings/logging-and-alerts.html | 1 + .../out/settings/logging-and-alerts.txt | 10 +- ...k.settings.logging-and-alerts.__PAGE__.txt | 4 +- ...2hib2FyZCk.settings.logging-and-alerts.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../logging-and-alerts/__next._full.txt | 10 +- .../logging-and-alerts/__next._head.txt | 2 +- .../logging-and-alerts/__next._index.txt | 4 +- .../logging-and-alerts/__next._tree.txt | 4 +- .../out/settings/router-settings.html | 1 + .../out/settings/router-settings.txt | 10 +- ...yZCk.settings.router-settings.__PAGE__.txt | 4 +- ...Rhc2hib2FyZCk.settings.router-settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../settings/router-settings/__next._full.txt | 10 +- .../settings/router-settings/__next._head.txt | 2 +- .../router-settings/__next._index.txt | 4 +- .../settings/router-settings/__next._tree.txt | 4 +- .../_experimental/out/settings/ui-theme.html | 1 + .../_experimental/out/settings/ui-theme.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- ...c2hib2FyZCk.settings.ui-theme.__PAGE__.txt | 4 +- ...ext.!KGRhc2hib2FyZCk.settings.ui-theme.txt | 2 +- .../ui-theme/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/settings/ui-theme/__next._full.txt | 10 +- .../out/settings/ui-theme/__next._head.txt | 2 +- .../out/settings/ui-theme/__next._index.txt | 4 +- .../out/settings/ui-theme/__next._tree.txt | 4 +- litellm/proxy/_experimental/out/skills.html | 1 + litellm/proxy/_experimental/out/skills.txt | 37 +- ..._next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt | 4 +- .../skills/__next.!KGRhc2hib2FyZCk.skills.txt | 2 +- .../out/skills/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../_experimental/out/skills/__next._full.txt | 37 +- .../_experimental/out/skills/__next._head.txt | 2 +- .../out/skills/__next._index.txt | 4 +- .../_experimental/out/skills/__next._tree.txt | 4 +- litellm/proxy/_experimental/out/teams.html | 1 + litellm/proxy/_experimental/out/teams.txt | 37 +- ...__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt | 4 +- .../teams/__next.!KGRhc2hib2FyZCk.teams.txt | 2 +- .../out/teams/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../_experimental/out/teams/__next._full.txt | 37 +- .../_experimental/out/teams/__next._head.txt | 2 +- .../_experimental/out/teams/__next._index.txt | 4 +- .../_experimental/out/teams/__next._tree.txt | 4 +- litellm/proxy/_experimental/out/test-key.html | 1 + litellm/proxy/_experimental/out/test-key.txt | 37 +- ...ext.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.test-key.txt | 2 +- .../out/test-key/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/test-key/__next._full.txt | 37 +- .../out/test-key/__next._head.txt | 2 +- .../out/test-key/__next._index.txt | 4 +- .../out/test-key/__next._tree.txt | 4 +- .../_experimental/out/tools/mcp-servers.html | 1 + .../_experimental/out/tools/mcp-servers.txt | 12 +- ...c2hib2FyZCk.tools.mcp-servers.__PAGE__.txt | 4 +- ...ext.!KGRhc2hib2FyZCk.tools.mcp-servers.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.tools.txt | 2 +- .../mcp-servers/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/tools/mcp-servers/__next._full.txt | 12 +- .../out/tools/mcp-servers/__next._head.txt | 2 +- .../out/tools/mcp-servers/__next._index.txt | 4 +- .../out/tools/mcp-servers/__next._tree.txt | 4 +- .../out/tools/vector-stores.html | 1 + .../_experimental/out/tools/vector-stores.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.tools.txt | 2 +- ...hib2FyZCk.tools.vector-stores.__PAGE__.txt | 4 +- ...t.!KGRhc2hib2FyZCk.tools.vector-stores.txt | 2 +- .../vector-stores/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/tools/vector-stores/__next._full.txt | 10 +- .../out/tools/vector-stores/__next._head.txt | 2 +- .../out/tools/vector-stores/__next._index.txt | 4 +- .../out/tools/vector-stores/__next._tree.txt | 4 +- litellm/proxy/_experimental/out/usage.html | 1 + litellm/proxy/_experimental/out/usage.txt | 37 +- .../out/usage/__next.!KGRhc2hib2FyZCk.txt | 4 +- ...__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt | 4 +- .../usage/__next.!KGRhc2hib2FyZCk.usage.txt | 2 +- .../_experimental/out/usage/__next._full.txt | 37 +- .../_experimental/out/usage/__next._head.txt | 2 +- .../_experimental/out/usage/__next._index.txt | 4 +- .../_experimental/out/usage/__next._tree.txt | 4 +- litellm/proxy/_experimental/out/users.html | 1 + litellm/proxy/_experimental/out/users.txt | 37 +- .../out/users/__next.!KGRhc2hib2FyZCk.txt | 4 +- ...__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt | 4 +- .../users/__next.!KGRhc2hib2FyZCk.users.txt | 2 +- .../_experimental/out/users/__next._full.txt | 37 +- .../_experimental/out/users/__next._head.txt | 2 +- .../_experimental/out/users/__next._index.txt | 4 +- .../_experimental/out/users/__next._tree.txt | 4 +- .../proxy/_experimental/out/virtual-keys.html | 1 + .../proxy/_experimental/out/virtual-keys.txt | 37 +- .../virtual-keys/__next.!KGRhc2hib2FyZCk.txt | 4 +- ...!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.virtual-keys.txt | 2 +- .../out/virtual-keys/__next._full.txt | 37 +- .../out/virtual-keys/__next._head.txt | 2 +- .../out/virtual-keys/__next._index.txt | 4 +- .../out/virtual-keys/__next._tree.txt | 4 +- 376 files changed, 2699 insertions(+), 1039 deletions(-) create mode 100644 litellm/proxy/_experimental/out/404.html create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05b999e05913f877.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05cc063d4c1cb77b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0bcb5f632525f5f8.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0fa4668d6cf24773.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1189e4151a93f058.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/18a5548f64cd2f73.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1efbd5b35545b10a.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2888b590cf1e5a4a.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/29eca5447bef7f55.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3003a112e50662f4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/38db69571fd2ddd2.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3c2d67ecf9619f2b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3f8f8f2ea9713f7b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/41378fecd72892ff.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/432e162c2ee31f73.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/466ba0a8a546c4fd.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4d3700bffc110569.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/520f8fdc54fcd4f0.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5fe49a1e116126de.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/656330759aeeb883.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/67de745d18bddc74.css create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/703b445810a4c51f.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7736882a2e4e2f73.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7fe89dd32bb4f5b6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/83b7a29872dd94fb.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/844dee1ac01fba04.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8a408f05ec0cdac4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8c6f8ac32c75a373.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/914ef0e7b2f44614.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/91a13e42c88cfff6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9b3228c4ea02711c.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9ddd2809961d4f8c.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a542eaa81bba9029.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ba3052c7fda27695.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bdaa8fe6e6022114.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cbab30fb3f911abc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cc5fe661d375c3b5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ccda7c12f9795cba.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d0510af52e5b6373.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d57a01eeb0a140e9.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d6ab357d1bbb53f0.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d705b57c88e51101.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/de6dee28e382bd35.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e000783224957b5f.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e79e33b8b366ae69.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f27456ba72075ad9.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f4cb209365e2229d.js create mode 100644 litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_buildManifest.js create mode 100644 litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_clientMiddlewareManifest.json create mode 100644 litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_ssgManifest.js create mode 100644 litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_buildManifest.js create mode 100644 litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_clientMiddlewareManifest.json create mode 100644 litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_ssgManifest.js create mode 100644 litellm/proxy/_experimental/out/_not-found.html create mode 100644 litellm/proxy/_experimental/out/api-reference.html create mode 100644 litellm/proxy/_experimental/out/assets/logos/xecguard.svg create mode 100644 litellm/proxy/_experimental/out/chat.html create mode 100644 litellm/proxy/_experimental/out/chat.txt create mode 100644 litellm/proxy/_experimental/out/chat/__next._full.txt create mode 100644 litellm/proxy/_experimental/out/chat/__next._head.txt create mode 100644 litellm/proxy/_experimental/out/chat/__next._index.txt create mode 100644 litellm/proxy/_experimental/out/chat/__next._tree.txt create mode 100644 litellm/proxy/_experimental/out/chat/__next.chat.__PAGE__.txt create mode 100644 litellm/proxy/_experimental/out/chat/__next.chat.txt create mode 100644 litellm/proxy/_experimental/out/experimental/api-playground.html create mode 100644 litellm/proxy/_experimental/out/experimental/budgets.html create mode 100644 litellm/proxy/_experimental/out/experimental/caching.html create mode 100644 litellm/proxy/_experimental/out/experimental/claude-code-plugins.html create mode 100644 litellm/proxy/_experimental/out/experimental/old-usage.html create mode 100644 litellm/proxy/_experimental/out/experimental/prompts.html create mode 100644 litellm/proxy/_experimental/out/experimental/tag-management.html create mode 100644 litellm/proxy/_experimental/out/guardrails.html create mode 100644 litellm/proxy/_experimental/out/login.html create mode 100644 litellm/proxy/_experimental/out/logs.html create mode 100644 litellm/proxy/_experimental/out/mcp/oauth/callback.html create mode 100644 litellm/proxy/_experimental/out/model-hub.html create mode 100644 litellm/proxy/_experimental/out/model_hub.html create mode 100644 litellm/proxy/_experimental/out/model_hub_table.html create mode 100644 litellm/proxy/_experimental/out/models-and-endpoints.html create mode 100644 litellm/proxy/_experimental/out/onboarding.html create mode 100644 litellm/proxy/_experimental/out/organizations.html create mode 100644 litellm/proxy/_experimental/out/playground.html create mode 100644 litellm/proxy/_experimental/out/policies.html create mode 100644 litellm/proxy/_experimental/out/settings/admin-settings.html create mode 100644 litellm/proxy/_experimental/out/settings/logging-and-alerts.html create mode 100644 litellm/proxy/_experimental/out/settings/router-settings.html create mode 100644 litellm/proxy/_experimental/out/settings/ui-theme.html create mode 100644 litellm/proxy/_experimental/out/skills.html create mode 100644 litellm/proxy/_experimental/out/teams.html create mode 100644 litellm/proxy/_experimental/out/test-key.html create mode 100644 litellm/proxy/_experimental/out/tools/mcp-servers.html create mode 100644 litellm/proxy/_experimental/out/tools/vector-stores.html create mode 100644 litellm/proxy/_experimental/out/usage.html create mode 100644 litellm/proxy/_experimental/out/users.html create mode 100644 litellm/proxy/_experimental/out/virtual-keys.html diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404.html new file mode 100644 index 0000000000..6b6eb14c20 --- /dev/null +++ b/litellm/proxy/_experimental/out/404.html @@ -0,0 +1 @@ +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.__PAGE__.txt b/litellm/proxy/_experimental/out/__next.__PAGE__.txt index 8f751e4781..3fddc2162a 100644 --- a/litellm/proxy/_experimental/out/__next.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/__next.__PAGE__.txt @@ -1,27 +1,28 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/cd677ff381b90c30.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/40ec1228b231a0d1.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/d8cd2d44272d51c8.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/fe5abdcdb57db543.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/65968777d52ff874.js","/litellm-asset-prefix/_next/static/chunks/a1b5b0c54192471e.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","/litellm-asset-prefix/_next/static/chunks/2005c732f6d6cbb4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/e7cc7b98b893b20d.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/e1f572e8226962e3.js"],"default"] -17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -18:"$Sreact.suspense" +3:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js"],"default"] +18:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +19:"$Sreact.suspense" :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cd677ff381b90c30.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/40ec1228b231a0d1.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d8cd2d44272d51c8.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/fe5abdcdb57db543.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15"],"$L16"]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16"],"$L17"]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" -6:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/65968777d52ff874.js","async":true}] -7:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/a1b5b0c54192471e.js","async":true}] +6:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","async":true}] +7:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}] 8:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}] 9:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}] a:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","async":true}] -b:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}] +b:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true}] c:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}] d:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true}] e:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","async":true}] -f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/2005c732f6d6cbb4.js","async":true}] -10:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true}] -11:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","async":true}] -12:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true}] -13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/e7cc7b98b893b20d.js","async":true}] -14:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true}] -15:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f572e8226962e3.js","async":true}] -16:["$","$L17",null,{"children":["$","$18",null,{"name":"Next.MetadataOutlet","children":"$@19"}]}] -19:null +f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true}] +10:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}] +11:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}] +12:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","async":true}] +13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true}] +14:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}] +15:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true}] +16:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js","async":true}] +17:["$","$L18",null,{"children":["$","$19",null,{"name":"Next.MetadataOutlet","children":"$@1a"}]}] +1a:null diff --git a/litellm/proxy/_experimental/out/__next._full.txt b/litellm/proxy/_experimental/out/__next._full.txt index 66ed8c623b..ce6e57a795 100644 --- a/litellm/proxy/_experimental/out/__next._full.txt +++ b/litellm/proxy/_experimental/out/__next._full.txt @@ -4,56 +4,57 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/cd677ff381b90c30.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/40ec1228b231a0d1.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/d8cd2d44272d51c8.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/fe5abdcdb57db543.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/65968777d52ff874.js","/litellm-asset-prefix/_next/static/chunks/a1b5b0c54192471e.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","/litellm-asset-prefix/_next/static/chunks/2005c732f6d6cbb4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/e7cc7b98b893b20d.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/e1f572e8226962e3.js"],"default"] -2e:I[168027,[],"default"] +7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js"],"default"] +2f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cd677ff381b90c30.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/40ec1228b231a0d1.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d8cd2d44272d51c8.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/fe5abdcdb57db543.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b"],"$L2c"]}],{},null,false,false]},null,false,false],"$L2d",false]],"m":"$undefined","G":["$2e",[]],"S":true} -2f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -30:"$Sreact.suspense" -32:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -34:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c"],"$L2d"]}],{},null,false,false]},null,false,false],"$L2e",false]],"m":"$undefined","G":["$2f",[]],"S":true} +30:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +31:"$Sreact.suspense" +33:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +35:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","async":true,"nonce":"$undefined"}] b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}] c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true,"nonce":"$undefined"}] d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true,"nonce":"$undefined"}] e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","async":true,"nonce":"$undefined"}] -f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] -10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] -11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","async":true,"nonce":"$undefined"}] -12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}] -13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] +f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}] +10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true,"nonce":"$undefined"}] +11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","async":true,"nonce":"$undefined"}] +12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","async":true,"nonce":"$undefined"}] +13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}] 14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","async":true,"nonce":"$undefined"}] -15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","async":true,"nonce":"$undefined"}] -16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}] -17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}] +15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] +16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","async":true,"nonce":"$undefined"}] +17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] 18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","async":true,"nonce":"$undefined"}] -19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] -1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}] -1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] -1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/65968777d52ff874.js","async":true,"nonce":"$undefined"}] -1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/a1b5b0c54192471e.js","async":true,"nonce":"$undefined"}] +19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] +1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","async":true,"nonce":"$undefined"}] +1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","async":true,"nonce":"$undefined"}] +1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","async":true,"nonce":"$undefined"}] +1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] 1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] 1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}] 20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","async":true,"nonce":"$undefined"}] -21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] +21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}] 22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}] 23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true,"nonce":"$undefined"}] 24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","async":true,"nonce":"$undefined"}] -25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/2005c732f6d6cbb4.js","async":true,"nonce":"$undefined"}] -26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true,"nonce":"$undefined"}] -27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","async":true,"nonce":"$undefined"}] -28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true,"nonce":"$undefined"}] -29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/e7cc7b98b893b20d.js","async":true,"nonce":"$undefined"}] -2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true,"nonce":"$undefined"}] -2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f572e8226962e3.js","async":true,"nonce":"$undefined"}] -2c:["$","$L2f",null,{"children":["$","$30",null,{"name":"Next.MetadataOutlet","children":"$@31"}]}] -2d:["$","$1","h",{"children":[null,["$","$L32",null,{"children":"$L33"}],["$","div",null,{"hidden":true,"children":["$","$L34",null,{"children":["$","$30",null,{"name":"Next.Metadata","children":"$L35"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true,"nonce":"$undefined"}] +26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] +27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] +28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","async":true,"nonce":"$undefined"}] +29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}] +2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}] +2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true,"nonce":"$undefined"}] +2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js","async":true,"nonce":"$undefined"}] +2d:["$","$L30",null,{"children":["$","$31",null,{"name":"Next.MetadataOutlet","children":"$@32"}]}] +2e:["$","$1","h",{"children":[null,["$","$L33",null,{"children":"$L34"}],["$","div",null,{"hidden":true,"children":["$","$L35",null,{"children":["$","$31",null,{"name":"Next.Metadata","children":"$L36"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:{} 9:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params" -33:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -36:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -31:null -35:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L36","4",{}]] +34:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +37:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +32:null +36:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L37","4",{}]] diff --git a/litellm/proxy/_experimental/out/__next._head.txt b/litellm/proxy/_experimental/out/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/__next._head.txt +++ b/litellm/proxy/_experimental/out/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/__next._index.txt b/litellm/proxy/_experimental/out/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/__next._index.txt +++ b/litellm/proxy/_experimental/out/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/__next._tree.txt b/litellm/proxy/_experimental/out/__next._tree.txt index 44f06b2376..82980a3ec1 100644 --- a/litellm/proxy/_experimental/out/__next._tree.txt +++ b/litellm/proxy/_experimental/out/__next._tree.txt @@ -1,5 +1,5 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/05b999e05913f877.js b/litellm/proxy/_experimental/out/_next/static/chunks/05b999e05913f877.js new file mode 100644 index 0000000000..ea72703ce0 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/05b999e05913f877.js @@ -0,0 +1,7 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(876556);function a(e){return["small","middle","large"].includes(e)}function l(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>a,"isValidGapNumber",()=>l],908286);var i=e.i(242064),o=e.i(249616),d=e.i(372409),c=e.i(246422);let s=(0,c.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:a,paddingXS:l,fontSizeLG:i,fontSizeSM:o,borderRadiusLG:c,borderRadiusSM:s,colorBgContainerDisabled:u,lineWidth:g}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:n,margin:0,background:u,borderWidth:g,borderStyle:"solid",borderColor:a,borderRadius:r,"&-large":{fontSize:i,borderRadius:c},"&-small":{paddingInline:l,borderRadius:s,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,d.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let g=t.default.forwardRef((e,n)=>{let{className:a,children:l,style:d,prefixCls:c}=e,g=u(e,["className","children","style","prefixCls"]),{getPrefixCls:p,direction:m}=t.default.useContext(i.ConfigContext),f=p("space-addon",c),[b,h,$]=s(f),{compactItemClassnames:v,compactSize:C}=(0,o.useCompactItemContext)(f,m),y=(0,r.default)(f,h,v,$,{[`${f}-${C}`]:C},a);return b(t.default.createElement("div",Object.assign({ref:n,className:y,style:d},g),l))}),p=t.default.createContext({latestIndex:0}),m=p.Provider,f=({className:e,index:r,children:n,split:a,style:l})=>{let{latestIndex:i}=t.useContext(p);return null==n?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:l},n),r{let t=(0,b.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var $=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let v=t.forwardRef((e,o)=>{var d;let{getPrefixCls:c,direction:s,size:u,className:g,style:p,classNames:b,styles:v}=(0,i.useComponentConfig)("space"),{size:C=null!=u?u:"small",align:y,className:k,rootClassName:S,children:x,direction:w="horizontal",prefixCls:O,split:I,style:E,wrap:N=!1,classNames:z,styles:j}=e,P=$(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[T,M]=Array.isArray(C)?C:[C,C],R=a(M),B=a(T),H=l(M),q=l(T),D=(0,n.default)(x,{keepEmpty:!0}),L=void 0===y&&"horizontal"===w?"center":y,G=c("space",O),[W,A,X]=h(G),F=(0,r.default)(G,g,A,`${G}-${w}`,{[`${G}-rtl`]:"rtl"===s,[`${G}-align-${L}`]:L,[`${G}-gap-row-${M}`]:R,[`${G}-gap-col-${T}`]:B},k,S,X),V=(0,r.default)(`${G}-item`,null!=(d=null==z?void 0:z.item)?d:b.item),_=Object.assign(Object.assign({},v.item),null==j?void 0:j.item),Y=D.map((e,r)=>{let n=(null==e?void 0:e.key)||`${V}-${r}`;return t.createElement(f,{className:V,key:n,index:r,split:I,style:_},e)}),K=t.useMemo(()=>({latestIndex:D.reduce((e,t,r)=>null!=t?r:e,0)}),[D]);if(0===D.length)return null;let U={};return N&&(U.flexWrap="wrap"),!B&&q&&(U.columnGap=T),!R&&H&&(U.rowGap=M),W(t.createElement("div",Object.assign({ref:o,className:F,style:Object.assign(Object.assign(Object.assign({},U),p),E)},P),t.createElement(m,{value:K},Y)))});v.Compact=o.default,v.Addon=g,e.s(["default",0,v],38243)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},801312,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:n}))});e.s(["default",0,l],801312)},389083,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(829087),a=e.i(480731),l=e.i(95779),i=e.i(444755),o=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"}},c={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"}},s=(0,o.makeClassName)("Badge"),u=r.default.forwardRef((e,u)=>{let{color:g,icon:p,size:m=a.Sizes.SM,tooltip:f,className:b,children:h}=e,$=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),v=p||null,{tooltipProps:C,getReferenceProps:y}=(0,n.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,C.refs.setReference]),className:(0,i.tremorTwMerge)(s("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",g?(0,i.tremorTwMerge)((0,o.getColorClassNames)(g,l.colorPalette.background).bgColor,(0,o.getColorClassNames)(g,l.colorPalette.iconText).textColor,(0,o.getColorClassNames)(g,l.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,i.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[m].paddingX,d[m].paddingY,d[m].fontSize,b)},y,$),r.default.createElement(n.default,Object.assign({text:f},C)),v?r.default.createElement(v,{className:(0,i.tremorTwMerge)(s("icon"),"shrink-0 -ml-1 mr-1.5",c[m].height,c[m].width)}):null,r.default.createElement("span",{className:(0,i.tremorTwMerge)(s("text"),"whitespace-nowrap")},h))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(242064),a=e.i(517455);e.i(296059);var l=e.i(915654),i=e.i(183293),o=e.i(246422),d=e.i(838378);let c=(0,o.genStyleHooks)("Divider",e=>{let t=(0,d.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:a,textPaddingInline:o,orientationMargin:d,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,i.resetComponent)(e)),{borderBlockStart:`${(0,l.unit)(a)} solid ${n}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,l.unit)(a)} solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,l.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,l.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,l.unit)(a)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${d} * 100%)`},"&::after":{width:`calc(100% - ${d} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${d} * 100%)`},"&::after":{width:`calc(${d} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${(0,l.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:n,borderStyle:"dotted",borderWidth:`${(0,l.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var s=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:l,direction:i,className:o,style:d}=(0,n.useComponentConfig)("divider"),{prefixCls:g,type:p="horizontal",orientation:m="center",orientationMargin:f,className:b,rootClassName:h,children:$,dashed:v,variant:C="solid",plain:y,style:k,size:S}=e,x=s(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),w=l("divider",g),[O,I,E]=c(w),N=u[(0,a.default)(S)],z=!!$,j=t.useMemo(()=>"left"===m?"rtl"===i?"end":"start":"right"===m?"rtl"===i?"start":"end":m,[i,m]),P="start"===j&&null!=f,T="end"===j&&null!=f,M=(0,r.default)(w,o,I,E,`${w}-${p}`,{[`${w}-with-text`]:z,[`${w}-with-text-${j}`]:z,[`${w}-dashed`]:!!v,[`${w}-${C}`]:"solid"!==C,[`${w}-plain`]:!!y,[`${w}-rtl`]:"rtl"===i,[`${w}-no-default-orientation-margin-start`]:P,[`${w}-no-default-orientation-margin-end`]:T,[`${w}-${N}`]:!!N},b,h),R=t.useMemo(()=>"number"==typeof f?f:/^\d+$/.test(f)?Number(f):f,[f]);return O(t.createElement("div",Object.assign({className:M,style:Object.assign(Object.assign({},d),k)},x,{role:"separator"}),$&&"vertical"!==p&&t.createElement("span",{className:`${w}-inner-text`,style:{marginInlineStart:P?R:void 0,marginInlineEnd:T?R:void 0}},$)))}],312361)},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(529681),a=e.i(702779),l=e.i(563113),i=e.i(763731),o=e.i(121872),d=e.i(242064);e.i(296059);var c=e.i(915654);e.i(262370);var s=e.i(135551),u=e.i(183293),g=e.i(246422),p=e.i(838378);let m=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,a=e.fontSizeSM;return(0,p.mergeToken)(e,{tagFontSize:a,tagLineHeight:(0,c.unit)(n(e.lineHeightSM).mul(a).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},f=e=>({defaultBg:new s.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),b=(0,g.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:a,calc:l}=e,i=l(n).sub(r).equal(),o=l(t).sub(r).equal();return{[a]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(m(e)),f);var h=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let $=t.forwardRef((e,n)=>{let{prefixCls:a,style:l,className:i,checked:o,children:c,icon:s,onChange:u,onClick:g}=e,p=h(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:m,tag:f}=t.useContext(d.ConfigContext),$=m("tag",a),[v,C,y]=b($),k=(0,r.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==f?void 0:f.className,i,C,y);return v(t.createElement("span",Object.assign({},p,{ref:n,style:Object.assign(Object.assign({},l),null==f?void 0:f.style),className:k,onClick:e=>{null==u||u(!o),null==g||g(e)}}),s,t.createElement("span",null,c)))});var v=e.i(403541);let C=(0,g.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=m(e),(0,v.genPresetColor)(t,(e,{textColor:r,lightBorderColor:n,lightColor:a,darkColor:l})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:r,background:a,borderColor:n,"&-inverse":{color:t.colorTextLightSolid,background:l,borderColor:l},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},f),y=(e,t,r)=>{let n="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},k=(0,g.genSubStyleComponent)(["Tag","status"],e=>{let t=m(e);return[y(t,"success","Success"),y(t,"processing","Info"),y(t,"error","Error"),y(t,"warning","Warning")]},f);var S=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let x=t.forwardRef((e,c)=>{let{prefixCls:s,className:u,rootClassName:g,style:p,children:m,icon:f,color:h,onClose:$,bordered:v=!0,visible:y}=e,x=S(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:w,direction:O,tag:I}=t.useContext(d.ConfigContext),[E,N]=t.useState(!0),z=(0,n.default)(x,["closeIcon","closable"]);t.useEffect(()=>{void 0!==y&&N(y)},[y]);let j=(0,a.isPresetColor)(h),P=(0,a.isPresetStatusColor)(h),T=j||P,M=Object.assign(Object.assign({backgroundColor:h&&!T?h:void 0},null==I?void 0:I.style),p),R=w("tag",s),[B,H,q]=b(R),D=(0,r.default)(R,null==I?void 0:I.className,{[`${R}-${h}`]:T,[`${R}-has-color`]:h&&!T,[`${R}-hidden`]:!E,[`${R}-rtl`]:"rtl"===O,[`${R}-borderless`]:!v},u,g,H,q),L=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||N(!1)},[,G]=(0,l.useClosable)((0,l.pickClosable)(e),(0,l.pickClosable)(I),{closable:!1,closeIconRender:e=>{let n=t.createElement("span",{className:`${R}-close-icon`,onClick:L},e);return(0,i.replaceElement)(e,n,e=>({onClick:t=>{var r;null==(r=null==e?void 0:e.onClick)||r.call(e,t),L(t)},className:(0,r.default)(null==e?void 0:e.className,`${R}-close-icon`)}))}}),W="function"==typeof x.onClick||m&&"a"===m.type,A=f||null,X=A?t.createElement(t.Fragment,null,A,m&&t.createElement("span",null,m)):m,F=t.createElement("span",Object.assign({},z,{ref:c,className:D,style:M}),X,G,j&&t.createElement(C,{key:"preset",prefixCls:R}),P&&t.createElement(k,{key:"status",prefixCls:R}));return B(W?t.createElement(o.default,{component:"Tag"},F):F)});x.CheckableTag=$,e.s(["Tag",0,x],262218)},91874,e=>{"use strict";var t=e.i(931067),r=e.i(209428),n=e.i(211577),a=e.i(392221),l=e.i(703923),i=e.i(343794),o=e.i(914949),d=e.i(271645),c=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],s=(0,d.forwardRef)(function(e,s){var u=e.prefixCls,g=void 0===u?"rc-checkbox":u,p=e.className,m=e.style,f=e.checked,b=e.disabled,h=e.defaultChecked,$=e.type,v=void 0===$?"checkbox":$,C=e.title,y=e.onChange,k=(0,l.default)(e,c),S=(0,d.useRef)(null),x=(0,d.useRef)(null),w=(0,o.default)(void 0!==h&&h,{value:f}),O=(0,a.default)(w,2),I=O[0],E=O[1];(0,d.useImperativeHandle)(s,function(){return{focus:function(e){var t;null==(t=S.current)||t.focus(e)},blur:function(){var e;null==(e=S.current)||e.blur()},input:S.current,nativeElement:x.current}});var N=(0,i.default)(g,p,(0,n.default)((0,n.default)({},"".concat(g,"-checked"),I),"".concat(g,"-disabled"),b));return d.createElement("span",{className:N,title:C,style:m,ref:x},d.createElement("input",(0,t.default)({},k,{className:"".concat(g,"-input"),ref:S,onChange:function(t){b||("checked"in e||E(t.target.checked),null==y||y({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:b,checked:!!I,type:v})),d.createElement("span",{className:"".concat(g,"-inner")}))});e.s(["default",0,s])},421512,236836,e=>{"use strict";let t=e.i(271645).default.createContext(null);e.s(["default",0,t],421512),e.i(296059);var r=e.i(915654),n=e.i(183293),a=e.i(246422),l=e.i(838378);function i(e,t){return(e=>{let{checkboxCls:t}=e,a=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,n.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[a]:Object.assign(Object.assign({},(0,n.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${a}`]:{marginInlineStart:0},[`&${a}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,n.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,n.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,r.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,r.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}})},{[` + ${a}:not(${a}-disabled), + ${t}:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${a}:not(${a}-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}`}}},[` + ${a}-checked:not(${a}-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}`}}}}},{[`${a}-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,l.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let o=(0,a.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[i(t,e)]);e.s(["default",0,o,"getStyle",()=>i],236836)},681216,e=>{"use strict";var t=e.i(271645),r=e.i(963188);function n(e){let n=t.default.useRef(null),a=()=>{r.default.cancel(n.current),n.current=null};return[()=>{a(),n.current=(0,r.default)(()=>{n.current=null})},t=>{n.current&&(t.stopPropagation(),a()),null==e||e(t)}]}e.s(["default",()=>n])},374276,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(91874),a=e.i(611935),l=e.i(121872),i=e.i(26905),o=e.i(242064),d=e.i(937328),c=e.i(321883),s=e.i(62139),u=e.i(421512),g=e.i(236836),p=e.i(681216),m=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let f=t.forwardRef((e,f)=>{var b;let{prefixCls:h,className:$,rootClassName:v,children:C,indeterminate:y=!1,style:k,onMouseEnter:S,onMouseLeave:x,skipGroup:w=!1,disabled:O}=e,I=m(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:E,direction:N,checkbox:z}=t.useContext(o.ConfigContext),j=t.useContext(u.default),{isFormItemInput:P}=t.useContext(s.FormItemInputContext),T=t.useContext(d.default),M=null!=(b=(null==j?void 0:j.disabled)||O)?b:T,R=t.useRef(I.value),B=t.useRef(null),H=(0,a.composeRef)(f,B);t.useEffect(()=>{null==j||j.registerValue(I.value)},[]),t.useEffect(()=>{if(!w)return I.value!==R.current&&(null==j||j.cancelValue(R.current),null==j||j.registerValue(I.value),R.current=I.value),()=>null==j?void 0:j.cancelValue(I.value)},[I.value]),t.useEffect(()=>{var e;(null==(e=B.current)?void 0:e.input)&&(B.current.input.indeterminate=y)},[y]);let q=E("checkbox",h),D=(0,c.default)(q),[L,G,W]=(0,g.default)(q,D),A=Object.assign({},I);j&&!w&&(A.onChange=(...e)=>{I.onChange&&I.onChange.apply(I,e),j.toggleOption&&j.toggleOption({label:C,value:I.value})},A.name=j.name,A.checked=j.value.includes(I.value));let X=(0,r.default)(`${q}-wrapper`,{[`${q}-rtl`]:"rtl"===N,[`${q}-wrapper-checked`]:A.checked,[`${q}-wrapper-disabled`]:M,[`${q}-wrapper-in-form-item`]:P},null==z?void 0:z.className,$,v,W,D,G),F=(0,r.default)({[`${q}-indeterminate`]:y},i.TARGET_CLS,G),[V,_]=(0,p.default)(A.onClick);return L(t.createElement(l.default,{component:"Checkbox",disabled:M},t.createElement("label",{className:X,style:Object.assign(Object.assign({},null==z?void 0:z.style),k),onMouseEnter:S,onMouseLeave:x,onClick:V},t.createElement(n.default,Object.assign({},A,{onClick:_,prefixCls:q,className:F,disabled:M,ref:H})),null!=C&&t.createElement("span",{className:`${q}-label`},C))))});var b=e.i(8211),h=e.i(529681),$=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let v=t.forwardRef((e,n)=>{let{defaultValue:a,children:l,options:i=[],prefixCls:d,className:s,rootClassName:p,style:m,onChange:v}=e,C=$(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:y,direction:k}=t.useContext(o.ConfigContext),[S,x]=t.useState(C.value||a||[]),[w,O]=t.useState([]);t.useEffect(()=>{"value"in C&&x(C.value||[])},[C.value]);let I=t.useMemo(()=>i.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[i]),E=e=>{O(t=>t.filter(t=>t!==e))},N=e=>{O(t=>[].concat((0,b.default)(t),[e]))},z=e=>{let t=S.indexOf(e.value),r=(0,b.default)(S);-1===t?r.push(e.value):r.splice(t,1),"value"in C||x(r),null==v||v(r.filter(e=>w.includes(e)).sort((e,t)=>I.findIndex(t=>t.value===e)-I.findIndex(e=>e.value===t)))},j=y("checkbox",d),P=`${j}-group`,T=(0,c.default)(j),[M,R,B]=(0,g.default)(j,T),H=(0,h.default)(C,["value","disabled"]),q=i.length?I.map(e=>t.createElement(f,{prefixCls:j,key:e.value.toString(),disabled:"disabled"in e?e.disabled:C.disabled,value:e.value,checked:S.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${P}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):l,D=t.useMemo(()=>({toggleOption:z,value:S,disabled:C.disabled,name:C.name,registerValue:N,cancelValue:E}),[z,S,C.disabled,C.name,N,E]),L=(0,r.default)(P,{[`${P}-rtl`]:"rtl"===k},s,p,B,T,R);return M(t.createElement("div",Object.assign({className:L,style:m},H,{ref:n}),t.createElement(u.default.Provider,{value:D},q)))});f.Group=v,f.__ANT_CHECKBOX=!0,e.s(["default",0,f],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(739295),n=e.i(343794),a=e.i(931067),l=e.i(211577),i=e.i(392221),o=e.i(703923),d=e.i(914949),c=e.i(404948),s=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,r){var u,g=e.prefixCls,p=void 0===g?"rc-switch":g,m=e.className,f=e.checked,b=e.defaultChecked,h=e.disabled,$=e.loadingIcon,v=e.checkedChildren,C=e.unCheckedChildren,y=e.onClick,k=e.onChange,S=e.onKeyDown,x=(0,o.default)(e,s),w=(0,d.default)(!1,{value:f,defaultValue:b}),O=(0,i.default)(w,2),I=O[0],E=O[1];function N(e,t){var r=I;return h||(E(r=e),null==k||k(r,t)),r}var z=(0,n.default)(p,m,(u={},(0,l.default)(u,"".concat(p,"-checked"),I),(0,l.default)(u,"".concat(p,"-disabled"),h),u));return t.createElement("button",(0,a.default)({},x,{type:"button",role:"switch","aria-checked":I,disabled:h,className:z,ref:r,onKeyDown:function(e){e.which===c.default.LEFT?N(!1,e):e.which===c.default.RIGHT&&N(!0,e),null==S||S(e)},onClick:function(e){var t=N(!I,e);null==y||y(t,e)}}),$,t.createElement("span",{className:"".concat(p,"-inner")},t.createElement("span",{className:"".concat(p,"-inner-checked")},v),t.createElement("span",{className:"".concat(p,"-inner-unchecked")},C)))});u.displayName="Switch";var g=e.i(121872),p=e.i(242064),m=e.i(937328),f=e.i(517455);e.i(296059);var b=e.i(915654);e.i(262370);var h=e.i(135551),$=e.i(183293),v=e.i(246422),C=e.i(838378);let y=(0,v.genStyleHooks)("Switch",e=>{let t=(0,C.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:(0,b.unit)(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:a,innerMaxMargin:l,handleSize:i,calc:o}=e,d=`${t}-inner`,c=(0,b.unit)(o(i).add(o(n).mul(2)).equal()),s=(0,b.unit)(o(l).mul(2).equal());return{[t]:{[d]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:l,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${d}-checked, ${d}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${s})`,marginInlineEnd:`calc(100% - ${c} + ${s})`},[`${d}-unchecked`]:{marginTop:o(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${d}`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${s})`,marginInlineEnd:`calc(-100% + ${c} - ${s})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:o(n).mul(2).equal(),marginInlineEnd:o(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:o(n).mul(-1).mul(2).equal(),marginInlineEnd:o(n).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:r,handleBg:n,handleShadow:a,handleSize:l,calc:i}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:r,insetInlineStart:r,width:l,height:l,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:i(l).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,b.unit)(i(l).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:a,innerMinMarginSM:l,innerMaxMarginSM:i,handleSizeSM:o,calc:d}=e,c=`${t}-inner`,s=(0,b.unit)(d(o).add(d(n).mul(2)).equal()),u=(0,b.unit)(d(i).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:r,lineHeight:(0,b.unit)(r),[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:l,[`${c}-checked, ${c}-unchecked`]:{minHeight:r},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${u})`,marginInlineEnd:`calc(100% - ${s} + ${u})`},[`${c}-unchecked`]:{marginTop:d(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:d(d(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:i,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${u})`,marginInlineEnd:`calc(-100% + ${s} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,b.unit)(d(o).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:d(e.marginXXS).div(2).equal(),marginInlineEnd:d(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:d(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:d(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:a}=e,l=t*r,i=n/2,o=l-4,d=i-4;return{trackHeight:l,trackHeightSM:i,trackMinWidth:2*o+8,trackMinWidthSM:2*d+4,trackPadding:2,handleBg:a,handleSize:o,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new h.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:d/2,innerMaxMarginSM:d+2+4}});var k=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let S=t.forwardRef((e,a)=>{let{prefixCls:l,size:i,disabled:o,loading:c,className:s,rootClassName:b,style:h,checked:$,value:v,defaultChecked:C,defaultValue:S,onChange:x}=e,w=k(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[O,I]=(0,d.default)(!1,{value:null!=$?$:v,defaultValue:null!=C?C:S}),{getPrefixCls:E,direction:N,switch:z}=t.useContext(p.ConfigContext),j=t.useContext(m.default),P=(null!=o?o:j)||c,T=E("switch",l),M=t.createElement("div",{className:`${T}-handle`},c&&t.createElement(r.default,{className:`${T}-loading-icon`})),[R,B,H]=y(T),q=(0,f.default)(i),D=(0,n.default)(null==z?void 0:z.className,{[`${T}-small`]:"small"===q,[`${T}-loading`]:c,[`${T}-rtl`]:"rtl"===N},s,b,B,H),L=Object.assign(Object.assign({},null==z?void 0:z.style),h);return R(t.createElement(g.default,{component:"Switch",disabled:P},t.createElement(u,Object.assign({},w,{checked:O,onChange:(...e)=>{I(e[0]),null==x||x.apply(void 0,e)},prefixCls:T,className:D,style:L,disabled:P,ref:a,loadingIcon:M}))))});S.__ANT_SWITCH=!0,e.s(["Switch",0,S],790848)},475254,e=>{"use strict";var t=e.i(271645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:o="",children:d,iconNode:c,...s},u)=>(0,t.createElement)("svg",{ref:u,...a,width:r,height:r,stroke:e,strokeWidth:i?24*Number(l)/Number(r):l,className:n("lucide",o),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(s)&&{"aria-hidden":"true"},...s},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(d)?d:[d]])),i=(e,a)=>{let i=(0,t.forwardRef)(({className:i,...o},d)=>(0,t.createElement)(l,{ref:d,iconNode:a,className:n(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,i),...o}));return i.displayName=r(e),i};e.s(["default",()=>i],475254)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:n}))});e.s(["default",0,l],959013)},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),n=e.i(673706),a=e.i(271645);let l=a.default.forwardRef((e,l)=>{let{color:i,className:o,children:d}=e;return a.default.createElement("p",{ref:l,className:(0,r.tremorTwMerge)("text-tremor-default",i?(0,n.getColorClassNames)(i,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),o)},d)});l.displayName="Text",e.s(["default",()=>l],936325),e.s(["Text",()=>l],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(480731),a=e.i(95779),l=e.i(444755),i=e.i(673706);let o=(0,i.makeClassName)("Card"),d=r.default.forwardRef((e,d)=>{let{decoration:c="",decorationColor:s,children:u,className:g}=e,p=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:d,className:(0,l.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",s?(0,i.getColorClassNames)(s,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case n.HorizontalPositions.Left:return"border-l-4";case n.VerticalPositions.Top:return"border-t-4";case n.HorizontalPositions.Right:return"border-r-4";case n.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),g)},p),u)});d.displayName="Card",e.s(["Card",()=>d],304967)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/05cc063d4c1cb77b.js b/litellm/proxy/_experimental/out/_next/static/chunks/05cc063d4c1cb77b.js new file mode 100644 index 0000000000..fe1bc05dc2 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/05cc063d4c1cb77b.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,910119,e=>{"use strict";var s=e.i(843476),t=e.i(197647),l=e.i(653824),a=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),x=e.i(199133),h=e.i(28651),g=e.i(175712),p=e.i(770914),j=e.i(536916),f=e.i(764205),b=e.i(827252),y=e.i(994388),_=e.i(35983),v=e.i(779241),S=e.i(78085),N=e.i(808613),C=e.i(592968),T=e.i(708347),w=e.i(860585),k=e.i(355619),I=e.i(435451);function U({userData:e,onCancel:t,onSubmit:l,teams:a,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=N.Form.useForm(),[h,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let s=e.user_info?.max_budget,t=null==s;g(t),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:t?"":s,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,s.jsxs)(N.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(h||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),l(e)},layout:"vertical",children:[!u&&(0,s.jsx)(N.Form.Item,{label:"User ID",name:"user_id",children:(0,s.jsx)(v.TextInput,{disabled:!0})}),!u&&(0,s.jsx)(N.Form.Item,{label:"Email",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Alias",name:"user_alias",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Global Proxy Role"," ",(0,s.jsx)(C.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,s.jsx)(b.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,s.jsx)(x.Select,{children:c&&Object.entries(c).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Personal Models"," ",(0,s.jsx)(C.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,s.jsx)(b.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(x.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!T.all_admin_roles.includes(d||""),children:[(0,s.jsx)(x.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,s.jsx)(x.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,s.jsx)("span",{children:"Max Budget (USD)"}),(0,s.jsx)(j.Checkbox,{checked:h,onChange:e=>{let s=e.target.checked;g(s),s&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,s)=>h||""!==s&&null!=s?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,s.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:h})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(w.default,{})}),(0,s.jsx)(N.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,s.jsx)(y.Button,{variant:"secondary",type:"button",onClick:t,children:"Cancel"}),(0,s.jsx)(y.Button,{type:"submit",children:"Save Changes"})]})]})}var B=e.i(727749),A=e.i(888259);let{Text:D,Title:F}=c.Typography,R=({open:e,onCancel:t,selectedUsers:l,possibleUIRoles:a,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:b,allowAllUsers:y=!1})=>{let[_,v]=(0,n.useState)(!1),[S,N]=(0,n.useState)([]),[C,T]=(0,n.useState)(null),[w,k]=(0,n.useState)(!1),[I,R]=(0,n.useState)(!1),O=()=>{N([]),T(null),k(!1),R(!1),t()},E=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),P=async e=>{if(console.log("formValues",e),!r)return void B.default.fromBackend("Access token not found");v(!0);try{let s=l.map(e=>e.user_id),a={};e.user_role&&""!==e.user_role&&(a.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(a.max_budget=e.max_budget),e.models&&e.models.length>0&&(a.models=e.models),e.budget_duration&&""!==e.budget_duration&&(a.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(a.metadata=e.metadata);let n=Object.keys(a).length>0,d=w&&S.length>0;if(!n&&!d)return void B.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,f.userBulkUpdateUserCall)(r,a,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,f.userBulkUpdateUserCall)(r,a,s),o.push(`Updated ${s.length} user(s)`);if(d){let e=[];for(let s of S)try{let t=null;t=I?null:l.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let a=await (0,f.teamBulkMemberAddCall)(r,s,t||null,C||void 0,I);console.log("result",a),e.push({teamId:s,success:!0,successfulAdditions:a.successful_additions,failedAdditions:a.failed_additions})}catch(t){console.error(`Failed to add users to team ${s}:`,t),e.push({teamId:s,success:!1,error:t})}let s=e.filter(e=>e.success),t=e.filter(e=>!e.success);if(s.length>0){let e=s.reduce((e,s)=>e+s.successfulAdditions,0);o.push(`Added users to ${s.length} team(s) (${e} total additions)`)}t.length>0&&A.default.warning(`Failed to add users to ${t.length} team(s)`)}o.length>0&&B.default.success(o.join(". ")),N([]),T(null),k(!1),R(!1),i(),t()}catch(e){console.error("Bulk operation failed:",e),B.default.fromBackend("Failed to perform bulk operations")}finally{v(!1)}};return(0,s.jsxs)(o.Modal,{open:e,onCancel:O,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${l.length} User(s)`,width:800,children:[y&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(j.Checkbox,{checked:I,onChange:e=>R(e.target.checked),children:(0,s.jsx)(D,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,s.jsx)("div",{style:{marginTop:8},children:(0,s.jsx)(D,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)(F,{level:5,children:["Selected Users (",l.length,"):"]}),(0,s.jsx)(m.Table,{size:"small",bordered:!0,dataSource:l,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,s.jsx)(D,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:a?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,s.jsx)(u.Divider,{}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsxs)(D,{children:[(0,s.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,s.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,s.jsxs)(p.Space,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(j.Checkbox,{checked:w,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Select Teams:"}),(0,s.jsx)(x.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:N,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Team Budget (Optional):"}),(0,s.jsx)(h.InputNumber,{placeholder:"Max budget per user in team",value:C,onChange:e=>T(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,s.jsx)(U,{userData:E,onCancel:O,onSubmit:P,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:b,possibleUIRoles:a,isBulkEdit:!0}),_&&(0,s.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,s.jsxs)(D,{children:["Updating ",I?"all users":l.length," user(s)..."]})})]})};var O=e.i(371455);let E=({visible:e,possibleUIRoles:t,onCancel:l,user:a,onSubmit:r})=>{let[i,c]=(0,n.useState)(a),[u]=N.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[a]);let m=async()=>{u.resetFields(),l()},g=async e=>{r(e),u.resetFields(),l()};return a?(0,s.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+a.user_id,width:1e3,children:(0,s.jsx)(N.Form,{form:u,onFinish:g,initialValues:a,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Role",name:"user_role",children:(0,s.jsx)(x.Select,{children:t&&Object.entries(t).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,s.jsx)(h.InputNumber,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,s.jsx)(I.default,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(w.default,{})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var P=e.i(172372),L=e.i(500330),M=e.i(152473),z=e.i(266027),$=e.i(912598),K=e.i(127952),V=e.i(304967),G=e.i(629569),q=e.i(599724),W=e.i(114600),H=e.i(482725),J=e.i(790848),Q=e.i(646563),Y=e.i(955135);let X=({accessToken:e,possibleUIRoles:t,userID:l,userRole:a})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[p,j]=(0,n.useState)({}),[b,y]=(0,n.useState)(!1),[_,S]=(0,n.useState)([]),{Paragraph:N}=c.Typography,{Option:C}=x.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let s=await (0,f.getInternalUserSettings)(e);if(u(s),j(s.values||{}),e)try{let s=await (0,f.modelAvailableCall)(e,l,a);if(s&&s.data){let e=s.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),B.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let T=async()=>{if(e){y(!0);try{let s=Object.entries(p).reduce((e,[s,t])=>(e[s]=""===t?null:t,e),{}),t=await (0,f.updateInternalUserSettings)(e,s);u({...o,values:t.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),B.default.fromBackend("Failed to update settings: "+e)}finally{y(!1)}}},I=(e,s)=>{j(t=>({...t,[e]:s}))},U=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(H.Spin,{size:"large"})}):o?(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:()=>{g(!1),j(o.values||{})},disabled:b,children:"Cancel"}),(0,s.jsx)(d.Button,{type:"primary",onClick:T,loading:b,children:"Save Changes"})]}):(0,s.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,s.jsx)(N,{className:"mb-4",children:o.field_schema.description}),(0,s.jsx)(W.Divider,{}),(0,s.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:l}=o;return l&&l.properties?Object.entries(l.properties).map(([l,a])=>{let r=e[l],i=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,s.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,s.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,s.jsx)(N,{className:"text-sm text-gray-500 mt-1",children:a.description||"No description available"}),m?(0,s.jsx)("div",{className:"mt-2",children:((e,l,a)=>{let r=l.type;if("teams"===e){let t,l;return(0,s.jsx)("div",{className:"mt-2",children:(t=U(p[e]||[]),l=(e,s,l)=>{let a=[...t];a[e]={...a[e],[s]:l},I("teams",a)},(0,s.jsxs)("div",{className:"space-y-3",children:[t.map((e,a)=>(0,s.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)(q.Text,{className:"font-medium",children:["Team ",a+1]}),(0,s.jsx)(d.Button,{size:"small",danger:!0,icon:(0,s.jsx)(Y.DeleteOutlined,{}),onClick:()=>{I("teams",t.filter((e,s)=>s!==a))},children:"Remove"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,s.jsx)(v.TextInput,{value:e.team_id,onChange:e=>l(a,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,s.jsx)(h.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>l(a,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,s.jsxs)(x.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>l(a,"user_role",e),children:[(0,s.jsx)(C,{value:"user",children:"User"}),(0,s.jsx)(C,{value:"admin",children:"Admin"})]})]})]})]},a)),(0,s.jsx)(d.Button,{icon:(0,s.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...t,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&t)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:Object.entries(t).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(C,{value:e,children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{children:t}),(0,s.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:l})]})},e))});if("budget_duration"===e)return(0,s.jsx)(w.default,{value:p[e]||null,onChange:s=>I(e,s),className:"mt-2"});if("boolean"===r)return(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(J.Switch,{checked:!!p[e],onChange:s=>I(e,s)})});if("array"===r&&l.items?.enum)return(0,s.jsx)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:l.items.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else if("models"===e)return(0,s.jsxs)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:[(0,s.jsx)(C,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,s.jsx)(C,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),_.map(e=>(0,s.jsx)(C,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&l.enum)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:l.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else return(0,s.jsx)(v.TextInput,{value:void 0!==p[e]?String(p[e]):"",onChange:s=>I(e,s.target.value),placeholder:l.description||"",className:"mt-2"})})(l,a,0)}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,l)=>{if(null==l)return(0,s.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(l)){if(0===l.length)return(0,s.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=U(l);return(0,s.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,t)=>(0,s.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,s.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,s.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,L.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,s.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},t))})}if("user_role"===e&&t&&t[l]){let{ui_label:e,description:a}=t[l];return(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium",children:e}),a&&(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:a})]})}if("budget_duration"===e)return(0,s.jsx)("span",{children:(0,w.getBudgetDurationLabel)(l)});if("boolean"==typeof l)return(0,s.jsx)("span",{children:l?"Enabled":"Disabled"});if("models"===e&&Array.isArray(l))return 0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},t))});if("object"==typeof l)return Array.isArray(l)?0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},t))}):(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(l,null,2)});return(0,s.jsx)("span",{children:String(l)})})(l,r)})]},l)}):(0,s.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,s.jsx)(V.Card,{children:(0,s.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var Z=e.i(389083),ee=e.i(350967),es=e.i(752978),et=e.i(262218),el=e.i(591935),ea=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,t,l,a,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(C.Tooltip,{title:e.original.user_id,children:(0,s.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,s.jsx)(C.Tooltip,{title:"Copy User ID",children:(0,s.jsx)(en.CopyOutlined,{onClick:s=>{s.stopPropagation(),(0,L.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>e.original.metadata?.scim_active===!1?(0,s.jsx)(C.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,s.jsx)(et.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,s.jsx)(et.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:t})=>(0,s.jsx)("span",{className:"text-xs",children:e?.[t.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.spend?(0,L.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{children:"SSO ID"}),(0,s.jsx)(C.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,s.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,s.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,s.jsxs)(Z.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,s.jsx)(Z.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(C.Tooltip,{title:"Edit user details",children:(0,s.jsx)(es.Icon,{icon:el.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,s.jsx)(C.Tooltip,{title:"Delete user",children:(0,s.jsx)(es.Icon,{icon:ea.TrashIcon,size:"sm",onClick:()=>l(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,s.jsx)(C.Tooltip,{title:"Reset Password",children:(0,s.jsx)(es.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>a(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:t,isUserSelected:l,isAllSelected:a,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,s.jsx)(j.Checkbox,{indeterminate:r,checked:a,onChange:e=>t(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:t})=>(0,s.jsx)(j.Checkbox,{checked:l(t.original),onChange:s=>e(t.original,s.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),ex=e.i(64848),eh=e.i(942232),eg=e.i(496020),ep=e.i(977572),ej=e.i(206929),ef=e.i(94629),eb=e.i(360820),ey=e.i(871943),e_=e.i(981339),ev=e.i(530212),eS=e.i(988297),eN=e.i(118366),eC=e.i(678784);function eT({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:h,possibleUIRoles:g,initialTab:p=0,startInEditMode:j=!1}){let[b,_]=(0,n.useState)(null),[v,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[A,D]=(0,n.useState)(!1),[F,R]=(0,n.useState)(!0),[O,E]=(0,n.useState)(j),[M,z]=(0,n.useState)([]),[$,W]=(0,n.useState)(!1),[H,J]=(0,n.useState)(null),[Q,Y]=(0,n.useState)(null),[X,Z]=(0,n.useState)(p),[es,et]=(0,n.useState)({}),[el,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ej,ef]=(0,n.useState)(null),[eb,ey]=(0,n.useState)(!1),[e_,eT]=(0,n.useState)(!1),[ew,ek]=(0,n.useState)([]),[eI,eU]=(0,n.useState)(""),[eB,eA]=(0,n.useState)("user"),[eD,eF]=(0,n.useState)(!1);n.default.useEffect(()=>{Y((0,f.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0)try{let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),t=await Promise.all(e);S(t)}catch{S(s.teams.map(e=>({team_id:e,team_alias:null})))}let t=(await (0,f.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(t)}catch(e){console.error("Error fetching user data:",e),B.default.fromBackend("Failed to fetch user data")}finally{R(!1)}})()},[u,e,m]);let eR="proxy_admin"===m||"Admin"===m,eO=async()=>{if(u){eF(!0);try{let e=await (0,f.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eF(!1)}}},eE=async()=>{if(u&&eI){ey(!0);try{await (0,f.teamMemberAddCall)(u,eI,{role:eB,user_id:e}),B.default.success("User added to team successfully"),ed(!1);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),B.default.fromBackend(e?.message||"Failed to add user to team")}finally{ey(!1)}}},eP=async()=>{if(u&&ej){eT(!0);try{await (0,f.teamMemberDeleteCall)(u,ej.team_id,{role:"user",user_id:e}),B.default.success("User removed from team successfully"),ec(!1),ef(null);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),B.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eT(!1)}}},eL=ew.filter(e=>!v.some(s=>s.team_id===e.team_id)),eM=async()=>{if(!u)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let s=await (0,f.invitationCreateCall)(u,e);J(s),W(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;D(!0),await (0,f.userDeleteCall)(u,[e]),B.default.success("User deleted successfully"),h&&h(),c()}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{I(!1),D(!1)}},e$=async e=>{try{if(!u||!b)return;await (0,f.userUpdateUserCall)(u,e,null),_({...b,user_email:e.user_email??b.user_email,user_alias:e.user_alias??b.user_alias,models:e.models??b.models,max_budget:e.max_budget??b.max_budget,budget_duration:e.budget_duration??b.budget_duration,metadata:e.metadata??b.metadata}),B.default.success("User updated successfully"),E(!1)}catch(e){console.error("Error updating user:",e),B.default.fromBackend("Failed to update user")}};if(F)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"Loading user data..."})]});if(!b)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"User not found"})]});let eK=async(e,s)=>{await (0,L.copyToClipboard)(e)&&(et(e=>({...e,[s]:!0})),setTimeout(()=>{et(e=>({...e,[s]:!1}))},2e3))},eV={user_id:b.user_id,user_info:{user_email:b.user_email,user_alias:b.user_alias,user_role:b.user_role,models:b.models,max_budget:b.max_budget,budget_duration:b.budget_duration,metadata:b.metadata}};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(G.Title,{children:b.user_email||"User"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"text-gray-500 font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eC.CheckIcon,{size:12}):(0,s.jsx)(eN.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&T.rolesWithWriteAccess.includes(m)&&(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(y.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:eM,className:"flex items-center",children:"Reset Password"}),(0,s.jsx)(y.Button,{icon:ea.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,s.jsx)(K.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:b.user_email},{label:"User ID",value:b.user_id,code:!0},{label:"Global Proxy Role",value:b.user_role&&g?.[b.user_role]?.ui_label||b.user_role||"-"},{label:"Total Spend (USD)",value:null!==b.spend&&void 0!==b.spend?b.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:A}),(0,s.jsxs)(l.TabGroup,{defaultIndex:X,onIndexChange:Z,children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Overview"}),(0,s.jsx)(t.Tab,{children:"Details"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Spend"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(G.Title,{children:["$",(0,L.formatNumberWithCommas)(b.spend||0,4)]}),(0,s.jsxs)(q.Text,{children:["of"," ",null!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"]})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,s.jsx)(q.Text,{children:"Teams"}),eR&&(0,s.jsx)(y.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eU(""),eA("user"),ed(!0),eO()},children:"Add Team"})]}),(0,s.jsxs)("div",{className:"mt-2",children:[v.length>0?(0,s.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,s.jsxs)(eu.Table,{children:[(0,s.jsx)(em.TableHead,{children:(0,s.jsxs)(eg.TableRow,{children:[(0,s.jsx)(ex.TableHeaderCell,{children:"Team Name"}),eR&&(0,s.jsx)(ex.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,s.jsx)(eh.TableBody,{children:v.slice(0,el?v.length:20).map(e=>(0,s.jsxs)(eg.TableRow,{children:[(0,s.jsx)(ep.TableCell,{children:e.team_alias||e.team_id}),eR&&(0,s.jsx)(ep.TableCell,{className:"text-right",children:(0,s.jsx)(y.Button,{icon:ea.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{ef(e),ec(!0)}})})]},e.team_id))})]})}):(0,s.jsx)(q.Text,{children:"No teams"}),!el&&v.length>20&&(0,s.jsxs)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",v.length-20," more"]}),el&&v.length>20&&(0,s.jsx)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Personal Models"}),(0,s.jsx)("div",{className:"mt-2",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)(q.Text,{children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"User Settings"}),!O&&m&&T.rolesWithWriteAccess.includes(m)&&(0,s.jsx)(y.Button,{onClick:()=>E(!0),children:"Edit Settings"})]}),O&&b?(0,s.jsx)(U,{userData:eV,onCancel:()=>E(!1),onSubmit:e$,teams:v,accessToken:u,userID:e,userRole:m,userModels:M,possibleUIRoles:g}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eC.CheckIcon,{size:12}):(0,s.jsx)(eN.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,s.jsx)(q.Text,{children:b.user_email||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,s.jsx)(q.Text,{children:b.user_alias||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,s.jsx)(q.Text,{children:b.user_role||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,s.jsx)(q.Text,{children:b.created_at?new Date(b.created_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,s.jsx)(q.Text,{children:b.updated_at?new Date(b.updated_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,s.jsx)(q.Text,{children:null!==b.max_budget&&void 0!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,s.jsx)(q.Text,{children:(0,w.getBudgetDurationLabel)(b.budget_duration??null)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(b.metadata||{},null,2)})]})]})]})})]})]}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:$,setIsInvitationLinkModalVisible:W,baseUrl:Q||"",invitationLinkData:H,modalType:"resetPassword"}),(0,s.jsx)(K.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ej?.team_alias||ej?.team_id},{label:"User ID",value:b?.user_id,code:!0},{label:"Email",value:b?.user_email}],onCancel:()=>{ec(!1),ef(null)},onOk:eP,confirmLoading:e_}),(0,s.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!eb,children:(0,s.jsxs)(N.Form,{layout:"vertical",onFinish:eE,children:[(0,s.jsx)(N.Form.Item,{label:"Team",required:!0,children:(0,s.jsx)(x.Select,{showSearch:!0,value:eI||void 0,onChange:eU,placeholder:"Select a team",filterOption:(e,s)=>{let t=eL.find(e=>e.team_id===s?.value);return!!t&&t.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eD,children:eL.map(e=>(0,s.jsx)(x.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,s.jsx)(N.Form.Item,{label:"Member Role",children:(0,s.jsxs)(x.Select,{value:eB,onChange:eA,children:[(0,s.jsx)(x.Select.Option,{value:"user",children:(0,s.jsxs)(C.Tooltip,{title:"Can view team info, but not manage it",children:[(0,s.jsx)("span",{className:"font-medium",children:"user"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,s.jsx)(x.Select.Option,{value:"admin",children:(0,s.jsxs)(C.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,s.jsx)("span",{className:"font-medium",children:"admin"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,s.jsx)("div",{className:"text-right mt-4",children:(0,s.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:eb,disabled:!eI,children:eb?"Adding...":"Add to Team"})})]})})]})}var ew=e.i(655913),ek=e.i(38419),eI=e.i(78334),eU=e.i(555436),eB=e.i(284614);let eA=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eD({data:e=[],columns:t,isLoading:l=!1,onSortChange:a,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:x=[],onSelectionChange:h,enableSelection:g=!1,filters:p,updateFilters:j,initialFilters:f,teams:b,userListResponse:y,currentPage:v,handlePageChange:S}){let[N,C]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[T,w]=n.default.useState(null),[k,I]=n.default.useState(!1),[U,B]=n.default.useState(!1),A=(e,s=!1)=>{w(e),I(s)},D=(e,s)=>{h&&(s?h([...x,e]):h(x.filter(s=>s.user_id!==e.user_id)))},F=s=>{h&&(s?h(e):h([]))},R=e=>x.some(s=>s.user_id===e.user_id),O=e.length>0&&x.length===e.length,E=x.length>0&&x.lengtho?ed(o,c,u,m,A,g?{selectedUsers:x,onSelectUser:D,onSelectAll:F,isUserSelected:R,isAllSelected:O,isIndeterminate:E}:void 0):t,[o,c,u,m,A,t,g,x,O,E]),L=(0,eo.useReactTable)({data:e,columns:P,state:{sorting:N},onSortingChange:e=>{let s="function"==typeof e?e(N):e;if(C(s),s&&Array.isArray(s)&&s.length>0&&s[0]){let e=s[0];if(e.id){let s=e.id,t=e.desc?"desc":"asc";a?.(s,t)}}else a?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&C([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),T)?(0,s.jsx)(eT,{userId:T,onClose:()=>{w(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Search by email...",value:p.email,onChange:e=>j({email:e}),icon:eU.Search}),(0,s.jsx)(ek.FiltersButton,{onClick:()=>B(!U),active:U,hasActiveFilters:!!(p.user_id||p.user_role||p.team)}),(0,s.jsx)(eI.ResetFiltersButton,{onClick:()=>{j(f)}})]}),U&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by User ID",value:p.user_id,onChange:e=>j({user_id:e}),icon:eB.User}),(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by SSO ID",value:p.sso_user_id,onChange:e=>j({sso_user_id:e}),icon:eA}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ej.Select,{value:p.user_role,onValueChange:e=>j({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,t])=>(0,s.jsx)(_.SelectItem,{value:e,children:t.ui_label},e))})}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ej.Select,{value:p.team,onValueChange:e=>j({team:e}),placeholder:"Select Team",children:b?.map(e=>(0,s.jsx)(_.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[l?(0,s.jsx)(e_.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,s.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",y&&y.users&&y.users.length>0?(y.page-1)*y.page_size+1:0," ","-"," ",y&&y.users?Math.min(y.page*y.page_size,y.total):0," ","of ",y?y.total:0," results"]}),(0,s.jsx)("div",{className:"flex space-x-2",children:l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>S(v-1),disabled:1===v,className:`px-3 py-1 text-sm border rounded-md ${1===v?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,s.jsx)("button",{onClick:()=>S(v+1),disabled:!y||v>=y.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!y||v>=y.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,s.jsx)("div",{className:"overflow-auto",children:(0,s.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,s.jsx)(em.TableHead,{children:L.getHeaderGroups().map(e=>(0,s.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,s.jsx)(ex.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,s.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,s.jsx)(eb.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,s.jsx)(ey.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,s.jsx)(ef.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,s.jsx)(eh.TableBody,{children:l?(0,s.jsx)(eg.TableRow,{children:(0,s.jsx)(ep.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?L.getRowModel().rows.map(e=>(0,s.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,s.jsx)(ep.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&A(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,s.jsx)(eg.TableRow,{children:(0,s.jsx)(ep.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eF,Title:eR}=c.Typography,eO={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:x})=>{let h=!!c&&(0,T.isProxyAdminRole)(c),g=(0,$.useQueryClient)(),[p,j]=(0,n.useState)(1),[b,y]=(0,n.useState)(!1),[_,v]=(0,n.useState)(null),[S,N]=(0,n.useState)(!1),[C,w]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[U,A]=(0,n.useState)("users"),[D,F]=(0,n.useState)(eO),[V,G,q]=(0,M.useDebouncedState)(D,{wait:300}),[W,H]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Y,Z]=(0,n.useState)(null),[ee,es]=(0,n.useState)([]),[et,el]=(0,n.useState)(!1),[ea,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),N(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{Z((0,f.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let s=(await (0,f.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",s),en(s)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{F(s=>{let t={...s,...e};return G(t),t})},eu=(e,s)=>{ec({sort_by:e,sort_order:s})},em=async s=>{if(!e)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let t=await (0,f.invitationCreateCall)(e,s);Q(t),H(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ex=async()=>{if(k&&e)try{w(!0),await (0,f.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:s}}),B.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{N(!1),I(null),w(!1)}},eh=async()=>{v(null),y(!1)},eg=async s=>{if(console.log("inside handleEditSubmit:",s),e&&o&&c&&u){try{let t=await (0,f.userUpdateUserCall)(e,s,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.map(e=>e.user_id===t.data.user_id?(0,L.updateExistingKeys)(e,t.data):e);return{...e,users:s}}),B.default.success(`User ${s.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}v(null),y(!1)}},ep=async e=>{j(e)},ej=e=>{es(e)},ef=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:V,currentPage:p,orgAdminOrgIds:x}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.userListCall)(e,V.user_id?[V.user_id]:null,p,25,V.email||null,V.user_role||null,V.team||null,V.sso_user_id||null,V.sort_by,V.sort_order,x?x.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),eb=ef.data,ey=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,ev=ed(ey,e=>{v(e),y(!0)},eo,em,()=>{});return(0,s.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,s.jsx)("div",{className:"flex space-x-3",children:ef.isLoading?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(O.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ey}),h&&(0,s.jsx)(d.Button,{onClick:()=>{er(!ea),es([])},type:ea?"primary":"default",className:"flex items-center",children:ea?"Cancel Selection":"Select Users"}),h&&ea&&(0,s.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?B.default.fromBackend("Please select users to edit"):el(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),h?(0,s.jsxs)(l.TabGroup,{defaultIndex:0,onIndexChange:e=>A(0===e?"users":"settings"),children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Users"}),(0,s.jsx)(t.Tab,{children:"Default User Settings"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsx)(eD,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ey,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:ea,selectedUsers:ee,onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eO,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep})}),(0,s.jsx)(r.TabPanel,{children:u&&c&&e?(0,s.jsx)(X,{accessToken:e,possibleUIRoles:ey,userID:u,userRole:c}):(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(e_.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,s.jsx)(eD,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ey,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eO,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep}),(0,s.jsx)(E,{visible:b,possibleUIRoles:ey,onCancel:eh,user:_,onSubmit:eg}),(0,s.jsx)(K.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ey?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{N(!1),I(null)},onOk:ex,confirmLoading:C}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:W,setIsInvitationLinkModalVisible:H,baseUrl:Y||"",invitationLinkData:J,modalType:"resetPassword"}),(0,s.jsx)(R,{open:et,onCancel:()=>el(!1),selectedUsers:ee,possibleUIRoles:ey,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),es([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,T.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0bcb5f632525f5f8.js b/litellm/proxy/_experimental/out/_next/static/chunks/0bcb5f632525f5f8.js new file mode 100644 index 0000000000..1e6d499918 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0bcb5f632525f5f8.js @@ -0,0 +1,420 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,755151,e=>{"use strict";var t=e.i(247153);e.s(["DownOutlined",()=>t.default])},916925,e=>{"use strict";var t,i=((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 Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",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.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);let a={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",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"},o="../ui/assets/logos/",r={"A2A Agent":`${o}a2a_agent.png`,Ai21:`${o}ai21.svg`,"Ai21 Chat":`${o}ai21.svg`,"AI/ML API":`${o}aiml_api.svg`,"Aiohttp Openai":`${o}openai_small.svg`,Anthropic:`${o}anthropic.svg`,"Anthropic Text":`${o}anthropic.svg`,AssemblyAI:`${o}assemblyai_small.png`,Azure:`${o}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${o}microsoft_azure.svg`,"Azure Text":`${o}microsoft_azure.svg`,Baseten:`${o}baseten.svg`,"Amazon Bedrock":`${o}bedrock.svg`,"Amazon Bedrock Mantle":`${o}bedrock.svg`,"AWS SageMaker":`${o}bedrock.svg`,Cerebras:`${o}cerebras.svg`,Cloudflare:`${o}cloudflare.svg`,Codestral:`${o}mistral.svg`,Cohere:`${o}cohere.svg`,"Cohere Chat":`${o}cohere.svg`,Cometapi:`${o}cometapi.svg`,Cursor:`${o}cursor.svg`,"Databricks (Qwen API)":`${o}databricks.svg`,Dashscope:`${o}dashscope.svg`,Deepseek:`${o}deepseek.svg`,Deepgram:`${o}deepgram.png`,DeepInfra:`${o}deepinfra.png`,ElevenLabs:`${o}elevenlabs.png`,"Fal AI":`${o}fal_ai.jpg`,"Featherless Ai":`${o}featherless.svg`,"Fireworks AI":`${o}fireworks.svg`,Friendliai:`${o}friendli.svg`,"Github Copilot":`${o}github_copilot.svg`,"Google AI Studio":`${o}google.svg`,GradientAI:`${o}gradientai.svg`,Groq:`${o}groq.svg`,vllm:`${o}vllm.png`,Huggingface:`${o}huggingface.svg`,Hyperbolic:`${o}hyperbolic.svg`,Infinity:`${o}infinity.png`,"Jina AI":`${o}jina.png`,"Lambda Ai":`${o}lambda.svg`,"Lm Studio":`${o}lmstudio.svg`,"Meta Llama":`${o}meta_llama.svg`,MiniMax:`${o}minimax.svg`,"Mistral AI":`${o}mistral.svg`,Moonshot:`${o}moonshot.svg`,Morph:`${o}morph.svg`,Nebius:`${o}nebius.svg`,Novita:`${o}novita.svg`,"Nvidia Nim":`${o}nvidia_nim.svg`,Ollama:`${o}ollama.svg`,"Ollama Chat":`${o}ollama.svg`,Oobabooga:`${o}openai_small.svg`,OpenAI:`${o}openai_small.svg`,"Openai Like":`${o}openai_small.svg`,"OpenAI Text Completion":`${o}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${o}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${o}openai_small.svg`,Openrouter:`${o}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${o}oracle.svg`,Perplexity:`${o}perplexity-ai.svg`,Recraft:`${o}recraft.svg`,Replicate:`${o}replicate.svg`,RunwayML:`${o}runwayml.png`,Sagemaker:`${o}bedrock.svg`,Sambanova:`${o}sambanova.svg`,"SAP Generative AI Hub":`${o}sap.png`,Snowflake:`${o}snowflake.svg`,"Text-Completion-Codestral":`${o}mistral.svg`,TogetherAI:`${o}togetherai.svg`,Topaz:`${o}topaz.svg`,Triton:`${o}nvidia_triton.png`,V0:`${o}v0.svg`,"Vercel Ai Gateway":`${o}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${o}google.svg`,"Vertex Ai Beta":`${o}google.svg`,Vllm:`${o}vllm.png`,VolcEngine:`${o}volcengine.png`,"Voyage AI":`${o}voyage.webp`,Watsonx:`${o}watsonx.svg`,"Watsonx Text":`${o}watsonx.svg`,xAI:`${o}xai.svg`,Xinference:`${o}xinference.svg`};e.s(["Providers",()=>i,"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 return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:r[e],displayName:e}}let t=Object.keys(a).find(t=>a[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let o=i[t];return{logo:r[o],displayName:o}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let i=a[e];console.log(`Provider mapped to: ${i}`);let o=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let a=t.litellm_provider;(a===i||"string"==typeof a&&a.includes(i))&&o.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&o.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&o.push(e)}))),o},"providerLogoMap",0,r,"provider_map",0,a])},652272,209261,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(447566),o=e.i(166406),r=e.i(492030),n=e.i(596239);let l=e=>"github"===e.source.source&&e.source.repo?`/plugin marketplace add ${e.source.repo}`:"url"===e.source.source&&e.source.url?`/plugin marketplace add ${e.source.url}`:`/plugin marketplace add ${e.name}`;e.s(["formatInstallCommand",0,l,"getCategoryBadgeColor",0,e=>{if(!e)return"gray";let t=e.toLowerCase();if(t.includes("development")||t.includes("dev"))return"blue";if(t.includes("productivity")||t.includes("workflow"))return"green";if(t.includes("learning")||t.includes("education"))return"purple";if(t.includes("security")||t.includes("safety"))return"red";if(t.includes("data")||t.includes("analytics"))return"orange";else if(t.includes("integration")||t.includes("api"))return"yellow";return"gray"},"isValidEmail",0,e=>!e||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),"isValidSemanticVersion",0,e=>!e||/^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?$/.test(e),"isValidUrl",0,e=>{if(!e)return!0;try{return new URL(e),!0}catch{return!1}},"parseKeywords",0,e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>""!==e):[],"validatePluginName",0,e=>!!e&&""!==e.trim()&&/^[a-z0-9-]+$/.test(e)],209261),e.s(["default",0,({skill:e,onBack:s})=>{let d,[c,p]=(0,i.useState)("overview"),[g,u]=(0,i.useState)(null),m=(e,t)=>{navigator.clipboard.writeText(e),u(t),setTimeout(()=>u(null),2e3)},f="github"===(d=e.source).source&&d.repo?`https://github.com/${d.repo}`:"git-subdir"===d.source&&d.url?d.path?`${d.url}/tree/main/${d.path}`:d.url:"url"===d.source&&d.url?d.url:null,h=l(e),_=[...e.category?[{property:"Category",value:e.category}]:[],...e.domain?[{property:"Domain",value:e.domain}]:[],...e.namespace?[{property:"Namespace",value:e.namespace}]:[],...e.version?[{property:"Version",value:e.version}]:[],...e.author?.name?[{property:"Author",value:e.author.name}]:[],...e.created_at?[{property:"Added",value:new Date(e.created_at).toLocaleDateString()}]:[]];return(0,t.jsxs)("div",{style:{padding:"24px 32px 24px 0"},children:[(0,t.jsxs)("div",{onClick:s,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(a.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:"Skills"})]}),(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name}),e.description&&(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"8px 0 0 0",lineHeight:1.6},children:e.description})]}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28,marginTop:24},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:[{key:"overview",label:"Overview"},{key:"usage",label:"How to Use"}].map(e=>(0,t.jsx)("div",{onClick:()=>p(e.key),style:{padding:"12px 20px",fontSize:14,color:c===e.key?"#1a73e8":"#5f6368",borderBottom:c===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:c===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===c&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Skill Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Metadata registered with this skill"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:160},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:_.map((e,i)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},i))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Status"}),(0,t.jsx)("span",{style:{fontSize:12,padding:"3px 10px",borderRadius:12,backgroundColor:e.enabled?"#e6f4ea":"#f1f3f4",color:e.enabled?"#137333":"#5f6368",fontWeight:500},children:e.enabled?"Public":"Draft"})]}),f&&(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Source"}),(0,t.jsxs)("a",{href:f,target:"_blank",rel:"noopener noreferrer",style:{fontSize:13,color:"#1a73e8",wordBreak:"break-all",display:"flex",alignItems:"center",gap:4},children:[f.replace("https://",""),(0,t.jsx)(n.LinkOutlined,{style:{fontSize:11,flexShrink:0}})]})]}),e.keywords&&e.keywords.length>0&&(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.keywords.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Skill ID"}),(0,t.jsx)("div",{style:{fontSize:12,fontFamily:"monospace",color:"#3c4043",wordBreak:"break-all"},children:e.id})]})]})]}),"usage"===c&&(0,t.jsxs)("div",{style:{maxWidth:640},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 8px 0"},children:"Using this skill"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 24px 0",lineHeight:1.6},children:"Once your proxy is set as a marketplace, enable this skill in Claude Code with one command:"}),(0,t.jsxs)("div",{style:{border:"1px solid #dadce0",borderRadius:8,overflow:"hidden",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#3c4043",fontWeight:500},children:"Run in Claude Code"}),(0,t.jsxs)("button",{onClick:()=>m(h,"install"),style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"install"===g?"#137333":"#1a73e8",background:"none",border:"none",cursor:"pointer",padding:0},children:["install"===g?(0,t.jsx)(r.CheckOutlined,{}):(0,t.jsx)(o.CopyOutlined,{}),"install"===g?"Copied":"Copy"]})]}),(0,t.jsx)("pre",{style:{margin:0,padding:"14px 16px",fontSize:14,fontFamily:"monospace",color:"#202124",backgroundColor:"#fff"},children:h})]}),(0,t.jsxs)("p",{style:{fontSize:13,color:"#5f6368",lineHeight:1.6,margin:0},children:["Don't have the marketplace configured yet?"," ",(0,t.jsx)("span",{onClick:()=>p("setup"),style:{color:"#1a73e8",cursor:"pointer"},children:"See one-time setup →"})]})]}),"setup"===c&&(0,t.jsxs)("div",{style:{maxWidth:640},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 8px 0"},children:"One-time marketplace setup"}),(0,t.jsxs)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 24px 0",lineHeight:1.6},children:["Add this to ",(0,t.jsx)("code",{style:{fontSize:13,backgroundColor:"#f1f3f4",padding:"1px 6px",borderRadius:4},children:"~/.claude/settings.json"})," to point Claude Code at your proxy:"]}),(0,t.jsxs)("div",{style:{border:"1px solid #dadce0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#3c4043",fontWeight:500},children:"~/.claude/settings.json"}),(0,t.jsxs)("button",{onClick:()=>{m(JSON.stringify({extraKnownMarketplaces:{"my-org":{source:"url",url:`${window.location.origin}/claude-code/marketplace.json`}}},null,2),"settings")},style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"settings"===g?"#137333":"#1a73e8",background:"none",border:"none",cursor:"pointer",padding:0},children:["settings"===g?(0,t.jsx)(r.CheckOutlined,{}):(0,t.jsx)(o.CopyOutlined,{}),"settings"===g?"Copied":"Copy"]})]}),(0,t.jsx)("pre",{style:{margin:0,padding:"14px 16px",fontSize:13,fontFamily:"monospace",color:"#202124",backgroundColor:"#fff"},children:JSON.stringify({extraKnownMarketplaces:{"my-org":{source:"url",url:`${window.location.origin}/claude-code/marketplace.json`}}},null,2)})]})]})]})}],652272)},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",()=>t])},798496,e=>{"use strict";var t=e.i(843476),i=e.i(152990),a=e.i(682830),o=e.i(271645),r=e.i(269200),n=e.i(427612),l=e.i(64848),s=e.i(942232),d=e.i(496020),c=e.i(977572),p=e.i(94629),g=e.i(360820),u=e.i(871943);function m({data:e=[],columns:m,isLoading:f=!1,defaultSorting:h=[],pagination:_,onPaginationChange:A,enablePagination:b=!1,onRowClick:v}){let[x,y]=o.default.useState(h),[I]=o.default.useState("onChange"),[E,C]=o.default.useState({}),[S,O]=o.default.useState({}),w=(0,i.useReactTable)({data:e,columns:m,state:{sorting:x,columnSizing:E,columnVisibility:S,...b&&_?{pagination:_}:{}},columnResizeMode:I,onSortingChange:y,onColumnSizingChange:C,onColumnVisibilityChange:O,...b&&A?{onPaginationChange:A}:{},getCoreRowModel:(0,a.getCoreRowModel)(),getSortedRowModel:(0,a.getSortedRowModel)(),...b?{getPaginationRowModel:(0,a.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(r.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:w.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(n.TableHead,{children:w.getHeaderGroups().map(e=>(0,t.jsx)(d.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(l.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,i.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(g.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(u.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(p.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(s.TableBody,{children:f?(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):w.getRowModel().rows.length>0?w.getRowModel().rows.map(e=>(0,t.jsx)(d.TableRow,{onClick:()=>v?.(e.original),className:v?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,i.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>m])},818581,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"useMergedRef",{enumerable:!0,get:function(){return o}});let a=e.r(271645);function o(e,t){let i=(0,a.useRef)(null),o=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=i.current;e&&(i.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(i.current=r(e,a)),t&&(o.current=r(t,a))},[e,t])}function r(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let i=e(t);return"function"==typeof i?i:()=>e(null)}}("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},62478,e=>{"use strict";var t=e.i(764205);let i=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,i])},602073,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["SafetyOutlined",0,r],602073)},190272,785913,e=>{"use strict";var t,i,a=((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),o=((i={}).IMAGE="image",i.VIDEO="video",i.CHAT="chat",i.RESPONSES="responses",i.IMAGE_EDITS="image_edits",i.ANTHROPIC_MESSAGES="anthropic_messages",i.EMBEDDINGS="embeddings",i.SPEECH="speech",i.TRANSCRIPTION="transcription",i.A2A_AGENTS="a2a_agents",i.MCP="mcp",i.REALTIME="realtime",i);let r={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",()=>o,"getEndpointType",0,e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let t=r[e];return console.log("endpointType:",t),t}return"chat"}],785913),e.s(["generateCodeSnippet",0,e=>{let t,{apiKeySource:i,accessToken:a,apiKey:r,inputMessage:n,chatHistory:l,selectedTags:s,selectedVectorStores:d,selectedGuardrails:c,selectedPolicies:p,selectedMCPServers:g,mcpServers:u,mcpServerToolRestrictions:m,selectedVoice:f,endpointType:h,selectedModel:_,selectedSdk:A,proxySettings:b}=e,v="session"===i?a:r,x=window.location.origin,y=b?.LITELLM_UI_API_DOC_BASE_URL;y&&y.trim()?x=y:b?.PROXY_BASE_URL&&(x=b.PROXY_BASE_URL);let I=n||"Your prompt here",E=I.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),C=l.filter(e=>!e.isImage).map(({role:e,content:t})=>({role:e,content:t})),S={};s.length>0&&(S.tags=s),d.length>0&&(S.vector_stores=d),c.length>0&&(S.guardrails=c),p.length>0&&(S.policies=p);let O=_||"your-model-name",w="azure"===A?`import openai + +client = openai.AzureOpenAI( + api_key="${v||"YOUR_LITELLM_API_KEY"}", + azure_endpoint="${x}", + api_version="2024-02-01" +)`:`import openai + +client = openai.OpenAI( + api_key="${v||"YOUR_LITELLM_API_KEY"}", + base_url="${x}" +)`;switch(h){case o.CHAT:{let e=Object.keys(S).length>0,i="";if(e){let e=JSON.stringify({metadata:S},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();i=`, + extra_body=${e}`}let a=C.length>0?C:[{role:"user",content:I}];t=` +import base64 + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Example with text only +response = client.chat.completions.create( + model="${O}", + messages=${JSON.stringify(a,null,4)}${i} +) + +print(response) + +# Example with image or PDF (uncomment and provide file path to use) +# base64_file = encode_image("path/to/your/file.jpg") # or .pdf +# response_with_file = client.chat.completions.create( +# model="${O}", +# messages=[ +# { +# "role": "user", +# "content": [ +# { +# "type": "text", +# "text": "${E}" +# }, +# { +# "type": "image_url", +# "image_url": { +# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file} +# } +# } +# ] +# } +# ]${i} +# ) +# print(response_with_file) +`;break}case o.RESPONSES:{let e=Object.keys(S).length>0,i="";if(e){let e=JSON.stringify({metadata:S},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();i=`, + extra_body=${e}`}let a=C.length>0?C:[{role:"user",content:I}];t=` +import base64 + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Example with text only +response = client.responses.create( + model="${O}", + input=${JSON.stringify(a,null,4)}${i} +) + +print(response.output_text) + +# Example with image or PDF (uncomment and provide file path to use) +# base64_file = encode_image("path/to/your/file.jpg") # or .pdf +# response_with_file = client.responses.create( +# model="${O}", +# input=[ +# { +# "role": "user", +# "content": [ +# {"type": "input_text", "text": "${E}"}, +# { +# "type": "input_image", +# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file} +# }, +# ], +# } +# ]${i} +# ) +# print(response_with_file.output_text) +`;break}case o.IMAGE:t="azure"===A?` +# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI. +# This snippet uses 'client.images.generate' and will create a new image based on your prompt. +# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context. +import os +import requests +import json +import time +from PIL import Image + +result = client.images.generate( + model="${O}", + prompt="${n}", + n=1 +) + +json_response = json.loads(result.model_dump_json()) + +# Set the directory for the stored image +image_dir = os.path.join(os.curdir, 'images') + +# If the directory doesn't exist, create it +if not os.path.isdir(image_dir): + os.mkdir(image_dir) + +# Initialize the image path +image_filename = f"generated_image_{int(time.time())}.png" +image_path = os.path.join(image_dir, image_filename) + +try: + # Retrieve the generated image + if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"): + image_url = json_response["data"][0]["url"] + generated_image = requests.get(image_url).content + with open(image_path, "wb") as image_file: + image_file.write(generated_image) + + print(f"Image saved to {image_path}") + # Display the image + image = Image.open(image_path) + image.show() + else: + print("Could not find image URL in response.") + print("Full response:", json_response) +except Exception as e: + print(f"An error occurred: {e}") + print("Full response:", json_response) +`:` +import base64 +import os +import time +import json +from PIL import Image +import requests + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Helper function to create a file (simplified for this example) +def create_file(image_path): + # In a real implementation, this would upload the file to OpenAI + # For this example, we'll just return a placeholder ID + return f"file_{os.path.basename(image_path).replace('.', '_')}" + +# The prompt entered by the user +prompt = "${E}" + +# Encode images to base64 +base64_image1 = encode_image("body-lotion.png") +base64_image2 = encode_image("soap.png") + +# Create file IDs +file_id1 = create_file("body-lotion.png") +file_id2 = create_file("incense-kit.png") + +response = client.responses.create( + model="${O}", + input=[ + { + "role": "user", + "content": [ + {"type": "input_text", "text": prompt}, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image1}", + }, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image2}", + }, + { + "type": "input_image", + "file_id": file_id1, + }, + { + "type": "input_image", + "file_id": file_id2, + } + ], + } + ], + tools=[{"type": "image_generation"}], +) + +# Process the response +image_generation_calls = [ + output + for output in response.output + if output.type == "image_generation_call" +] + +image_data = [output.result for output in image_generation_calls] + +if image_data: + image_base64 = image_data[0] + image_filename = f"edited_image_{int(time.time())}.png" + with open(image_filename, "wb") as f: + f.write(base64.b64decode(image_base64)) + print(f"Image saved to {image_filename}") +else: + # If no image is generated, there might be a text response with an explanation + text_response = [output.text for output in response.output if hasattr(output, 'text')] + if text_response: + print("No image generated. Model response:") + print("\\n".join(text_response)) + else: + print("No image data found in response.") + print("Full response for debugging:") + print(response) +`;break;case o.IMAGE_EDITS:t="azure"===A?` +import base64 +import os +import time +import json +from PIL import Image +import requests + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# The prompt entered by the user +prompt = "${E}" + +# Encode images to base64 +base64_image1 = encode_image("body-lotion.png") +base64_image2 = encode_image("soap.png") + +# Create file IDs +file_id1 = create_file("body-lotion.png") +file_id2 = create_file("incense-kit.png") + +response = client.responses.create( + model="${O}", + input=[ + { + "role": "user", + "content": [ + {"type": "input_text", "text": prompt}, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image1}", + }, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image2}", + }, + { + "type": "input_image", + "file_id": file_id1, + }, + { + "type": "input_image", + "file_id": file_id2, + } + ], + } + ], + tools=[{"type": "image_generation"}], +) + +# Process the response +image_generation_calls = [ + output + for output in response.output + if output.type == "image_generation_call" +] + +image_data = [output.result for output in image_generation_calls] + +if image_data: + image_base64 = image_data[0] + image_filename = f"edited_image_{int(time.time())}.png" + with open(image_filename, "wb") as f: + f.write(base64.b64decode(image_base64)) + print(f"Image saved to {image_filename}") +else: + # If no image is generated, there might be a text response with an explanation + text_response = [output.text for output in response.output if hasattr(output, 'text')] + if text_response: + print("No image generated. Model response:") + print("\\n".join(text_response)) + else: + print("No image data found in response.") + print("Full response for debugging:") + print(response) +`:` +import base64 +import os +import time + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Helper function to create a file (simplified for this example) +def create_file(image_path): + # In a real implementation, this would upload the file to OpenAI + # For this example, we'll just return a placeholder ID + return f"file_{os.path.basename(image_path).replace('.', '_')}" + +# The prompt entered by the user +prompt = "${E}" + +# Encode images to base64 +base64_image1 = encode_image("body-lotion.png") +base64_image2 = encode_image("soap.png") + +# Create file IDs +file_id1 = create_file("body-lotion.png") +file_id2 = create_file("incense-kit.png") + +response = client.responses.create( + model="${O}", + input=[ + { + "role": "user", + "content": [ + {"type": "input_text", "text": prompt}, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image1}", + }, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image2}", + }, + { + "type": "input_image", + "file_id": file_id1, + }, + { + "type": "input_image", + "file_id": file_id2, + } + ], + } + ], + tools=[{"type": "image_generation"}], +) + +# Process the response +image_generation_calls = [ + output + for output in response.output + if output.type == "image_generation_call" +] + +image_data = [output.result for output in image_generation_calls] + +if image_data: + image_base64 = image_data[0] + image_filename = f"edited_image_{int(time.time())}.png" + with open(image_filename, "wb") as f: + f.write(base64.b64decode(image_base64)) + print(f"Image saved to {image_filename}") +else: + # If no image is generated, there might be a text response with an explanation + text_response = [output.text for output in response.output if hasattr(output, 'text')] + if text_response: + print("No image generated. Model response:") + print("\\n".join(text_response)) + else: + print("No image data found in response.") + print("Full response for debugging:") + print(response) +`;break;case o.EMBEDDINGS:t=` +response = client.embeddings.create( + input="${n||"Your string here"}", + model="${O}", + encoding_format="base64" # or "float" +) + +print(response.data[0].embedding) +`;break;case o.TRANSCRIPTION:t=` +# Open the audio file +audio_file = open("path/to/your/audio/file.mp3", "rb") + +# Make the transcription request +response = client.audio.transcriptions.create( + model="${O}", + file=audio_file${n?`, + prompt="${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} +) + +print(response.text) +`;break;case o.SPEECH:t=` +# Make the text-to-speech request +response = client.audio.speech.create( + model="${O}", + input="${n||"Your text to convert to speech here"}", + voice="${f}" # Options: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer +) + +# Save the audio to a file +output_filename = "output_speech.mp3" +response.stream_to_file(output_filename) +print(f"Audio saved to {output_filename}") + +# Optional: Customize response format and speed +# response = client.audio.speech.create( +# model="${O}", +# input="${n||"Your text to convert to speech here"}", +# voice="alloy", +# response_format="mp3", # Options: mp3, opus, aac, flac, wav, pcm +# speed=1.0 # Range: 0.25 to 4.0 +# ) +# response.stream_to_file("output_speech.mp3") +`;break;default:t="\n# Code generation for this endpoint is not implemented yet."}return`${w} +${t}`}],190272)},115571,e=>{"use strict";let t="local-storage-change";function i(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))}function a(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}}function o(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}function r(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}}e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",()=>i,"getLocalStorageItem",()=>a,"removeLocalStorageItem",()=>r,"setLocalStorageItem",()=>o])},596239,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:"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 o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["LinkOutlined",0,r],596239)},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},100486,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:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["CrownOutlined",0,r],100486)},44121,186515,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:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["MenuFoldOutlined",0,r],44121);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var l=i.forwardRef(function(e,a){return i.createElement(o.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["MenuUnfoldOutlined",0,l],186515)},295320,283713,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:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["CloudServerOutlined",0,r],295320);var n=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,a=e?.workers??[],[o,r]=(0,i.useState)(()=>localStorage.getItem(s));(0,i.useEffect)(()=>{if(!o||0===a.length)return;let e=a.find(e=>e.worker_id===o);e&&(0,n.switchToWorkerUrl)(e.url)},[o,a]);let d=a.find(e=>e.worker_id===o)??null,c=(0,i.useCallback)(e=>{let t=a.find(t=>t.worker_id===e);t&&(r(e),localStorage.setItem(s,e),(0,n.switchToWorkerUrl)(t.url))},[a]);return{isControlPlane:t,workers:a,selectedWorkerId:o,selectedWorker:d,selectWorker:c,disconnectFromWorker:(0,i.useCallback)(()=>{r(null),localStorage.removeItem(s),(0,n.switchToWorkerUrl)(null)},[])}}],283713)},371401,e=>{"use strict";var t=e.i(115571),i=e.i(271645);function a(e){let i=t=>{"disableUsageIndicator"===t.key&&e()},a=t=>{let{key:i}=t.detail;"disableUsageIndicator"===i&&e()};return window.addEventListener("storage",i),window.addEventListener(t.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",i),window.removeEventListener(t.LOCAL_STORAGE_EVENT,a)}}function o(){return"true"===(0,t.getLocalStorageItem)("disableUsageIndicator")}function r(){return(0,i.useSyncExternalStore)(a,o)}e.s(["useDisableUsageIndicator",()=>r])},275144,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(764205);let o=(0,i.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:r})=>{let[n,l]=(0,i.useState)(null),[s,d]=(0,i.useState)(null);return(0,i.useEffect)(()=>{(async()=>{try{let e=(0,a.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",i=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(i.ok){let e=await i.json();e.values?.logo_url&&l(e.values.logo_url),e.values?.favicon_url&&d(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,i.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)(o.Provider,{value:{logoUrl:n,setLogoUrl:l,faviconUrl:s,setFaviconUrl:d},children:e})},"useTheme",0,()=>{let e=(0,i.useContext)(o);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0fa4668d6cf24773.js b/litellm/proxy/_experimental/out/_next/static/chunks/0fa4668d6cf24773.js new file mode 100644 index 0000000000..5cc59c8a7f --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0fa4668d6cf24773.js @@ -0,0 +1,8 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,916925,e=>{"use strict";var t,r=((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 Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",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.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);let a={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",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"},o="../ui/assets/logos/",l={"A2A Agent":`${o}a2a_agent.png`,Ai21:`${o}ai21.svg`,"Ai21 Chat":`${o}ai21.svg`,"AI/ML API":`${o}aiml_api.svg`,"Aiohttp Openai":`${o}openai_small.svg`,Anthropic:`${o}anthropic.svg`,"Anthropic Text":`${o}anthropic.svg`,AssemblyAI:`${o}assemblyai_small.png`,Azure:`${o}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${o}microsoft_azure.svg`,"Azure Text":`${o}microsoft_azure.svg`,Baseten:`${o}baseten.svg`,"Amazon Bedrock":`${o}bedrock.svg`,"Amazon Bedrock Mantle":`${o}bedrock.svg`,"AWS SageMaker":`${o}bedrock.svg`,Cerebras:`${o}cerebras.svg`,Cloudflare:`${o}cloudflare.svg`,Codestral:`${o}mistral.svg`,Cohere:`${o}cohere.svg`,"Cohere Chat":`${o}cohere.svg`,Cometapi:`${o}cometapi.svg`,Cursor:`${o}cursor.svg`,"Databricks (Qwen API)":`${o}databricks.svg`,Dashscope:`${o}dashscope.svg`,Deepseek:`${o}deepseek.svg`,Deepgram:`${o}deepgram.png`,DeepInfra:`${o}deepinfra.png`,ElevenLabs:`${o}elevenlabs.png`,"Fal AI":`${o}fal_ai.jpg`,"Featherless Ai":`${o}featherless.svg`,"Fireworks AI":`${o}fireworks.svg`,Friendliai:`${o}friendli.svg`,"Github Copilot":`${o}github_copilot.svg`,"Google AI Studio":`${o}google.svg`,GradientAI:`${o}gradientai.svg`,Groq:`${o}groq.svg`,vllm:`${o}vllm.png`,Huggingface:`${o}huggingface.svg`,Hyperbolic:`${o}hyperbolic.svg`,Infinity:`${o}infinity.png`,"Jina AI":`${o}jina.png`,"Lambda Ai":`${o}lambda.svg`,"Lm Studio":`${o}lmstudio.svg`,"Meta Llama":`${o}meta_llama.svg`,MiniMax:`${o}minimax.svg`,"Mistral AI":`${o}mistral.svg`,Moonshot:`${o}moonshot.svg`,Morph:`${o}morph.svg`,Nebius:`${o}nebius.svg`,Novita:`${o}novita.svg`,"Nvidia Nim":`${o}nvidia_nim.svg`,Ollama:`${o}ollama.svg`,"Ollama Chat":`${o}ollama.svg`,Oobabooga:`${o}openai_small.svg`,OpenAI:`${o}openai_small.svg`,"Openai Like":`${o}openai_small.svg`,"OpenAI Text Completion":`${o}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${o}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${o}openai_small.svg`,Openrouter:`${o}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${o}oracle.svg`,Perplexity:`${o}perplexity-ai.svg`,Recraft:`${o}recraft.svg`,Replicate:`${o}replicate.svg`,RunwayML:`${o}runwayml.png`,Sagemaker:`${o}bedrock.svg`,Sambanova:`${o}sambanova.svg`,"SAP Generative AI Hub":`${o}sap.png`,Snowflake:`${o}snowflake.svg`,"Text-Completion-Codestral":`${o}mistral.svg`,TogetherAI:`${o}togetherai.svg`,Topaz:`${o}topaz.svg`,Triton:`${o}nvidia_triton.png`,V0:`${o}v0.svg`,"Vercel Ai Gateway":`${o}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${o}google.svg`,"Vertex Ai Beta":`${o}google.svg`,Vllm:`${o}vllm.png`,VolcEngine:`${o}volcengine.png`,"Voyage AI":`${o}voyage.webp`,Watsonx:`${o}watsonx.svg`,"Watsonx Text":`${o}watsonx.svg`,xAI:`${o}xai.svg`,Xinference:`${o}xinference.svg`};e.s(["Providers",()=>r,"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 return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:l[e],displayName:e}}let t=Object.keys(a).find(t=>a[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let o=r[t];return{logo:l[o],displayName:o}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let r=a[e];console.log(`Provider mapped to: ${r}`);let o=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let a=t.litellm_provider;(a===r||"string"==typeof a&&a.includes(r))&&o.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&o.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&o.push(e)}))),o},"providerLogoMap",0,l,"provider_map",0,a])},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var o=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(o.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),o=e.i(529681);let l=e=>{let{prefixCls:a,className:o,style:l,size:i,shape:n}=e,s=(0,r.default)({[`${a}-lg`]:"large"===i,[`${a}-sm`]:"small"===i}),d=(0,r.default)({[`${a}-circle`]:"circle"===n,[`${a}-square`]:"square"===n,[`${a}-round`]:"round"===n}),c=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(a,s,d,o),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var i=e.i(694758),n=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,n.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),p=e=>Object.assign({width:e},u(e)),f=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),h=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:o,skeletonButtonCls:l,skeletonInputCls:i,skeletonImageCls:n,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:h,padding:v,marginSM:A,borderRadius:C,titleHeight:k,blockRadius:x,paragraphLiHeight:E,controlHeightXS:T,paragraphMarginTop:w}=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:h},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:k,background:h,borderRadius:x,[`+ ${o}`]:{marginBlockStart:u}},[o]:{padding:0,"> li":{width:"100%",height:E,listStyle:"none",background:h,borderRadius:x,"+ li":{marginBlockStart:T}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${o} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:A,[`+ ${o}`]:{marginBlockStart:w}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:i,calc:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:n(a).mul(2).equal(),minWidth:n(a).mul(2).equal()},b(a,n))},f(e,a,r)),{[`${r}-lg`]:Object.assign({},b(o,n))}),f(e,o,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(l,n))}),f(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(o)),[`${t}${t}-sm`]:Object.assign({},m(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:i,calc:n}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},g(t,n)),[`${a}-lg`]:Object.assign({},g(o,n)),[`${a}-sm`]:Object.assign({},g(l,n))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:o,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:o},p(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},p(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${o} > li, + ${r}, + ${l}, + ${i}, + ${n} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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:a,className:o,style:l,rows:i=0}=e,n=Array.from({length:i}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,o),style:l},n)},A=({prefixCls:e,className:a,width:o,style:l})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:o},l)});function C(e){return e&&"object"==typeof e?e:{}}let k=e=>{let{prefixCls:o,loading:i,className:n,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:p,round:f}=e,{getPrefixCls:b,direction:k,className:x,style:E}=(0,a.useComponentConfig)("skeleton"),T=b("skeleton",o),[w,O,I]=h(T);if(i||!("loading"in e)){let e,a,o=!!u,i=!!m,c=!!g;if(o){let r=Object.assign(Object.assign({prefixCls:`${T}-avatar`},i&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),C(u));e=t.createElement("div",{className:`${T}-header`},t.createElement(l,Object.assign({},r)))}if(i||c){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${T}-title`},!o&&c?{width:"38%"}:o&&c?{width:"50%"}:{}),C(m));e=t.createElement(A,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${T}-paragraph`},(e={},o&&i||(e.width="61%"),!o&&i?e.rows=3:e.rows=2,e)),C(g));r=t.createElement(v,Object.assign({},a))}a=t.createElement("div",{className:`${T}-content`},e,r)}let b=(0,r.default)(T,{[`${T}-with-avatar`]:o,[`${T}-active`]:p,[`${T}-rtl`]:"rtl"===k,[`${T}-round`]:f},x,n,s,O,I);return w(t.createElement("div",{className:b,style:Object.assign(Object.assign({},E),d)},e,a))}return null!=c?c:null};k.Button=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[p,f,b]=h(g),v=(0,o.default)(e,["prefixCls"]),A=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,s,f,b);return p(t.createElement("div",{className:A},t.createElement(l,Object.assign({prefixCls:`${g}-button`,size:u},v))))},k.Avatar=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[p,f,b]=h(g),v=(0,o.default)(e,["prefixCls","className"]),A=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},n,s,f,b);return p(t.createElement("div",{className:A},t.createElement(l,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},v))))},k.Input=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[p,f,b]=h(g),v=(0,o.default)(e,["prefixCls"]),A=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,s,f,b);return p(t.createElement("div",{className:A},t.createElement(l,Object.assign({prefixCls:`${g}-input`,size:u},v))))},k.Image=e=>{let{prefixCls:o,className:l,rootClassName:i,style:n,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",o),[u,m,g]=h(c),p=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},l,i,m,g);return u(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${c}-image`,l),style:n},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`})))))},k.Node=e=>{let{prefixCls:o,className:l,rootClassName:i,style:n,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",o),[m,g,p]=h(u),f=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,l,i,p);return m(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${u}-image`,l),style:n},d)))},e.s(["default",0,k],185793)},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"],l=e=>({_s:e,status:o[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,n=(e,t,r,a,o)=>{clearTimeout(a.current);let i=l(e);t(i),r.current=i,o&&o({current:i})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let u=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 g={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,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},f=(0,c.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:l,transitionStatus:i})=>{let n=l?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(u,{className:(0,d.tremorTwMerge)(f("icon"),"animate-spin shrink-0",n,m.default,m[i]),style:{transition:"width 150ms"}}):a.default.createElement(o,{className:(0,d.tremorTwMerge)(f("icon"),"shrink-0",t,n)})},h=a.default.forwardRef((e,o)=>{let{icon:u,iconPosition:m=s.HorizontalPositions.Left,size:h=s.Sizes.SM,color:v,variant:A="primary",disabled:C,loading:k=!1,loadingText:x,children:E,tooltip:T,className:w}=e,O=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),I=k||C,$=void 0!==u||k,N=k&&x,_=!(!E&&!N),y=(0,d.tremorTwMerge)(g[h].height,g[h].width),M="light"!==A?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",R=p(A,v),L=("light"!==A?{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:S,getReferenceProps:P}=(0,r.useTooltip)(300),[j,z]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[g,p]=(0,a.useState)(()=>l(d?2:i(c))),f=(0,a.useRef)(g),b=(0,a.useRef)(0),[h,v]="object"==typeof s?[s.enter,s.exit]:[s,s],A=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(f.current._s,u);e&&n(e,p,f,b,m)},[m,u]);return[g,(0,a.useCallback)(a=>{let l=e=>{switch(n(e,p,f,b,m),e){case 1:h>=0&&(b.current=((...e)=>setTimeout(...e))(A,h));break;case 4:v>=0&&(b.current=((...e)=>setTimeout(...e))(A,v));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},s=f.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||l(e?+!r:2):s&&l(t?o?3:4:i(u))},[A,m,e,t,r,o,h,v,u]),A]})({timeout:50});return(0,a.useEffect)(()=>{z(k)},[k]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([o,S.refs.setReference]),className:(0,d.tremorTwMerge)(f("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",M,L.paddingX,L.paddingY,L.fontSize,R.textColor,R.bgColor,R.borderColor,R.hoverBorderColor,I?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(p(A,v).hoverTextColor,p(A,v).hoverBgColor,p(A,v).hoverBorderColor),w),disabled:I},P,O),a.default.createElement(r.default,Object.assign({text:T},S)),$&&m!==s.HorizontalPositions.Right?a.default.createElement(b,{loading:k,iconSize:y,iconPosition:m,Icon:u,transitionStatus:j.status,needMargin:_}):null,N||E?a.default.createElement("span",{className:(0,d.tremorTwMerge)(f("text"),"text-tremor-default whitespace-nowrap")},N?x:E):null,$&&m===s.HorizontalPositions.Right?a.default.createElement(b,{loading:k,iconSize:y,iconPosition:m,Icon:u,transitionStatus:j.status,needMargin:_}):null)});h.displayName="Button",e.s(["Button",()=>h],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("Table"),l=r.default.forwardRef((e,l)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(o("root"),"overflow-auto",n)},r.default.createElement("table",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});l.displayName="Table",e.s(["Table",()=>l],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHead"),l=r.default.forwardRef((e,l)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",n)},s),i))});l.displayName="TableHead",e.s(["TableHead",()=>l],427612)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableRow"),l=r.default.forwardRef((e,l)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("row"),n)},s),i))});l.displayName="TableRow",e.s(["TableRow",()=>l],496020)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHeaderCell"),l=r.default.forwardRef((e,l)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",n)},s),i))});l.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>l],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableBody"),l=r.default.forwardRef((e,l)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",n)},s),i))});l.displayName="TableBody",e.s(["TableBody",()=>l],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableCell"),l=r.default.forwardRef((e,l)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-middle whitespace-nowrap text-left p-4",n)},s),i))});l.displayName="TableCell",e.s(["TableCell",()=>l],977572)},68155,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 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,r],68155)},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)},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)},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)},207670,e=>{"use strict";function t(){for(var e,t,r=0,a="",o=arguments.length;rt,"default",0,t])},738014,e=>{"use strict";var t=e.i(135214),r=e.i(764205),a=e.i(266027);let o=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:l}=(0,t.default)();return(0,a.useQuery)({queryKey:o.detail(l),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&l)})}])},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,t)=>(e[t.team_id]=t.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,t)=>{let r=t.find(t=>t.team_id===e);return r?r.team_alias:null}])},571303,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);function o({className:e="",...o}){var l,i;let n=(0,r.useId)();return l=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===n),r=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==n);t&&r&&(t.currentTime=r.currentTime)},i=[n],(0,r.useLayoutEffect)(l,i),(0,t.jsxs)("svg",{"data-spinner-id":n,className:(0,a.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...o,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>o],571303)},366283,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(95779),o=e.i(444755),l=e.i(673706);let i=(0,l.makeClassName)("Callout"),n=r.default.forwardRef((e,n)=>{let{title:s,icon:d,color:c,className:u,children:m}=e,g=(0,t.__rest)(e,["title","icon","color","className","children"]);return r.default.createElement("div",Object.assign({ref:n,className:(0,o.tremorTwMerge)(i("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",c?(0,o.tremorTwMerge)((0,l.getColorClassNames)(c,a.colorPalette.background).bgColor,(0,l.getColorClassNames)(c,a.colorPalette.darkBorder).borderColor,(0,l.getColorClassNames)(c,a.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,o.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},g),r.default.createElement("div",{className:(0,o.tremorTwMerge)(i("header"),"flex items-start")},d?r.default.createElement(d,{className:(0,o.tremorTwMerge)(i("icon"),"flex-none h-5 w-5 mr-1.5")}):null,r.default.createElement("h4",{className:(0,o.tremorTwMerge)(i("title"),"font-semibold")},s)),r.default.createElement("p",{className:(0,o.tremorTwMerge)(i("body"),"overflow-y-auto",m?"mt-2":"")},m))});n.displayName="Callout",e.s(["Callout",()=>n],366283)},37091,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),o=e.i(673706),l=e.i(271645);let i=l.default.forwardRef((e,i)=>{let{color:n,children:s,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return l.default.createElement("p",Object.assign({ref:i,className:(0,a.tremorTwMerge)(n?(0,o.getColorClassNames)(n,r.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",d)},c),s)});i.displayName="Subtitle",e.s(["Subtitle",()=>i],37091)},160818,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:"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 o=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(o.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["GlobalOutlined",0,l],160818)},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),a=e.i(371330),o=e.i(271645),l=e.i(394487),i=e.i(503269),n=e.i(214520),s=e.i(746725),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(601893),g=e.i(140721),p=e.i(942803),f=e.i(233538),b=e.i(694421),h=e.i(700020),v=e.i(35889),A=e.i(998348),C=e.i(722678);let k=(0,o.createContext)(null);k.displayName="GroupContext";let x=o.Fragment,E=Object.assign((0,h.forwardRefWithAs)(function(e,t){var x;let E=(0,o.useId)(),T=(0,p.useProvidedId)(),w=(0,m.useDisabled)(),{id:O=T||`headlessui-switch-${E}`,disabled:I=w||!1,checked:$,defaultChecked:N,onChange:_,name:y,value:M,form:R,autoFocus:L=!1,...S}=e,P=(0,o.useContext)(k),[j,z]=(0,o.useState)(null),B=(0,o.useRef)(null),D=(0,u.useSyncRefs)(B,t,null===P?null:P.setSwitch,z),H=(0,n.useDefaultValue)(N),[F,V]=(0,i.useControllable)($,_,null!=H&&H),G=(0,s.useDisposables)(),[q,W]=(0,o.useState)(!1),X=(0,d.useEvent)(()=>{W(!0),null==V||V(!F),G.nextFrame(()=>{W(!1)})}),U=(0,d.useEvent)(e=>{if((0,f.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),X()}),K=(0,d.useEvent)(e=>{e.key===A.Keys.Space?(e.preventDefault(),X()):e.key===A.Keys.Enter&&(0,b.attemptSubmit)(e.currentTarget)}),Y=(0,d.useEvent)(e=>e.preventDefault()),Z=(0,C.useLabelledBy)(),J=(0,v.useDescribedBy)(),{isFocusVisible:Q,focusProps:ee}=(0,r.useFocusRing)({autoFocus:L}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:I}),{pressed:ea,pressProps:eo}=(0,l.useActivePress)({disabled:I}),el=(0,o.useMemo)(()=>({checked:F,disabled:I,hover:et,focus:Q,active:ea,autofocus:L,changing:q}),[F,et,Q,ea,I,q,L]),ei=(0,h.mergeProps)({id:O,ref:D,role:"switch",type:(0,c.useResolveButtonType)(e,j),tabIndex:-1===e.tabIndex?0:null!=(x=e.tabIndex)?x:0,"aria-checked":F,"aria-labelledby":Z,"aria-describedby":J,disabled:I||void 0,autoFocus:L,onClick:U,onKeyUp:K,onKeyPress:Y},ee,er,eo),en=(0,o.useCallback)(()=>{if(void 0!==H)return null==V?void 0:V(H)},[V,H]),es=(0,h.useRender)();return o.default.createElement(o.default.Fragment,null,null!=y&&o.default.createElement(g.FormFields,{disabled:I,data:{[y]:M||"on"},overrides:{type:"checkbox",checked:F},form:R,onReset:en}),es({ourProps:ei,theirProps:S,slot:el,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,o.useState)(null),[l,i]=(0,C.useLabels)(),[n,s]=(0,v.useDescriptions)(),d=(0,o.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),c=(0,h.useRender)();return o.default.createElement(s,{name:"Switch.Description",value:n},o.default.createElement(i,{name:"Switch.Label",value:l,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(k.Provider,{value:d},c({ourProps:{},theirProps:e,slot:{},defaultTag:x,name:"Switch.Group"}))))},Label:C.Label,Description:v.Description});var T=e.i(888288),w=e.i(95779),O=e.i(444755),I=e.i(673706),$=e.i(829087);let N=(0,I.makeClassName)("Switch"),_=o.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:l=!1,onChange:i,color:n,name:s,error:d,errorMessage:c,disabled:u,required:m,tooltip:g,id:p}=e,f=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),b={bgColor:n?(0,I.getColorClassNames)(n,w.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:n?(0,I.getColorClassNames)(n,w.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[h,v]=(0,T.default)(l,a),[A,C]=(0,o.useState)(!1),{tooltipProps:k,getReferenceProps:x}=(0,$.useTooltip)(300);return o.default.createElement("div",{className:"flex flex-row items-center justify-start"},o.default.createElement($.default,Object.assign({text:g},k)),o.default.createElement("div",Object.assign({ref:(0,I.mergeRefs)([r,k.refs.setReference]),className:(0,O.tremorTwMerge)(N("root"),"flex flex-row relative h-5")},f,x),o.default.createElement("input",{type:"checkbox",className:(0,O.tremorTwMerge)(N("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:s,required:m,checked:h,onChange:e=>{e.preventDefault()}}),o.default.createElement(E,{checked:h,onChange:e=>{v(e),null==i||i(e)},disabled:u,className:(0,O.tremorTwMerge)(N("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:()=>C(!0),onBlur:()=>C(!1),id:p},o.default.createElement("span",{className:(0,O.tremorTwMerge)(N("sr-only"),"sr-only")},"Switch ",h?"on":"off"),o.default.createElement("span",{"aria-hidden":"true",className:(0,O.tremorTwMerge)(N("background"),h?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,O.tremorTwMerge)(N("round"),h?(0,O.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",A?(0,O.tremorTwMerge)("ring-2",b.ringColor):"")}))),d&&c?o.default.createElement("p",{className:(0,O.tremorTwMerge)(N("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});_.displayName="Switch",e.s(["Switch",()=>_],793130)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:o="w-4 h-4"})=>{let[l,i]=(0,r.useState)(!1),{logo:n}=(0,a.getProviderLogoAndName)(e);return l||!n?(0,t.jsx)("div",{className:`${o} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:n,alt:`${e} logo`,className:o,onError:()=>i(!0)})}])},986888,e=>{"use strict";var t=e.i(843476),r=e.i(797305),a=e.i(135214),o=e.i(214541);e.s(["default",0,()=>{let{accessToken:e,userRole:l,userId:i,premiumUser:n}=(0,a.default)(),{teams:s}=(0,o.default)();return(0,t.jsx)(r.default,{teams:s??[],organizations:[]})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1189e4151a93f058.js b/litellm/proxy/_experimental/out/_next/static/chunks/1189e4151a93f058.js new file mode 100644 index 0000000000..cb3dd0b7f4 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1189e4151a93f058.js @@ -0,0 +1,10 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,869216,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),n=e.i(908206),a=e.i(242064),i=e.i(517455),r=e.i(150073);let o={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 l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(l[n[a]]=e[n[a]]);return l},u=function(e,t){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(l[n[a]]=e[n[a]]);return l};let g=e=>{let{itemPrefixCls:n,component:a,span:i,className:r,style:o,labelStyle:d,contentStyle:c,bordered:u,label:g,content:b,colon:m,type:p,styles:f}=e,{classNames:h}=t.useContext(s),y=Object.assign(Object.assign({},d),null==f?void 0:f.label),$=Object.assign(Object.assign({},c),null==f?void 0:f.content);if(u)return t.createElement(a,{colSpan:i,style:o,className:(0,l.default)(r,{[`${n}-item-${p}`]:"label"===p||"content"===p,[null==h?void 0:h.label]:(null==h?void 0:h.label)&&"label"===p,[null==h?void 0:h.content]:(null==h?void 0:h.content)&&"content"===p})},null!=g&&t.createElement("span",{style:y},g),null!=b&&t.createElement("span",{style:$},b));return t.createElement(a,{colSpan:i,style:o,className:(0,l.default)(`${n}-item`,r)},t.createElement("div",{className:`${n}-item-container`},null!=g&&t.createElement("span",{style:y,className:(0,l.default)(`${n}-item-label`,null==h?void 0:h.label,{[`${n}-item-no-colon`]:!m})},g),null!=b&&t.createElement("span",{style:$,className:(0,l.default)(`${n}-item-content`,null==h?void 0:h.content)},b)))};function b(e,{colon:l,prefixCls:n,bordered:a},{component:i,type:r,showLabel:o,showContent:s,labelStyle:d,contentStyle:c,styles:u}){return e.map(({label:e,children:b,prefixCls:m=n,className:p,style:f,labelStyle:h,contentStyle:y,span:$=1,key:x,styles:v},j)=>"string"==typeof i?t.createElement(g,{key:`${r}-${x||j}`,className:p,style:f,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),h),null==v?void 0:v.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),y),null==v?void 0:v.content)},span:$,colon:l,component:i,itemPrefixCls:m,bordered:a,label:o?e:null,content:s?b:null,type:r}):[t.createElement(g,{key:`label-${x||j}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),f),h),null==v?void 0:v.label),span:1,colon:l,component:i[0],itemPrefixCls:m,bordered:a,label:e,type:"label"}),t.createElement(g,{key:`content-${x||j}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),f),y),null==v?void 0:v.content),span:2*$-1,component:i[1],itemPrefixCls:m,bordered:a,content:b,type:"content"})])}let m=e=>{let l=t.useContext(s),{prefixCls:n,vertical:a,row:i,index:r,bordered:o}=e;return a?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${r}`,className:`${n}-row`},b(i,e,Object.assign({component:"th",type:"label",showLabel:!0},l))),t.createElement("tr",{key:`content-${r}`,className:`${n}-row`},b(i,e,Object.assign({component:"td",type:"content",showContent:!0},l)))):t.createElement("tr",{key:r,className:`${n}-row`},b(i,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},l)))};e.i(296059);var p=e.i(915654),f=e.i(183293),h=e.i(246422),y=e.i(838378);let $=(0,h.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:l,itemPaddingBottom:n,itemPaddingEnd:a,colonMarginRight:i,colonMarginLeft:r,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,f.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:l}=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:l,"&::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({},f.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:l,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:n,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,p.unit)(r)} ${(0,p.unit)(i)}`},[`&${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 l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(l[n[a]]=e[n[a]]);return l};let v=e=>{let g,{prefixCls:b,title:p,extra:f,column:h,colon:y=!0,bordered:v,layout:j,children:O,className:S,rootClassName:w,style:C,size:E,labelStyle:N,contentStyle:T,styles:B,items:z,classNames:k}=e,R=x(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:P,direction:M,className:L,style:I,classNames:H,styles:G}=(0,a.useComponentConfig)("descriptions"),W=P("descriptions",b),D=(0,r.default)(),A=t.useMemo(()=>{var e;return"number"==typeof h?h:null!=(e=(0,n.matchScreen)(D,Object.assign(Object.assign({},o),h)))?e:3},[D,h]),F=(g=t.useMemo(()=>z||(0,d.default)(O).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[z,O]),t.useMemo(()=>g.map(e=>{var{span:t}=e,l=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},l),{filled:!0}):Object.assign(Object.assign({},l),{span:"number"==typeof t?t:(0,n.matchScreen)(D,t)})}),[g,D])),X=(0,i.default)(E),q=((e,l)=>{let[n,a]=(0,t.useMemo)(()=>{let t,n,a,i;return t=[],n=[],a=!1,i=0,l.filter(e=>e).forEach(l=>{let{filled:r}=l,o=u(l,["filled"]);if(r){n.push(o),t.push(n),n=[],i=0;return}let s=e-i;(i+=l.span||1)>=e?(i>e?(a=!0,n.push(Object.assign(Object.assign({},o),{span:s}))):n.push(o),t.push(n),n=[],i=0):n.push(o)}),n.length>0&&t.push(n),[t=t.map(t=>{let l=t.reduce((e,t)=>e+(t.span||1),0);if(l({labelStyle:N,contentStyle:T,styles:{content:Object.assign(Object.assign({},G.content),null==B?void 0:B.content),label:Object.assign(Object.assign({},G.label),null==B?void 0:B.label)},classNames:{label:(0,l.default)(H.label,null==k?void 0:k.label),content:(0,l.default)(H.content,null==k?void 0:k.content)}}),[N,T,B,k,H,G]);return K(t.createElement(s.Provider,{value:Q},t.createElement("div",Object.assign({className:(0,l.default)(W,L,H.root,null==k?void 0:k.root,{[`${W}-${X}`]:X&&"default"!==X,[`${W}-bordered`]:!!v,[`${W}-rtl`]:"rtl"===M},S,w,_,V),style:Object.assign(Object.assign(Object.assign(Object.assign({},I),G.root),null==B?void 0:B.root),C)},R),(p||f)&&t.createElement("div",{className:(0,l.default)(`${W}-header`,H.header,null==k?void 0:k.header),style:Object.assign(Object.assign({},G.header),null==B?void 0:B.header)},p&&t.createElement("div",{className:(0,l.default)(`${W}-title`,H.title,null==k?void 0:k.title),style:Object.assign(Object.assign({},G.title),null==B?void 0:B.title)},p),f&&t.createElement("div",{className:(0,l.default)(`${W}-extra`,H.extra,null==k?void 0:k.extra),style:Object.assign(Object.assign({},G.extra),null==B?void 0:B.extra)},f)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,q.map((e,l)=>t.createElement(m,{key:l,index:l,colon:y,prefixCls:W,vertical:"vertical"===j,bordered:v,row:e}))))))))};v.Item=({children:e})=>e,e.s(["Descriptions",0,v],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let n={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),i=l.forwardRef(function(e,i){return l.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["ExclamationCircleOutlined",0,i],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),n=e.i(529681),a=e.i(242064),i=e.i(517455),r=e.i(185793),o=e.i(721369),s=function(e,t){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(l[n[a]]=e[n[a]]);return l};let d=e=>{var{prefixCls:n,className:i,hoverable:r=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("card",n),u=(0,l.default)(`${c}-grid`,i,{[`${c}-grid-hoverable`]:r});return t.createElement("div",Object.assign({},o,{className:u}))};e.i(296059);var c=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:l,cardHeadPadding:n,colorBorderSecondary:a,boxShadowTertiary:i,bodyPadding:r,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:i},[`${t}-head`]:(e=>{let{antCls:t,componentCls:l,headerHeight:n,headerPadding:a,tabsMarginBottom:i}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,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),{[` + > ${l}-typography, + > ${l}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:i,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:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:r,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:l,cardShadow:n,lineWidth:a}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${(0,c.unit)(a)} 0 0 0 ${l}, + 0 ${(0,c.unit)(a)} 0 0 ${l}, + ${(0,c.unit)(a)} ${(0,c.unit)(a)} 0 0 ${l}, + ${(0,c.unit)(a)} 0 0 0 ${l} inset, + 0 ${(0,c.unit)(a)} 0 0 ${l} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:n}}})(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:l,actionsLiMargin:n,cardActionsIconSize:a,colorBorderSecondary:i,actionsBg:r}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:r,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${i}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.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), > ${l}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${l}`]:{fontSize:a,lineHeight:(0,c.unit)(e.calc(a).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${i}`}}})})(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:l}},[`${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:n}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:l,headerPadding:n,bodyPadding:a}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(n)}`,background:l,"&-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:l,headerPaddingSM:n,headerHeightSM:a,headerFontSizeSM:i}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:a,padding:`0 ${(0,c.unit)(n)}`,fontSize:i,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:l}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,l;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!=(l=e.headerPadding)?l:e.paddingLG}});var p=e.i(792812),f=function(e,t){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(l[n[a]]=e[n[a]]);return l};let h=e=>{let{actionClasses:l,actions:n=[],actionStyle:a}=e;return t.createElement("ul",{className:l,style:a},n.map((e,l)=>{let a=`action-${l}`;return t.createElement("li",{style:{width:`${100/n.length}%`},key:a},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let c,{prefixCls:u,className:g,rootClassName:b,style:y,extra:$,headStyle:x={},bodyStyle:v={},title:j,loading:O,bordered:S,variant:w,size:C,type:E,cover:N,actions:T,tabList:B,children:z,activeTabKey:k,defaultActiveTabKey:R,tabBarExtraContent:P,hoverable:M,tabProps:L={},classNames:I,styles:H}=e,G=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:W,direction:D,card:A}=t.useContext(a.ConfigContext),[F]=(0,p.default)("card",w,S),X=e=>{var t;return(0,l.default)(null==(t=null==A?void 0:A.classNames)?void 0:t[e],null==I?void 0:I[e])},q=e=>{var t;return Object.assign(Object.assign({},null==(t=null==A?void 0:A.styles)?void 0:t[e]),null==H?void 0:H[e])},K=t.useMemo(()=>{let e=!1;return t.Children.forEach(z,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[z]),_=W("card",u),[V,Q,U]=m(_),J=t.createElement(r.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},z),Y=void 0!==k,Z=Object.assign(Object.assign({},L),{[Y?"activeKey":"defaultActiveKey"]:Y?k:R,tabBarExtraContent:P}),ee=(0,i.default)(C),et=ee&&"default"!==ee?ee:"large",el=B?t.createElement(o.default,Object.assign({size:et},Z,{className:`${_}-head-tabs`,onChange:t=>{var l;null==(l=e.onTabChange)||l.call(e,t)},items:B.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(j||$||el){let e=(0,l.default)(`${_}-head`,X("header")),n=(0,l.default)(`${_}-head-title`,X("title")),a=(0,l.default)(`${_}-extra`,X("extra")),i=Object.assign(Object.assign({},x),q("header"));c=t.createElement("div",{className:e,style:i},t.createElement("div",{className:`${_}-head-wrapper`},j&&t.createElement("div",{className:n,style:q("title")},j),$&&t.createElement("div",{className:a,style:q("extra")},$)),el)}let en=(0,l.default)(`${_}-cover`,X("cover")),ea=N?t.createElement("div",{className:en,style:q("cover")},N):null,ei=(0,l.default)(`${_}-body`,X("body")),er=Object.assign(Object.assign({},v),q("body")),eo=t.createElement("div",{className:ei,style:er},O?J:z),es=(0,l.default)(`${_}-actions`,X("actions")),ed=(null==T?void 0:T.length)?t.createElement(h,{actionClasses:es,actionStyle:q("actions"),actions:T}):null,ec=(0,n.default)(G,["onTabChange"]),eu=(0,l.default)(_,null==A?void 0:A.className,{[`${_}-loading`]:O,[`${_}-bordered`]:"borderless"!==F,[`${_}-hoverable`]:M,[`${_}-contain-grid`]:K,[`${_}-contain-tabs`]:null==B?void 0:B.length,[`${_}-${ee}`]:ee,[`${_}-type-${E}`]:!!E,[`${_}-rtl`]:"rtl"===D},g,b,Q,U),eg=Object.assign(Object.assign({},null==A?void 0:A.style),y);return V(t.createElement("div",Object.assign({ref:s},ec,{className:eu,style:eg}),c,ea,eo,ed))});var $=function(e,t){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(l[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(l[n[a]]=e[n[a]]);return l};y.Grid=d,y.Meta=e=>{let{prefixCls:n,className:i,avatar:r,title:o,description:s}=e,d=$(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("card",n),g=(0,l.default)(`${u}-meta`,i),b=r?t.createElement("div",{className:`${u}-meta-avatar`},r):null,m=o?t.createElement("div",{className:`${u}-meta-title`},o):null,p=s?t.createElement("div",{className:`${u}-meta-description`},s):null,f=m||p?t.createElement("div",{className:`${u}-meta-detail`},m,p):null;return t.createElement("div",Object.assign({},d,{className:g}),b,f)},e.s(["Card",0,y],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),l=e.i(560445),n=e.i(175712),a=e.i(869216),i=e.i(311451),r=e.i(212931),o=e.i(898586);e.i(296059);var s=e.i(868297),d=e.i(732961),c=e.i(289882),u=e.i(170517),g=e.i(628882),b=e.i(320890),m=e.i(104458),p=e.i(722319),f=e.i(8398),h=e.i(279728);e.i(765846);var y=e.i(602716),$=e.i(328052);e.i(262370);var x=e.i(135551);let v=(e,t)=>new x.FastColor(e).setA(t).toRgbString(),j=(e,t)=>new x.FastColor(e).lighten(t).toHexString(),O=e=>{let t=(0,y.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]}},S=(e,t)=>{let l=e||"#000",n=t||"#fff";return{colorBgBase:l,colorTextBase:n,colorText:v(n,.85),colorTextSecondary:v(n,.65),colorTextTertiary:v(n,.45),colorTextQuaternary:v(n,.25),colorFill:v(n,.18),colorFillSecondary:v(n,.12),colorFillTertiary:v(n,.08),colorFillQuaternary:v(n,.04),colorBgSolid:v(n,.95),colorBgSolidHover:v(n,1),colorBgSolidActive:v(n,.9),colorBgElevated:j(l,12),colorBgContainer:j(l,8),colorBgLayout:j(l,0),colorBgSpotlight:j(l,26),colorBgBlur:v(n,.04),colorBorder:j(l,26),colorBorderSecondary:j(l,19)}},w={defaultSeed:b.defaultConfig.token,useToken:function(){let[e,t,l]=(0,m.useToken)();return{theme:e,token:t,hashId:l}},defaultAlgorithm:p.default,darkAlgorithm:(e,t)=>{let l=Object.keys(u.defaultPresetColors).map(t=>{let l=(0,y.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,n,a)=>(e[`${t}-${a+1}`]=l[a],e[`${t}${a+1}`]=l[a],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),n=null!=t?t:(0,p.default)(e),a=(0,$.default)(e,{generateColorPalettes:O,generateNeutralColorPalettes:S});return Object.assign(Object.assign(Object.assign(Object.assign({},n),l),a),{colorPrimaryBg:a.colorPrimaryBorder,colorPrimaryBgHover:a.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let l=null!=t?t:(0,p.default)(e),n=l.fontSizeSM,a=l.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},l),function(e){let{sizeUnit:t,sizeStep:l}=e,n=l-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}(null!=t?t:e)),(0,h.default)(n)),{controlHeight:a}),(0,f.default)(Object.assign(Object.assign({},l),{controlHeight:a})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):c.default,l=Object.assign(Object.assign({},u.default),null==e?void 0:e.token);return(0,d.getComputedToken)(l,{override:null==e?void 0:e.token},t,g.default)},defaultConfig:b.defaultConfig,_internalContext:b.DesignTokenContext};e.s(["theme",0,w],368869);var C=e.i(270377),E=e.i(271645);function N({isOpen:e,title:s,alertMessage:d,message:c,resourceInformationTitle:u,resourceInformation:g,onCancel:b,onOk:m,confirmLoading:p,requiredConfirmation:f}){let{Title:h,Text:y}=o.Typography,{token:$}=w.useToken(),[x,v]=(0,E.useState)("");return(0,E.useEffect)(()=>{e&&v("")},[e]),(0,t.jsx)(r.Modal,{title:s,open:e,onOk:m,onCancel:b,confirmLoading:p,okText:p?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!f&&x!==f||p},cancelButtonProps:{disabled:p},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(l.Alert,{message:d,type:"warning"}),(0,t.jsx)(n.Card,{title:u,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder}},style:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder},children:(0,t.jsx)(a.Descriptions,{column:1,size:"small",children:g&&g.map(({label:e,value:l,...n})=>(0,t.jsx)(a.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(y,{...n,children:l??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(y,{children:c})}),f&&(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:f}),(0,t.jsx)(y,{children:" to confirm deletion:"})]}),(0,t.jsx)(i.Input,{value:x,onChange:e=>v(e.target.value),placeholder:f,className:"rounded-md",prefix:(0,t.jsx)(C.ExclamationCircleOutlined,{style:{color:$.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>N],127952)},530212,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 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,l],530212)},888288,e=>{"use strict";var t=e.i(271645);let l=(e,l)=>{let n=void 0!==l,[a,i]=(0,t.useState)(e);return[n?l:a,e=>{n||i(e)}]};e.s(["default",()=>l])},149121,e=>{"use strict";var t=e.i(843476),l=e.i(271645),n=e.i(152990),a=e.i(682830),i=e.i(269200),r=e.i(427612),o=e.i(64848),s=e.i(942232),d=e.i(496020),c=e.i(977572);function u({data:e=[],columns:u,onRowClick:g,renderSubComponent:b,renderChildRows:m,getRowCanExpand:p,isLoading:f=!1,loadingMessage:h="🚅 Loading logs...",noDataMessage:y="No logs found",enableSorting:$=!1}){let x=!!(b||m)&&!!p,[v,j]=(0,l.useState)([]),O=(0,n.useReactTable)({data:e,columns:u,...$&&{state:{sorting:v},onSortingChange:j,enableSortingRemoval:!1},...x&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,a.getCoreRowModel)(),...$&&{getSortedRowModel:(0,a.getSortedRowModel)()},...x&&{getExpandedRowModel:(0,a.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(i.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(r.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(d.TableRow,{children:e.headers.map(e=>{let l=$&&e.column.getCanSort(),a=e.column.getIsSorted();return(0,t.jsx)(o.TableHeaderCell,{className:`py-1 h-8 ${l?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:l?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.flexRender)(e.column.columnDef.header,e.getContext()),l&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===a?"↑":"desc"===a?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(s.TableBody,{children:f?(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:h})})})}):O.getRowModel().rows.length>0?O.getRowModel().rows.map(e=>(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(d.TableRow,{className:`h-8 ${g?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>g?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,n.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),x&&e.getIsExpanded()&&m&&m({row:e}),x&&e.getIsExpanded()&&b&&!m&&(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:b({row:e})})})})]},e.id)):(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:y})})})})})]})})}e.s(["DataTable",()=>u])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/18a5548f64cd2f73.js b/litellm/proxy/_experimental/out/_next/static/chunks/18a5548f64cd2f73.js new file mode 100644 index 0000000000..55f2b835e6 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/18a5548f64cd2f73.js @@ -0,0 +1,84 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:P}=n.Select,T=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(P,{value:"BLOCK",children:"Block"}),(0,l.jsx)(P,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,P]=m.default.useState(""),[T,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void P(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}P(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),P("")}).finally(()=>{L(!1)})}else P(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),P(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),T?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:H,Text:q}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(q,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(q,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:P,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,H]=(0,m.useState)(!1),[q,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[X,Z]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>H(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(T,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:P,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:q,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!q)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===q);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:q,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:X,patternRegex:ee,patternAction:ea,onNameChange:Z,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{X&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:X,pattern:ee,action:ea}),H(!1),Z(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{H(!1),Z(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var X=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let Z={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),Z=t,t},et=()=>Object.keys(Z).length>0?Z:X,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge",Xecguard:"xecguard"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,XecGuard:`${en}xecguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",()=>em,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",()=>ec],180766);var eu=e.i(435451);let{Title:ep}=d.Typography,eg=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eu.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ex=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ep,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eg,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var eh=e.i(482725),ef=e.i(850627);let ey=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(eh.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ef.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var ej=e.i(592968),e_=e.i(750113);let eb=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(ej.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(ej.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(ej.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(ej.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(ej.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var ev=e.i(536916),ew=e.i(149192),eN=e.i(741585),eN=eN,eC=e.i(724154);e.i(247167);var eS=e.i(931067);let ek={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eI=e.i(9583),eA=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:ek}))});let{Text:eO}=d.Typography,{Option:eP}=n.Select,eT=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eA,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eO,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eP,{value:e.category,children:e.category},e.category))})]}),eL=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eO,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(ej.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(ew.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eN.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(eC.StopOutlined,{}),children:"Select All & Block"})]})]}),eB=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eO,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eO,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(ev.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eO,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eP,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eN.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(eC.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eF,Text:e$}=d.Typography,eE=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eF,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(e$,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eT,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eL,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(eB,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eM=e.i(304967),eR=e.i(599724),eG=e.i(312361),ez=e.i(21548),eD=e.i(827252);let eK={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eH=({value:e,onChange:t,disabled:a=!1})=>{let r={...eK,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(eR.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eG.Divider,{}),0===r.rules.length?(0,l.jsx)(ez.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eM.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(eR.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eG.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(eR.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(ej.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eq,Text:eJ,Link:eU}=d.Typography,{Option:eW}=n.Select,eV={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,P]=(0,m.useState)([]),[T,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[H,q]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,X]=(0,m.useState)(void 0),[Z,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,ep]=(0,m.useState)(!1),[eg,eh]=(0,m.useState)([]),[ef,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),e_=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),q(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},ew=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eN=(e,t)=>{C(a=>({...a,[e]:t}))},eC=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},eS=()=>{x.resetFields(),j(null),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),X(void 0),en("warn"),ec(""),ep(!1),k(0)},ek=()=>{eS(),t()},eI=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);if(void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=H&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),H&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ef.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ef.rules,r.litellm_params.default_action=ef.default_action,r.litellm_params.on_disallowed_action=ef.on_disallowed_action,ef.violation_message_template&&(r.litellm_params.violation_message_template=ef.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),Z&&"realtime"===W&&(r.litellm_params.on_violation=Z),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),eS(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eA=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:H,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{q(e),U(t)}}):null},eO=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:ek,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:ek,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit"},children:eO.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eW,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eW,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eW,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.pre_call})]})}),(0,l.jsx)(eW,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.during_call})]})}),(0,l.jsx)(eW,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.post_call})]})}),(0,l.jsx)(eW,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!e_&&!ei(y)&&!es(y)&&(0,l.jsx)(ey,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:ew,onActionSelect:eN,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eA("categories");if(es(y))return(0,l.jsx)(eb,{availableModels:eg,form:x});if(!y)return null;if(e_)return(0,l.jsx)(eH,{value:ef,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eA("patterns");return null;case 3:if(ei(y))return eA("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),ep(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>ep(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>X(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:Z===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:ek,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):s=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let n={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:s}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(n));let m=`/guardrails/${d}`,g=await fetch(m,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(n)});if(!g.ok){let e=await g.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tt.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(tr,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(tr,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tr,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(tr,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(tr,{value:"inherit",children:"Use global default"}),(0,l.jsx)(tr,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(tr,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "api_key": "your_aporia_api_key", + "project_name": "your_project_name" +}`})});case"AimSecurity":return(0,l.jsx)(r.Form.Item,{label:"Aim Security Configuration",name:"config",tooltip:"JSON configuration for Aim Security",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "api_key": "your_aim_api_key" +}`})});case"Bedrock":return(0,l.jsx)(r.Form.Item,{label:"Amazon Bedrock Configuration",name:"config",tooltip:"JSON configuration for Amazon Bedrock guardrails",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "guardrail_id": "your_guardrail_id", + "guardrail_version": "your_guardrail_version" +}`})});case"GuardrailsAI":return(0,l.jsx)(r.Form.Item,{label:"Guardrails.ai Configuration",name:"config",tooltip:"JSON configuration for Guardrails.ai",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "api_key": "your_guardrails_api_key", + "guardrail_id": "your_guardrail_id" +}`})});case"LakeraAI":return(0,l.jsx)(r.Form.Item,{label:"Lakera AI Configuration",name:"config",tooltip:"JSON configuration for Lakera AI",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "api_key": "your_lakera_api_key" +}`})});case"PromptInjection":return(0,l.jsx)(r.Form.Item,{label:"Prompt Injection Configuration",name:"config",tooltip:"JSON configuration for prompt injection detection",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "threshold": 0.8 +}`})});default:return(0,l.jsx)(r.Form.Item,{label:"Custom Configuration",name:"config",tooltip:"JSON configuration for your custom guardrail",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "key1": "value1", + "key2": "value2" +}`})})}})(),(0,l.jsxs)("div",{className:"flex justify-end space-x-2 mt-4",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:I,loading:h,children:"Update Guardrail"})]})]})})};var ts=((a={}).DB="db",a.CONFIG="config",a);e.s(["default",0,({guardrailsList:e,isLoading:t,onDeleteClick:a,accessToken:r,onGuardrailUpdated:i,isAdmin:s=!1,onGuardrailClick:n})=>{let[o,d]=(0,m.useState)([{id:"created_at",desc:!0}]),[c,u]=(0,m.useState)(!1),[p,g]=(0,m.useState)(null),x=e=>e?new Date(e).toLocaleString():"-",h=[{header:"Guardrail ID",accessorKey:"guardrail_id",cell:e=>(0,l.jsx)(ej.Tooltip,{title:String(e.getValue()||""),children:(0,l.jsx)(e4.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>e.getValue()&&n(e.getValue()),children:e.getValue()?`${String(e.getValue()).slice(0,7)}...`:""})})},{header:"Name",accessorKey:"guardrail_name",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.guardrail_name,children:(0,l.jsx)("span",{className:"text-xs font-medium",children:t.guardrail_name||"-"})})}},{header:"Provider",accessorKey:"litellm_params.guardrail",cell:({row:e})=>{let{logo:t,displayName:a}=ed(e.original.litellm_params.guardrail);return(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,l.jsx)("img",{src:t,alt:`${a} logo`,className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)("span",{className:"text-xs",children:a})]})}},{header:"Mode",accessorKey:"litellm_params.mode",cell:({row:e})=>{let t=e.original;return(0,l.jsx)("span",{className:"text-xs",children:t.litellm_params.mode})}},{header:"Default On",accessorKey:"litellm_params.default_on",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(e7.Badge,{color:t.litellm_params?.default_on?"green":"gray",className:"text-xs font-normal",size:"xs",children:t.litellm_params?.default_on?"Default On":"Default Off"})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.created_at,children:(0,l.jsx)("span",{className:"text-xs",children:x(t.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.updated_at,children:(0,l.jsx)("span",{className:"text-xs",children:x(t.updated_at)})})}},{id:"actions",header:"Actions",cell:({row:e})=>{let t=e.original,r=t.guardrail_definition_location===ts.CONFIG;return(0,l.jsx)("div",{className:"flex space-x-2",children:r?(0,l.jsx)(ej.Tooltip,{title:"Config guardrail cannot be deleted on the dashboard. Please delete it from the config file.",children:(0,l.jsx)(e2.Icon,{"data-testid":"config-delete-icon",icon:e5.TrashIcon,size:"sm",className:"cursor-not-allowed text-gray-400",title:"Config guardrail cannot be deleted on the dashboard. Please delete it from the config file.","aria-label":"Delete guardrail (config)"})}):(0,l.jsx)(ej.Tooltip,{title:"Delete guardrail",children:(0,l.jsx)(e2.Icon,{icon:e5.TrashIcon,size:"sm",onClick:()=>t.guardrail_id&&a(t.guardrail_id,t.guardrail_name||"Unnamed Guardrail"),className:"cursor-pointer hover:text-red-500"})})})}}],f=(0,e9.useReactTable)({data:e,columns:h,state:{sorting:o},onSortingChange:d,getCoreRowModel:(0,te.getCoreRowModel)(),getSortedRowModel:(0,te.getSortedRowModel)(),enableSorting:!0});return(0,l.jsxs)("div",{className:"rounded-lg custom-border relative",children:[(0,l.jsx)("div",{className:"overflow-x-auto",children:(0,l.jsxs)(eY.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,l.jsx)(eZ.TableHead,{children:f.getHeaderGroups().map(e=>(0,l.jsx)(e1.TableRow,{children:e.headers.map(e=>(0,l.jsx)(e0.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,l.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,e9.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,l.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,l.jsx)(e8.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,l.jsx)(e3.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,l.jsx)(e6.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,l.jsx)(eQ.TableBody,{children:t?(0,l.jsx)(e1.TableRow,{children:(0,l.jsx)(eX.TableCell,{colSpan:h.length,className:"h-8 text-center",children:(0,l.jsx)("div",{className:"text-center text-gray-500",children:(0,l.jsx)("p",{children:"Loading..."})})})}):e.length>0?f.getRowModel().rows.map(e=>(0,l.jsx)(e1.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,l.jsx)(eX.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,e9.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,l.jsx)(e1.TableRow,{children:(0,l.jsx)(eX.TableCell,{colSpan:h.length,className:"h-8 text-center",children:(0,l.jsx)("div",{className:"text-center text-gray-500",children:(0,l.jsx)("p",{children:"No guardrails found"})})})})})]})}),p&&(0,l.jsx)(ti,{visible:c,onClose:()=>u(!1),accessToken:r,onSuccess:()=>{u(!1),g(null),i()},guardrailId:p.guardrail_id||"",fullLitellmParams:p.litellm_params,initialValues:{guardrail_name:p.guardrail_name||"",provider:Object.keys(ea).find(e=>ea[e]===p?.litellm_params.guardrail)||"",mode:p.litellm_params.mode,default_on:p.litellm_params.default_on,pii_entities_config:p.litellm_params.pii_entities_config,skip_system_message_choice:ec(p.litellm_params?.skip_system_message_in_guardrail),...p.guardrail_info}})]})}],782719);var tn=e.i(500330),to=e.i(245094),eN=eN,td=e.i(530212),tc=e.i(350967),tm=e.i(197647),tu=e.i(653824),tp=e.i(881073),tg=e.i(404206),tx=e.i(723731),th=e.i(629569),tf=e.i(678784),ty=e.i(118366),tj=e.i(560445);let{Text:t_}=d.Typography,{Option:tb}=n.Select,tv=({categories:e,onActionChange:t,onSeverityChange:a,onRemove:r,readOnly:i=!1})=>{let s=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(e,t)=>(0,l.jsxs)("div",{children:[(0,l.jsx)(t_,{strong:!0,children:e}),e!==t.category&&(0,l.jsx)("div",{children:(0,l.jsx)(t_,{type:"secondary",style:{fontSize:12},children:t.category})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>i?(0,l.jsx)(o.Tag,{color:{high:"red",medium:"orange",low:"yellow"}[e],children:e.toUpperCase()}):(0,l.jsxs)(n.Select,{value:e,onChange:e=>a?.(t.id,e),style:{width:150},size:"small",children:[(0,l.jsx)(tb,{value:"high",children:"High"}),(0,l.jsx)(tb,{value:"medium",children:"Medium"}),(0,l.jsx)(tb,{value:"low",children:"Low"})]})},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>i?(0,l.jsx)(o.Tag,{color:"BLOCK"===e?"red":"blue",children:e}):(0,l.jsxs)(n.Select,{value:e,onChange:e=>t?.(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(tb,{value:"BLOCK",children:"Block"}),(0,l.jsx)(tb,{value:"MASK",children:"Mask"})]})}];return(i||s.push({title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r?.(t.id),children:"Delete"})}),0===e.length)?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No categories configured."}):(0,l.jsx)(I.Table,{dataSource:e,columns:s,rowKey:"id",pagination:!1,size:"small"})},tw=({patterns:e,blockedWords:t,categories:a=[],readOnly:r=!0,onPatternActionChange:i,onPatternRemove:s,onBlockedWordUpdate:n,onBlockedWordRemove:o,onCategoryActionChange:d,onCategorySeverityChange:c,onCategoryRemove:m})=>{if(0===e.length&&0===t.length&&0===a.length)return null;let u=()=>{};return(0,l.jsxs)(l.Fragment,{children:[a.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Content Categories"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[a.length," categories configured"]})]}),(0,l.jsx)(tv,{categories:a,onActionChange:r?void 0:d,onSeverityChange:r?void 0:c,onRemove:r?void 0:m,readOnly:r})]}),e.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Pattern Detection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[e.length," patterns configured"]})]}),(0,l.jsx)(T,{patterns:e,onActionChange:r?u:i||u,onRemove:r?u:s||u})]}),t.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Blocked Keywords"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[t.length," keywords configured"]})]}),(0,l.jsx)(F,{keywords:t,onActionChange:r?u:n||u,onRemove:r?u:o||u})]})]})},{Text:tN}=d.Typography,tC=({guardrailData:e,guardrailSettings:t,isEditing:a,accessToken:r,onDataChange:i,onUnsavedChanges:s})=>{let[n,o]=(0,m.useState)([]),[d,c]=(0,m.useState)([]),[u,p]=(0,m.useState)([]),[g,x]=(0,m.useState)([]),[h,f]=(0,m.useState)([]),[y,j]=(0,m.useState)([]),[_,b]=(0,m.useState)(!1),[v,w]=(0,m.useState)(null),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(null);(0,m.useEffect)(()=>{if(e?.litellm_params?.patterns){let t=e.litellm_params.patterns.map((e,t)=>({id:`pattern-${t}`,type:"prebuilt"===e.pattern_type?"prebuilt":"custom",name:e.pattern_name||e.name,display_name:e.display_name,pattern:e.pattern,action:e.action||"BLOCK"}));o(t),x(t)}else o([]),x([]);if(e?.litellm_params?.blocked_words){let t=e.litellm_params.blocked_words.map((e,t)=>({id:`word-${t}`,keyword:e.keyword,action:e.action||"BLOCK",description:e.description}));c(t),f(t)}else c([]),f([]);if(e?.litellm_params?.categories?.length>0){let a=t?.content_filter_settings?.content_categories?Object.fromEntries(t.content_filter_settings.content_categories.map(e=>[e.name,e])):{},l=e.litellm_params.categories.map((e,t)=>{let l=a[e.category];return{id:`category-${t}`,category:e.category,display_name:l?.display_name??e.category,action:e.action||"BLOCK",severity_threshold:e.severity_threshold||"medium"}});p(l),j(l)}else p([]),j([]);let a=e?.litellm_params?.competitor_intent_config;if(a&&"object"==typeof a){let e=!!(a.brand_self&&Array.isArray(a.brand_self)&&a.brand_self.length>0),t={competitor_intent_type:a.competitor_intent_type??"airline",brand_self:Array.isArray(a.brand_self)?a.brand_self:[],locations:Array.isArray(a.locations)?a.locations:[],competitors:Array.isArray(a.competitors)?a.competitors:[],policy:a.policy??{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:"number"==typeof a.threshold_high?a.threshold_high:.7,threshold_medium:"number"==typeof a.threshold_medium?a.threshold_medium:.45,threshold_low:"number"==typeof a.threshold_low?a.threshold_low:.3};b(e),w(t),C(e),k(t)}else b(!1),w(null),C(!1),k(null)},[e,t?.content_filter_settings?.content_categories]),(0,m.useEffect)(()=>{i&&i(n,d,u,_,v)},[n,d,u,_,v,i]);let I=m.default.useMemo(()=>{let e=JSON.stringify(n)!==JSON.stringify(g),t=JSON.stringify(d)!==JSON.stringify(h),a=JSON.stringify(u)!==JSON.stringify(y),l=_!==N||JSON.stringify(v)!==JSON.stringify(S);return e||t||a||l},[n,d,u,_,v,g,h,y,N,S]);return((0,m.useEffect)(()=>{a&&s&&s(I)},[I,a,s]),e?.litellm_params?.guardrail!=="litellm_content_filter")?null:a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"Content Filter Configuration"}),I&&(0,l.jsx)(tj.Alert,{type:"warning",showIcon:!0,className:"mb-4",message:(0,l.jsx)(tN,{children:'You have unsaved changes to patterns or keywords. Remember to click "Save Changes" at the bottom.'})}),(0,l.jsx)("div",{className:"mb-6",children:t&&t.content_filter_settings&&(0,l.jsx)(Q,{prebuiltPatterns:t.content_filter_settings.prebuilt_patterns||[],categories:t.content_filter_settings.pattern_categories||[],selectedPatterns:n,blockedWords:d,onPatternAdd:e=>o([...n,e]),onPatternRemove:e=>o(n.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>o(n.map(a=>a.id===e?{...a,action:t}:a)),onBlockedWordAdd:e=>c([...d,e]),onBlockedWordRemove:e=>c(d.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>c(d.map(l=>l.id===e?{...l,[t]:a}:l)),onFileUpload:e=>{console.log("File uploaded:",e)},accessToken:r,contentCategories:t.content_filter_settings.content_categories||[],selectedContentCategories:u,onContentCategoryAdd:e=>p([...u,e]),onContentCategoryRemove:e=>p(u.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>p(u.map(l=>l.id===e?{...l,[t]:a}:l)),competitorIntentEnabled:_,competitorIntentConfig:v,onCompetitorIntentChange:(e,t)=>{b(e),w(t)}})})]}):(0,l.jsx)(tw,{patterns:n,blockedWords:d,categories:u,readOnly:!0})};var tS=e.i(788191),tk=e.i(245704),tI=e.i(518617);let tA={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};var tO=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:tA}))}),tP=e.i(987432);let tT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M892 772h-80v-80c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v80h-80c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h80v80c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-80h80c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM373.5 498.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.8-1.7-203.2 89.2-203.2 200 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.8-1.1 6.4-4.8 5.9-8.8zM824 472c0-109.4-87.9-198.3-196.9-200C516.3 270.3 424 361.2 424 472c0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C357 742.6 326 814.8 324 891.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.5C505.8 695.7 563 672 624 672c110.4 0 200-89.5 200-200zm-109.5 90.5C690.3 586.7 658.2 600 624 600s-66.3-13.3-90.5-37.5a127.26 127.26 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-.1 34.2-13.4 66.3-37.6 90.5z"}}]},name:"usergroup-add",theme:"outlined"};var tL=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:tT}))}),tB=e.i(872934);let{Panel:tF}=$.Collapse,{TextArea:t$}=i.Input,tE={empty:{name:"Empty Template",code:`async def apply_guardrail(inputs, request_data, input_type): + # inputs: {texts, images, tools, tool_calls, structured_messages, model} + # request_data: {model, user_id, team_id, end_user_id, metadata} + # input_type: "request" or "response" + return allow()`},blockSSN:{name:"Block SSN",code:`def apply_guardrail(inputs, request_data, input_type): + for text in inputs["texts"]: + if regex_match(text, r"\\d{3}-\\d{2}-\\d{4}"): + return block("SSN detected") + return allow()`},redactEmail:{name:"Redact Emails",code:`def apply_guardrail(inputs, request_data, input_type): + pattern = r"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}" + modified = [] + for text in inputs["texts"]: + modified.append(regex_replace(text, pattern, "[EMAIL REDACTED]")) + return modify(texts=modified)`},blockSQL:{name:"Block SQL Injection",code:`def apply_guardrail(inputs, request_data, input_type): + if input_type != "request": + return allow() + for text in inputs["texts"]: + if contains_code_language(text, ["sql"]): + return block("SQL code not allowed") + return allow()`},validateJSON:{name:"Validate JSON",code:`def apply_guardrail(inputs, request_data, input_type): + if input_type != "response": + return allow() + + schema = {"type": "object", "required": ["name", "value"]} + + for text in inputs["texts"]: + obj = json_parse(text) + if obj is None: + return block("Invalid JSON response") + if not json_schema_valid(obj, schema): + return block("Response missing required fields") + return allow()`},externalAPI:{name:"External API Check (async)",code:`async def apply_guardrail(inputs, request_data, input_type): + # Call an external moderation API (async for non-blocking) + for text in inputs["texts"]: + response = await http_post( + "https://api.example.com/moderate", + body={"text": text, "user_id": request_data["user_id"]}, + headers={"Authorization": "Bearer YOUR_API_KEY"}, + timeout=10 + ) + + if not response["success"]: + # API call failed, allow by default or block + return allow() + + if response["body"].get("flagged"): + return block(response["body"].get("reason", "Content flagged")) + + return allow()`}},tM={"Return Values":[{name:"allow()",desc:"Let request/response through"},{name:"block(reason)",desc:"Reject with message"},{name:"modify(texts=[], images=[], tool_calls=[])",desc:"Transform content"}],"HTTP Requests (async)":[{name:"await http_request(url, method, headers, body)",desc:"Make async HTTP request"},{name:"await http_get(url, headers)",desc:"Async GET request"},{name:"await http_post(url, body, headers)",desc:"Async POST request"}],"Regex Functions":[{name:"regex_match(text, pattern)",desc:"Returns True if pattern found"},{name:"regex_replace(text, pattern, replacement)",desc:"Replace all matches"},{name:"regex_find_all(text, pattern)",desc:"Return list of matches"}],"JSON Functions":[{name:"json_parse(text)",desc:"Parse JSON string, returns None on error"},{name:"json_stringify(obj)",desc:"Convert to JSON string"},{name:"json_schema_valid(obj, schema)",desc:"Validate against JSON schema"}],"URL Functions":[{name:"extract_urls(text)",desc:"Extract all URLs from text"},{name:"is_valid_url(url)",desc:"Check if URL is valid"},{name:"all_urls_valid(text)",desc:"Check all URLs in text are valid"}],"Code Detection":[{name:"detect_code(text)",desc:"Returns True if code detected"},{name:"detect_code_languages(text)",desc:"Returns list of detected languages"},{name:'contains_code_language(text, ["sql"])',desc:"Check for specific languages"}],"Text Utilities":[{name:"contains(text, substring)",desc:"Check if substring exists"},{name:"contains_any(text, [substr1, substr2])",desc:"Check if any substring exists"},{name:"word_count(text)",desc:"Count words"},{name:"char_count(text)",desc:"Count characters"},{name:"lower(text) / upper(text) / trim(text)",desc:"String transforms"}]},tR=[{value:"pre_call",label:"pre_call (Request)"},{value:"post_call",label:"post_call (Response)"},{value:"during_call",label:"during_call (Parallel)"},{value:"logging_only",label:"logging_only"},{value:"pre_mcp_call",label:"pre_mcp_call (Before MCP Tool Call)"},{value:"post_mcp_call",label:"post_mcp_call (After MCP Tool Call)"},{value:"during_mcp_call",label:"during_mcp_call (During MCP Tool Call)"}],tG=({visible:e,onClose:t,onSuccess:a,accessToken:r,editData:i})=>{let o=!!i,[d,c]=(0,m.useState)(""),[g,x]=(0,m.useState)(["pre_call"]),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)("empty"),[_,b]=(0,m.useState)(tE.empty.code),[v,w]=(0,m.useState)(!1),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(!1),I={texts:["Hello, my SSN is 123-45-6789"],images:[],tools:[{type:"function",function:{name:"get_weather",description:"Get the current weather in a location",parameters:{type:"object",properties:{location:{type:"string",description:"City name"}},required:["location"]}}}],tool_calls:[],structured_messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"Hello, my SSN is 123-45-6789"}],model:"gpt-4"},A={texts:["The weather in San Francisco is 72°F and sunny."],images:[],tools:[],tool_calls:[{id:"call_abc123",type:"function",function:{name:"get_weather",arguments:'{"location": "San Francisco"}'}}],structured_messages:[],model:"gpt-4"},O={texts:['Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'],images:[],tools:[{type:"function",function:{name:"read_wiki_structure",description:"Read the structure of a GitHub repository (MCP tool passed as OpenAI tool)",parameters:{type:"object",properties:{repoName:{type:"string",description:"Repository name, e.g. BerriAI/litellm"}},required:["repoName"]}}}],tool_calls:[{id:"call_mcp_001",type:"function",function:{name:"read_wiki_structure",arguments:'{"repoName": "BerriAI/litellm"}'}}],structured_messages:[{role:"user",content:'Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'}],model:"mcp-tool-call"},[P,T]=(0,m.useState)(JSON.stringify(I,null,2)),[L,B]=(0,m.useState)(null),[F,E]=(0,m.useState)(null),M=(0,m.useRef)(null),R=e=>null==e?["pre_call"]:Array.isArray(e)?e.length?e:["pre_call"]:[e];(0,m.useEffect)(()=>{e&&(i?(c(i.guardrail_name||""),x(R(i.litellm_params?.mode)),f(i.litellm_params?.default_on||!1),b(i.litellm_params?.custom_code||tE.empty.code),j("")):(c(""),x(["pre_call"]),f(!1),j("empty"),b(tE.empty.code)),B(null),k(!1))},[e,i]);let G=async e=>{try{await navigator.clipboard.writeText(e),E(e),setTimeout(()=>E(null),2e3)}catch(e){console.error("Failed to copy:",e)}},z=async()=>{if(!d.trim())return void u.default.fromBackend("Please enter a guardrail name");if(!_.trim())return void u.default.fromBackend("Please enter custom code");if(!r)return void u.default.fromBackend("No access token available");w(!0);try{if(o&&i){let e={litellm_params:{custom_code:_}};d!==i.guardrail_name&&(e.guardrail_name=d);let t=R(i.litellm_params?.mode);(g.length!==t.length||g.some((e,a)=>e!==t[a]))&&(e.litellm_params.mode=g),h!==i.litellm_params?.default_on&&(e.litellm_params.default_on=h),await (0,p.updateGuardrailCall)(r,i.guardrail_id,e),u.default.success("Custom code guardrail updated successfully")}else await (0,p.createGuardrailCall)(r,{guardrail_name:d,litellm_params:{guardrail:"custom_code",mode:g,default_on:h,custom_code:_},guardrail_info:{}}),u.default.success("Custom code guardrail created successfully");a(),t()}catch(e){console.error("Failed to save guardrail:",e),u.default.fromBackend(`Failed to ${o?"update":"create"} guardrail: `+(e instanceof Error?e.message:String(e)))}finally{w(!1)}},K=async()=>{if(!r)return void B({error:"No access token available"});C(!0),B(null);try{let e;try{e=JSON.parse(P)}catch(e){B({error:"Invalid test input JSON"}),C(!1);return}e.texts||(e.texts=[]);let t=["pre_call","pre_mcp_call"],a=["post_call","post_mcp_call"],l=g.some(e=>t.includes(e))?"request":g.some(e=>a.includes(e))?"response":"request",i=await (0,p.testCustomCodeGuardrail)(r,{custom_code:_,test_input:e,input_type:l,request_data:{model:"test-model",metadata:{}}});i.success&&i.result?B(i.result):i.error?B({error:i.error,error_type:i.error_type}):B({error:"Unknown error occurred"})}catch(e){console.error("Failed to test custom code:",e),B({error:e instanceof Error?e.message:"Failed to test custom code"})}finally{C(!1)}},H=_.split("\n").length;return(0,l.jsxs)(s.Modal,{open:e,onCancel:t,footer:null,width:1400,className:"custom-code-modal",closable:!0,destroyOnClose:!0,children:[(0,l.jsxs)("div",{className:"flex flex-col h-[80vh]",children:[(0,l.jsxs)("div",{className:"pb-4 border-b border-gray-200",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:o?"Edit Custom Guardrail":"Create Custom Guardrail"}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Define custom logic using Python-like syntax"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-4 py-4 border-b border-gray-100",children:[(0,l.jsxs)("div",{className:"flex-1 max-w-[200px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Guardrail Name"}),(0,l.jsx)(tt.TextInput,{value:d,onValueChange:c,placeholder:"e.g., block-pii-custom"})]}),(0,l.jsxs)("div",{className:"w-[280px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Mode (can select multiple)"}),(0,l.jsx)(n.Select,{mode:"multiple",value:g,onChange:x,options:tR,className:"w-full",size:"middle",placeholder:"Select modes"})]}),(0,l.jsxs)("div",{className:"w-[180px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Template"}),(0,l.jsx)(n.Select,{value:y,onChange:e=>{j(e),b(tE[e].code)},className:"w-full",size:"middle",dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(eG.Divider,{style:{margin:"8px 0"}}),(0,l.jsxs)("div",{style:{padding:"8px 12px",cursor:"pointer",color:"#1890ff",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px"},onClick:e=>{e.preventDefault(),window.open("https://models.litellm.ai/guardrails","_blank")},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f0f0f0"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"},children:[(0,l.jsx)(tL,{}),(0,l.jsx)("span",{children:"Browse Community templates"}),(0,l.jsx)(tB.ExportOutlined,{style:{fontSize:"10px"}})]})]}),children:(0,l.jsx)(n.Select.OptGroup,{label:"STANDARD",children:Object.entries(tE).map(([e,t])=>(0,l.jsx)(n.Select.Option,{value:e,children:t.name},e))})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pt-5",children:[(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Default On"}),(0,l.jsx)(D.Switch,{checked:h,onChange:f})]})]}),(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden mt-4 gap-6",children:[(0,l.jsxs)("div",{className:"flex-[2] flex flex-col min-w-0 overflow-y-auto",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2 flex-shrink-0",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Python Logic"}),(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Restricted environment (no imports)"})]}),(0,l.jsxs)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e] flex-shrink-0",style:{minHeight:"300px",maxHeight:"400px"},children:[(0,l.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-12 bg-[#1e1e1e] border-r border-gray-700 text-right pr-3 pt-3 select-none overflow-hidden",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6"},children:Array.from({length:Math.max(H,20)},(e,t)=>(0,l.jsx)("div",{className:"text-gray-500 h-[22.4px]",children:t+1},t+1))}),(0,l.jsx)("textarea",{ref:M,value:_,onChange:e=>b(e.target.value),onKeyDown:e=>{if("Tab"===e.key){e.preventDefault();let t=e.currentTarget,a=t.selectionStart,l=t.selectionEnd;b(_.substring(0,a)+" "+_.substring(l)),setTimeout(()=>{t.selectionStart=t.selectionEnd=a+4},0)}},spellCheck:!1,className:"w-full h-full pl-14 pr-4 pt-3 pb-3 resize-none focus:outline-none bg-transparent text-gray-200",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6",tabSize:4}})]}),(0,l.jsx)($.Collapse,{activeKey:S?["test"]:[],onChange:e=>k(e.includes("test")),className:"mt-3 bg-white border border-gray-200 rounded-lg flex-shrink-0",expandIcon:({isActive:e})=>(0,l.jsx)(tO,{rotate:90*!!e}),children:(0,l.jsx)(tF,{header:(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,l.jsx)(tS.PlayCircleOutlined,{className:"text-blue-500"}),"Test Your Guardrail"]}),children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600",children:"Test Input (JSON)"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs text-gray-500",children:"Load example:"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(I,null,2)),className:"px-2 py-1 text-xs rounded border border-orange-200 bg-orange-50 text-orange-700 hover:bg-orange-100 transition-colors",children:"Pre-call"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(O,null,2)),className:"px-2 py-1 text-xs rounded border border-purple-200 bg-purple-50 text-purple-700 hover:bg-purple-100 transition-colors",children:"Pre MCP"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(A,null,2)),className:"px-2 py-1 text-xs rounded border border-green-200 bg-green-50 text-green-700 hover:bg-green-100 transition-colors",children:"Post-call"})]})]}),(0,l.jsx)("div",{className:"mb-2 p-2 bg-gray-50 rounded text-xs text-gray-600 border border-gray-200",children:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"texts"}),": Message content (always)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"images"}),": Base64 images (vision)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tools"}),": Tool definitions ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"}),", MCP as OpenAI tool ",(0,l.jsx)("span",{className:"text-purple-600",children:"(pre_mcp_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tool_calls"}),": LLM tool calls ",(0,l.jsx)("span",{className:"text-green-600",children:"(post_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"structured_messages"}),": Full messages ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"model"}),": Model name (always)"]})]})}),(0,l.jsx)(t$,{value:P,onChange:e=>T(e.target.value),rows:8,className:"font-mono text-xs",placeholder:'{"texts": ["test message"], ...}'})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{size:"xs",onClick:K,disabled:N,icon:tS.PlayCircleOutlined,children:N?"Running...":"Run Test"}),L&&(0,l.jsx)("div",{className:`flex items-center gap-2 text-sm ${L.error?"text-red-600":"allow"===L.action?"text-green-600":"block"===L.action?"text-orange-600":"text-blue-600"}`,children:L.error?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{}),(0,l.jsxs)("span",{children:[L.error_type&&(0,l.jsxs)("span",{className:"font-medium",children:["[",L.error_type,"] "]}),L.error]})]}):"allow"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Allowed"]}):"block"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{})," Blocked: ",L.reason]}):"modify"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Modified",L.texts&&L.texts.length>0&&(0,l.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:["→ ",L.texts[0].substring(0,50),L.texts[0].length>50?"...":""]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," ",L.action||"Unknown"]})})]})]})},"test")}),(0,l.jsxs)("div",{className:"mt-3 p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-lg flex items-center justify-between flex-shrink-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"bg-blue-100 rounded-full p-2",children:(0,l.jsx)(tL,{className:"text-blue-600 text-lg"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-gray-900",children:"Built a useful guardrail?"}),(0,l.jsx)("div",{className:"text-xs text-gray-600",children:"Share it with the community and help others build faster"})]})]}),(0,l.jsx)(e4.Button,{size:"xs",onClick:()=>window.open("https://github.com/BerriAI/litellm-guardrails","_blank"),icon:tB.ExportOutlined,className:"bg-blue-600 hover:bg-blue-700 text-white border-0",children:"Contribute Template"})]})]}),(0,l.jsxs)("div",{className:"w-[300px] flex-shrink-0 overflow-auto border-l border-gray-200 pl-6",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)("span",{className:"font-semibold text-gray-700",children:"Available Primitives"})]}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Click to copy functions to clipboard"}),(0,l.jsx)($.Collapse,{defaultActiveKey:["Return Values"],className:"primitives-collapse bg-transparent border-0",expandIconPosition:"end",children:Object.entries(tM).map(([e,t])=>(0,l.jsx)(tF,{header:(0,l.jsx)("span",{className:"text-sm font-medium text-gray-700",children:e}),className:"bg-white mb-2 rounded-lg border border-gray-200",children:(0,l.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,l.jsx)("button",{onClick:()=>G(e.name),className:`w-full text-left px-2 py-2 rounded transition-colors ${F===e.name?"bg-green-100":"bg-gray-50 hover:bg-blue-50"}`,children:F===e.name?(0,l.jsxs)("span",{className:"flex items-center gap-1 text-xs font-mono text-green-700",children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Copied!"]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"text-xs font-mono text-gray-800",children:e.name}),(0,l.jsx)("div",{className:"text-[10px] text-gray-500 mt-0.5",children:e.desc})]})},e.name))})},e))})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-gray-200",children:[(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Changes are auto-saved to local draft"}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:z,loading:v,disabled:v||!d.trim(),icon:tP.SaveOutlined,children:o?"Update Guardrail":"Save Guardrail"})]})]})]}),(0,l.jsx)("style",{children:` + .custom-code-modal .ant-modal-content { + padding: 24px; + } + .custom-code-modal .ant-modal-close { + top: 20px; + right: 20px; + } + .primitives-collapse .ant-collapse-item { + border: none !important; + } + .primitives-collapse .ant-collapse-header { + padding: 8px 12px !important; + } + .primitives-collapse .ant-collapse-content-box { + padding: 8px 12px !important; + } + `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let o,[d,g]=(0,m.useState)(null),[x,h]=(0,m.useState)(null),[f,y]=(0,m.useState)(!0),[j,_]=(0,m.useState)(!1),[b]=r.Form.useForm(),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(null),[I,A]=(0,m.useState)({}),[O,P]=(0,m.useState)(!1),T={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[L,B]=(0,m.useState)(T),[F,$]=(0,m.useState)(!1),[E,M]=(0,m.useState)(!1),R=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),G=(0,m.useCallback)((e,t,a,l,r)=>{R.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(y(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(g(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(w([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),w(t),C(a)}}else w([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{y(!1)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);h(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},K=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);k(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{D()},[a]),(0,m.useEffect)(()=>{z(),K()},[e,a]),(0,m.useEffect)(()=>{if(d&&b){let e={...d.litellm_params||{}};delete e.skip_system_message_in_guardrail,b.setFieldsValue({guardrail_name:d.guardrail_name,...e,skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}})}},[d,x,b]);let H=(0,m.useCallback)(()=>{d?.litellm_params?.guardrail==="tool_permission"?B({rules:d.litellm_params?.rules||[],default_action:(d.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:d.litellm_params?.violation_message_template||""}):B(T),$(!1)},[d]);(0,m.useEffect)(()=>{H()},[H]);let q=async t=>{try{if(!a)return;let o={litellm_params:{}};t.guardrail_name!==d.guardrail_name&&(o.guardrail_name=t.guardrail_name),t.default_on!==d.litellm_params?.default_on&&(o.litellm_params.default_on=t.default_on);let c=ec(d.litellm_params?.skip_system_message_in_guardrail),m=t.skip_system_message_choice;void 0!==m&&m!==c&&("inherit"===m?o.litellm_params.skip_system_message_in_guardrail=null:"yes"===m?o.litellm_params.skip_system_message_in_guardrail=!0:o.litellm_params.skip_system_message_in_guardrail=!1);let g=d.guardrail_info,h=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(g)!==JSON.stringify(h)&&(o.guardrail_info=h);let f=d.litellm_params?.pii_entities_config||{},y={};if(v.forEach(e=>{y[e]=N[e]||"MASK"}),JSON.stringify(f)!==JSON.stringify(y)&&(o.litellm_params.pii_entities_config=y),d.litellm_params?.guardrail==="litellm_content_filter"&&O){var l,r,i,s,n;let e,t=(l=R.current.patterns||[],r=R.current.blockedWords||[],i=R.current.categories||[],s=R.current.competitorIntentEnabled,n=R.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);o.litellm_params.patterns=t.patterns,o.litellm_params.blocked_words=t.blocked_words,o.litellm_params.categories=t.categories,o.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(d.litellm_params?.guardrail==="tool_permission"){let e=d.litellm_params?.rules||[],t=L.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(d.litellm_params?.default_action||"deny").toLowerCase(),r=(L.default_action||"deny").toLowerCase(),i=l!==r,s=(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(L.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=d.litellm_params?.violation_message_template||"",u=L.violation_message_template||"",p=m!==u;(F||a||i||c||p)&&(o.litellm_params.rules=t,o.litellm_params.default_action=r,o.litellm_params.on_disallowed_action=n,o.litellm_params.violation_message_template=u||null)}let j=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",j);let b=d.litellm_params?.guardrail==="tool_permission";if(x&&j&&!b){let e=x[ea[j]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=d.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?o.litellm_params[e]=a:null!=l&&""!==l&&(o.litellm_params[e]=null))})}if(0===Object.keys(o.litellm_params).length&&delete o.litellm_params,0===Object.keys(o).length){u.default.info("No changes detected"),_(!1);return}await (0,p.updateGuardrailCall)(a,e,o),u.default.success("Guardrail updated successfully"),P(!1),z(),_(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(f)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let J=e=>e?new Date(e).toLocaleString():"-",{logo:U,displayName:W}=ed(d.litellm_params?.guardrail||""),V=async(e,t)=>{await (0,tn.copyToClipboard)(e)&&(A(e=>({...e,[t]:!0})),setTimeout(()=>{A(e=>({...e,[t]:!1}))},2e3))},Y="config"===d.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(td.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(th.Title,{children:d.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eR.Text,{className:"text-gray-500 font-mono",children:d.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:I["guardrail-id"]?(0,l.jsx)(tf.CheckIcon,{size:12}):(0,l.jsx)(ty.CopyIcon,{size:12}),onClick:()=>V(d.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${I["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tu.TabGroup,{children:[(0,l.jsxs)(tp.TabList,{className:"mb-4",children:[(0,l.jsx)(tm.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(tm.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tx.TabPanels,{children:[(0,l.jsxs)(tg.TabPanel,{children:[(0,l.jsxs)(tc.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[U&&(0,l.jsx)("img",{src:U,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(th.Title,{children:W})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:d.litellm_params?.mode||"-"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:J(d.created_at)}),(0,l.jsxs)(eR.Text,{children:["Last Updated: ",J(d.updated_at)]})]})]})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsx)(eR.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(d.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eR.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(eN.default,{}):(0,l.jsx)(eC.StopOutlined,{}),String(t)]})})]},e))})]})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsx)(eH,{value:L,disabled:!0})}),d.litellm_params?.guardrail==="custom_code"&&d.litellm_params?.custom_code&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eR.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!Y&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:d.litellm_params.custom_code})})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(tg.TabPanel,{children:(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(th.Title,{children:"Guardrail Settings"}),Y&&(0,l.jsx)(ej.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})}),!j&&!Y&&(d.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>_(!0),children:"Edit Settings"}))]}),j?(0,l.jsxs)(r.Form,{form:b,onFinish:q,initialValues:{guardrail_name:d.guardrail_name,...(o={...d.litellm_params||{}},delete o.skip_system_message_in_guardrail,o),skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{label:"Skip system messages in guardrail",name:"skip_system_message_choice",tooltip:"Unified guardrails: omit role: system from guardrail input (LLM still gets full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),d.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:S&&(0,l.jsx)(eE,{entities:S.supported_entities,actions:S.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:S.pii_entity_categories})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!0,accessToken:a,onDataChange:G,onUnsavedChanges:P}),(d.litellm_params?.guardrail==="tool_permission"||x)&&(0,l.jsx)(eG.Divider,{orientation:"left",children:"Provider Settings"}),d.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eH,{value:L,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ey,{selectedProvider:Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail)||null,accessToken:a,providerParams:x,value:d.litellm_params}),x&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);if(!e)return null;let t=x[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:d.litellm_params}):null})()]}),(0,l.jsx)(eG.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{_(!1),P(!1),H()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:d.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:d.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Yes":"No"})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:J(d.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:J(d.updated_at)})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eH,{value:L,disabled:!0})]})]})})]})]}),(0,l.jsx)(tG,{visible:E,onClose:()=>M(!1),onSuccess:()=>{M(!1),z()},accessToken:a,editData:d?{guardrail_id:d.guardrail_id,guardrail_name:d.guardrail_name,litellm_params:d.litellm_params}:null})]})}],969641);var tz=e.i(573421),tD=e.i(19732),tK=e.i(928685),tH=e.i(166406),tq=e.i(637235),tJ=e.i(755151),tU=e.i(240647);let{Text:tW}=d.Typography,tV=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tk.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tY}=i.Input,{Text:tQ}=d.Typography,tX=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ej.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eD.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tY,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(e4.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tV,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[s,n]=(0,m.useState)(new Set),[o,c]=(0,m.useState)(""),[g,x]=(0,m.useState)([]),[f,y]=(0,m.useState)([]),[j,_]=(0,m.useState)(!1),b=e.filter(e=>e.guardrail_name?.toLowerCase().includes(o.toLowerCase())),v=async e=>{if(0===s.size||!a)return;_(!0),x([]),y([]);let t=[],l=[];await Promise.all(Array.from(s).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),x(t),y(l),_(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(h.Card,{className:"h-full",styles:{body:{padding:0,height:"100%"}},children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(i.Input,{prefix:(0,l.jsx)(tK.SearchOutlined,{}),placeholder:"Search guardrails...",value:o,onChange:e=>c(e.target.value)})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(eh.Spin,{})}):0===b.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(ez.Empty,{description:o?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(tz.List,{dataSource:b,renderItem:e=>(0,l.jsx)(tz.List.Item,{onClick:()=>{var t;let a;e.guardrail_name&&(t=e.guardrail_name,(a=new Set(s)).has(t)?a.delete(t):a.add(t),n(a))},style:{paddingLeft:24,paddingRight:16},className:`cursor-pointer hover:bg-gray-50 transition-colors ${s.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(tz.List.Item.Meta,{title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tD.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(d.Typography.Text,{className:"text-xs text-gray-600",children:[s.size," of ",b.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(d.Typography.Title,{level:2,className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===s.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tD.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tX,{guardrailNames:Array.from(s),onSubmit:v,results:g.length>0?g:null,errors:f.length>0?f:null,isLoading:j,onClose:()=>n(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tG],64352);let tZ="../ui/assets/logos/",t0=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tZ}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tZ}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tZ}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tZ}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tZ}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tZ}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tZ}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tZ}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tZ}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tZ}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tZ}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tZ}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tZ}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tZ}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tZ}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tZ}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tZ}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tZ}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tZ}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tZ}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tZ}akto.svg`,tags:["Security","Safety","Monitoring"]},{id:"promptguard",name:"PromptGuard",description:"AI security gateway with prompt injection detection, PII redaction, topic filtering, entity blocklists, and hallucination detection. Self-hostable with drop-in proxy integration.",category:"partner",logo:`${tZ}promptguard.svg`,tags:["Security","Prompt Injection","PII"],providerKey:"Promptguard",eval:{f1:94.9,precision:100,recall:90.4,testCases:5384,latency:"~150ms"}},{id:"xecguard",name:"XecGuard",description:"CyCraft XecGuard AI security gateway. Multi-policy scanning (prompt injection, harmful content, PII, system-prompt enforcement) plus RAG context grounding.",category:"partner",logo:`${tZ}xecguard.svg`,tags:["Security","Policy","Grounding","RAG"],providerKey:"Xecguard"}];e.s(["ALL_CARDS",0,t0],230312)},826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(464571),r=e.i(326373),i=e.i(653496),s=e.i(755151),n=e.i(646563),o=e.i(245094),d=e.i(764205),c=e.i(185357),m=e.i(782719),u=e.i(708347),p=e.i(969641),g=e.i(476993),x=e.i(727749),h=e.i(127952),f=e.i(180766);e.i(824296);var y=e.i(64352),j=e.i(311451),_=e.i(928685),b=e.i(266537),v=e.i(230312),w=e.i(826910);let N=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},C=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(N,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(w.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var S=e.i(447566);let k={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1},promptguard:{provider:"Promptguard",guardrailNameSuggestion:"PromptGuard",mode:"pre_call",defaultOn:!1},xecguard:{provider:"Xecguard",guardrailNameSuggestion:"XecGuard",mode:"pre_call",defaultOn:!1}},I=({card:e,onBack:r,accessToken:i,onGuardrailCreated:s})=>{let[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)("overview"),u=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],p=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],g=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:r,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(S.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(l.Button,{onClick:()=>o(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:g.map(e=>(0,t.jsx)("div",{onClick:()=>m(e.key),style:{padding:"12px 20px",fontSize:14,color:d===e.key?"#1a73e8":"#5f6368",borderBottom:d===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:d===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===d&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:u.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:p.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(c.default,{visible:n,onClose:()=>o(!1),accessToken:i,onSuccess:()=>{o(!1),s()},preset:k[e.id]})]})},A=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=v.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(I,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(j.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(_.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]})]})};var O=e.i(988846),P=e.i(837007),T=e.i(409797),L=e.i(54131),B=e.i(995926),F=e.i(678784),$=e.i(634831),E=e.i(438100),M=e.i(302202),R=e.i(328196),G=e.i(879664);e.s(["InfoIcon",()=>G.default],168118);var G=G,z=e.i(212931),D=e.i(808613),K=e.i(199133),H=e.i(663435),q=e.i(954616),J=e.i(912598),U=e.i(135214),W=e.i(243652);let V=async(e,t)=>{let a=(0,d.getProxyBaseUrl)(),l=`${a}/guardrails/register`,r=await fetch(l,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.json().catch(()=>({})),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return r.json()},Y=(0,W.createQueryKeys)("guardrails");function Q(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt: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),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let X={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{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"}},Z={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function ee({label:e,value:a,color:l}){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 ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function et({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function ea({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=X[e.status],c=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,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.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(M.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,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:o,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,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function el({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function er({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=X[e.status],y=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(B.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(el,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)($.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(el,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(E.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(G.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)($.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(F.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(B.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ei({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="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 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(F.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(R.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,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,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function es({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[c,m]=(0,a.useState)("all"),[u,p]=(0,a.useState)(null),[g,h]=(0,a.useState)(new Set),[f,y]=(0,a.useState)(null),[_,b]=(0,a.useState)(!0),[v,w]=(0,a.useState)(null),[N,C]=(0,a.useState)(""),[S,k]=(0,a.useState)(!1),[I]=D.Form.useForm(),A=(()=>{let{accessToken:e}=(0,U.default)(),t=(0,J.useQueryClient)();return(0,q.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return V(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:Y.all})}})})();(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let T=(0,a.useCallback)(async()=>{if(!e)return void b(!1);b(!0),w(null);try{let t="all"===c?void 0:"pending"===c?"pending_review":c,a=await (0,d.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(Q)),s(a.summary)}catch(e){w(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{b(!1)}},[e,c,N]);(0,a.useEffect)(()=>{T()},[T]);let L=l.find(e=>e.id===u)??null,B=i.total,F=i.pending_review,$=i.active,E=i.rejected;async function M(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),x.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{x.default.fromBackend("Failed to update forward API key")}}async function R(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),x.default.success("Static headers updated")}catch{x.default.fromBackend("Failed to update static headers")}}async function G(t,a){if(e)try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),x.default.success("Forward client headers updated")}catch{x.default.fromBackend("Failed to update forward client headers")}}async function W(t){if(e)try{await (0,d.approveGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail approved")}catch{x.default.fromBackend("Failed to approve guardrail")}}async function X(t){if(e)try{await (0,d.rejectGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail rejected")}catch{x.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${L?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ee,{label:"Total Submitted",value:B,color:"text-gray-900"}),(0,t.jsx)(ee,{label:"Pending Review",value:F,color:"text-yellow-600"}),(0,t.jsx)(ee,{label:"Active",value:$,color:"text-green-600"}),(0,t.jsx)(ee,{label:"Rejected",value:E,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)(O.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 guardrails...",value:n,onChange:e=>o(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-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:c,onChange:e=>m(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none 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",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>k(!0),className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)(P.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[_&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),v&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:v}),!_&&!v&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!_&&!v&&l.map(e=>(0,t.jsx)(ea,{guardrail:e,isSelected:u===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>p(u===e.id?null:e.id),onToggleForwardKey:()=>M(e.id),onToggleHeaders:()=>{var t;return t=e.id,void h(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>y({id:e.id,action:"approve"}),onReject:()=>y({id:e.id,action:"reject"})},e.id))]})]}),L&&(0,t.jsx)(er,{guardrail:L,onClose:()=>p(null),onApprove:()=>y({id:L.id,action:"approve"}),onReject:()=>y({id:L.id,action:"reject"}),onToggleForwardKey:()=>M(L.id),onUpdateCustomHeaders:e=>R(L.id,e),onUpdateExtraHeaders:e=>G(L.id,e)}),f&&(0,t.jsx)(ei,{action:f.action,guardrailName:l.find(e=>e.id===f.id)?.name??"",onConfirm:()=>"approve"===f.action?W(f.id):X(f.id),onCancel:()=>y(null)}),(0,t.jsxs)(z.Modal,{title:"Submit Guardrail for Review",open:S,onCancel:()=>{k(!1),I.resetFields()},onOk:()=>I.submit(),okText:"Submit for Review",children:[(0,t.jsx)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800 mb-4",children:"Your guardrail will be sent for admin review before it becomes active."}),(0,t.jsxs)(D.Form,{form:I,layout:"vertical",initialValues:{mode:"pre_call"},onFinish:async e=>{let t={...e.extra_litellm_params?JSON.parse(e.extra_litellm_params):{},guardrail:"generic_guardrail_api",mode:e.mode,api_base:e.api_base};try{await A.mutateAsync({team_id:e.team_id,guardrail_name:e.guardrail_name,litellm_params:t,guardrail_info:e.guardrail_info?JSON.parse(e.guardrail_info):void 0}),x.default.success("Guardrail submitted for review"),k(!1),I.resetFields(),T()}catch{}},children:[(0,t.jsx)(D.Form.Item,{label:"Team",name:"team_id",rules:[{required:!0,message:"Select a team"}],children:(0,t.jsx)(H.default,{})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Enter a guardrail name"}],children:(0,t.jsx)(j.Input,{placeholder:"e.g. pii-detection"})}),(0,t.jsx)(D.Form.Item,{label:"Mode",name:"mode",rules:[{required:!0,message:"Select a mode"}],children:(0,t.jsxs)(K.Select,{children:[(0,t.jsx)(K.Select.Option,{value:"pre_call",children:"Pre Call"}),(0,t.jsx)(K.Select.Option,{value:"post_call",children:"Post Call"}),(0,t.jsx)(K.Select.Option,{value:"during_call",children:"During Call"})]})}),(0,t.jsx)(D.Form.Item,{label:"API Base URL",name:"api_base",rules:[{required:!0,message:"Enter the API base URL"},{type:"url",message:"Must be a valid URL"}],children:(0,t.jsx)(j.Input,{placeholder:"https://your-guardrail-api.com/v1/check",className:"font-mono"})}),(0,t.jsx)(D.Form.Item,{label:"Additional litellm_params (optional)",name:"extra_litellm_params",tooltip:"JSON object merged into litellm_params. e.g. forward_api_key, headers, model, unreachable_fallback",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if("object"!=typeof e||Array.isArray(e))return Promise.reject("Must be a JSON object");return Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"forward_api_key": true, "headers": {"X-Custom": "value"}}'})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Info (optional)",name:"guardrail_info",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"description": "Detects PII in requests"}'})})]})]})]})}e.s(["default",0,({accessToken:e,userRole:j})=>{let[_,b]=(0,a.useState)([]),[v,w]=(0,a.useState)(!1),[N,C]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[I,O]=(0,a.useState)(!1),[P,T]=(0,a.useState)(null),[L,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),E=!!j&&(0,u.isAdminRole)(j),M=async()=>{if(e){k(!0);try{let t=await (0,d.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),b(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{k(!1)}}};(0,a.useEffect)(()=>{M()},[e]);let R=()=>{M()},G=async()=>{if(P&&e){O(!0);try{await (0,d.deleteGuardrailCall)(e,P.guardrail_id),x.default.success(`Guardrail "${P.guardrail_name}" deleted successfully`),await M()}catch(e){console.error("Error deleting guardrail:",e),x.default.fromBackend("Failed to delete guardrail")}finally{O(!1),B(!1),T(null)}}},z=P&&P.litellm_params?(0,f.getGuardrailLogoAndName)(P.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsx)(i.Tabs,{defaultActiveKey:"submitted",items:[...E?[{key:"garden",label:"Guardrail Garden",children:(0,t.jsx)(A,{accessToken:e,onGuardrailCreated:R})},{key:"guardrails",label:"Guardrails",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(r.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(n.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{F&&$(null),w(!0)}},{key:"custom_code",icon:(0,t.jsx)(o.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{F&&$(null),C(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(s.DownOutlined,{className:"ml-2"})]})})}),F?(0,t.jsx)(p.default,{guardrailId:F,onClose:()=>$(null),accessToken:e,isAdmin:E}):(0,t.jsx)(m.default,{guardrailsList:_,isLoading:S,onDeleteClick:(e,t)=>{T(_.find(t=>t.guardrail_id===e)||null),B(!0)},accessToken:e,onGuardrailUpdated:M,isAdmin:E,onGuardrailClick:e=>$(e)}),(0,t.jsx)(c.default,{visible:v,onClose:()=>{w(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(y.CustomCodeModal,{visible:N,onClose:()=>{C(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(h.default,{isOpen:L,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${P?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:P?.guardrail_name},{label:"ID",value:P?.guardrail_id,code:!0},{label:"Provider",value:z},{label:"Mode",value:P?.litellm_params.mode},{label:"Default On",value:P?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{B(!1),T(null)},onOk:G,confirmLoading:I})]})},{key:"playground",label:"Test Playground",disabled:!e,children:(0,t.jsx)(g.default,{guardrailsList:_,isLoading:S,accessToken:e,onClose:()=>{}})}]:[],{key:"submitted",label:"Submitted Guardrails",children:(0,t.jsx)(es,{accessToken:e})}]})})}],487304)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1efbd5b35545b10a.js b/litellm/proxy/_experimental/out/_next/static/chunks/1efbd5b35545b10a.js new file mode 100644 index 0000000000..be2365f45b --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1efbd5b35545b10a.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,738014,e=>{"use strict";var l=e.i(135214),a=e.i(764205),t=e.i(266027);let s=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:i}=(0,l.default)();return(0,t.useQuery)({queryKey:s.detail(i),queryFn:async()=>await (0,a.userGetInfoV2)(e),enabled:!!(e&&i)})}])},625901,e=>{"use strict";var l=e.i(266027),a=e.i(621482),t=e.i(243652),s=e.i(764205),i=e.i(135214);let r=(0,t.createQueryKeys)("models"),n=(0,t.createQueryKeys)("modelHub"),o=(0,t.createQueryKeys)("allProxyModels");(0,t.createQueryKeys)("selectedTeamModels");let d=(0,t.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:a,userRole:t}=(0,i.default)();return(0,l.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,s.modelAvailableCall)(e,a,t,!0,null,!0,!1,"expand"),enabled:!!(e&&a&&t)})},"useInfiniteModelInfo",0,(e=50,l)=>{let{accessToken:t,userId:r,userRole:n}=(0,i.default)();return(0,a.useInfiniteQuery)({queryKey:d.list({filters:{...r&&{userId:r},...n&&{userRole:n},size:e,...l&&{search:l}}}),queryFn:async({pageParam:a})=>await (0,s.modelInfoCall)(t,r,n,a,e,l),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,i.default)();return(0,l.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,s.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,a=50,t,n,o,d,c)=>{let{accessToken:m,userId:u,userRole:x}=(0,i.default)();return(0,l.useQuery)({queryKey:r.list({filters:{...u&&{userId:u},...x&&{userRole:x},page:e,size:a,...t&&{search:t},...n&&{modelId:n},...o&&{teamId:o},...d&&{sortBy:d},...c&&{sortOrder:c}}}),queryFn:async()=>await (0,s.modelInfoCall)(m,u,x,e,a,t,n,o,d,c),enabled:!!(m&&u&&x)})}])},907308,e=>{"use strict";var l=e.i(843476),a=e.i(271645),t=e.i(212931),s=e.i(808613),i=e.i(464571),r=e.i(199133),n=e.i(592968),o=e.i(213205),d=e.i(374009),c=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:m,onSubmit:u,accessToken:x,title:h="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:p="user",teamId:_})=>{let[j]=s.Form.useForm(),[b,v]=(0,a.useState)([]),[f,y]=(0,a.useState)(!1),[w,C]=(0,a.useState)("user_email"),[T,z]=(0,a.useState)(!1),S=async(e,l)=>{if(!e)return void v([]);y(!0);try{let a=new URLSearchParams;if(a.append(l,e),_&&a.append("team_id",_),null==x)return;let t=(await (0,c.userFilterUICall)(x,a)).map(e=>({label:"user_email"===l?`${e.user_email}`:`${e.user_id}`,value:"user_email"===l?e.user_email:e.user_id,user:e}));v(t)}catch(e){console.error("Error fetching users:",e)}finally{y(!1)}},N=(0,a.useCallback)((0,d.default)((e,l)=>S(e,l),300),[]),F=(e,l)=>{C(l),N(e,l)},M=(e,l)=>{let a=l.user;j.setFieldsValue({user_email:a.user_email,user_id:a.user_id,role:j.getFieldValue("role")})},I=async e=>{z(!0);try{await u(e)}finally{z(!1)}};return(0,l.jsx)(t.Modal,{title:h,open:e,onCancel:()=>{j.resetFields(),v([]),m()},footer:null,width:800,maskClosable:!T,children:(0,l.jsxs)(s.Form,{form:j,onFinish:I,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:p},children:[(0,l.jsx)(s.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,l.jsx)(r.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>F(e,"user_email"),onSelect:(e,l)=>M(e,l),options:"user_email"===w?b:[],loading:f,allowClear:!0,"data-testid":"member-email-search"})}),(0,l.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,l.jsx)(s.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,l.jsx)(r.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>F(e,"user_id"),onSelect:(e,l)=>M(e,l),options:"user_id"===w?b:[],loading:f,allowClear:!0})}),(0,l.jsx)(s.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,l.jsx)(r.Select,{defaultValue:p,children:g.map(e=>(0,l.jsx)(r.Select.Option,{value:e.value,children:(0,l.jsxs)(n.Tooltip,{title:e.description,children:[(0,l.jsx)("span",{className:"font-medium",children:e.label}),(0,l.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,l.jsx)("div",{className:"text-right mt-4",children:(0,l.jsx)(i.Button,{type:"primary",htmlType:"submit",icon:(0,l.jsx)(o.UserAddOutlined,{}),loading:T,children:T?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var l=e.i(843476),a=e.i(625901),t=e.i(109799),s=e.i(785242),i=e.i(738014),r=e.i(199133),n=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"},m=[d,c],u={user:({allProxyModels:e,userModels:l,options:a})=>l&&a?.includeUserModels?l:[],team:({allProxyModels:e,selectedOrganization:l,userModels:a})=>l?l.models.includes(d.value)||0===l.models.length?e:e.filter(e=>l.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:x,organizationID:h,options:g,context:p,dataTestId:_,value:j=[],onChange:b,style:v}=e,{includeUserModels:f,showAllTeamModelsOption:y,showAllProxyModelsOverride:w,includeSpecialOptions:C}=g||{},{data:T,isLoading:z}=(0,a.useAllProxyModels)(),{data:S,isLoading:N}=(0,s.useTeam)(x),{data:F,isLoading:M}=(0,t.useOrganization)(h),{data:I,isLoading:O}=(0,i.useCurrentUser)(),k=e=>m.some(l=>l.value===e),A=j.some(k),P=F?.models.includes(d.value)||F?.models.length===0;if(z||N||M||O)return(0,l.jsx)(n.Skeleton.Input,{active:!0,block:!0});let{wildcard:B,regular:D}=(e=>{let l=[],a=[];for(let t of e)t.endsWith("/*")?l.push(t):a.push(t);return{wildcard:l,regular:a}})(((e,l,a)=>{let t=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(l.options?.showAllProxyModelsOverride)return t;let s=u[l.context];return s?s({allProxyModels:t,...a,options:l.options}):[]})(T?.data??[],e,{selectedTeam:S,selectedOrganization:F,userModels:I?.models}));return(0,l.jsx)(r.Select,{"data-testid":_,value:j,onChange:e=>{let l=e.filter(k);b(l.length>0?[l[l.length-1]]:e)},style:v,options:[C?{label:(0,l.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...w||P&&C||"global"===p?[{label:(0,l.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:j.length>0&&j.some(e=>k(e)&&e!==d.value),key:d.value}]:[],{label:(0,l.jsx)("span",{children:"No Default Models"}),value:c.value,disabled:j.length>0&&j.some(e=>k(e)&&e!==c.value),key:c.value}]}:[],...B.length>0?[{label:(0,l.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:B.map(e=>{let a=e.replace("/*",""),t=a.charAt(0).toUpperCase()+a.slice(1);return{label:(0,l.jsx)("span",{children:`All ${t} models`}),value:e,disabled:A}})}]:[],{label:(0,l.jsx)("span",{children:"Models"}),title:"Models",options:D.map(e=>({label:(0,l.jsx)("span",{children:e}),value:e,disabled:A}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,l.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,l.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},276173,e=>{"use strict";var l=e.i(843476),a=e.i(599724),t=e.i(779241),s=e.i(464571),i=e.i(808613),r=e.i(212931),n=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:c,onSubmit:m,initialData:u,mode:x,config:h})=>{let g,[p]=i.Form.useForm(),[_,j]=(0,o.useState)(!1);console.log("Initial Data:",u),(0,o.useEffect)(()=>{if(e)if("edit"===x&&u){let e={...u,role:u.role||h.defaultRole,max_budget_in_team:u.max_budget_in_team||null,tpm_limit:u.tpm_limit||null,rpm_limit:u.rpm_limit||null,allowed_models:u.allowed_models||[]};console.log("Setting form values:",e),p.setFieldsValue(e)}else p.resetFields(),p.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,u,x,p,h.defaultRole,h.roleOptions]);let b=async e=>{try{j(!0);let l=Object.entries(e).reduce((e,[l,a])=>{if("string"==typeof a){let t=a.trim();return""===t&&("max_budget_in_team"===l||"tpm_limit"===l||"rpm_limit"===l)?{...e,[l]:null}:{...e,[l]:t}}return{...e,[l]:a}},{});console.log("Submitting form data:",l),await Promise.resolve(m(l)),p.resetFields()}catch(e){console.error("Form submission error:",e)}finally{j(!1)}};return(0,l.jsx)(r.Modal,{title:h.title||("add"===x?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:c,children:(0,l.jsxs)(i.Form,{form:p,onFinish:b,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.showEmail&&(0,l.jsx)(i.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,l.jsx)(t.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,l.jsx)("div",{className:"text-center mb-4",children:(0,l.jsx)(a.Text,{children:"OR"})}),h.showUserId&&(0,l.jsx)(i.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,l.jsx)(t.TextInput,{placeholder:"user_123"})}),(0,l.jsx)(i.Form.Item,{label:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{children:"Role"}),"edit"===x&&u&&(0,l.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(g=u.role,h.roleOptions.find(e=>e.value===g)?.label||g),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,l.jsx)(n.Select,{children:"edit"===x&&u?[...h.roleOptions.filter(e=>e.value===u.role),...h.roleOptions.filter(e=>e.value!==u.role)].map(e=>(0,l.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,l.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))})}),h.additionalFields?.map(e=>(0,l.jsx)(i.Form.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:(e=>{switch(e.type){case"input":return(0,l.jsx)(t.TextInput,{placeholder:e.placeholder});case"numerical":return(0,l.jsx)(d.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,l.jsx)(n.Select,{children:e.options?.map(e=>(0,l.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))});case"multi-select":return(0,l.jsx)(n.Select,{mode:"multiple",placeholder:e.placeholder||"Select options",options:e.options,allowClear:!0});default:return null}})(e)},e.name)),(0,l.jsxs)("div",{className:"text-right mt-6",children:[(0,l.jsx)(s.Button,{onClick:c,className:"mr-2",disabled:_,children:"Cancel"}),(0,l.jsx)(s.Button,{type:"default",htmlType:"submit",loading:_,children:"add"===x?_?"Adding...":"Add Member":_?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var l=e.i(843476),a=e.i(100486),t=e.i(827252),s=e.i(213205),i=e.i(771674),r=e.i(464571),n=e.i(770914),o=e.i(291542),d=e.i(262218),c=e.i(592968),m=e.i(898586),u=e.i(902555);let{Text:x}=m.Typography;function h({members:e,canEdit:m,onEdit:h,onDelete:g,onAddMember:p,roleColumnTitle:_="Role",roleTooltip:j,extraColumns:b=[],showDeleteForMember:v,emptyText:f}){let y=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,l.jsx)(x,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,l.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,l.jsx)(x,{children:e||"-"})},{title:j?(0,l.jsxs)(n.Space,{direction:"horizontal",children:[_,(0,l.jsx)(c.Tooltip,{title:j,children:(0,l.jsx)(t.InfoCircleOutlined,{})})]}):_,dataIndex:"role",key:"role",render:e=>(0,l.jsxs)(n.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,l.jsx)(a.CrownOutlined,{}):(0,l.jsx)(i.UserOutlined,{}),(0,l.jsx)(x,{style:{textTransform:"capitalize"},children:e||"-"})]})},...b,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,a)=>m?(0,l.jsxs)(n.Space,{children:[(0,l.jsx)(u.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(a)}),(!v||v(a))&&(0,l.jsx)(u.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>g(a)})]}):null}];return(0,l.jsxs)(n.Space,{direction:"vertical",style:{width:"100%"},children:[(0,l.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,l.jsx)(o.Table,{columns:y,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:f?{emptyText:f}:void 0}),p&&m&&(0,l.jsx)(r.Button,{icon:(0,l.jsx)(s.UserAddOutlined,{}),type:"primary",onClick:p,children:"Add Member"})]})}e.s(["default",()=>h])},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,l)=>(e[l.team_id]=l.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,l)=>{let a=l.find(l=>l.team_id===e);return a?a.team_alias:null}])},367240,555436,e=>{"use strict";let l=(0,e.i(475254).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>l],367240);var a=e.i(54943);e.s(["Search",()=>a.default],555436)},846753,e=>{"use strict";let l=(0,e.i(475254).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["default",()=>l])},655913,38419,78334,e=>{"use strict";var l=e.i(843476),a=e.i(115504),t=e.i(311451),s=e.i(374009),i=e.i(271645);e.s(["FilterInput",0,({placeholder:e,value:r,onChange:n,icon:o,className:d})=>{let[c,m]=(0,i.useState)(r);(0,i.useEffect)(()=>{m(r)},[r]);let u=(0,i.useMemo)(()=>(0,s.default)(e=>n(e),300),[n]);(0,i.useEffect)(()=>()=>{u.cancel()},[u]);let x=(0,i.useCallback)(e=>{let l=e.target.value;m(l),u(l)},[u]);return(0,l.jsx)(t.Input,{placeholder:e,value:c,onChange:x,prefix:o?(0,l.jsx)(o,{size:16,className:"text-gray-500"}):void 0,className:(0,a.cx)("w-64",d)})}],655913);var r=e.i(906579),n=e.i(464571);let o=(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"}]]);e.s(["FiltersButton",0,({onClick:e,active:a,hasActiveFilters:t,label:s="Filters"})=>(0,l.jsx)(r.Badge,{color:"blue",dot:t,children:(0,l.jsx)(n.Button,{type:"default",onClick:e,icon:(0,l.jsx)(o,{size:16}),className:a?"bg-gray-100":"",children:s})})],38419);var d=e.i(367240);e.s(["ResetFiltersButton",0,({onClick:e,label:a="Reset Filters"})=>(0,l.jsx)(n.Button,{type:"default",onClick:e,icon:(0,l.jsx)(d.RotateCcw,{size:16}),children:a})],78334)},284614,e=>{"use strict";var l=e.i(846753);e.s(["User",()=>l.default])},846835,e=>{"use strict";var l=e.i(843476),a=e.i(655913),t=e.i(38419),s=e.i(78334),i=e.i(555436),r=e.i(284614);let n=({filters:e,showFilters:n,onToggleFilters:o,onChange:d,onReset:c})=>{let m=!!(e.org_id||e.org_alias);return(0,l.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,l.jsx)(a.FilterInput,{placeholder:"Search by Organization Name",value:e.org_alias,onChange:e=>d("org_alias",e),icon:i.Search,className:"w-64"}),(0,l.jsx)(t.FiltersButton,{onClick:()=>o(!n),active:n,hasActiveFilters:m}),(0,l.jsx)(s.ResetFiltersButton,{onClick:c})]}),n&&(0,l.jsx)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:(0,l.jsx)(a.FilterInput,{placeholder:"Search by Organization ID",value:e.org_id,onChange:e=>d("org_id",e),icon:r.User,className:"w-64"})})]})};var o=e.i(827252),d=e.i(871943),c=e.i(502547),m=e.i(278587),u=e.i(389083),x=e.i(994388),h=e.i(304967),g=e.i(309426),p=e.i(350967),_=e.i(752978),j=e.i(197647),b=e.i(653824),v=e.i(269200),f=e.i(942232),y=e.i(977572),w=e.i(427612),C=e.i(64848),T=e.i(496020),z=e.i(881073),S=e.i(404206),N=e.i(723731),F=e.i(599724),M=e.i(779241),I=e.i(808613),O=e.i(311451),k=e.i(212931),A=e.i(199133),P=e.i(592968),B=e.i(271645),D=e.i(500330),L=e.i(127952),R=e.i(902555),U=e.i(355619),E=e.i(75921),q=e.i(162386),V=e.i(727749),K=e.i(764205),Q=e.i(785242),H=e.i(109799),$=e.i(912598),G=e.i(980187),W=e.i(530212),J=e.i(629569),Y=e.i(464571),X=e.i(653496),Z=e.i(898586),ee=e.i(678784),el=e.i(118366),ea=e.i(294612),et=e.i(907308),es=e.i(384767),ei=e.i(435451),er=e.i(276173),en=e.i(916940);let eo=({organizationId:e,onClose:a,accessToken:t,is_org_admin:s,is_proxy_admin:i,userModels:r,editOrg:n})=>{let o=(0,$.useQueryClient)(),{data:d,isLoading:c}=(0,H.useOrganization)(e),[m]=I.Form.useForm(),[g,_]=(0,B.useState)(!1),[j,b]=(0,B.useState)(!1),[v,f]=(0,B.useState)(!1),[y,w]=(0,B.useState)(null),[C,T]=(0,B.useState)({}),[z,S]=(0,B.useState)(!1),N=s||i,{data:k}=(0,Q.useTeams)(),P=(0,B.useMemo)(()=>(0,G.createTeamAliasMap)(k),[k]),L=async l=>{try{if(null==t)return;let a={user_email:l.user_email,user_id:l.user_id,role:l.role};await (0,K.organizationMemberAddCall)(t,e,a),V.default.success("Organization member added successfully"),b(!1),m.resetFields(),o.invalidateQueries({queryKey:H.organizationKeys.all})}catch(e){V.default.fromBackend("Failed to add organization member"),console.error("Error adding organization member:",e)}},R=async l=>{try{if(!t)return;let a={user_email:l.user_email,user_id:l.user_id,role:l.role};await (0,K.organizationMemberUpdateCall)(t,e,a),V.default.success("Organization member updated successfully"),f(!1),m.resetFields(),o.invalidateQueries({queryKey:H.organizationKeys.all})}catch(e){V.default.fromBackend("Failed to update organization member"),console.error("Error updating organization member:",e)}},U=async l=>{try{if(!t)return;await (0,K.organizationMemberDeleteCall)(t,e,l.user_id),V.default.success("Organization member deleted successfully"),f(!1),m.resetFields(),o.invalidateQueries({queryKey:H.organizationKeys.all})}catch(e){V.default.fromBackend("Failed to delete organization member"),console.error("Error deleting organization member:",e)}},eo=async l=>{try{if(!t)return;S(!0);let a={organization_id:e,organization_alias:l.organization_alias,models:l.models,litellm_budget_table:{tpm_limit:l.tpm_limit,rpm_limit:l.rpm_limit,max_budget:l.max_budget,budget_duration:l.budget_duration},metadata:l.metadata?JSON.parse(l.metadata):null};if((void 0!==l.vector_stores||void 0!==l.mcp_servers_and_groups)&&(a.object_permission={...d?.object_permission,vector_stores:l.vector_stores||[]},void 0!==l.mcp_servers_and_groups)){let{servers:e,accessGroups:t}=l.mcp_servers_and_groups||{servers:[],accessGroups:[]};e&&e.length>0&&(a.object_permission.mcp_servers=e),t&&t.length>0&&(a.object_permission.mcp_access_groups=t)}await (0,K.organizationUpdateCall)(t,a),V.default.success("Organization settings updated successfully"),_(!1),o.invalidateQueries({queryKey:H.organizationKeys.all})}catch(e){V.default.fromBackend("Failed to update organization settings"),console.error("Error updating organization:",e)}finally{S(!1)}};if(c)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Organization not found"});let ed=async(e,l)=>{await (0,D.copyToClipboard)(e)&&(T(e=>({...e,[l]:!0})),setTimeout(()=>{T(e=>({...e,[l]:!1}))},2e3))},ec=[{title:"Spend (USD)",key:"spend",render:(e,a)=>{let t=null!=a.user_id?(d.members||[]).find(e=>e.user_id===a.user_id):void 0;return(0,l.jsxs)(Z.Typography.Text,{children:["$",(0,D.formatNumberWithCommas)(t?.spend??0,4)]})}},{title:"Created At",key:"created_at",render:(e,a)=>{let t=null!=a.user_id?(d.members||[]).find(e=>e.user_id===a.user_id):void 0;return(0,l.jsx)(Z.Typography.Text,{children:t?.created_at?new Date(t.created_at).toLocaleString():"-"})}}];return(0,l.jsxs)("div",{className:"w-full h-screen p-4 bg-white",children:[(0,l.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Button,{icon:W.ArrowLeftIcon,onClick:a,variant:"light",className:"mb-4",children:"Back to Organizations"}),(0,l.jsx)(J.Title,{children:d.organization_alias}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(F.Text,{className:"text-gray-500 font-mono",children:d.organization_id}),(0,l.jsx)(Y.Button,{type:"text",size:"small",icon:C["org-id"]?(0,l.jsx)(ee.CheckIcon,{size:12}):(0,l.jsx)(el.CopyIcon,{size:12}),onClick:()=>ed(d.organization_id,"org-id"),className:`left-2 z-10 transition-all duration-200 ${C["org-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,l.jsx)(X.Tabs,{defaultActiveKey:n?"settings":"overview",className:"mb-4",items:[{key:"overview",label:"Overview",children:(0,l.jsxs)(p.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(h.Card,{children:[(0,l.jsx)(F.Text,{children:"Organization Details"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(F.Text,{children:["Created: ",new Date(d.created_at).toLocaleDateString()]}),(0,l.jsxs)(F.Text,{children:["Updated: ",new Date(d.updated_at).toLocaleDateString()]}),(0,l.jsxs)(F.Text,{children:["Created By: ",d.created_by]})]})]}),(0,l.jsxs)(h.Card,{children:[(0,l.jsx)(F.Text,{children:"Budget Status"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(J.Title,{children:["$",(0,D.formatNumberWithCommas)(d.spend,4)]}),(0,l.jsxs)(F.Text,{children:["of"," ",null===d.litellm_budget_table.max_budget?"Unlimited":`$${(0,D.formatNumberWithCommas)(d.litellm_budget_table.max_budget,4)}`]}),d.litellm_budget_table.budget_duration&&(0,l.jsxs)(F.Text,{className:"text-gray-500",children:["Reset: ",d.litellm_budget_table.budget_duration]})]})]}),(0,l.jsxs)(h.Card,{children:[(0,l.jsx)(F.Text,{children:"Rate Limits"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(F.Text,{children:["TPM: ",d.litellm_budget_table.tpm_limit||"Unlimited"]}),(0,l.jsxs)(F.Text,{children:["RPM: ",d.litellm_budget_table.rpm_limit||"Unlimited"]}),d.litellm_budget_table.max_parallel_requests&&(0,l.jsxs)(F.Text,{children:["Max Parallel Requests: ",d.litellm_budget_table.max_parallel_requests]})]})]}),(0,l.jsxs)(h.Card,{children:[(0,l.jsx)(F.Text,{children:"Models"}),(0,l.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===d.models.length?(0,l.jsx)(u.Badge,{color:"red",children:"All proxy models"}):d.models.map((e,a)=>(0,l.jsx)(u.Badge,{color:"red",children:e},a))})]}),(0,l.jsxs)(h.Card,{children:[(0,l.jsx)(F.Text,{children:"Teams"}),(0,l.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:d.teams?.map((e,a)=>(0,l.jsx)(u.Badge,{color:"red",children:P[e.team_id]||e.team_id},a))})]}),(0,l.jsx)(es.default,{objectPermission:d.object_permission,variant:"card",accessToken:t})]})},{key:"members",label:"Members",children:(0,l.jsx)("div",{className:"space-y-4",children:(0,l.jsx)(ea.default,{members:(d.members||[]).map(e=>({role:e.user_role||"",user_id:e.user_id,user_email:e.user_email})),canEdit:N,onEdit:e=>{w(e),f(!0)},onDelete:e=>U(e),onAddMember:()=>b(!0),roleColumnTitle:"Organization Role",extraColumns:ec,emptyText:"No members found"})})},{key:"settings",label:"Settings",children:(0,l.jsxs)(h.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(J.Title,{children:"Organization Settings"}),N&&!g&&(0,l.jsx)(x.Button,{onClick:()=>_(!0),children:"Edit Settings"})]}),g?(0,l.jsxs)(I.Form,{form:m,onFinish:eo,initialValues:{organization_alias:d.organization_alias,models:d.models,tpm_limit:d.litellm_budget_table.tpm_limit,rpm_limit:d.litellm_budget_table.rpm_limit,max_budget:d.litellm_budget_table.max_budget,budget_duration:d.litellm_budget_table.budget_duration,metadata:d.metadata?JSON.stringify(d.metadata,null,2):"",vector_stores:d.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:d.object_permission?.mcp_servers||[],accessGroups:d.object_permission?.mcp_access_groups||[]}},layout:"vertical",children:[(0,l.jsx)(I.Form.Item,{label:"Organization Name",name:"organization_alias",rules:[{required:!0,message:"Please input an organization name"}],children:(0,l.jsx)(M.TextInput,{})}),(0,l.jsx)(I.Form.Item,{label:"Models",name:"models",children:(0,l.jsx)(q.ModelSelect,{value:m.getFieldValue("models"),onChange:e=>m.setFieldValue("models",e),context:"organization",options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!0}})}),(0,l.jsx)(I.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,l.jsx)(ei.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,l.jsx)(I.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,l.jsxs)(A.Select,{placeholder:"n/a",children:[(0,l.jsx)(A.Select.Option,{value:"24h",children:"daily"}),(0,l.jsx)(A.Select.Option,{value:"7d",children:"weekly"}),(0,l.jsx)(A.Select.Option,{value:"30d",children:"monthly"})]})}),(0,l.jsx)(I.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,l.jsx)(ei.default,{step:1,style:{width:"100%"}})}),(0,l.jsx)(I.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,l.jsx)(ei.default,{step:1,style:{width:"100%"}})}),(0,l.jsx)(I.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,l.jsx)(en.default,{onChange:e=>m.setFieldValue("vector_stores",e),value:m.getFieldValue("vector_stores"),accessToken:t||"",placeholder:"Select vector stores"})}),(0,l.jsx)(I.Form.Item,{label:"MCP Servers & Access Groups",name:"mcp_servers_and_groups",children:(0,l.jsx)(E.default,{onChange:e=>m.setFieldValue("mcp_servers_and_groups",e),value:m.getFieldValue("mcp_servers_and_groups"),accessToken:t||"",placeholder:"Select MCP servers and access groups"})}),(0,l.jsx)(I.Form.Item,{label:"Metadata",name:"metadata",children:(0,l.jsx)(O.Input.TextArea,{rows:4})}),(0,l.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,l.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,l.jsx)(x.Button,{variant:"secondary",onClick:()=>_(!1),disabled:z,children:"Cancel"}),(0,l.jsx)(x.Button,{type:"submit",loading:z,children:"Save Changes"})]})})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Organization Name"}),(0,l.jsx)("div",{children:d.organization_alias})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Organization ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.organization_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:new Date(d.created_at).toLocaleString()})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Models"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:d.models.map((e,a)=>(0,l.jsx)(u.Badge,{color:"red",children:e},a))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Rate Limits"}),(0,l.jsxs)("div",{children:["TPM: ",d.litellm_budget_table.tpm_limit||"Unlimited"]}),(0,l.jsxs)("div",{children:["RPM: ",d.litellm_budget_table.rpm_limit||"Unlimited"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Budget"}),(0,l.jsxs)("div",{children:["Max:"," ",null!==d.litellm_budget_table.max_budget?`$${(0,D.formatNumberWithCommas)(d.litellm_budget_table.max_budget,4)}`:"No Limit"]}),(0,l.jsxs)("div",{children:["Reset: ",d.litellm_budget_table.budget_duration||"Never"]})]}),(0,l.jsx)(es.default,{objectPermission:d.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:t})]})]})}]}),(0,l.jsx)(et.default,{isVisible:j,onCancel:()=>b(!1),onSubmit:L,accessToken:t,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,l.jsx)(er.default,{visible:v,onCancel:()=>f(!1),onSubmit:R,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"}]}})]})},ed=async(e,l,a=null,t=null)=>{l(await (0,K.organizationListCall)(e,a,t))};e.s(["default",0,({organizations:e,userRole:a,userModels:t,accessToken:s,lastRefreshed:i,handleRefreshClick:r,currentOrg:Q,guardrailsList:H=[],setOrganizations:$,premiumUser:G})=>{let[W,J]=(0,B.useState)(null),[Y,X]=(0,B.useState)(!1),[Z,ee]=(0,B.useState)(!1),[el,ea]=(0,B.useState)(null),[et,es]=(0,B.useState)(!1),[er,ec]=(0,B.useState)(!1),[em]=I.Form.useForm(),[eu,ex]=(0,B.useState)({}),[eh,eg]=(0,B.useState)(!1),[ep,e_]=(0,B.useState)({org_id:"",org_alias:"",sort_by:"created_at",sort_order:"desc"}),ej=async()=>{if(el&&s)try{es(!0),await (0,K.organizationDeleteCall)(s,el),V.default.success("Organization deleted successfully"),ee(!1),ea(null),await ed(s,$,ep.org_id||null,ep.org_alias||null)}catch(e){console.error("Error deleting organization:",e)}finally{es(!1)}},eb=async e=>{try{if(!s)return;console.log(`values in organizations new create call: ${JSON.stringify(e)}`),(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||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.object_permission={},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.object_permission.mcp_servers=e.allowed_mcp_servers_and_groups.servers),e.allowed_mcp_servers_and_groups.accessGroups?.length>0&&(e.object_permission.mcp_access_groups=e.allowed_mcp_servers_and_groups.accessGroups),delete e.allowed_mcp_servers_and_groups)),await (0,K.organizationCreateCall)(s,e),V.default.success("Organization created successfully"),ec(!1),em.resetFields(),ed(s,$,ep.org_id||null,ep.org_alias||null)}catch(e){console.error("Error creating organization:",e)}};return G?(0,l.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[(0,l.jsx)(p.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,l.jsxs)(g.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[("Admin"===a||"Org Admin"===a)&&(0,l.jsx)(x.Button,{className:"w-fit",onClick:()=>ec(!0),children:"+ Create New Organization"}),W?(0,l.jsx)(eo,{organizationId:W,onClose:()=>{J(null),X(!1)},accessToken:s,is_org_admin:!0,is_proxy_admin:"Admin"===a,userModels:t,editOrg:Y}):(0,l.jsxs)(b.TabGroup,{className:"gap-2 h-[75vh] w-full",children:[(0,l.jsxs)(z.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,l.jsx)("div",{className:"flex",children:(0,l.jsx)(j.Tab,{children:"Your Organizations"})}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[i&&(0,l.jsxs)(F.Text,{children:["Last Refreshed: ",i]}),(0,l.jsx)(_.Icon,{icon:m.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:r})]})]}),(0,l.jsx)(N.TabPanels,{children:(0,l.jsxs)(S.TabPanel,{children:[(0,l.jsx)(F.Text,{children:"Click on “Organization ID” to view organization details."}),(0,l.jsx)(p.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,l.jsx)(g.Col,{numColSpan:1,children:(0,l.jsxs)(h.Card,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,l.jsx)("div",{className:"border-b px-6 py-4",children:(0,l.jsx)("div",{className:"flex flex-col space-y-4",children:(0,l.jsx)(n,{filters:ep,showFilters:eh,onToggleFilters:eg,onChange:(e,l)=>{let a={...ep,[e]:l};e_(a),s&&(0,K.organizationListCall)(s,a.org_id||null,a.org_alias||null).then(e=>{e&&$(e)}).catch(e=>{console.error("Error fetching organizations:",e)})},onReset:()=>{e_({org_id:"",org_alias:"",sort_by:"created_at",sort_order:"desc"}),s&&(0,K.organizationListCall)(s,null,null).then(e=>{e&&$(e)}).catch(e=>{console.error("Error fetching organizations:",e)})}})})}),(0,l.jsxs)(v.Table,{children:[(0,l.jsx)(w.TableHead,{children:(0,l.jsxs)(T.TableRow,{children:[(0,l.jsx)(C.TableHeaderCell,{children:"Organization ID"}),(0,l.jsx)(C.TableHeaderCell,{children:"Organization Name"}),(0,l.jsx)(C.TableHeaderCell,{children:"Created"}),(0,l.jsx)(C.TableHeaderCell,{children:"Spend (USD)"}),(0,l.jsx)(C.TableHeaderCell,{children:"Budget (USD)"}),(0,l.jsx)(C.TableHeaderCell,{children:"Models"}),(0,l.jsx)(C.TableHeaderCell,{children:"TPM / RPM Limits"}),(0,l.jsx)(C.TableHeaderCell,{children:"Info"}),(0,l.jsx)(C.TableHeaderCell,{children:"Actions"})]})}),(0,l.jsx)(f.TableBody,{children:e&&e.length>0?e.sort((e,l)=>new Date(l.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,l.jsxs)(T.TableRow,{children:[(0,l.jsx)(y.TableCell,{children:(0,l.jsx)("div",{className:"overflow-hidden",children:(0,l.jsx)(P.Tooltip,{title:e.organization_id,children:(0,l.jsxs)(x.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>J(e.organization_id),children:[e.organization_id?.slice(0,7),"..."]})})})}),(0,l.jsx)(y.TableCell,{children:e.organization_alias}),(0,l.jsx)(y.TableCell,{children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,l.jsx)(y.TableCell,{children:(0,D.formatNumberWithCommas)(e.spend,4)}),(0,l.jsx)(y.TableCell,{children:e.litellm_budget_table?.max_budget!==null&&e.litellm_budget_table?.max_budget!==void 0?e.litellm_budget_table?.max_budget:"No limit"}),(0,l.jsx)(y.TableCell,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:e.models.length>3?"px-0":"",children:(0,l.jsx)("div",{className:"flex flex-col",children:Array.isArray(e.models)?(0,l.jsx)("div",{className:"flex flex-col",children:0===e.models.length?(0,l.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,l.jsx)(F.Text,{children:"All Proxy Models"})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"flex items-start",children:[e.models.length>3&&(0,l.jsx)("div",{children:(0,l.jsx)(_.Icon,{icon:eu[e.organization_id||""]?d.ChevronDownIcon:c.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{ex(l=>({...l,[e.organization_id||""]:!l[e.organization_id||""]}))}})}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.models.slice(0,3).map((e,a)=>"all-proxy-models"===e?(0,l.jsx)(u.Badge,{size:"xs",color:"red",children:(0,l.jsx)(F.Text,{children:"All Proxy Models"})},a):(0,l.jsx)(u.Badge,{size:"xs",color:"blue",children:(0,l.jsx)(F.Text,{children:e.length>30?`${(0,U.getModelDisplayName)(e).slice(0,30)}...`:(0,U.getModelDisplayName)(e)})},a)),e.models.length>3&&!eu[e.organization_id||""]&&(0,l.jsx)(u.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,l.jsxs)(F.Text,{children:["+",e.models.length-3," ",e.models.length-3==1?"more model":"more models"]})}),eu[e.organization_id||""]&&(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:e.models.slice(3).map((e,a)=>"all-proxy-models"===e?(0,l.jsx)(u.Badge,{size:"xs",color:"red",children:(0,l.jsx)(F.Text,{children:"All Proxy Models"})},a+3):(0,l.jsx)(u.Badge,{size:"xs",color:"blue",children:(0,l.jsx)(F.Text,{children:e.length>30?`${(0,U.getModelDisplayName)(e).slice(0,30)}...`:(0,U.getModelDisplayName)(e)})},a+3))})]})]})})}):null})}),(0,l.jsx)(y.TableCell,{children:(0,l.jsxs)(F.Text,{children:["TPM:"," ",e.litellm_budget_table?.tpm_limit?e.litellm_budget_table?.tpm_limit:"Unlimited",(0,l.jsx)("br",{}),"RPM:"," ",e.litellm_budget_table?.rpm_limit?e.litellm_budget_table?.rpm_limit:"Unlimited"]})}),(0,l.jsx)(y.TableCell,{children:(0,l.jsxs)(F.Text,{children:[e.members?.length||0," Members"]})}),(0,l.jsx)(y.TableCell,{children:"Admin"===a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(R.default,{variant:"Edit",tooltipText:"Edit organization",onClick:()=>{J(e.organization_id),X(!0)}}),(0,l.jsx)(R.default,{variant:"Delete",tooltipText:"Delete organization",onClick:()=>{var l;(l=e.organization_id)&&(ea(l),ee(!0))}})]})})]},e.organization_id)):null})]})]})})})]})})]})]})}),(0,l.jsx)(k.Modal,{title:"Create Organization",visible:er,width:800,footer:null,onCancel:()=>{ec(!1),em.resetFields()},children:(0,l.jsxs)(I.Form,{form:em,onFinish:eb,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,l.jsx)(I.Form.Item,{label:"Organization Name",name:"organization_alias",rules:[{required:!0,message:"Please input an organization name"}],children:(0,l.jsx)(M.TextInput,{placeholder:""})}),(0,l.jsx)(I.Form.Item,{label:"Models",name:"models",children:(0,l.jsx)(q.ModelSelect,{options:{showAllProxyModelsOverride:!0,includeSpecialOptions:!0},value:em.getFieldValue("models"),onChange:e=>em.setFieldValue("models",e),context:"organization"})}),(0,l.jsx)(I.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,l.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,l.jsx)(I.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,l.jsxs)(A.Select,{defaultValue:null,placeholder:"n/a",children:[(0,l.jsx)(A.Select.Option,{value:"24h",children:"daily"}),(0,l.jsx)(A.Select.Option,{value:"7d",children:"weekly"}),(0,l.jsx)(A.Select.Option,{value:"30d",children:"monthly"})]})}),(0,l.jsx)(I.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,l.jsx)(ei.default,{step:1,width:400})}),(0,l.jsx)(I.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,l.jsx)(ei.default,{step:1,width:400})}),(0,l.jsx)(I.Form.Item,{label:(0,l.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,l.jsx)(P.Tooltip,{title:"Select which vector stores this organization can access by default. Leave empty for access to all vector stores",children:(0,l.jsx)(o.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this organization can access. Leave empty for access to all vector stores",children:(0,l.jsx)(en.default,{onChange:e=>em.setFieldValue("allowed_vector_store_ids",e),value:em.getFieldValue("allowed_vector_store_ids"),accessToken:s||"",placeholder:"Select vector stores (optional)"})}),(0,l.jsx)(I.Form.Item,{label:(0,l.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,l.jsx)(P.Tooltip,{title:"Select which MCP servers and access groups this organization can access by default.",children:(0,l.jsx)(o.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers and access groups this organization can access.",children:(0,l.jsx)(E.default,{onChange:e=>em.setFieldValue("allowed_mcp_servers_and_groups",e),value:em.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:s||"",placeholder:"Select MCP servers and access groups (optional)"})}),(0,l.jsx)(I.Form.Item,{label:"Metadata",name:"metadata",children:(0,l.jsx)(O.Input.TextArea,{rows:4})}),(0,l.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,l.jsx)(x.Button,{type:"submit",children:"Create Organization"})})]})}),(0,l.jsx)(L.default,{isOpen:Z,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:el,code:!0}],onCancel:()=>{ee(!1),ea(null)},onOk:ej,confirmLoading:et})]}):(0,l.jsx)("div",{children:(0,l.jsxs)(F.Text,{children:["This is a LiteLLM Enterprise feature, and requires a valid key to use. Get a trial key"," ",(0,l.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})},"fetchOrganizations",0,ed],846835)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2888b590cf1e5a4a.js b/litellm/proxy/_experimental/out/_next/static/chunks/2888b590cf1e5a4a.js new file mode 100644 index 0000000000..5155fd8e62 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/2888b590cf1e5a4a.js @@ -0,0 +1,10 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,869216,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(908206),l=e.i(242064),a=e.i(517455),i=e.i(150073);let o={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 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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r},u=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let m=e=>{let{itemPrefixCls:n,component:l,span:a,className:i,style:o,labelStyle:d,contentStyle:c,bordered:u,label:m,content:g,colon:b,type:f,styles:p}=e,{classNames:h}=t.useContext(s),v=Object.assign(Object.assign({},d),null==p?void 0:p.label),y=Object.assign(Object.assign({},c),null==p?void 0:p.content);if(u)return t.createElement(l,{colSpan:a,style:o,className:(0,r.default)(i,{[`${n}-item-${f}`]:"label"===f||"content"===f,[null==h?void 0:h.label]:(null==h?void 0:h.label)&&"label"===f,[null==h?void 0:h.content]:(null==h?void 0:h.content)&&"content"===f})},null!=m&&t.createElement("span",{style:v},m),null!=g&&t.createElement("span",{style:y},g));return t.createElement(l,{colSpan:a,style:o,className:(0,r.default)(`${n}-item`,i)},t.createElement("div",{className:`${n}-item-container`},null!=m&&t.createElement("span",{style:v,className:(0,r.default)(`${n}-item-label`,null==h?void 0:h.label,{[`${n}-item-no-colon`]:!b})},m),null!=g&&t.createElement("span",{style:y,className:(0,r.default)(`${n}-item-content`,null==h?void 0:h.content)},g)))};function g(e,{colon:r,prefixCls:n,bordered:l},{component:a,type:i,showLabel:o,showContent:s,labelStyle:d,contentStyle:c,styles:u}){return e.map(({label:e,children:g,prefixCls:b=n,className:f,style:p,labelStyle:h,contentStyle:v,span:y=1,key:$,styles:x},O)=>"string"==typeof a?t.createElement(m,{key:`${i}-${$||O}`,className:f,style:p,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),h),null==x?void 0:x.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),v),null==x?void 0:x.content)},span:y,colon:r,component:a,itemPrefixCls:b,bordered:l,label:o?e:null,content:s?g:null,type:i}):[t.createElement(m,{key:`label-${$||O}`,className:f,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),p),h),null==x?void 0:x.label),span:1,colon:r,component:a[0],itemPrefixCls:b,bordered:l,label:e,type:"label"}),t.createElement(m,{key:`content-${$||O}`,className:f,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),p),v),null==x?void 0:x.content),span:2*y-1,component:a[1],itemPrefixCls:b,bordered:l,content:g,type:"content"})])}let b=e=>{let r=t.useContext(s),{prefixCls:n,vertical:l,row:a,index:i,bordered:o}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${n}-row`},g(a,e,Object.assign({component:"th",type:"label",showLabel:!0},r))),t.createElement("tr",{key:`content-${i}`,className:`${n}-row`},g(a,e,Object.assign({component:"td",type:"content",showContent:!0},r)))):t.createElement("tr",{key:i,className:`${n}-row`},g(a,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},r)))};e.i(296059);var f=e.i(915654),p=e.i(183293),h=e.i(246422),v=e.i(838378);let y=(0,h.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:r,itemPaddingBottom:n,itemPaddingEnd:l,colonMarginRight:a,colonMarginLeft:i,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,p.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:r}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,f.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,f.unit)(e.padding)} ${(0,f.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:r,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.paddingSM)} ${(0,f.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.paddingXS)} ${(0,f.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:o},[`${t}-title`]:Object.assign(Object.assign({},p.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:r,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:n,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,f.unit)(i)} ${(0,f.unit)(a)}`},[`&${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,v.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 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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let x=e=>{let m,{prefixCls:g,title:f,extra:p,column:h,colon:v=!0,bordered:x,layout:O,children:S,className:j,rootClassName:w,style:E,size:C,labelStyle:T,contentStyle:k,styles:N,items:L,classNames:M}=e,R=$(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:B,direction:P,className:z,style:I,classNames:H,styles:F}=(0,l.useComponentConfig)("descriptions"),W=B("descriptions",g),A=(0,i.default)(),G=t.useMemo(()=>{var e;return"number"==typeof h?h:null!=(e=(0,n.matchScreen)(A,Object.assign(Object.assign({},o),h)))?e:3},[A,h]),D=(m=t.useMemo(()=>L||(0,d.default)(S).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[L,S]),t.useMemo(()=>m.map(e=>{var{span:t}=e,r=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},r),{filled:!0}):Object.assign(Object.assign({},r),{span:"number"==typeof t?t:(0,n.matchScreen)(A,t)})}),[m,A])),X=(0,a.default)(C),V=((e,r)=>{let[n,l]=(0,t.useMemo)(()=>{let t,n,l,a;return t=[],n=[],l=!1,a=0,r.filter(e=>e).forEach(r=>{let{filled:i}=r,o=u(r,["filled"]);if(i){n.push(o),t.push(n),n=[],a=0;return}let s=e-a;(a+=r.span||1)>=e?(a>e?(l=!0,n.push(Object.assign(Object.assign({},o),{span:s}))):n.push(o),t.push(n),n=[],a=0):n.push(o)}),n.length>0&&t.push(n),[t=t.map(t=>{let r=t.reduce((e,t)=>e+(t.span||1),0);if(r({labelStyle:T,contentStyle:k,styles:{content:Object.assign(Object.assign({},F.content),null==N?void 0:N.content),label:Object.assign(Object.assign({},F.label),null==N?void 0:N.label)},classNames:{label:(0,r.default)(H.label,null==M?void 0:M.label),content:(0,r.default)(H.content,null==M?void 0:M.content)}}),[T,k,N,M,H,F]);return q(t.createElement(s.Provider,{value:U},t.createElement("div",Object.assign({className:(0,r.default)(W,z,H.root,null==M?void 0:M.root,{[`${W}-${X}`]:X&&"default"!==X,[`${W}-bordered`]:!!x,[`${W}-rtl`]:"rtl"===P},j,w,_,K),style:Object.assign(Object.assign(Object.assign(Object.assign({},I),F.root),null==N?void 0:N.root),E)},R),(f||p)&&t.createElement("div",{className:(0,r.default)(`${W}-header`,H.header,null==M?void 0:M.header),style:Object.assign(Object.assign({},F.header),null==N?void 0:N.header)},f&&t.createElement("div",{className:(0,r.default)(`${W}-title`,H.title,null==M?void 0:M.title),style:Object.assign(Object.assign({},F.title),null==N?void 0:N.title)},f),p&&t.createElement("div",{className:(0,r.default)(`${W}-extra`,H.extra,null==M?void 0:M.extra),style:Object.assign(Object.assign({},F.extra),null==N?void 0:N.extra)},p)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,V.map((e,r)=>t.createElement(b,{key:r,index:r,colon:v,prefixCls:W,vertical:"vertical"===O,bordered:x,row:e}))))))))};x.Item=({children:e})=>e,e.s(["Descriptions",0,x],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={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),a=r.forwardRef(function(e,a){return r.createElement(l.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["ExclamationCircleOutlined",0,a],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(529681),l=e.i(242064),a=e.i(517455),i=e.i(185793),o=e.i(721369),s=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let d=e=>{var{prefixCls:n,className:a,hoverable:i=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("card",n),u=(0,r.default)(`${c}-grid`,a,{[`${c}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},o,{className:u}))};e.i(296059);var c=e.i(915654),u=e.i(183293),m=e.i(246422),g=e.i(838378);let b=(0,m.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:r,cardHeadPadding:n,colorBorderSecondary:l,boxShadowTertiary:a,bodyPadding:i,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:a},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:n,headerPadding:l,tabsMarginBottom:a}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,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),{[` + > ${r}-typography, + > ${r}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:a,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:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:i,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:n,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${(0,c.unit)(l)} 0 0 0 ${r}, + 0 ${(0,c.unit)(l)} 0 0 ${r}, + ${(0,c.unit)(l)} ${(0,c.unit)(l)} 0 0 ${r}, + ${(0,c.unit)(l)} 0 0 0 ${r} inset, + 0 ${(0,c.unit)(l)} 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,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:r,actionsLiMargin:n,cardActionsIconSize:l,colorBorderSecondary:a,actionsBg:i}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:i,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${a}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.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,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:l,lineHeight:(0,c.unit)(e.calc(l).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${a}`}}})})(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:r}},[`${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:n}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:r,headerPadding:n,bodyPadding:l}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(n)}`,background:r,"&-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:r,headerPaddingSM:n,headerHeightSM:l,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:l,padding:`0 ${(0,c.unit)(n)}`,fontSize:a,[`> ${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),p=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let h=e=>{let{actionClasses:r,actions:n=[],actionStyle:l}=e;return t.createElement("ul",{className:r,style:l},n.map((e,r)=>{let l=`action-${r}`;return t.createElement("li",{style:{width:`${100/n.length}%`},key:l},t.createElement("span",null,e))}))},v=t.forwardRef((e,s)=>{let c,{prefixCls:u,className:m,rootClassName:g,style:v,extra:y,headStyle:$={},bodyStyle:x={},title:O,loading:S,bordered:j,variant:w,size:E,type:C,cover:T,actions:k,tabList:N,children:L,activeTabKey:M,defaultActiveTabKey:R,tabBarExtraContent:B,hoverable:P,tabProps:z={},classNames:I,styles:H}=e,F=p(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:G}=t.useContext(l.ConfigContext),[D]=(0,f.default)("card",w,j),X=e=>{var t;return(0,r.default)(null==(t=null==G?void 0:G.classNames)?void 0:t[e],null==I?void 0:I[e])},V=e=>{var t;return Object.assign(Object.assign({},null==(t=null==G?void 0:G.styles)?void 0:t[e]),null==H?void 0:H[e])},q=t.useMemo(()=>{let e=!1;return t.Children.forEach(L,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[L]),_=W("card",u),[K,U,Z]=b(_),Q=t.createElement(i.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},L),J=void 0!==M,Y=Object.assign(Object.assign({},z),{[J?"activeKey":"defaultActiveKey"]:J?M:R,tabBarExtraContent:B}),ee=(0,a.default)(E),et=ee&&"default"!==ee?ee:"large",er=N?t.createElement(o.default,Object.assign({size:et},Y,{className:`${_}-head-tabs`,onChange:t=>{var r;null==(r=e.onTabChange)||r.call(e,t)},items:N.map(e=>{var{tab:t}=e;return Object.assign({label:t},p(e,["tab"]))})})):null;if(O||y||er){let e=(0,r.default)(`${_}-head`,X("header")),n=(0,r.default)(`${_}-head-title`,X("title")),l=(0,r.default)(`${_}-extra`,X("extra")),a=Object.assign(Object.assign({},$),V("header"));c=t.createElement("div",{className:e,style:a},t.createElement("div",{className:`${_}-head-wrapper`},O&&t.createElement("div",{className:n,style:V("title")},O),y&&t.createElement("div",{className:l,style:V("extra")},y)),er)}let en=(0,r.default)(`${_}-cover`,X("cover")),el=T?t.createElement("div",{className:en,style:V("cover")},T):null,ea=(0,r.default)(`${_}-body`,X("body")),ei=Object.assign(Object.assign({},x),V("body")),eo=t.createElement("div",{className:ea,style:ei},S?Q:L),es=(0,r.default)(`${_}-actions`,X("actions")),ed=(null==k?void 0:k.length)?t.createElement(h,{actionClasses:es,actionStyle:V("actions"),actions:k}):null,ec=(0,n.default)(F,["onTabChange"]),eu=(0,r.default)(_,null==G?void 0:G.className,{[`${_}-loading`]:S,[`${_}-bordered`]:"borderless"!==D,[`${_}-hoverable`]:P,[`${_}-contain-grid`]:q,[`${_}-contain-tabs`]:null==N?void 0:N.length,[`${_}-${ee}`]:ee,[`${_}-type-${C}`]:!!C,[`${_}-rtl`]:"rtl"===A},m,g,U,Z),em=Object.assign(Object.assign({},null==G?void 0:G.style),v);return K(t.createElement("div",Object.assign({ref:s},ec,{className:eu,style:em}),c,el,eo,ed))});var y=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};v.Grid=d,v.Meta=e=>{let{prefixCls:n,className:a,avatar:i,title:o,description:s}=e,d=y(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(l.ConfigContext),u=c("card",n),m=(0,r.default)(`${u}-meta`,a),g=i?t.createElement("div",{className:`${u}-meta-avatar`},i):null,b=o?t.createElement("div",{className:`${u}-meta-title`},o):null,f=s?t.createElement("div",{className:`${u}-meta-description`},s):null,p=b||f?t.createElement("div",{className:`${u}-meta-detail`},b,f):null;return t.createElement("div",Object.assign({},d,{className:m}),g,p)},e.s(["Card",0,v],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),r=e.i(560445),n=e.i(175712),l=e.i(869216),a=e.i(311451),i=e.i(212931),o=e.i(898586);e.i(296059);var s=e.i(868297),d=e.i(732961),c=e.i(289882),u=e.i(170517),m=e.i(628882),g=e.i(320890),b=e.i(104458),f=e.i(722319),p=e.i(8398),h=e.i(279728);e.i(765846);var v=e.i(602716),y=e.i(328052);e.i(262370);var $=e.i(135551);let x=(e,t)=>new $.FastColor(e).setA(t).toRgbString(),O=(e,t)=>new $.FastColor(e).lighten(t).toHexString(),S=e=>{let t=(0,v.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]}},j=(e,t)=>{let r=e||"#000",n=t||"#fff";return{colorBgBase:r,colorTextBase:n,colorText:x(n,.85),colorTextSecondary:x(n,.65),colorTextTertiary:x(n,.45),colorTextQuaternary:x(n,.25),colorFill:x(n,.18),colorFillSecondary:x(n,.12),colorFillTertiary:x(n,.08),colorFillQuaternary:x(n,.04),colorBgSolid:x(n,.95),colorBgSolidHover:x(n,1),colorBgSolidActive:x(n,.9),colorBgElevated:O(r,12),colorBgContainer:O(r,8),colorBgLayout:O(r,0),colorBgSpotlight:O(r,26),colorBgBlur:x(n,.04),colorBorder:O(r,26),colorBorderSecondary:O(r,19)}},w={defaultSeed:g.defaultConfig.token,useToken:function(){let[e,t,r]=(0,b.useToken)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:f.default,darkAlgorithm:(e,t)=>{let r=Object.keys(u.defaultPresetColors).map(t=>{let r=(0,v.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,n,l)=>(e[`${t}-${l+1}`]=r[l],e[`${t}${l+1}`]=r[l],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),n=null!=t?t:(0,f.default)(e),l=(0,y.default)(e,{generateColorPalettes:S,generateNeutralColorPalettes:j});return Object.assign(Object.assign(Object.assign(Object.assign({},n),r),l),{colorPrimaryBg:l.colorPrimaryBorder,colorPrimaryBgHover:l.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,f.default)(e),n=r.fontSizeSM,l=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,n=r-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}(null!=t?t:e)),(0,h.default)(n)),{controlHeight:l}),(0,p.default)(Object.assign(Object.assign({},r),{controlHeight:l})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):c.default,r=Object.assign(Object.assign({},u.default),null==e?void 0:e.token);return(0,d.getComputedToken)(r,{override:null==e?void 0:e.token},t,m.default)},defaultConfig:g.defaultConfig,_internalContext:g.DesignTokenContext};e.s(["theme",0,w],368869);var E=e.i(270377),C=e.i(271645);function T({isOpen:e,title:s,alertMessage:d,message:c,resourceInformationTitle:u,resourceInformation:m,onCancel:g,onOk:b,confirmLoading:f,requiredConfirmation:p}){let{Title:h,Text:v}=o.Typography,{token:y}=w.useToken(),[$,x]=(0,C.useState)("");return(0,C.useEffect)(()=>{e&&x("")},[e]),(0,t.jsx)(i.Modal,{title:s,open:e,onOk:b,onCancel:g,confirmLoading:f,okText:f?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!p&&$!==p||f},cancelButtonProps:{disabled:f},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(r.Alert,{message:d,type:"warning"}),(0,t.jsx)(n.Card,{title:u,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:y.colorErrorBg,borderColor:y.colorErrorBorder}},style:{backgroundColor:y.colorErrorBg,borderColor:y.colorErrorBorder},children:(0,t.jsx)(l.Descriptions,{column:1,size:"small",children:m&&m.map(({label:e,value:r,...n})=>(0,t.jsx)(l.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(v,{...n,children:r??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(v,{children:c})}),p&&(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:p}),(0,t.jsx)(v,{children:" to confirm deletion:"})]}),(0,t.jsx)(a.Input,{value:$,onChange:e=>x(e.target.value),placeholder:p,className:"rounded-md",prefix:(0,t.jsx)(E.ExclamationCircleOutlined,{style:{color:y.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>T],127952)},530212,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 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,r],530212)},888288,e=>{"use strict";var t=e.i(271645);let r=(e,r)=>{let n=void 0!==r,[l,a]=(0,t.useState)(e);return[n?r:l,e=>{n||a(e)}]};e.s(["default",()=>r])},757440,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let n=e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>n])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),n=e.i(271645);let l=e=>{var t=(0,r.__rest)(e,[]);return n.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),n.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"}))};e.s(["default",()=>l],446428);var a=e.i(746725),i=e.i(914189),o=e.i(553521),s=e.i(835696),d=e.i(941444),c=e.i(178677),u=e.i(294316),m=e.i(83733),g=e.i(233137),b=e.i(732607),f=e.i(397701),p=e.i(700020);function h(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:S)!==n.Fragment||1===n.default.Children.count(e.children)}let v=(0,n.createContext)(null);v.displayName="TransitionContext";var y=((t=y||{}).Visible="visible",t.Hidden="hidden",t);let $=(0,n.createContext)(null);function x(e){return"children"in e?x(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function O(e,t){let r=(0,d.useLatestValue)(e),l=(0,n.useRef)([]),s=(0,o.useIsMounted)(),c=(0,a.useDisposables)(),u=(0,i.useEvent)((e,t=p.RenderStrategy.Hidden)=>{let n=l.current.findIndex(({el:t})=>t===e);-1!==n&&((0,f.match)(t,{[p.RenderStrategy.Unmount](){l.current.splice(n,1)},[p.RenderStrategy.Hidden](){l.current[n].state="hidden"}}),c.microTask(()=>{var e;!x(l)&&s.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,i.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)}),g=(0,n.useRef)([]),b=(0,n.useRef)(Promise.resolve()),h=(0,n.useRef)({enter:[],leave:[]}),v=(0,i.useEvent)((e,r,n)=>{g.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=>{g.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(h.current[r].map(([e,t])=>t)).then(()=>e())})]),"enter"===r?b.current=b.current.then(()=>null==t?void 0:t.wait.current).then(()=>n(r)):n(r)}),y=(0,i.useEvent)((e,t,r)=>{Promise.all(h.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=g.current.shift())||e()}).then(()=>r(t))});return(0,n.useMemo)(()=>({children:l,register:m,unregister:u,onStart:v,onStop:y,wait:b,chains:h}),[m,u,l,v,y,h,b])}$.displayName="NestingContext";let S=n.Fragment,j=p.RenderFeatures.RenderStrategy,w=(0,p.forwardRefWithAs)(function(e,t){let{show:r,appear:l=!1,unmount:a=!0,...o}=e,d=(0,n.useRef)(null),m=h(e),b=(0,u.useSyncRefs)(...m?[d,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let f=(0,g.useOpenClosed)();if(void 0===r&&null!==f&&(r=(f&g.State.Open)===g.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[y,S]=(0,n.useState)(r?"visible":"hidden"),w=O(()=>{r||S("hidden")}),[C,T]=(0,n.useState)(!0),k=(0,n.useRef)([r]);(0,s.useIsoMorphicEffect)(()=>{!1!==C&&k.current[k.current.length-1]!==r&&(k.current.push(r),T(!1))},[k,r]);let N=(0,n.useMemo)(()=>({show:r,appear:l,initial:C}),[r,l,C]);(0,s.useIsoMorphicEffect)(()=>{r?S("visible"):x(w)||null===d.current||S("hidden")},[r,w]);let L={unmount:a},M=(0,i.useEvent)(()=>{var t;C&&T(!1),null==(t=e.beforeEnter)||t.call(e)}),R=(0,i.useEvent)(()=>{var t;C&&T(!1),null==(t=e.beforeLeave)||t.call(e)}),B=(0,p.useRender)();return n.default.createElement($.Provider,{value:w},n.default.createElement(v.Provider,{value:N},B({ourProps:{...L,as:n.Fragment,children:n.default.createElement(E,{ref:b,...L,...o,beforeEnter:M,beforeLeave:R})},theirProps:{},defaultTag:n.Fragment,features:j,visible:"visible"===y,name:"Transition"})))}),E=(0,p.forwardRefWithAs)(function(e,t){var r,l;let{transition:a=!0,beforeEnter:o,afterEnter:d,beforeLeave:y,afterLeave:w,enter:E,enterFrom:C,enterTo:T,entered:k,leave:N,leaveFrom:L,leaveTo:M,...R}=e,[B,P]=(0,n.useState)(null),z=(0,n.useRef)(null),I=h(e),H=(0,u.useSyncRefs)(...I?[z,t,P]:null===t?[]:[t]),F=null==(r=R.unmount)||r?p.RenderStrategy.Unmount:p.RenderStrategy.Hidden,{show:W,appear:A,initial:G}=function(){let e=(0,n.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[D,X]=(0,n.useState)(W?"visible":"hidden"),V=function(){let e=(0,n.useContext)($);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:q,unregister:_}=V;(0,s.useIsoMorphicEffect)(()=>q(z),[q,z]),(0,s.useIsoMorphicEffect)(()=>{if(F===p.RenderStrategy.Hidden&&z.current)return W&&"visible"!==D?void X("visible"):(0,f.match)(D,{hidden:()=>_(z),visible:()=>q(z)})},[D,z,q,_,W,F]);let K=(0,c.useServerHandoffComplete)();(0,s.useIsoMorphicEffect)(()=>{if(I&&K&&"visible"===D&&null===z.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[z,D,K,I]);let U=G&&!A,Z=A&&W&&G,Q=(0,n.useRef)(!1),J=O(()=>{Q.current||(X("hidden"),_(z))},V),Y=(0,i.useEvent)(e=>{Q.current=!0,J.onStart(z,e?"enter":"leave",e=>{"enter"===e?null==o||o():"leave"===e&&(null==y||y())})}),ee=(0,i.useEvent)(e=>{let t=e?"enter":"leave";Q.current=!1,J.onStop(z,t,e=>{"enter"===e?null==d||d():"leave"===e&&(null==w||w())}),"leave"!==t||x(J)||(X("hidden"),_(z))});(0,n.useEffect)(()=>{I&&a||(Y(W),ee(W))},[W,I,a]);let et=!(!a||!I||!K||U),[,er]=(0,m.useTransition)(et,B,W,{start:Y,end:ee}),en=(0,p.compact)({ref:H,className:(null==(l=(0,b.classNames)(R.className,Z&&E,Z&&C,er.enter&&E,er.enter&&er.closed&&C,er.enter&&!er.closed&&T,er.leave&&N,er.leave&&!er.closed&&L,er.leave&&er.closed&&M,!er.transition&&W&&k))?void 0:l.trim())||void 0,...(0,m.transitionDataAttributes)(er)}),el=0;"visible"===D&&(el|=g.State.Open),"hidden"===D&&(el|=g.State.Closed),er.enter&&(el|=g.State.Opening),er.leave&&(el|=g.State.Closing);let ea=(0,p.useRender)();return n.default.createElement($.Provider,{value:J},n.default.createElement(g.OpenClosedProvider,{value:el},ea({ourProps:en,theirProps:R,defaultTag:S,features:j,visible:"visible"===D,name:"Transition.Child"})))}),C=(0,p.forwardRefWithAs)(function(e,t){let r=null!==(0,n.useContext)(v),l=null!==(0,g.useOpenClosed)();return n.default.createElement(n.default.Fragment,null,!r&&l?n.default.createElement(w,{ref:t,...e}):n.default.createElement(E,{ref:t,...e}))}),T=Object.assign(w,{Child:C,Root:w});e.s(["Transition",()=>T],854056)},206929,e=>{"use strict";var t=e.i(290571),r=e.i(757440),n=e.i(271645),l=e.i(446428),a=e.i(444755),i=e.i(673706),o=e.i(103471),s=e.i(495470),d=e.i(854056),c=e.i(888288);let u=(0,i.makeClassName)("Select"),m=n.default.forwardRef((e,i)=>{let{defaultValue:m="",value:g,onValueChange:b,placeholder:f="Select...",disabled:p=!1,icon:h,enableClear:v=!1,required:y,children:$,name:x,error:O=!1,errorMessage:S,className:j,id:w}=e,E=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),C=(0,n.useRef)(null),T=n.Children.toArray($),[k,N]=(0,c.default)(m,g),L=(0,n.useMemo)(()=>{let e=n.default.Children.toArray($).filter(n.isValidElement);return(0,o.constructValueToNameMapping)(e)},[$]);return n.default.createElement("div",{className:(0,a.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",j)},n.default.createElement("div",{className:"relative"},n.default.createElement("select",{title:"select-hidden",required:y,className:(0,a.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:k,onChange:e=>{e.preventDefault()},name:x,disabled:p,id:w,onFocus:()=>{let e=C.current;e&&e.focus()}},n.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},f),T.map(e=>{let t=e.props.value,r=e.props.children;return n.default.createElement("option",{className:"hidden",key:t,value:t},r)})),n.default.createElement(s.Listbox,Object.assign({as:"div",ref:i,defaultValue:k,value:k,onChange:e=>{null==b||b(e),N(e)},disabled:p,id:w},E),({value:e})=>{var t;return n.default.createElement(n.default.Fragment,null,n.default.createElement(s.ListboxButton,{ref:C,className:(0,a.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",h?"pl-10":"pl-3",(0,o.getSelectButtonColors)((0,o.hasValue)(e),p,O))},h&&n.default.createElement("span",{className:(0,a.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},n.default.createElement(h,{className:(0,a.tremorTwMerge)(u("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),n.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=L.get(e))?t:f),n.default.createElement("span",{className:(0,a.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},n.default.createElement(r.default,{className:(0,a.tremorTwMerge)(u("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),v&&k?n.default.createElement("button",{type:"button",className:(0,a.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),N(""),null==b||b("")}},n.default.createElement(l.default,{className:(0,a.tremorTwMerge)(u("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,n.default.createElement(d.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},n.default.createElement(s.ListboxOptions,{anchor:"bottom start",className:(0,a.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},$)))})),O&&S?n.default.createElement("p",{className:(0,a.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},S):null)});m.displayName="Select",e.s(["Select",()=>m],206929)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/29eca5447bef7f55.js b/litellm/proxy/_experimental/out/_next/static/chunks/29eca5447bef7f55.js new file mode 100644 index 0000000000..e42812af0a --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/29eca5447bef7f55.js @@ -0,0 +1,3 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.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",()=>a],283086);let l=(0,s.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",()=>l],195116)},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 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"}]])},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,x=e.i(755151),m=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(x.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,m.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,m.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,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:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"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,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[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 ${a?"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 ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(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:l(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},i=(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}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,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 ${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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),x=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=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)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{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)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(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 a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{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 gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(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:[n(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:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{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)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`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)(d,{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)(o,{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 p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},m=(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}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(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:()=>n(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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({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 a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=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)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&m(`${i} blocked`,"red"),n>0&&m(`${n} masked`,"blue"),0===i&&0===n&&m("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&m(`${a.length} patterns`,"slate"),l.length>0&&m(`${l.length} keywords`,"slate"),r.length>0&&m(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",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.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{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)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",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.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:m(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(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"})]}),y=()=>(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"})]}),j=()=>(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"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(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:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(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:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded 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:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(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))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,x]=(0,s.useState)(!1),[m,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),x(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>x(!1))},[e,a]),(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)(b,{title:"EU AI Act",data:l,loading:o,error:m}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(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},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,C=()=>(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"})]}),T=({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"})]}),L=({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"})]}),M=()=>(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"})]}),A=()=>(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"})}),D=({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"})}),E=()=>(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"})}),I=({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 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,z=({response:e})=>{let[a,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(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(D,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},O=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);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:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(A,{}):"llm"===e.type?(0,t.jsx)(M,{}):e.isSuccess?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),m=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(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))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} 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:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),(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:m}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),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 text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(D,{expanded:n})]})]}),n&&(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)(I,{matchDetails:e.match_details}),c>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 text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(x,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(z,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm 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)(C,{}),(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:[r.length," guardrail",1!==r.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 ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(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,i," 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(r,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)(E,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,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)(O,{entries:r})}),(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:r.map((e,s)=>(0,t.jsx)(R,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},869939,e=>{"use strict";var t=e.i(843476),s=e.i(175712),a=e.i(262218),l=e.i(291542),r=e.i(898586),i=e.i(770914),n=e.i(592968),o=e.i(245704),d=e.i(518617),c=e.i(19732);let{Text:x}=r.Typography;function m({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)(c.ExperimentOutlined,{style:{fontSize:16,color:"#6366f1"}}),(0,t.jsx)(x,{strong:!0,style:{fontSize:15},children:"LLM Judge Results"})]}),s.map((e,s)=>(0,t.jsx)(u,{entry:e},e.eval_id||s))]}):null}function u({entry:e}){let r=e.passed,c=r?"#52c41a":"#ff4d4f",m=(e.verdicts||[]).filter(e=>"overall"!==(e.criterion_name||"").toLowerCase()),u=[{title:"Criterion",dataIndex:"criterion_name",key:"criterion_name",width:160,render:e=>(0,t.jsx)(x,{strong:!0,style:{whiteSpace:"nowrap"},children:e})},{title:"Weight",dataIndex:"weight",key:"weight",width:65,render:e=>null!=e?(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:[e,"%"]}):null},{title:"Score",dataIndex:"score",key:"score",width:65,render:e=>(0,t.jsx)(x,{style:{color:e>=70?"#52c41a":e>=50?"#faad14":"#ff4d4f",fontWeight:600},children:e})},{title:(0,t.jsx)(n.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 a=s.score*s.weight/100;return(0,t.jsx)(x,{type:"secondary",style:{fontSize:12},children:a%1==0?a:a.toFixed(1)})}},{title:"Comment",dataIndex:"reasoning",key:"reasoning",ellipsis:{showTitle:!1},render:e=>(0,t.jsx)(n.Tooltip,{title:e,children:(0,t.jsx)("span",{style:{fontSize:12},children:e})})}];return(0,t.jsxs)(s.Card,{size:"small",className:"mb-3",style:{borderLeft:`3px solid ${c}`},title:(0,t.jsxs)(i.Space,{children:[r?(0,t.jsx)(o.CheckCircleOutlined,{style:{color:"#52c41a"}}):(0,t.jsx)(d.CloseCircleOutlined,{style:{color:"#ff4d4f"}}),(0,t.jsx)(x,{strong:!0,children:e.eval_name}),(0,t.jsx)(a.Tag,{color:r?"success":"error",children:r?"PASSED":"FAILED"}),(0,t.jsx)(n.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)(x,{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)(i.Space,{size:"small",children:[e.judge_model&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Judge: ",e.judge_model]}),null!=e.iteration&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Iter: ",e.iteration+1]})]}),children:[e.eval_error&&(0,t.jsxs)(x,{type:"warning",style:{display:"block",marginBottom:8,fontSize:12},children:["Judge error: ",e.eval_error]}),m.length>0?(0,t.jsx)(l.Table,{dataSource:m,columns:u,pagination:!1,size:"small",rowKey:"criterion_name",scroll:{x:!0},summary:()=>{if(!m.some(e=>null!=e.weight))return null;let e=m.reduce((e,t)=>e+(null!=t.weight?t.score*t.weight/100:0),0);return(0,t.jsxs)(l.Table.Summary.Row,{children:[(0,t.jsx)(l.Table.Summary.Cell,{index:0,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12},children:"Total"})}),(0,t.jsx)(l.Table.Summary.Cell,{index:1}),(0,t.jsx)(l.Table.Summary.Cell,{index:2}),(0,t.jsx)(l.Table.Summary.Cell,{index:3,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12,color:c},children:e%1==0?e:e.toFixed(1)})}),(0,t.jsx)(l.Table.Summary.Cell,{index:4})]})}}):(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Score: ",e.overall_score?.toFixed(1)," — no per-criterion breakdown available."]})]})}e.s(["default",()=>m])},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o,rawInputTokens:d,cacheReadTokens:c,cacheCreationTokens:x})=>{let m=o?.toLowerCase()==="true",u=void 0!==i||void 0!==n,p=e?.input_cost!==void 0||e?.output_cost!==void 0,h=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(p||u||h||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 g=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),f=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),y=m?0:e?.input_cost,j=m?0:e?.output_cost,b=m?0:e?.original_cost,v=m?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.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:[l(a),m&&" (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=m?0:(y??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:[l(s),null!=d&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",d.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:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_read_cost),(c??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(c??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:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_creation_cost),(x??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(x??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:[l(y),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.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:[l(j),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.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:l(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:l(s)})]},e))]}),!m&&(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:l(b)})]})}),(g||f)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[g&&(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 (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(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:["-",l(e.discount_amount)]})]})]}),f&&(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 (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((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:["+",l(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:[l(v),m&&" (Cached)"]})]})})]})}]})})}])},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({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 flex-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",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 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])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),x=e.i(195116),m=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(869939),M=e.i(70635),A=e.i(70969),D=e.i(916925);function E({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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 i,n;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:a}=(0,D.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(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:r(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:r(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:(i=e.start_time,n=e.end_time,`${((n-i)*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,r)=>{let i=a[`${s}-${r}`]||!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}-${r}`,void l(t=>({...t,[e]:!t[e]}))},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)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+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)})]})]})]}),i&&(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",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>E],331052);var I=e.i(592968),z=e.i(207066);let{Text:O}=g.Typography;function R({value:e,maxWidth:s=z.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(I.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:z.FONT_FAMILY_MONO,fontSize:z.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:P}=g.Typography;function B({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(P,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let F=e=>!!e&&e instanceof Date,q=e=>"object"==typeof e&&null!==e,H=e=>!!e&&e instanceof Object&&"function"==typeof e;function $(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function Y(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:x,outerRef:m,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},$(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!m.current)return;let s=m.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=m.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:S,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)&&(x?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},$(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},$(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(U,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:x,beforeExpandChange:u,outerRef:m}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function K(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function W(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function V(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=F(l)?l.toISOString():H(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},$(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function U(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(W,Object.assign({},e)):!q(t)||F(t)||H(t)?(0,s.createElement)(V,Object.assign({},e)):(0,s.createElement)(K,Object.assign({},e))}let G={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},J=()=>!0,Q=e=>{let{data:t,style:a=G,shouldExpandNode:l=J,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&q(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(U,{key:t,field:t,value:n,style:{...G,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(U,{value:t,style:{...G,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>Q,"defaultStyles",()=>G],867612);let{Text:X}=g.Typography;function Z({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:z.JSON_MAX_HEIGHT,overflow:"auto",background:z.COLOR_BG_LIGHT,padding:z.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(Q,{data:e,style:G,clickToExpandNode:!0})})}):(0,t.jsx)(X,{type:"secondary",children:"No data"})}function ee(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function et(e){return Array.isArray(e)?e:e?[e]:[]}function es(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var ea=e.i(366308),el=e.i(755151),er=e.i(291542);let{Text:ei}=g.Typography;function en({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})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(ei,{code:!0,children:[e,s.required&&(0,t.jsx)(ei,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(ei,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(ei,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(ei,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(ei,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(er.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(ei,{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 eo({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:ed}=g.Typography;function ec({tool:e}){let[a,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)(ed,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(en,{tool:e}):(0,t.jsx)(eo,{tool:e})]})}let{Text:ex}=g.Typography;function em({tool:e}){let[a,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(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(ea.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ex,{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"}),a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ec,{tool:e})})]})}let{Text:eu}=g.Typography;function ep({log:e}){let s=function(e){let t,s=!(t=es(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 a=function(e){let t=es(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(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.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:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eu,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(eu,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let eh=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eg=e.i(888259),ef=e.i(264843),ey=e.i(624001);let{Text:ej}=g.Typography;function eb({type:e,tokens:s,cost:l,onCopy:r,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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(ef.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ej,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(I.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:ev}=g.Typography;function e_({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(ev,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(ev,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(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,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:eN}=g.Typography;function ew({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)(eN,{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)(eN,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(eN,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:eS}=g.Typography;function ek({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(eS,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(ew,{tool:e,compact:l},e.id||s))})]}):null}let{Text:eC}=g.Typography;function eT({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(eC,{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: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,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(ek,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eL({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=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)(eb,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eg.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(e_,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eT,{messages:c}),d&&(0,t.jsx)(ek,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eM}=g.Typography;function eA({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eg.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(ek,{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)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eM,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eD=e.i(782273),eE=e.i(313603),eI=e.i(793916);let{Text:ez}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(eR,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eP,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.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 eR({session:e,turnCount:a}){let[l,r]=(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:()=>r(!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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eE.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(ez,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(ez,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eD.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)(eI.AudioOutlined,{}):(0,t.jsx)(ef.MessageOutlined,{})," ",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)(eH,{label:"Model",value:e.model}),(0,t.jsx)(eH,{label:"Voice",value:e.voice}),(0,t.jsx)(eH,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eH,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eH,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eH,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eH,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eH,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(ez,{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 eP({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:l?.completion_tokens??n,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:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eB,{response:e,index:s},e.id||s))})})]})}function eB({response:e,index:s}){let a=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)(ez,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(I.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(ez,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eF,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eq,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eq,{label:"Output",details:l.output_token_details})]})}function eF({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)(ez,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eI.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(ef.MessageOutlined,{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:a})]},s):null})]}):null}function eq({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(ez,{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:a.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 eH({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(ez,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function e$({request:e,response:s,metrics:a}){let l,r,i;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)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&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})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:eh(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eL,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eA,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:eY}=g.Typography;function eK({logEntry:e,isLoadingDetails:s=!1,accessToken:a}){var l,r;let i=e.metadata||{},n="failure"===i.status,o=n?i.error_information:null,d=!!(l=e.messages)&&(Array.isArray(l)?l.length>0:"object"==typeof l&&Object.keys(l).length>0),c=!!(r=e.response)&&Object.keys(ee(r)).length>0,x=!d&&!c&&!n&&!s,m=i?.guardrail_information,u=et(m),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`,j=i?.eval_information,b=i.vector_store_request_metadata&&Array.isArray(i.vector_store_request_metadata)&&i.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${z.DRAWER_CONTENT_PADDING} ${z.DRAWER_CONTENT_PADDING} 0`},children:[n&&o&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eW,{errorInfo:o}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eV,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(R,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(R,{value:e.api_base,maxWidth:z.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),p&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eU,{label:g,maskedCount:h})})]})})}),(0,t.jsx)(eG,{logEntry:e,metadata:i}),(0,t.jsx)(M.CostBreakdownViewer,{costBreakdown:i?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit,rawInputTokens:i?.additional_usage_values?.prompt_tokens_details?.text_tokens,cacheReadTokens:i?.additional_usage_values?.cache_read_input_tokens,cacheCreationTokens:i?.additional_usage_values?.cache_creation_input_tokens}),(0,t.jsx)(ep,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(A.ConfigInfoMessage,{show:x})}),s?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eJ,{hasResponse:c,hasError:n,getRawRequest:()=>ee(e.proxy_server_request||e.messages),getFormattedResponse:()=>n&&o?{error:{message:o.error_message||"An error occurred",type:o.error_class||"error",code:o.error_code||"unknown",param:null}}:ee(e.response),logEntry:e}),p&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:m,accessToken:a??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),null!=j&&(0,t.jsx)(L.default,{data:j}),b&&(0,t.jsx)(E,{data:i.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eX,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:z.DRAWER_CONTENT_PADDING}})]})}function eW({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eV({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(eY,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:z.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eU({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:z.SPACING_MEDIUM,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"]})]})}function eG({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default",o=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),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Input Tokens",children:(0,C.formatNumberWithCommas)(o)}),(0,t.jsx)(f.Descriptions.Item,{label:"Output Tokens",children:(0,C.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(B,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.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)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.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)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eJ({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(z.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),x=i.spend??0,m=i.prompt_tokens||0,u=i.completion_tokens||0,p=m+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?x*m/p:0,y=g?h.output_cost??0:p>0?x*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(e$,{request:l(),response:r(),metrics:{prompt_tokens:m,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(eY,{copyable:{text:JSON.stringify(n===z.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===z.TAB_RESPONSE&&!e&&!a}),items:[{key:z.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:(0,t.jsx)(Z,{data:l(),mode:"formatted"})})},{key:z.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:e||a?(0,t.jsx)(Z,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eQ({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 eX({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eY,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:z.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:z.FONT_SIZE_SMALL,fontFamily:z.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eZ=e.i(764205),e0=e.i(266027),e1=e.i(135214);function e2({row:e,isSelected:s,onClick:a}){let l=m.MCP_CALL_TYPES.includes(e.call_type),r=m.AGENT_CALL_TYPES.includes(e.call_type),i=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:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(x.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(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:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.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]})]})}function e5({open:e,onClose:d,logEntry:c,sessionId:x,accessToken:u,allLogs:g=[],onSelectLog:f,startTime:y}){let j=!!x,[b,v]=(0,s.useState)(null),[_,N]=(0,s.useState)(!1),[w,S]=(0,s.useState)(!1),{data:k=[]}=(0,e0.useQuery)({queryKey:["sessionLogs",x],queryFn:async()=>{if(!x||!u)return[];let e=await (0,eZ.sessionSpendLogsCall)(u,x);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!m.MCP_CALL_TYPES.includes(e.call_type),a=+!!m.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&j&&x&&u)}),T=(0,s.useMemo)(()=>j?k.length?b?k.find(e=>e.request_id===b)||k[0]:c?.request_id&&k.find(e=>e.request_id===c.request_id)||k[0]:null:c,[j,c,b,k]);(0,s.useEffect)(()=>{j&&k.length&&(b&&k.some(e=>e.request_id===b)||v(c?.request_id&&k.some(e=>e.request_id===c.request_id)?c.request_id:k[0].request_id))},[j,c,b,k]),(0,s.useEffect)(()=>{e?N(!1):(j&&v(null),S(!1))},[e,j]);let{selectNextLog:L,selectPreviousLog:M}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:T,allLogs:j?k:g,onClose:d,onSelectLog:e=>{j&&v(e.request_id),f?.(e)}}),A=((e,t,s)=>{let{accessToken:a}=(0,e1.default)();return(0,e0.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eZ.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(T?.request_id,y,e&&!!T?.request_id),D=A.data,E=A.isLoading,I=(0,s.useMemo)(()=>T?{...T,messages:D?.messages||T.messages,response:D?.response||T.response,proxy_server_request:D?.proxy_server_request||T.proxy_server_request}:null,[T,D]),O=T?.metadata||{},R="failure"===O.status?"Failure":"Success",P="failure"===O.status?"error":"success",B=O?.user_api_key_team_alias||"default",F=k.reduce((e,t)=>e+(t.spend||0),0),q=k.length>0?new Date(Math.min(...k.map(e=>new Date(e.startTime).getTime()))):null,H=k.length>0?new Date(Math.max(...k.map(e=>new Date(e.endTime).getTime()))):null,$=q&&H?((H.getTime()-q.getTime())/1e3).toFixed(2):"0.00",Y=k.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,K=k.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,W=k.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length,V=j?k:T?[T]:[],U=j?x||"":T?.request_id||"",G=U.length>14?`${U.slice(0,11)}...`:U,J=async()=>{if(U)try{await navigator.clipboard.writeText(U),S(!0),setTimeout(()=>S(!1),1200)}catch{}};return T&&I?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:z.DRAWER_WIDTH,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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>N(!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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>N(!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:j?"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:G}),(0,t.jsx)("button",{type:"button",onClick:J,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:w?(0,t.jsx)(r.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:[V.length," req",[j?Y:V.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?K:V.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?W:V.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),j?(0,C.getSpendString)(F):(0,C.getSpendString)(T.spend||0),j&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),$,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[et(O?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eQ,{guardrailEntries:et(O?.guardrail_information)})}),j?(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"}),V.map((e,s)=>{let a=s===V.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"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e2,{row:e,isSelected:e.request_id===T.request_id,onClick:()=>{v(e.request_id),f?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:V.map(e=>(0,t.jsx)(e2,{row:e,isSelected:e.request_id===T.request_id,onClick:()=>f?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:T,onClose:d,onPrevious:M,onNext:L,statusLabel:R,statusColor:P,environment:B}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eK,{logEntry:I,isLoadingDetails:E,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e5],502626),e.s([],3565)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},93648,245767,313793,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(560445),l=e.i(207082),r=e.i(135214),i=e.i(500330),n=e.i(871943),o=e.i(360820),d=e.i(94629),c=e.i(152990),x=e.i(682830),m=e.i(269200),u=e.i(942232),p=e.i(977572),h=e.i(427612),g=e.i(64848),f=e.i(496020),y=e.i(592968);function j({keys:e,totalCount:a,isLoading:l,isFetching:r,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,i.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,c.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),getPaginationRowModel:(0,x.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[l||r?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[l||r?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:l||r||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:l||r||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:l||r?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function b(){let{premiumUser:e}=(0,r.default)(),[i,n]=(0,s.useState)(0),[o]=(0,s.useState)(50),{data:d,isPending:c,isFetching:x}=(0,l.useDeletedKeys)(i+1,o);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(j,{keys:d?.keys||[],totalCount:d?.total_count||0,isLoading:c,isFetching:x,pageIndex:i,pageSize:o,onPageChange:n})]})}e.s(["default",()=>b],93648);var v=e.i(785242),_=e.i(389083),N=e.i(599724),w=e.i(355619);function S({teams:e,isLoading:a,isFetching:l}){let[r,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),b=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,i.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(_.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,w.getModelDisplayName)(e).slice(0,30)}...`:(0,w.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(_.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(N.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],v=(0,c.useReactTable)({data:e,columns:b,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:r},onSortingChange:j,getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||l?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:v.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:v.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${v.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:a||l?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?v.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function k(){let{premiumUser:e}=(0,r.default)(),{data:s,isPending:l,isFetching:i}=(0,v.useDeletedTeams)(1,100);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(S,{teams:s||[],isLoading:l,isFetching:i})]})}e.s(["default",()=>k],245767);var C=e.i(663435);e.s(["default",0,({value:e,onChange:s})=>(0,t.jsx)(C.default,{value:e,onChange:s})],313793);var T=e.i(625901),L=e.i(56456),M=e.i(152473),A=e.i(199133),D=e.i(770914);let{Text:E}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[x,m]=(0,M.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,T.useInfiniteModelInfo)(i,x||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(A.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),m(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(L.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(D.Space,{direction:"vertical",children:[(0,t.jsxs)(D.Space,{direction:"horizontal",children:[(0,t.jsx)(E,{strong:!0,children:"Model name:"}),(0,t.jsx)(E,{ellipsis:!0,children:s})]}),(0,t.jsxs)(E,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(E,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(L.LoadingOutlined,{spin:!0})})]})})}],291950)},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),x=e.i(482725),m=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.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(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function D({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,D]=(0,s.useState)(""),[E,I]=(0,s.useState)(""),[z,O]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,E,z,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:E||void 0,action:z||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../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"}})]});let K=$.data?.audit_logs??[],W=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{D(e),_(1)},onChange:e=>{e.target.value||(D(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{O(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{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"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(m.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:W,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(x.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>D],942161)},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.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"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.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"})}),x=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),m=({count:e})=>(0,t.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,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.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,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.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,t.jsx)(x,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(m,{});let f=(0,t.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,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(x,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:e?()=>(0,t.jsx)(h,{label:"TTFT (s)",field:"ttft_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:e?()=>(0,t.jsx)(h,{label:"Model",field:"model",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",x="Model",m="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[x]:"",[m]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[D,E]=(0,t.useState)(null),I=(0,t.useRef)(0),z=(0,t.useRef)(M),O=(0,t.useRef)(!1),R=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[m]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[x]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&E({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),E({data:[],total:0,page:1,page_size:v,total_pages:0})}},[y,j,b,_,v,k,C]),P=(0,t.useMemo)(()=>(0,i.default)((e,t)=>R(e,t),300),[R]);(0,t.useEffect)(()=>()=>P.cancel(),[P]);let B=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[m]||M[u]||M[g]||M[f]||M[x]),[M]);(0,t.useEffect)(()=>{z.current=M,O.current=B},[M,B]),(0,t.useEffect)(()=>{O.current&&y&&(P.cancel(),R(z.current,T))},[k,C,T,j,b,_]);let F=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:v,total_pages:0};if(B)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[x]&&(t=t.filter(e=>e.model_id===M[x])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,B]),q=(0,t.useMemo)(()=>B?null!==D?D:{data:[],total:0,page:1,page_size:v,total_pages:0}:F,[B,D,F]),{data:H}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y}),$=(0,t.useCallback)((e=T)=>{B&&y&&(P.cancel(),R(M,e))},[B,y,M,T,R,P]);return{filters:M,filteredLogs:q,hasBackendFilters:B,allTeams:H,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),E(null),P(s,1)),s})},handleFilterReset:()=>{A(L),E(null),P.cancel(),N(1)},refetchWithFilters:$}}e.s(["useLogFilterLogic",()=>y],504809)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(772345),o=e.i(793130),d=e.i(197647),c=e.i(653824),x=e.i(881073),m=e.i(404206),u=e.i(723731),p=e.i(464571),h=e.i(708347),g=e.i(93648),f=e.i(245767),y=e.i(313793),j=e.i(50882),b=e.i(291950),v=e.i(969550),_=e.i(764205),N=e.i(20147),w=e.i(942161),S=e.i(245099);e.i(70969);var k=e.i(97859);e.i(70635),e.i(339086);var C=e.i(504809);e.i(3565);var T=e.i(502626);e.i(727749),e.i(867612);var L=e.i(149121);function M({accessToken:e,token:M,userRole:A,userID:D,premiumUser:E}){let[I,z]=(0,i.useState)(""),[O,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),$=(0,i.useRef)(null),Y=(0,i.useRef)(null),K=(0,i.useRef)(null),[W,V]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[U,G]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)(!1),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(""),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,ex]=(0,i.useState)(null),[em,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(""),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(A&&h.internalUserRoles.includes(A)),[eb,ev]=(0,i.useState)("request logs"),[e_,eN]=(0,i.useState)(null),[ew,eS]=(0,i.useState)(!1),[ek,eC]=(0,i.useState)(null),[eT,eL]=(0,i.useState)("startTime"),[eM,eA]=(0,i.useState)("desc"),[eD,eE]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eI,ez]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eI))},[eI]);let[eO,eR]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{em&&e&&ex({...(await (0,_.keyInfoV1Call)(e,em)).info,token:em,api_key:em})})()},[em,e]),(0,i.useEffect)(()=>{function e(e){$.current&&!$.current.contains(e.target)&&B(!1),Y.current&&!Y.current.contains(e.target)&&R(!1),K.current&&!K.current.contains(e.target)&&Z(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{A&&h.internalUserRoles.includes(A)&&ej(!0)},[A]);let eP=(0,a.useQuery)({queryKey:["logs","table",F,H,W,U,el,ei,ey?D:null,ep,eo,eT,eM],queryFn:async()=>{if(!e||!M||!A||!D)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(W).utc().format("YYYY-MM-DD HH:mm:ss"),s=J?(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,_.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:ei||void 0,team_id:el||void 0,user_id:ey?D??void 0:void 0,end_user:eg||void 0,status_filter:ep||void 0,model_id:eo||void 0,sort_by:eT,sort_order:eM}})},enabled:!!e&&!!M&&!!A&&!!D&&"request logs"===eb&&eD,refetchInterval:!!eI&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),eB=(0,i.useDeferredValue)(eP.isFetching),eF=eP.isFetching||eB,eq=eP.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eH,filteredLogs:e$,hasBackendFilters:eY,allTeams:eK,handleFilterChange:eW,handleFilterReset:eV,refetchWithFilters:eU}=(0,C.useLogFilterLogic)({logs:eq,accessToken:e,startTime:W,endTime:U,pageSize:H,isCustomDate:J,setCurrentPage:q,userID:D,userRole:A,sortBy:eT,sortOrder:eM,currentPage:F}),eG=(0,i.useCallback)(()=>{eV(),V((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),Q(!1),eR({value:24,unit:"hours"}),q(1)},[eV]);if((0,i.useEffect)(()=>{eE(!eY)},[eY]),(0,i.useEffect)(()=>{e&&(eH["Team ID"]?er(eH["Team ID"]):er(""),eh(eH.Status||""),ed(eH.Model||""),ef(eH["End User"]||""),en(eH["Key Hash"]||""))},[eH,e]),!e||!M||!A||!D)return null;let eJ=e$.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),eQ=eJ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),k.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:k.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),eX=new Map;for(let e of eJ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=k.MCP_CALL_TYPES.includes(e.call_type),s=eX.get(e.session_id);s&&(!s.isMcp||t)||eX.set(e.session_id,{requestId:e.request_id,isMcp:t})}let eZ=eJ.map(e=>{let t=e.session_id?eQ[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eu(e),onSessionClick:t=>{t&&(eC(t),eN(e),eS(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||eX.get(e.session_id)?.requestId===e.request_id)||[],e0=[{name:"Team ID",label:"Team ID",customComponent:y.default},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:b.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:j.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,_.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return k.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=k.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!k.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e1=k.QUICK_SELECT_OPTIONS.find(e=>e.value===eO.value&&e.unit===eO.unit),e2=J?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"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=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(J,W,U):e1?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(c.TabGroup,{defaultIndex:0,onIndexChange:e=>ev(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(d.Tab,{children:"Request Logs"}),(0,t.jsx)(d.Tab,{children:"Audit Logs"}),(0,t.jsx)(d.Tab,{children:"Deleted Keys"}),(0,t.jsx)(d.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(u.TabPanels,{children:[(0,t.jsxs)(m.TabPanel,{children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"})}),ec&&em&&ec.api_key===em?(0,t.jsx)(N.default,{keyId:em,keyData:ec,teams:eK??[],onClose:()=>eu(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{options:e0,onApplyFilters:eW,onResetFilters:eG}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>z(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:K,children:[(0,t.jsxs)("button",{onClick:()=>Z(!X),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",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:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e2]}),X&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[k.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e2===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),V((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eR({value:e.value,unit:e.unit}),Q(!1),Z(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${J?"bg-blue-50 text-blue-600":""}`,onClick:()=>Q(!J),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(o.Switch,{color:"green",checked:eI,defaultChecked:!0,onChange:ez})]}),{}),(0,t.jsx)(p.Button,{type:"default",icon:(0,t.jsx)(n.SyncOutlined,{spin:eF}),onClick:()=>{eY?eU():eP.refetch()},disabled:eF,title:"Fetch data",children:eF?"Fetching":"Fetch"})]}),J&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:W,onChange:e=>{V(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eP.isLoading?"...":e$?(F-1)*H+1:0," -"," ",eP.isLoading?"...":e$?Math.min(F*H,e$.total):0," ","of ",eP.isLoading?"...":e$?e$.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eP.isLoading?"...":F," of"," ",eP.isLoading?"...":e$?e$.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eP.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(e$.total_pages||1,e+1)),disabled:eP.isLoading||F===(e$.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eI&&1===F&&eD&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>ez(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(L.DataTable,{columns:(0,S.createColumns)({sortBy:eT,sortOrder:eM,onSortChange:(e,t)=>{eL(e),eA(t),q(1)}}),data:eZ,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eC(e.session_id),eN(e),eS(!0);return}eC(null),eN(e),eS(!0)},isLoading:eP.isLoading})]})]})]}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(w.default,{userID:D,userRole:A,token:M,accessToken:e,isActive:"audit logs"===eb,premiumUser:E})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(g.default,{})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(f.default,{})})]})]}),(0,t.jsx)(T.LogDetailsDrawer,{open:ew,onClose:()=>{eS(!1),eC(null)},logEntry:e_,sessionId:ek,accessToken:e,allLogs:eZ,onSelectLog:e=>{eN(e)},startTime:(0,r.default)(W).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>M],936190)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3003a112e50662f4.js b/litellm/proxy/_experimental/out/_next/static/chunks/3003a112e50662f4.js new file mode 100644 index 0000000000..151d8b6958 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3003a112e50662f4.js @@ -0,0 +1 @@ +(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])},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(739295),n=e.i(343794),a=e.i(931067),i=e.i(211577),l=e.i(392221),o=e.i(703923),s=e.i(914949),d=e.i(404948),c=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,r){var u,g=e.prefixCls,m=void 0===g?"rc-switch":g,p=e.className,h=e.checked,f=e.defaultChecked,b=e.disabled,$=e.loadingIcon,k=e.checkedChildren,w=e.unCheckedChildren,v=e.onClick,y=e.onChange,C=e.onKeyDown,S=(0,o.default)(e,c),x=(0,s.default)(!1,{value:h,defaultValue:f}),I=(0,l.default)(x,2),O=I[0],E=I[1];function N(e,t){var r=O;return b||(E(r=e),null==y||y(r,t)),r}var z=(0,n.default)(m,p,(u={},(0,i.default)(u,"".concat(m,"-checked"),O),(0,i.default)(u,"".concat(m,"-disabled"),b),u));return t.createElement("button",(0,a.default)({},S,{type:"button",role:"switch","aria-checked":O,disabled:b,className:z,ref:r,onKeyDown:function(e){e.which===d.default.LEFT?N(!1,e):e.which===d.default.RIGHT&&N(!0,e),null==C||C(e)},onClick:function(e){var t=N(!O,e);null==v||v(t,e)}}),$,t.createElement("span",{className:"".concat(m,"-inner")},t.createElement("span",{className:"".concat(m,"-inner-checked")},k),t.createElement("span",{className:"".concat(m,"-inner-unchecked")},w)))});u.displayName="Switch";var g=e.i(121872),m=e.i(242064),p=e.i(937328),h=e.i(517455);e.i(296059);var f=e.i(915654);e.i(262370);var b=e.i(135551),$=e.i(183293),k=e.i(246422),w=e.i(838378);let v=(0,k.genStyleHooks)("Switch",e=>{let t=(0,w.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:(0,f.unit)(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:a,innerMaxMargin:i,handleSize:l,calc:o}=e,s=`${t}-inner`,d=(0,f.unit)(o(l).add(o(n).mul(2)).equal()),c=(0,f.unit)(o(i).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${c})`,marginInlineEnd:`calc(100% - ${d} + ${c})`},[`${s}-unchecked`]:{marginTop:o(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${c})`,marginInlineEnd:`calc(-100% + ${d} - ${c})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:o(n).mul(2).equal(),marginInlineEnd:o(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:o(n).mul(-1).mul(2).equal(),marginInlineEnd:o(n).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:r,handleBg:n,handleShadow:a,handleSize:i,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:r,insetInlineStart:r,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:l(i).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(l(i).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:a,innerMinMarginSM:i,innerMaxMarginSM:l,handleSizeSM:o,calc:s}=e,d=`${t}-inner`,c=(0,f.unit)(s(o).add(s(n).mul(2)).equal()),u=(0,f.unit)(s(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:r,lineHeight:(0,f.unit)(r),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:i,[`${d}-checked, ${d}-unchecked`]:{minHeight:r},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${d}-unchecked`]:{marginTop:s(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:s(s(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:l,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(s(o).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:a}=e,i=t*r,l=n/2,o=i-4,s=l-4;return{trackHeight:i,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*s+4,trackPadding:2,handleBg:a,handleSize:o,handleSizeSM:s,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:s/2,innerMaxMarginSM:s+2+4}});var y=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let C=t.forwardRef((e,a)=>{let{prefixCls:i,size:l,disabled:o,loading:d,className:c,rootClassName:f,style:b,checked:$,value:k,defaultChecked:w,defaultValue:C,onChange:S}=e,x=y(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[I,O]=(0,s.default)(!1,{value:null!=$?$:k,defaultValue:null!=w?w:C}),{getPrefixCls:E,direction:N,switch:z}=t.useContext(m.ConfigContext),j=t.useContext(p.default),T=(null!=o?o:j)||d,M=E("switch",i),P=t.createElement("div",{className:`${M}-handle`},d&&t.createElement(r.default,{className:`${M}-loading-icon`})),[B,R,q]=v(M),H=(0,h.default)(l),L=(0,n.default)(null==z?void 0:z.className,{[`${M}-small`]:"small"===H,[`${M}-loading`]:d,[`${M}-rtl`]:"rtl"===N},c,f,R,q),G=Object.assign(Object.assign({},null==z?void 0:z.style),b);return B(t.createElement(g.default,{component:"Switch",disabled:T},t.createElement(u,Object.assign({},x,{checked:I,onChange:(...e)=>{O(e[0]),null==S||S.apply(void 0,e)},prefixCls:M,className:L,style:G,disabled:T,ref:a,loadingIcon:P}))))});C.__ANT_SWITCH=!0,e.s(["Switch",0,C],790848)},475254,e=>{"use strict";var t=e.i(271645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:s,iconNode:d,...c},u)=>(0,t.createElement)("svg",{ref:u,...a,width:r,height:r,stroke:e,strokeWidth:l?24*Number(i)/Number(r):i,className:n("lucide",o),...!s&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(c)&&{"aria-hidden":"true"},...c},[...d.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(s)?s:[s]])),l=(e,a)=>{let l=(0,t.forwardRef)(({className:l,...o},s)=>(0,t.createElement)(i,{ref:s,iconNode:a,className:n(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=r(e),l};e.s(["default",()=>l],475254)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var a=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["default",0,i],959013)},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),n=e.i(673706),a=e.i(271645);let i=a.default.forwardRef((e,i)=>{let{color:l,className:o,children:s}=e;return a.default.createElement("p",{ref:i,className:(0,r.tremorTwMerge)("text-tremor-default",l?(0,n.getColorClassNames)(l,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),o)},s)});i.displayName="Text",e.s(["default",()=>i],936325),e.s(["Text",()=>i],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(480731),a=e.i(95779),i=e.i(444755),l=e.i(673706);let o=(0,l.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:d="",decorationColor:c,children:u,className:g}=e,m=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,className:(0,i.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",c?(0,l.getColorClassNames)(c,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case n.HorizontalPositions.Left:return"border-l-4";case n.VerticalPositions.Top:return"border-t-4";case n.HorizontalPositions.Right:return"border-r-4";case n.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),g)},m),u)});s.displayName="Card",e.s(["Card",()=>s],304967)},389083,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(829087),a=e.i(480731),i=e.i(95779),l=e.i(444755),o=e.i(673706);let s={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,o.makeClassName)("Badge"),u=r.default.forwardRef((e,u)=>{let{color:g,icon:m,size:p=a.Sizes.SM,tooltip:h,className:f,children:b}=e,$=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),k=m||null,{tooltipProps:w,getReferenceProps:v}=(0,n.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,w.refs.setReference]),className:(0,l.tremorTwMerge)(c("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",g?(0,l.tremorTwMerge)((0,o.getColorClassNames)(g,i.colorPalette.background).bgColor,(0,o.getColorClassNames)(g,i.colorPalette.iconText).textColor,(0,o.getColorClassNames)(g,i.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,l.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"),s[p].paddingX,s[p].paddingY,s[p].fontSize,f)},v,$),r.default.createElement(n.default,Object.assign({text:h},w)),k?r.default.createElement(k,{className:(0,l.tremorTwMerge)(c("icon"),"shrink-0 -ml-1 mr-1.5",d[p].height,d[p].width)}):null,r.default.createElement("span",{className:(0,l.tremorTwMerge)(c("text"),"whitespace-nowrap")},b))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},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)},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)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),n=e.i(444755),a=e.i(673706),i=e.i(271645);let l=i.default.forwardRef((e,l)=>{let{color:o,children:s,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return i.default.createElement("p",Object.assign({ref:l,className:(0,n.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",d)},c),s)});l.displayName="Title",e.s(["Title",()=>l],629569)},56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(876556);function a(e){return["small","middle","large"].includes(e)}function i(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>a,"isValidGapNumber",()=>i],908286);var l=e.i(242064),o=e.i(249616),s=e.i(372409),d=e.i(246422);let c=(0,d.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:a,paddingXS:i,fontSizeLG:l,fontSizeSM:o,borderRadiusLG:d,borderRadiusSM:c,colorBgContainerDisabled:u,lineWidth:g}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:n,margin:0,background:u,borderWidth:g,borderStyle:"solid",borderColor:a,borderRadius:r,"&-large":{fontSize:l,borderRadius:d},"&-small":{paddingInline:i,borderRadius:c,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,s.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let g=t.default.forwardRef((e,n)=>{let{className:a,children:i,style:s,prefixCls:d}=e,g=u(e,["className","children","style","prefixCls"]),{getPrefixCls:m,direction:p}=t.default.useContext(l.ConfigContext),h=m("space-addon",d),[f,b,$]=c(h),{compactItemClassnames:k,compactSize:w}=(0,o.useCompactItemContext)(h,p),v=(0,r.default)(h,b,k,$,{[`${h}-${w}`]:w},a);return f(t.default.createElement("div",Object.assign({ref:n,className:v,style:s},g),i))}),m=t.default.createContext({latestIndex:0}),p=m.Provider,h=({className:e,index:r,children:n,split:a,style:i})=>{let{latestIndex:l}=t.useContext(m);return null==n?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:i},n),r{let t=(0,f.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var $=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let k=t.forwardRef((e,o)=>{var s;let{getPrefixCls:d,direction:c,size:u,className:g,style:m,classNames:f,styles:k}=(0,l.useComponentConfig)("space"),{size:w=null!=u?u:"small",align:v,className:y,rootClassName:C,children:S,direction:x="horizontal",prefixCls:I,split:O,style:E,wrap:N=!1,classNames:z,styles:j}=e,T=$(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[M,P]=Array.isArray(w)?w:[w,w],B=a(P),R=a(M),q=i(P),H=i(M),L=(0,n.default)(S,{keepEmpty:!0}),G=void 0===v&&"horizontal"===x?"center":v,W=d("space",I),[A,D,X]=b(W),_=(0,r.default)(W,g,D,`${W}-${x}`,{[`${W}-rtl`]:"rtl"===c,[`${W}-align-${G}`]:G,[`${W}-gap-row-${P}`]:B,[`${W}-gap-col-${M}`]:R},y,C,X),F=(0,r.default)(`${W}-item`,null!=(s=null==z?void 0:z.item)?s:f.item),V=Object.assign(Object.assign({},k.item),null==j?void 0:j.item),Y=L.map((e,r)=>{let n=(null==e?void 0:e.key)||`${F}-${r}`;return t.createElement(h,{className:F,key:n,index:r,split:O,style:V},e)}),U=t.useMemo(()=>({latestIndex:L.reduce((e,t,r)=>null!=t?r:e,0)}),[L]);if(0===L.length)return null;let K={};return N&&(K.flexWrap="wrap"),!R&&H&&(K.columnGap=M),!B&&q&&(K.rowGap=P),A(t.createElement("div",Object.assign({ref:o,className:_,style:Object.assign(Object.assign(Object.assign({},K),m),E)},T),t.createElement(p,{value:U},Y)))});k.Compact=o.default,k.Addon=g,e.s(["default",0,k],38243)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},801312,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var a=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["default",0,i],801312)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(242064),a=e.i(517455);e.i(296059);var i=e.i(915654),l=e.i(183293),o=e.i(246422),s=e.i(838378);let d=(0,o.genStyleHooks)("Divider",e=>{let t=(0,s.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:a,textPaddingInline:o,orientationMargin:s,verticalMarginInline:d}=e;return{[t]:Object.assign(Object.assign({},(0,l.resetComponent)(e)),{borderBlockStart:`${(0,i.unit)(a)} solid ${n}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:d,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,i.unit)(a)} solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,i.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,i.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,i.unit)(a)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${s} * 100%)`},"&::after":{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${s} * 100%)`},"&::after":{width:`calc(${s} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${(0,i.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:n,borderStyle:"dotted",borderWidth:`${(0,i.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var c=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:i,direction:l,className:o,style:s}=(0,n.useComponentConfig)("divider"),{prefixCls:g,type:m="horizontal",orientation:p="center",orientationMargin:h,className:f,rootClassName:b,children:$,dashed:k,variant:w="solid",plain:v,style:y,size:C}=e,S=c(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),x=i("divider",g),[I,O,E]=d(x),N=u[(0,a.default)(C)],z=!!$,j=t.useMemo(()=>"left"===p?"rtl"===l?"end":"start":"right"===p?"rtl"===l?"start":"end":p,[l,p]),T="start"===j&&null!=h,M="end"===j&&null!=h,P=(0,r.default)(x,o,O,E,`${x}-${m}`,{[`${x}-with-text`]:z,[`${x}-with-text-${j}`]:z,[`${x}-dashed`]:!!k,[`${x}-${w}`]:"solid"!==w,[`${x}-plain`]:!!v,[`${x}-rtl`]:"rtl"===l,[`${x}-no-default-orientation-margin-start`]:T,[`${x}-no-default-orientation-margin-end`]:M,[`${x}-${N}`]:!!N},f,b),B=t.useMemo(()=>"number"==typeof h?h:/^\d+$/.test(h)?Number(h):h,[h]);return I(t.createElement("div",Object.assign({className:P,style:Object.assign(Object.assign({},s),y)},S,{role:"separator"}),$&&"vertical"!==m&&t.createElement("span",{className:`${x}-inner-text`,style:{marginInlineStart:T?B:void 0,marginInlineEnd:M?B:void 0}},$)))}],312361)},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(529681),a=e.i(702779),i=e.i(563113),l=e.i(763731),o=e.i(121872),s=e.i(242064);e.i(296059);var d=e.i(915654);e.i(262370);var c=e.i(135551),u=e.i(183293),g=e.i(246422),m=e.i(838378);let p=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,a=e.fontSizeSM;return(0,m.mergeToken)(e,{tagFontSize:a,tagLineHeight:(0,d.unit)(n(e.lineHeightSM).mul(a).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},h=e=>({defaultBg:new c.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),f=(0,g.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:a,calc:i}=e,l=i(n).sub(r).equal(),o=i(t).sub(r).equal();return{[a]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:l}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(p(e)),h);var 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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let $=t.forwardRef((e,n)=>{let{prefixCls:a,style:i,className:l,checked:o,children:d,icon:c,onChange:u,onClick:g}=e,m=b(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:h}=t.useContext(s.ConfigContext),$=p("tag",a),[k,w,v]=f($),y=(0,r.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==h?void 0:h.className,l,w,v);return k(t.createElement("span",Object.assign({},m,{ref:n,style:Object.assign(Object.assign({},i),null==h?void 0:h.style),className:y,onClick:e=>{null==u||u(!o),null==g||g(e)}}),c,t.createElement("span",null,d)))});var k=e.i(403541);let w=(0,g.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=p(e),(0,k.genPresetColor)(t,(e,{textColor:r,lightBorderColor:n,lightColor:a,darkColor:i})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:r,background:a,borderColor:n,"&-inverse":{color:t.colorTextLightSolid,background:i,borderColor:i},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},h),v=(e,t,r)=>{let n="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},y=(0,g.genSubStyleComponent)(["Tag","status"],e=>{let t=p(e);return[v(t,"success","Success"),v(t,"processing","Info"),v(t,"error","Error"),v(t,"warning","Warning")]},h);var C=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let S=t.forwardRef((e,d)=>{let{prefixCls:c,className:u,rootClassName:g,style:m,children:p,icon:h,color:b,onClose:$,bordered:k=!0,visible:v}=e,S=C(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:x,direction:I,tag:O}=t.useContext(s.ConfigContext),[E,N]=t.useState(!0),z=(0,n.default)(S,["closeIcon","closable"]);t.useEffect(()=>{void 0!==v&&N(v)},[v]);let j=(0,a.isPresetColor)(b),T=(0,a.isPresetStatusColor)(b),M=j||T,P=Object.assign(Object.assign({backgroundColor:b&&!M?b:void 0},null==O?void 0:O.style),m),B=x("tag",c),[R,q,H]=f(B),L=(0,r.default)(B,null==O?void 0:O.className,{[`${B}-${b}`]:M,[`${B}-has-color`]:b&&!M,[`${B}-hidden`]:!E,[`${B}-rtl`]:"rtl"===I,[`${B}-borderless`]:!k},u,g,q,H),G=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||N(!1)},[,W]=(0,i.useClosable)((0,i.pickClosable)(e),(0,i.pickClosable)(O),{closable:!1,closeIconRender:e=>{let n=t.createElement("span",{className:`${B}-close-icon`,onClick:G},e);return(0,l.replaceElement)(e,n,e=>({onClick:t=>{var r;null==(r=null==e?void 0:e.onClick)||r.call(e,t),G(t)},className:(0,r.default)(null==e?void 0:e.className,`${B}-close-icon`)}))}}),A="function"==typeof S.onClick||p&&"a"===p.type,D=h||null,X=D?t.createElement(t.Fragment,null,D,p&&t.createElement("span",null,p)):p,_=t.createElement("span",Object.assign({},z,{ref:d,className:L,style:P}),X,W,j&&t.createElement(w,{key:"preset",prefixCls:B}),T&&t.createElement(y,{key:"status",prefixCls:B}));return R(A?t.createElement(o.default,{component:"Tag"},_):_)});S.CheckableTag=$,e.s(["Tag",0,S],262218)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/38db69571fd2ddd2.js b/litellm/proxy/_experimental/out/_next/static/chunks/38db69571fd2ddd2.js new file mode 100644 index 0000000000..6f3c6b0aea --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/38db69571fd2ddd2.js @@ -0,0 +1,231 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,952683,e=>{"use strict";var t=e.i(843476),s=e.i(902739),a=e.i(161059),l=e.i(213970),r=e.i(105278),i=e.i(271645),n=e.i(994388),o=e.i(304967),d=e.i(269200),c=e.i(942232),m=e.i(977572),u=e.i(427612),p=e.i(64848),x=e.i(496020),h=e.i(389083),g=e.i(599724),y=e.i(212931),j=e.i(560445),f=e.i(592968),b=e.i(981339),_=e.i(790848),v=e.i(245704),w=e.i(764205),k=e.i(808613),N=e.i(199133),S=e.i(311451),C=e.i(280898),T=e.i(91739),I=e.i(262218),F=e.i(312361),L=e.i(28651),A=e.i(888259),M=e.i(826910),P=e.i(438957),D=e.i(983561),z=e.i(477189),E=e.i(827252),O=e.i(364769),R=e.i(135214),B=e.i(355619),$=e.i(663435),q=e.i(362024),U=e.i(770914),V=e.i(464571),H=e.i(646563),G=e.i(564897);let K={basic:{key:"basic",title:"Basic Information",defaultExpanded:!0,fields:[{name:"name",label:"Display Name",type:"text",required:!0,placeholder:"e.g., Customer Support Agent"},{name:"description",label:"Description",type:"textarea",required:!0,placeholder:"Describe what this agent does...",rows:3},{name:"url",label:"URL",type:"url",required:!1,placeholder:"http://localhost:9999/",tooltip:"Base URL where the agent is hosted (optional)"},{name:"version",label:"Version",type:"text",placeholder:"1.0.0",defaultValue:"1.0.0"},{name:"protocolVersion",label:"Protocol Version",type:"text",placeholder:"1.0",defaultValue:"1.0"}]},skills:{key:"skills",title:"Skills",fields:[{name:"skills",label:"Skills",type:"list",defaultValue:[]}]},capabilities:{key:"capabilities",title:"Capabilities",fields:[{name:"streaming",label:"Streaming",type:"switch",defaultValue:!1},{name:"pushNotifications",label:"Push Notifications",type:"switch"},{name:"stateTransitionHistory",label:"State Transition History",type:"switch"}]},optional:{key:"optional",title:"Optional Settings",fields:[{name:"iconUrl",label:"Icon URL",type:"url",placeholder:"https://example.com/icon.png"},{name:"documentationUrl",label:"Documentation URL",type:"url",placeholder:"https://docs.example.com"},{name:"supportsAuthenticatedExtendedCard",label:"Supports Authenticated Extended Card",type:"switch"}]},litellm:{key:"litellm",title:"LiteLLM Parameters",fields:[{name:"model",label:"Model (Optional)",type:"text"},{name:"make_public",label:"Make Public",type:"switch"}]},cost:{key:"cost",title:"Cost Configuration",fields:[{name:"cost_per_query",label:"Cost Per Query ($)",type:"text",placeholder:"0.0",tooltip:"Fixed cost per query"},{name:"input_cost_per_token",label:"Input Cost Per Token ($)",type:"text",placeholder:"0.000001",tooltip:"Cost per input token"},{name:"output_cost_per_token",label:"Output Cost Per Token ($)",type:"text",placeholder:"0.000002",tooltip:"Cost per output token"}]},tracing:{key:"tracing",title:"Tracing",fields:[{name:"enable_tracing",label:"Enable Tracing",type:"switch",defaultValue:!1,tooltip:"Enable request tracing for this agent"}]}},W="Skill ID",Q=!0,Y="e.g., hello_world",J="Skill Name",X=!0,Z="e.g., Returns hello world",ee="Description",et=!0,es="What this skill does",ea=2,el="Tags (comma-separated)",er=!0,ei="e.g., hello world, greeting",en="Examples (comma-separated)",eo="e.g., hi, hello world",ed=(e,t)=>{let s={agent_name:e.agent_name,agent_card_params:{protocolVersion:e.protocolVersion||"1.0",name:e.name||e.agent_name,description:e.description||"",url:e.url||"",version:e.version||"1.0.0",defaultInputModes:t?.agent_card_params?.defaultInputModes||["text"],defaultOutputModes:t?.agent_card_params?.defaultOutputModes||["text"],capabilities:{streaming:!0===e.streaming,...void 0!==e.pushNotifications&&{pushNotifications:e.pushNotifications},...void 0!==e.stateTransitionHistory&&{stateTransitionHistory:e.stateTransitionHistory}},skills:e.skills||[],...e.iconUrl&&{iconUrl:e.iconUrl},...e.documentationUrl&&{documentationUrl:e.documentationUrl},...void 0!==e.supportsAuthenticatedExtendedCard&&{supportsAuthenticatedExtendedCard:e.supportsAuthenticatedExtendedCard}}},a={};if(e.model&&(a.model=e.model),void 0!==e.make_public&&(a.make_public=e.make_public),e.cost_per_query&&(a.cost_per_query=parseFloat(e.cost_per_query)),e.input_cost_per_token&&(a.input_cost_per_token=parseFloat(e.input_cost_per_token)),e.output_cost_per_token&&(a.output_cost_per_token=parseFloat(e.output_cost_per_token)),Object.keys(a).length>0&&(s.litellm_params=a),null!=e.tpm_limit&&(s.tpm_limit=e.tpm_limit),null!=e.rpm_limit&&(s.rpm_limit=e.rpm_limit),null!=e.session_tpm_limit&&(s.session_tpm_limit=e.session_tpm_limit),null!=e.session_rpm_limit&&(s.session_rpm_limit=e.session_rpm_limit),Array.isArray(e.static_headers)&&e.static_headers.length>0){let t={};e.static_headers.forEach(e=>{let s=e?.header?.trim();s&&(t[s]=e?.value??"")}),Object.keys(t).length>0&&(s.static_headers=t)}return Array.isArray(e.extra_headers)&&e.extra_headers.length>0&&(s.extra_headers=e.extra_headers),s},ec=e=>{let t=e.agent_card_params?.skills?.map(e=>({...e,tags:e.tags,examples:e.examples||[]}))||[];return{agent_name:e.agent_name,name:e.agent_card_params?.name,description:e.agent_card_params?.description,url:e.agent_card_params?.url,version:e.agent_card_params?.version,protocolVersion:e.agent_card_params?.protocolVersion,streaming:e.agent_card_params?.capabilities?.streaming,pushNotifications:e.agent_card_params?.capabilities?.pushNotifications,stateTransitionHistory:e.agent_card_params?.capabilities?.stateTransitionHistory,skills:t,iconUrl:e.agent_card_params?.iconUrl,documentationUrl:e.agent_card_params?.documentationUrl,supportsAuthenticatedExtendedCard:e.agent_card_params?.supportsAuthenticatedExtendedCard,model:e.litellm_params?.model,make_public:e.litellm_params?.make_public,cost_per_query:e.litellm_params?.cost_per_query,input_cost_per_token:e.litellm_params?.input_cost_per_token,output_cost_per_token:e.litellm_params?.output_cost_per_token,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,session_tpm_limit:e.session_tpm_limit,session_rpm_limit:e.session_rpm_limit,static_headers:e.static_headers?Object.entries(e.static_headers).map(([e,t])=>({header:e,value:t})):[],extra_headers:e.extra_headers??[]}},em=()=>(0,t.jsx)(t.Fragment,{children:K.cost.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,tooltip:e.tooltip,children:(0,t.jsx)(S.Input,{placeholder:e.placeholder,type:"number",step:"0.000001"})},e.name))}),{Panel:eu}=q.Collapse,ep=({showAgentName:e=!0,visiblePanels:s})=>{let a=e=>!s||s.includes(e);return(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)(k.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter a unique agent name"}],tooltip:"Unique identifier for the agent",children:(0,t.jsx)(S.Input,{placeholder:"e.g., customer-support-agent"})}),(0,t.jsxs)(q.Collapse,{defaultActiveKey:["basic"],style:{marginBottom:16},children:[a(K.basic.key)&&(0,t.jsx)(eu,{header:`${K.basic.title} (Required)`,children:K.basic.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,rules:e.required?[{required:!0,message:`Please enter ${e.label.toLowerCase()}`}]:void 0,tooltip:e.tooltip,children:"textarea"===e.type?(0,t.jsx)(S.Input.TextArea,{rows:e.rows,placeholder:e.placeholder}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.basic.key),a(K.skills.key)&&(0,t.jsx)(eu,{header:`${K.skills.title} (Required)`,children:(0,t.jsx)(k.Form.List,{name:"skills",children:(e,{add:s,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(e=>(0,t.jsxs)("div",{style:{marginBottom:16,padding:16,border:"1px solid #d9d9d9",borderRadius:4},children:[(0,t.jsx)(k.Form.Item,{...e,label:W,name:[e.name,"id"],rules:[{required:Q,message:"Required"}],children:(0,t.jsx)(S.Input,{placeholder:Y})}),(0,t.jsx)(k.Form.Item,{...e,label:J,name:[e.name,"name"],rules:[{required:X,message:"Required"}],children:(0,t.jsx)(S.Input,{placeholder:Z})}),(0,t.jsx)(k.Form.Item,{...e,label:ee,name:[e.name,"description"],rules:[{required:et,message:"Required"}],children:(0,t.jsx)(S.Input.TextArea,{rows:ea,placeholder:es})}),(0,t.jsx)(k.Form.Item,{...e,label:el,name:[e.name,"tags"],rules:[{required:er,message:"Required"}],getValueFromEvent:e=>e.target.value.split(",").map(e=>e.trim()),getValueProps:e=>({value:Array.isArray(e)?e.join(", "):e}),children:(0,t.jsx)(S.Input,{placeholder:ei})}),(0,t.jsx)(k.Form.Item,{...e,label:en,name:[e.name,"examples"],getValueFromEvent:e=>e.target.value.split(",").map(e=>e.trim()).filter(e=>e),getValueProps:e=>({value:Array.isArray(e)?e.join(", "):""}),children:(0,t.jsx)(S.Input,{placeholder:eo})}),(0,t.jsx)(V.Button,{type:"link",danger:!0,onClick:()=>a(e.name),icon:(0,t.jsx)(G.MinusCircleOutlined,{}),children:"Remove Skill"})]},e.key)),(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(H.PlusOutlined,{}),style:{width:"100%"},children:"Add Skill"})]})})},K.skills.key),a(K.capabilities.key)&&(0,t.jsx)(eu,{header:K.capabilities.title,children:K.capabilities.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,valuePropName:"checked",children:(0,t.jsx)(_.Switch,{})},e.name))},K.capabilities.key),a(K.optional.key)&&(0,t.jsx)(eu,{header:K.optional.title,children:K.optional.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,valuePropName:"switch"===e.type?"checked":void 0,children:"switch"===e.type?(0,t.jsx)(_.Switch,{}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.optional.key),a(K.cost.key)&&(0,t.jsx)(eu,{header:K.cost.title,children:(0,t.jsx)(em,{})},K.cost.key),a(K.litellm.key)&&(0,t.jsx)(eu,{header:K.litellm.title,children:K.litellm.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,valuePropName:"switch"===e.type?"checked":void 0,children:"switch"===e.type?(0,t.jsx)(_.Switch,{}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.litellm.key),a("auth_headers")&&(0,t.jsxs)(eu,{header:"Authentication Headers",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Static Headers"," ",(0,t.jsx)(f.Tooltip,{title:"Headers always sent to the backend agent, regardless of the client request. Admin-configured, static wins on conflict.",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(k.Form.List,{name:"static_headers",children:(e,{add:s,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(({key:e,name:s,...l})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(k.Form.Item,{...l,name:[s,"header"],rules:[{required:!0,message:"Header name required"}],children:(0,t.jsx)(S.Input,{placeholder:"Header name (e.g. Authorization)",style:{width:220}})}),(0,t.jsx)(k.Form.Item,{...l,name:[s,"value"],rules:[{required:!0,message:"Value required"}],children:(0,t.jsx)(S.Input,{placeholder:"Value (e.g. Bearer token123)",style:{width:260}})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>a(s),style:{color:"#ff4d4f"}})]},e)),(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(H.PlusOutlined,{}),style:{width:"100%"},children:"Add Static Header"})]})})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Forward Client Headers"," ",(0,t.jsx)(f.Tooltip,{title:"Header names to extract from the client's request and forward to the agent. Type a name and press Enter.",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),name:"extra_headers",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"e.g. x-api-key, Authorization",tokenSeparators:[","]})})]},"auth_headers")]})]})},{Panel:ex}=q.Collapse,eh=(e,t)=>{let s={...t.litellm_params_template||{}};for(let a of t.credential_fields){let t=e[a.key];t&&!1!==a.include_in_litellm_params&&(s[a.key]=t)}if(e.cost_per_query&&(s.cost_per_query=parseFloat(e.cost_per_query)),e.input_cost_per_token&&(s.input_cost_per_token=parseFloat(e.input_cost_per_token)),e.output_cost_per_token&&(s.output_cost_per_token=parseFloat(e.output_cost_per_token)),t.model_template){let a=t.model_template;for(let s of t.credential_fields){let t=`{${s.key}}`;a.includes(t)&&e[s.key]&&(a=a.replace(t,e[s.key]))}s.model=a}let a={agent_name:e.agent_name,agent_card_params:{protocolVersion:"1.0",name:e.display_name||e.agent_name,description:e.description||`${t.agent_type_display_name} agent`,url:e.api_base||"",version:"1.0.0",defaultInputModes:["text"],defaultOutputModes:["text"],capabilities:{streaming:!0},skills:[{id:"chat",name:"Chat",description:"General chat capability",tags:["chat","conversation"]}]},litellm_params:s};return null!=e.tpm_limit&&(a.tpm_limit=e.tpm_limit),null!=e.rpm_limit&&(a.rpm_limit=e.rpm_limit),null!=e.session_tpm_limit&&(a.session_tpm_limit=e.session_tpm_limit),null!=e.session_rpm_limit&&(a.session_rpm_limit=e.session_rpm_limit),a},eg=({agentTypeInfo:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter a unique agent name"}],tooltip:"Unique identifier for the agent",children:(0,t.jsx)(S.Input,{placeholder:"e.g., my-langgraph-agent"})}),(0,t.jsx)(k.Form.Item,{label:"Description",name:"description",tooltip:"Brief description of what this agent does",children:(0,t.jsx)(S.Input.TextArea,{rows:2,placeholder:"Describe what this agent does..."})}),e.credential_fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:`Please enter ${e.label}`}]:void 0,tooltip:e.tooltip,initialValue:e.default_value,children:"password"===e.field_type?(0,t.jsx)(S.Input.Password,{placeholder:e.placeholder||""}):"textarea"===e.field_type?(0,t.jsx)(S.Input.TextArea,{rows:3,placeholder:e.placeholder||""}):"select"===e.field_type&&e.options?(0,t.jsx)(N.Select,{placeholder:e.placeholder||"",children:e.options.map(e=>(0,t.jsx)(N.Select.Option,{value:e,children:e},e))}):(0,t.jsx)(S.Input,{placeholder:e.placeholder||""})},e.key)),(0,t.jsx)(q.Collapse,{style:{marginBottom:16},children:(0,t.jsx)(ex,{header:K.cost.title,children:(0,t.jsx)(em,{})},K.cost.key)})]});var ey=e.i(75921),ej=e.i(390605),ef=e.i(891547);let{Step:eb}=C.Steps,e_="custom",ev=({visible:e,onClose:s,accessToken:a,onSuccess:l,teams:r})=>{let o,d,{userId:c,userRole:m}=(0,R.default)(),[u]=k.Form.useForm(),[p,x]=(0,i.useState)(0),[h,g]=(0,i.useState)(!1),[j,f]=(0,i.useState)("a2a"),[b,v]=(0,i.useState)([]),[q,U]=(0,i.useState)(!1),[V,H]=(0,i.useState)("create_new"),[G,W]=(0,i.useState)(""),[Q,Y]=(0,i.useState)([]),[J,X]=(0,i.useState)([]),[Z,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)(!1),[ea,el]=(0,i.useState)([]),[er,ei]=(0,i.useState)(!1),[en,eo]=(0,i.useState)([]),[ec,em]=(0,i.useState)(!1),[eu,ex]=(0,i.useState)(""),[ev,ew]=(0,i.useState)(null),[ek,eN]=(0,i.useState)(null),[eS,eC]=(0,i.useState)(!1),[eT,eI]=(0,i.useState)(!1),[eF,eL]=(0,i.useState)(null),[eA,eM]=(0,i.useState)(null);(0,i.useEffect)(()=>{(async()=>{U(!0);try{let e=await (0,w.getAgentCreateMetadata)();v(e)}catch(e){console.error("Error fetching agent metadata:",e)}finally{U(!1)}})()},[]),(0,i.useEffect)(()=>{3===p&&a&&0===J.length&&(async()=>{es(!0);try{let e=await (0,w.keyListCall)(a,null,null,null,null,null,1,100);X(e?.keys||[])}catch(e){console.error("Error fetching keys:",e)}finally{es(!1)}})()},[p,a]),(0,i.useEffect)(()=>{if(1!==p&&3!==p||!a||!c||!m)return;let e=!1;return ei(!0),(0,w.modelAvailableCall)(a,c,m).then(t=>{e||el((t?.data??(Array.isArray(t)?t:[])).map(e=>e.id??e.model_name).filter(Boolean))}).catch(t=>{e||console.error("Error fetching models:",t)}).finally(()=>{e||ei(!1)}),()=>{e=!0}},[p,a,c,m]),(0,i.useEffect)(()=>{if(1!==p||!a)return;let e=!1;return em(!0),(0,w.getAgentsList)(a).then(t=>{e||eo((t?.agents??[]).map(e=>({agent_id:e.agent_id,agent_name:e.agent_name})))}).catch(t=>{e||console.error("Error fetching agents:",t)}).finally(()=>{e||em(!1)}),()=>{e=!0}},[p,a]);let eP=b.find(e=>e.agent_type===j),eD=async()=>{try{if(0===p){await u.validateFields(["agent_name"]);let e=u.getFieldValue("agent_name");e&&!G&&W(`${e}-key`)}x(e=>e+1)}catch{}},ez=async()=>{if(!a)return void A.default.error("No access token available");g(!0);try{await u.validateFields();let e={...u.getFieldsValue(!0)},t=(e=>{if(j===e_)return{agent_name:e.agent_name,agent_card_params:{protocolVersion:"1.0",name:e.agent_name,description:e.description||"",url:"",version:"1.0.0",defaultInputModes:["text"],defaultOutputModes:["text"],capabilities:{streaming:!1},skills:[]}};if("a2a"===j)return ed(e);if(eP?.use_a2a_form_fields){let t=ed(e);for(let s of(eP.litellm_params_template&&(t.litellm_params={...t.litellm_params,...eP.litellm_params_template}),eP.credential_fields)){let a=e[s.key];a&&!1!==s.include_in_litellm_params&&(t.litellm_params[s.key]=a)}return t}return eP?eh(e,eP):null})(e);if(!t){A.default.error("Failed to build agent data"),g(!1);return}let s=e.allowed_mcp_servers_and_groups,r=e.mcp_tool_permissions||{},i=e.entitlement_models||[],n=e.entitlement_agents||[];(s?.servers?.length>0||s?.accessGroups?.length>0||Object.keys(r).length>0||i.length>0||n.length>0)&&(t.object_permission={},s?.servers?.length>0&&(t.object_permission.mcp_servers=s.servers),s?.accessGroups?.length>0&&(t.object_permission.mcp_access_groups=s.accessGroups),Object.keys(r).length>0&&(t.object_permission.mcp_tool_permissions=r),i.length>0&&(t.object_permission.models=i),n.length>0&&(t.object_permission.agents=n)),(eS||eT)&&(t.litellm_params||(t.litellm_params={}),eS&&(t.litellm_params.require_trace_id_on_calls_to_agent=!0),eT&&(t.litellm_params.require_trace_id_on_calls_by_agent=!0,eF&&(t.litellm_params.max_iterations=eF),eA&&(t.litellm_params.max_budget_per_session=eA)));let o=e.guardrails||[];o.length>0&&(t.litellm_params||(t.litellm_params={}),t.litellm_params.guardrails=o);let d=e.team_id||null;d&&(t.team_id=d);let c=await (0,w.createAgentCall)(a,t),m=c.agent_id,p=c.agent_name||e.agent_name||m;if(ex(p),"create_new"===V&&G){let e=await (0,w.keyCreateForAgentCall)(a,m,G,Q,void 0,d);ew(e.key||null)}else if("existing_key"===V){if(!Z){A.default.error("Please select an existing key to assign"),g(!1);return}await (0,w.keyUpdateCall)(a,{key:Z,agent_id:m});let e=J.find(e=>e.token===Z);eN(e?.key_alias||Z.slice(0,12)+"…")}x(4),l()}catch(t){console.error("Error creating agent:",t);let e=t instanceof Error?t.message:String(t);A.default.error(e?`Failed to create agent: ${e}`:"Failed to create agent")}finally{g(!1)}},eE=()=>{u.resetFields(),f("a2a"),x(0),H("create_new"),W(""),Y([]),ee(null),ex(""),ew(null),eN(null),eC(!1),eI(!1),eL(null),eM(null),s()},eO=e=>{f(e),u.resetFields()},eR=j===e_?null:eP?.logo_url||b.find(e=>"a2a"===e.agent_type)?.logo_url;return(0,t.jsx)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[eR&&p<1&&(0,t.jsx)("img",{src:eR,alt:"Agent",className:"w-6 h-6 object-contain"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Agent"})]}),open:e,onCancel:eE,footer:null,width:900,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)(C.Steps,{current:p,size:"small",className:"mb-8",children:[(0,t.jsx)(eb,{title:"Configure"}),(0,t.jsx)(eb,{title:"Entitlements"}),(0,t.jsx)(eb,{title:"Governance"}),(0,t.jsx)(eb,{title:"Agent Management"}),(0,t.jsx)(eb,{title:"Ready"})]}),(0,t.jsxs)(k.Form,{form:u,layout:"vertical",initialValues:"a2a"===j?{...(o={defaultInputModes:["text"],defaultOutputModes:["text"]},Object.values(K).forEach(e=>{e.fields.forEach(e=>{void 0!==e.defaultValue&&(o[e.name]=e.defaultValue)})}),o),allowed_mcp_servers_and_groups:{servers:[],accessGroups:[]},mcp_tool_permissions:{},entitlement_models:[],entitlement_agents:[],guardrails:[]}:{allowed_mcp_servers_and_groups:{servers:[],accessGroups:[]},mcp_tool_permissions:{},entitlement_models:[],entitlement_agents:[],guardrails:[]},className:"space-y-4",children:[0===p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Agent Type"}),required:!0,tooltip:"Select the type of agent you want to create",children:(0,t.jsx)(N.Select,{value:j,onChange:eO,size:"large",style:{width:"100%"},optionLabelProp:"label",dropdownRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,(0,t.jsx)(F.Divider,{style:{margin:"4px 0"}}),(0,t.jsxs)("div",{className:"px-2 py-1",children:[(0,t.jsx)("div",{className:"text-xs text-gray-400 font-medium mb-1 uppercase tracking-wide px-2",children:"Not listed?"}),(0,t.jsxs)("div",{className:`flex items-center gap-3 px-2 py-2 rounded cursor-pointer transition-colors ${j===e_?"bg-amber-50":"hover:bg-amber-50"}`,onClick:()=>eO(e_),children:[(0,t.jsx)(z.AppstoreOutlined,{className:"text-amber-600 text-lg"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-amber-700",children:"Custom / Other"}),(0,t.jsx)(I.Tag,{color:"orange",style:{fontSize:10,padding:"0 4px"},children:"GENERIC"})]}),(0,t.jsx)("div",{className:"text-xs text-amber-600",children:"For agents that don't follow a standard protocol — just needs a virtual key"})]})]})]})]}),children:b.map(e=>(0,t.jsx)(N.Select.Option,{value:e.agent_type,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("img",{src:e.logo_url||"",alt:"",className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e.agent_type_display_name})]}),children:(0,t.jsxs)("div",{className:"flex items-center gap-3 py-1",children:[(0,t.jsx)("img",{src:e.logo_url||"",alt:e.agent_type_display_name,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium",children:e.agent_type_display_name}),e.description&&(0,t.jsx)("div",{className:"text-xs text-gray-500",children:e.description})]})]})},e.agent_type))})}),(0,t.jsx)("div",{className:"mt-4",children:j===e_?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(k.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter an agent name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. my-custom-agent"})}),(0,t.jsx)(k.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(S.Input.TextArea,{placeholder:"Describe what this agent does…",rows:3})})]}):"a2a"===j?(0,t.jsx)(ep,{showAgentName:!0}):eP?.use_a2a_form_fields?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ep,{showAgentName:!0}),eP.credential_fields.length>0&&(0,t.jsxs)("div",{className:"mt-4 p-4 border border-gray-200 rounded-lg",children:[(0,t.jsxs)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:[eP.agent_type_display_name," Settings"]}),eP.credential_fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:`Please enter ${e.label}`}]:void 0,tooltip:e.tooltip,initialValue:e.default_value,children:"password"===e.field_type?(0,t.jsx)(S.Input.Password,{placeholder:e.placeholder||""}):(0,t.jsx)(S.Input,{placeholder:e.placeholder||""})},e.key))]})]}):eP?(0,t.jsx)(eg,{agentTypeInfo:eP}):null})]}),1===p&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Configure which models, agents, and MCP tools this agent is allowed to use. Leave fields empty to allow all (subject to key/team permissions)."}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allowed Models"}),name:"entitlement_models",tooltip:"Restrict which models this agent can call. Leave empty to allow all.",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:er?"Loading models...":"Select models (leave empty for all)",tokenSeparators:[","],loading:er,showSearch:!0,options:ea.map(e=>({label:(0,B.getModelDisplayName)(e),value:e}))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allowed Agents (Sub-Agents)"}),name:"entitlement_agents",tooltip:"Restrict which other agents this agent can invoke as sub-agents. Leave empty to allow all.",children:(0,t.jsx)(N.Select,{mode:"multiple",style:{width:"100%"},placeholder:ec?"Loading agents...":"Select agents (leave empty for all)",loading:ec,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:en.map(e=>({label:e.agent_name,value:e.agent_id}))})}),(0,t.jsx)(F.Divider,{className:"my-2"}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(E.InfoCircleOutlined,{title:"Select which MCP servers or access groups this agent can access",style:{marginLeft:"4px"}})]}),name:"allowed_mcp_servers_and_groups",initialValue:{servers:[],accessGroups:[]},children:(0,t.jsx)(ey.default,{onChange:e=>u.setFieldValue("allowed_mcp_servers_and_groups",e),value:u.getFieldValue("allowed_mcp_servers_and_groups")||{servers:[],accessGroups:[]},accessToken:a??"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(S.Input,{type:"hidden"})}),(0,t.jsx)(k.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-4",children:(0,t.jsx)(ej.default,{accessToken:a??"",selectedServers:u.getFieldValue("allowed_mcp_servers_and_groups")?.servers??[],toolPermissions:u.getFieldValue("mcp_tool_permissions")??{},onChange:e=>u.setFieldsValue({mcp_tool_permissions:e})})})})]}),2===p&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Tracing"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Require x-litellm-trace-id on calls TO this agent"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Only accept this agent being invoked with a trace-id (e.g. when used as a sub-agent)."})]}),(0,t.jsx)(_.Switch,{checked:eS,onChange:eC})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Require x-litellm-trace-id on calls BY this agent"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Requires LLM/MCP calls made by this agent to include x-litellm-trace-id for session tracking."})]}),(0,t.jsx)(_.Switch,{checked:eT,onChange:e=>{eI(e),e||(eL(null),eM(null))}})]})]})]}),(0,t.jsx)(F.Divider,{className:"my-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Budgets & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4",children:[!eT&&(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg text-sm text-yellow-800",children:'Enable "Require x-litellm-trace-id on calls BY this agent" in Tracing to configure budgets and rate limits.'}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Session Budgets"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Max Iterations"}),(0,t.jsx)(L.InputNumber,{className:"w-full",min:1,placeholder:"e.g. 25",disabled:!eT,value:eF,onChange:e=>eL(e)}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Hard cap on LLM calls per session"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Max Budget Per Session ($)"}),(0,t.jsx)(L.InputNumber,{className:"w-full",min:.01,step:.5,placeholder:"e.g. 5.00",disabled:!eT,value:eA,onChange:e=>eM(e)}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Max spend per trace before returning 429"})]})]}),(0,t.jsx)(F.Divider,{className:"my-2"}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Agent Rate Limits"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Global rate limits applied across all callers of this agent."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"TPM Limit",name:"tpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 100000",disabled:!eT})}),(0,t.jsx)(k.Form.Item,{label:"RPM Limit",name:"rpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 100",disabled:!eT})})]}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700 mt-4",children:"Per-Session Rate Limits"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Rate limits per session (x-litellm-trace-id). Each session gets its own counters."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"Session TPM Limit",name:"session_tpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 10000",disabled:!eT})}),(0,t.jsx)(k.Form.Item,{label:"Session RPM Limit",name:"session_rpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 20",disabled:!eT})})]})]})]}),(0,t.jsx)(F.Divider,{className:"my-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Guardrails"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Apply guardrails to this agent. Selected guardrails will run on all calls made by this agent."}),(0,t.jsx)(k.Form.Item,{name:"guardrails",initialValue:[],children:(0,t.jsx)(ef.default,{accessToken:a??"",value:u.getFieldValue("guardrails")??[],onChange:e=>u.setFieldsValue({guardrails:e})})})]})]}),3===p&&(d=u.getFieldValue("agent_name")||"your-agent",(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-center mb-6",children:(0,t.jsx)(I.Tag,{icon:(0,t.jsx)(D.RobotOutlined,{}),color:"purple",className:"px-3 py-1 text-sm",children:d})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Assign to Team"}),name:"team_id",tooltip:"Optionally assign this agent to a team. The agent and its key will belong to the selected team.",children:(0,t.jsx)($.default,{})}),(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:`p-4 border-2 rounded-lg cursor-pointer transition-colors ${"create_new"===V?"border-indigo-600 bg-indigo-50":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>H("create_new"),children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 flex-1",children:[(0,t.jsx)(T.Radio,{value:"create_new",checked:"create_new"===V,onChange:()=>H("create_new")}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(P.KeyOutlined,{className:"text-indigo-600"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"Create a new key for this agent"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"A dedicated key scoped to this agent."}),"create_new"===V&&(0,t.jsx)("div",{className:"mt-3 space-y-3",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Key Name"}),(0,t.jsx)(S.Input,{value:G,onChange:e=>W(e.target.value),placeholder:"e.g. my-agent-key"})]})})]})]}),(0,t.jsx)(I.Tag,{color:"green",children:"Recommended"})]})}),(0,t.jsx)("div",{className:`p-4 border-2 rounded-lg cursor-pointer transition-colors ${"existing_key"===V?"border-indigo-600 bg-indigo-50":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>H("existing_key"),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(T.Radio,{value:"existing_key",checked:"existing_key"===V,onChange:()=>H("existing_key")}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(P.KeyOutlined,{className:"text-gray-500"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"Assign an existing key"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Re-assign a key you already have to this agent."}),"existing_key"===V&&(0,t.jsx)("div",{className:"mt-3",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(N.Select,{showSearch:!0,style:{width:"100%"},placeholder:"Search by key name…",loading:et,value:Z,onChange:e=>ee(e),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:J.map(e=>({label:e.key_alias||e.token?.slice(0,12)+"…",value:e.token}))})})]})]})})]}),(0,t.jsx)("div",{className:"text-center mt-4",children:(0,t.jsx)("button",{type:"button",className:"text-sm text-gray-500 underline hover:text-gray-700",onClick:()=>H("skip"),children:"Skip for now — I'll assign a key later"})})]})),4===p&&(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)(M.CheckCircleFilled,{className:"text-5xl text-green-500 mb-4",style:{fontSize:48}}),(0,t.jsx)("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Agent Created!"}),(0,t.jsx)("div",{className:"flex justify-center mb-4",children:(0,t.jsx)(I.Tag,{icon:(0,t.jsx)(D.RobotOutlined,{}),color:"purple",className:"px-3 py-1 text-sm",children:eu})}),ev&&(0,t.jsx)("div",{className:"mt-4 text-left max-w-md mx-auto",children:(0,t.jsx)(O.default,{apiKey:ev})}),ek&&(0,t.jsxs)("p",{className:"text-sm text-gray-600 mt-2",children:["Key ",(0,t.jsx)("span",{className:"font-medium",children:ek})," has been assigned to this agent."]}),!ev&&!ek&&"skip"===V&&(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"No key assigned. You can create one from the Virtual Keys page."})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-6 border-t border-gray-100 mt-6",children:[(0,t.jsx)("div",{children:p>0&&p<4&&(0,t.jsx)("button",{type:"button",onClick:()=>{x(e=>Math.max(0,e-1))},className:"text-sm text-gray-600 border border-gray-300 rounded px-4 py-2 hover:bg-gray-50",children:"← Back"})}),(0,t.jsxs)("div",{className:"flex gap-3",children:[p<4&&(0,t.jsx)(n.Button,{variant:"secondary",onClick:eE,children:"Cancel"}),0===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),1===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),2===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),3===p&&(0,t.jsx)(n.Button,{variant:"primary",loading:h,onClick:ez,children:h?"Creating...":"Create Agent →"}),4===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eE,children:"Done"})]})]})]})})};var ew=e.i(708347),ek=e.i(629569),eN=e.i(197647),eS=e.i(653824),eC=e.i(881073),eT=e.i(404206),eI=e.i(723731),eF=e.i(482725),eL=e.i(869216),eA=e.i(530212);let eM=({agent:e})=>{let s=e.litellm_params;return s?.cost_per_query===void 0&&s?.input_cost_per_token===void 0&&s?.output_cost_per_token===void 0?null:(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ek.Title,{children:"Cost Configuration"}),(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:[void 0!==s.cost_per_query&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Cost Per Query",children:["$",s.cost_per_query]}),void 0!==s.input_cost_per_token&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Input Cost Per Token",children:["$",s.input_cost_per_token]}),void 0!==s.output_cost_per_token&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Output Cost Per Token",children:["$",s.output_cost_per_token]})]})]})},eP=e=>{let t=e.litellm_params?.model||"",s=e.litellm_params?.custom_llm_provider;return"langgraph"===s?"langgraph":"azure_ai"===s?"azure_ai_foundry":"bedrock"===s?"bedrock_agentcore":t.startsWith("langgraph/")?"langgraph":t.startsWith("azure_ai/agents/")?"azure_ai_foundry":t.startsWith("bedrock/agentcore/")?"bedrock_agentcore":"a2a"},eD=(e,t)=>{let s={agent_name:e.agent_name,description:e.agent_card_params?.description||""};for(let a of t.credential_fields)if(!1!==a.include_in_litellm_params)s[a.key]=e.litellm_params?.[a.key]||a.default_value||"";else if(t.model_template&&e.litellm_params?.model){let l=e.litellm_params.model,r=t.model_template.split("/"),i=l.split("/");r.forEach((e,t)=>{e===`{${a.key}}`&&i[t]&&(s[a.key]=i[t])})}return s.cost_per_query=e.litellm_params?.cost_per_query,s.input_cost_per_token=e.litellm_params?.input_cost_per_token,s.output_cost_per_token=e.litellm_params?.output_cost_per_token,s},ez=({agentId:e,onClose:s,accessToken:a,isAdmin:l})=>{let[r,d]=(0,i.useState)(null),[c,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(!1),[y]=k.Form.useForm(),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)("a2a");(0,i.useEffect)(()=>{(async()=>{try{let e=await (0,w.getAgentCreateMetadata)();f(e)}catch(e){console.error("Error fetching agent metadata:",e)}})()},[]),(0,i.useEffect)(()=>{v()},[e,a]);let v=async()=>{if(a){m(!0);try{let t=await (0,w.getAgentInfo)(a,e);d(t);let s=eP(t);if(_(s),"a2a"===s)y.setFieldsValue(ec(t));else{let e=j.find(e=>e.agent_type===s);e?y.setFieldsValue(eD(t,e)):y.setFieldsValue(ec(t))}}catch(e){console.error("Error fetching agent info:",e),A.default.error("Failed to load agent information")}finally{m(!1)}}};(0,i.useEffect)(()=>{if(r&&j.length>0){let e=eP(r);if("a2a"!==e){let t=j.find(t=>t.agent_type===e);t&&y.setFieldsValue(eD(r,t))}}},[j,r]);let N=j.find(e=>e.agent_type===b),C=async t=>{if(a&&r){h(!0);try{let s;"a2a"===b?s=ed(t,r):N?(s=eh(t,N)).agent_name=t.agent_name:s=ed(t,r),await (0,w.patchAgentCall)(a,e,s),A.default.success("Agent updated successfully"),p(!1),v()}catch(e){console.error("Error updating agent:",e),A.default.error("Failed to update agent")}finally{h(!1)}}};if(c)return(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!r)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"text-center",children:"Agent not found"}),(0,t.jsx)(n.Button,{onClick:s,className:"mt-4",children:"Back to Agents List"})]});let T=e=>e?new Date(e).toLocaleString():"-";return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eA.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Agents"}),(0,t.jsx)(ek.Title,{children:r.agent_name||"Unnamed Agent"}),(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:r.agent_id})]}),(0,t.jsxs)(eS.TabGroup,{children:[(0,t.jsxs)(eC.TabList,{className:"mb-4",children:[(0,t.jsx)(eN.Tab,{children:"Overview"},"overview"),l?(0,t.jsx)(eN.Tab,{children:"Settings"},"settings"):(0,t.jsx)(t.Fragment,{})]}),(0,t.jsxs)(eI.TabPanels,{children:[(0,t.jsxs)(eT.TabPanel,{children:[(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Agent ID",children:r.agent_id}),(0,t.jsx)(eL.Descriptions.Item,{label:"Agent Name",children:r.agent_name}),(0,t.jsx)(eL.Descriptions.Item,{label:"Display Name",children:r.agent_card_params?.name||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:r.agent_card_params?.description||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"URL",children:r.agent_card_params?.url||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Version",children:r.agent_card_params?.version||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Protocol Version",children:r.agent_card_params?.protocolVersion||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Streaming",children:r.agent_card_params?.capabilities?.streaming?"Yes":"No"}),r.agent_card_params?.capabilities?.pushNotifications&&(0,t.jsx)(eL.Descriptions.Item,{label:"Push Notifications",children:"Yes"}),r.agent_card_params?.capabilities?.stateTransitionHistory&&(0,t.jsx)(eL.Descriptions.Item,{label:"State Transition History",children:"Yes"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Skills",children:[r.agent_card_params?.skills?.length||0," configured"]}),r.litellm_params?.model&&(0,t.jsx)(eL.Descriptions.Item,{label:"Model",children:r.litellm_params.model}),r.litellm_params?.make_public!==void 0&&(0,t.jsx)(eL.Descriptions.Item,{label:"Make Public",children:r.litellm_params.make_public?"Yes":"No"}),r.agent_card_params?.iconUrl&&(0,t.jsx)(eL.Descriptions.Item,{label:"Icon URL",children:r.agent_card_params.iconUrl}),r.agent_card_params?.documentationUrl&&(0,t.jsx)(eL.Descriptions.Item,{label:"Documentation URL",children:r.agent_card_params.documentationUrl}),(0,t.jsx)(eL.Descriptions.Item,{label:"TPM Limit",children:r.tpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"RPM Limit",children:r.rpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Session TPM Limit",children:r.session_tpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Session RPM Limit",children:r.session_rpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Created At",children:T(r.created_at)}),(0,t.jsx)(eL.Descriptions.Item,{label:"Updated At",children:T(r.updated_at)})]}),r.object_permission&&(r.object_permission.mcp_servers?.length||r.object_permission.mcp_access_groups?.length||r.object_permission.mcp_tool_permissions&&Object.keys(r.object_permission.mcp_tool_permissions).length>0)&&(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ek.Title,{children:"MCP Tool Permissions"}),(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:[r.object_permission.mcp_servers&&r.object_permission.mcp_servers.length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"MCP Servers",children:r.object_permission.mcp_servers.join(", ")}),r.object_permission.mcp_access_groups&&r.object_permission.mcp_access_groups.length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"MCP Access Groups",children:r.object_permission.mcp_access_groups.join(", ")}),r.object_permission.mcp_tool_permissions&&Object.keys(r.object_permission.mcp_tool_permissions).length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"Tool permissions per server",children:(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(r.object_permission.mcp_tool_permissions).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"font-medium",children:[e,":"]})," ",Array.isArray(s)?s.join(", "):String(s)]},e))})})]})]}),(0,t.jsx)(eM,{agent:r}),r.agent_card_params?.skills&&r.agent_card_params.skills.length>0&&(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ek.Title,{children:"Skills"}),(0,t.jsx)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:r.agent_card_params.skills.map((e,s)=>(0,t.jsx)(eL.Descriptions.Item,{label:e.name||`Skill ${s+1}`,children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"ID:"})," ",e.id]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Description:"})," ",e.description]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Tags:"})," ",Array.isArray(e.tags)?e.tags.join(", "):e.tags]}),e.examples&&e.examples.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Examples:"})," ",Array.isArray(e.examples)?e.examples.join(", "):e.examples]})]})},s))})]})]}),l&&(0,t.jsx)(eT.TabPanel,{children:(0,t.jsxs)(o.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(ek.Title,{children:"Agent Settings"}),!u&&(0,t.jsx)(n.Button,{onClick:()=>p(!0),children:"Edit Settings"})]}),u?(0,t.jsxs)(k.Form,{form:y,layout:"vertical",onFinish:C,children:[(0,t.jsx)(k.Form.Item,{label:"Agent ID",children:(0,t.jsx)(S.Input,{value:r.agent_id,disabled:!0})}),"a2a"===b?(0,t.jsx)(ep,{showAgentName:!0}):N?(0,t.jsx)(eg,{agentTypeInfo:N}):(0,t.jsx)(ep,{showAgentName:!0}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(ek.Title,{className:"mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})}),(0,t.jsx)(k.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"Session TPM Limit",name:"session_tpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})}),(0,t.jsx)(k.Form.Item,{label:"Session RPM Limit",name:"session_rpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,t.jsx)(V.Button,{onClick:()=>{p(!1),v()},children:"Cancel"}),(0,t.jsx)(n.Button,{loading:x,children:"Save Changes"})]})]}):(0,t.jsx)(g.Text,{children:'Click "Edit Settings" to modify agent configuration.'})]})})]})]})]})};var eE=e.i(727749),eO=e.i(500330),eR=e.i(902555);let eB=({accessToken:e,userRole:s,teams:a})=>{let[l,r]=(0,i.useState)([]),[k,N]=(0,i.useState)({}),[S,C]=(0,i.useState)(!1),[T,I]=(0,i.useState)(!1),[F,L]=(0,i.useState)(!1),[A,M]=(0,i.useState)(null),[P,D]=(0,i.useState)(null),[z,E]=(0,i.useState)(!1),O=!!s&&(0,ew.isAdminRole)(s),R=async t=>{if(e){I(!0);try{let s=await (0,w.getAgentsList)(e,t??z);r(s.agents||[])}catch(e){console.error("Error fetching agents:",e)}finally{I(!1)}}},B=async()=>{if(e)try{let{keys:t=[]}=await (0,w.keyListCall)(e,null,null,null,null,null,1,500),s={};for(let e of t){let t=e.agent_id;t&&!s[t]&&(s[t]={has_key:!0,key_alias:e.key_alias,token_prefix:e.token?`${e.token.slice(0,8)}…`:void 0})}N(s)}catch(e){console.error("Error fetching keys for agents:",e)}};(0,i.useEffect)(()=>{R()},[e]),(0,i.useEffect)(()=>{e&&l.length>0?B():0===l.length&&N({})},[e,l.length]);let $=async()=>{if(A&&e){L(!0);try{await (0,w.deleteAgentCall)(e,A.id),eE.default.success(`Agent "${A.name}" deleted successfully`),R()}catch(e){console.error("Error deleting agent:",e),eE.default.fromBackend("Failed to delete agent")}finally{L(!1),M(null)}}},q=[...l].sort((e,t)=>{let s=e.created_at?new Date(e.created_at).getTime():0;return(t.created_at?new Date(t.created_at).getTime():0)-s}),U=O?7:6;return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Agents"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"List of A2A-spec agents that are available to be used in your organization. Go to AI Hub, to make agents public."}),(0,t.jsx)(j.Alert,{message:"Why do agents need keys?",description:"Keys scope access to an agent and allow it to call MCP tools. Assign a key when creating an agent or from the Virtual Keys page.",type:"info",showIcon:!0,className:"mb-3"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-4",children:[O&&(0,t.jsx)(n.Button,{onClick:()=>{P&&D(null),C(!0)},disabled:!e,children:"+ Add New Agent"}),(0,t.jsx)(f.Tooltip,{title:"When enabled, only agents with reachable URLs are shown",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(v.CheckCircleOutlined,{className:z?"text-green-500":"text-gray-400"}),(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"Health Check"}),(0,t.jsx)(_.Switch,{size:"small",checked:z,onChange:e=>{E(e),R(e)},loading:T&&z})]})})]})]}),P?(0,t.jsx)(ez,{agentId:P,onClose:()=>D(null),accessToken:e,isAdmin:O}):(0,t.jsx)(o.Card,{children:T?(0,t.jsx)(b.Skeleton,{active:!0,paragraph:{rows:3}}):(0,t.jsxs)(d.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Agent Name"}),(0,t.jsx)(p.TableHeaderCell,{children:"Agent ID"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend (USD)"}),(0,t.jsx)(p.TableHeaderCell,{children:"Model"}),(0,t.jsx)(p.TableHeaderCell,{children:"Created"}),(0,t.jsx)(p.TableHeaderCell,{children:"Status"}),O&&(0,t.jsx)(p.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(c.TableBody,{children:0===q.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:U,children:(0,t.jsx)(g.Text,{className:"text-center",children:'No agents found. Click "+ Add New Agent" to create one.'})})}):q.map(e=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:e.agent_name})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(f.Tooltip,{title:e.agent_id,children:(0,t.jsxs)(n.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>D(e.agent_id),children:[e.agent_id.slice(0,7),"..."]})})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:(0,eO.formatNumberWithCommas)(e.spend,4)})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(h.Badge,{size:"xs",color:"blue",children:e.litellm_params?.model||"N/A"})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"})}),(0,t.jsx)(m.TableCell,{children:k[e.agent_id]?.has_key?(0,t.jsx)(h.Badge,{color:"green",children:"Active"}):(0,t.jsx)(h.Badge,{color:"yellow",children:"Needs Setup"})}),O&&(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(eR.default,{variant:"Delete",onClick:()=>{M({id:e.agent_id,name:e.agent_name})}})})]},e.agent_id))})]})}),(0,t.jsx)(ev,{visible:S,onClose:()=>{C(!1)},accessToken:e,onSuccess:()=>{R()},teams:a}),A&&(0,t.jsxs)(y.Modal,{title:"Delete Agent",open:null!==A,onOk:$,onCancel:()=>{M(null)},confirmLoading:F,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete agent: ",A.name,"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var e$=e.i(646050),eq=e.i(559061),eU=e.i(704308),eV=e.i(785242),eH=e.i(936578),eG=e.i(677667),eK=e.i(898667),eW=e.i(130643),eQ=e.i(779241),eY=e.i(752978),eJ=e.i(68155),eX=e.i(591935);let eZ=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))});var e0=e.i(836991);function e1({data:e,columns:s,isLoading:a=!1,loadingMessage:l="Loading...",emptyMessage:r="No data",getRowKey:i}){return(0,t.jsxs)(d.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsx)(x.TableRow,{children:s.map((e,s)=>(0,t.jsx)(p.TableHeaderCell,{style:{width:e.width},children:e.header},s))})}),(0,t.jsx)(c.TableBody,{children:a?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:s.length,className:"text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:l})})}):e.length>0?e.map((e,a)=>(0,t.jsx)(x.TableRow,{children:s.map((s,a)=>(0,t.jsx)(m.TableCell,{children:s.cell?s.cell(e):String(e[s.accessor]??"")},a))},i?i(e,a):a)):(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:s.length,className:"text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:r})})})})]})}var e2=e.i(916925);let e4=e=>{let t=Object.keys(e2.provider_map).find(t=>e2.provider_map[t]===e);if(t){let e=e2.Providers[t],s=e2.providerLogoMap[e];return{displayName:e,logo:s,enumKey:t}}return{displayName:e,logo:"",enumKey:null}},e5=e=>e2.provider_map[e]||null,e6=(e,t)=>{let s=e.target,a=s.parentElement;if(a){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=t.charAt(0),a.replaceChild(e,s)}},e3=({discountConfig:e,onDiscountChange:s,onRemoveProvider:a})=>{let[l,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(""),d=e=>{let t=parseFloat(n);!isNaN(t)&&t>=0&&t<=100&&s(e,(t/100).toString()),r(null),o("")},c=()=>{r(null),o("")},m=Object.entries(e).map(([e,t])=>({provider:e,discount:t})).sort((e,t)=>{let s=e4(e.provider).displayName,a=e4(t.provider).displayName;return s.localeCompare(a)});return(0,t.jsx)(e1,{data:m,columns:[{header:"Provider",cell:e=>{let{displayName:s,logo:a}=e4(e.provider);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,s)}),(0,t.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Discount Percentage",cell:e=>(0,t.jsx)("div",{className:"flex items-center gap-2",children:l===e.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eQ.TextInput,{value:n,onValueChange:o,onKeyDown:t=>{var s;return s=e.provider,void("Enter"===t.key?d(s):"Escape"===t.key&&c())},placeholder:"5",className:"w-20",autoFocus:!0}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"}),(0,t.jsx)(eY.Icon,{icon:eZ,size:"sm",onClick:()=>d(e.provider),className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,t.jsx)(eY.Icon,{icon:e0.XIcon,size:"sm",onClick:c,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(g.Text,{className:"font-medium",children:[(100*e.discount).toFixed(1),"%"]}),(0,t.jsx)(eY.Icon,{icon:eX.PencilAltIcon,size:"sm",onClick:()=>{var t,s;return t=e.provider,s=e.discount,void(r(t),o((100*s).toString()))},className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"250px"},{header:"Actions",cell:e=>{let{displayName:s}=e4(e.provider);return(0,t.jsx)(eY.Icon,{icon:eJ.TrashIcon,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider discounts configured"})},e8=({discountConfig:e,selectedProvider:s,newDiscount:a,onProviderChange:l,onDiscountChange:r,onAddProvider:i})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,t.jsx)(f.Tooltip,{title:"Select the LLM provider you want to configure a discount for",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Select provider",value:s,onChange:l,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),children:Object.entries(e2.Providers).map(([s,a])=>{let l=e2.provider_map[s];return l&&e[l]?null:(0,t.jsx)(N.Select.Option,{value:s,label:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:e2.providerLogoMap[a],alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,a)}),(0,t.jsx)("span",{children:a})]})},s)})})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Discount Percentage",(0,t.jsx)(f.Tooltip,{title:"Enter a percentage value (e.g., 5 for 5% discount)",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a discount percentage"}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{placeholder:"5",value:a,onValueChange:r,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,t.jsx)(n.Button,{variant:"primary",onClick:i,disabled:!s||!a,children:"Add Provider Discount"})})]}),e7=({marginConfig:e,onMarginChange:s,onRemoveProvider:a})=>{let[l,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(""),[d,c]=(0,i.useState)(""),m=()=>{r(null),o(""),c("")},u=Object.entries(e).map(([e,t])=>({provider:e,margin:t})).sort((e,t)=>{if("global"===e.provider)return -1;if("global"===t.provider)return 1;let s=e4(e.provider).displayName,a=e4(t.provider).displayName;return s.localeCompare(a)});return(0,t.jsx)(e1,{data:u,columns:[{header:"Provider",cell:e=>{if("global"===e.provider)return(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsx)("span",{className:"font-medium",children:"Global (All Providers)"})});let{displayName:s,logo:a}=e4(e.provider);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,s)}),(0,t.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Margin",cell:e=>(0,t.jsx)("div",{className:"flex items-center gap-2",children:l===e.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{value:n,onValueChange:o,placeholder:"10",className:"w-20",autoFocus:!0}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"}),(0,t.jsx)("span",{className:"text-gray-400",children:"+"}),(0,t.jsx)("span",{className:"text-gray-600",children:"$"}),(0,t.jsx)(eQ.TextInput,{value:d,onValueChange:c,placeholder:"0.001",className:"w-24"})]}),(0,t.jsx)(eY.Icon,{icon:eZ,size:"sm",onClick:()=>{var t;let a,l;return t=e.provider,a=n?parseFloat(n):void 0,l=d?parseFloat(d):void 0,void(void 0!==a&&!isNaN(a)&&a>=0&&a<=1e3?void 0!==l&&!isNaN(l)&&l>=0?s(t,{percentage:a/100,fixed_amount:l}):s(t,a/100):void 0!==l&&!isNaN(l)&&l>=0&&s(t,{fixed_amount:l}),r(null),o(""),c(""))},className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,t.jsx)(eY.Icon,{icon:e0.XIcon,size:"sm",onClick:m,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Text,{className:"font-medium",children:(e=>{if("number"==typeof e)return`${(100*e).toFixed(1)}%`;let t=[];return void 0!==e.percentage&&t.push(`${(100*e.percentage).toFixed(1)}%`),void 0!==e.fixed_amount&&t.push(`$${e.fixed_amount.toFixed(6)}`),t.join(" + ")||"0%"})(e.margin)}),(0,t.jsx)(eY.Icon,{icon:eX.PencilAltIcon,size:"sm",onClick:()=>{var t,s;return t=e.provider,s=e.margin,void(r(t),"number"==typeof s?(o((100*s).toString()),c("")):(o(s.percentage?(100*s.percentage).toString():""),c(s.fixed_amount?s.fixed_amount.toString():"")))},className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"350px"},{header:"Actions",cell:e=>{let s="global"===e.provider?"Global":e4(e.provider).displayName;return(0,t.jsx)(eY.Icon,{icon:eJ.TrashIcon,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider margins configured"})},e9=({marginConfig:e,selectedProvider:s,marginType:a,percentageValue:l,fixedAmountValue:r,onProviderChange:i,onMarginTypeChange:o,onPercentageChange:d,onFixedAmountChange:c,onAddProvider:m})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,t.jsx)(f.Tooltip,{title:"Select 'Global' to apply margin to all providers, or select a specific provider",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,t.jsxs)(N.Select,{showSearch:!0,placeholder:"Select provider or 'Global'",value:s,onChange:i,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),children:[(0,t.jsx)(N.Select.Option,{value:"global",label:"Global (All Providers)",children:(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsx)("span",{className:"font-medium",children:"Global (All Providers)"})})},"global"),Object.entries(e2.Providers).map(([s,a])=>{let l=e2.provider_map[s];return l&&e[l]?null:(0,t.jsx)(N.Select.Option,{value:s,label:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:e2.providerLogoMap[a],alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,a)}),(0,t.jsx)("span",{children:a})]})},s)})]})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Margin Type",(0,t.jsx)(f.Tooltip,{title:"Choose how to apply the margin: percentage-based or fixed amount",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a margin type"}],children:(0,t.jsxs)(T.Radio.Group,{value:a,onChange:e=>o(e.target.value),className:"w-full",children:[(0,t.jsx)(T.Radio,{value:"percentage",children:"Percentage-based"}),(0,t.jsx)(T.Radio,{value:"fixed",children:"Fixed Amount"})]})}),"percentage"===a&&(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Margin Percentage",(0,t.jsx)(f.Tooltip,{title:"Enter a percentage value (e.g., 10 for 10% margin)",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a margin percentage"},{validator:(e,t)=>{if(!t)return Promise.reject(Error("Please enter a margin percentage"));let s=parseFloat(t);return isNaN(s)||s<0||s>1e3?Promise.reject(Error("Percentage must be between 0 and 1000")):Promise.resolve()}}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{placeholder:"10",value:l,onValueChange:d,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"})]})}),"fixed"===a&&(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Fixed Margin Amount",(0,t.jsx)(f.Tooltip,{title:"Enter a fixed amount in USD (e.g., 0.001 for $0.001 per request)",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a fixed amount"},{validator:(e,t)=>{if(!t)return Promise.reject(Error("Please enter a fixed amount"));let s=parseFloat(t);return isNaN(s)||s<0?Promise.reject(Error("Fixed amount must be non-negative")):Promise.resolve()}}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"$"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.001",value:r,onValueChange:c,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,t.jsx)(n.Button,{variant:"primary",onClick:m,disabled:!s||"percentage"===a&&!l||"fixed"===a&&!r,children:"Add Provider Margin"})})]});var te=e.i(291542),tt=e.i(955135),ts=e.i(175712);e.i(247167),e.i(62664);var ta=e.i(697539),tl=e.i(963188),tr=e.i(763731),ti=e.i(343794),tn=e.i(244009),to=e.i(242064),td=e.i(185793);let tc=e=>{let t,{value:s,formatter:a,precision:l,decimalSeparator:r,groupSeparator:n="",prefixCls:o}=e;if("function"==typeof a)t=a(s);else{let e=String(s),a=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(a&&"-"!==e){let e=a[1],s=a[2]||"0",d=a[4]||"";s=s.replace(/\B(?=(\d{3})+(?!\d))/g,n),"number"==typeof l&&(d=d.padEnd(l,"0").slice(0,l>0?l:0)),d&&(d=`${r}${d}`),t=[i.createElement("span",{key:"int",className:`${o}-content-value-int`},e,s),d&&i.createElement("span",{key:"decimal",className:`${o}-content-value-decimal`},d)]}else t=e}return i.createElement("span",{className:`${o}-content-value`},t)};var tm=e.i(183293),tu=e.i(246422),tp=e.i(838378);let tx=(0,tu.genStyleHooks)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:s,padding:a,colorTextDescription:l,titleFontSize:r,colorTextHeading:i,contentFontSize:n,fontFamily:o}=e;return{[t]:Object.assign(Object.assign({},(0,tm.resetComponent)(e)),{[`${t}-title`]:{marginBottom:s,color:l,fontSize:r},[`${t}-skeleton`]:{paddingTop:a},[`${t}-content`]:{color:i,fontSize:n,fontFamily:o,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:s},[`${t}-content-suffix`]:{marginInlineStart:s}}})}})((0,tp.mergeToken)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:s}=e;return{titleFontSize:s,contentFontSize:t}});var th=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[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])&&(s[a[l]]=e[a[l]]);return s};let tg=i.forwardRef((e,t)=>{let{prefixCls:s,className:a,rootClassName:l,style:r,valueStyle:n,value:o=0,title:d,valueRender:c,prefix:m,suffix:u,loading:p=!1,formatter:x,precision:h,decimalSeparator:g=".",groupSeparator:y=",",onMouseEnter:j,onMouseLeave:f}=e,b=th(e,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:_,direction:v,className:w,style:k}=(0,to.useComponentConfig)("statistic"),N=_("statistic",s),[S,C,T]=tx(N),I=i.createElement(tc,{decimalSeparator:g,groupSeparator:y,prefixCls:N,formatter:x,precision:h,value:o}),F=(0,ti.default)(N,{[`${N}-rtl`]:"rtl"===v},w,a,l,C,T),L=i.useRef(null);i.useImperativeHandle(t,()=>({nativeElement:L.current}));let A=(0,tn.default)(b,{aria:!0,data:!0});return S(i.createElement("div",Object.assign({},A,{ref:L,className:F,style:Object.assign(Object.assign({},k),r),onMouseEnter:j,onMouseLeave:f}),d&&i.createElement("div",{className:`${N}-title`},d),i.createElement(td.default,{paragraph:!1,loading:p,className:`${N}-skeleton`,active:!0},i.createElement("div",{style:n,className:`${N}-content`},m&&i.createElement("span",{className:`${N}-content-prefix`},m),c?c(I):I,u&&i.createElement("span",{className:`${N}-content-suffix`},u)))))}),ty=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];var tj=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[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])&&(s[a[l]]=e[a[l]]);return s};let tf=e=>{let{value:t,format:s="HH:mm:ss",onChange:a,onFinish:l,type:r}=e,n=tj(e,["value","format","onChange","onFinish","type"]),o="countdown"===r,[d,c]=i.useState(null),m=(0,ta.useEvent)(()=>{let e=Date.now(),s=new Date(t).getTime();return c({}),null==a||a(o?s-e:e-s),!o||!(s{let e,t=()=>{e=(0,tl.default)(()=>{m()&&t()})};return t(),()=>tl.default.cancel(e)},[t,o]),i.useEffect(()=>{c({})},[]),i.createElement(tg,Object.assign({},n,{value:t,valueRender:e=>(0,tr.cloneElement)(e,{title:void 0}),formatter:(e,t)=>d?function(e,t,s){let a,l,r,i,n,o,{format:d=""}=t,c=new Date(e).getTime(),m=Date.now();return a=s?Math.max(c-m,0):Math.max(m-c,0),l=/\[[^\]]*]/g,r=(d.match(l)||[]).map(e=>e.slice(1,-1)),i=d.replace(l,"[]"),n=ty.reduce((e,[t,s])=>{if(e.includes(t)){let l=Math.floor(a/s);return a-=l*s,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return l.toString().padStart(t,"0")})}return e},i),o=0,n.replace(l,()=>{let e=r[o];return o+=1,e})}(e,Object.assign(Object.assign({},t),{format:s}),o):"-"}))},tb=i.memo(e=>i.createElement(tf,Object.assign({},e,{type:"countdown"})));tg.Timer=tf,tg.Countdown=tb;var t_=e.i(621192),tv=e.i(178654),tw=e.i(56456),tk=e.i(755151),tN=e.i(240647),tS=e.i(737434),tC=e.i(91500),tT=e.i(931067);let tI={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 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"}}]},name:"file-excel",theme:"outlined"};var tF=e.i(9583),tL=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:tI}))});let tA=e=>null==e?"-":0===e?"$0.00":e<.01?`$${e.toFixed(6)}`:e<1?`$${e.toFixed(4)}`:`$${(0,eO.formatNumberWithCommas)(e,2)}`,tM=e=>null==e?"-":(0,eO.formatNumberWithCommas)(e,0),tP=({multiResult:e})=>{let[s,a]=(0,i.useState)(!1),l=(0,i.useRef)(null),r=e.entries.some(e=>null!==e.result);return((0,i.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&a(!1)};return s&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[s]),r)?(0,t.jsxs)("div",{className:"relative inline-block",ref:l,children:[(0,t.jsx)(n.Button,{size:"xs",variant:"secondary",icon:tS.DownloadOutlined,onClick:()=>a(!s),children:"Export"}),s&&(0,t.jsxs)("div",{className:"absolute right-0 mt-1 w-44 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:[(0,t.jsxs)("button",{className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>{(e=>{let t=window.open("","_blank");if(!t)return alert("Please allow popups to export PDF");let s=e.entries.filter(e=>null!==e.result),a=s.length,l=` + + + + Multi-Model Cost Estimate Report + + + +

LLM Cost Estimate Report

+

${a} model${1!==a?"s":""} configured

+ +
+

Combined Totals

+
+
+
Total Per Request
+
${tA(e.totals.cost_per_request)}
+
+
+
Total Daily
+
${tA(e.totals.daily_cost)}
+
+
+
Total Monthly
+
${tA(e.totals.monthly_cost)}
+
+
+ ${e.totals.margin_per_request>0?` +
+
+
Margin/Request
+
${tA(e.totals.margin_per_request)}
+
+
+
Daily Margin
+
${tA(e.totals.daily_margin)}
+
+
+
Monthly Margin
+
${tA(e.totals.monthly_margin)}
+
+
+ `:""} +
+ +

Model Breakdown

+ ${s.map(e=>{let t;return t=e.result,` +
+

${t.model} ${t.provider?`(${t.provider})`:""}

+ +
+

Input Tokens per Request: ${tM(t.input_tokens)}

+

Output Tokens per Request: ${tM(t.output_tokens)}

+ ${t.num_requests_per_day?`

Requests per Day: ${tM(t.num_requests_per_day)}

`:""} + ${t.num_requests_per_month?`

Requests per Month: ${tM(t.num_requests_per_month)}

`:""} +
+ + + + + + ${null!==t.daily_cost?"":""} + ${null!==t.monthly_cost?"":""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + +
Cost TypePer RequestDailyMonthly
Input Cost${tA(t.input_cost_per_request)}${tA(t.daily_input_cost)}${tA(t.monthly_input_cost)}
Output Cost${tA(t.output_cost_per_request)}${tA(t.daily_output_cost)}${tA(t.monthly_output_cost)}
Margin/Fee${tA(t.margin_cost_per_request)}${tA(t.daily_margin_cost)}${tA(t.monthly_margin_cost)}
Total${tA(t.cost_per_request)}${tA(t.daily_cost)}${tA(t.monthly_cost)}
+
+ `}).join("")} + + + + + `;t.document.write(l),t.document.close(),t.onload=()=>{t.print()}})(e),a(!1)},children:[(0,t.jsx)(tC.FilePdfOutlined,{className:"mr-3 text-red-500"}),"Export as PDF"]}),(0,t.jsxs)("button",{className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>{(e=>{let t=e.entries.filter(e=>null!==e.result),s=[["LLM Multi-Model Cost Estimate Report"],["Generated",new Date().toLocaleString()],[""]];for(let a of(s.push(["COMBINED TOTALS"],["Total Per Request",e.totals.cost_per_request.toString()],["Total Daily",e.totals.daily_cost?.toString()||"-"],["Total Monthly",e.totals.monthly_cost?.toString()||"-"],["Margin Per Request",e.totals.margin_per_request.toString()],["Daily Margin",e.totals.daily_margin?.toString()||"-"],["Monthly Margin",e.totals.monthly_margin?.toString()||"-"],[""]),s.push(["Model","Provider","Input Tokens","Output Tokens","Requests/Day","Requests/Month","Cost/Request","Daily Cost","Monthly Cost","Input Cost/Req","Output Cost/Req","Margin/Req"]),t)){let e=a.result;s.push([e.model,e.provider||"-",e.input_tokens.toString(),e.output_tokens.toString(),e.num_requests_per_day?.toString()||"-",e.num_requests_per_month?.toString()||"-",e.cost_per_request.toString(),e.daily_cost?.toString()||"-",e.monthly_cost?.toString()||"-",e.input_cost_per_request.toString(),e.output_cost_per_request.toString(),e.margin_cost_per_request.toString()])}let a=new Blob([s.map(e=>e.map(e=>`"${e}"`).join(",")).join("\n")],{type:"text/csv;charset=utf-8;"}),l=window.URL.createObjectURL(a),r=document.createElement("a");r.href=l,r.download=`cost_estimate_multi_model_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(l)})(e),a(!1)},children:[(0,t.jsx)(tL,{className:"mr-3 text-green-600"}),"Export as CSV"]})]})]}):null},tD=e=>null==e?"-":0===e?"$0":e<1e-4?`$${e.toExponential(2)}`:e<1?`$${e.toFixed(4)}`:`$${(0,eO.formatNumberWithCommas)(e,2,!0)}`,tz=({result:e,loading:s,timePeriod:a})=>{let l="day"===a?"Daily":"Monthly",r="day"===a?e.daily_cost:e.monthly_cost,i="day"===a?e.daily_input_cost:e.monthly_input_cost,n="day"===a?e.daily_output_cost:e.monthly_output_cost,o="day"===a?e.daily_margin_cost:e.monthly_margin_cost,d="day"===a?e.num_requests_per_day:e.num_requests_per_month;return(0,t.jsxs)("div",{className:"space-y-3 bg-gray-50 p-4 rounded-lg",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-500 text-sm",children:[(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}),(0,t.jsx)("span",{children:"Updating..."})]}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Total/Request"}),(0,t.jsx)(g.Text,{className:"text-base font-semibold text-blue-600",children:tD(e.cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Input Cost"}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(e.input_cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Output Cost"}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(e.output_cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Margin Fee"}),(0,t.jsx)(g.Text,{className:`text-sm ${e.margin_cost_per_request>0?"text-amber-600":""}`,children:tD(e.margin_cost_per_request)})]})]}),null!==r&&(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 pt-2 border-t border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Total (",null==d?"-":(0,eO.formatNumberWithCommas)(d,0,!0)," req)"]}),(0,t.jsx)(g.Text,{className:`text-base font-semibold ${"day"===a?"text-green-600":"text-purple-600"}`,children:tD(r)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Input"]}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(i)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Output"]}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(n)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Margin Fee"]}),(0,t.jsx)(g.Text,{className:`text-sm ${(o??0)>0?"text-amber-600":""}`,children:tD(o)})]})]}),(e.input_cost_per_token||e.output_cost_per_token)&&(0,t.jsxs)("div",{className:"text-xs text-gray-400 pt-2 border-t border-gray-200",children:["Token Pricing: "," ",e.input_cost_per_token&&(0,t.jsxs)("span",{children:["Input $",(0,eO.formatNumberWithCommas)(1e6*e.input_cost_per_token,2),"/1M"]}),e.input_cost_per_token&&e.output_cost_per_token&&" | ",e.output_cost_per_token&&(0,t.jsxs)("span",{children:["Output $",(0,eO.formatNumberWithCommas)(1e6*e.output_cost_per_token,2),"/1M"]})]})]})},tE=({multiResult:e,timePeriod:s})=>{let[a,l]=(0,i.useState)(new Set),r=e.entries.filter(e=>null!==e.result),o=e.entries.filter(e=>e.loading),d=e.entries.filter(e=>null!==e.error),c=r.length>0,m=o.length>0,u=d.length>0;if(!c&&!m&&!u)return(0,t.jsx)("div",{className:"py-6 text-center border border-dashed border-gray-300 rounded-lg bg-gray-50",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Select models above to see cost estimates"})});if(!c&&m&&!u)return(0,t.jsxs)("div",{className:"py-6 text-center",children:[(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0})}),(0,t.jsx)(g.Text,{className:"text-gray-500 block mt-2",children:"Calculating costs..."})]});if(!c&&u)return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-base font-semibold text-gray-900",children:"Cost Estimates"}),m&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})]}),d.map(e=>(0,t.jsxs)("div",{className:"text-sm text-red-600 bg-red-50 p-3 rounded-lg border border-red-200",children:[(0,t.jsxs)("span",{className:"font-medium",children:[e.entry.model||"Unknown model",": "]}),e.error]},e.entry.id))]});let p=e.totals.margin_per_request>0,x="day"===s?"Daily":"Monthly",h=[{title:"Model",dataIndex:"model",key:"model",render:(e,s)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e}),s.provider&&(0,t.jsx)(I.Tag,{color:"blue",className:"text-xs",children:s.provider}),s.loading&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})]}),s.error&&(0,t.jsxs)("div",{className:"text-xs text-red-600 bg-red-50 px-2 py-1 rounded",children:["⚠️ ",s.error]}),s.hasZeroCost&&!s.error&&(0,t.jsx)("div",{className:"text-xs text-amber-600 bg-amber-50 px-2 py-1 rounded",children:"⚠️ No pricing data found for this model. Set base_model in config."})]})},{title:"Per Request",dataIndex:"cost_per_request",key:"cost_per_request",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:"font-mono text-sm",children:tD(e)})},{title:"Margin Fee",dataIndex:"margin_cost_per_request",key:"margin_cost_per_request",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:`font-mono text-sm ${(e??0)>0?"text-amber-600":"text-gray-400"}`,children:tD(e)})},{title:x,dataIndex:"day"===s?"daily_cost":"monthly_cost",key:"period_cost",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:"font-mono text-sm",children:tD(e)})},{title:"",key:"expand",width:40,render:(e,s)=>s.error?null:(0,t.jsx)(n.Button,{size:"xs",variant:"light",onClick:()=>{var e;return e=s.id,void l(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},className:"text-gray-400 hover:text-gray-600",children:a.has(s.id)?(0,t.jsx)(tk.DownOutlined,{}):(0,t.jsx)(tN.RightOutlined,{})})}],y=e.entries.filter(e=>e.entry.model).map(e=>({key:e.entry.id,id:e.entry.id,model:e.result?.model||e.entry.model,provider:e.result?.provider,cost_per_request:e.result?.cost_per_request??null,margin_cost_per_request:e.result?.margin_cost_per_request??null,daily_cost:e.result?.daily_cost??null,monthly_cost:e.result?.monthly_cost??null,error:e.error,loading:e.loading,hasZeroCost:e.result&&0===e.result.cost_per_request}));return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-base font-semibold text-gray-900",children:"Cost Estimates"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[m&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}),(0,t.jsx)(tP,{multiResult:e})]})]}),(0,t.jsxs)(ts.Card,{size:"small",className:"bg-gradient-to-r from-slate-50 to-blue-50 border-slate-200",children:[(0,t.jsxs)(t_.Row,{gutter:[16,8],children:[(0,t.jsx)(tv.Col,{xs:24,sm:12,children:(0,t.jsx)(tg,{title:(0,t.jsx)("span",{className:"text-xs",children:"Total Per Request"}),value:tD(e.totals.cost_per_request),valueStyle:{color:"#1890ff",fontSize:"18px",fontFamily:"monospace"}})}),(0,t.jsx)(tv.Col,{xs:24,sm:12,children:(0,t.jsx)(tg,{title:(0,t.jsxs)("span",{className:"text-xs",children:["Total ",x]}),value:tD("day"===s?e.totals.daily_cost:e.totals.monthly_cost),valueStyle:{color:"day"===s?"#52c41a":"#722ed1",fontSize:"18px",fontFamily:"monospace"}})})]}),p&&(0,t.jsxs)(t_.Row,{gutter:[16,8],className:"mt-3 pt-3 border-t border-slate-200",children:[(0,t.jsxs)(tv.Col,{xs:24,sm:12,children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Margin Fee/Request"}),(0,t.jsx)("div",{className:"text-sm font-mono text-amber-600",children:tD(e.totals.margin_per_request)})]}),(0,t.jsxs)(tv.Col,{xs:24,sm:12,children:[(0,t.jsxs)("div",{className:"text-xs text-gray-500",children:[x," Margin Fee"]}),(0,t.jsx)("div",{className:"text-sm font-mono text-amber-600",children:tD("day"===s?e.totals.daily_margin:e.totals.monthly_margin)})]})]})]}),y.length>0&&(0,t.jsx)(te.Table,{columns:h,dataSource:y,pagination:!1,size:"small",className:"border border-gray-200 rounded-lg",expandable:{expandedRowKeys:Array.from(a),expandedRowRender:e=>{let a=r.find(t=>t.entry.id===e.id);return a?.result?(0,t.jsx)("div",{className:"py-2",children:(0,t.jsx)(tz,{result:a.result,loading:a.loading,timePeriod:s})}):null},showExpandColumn:!1}})]})},tO=()=>({id:`entry-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,model:"",input_tokens:1e3,output_tokens:500,num_requests_per_day:void 0,num_requests_per_month:void 0}),tR=({accessToken:e,models:s})=>{let[a,l]=(0,i.useState)([tO()]),[r,n]=(0,i.useState)("month"),{debouncedFetchForEntry:o,removeEntry:d,getMultiModelResult:c}=function(e){let[t,s]=(0,i.useState)(new Map),a=(0,i.useRef)(new Map),l=(0,i.useCallback)(async t=>{if(!e||!t.model)return void s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:null}),s});s(e=>{let s=new Map(e),a=s.get(t.id);return s.set(t.id,{entry:t,result:a?.result??null,loading:!0,error:null}),s});try{let a=(0,w.getProxyBaseUrl)(),l=a?`${a}/cost/estimate`:"/cost/estimate",r={model:t.model,input_tokens:t.input_tokens||0,output_tokens:t.output_tokens||0,num_requests_per_day:t.num_requests_per_day||null,num_requests_per_month:t.num_requests_per_month||null},i=await fetch(l,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(i.ok){let e=await i.json();s(s=>{let a=new Map(s);return a.set(t.id,{entry:t,result:e,loading:!1,error:null}),a})}else{let e=await i.json(),a=e.detail?.error||e.detail||"Failed to estimate cost";s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:a}),s})}}catch(e){console.error("Error estimating cost:",e),s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:"Network error"}),s})}},[e]),r=(0,i.useCallback)(e=>{let t=a.current.get(e.id);t&&clearTimeout(t);let s=setTimeout(()=>{l(e)},500);a.current.set(e.id,s)},[l]),n=(0,i.useCallback)(e=>{let t=a.current.get(e);t&&(clearTimeout(t),a.current.delete(e)),s(t=>{let s=new Map(t);return s.delete(e),s})},[]);return(0,i.useEffect)(()=>{let e=a.current;return()=>{e.forEach(e=>clearTimeout(e)),e.clear()}},[]),{debouncedFetchForEntry:r,removeEntry:n,getMultiModelResult:(0,i.useCallback)(e=>{let s=e.map(e=>{let s=t.get(e.id);return{entry:e,result:s?.result??null,loading:s?.loading??!1,error:s?.error??null}}),a=0,l=null,r=null,i=0,n=null,o=null;for(let e of s)e.result&&(a+=e.result.cost_per_request,i+=e.result.margin_cost_per_request,null!==e.result.daily_cost&&(l=(l??0)+e.result.daily_cost),null!==e.result.daily_margin_cost&&(n=(n??0)+e.result.daily_margin_cost),null!==e.result.monthly_cost&&(r=(r??0)+e.result.monthly_cost),null!==e.result.monthly_margin_cost&&(o=(o??0)+e.result.monthly_margin_cost));return{entries:s,totals:{cost_per_request:a,daily_cost:l,monthly_cost:r,margin_per_request:i,daily_margin:n,monthly_margin:o}}},[t])}}(e),m=(0,i.useCallback)((e,t,s)=>{l(a=>{let l=a.map(a=>a.id===e?{...a,[t]:s}:a),r=l.find(t=>t.id===e);return r&&r.model&&o(r),l})},[o]),u=(0,i.useCallback)(e=>{n(e),l(t=>t.map(t=>({...t,num_requests_per_day:"day"===e?t.num_requests_per_day:void 0,num_requests_per_month:"month"===e?t.num_requests_per_month:void 0})))},[]),p=(0,i.useCallback)(()=>{l(e=>[...e,tO()])},[]),x=(0,i.useCallback)(e=>{l(t=>t.filter(t=>t.id!==e)),d(e)},[d]),h=c(a),g=[{title:"Model",dataIndex:"model",key:"model",width:"35%",render:(e,a)=>(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Select a model",value:a.model||void 0,onChange:e=>m(a.id,"model",e),optionFilterProp:"label",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:s.map(e=>({value:e,label:e})),style:{width:"100%"},size:"small"})},{title:"Input Tokens",dataIndex:"input_tokens",key:"input_tokens",width:"18%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:s.input_tokens,onChange:e=>m(s.id,"input_tokens",e??0),style:{width:"100%"},size:"small",formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")})},{title:"Output Tokens",dataIndex:"output_tokens",key:"output_tokens",width:"18%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:s.output_tokens,onChange:e=>m(s.id,"output_tokens",e??0),style:{width:"100%"},size:"small",formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")})},{title:`Requests/${"day"===r?"Day":"Month"}`,dataIndex:"day"===r?"num_requests_per_day":"num_requests_per_month",key:"num_requests",width:"20%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:"day"===r?s.num_requests_per_day:s.num_requests_per_month,onChange:e=>m(s.id,"day"===r?"num_requests_per_day":"num_requests_per_month",e??void 0),style:{width:"100%"},size:"small",placeholder:"-",formatter:e=>e?`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,","):""})},{title:"",key:"actions",width:50,render:(e,s)=>(0,t.jsx)(V.Button,{type:"text",icon:(0,t.jsx)(tt.DeleteOutlined,{}),onClick:()=>x(s.id),disabled:1===a.length,danger:!0,size:"small"})}];return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-2",children:(0,t.jsxs)(T.Radio.Group,{value:r,onChange:e=>u(e.target.value),size:"small",optionType:"button",buttonStyle:"solid",children:[(0,t.jsx)(T.Radio.Button,{value:"day",children:"Per Day"}),(0,t.jsx)(T.Radio.Button,{value:"month",children:"Per Month"})]})}),(0,t.jsx)(te.Table,{columns:g,dataSource:a,rowKey:"id",pagination:!1,size:"small",footer:()=>(0,t.jsx)(V.Button,{type:"dashed",onClick:p,icon:(0,t.jsx)(H.PlusOutlined,{}),className:"w-full",children:"Add Another Model"})}),(0,t.jsx)(tE,{multiResult:h,timePeriod:r})]})};var tB=e.i(270377),t$=e.i(778917),tq=e.i(664659);let tU=({items:e,children:s="Docs",className:a=""})=>{let[l,r]=(0,i.useState)(!1),n=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=e=>{n.current&&!n.current.contains(e.target)&&r(!1)};return l&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l]),(0,t.jsxs)("div",{className:`relative inline-block ${a}`,ref:n,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>r(!l),className:"inline-flex items-center gap-1 text-gray-500 hover:text-gray-700 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded px-2 py-1","aria-expanded":l,"aria-haspopup":"true",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)(tq.ChevronDown,{className:`h-3 w-3 transition-transform ${l?"rotate-180":""}`,"aria-hidden":"true"})]}),l&&(0,t.jsx)("div",{className:"absolute right-0 mt-1 w-56 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:e.map((e,s)=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>r(!1),children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)(t$.ExternalLink,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 ml-2","aria-hidden":"true"})]},s))})]})};var tV=e.i(673709);let tH=()=>{let[e,s]=(0,i.useState)(""),[a,l]=(0,i.useState)(""),r=(0,i.useMemo)(()=>{let t=parseFloat(e),s=parseFloat(a);if(isNaN(t)||isNaN(s)||0===t||0===s)return null;let l=t+s,r=s/l*100;return{originalCost:l.toFixed(10),finalCost:t.toFixed(10),discountAmount:s.toFixed(10),discountPercentage:r.toFixed(2)}},[e,a]);return(0,t.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Cost Calculation"}),(0,t.jsxs)(g.Text,{className:"text-xs text-gray-600",children:["Discounts are applied to provider costs: ",(0,t.jsx)("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-xs",children:"final_cost = base_cost × (1 - discount%/100)"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Example"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"A 5% discount on a $10.00 request results in: $10.00 × (1 - 0.05) = $9.50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Valid Range"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Discount percentages must be between 0% and 100%"})]}),(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-2",children:"Validating Discounts"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mb-3",children:"Make a test request and check the response headers to verify discounts are applied:"}),(0,t.jsx)(tV.default,{language:"bash",code:`curl -X POST -i http://your-proxy:4000/chat/completions \\ + -H "Content-Type: application/json" \\ + -H "Authorization: Bearer sk-1234" \\ + -d '{ + "model": "gemini/gemini-2.5-pro", + "messages": [{"role": "user", "content": "Hello"}] + }'`}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mt-3 mb-2",children:"Look for these headers in the response:"}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Final cost after discount"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-original"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Original cost before discount"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-discount-amount"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Amount discounted"})]})]})]}),(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-3",children:"Discount Calculator"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mb-3",children:"Enter values from your response headers to verify the discount:"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Response Cost (x-litellm-response-cost)"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.0171938125",value:e,onValueChange:s,className:"text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Discount Amount (x-litellm-response-cost-discount-amount)"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.0009049375",value:a,onValueChange:l,className:"text-sm"})]})]}),r&&(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,t.jsx)(g.Text,{className:"text-sm font-medium text-blue-900 mb-2",children:"Calculated Results"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Original Cost:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.originalCost]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Final Cost:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.finalCost]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Discount Amount:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.discountAmount]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-blue-300",children:[(0,t.jsx)(g.Text,{className:"text-xs font-semibold text-blue-900",children:"Discount Applied:"}),(0,t.jsxs)(g.Text,{className:"text-sm font-bold text-blue-900",children:[r.discountPercentage,"%"]})]})]})]})]})]})};var tG=e.i(689020);let tK=[{label:"Custom pricing for models",href:"https://docs.litellm.ai/docs/proxy/custom_pricing"},{label:"Spend tracking",href:"https://docs.litellm.ai/docs/proxy/cost_tracking"}],tW=({userID:e,userRole:s,accessToken:a})=>{let[l,r]=(0,i.useState)(void 0),[o,d]=(0,i.useState)(""),[c,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(void 0),[b,_]=(0,i.useState)("percentage"),[v,N]=(0,i.useState)(""),[S,C]=(0,i.useState)(""),[T,I]=(0,i.useState)([]),[F]=k.Form.useForm(),[L]=k.Form.useForm(),[A,M]=y.Modal.useModal(),P="proxy_admin"===s||"Admin"===s,{discountConfig:D,fetchDiscountConfig:z,handleAddProvider:E,handleRemoveProvider:O,handleDiscountChange:R}=function({accessToken:e}){let[t,s]=(0,i.useState)({}),a=(0,i.useCallback)(async()=>{try{let t=(0,w.getProxyBaseUrl)(),a=t?`${t}/config/cost_discount_config`:"/config/cost_discount_config",l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();s(e.values||{})}else console.error("Failed to fetch discount config")}catch(e){console.error("Error fetching discount config:",e),eE.default.fromBackend("Failed to fetch discount configuration")}},[e]),l=(0,i.useCallback)(async t=>{try{let s=(0,w.getProxyBaseUrl)(),l=s?`${s}/config/cost_discount_config`:"/config/cost_discount_config",r=await fetch(l,{method:"PATCH",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok)eE.default.success("Discount configuration updated successfully"),await a();else{let e=await r.json(),t=e.detail?.error||e.detail||"Failed to update settings";eE.default.fromBackend(t)}}catch(e){console.error("Error updating discount config:",e),eE.default.fromBackend("Failed to update discount configuration")}},[e,a]),r=(0,i.useCallback)(async(e,a)=>{if(!e||!a)return eE.default.fromBackend("Please select a provider and enter discount percentage"),!1;let r=parseFloat(a);if(isNaN(r)||r<0||r>100)return eE.default.fromBackend("Discount must be between 0% and 100%"),!1;let i=e5(e);if(!i)return eE.default.fromBackend("Invalid provider selected"),!1;if(t[i])return eE.default.fromBackend(`Discount for ${e2.Providers[e]} already exists. Edit it in the table above.`),!1;let n={...t,[i]:r/100};return s(n),await l(n),!0},[t,l]),n=(0,i.useCallback)(async e=>{let a={...t};delete a[e],s(a),await l(a)},[t,l]),o=(0,i.useCallback)(async(e,a)=>{let r=parseFloat(a);if(!isNaN(r)&&r>=0&&r<=1){let a={...t,[e]:r};s(a),await l(a)}},[t,l]);return{discountConfig:t,setDiscountConfig:s,fetchDiscountConfig:a,saveDiscountConfig:l,handleAddProvider:r,handleRemoveProvider:n,handleDiscountChange:o}}({accessToken:a}),{marginConfig:B,fetchMarginConfig:$,handleAddMargin:q,handleRemoveMargin:U,handleMarginChange:V}=function({accessToken:e}){let[t,s]=(0,i.useState)({}),a=(0,i.useCallback)(async()=>{try{let t=(0,w.getProxyBaseUrl)(),a=t?`${t}/config/cost_margin_config`:"/config/cost_margin_config",l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();s(e.values||{})}else console.error("Failed to fetch margin config")}catch(e){console.error("Error fetching margin config:",e),eE.default.fromBackend("Failed to fetch margin configuration")}},[e]),l=(0,i.useCallback)(async t=>{try{let s=(0,w.getProxyBaseUrl)(),l=s?`${s}/config/cost_margin_config`:"/config/cost_margin_config",r=await fetch(l,{method:"PATCH",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok)eE.default.success("Margin configuration updated successfully"),await a();else{let e=await r.json(),t=e.detail?.error||e.detail||"Failed to update settings";eE.default.fromBackend(t)}}catch(e){console.error("Error updating margin config:",e),eE.default.fromBackend("Failed to update margin configuration")}},[e,a]),r=(0,i.useCallback)(async e=>{let a,r,{selectedProvider:i,marginType:n,percentageValue:o,fixedAmountValue:d}=e;if(!i)return eE.default.fromBackend("Please select a provider"),!1;if("global"===i)a="global";else{let e=e5(i);if(!e)return eE.default.fromBackend("Invalid provider selected"),!1;a=e}if(t[a]){let e="global"===a?"Global":e2.Providers[i];return eE.default.fromBackend(`Margin for ${e} already exists. Edit it in the table above.`),!1}if("percentage"===n){let e=parseFloat(o);if(isNaN(e)||e<0||e>1e3)return eE.default.fromBackend("Percentage must be between 0% and 1000%"),!1;r=e/100}else{let e=parseFloat(d);if(isNaN(e)||e<0)return eE.default.fromBackend("Fixed amount must be non-negative"),!1;r={fixed_amount:e}}let c={...t,[a]:r};return s(c),await l(c),!0},[t,l]),n=(0,i.useCallback)(async e=>{let a={...t};delete a[e],s(a),await l(a)},[t,l]),o=(0,i.useCallback)(async(e,a)=>{let r={...t,[e]:a};s(r),await l(r)},[t,l]);return{marginConfig:t,setMarginConfig:s,fetchMarginConfig:a,saveMarginConfig:l,handleAddMargin:r,handleRemoveMargin:n,handleMarginChange:o}}({accessToken:a});(0,i.useEffect)(()=>{a&&(Promise.all([z(),$()]).finally(()=>{m(!1)}),(async()=>{try{let e=await (0,tG.fetchAvailableModels)(a);I(e.map(e=>e.model_group))}catch(e){console.error("Error fetching models:",e)}})())},[a,z,$]);let H=async()=>{await E(l,o)&&(r(void 0),d(""),p(!1))},G=async(e,s)=>{A.confirm({title:"Remove Provider Discount",icon:(0,t.jsx)(tB.ExclamationCircleOutlined,{}),content:`Are you sure you want to remove the discount for ${s}?`,okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:()=>O(e)})},K=async()=>{await q({selectedProvider:j,marginType:b,percentageValue:v,fixedAmountValue:S})&&(f(void 0),N(""),C(""),_("percentage"),h(!1))},W=async(e,s)=>{A.confirm({title:"Remove Provider Margin",icon:(0,t.jsx)(tB.ExclamationCircleOutlined,{}),content:`Are you sure you want to remove the margin for ${s}?`,okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:()=>U(e)})};return a?(0,t.jsxs)("div",{className:"w-full p-8",children:[M,(0,t.jsx)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ek.Title,{children:"Cost Tracking Settings"}),(0,t.jsx)(tU,{items:tK})]}),(0,t.jsx)(g.Text,{className:"text-gray-500 mt-1",children:"Configure cost discounts and margins for different LLM providers. Changes are saved automatically."})]})}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full space-y-4",children:[P&&(0,t.jsxs)(eG.Accordion,{children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Provider Discounts"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Apply percentage-based discounts to reduce costs for specific providers"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsxs)(eS.TabGroup,{children:[(0,t.jsxs)(eC.TabList,{className:"px-6 pt-4",children:[(0,t.jsx)(eN.Tab,{children:"Discounts"}),(0,t.jsx)(eN.Tab,{children:"Test It"})]}),(0,t.jsxs)(eI.TabPanels,{children:[(0,t.jsx)(eT.TabPanel,{children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(n.Button,{onClick:()=>p(!0),children:"+ Add Provider Discount"})}),c?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(D).length>0?(0,t.jsx)(e3,{discountConfig:D,onDiscountChange:R,onRemoveProvider:G}):(0,t.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)(g.Text,{className:"text-gray-700 font-medium mb-2",children:"No provider discounts configured"}),(0,t.jsx)(g.Text,{className:"text-gray-500 text-sm",children:'Click "Add Provider Discount" to get started'})]})]})}),(0,t.jsx)(eT.TabPanel,{children:(0,t.jsx)("div",{className:"px-6 pb-4",children:(0,t.jsx)(tH,{})})})]})]})})]}),P&&(0,t.jsxs)(eG.Accordion,{children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Fee/Price Margin"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Add fees or margins to LLM costs for internal billing and cost recovery"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(n.Button,{onClick:()=>h(!0),children:"+ Add Provider Margin"})}),c?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(B).length>0?(0,t.jsx)(e7,{marginConfig:B,onMarginChange:V,onRemoveProvider:W}):(0,t.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)(g.Text,{className:"text-gray-700 font-medium mb-2",children:"No provider margins configured"}),(0,t.jsx)(g.Text,{className:"text-gray-500 text-sm",children:'Click "Add Provider Margin" to get started'})]})]})})]}),(0,t.jsxs)(eG.Accordion,{defaultOpen:!0,children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Pricing Calculator"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Estimate LLM costs based on expected token usage and request volume"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(tR,{accessToken:a,models:T})})})]})]}),(0,t.jsx)(y.Modal,{title:(0,t.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Discount"})}),open:u,width:1e3,onCancel:()=>{p(!1),F.resetFields(),r(void 0),d("")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(g.Text,{className:"text-sm text-gray-600 mb-6",children:"Select a provider and set its discount percentage. Enter a value between 0% and 100% (e.g., 5 for a 5% discount)."}),(0,t.jsx)(k.Form,{form:F,onFinish:()=>{H()},layout:"vertical",className:"space-y-6",children:(0,t.jsx)(e8,{discountConfig:D,selectedProvider:l,newDiscount:o,onProviderChange:r,onDiscountChange:d,onAddProvider:H})})]})}),(0,t.jsx)(y.Modal,{title:(0,t.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Margin"})}),open:x,width:1e3,onCancel:()=>{h(!1),L.resetFields(),f(void 0),N(""),C(""),_("percentage")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(g.Text,{className:"text-sm text-gray-600 mb-6",children:'Select a provider (or "Global" for all providers) and configure the margin. You can use percentage-based or fixed amount.'}),(0,t.jsx)(k.Form,{form:L,layout:"vertical",className:"space-y-6",children:(0,t.jsx)(e9,{marginConfig:B,selectedProvider:j,marginType:b,percentageValue:v,fixedAmountValue:S,onProviderChange:f,onMarginTypeChange:_,onPercentageChange:N,onFixedAmountChange:C,onAddProvider:K})})]})})]}):null};var tQ=e.i(226898),tY=e.i(973706),tJ=e.i(447566),tX=e.i(602073),tZ=e.i(313603),t0=e.i(285027),t1=e.i(266027),t2=e.i(653496),t4=e.i(149192),t5=e.i(788191);let t6=`Evaluate whether this guardrail's decision was correct. +Analyze the user input, the guardrail action taken, and determine if it was appropriate. + +Consider: +— Was the user's intent genuinely harmful or policy-violating? +— Was the guardrail's action (block / flag / pass) appropriate? +— Could this be a false positive or false negative? + +Return a structured verdict with confidence and justification.`,t3=`{ + "verdict": "correct" | "false_positive" | "false_negative", + "confidence": 0.0, + "justification": "string", + "risk_category": "string", + "suggested_action": "keep" | "adjust threshold" | "add allowlist" +} +`;function t8({open:e,onClose:s,guardrailName:a,accessToken:l,onRunEvaluation:r}){let[n,o]=(0,i.useState)(t6),[d,c]=(0,i.useState)(t3),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)([]),[h,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!e||!l)return void x([]);let t=!1;return g(!0),(0,tG.fetchAvailableModels)(l).then(e=>{t||x(e)}).catch(()=>{t||x([])}).finally(()=>{t||g(!1)}),()=>{t=!0}},[e,l]);let j=p.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)(y.Modal,{title:"Evaluation Settings",open:e,onCancel:s,width:640,footer:null,closeIcon:(0,t.jsx)(t4.CloseOutlined,{}),destroyOnClose:!0,children:[(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-4",children:a?`Configure AI evaluation for ${a}`:"Configure AI evaluation for re-running on logs"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Evaluation Prompt"}),(0,t.jsx)("button",{type:"button",onClick:()=>o(t6),className:"text-xs text-indigo-600 hover:text-indigo-700",children:"Reset to default"})]}),(0,t.jsx)(S.Input.TextArea,{value:n,onChange:e=>o(e.target.value),rows:6,className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"System prompt sent to the evaluation model. Output is structured via response_format."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Response Schema"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:"response_format: json_schema"}),(0,t.jsx)(S.Input.TextArea,{value:d,onChange:e=>c(e.target.value),rows:6,className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Model"}),(0,t.jsx)(N.Select,{placeholder:h?"Loading models…":"Select a model",value:m??void 0,onChange:u,options:j,style:{width:"100%"},showSearch:!0,optionFilterProp:"label",loading:h,notFoundContent:l?"No models available":"Sign in to see models"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsx)(V.Button,{onClick:s,children:"Cancel"}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(t5.PlayCircleOutlined,{}),onClick:()=>{m&&(r?.({prompt:n,schema:d,model:m}),s())},disabled:!m,children:"Run Evaluation"})]})]})}var t7=e.i(166540);e.i(3565);var t9=e.i(502626);let se={blocked:{icon:t4.CloseOutlined,color:"text-red-600",bg:"bg-red-50",border:"border-red-200",label:"Blocked"},passed:{icon:v.CheckCircleOutlined,color:"text-green-600",bg:"bg-green-50",border:"border-green-200",label:"Passed"},flagged:{icon:t0.WarningOutlined,color:"text-amber-600",bg:"bg-amber-50",border:"border-amber-200",label:"Flagged"}};function st({guardrailName:e,filterAction:s="all",logs:a=[],logsLoading:l=!1,totalLogs:r,accessToken:n=null,startDate:o="",endDate:d=""}){let[c,m]=(0,i.useState)(10),[u,p]=(0,i.useState)(s),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(!1),j=a.filter(e=>"all"===u||e.action===u).slice(0,c),f=r??a.length,b=o?(0,t7.default)(o).utc().format("YYYY-MM-DD HH:mm:ss"):(0,t7.default)().subtract(24,"hours").utc().format("YYYY-MM-DD HH:mm:ss"),_=d?(0,t7.default)(d).utc().endOf("day").format("YYYY-MM-DD HH:mm:ss"):(0,t7.default)().utc().format("YYYY-MM-DD HH:mm:ss"),{data:v}=(0,t1.useQuery)({queryKey:["spend-log-by-request",x,b,_],queryFn:async()=>n&&x?await (0,w.uiSpendLogsCall)({accessToken:n,start_date:b,end_date:_,page:1,page_size:10,params:{request_id:x}}):null,enabled:!!(n&&x&&g)}),k=v?.data?.[0]??null;return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:e?`Logs — ${e}`:"Request Logs"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:l?"Loading…":a.length>0?`Showing ${j.length} of ${f} entries`:"No logs for this period. Select a guardrail and date range."})]}),a.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-1",children:["all","blocked","flagged","passed"].map(e=>(0,t.jsx)(V.Button,{type:u===e?"primary":"default",size:"small",onClick:()=>p(e),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,t.jsx)("div",{className:"h-4 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Sample:"}),[10,50,100].map(e=>(0,t.jsx)(V.Button,{type:c===e?"primary":"default",size:"small",onClick:()=>m(e),children:e},e))]})]})]})}),l&&(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{})}),!l&&0===j.length&&(0,t.jsx)("div",{className:"py-12 text-center text-sm text-gray-500",children:"No logs to display. Adjust filters or date range."}),!l&&j.length>0&&(0,t.jsx)("div",{className:"divide-y divide-gray-100",children:j.map(e=>{let s=se[e.action],a=s.icon;return(0,t.jsxs)("button",{type:"button",onClick:()=>{h(e.id),y(!0)},className:"w-full text-left px-4 py-3 hover:bg-gray-50 transition-colors flex items-start gap-3",children:[(0,t.jsx)(a,{className:`w-4 h-4 mt-0.5 flex-shrink-0 ${s.color}`}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${s.bg} ${s.color} ${s.border}`,children:s.label}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:e.timestamp}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"·"}),e.model&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.model})]}),(0,t.jsx)("p",{className:"text-sm text-gray-800 truncate",children:e.input_snippet??e.input??"—"})]}),(0,t.jsx)(tk.DownOutlined,{className:"w-4 h-4 text-gray-400 flex-shrink-0 mt-1"})]},e.id)})}),(0,t.jsx)(t9.LogDetailsDrawer,{open:g,onClose:()=>{y(!1),h(null)},logEntry:k,accessToken:n,allLogs:k?[k]:[],startTime:b})]})}function ss({label:e,value:s,valueColor:a="text-gray-900",icon:l,subtitle:r}){return(0,t.jsxs)("div",{className:"h-full bg-white border border-gray-200 rounded-lg p-5 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-600",children:e}),l&&(0,t.jsx)("span",{className:"text-gray-400",children:l})]}),(0,t.jsx)("div",{className:`text-3xl font-semibold ${a} tracking-tight`,children:s}),r&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:r})]})}let sa={healthy:{bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},warning:{bg:"bg-amber-50",text:"text-amber-700",dot:"bg-amber-500"},critical:{bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}};function sl({guardrailId:e,onBack:s,accessToken:a=null,startDate:l,endDate:r}){let[n,o]=(0,i.useState)("overview"),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(1),{data:p,isLoading:x,error:h}=(0,t1.useQuery)({queryKey:["guardrails-usage-detail",e,l,r],queryFn:()=>(0,w.getGuardrailsUsageDetail)(a,e,l,r),enabled:!!a&&!!e}),{data:g,isLoading:y}=(0,t1.useQuery)({queryKey:["guardrails-usage-logs",e,m,50],queryFn:()=>(0,w.getGuardrailsUsageLogs)(a,{guardrailId:e,page:m,pageSize:50,startDate:l,endDate:r}),enabled:!!a&&!!e}),j=(0,i.useMemo)(()=>(g?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:e.action,score:e.score,model:e.model,input_snippet:e.input_snippet,output_snippet:e.output_snippet,reason:e.reason})),[g?.logs]),f=p?{name:p.guardrail_name,description:p.description??"",status:p.status,provider:p.provider,type:p.type,requestsEvaluated:p.requestsEvaluated,failRate:p.failRate,avgScore:p.avgScore,avgLatency:p.avgLatency}:{name:e,description:"",status:"healthy",provider:"—",type:"—",requestsEvaluated:0,failRate:0,avgScore:void 0,avgLatency:void 0},b=sa[f.status]??sa.healthy;return x&&!p?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})}):h&&!p?(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load guardrail details."})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:f.name}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 text-xs font-medium rounded-full ${b.bg} ${b.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${b.dot}`}),f.status.charAt(0).toUpperCase()+f.status.slice(1)]})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 ml-8",children:f.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:f.provider}),(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>c(!0),title:"Evaluation settings"})]})]})]}),(0,t.jsx)(t2.Tabs,{activeKey:n,onChange:o,items:[{key:"overview",label:"Overview"},{key:"logs",label:"Logs"}]}),"overview"===n&&(0,t.jsxs)("div",{className:"space-y-6 mt-4",children:[(0,t.jsxs)(t_.Row,{gutter:[16,16],children:[(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Requests Evaluated",value:f.requestsEvaluated.toLocaleString()})}),(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Fail Rate",value:`${f.failRate}%`,valueColor:f.failRate>15?"text-red-600":f.failRate>5?"text-amber-600":"text-green-600",subtitle:`${Math.round(f.requestsEvaluated*f.failRate/100).toLocaleString()} blocked`,icon:f.failRate>15?(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"}):void 0})}),(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Avg. latency added",value:null!=f.avgLatency?`${Math.round(f.avgLatency)}ms`:"—",valueColor:null!=f.avgLatency?f.avgLatency>150?"text-red-600":f.avgLatency>50?"text-amber-600":"text-green-600":"text-gray-500",subtitle:null!=f.avgLatency?"Per request (avg)":"No data"})})]}),(0,t.jsx)(st,{guardrailName:f.name,filterAction:"all",logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})]}),"logs"===n&&(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(st,{guardrailName:f.name,logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})}),(0,t.jsx)(t8,{open:d,onClose:()=>c(!1),guardrailName:f.name,accessToken:a})]})}let sr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z"}}]},name:"rise",theme:"outlined"};var si=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:sr}))}),sn=e.i(898586),so=e.i(584935);function sd({data:e}){let s=e&&e.length>0?e:[];return(0,t.jsxs)(o.Card,{className:"bg-white border border-gray-200",children:[(0,t.jsx)(ek.Title,{className:"text-base font-semibold text-gray-900 mb-4",children:"Request Outcomes Over Time"}),(0,t.jsx)("div",{className:"h-80 min-h-[280px]",children:s.length>0?(0,t.jsx)(so.BarChart,{data:s,index:"date",categories:["passed","blocked"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),yAxisWidth:48,showLegend:!0,stack:!0}):(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-gray-500",children:"No chart data for this period"})})]})}let sc={Bedrock:"bg-orange-100 text-orange-700 border-orange-200","Google Cloud":"bg-sky-100 text-sky-700 border-sky-200",LiteLLM:"bg-indigo-100 text-indigo-700 border-indigo-200",Custom:"bg-gray-100 text-gray-600 border-gray-200"};function sm({accessToken:e=null,startDate:s,endDate:a,onSelectGuardrail:l}){let[r,n]=(0,i.useState)("failRate"),[o,d]=(0,i.useState)("desc"),[c,m]=(0,i.useState)(!1),{data:u,isLoading:p,error:x}=(0,t1.useQuery)({queryKey:["guardrails-usage-overview",s,a],queryFn:()=>(0,w.getGuardrailsUsageOverview)(e,s,a),enabled:!!e}),h=u?.rows??[],g=(0,i.useMemo)(()=>{let e,t,s,a;return u?{totalRequests:u.totalRequests??0,totalBlocked:u.totalBlocked??0,passRate:String(u.passRate??0),avgLatency:h.length?Math.round(h.reduce((e,t)=>e+(t.avgLatency??0),0)/h.length):0,count:h.length}:(e=h.reduce((e,t)=>e+t.requestsEvaluated,0),t=h.reduce((e,t)=>e+Math.round(t.requestsEvaluated*t.failRate/100),0),s=e>0?((1-t/e)*100).toFixed(1):"0",{totalRequests:e,totalBlocked:t,passRate:s,avgLatency:(a=h.filter(e=>null!=e.avgLatency)).length>0?Math.round(a.reduce((e,t)=>e+(t.avgLatency??0),0)/a.length):0,count:h.length})},[u,h]),y=u?.chart,j=(0,i.useMemo)(()=>[...h].sort((e,t)=>{let s="desc"===o?-1:1,a=e[r]??0,l=t[r]??0;return(Number(a)-Number(l))*s}),[h,r,o]),f=[{title:"Guardrail",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsx)("button",{type:"button",className:"text-sm font-medium text-gray-900 hover:text-indigo-600 text-left",onClick:()=>l(s.id),children:e})},{title:"Provider",dataIndex:"provider",key:"provider",render:e=>(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${sc[e]??sc.Custom}`,children:e})},{title:"Requests",dataIndex:"requestsEvaluated",key:"requestsEvaluated",align:"right",sorter:!0,sortOrder:"requestsEvaluated"===r?"desc"===o?"descend":"ascend":null,render:e=>e.toLocaleString()},{title:"Fail Rate",dataIndex:"failRate",key:"failRate",align:"right",sorter:!0,sortOrder:"failRate"===r?"desc"===o?"descend":"ascend":null,render:(e,s)=>(0,t.jsxs)("span",{className:e>15?"text-red-600":e>5?"text-amber-600":"text-green-600",children:[e,"%","up"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-red-400",children:"↑"}),"down"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-green-400",children:"↓"})]})},{title:"Avg. latency added",dataIndex:"avgLatency",key:"avgLatency",align:"right",sorter:!0,sortOrder:"avgLatency"===r?"desc"===o?"descend":"ascend":null,render:e=>(0,t.jsx)("span",{className:null==e?"text-gray-400":e>150?"text-red-600":e>50?"text-amber-600":"text-green-600",children:null!=e?`${e}ms`:"—"})},{title:"Status",dataIndex:"status",key:"status",align:"center",render:e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${"healthy"===e?"bg-green-500":"warning"===e?"bg-amber-500":"bg-red-500"}`}),(0,t.jsx)("span",{className:"text-xs text-gray-600 capitalize",children:e})]})}],b=["failRate","requestsEvaluated","avgLatency"];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-lg text-indigo-500"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:"Guardrails Monitor"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Monitor guardrail performance across all requests"})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tS.DownloadOutlined,{}),title:"Coming soon",children:"Export Data"})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],className:"mb-6",children:[(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Total Evaluations",value:g.totalRequests.toLocaleString()})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Blocked Requests",value:g.totalBlocked.toLocaleString(),valueColor:"text-red-600",icon:(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"})})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Pass Rate",value:`${g.passRate}%`,valueColor:"text-green-600",icon:(0,t.jsx)(si,{className:"text-green-400"})})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Avg. latency added",value:`${g.avgLatency}ms`,valueColor:g.avgLatency>150?"text-red-600":g.avgLatency>50?"text-amber-600":"text-green-600"})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Active Guardrails",value:g.count})})]}),(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(sd,{data:y})}),(0,t.jsxs)(ts.Card,{className:"border border-gray-200 rounded-lg bg-white",styles:{body:{padding:0}},children:[(p||x)&&(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-center gap-2",children:[p&&(0,t.jsx)(eF.Spin,{size:"small"}),x&&(0,t.jsx)("span",{className:"text-sm text-red-600",children:"Failed to load data. Try again."})]}),(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(sn.Typography.Title,{level:5,className:"!mb-0 text-gray-900",children:"Guardrail Performance"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Click a guardrail to view details, logs, and configuration"})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>m(!0),title:"Evaluation settings"})})]}),(0,t.jsx)(te.Table,{columns:f,dataSource:j,rowKey:"id",pagination:!1,loading:p,onChange:(e,t,s)=>{s?.field&&b.includes(s.field)&&(n(s.field),d("ascend"===s.order?"asc":"desc"))},locale:0!==h.length||p?void 0:{emptyText:"No data for this period"},onRow:e=>({onClick:()=>l(e.id),style:{cursor:"pointer"}})})]}),(0,t.jsx)(t8,{open:c,onClose:()=>m(!1),accessToken:e})]})}let su=new Date,sp=new Date;function sx({accessToken:e=null}){let[s,a]=(0,i.useState)({type:"overview"}),l=(0,i.useMemo)(()=>new Date(sp),[]),r=(0,i.useMemo)(()=>new Date(su),[]),[n,o]=(0,i.useState)({from:l,to:r}),d=n.from?(0,w.formatDate)(n.from):"",c=n.to?(0,w.formatDate)(n.to):"",m=(0,i.useCallback)(e=>{o(e)},[]);return(0,t.jsxs)("div",{className:"p-6 w-full min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-4",children:(0,t.jsx)(tY.default,{value:n,onValueChange:m,label:"",showTimeRange:!1})}),"overview"===s.type?(0,t.jsx)(sm,{accessToken:e,startDate:d,endDate:c,onSelectGuardrail:e=>{a({type:"detail",guardrailId:e})}}):(0,t.jsx)(sl,{guardrailId:s.guardrailId,onBack:()=>{a({type:"overview"})},accessToken:e,startDate:d,endDate:c})]})}sp.setDate(sp.getDate()-7);var sh=e.i(487304),sg=e.i(760221);e.i(111790);var sy=e.i(280881),sj=e.i(934879),sf=e.i(402874),sb=e.i(797305),s_=e.i(109799),sv=e.i(747871),sw=e.i(56567),sk=e.i(468133),sN=e.i(645526),sS=e.i(91979),sC=e.i(525720),sT=e.i(372943),sI=e.i(95684),sF=e.i(497650),sL=e.i(368869),sA=e.i(998573),sM=e.i(438100),sP=e.i(475254);let sD=(0,sP.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"}]]);var sz=e.i(988846),sE=e.i(98740),sE=sE;function sO({size:e,fontSize:s}){let a=(0,t.jsx)(tw.LoadingOutlined,{style:s?{fontSize:s}:void 0,spin:!0});return(0,t.jsx)(eF.Spin,{indicator:a,size:e})}var sR=e.i(363256),sB=e.i(9314),s$=e.i(552130),sq=e.i(533882),sU=e.i(651904),sV=e.i(460285),sH=e.i(435451),sG=e.i(916940),sK=e.i(127952),sW=e.i(162386);let sQ=(e,t,s)=>"Admin"===e||!!s&&!!t&&s.some(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)),sY=(e,t,s)=>"Admin"===e?s||[]:s&&t?s.filter(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)):[],sJ=({teams:e,searchParams:s,accessToken:a,setTeams:l,userID:r,userRole:n,organizations:o,premiumUser:d=!1})=>{let c,m,u,p;console.log(`organizations: ${JSON.stringify(o)}`);let{data:x}=(0,s_.useOrganizations)(),[h,g]=(0,i.useState)(!0),[j,b]=(0,i.useState)(null),[v,C]=(0,i.useState)(1),[T,F]=(0,i.useState)(10),[L,A]=(0,i.useState)(0),[M,P]=(0,i.useState)(null),[D,z]=(0,i.useState)(null),[O,R]=(0,i.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),$=(0,i.useRef)(null),[q,G]=(0,i.useState)(!1),K=async(e={})=>{if(!a)return;let t=e.page??v,s=e.size??T,i=e.sortBy??O.sort_by,o=e.sortOrder??O.sort_order,d=e.organizationID??O.organization_id,c=e.teamAlias??O.team_alias;g(!0),b(null);try{let e=await (0,eV.teamListCall)(a,t,s,{organizationID:d||null,team_alias:c||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:i||null,sortOrder:o||null});l(e.teams??[]),A(e.total??0)}catch(e){b(e?.message||"Failed to fetch teams")}finally{g(!1)}};(0,i.useEffect)(()=>{K()},[a]);let[W]=k.Form.useForm(),[Q]=k.Form.useForm(),[Y,J]=(0,i.useState)(""),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(null),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),[ei,en]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(!1),[eu,ep]=(0,i.useState)([]),[ex,eh]=(0,i.useState)(!1),[eg,ef]=(0,i.useState)(null),[eb,e_]=(0,i.useState)([]),[ev,ek]=(0,i.useState)({}),[eN,eS]=(0,i.useState)(!1),[eC,eT]=(0,i.useState)([]),[eI,eF]=(0,i.useState)([]),[eL,eA]=(0,i.useState)([]),[eM,eP]=(0,i.useState)([]),[eD,ez]=(0,i.useState)(!1),[eB,e$]=(0,i.useState)({}),[eq,eU]=(0,i.useState)(null),[eH,eY]=(0,i.useState)(0);(0,i.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${D}`);let t=(e=[],D&&D.models.length>0?(console.log(`organization.models: ${D.models}`),e=D.models):e=eu,(0,B.unfurlWildcardModelsInList)(e,eu));console.log(`models: ${t}`),e_(t),W.setFieldValue("models",[])},[D,eu]),(0,i.useEffect)(()=>{if(ei){let e=sY(n,r,o);if(1===e.length){let t=e[0];W.setFieldValue("organization_id",t.organization_id),z(t)}else W.setFieldValue("organization_id",M?.organization_id||null),z(M)}},[ei,n,r,o,M]),(0,i.useEffect)(()=>{let e=async()=>{try{if(null==a)return;let e=(await (0,w.getPoliciesList)(a)).policies.map(e=>e.policy_name);eF(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==a)return;let e=(await (0,w.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);eT(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[a]);let eJ=async()=>{try{if(null==a)return;let e=await (0,w.fetchMCPAccessGroups)(a);eP(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,i.useEffect)(()=>{eJ()},[a]),(0,i.useEffect)(()=>{e&&ek(e.reduce((e,t)=>(e[t.team_id]={keys:t.keys||[],team_info:{members_with_roles:t.members_with_roles||[]}},e),{}))},[e]);let eX=async e=>{ef(e),eh(!0)},eZ=async()=>{if(null!=eg&&null!=e&&null!=a)try{eS(!0),await (0,w.teamDeleteCall)(a,eg.team_id),await K(),eE.default.success("Team deleted successfully")}catch(e){eE.default.fromBackend("Error deleting the team: "+e)}finally{eS(!1),eh(!1),ef(null)}};(0,i.useEffect)(()=>{(async()=>{try{if(null===r||null===n||null===a)return;let e=await (0,B.fetchAvailableModelsForTeamOrKey)(r,n,a);e&&ep(e)}catch(e){console.error("Error fetching user models:",e)}})()},[a,r,n,e]);let e0=async t=>{try{if(console.log(`formValues: ${JSON.stringify(t)}`),null!=a){let s=t?.team_alias,l=e?.map(e=>e.team_alias)??[],r=t?.organization_id||M?.organization_id;if(""===r||"string"!=typeof r?t.organization_id=null:t.organization_id=r.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(eE.default.info("Creating Team"),eL.length>0){let e={};if(t.metadata)try{e=JSON.parse(t.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}e={...e,logging:eL.filter(e=>e.callback_name)},t.metadata=JSON.stringify(e)}if(t.secret_manager_settings&&"string"==typeof t.secret_manager_settings)if(""===t.secret_manager_settings.trim())delete t.secret_manager_settings;else try{t.secret_manager_settings=JSON.parse(t.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}if(t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0||t.allowed_mcp_servers_and_groups&&(t.allowed_mcp_servers_and_groups.servers?.length>0||t.allowed_mcp_servers_and_groups.accessGroups?.length>0||t.allowed_mcp_servers_and_groups.toolPermissions)){if(t.object_permission={},t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0&&(t.object_permission.vector_stores=t.allowed_vector_store_ids,delete t.allowed_vector_store_ids),t.allowed_mcp_servers_and_groups){let{servers:e,accessGroups:s}=t.allowed_mcp_servers_and_groups;e&&e.length>0&&(t.object_permission.mcp_servers=e),s&&s.length>0&&(t.object_permission.mcp_access_groups=s),delete t.allowed_mcp_servers_and_groups}t.mcp_tool_permissions&&Object.keys(t.mcp_tool_permissions).length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_tool_permissions=t.mcp_tool_permissions,delete t.mcp_tool_permissions)}if(t.allowed_mcp_access_groups&&t.allowed_mcp_access_groups.length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_access_groups=t.allowed_mcp_access_groups,delete t.allowed_mcp_access_groups),t.allowed_agents_and_groups){let{agents:e,accessGroups:s}=t.allowed_agents_and_groups;t.object_permission||(t.object_permission={}),e&&e.length>0&&(t.object_permission.agents=e),s&&s.length>0&&(t.object_permission.agent_access_groups=s),delete t.allowed_agents_and_groups}Object.keys(eB).length>0&&(t.model_aliases=eB),eq?.router_settings&&Object.values(eq.router_settings).some(e=>null!=e&&""!==e)&&(t.router_settings=eq.router_settings),await (0,w.teamCreateCall)(a,t),eE.default.success("Team created"),await K({page:v,size:T}),W.resetFields(),eA([]),e$({}),eU(null),eY(e=>e+1),en(!1)}}catch(e){console.error("Error creating the team:",e),eE.default.fromBackend("Error creating the team: "+e)}},e1=async(e,t)=>{let s={...O,[e]:t};if(R(s),C(1),a)try{let e=await (0,eV.teamListCall)(a,1,T,{organizationID:s.organization_id||null,team_alias:s.team_alias||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:s.sort_by||null,sortOrder:s.sort_order||null});l(e.teams??[]),A(e.total??0)}catch(e){console.error("Error fetching teams:",e)}},{token:e2}=sL.theme.useToken(),{Title:e4,Text:e5}=sn.Typography,{Content:e6}=sT.Layout,e3=(0,i.useMemo)(()=>[{title:"Team ID",dataIndex:"team_id",key:"team_id",width:170,ellipsis:!0,render:(e,s)=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(e5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>ea(s.team_id),"data-testid":"team-id-cell",children:e})})},{title:"Team Alias",dataIndex:"team_alias",key:"team_alias",ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{style:{fontSize:14},children:e||(0,t.jsx)(e5,{type:"secondary",italic:!0,children:"—"})})},{title:"Organization",key:"organization",width:160,ellipsis:!0,render:(e,s)=>{let a=((e,t)=>{if(!e||!t)return e||"N/A";let s=t.find(t=>t.organization_id===e);return s?.organization_alias||e})(s.organization_id,x||o);return s.organization_id?(0,t.jsx)(e5,{ellipsis:!0,style:{fontSize:14},children:a}):(0,t.jsx)(e5,{type:"secondary",children:"—"})}},{title:"Resources",key:"resources",width:240,render:(e,s)=>{let a=ev?.[s.team_id]?.team_info?.members_with_roles?.length??0,l=s.models?.length??0,r=ev?.[s.team_id]?.keys?.length??0;return(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a} Members`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sE.default,{size:14}),a]})})}),(0,t.jsx)(f.Tooltip,{title:`${l} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),l]})})}),(0,t.jsx)(f.Tooltip,{title:`${r} Keys`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sM.KeyIcon,{size:14}),r]})})})]})}},{title:"Spend / Budget",key:"spend",width:200,sorter:!0,render:(e,s)=>{let a=s.spend??0,l=s.max_budget,r=`$${a.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`,i=null!=l?`$${l.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:"Unlimited",n=null!=l&&l>0?Math.min(a/l*100,100):null;return(0,t.jsxs)(sC.Flex,{vertical:!0,gap:2,children:[(0,t.jsxs)(e5,{style:{fontSize:13},children:[r,(0,t.jsxs)(e5,{type:"secondary",style:{fontSize:12},children:[" / ",i]})]}),null!=n&&(0,t.jsx)(sF.Progress,{percent:n,size:"small",showInfo:!1,strokeColor:n>=90?"#ff4d4f":n>=70?"#faad14":"#1677ff",style:{marginBottom:0}})]})}},{title:"Created",dataIndex:"created_at",key:"created_at",width:130,ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:e?new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"—"})},{title:"Actions",key:"actions",width:120,align:"right",render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(eR.default,{variant:"Copy",tooltipText:"Copy Team ID",onClick:()=>{navigator.clipboard.writeText(s.team_id).then(()=>sA.message.success("Team ID copied")).catch(()=>sA.message.error("Failed to copy"))}}),"Admin"===n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit team",dataTestId:"edit-team-button",onClick:()=>{ea(s.team_id),er(!0)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete team",dataTestId:"delete-team-button",onClick:()=>eX(s)})]})]})}],[n,ev,x,o]),e8=(0,i.useMemo)(()=>e??[],[e]),e7=[{key:"your-teams",label:"Your Teams",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sz.SearchIcon,{size:16}),suffix:q?(0,t.jsx)(sO,{size:"small"}):null,placeholder:"Search teams by name...",onChange:e=>{var t;return t=e.target.value,void($.current&&clearTimeout($.current),G(!0),$.current=setTimeout(async()=>{try{R(e=>({...e,team_alias:t})),C(1),await K({page:1,teamAlias:t})}finally{G(!1)}},300))},allowClear:!0,style:{maxWidth:400}}),(0,t.jsx)(sR.default,{organizations:o,value:O.organization_id||void 0,onChange:e=>e1("organization_id",e||""),loading:h})]}),(0,t.jsx)(sI.Pagination,{current:v,total:L,pageSize:T,onChange:(e,t)=>{C(e),F(t),K({page:e,size:t})},size:"small",showTotal:e=>`${e} teams`,showSizeChanger:!0,pageSizeOptions:["10","20","50"]})]}),h?(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{padding:"80px 0"},children:(0,t.jsx)(sO,{fontSize:48})}):j?(0,t.jsxs)(sC.Flex,{vertical:!0,align:"center",gap:16,style:{padding:"64px 0"},children:[(0,t.jsx)(e5,{type:"danger",style:{fontSize:15},children:"Failed to load teams"}),(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:j}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>{K()},children:"Retry"})]}):(0,t.jsx)(te.Table,{columns:e3,dataSource:e8,rowKey:"team_id",pagination:!1,onChange:(e,t,s)=>{let a=Array.isArray(s)?s[0]:s,l=a.order?a.columnKey:"created_at",r="ascend"===a.order?"asc":(a.order,"desc");R(e=>({...e,sort_by:l,sort_order:r})),K({sortBy:l,sortOrder:r})},locale:{emptyText:(0,t.jsxs)("div",{style:{padding:"64px 0",textAlign:"center"},children:[(0,t.jsx)(sN.TeamOutlined,{style:{fontSize:40,color:"#d9d9d9",marginBottom:12}}),(0,t.jsx)("div",{children:(0,t.jsx)(e5,{style:{fontSize:15,color:"#595959"},children:"No teams yet"})}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:"Create your first team to organize members and manage access to models."})}),sQ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),style:{marginTop:16},"data-testid":"create-team-button",children:"Create Team"})]})},scroll:{x:1e3},size:"middle"})]}),(0,t.jsx)(sK.default,{isOpen:ex,title:"Delete Team?",alertMessage:eg?.keys?.length===0?void 0:`Warning: This team has ${eg?.keys?.length} keys associated with it. Deleting the team will also delete all associated keys. This action is irreversible.`,message:"Are you sure you want to delete this team and all its keys? This action cannot be undone.",resourceInformationTitle:"Team Information",resourceInformation:[{label:"Team ID",value:eg?.team_id,code:!0},{label:"Team Name",value:eg?.team_alias},{label:"Keys",value:eg?.keys?.length},{label:"Members",value:eg?.members_with_roles?.length}],requiredConfirmation:eg?.team_alias,onCancel:()=>{eh(!1),ef(null)},onOk:eZ,confirmLoading:eN})]})},{key:"available-teams",label:"Available Teams",children:(0,t.jsx)(sv.default,{accessToken:a,userID:r})},...(0,ew.isProxyAdminRole)(n||"")?[{key:"default-settings",label:"Default Team Settings",children:(0,t.jsx)(sk.default,{accessToken:a,userID:r||"",userRole:n||""})}]:[]];return(0,t.jsxs)(e6,{style:{padding:e2.paddingLG,paddingInline:2*e2.paddingLG},children:[es?(0,t.jsx)(sw.default,{teamId:es,onUpdate:e=>{l(t=>null==t?t:t.map(t=>e.team_id===t.team_id?(0,eO.updateExistingKeys)(t,e):t)),K()},onClose:()=>{ea(null),er(!1)},accessToken:a,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let t=0;te.team_id===es)),is_proxy_admin:"Admin"==n,userModels:eu,editTeam:el,premiumUser:d}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsxs)(e4,{level:2,style:{margin:0},children:[(0,t.jsx)(sN.TeamOutlined,{style:{marginRight:8}}),"Teams"]}),(0,t.jsx)(e5,{type:"secondary",children:"Manage teams, members, and their access to models and budgets"})]}),sQ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),"data-testid":"create-team-button",children:"Create Team"})]}),(0,t.jsx)(t2.Tabs,{items:e7})]}),sQ(n,r,o)&&(0,t.jsx)(y.Modal,{title:"Create Team",open:ei,width:1e3,footer:null,onOk:()=>{en(!1),W.resetFields(),eA([]),e$({}),eU(null),eY(e=>e+1)},onCancel:()=>{en(!1),W.resetFields(),eA([]),e$({}),eU(null),eY(e=>e+1)},children:(0,t.jsxs)(k.Form,{form:W,onFinish:e0,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"","data-testid":"team-name-input"})}),(c=sY(n,r,o),m="Admin"!==n,u=1===c.length,p=0===c.length,(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(f.Tooltip,{title:(0,t.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:M?M.organization_id:null,className:"mt-8",rules:m?[{required:!0,message:"Please select an organization"}]:[],help:u?"You can only create teams within this organization":m?"required":"",children:(0,t.jsx)(N.Select,{showSearch:!0,allowClear:!m,disabled:u,placeholder:p?"No organizations available":"Search or select an Organization",onChange:e=>{W.setFieldValue("organization_id",e),z(c?.find(t=>t.organization_id===e)||null)},filterOption:(e,t)=>!!t&&(t.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:c?.map(e=>(0,t.jsxs)(N.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),m&&!u&&c.length>1&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(e5,{style:{color:"#1e40af",fontSize:14},children:"Please select an organization to create a team for. You can only create teams within organizations where you are an admin."})})]})),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(f.Tooltip,{title:"These are the models that your selected team has access to",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),rules:[{required:!0,message:"Please select at least one model"}],name:"models",children:(0,t.jsx)(sW.ModelSelect,{value:W.getFieldValue("models")||[],onChange:e=>W.setFieldValue("models",e),organizationID:W.getFieldValue("organization_id"),options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!W.getFieldValue("organization_id")},context:"team",dataTestId:"create-team-models-select"})}),(0,t.jsx)(k.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(sH.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(k.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(N.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(N.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(N.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(N.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(k.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(k.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsxs)(eG.Accordion,{className:"mt-20 mb-8",onClick:()=>{eD||(eJ(),ez(!0))},children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Additional Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(k.Form.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,t.jsx)(eQ.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,t.jsx)(k.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(sH.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(k.Form.Item,{label:"Team Member 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)(eQ.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(k.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(k.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(k.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,t.jsx)(S.Input.TextArea,{rows:4})}),(0,t.jsx)(k.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:d?"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)(S.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!d})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"Setup your first guardrail",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)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:eC.map(e=>({value:e,label:e}))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(_.Switch,{disabled:!d,checkedChildren:d?"Yes":"Premium feature - Upgrade to disable global guardrails by team",unCheckedChildren:d?"No":"Premium feature - Upgrade to disable global guardrails by team"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(f.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)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:eI.map(e=>({value:e,label:e}))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(f.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)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-8",help:"Select access groups to assign to this team",children:(0,t.jsx)(sB.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(f.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,t.jsx)(sG.default,{onChange:e=>W.setFieldValue("allowed_vector_store_ids",e),value:W.getFieldValue("allowed_vector_store_ids"),accessToken:a||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(f.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,t.jsx)(ey.default,{onChange:e=>W.setFieldValue("allowed_mcp_servers_and_groups",e),value:W.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:a||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(S.Input,{type:"hidden"})}),(0,t.jsx)(k.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)(ej.default,{accessToken:a||"",selectedServers:W.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:W.getFieldValue("mcp_tool_permissions")||{},onChange:e=>W.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(f.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,t.jsx)(s$.default,{onChange:e=>W.setFieldValue("allowed_agents_and_groups",e),value:W.getFieldValue("allowed_agents_and_groups"),accessToken:a||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(sU.default,{value:eL,onChange:eA,premiumUser:d})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(sV.default,{accessToken:a||"",value:eq||void 0,onChange:eU,modelData:eu.length>0?{data:eu.map(e=>({model_name:e}))}:void 0},eH)})})]},`router-settings-accordion-${eH}`),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(e5,{type:"secondary",style:{fontSize:14,marginBottom:16,display:"block"},children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(sq.default,{accessToken:a||"",initialModelAliases:eB,onAliasUpdate:e$,showExampleConfig:!1})]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(V.Button,{htmlType:"submit","data-testid":"create-team-submit",children:"Create Team"})})]})})]})};var sX=e.i(702597),sZ=e.i(846835),s0=e.i(147612),s1=e.i(191403),s2=e.i(976883),s4=e.i(657688),s5=e.i(437902);let{Text:s6}=sn.Typography,s3=({litellmParams:e,accessToken:s,onTestComplete:a})=>{let[l,r]=(0,i.useState)(!0),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{r(!0);try{let t=await (0,w.testSearchToolConnection)(s,e);o(t),"success"===t.status&&eE.default.success("Connection test successful!")}catch(e){o({status:"error",message:e instanceof Error?e.message:"Unknown error occurred",error_type:"NetworkError"})}finally{r(!1),a&&a()}})()},[s,e,a]);let m=n?.message?(e=>{if(!e)return"Unknown error";let t=e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error:\s*/,"").replace(/^AuthenticationError:\s*/,"");if(t.includes("")||t.includes("(.*?)<\/title>/);return e?e[1]:t.includes("401")||t.includes("Authorization Required")?"Authentication failed: Invalid API key or credentials":"Authentication error - please check your API key"}return t.length>200?t.substring(0,200)+"...":t})(n.message):"Unknown error";return l?(0,t.jsx)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,t.jsxs)(s6,{style:{fontSize:"16px"},children:["Testing connection to ",e.search_provider||"search provider","..."]}),(0,t.jsx)(s5.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]})}):n?(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:["success"===n.status?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.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.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,t.jsxs)("div",{style:{marginLeft:"12px"},children:[(0,t.jsxs)(s6,{type:"success",style:{fontSize:"18px",fontWeight:500,display:"block"},children:["Connection to ",e.search_provider," successful!"]}),n.test_query&&(0,t.jsxs)(s6,{style:{fontSize:"14px",color:"#666",marginTop:"8px",display:"block"},children:["Test query: ",(0,t.jsx)("code",{style:{backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"4px"},children:n.test_query})]}),void 0!==n.results_count&&(0,t.jsxs)(s6,{style:{fontSize:"14px",color:"#666",display:"block"},children:["Results retrieved: ",n.results_count]})]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(t0.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(s6,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",e.search_provider||"search provider"," failed"]})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,t.jsxs)(s6,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(s6,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:m}),n.error_type&&(0,t.jsx)("div",{style:{marginTop:"8px"},children:(0,t.jsxs)(s6,{style:{fontSize:"13px",color:"#666"},children:["Error type:"," ",(0,t.jsx)("code",{style:{backgroundColor:"#ffebee",padding:"2px 6px",borderRadius:"4px",color:"#d32f2f"},children:n.error_type})]})}),n.message&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),style:{paddingLeft:0,height:"auto"},children:d?"Hide Details":"Show Details"})})]}),d&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(s6,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Full Error Details"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:n.message})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fffbf0",border:"1px solid #ffe58f",borderLeft:"4px solid #faad14",borderRadius:"8px",padding:"16px"},children:[(0,t.jsx)(s6,{strong:!0,style:{display:"block",marginBottom:"8px",color:"#d48806"},children:"Troubleshooting tips:"}),(0,t.jsxs)("ul",{style:{margin:"8px 0",paddingLeft:"20px",color:"#ad6800"},children:[(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Verify your API key is correct and active"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Check if the search provider service is operational"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Ensure you have sufficient credits/quota with the provider"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Review the provider's documentation for any additional requirements"})]})]})]})}),(0,t.jsx)(F.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(V.Button,{type:"link",href:"https://docs.litellm.ai/docs/search",target:"_blank",icon:(0,t.jsx)(E.InfoCircleOutlined,{}),children:"View Search Documentation"})})]}):null},{TextArea:s8}=S.Input,s7=({providerName:e,displayName:s})=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)(s4.default,{src:`../ui/assets/logos/${e}.png`,alt:"",width:20,height:20,style:{marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,t.jsx)("span",{children:s})]}),s9=({userRole:e,accessToken:s,onCreateSuccess:a,isModalVisible:l,setModalVisible:r})=>{let[o]=k.Form.useForm(),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)({}),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),[j,b]=(0,i.useState)(""),{data:_,isLoading:v}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,w.fetchAvailableSearchProviders)(s)},enabled:!!s&&l}),S=_?.providers||[],C=async e=>{c(!0);try{let t={search_tool_name:e.search_tool_name,litellm_params:{search_provider:e.search_provider,api_key:e.api_key,api_base:e.api_base,timeout:e.timeout?parseFloat(e.timeout):void 0,max_retries:e.max_retries?parseInt(e.max_retries):void 0},search_tool_info:e.description?{description:e.description}:void 0};if(console.log("Creating search tool with payload:",t),null!=s){let e=await (0,w.createSearchTool)(s,t);eE.default.success("Search tool created successfully"),o.resetFields(),u({}),r(!1),a(e)}}catch(e){eE.default.error("Error creating search tool: "+e)}finally{c(!1)}},T=async()=>{try{await o.validateFields(["search_provider","api_key"]),g(!0),b(`test-${Date.now()}`),x(!0)}catch(e){eE.default.error("Please fill in Search Provider and API Key before testing")}};return(i.default.useEffect(()=>{l||u({})},[l]),(0,ew.isAdminRole)(e))?(0,t.jsxs)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)("span",{className:"text-2xl",children:"🔍"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Search Tool"})]}),open:l,width:800,onCancel:()=>{o.resetFields(),u({}),r(!1)},footer:null,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)(k.Form,{form:o,onFinish:C,onValuesChange:(e,t)=>u(t),layout:"vertical",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Tool Name",(0,t.jsx)(f.Tooltip,{title:"A unique name to identify this search tool configuration (e.g., 'perplexity-search', 'tavily-news-search').",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_tool_name",rules:[{required:!0,message:"Please enter a search tool name"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Name can only contain letters, numbers, hyphens, and underscores"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"e.g., perplexity-search, my-tavily-tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Provider",(0,t.jsx)(f.Tooltip,{title:"Select the search provider you want to use. Each provider has different capabilities and pricing.",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(N.Select,{placeholder:"Select a search provider",className:"rounded-lg",size:"large",loading:v,showSearch:!0,optionFilterProp:"children",optionLabelProp:"label",children:S.map(e=>(0,t.jsx)(N.Select.Option,{value:e.provider_name,label:(0,t.jsx)(s7,{providerName:e.provider_name,displayName:e.ui_friendly_name}),children:(0,t.jsx)(s7,{providerName:e.provider_name,displayName:e.ui_friendly_name})},e.provider_name))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["API Key",(0,t.jsx)(f.Tooltip,{title:"The API key for authenticating with the search provider. This will be securely stored.",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"api_key",rules:[{required:!1,message:"Please enter an API key"}],children:(0,t.jsx)(eQ.TextInput,{type:"password",placeholder:"Enter your API key",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description (Optional)"}),name:"description",children:(0,t.jsx)(s8,{rows:3,placeholder:"Brief description of this search tool's purpose",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center pt-6 border-t border-gray-100",children:[(0,t.jsx)(f.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(sn.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(n.Button,{onClick:T,loading:h,children:"Test Connection"}),(0,t.jsx)(n.Button,{loading:d,type:"submit",children:"Add Search Tool"})]})]})]})}),(0,t.jsx)(y.Modal,{title:"Connection Test Results",open:p,onCancel:()=>{x(!1),g(!1)},footer:[(0,t.jsx)(n.Button,{onClick:()=>{x(!1),g(!1)},children:"Close"},"close")],width:700,children:p&&s&&(0,t.jsx)(s3,{litellmParams:{search_provider:m.search_provider,api_key:m.api_key,api_base:m.api_base},accessToken:s,onTestComplete:()=>g(!1)},j)})]}):null};var ae=e.i(350967),at=e.i(678784),as=e.i(118366),aa=e.i(928685);let{Text:al}=sn.Typography,ar=({searchToolName:e,accessToken:s,className:a=""})=>{let[l,r]=(0,i.useState)(""),[n,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)([]),[u,p]=(0,i.useState)({}),[x,h]=(0,i.useState)(!1),g=async()=>{if(!l.trim())return void A.default.warning("Please enter a search query");d(!0);let t=performance.now();try{let a=await (0,w.searchToolQueryCall)(s,e,l),r=performance.now(),i=Math.round(r-t),n={query:l,response:a,timestamp:Date.now(),latency:i};m(e=>[n,...e])}catch(e){console.error("Error querying search tool:",e),eE.default.fromBackend("Failed to query search tool")}finally{d(!1)}},y=e=>new Date(e).toLocaleString(),j=(0,t.jsx)(tw.LoadingOutlined,{style:{fontSize:24},spin:!0}),f=c.length>0?c[0]:null;return(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(ek.Title,{children:"Test Search Tool"})}),(0,t.jsxs)("div",{className:"flex flex-col",style:{minHeight:"600px"},children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex items-stretch gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white rounded-lg px-4 transition-all duration-200",style:{border:x?"2px solid #3b82f6":"2px solid #e5e7eb",boxShadow:x?"0 0 0 3px rgba(59, 130, 246, 0.1)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",height:"48px"},children:[(0,t.jsx)(aa.SearchOutlined,{className:"text-gray-400 mr-3",style:{fontSize:"18px"}}),(0,t.jsx)(S.Input,{value:l,onChange:e=>r(e.target.value),onFocus:()=>h(!0),onBlur:()=>h(!1),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),g())},placeholder:"Enter your search query...",disabled:n,bordered:!1,style:{fontSize:"15px",padding:0,height:"100%",boxShadow:"none"}})]}),(0,t.jsx)(V.Button,{type:"primary",onClick:g,disabled:n||!l.trim(),icon:(0,t.jsx)(aa.SearchOutlined,{}),loading:n,style:{height:"48px",paddingLeft:"24px",paddingRight:"24px",borderRadius:"8px",fontWeight:500,fontSize:"15px",backgroundColor:n||!l.trim()?void 0:"#1890ff",borderColor:n||!l.trim()?void 0:"#1890ff",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:"Search"})]})}),(0,t.jsx)("div",{className:"flex-1",children:f||n?(0,t.jsxs)("div",{children:[n&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center py-16",children:[(0,t.jsx)(eF.Spin,{indicator:j}),(0,t.jsx)(al,{className:"mt-4 text-gray-600 font-medium",children:"Searching..."})]}),f&&!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(al,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Search Query"}),(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mt-1.5",children:f.query})]}),(0,t.jsxs)("div",{className:"text-right ml-4",children:[(0,t.jsx)(al,{className:"text-xs text-gray-500",children:y(f.timestamp)}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,t.jsxs)("div",{className:"text-sm font-semibold text-blue-600",children:[f.response?.results?.length||0," ",f.response?.results?.length===1?"result":"results"]}),void 0!==f.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("div",{className:"text-sm font-semibold text-green-600",children:[f.latency,"ms"]})]})]})]})]})}),f.response&&f.response.results&&f.response.results.length>0?(0,t.jsx)("div",{className:"space-y-3",children:f.response.results.map((e,s)=>{let a=u[`0-${s}`]||!1;return(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",e.currentTarget.style.borderColor="#e0e7ff"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)",e.currentTarget.style.borderColor="#e5e7eb"},children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-600 hover:text-blue-700 flex-1 leading-snug",style:{textDecoration:"none"},onMouseEnter:e=>e.currentTarget.style.textDecoration="underline",onMouseLeave:e=>e.currentTarget.style.textDecoration="none",children:e.title}),(0,t.jsx)(V.Button,{type:"text",size:"small",className:"flex-shrink-0",icon:(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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),onClick:()=>window.open(e.url,"_blank"),style:{color:"#6b7280"}})]}),(0,t.jsx)("div",{className:"text-sm text-green-700 mb-3 truncate font-medium",children:e.url}),(0,t.jsx)("div",{className:"text-sm text-gray-700 leading-relaxed",children:a?e.snippet:`${e.snippet.substring(0,200)}${e.snippet.length>200?"...":""}`}),e.snippet.length>200&&(0,t.jsx)(V.Button,{type:"link",size:"small",className:"mt-3 p-0 h-auto",onClick:()=>{let e;return e=`0-${s}`,void p(t=>({...t,[e]:!t[e]}))},style:{fontSize:"13px",fontWeight:500,color:"#3b82f6"},children:a?"Show less":"Show more"})]})},s)})}):(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 mx-auto mb-4",children:(0,t.jsx)(aa.SearchOutlined,{style:{fontSize:"24px",color:"#9ca3af"}})}),(0,t.jsx)(al,{className:"text-gray-600 font-medium",children:"No results found"}),(0,t.jsx)(al,{className:"text-sm text-gray-500 mt-1",children:"Try a different search query"})]})]}),c.length>1&&(0,t.jsxs)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)(al,{className:"text-sm font-semibold text-gray-700",children:"Previous Searches"}),(0,t.jsx)(V.Button,{onClick:()=>{m([]),p({}),eE.default.success("Search history cleared")},size:"small",type:"link",style:{fontSize:"13px",fontWeight:500},children:"Clear All"})]}),(0,t.jsx)("div",{className:"space-y-2",children:c.slice(1,6).map((e,s)=>(0,t.jsxs)("div",{className:"p-3 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:border-gray-300",onClick:()=>{r(e.query)},children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800 truncate",children:e.query}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-1.5 flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"font-medium text-blue-600",children:[e.response?.results?.length||0," ",e.response?.results?.length===1?"result":"results"]}),void 0!==e.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"•"}),(0,t.jsxs)("span",{className:"font-medium text-green-600",children:[e.latency,"ms"]})]}),(0,t.jsx)("span",{children:"•"}),(0,t.jsx)("span",{children:y(e.timestamp)})]})]},s+1))})]})]}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center p-8",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-24 h-24 rounded-full bg-gray-100 mb-6",children:(0,t.jsx)(aa.SearchOutlined,{style:{fontSize:"48px",color:"#9ca3af"}})}),(0,t.jsx)(al,{className:"text-lg text-gray-600 font-medium",children:"Test your search tool"}),(0,t.jsx)(al,{className:"text-sm text-gray-500 mt-2",children:"Enter a query above to see search results"})]})})]})]})},ai=({searchTool:e,onBack:s,isEditing:a,accessToken:l,availableProviders:r})=>{var d;let c,[m,u]=(0,i.useState)({}),p=async(e,t)=>{await (0,eO.copyToClipboard)(e)&&(u(e=>({...e,[t]:!0})),setTimeout(()=>{u(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eA.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Search Tools"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(ek.Title,{children:e.search_tool_name}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-name"]?(0,t.jsx)(at.CheckIcon,{size:12}):(0,t.jsx)(as.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_name,"search-tool-name"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:e.search_tool_id}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-id"]?(0,t.jsx)(at.CheckIcon,{size:12}):(0,t.jsx)(as.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_id,"search-tool-id"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsxs)(ae.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Provider"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(ek.Title,{children:(d=e.litellm_params.search_provider,c=r.find(e=>e.provider_name===d),c?.ui_friendly_name||d)})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"API Key"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.litellm_params.api_key?"****":"Not set"})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Created At"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleString():"Unknown"})})]})]}),e.search_tool_info?.description&&(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)(g.Text,{children:"Description"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.search_tool_info.description})})]}),(0,t.jsx)("div",{className:"mt-6",children:l&&(0,t.jsx)(ar,{searchToolName:e.search_tool_name,accessToken:l})})]})},an=({accessToken:e,userRole:s,userID:a})=>{let{data:l,isLoading:r,refetch:o}=(0,t1.useQuery)({queryKey:["searchTools"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,w.fetchSearchTools)(e).then(e=>e.search_tools||[])},enabled:!!e}),{data:d,isLoading:c}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,w.fetchAvailableSearchProviders)(e)},enabled:!!e}),m=d?.providers||[],[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(!1),[b,_]=(0,i.useState)(null),[v,C]=(0,i.useState)(!1),[T,F]=(0,i.useState)(!1),[L,A]=(0,i.useState)(!1),[M]=k.Form.useForm(),P=i.default.useMemo(()=>{let e,s,a;return e=e=>{_(e),C(!1)},s=e=>{let t=l?.find(t=>t.search_tool_id===e);t&&(M.setFieldsValue({search_tool_name:t.search_tool_name,search_provider:t.litellm_params.search_provider,api_key:t.litellm_params.api_key,api_base:t.litellm_params.api_base,timeout:t.litellm_params.timeout,max_retries:t.litellm_params.max_retries,description:t.search_tool_info?.description}),_(e),A(!0))},a=D,[{title:"Search Tool ID",dataIndex:"search_tool_id",key:"search_tool_id",render:(s,a)=>a.is_from_config?(0,t.jsx)("span",{className:"text-xs",children:"-"}):(0,t.jsx)("button",{onClick:()=>e(a.search_tool_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left cursor-pointer max-w-40",children:(0,t.jsx)("span",{className:"truncate block",children:a.search_tool_id})})},{title:"Name",dataIndex:"search_tool_name",key:"search_tool_name",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Provider",key:"provider",render:(e,s)=>{let a=s.litellm_params.search_provider,l=m.find(e=>e.provider_name===a),r=l?.ui_friendly_name||a;return(0,t.jsx)("span",{className:"text-sm",children:r})}},{title:"Created At",dataIndex:"created_at",key:"created_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.created_at?new Date(s.created_at).toLocaleDateString():"-"})},{title:"Updated At",dataIndex:"updated_at",key:"updated_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.updated_at?new Date(s.updated_at).toLocaleDateString():"-"})},{title:"Source",key:"source",render:(e,s)=>{let a=s.is_from_config??!1;return(0,t.jsx)(I.Tag,{color:a?"default":"blue",children:a?"Config":"DB"})}},{title:"Actions",key:"actions",render:(e,l)=>{let r=l.search_tool_id,i=l.is_from_config??!1;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit search tool",disabled:i,disabledTooltipText:"Config search tool cannot be edited on the dashboard. Please edit it from the config file.",onClick:()=>{r&&!i&&s(r)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete search tool",disabled:i,disabledTooltipText:"Config search tool cannot be deleted on the dashboard. Please delete it from the config file.",onClick:()=>{r&&!i&&a(r)}})]})}}]},[m,l,M]);function D(e){p(e),h(!0)}let z=async()=>{if(null!=u&&null!=e){f(!0);try{await (0,w.deleteSearchTool)(e,u),eE.default.success("Deleted search tool successfully"),h(!1),p(null),o()}catch(e){console.error("Error deleting the search tool:",e),eE.default.error("Failed to delete search tool")}finally{f(!1)}}},E=l?.find(e=>e.search_tool_id===u),O=E?m.find(e=>e.provider_name===E.litellm_params.search_provider):null,R=async()=>{if(e&&b)try{let t=await M.validateFields(),s={search_tool_name:t.search_tool_name,litellm_params:{search_provider:t.search_provider,api_key:t.api_key,api_base:t.api_base,timeout:t.timeout?parseFloat(t.timeout):void 0,max_retries:t.max_retries?parseInt(t.max_retries):void 0},search_tool_info:t.description?{description:t.description}:void 0};await (0,w.updateSearchTool)(e,b,s),eE.default.success("Search tool updated successfully"),A(!1),M.resetFields(),_(null),o()}catch(e){console.error("Failed to update search tool:",e),eE.default.error("Failed to update search tool")}};return e&&s&&a?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(sK.default,{isOpen:x,title:"Delete Search Tool",message:"Are you sure you want to delete this search tool? This action cannot be undone.",resourceInformationTitle:"Search Tool Information",resourceInformation:E?[{label:"Name",value:E.search_tool_name},{label:"ID",value:E.search_tool_id,code:!0},{label:"Provider",value:O?.ui_friendly_name||E.litellm_params.search_provider},{label:"Description",value:E.search_tool_info?.description||"-"}]:[],onCancel:()=>{h(!1),p(null)},onOk:z,confirmLoading:j}),(0,t.jsx)(s9,{userRole:s,accessToken:e,onCreateSuccess:e=>{F(!1),o()},isModalVisible:T,setModalVisible:F}),(0,t.jsx)(y.Modal,{title:"Edit Search Tool",open:L,onOk:R,onCancel:()=>{A(!1),M.resetFields(),_(null)},width:600,children:(0,t.jsxs)(k.Form,{form:M,layout:"vertical",children:[(0,t.jsx)(k.Form.Item,{name:"search_tool_name",label:"Search Tool Name",rules:[{required:!0,message:"Please enter a search tool name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g., my-perplexity-search"})}),(0,t.jsx)(k.Form.Item,{name:"search_provider",label:"Search Provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(N.Select,{placeholder:"Select a search provider",loading:c,children:m.map(e=>(0,t.jsx)(N.Select.Option,{value:e.provider_name,children:e.ui_friendly_name},e.provider_name))})}),(0,t.jsx)(k.Form.Item,{name:"api_key",label:"API Key",extra:"API key for the search provider",children:(0,t.jsx)(S.Input.Password,{placeholder:"Enter API key"})}),(0,t.jsx)(k.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(S.Input.TextArea,{rows:3,placeholder:"Description of this search tool"})})]})}),(0,t.jsx)(ek.Title,{children:"Search Tools"}),(0,t.jsx)(g.Text,{className:"text-tremor-content mt-2",children:"Configure and manage your search providers"}),(0,ew.isAdminRole)(s)&&(0,t.jsx)(n.Button,{className:"mt-4 mb-4",onClick:()=>F(!0),children:"+ Add New Search Tool"}),(0,t.jsx)(()=>b?(0,t.jsx)(ai,{searchTool:l?.find(e=>e.search_tool_id===b)||{search_tool_id:"",search_tool_name:"",litellm_params:{search_provider:""}},onBack:()=>{C(!1),_(null),o()},isEditing:v,accessToken:e,availableProviders:m}):(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(eF.Spin,{spinning:r,indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"large",children:(0,t.jsx)(te.Table,{bordered:!0,dataSource:l||[],columns:P,rowKey:e=>e.search_tool_id||e.search_tool_name,pagination:!1,locale:{emptyText:"No search tools configured"},size:"small"})})}),{})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:s,userID:a}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))};var ao=e.i(700904),ad=e.i(686311),ac=e.i(37727),am=e.i(643531),au=e.i(636772),ap=e.i(115571);function ax({onOpen:e,onDismiss:s,isVisible:a,title:l,description:r,buttonText:n,icon:o,accentColor:d,buttonStyle:c}){let m=(0,au.useDisableShowPrompts)(),[u,p]=(0,i.useState)(100),[x,h]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{if(!a){p(100),h(!1);return}let e=Date.now(),t=setInterval(()=>{let s=Math.max(0,100-(Date.now()-e)/15e3*100);p(s),s<=0&&clearInterval(t)},50);return()=>clearInterval(t)},[a]),(0,i.useEffect)(()=>{if(x){let e=setTimeout(()=>{h(!1),s()},5e3);return()=>clearTimeout(e)}},[x,s]),x)?(0,t.jsx)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center",children:(0,t.jsx)(am.Check,{className:"h-5 w-5 text-green-600"})}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)("p",{className:"text-sm text-gray-700 font-medium",children:"Got it, we will not ask again. Reactivate this at any time in the User Menu."})})]})})}):!a||m?null:(0,t.jsxs)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:[(0,t.jsx)("div",{className:"h-1 bg-gray-100 w-full",children:(0,t.jsx)("div",{className:"h-full transition-all duration-100 ease-linear",style:{width:`${u}%`,backgroundColor:d}})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",style:{color:d},children:[(0,t.jsx)(o,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm",children:l})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-0.5 rounded hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-3",children:r}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(V.Button,{type:"primary",block:!0,onClick:e,style:c,children:n}),(0,t.jsx)(V.Button,{variant:"outlined",danger:!0,block:!0,onClick:()=>{(0,ap.setLocalStorageItem)("disableShowPrompts","true"),(0,ap.emitLocalStorageChange)("disableShowPrompts"),h(!0)},className:"text-xs",children:"Don't ask me again"})]})]})]})}function ah({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ax,{onOpen:e,onDismiss:s,isVisible:a,title:"Quick feedback",description:"Help us improve LiteLLM! Share your experience in 5 quick questions.",buttonText:"Share feedback",icon:ad.MessageSquare,accentColor:"#3b82f6"})}var ag=e.i(972520),ay=e.i(180127),ay=ay,aj=e.i(536916);let af=[{id:"oss_adoption",label:"OSS Adoption",description:"Stars, contributors, forks, community support"},{id:"ai_integration",label:"AI Integration",description:"LiteLLM had the logging/guardrail integration we needed - Langfuse, OTEL, S3 logging, Azure Content Safety guardrails"},{id:"unified_api",label:"Unified API",description:"LiteLLM had the best OpenAI-compatible API across providers - OpenAI, Anthropic, Gemini, etc."},{id:"breadth_of_models",label:"Breadth of Models/Providers",description:"LiteLLM had the provider + endpoint combinations we needed - /ocr endpoint with Mistral OCR, /batches endppint with Bedrock API, etc."},{id:"other",label:"Other",description:"Something else not listed above"}];function ab({isOpen:e,onClose:s,onComplete:a}){let[l,r]=(0,i.useState)(1),[n,o]=(0,i.useState)({usingAtCompany:null,companyName:"",startDate:"",reasons:[],otherReason:"",email:""}),[d,c]=(0,i.useState)(!1),m=!0===n.usingAtCompany?5:4;if(!e)return null;let u=async()=>{c(!0);try{let e={oss_adoption:"OSS Adoption (stars, contributors, forks)",ai_integration:"AI Integration (Langfuse, OTEL, S3, Azure Content Safety)",unified_api:"Unified API (OpenAI-compatible)",breadth_of_models:"Breadth of Models/Providers (/ocr, /batches, Bedrock, Azure OCR)"},t=n.reasons.map(t=>"other"===t&&n.otherReason?`Other: ${n.otherReason}`:e[t]||t),s=new URLSearchParams({"entry.2015264290":n.usingAtCompany?"Yes":"No","entry.1876243786":n.companyName||"","entry.1282591459":n.startDate,"entry.393456108":t.join(", "),"entry.928142208":n.email||""});await fetch("https://feedback.litellm.ai/survey",{method:"POST",mode:"no-cors",body:s})}catch(e){console.error("Failed to submit survey:",e)}c(!1),a()},p=(e,t)=>{o(s=>({...s,[e]:t}))},x=e=>{o(t=>({...t,reasons:t.reasons.includes(e)?t.reasons.filter(t=>t!==e):[...t.reasons,e]}))},h=()=>{if(!1===n.usingAtCompany){if(1===l)return 1;if(3===l)return 2;if(4===l)return 3;if(5===l)return 4}return l},g=5===l;return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-lg bg-white rounded-xl shadow-2xl overflow-hidden flex flex-col max-h-[90vh] transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-blue-600",children:[(0,t.jsx)(ad.MessageSquare,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Quick Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-5 w-5"})})]}),(0,t.jsx)(sF.Progress,{percent:h()/m*100,showInfo:!1,strokeColor:"#2563eb",className:"m-0"}),(0,t.jsx)("div",{className:"p-8 flex-1 overflow-y-auto",children:1===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Are you using LiteLLM at your company?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Help us understand how our product is being used in professional environments."}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 pt-4",children:[(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!0),className:`p-6 rounded-lg border-2 text-left transition-all ${!0===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"Yes"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"We use it for work"})]}),(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!1),className:`p-6 rounded-lg border-2 text-left transition-all ${!1===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"No"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Personal project / Hobby"})]})]})]}):2===l&&!0===n.usingAtCompany?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"What company are you using LiteLLM at?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"This helps us understand our user base better."}),(0,t.jsx)(S.Input,{size:"large",placeholder:"Enter your company name",value:n.companyName,onChange:e=>p("companyName",e.target.value),autoFocus:!0})]}):3===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"When did you start using LiteLLM?"}),(0,t.jsx)(T.Radio.Group,{value:n.startDate,onChange:e=>p("startDate",e.target.value),className:"w-full",children:(0,t.jsx)(U.Space,{direction:"vertical",className:"w-full",children:["Less than a month ago","1-3 months ago","3-6 months ago","More than 6 months ago"].map(e=>(0,t.jsx)("label",{className:`flex items-center p-4 rounded-lg border cursor-pointer transition-all w-full ${n.startDate===e?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:(0,t.jsx)(T.Radio,{value:e,children:e})},e))})})]}):4===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Why did you pick LiteLLM over other AI Gateways?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Select all that apply."}),(0,t.jsx)("div",{className:"space-y-3",children:af.map(e=>{let s=n.reasons.includes(e.id);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>x(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),x(e.id))},className:`flex items-start p-4 rounded-lg border cursor-pointer transition-all ${s?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:[(0,t.jsx)(aj.Checkbox,{checked:s,className:"mt-0.5 pointer-events-none"}),(0,t.jsxs)("div",{className:"ml-3",children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900",children:e.label}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.description})]})]}),"other"===e.id&&s&&(0,t.jsx)(S.Input,{className:"mt-2 ml-7",placeholder:"Please specify...",value:n.otherReason,onChange:e=>p("otherReason",e.target.value),onClick:e=>e.stopPropagation(),autoFocus:!0})]},e.id)})})]}):5===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Want to share more?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Leave your email and we may reach out to learn more about your experience. This is completely optional."}),(0,t.jsx)(S.Input,{size:"large",type:"email",placeholder:"your@email.com (optional)",value:n.email,onChange:e=>p("email",e.target.value),autoFocus:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"We will only use this to follow up on your feedback. No spam, ever."})]}):null}),(0,t.jsxs)("div",{className:"px-6 py-4 bg-gray-50 border-t border-gray-200 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-sm text-gray-500 font-medium",children:["Step ",h()," of ",m]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[l>1&&(0,t.jsx)(V.Button,{onClick:()=>{3===l&&!1===n.usingAtCompany?r(1):r(l-1)},disabled:d,icon:(0,t.jsx)(ay.default,{className:"h-4 w-4"}),children:"Back"}),(0,t.jsxs)(V.Button,{type:"primary",onClick:()=>{1===l&&!1===n.usingAtCompany?r(3):l<5?r(l+1):u()},disabled:!(1===l?null!==n.usingAtCompany:2===l?n.companyName.trim().length>0:3===l?""!==n.startDate:4===l?n.reasons.includes("other")?n.reasons.length>0&&n.otherReason.trim().length>0:n.reasons.length>0:5===l)||d,loading:d,className:"min-w-[100px]",children:[g?"Submit":"Next",!g&&(0,t.jsx)(ag.ArrowRight,{className:"ml-2 h-4 w-4"})]})]})]})]})]})}var a_=e.i(758472);function av({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ax,{onOpen:e,onDismiss:s,isVisible:a,title:"Claude Code Feedback",description:"Help us improve your Claude Code experience with LiteLLM! Share your feedback in 4 quick questions.",buttonText:"Share feedback",icon:a_.Code,accentColor:"#7c3aed",buttonStyle:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"}})}function aw({isOpen:e,onClose:s,onComplete:a}){return e?(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-md bg-white rounded-xl shadow-2xl overflow-hidden transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-purple-600",children:[(0,t.jsx)(a_.Code,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Claude Code Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"p-8",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Help us improve your experience"}),(0,t.jsx)("p",{className:"text-gray-600 mb-6",children:"We'd love to hear about your experience using LiteLLM with Claude Code. Your feedback helps us improve the product for everyone."}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-6",children:"This brief survey takes about 2-3 minutes to complete."}),(0,t.jsx)(V.Button,{type:"primary",size:"large",block:!0,onClick:()=>{window.open("https://forms.gle/LZeJQ3XytBakckYa9","_blank","noopener,noreferrer"),a()},icon:(0,t.jsx)(t$.ExternalLink,{className:"h-4 w-4"}),style:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"},children:"Open Feedback Form"})]})]})]}):null}var ak=e.i(345244),aN=e.i(662316),aS=e.i(208075),aC=e.i(735042),aT=e.i(693569),aI=e.i(263147),aF=e.i(954616),aL=e.i(912598);let aA=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"DELETE",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}};var aM=e.i(152990),aP=e.i(682830),aD=e.i(657150),aD=aD,az=e.i(302202),aE=e.i(446891);let aO=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};var aR=e.i(21548),aB=e.i(573421),a$=e.i(516430),aD=aD,aq=e.i(823429),aq=aq,sE=sE,aU=e.i(304911),aV=e.i(289793),aH=e.i(500727),aD=aD,aG=e.i(168118);let{TextArea:aK}=S.Input;function aW({form:e,isNameDisabled:s=!1}){let{data:a}=(0,aV.useAgents)(),{data:l}=(0,aH.useMCPServers)(),r=a?.agents??[],i=[{key:"1",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aG.InfoIcon,{size:16}),"General Info"]}),children:(0,t.jsxs)("div",{style:{paddingTop:16},children:[(0,t.jsx)(k.Form.Item,{name:"name",label:"Group Name",rules:[{required:!0,message:"Please enter the access group name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. Engineering Team",disabled:s})}),(0,t.jsx)(k.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(aK,{rows:4,placeholder:"Describe the purpose of this access group..."})})]})},{key:"2",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(sD,{size:16}),"Models"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(k.Form.Item,{name:"modelIds",label:"Allowed Models",children:(0,t.jsx)(sW.ModelSelect,{context:"global",value:e.getFieldValue("modelIds")??[],onChange:t=>e.setFieldsValue({modelIds:t}),style:{width:"100%"}})})})},{key:"3",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(az.ServerIcon,{size:16}),"MCP Servers"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(k.Form.Item,{name:"mcpServerIds",label:"Allowed MCP Servers",children:(0,t.jsx)(N.Select,{mode:"multiple",placeholder:"Select MCP servers",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:(l??[]).map(e=>({label:e.server_name??e.server_id,value:e.server_id}))})})})},{key:"4",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aD.default,{size:16}),"Agents"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(k.Form.Item,{name:"agentIds",label:"Allowed Agents",children:(0,t.jsx)(N.Select,{mode:"multiple",placeholder:"Select agents",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:r.map(e=>({label:e.agent_name,value:e.agent_id}))})})})}];return(0,t.jsx)(k.Form,{form:e,layout:"vertical",name:"access_group_form",initialValues:{modelIds:[],mcpServerIds:[],agentIds:[]},children:(0,t.jsx)(t2.Tabs,{defaultActiveKey:"1",items:i})})}let aQ=async(e,t,s)=>{let a=(0,w.getProxyBaseUrl)(),l=`${a}/v1/access_group/${encodeURIComponent(t)}`,r=await fetch(l,{method:"PUT",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){let e=await r.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return r.json()};function aY({visible:e,accessGroup:s,onCancel:a,onSuccess:l}){let[r]=k.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async({accessGroupId:t,params:s})=>{if(!e)throw Error("Access token is required");return aQ(e,t,s)},onSuccess:(e,{accessGroupId:s})=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all}),t.invalidateQueries({queryKey:aI.accessGroupKeys.detail(s)})}})})();return(0,i.useEffect)(()=>{e&&s&&r.setFieldsValue({name:s.access_group_name,description:s.description??"",modelIds:s.access_model_names??[],mcpServerIds:s.access_mcp_server_ids??[],agentIds:s.access_agent_ids??[]})},[e,s,r]),(0,t.jsx)(y.Modal,{title:"Edit Access Group",open:e,onOk:()=>{r.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};n.mutate({accessGroupId:s.access_group_id,params:t},{onSuccess:()=>{A.default.success("Access group updated successfully"),l?.(),a()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:a,width:700,okText:"Save Changes",cancelText:"Cancel",confirmLoading:n.isPending,destroyOnHidden:!0,children:(0,t.jsx)(aW,{form:r})})}let{Title:aJ,Text:aX}=sn.Typography,{Content:aZ}=sT.Layout;function a0({accessGroupId:e,onBack:s}){let{data:a,isLoading:l}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aL.useQueryClient)();return(0,t1.useQuery)({queryKey:aI.accessGroupKeys.detail(e),queryFn:async()=>aO(t,e),enabled:!!(t&&e)&&ew.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(aI.accessGroupKeys.list({}));return t?.find(t=>t.access_group_id===e)}})})(e),{token:r}=sL.theme.useToken(),[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(!1);if(l)return(0,t.jsx)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!a)return(0,t.jsxs)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aR.Empty,{description:"Access group not found"})]});let p=a.access_model_names??[],x=a.access_mcp_server_ids??[],h=a.access_agent_ids??[],g=a.assigned_key_ids??[],y=a.assigned_team_ids??[],j=d?g:g.slice(0,5),f=m?y:y.slice(0,5),b=[{key:"models",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sD,{size:16}),"Models",(0,t.jsx)(I.Tag,{style:{marginInlineEnd:0},children:p?.length})]}),children:p?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:p,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No models assigned to this group"})},{key:"mcp",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(az.ServerIcon,{size:16}),"MCP Servers",(0,t.jsx)(I.Tag,{children:x?.length})]}),children:x?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:x,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No MCP servers assigned to this group"})},{key:"agents",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(aD.default,{size:16}),"Agents",(0,t.jsx)(I.Tag,{children:h?.length})]}),children:h?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:h,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No agents assigned to this group"})}];return(0,t.jsxs)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(aJ,{level:2,style:{margin:0},children:a.access_group_name}),(0,t.jsxs)(aX,{type:"secondary",children:["ID: ",(0,t.jsx)(aX,{copyable:!0,children:a.access_group_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(aq.default,{size:16}),onClick:()=>{o(!0)},children:"Edit Access Group"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Group Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:a.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(a.created_at).toLocaleString(),a.created_by&&(0,t.jsxs)(aX,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:a.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(a.updated_at).toLocaleString(),a.updated_by&&(0,t.jsxs)(aX,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:a.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sM.KeyIcon,{size:16}),"Attached Keys",(0,t.jsx)(I.Tag,{children:g?.length})]}),extra:g?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),children:d?"Show Less":`View All (${g?.length})`}):null,children:g?.length>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:8,children:j.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aX,{code:!0,style:{fontSize:12},children:e.length>20?`${e.slice(0,10)}...${e.slice(-6)}`:e})},e))}):(0,t.jsx)(aR.Empty,{description:"No keys attached",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sE.default,{size:16}),"Attached Teams",(0,t.jsx)(I.Tag,{children:y?.length})]}),extra:y?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>u(!m),children:m?"Show Less":`View All (${y?.length})`}):null,children:y?.length>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:8,children:f.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aX,{code:!0,style:{fontSize:12},children:e})},e))}):(0,t.jsx)(aR.Empty,{description:"No teams attached",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ts.Card,{children:(0,t.jsx)(t2.Tabs,{defaultActiveKey:"models",items:b})}),(0,t.jsx)(aY,{visible:n,accessGroup:a,onCancel:()=>o(!1)})]})}let a1=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group`,l=await fetch(a,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};function a2({visible:e,onCancel:s,onSuccess:a}){let[l]=k.Form.useForm(),r=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return a1(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all})}})})();return(0,t.jsx)(y.Modal,{title:"Create Access Group",open:e,onOk:()=>{l.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};r.mutate(t,{onSuccess:()=>{A.default.success("Access group created successfully"),l.resetFields(),a?.(),s()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:s,width:700,okText:"Create Group",cancelText:"Cancel",confirmLoading:r.isPending,destroyOnClose:!0,children:(0,t.jsx)(aW,{form:l})})}let{Title:a4,Text:a5}=sn.Typography,{Content:a6}=sT.Layout;function a3(e){return{id:e.access_group_id,name:e.access_group_name,description:e.description??"",modelIds:e.access_model_names,mcpServerIds:e.access_mcp_server_ids,agentIds:e.access_agent_ids,keyIds:e.assigned_key_ids,teamIds:e.assigned_team_ids,createdAt:e.created_at,createdBy:e.created_by??"",updatedAt:e.updated_at,updatedBy:e.updated_by??""}}function a8(){let{token:e}=sL.theme.useToken(),{data:s,isLoading:a}=(0,aI.useAccessGroups)(),l=(0,i.useMemo)(()=>(s??[]).map(a3),[s]),[r,n]=(0,i.useState)(null),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[u,p]=(0,i.useState)(1),[x,h]=(0,i.useState)([]),[g,y]=(0,i.useState)(null),j=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return aA(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all})}})})();(0,i.useEffect)(()=>{p(1)},[c]);let b=(0,i.useMemo)(()=>l.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())||e.id.toLowerCase().includes(c.toLowerCase())||e.description.toLowerCase().includes(c.toLowerCase())),[l,c]),_=(0,i.useMemo)(()=>[{id:"id",accessorKey:"id",header:()=>(0,t.jsx)("span",{children:"ID"}),enableSorting:!1,size:170,cell:({row:e})=>{let s=e.original;return(0,t.jsx)(f.Tooltip,{title:s.id,children:(0,t.jsx)(a5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>n(s.id),children:s.id})})}},{id:"name",accessorKey:"name",header:()=>(0,t.jsx)("span",{children:"Name"}),enableSorting:!0,cell:({getValue:e})=>e()},{id:"resources",header:()=>(0,t.jsx)("span",{children:"Resources"}),enableSorting:!1,cell:({row:e})=>{let s=e.original,a=s.modelIds??[],l=s.mcpServerIds??[],r=s.agentIds??[];return(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a?.length} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),a?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${l?.length} MCP Servers`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(az.ServerIcon,{size:14}),l?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${r?.length} Agents`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(aD.default,{size:14}),r?.length]})})})]})}},{id:"createdAt",accessorKey:"createdAt",header:()=>(0,t.jsx)("span",{children:"Created"}),enableSorting:!0,sortingFn:"datetime",cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["lg"]}},{id:"updatedAt",accessorKey:"updatedAt",header:()=>(0,t.jsx)("span",{children:"Updated"}),enableSorting:!1,cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["xl"]}},{id:"actions",header:()=>(0,t.jsx)("span",{children:"Actions"}),enableSorting:!1,cell:({row:e})=>(0,t.jsx)(U.Space,{children:(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete access group",onClick:()=>y(e.original)})})}],[]),v=(0,aM.useReactTable)({data:b,columns:_,state:{sorting:x},onSortingChange:h,getCoreRowModel:(0,aP.getCoreRowModel)(),getSortedRowModel:(0,aP.getSortedRowModel)(),getRowId:e=>e.id}),w=v.getRowModel().rows,k=w.slice((u-1)*10,10*u),N=(0,i.useMemo)(()=>new Map(k.map(e=>[e.original.id,e])),[k]),C=(v.getHeaderGroups()[0]?.headers??[]).map(e=>{let s=e.column.getCanSort(),a=e.column.getIsSorted(),l=e.column.columnDef.meta,r={title:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[e.isPlaceholder?null:(0,aM.flexRender)(e.column.columnDef.header,e.getContext()),s&&(0,t.jsx)(aE.TableHeaderSortDropdown,{sortState:!1!==a&&a,onSortChange:t=>{h(!1===t?[]:[{id:e.column.id,desc:"desc"===t}])},columnId:e.column.id})]}),key:e.id,width:e.column.columnDef.size,render:(t,s)=>{let a=N.get(s.id);if(!a)return null;let l=a.getVisibleCells().find(t=>t.column.id===e.id);return l?(0,aM.flexRender)(l.column.columnDef.cell,l.getContext()):null}};return l?.responsive&&(r.responsive=l.responsive),r}),T=k.map(e=>e.original);return r?(0,t.jsx)(a0,{accessGroupId:r,onBack:()=>n(null)}):(0,t.jsxs)(a6,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(a4,{level:2,style:{margin:0},children:"Access Groups"}),(0,t.jsx)(a5,{type:"secondary",children:"Manage resource permissions for your organization"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>d(!0),children:"Create Access Group"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sz.SearchIcon,{size:16}),placeholder:"Search groups by name, ID, or description...",style:{maxWidth:400},value:c,onChange:e=>m(e.target.value),allowClear:!0}),(0,t.jsx)(sI.Pagination,{current:u,total:w?.length,pageSize:10,onChange:e=>p(e),size:"small",showTotal:e=>`${e} groups`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:C,dataSource:T,rowKey:"id",loading:a,pagination:!1})]}),(0,t.jsx)(a2,{visible:o,onCancel:()=>d(!1)}),(0,t.jsx)(sK.default,{isOpen:!!g,title:"Delete Access Group",message:"Are you sure you want to delete this access group? This action cannot be undone.",resourceInformationTitle:"Access Group Information",resourceInformation:[{label:"ID",value:g?.id,code:!0},{label:"Name",value:g?.name},{label:"Description",value:g?.description||"—"}],onCancel:()=>y(null),onOk:()=>{g&&j.mutate(g.id,{onSuccess:()=>{y(null)}})},confirmLoading:j.isPending})]})}var a7=e.i(510674);let a9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder-add",theme:"outlined"};var le=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:a9}))});let lt=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/project/new`,l=await fetch(a,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};function ls({form:e}){let{accessToken:s,userId:a,userRole:l}=(0,R.default)(),{data:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)([]);(0,i.useEffect)(()=>{(async()=>{if(s)try{let e=(await (0,w.getGuardrailsList)(s)).guardrails.map(e=>e.guardrail_name);u(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[s]);let p=k.Form.useWatch("team_id",e);return(0,i.useEffect)(()=>{if(p&&r){let e=r.find(e=>e.team_id===p)??null;e&&e.team_id!==n?.team_id&&o(e)}},[p,r,n?.team_id]),(0,i.useEffect)(()=>{a&&l&&s&&n?(0,sX.fetchTeamModels)(a,l,s,n.team_id).then(e=>{c(Array.from(new Set([...n.models??[],...e])))}):c([])},[n,s,a,l]),(0,t.jsxs)(k.Form,{form:e,layout:"vertical",name:"project_form",initialValues:{isBlocked:!1},style:{marginTop:24},children:[(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:13,color:"#374151",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Basic Information"}),(0,t.jsx)(F.Divider,{style:{marginTop:8,marginBottom:16}}),(0,t.jsxs)(t_.Row,{gutter:24,children:[(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(k.Form.Item,{name:"project_alias",label:"Project Name",rules:[{required:!0,message:"Please enter a project name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. Customer Support Bot"})})}),(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(k.Form.Item,{name:"team_id",label:"Team",rules:[{required:!0,message:"Please select a team"}],children:(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Search or select a team",onChange:t=>{o(r?.find(e=>e.team_id===t)??null),e.setFieldValue("models",[])},allowClear:!0,optionLabelProp:"label",filterOption:(e,t)=>{let s=r?.find(e=>e.team_id===t?.value);if(!s)return!1;let a=e.toLowerCase().trim();return(s.team_alias||"").toLowerCase().includes(a)||s.team_id.toLowerCase().includes(a)},children:r?.map(e=>(0,t.jsxs)(N.Select.Option,{value:e.team_id,label:e.team_alias||e.team_id,children:[(0,t.jsx)("span",{style:{fontWeight:500},children:e.team_alias})," ",(0,t.jsxs)("span",{style:{color:"#9ca3af"},children:["(",e.team_id,")"]})]},e.team_id))})})})]}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(k.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(S.Input.TextArea,{placeholder:"Describe the purpose of this project",rows:3})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(k.Form.Item,{name:"models",label:"Allowed Models (scoped to selected team's models)",help:n?void 0:"Select a team first to see available models",children:(0,t.jsxs)(N.Select,{mode:"multiple",placeholder:n?"Select models":"Select a team first",disabled:!n,allowClear:!0,maxTagCount:"responsive",onChange:t=>{t.includes("all-team-models")&&e.setFieldsValue({models:["all-team-models"]})},children:[(0,t.jsx)(N.Select.Option,{value:"all-team-models",children:"All Team Models"},"all-team-models"),d.map(e=>(0,t.jsx)(N.Select.Option,{value:e,children:(0,B.getModelDisplayName)(e)},e))]})})})}),(0,t.jsx)(t_.Row,{gutter:24,children:(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(k.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,t.jsx)(L.InputNumber,{prefix:"$",style:{width:"100%"},placeholder:"0.00",min:0,precision:2})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(q.Collapse,{ghost:!0,style:{background:"#f9fafb",borderRadius:8,border:"1px solid #e5e7eb"},items:[{key:"1",label:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{color:"#374151"},children:"Advanced Settings"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sC.Flex,{align:"center",gap:12,children:[(0,t.jsx)(sn.Typography.Text,{strong:!0,children:"Block Project"}),(0,t.jsx)(k.Form.Item,{name:"isBlocked",valuePropName:"checked",noStyle:!0,children:(0,t.jsx)(_.Switch,{})})]}),(0,t.jsx)(k.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.isBlocked!==t.isBlocked,children:({getFieldValue:e})=>e("isBlocked")?(0,t.jsx)(j.Alert,{banner:!0,type:"warning",showIcon:!0,message:"All API requests using keys under this project will be rejected.",style:{marginTop:12}}):null}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(k.Form.Item,{label:"Guardrails",name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:m.map(e=>({value:e,label:e}))})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Model-Specific Limits"}),(0,t.jsx)(k.Form.List,{name:"modelLimits",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(k.Form.Item,{...r,name:[a,"model"],rules:[{required:!0,message:"Missing model"},{validator:(t,s)=>s&&(e.getFieldValue("modelLimits")??[]).filter(e=>e?.model===s).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],children:(0,t.jsx)(S.Input,{placeholder:"Model name (e.g. gpt-4)"})}),(0,t.jsx)(k.Form.Item,{...r,name:[a,"tpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(k.Form.Item,{...r,name:[a,"rpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(k.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Model Limit"})})]})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Metadata"}),(0,t.jsx)(k.Form.List,{name:"metadata",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(k.Form.Item,{...r,name:[a,"key"],rules:[{required:!0,message:"Missing key"},{validator:(t,s)=>s&&(e.getFieldValue("metadata")??[]).filter(e=>e?.key===s).length>1?Promise.reject(Error("Duplicate key")):Promise.resolve()}],children:(0,t.jsx)(S.Input,{placeholder:"Key"})}),(0,t.jsx)(k.Form.Item,{...r,name:[a,"value"],rules:[{required:!0,message:"Missing value"}],children:(0,t.jsx)(S.Input,{placeholder:"Value"})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(k.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Key-Value Pair"})})]})})]})}]})})})]})}function la(e){let t={},s={};for(let a of e.modelLimits??[])a.model&&(null!=a.rpm&&(t[a.model]=a.rpm),null!=a.tpm&&(s[a.model]=a.tpm));let a={};for(let t of e.metadata??[])t.key&&(a[t.key]=t.value);return{project_alias:e.project_alias,description:e.description,models:e.models??[],max_budget:e.max_budget,blocked:e.isBlocked??!1,...e.guardrails&&e.guardrails.length>0&&{guardrails:e.guardrails},...Object.keys(t).length>0&&{model_rpm_limit:t},...Object.keys(s).length>0&&{model_tpm_limit:s},...Object.keys(a).length>0&&{metadata:a}}}function ll({isOpen:e,onClose:s}){let[a]=k.Form.useForm(),l=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return lt(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:a7.projectKeys.all})}})})(),r=async()=>{try{let e=await a.validateFields(),t={...la(e),team_id:e.team_id};l.mutate(t,{onSuccess:()=>{A.default.success("Project created successfully"),a.resetFields(),s()},onError:e=>{A.default.error(e.message||"Failed to create project")}})}catch(e){console.error("Validation failed:",e)}},i=()=>{a.resetFields(),s()};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:18},children:"Create New Project"}),open:e,onCancel:i,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:i,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(le,{}),loading:l.isPending,onClick:r,children:"Create Project"},"submit")],children:(0,t.jsx)(ls,{form:a})})}let lr=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/project/info?project_id=${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()},li=(0,sP.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"}]]);var aq=aq,sE=sE,ln=e.i(987432);let lo=async(e,t,s)=>{let a=(0,w.getProxyBaseUrl)(),l=`${a}/project/update`,r=await fetch(l,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({project_id:t,...s})});if(!r.ok){let e=await r.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return r.json()};function ld({isOpen:e,project:s,onClose:a,onSuccess:l}){let[r]=k.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async({projectId:t,params:s})=>{if(!e)throw Error("Access token is required");return lo(e,t,s)},onSuccess:()=>{t.invalidateQueries({queryKey:a7.projectKeys.all})}})})();(0,i.useEffect)(()=>{if(e&&s){let e=s.metadata??{},t=e.model_rpm_limit??{},a=e.model_tpm_limit??{},l=Array.isArray(e.guardrails)?e.guardrails:[],i=[];for(let e of new Set([...Object.keys(t),...Object.keys(a)]))i.push({model:e,rpm:t[e],tpm:a[e]});let n=new Set(["model_rpm_limit","model_tpm_limit","guardrails"]),o=[];for(let[t,s]of Object.entries(e))n.has(t)||o.push({key:t,value:String(s)});r.setFieldsValue({project_alias:s.project_alias??"",team_id:s.team_id??"",description:s.description??"",models:s.models??[],max_budget:s.litellm_budget_table?.max_budget??void 0,isBlocked:s.blocked,guardrails:l.length>0?l:void 0,modelLimits:i.length>0?i:void 0,metadata:o.length>0?o:void 0})}},[e,s,r]);let o=async()=>{try{let e=await r.validateFields(),t={...la(e),team_id:e.team_id};n.mutate({projectId:s.project_id,params:t},{onSuccess:()=>{A.default.success("Project updated successfully"),l?.(),a()},onError:e=>{A.default.error(e.message||"Failed to update project")}})}catch(e){console.error("Validation failed:",e)}};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:18},children:"Edit Project"}),open:e,onCancel:a,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:a,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(ln.SaveOutlined,{}),loading:n.isPending,onClick:o,children:"Save Changes"},"submit")],children:(0,t.jsx)(ls,{form:r})})}let{Title:lc,Text:lm}=sn.Typography,{Content:lu}=sT.Layout;function lp({projectId:e,onBack:s}){let a,l,r,n,{data:o,isLoading:d}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aL.useQueryClient)();return(0,t1.useQuery)({queryKey:a7.projectKeys.detail(e),queryFn:async()=>lr(t,e),enabled:!!(t&&e)&&ew.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(a7.projectKeys.list({}));return t?.find(t=>t.project_id===e)}})})(e),{data:c}=(0,eV.useTeam)(o?.team_id??void 0),m=c?.team_info??c,{token:u}=sL.theme.useToken(),[p,x]=(0,i.useState)(!1),h=o?.spend??0,g=o?.litellm_budget_table?.max_budget??null,y=null!=g&&g>0,j=y?Math.min(h/g*100,100):0,f=(0,i.useMemo)(()=>Object.entries(o?.model_spend??{}).map(([e,t])=>({model:e,spend:t})).sort((e,t)=>t.spend-e.spend),[o?.model_spend]);return d?(0,t.jsx)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"large"})})}):o?(0,t.jsxs)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(lc,{level:2,style:{margin:0},children:o.project_alias??o.project_id}),(0,t.jsx)(I.Tag,{color:o.blocked?"red":"green",children:o.blocked?"Blocked":"Active"})]}),(0,t.jsxs)(lm,{type:"secondary",children:["ID: ",(0,t.jsx)(lm,{copyable:!0,children:o.project_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(aq.default,{size:16}),onClick:()=>x(!0),children:"Edit Project"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Project Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:o.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(o.created_at).toLocaleString(),o.created_by&&(0,t.jsxs)(lm,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:o.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(o.updated_at).toLocaleString(),o.updated_by&&(0,t.jsxs)(lm,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:o.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:8,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(li,{size:16}),"Budget"]}),style:{height:"100%"},children:(0,t.jsxs)(sC.Flex,{vertical:!0,gap:16,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(lm,{strong:!0,style:{fontSize:28,lineHeight:1},children:["$",h.toFixed(2)]}),(0,t.jsx)("br",{}),(0,t.jsx)(lm,{type:"secondary",children:y?`of $${g.toFixed(2)} budget`:"No budget limit"})]}),y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(sF.Progress,{percent:Math.round(10*j)/10,strokeColor:j>=90?"#f5222d":j>=70?"#faad14":"#52c41a",showInfo:!1}),(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[(Math.round(10*j)/10).toFixed(1),"% utilized"]})]})]})})}),(0,t.jsx)(tv.Col,{xs:24,lg:16,children:(0,t.jsx)(ts.Card,{title:"Spend by Model",style:{height:"100%"},children:f.length>0?(0,t.jsx)(so.BarChart,{data:f,index:"model",categories:["spend"],colors:["cyan"],layout:"vertical",valueFormatter:e=>`$${e.toFixed(4)}`,yAxisWidth:140,showLegend:!1,style:{height:Math.max(40*f.length,120)}}):(0,t.jsx)(aR.Empty,{description:"No model spend recorded yet",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sM.KeyIcon,{size:16}),"Keys"]}),style:{height:"100%"},children:(0,t.jsx)(aR.Empty,{description:"No keys to display",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sE.default,{size:16}),"Team"]}),style:{height:"100%"},children:m?(a=m.max_budget??null,l=m.spend??0,n=(r=null!=a&&a>0)?Math.min(l/a*100,100):0,(0,t.jsxs)(sC.Flex,{vertical:!0,gap:12,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lm,{strong:!0,style:{fontSize:16},children:m.team_alias||m.team_id}),(0,t.jsx)("br",{}),(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:["ID:"," ",(0,t.jsx)(lm,{copyable:!0,style:{fontSize:12},children:m.team_id})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"Models"}),(m.models?.length??0)>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:4,style:{maxHeight:60,overflow:"hidden"},children:m.models?.map(e=>(0,t.jsx)(I.Tag,{style:{margin:0},children:e},e))}):(0,t.jsx)(lm,{type:"secondary",children:"All models"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:2},children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12},children:"Spend"}),(0,t.jsxs)(lm,{style:{fontSize:12},children:["$",l.toFixed(2),r?(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[" ","/ $",a.toFixed(2)]}):(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[" ","(Unlimited)"]})]})]}),r&&(0,t.jsx)(sF.Progress,{percent:Math.round(10*n)/10,strokeColor:n>=90?"#f5222d":n>=70?"#faad14":"#52c41a",size:"small",showInfo:!1})]}),(0,t.jsxs)(sC.Flex,{justify:"space-between",children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12},children:"Members"}),(0,t.jsx)(lm,{style:{fontSize:12},children:m.members_with_roles?.length??0})]})]})):o.team_id?(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{padding:16},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})}):(0,t.jsx)(aR.Empty,{description:"No team assigned",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ld,{isOpen:p,project:o,onClose:()=>x(!1)})]}):(0,t.jsxs)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aR.Empty,{description:"Project not found"})]})}let{Title:lx,Text:lh}=sn.Typography,{Content:lg}=sT.Layout;function ly(){let{token:e}=sL.theme.useToken(),{data:s,isLoading:a}=(0,a7.useProjects)(),{data:l,isLoading:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(""),[p,x]=(0,i.useState)(1);(0,i.useEffect)(()=>{x(1)},[m]);let h=(0,i.useMemo)(()=>{let e=new Map;for(let t of l??[])e.set(t.team_id,t.team_alias??t.team_id);return e},[l]),g=(0,i.useMemo)(()=>{let e=s??[];if(!m)return e;let t=m.toLowerCase();return e.filter(e=>{let s=h.get(e.team_id??"")??"";return(e.project_alias??"").toLowerCase().includes(t)||e.project_id.toLowerCase().includes(t)||(e.description??"").toLowerCase().includes(t)||s.toLowerCase().includes(t)})},[s,m,h]),y=[{title:"ID",dataIndex:"project_id",key:"project_id",width:170,render:e=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(lh,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>o(e),children:e})})},{title:"Name",dataIndex:"project_alias",key:"project_alias",sorter:(e,t)=>(e.project_alias??"").localeCompare(t.project_alias??""),render:e=>e??"—"},{title:"Team",key:"team",sorter:(e,t)=>{let s=h.get(e.team_id??"")??"",a=h.get(t.team_id??"")??"";return s.localeCompare(a)},render:(e,s)=>{if(!s.team_id)return"—";let a=h.get(s.team_id);return a||(r?(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}):s.team_id)}},{title:"Models",key:"models",render:(e,s)=>{let a=s.models??[];return(0,t.jsx)(f.Tooltip,{title:a.length>0?a.join(", "):"No models",children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),a.length]})})})}},{title:"Status",dataIndex:"blocked",key:"status",render:e=>(0,t.jsx)(I.Tag,{color:e?"red":"green",children:e?"Blocked":"Active"})},{title:"Created",dataIndex:"created_at",key:"created_at",sorter:(e,t)=>new Date(e.created_at).getTime()-new Date(t.created_at).getTime(),responsive:["lg"],render:e=>new Date(e).toLocaleDateString()},{title:"Updated",dataIndex:"updated_at",key:"updated_at",responsive:["xl"],render:e=>new Date(e).toLocaleDateString()}];return n?(0,t.jsx)(lp,{projectId:n,onBack:()=>o(null)}):(0,t.jsxs)(lg,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(lx,{level:2,style:{margin:0},children:"Projects"}),(0,t.jsx)(lh,{type:"secondary",children:"Manage projects within your teams"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>c(!0),children:"Create Project"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sz.SearchIcon,{size:16}),placeholder:"Search projects by name, ID, description, or team...",style:{maxWidth:400},value:m,onChange:e=>u(e.target.value),allowClear:!0}),(0,t.jsx)(sI.Pagination,{current:p,total:g.length,pageSize:10,onChange:e=>x(e),size:"small",showTotal:e=>`${e} projects`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:y,dataSource:g.slice((p-1)*10,10*p),rowKey:"project_id",loading:a,pagination:!1})]}),(0,t.jsx)(ll,{isOpen:d,onClose:()=>c(!1)})]})}var lj=e.i(241902);let lf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"};var lb=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:lf}))}),l_=e.i(366308);let lv=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"},{value:"blocked",label:"blocked",color:"#991b1b",bg:"#fee2e2",border:"#fca5a5"}],lw=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"}],lk=({value:e,toolName:s,saving:a,onChange:l,policyType:r="input",size:i="small",minWidth:n=110,stopPropagation:o=!0})=>{let d="output"===r?lw:lv,c=lv.find(t=>t.value===e)??lv[0];return(0,t.jsx)(N.Select,{size:i,value:e,disabled:a,loading:a,onChange:e=>l(s,e),onClick:e=>o&&e.stopPropagation(),style:{minWidth:n,fontWeight:500,backgroundColor:c.bg,borderColor:c.border,color:c.color,borderRadius:999,fontSize:"small"===i?11:12},popupMatchSelectWidth:!1,options:d.map(e=>({value:e.value,label:(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,fontWeight:500,color:e.color},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:e.color,display:"inline-block",flexShrink:0}}),e.label]})}))})},lN="tool-detail";function lS({toolName:e,onBack:s,accessToken:a}){let l=(0,aL.useQueryClient)(),[r,n]=(0,i.useState)(!1),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)("team"),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(null),j=(0,i.useMemo)(()=>{let e,t,s;return e=new Date,(t=new Date).setDate(t.getDate()-90),{start:(s=e=>e.toISOString().slice(0,19).replace("T"," "))(t),end:s(e)}},[]),{data:f,isLoading:b,error:_}=(0,t1.useQuery)({queryKey:[lN,e],queryFn:()=>(0,w.fetchToolDetail)(a,e),enabled:!!a&&!!e}),{data:v}=(0,t1.useQuery)({queryKey:["tool-policy-options"],queryFn:()=>(0,w.fetchToolPolicyOptions)(a),enabled:!!a,staleTime:6e4}),{data:k}=(0,t1.useQuery)({queryKey:["teams-list-tool-detail"],queryFn:()=>(0,w.teamListCall)(a,null,null),enabled:!!a}),{data:S}=(0,t1.useQuery)({queryKey:["keys-list-tool-detail"],queryFn:()=>(0,w.keyListCall)(a,null,null,null,null,null,1,100),enabled:!!a}),{data:C,isLoading:T}=(0,t1.useQuery)({queryKey:["tool-usage-logs",e,j.start,j.end],queryFn:()=>(0,w.getToolUsageLogs)(a,e,{page:1,pageSize:50,startDate:j.start,endDate:j.end}),enabled:!!a&&!!e}),I=(0,i.useMemo)(()=>(C?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:"passed",model:e.model??void 0,input_snippet:e.input_snippet??void 0})),[C?.logs]);(0,i.useMemo)(()=>(Array.isArray(k)?k:k?.data??[]).map(e=>({team_id:e.team_id??e.id??"",team_alias:e.team_alias??e.team_id??"",models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:"",created_at:"",keys:[],members_with_roles:[],spend:0})),[k]);let F=(0,i.useMemo)(()=>(S?.keys??S?.data??[]).map(e=>({token:e.token??e.api_key??e.key_hash??"",key_alias:e.key_alias??(e.token??e.api_key??e.key_hash)?.toString?.()?.substring?.(0,8)})),[S]),L=(0,i.useCallback)(()=>{l.invalidateQueries({queryKey:[lN,e]})},[l,e]),A=(0,i.useCallback)(async(t,s)=>{if(a){d(!0);try{await (0,w.updateToolPolicy)(a,e,{input_policy:s}),L()}catch(e){alert(`Failed to update input policy: ${e instanceof Error?e.message:String(e)}`)}finally{d(!1)}}},[a,e,L]),M=(0,i.useCallback)(async(t,s)=>{if(a){m(!0);try{await (0,w.updateToolPolicy)(a,e,{output_policy:s}),L()}catch(e){alert(`Failed to update output policy: ${e instanceof Error?e.message:String(e)}`)}finally{m(!1)}}},[a,e,L]),P=(0,i.useCallback)(async()=>{if(!a||!e)return;let t="team"===u;if((!t||x)&&(t||g?.token)){n(!0);try{await (0,w.updateToolPolicy)(a,e,{input_policy:"blocked"},{team_id:t?x:void 0,key_hash:t?void 0:g.token,key_alias:t?void 0:g.key_alias}),L(),h(null),y(null)}catch(e){alert(`Failed to add override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,u,x,g,L]),D=(0,i.useCallback)(async t=>{if(a&&e){n(!0);try{await (0,w.deleteToolPolicyOverride)(a,e,{team_id:t.team_id??void 0,key_hash:t.key_hash??void 0}),L()}catch(e){alert(`Failed to remove override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,L]);if(b&&!f)return(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})});if(_&&!f)return(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load tool details."})]});if(!f)return null;let{tool:z,overrides:E}=f,O=v?.input_policies?.find(e=>e.value===z.input_policy)?.description,R=v?.output_policies?.find(e=>e.value===z.output_policy)?.description;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1 flex-wrap",children:[(0,t.jsx)(l_.ToolOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900 font-mono",children:z.tool_name}),(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-gray-100 text-gray-700 border border-gray-200",children:z.origin??"—"}),(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:[(z.call_count??0).toLocaleString()," calls"]})]}),(0,t.jsxs)("dl",{className:"mt-3 flex flex-wrap gap-x-6 gap-y-1 text-sm text-gray-600",children:[z.user_agent&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"User Agent:"}),(0,t.jsx)("dd",{className:"font-mono truncate max-w-[40ch]",title:z.user_agent,children:z.user_agent})]}),z.created_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"First Discovered:"}),(0,t.jsx)("dd",{children:new Date(z.created_at).toLocaleString()})]}),z.last_used_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"Last Used:"}),(0,t.jsx)("dd",{children:new Date(z.last_used_at).toLocaleString()})]})]})]})})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Input Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:O??"Controls what data this tool is allowed to accept."}),(0,t.jsx)(lk,{value:z.input_policy,toolName:z.tool_name,saving:o,onChange:A,policyType:"input",size:"middle",minWidth:140,stopPropagation:!1})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Output Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:R??"Controls how this tool's output is trusted by downstream tools."}),(0,t.jsx)(lk,{value:z.output_policy,toolName:z.tool_name,saving:c,onChange:M,policyType:"output",size:"middle",minWidth:140,stopPropagation:!1})]})]}),E.length>0&&(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Blocked for team or key"}),(0,t.jsx)("ul",{className:"border rounded-md divide-y divide-gray-100 bg-red-50/30",children:E.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between px-3 py-2.5 text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-700",children:[e.team_id?`Team: ${e.team_id}`:"",e.team_id&&e.key_hash?" · ":"",e.key_hash?`Key: ${e.key_alias||e.key_hash.substring(0,8)}`:"",e.team_id||e.key_hash?"":"—"]}),(0,t.jsx)(V.Button,{type:"link",danger:!0,size:"small",disabled:r,onClick:()=>D(e),children:"Remove"})]},e.override_id))})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Block for team or key"}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 max-w-md",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Scope"}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"team"===u,onChange:()=>p("team"),className:"align-middle"}),"Team"]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"key"===u,onChange:()=>p("key"),className:"align-middle"}),"Key"]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"team"===u?"Team":"Key"}),"team"===u?(0,t.jsx)($.default,{value:x??void 0,onChange:e=>h(e||null)}):(0,t.jsx)(N.Select,{placeholder:"Select key",allowClear:!0,showSearch:!0,optionFilterProp:"label",value:g?g.token:void 0,onChange:e=>{y(F.find(t=>t.token===e)??null)},options:F.map(e=>({value:e.token,label:e.key_alias||e.token?.substring?.(0,12)||e.token})),className:"w-full",style:{minWidth:200}})]}),(0,t.jsxs)(V.Button,{type:"primary",danger:!0,disabled:r||("team"===u?!x:!g?.token),loading:r,onClick:P,children:["Block for ",u]})]})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2",children:[(0,t.jsx)(lb,{}),"Recent logs"]}),(0,t.jsx)(st,{guardrailName:z.tool_name,filterAction:"passed",logs:I,logsLoading:T,totalLogs:C?.total??0,accessToken:a,startDate:j.start,endDate:j.end})]})]})]})}var lC=e.i(307582),lT=e.i(969550);function lI(e){return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`}function lF(e,t){if(!e)return!1;try{let s=new Date(e);return lI(s)===t}catch{return!1}}function lL(e,t){return e.filter(e=>lF(e.created_at,t)).length}let lA=({accessToken:e,onSelectTool:s})=>{let[a,l]=(0,i.useState)([]),[r,n]=(0,i.useState)(!0),[o,h]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[j,b]=(0,i.useState)(null),[v,k]=(0,i.useState)(null),[N,S]=(0,i.useState)(""),[C,T]=(0,i.useState)("created_at"),[I,F]=(0,i.useState)("desc"),[L,A]=(0,i.useState)(1),[M,P]=(0,i.useState)(!0),[D,z]=(0,i.useState)({}),E=(0,i.useDeferredValue)(o),O=o||E,R=(0,i.useCallback)(async()=>{if(e){h(!0),y(null);try{let t=await (0,w.fetchToolsList)(e);l(t)}catch(e){y(e.message??"Failed to load tools")}finally{h(!1),n(!1)}}},[e]);(0,i.useEffect)(()=>{R()},[R]),(0,i.useEffect)(()=>{if(!M)return;let e=setInterval(R,15e3);return()=>clearInterval(e)},[M,R]);let B=async(t,s)=>{if(e){b(t);try{await (0,w.updateToolPolicy)(e,t,{input_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,input_policy:s}:e))}catch(e){alert(`Failed to update input policy: ${e.message}`)}finally{b(null)}}},$=async(t,s)=>{if(e){k(t);try{await (0,w.updateToolPolicy)(e,t,{output_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,output_policy:s}:e))}catch(e){alert(`Failed to update output policy: ${e.message}`)}finally{k(null)}}},q=Array.from(new Set(a.map(e=>e.team_id).filter(Boolean))).map(e=>({label:e,value:e})),U=Array.from(new Set(a.map(e=>e.key_alias).filter(Boolean))).map(e=>({label:e,value:e})),V=[{name:"Input Policy",label:"Input Policy",options:lv.map(e=>({label:e.label,value:e.value}))},{name:"Output Policy",label:"Output Policy",options:lw.map(e=>({label:e.label,value:e.value}))},{name:"Team Name",label:"Team Name",options:q},{name:"Key Name",label:"Key Name",options:U}],{newToday:H,newYesterday:G,trendSubtitle:K,totalTools:W,blockedCount:Q,activeTeamsCount:Y,needsReviewTools:J}=(0,i.useMemo)(()=>{let e=new Date,t=lI(e),s=new Date(e);s.setUTCDate(s.getUTCDate()-1);let l=lI(s),r=lL(a,t),i=lL(a,l),n=function(e,t){let s=e-t;if(0!==s)return s>0?`+${s} since yesterday`:`${s} since yesterday`}(r,i),o=a.length,d=a.filter(e=>"blocked"===e.input_policy).length;return{newToday:r,newYesterday:i,trendSubtitle:n,totalTools:o,blockedCount:d,activeTeamsCount:new Set(a.map(e=>e.team_id).filter(Boolean)).size,needsReviewTools:a.filter(e=>lF(e.created_at,t)&&"untrusted"===e.input_policy)}},[a]),X=({label:e,field:s})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(aE.TableHeaderSortDropdown,{sortState:C===s&&I,onSortChange:e=>{!1===e?(T("created_at"),F("desc")):(T(s),F(e)),A(1)}})]}),Z=a.filter(e=>{if(N){let t=N.toLowerCase();if(!(e.tool_name.toLowerCase().includes(t)||(e.team_id??"").toLowerCase().includes(t)||(e.key_alias??"").toLowerCase().includes(t)||(e.key_hash??"").toLowerCase().includes(t)||e.input_policy.toLowerCase().includes(t)||e.output_policy.toLowerCase().includes(t)))return!1}return(!D["Input Policy"]||e.input_policy===D["Input Policy"])&&(!D["Output Policy"]||e.output_policy===D["Output Policy"])&&(!D["Team Name"]||e.team_id===D["Team Name"])&&(!D["Key Name"]||e.key_alias===D["Key Name"])}),ee=[...Z].sort((e,t)=>{let s=e[C]??"",a=t[C]??"";return sa?"desc"===I?-1:1:0}),et=Math.max(1,Math.ceil(ee.length/50)),es=ee.slice((L-1)*50,50*L);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Tool Policies"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ss,{label:"New Today",value:H,valueColor:"text-green-600",subtitle:K,icon:(0,t.jsx)("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})})}),(0,t.jsx)(ss,{label:"Total Tools Discovered",value:W}),(0,t.jsx)(ss,{label:"Blocked Tools",value:Q,valueColor:Q>0?"text-red-600":void 0}),(0,t.jsx)(ss,{label:"Active Teams",value:Y>0?Y:"—"})]}),J.length>0&&(0,t.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-6",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-amber-900 mb-1",children:"Needs Review"}),(0,t.jsxs)("p",{className:"text-sm text-amber-800 mb-3",children:[J.length," new tool",1!==J.length?"s":""," discovered that require policy decisions."]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:J.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-white border border-amber-200 rounded-md text-sm",children:[(0,t.jsx)("span",{className:"font-mono text-amber-900 truncate max-w-[200px]",title:e.tool_name,children:e.tool_name}),(0,t.jsx)("button",{type:"button",onClick:()=>(e=>{let t=ee.findIndex(t=>t.tool_id===e);if(t>=0){let s=Math.floor(t/50)+1;s!==L&&A(s),requestAnimationFrame(()=>{setTimeout(()=>{document.getElementById(`tool-row-${e}`)?.scrollIntoView({behavior:"smooth",block:"center"})},100)})}})(e.tool_id),className:"text-amber-700 hover:text-amber-900 font-medium text-xs whitespace-nowrap",children:"Review"})]},e.tool_id))})]}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("div",{className:"relative w-64",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Tool Name",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:N,onChange:e=>{S(e.target.value),A(1)}}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(_.Switch,{checked:M,onChange:P})]}),(0,t.jsxs)("button",{onClick:R,disabled:O,className:"flex items-center gap-1.5 px-3 py-2 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-60",children:[(0,t.jsx)("svg",{className:`w-4 h-4 ${O?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),O?"Fetching":"Fetch"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm text-gray-600 whitespace-nowrap",children:[(0,t.jsxs)("span",{children:["Showing ",0===Z.length?0:(L-1)*50+1," -"," ",Math.min(50*L,Z.length)," of ",Z.length," results"]}),(0,t.jsxs)("span",{children:["Page ",L," of ",et]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(lT.default,{options:V,onApplyFilters:e=>{z(e),A(1)},onResetFilters:()=>{z({}),A(1)},buttonLabel:"Filters"})})]}),M&&(0,t.jsxs)("div",{className:"bg-green-50 border-b border-green-100 px-6 py-2 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"}),(0,t.jsx)("button",{onClick:()=>P(!1),className:"text-xs text-green-600 underline",children:"Stop"})]}),g&&(0,t.jsx)("div",{className:"mx-6 mt-4 p-3 bg-red-50 border border-red-200 rounded text-sm text-red-700",children:g}),(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 w-full",children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Discovered",field:"created_at"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Tool Name",field:"tool_name"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Input Policy",field:"input_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Output Policy",field:"output_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"# Calls",field:"call_count"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Team Name",field:"team_id"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"Key Hash"}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Key Name",field:"key_alias"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"User Agent"})]})}),(0,t.jsx)(c.TableBody,{children:r?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"Loading tools…"})}):0===es.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"No tools discovered yet. Make a chat completion that returns tool_calls to start auto-discovery."})}):es.map(e=>(0,t.jsxs)(x.TableRow,{id:`tool-row-${e.tool_id}`,className:"h-8 hover:bg-gray-50",children:[(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(lC.TimeCell,{utcTime:e.created_at??""})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden",children:(0,t.jsx)("button",{type:"button",onClick:()=>s?.(e.tool_name),className:"text-left w-full font-mono text-xs max-w-[20ch] truncate block font-medium text-blue-600 hover:text-blue-800 hover:underline focus:outline-none focus:ring-0",children:(0,t.jsx)(f.Tooltip,{title:s?"Click to view details and block for team/key":e.tool_name,children:(0,t.jsx)("span",{children:e.tool_name})})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lk,{value:e.input_policy,toolName:e.tool_name,saving:j===e.tool_name,onChange:B,policyType:"input"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lk,{value:e.output_policy,toolName:e.tool_name,saving:v===e.tool_name,onChange:$,policyType:"output"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)("div",{className:"flex items-center justify-end h-8 tabular-nums text-sm font-mono text-gray-700",children:(e.call_count??0).toLocaleString()})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.team_id??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.team_id??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_hash??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block text-blue-600",children:e.key_hash??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_alias??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.key_alias??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.user_agent??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[20ch] truncate block text-xs text-gray-500",children:e.user_agent??"-"})})})]},e.tool_id))})]}),et>1&&(0,t.jsxs)("div",{className:"border-t px-6 py-3 flex items-center justify-between text-sm text-gray-600",children:[(0,t.jsxs)("span",{children:["Showing ",(L-1)*50+1," - ",Math.min(50*L,ee.length)," of"," ",ee.length]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]})]})};function lM({accessToken:e,userRole:s}){let[a,l]=(0,i.useState)({type:"overview"});return(0,t.jsx)("div",{className:"p-6 w-full min-w-0 flex-1",children:"detail"===a.type?(0,t.jsx)(lS,{toolName:a.toolName,onBack:()=>{l({type:"overview"})},accessToken:e}):(0,t.jsx)(lA,{accessToken:e,userRole:s,onSelectTool:e=>{l({type:"detail",toolName:e})}})})}var lP=e.i(608856),lD=e.i(751904),lz=e.i(123521);let{Text:lE}=sn.Typography,lO=({open:e,mode:s,initialRow:a,onClose:l,onSave:r})=>{let[n]=k.Form.useForm(),[o,d]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&("edit"===s&&a?n.setFieldsValue({key:a.key,value:a.value,metadata:null!=a.metadata?JSON.stringify(a.metadata,null,2):""}):n.resetFields())},[e,s,a,n]);let c=async()=>{let e=await n.validateFields();d(!0);let t=await r(e.key.trim(),e.value??"",e.metadata??"","create"===s);d(!1),t&&(n.resetFields(),l())};return(0,t.jsx)(y.Modal,{open:e,title:"create"===s?"Create memory":`Edit ${a?.key??""}`,onCancel:()=>{n.resetFields(),l()},onOk:c,okText:"create"===s?"Create":"Save",confirmLoading:o,width:640,destroyOnClose:!0,children:(0,t.jsxs)(k.Form,{form:n,layout:"vertical",children:[(0,t.jsx)(k.Form.Item,{label:"Key",name:"key",rules:[{required:!0,message:"Key is required"}],tooltip:"Globally unique — two memories cannot share a key. Namespace your own keys if you need per-user isolation (e.g. user:123:notes).",children:(0,t.jsx)(S.Input,{placeholder:"e.g. user_role",disabled:"edit"===s})}),(0,t.jsx)(k.Form.Item,{label:"Value",name:"value",rules:[{required:!0,message:"Value is required"}],tooltip:"Markdown/text injected into LLM context. Plain strings are fine.",children:(0,t.jsx)(S.Input.TextArea,{rows:8,placeholder:"What the agent should remember…"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata ",(0,t.jsx)(lE,{type:"secondary",children:"(optional JSON)"})]}),name:"metadata",tooltip:"Optional structured metadata — must be valid JSON if provided.",children:(0,t.jsx)(S.Input.TextArea,{rows:4,placeholder:'{"tags": ["example"]}',style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"}})})]})})},{Text:lR,Paragraph:lB,Title:l$}=sn.Typography;function lq(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}let lU=({accessToken:e})=>{let[s,a]=(0,i.useState)(""),[l,r]=(0,i.useState)(""),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(null),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(1);i.default.useEffect(()=>{g(1)},[l]);let y=(0,aL.useQueryClient)(),j="memoryList",{data:b,isLoading:_,isFetching:v}=(0,t1.useQuery)({queryKey:[j,l,h],queryFn:()=>{if(!e)throw Error("Access token required");return(0,w.fetchMemoryList)(e,{keyPrefix:l||void 0,page:h,pageSize:50})},enabled:!!e}),k=(0,i.useMemo)(()=>b?.memories??[],[b]),N=b?.total??0,C=()=>y.invalidateQueries({queryKey:[j]}),T=(0,aF.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");return(0,w.createMemory)(e,t)},onSuccess:e=>{sA.message.success(`Created ${e.key}`),C()},onError:e=>{sA.message.error(`Save failed: ${e.message}`)}}),I=(0,aF.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");let{key:s,...a}=t;return(0,w.updateMemory)(e,s,a)},onSuccess:e=>{sA.message.success(`Updated ${e.key}`),C()},onError:e=>{sA.message.error(`Save failed: ${e.message}`)}}),F=(0,aF.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");return(0,w.deleteMemory)(e,t).then(()=>t)},onSuccess:e=>{sA.message.success(`Deleted ${e}`),C()},onError:e=>{sA.message.error(`Delete failed: ${e.message}`)}}),L=async()=>{if(m)try{await F.mutateAsync(m.key),u(null)}catch{}},A=async(t,s,a,l)=>{let r;if(!e)return!1;if(a.trim())try{r=JSON.parse(a)}catch{return sA.message.error("Metadata must be valid JSON (or leave empty)."),!1}else r=l?void 0:null;try{return l?await T.mutateAsync({key:t,value:s,metadata:r}):await I.mutateAsync({key:t,value:s,metadata:r}),!0}catch{return!1}},M=(e,s)=>{if(!e)return(0,t.jsx)(lR,{type:"secondary",children:"-"});let a=e.length>10?`${e.slice(0,7)}...`:e,l="font-mono text-blue-600 bg-blue-50 text-xs font-medium px-2 py-0.5 rounded-md border border-blue-200 inline-block max-w-[15ch] truncate whitespace-nowrap";return(0,t.jsx)(f.Tooltip,{title:e,children:s?(0,t.jsx)("button",{onClick:s,className:`${l} hover:bg-blue-100 cursor-pointer transition-colors text-left`,children:a}):(0,t.jsx)("span",{className:l,children:a})})},P=[{title:"ID",dataIndex:"memory_id",key:"memory_id",width:140,render:(e,t)=>M(t.memory_id,()=>o(t))},{title:"Name",dataIndex:"key",key:"key",width:200,render:e=>(0,t.jsx)(lR,{code:!0,children:e})},{title:"Preview",dataIndex:"value",key:"value",render:e=>(0,t.jsx)(lR,{type:"secondary",style:{whiteSpace:"pre-wrap"},children:function(e,t=120){if(!e)return"";let s=e.trim();return s.length<=t?s:`${s.slice(0,t)}…`}(e)})},{title:"User ID",dataIndex:"user_id",key:"user_id",width:160,render:e=>M(e)},{title:"Team ID",dataIndex:"team_id",key:"team_id",width:160,render:e=>M(e)},{title:"Updated",dataIndex:"updated_at",key:"updated_at",width:180,render:e=>(0,t.jsx)(lR,{type:"secondary",children:lq(e)})},{title:"",key:"actions",width:140,render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(V.Button,{size:"small",type:"text",icon:(0,t.jsx)(lz.EyeOutlined,{}),onClick:()=>o(s),"aria-label":"View"}),(0,t.jsx)(V.Button,{size:"small",type:"text",icon:(0,t.jsx)(lD.EditOutlined,{}),onClick:()=>c(s),"aria-label":"Edit"}),(0,t.jsx)(V.Button,{size:"small",type:"text",danger:!0,icon:(0,t.jsx)(tt.DeleteOutlined,{}),onClick:()=>{u(s)},"aria-label":"Delete"})]})}];return(0,t.jsxs)("div",{className:"w-full",style:{padding:24},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l$,{level:3,style:{marginBottom:4},children:"Memory"}),(0,t.jsxs)(lB,{type:"secondary",style:{marginBottom:0},children:["Inspect what your agents have stored under ",(0,t.jsx)(lR,{code:!0,children:"/v1/memory"}),". Scoped to memories visible to your user / team (admins see all)."]})]}),(0,t.jsxs)(ts.Card,{children:[(0,t.jsxs)(U.Space,{style:{width:"100%",justifyContent:"space-between",marginBottom:16},wrap:!0,children:[(0,t.jsxs)(U.Space,{children:[(0,t.jsx)(S.Input,{allowClear:!0,placeholder:'Filter by key prefix, e.g. "user:"',prefix:(0,t.jsx)(aa.SearchOutlined,{}),value:s,onChange:e=>a(e.target.value),onPressEnter:()=>r(s.trim()),onClear:()=>{a(""),r("")},style:{width:280}}),(0,t.jsx)(V.Button,{type:"primary",ghost:!0,onClick:()=>r(s.trim()),children:"Search"}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>C(),loading:v&&!_,children:"Refresh"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>x(!0),children:"New memory"})]}),(0,t.jsx)(te.Table,{rowKey:"memory_id",loading:_,dataSource:k,columns:P,pagination:{current:h,pageSize:50,total:N,showSizeChanger:!1,showTotal:(e,t)=>`${t[0]}–${t[1]} of ${e}`,onChange:e=>g(e)},locale:{emptyText:(0,t.jsx)(aR.Empty,{description:l?`No memories with keys starting with "${l}"`:"No memories stored yet"})}})]})]}),(0,t.jsx)(lP.Drawer,{open:!!n,onClose:()=>o(null),title:n?(0,t.jsx)(U.Space,{children:(0,t.jsx)(lR,{code:!0,children:n.key})}):"Memory",width:720,destroyOnClose:!0,children:n&&(0,t.jsxs)(U.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(U.Space,{size:"large",wrap:!0,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,style:{display:"block"},children:"Memory ID"}),(0,t.jsx)(lR,{code:!0,style:{fontSize:12},children:n.memory_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,style:{display:"block"},children:"User ID"}),(0,t.jsx)(lR,{type:n.user_id?void 0:"secondary",children:n.user_id??"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,style:{display:"block"},children:"Team ID"}),(0,t.jsx)(lR,{type:n.team_id?void 0:"secondary",children:n.team_id??"-"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,children:"Value"}),(0,t.jsx)(lB,{style:{background:"#fafafa",padding:12,borderRadius:6,whiteSpace:"pre-wrap",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:13},children:n.value})]}),void 0!==n.metadata&&null!==n.metadata&&(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,children:"Metadata"}),(0,t.jsx)(lB,{style:{background:"#fafafa",padding:12,borderRadius:6,whiteSpace:"pre-wrap",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:12},children:JSON.stringify(n.metadata,null,2)})]}),(0,t.jsxs)(U.Space,{split:(0,t.jsx)(lR,{type:"secondary",children:"·"}),wrap:!0,size:"small",style:{color:"rgba(0,0,0,0.45)"},children:[(0,t.jsxs)(lR,{type:"secondary",children:["Created ",lq(n.created_at),n.created_by?` by ${n.created_by}`:""]}),(0,t.jsxs)(lR,{type:"secondary",children:["Updated ",lq(n.updated_at),n.updated_by?` by ${n.updated_by}`:""]})]})]})}),(0,t.jsx)(lO,{open:p||!!d,mode:d?"edit":"create",initialRow:d??void 0,onClose:()=>{x(!1),c(null)},onSave:A}),(0,t.jsx)(sK.default,{isOpen:!!m,title:"Delete memory",message:"This action cannot be undone.",resourceInformationTitle:"Memory",resourceInformation:m?[{label:"Key",value:m.key,code:!0},{label:"Memory ID",value:m.memory_id,code:!0},{label:"User ID",value:m.user_id??"-",code:!0},{label:"Team ID",value:m.team_id??"-",code:!0}]:[],onCancel:()=>{F.isPending||u(null)},onOk:L,confirmLoading:F.isPending,requiredConfirmation:m?.key})]})},{Text:lV}=sn.Typography,lH={pending:"#a1a1aa",running:"#3b82f6",paused:"#f59e0b",completed:"#22c55e",failed:"#ef4444"},lG={"step.started":{bar:"#f0fdf4",border:"#86efac",text:"#16a34a"},"step.failed":{bar:"#fef2f2",border:"#fca5a5",text:"#dc2626"},"hook.waiting":{bar:"#fffbeb",border:"#fcd34d",text:"#d97706"},"hook.received":{bar:"#eff6ff",border:"#93c5fd",text:"#2563eb"}};function lK(e){let t=Date.now()-new Date(e).getTime();if(isNaN(t))return e;let s=Math.floor(t/1e3);if(s<60)return`${s}s ago`;let a=Math.floor(s/60);if(a<60)return`${a}m ago`;let l=Math.floor(a/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function lW(e){return e<0?"":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function lQ(e){let t=e.metadata?.title;return t?String(t):e.workflow_type??e.run_id.slice(0,8)}function lY(e){return e.slice(0,8)}let lJ=({status:e,size:s=8})=>(0,t.jsx)("span",{style:{display:"inline-block",width:s,height:s,borderRadius:"50%",background:lH[e]??"#a1a1aa",flexShrink:0}}),lX=({value:e})=>{let[s,a]=(0,i.useState)(!1);return e.length<=120?(0,t.jsx)("span",{style:{color:"#27272a",wordBreak:"break-all"},children:e}):(0,t.jsxs)("span",{style:{color:"#27272a",wordBreak:"break-all"},children:[s?e:e.slice(0,120)+"…",(0,t.jsx)("button",{onClick:()=>a(e=>!e),style:{background:"none",border:"none",padding:"0 4px",cursor:"pointer",color:"#2563eb",fontSize:11,flexShrink:0},children:s?"less":"more"})]})},lZ=({run:e})=>{let s=e.metadata??{},a=[{key:"state",label:"state"},{key:"worktree_path",label:"worktree"},{key:"grill_session_id",label:"grill session"},{key:"session_id",label:"session"}],l=new Set(["title",...a.map(e=>e.key)]),r=Object.entries(s).filter(([e,t])=>!l.has(e)&&null!=t&&""!==t);return(0,t.jsxs)("div",{style:{borderRadius:8,border:"1px solid #e4e4e7",marginBottom:16,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{padding:"14px 20px",borderBottom:"1px solid #f4f4f5",display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(lJ,{status:e.status,size:10}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#18181b",flex:1},children:lQ(e)}),(0,t.jsx)("span",{style:{fontFamily:"monospace",fontSize:11,color:"#a1a1aa",background:"#f4f4f5",padding:"2px 8px",borderRadius:4},children:lY(e.run_id)}),(0,t.jsx)("span",{style:{fontSize:11,color:"#a1a1aa",background:"#f4f4f5",padding:"2px 8px",borderRadius:4},children:e.workflow_type})]}),(0,t.jsxs)("div",{style:{padding:"12px 20px",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:"8px 24px",fontFamily:"monospace",fontSize:12},children:[(0,t.jsx)(l0,{label:"status",children:(0,t.jsx)("span",{style:{textTransform:"capitalize",color:"#27272a"},children:e.status})}),(0,t.jsx)(l0,{label:"created",children:(0,t.jsx)("span",{style:{color:"#27272a"},children:lK(e.created_at)})}),s.pr_url&&(0,t.jsx)(l0,{label:"pr",children:(0,t.jsx)("a",{href:String(s.pr_url),target:"_blank",rel:"noopener noreferrer",style:{color:"#2563eb",textDecoration:"none",wordBreak:"break-all"},children:String(s.pr_url)})}),a.map(({key:e,label:a})=>{let l=s[e];if(null==l||""===l)return null;let r="object"==typeof l?JSON.stringify(l):String(l);return(0,t.jsx)(l0,{label:a,children:(0,t.jsx)(lX,{value:r})},e)}),r.map(([e,s])=>{let a="object"==typeof s?JSON.stringify(s):String(s);return(0,t.jsx)(l0,{label:e,children:(0,t.jsx)(lX,{value:a})},e)})]})]})},l0=({label:e,children:s})=>(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:1},children:[(0,t.jsx)("span",{style:{fontSize:10,color:"#a1a1aa",textTransform:"uppercase",letterSpacing:"0.06em"},children:e}),(0,t.jsx)("span",{style:{fontSize:12},children:s})]}),l1=({run:e,events:s})=>{if(0===s.length)return(0,t.jsx)("div",{style:{padding:"16px 0",color:"#a1a1aa",fontSize:12,fontFamily:"monospace"},children:"No events recorded"});let a=new Date(e.created_at).getTime(),l=Math.max(...s.map(e=>new Date(e.created_at).getTime())),r=Math.max(l-a,1),n=lW(l-a);return(0,t.jsxs)("div",{style:{fontFamily:"monospace",fontSize:12},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",gap:"0 12px",marginBottom:2},children:[(0,t.jsx)("div",{}),(0,t.jsx)("div",{style:{position:"relative",height:16},children:[0,100].map(e=>(0,t.jsx)("span",{style:{position:"absolute",left:`${e}%`,transform:100===e?"translateX(-100%)":void 0,fontSize:10,color:"#a1a1aa"},children:0===e?"0":n},e))})]}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",gap:"0 12px",marginBottom:4},children:[(0,t.jsx)("div",{style:{color:"#3f3f46",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingTop:2},children:lQ(e)}),(0,t.jsx)("div",{style:{height:24,background:"#f4f4f5",border:"1px solid #d4d4d8",borderRadius:4,display:"flex",alignItems:"center",paddingLeft:8},children:(0,t.jsx)("span",{style:{color:"#71717a",fontSize:11},children:n})})]}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",gap:"0 12px",rowGap:3},children:s.map(e=>{let n=new Date(e.created_at).getTime(),o=(n-a)/r*100,d=s.findIndex(t=>t.sequence_number>e.sequence_number),c=d>=0?new Date(s[d].created_at).getTime():l+Math.max(.12*r,500),m=Math.max(8,(c-n)/r*100),u=lG[e.event_type]??{bar:"#f4f4f5",border:"#d4d4d8",text:"#52525b"},p=lW(c-n);return(0,t.jsxs)(i.default.Fragment,{children:[(0,t.jsx)("div",{style:{color:u.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingTop:2,paddingLeft:12},children:e.step_name||e.event_type}),(0,t.jsx)("div",{style:{position:"relative",height:24},children:(0,t.jsx)(f.Tooltip,{title:(0,t.jsxs)("div",{style:{fontFamily:"monospace",fontSize:11,lineHeight:1.6},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"type: "}),(0,t.jsx)("span",{style:{color:u.text},children:e.event_type})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"step: "}),e.step_name]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"seq: "}),e.sequence_number]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"time: "}),lK(e.created_at)]}),e.data&&Object.keys(e.data).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"data: "}),JSON.stringify(e.data)]})]}),children:(0,t.jsxs)("div",{style:{position:"absolute",left:`${Math.min(o,92)}%`,width:`${Math.min(m,100-Math.min(o,92))}%`,height:"100%",background:u.bar,border:`1px solid ${u.border}`,borderRadius:4,display:"flex",alignItems:"center",paddingLeft:8,cursor:"default",overflow:"hidden",gap:6},children:[(0,t.jsx)("span",{style:{color:u.text,whiteSpace:"nowrap",fontSize:11},children:e.event_type}),p&&(0,t.jsx)("span",{style:{color:"#a1a1aa",whiteSpace:"nowrap",fontSize:11},children:p})]})})})]},e.event_id)})})]})},l2=({msg:e})=>{let s={user:"#2563eb",assistant:"#16a34a",system:"#7c3aed",tool_result:"#d97706"}[e.role]??"#52525b";return(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"80px 1fr",gap:"0 16px",padding:"10px 0",borderBottom:"1px solid #f4f4f5",fontFamily:"monospace",fontSize:12,alignItems:"start"},children:[(0,t.jsxs)("span",{style:{color:s,paddingTop:1},children:["[",e.role,"]"]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#27272a",lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word",display:"block"},children:e.content}),(0,t.jsx)("span",{style:{color:"#a1a1aa",fontSize:11,marginTop:2,display:"block"},children:lK(e.created_at)})]})]})},l4=({accessToken:e})=>{let[s,a]=(0,i.useState)([]),[l,r]=(0,i.useState)(!1),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)([]),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),y=(0,i.useCallback)(async()=>{if(e){r(!0);try{let t=await fetch(`${w.proxyBaseUrl??""}/v1/workflows/runs?limit=100`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`HTTP ${t.status}`);let s=await t.json();a(s.runs??[])}catch(e){console.error("workflow runs fetch failed:",e)}finally{r(!1)}}},[e]),j=(0,i.useCallback)(async t=>{if(e){o(t),g(!0),x(!0),c([]),u([]);try{let s=w.proxyBaseUrl??"",[a,l]=await Promise.all([fetch(`${s}/v1/workflows/runs/${t.run_id}/events`,{headers:{Authorization:`Bearer ${e}`}}),fetch(`${s}/v1/workflows/runs/${t.run_id}/messages`,{headers:{Authorization:`Bearer ${e}`}})]),r=a.ok?await a.json():{events:[]},i=l.ok?await l.json():{messages:[]};c([...r.events??[]].sort((e,t)=>e.sequence_number-t.sequence_number)),u([...i.messages??[]].sort((e,t)=>e.sequence_number-t.sequence_number))}catch(e){console.error("workflow run detail fetch failed:",e)}finally{x(!1)}}},[e]);(0,i.useEffect)(()=>{y()},[y]);let f=[{title:"Run",dataIndex:"run_id",key:"run",render:(e,s)=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(lJ,{status:s.status,size:7}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:13,color:"#18181b",fontWeight:500,lineHeight:1.4},children:lQ(s)}),(0,t.jsx)("div",{style:{fontFamily:"monospace",fontSize:11,color:"#a1a1aa"},children:lY(s.run_id)})]})]})},{title:"Type",dataIndex:"workflow_type",key:"workflow_type",render:e=>(0,t.jsx)("span",{style:{fontFamily:"monospace",fontSize:12,color:"#71717a"},children:e})},{title:"Status",dataIndex:"status",key:"status",render:(e,s)=>{let a=s.metadata?.state;return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,t.jsx)(lJ,{status:e,size:7}),(0,t.jsx)("span",{style:{fontSize:12,color:"#52525b",textTransform:"capitalize"},children:a??e})]})}},{title:"Created",dataIndex:"created_at",key:"created_at",render:e=>(0,t.jsx)("span",{style:{fontSize:12,color:"#a1a1aa"},children:lK(e)})}];return(0,t.jsxs)("div",{style:{padding:"24px 32px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',minHeight:"calc(100vh - 64px)",background:"#fff"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:18,fontWeight:600,color:"#18181b"},children:"Workflow Runs"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#71717a",marginTop:2},children:"Durable state tracking for agents and automated workflows"})]}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:y,loading:l,style:{color:"#71717a",borderColor:"#e4e4e7"},children:"Refresh"})]}),(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full",children:(0,t.jsx)(te.Table,{dataSource:s,columns:f,rowKey:"run_id",loading:l,size:"small",pagination:{pageSize:50,hideOnSinglePage:!0,size:"small"},onRow:e=>({onClick:()=>j(e),style:{cursor:"pointer"}}),locale:{emptyText:(0,t.jsx)(aR.Empty,{description:(0,t.jsx)("span",{style:{color:"#a1a1aa",fontSize:13},children:"No workflow runs yet"}),image:aR.Empty.PRESENTED_IMAGE_SIMPLE})},className:"[&_.ant-table-cell]:py-0.5 [&_.ant-table-thead_.ant-table-cell]:py-1",style:{border:"none"}})}),(0,t.jsx)(lP.Drawer,{open:h,onClose:()=>g(!1),width:680,title:null,closable:!1,bodyStyle:{padding:0},styles:{body:{padding:0}},children:n?p?(0,t.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:80},children:(0,t.jsx)(eF.Spin,{})}):(0,t.jsxs)("div",{style:{padding:"24px 28px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[(0,t.jsx)("button",{onClick:()=>g(!1),style:{background:"none",border:"none",cursor:"pointer",padding:"4px 0",fontSize:12,color:"#a1a1aa",display:"flex",alignItems:"center",gap:4},children:"← close"}),(0,t.jsx)(V.Button,{size:"small",icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>j(n),loading:p,style:{color:"#71717a",borderColor:"#e4e4e7"},children:"Refresh"})]}),(0,t.jsx)(lZ,{run:n}),(0,t.jsx)(q.Collapse,{defaultActiveKey:["timeline"],ghost:!1,style:{border:"1px solid #e4e4e7",borderRadius:8,overflow:"hidden"},items:[{key:"timeline",label:(0,t.jsxs)("span",{style:{fontSize:12,fontWeight:500,color:"#3f3f46"},children:["Timeline",(0,t.jsxs)("span",{style:{marginLeft:6,fontSize:11,color:"#a1a1aa",fontWeight:400},children:[d.length," ",1===d.length?"event":"events"]})]}),children:(0,t.jsx)("div",{style:{padding:"4px 4px 12px"},children:(0,t.jsx)(l1,{run:n,events:d})})},{key:"messages",label:(0,t.jsxs)("span",{style:{fontSize:12,fontWeight:500,color:"#3f3f46"},children:["Messages",(0,t.jsx)("span",{style:{marginLeft:6,fontSize:11,color:"#a1a1aa",fontWeight:400},children:m.length})]}),children:0===m.length?(0,t.jsx)("div",{style:{padding:"12px 4px",color:"#a1a1aa",fontSize:12,fontFamily:"monospace"},children:"No messages"}):(0,t.jsx)("div",{style:{paddingBottom:4},children:m.map(e=>(0,t.jsx)(l2,{msg:e},e.message_id))})}]})]}):null})]})};var l5=e.i(936190),l6=e.i(910119),l3=e.i(275144),l8=e.i(268004),l7=e.i(161281),l9=e.i(321836),re=e.i(947293),rt=e.i(618566),rs=e.i(592143);function ra(e,t="/"){document.cookie=`${e}=; Max-Age=0; Path=${t}`,"token"===e&&(0,l8.clearTokenCookies)()}let rl={api_ref:"api-reference","api-reference":"api-reference"};function rr(){let[e,n]=(0,i.useState)(""),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)([]),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)([]),[v,k]=(0,i.useState)({PROXY_BASE_URL:"",PROXY_LOGOUT_URL:""}),[N,S]=(0,i.useState)(!0),C=(0,rt.useRouter)(),T=(0,rt.useSearchParams)(),[I,F]=(0,i.useState)({data:[]}),[L,A]=(0,i.useState)(null),[M,P]=(0,i.useState)(!1),[D,z]=(0,i.useState)(!0),[E,O]=(0,i.useState)(null),[R,B]=(0,i.useState)(!0),[$,q]=(0,i.useState)(!1),[U,V]=(0,i.useState)(!1),[H,G]=(0,i.useState)(!1),[K,W]=(0,i.useState)(!1),[Q,Y]=(0,i.useState)(!1),J=T.get("invitation_id"),X="true"===T.get("create"),Z=(0,i.useMemo)(()=>{if(!X)return;let e=T.get("owned_by"),t=T.get("team_id"),s=T.get("key_alias"),a=T.get("models"),l=T.get("key_type");if(!e&&!t&&!s&&!a&&!l)return;let r=e&&["you","service_account","another_user"].includes(e)?e:void 0,i=l&&["default","llm_api","management"].includes(l)?l:void 0,n=s?s.trim().slice(0,256):void 0,o=a?a.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:i}},[T,X]),[ee,et]=(0,i.useState)(()=>T.get("page")||"api-keys"),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),ei=(0,i.useRef)(!1),en=e=>{y(t=>t?[...t,e]:[e]),P(()=>!M)},eo=!1===D&&null===L&&null===J;(0,i.useEffect)(()=>{let e=!1;return(async()=>{try{await (0,w.getUiConfig)()}catch{}if(e)return;let t=(0,l8.getCookie)("token"),s=t&&!(0,l7.isJwtExpired)(t)?t:null;t&&!s&&ra("token","/"),e||(A(s),z(!1))})(),()=>{e=!0}},[]),(0,i.useEffect)(()=>{if(eo){(0,l9.storeReturnUrl)();let e=(w.proxyBaseUrl||"")+"/ui/login",t=(0,l9.buildLoginUrlWithReturn)(e);window.location.replace(t)}},[eo]);let ed=ee in rl;return((0,i.useEffect)(()=>{if(!D&&ed){let e=(w.proxyBaseUrl||"")+"/ui";C.replace(`${e}/${rl[ee]}`)}},[D,ed,ee,C]),(0,i.useEffect)(()=>{if(D||!L||ei.current)return;ei.current=!0;let e=(0,l9.consumeReturnUrl)();if(e&&(0,l9.isValidReturnUrl)(e)){let t=new URL(e,window.location.origin);if(t.origin!==window.location.origin)return;let s=window.location.href;(0,l9.normalizeUrlForCompare)(e)!==(0,l9.normalizeUrlForCompare)(s)&&window.location.replace(t.href)}},[D,L]),(0,i.useEffect)(()=>{L||(ei.current=!1)},[L]),(0,i.useEffect)(()=>{if(!L)return;if((0,l7.isJwtExpired)(L)){ra("token","/"),A(null);return}let e=null;try{e=(0,re.jwtDecode)(L)}catch{ra("token","/"),A(null);return}if(e){if(ea(e.key),m(e.disabled_non_admin_personal_key_creation),e.user_role){let t=(0,ew.formatUserRole)(e.user_role);n(t),"Admin Viewer"==t&&et("usage")}e.user_email&&p(e.user_email),e.login_method&&S("username_password"==e.login_method),e.premium_user&&d(e.premium_user),e.auth_header_name&&(0,w.setGlobalLitellmHeaderName)(e.auth_header_name),e.user_id&&O(e.user_id)}},[L]),(0,i.useEffect)(()=>{es&&E&&e&&(0,sX.fetchUserModels)(E,e,es,_),es&&E&&e&&(0,eV.teamListCall)(es,1,100,{userID:"Admin"!==e&&"Admin Viewer"!==e?E:null}).then(e=>h(e.teams??[])).catch(console.error),es&&(0,sZ.fetchOrganizations)(es,f)},[es,E,e]),(0,i.useEffect)(()=>{es&&L&&(async()=>{try{let e=await (0,w.getInProductNudgesCall)(es),t=e?.is_claude_code_enabled||!1;V(t),t&&(G(!0),B(!1))}catch(e){console.error("Failed to fetch in-product nudges:",e)}})()},[es,L]),(0,i.useEffect)(()=>{if(R&&!$){let e=setTimeout(()=>{B(!1)},15e3);return()=>clearTimeout(e)}},[R,$]),(0,i.useEffect)(()=>{if(H&&!K){let e=setTimeout(()=>{G(!1)},15e3);return()=>clearTimeout(e)}},[H,K]),D||eo||ed)?(0,t.jsx)(eH.default,{}):(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(rs.ConfigProvider,{theme:{algorithm:Q?sL.theme.darkAlgorithm:sL.theme.defaultAlgorithm},children:(0,t.jsx)(l3.ThemeProvider,{accessToken:es,children:J?(0,t.jsx)(aT.default,{userID:E,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:M}):(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,t.jsx)(sf.default,{userID:E,userRole:e,premiumUser:o,userEmail:u,setProxySettings:k,proxySettings:v,accessToken:es,isPublicPage:!1,sidebarCollapsed:el,onToggleSidebar:()=>{er(!el)},isDarkMode:Q,toggleDarkMode:()=>{Y(!Q)}}),(0,t.jsxs)("div",{className:"flex flex-1",children:[(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(s.default,{setPage:e=>{let t=new URLSearchParams(T);t.set("page",e),window.history.pushState(null,"",`?${t.toString()}`),et(e)},defaultSelectedKey:ee,sidebarCollapsed:el})}),"api-keys"==ee?(0,t.jsx)(aT.default,{userID:E,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:M,autoOpenCreate:X,prefillData:Z}):"models"==ee?(0,t.jsx)(a.default,{token:L,keys:g,modelData:I,setModelData:F,premiumUser:o,teams:x}):"llm-playground"==ee?(0,t.jsx)(l.default,{}):"users"==ee?(0,t.jsx)(l6.default,{userID:E,userRole:e,token:L,keys:g,teams:x,accessToken:es,setKeys:y}):"teams"==ee?(0,t.jsx)(sJ,{teams:x,setTeams:h,accessToken:es,userID:E,userRole:e,organizations:j,premiumUser:o,searchParams:T}):"organizations"==ee?(0,t.jsx)(sZ.default,{organizations:j,setOrganizations:f,userModels:b,accessToken:es,userRole:e,premiumUser:o}):"admin-panel"==ee?(0,t.jsx)(r.default,{proxySettings:v}):"logging-and-alerts"==ee?(0,t.jsx)(ao.default,{userID:E,userRole:e,accessToken:es,premiumUser:o}):"budgets"==ee?(0,t.jsx)(e$.default,{accessToken:es}):"guardrails"==ee?(0,t.jsx)(sh.default,{accessToken:es,userRole:e}):"policies"==ee?(0,t.jsx)(sg.default,{accessToken:es,userRole:e}):"agents"==ee?(0,t.jsx)(eB,{accessToken:es,userRole:e,teams:x}):"prompts"==ee?(0,t.jsx)(s1.default,{accessToken:es,userRole:e}):"transform-request"==ee?(0,t.jsx)(aN.default,{accessToken:es}):"router-settings"==ee?(0,t.jsx)(tQ.default,{userID:E,userRole:e,accessToken:es,modelData:I}):"ui-theme"==ee?(0,t.jsx)(aS.default,{userID:E,userRole:e,accessToken:es}):"cost-tracking"==ee?(0,t.jsx)(tW,{userID:E,userRole:e,accessToken:es}):"model-hub-table"==ee?(0,ew.isAdminRole)(e)?(0,t.jsx)(sj.default,{accessToken:es,publicPage:!1,premiumUser:o,userRole:e}):(0,t.jsx)(s2.default,{accessToken:es,isEmbedded:!0}):"caching"==ee?(0,t.jsx)(eq.default,{userID:E,userRole:e,token:L,accessToken:es,premiumUser:o}):"pass-through-settings"==ee?(0,t.jsx)(s0.default,{userID:E,userRole:e,accessToken:es,modelData:I,premiumUser:o}):"logs"==ee?(0,t.jsx)(l5.default,{userID:E,userRole:e,token:L,accessToken:es,premiumUser:o}):"mcp-servers"==ee?(0,t.jsx)(sy.MCPServers,{accessToken:es,userRole:e,userID:E}):"search-tools"==ee?(0,t.jsx)(an,{accessToken:es,userRole:e,userID:E}):"tag-management"==ee?(0,t.jsx)(ak.default,{accessToken:es,userRole:e,userID:E}):"skills"==ee||"claude-code-plugins"==ee?(0,t.jsx)(eU.default,{accessToken:es,userRole:e}):"access-groups"==ee?(0,t.jsx)(a8,{}):"projects"==ee?(0,t.jsx)(ly,{}):"vector-stores"==ee?(0,t.jsx)(lj.default,{accessToken:es,userRole:e,userID:E}):"tool-policies"==ee?(0,t.jsx)(lM,{accessToken:es,userRole:e}):"workflows"==ee?(0,t.jsx)(l4,{accessToken:es}):"memory"==ee?(0,t.jsx)(lU,{accessToken:es,userID:E,userRole:e}):"guardrails-monitor"==ee?(0,t.jsx)(sx,{accessToken:es}):"new_usage"==ee?(0,t.jsx)(sb.default,{teams:x??[],organizations:j??[]}):(0,t.jsx)(aC.default,{userID:E,userRole:e,token:L,accessToken:es,keys:g,premiumUser:o})]}),(0,t.jsx)(ah,{isVisible:R,onOpen:()=>{B(!1),q(!0)},onDismiss:()=>{B(!1)}}),(0,t.jsx)(ab,{isOpen:$,onClose:()=>{q(!1),B(!0)},onComplete:()=>{q(!1)}}),(0,t.jsx)(av,{isVisible:H,onOpen:()=>{G(!1),W(!0)},onDismiss:()=>{G(!1)}}),(0,t.jsx)(aw,{isOpen:K,onClose:()=>{W(!1),G(!0)},onComplete:()=>{W(!1)}})]})})})})}function ri(){return(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(rr,{})})}e.s(["default",()=>ri],952683)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3c2d67ecf9619f2b.js b/litellm/proxy/_experimental/out/_next/static/chunks/3c2d67ecf9619f2b.js new file mode 100644 index 0000000000..35fea2a91b --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3c2d67ecf9619f2b.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,105278,e=>{"use strict";var t=e.i(843476),s=e.i(135214),r=e.i(994388),i=e.i(366283),l=e.i(304967),n=e.i(269200),a=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),p=e.i(560445),m=e.i(464571),g=e.i(808613),_=e.i(311451),h=e.i(212931),x=e.i(770914),f=e.i(653496),y=e.i(898586),j=e.i(271645),v=e.i(844444),S=e.i(700514),b=e.i(727749),I=e.i(764205),w=e.i(629569),T=e.i(599724),C=e.i(350967),k=e.i(779241),E=e.i(114600),N=e.i(237016),O=e.i(596239),F=e.i(438957),A=e.i(166406),P=e.i(270377),M=e.i(475647),B=e.i(190702);let U=({accessToken:e,userID:s,proxySettings:n})=>{let[a]=g.Form.useForm(),[o,c]=(0,j.useState)(!1),[d,u]=(0,j.useState)(null),[p,m]=(0,j.useState)("");(0,j.useEffect)(()=>{let e="";m(e=n&&n.PROXY_BASE_URL&&void 0!==n.PROXY_BASE_URL?n.PROXY_BASE_URL:window.location.origin)},[n]);let _=`${p}/scim/v2`,h=async t=>{if(!e||!s)return void b.default.fromBackend("You need to be logged in to create a SCIM token");try{c(!0);let r={key_alias:t.key_alias||"SCIM Access Token",team_id:null,models:[],allowed_routes:["/scim/*"]},i=await (0,I.keyCreateCall)(e,s,r);u(i),b.default.success("SCIM token created successfully")}catch(e){console.error("Error creating SCIM token:",e),b.default.fromBackend("Failed to create SCIM token: "+(0,B.parseErrorMessage)(e))}finally{c(!1)}};return(0,t.jsx)(C.Grid,{numItems:1,children:(0,t.jsxs)(l.Card,{children:[(0,t.jsx)("div",{className:"flex items-center mb-4",children:(0,t.jsx)(w.Title,{children:"SCIM Configuration"})}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"System for Cross-domain Identity Management (SCIM) allows you to automatically provision and manage users and groups in LiteLLM."}),(0,t.jsx)(E.Divider,{}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"1"}),(0,t.jsxs)(w.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(O.LinkOutlined,{className:"h-5 w-5 mr-2"}),"SCIM Tenant URL"]})]}),(0,t.jsx)(T.Text,{className:"text-gray-600 mb-3",children:"Use this URL in your identity provider SCIM integration settings."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:_,disabled:!0,className:"flex-grow"}),(0,t.jsx)(N.CopyToClipboard,{text:_,onCopy:()=>b.default.success("URL copied to clipboard"),children:(0,t.jsxs)(r.Button,{variant:"primary",className:"ml-2 flex items-center",children:[(0,t.jsx)(A.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"2"}),(0,t.jsxs)(w.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(F.KeyOutlined,{className:"h-5 w-5 mr-2"}),"Authentication Token"]})]}),(0,t.jsx)(i.Callout,{title:"Using SCIM",color:"blue",className:"mb-4",children:"You need a SCIM token to authenticate with the SCIM API. Create one below and use it in your SCIM provider configuration."}),d?(0,t.jsxs)(l.Card,{className:"border border-yellow-300 bg-yellow-50",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-yellow-800",children:[(0,t.jsx)(P.ExclamationCircleOutlined,{className:"h-5 w-5 mr-2"}),(0,t.jsx)(w.Title,{className:"text-lg text-yellow-800",children:"Your SCIM Token"})]}),(0,t.jsx)(T.Text,{className:"text-yellow-800 mb-4 font-medium",children:"Make sure to copy this token now. You will not be able to see it again."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:d.key,className:"flex-grow mr-2 bg-white",type:"password",disabled:!0}),(0,t.jsx)(N.CopyToClipboard,{text:d.key,onCopy:()=>b.default.success("Token copied to clipboard"),children:(0,t.jsxs)(r.Button,{variant:"primary",className:"flex items-center",children:[(0,t.jsx)(A.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]}),(0,t.jsxs)(r.Button,{className:"mt-4 flex items-center",variant:"secondary",onClick:()=>u(null),children:[(0,t.jsx)(M.PlusCircleOutlined,{className:"h-4 w-4 mr-1"}),"Create Another Token"]})]}):(0,t.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,t.jsxs)(g.Form,{form:a,onFinish:h,layout:"vertical",children:[(0,t.jsx)(g.Form.Item,{name:"key_alias",label:"Token Name",rules:[{required:!0,message:"Please enter a name for your token"}],children:(0,t.jsx)(k.TextInput,{placeholder:"SCIM Access Token"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsxs)(r.Button,{variant:"primary",type:"submit",loading:o,className:"flex items-center",children:[(0,t.jsx)(F.KeyOutlined,{className:"h-4 w-4 mr-1"}),"Create SCIM Token"]})})]})})]})]})]})})};var L=e.i(153472),R=e.i(954616),z=e.i(912598);let D=async(e,t)=>{let s=(0,I.getProxyBaseUrl)(),r=s?`${s}/config/update`:"/config/update",i=await fetch(r,{method:"POST",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:t.store_prompts_in_spend_logs,...t.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:t.maximum_spend_logs_retention_period}}})});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update spend logs settings")}return await i.json()};var G=e.i(637235),V=e.i(175712),q=e.i(981339),H=e.i(790848);let K=()=>{let[e]=g.Form.useForm(),{mutate:r,isPending:i}=(()=>{let{accessToken:e}=(0,s.default)(),t=(0,z.useQueryClient)();return(0,R.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await D(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:L.proxyConfigKeys.all})}})})(),{mutate:l,isPending:n}=(0,L.useDeleteProxyConfigField)(),{data:a,isLoading:o}=(0,L.useProxyConfig)(L.ConfigType.GENERAL_SETTINGS),c=g.Form.useWatch("store_prompts_in_spend_logs",e),d=(0,j.useMemo)(()=>{if(!a)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let e=a.find(e=>"store_prompts_in_spend_logs"===e.field_name),t=a.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:e?.field_value??!1,maximum_spend_logs_retention_period:t?.field_value??void 0}},[a]);return(0,t.jsx)(V.Card,{title:"Logging Settings",children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[(0,t.jsx)(y.Typography.Paragraph,{style:{marginBottom:0},type:"secondary",children:"Proxy-wide settings that control how request and response data are written to spend logs."}),(0,t.jsxs)(g.Form,{form:e,layout:"vertical",onFinish:e=>{let t=e.maximum_spend_logs_retention_period,s="string"==typeof t&&""!==t.trim(),i={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...s&&{maximum_spend_logs_retention_period:t}},n=()=>r(i,{onSuccess:()=>b.default.success("Spend logs settings updated successfully"),onError:e=>b.default.fromBackend("Failed to save spend logs settings: "+(0,B.parseErrorMessage)(e))});s?n():l({config_type:L.ConfigType.GENERAL_SETTINGS,field_name:L.GeneralSettingsFieldName.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD},{onError:e=>console.warn("Failed to delete retention period field (may not exist):",e),onSettled:n})},initialValues:d,children:[(0,t.jsx)(g.Form.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:a?.find(e=>"store_prompts_in_spend_logs"===e.field_name)?.field_description||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:o?(0,t.jsx)(q.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(H.Switch,{checked:c??!1,onChange:t=>e.setFieldValue("store_prompts_in_spend_logs",t)})}),(0,t.jsx)(g.Form.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:a?.find(e=>"maximum_spend_logs_retention_period"===e.field_name)?.field_description||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:o?(0,t.jsx)(q.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(_.Input,{placeholder:"e.g., 7d, 30d",prefix:(0,t.jsx)(G.ClockCircleOutlined,{})})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:i||n,disabled:o,children:i||n?"Saving...":"Save Settings"})})]},a?JSON.stringify(d):"loading")]})})};var $=e.i(266027),Q=e.i(243652);let W=(0,Q.createQueryKeys)("sso"),Y=()=>{let{accessToken:e,userId:t,userRole:r}=(0,s.default)();return(0,$.useQuery)({queryKey:W.detail("settings"),queryFn:async()=>await (0,I.getSSOSettings)(e),enabled:!!(e&&t&&r)})};var J=e.i(869216),Z=e.i(262218),X=e.i(688511),ee=e.i(98919),et=e.i(727612);let es={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},er={google:"Google SSO",microsoft:"Microsoft SSO",okta:"Okta / Auth0 SSO",generic:"Generic SSO"},ei={internal_user_viewer:"Internal Viewer",internal_user:"Internal User",proxy_admin_viewer:"Proxy Admin Viewer",proxy_admin:"Proxy Admin"};var el=e.i(536916),en=e.i(199133);let ea={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},eo=({form:e,onFormSubmit:s})=>(0,t.jsx)("div",{children:(0,t.jsxs)(g.Form,{form:e,onFinish:s,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(g.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(en.Select,{children:Object.entries(es).map(([e,s])=>(0,t.jsx)(en.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,t.jsx)("img",{src:s,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsx)("span",{children:er[e]||e.charAt(0).toUpperCase()+e.slice(1)+" SSO"})]})},e))})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s,r=e("sso_provider");return r&&(s=ea[r])?s.fields.map(e=>(0,t.jsx)(g.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(_.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(el.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_role_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsx)(g.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_role_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(en.Select,{children:[(0,t.jsx)(en.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(en.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(en.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(en.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Team Mappings",name:"use_team_mappings",valuePropName:"checked",children:(0,t.jsx)(el.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_team_mappings!==t.use_team_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_team_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsx)(g.Form.Item,{label:"Team IDs JWT Field",name:"team_ids_jwt_field",rules:[{required:!0,message:"Please enter the team IDs JWT field"}],children:(0,t.jsx)(k.TextInput,{})}):null}})]})}),ec=()=>{let{accessToken:e}=(0,s.default)();return(0,R.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await (0,I.updateSSOSettings)(e,t)}})},ed=e=>{let{proxy_admin_teams:t,admin_viewer_teams:s,internal_user_teams:r,internal_viewer_teams:i,default_role:l,group_claim:n,use_role_mappings:a,use_team_mappings:o,team_ids_jwt_field:c,...d}=e,u={...d},p=d.sso_provider;if(a&&("okta"===p||"generic"===p)){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:n,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[l]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(s),internal_user:e(r),internal_user_viewer:e(i)}}}return o&&("okta"===p||"generic"===p)&&(u.team_mappings={team_ids_jwt_field:c}),u},eu=e=>e.google_client_id?"google":e.microsoft_client_id?"microsoft":e.generic_client_id?e.generic_authorization_endpoint?.includes("okta")||e.generic_authorization_endpoint?.includes("auth0")?"okta":"generic":null,ep=({isVisible:e,onCancel:s,onSuccess:r})=>{let[i]=g.Form.useForm(),{mutateAsync:l,isPending:n}=ec(),a=async e=>{let t=ed(e);await l(t,{onSuccess:()=>{b.default.success("SSO settings added successfully"),r()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}})},o=()=>{i.resetFields(),s()};return(0,t.jsx)(h.Modal,{title:"Add SSO",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:o,disabled:n,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:n,onClick:()=>i.submit(),children:n?"Adding...":"Add SSO"})]}),onCancel:o,children:(0,t.jsx)(eo,{form:i,onFormSubmit:a})})};var em=e.i(127952);let eg=({isVisible:e,onCancel:s,onSuccess:r})=>{let{data:i}=Y(),{mutateAsync:l,isPending:n}=ec(),a=async()=>{await l({google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null,team_mappings:null},{onSuccess:()=>{b.default.success("SSO settings cleared successfully"),s(),r()},onError:e=>{b.default.fromBackend("Failed to clear SSO settings: "+(0,B.parseErrorMessage)(e))}})};return(0,t.jsx)(em.default,{isOpen:e,title:"Confirm Clear SSO Settings",alertMessage:"This action cannot be undone.",message:"Are you sure you want to clear all SSO settings? Users will no longer be able to login using SSO after this change.",resourceInformationTitle:"SSO Settings",resourceInformation:[{label:"Provider",value:i?.values&&eu(i?.values)||"Generic"}],onCancel:s,onOk:a,confirmLoading:n})},e_=({isVisible:e,onCancel:s,onSuccess:r})=>{let[i]=g.Form.useForm(),l=Y(),{mutateAsync:n,isPending:a}=ec();(0,j.useEffect)(()=>{if(e&&l.data&&l.data.values){let e=l.data;console.log("Raw SSO data received:",e),console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let s={};if(e.values.role_mappings){let t=e.values.role_mappings,r=e=>e&&0!==e.length?e.join(", "):"";s={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:r(t.roles?.proxy_admin),admin_viewer_teams:r(t.roles?.proxy_admin_viewer),internal_user_teams:r(t.roles?.internal_user),internal_viewer_teams:r(t.roles?.internal_user_viewer)}}let r={};e.values.team_mappings&&(r={use_team_mappings:!0,team_ids_jwt_field:e.values.team_mappings.team_ids_jwt_field});let n={sso_provider:t,...e.values,...s,...r};console.log("Setting form values:",n),i.resetFields(),setTimeout(()=>{i.setFieldsValue(n),console.log("Form values set, current form values:",i.getFieldsValue())},100)}},[e,l.data,i]);let o=async e=>{try{let t=ed(e);await n(t,{onSuccess:()=>{b.default.success("SSO settings updated successfully"),r()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}})}catch(e){b.default.fromBackend("Failed to process SSO settings: "+(0,B.parseErrorMessage)(e))}},c=()=>{i.resetFields(),s()};return(0,t.jsx)(h.Modal,{title:"Edit SSO Settings",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:c,disabled:a,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:a,onClick:()=>i.submit(),children:a?"Saving...":"Save"})]}),onCancel:c,children:(0,t.jsx)(eo,{form:i,onFormSubmit:o})})};var eh=e.i(286536),ex=e.i(77705);function ef({defaultHidden:e=!0,value:s}){let[r,i]=(0,j.useState)(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-gray-600 flex-1",children:s?r?"•".repeat(s.length):s:(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})}),s&&(0,t.jsx)(m.Button,{type:"text",size:"small",icon:r?(0,t.jsx)(eh.Eye,{className:"w-4 h-4"}):(0,t.jsx)(ex.EyeOff,{className:"w-4 h-4"}),onClick:()=>i(!r),className:"text-gray-400 hover:text-gray-600"})]})}var ey=e.i(312361),ej=e.i(291542),ev=e.i(761911);let{Title:eS,Text:eb}=y.Typography;function eI({roleMappings:e}){if(!e)return null;let s=[{title:"Role",dataIndex:"role",key:"role",render:e=>(0,t.jsx)(eb,{strong:!0,children:ei[e]})},{title:"Mapped Groups",dataIndex:"groups",key:"groups",render:e=>(0,t.jsx)(t.Fragment,{children:e.length>0?e.map((e,s)=>(0,t.jsx)(Z.Tag,{color:"blue",children:e},s)):(0,t.jsx)(eb,{className:"text-gray-400 italic",children:"No groups mapped"})})}];return(0,t.jsxs)(V.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ev.Users,{className:"w-6 h-6 text-gray-400 mb-2"}),(0,t.jsx)(eS,{level:3,children:"Role Mappings"})]}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eS,{level:5,children:"Group Claim"}),(0,t.jsx)("div",{children:(0,t.jsx)(eb,{code:!0,children:e.group_claim})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eS,{level:5,children:"Default Role"}),(0,t.jsx)("div",{children:(0,t.jsx)(eb,{strong:!0,children:ei[e.default_role]})})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsx)(ej.Table,{columns:s,dataSource:Object.entries(e.roles).map(([e,t])=>({role:e,groups:t})),pagination:!1,bordered:!0,size:"small",className:"w-full"})]})]})}var ew=e.i(21548);let{Title:eT,Paragraph:eC}=y.Typography;function ek({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(ew.Empty,{image:ew.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(eT,{level:4,children:"No SSO Configuration Found"}),(0,t.jsx)(eC,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Single Sign-On (SSO) to enable seamless authentication for your team members using your identity provider."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure SSO"})})})}let{Title:eE,Text:eN}=y.Typography;function eO(){return(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ee.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eE,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eN,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(q.Skeleton.Button,{active:!0,size:"default",style:{width:170,height:32}}),(0,t.jsx)(q.Skeleton.Button,{active:!0,size:"default",style:{width:190,height:32}})]})]}),(0,t.jsxs)(J.Descriptions,{bordered:!0,...{column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},children:[(0,t.jsx)(J.Descriptions.Item,{label:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:100,height:16}})})}),(0,t.jsx)(J.Descriptions.Item,{label:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:200,height:16}})}),(0,t.jsx)(J.Descriptions.Item,{label:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:250,height:16}})}),(0,t.jsx)(J.Descriptions.Item,{label:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:180,height:16}})}),(0,t.jsx)(J.Descriptions.Item,{label:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:220,height:16}})})]})]})})}let{Title:eF,Text:eA}=y.Typography;function eP(){let{data:e,refetch:s,isLoading:r}=Y(),[i,l]=(0,j.useState)(!1),[n,a]=(0,j.useState)(!1),[o,c]=(0,j.useState)(!1),d=!!e?.values.google_client_id||!!e?.values.microsoft_client_id||!!e?.values.generic_client_id,u=e?.values?eu(e.values):null,p=!!e?.values.role_mappings,g=!!e?.values.team_mappings,_=e=>(0,t.jsx)(eA,{className:"font-mono text-gray-600 text-sm",copyable:!!e,children:e||"-"}),h=e=>e||(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),f=e=>e.team_mappings?.team_ids_jwt_field?(0,t.jsx)(Z.Tag,{children:e.team_mappings.team_ids_jwt_field}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),y={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},v={google:{providerText:er.google,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ef,{value:e.google_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ef,{value:e.google_client_secret})},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)}]},microsoft:{providerText:er.microsoft,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ef,{value:e.microsoft_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ef,{value:e.microsoft_client_secret})},{label:"Tenant",render:e=>h(e.microsoft_tenant)},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)}]},okta:{providerText:er.okta,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ef,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ef,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>_(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>_(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>_(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)},g?{label:"Team IDs JWT Field",render:e=>f(e)}:null]},generic:{providerText:er.generic,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ef,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ef,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>_(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>_(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>_(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)},g?{label:"Team IDs JWT Field",render:e=>f(e)}:null]}};return(0,t.jsxs)(t.Fragment,{children:[r?(0,t.jsx)(eO,{}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ee.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eF,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eA,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(X.Edit,{className:"w-4 h-4"}),onClick:()=>c(!0),children:"Edit SSO Settings"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)(et.Trash2,{className:"w-4 h-4"}),onClick:()=>l(!0),children:"Delete SSO Settings"})]})})]}),d?(()=>{if(!e?.values||!u)return null;let{values:s}=e,r=v[u];return r?(0,t.jsxs)(J.Descriptions,{bordered:!0,...y,children:[(0,t.jsx)(J.Descriptions.Item,{label:"Provider",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[es[u]&&(0,t.jsx)("img",{src:es[u],alt:u,style:{height:24,width:24,objectFit:"contain"}}),(0,t.jsx)("span",{children:r.providerText})]})}),r.fields.map((e,r)=>e&&(0,t.jsx)(J.Descriptions.Item,{label:e.label,children:e.render(s)},r))]}):null})():(0,t.jsx)(ek,{onAdd:()=>a(!0)})]})}),p&&(0,t.jsx)(eI,{roleMappings:e?.values.role_mappings})]}),(0,t.jsx)(eg,{isVisible:i,onCancel:()=>l(!1),onSuccess:()=>s()}),(0,t.jsx)(ep,{isVisible:n,onCancel:()=>a(!1),onSuccess:()=>{a(!1),s()}}),(0,t.jsx)(e_,{isVisible:o,onCancel:()=>c(!1),onSuccess:()=>{c(!1),s()}})]})}var eM=e.i(292639);let eB=(0,Q.createQueryKeys)("uiSettings");var eU=e.i(111672);let eL={"api-keys":"Manage virtual keys for API access and authentication","llm-playground":"Interactive playground for testing LLM requests",models:"Configure and manage LLM models and endpoints",agents:"Create and manage AI agents",agentic:"Manage agentic resources: agents, workflow runs, and memory",workflows:"Track and inspect durable workflow run history","mcp-servers":"Configure Model Context Protocol servers",memory:"Inspect and manage agent memory entries stored under /v1/memory",guardrails:"Set up content moderation and safety guardrails",policies:"Define access control and usage policies","search-tools":"Configure RAG search and retrieval tools","tool-policies":"Configure tool use policies and permissions","vector-stores":"Manage vector databases for embeddings",new_usage:"View usage analytics and metrics",logs:"Access request and response logs","guardrails-monitor":"Monitor guardrail performance and view logs",users:"Manage internal user accounts and permissions",teams:"Create and manage teams for access control",organizations:"Manage organizations and their members",projects:"Manage projects within teams","access-groups":"Manage access groups for role-based permissions",budgets:"Set and monitor spending budgets","api-reference":"Browse API documentation and endpoints","model-hub-table":"Explore available AI models and providers","learning-resources":"Access tutorials and documentation",caching:"Configure response caching settings","transform-request":"Set up request transformation rules","cost-tracking":"Track and analyze API costs","ui-theme":"Customize dashboard appearance","tag-management":"Organize resources with tags",prompts:"Manage and version prompt templates",skills:"Browse and manage Claude Code skills",usage:"View legacy usage dashboard","router-settings":"Configure routing and load balancing settings","logging-and-alerts":"Set up logging and alert configurations","admin-panel":"Access admin panel and settings"};var eR=e.i(708347);let ez=e=>!e||0===e.length||e.some(e=>eR.internalUserRoles.includes(e));var eD=e.i(362024);function eG({enabledPagesInternalUsers:e,enabledPagesPropertyDescription:s,isUpdating:r,onUpdate:i}){let l=null!=e,n=(0,j.useMemo)(()=>{let e;return e=[],eU.menuGroups.forEach(t=>{t.items.forEach(s=>{if(s.page&&"tools"!==s.page&&"experimental"!==s.page&&"settings"!==s.page&&ez(s.roles)){let r="string"==typeof s.label?s.label:s.key;e.push({page:s.page,label:r,group:t.groupLabel,description:eL[s.page]||"No description available"})}if(s.children){let r="string"==typeof s.label?s.label:s.key;s.children.forEach(s=>{if(ez(s.roles)){let i="string"==typeof s.label?s.label:s.key;e.push({page:s.page,label:i,group:`${t.groupLabel} > ${r}`,description:eL[s.page]||"No description available"})}})}})}),e},[]),a=(0,j.useMemo)(()=>{let e={};return n.forEach(t=>{e[t.group]||(e[t.group]=[]),e[t.group].push(t)}),e},[n]),[o,c]=(0,j.useState)(e||[]);return(0,j.useMemo)(()=>{e?c(e):c([])},[e]),(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsxs)(x.Space,{align:"center",children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Internal User Page Visibility"}),!l&&(0,t.jsx)(Z.Tag,{color:"default",style:{marginLeft:"8px"},children:"Not set (all pages visible)"}),l&&(0,t.jsxs)(Z.Tag,{color:"blue",style:{marginLeft:"8px"},children:[o.length," page",1!==o.length?"s":""," selected"]})]}),s&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:s}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"By default, all pages are visible to internal users. Select specific pages to restrict visibility."}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",color:"#8b5cf6"},children:"Note: Only pages accessible to internal user roles are shown here. Admin-only pages are excluded as they cannot be made visible to internal users regardless of this setting."})]}),(0,t.jsx)(eD.Collapse,{items:[{key:"page-visibility",label:"Configure Page Visibility",children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(el.Checkbox.Group,{value:o,onChange:c,style:{width:"100%"},children:(0,t.jsx)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:Object.entries(a).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Typography.Text,{strong:!0,style:{fontSize:"11px",color:"#6b7280",letterSpacing:"0.05em",display:"block",marginBottom:"8px"},children:e}),(0,t.jsx)(x.Space,{direction:"vertical",size:"small",style:{marginLeft:"16px",width:"100%"},children:s.map(e=>(0,t.jsx)("div",{style:{marginBottom:"4px"},children:(0,t.jsx)(el.Checkbox,{value:e.page,children:(0,t.jsxs)(x.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(y.Typography.Text,{children:e.label}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px"},children:e.description})]})})},e.page))})]},e))})}),(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{type:"primary",onClick:()=>{i({enabled_ui_pages_internal_users:o.length>0?o:null})},loading:r,disabled:r,children:"Save Page Visibility Settings"}),l&&(0,t.jsx)(m.Button,{onClick:()=>{c([]),i({enabled_ui_pages_internal_users:null})},loading:r,disabled:r,children:"Reset to Default (All Pages)"})]})]})}]})]})}function eV(){let e,{accessToken:r}=(0,s.default)(),{data:i,isLoading:l,isError:n,error:a}=(0,eM.useUISettings)(),{mutate:o,isPending:c,error:d}=(e=(0,z.useQueryClient)(),(0,R.useMutation)({mutationFn:async e=>{if(!r)throw Error("Access token is required");return(0,I.updateUiSettings)(r,e)},onSuccess:()=>{e.invalidateQueries({queryKey:eB.all})}})),u=i?.field_schema,m=u?.properties?.disable_model_add_for_internal_users,g=u?.properties?.disable_team_admin_delete_team_user,_=u?.properties?.require_auth_for_public_ai_hub,h=u?.properties?.forward_client_headers_to_llm_api,f=u?.properties?.forward_llm_provider_auth_headers,j=u?.properties?.enable_projects_ui,v=u?.properties?.enabled_ui_pages_internal_users,S=u?.properties?.disable_agents_for_internal_users,w=u?.properties?.allow_agents_for_team_admins,T=u?.properties?.disable_vector_stores_for_internal_users,C=u?.properties?.allow_vector_stores_for_team_admins,k=u?.properties?.scope_user_search_to_org,E=u?.properties?.disable_custom_api_keys,N=i?.values??{},O=!!N.disable_model_add_for_internal_users,F=!!N.disable_team_admin_delete_team_user,A=!!N.disable_agents_for_internal_users,P=!!N.disable_vector_stores_for_internal_users;return(0,t.jsx)(V.Card,{title:"UI Settings",children:l?(0,t.jsx)(q.Skeleton,{active:!0}):n?(0,t.jsx)(p.Alert,{type:"error",message:"Could not load UI settings",description:a instanceof Error?a.message:void 0}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[u?.description&&(0,t.jsx)(y.Typography.Paragraph,{style:{marginBottom:0},children:u.description}),d&&(0,t.jsx)(p.Alert,{type:"error",message:"Could not update UI settings",description:d instanceof Error?d.message:void 0}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:O,disabled:c,loading:c,onChange:e=>{o({disable_model_add_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":m?.description??"Disable model add for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable model add for internal users"}),m?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:m.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:F,disabled:c,loading:c,onChange:e=>{o({disable_team_admin_delete_team_user:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":g?.description??"Disable team admin delete team user"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable team admin delete team user"}),g?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:g.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:N.require_auth_for_public_ai_hub,disabled:c,loading:c,onChange:e=>{o({require_auth_for_public_ai_hub:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":_?.description??"Require authentication for public AI Hub"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Require authentication for public AI Hub"}),_?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:_.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:!!N.forward_client_headers_to_llm_api,disabled:c,loading:c,onChange:e=>{o({forward_client_headers_to_llm_api:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":h?.description??"Forward client headers to LLM API"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Forward client headers to LLM API"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:h?.description??"Forwards client headers (Authorization, anthropic-beta, and x-* custom headers) to the upstream LLM. Enable for Claude Code with a Max subscription (forwards the OAuth token) or to pass custom/tracing headers through to the provider. Independent of the BYOK toggle — enable only the one(s) you need."})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:!!N.forward_llm_provider_auth_headers,disabled:c,loading:c,onChange:e=>{o({forward_llm_provider_auth_headers:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":f?.description??"Forward LLM provider auth headers"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Forward LLM provider auth headers"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:f?.description??"Forwards provider auth headers (x-api-key, x-goog-api-key, api-key, ocp-apim-subscription-key) to the upstream LLM, overriding any deployment-configured key for that request. Enable for Claude Code BYOK (clients bring their own API key). Independent of the client-headers toggle — enable only the one(s) you need."})]})]}),j&&(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:!!N.enable_projects_ui,disabled:c,loading:c,onChange:e=>{o({enable_projects_ui:e},{onSuccess:()=>{b.default.success("UI settings updated successfully. Refreshing page..."),setTimeout(()=>window.location.reload(),1e3)},onError:e=>{b.default.fromBackend(e)}})},"aria-label":j.description??"Enable Projects UI"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"[BETA] Enable Projects (page will refresh)"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:j.description??"If enabled, shows the Projects feature in the UI sidebar and the project field in key management."})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:A,disabled:c,loading:c,onChange:e=>{o({disable_agents_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":S?.description??"Disable agents for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable agents for internal users"}),S?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:S.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(H.Switch,{checked:!!N.allow_agents_for_team_admins,disabled:c||!A,loading:c,onChange:e=>{o({allow_agents_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":w?.description??"Allow agents for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:A?void 0:"secondary",children:"Allow agents for team admins"}),w?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:w.description})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:P,disabled:c,loading:c,onChange:e=>{o({disable_vector_stores_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":T?.description??"Disable vector stores for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable vector stores for internal users"}),T?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:T.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(H.Switch,{checked:!!N.allow_vector_stores_for_team_admins,disabled:c||!P,loading:c,onChange:e=>{o({allow_vector_stores_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":C?.description??"Allow vector stores for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:P?void 0:"secondary",children:"Allow vector stores for team admins"}),C?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:C.description})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:!!N.scope_user_search_to_org,disabled:c,loading:c,onChange:e=>{o({scope_user_search_to_org:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":k?.description??"Scope user search to organization"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Scope user search to organization"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:k?.description??"If enabled, the user search endpoint restricts results by organization. When off, any authenticated user can search all users."})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:!!N.disable_custom_api_keys,disabled:c,loading:c,onChange:e=>{o({disable_custom_api_keys:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":E?.description??"Disable custom Virtual key values"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable custom Virtual key values"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:E?.description??"If true, users cannot specify custom key values. All keys must be auto-generated."})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsx)(eG,{enabledPagesInternalUsers:N.enabled_ui_pages_internal_users,enabledPagesPropertyDescription:v?.description,isUpdating:c,onUpdate:e=>{o(e,{onSuccess:()=>{b.default.success("Page visibility settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})}})]})})}let eq=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",r=await fetch(s,{method:"GET",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eH=async(e,t)=>{let s=(0,I.getProxyBaseUrl)(),r=s?`${s}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",i=await fetch(r,{method:"POST",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok){let e=await i.json();throw Error((0,I.deriveErrorMessage)(e))}return await i.json()},eK=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",r=await fetch(s,{method:"DELETE",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},e$=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault/test_connection`:"/config_overrides/hashicorp_vault/test_connection",r=await fetch(s,{method:"POST",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eQ=(0,Q.createQueryKeys)("hashicorpVaultConfig"),eW=()=>{let{accessToken:e}=(0,s.default)();return(0,$.useQuery)({queryKey:eQ.list({}),queryFn:async()=>{if(!e)throw Error("Access token is required");return eq(e)},enabled:!!e,staleTime:36e5,gcTime:36e5})},eY=e=>{let t=(0,z.useQueryClient)();return(0,R.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return eH(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:eQ.all})}})};var eJ=e.i(525720),eZ=e.i(475254);let eX=(0,eZ.default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]),e0=(0,eZ.default)("plug-zap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]),e1=new Set(["vault_token","approle_secret_id","client_key"]),e4={vault_addr:"Vault Address",vault_namespace:"Namespace",vault_mount_name:"KV Mount Name",vault_path_prefix:"Path Prefix",vault_token:"Token",approle_role_id:"Role ID",approle_secret_id:"Secret ID",approle_mount_path:"Mount Path",client_cert:"Client Certificate",client_key:"Client Key",vault_cert_role:"Certificate Role"},e2=[{title:"Connection",fields:["vault_addr","vault_namespace","vault_mount_name","vault_path_prefix"]},{title:"Token Authentication",subtitle:"Use a Vault token to authenticate. Only one auth method is required.",fields:["vault_token"]},{title:"AppRole Authentication",subtitle:"Use AppRole credentials to authenticate. Only one auth method is required.",fields:["approle_role_id","approle_secret_id","approle_mount_path"]},{title:"TLS",subtitle:"Optional client certificate for mTLS.",fields:["client_cert","client_key","vault_cert_role"]}],e6=({isVisible:e,onCancel:r,onSuccess:i})=>{let[l]=g.Form.useForm(),{accessToken:n}=(0,s.default)(),{data:a}=eW(),{mutate:o,isPending:c}=eY(n),d=a?.field_schema,u=d?.properties??{},p=a?.values??{};(0,j.useEffect)(()=>{if(e&&a){l.resetFields();let e={};for(let[t,s]of Object.entries(p))e1.has(t)||(e[t]=s);l.setFieldsValue(e)}},[e,a,l]);let f=()=>{l.resetFields(),r()},v=e=>{let s=u[e];if(!s)return null;let r="vault_addr"===e?[{pattern:/^https?:\/\/.+/,message:"Must start with http:// or https://"}]:void 0,i=e1.has(e),l=p[e],n=i&&null!=l&&""!==l?`Leave blank to keep existing (${l})`:s?.description;return(0,t.jsx)(g.Form.Item,{name:e,label:e4[e]??e,rules:r,children:i?(0,t.jsx)(_.Input.Password,{placeholder:n}):(0,t.jsx)(_.Input,{placeholder:s?.description})},e)};return(0,t.jsx)(h.Modal,{title:"Edit Hashicorp Vault Configuration",open:e,width:700,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:f,disabled:c,children:"Cancel"}),(0,t.jsx)(m.Button,{type:"primary",loading:c,onClick:()=>l.submit(),children:c?"Saving...":"Save"})]}),onCancel:f,children:(0,t.jsx)(g.Form,{form:l,layout:"vertical",onFinish:e=>{let t={};for(let[s,r]of Object.entries(e))null!=r&&""!==r?t[s]=r:e1.has(s)||(t[s]="");o(t,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration updated successfully"),i()},onError:e=>{b.default.fromBackend(e)}})},children:e2.map((e,s)=>(0,t.jsxs)("div",{children:[s>0&&(0,t.jsx)(ey.Divider,{}),(0,t.jsx)(y.Typography.Title,{level:5,style:{marginBottom:4},children:e.title}),e.subtitle&&(0,t.jsx)(y.Typography.Paragraph,{type:"secondary",style:{marginBottom:16},children:e.subtitle}),e.fields.map(v)]},e.title))})})},{Title:e3,Paragraph:e5}=y.Typography;function e8({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(ew.Empty,{image:ew.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(e3,{level:4,children:"No Vault Configuration Found"}),(0,t.jsx)(e5,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Hashicorp Vault to securely manage provider API keys and secrets for your LiteLLM deployment."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure Vault"})})})}let{Title:e7,Text:e9}=y.Typography,te={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}};function tt(){let e,{accessToken:r}=(0,s.default)(),{data:i,isLoading:l,isError:n,error:a}=eW(),{mutate:o,isPending:c}=(e=(0,z.useQueryClient)(),(0,R.useMutation)({mutationFn:async()=>{if(!r)throw Error("Access token is required");return eK(r)},onSuccess:()=>{e.invalidateQueries({queryKey:eQ.all})}})),{mutate:d,isPending:u}=eY(r),[g,_]=(0,j.useState)(!1),[h,f]=(0,j.useState)(!1),[v,S]=(0,j.useState)(null),[I,w]=(0,j.useState)(!1),T=i?.values??{},C=!!T.vault_addr,k=async()=>{if(r){w(!0);try{let e=await e$(r);b.default.success(e.message||"Connection to Vault successful!")}catch(e){b.default.fromBackend(e)}finally{w(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(V.Card,{children:(0,t.jsx)(q.Skeleton,{active:!0})}):n?(0,t.jsx)(V.Card,{children:(0,t.jsx)(p.Alert,{type:"error",message:"Could not load Hashicorp Vault configuration",description:a instanceof Error?a.message:void 0})}):(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)(eJ.Flex,{justify:"space-between",align:"center",children:[(0,t.jsxs)(eJ.Flex,{align:"center",gap:12,children:[(0,t.jsx)(eX,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(e7,{level:3,style:{marginBottom:0},children:"Hashicorp Vault"}),(0,t.jsx)(e9,{type:"secondary",children:"Manage secret manager configuration"})]})]}),(0,t.jsx)(x.Space,{children:C&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(e0,{className:"w-4 h-4"}),loading:I,onClick:k,children:"Test Connection"}),(0,t.jsx)(m.Button,{icon:(0,t.jsx)(X.Edit,{className:"w-4 h-4"}),onClick:()=>_(!0),children:"Edit Configuration"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)(et.Trash2,{className:"w-4 h-4"}),onClick:()=>f(!0),children:"Delete Configuration"})]})})]}),C&&(0,t.jsx)(p.Alert,{type:"info",showIcon:!0,message:'Secrets must be stored with the field name "key"',description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e9,{code:!0,children:"vault kv put secret/SECRET_NAME key=secret_value"}),(0,t.jsx)("br",{}),(0,t.jsx)(y.Typography.Link,{href:"https://docs.litellm.ai/docs/secret_managers/hashicorp_vault",target:"_blank",children:"View documentation"})]})}),C?(()=>{let e=Object.entries(T).filter(([e,t])=>null!=t&&""!==t);return 0===e.length?null:(0,t.jsxs)(J.Descriptions,{bordered:!0,...te,children:[(0,t.jsx)(J.Descriptions.Item,{label:"Auth Method",children:(0,t.jsx)(e9,{children:T.approle_role_id||T.approle_secret_id?"AppRole":T.client_cert&&T.client_key?"TLS Certificate":T.vault_token?"Token":"None"})}),e.map(([e])=>{let s;return(0,t.jsx)(J.Descriptions.Item,{label:e4[e]??e,children:(s=T[e])?e1.has(e)?(0,t.jsxs)(eJ.Flex,{justify:"space-between",align:"center",children:[(0,t.jsx)(e9,{className:"font-mono text-gray-600",children:s}),(0,t.jsx)(m.Button,{type:"text",size:"small",danger:!0,icon:(0,t.jsx)(et.Trash2,{className:"w-3.5 h-3.5"}),onClick:()=>S(e)})]}):(0,t.jsx)(e9,{className:"font-mono text-gray-600",children:s}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})},e)})]})})():(0,t.jsx)(e8,{onAdd:()=>_(!0)})]})}),(0,t.jsx)(e6,{isVisible:g,onCancel:()=>_(!1),onSuccess:()=>_(!1)}),(0,t.jsx)(em.default,{isOpen:h,title:"Delete Hashicorp Vault Configuration?",message:"Models using Vault secrets will lose access to their API keys until a new configuration is saved.",resourceInformationTitle:"Vault Configuration",resourceInformation:[{label:"Vault Address",value:T.vault_addr}],onCancel:()=>f(!1),onOk:()=>{o(void 0,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration deleted"),f(!1)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:c}),(0,t.jsx)(em.default,{isOpen:null!==v,title:`Clear ${v?e4[v]??v:""}?`,message:"This will remove the stored value.",resourceInformationTitle:"Field",resourceInformation:[{label:"Field",value:v?e4[v]??v:""}],onCancel:()=>S(null),onOk:()=>{v&&d({[v]:""},{onSuccess:()=>{b.default.success(`${e4[v]??v} cleared`),S(null)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:u})]})}let ts={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},tr={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},ti=({isAddSSOModalVisible:e,isInstructionsModalVisible:s,handleAddSSOOk:r,handleAddSSOCancel:i,handleShowInstructions:l,handleInstructionsOk:n,handleInstructionsCancel:a,form:o,accessToken:c,ssoConfigured:d=!1})=>{let[u,p]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e&&c)try{let e=await (0,I.getSSOSettings)(c);if(console.log("Raw SSO data received:",e),e&&e.values){console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let s={};if(e.values.role_mappings){let t=e.values.role_mappings,r=e=>e&&0!==e.length?e.join(", "):"";s={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:r(t.roles?.proxy_admin),admin_viewer_teams:r(t.roles?.proxy_admin_viewer),internal_user_teams:r(t.roles?.internal_user),internal_viewer_teams:r(t.roles?.internal_user_viewer)}}let r={sso_provider:t,proxy_base_url:e.values.proxy_base_url,user_email:e.values.user_email,...e.values,...s};console.log("Setting form values:",r),o.resetFields(),setTimeout(()=>{o.setFieldsValue(r),console.log("Form values set, current form values:",o.getFieldsValue())},100)}}catch(e){console.error("Failed to load SSO settings:",e)}})()},[e,c,o]);let x=async e=>{if(!c)return void b.default.fromBackend("No access token available");try{let{proxy_admin_teams:t,admin_viewer_teams:s,internal_user_teams:r,internal_viewer_teams:i,default_role:n,group_claim:a,use_role_mappings:o,...d}=e,u={...d};if(o){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:a,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[n]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(s),internal_user:e(r),internal_user_viewer:e(i)}}}await (0,I.updateSSOSettings)(c,u),l(e)}catch(e){b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}},f=async()=>{if(!c)return void b.default.fromBackend("No access token available");try{await (0,I.updateSSOSettings)(c,{google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null}),o.resetFields(),p(!1),r(),b.default.success("SSO settings cleared successfully")}catch(e){console.error("Failed to clear SSO settings:",e),b.default.fromBackend("Failed to clear SSO settings")}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Modal,{title:d?"Edit SSO Settings":"Add SSO",open:e,width:800,footer:null,onOk:r,onCancel:i,children:(0,t.jsxs)(g.Form,{form:o,onFinish:x,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(en.Select,{children:Object.entries(ts).map(([e,s])=>(0,t.jsx)(en.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,t.jsx)("img",{src:s,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsxs)("span",{children:["okta"===e.toLowerCase()?"Okta / Auth0":e.charAt(0).toUpperCase()+e.slice(1)," ","SSO"]})]})},e))})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s,r=e("sso_provider");return r&&(s=tr[r])?s.fields.map(e=>(0,t.jsx)(g.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(_.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(el.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsx)(g.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(en.Select,{children:[(0,t.jsx)(en.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(en.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(en.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(en.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null})]}),(0,t.jsxs)("div",{style:{textAlign:"right",marginTop:"10px",display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px"},children:[d&&(0,t.jsx)(m.Button,{onClick:()=>p(!0),style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#5558eb",e.currentTarget.style.borderColor="#5558eb"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1",e.currentTarget.style.borderColor="#6366f1"},children:"Clear"}),(0,t.jsx)(m.Button,{htmlType:"submit",children:"Save"})]})]})}),(0,t.jsxs)(h.Modal,{title:"Confirm Clear SSO Settings",open:u,onOk:f,onCancel:()=>p(!1),okText:"Yes, Clear",cancelText:"Cancel",okButtonProps:{danger:!0,style:{backgroundColor:"#dc2626",borderColor:"#dc2626"}},children:[(0,t.jsx)("p",{children:"Are you sure you want to clear all SSO settings? This action cannot be undone."}),(0,t.jsx)("p",{children:"Users will no longer be able to login using SSO after this change."})]}),(0,t.jsxs)(h.Modal,{title:"SSO Setup Instructions",open:s,width:800,footer:null,onOk:n,onCancel:a,children:[(0,t.jsx)("p",{children:"Follow these steps to complete the SSO setup:"}),(0,t.jsx)(T.Text,{className:"mt-2",children:"1. DO NOT Exit this TAB"}),(0,t.jsx)(T.Text,{className:"mt-2",children:"2. Open a new tab, visit your proxy base url"}),(0,t.jsx)(T.Text,{className:"mt-2",children:"3. Confirm your SSO is configured correctly and you can login on the new Tab"}),(0,t.jsx)(T.Text,{className:"mt-2",children:"4. If Step 3 is successful, you can close this tab"}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(m.Button,{onClick:n,children:"Done"})})]})]})},tl=({accessToken:e,onSuccess:s})=>{let[r]=g.Form.useForm(),[i,l]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e)try{let t=await (0,I.getSSOSettings)(e);if(t&&t.values){let e=t.values.ui_access_mode,s={};e&&"object"==typeof e?s={ui_access_mode_type:e.type,restricted_sso_group:e.restricted_sso_group,sso_group_jwt_field:e.sso_group_jwt_field}:"string"==typeof e&&(s={ui_access_mode_type:e,restricted_sso_group:t.values.restricted_sso_group,sso_group_jwt_field:t.values.team_ids_jwt_field||t.values.sso_group_jwt_field}),r.setFieldsValue(s)}}catch(e){console.error("Failed to load UI access settings:",e)}})()},[e,r]);let n=async t=>{if(!e)return void b.default.fromBackend("No access token available");l(!0);try{let r;r="all_authenticated_users"===t.ui_access_mode_type?{ui_access_mode:"none"}:{ui_access_mode:{type:t.ui_access_mode_type,restricted_sso_group:t.restricted_sso_group,sso_group_jwt_field:t.sso_group_jwt_field}},await (0,I.updateSSOSettings)(e,r),s()}catch(e){console.error("Failed to save UI access settings:",e),b.default.fromBackend("Failed to save UI access settings")}finally{l(!1)}};return(0,t.jsxs)("div",{style:{padding:"16px"},children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},children:(0,t.jsx)(T.Text,{style:{fontSize:"14px",color:"#6b7280"},children:"Configure who can access the UI interface and how group information is extracted from JWT tokens."})}),(0,t.jsxs)(g.Form,{form:r,onFinish:n,layout:"vertical",children:[(0,t.jsx)(g.Form.Item,{label:"UI Access Mode",name:"ui_access_mode_type",tooltip:"Controls who can access the UI interface",children:(0,t.jsxs)(en.Select,{placeholder:"Select access mode",children:[(0,t.jsx)(en.Select.Option,{value:"all_authenticated_users",children:"All Authenticated Users"}),(0,t.jsx)(en.Select.Option,{value:"restricted_sso_group",children:"Restricted SSO Group"})]})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.ui_access_mode_type!==t.ui_access_mode_type,children:({getFieldValue:e})=>"restricted_sso_group"===e("ui_access_mode_type")?(0,t.jsx)(g.Form.Item,{label:"Restricted SSO Group",name:"restricted_sso_group",rules:[{required:!0,message:"Please enter the restricted SSO group"}],children:(0,t.jsx)(k.TextInput,{placeholder:"ui-access-group"})}):null}),(0,t.jsx)(g.Form.Item,{label:"SSO Group JWT Field",name:"sso_group_jwt_field",tooltip:"JWT field name that contains team/group information. Use dot notation to access nested fields.",children:(0,t.jsx)(k.TextInput,{placeholder:"groups"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"16px"},children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:i,style:{backgroundColor:"#6366f1",borderColor:"#6366f1"},children:"Update UI Access Control"})})]})]})},{Title:tn,Paragraph:ta,Text:to}=y.Typography;e.s(["default",0,({proxySettings:e})=>{let{premiumUser:y,accessToken:w,userId:T}=(0,s.default)(),[C]=g.Form.useForm(),[k,E]=(0,j.useState)(!1),[N,O]=(0,j.useState)(!1),[F,A]=(0,j.useState)(!1),[P,M]=(0,j.useState)(!1),[B,L]=(0,j.useState)(!1),[R,z]=(0,j.useState)(!1),[D,G]=(0,j.useState)([]),[V,q]=(0,j.useState)(null),[H,$]=(0,j.useState)(!1),Q=(0,S.useBaseUrl)(),W="All IP Addresses Allowed",Y=Q;Y+="/fallback/login";let J=async()=>{if(w)try{let e=await (0,I.getSSOSettings)(w);if(e&&e.values){let t=e.values.google_client_id&&e.values.google_client_secret,s=e.values.microsoft_client_id&&e.values.microsoft_client_secret,r=e.values.generic_client_id&&e.values.generic_client_secret;$(t||s||r)}else $(!1)}catch(e){console.error("Error checking SSO configuration:",e),$(!1)}},Z=async()=>{try{if(!0!==y)return void b.default.fromBackend("This feature is only available for premium users. Please upgrade your account.");if(w){let e=await (0,I.getAllowedIPs)(w);G(e&&e.length>0?e:[W])}else G([W])}catch(e){console.error("Error fetching allowed IPs:",e),b.default.fromBackend(`Failed to fetch allowed IPs ${e}`),G([W])}finally{!0===y&&A(!0)}},X=async e=>{try{if(w){await (0,I.addAllowedIP)(w,e.ip);let t=await (0,I.getAllowedIPs)(w);G(t),b.default.success("IP address added successfully")}}catch(e){console.error("Error adding IP:",e),b.default.fromBackend(`Failed to add IP address ${e}`)}finally{M(!1)}},ee=async e=>{q(e),L(!0)},et=async()=>{if(V&&w)try{await (0,I.deleteAllowedIP)(w,V);let e=await (0,I.getAllowedIPs)(w);G(e.length>0?e:[W]),b.default.success("IP address deleted successfully")}catch(e){console.error("Error deleting IP:",e),b.default.fromBackend(`Failed to delete IP address ${e}`)}finally{L(!1),q(null)}};(0,j.useEffect)(()=>{J()},[w,y,J]);let es=()=>{z(!1)},er=[{key:"sso-settings",label:"SSO Settings",children:(0,t.jsx)(eP,{})},{key:"security-settings",label:"Security Settings",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(tn,{level:4,children:" ✨ Security Settings"}),(0,t.jsx)(p.Alert,{message:"SSO Configuration Deprecated",description:"Editing SSO Settings on this page is deprecated and will be removed in a future version. Please use the SSO Settings tab for SSO configuration.",type:"warning",showIcon:!0}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",marginTop:"1rem",marginLeft:"0.5rem"},children:[(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:()=>E(!0),children:H?"Edit SSO Settings":"Add SSO"})}),(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:Z,children:"Allowed IPs"})}),(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:()=>!0===y?z(!0):b.default.fromBackend("Only premium users can configure UI access control"),children:"UI Access Control"})})]})]}),(0,t.jsxs)("div",{className:"flex justify-start mb-4",children:[(0,t.jsx)(ti,{isAddSSOModalVisible:k,isInstructionsModalVisible:N,handleAddSSOOk:()=>{E(!1),C.resetFields(),w&&y&&J()},handleAddSSOCancel:()=>{E(!1),C.resetFields()},handleShowInstructions:e=>{E(!1),O(!0)},handleInstructionsOk:()=>{O(!1),w&&y&&J()},handleInstructionsCancel:()=>{O(!1),w&&y&&J()},form:C,accessToken:w,ssoConfigured:H}),(0,t.jsx)(h.Modal,{title:"Manage Allowed IP Addresses",width:800,open:F,onCancel:()=>A(!1),footer:[(0,t.jsx)(r.Button,{className:"mx-1",onClick:()=>M(!0),children:"Add IP Address"},"add"),(0,t.jsx)(r.Button,{onClick:()=>A(!1),children:"Close"},"close")],children:(0,t.jsxs)(n.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"IP Address"}),(0,t.jsx)(d.TableHeaderCell,{className:"text-right",children:"Action"})]})}),(0,t.jsx)(a.TableBody,{children:D.map((e,s)=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e}),(0,t.jsx)(o.TableCell,{className:"text-right",children:e!==W&&(0,t.jsx)(r.Button,{onClick:()=>ee(e),color:"red",size:"xs",children:"Delete"})})]},s))})]})}),(0,t.jsx)(h.Modal,{title:"Add Allowed IP Address",open:P,onCancel:()=>M(!1),footer:null,children:(0,t.jsxs)(g.Form,{onFinish:X,children:[(0,t.jsx)(g.Form.Item,{name:"ip",rules:[{required:!0,message:"Please enter an IP address"}],children:(0,t.jsx)(_.Input,{placeholder:"Enter IP address"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{htmlType:"submit",children:"Add IP Address"})})]})}),(0,t.jsx)(h.Modal,{title:"Confirm Delete",open:B,onCancel:()=>L(!1),onOk:et,footer:[(0,t.jsx)(r.Button,{className:"mx-1",onClick:()=>et(),children:"Yes"},"delete"),(0,t.jsx)(r.Button,{onClick:()=>L(!1),children:"Close"},"close")],children:(0,t.jsxs)(to,{children:["Are you sure you want to delete the IP address: ",V,"?"]})}),(0,t.jsx)(h.Modal,{title:"UI Access Control Settings",open:R,width:600,footer:null,onOk:es,onCancel:()=>{z(!1)},children:(0,t.jsx)(tl,{accessToken:w,onSuccess:()=>{es(),b.default.success("UI Access Control settings updated successfully")}})})]}),(0,t.jsxs)(i.Callout,{title:"Login without SSO",color:"teal",children:["If you need to login without sso, you can access"," ",(0,t.jsxs)("a",{href:Y,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)("b",{children:Y})," "]})]})]})},{key:"scim",label:"SCIM",children:(0,t.jsx)(U,{accessToken:w,userID:T,proxySettings:e})},{key:"ui-settings",label:(0,t.jsx)(x.Space,{children:(0,t.jsxs)(to,{children:["UI Settings ",(0,t.jsx)(v.default,{})]})}),children:(0,t.jsx)(eV,{})},{key:"logging-settings",label:"Logging Settings",children:(0,t.jsx)(K,{})},{key:"hashicorp-vault",label:"Hashicorp Vault",children:(0,t.jsx)(tt,{})}];return(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsx)(tn,{level:4,children:"Admin Access "}),(0,t.jsx)(ta,{children:"Go to 'Internal Users' page to add other admins."}),(0,t.jsx)(f.Tabs,{items:er})]})}],105278)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3f8f8f2ea9713f7b.js b/litellm/proxy/_experimental/out/_next/static/chunks/3f8f8f2ea9713f7b.js new file mode 100644 index 0000000000..eec95de086 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3f8f8f2ea9713f7b.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,910119,e=>{"use strict";var s=e.i(843476),t=e.i(197647),l=e.i(653824),a=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),x=e.i(199133),h=e.i(28651),g=e.i(175712),p=e.i(770914),j=e.i(536916),f=e.i(764205),b=e.i(827252),y=e.i(994388),_=e.i(35983),v=e.i(779241),S=e.i(78085),N=e.i(808613),C=e.i(592968),T=e.i(708347),w=e.i(860585),k=e.i(355619),I=e.i(435451);function U({userData:e,onCancel:t,onSubmit:l,teams:a,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=N.Form.useForm(),[h,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let s=e.user_info?.max_budget,t=null==s;g(t),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:t?"":s,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,s.jsxs)(N.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(h||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),l(e)},layout:"vertical",children:[!u&&(0,s.jsx)(N.Form.Item,{label:"User ID",name:"user_id",children:(0,s.jsx)(v.TextInput,{disabled:!0})}),!u&&(0,s.jsx)(N.Form.Item,{label:"Email",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Alias",name:"user_alias",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Global Proxy Role"," ",(0,s.jsx)(C.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,s.jsx)(b.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,s.jsx)(x.Select,{children:c&&Object.entries(c).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Personal Models"," ",(0,s.jsx)(C.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,s.jsx)(b.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(x.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!T.all_admin_roles.includes(d||""),children:[(0,s.jsx)(x.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,s.jsx)(x.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,s.jsx)("span",{children:"Max Budget (USD)"}),(0,s.jsx)(j.Checkbox,{checked:h,onChange:e=>{let s=e.target.checked;g(s),s&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,s)=>h||""!==s&&null!=s?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,s.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:h})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(w.default,{})}),(0,s.jsx)(N.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,s.jsx)(y.Button,{variant:"secondary",type:"button",onClick:t,children:"Cancel"}),(0,s.jsx)(y.Button,{type:"submit",children:"Save Changes"})]})]})}var B=e.i(727749),A=e.i(888259);let{Text:D,Title:F}=c.Typography,R=({open:e,onCancel:t,selectedUsers:l,possibleUIRoles:a,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:b,allowAllUsers:y=!1})=>{let[_,v]=(0,n.useState)(!1),[S,N]=(0,n.useState)([]),[C,T]=(0,n.useState)(null),[w,k]=(0,n.useState)(!1),[I,R]=(0,n.useState)(!1),O=()=>{N([]),T(null),k(!1),R(!1),t()},E=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),P=async e=>{if(console.log("formValues",e),!r)return void B.default.fromBackend("Access token not found");v(!0);try{let s=l.map(e=>e.user_id),a={};e.user_role&&""!==e.user_role&&(a.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(a.max_budget=e.max_budget),e.models&&e.models.length>0&&(a.models=e.models),e.budget_duration&&""!==e.budget_duration&&(a.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(a.metadata=e.metadata);let n=Object.keys(a).length>0,d=w&&S.length>0;if(!n&&!d)return void B.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,f.userBulkUpdateUserCall)(r,a,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,f.userBulkUpdateUserCall)(r,a,s),o.push(`Updated ${s.length} user(s)`);if(d){let e=[];for(let s of S)try{let t=null;t=I?null:l.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let a=await (0,f.teamBulkMemberAddCall)(r,s,t||null,C||void 0,I);console.log("result",a),e.push({teamId:s,success:!0,successfulAdditions:a.successful_additions,failedAdditions:a.failed_additions})}catch(t){console.error(`Failed to add users to team ${s}:`,t),e.push({teamId:s,success:!1,error:t})}let s=e.filter(e=>e.success),t=e.filter(e=>!e.success);if(s.length>0){let e=s.reduce((e,s)=>e+s.successfulAdditions,0);o.push(`Added users to ${s.length} team(s) (${e} total additions)`)}t.length>0&&A.default.warning(`Failed to add users to ${t.length} team(s)`)}o.length>0&&B.default.success(o.join(". ")),N([]),T(null),k(!1),R(!1),i(),t()}catch(e){console.error("Bulk operation failed:",e),B.default.fromBackend("Failed to perform bulk operations")}finally{v(!1)}};return(0,s.jsxs)(o.Modal,{open:e,onCancel:O,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${l.length} User(s)`,width:800,children:[y&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(j.Checkbox,{checked:I,onChange:e=>R(e.target.checked),children:(0,s.jsx)(D,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,s.jsx)("div",{style:{marginTop:8},children:(0,s.jsx)(D,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)(F,{level:5,children:["Selected Users (",l.length,"):"]}),(0,s.jsx)(m.Table,{size:"small",bordered:!0,dataSource:l,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,s.jsx)(D,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:a?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,s.jsx)(u.Divider,{}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsxs)(D,{children:[(0,s.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,s.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,s.jsxs)(p.Space,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(j.Checkbox,{checked:w,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Select Teams:"}),(0,s.jsx)(x.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:N,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Team Budget (Optional):"}),(0,s.jsx)(h.InputNumber,{placeholder:"Max budget per user in team",value:C,onChange:e=>T(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,s.jsx)(U,{userData:E,onCancel:O,onSubmit:P,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:b,possibleUIRoles:a,isBulkEdit:!0}),_&&(0,s.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,s.jsxs)(D,{children:["Updating ",I?"all users":l.length," user(s)..."]})})]})};var O=e.i(371455);let E=({visible:e,possibleUIRoles:t,onCancel:l,user:a,onSubmit:r})=>{let[i,c]=(0,n.useState)(a),[u]=N.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[a]);let m=async()=>{u.resetFields(),l()},g=async e=>{r(e),u.resetFields(),l()};return a?(0,s.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+a.user_id,width:1e3,children:(0,s.jsx)(N.Form,{form:u,onFinish:g,initialValues:a,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Role",name:"user_role",children:(0,s.jsx)(x.Select,{children:t&&Object.entries(t).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,s.jsx)(h.InputNumber,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,s.jsx)(I.default,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(w.default,{})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var P=e.i(172372),L=e.i(500330),M=e.i(152473),z=e.i(266027),$=e.i(912598),K=e.i(127952),V=e.i(304967),G=e.i(629569),q=e.i(599724),W=e.i(114600),H=e.i(482725),J=e.i(790848),Q=e.i(646563),Y=e.i(955135);let X=({accessToken:e,possibleUIRoles:t,userID:l,userRole:a})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[p,j]=(0,n.useState)({}),[b,y]=(0,n.useState)(!1),[_,S]=(0,n.useState)([]),{Paragraph:N}=c.Typography,{Option:C}=x.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let s=await (0,f.getInternalUserSettings)(e);if(u(s),j(s.values||{}),e)try{let s=await (0,f.modelAvailableCall)(e,l,a);if(s&&s.data){let e=s.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),B.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let T=async()=>{if(e){y(!0);try{let s=Object.entries(p).reduce((e,[s,t])=>(e[s]=""===t?null:t,e),{}),t=await (0,f.updateInternalUserSettings)(e,s);u({...o,values:t.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),B.default.fromBackend("Failed to update settings: "+e)}finally{y(!1)}}},I=(e,s)=>{j(t=>({...t,[e]:s}))},U=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(H.Spin,{size:"large"})}):o?(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:()=>{g(!1),j(o.values||{})},disabled:b,children:"Cancel"}),(0,s.jsx)(d.Button,{type:"primary",onClick:T,loading:b,children:"Save Changes"})]}):(0,s.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,s.jsx)(N,{className:"mb-4",children:o.field_schema.description}),(0,s.jsx)(W.Divider,{}),(0,s.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:l}=o;return l&&l.properties?Object.entries(l.properties).map(([l,a])=>{let r=e[l],i=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,s.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,s.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,s.jsx)(N,{className:"text-sm text-gray-500 mt-1",children:a.description||"No description available"}),m?(0,s.jsx)("div",{className:"mt-2",children:((e,l,a)=>{let r=l.type;if("teams"===e){let t,l;return(0,s.jsx)("div",{className:"mt-2",children:(t=U(p[e]||[]),l=(e,s,l)=>{let a=[...t];a[e]={...a[e],[s]:l},I("teams",a)},(0,s.jsxs)("div",{className:"space-y-3",children:[t.map((e,a)=>(0,s.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)(q.Text,{className:"font-medium",children:["Team ",a+1]}),(0,s.jsx)(d.Button,{size:"small",danger:!0,icon:(0,s.jsx)(Y.DeleteOutlined,{}),onClick:()=>{I("teams",t.filter((e,s)=>s!==a))},children:"Remove"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,s.jsx)(v.TextInput,{value:e.team_id,onChange:e=>l(a,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,s.jsx)(h.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>l(a,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,s.jsxs)(x.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>l(a,"user_role",e),children:[(0,s.jsx)(C,{value:"user",children:"User"}),(0,s.jsx)(C,{value:"admin",children:"Admin"})]})]})]})]},a)),(0,s.jsx)(d.Button,{icon:(0,s.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...t,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&t)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:Object.entries(t).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(C,{value:e,children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{children:t}),(0,s.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:l})]})},e))});if("budget_duration"===e)return(0,s.jsx)(w.default,{value:p[e]||null,onChange:s=>I(e,s),className:"mt-2"});if("boolean"===r)return(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(J.Switch,{checked:!!p[e],onChange:s=>I(e,s)})});if("array"===r&&l.items?.enum)return(0,s.jsx)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:l.items.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else if("models"===e)return(0,s.jsxs)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:[(0,s.jsx)(C,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,s.jsx)(C,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),_.map(e=>(0,s.jsx)(C,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&l.enum)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:l.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else return(0,s.jsx)(v.TextInput,{value:void 0!==p[e]?String(p[e]):"",onChange:s=>I(e,s.target.value),placeholder:l.description||"",className:"mt-2"})})(l,a,0)}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,l)=>{if(null==l)return(0,s.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(l)){if(0===l.length)return(0,s.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=U(l);return(0,s.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,t)=>(0,s.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,s.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,s.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,L.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,s.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},t))})}if("user_role"===e&&t&&t[l]){let{ui_label:e,description:a}=t[l];return(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium",children:e}),a&&(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:a})]})}if("budget_duration"===e)return(0,s.jsx)("span",{children:(0,w.getBudgetDurationLabel)(l)});if("boolean"==typeof l)return(0,s.jsx)("span",{children:l?"Enabled":"Disabled"});if("models"===e&&Array.isArray(l))return 0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},t))});if("object"==typeof l)return Array.isArray(l)?0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},t))}):(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(l,null,2)});return(0,s.jsx)("span",{children:String(l)})})(l,r)})]},l)}):(0,s.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,s.jsx)(V.Card,{children:(0,s.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var Z=e.i(389083),ee=e.i(350967),es=e.i(752978),et=e.i(262218),el=e.i(591935),ea=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,t,l,a,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(C.Tooltip,{title:e.original.user_id,children:(0,s.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,s.jsx)(C.Tooltip,{title:"Copy User ID",children:(0,s.jsx)(en.CopyOutlined,{onClick:s=>{s.stopPropagation(),(0,L.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>{let t;return(t=e.original.metadata)&&"object"==typeof t&&!1===t.scim_active?(0,s.jsx)(C.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,s.jsx)(et.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,s.jsx)(et.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})}},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:t})=>(0,s.jsx)("span",{className:"text-xs",children:e?.[t.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.spend?(0,L.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{children:"SSO ID"}),(0,s.jsx)(C.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,s.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,s.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,s.jsxs)(Z.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,s.jsx)(Z.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(C.Tooltip,{title:"Edit user details",children:(0,s.jsx)(es.Icon,{icon:el.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,s.jsx)(C.Tooltip,{title:"Delete user",children:(0,s.jsx)(es.Icon,{icon:ea.TrashIcon,size:"sm",onClick:()=>l(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,s.jsx)(C.Tooltip,{title:"Reset Password",children:(0,s.jsx)(es.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>a(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:t,isUserSelected:l,isAllSelected:a,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,s.jsx)(j.Checkbox,{indeterminate:r,checked:a,onChange:e=>t(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:t})=>(0,s.jsx)(j.Checkbox,{checked:l(t.original),onChange:s=>e(t.original,s.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),ex=e.i(64848),eh=e.i(942232),eg=e.i(496020),ep=e.i(977572),ej=e.i(206929),ef=e.i(94629),eb=e.i(360820),ey=e.i(871943),e_=e.i(981339),ev=e.i(530212),eS=e.i(988297),eN=e.i(118366),eC=e.i(678784);function eT({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:h,possibleUIRoles:g,initialTab:p=0,startInEditMode:j=!1}){let[b,_]=(0,n.useState)(null),[v,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[A,D]=(0,n.useState)(!1),[F,R]=(0,n.useState)(!0),[O,E]=(0,n.useState)(j),[M,z]=(0,n.useState)([]),[$,W]=(0,n.useState)(!1),[H,J]=(0,n.useState)(null),[Q,Y]=(0,n.useState)(null),[X,Z]=(0,n.useState)(p),[es,et]=(0,n.useState)({}),[el,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ej,ef]=(0,n.useState)(null),[eb,ey]=(0,n.useState)(!1),[e_,eT]=(0,n.useState)(!1),[ew,ek]=(0,n.useState)([]),[eI,eU]=(0,n.useState)(""),[eB,eA]=(0,n.useState)("user"),[eD,eF]=(0,n.useState)(!1);n.default.useEffect(()=>{Y((0,f.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0)try{let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),t=await Promise.all(e);S(t)}catch{S(s.teams.map(e=>({team_id:e,team_alias:null})))}let t=(await (0,f.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(t)}catch(e){console.error("Error fetching user data:",e),B.default.fromBackend("Failed to fetch user data")}finally{R(!1)}})()},[u,e,m]);let eR="proxy_admin"===m||"Admin"===m,eO=async()=>{if(u){eF(!0);try{let e=await (0,f.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eF(!1)}}},eE=async()=>{if(u&&eI){ey(!0);try{await (0,f.teamMemberAddCall)(u,eI,{role:eB,user_id:e}),B.default.success("User added to team successfully"),ed(!1);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),B.default.fromBackend(e?.message||"Failed to add user to team")}finally{ey(!1)}}},eP=async()=>{if(u&&ej){eT(!0);try{await (0,f.teamMemberDeleteCall)(u,ej.team_id,{role:"user",user_id:e}),B.default.success("User removed from team successfully"),ec(!1),ef(null);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),B.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eT(!1)}}},eL=ew.filter(e=>!v.some(s=>s.team_id===e.team_id)),eM=async()=>{if(!u)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let s=await (0,f.invitationCreateCall)(u,e);J(s),W(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;D(!0),await (0,f.userDeleteCall)(u,[e]),B.default.success("User deleted successfully"),h&&h(),c()}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{I(!1),D(!1)}},e$=async e=>{try{if(!u||!b)return;await (0,f.userUpdateUserCall)(u,e,null),_({...b,user_email:e.user_email??b.user_email,user_alias:e.user_alias??b.user_alias,models:e.models??b.models,max_budget:e.max_budget??b.max_budget,budget_duration:e.budget_duration??b.budget_duration,metadata:e.metadata??b.metadata}),B.default.success("User updated successfully"),E(!1)}catch(e){console.error("Error updating user:",e),B.default.fromBackend("Failed to update user")}};if(F)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"Loading user data..."})]});if(!b)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"User not found"})]});let eK=async(e,s)=>{await (0,L.copyToClipboard)(e)&&(et(e=>({...e,[s]:!0})),setTimeout(()=>{et(e=>({...e,[s]:!1}))},2e3))},eV={user_id:b.user_id,user_info:{user_email:b.user_email,user_alias:b.user_alias,user_role:b.user_role,models:b.models,max_budget:b.max_budget,budget_duration:b.budget_duration,metadata:b.metadata}};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(G.Title,{children:b.user_email||"User"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"text-gray-500 font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eC.CheckIcon,{size:12}):(0,s.jsx)(eN.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&T.rolesWithWriteAccess.includes(m)&&(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(y.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:eM,className:"flex items-center",children:"Reset Password"}),(0,s.jsx)(y.Button,{icon:ea.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,s.jsx)(K.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:b.user_email},{label:"User ID",value:b.user_id,code:!0},{label:"Global Proxy Role",value:b.user_role&&g?.[b.user_role]?.ui_label||b.user_role||"-"},{label:"Total Spend (USD)",value:null!==b.spend&&void 0!==b.spend?b.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:A}),(0,s.jsxs)(l.TabGroup,{defaultIndex:X,onIndexChange:Z,children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Overview"}),(0,s.jsx)(t.Tab,{children:"Details"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Spend"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(G.Title,{children:["$",(0,L.formatNumberWithCommas)(b.spend||0,4)]}),(0,s.jsxs)(q.Text,{children:["of"," ",null!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"]})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,s.jsx)(q.Text,{children:"Teams"}),eR&&(0,s.jsx)(y.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eU(""),eA("user"),ed(!0),eO()},children:"Add Team"})]}),(0,s.jsxs)("div",{className:"mt-2",children:[v.length>0?(0,s.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,s.jsxs)(eu.Table,{children:[(0,s.jsx)(em.TableHead,{children:(0,s.jsxs)(eg.TableRow,{children:[(0,s.jsx)(ex.TableHeaderCell,{children:"Team Name"}),eR&&(0,s.jsx)(ex.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,s.jsx)(eh.TableBody,{children:v.slice(0,el?v.length:20).map(e=>(0,s.jsxs)(eg.TableRow,{children:[(0,s.jsx)(ep.TableCell,{children:e.team_alias||e.team_id}),eR&&(0,s.jsx)(ep.TableCell,{className:"text-right",children:(0,s.jsx)(y.Button,{icon:ea.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{ef(e),ec(!0)}})})]},e.team_id))})]})}):(0,s.jsx)(q.Text,{children:"No teams"}),!el&&v.length>20&&(0,s.jsxs)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",v.length-20," more"]}),el&&v.length>20&&(0,s.jsx)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Personal Models"}),(0,s.jsx)("div",{className:"mt-2",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)(q.Text,{children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"User Settings"}),!O&&m&&T.rolesWithWriteAccess.includes(m)&&(0,s.jsx)(y.Button,{onClick:()=>E(!0),children:"Edit Settings"})]}),O&&b?(0,s.jsx)(U,{userData:eV,onCancel:()=>E(!1),onSubmit:e$,teams:v,accessToken:u,userID:e,userRole:m,userModels:M,possibleUIRoles:g}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eC.CheckIcon,{size:12}):(0,s.jsx)(eN.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,s.jsx)(q.Text,{children:b.user_email||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,s.jsx)(q.Text,{children:b.user_alias||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,s.jsx)(q.Text,{children:b.user_role||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,s.jsx)(q.Text,{children:b.created_at?new Date(b.created_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,s.jsx)(q.Text,{children:b.updated_at?new Date(b.updated_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,s.jsx)(q.Text,{children:null!==b.max_budget&&void 0!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,s.jsx)(q.Text,{children:(0,w.getBudgetDurationLabel)(b.budget_duration??null)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(b.metadata||{},null,2)})]})]})]})})]})]}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:$,setIsInvitationLinkModalVisible:W,baseUrl:Q||"",invitationLinkData:H,modalType:"resetPassword"}),(0,s.jsx)(K.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ej?.team_alias||ej?.team_id},{label:"User ID",value:b?.user_id,code:!0},{label:"Email",value:b?.user_email}],onCancel:()=>{ec(!1),ef(null)},onOk:eP,confirmLoading:e_}),(0,s.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!eb,children:(0,s.jsxs)(N.Form,{layout:"vertical",onFinish:eE,children:[(0,s.jsx)(N.Form.Item,{label:"Team",required:!0,children:(0,s.jsx)(x.Select,{showSearch:!0,value:eI||void 0,onChange:eU,placeholder:"Select a team",filterOption:(e,s)=>{let t=eL.find(e=>e.team_id===s?.value);return!!t&&t.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eD,children:eL.map(e=>(0,s.jsx)(x.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,s.jsx)(N.Form.Item,{label:"Member Role",children:(0,s.jsxs)(x.Select,{value:eB,onChange:eA,children:[(0,s.jsx)(x.Select.Option,{value:"user",children:(0,s.jsxs)(C.Tooltip,{title:"Can view team info, but not manage it",children:[(0,s.jsx)("span",{className:"font-medium",children:"user"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,s.jsx)(x.Select.Option,{value:"admin",children:(0,s.jsxs)(C.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,s.jsx)("span",{className:"font-medium",children:"admin"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,s.jsx)("div",{className:"text-right mt-4",children:(0,s.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:eb,disabled:!eI,children:eb?"Adding...":"Add to Team"})})]})})]})}var ew=e.i(655913),ek=e.i(38419),eI=e.i(78334),eU=e.i(555436),eB=e.i(284614);let eA=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eD({data:e=[],columns:t,isLoading:l=!1,onSortChange:a,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:x=[],onSelectionChange:h,enableSelection:g=!1,filters:p,updateFilters:j,initialFilters:f,teams:b,userListResponse:y,currentPage:v,handlePageChange:S}){let[N,C]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[T,w]=n.default.useState(null),[k,I]=n.default.useState(!1),[U,B]=n.default.useState(!1),A=(e,s=!1)=>{w(e),I(s)},D=(e,s)=>{h&&(s?h([...x,e]):h(x.filter(s=>s.user_id!==e.user_id)))},F=s=>{h&&(s?h(e):h([]))},R=e=>x.some(s=>s.user_id===e.user_id),O=e.length>0&&x.length===e.length,E=x.length>0&&x.lengtho?ed(o,c,u,m,A,g?{selectedUsers:x,onSelectUser:D,onSelectAll:F,isUserSelected:R,isAllSelected:O,isIndeterminate:E}:void 0):t,[o,c,u,m,A,t,g,x,O,E]),L=(0,eo.useReactTable)({data:e,columns:P,state:{sorting:N},onSortingChange:e=>{let s="function"==typeof e?e(N):e;if(C(s),s&&Array.isArray(s)&&s.length>0&&s[0]){let e=s[0];if(e.id){let s=e.id,t=e.desc?"desc":"asc";a?.(s,t)}}else a?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&C([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),T)?(0,s.jsx)(eT,{userId:T,onClose:()=>{w(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Search by email...",value:p.email,onChange:e=>j({email:e}),icon:eU.Search}),(0,s.jsx)(ek.FiltersButton,{onClick:()=>B(!U),active:U,hasActiveFilters:!!(p.user_id||p.user_role||p.team)}),(0,s.jsx)(eI.ResetFiltersButton,{onClick:()=>{j(f)}})]}),U&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by User ID",value:p.user_id,onChange:e=>j({user_id:e}),icon:eB.User}),(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by SSO ID",value:p.sso_user_id,onChange:e=>j({sso_user_id:e}),icon:eA}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ej.Select,{value:p.user_role,onValueChange:e=>j({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,t])=>(0,s.jsx)(_.SelectItem,{value:e,children:t.ui_label},e))})}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ej.Select,{value:p.team,onValueChange:e=>j({team:e}),placeholder:"Select Team",children:b?.map(e=>(0,s.jsx)(_.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[l?(0,s.jsx)(e_.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,s.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",y&&y.users&&y.users.length>0?(y.page-1)*y.page_size+1:0," ","-"," ",y&&y.users?Math.min(y.page*y.page_size,y.total):0," ","of ",y?y.total:0," results"]}),(0,s.jsx)("div",{className:"flex space-x-2",children:l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>S(v-1),disabled:1===v,className:`px-3 py-1 text-sm border rounded-md ${1===v?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,s.jsx)("button",{onClick:()=>S(v+1),disabled:!y||v>=y.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!y||v>=y.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,s.jsx)("div",{className:"overflow-auto",children:(0,s.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,s.jsx)(em.TableHead,{children:L.getHeaderGroups().map(e=>(0,s.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,s.jsx)(ex.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,s.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,s.jsx)(eb.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,s.jsx)(ey.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,s.jsx)(ef.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,s.jsx)(eh.TableBody,{children:l?(0,s.jsx)(eg.TableRow,{children:(0,s.jsx)(ep.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?L.getRowModel().rows.map(e=>(0,s.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,s.jsx)(ep.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&A(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,s.jsx)(eg.TableRow,{children:(0,s.jsx)(ep.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eF,Title:eR}=c.Typography,eO={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:x})=>{let h=!!c&&(0,T.isProxyAdminRole)(c),g=(0,$.useQueryClient)(),[p,j]=(0,n.useState)(1),[b,y]=(0,n.useState)(!1),[_,v]=(0,n.useState)(null),[S,N]=(0,n.useState)(!1),[C,w]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[U,A]=(0,n.useState)("users"),[D,F]=(0,n.useState)(eO),[V,G,q]=(0,M.useDebouncedState)(D,{wait:300}),[W,H]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Y,Z]=(0,n.useState)(null),[ee,es]=(0,n.useState)([]),[et,el]=(0,n.useState)(!1),[ea,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),N(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{Z((0,f.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let s=(await (0,f.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",s),en(s)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{F(s=>{let t={...s,...e};return G(t),t})},eu=(e,s)=>{ec({sort_by:e,sort_order:s})},em=async s=>{if(!e)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let t=await (0,f.invitationCreateCall)(e,s);Q(t),H(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ex=async()=>{if(k&&e)try{w(!0),await (0,f.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:s}}),B.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{N(!1),I(null),w(!1)}},eh=async()=>{v(null),y(!1)},eg=async s=>{if(console.log("inside handleEditSubmit:",s),e&&o&&c&&u){try{let t=await (0,f.userUpdateUserCall)(e,s,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.map(e=>e.user_id===t.data.user_id?(0,L.updateExistingKeys)(e,t.data):e);return{...e,users:s}}),B.default.success(`User ${s.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}v(null),y(!1)}},ep=async e=>{j(e)},ej=e=>{es(e)},ef=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:V,currentPage:p,orgAdminOrgIds:x}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.userListCall)(e,V.user_id?[V.user_id]:null,p,25,V.email||null,V.user_role||null,V.team||null,V.sso_user_id||null,V.sort_by,V.sort_order,x?x.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),eb=ef.data,ey=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,ev=ed(ey,e=>{v(e),y(!0)},eo,em,()=>{});return(0,s.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,s.jsx)("div",{className:"flex space-x-3",children:ef.isLoading?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(O.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ey}),h&&(0,s.jsx)(d.Button,{onClick:()=>{er(!ea),es([])},type:ea?"primary":"default",className:"flex items-center",children:ea?"Cancel Selection":"Select Users"}),h&&ea&&(0,s.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?B.default.fromBackend("Please select users to edit"):el(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),h?(0,s.jsxs)(l.TabGroup,{defaultIndex:0,onIndexChange:e=>A(0===e?"users":"settings"),children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Users"}),(0,s.jsx)(t.Tab,{children:"Default User Settings"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsx)(eD,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ey,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:ea,selectedUsers:ee,onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eO,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep})}),(0,s.jsx)(r.TabPanel,{children:u&&c&&e?(0,s.jsx)(X,{accessToken:e,possibleUIRoles:ey,userID:u,userRole:c}):(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(e_.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,s.jsx)(eD,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ey,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eO,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep}),(0,s.jsx)(E,{visible:b,possibleUIRoles:ey,onCancel:eh,user:_,onSubmit:eg}),(0,s.jsx)(K.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ey?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{N(!1),I(null)},onOk:ex,confirmLoading:C}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:W,setIsInvitationLinkModalVisible:H,baseUrl:Y||"",invitationLinkData:J,modalType:"resetPassword"}),(0,s.jsx)(R,{open:et,onCancel:()=>el(!1),selectedUsers:ee,possibleUIRoles:ey,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),es([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,T.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/41378fecd72892ff.js b/litellm/proxy/_experimental/out/_next/static/chunks/41378fecd72892ff.js new file mode 100644 index 0000000000..5c3e88612c --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/41378fecd72892ff.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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 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(["LinkOutlined",0,o],596239)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,r]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;r(`${e}//${t}`)}},[]),e}])},688511,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",()=>t],823429),e.s(["Edit",()=>t],688511)},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},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",()=>t],727612)},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},114600,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),l=e.i(271645);let o=(0,a.makeClassName)("Divider"),s=l.default.forwardRef((e,a)=>{let{className:s,children:i}=e,d=(0,t.__rest)(e,["className","children"]);return l.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(o("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",s)},d),i?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.default.createElement("div",{className:(0,r.tremorTwMerge)("text-inherit whitespace-nowrap")},i),l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});s.displayName="Divider",e.s(["Divider",()=>s],114600)},366283,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(95779),l=e.i(444755),o=e.i(673706);let s=(0,o.makeClassName)("Callout"),i=r.default.forwardRef((e,i)=>{let{title:d,icon:c,color:n,className:u,children:f}=e,m=(0,t.__rest)(e,["title","icon","color","className","children"]);return r.default.createElement("div",Object.assign({ref:i,className:(0,l.tremorTwMerge)(s("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",n?(0,l.tremorTwMerge)((0,o.getColorClassNames)(n,a.colorPalette.background).bgColor,(0,o.getColorClassNames)(n,a.colorPalette.darkBorder).borderColor,(0,o.getColorClassNames)(n,a.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,l.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},m),r.default.createElement("div",{className:(0,l.tremorTwMerge)(s("header"),"flex items-start")},c?r.default.createElement(c,{className:(0,l.tremorTwMerge)(s("icon"),"flex-none h-5 w-5 mr-1.5")}):null,r.default.createElement("h4",{className:(0,l.tremorTwMerge)(s("title"),"font-semibold")},d)),r.default.createElement("p",{className:(0,l.tremorTwMerge)(s("body"),"overflow-y-auto",f?"mt-2":"")},f))});i.displayName="Callout",e.s(["Callout",()=>i],366283)},475647,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 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};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(["PlusCircleOutlined",0,o],475647)},153472,e=>{"use strict";var t,r,a=e.i(266027),l=e.i(954616),o=e.i(912598),s=e.i(243652),i=e.i(135214),d=e.i(764205),c=((t={}).GENERAL_SETTINGS="general_settings",t),n=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let u=async(e,t)=>{try{let r=d.proxyBaseUrl?`${d.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(r,{method:"GET",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},f=(0,s.createQueryKeys)("proxyConfig"),m=async(e,t)=>{try{let r=d.proxyBaseUrl?`${d.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(r,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>c,"GeneralSettingsFieldName",()=>n,"proxyConfigKeys",0,f,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,i.default)(),t=(0,o.useQueryClient)();return(0,l.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await m(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:f.all})}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,i.default)();return(0,a.useQuery)({queryKey:f.list({filters:{configType:e}}),queryFn:async()=>await u(t,e),enabled:!!t})}])},286536,77705,e=>{"use strict";var t=e.i(475254);let r=(0,t.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",()=>r],286536);let a=(0,t.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",()=>a],77705)},514236,e=>{"use strict";var t=e.i(843476),r=e.i(105278);e.s(["default",0,()=>(0,t.jsx)(r.default,{})])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/432e162c2ee31f73.js b/litellm/proxy/_experimental/out/_next/static/chunks/432e162c2ee31f73.js new file mode 100644 index 0000000000..7c52eca1b9 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/432e162c2ee31f73.js @@ -0,0 +1,72 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),Object.defineProperty(l,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},269200,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("Table"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement("div",{className:(0,a.tremorTwMerge)(r("root"),"overflow-auto",i)},l.default.createElement("table",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},o),n))});s.displayName="Table",e.s(["Table",()=>s],269200)},427612,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHead"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("thead",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},o),n))});s.displayName="TableHead",e.s(["TableHead",()=>s],427612)},64848,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHeaderCell"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("th",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},o),n))});s.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>s],64848)},942232,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableBody"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("tbody",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},o),n))});s.displayName="TableBody",e.s(["TableBody",()=>s],942232)},496020,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableRow"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("tr",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("row"),i)},o),n))});s.displayName="TableRow",e.s(["TableRow",()=>s],496020)},977572,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableCell"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("td",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"align-middle whitespace-nowrap text-left p-4",i)},o),n))});s.displayName="TableCell",e.s(["TableCell",()=>s],977572)},389083,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(829087),r=e.i(480731),s=e.i(95779),n=e.i(444755),i=e.i(673706);let o={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"}},c={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"}},d=(0,i.makeClassName)("Badge"),u=l.default.forwardRef((e,u)=>{let{color:m,icon:h,size:g=r.Sizes.SM,tooltip:p,className:x,children:f}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),y=h||null,{tooltipProps:j,getReferenceProps:v}=(0,a.useTooltip)();return l.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([u,j.refs.setReference]),className:(0,n.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,n.tremorTwMerge)((0,i.getColorClassNames)(m,s.colorPalette.background).bgColor,(0,i.getColorClassNames)(m,s.colorPalette.iconText).textColor,(0,i.getColorClassNames)(m,s.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,n.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"),o[g].paddingX,o[g].paddingY,o[g].fontSize,x)},v,b),l.default.createElement(a.default,Object.assign({text:p},j)),y?l.default.createElement(y,{className:(0,n.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[g].height,c[g].width)}):null,l.default.createElement("span",{className:(0,n.tremorTwMerge)(d("text"),"whitespace-nowrap")},f))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},68155,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:"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,l],68155)},360820,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:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,l],360820)},871943,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:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,l],871943)},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,l],94629)},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},848725,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:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});e.s(["EyeIcon",0,l],848725)},292335,122520,165615,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",AWS_SIGV4:"aws_sigv4"},l={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};function a(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(["AUTH_TYPE",0,t,"OAUTH_FLOW",0,{INTERACTIVE:"interactive",M2M:"m2m"},"TRANSPORT",0,l,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?l.SSE:t&&e!==l.STDIO?l.OPENAPI:e],292335),e.s(["extractErrorMessage",()=>a],122520);let r=e=>{let t=new Uint8Array(e),l="";return t.forEach(e=>l+=String.fromCharCode(e)),btoa(l).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},s=async e=>{let t=new TextEncoder().encode(e);return r(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,s,"generateCodeVerifier",0,()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),r(e.buffer)}],165615)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["StopOutlined",0,s],724154)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var l=e.i(546467);e.s(["ExternalLinkIcon",()=>l.default],634831);let a=(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(["KeyIcon",()=>a],438100)},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},264843,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["MessageOutlined",0,s],264843)},446891,836991,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(326373),r=e.i(94629),s=e.i(360820),n=e.i(871943),i=e.i(271645);let o=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,o],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:i})=>{let c=[{key:"asc",label:"Ascending",icon:(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,t.jsx)(o,{className:"h-4 w-4"})}];return(0,t.jsx)(a.Dropdown,{menu:{items:c,onClick:({key:e})=>{"asc"===e?i("asc"):"desc"===e?i("desc"):"reset"===e&&i(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,t.jsx)(l.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"}):(0,t.jsx)(r.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891)},149121,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(152990),r=e.i(682830),s=e.i(269200),n=e.i(427612),i=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572);function u({data:e=[],columns:u,onRowClick:m,renderSubComponent:h,renderChildRows:g,getRowCanExpand:p,isLoading:x=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:b="No logs found",enableSorting:y=!1}){let j=!!(h||g)&&!!p,[v,w]=(0,l.useState)([]),k=(0,a.useReactTable)({data:e,columns:u,...y&&{state:{sorting:v},onSortingChange:w,enableSortingRemoval:!1},...j&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,r.getCoreRowModel)(),...y&&{getSortedRowModel:(0,r.getSortedRowModel)()},...j&&{getExpandedRowModel:(0,r.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(n.TableHead,{children:k.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let l=y&&e.column.getCanSort(),r=e.column.getIsSorted();return(0,t.jsx)(i.TableHeaderCell,{className:`py-1 h-8 ${l?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:l?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),l&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===r?"↑":"desc"===r?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:x?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):k.getRowModel().rows.length>0?k.getRowModel().rows.map(e=>(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),j&&e.getIsExpanded()&&g&&g({row:e}),j&&e.getIsExpanded()&&h&&!g&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:h({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})})})]})})}e.s(["DataTable",()=>u])},37091,e=>{"use strict";var t=e.i(290571),l=e.i(95779),a=e.i(444755),r=e.i(673706),s=e.i(271645);let n=s.default.forwardRef((e,n)=>{let{color:i,children:o,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return s.default.createElement("p",Object.assign({ref:n,className:(0,a.tremorTwMerge)(i?(0,r.getColorClassNames)(i,l.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},d),o)});n.displayName="Subtitle",e.s(["Subtitle",()=>n],37091)},888288,e=>{"use strict";var t=e.i(271645);let l=(e,l)=>{let a=void 0!==l,[r,s]=(0,t.useState)(e);return[a?l:r,e=>{a||s(e)}]};e.s(["default",()=>l])},793130,e=>{"use strict";var t=e.i(290571),l=e.i(429427),a=e.i(371330),r=e.i(271645),s=e.i(394487),n=e.i(503269),i=e.i(214520),o=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(601893),h=e.i(140721),g=e.i(942803),p=e.i(233538),x=e.i(694421),f=e.i(700020),b=e.i(35889),y=e.i(998348),j=e.i(722678);let v=(0,r.createContext)(null);v.displayName="GroupContext";let w=r.Fragment,k=Object.assign((0,f.forwardRefWithAs)(function(e,t){var w;let k=(0,r.useId)(),_=(0,g.useProvidedId)(),C=(0,m.useDisabled)(),{id:N=_||`headlessui-switch-${k}`,disabled:S=C||!1,checked:T,defaultChecked:M,onChange:E,name:I,value:O,form:A,autoFocus:D=!1,...B}=e,R=(0,r.useContext)(v),[F,P]=(0,r.useState)(null),$=(0,r.useRef)(null),L=(0,u.useSyncRefs)($,t,null===R?null:R.setSwitch,P),H=(0,i.useDefaultValue)(M),[z,V]=(0,n.useControllable)(T,E,null!=H&&H),U=(0,o.useDisposables)(),[q,W]=(0,r.useState)(!1),G=(0,c.useEvent)(()=>{W(!0),null==V||V(!z),U.nextFrame(()=>{W(!1)})}),K=(0,c.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),G()}),Y=(0,c.useEvent)(e=>{e.key===y.Keys.Space?(e.preventDefault(),G()):e.key===y.Keys.Enter&&(0,x.attemptSubmit)(e.currentTarget)}),J=(0,c.useEvent)(e=>e.preventDefault()),Q=(0,j.useLabelledBy)(),X=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,l.useFocusRing)({autoFocus:D}),{isHovered:et,hoverProps:el}=(0,a.useHover)({isDisabled:S}),{pressed:ea,pressProps:er}=(0,s.useActivePress)({disabled:S}),es=(0,r.useMemo)(()=>({checked:z,disabled:S,hover:et,focus:Z,active:ea,autofocus:D,changing:q}),[z,et,Z,ea,S,q,D]),en=(0,f.mergeProps)({id:N,ref:L,role:"switch",type:(0,d.useResolveButtonType)(e,F),tabIndex:-1===e.tabIndex?0:null!=(w=e.tabIndex)?w:0,"aria-checked":z,"aria-labelledby":Q,"aria-describedby":X,disabled:S||void 0,autoFocus:D,onClick:K,onKeyUp:Y,onKeyPress:J},ee,el,er),ei=(0,r.useCallback)(()=>{if(void 0!==H)return null==V?void 0:V(H)},[V,H]),eo=(0,f.useRender)();return r.default.createElement(r.default.Fragment,null,null!=I&&r.default.createElement(h.FormFields,{disabled:S,data:{[I]:O||"on"},overrides:{type:"checkbox",checked:z},form:A,onReset:ei}),eo({ourProps:en,theirProps:B,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[l,a]=(0,r.useState)(null),[s,n]=(0,j.useLabels)(),[i,o]=(0,b.useDescriptions)(),c=(0,r.useMemo)(()=>({switch:l,setSwitch:a}),[l,a]),d=(0,f.useRender)();return r.default.createElement(o,{name:"Switch.Description",value:i},r.default.createElement(n,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){l&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),l.click(),l.focus({preventScroll:!0}))}}},r.default.createElement(v.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:w,name:"Switch.Group"}))))},Label:j.Label,Description:b.Description});var _=e.i(888288),C=e.i(95779),N=e.i(444755),S=e.i(673706),T=e.i(829087);let M=(0,S.makeClassName)("Switch"),E=r.default.forwardRef((e,l)=>{let{checked:a,defaultChecked:s=!1,onChange:n,color:i,name:o,error:c,errorMessage:d,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"]),x={bgColor:i?(0,S.getColorClassNames)(i,C.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,S.getColorClassNames)(i,C.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[f,b]=(0,_.default)(s,a),[y,j]=(0,r.useState)(!1),{tooltipProps:v,getReferenceProps:w}=(0,T.useTooltip)(300);return r.default.createElement("div",{className:"flex flex-row items-center justify-start"},r.default.createElement(T.default,Object.assign({text:h},v)),r.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([l,v.refs.setReference]),className:(0,N.tremorTwMerge)(M("root"),"flex flex-row relative h-5")},p,w),r.default.createElement("input",{type:"checkbox",className:(0,N.tremorTwMerge)(M("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:m,checked:f,onChange:e=>{e.preventDefault()}}),r.default.createElement(k,{checked:f,onChange:e=>{b(e),null==n||n(e)},disabled:u,className:(0,N.tremorTwMerge)(M("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:()=>j(!0),onBlur:()=>j(!1),id:g},r.default.createElement("span",{className:(0,N.tremorTwMerge)(M("sr-only"),"sr-only")},"Switch ",f?"on":"off"),r.default.createElement("span",{"aria-hidden":"true",className:(0,N.tremorTwMerge)(M("background"),f?x.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")}),r.default.createElement("span",{"aria-hidden":"true",className:(0,N.tremorTwMerge)(M("round"),f?(0,N.tremorTwMerge)(x.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",y?(0,N.tremorTwMerge)("ring-2",x.ringColor):"")}))),c&&d?r.default.createElement("p",{className:(0,N.tremorTwMerge)(M("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});E.displayName="Switch",e.s(["Switch",()=>E],793130)},418371,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:r="w-4 h-4"})=>{let[s,n]=(0,l.useState)(!1),{logo:i}=(0,a.getProviderLogoAndName)(e);return s||!i?(0,t.jsx)("div",{className:`${r} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:i,alt:`${e} logo`,className:r,onError:()=>n(!0)})}])},704308,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(994388),r=e.i(212931),s=e.i(764205),n=e.i(808613),i=e.i(311451),o=e.i(199133),c=e.i(888259),d=e.i(209261);let{TextArea:u}=i.Input,{Option:m}=o.Select,h=["Development","Productivity","Learning","Security","Data & Analytics","Integration","Testing","Documentation"],g=({visible:e,onClose:g,accessToken:p,onSuccess:x})=>{let[f]=n.Form.useForm(),[b,y]=(0,l.useState)(!1),[j,v]=(0,l.useState)(null),w=async e=>{if(!p)return void c.default.error("No access token available");if(!j)return void c.default.error("Please enter a valid GitHub URL");if(!(0,d.validatePluginName)(e.name))return void c.default.error("Skill name must be kebab-case (lowercase letters, numbers, and hyphens only)");if(e.version&&!(0,d.isValidSemanticVersion)(e.version))return void c.default.error("Version must be in semantic versioning format (e.g., 1.0.0)");if(e.authorEmail&&!(0,d.isValidEmail)(e.authorEmail))return void c.default.error("Invalid email format");if(e.homepage&&!(0,d.isValidUrl)(e.homepage))return void c.default.error("Invalid homepage URL format");y(!0);try{let t={name:e.name.trim(),source:j.parsed};e.version&&(t.version=e.version.trim()),e.description&&(t.description=e.description.trim()),(e.authorName||e.authorEmail)&&(t.author={},e.authorName&&(t.author.name=e.authorName.trim()),e.authorEmail&&(t.author.email=e.authorEmail.trim())),e.homepage&&(t.homepage=e.homepage.trim()),e.category&&(t.category=e.category),e.keywords&&(t.keywords=(0,d.parseKeywords)(e.keywords)),e.domain&&(t.domain=e.domain.trim()),e.namespace&&(t.namespace=e.namespace.trim()),await (0,s.registerClaudeCodePlugin)(p,t),c.default.success("Skill registered successfully"),f.resetFields(),v(null),x(),g()}catch(e){console.error("Error registering skill:",e),c.default.error("Failed to register skill")}finally{y(!1)}},k=()=>{f.resetFields(),v(null),g()};return(0,t.jsx)(r.Modal,{title:"Add New Skill",open:e,onCancel:k,footer:null,width:700,className:"top-8",children:(0,t.jsxs)(n.Form,{form:f,layout:"vertical",onFinish:w,className:"mt-4",children:[(0,t.jsx)(n.Form.Item,{label:"GitHub URL",name:"skillUrl",rules:[{required:!0,message:"Please enter a GitHub URL"}],tooltip:"Paste a GitHub URL — repo, folder, or file link. E.g. github.com/org/repo or github.com/org/repo/tree/main/my-skill",children:(0,t.jsx)(i.Input,{placeholder:"https://github.com/org/repo/tree/main/my-skill",className:"rounded-lg",onChange:e=>{let t=function(e){let t=e.trim().replace(/^https?:\/\//,"").replace(/\/+$/,"");if(!t.startsWith("github.com/"))return null;let l=t.slice(11).split("/");if(l.length<2)return null;let a=l[0],r=l[1].replace(/\.git$/,"");if(2===l.length||2===l.length&&r)return{parsed:{source:"github",repo:`${a}/${r}`},label:`GitHub repo — ${a}/${r}`,suggestedName:r};if(l.length>=5&&("tree"===l[2]||"blob"===l[2])){let e=l.slice(4),t=e[e.length-1];if(t&&t.includes(".")&&e.pop(),0===e.length)return{parsed:{source:"github",repo:`${a}/${r}`},label:`GitHub repo — ${a}/${r}`,suggestedName:r};let s=e.join("/");return{parsed:{source:"git-subdir",url:`https://github.com/${a}/${r}`,path:s},label:`GitHub subdir — ${a}/${r} @ ${s}`,suggestedName:e[e.length-1]}}return null}(e.target.value);v(t),t&&(f.getFieldValue("name")||f.setFieldsValue({name:t.suggestedName}))}})}),j&&(0,t.jsxs)("div",{className:"mb-4 px-3 py-2 bg-blue-50 border border-blue-200 rounded-lg text-sm text-blue-700",children:["Detected: ",j.label]}),(0,t.jsx)(n.Form.Item,{label:"Skill Name",name:"name",rules:[{required:!0,message:"Please enter skill name"},{pattern:/^[a-z0-9-]+$/,message:"Name must be kebab-case (lowercase, numbers, hyphens only)"}],tooltip:"Unique identifier in kebab-case format (e.g., my-skill)",children:(0,t.jsx)(i.Input,{placeholder:"my-skill",className:"rounded-lg"})}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)(n.Form.Item,{label:"Domain (Optional)",name:"domain",tooltip:"Top-level grouping in the Skill Hub (e.g., Productivity)",className:"flex-1",children:(0,t.jsx)(i.Input,{placeholder:"Productivity",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Namespace (Optional)",name:"namespace",tooltip:"Sub-grouping within domain (e.g., workflows)",className:"flex-1",children:(0,t.jsx)(i.Input,{placeholder:"workflows",className:"rounded-lg"})})]}),(0,t.jsx)(n.Form.Item,{label:"Description (Optional)",name:"description",tooltip:"Brief description of what the skill does",children:(0,t.jsx)(u,{rows:3,placeholder:"A skill that helps with...",maxLength:500,className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Category (Optional)",name:"category",tooltip:"Select a category or enter a custom one",children:(0,t.jsx)(o.Select,{placeholder:"Select or type a category",allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"rounded-lg",children:h.map(e=>(0,t.jsx)(m,{value:e,children:e},e))})}),(0,t.jsx)(n.Form.Item,{label:"Keywords (Optional)",name:"keywords",tooltip:"Comma-separated list of keywords for search",children:(0,t.jsx)(i.Input,{placeholder:"search, web, api",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Version (Optional)",name:"version",tooltip:"Semantic version (e.g., 1.0.0)",children:(0,t.jsx)(i.Input,{placeholder:"1.0.0",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Author Name (Optional)",name:"authorName",tooltip:"Name of the skill author or organization",children:(0,t.jsx)(i.Input,{placeholder:"Your Name or Organization",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Author Email (Optional)",name:"authorEmail",rules:[{type:"email",message:"Please enter a valid email"}],tooltip:"Contact email for the skill author",children:(0,t.jsx)(i.Input,{type:"email",placeholder:"author@example.com",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{className:"mb-0 mt-6",children:(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(a.Button,{variant:"secondary",onClick:k,disabled:b,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"submit",loading:b,children:b?"Adding...":"Add Skill"})]})})]})})};var p=e.i(166406),x=e.i(871943),f=e.i(360820),b=e.i(94629),y=e.i(68155),j=e.i(152990),v=e.i(682830),w=e.i(389083),k=e.i(269200),_=e.i(942232),C=e.i(977572),N=e.i(427612),S=e.i(64848),T=e.i(496020),M=e.i(592968),E=e.i(727749);let I=({pluginsList:e,isLoading:r,onDeleteClick:s,accessToken:n,isAdmin:i,onPluginClick:o})=>{let[c,u]=(0,l.useState)([{id:"created_at",desc:!0}]),m=[{header:"Skill Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,r=l.name||"";return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.Tooltip,{title:r,children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[150px] justify-start",onClick:()=>o(l.id),children:r})}),(0,t.jsx)(M.Tooltip,{title:"Copy Plugin ID",children:(0,t.jsx)(p.CopyOutlined,{onClick:e=>{var t;e.stopPropagation(),t=l.id,navigator.clipboard.writeText(t),E.default.success("Copied to clipboard!")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Version",accessorKey:"version",cell:({row:e})=>{let l=e.original.version||"N/A";return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:l})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original.description||"No description";return(0,t.jsx)(M.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"text-xs text-gray-600 block max-w-[300px] truncate",children:l})})}},{header:"Category",accessorKey:"category",cell:({row:e})=>{let l=e.original.category;if(!l)return(0,t.jsx)(w.Badge,{color:"gray",className:"text-xs font-normal",size:"xs",children:"Uncategorized"});let a=(0,d.getCategoryBadgeColor)(l);return(0,t.jsx)(w.Badge,{color:a,className:"text-xs font-normal",size:"xs",children:l})}},{header:"Public",accessorKey:"enabled",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(w.Badge,{color:l.enabled?"green":"gray",className:"text-xs font-normal",size:"xs",children:l.enabled?"Yes":"No"})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{var l;let a=e.original;return(0,t.jsx)(M.Tooltip,{title:a.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:(l=a.created_at)?new Date(l).toLocaleString():"-"})})}},...i?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(M.Tooltip,{title:"Delete skill",children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),s(l.name,l.name)},icon:y.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],h=(0,j.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:u,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(k.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(N.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(T.TableRow,{children:e.headers.map(e=>(0,t.jsx)(S.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(f.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(x.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(b.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(_.TableBody,{children:r?(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(C.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e&&e.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(T.TableRow,{className:"h-8 cursor-pointer hover:bg-gray-50",onClick:()=>o(e.original.id),children:e.getVisibleCells().map(e=>(0,t.jsx)(C.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(C.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No skills found. Add one to get started."})})})})})]})})})};var O=e.i(652272),A=e.i(708347);e.s(["default",0,({accessToken:e,userRole:n})=>{let[i,o]=(0,l.useState)([]),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),[h,p]=(0,l.useState)(!1),[x,f]=(0,l.useState)(null),[b,y]=(0,l.useState)(null),j=!!n&&(0,A.isAdminRole)(n),v=async()=>{if(e){m(!0);try{let t=await (0,s.getClaudeCodePluginsList)(e,!1);o(t.plugins)}catch(e){console.error("Error fetching skills:",e)}finally{m(!1)}}};(0,l.useEffect)(()=>{v()},[e]);let w=async()=>{if(x&&e){p(!0);try{await (0,s.deleteClaudeCodePlugin)(e,x.name),E.default.success(`Skill "${x.displayName}" deleted successfully`),v()}catch(e){console.error("Error deleting skill:",e),E.default.error("Failed to delete skill")}finally{p(!1),f(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[b?(0,t.jsx)(O.default,{skill:b,onBack:()=>y(null),isAdmin:j,accessToken:e,onPublishClick:v}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Skills"}),(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["Register Claude Code skills. Published skills appear in the Skill Hub for all users and are served via"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"/claude-code/marketplace.json"}),"."]}),(0,t.jsx)("div",{className:"mt-2 flex gap-2",children:(0,t.jsx)(a.Button,{onClick:()=>d(!0),disabled:!e||!j,children:"+ Add Skill"})})]}),(0,t.jsx)(I,{pluginsList:i,isLoading:u,onDeleteClick:(e,t)=>{f({name:e,displayName:t})},accessToken:e,isAdmin:j,onPluginClick:e=>{let t=i.find(t=>t.id===e);t&&y(t)}})]}),(0,t.jsx)(g,{visible:c,onClose:()=>d(!1),accessToken:e,onSuccess:v}),x&&(0,t.jsxs)(r.Modal,{title:"Delete Skill",open:null!==x,onOk:w,onCancel:()=>f(null),confirmLoading:h,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete skill:"," ",(0,t.jsx)("strong",{children:x.displayName}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],704308)},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(562901),a=e.i(343794),r=e.i(914949),s=e.i(529681),n=e.i(242064),i=e.i(829672),o=e.i(285781),c=e.i(836938),d=e.i(920228),u=e.i(62405),m=e.i(408850),h=e.i(87414),g=e.i(310730);let p=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:l,antCls:a,zIndexPopup:r,colorText:s,colorWarning:n,marginXXS:i,marginXS:o,fontSize:c,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:r,[`&${a}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:o,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${l}`]:{color:n,fontSize:c,lineHeight:1,marginInlineEnd:o},[`${t}-title`]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:i,color:s}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:o}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var x=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let f=e=>{let{prefixCls:a,okButtonProps:r,cancelButtonProps:s,title:i,description:g,cancelText:p,okText:x,okType:f="primary",icon:b=t.createElement(l.default,null),showCancel:y=!0,close:j,onConfirm:v,onCancel:w,onPopupClick:k}=e,{getPrefixCls:_}=t.useContext(n.ConfigContext),[C]=(0,m.useLocale)("Popconfirm",h.default.Popconfirm),N=(0,c.getRenderPropValue)(i),S=(0,c.getRenderPropValue)(g);return t.createElement("div",{className:`${a}-inner-content`,onClick:k},t.createElement("div",{className:`${a}-message`},b&&t.createElement("span",{className:`${a}-message-icon`},b),t.createElement("div",{className:`${a}-message-text`},N&&t.createElement("div",{className:`${a}-title`},N),S&&t.createElement("div",{className:`${a}-description`},S))),t.createElement("div",{className:`${a}-buttons`},y&&t.createElement(d.default,Object.assign({onClick:w,size:"small"},s),p||(null==C?void 0:C.cancelText)),t.createElement(o.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,u.convertLegacyProps)(f)),r),actionFn:v,close:j,prefixCls:_("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},x||(null==C?void 0:C.okText))))};var b=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let y=t.forwardRef((e,o)=>{var c,d;let{prefixCls:u,placement:m="top",trigger:h="click",okType:g="primary",icon:x=t.createElement(l.default,null),children:y,overlayClassName:j,onOpenChange:v,onVisibleChange:w,overlayStyle:k,styles:_,classNames:C}=e,N=b(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:S,className:T,style:M,classNames:E,styles:I}=(0,n.useComponentConfig)("popconfirm"),[O,A]=(0,r.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(d=e.defaultOpen)?d:e.defaultVisible}),D=(e,t)=>{A(e,!0),null==w||w(e),null==v||v(e,t)},B=S("popconfirm",u),R=(0,a.default)(B,T,j,E.root,null==C?void 0:C.root),F=(0,a.default)(E.body,null==C?void 0:C.body),[P]=p(B);return P(t.createElement(i.default,Object.assign({},(0,s.default)(N,["title"]),{trigger:h,placement:m,onOpenChange:(t,l)=>{let{disabled:a=!1}=e;a||D(t,l)},open:O,ref:o,classNames:{root:R,body:F},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},I.root),M),k),null==_?void 0:_.root),body:Object.assign(Object.assign({},I.body),null==_?void 0:_.body)},content:t.createElement(f,Object.assign({okType:g,icon:x},e,{prefixCls:B,close:e=>{D(!1,e)},onConfirm:t=>{var l;return null==(l=e.onConfirm)?void 0:l.call(void 0,t)},onCancel:t=>{var l;D(!1,t),null==(l=e.onCancel)||l.call(void 0,t)}})),"data-popover-inject":!0}),y))});y._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:l,placement:r,className:s,style:i}=e,o=x(e,["prefixCls","placement","className","style"]),{getPrefixCls:c}=t.useContext(n.ConfigContext),d=c("popconfirm",l),[u]=p(d);return u(t.createElement(g.default,{placement:r,className:(0,a.default)(d,s),style:i,content:t.createElement(f,Object.assign({prefixCls:d},o))}))},e.s(["Popconfirm",0,y],883552)},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(914949),r=e.i(404948);let s=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,s],836938);var n=e.i(613541),i=e.i(763731),o=e.i(242064),c=e.i(491816);e.i(793154);var d=e.i(880476),u=e.i(183293),m=e.i(717356),h=e.i(320560),g=e.i(307358),p=e.i(246422),x=e.i(838378),f=e.i(617933);let b=(0,p.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:l}=e,a=(0,x.mergeToken)(e,{popoverBg:t,popoverColor:l});return[(e=>{let{componentCls:t,popoverColor:l,titleMinWidth:a,fontWeightStrong:r,innerPadding:s,boxShadowSecondary:n,colorTextHeading:i,borderRadiusLG:o,zIndexPopup:c,titleMarginBottom:d,colorBgElevated:m,popoverBg:g,titleBorderBottom:p,innerContentPadding:x,titlePadding:f}=e;return[{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:o,boxShadow:n,padding:s},[`${t}-title`]:{minWidth:a,marginBottom:d,color:i,fontWeight:r,borderBottom:p,padding:f},[`${t}-inner-content`]:{color:l,padding:x}})},(0,h.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:f.PresetColors.map(l=>{let a=e[`${l}6`];return{[`&${t}-${l}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:l,fontHeight:a,padding:r,wireframe:s,zIndexPopupBase:n,borderRadiusLG:i,marginXS:o,lineType:c,colorSplit:d,paddingSM:u}=e,m=l-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:n+30},(0,g.getArrowToken)(e)),(0,h.getArrowOffsetToken)({contentRadius:i,limitVerticalRadius:!0})),{innerPadding:12*!s,titleMarginBottom:s?0:o,titlePadding:s?`${m/2}px ${r}px ${m/2-t}px`:0,titleBorderBottom:s?`${t}px ${c} ${d}`:"none",innerContentPadding:s?`${u}px ${r}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var y=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let j=({title:e,content:l,prefixCls:a})=>e||l?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),l&&t.createElement("div",{className:`${a}-inner-content`},l)):null,v=e=>{let{hashId:a,prefixCls:r,className:n,style:i,placement:o="top",title:c,content:u,children:m}=e,h=s(c),g=s(u),p=(0,l.default)(a,r,`${r}-pure`,`${r}-placement-${o}`,n);return t.createElement("div",{className:p,style:i},t.createElement("div",{className:`${r}-arrow`}),t.createElement(d.Popup,Object.assign({},e,{className:a,prefixCls:r}),m||t.createElement(j,{prefixCls:r,title:h,content:g})))},w=e=>{let{prefixCls:a,className:r}=e,s=y(e,["prefixCls","className"]),{getPrefixCls:n}=t.useContext(o.ConfigContext),i=n("popover",a),[c,d,u]=b(i);return c(t.createElement(v,Object.assign({},s,{prefixCls:i,hashId:d,className:(0,l.default)(r,u)})))};e.s(["Overlay",0,j,"default",0,w],310730);var k=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let _=t.forwardRef((e,d)=>{var u,m;let{prefixCls:h,title:g,content:p,overlayClassName:x,placement:f="top",trigger:y="hover",children:v,mouseEnterDelay:w=.1,mouseLeaveDelay:_=.1,onOpenChange:C,overlayStyle:N={},styles:S,classNames:T}=e,M=k(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:I,style:O,classNames:A,styles:D}=(0,o.useComponentConfig)("popover"),B=E("popover",h),[R,F,P]=b(B),$=E(),L=(0,l.default)(x,F,P,I,A.root,null==T?void 0:T.root),H=(0,l.default)(A.body,null==T?void 0:T.body),[z,V]=(0,a.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),U=(e,t)=>{V(e,!0),null==C||C(e,t)},q=s(g),W=s(p);return R(t.createElement(c.default,Object.assign({placement:f,trigger:y,mouseEnterDelay:w,mouseLeaveDelay:_},M,{prefixCls:B,classNames:{root:L,body:H},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},D.root),O),N),null==S?void 0:S.root),body:Object.assign(Object.assign({},D.body),null==S?void 0:S.body)},ref:d,open:z,onOpenChange:e=>{U(e)},overlay:q||W?t.createElement(j,{prefixCls:B,title:q,content:W}):null,transitionName:(0,n.getTransitionName)($,"zoom-big",M.transitionName),"data-popover-inject":!0}),(0,i.cloneElement)(v,{onKeyDown:e=>{var l,a;(0,t.isValidElement)(v)&&(null==(a=null==v?void 0:(l=v.props).onKeyDown)||a.call(l,e)),e.keyCode===r.default.ESC&&U(!1,e)}})))});_._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,_],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},822315,(e,t,l)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",l="minute",a="hour",r="week",s="month",n="quarter",i="year",o="date",c="Invalid Date",d=/^(\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,l){var a=String(e);return!a||a.length>=t?e:""+Array(t+1-a.length).join(l)+e},h="en",g={};g[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"],l=e%100;return"["+e+(t[(l-20)%10]||t[l]||t[0])+"]"}};var p="$isDayjsObject",x=function(e){return e instanceof j||!(!e||!e[p])},f=function e(t,l,a){var r;if(!t)return h;if("string"==typeof t){var s=t.toLowerCase();g[s]&&(r=s),l&&(g[s]=l,r=s);var n=t.split("-");if(!r&&n.length>1)return e(n[0])}else{var i=t.name;g[i]=t,r=i}return!a&&r&&(h=r),r||!a&&h},b=function(e,t){if(x(e))return e.clone();var l="object"==typeof t?t:{};return l.date=e,l.args=arguments,new j(l)},y={s:m,z:function(e){var t=-e.utcOffset(),l=Math.abs(t);return(t<=0?"+":"-")+m(Math.floor(l/60),2,"0")+":"+m(l%60,2,"0")},m:function e(t,l){if(t.date(){"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(115504);function r({className:e="",...r}){var s,n;let i=(0,l.useId)();return s=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===i),l=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==i);t&&l&&(t.currentTime=l.currentTime)},n=[i],(0,l.useLayoutEffect)(s,n),(0,t.jsxs)("svg",{"data-spinner-id":i,className:(0,a.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...r,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>r],571303)},936578,e=>{"use strict";var t=e.i(843476),l=e.i(115504),a=e.i(571303);function r(){return(0,t.jsxs)("div",{className:(0,l.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(a.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>r])},902739,e=>{"use strict";var t=e.i(843476),l=e.i(111672),a=e.i(764205),r=e.i(135214),s=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:n,sidebarCollapsed:i})=>{let{accessToken:o}=(0,r.default)(),[c,d]=(0,s.useState)(null),[u,m]=(0,s.useState)(!1),[h,g]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,b]=(0,s.useState)(!1),[y,j]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(!o)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,a.getUISettings)(o);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),d(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&m(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&x(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&b(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&j(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[o]),(0,t.jsx)(l.default,{setPage:e,defaultSelectedKey:n,collapsed:i,enabledPagesInternalUsers:c,enableProjectsUI:u,disableAgentsForInternalUsers:h,allowAgentsForTeamAdmins:p,disableVectorStoresForInternalUsers:f,allowVectorStoresForTeamAdmins:y})}])},208075,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),r=e.i(629569),s=e.i(599724),n=e.i(779241),i=e.i(994388),o=e.i(275144),c=e.i(764205),d=e.i(727749);e.s(["default",0,({userID:e,userRole:u,accessToken:m})=>{let{logoUrl:h,setLogoUrl:g,faviconUrl:p,setFaviconUrl:x}=(0,o.useTheme)(),[f,b]=(0,l.useState)(""),[y,j]=(0,l.useState)(""),[v,w]=(0,l.useState)(!1);(0,l.useEffect)(()=>{m&&k()},[m]);let k=async()=>{try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",l=await fetch(t,{method:"GET",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();b(e.values?.logo_url||""),j(e.values?.favicon_url||""),g(e.values?.logo_url||null),x(e.values?.favicon_url||null)}}catch(e){console.error("Error fetching theme settings:",e)}},_=async()=>{w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:f||null,favicon_url:y||null})})).ok)d.default.success("Theme settings updated successfully!"),g(f||null),x(y||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating theme settings:",e),d.default.fromBackend("Failed to update theme settings")}finally{w(!1)}},C=async()=>{b(""),j(""),g(null),x(null),w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:null,favicon_url:null})})).ok)d.default.success("Theme settings reset to default!");else throw Error("Failed to reset")}catch(e){console.error("Error resetting theme settings:",e),d.default.fromBackend("Failed to reset theme settings")}finally{w(!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)(r.Title,{className:"text-2xl font-bold mb-2",children:"UI Theme Customization"}),(0,t.jsx)(s.Text,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo and favicon."})]}),(0,t.jsx)(a.Card,{className:"shadow-sm p-6",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,t.jsx)(n.TextInput,{placeholder:"https://example.com/logo.png",value:f,onValueChange:e=>{b(e),g(e||null)},className:"w-full"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty for default"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Favicon URL"}),(0,t.jsx)(n.TextInput,{placeholder:"https://example.com/favicon.ico",value:y,onValueChange:e=>{j(e),x(e||null)},className:"w-full"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 mt-1",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.jsx)(i.Button,{onClick:_,loading:v,disabled:v,color:"indigo",children:"Save Changes"}),(0,t.jsx)(i.Button,{onClick:C,loading:v,disabled:v,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}])},662316,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(464571),r=e.i(166406),s=e.i(629569),n=e.i(764205),i=e.i(727749);e.s(["default",0,({accessToken:e})=>{let[o,c]=(0,l.useState)(`{ + "model": "openai/gpt-4o", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "Explain quantum computing in simple terms" + } + ], + "temperature": 0.7, + "max_tokens": 500, + "stream": true +}`),[d,u]=(0,l.useState)(""),[m,h]=(0,l.useState)(!1),g=async()=>{h(!0);try{let r;try{r=JSON.parse(o)}catch(e){i.default.fromBackend("Invalid JSON in request body"),h(!1);return}let s={call_type:"completion",request_body:r};if(!e){i.default.fromBackend("No access token found"),h(!1);return}let c=await (0,n.transformRequestCall)(e,s);if(c.raw_request_api_base&&c.raw_request_body){var t,l,a;let e,r,s=(t=c.raw_request_api_base,l=c.raw_request_body,a=c.raw_request_headers||{},e=JSON.stringify(l,null,2).split("\n").map(e=>` ${e}`).join("\n"),r=Object.entries(a).map(([e,t])=>`-H '${e}: ${t}'`).join(" \\\n "),`curl -X POST \\ + ${t} \\ + ${r?`${r} \\ + `:""}-H 'Content-Type: application/json' \\ + -d '{ +${e} + }'`);u(s),i.default.success("Request transformed successfully")}else{let e="string"==typeof c?c:JSON.stringify(c);u(e),i.default.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),i.default.fromBackend("Failed to transform request")}finally{h(!1)}};return(0,t.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,t.jsx)(s.Title,{children:"Playground"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"See how LiteLLM transforms your request for the specified provider."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"16px",width:"100%",minWidth:0,overflow:"hidden"},className:"mt-4",children:[(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"600px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Original Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"The request you would send to LiteLLM /chat/completions endpoint."})]}),(0,t.jsx)("textarea",{style:{flex:"1 1 auto",width:"100%",minHeight:"240px",padding:"16px",border:"1px solid #e8e8e8",borderRadius:"6px",fontFamily:"monospace",fontSize:"14px",resize:"none",marginBottom:"24px",overflow:"auto"},value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),g())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,t.jsxs)(a.Button,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:g,loading:m,children:[(0,t.jsx)("span",{children:"Transform"}),(0,t.jsx)("span",{children:"→"})]})})]}),(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"800px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Transformed Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"How LiteLLM transforms your request for the specified provider."}),(0,t.jsx)("br",{}),(0,t.jsx)("p",{style:{color:"#666",margin:0},className:"text-xs",children:"Note: Sensitive headers are not shown."})]}),(0,t.jsxs)("div",{style:{position:"relative",backgroundColor:"#f5f5f5",borderRadius:"6px",flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsx)("pre",{style:{padding:"16px",fontFamily:"monospace",fontSize:"14px",margin:0,overflow:"auto",flex:"1 1 auto"},children:d||`curl -X POST \\ + https://api.openai.com/v1/chat/completions \\ + -H 'Authorization: Bearer sk-xxx' \\ + -H 'Content-Type: application/json' \\ + -d '{ + "model": "gpt-4", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + } + ], + "temperature": 0.7 + }'`}),(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(r.CopyOutlined,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(d||""),i.default.success("Copied to clipboard")}})]})]})]}),(0,t.jsx)("div",{className:"mt-4 text-right w-full",children:(0,t.jsxs)("p",{className:"text-sm text-gray-500",children:["Found an error? File an issue"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})]})}])},673709,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(678784);let r=(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 s=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:i})=>{let[o,c]=(0,l.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:o?(0,t.jsx)(a.CheckIcon,{size:16}):(0,t.jsx)(r,{size:16})}),(0,t.jsx)(s.Prism,{language:i,style:n,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],673709)},778917,e=>{"use strict";var t=e.i(546467);e.s(["ExternalLink",()=>t.default])},646050,e=>{"use strict";var t=e.i(843476),l=e.i(994388),a=e.i(304967),r=e.i(197647),s=e.i(653824),n=e.i(269200),i=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),m=e.i(881073),h=e.i(404206),g=e.i(723731),p=e.i(599724),x=e.i(271645),f=e.i(650056),b=e.i(127952),y=e.i(902555),j=e.i(727749),v=e.i(266027),w=e.i(954616),k=e.i(912598),_=e.i(243652),C=e.i(764205),N=e.i(135214);let S=(0,_.createQueryKeys)("budgets");var T=e.i(779241),M=e.i(677667),E=e.i(898667),I=e.i(130643),O=e.i(464571),A=e.i(212931),D=e.i(808613),B=e.i(28651),R=e.i(199133);let F=({isModalVisible:e,setIsModalVisible:l})=>{let[a]=D.Form.useForm(),r=(()=>{let{accessToken:e}=(0,N.default)(),t=(0,k.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,C.budgetCreateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),s=async e=>{try{j.default.info("Making API Call"),await r.mutateAsync(e),j.default.success("Budget Created"),a.resetFields(),l(!1)}catch(e){console.error("Error creating the budget:",e),j.default.fromBackend(`Error creating the budget: ${e}`)}};return(0,t.jsx)(A.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),a.resetFields()},onCancel:()=>{l(!1),a.resetFields()},children:(0,t.jsxs)(D.Form,{form:a,onFinish:s,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,t.jsx)(T.TextInput,{placeholder:""})}),(0,t.jsx)(D.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(M.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(I.AccordionBody,{children:[(0,t.jsx)(D.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(B.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(R.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(R.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(R.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(R.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(O.Button,{htmlType:"submit",children:"Create Budget"})})]})})},P=({isModalVisible:e,setIsModalVisible:l,existingBudget:a})=>{let[r]=D.Form.useForm(),s=(()=>{let{accessToken:e}=(0,N.default)(),t=(0,k.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,C.budgetUpdateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})();(0,x.useEffect)(()=>{r.setFieldsValue(a)},[a,r]);let n=async e=>{try{j.default.info("Making API Call"),await s.mutateAsync(e),j.default.success("Budget Updated"),r.resetFields(),l(!1)}catch(e){console.error("Error updating the budget:",e),j.default.fromBackend(`Error updating the budget: ${e}`)}};return(0,t.jsx)(A.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),r.resetFields()},onCancel:()=>{l(!1),r.resetFields()},children:(0,t.jsxs)(D.Form,{form:r,onFinish:n,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:a,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Form.Item,{label:"Budget ID",name:"budget_id",help:"Budget ID cannot be changed after creation",children:(0,t.jsx)(T.TextInput,{placeholder:"",disabled:!0})}),(0,t.jsx)(D.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(M.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(I.AccordionBody,{children:[(0,t.jsx)(D.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(B.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(R.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(R.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(R.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(R.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(O.Button,{htmlType:"submit",children:"Save"})})]})})},$=` +curl -X POST --location '/end_user/new' \\ + +-H 'Authorization: Bearer ' \\ + +-H 'Content-Type: application/json' \\ + +-d '{"user_id": "my-customer-id', "budget_id": ""}' # 👈 KEY CHANGE + +`,L=` +curl -X POST --location '/chat/completions' \\ + +-H 'Authorization: Bearer ' \\ + +-H 'Content-Type: application/json' \\ + +-d '{ + "model": "gpt-3.5-turbo', + "messages":[{"role": "user", "content": "Hey, how's it going?"}], + "user": "my-customer-id" +}' # 👈 KEY CHANGE + +`,H=`from openai import OpenAI +client = OpenAI( + base_url="", + api_key="" +) + +completion = client.chat.completions.create( + model="gpt-3.5-turbo", + messages=[ + {"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Hello!"} + ], + user="my-customer-id" +) + +print(completion.choices[0].message)`;e.s(["default",0,({accessToken:e})=>{let[_,T]=(0,x.useState)(!1),[M,E]=(0,x.useState)(!1),[I,O]=(0,x.useState)(null),[A,D]=(0,x.useState)(!1),{data:B=[]}=(()=>{let{accessToken:e}=(0,N.default)();return(0,v.useQuery)({queryKey:S.list({}),queryFn:async()=>(await (0,C.getBudgetList)(e)??[]).filter(e=>null!=e),enabled:!!e})})(),R=(()=>{let{accessToken:e}=(0,N.default)(),t=(0,k.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,C.budgetDeleteCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),z=async t=>{null!=e&&(O(t),E(!0))},V=async()=>{if(I&&null!=e)try{await R.mutateAsync(I.budget_id),j.default.success("Budget deleted.")}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{D(!1),O(null)}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(l.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>T(!0),children:"+ Create Budget"}),(0,t.jsxs)(s.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Budgets"}),(0,t.jsx)(r.Tab,{children:"Examples"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(F,{isModalVisible:_,setIsModalVisible:T}),I&&(0,t.jsx)(P,{isModalVisible:M,setIsModalVisible:E,existingBudget:I}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(p.Text,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(n.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"Budget ID"}),(0,t.jsx)(d.TableHeaderCell,{children:"Max Budget"}),(0,t.jsx)(d.TableHeaderCell,{children:"TPM"}),(0,t.jsx)(d.TableHeaderCell,{children:"RPM"})]})}),(0,t.jsx)(i.TableBody,{children:B.slice().sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()).map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e.budget_id}),(0,t.jsx)(o.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(y.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>z(e),dataTestId:"edit-budget-button"}),(0,t.jsx)(y.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{O(e),D(!0)},dataTestId:"delete-budget-button"})]},e.budget_id))})]})]}),(0,t.jsx)(b.default,{isOpen:A,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:I?.budget_id,code:!0},{label:"Max Budget",value:I?.max_budget},{label:"TPM",value:I?.tpm_limit},{label:"RPM",value:I?.rpm_limit}],onCancel:()=>{D(!1)},onOk:V,confirmLoading:R.isPending})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(p.Text,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(s.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Assign Budget to Customer"}),(0,t.jsx)(r.Tab,{children:"Test it (Curl)"}),(0,t.jsx)(r.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:$})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:L})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"python",children:H})})]})]})]})})]})]})]})}],646050)},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,t)=>(e[t.team_id]=t.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,t)=>{let l=t.find(t=>t.team_id===e);return l?l.team_alias:null}])},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["GlobalOutlined",0,s],160818)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["MinusCircleOutlined",0,s],564897)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["SaveOutlined",0,s],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,r,s)=>{let n;n="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,r?.organization_id||null,l):await (0,t.teamListCall)(e,r?.organization_id||null),console.log(`givenTeams: ${n}`),s(n)};e.s(["fetchTeams",0,l])},747871,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(269200),r=e.i(942232),s=e.i(977572),n=e.i(427612),i=e.i(64848),o=e.i(496020),c=e.i(304967),d=e.i(994388),u=e.i(599724),m=e.i(389083),h=e.i(764205),g=e.i(727749);e.s(["default",0,({accessToken:e,userID:p})=>{let[x,f]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{if(e&&p)try{let t=await (0,h.availableTeamListCall)(e);f(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,p]);let b=async t=>{if(e&&p)try{await (0,h.teamMemberAddCall)(e,t,{user_id:p,role:"user"}),g.default.success("Successfully joined team"),f(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),g.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(n.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(i.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(i.TableHeaderCell,{children:"Description"}),(0,t.jsx)(i.TableHeaderCell,{children:"Members"}),(0,t.jsx)(i.TableHeaderCell,{children:"Models"}),(0,t.jsx)(i.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(r.TableBody,{children:[x.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Text,{children:e.team_alias})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Text,{children:e.description||"No description available"})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsxs)(u.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,l)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(u.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},l)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(u.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Button,{size:"xs",variant:"secondary",onClick:()=>b(e.team_id),children:"Join Team"})})]},e.team_id)),0===x.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(s.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(u.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])},468133,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(175712),r=e.i(464571),s=e.i(28651),n=e.i(898586),i=e.i(482725),o=e.i(199133),c=e.i(262218),d=e.i(621192),u=e.i(178654),m=e.i(751904),h=e.i(987432),g=e.i(764205),p=e.i(860585),x=e.i(355619),f=e.i(727749),b=e.i(162386);let{Title:y,Text:j}=n.Typography,v=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],w=({label:e,description:l,isEditing:a,viewContent:r,editContent:s})=>(0,t.jsxs)(d.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(u.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:l})]}),(0,t.jsx)(u.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:a?s:r})})]}),k=()=>(0,t.jsx)(j,{className:"text-gray-400 italic",children:"Not set"}),_=(e,l)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:l?l(e):e},e))}):(0,t.jsx)(k,{}),C={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[n,d]=(0,l.useState)(!0),[u,N]=(0,l.useState)(C),[S,T]=(0,l.useState)(!1),[M,E]=(0,l.useState)(C),[I,O]=(0,l.useState)(!1),[A,D]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(!e)return d(!1);try{let t=await (0,g.getDefaultTeamSettings)(e),l={...C,...t.values||{}};N(l),E(l)}catch(e){console.error("Error fetching team SSO settings:",e),D(!0),f.default.fromBackend("Failed to fetch team settings")}finally{d(!1)}})()},[e]);let B=async()=>{if(e){O(!0);try{let t=await (0,g.updateDefaultTeamSettings)(e,M),l={...C,...t.settings||{}};N(l),E(l),T(!1),f.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),f.default.fromBackend("Failed to update team settings")}finally{O(!1)}}},R=(e,t)=>{E(l=>({...l,[e]:t}))};return n?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(i.Spin,{size:"large"})}):A?(0,t.jsx)(a.Card,{children:(0,t.jsx)(j,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(a.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(y,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(j,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:S?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(r.Button,{onClick:()=>{T(!1),E(u)},disabled:I,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"primary",onClick:B,loading:I,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(r.Button,{onClick:()=>T(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:S,viewContent:null!=u.max_budget?(0,t.jsxs)(j,{children:["$",Number(u.max_budget).toLocaleString()]}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.max_budget,onChange:e=>R("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(w,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:S,viewContent:u.budget_duration?(0,t.jsx)(j,{children:(0,p.getBudgetDurationLabel)(u.budget_duration)}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(p.default,{value:M.budget_duration||null,onChange:e=>R("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(w,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:S,viewContent:null!=u.tpm_limit?(0,t.jsx)(j,{children:u.tpm_limit.toLocaleString()}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.tpm_limit,onChange:e=>R("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(w,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:S,viewContent:null!=u.rpm_limit?(0,t.jsx)(j,{children:u.rpm_limit.toLocaleString()}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.rpm_limit,onChange:e=>R("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Models",description:"Default list of models that new teams can access.",isEditing:S,viewContent:_(u.models,x.getModelDisplayName),editContent:(0,t.jsx)(b.ModelSelect,{value:M.models||[],onChange:e=>R("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(w,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:S,viewContent:_(u.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:M.team_member_permissions||[],onChange:e=>R("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:l,onClose:a})=>(0,t.jsx)(c.Tag,{color:"blue",closable:l,onClose:a,className:"mr-1 mt-1 mb-1",children:e}),children:v.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},735042,e=>{"use strict";e.i(247167);var t=e.i(843476),l=e.i(584935),a=e.i(290571),r=e.i(271645),s=e.i(95779),n=e.i(444755),i=e.i(673706);let o=(0,i.makeClassName)("BarList");function c(e,t){let{data:l=[],color:c,valueFormatter:d=i.defaultValueFormatter,showAnimation:u=!1,onValueChange:m,sortOrder:h="descending",className:g}=e,p=(0,a.__rest)(e,["data","color","valueFormatter","showAnimation","onValueChange","sortOrder","className"]),x=m?"button":"div",f=r.default.useMemo(()=>"none"===h?l:[...l].sort((e,t)=>"ascending"===h?e.value-t.value:t.value-e.value),[l,h]),b=r.default.useMemo(()=>{let e=Math.max(...f.map(e=>e.value),0);return f.map(t=>0===t.value?0:Math.max(t.value/e*100,2))},[f]);return r.default.createElement("div",Object.assign({ref:t,className:(0,n.tremorTwMerge)(o("root"),"flex justify-between space-x-6",g),"aria-sort":h},p),r.default.createElement("div",{className:(0,n.tremorTwMerge)(o("bars"),"relative w-full space-y-1.5")},f.map((e,t)=>{var l,a,d;let h=e.icon;return r.default.createElement(x,{key:null!=(l=e.key)?l:t,onClick:()=>{null==m||m(e)},className:(0,n.tremorTwMerge)(o("bar"),"group w-full flex items-center rounded-tremor-small",m?["cursor-pointer","hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-subtle/40"]:"")},r.default.createElement("div",{className:(0,n.tremorTwMerge)("flex items-center rounded transition-all bg-opacity-40","h-8",e.color||c?[(0,i.getColorClassNames)(null!=(a=e.color)?a:c,s.colorPalette.background).bgColor,m?"group-hover:bg-opacity-30":""]:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle/60",!m||e.color||c?"":"group-hover:bg-tremor-brand-subtle/30 group-hover:dark:bg-dark-tremor-brand-subtle/70",t===f.length-1?"mb-0":"",u?"duration-500":""),style:{width:`${b[t]}%`,transition:u?"all 1s":""}},r.default.createElement("div",{className:(0,n.tremorTwMerge)("absolute left-2 pr-4 flex max-w-full")},h?r.default.createElement(h,{className:(0,n.tremorTwMerge)(o("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?r.default.createElement("a",{href:e.href,target:null!=(d=e.target)?d:"_blank",rel:"noreferrer",className:(0,n.tremorTwMerge)(o("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default",m?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:e=>e.stopPropagation()},e.name):r.default.createElement("p",{className:(0,n.tremorTwMerge)(o("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name))))})),r.default.createElement("div",{className:o("labels")},f.map((e,t)=>{var l;return r.default.createElement("div",{key:null!=(l=e.key)?l:t,className:(0,n.tremorTwMerge)(o("labelWrapper"),"flex justify-end items-center","h-8",t===f.length-1?"mb-0":"mb-1.5")},r.default.createElement("p",{className:(0,n.tremorTwMerge)(o("labelText"),"whitespace-nowrap leading-none truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},d(e.value)))})))}c.displayName="BarList";let d=r.default.forwardRef(c);var u=e.i(304967),m=e.i(629569),h=e.i(269200),g=e.i(427612),p=e.i(64848),x=e.i(496020),f=e.i(977572),b=e.i(942232),y=e.i(37091),j=e.i(617802),v=e.i(144267),w=e.i(350967),k=e.i(309426),_=e.i(599724),C=e.i(404206),N=e.i(723731),S=e.i(653824),T=e.i(881073),M=e.i(197647),E=e.i(206929),I=e.i(35983),O=e.i(413990),A=e.i(476961),D=e.i(994388),B=e.i(621642),R=e.i(25080),F=e.i(764205),P=e.i(1023),$=e.i(500330);console.log("process.env.NODE_ENV","production");let L=e=>null!==e&&("Admin"===e||"Admin Viewer"===e);e.s(["default",0,({accessToken:e,token:a,userRole:s,userID:n,keys:i,premiumUser:o})=>{let c=new Date,[H,z]=(0,r.useState)([]),[V,U]=(0,r.useState)([]),[q,W]=(0,r.useState)([]),[G,K]=(0,r.useState)([]),[Y,J]=(0,r.useState)([]),[Q,X]=(0,r.useState)([]),[Z,ee]=(0,r.useState)([]),[et,el]=(0,r.useState)([]),[ea,er]=(0,r.useState)([]),[es,en]=(0,r.useState)([]),[ei,eo]=(0,r.useState)({}),[ec,ed]=(0,r.useState)([]),[eu,em]=(0,r.useState)(""),[eh,eg]=(0,r.useState)(["all-tags"]),[ep,ex]=(0,r.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[ef,eb]=(0,r.useState)(null),[ey,ej]=(0,r.useState)(0),ev=new Date(c.getFullYear(),c.getMonth(),1),ew=new Date(c.getFullYear(),c.getMonth()+1,0),ek=eM(ev),e_=eM(ew);function eC(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}console.log("keys in usage",i),console.log("premium user in usage",o);let eN=async()=>{if(e)try{let t=await (0,F.getProxyUISettings)(e);return console.log("usage tab: proxy_settings",t),t}catch(e){console.error("Error fetching proxy settings:",e)}};(0,r.useEffect)(()=>{eT(ep.from,ep.to)},[ep,eh]);let eS=async(t,l,a)=>{if(!t||!l||!e)return;console.log("uiSelectedKey",a);let r=await (0,F.adminTopEndUsersCall)(e,a,t.toISOString(),l.toISOString());console.log("End user data updated successfully",r),K(r)},eT=async(t,l)=>{if(!t||!l||!e)return;let a=await eN();a?.DISABLE_EXPENSIVE_DB_QUERIES||(X((await (0,F.tagsSpendLogsCall)(e,t.toISOString(),l.toISOString(),0===eh.length?void 0:eh)).spend_per_tag),console.log("Tag spend data updated successfully"))};function eM(e){let t=e.getFullYear(),l=e.getMonth()+1,a=e.getDate();return`${t}-${l<10?"0"+l:l}-${a<10?"0"+a:a}`}console.log(`Start date is ${ek}`),console.log(`End date is ${e_}`);let eE=async(e,t,l)=>{try{let l=await e();t(l)}catch(e){console.error(l,e)}},eI=(e,t,l,a)=>{let r=[],s=new Date(t),n=new Map(e.map(e=>{let t=(e=>{if(e.includes("-"))return e;{let[t,l]=e.split(" ");return new Date(new Date().getFullYear(),new Date(`${t} 01 2024`).getMonth(),parseInt(l)).toISOString().split("T")[0]}})(e.date);return[t,{...e,date:t}]}));for(;s<=l;){let e=s.toISOString().split("T")[0];if(n.has(e))r.push(n.get(e));else{let t={date:e,api_requests:0,total_tokens:0};a.forEach(e=>{t[e]||(t[e]=0)}),r.push(t)}s.setDate(s.getDate()+1)}return r},eO=async()=>{if(e)try{let t=await (0,F.adminSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=eI(t,a,r,[]),n=Number(s.reduce((e,t)=>e+(t.spend||0),0).toFixed(2));ej(n),z(s)}catch(e){console.error("Error fetching overall spend:",e)}},eA=async()=>{e&&await eE(async()=>(await (0,F.adminTopKeysCall)(e)).map(e=>({key:e.api_key.substring(0,10),api_key:e.api_key,key_alias:e.key_alias,spend:Number(e.total_spend.toFixed(2))})),U,"Error fetching top keys")},eD=async()=>{e&&await eE(async()=>(await (0,F.adminTopModelsCall)(e)).map(e=>({key:e.model,spend:(0,$.formatNumberWithCommas)(e.total_spend,2)})),W,"Error fetching top models")},eB=async()=>{e&&await eE(async()=>{let t=await (0,F.teamSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0);return J(eI(t.daily_spend,a,r,t.teams)),el(t.teams),t.total_spend_per_team.map(e=>({name:e.team_id||"",value:(0,$.formatNumberWithCommas)(e.total_spend||0,2)}))},er,"Error fetching team spend")},eR=async()=>{if(e)try{let t=await (0,F.adminGlobalActivity)(e,ek,e_),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=eI(t.daily_data||[],a,r,["api_requests","total_tokens"]);eo({...t,daily_data:s})}catch(e){console.error("Error fetching global activity:",e)}},eF=async()=>{if(e)try{let t=await (0,F.adminGlobalActivityPerModel)(e,ek,e_),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=t.map(e=>({...e,daily_data:eI(e.daily_data||[],a,r,["api_requests","total_tokens"])}));ed(s)}catch(e){console.error("Error fetching global activity per model:",e)}};return((0,r.useEffect)(()=>{(async()=>{if(e&&a&&s&&n){let t=await eN();!(t&&(eb(t),t?.DISABLE_EXPENSIVE_DB_QUERIES))&&(console.log("fetching data - valiue of proxySettings",ef),eO(),eE(()=>e&&a?(0,F.adminspendByProvider)(e,a,ek,e_):Promise.reject("No access token or token"),en,"Error fetching provider spend"),eA(),eD(),eR(),eF(),L(s)&&(eB(),e&&eE(async()=>(await (0,F.allTagNamesCall)(e)).tag_names,ee,"Error fetching tag names"),e&&eE(()=>(0,F.tagsSpendLogsCall)(e,ep.from?.toISOString(),ep.to?.toISOString(),void 0),e=>X(e.spend_per_tag),"Error fetching top tags"),e&&eE(()=>(0,F.adminTopEndUsersCall)(e,null,void 0,void 0),K,"Error fetching top end users")))}})()},[e,a,s,n,ek,e_]),ef?.DISABLE_EXPENSIVE_DB_QUERIES)?(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Database Query Limit Reached"}),(0,t.jsxs)(_.Text,{className:"mt-4",children:["SpendLogs in DB has ",ef.NUM_SPEND_LOGS_ROWS," rows.",(0,t.jsx)("br",{}),"Please follow our guide to view usage when SpendLogs has more than 1M rows."]}),(0,t.jsx)(D.Button,{className:"mt-4",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/spending_monitoring",target:"_blank",children:"View Usage Guide"})})]})}):(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{className:"mt-2",children:[(0,t.jsx)(M.Tab,{children:"All Up"}),L(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Tab,{children:"Team Based Usage"}),(0,t.jsx)(M.Tab,{children:"Customer Usage"}),(0,t.jsx)(M.Tab,{children:"Tag Based Usage"})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{})})]}),(0,t.jsxs)(N.TabPanels,{children:[(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(M.Tab,{children:"Cost"}),(0,t.jsx)(M.Tab,{children:"Activity"})]}),(0,t.jsxs)(N.TabPanels,{children:[(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[100vh] w-full",children:[(0,t.jsxs)(k.Col,{numColSpan:2,children:[(0,t.jsxs)(_.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content mb-2 mt-2 text-lg",children:["Project Spend ",new Date().toLocaleString("default",{month:"long"})," 1 -"," ",new Date(new Date().getFullYear(),new Date().getMonth()+1,0).getDate()]}),(0,t.jsx)(j.default,{userSpend:ey,selectedTeam:null,userMaxBudget:null})]}),(0,t.jsx)(k.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Monthly Spend"}),(0,t.jsx)(l.BarChart,{data:H,index:"date",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$ ${(0,$.formatNumberWithCommas)(e,2)}`,yAxisWidth:100,tickGap:5})]})}),(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(P.default,{topKeys:V,teams:null,topKeysLimit:5,setTopKeysLimit:()=>{}})]})}),(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Models"}),(0,t.jsx)(l.BarChart,{className:"mt-4 h-40",data:q,index:"key",categories:["spend"],colors:["cyan"],yAxisWidth:200,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>`$${(0,$.formatNumberWithCommas)(e,2)}`})]})}),(0,t.jsx)(k.Col,{numColSpan:1}),(0,t.jsx)(k.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Spend by Provider"}),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsx)(O.DonutChart,{className:"mt-4 h-40",variant:"pie",data:es,index:"provider",category:"spend",colors:["cyan"],valueFormatter:e=>`$${(0,$.formatNumberWithCommas)(e,2)}`})}),(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend"})]})}),(0,t.jsx)(b.TableBody,{children:es.map(e=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.provider}),(0,t.jsx)(f.TableCell,{children:1e-5>parseFloat(e.spend.toFixed(2))?"less than 0.00":(0,$.formatNumberWithCommas)(e.spend,2)})]},e.provider))})]})})]})})]})})]})}),(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:1,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"All Up"}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",eC(ei.sum_api_requests)]}),(0,t.jsx)(A.AreaChart,{className:"h-40",data:ei.daily_data,valueFormatter:eC,index:"date",colors:["cyan"],categories:["api_requests"],onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",eC(ei.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:ei.daily_data,valueFormatter:eC,index:"date",colors:["cyan"],categories:["total_tokens"],onValueChange:e=>console.log(e)})]})]})]}),(0,t.jsx)(t.Fragment,{children:ec.map((e,a)=>(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:e.model}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",eC(e.sum_api_requests)]}),(0,t.jsx)(A.AreaChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["api_requests"],valueFormatter:eC,onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",eC(e.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["total_tokens"],valueFormatter:eC,onValueChange:e=>console.log(e)})]})]})]},a))})]})})]})]})}),(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(k.Col,{numColSpan:2,children:[(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Total Spend Per Team"}),(0,t.jsx)(d,{data:ea})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Daily Spend Per Team"}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Y,showLegend:!0,index:"date",categories:et,yAxisWidth:80,stack:!0})]})]}),(0,t.jsx)(k.Col,{numColSpan:2})]})}),(0,t.jsxs)(C.TabPanel,{children:[(0,t.jsxs)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:["Customers of your LLM API calls. Tracked when a `user` param is passed in your LLM calls"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/users",target:"_blank",children:"docs here"})]}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(k.Col,{children:(0,t.jsx)(v.default,{value:ep,onValueChange:e=>{ex(e),eS(e.from,e.to,null)}})}),(0,t.jsxs)(k.Col,{children:[(0,t.jsx)(_.Text,{children:"Select Key"}),(0,t.jsxs)(E.Select,{defaultValue:"all-keys",children:[(0,t.jsx)(I.SelectItem,{value:"all-keys",onClick:()=>{eS(ep.from,ep.to,null)},children:"All Keys"},"all-keys"),i?.map((e,l)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,t.jsx)(I.SelectItem,{value:String(l),onClick:()=>{eS(ep.from,ep.to,e.token)},children:e.key_alias},l):null)]})]})]}),(0,t.jsx)(u.Card,{className:"mt-4",children:(0,t.jsxs)(h.Table,{className:"max-h-[70vh] min-h-[500px]",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Customer"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(p.TableHeaderCell,{children:"Total Events"})]})}),(0,t.jsx)(b.TableBody,{children:G?.map((e,l)=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.end_user}),(0,t.jsx)(f.TableCell,{children:(0,$.formatNumberWithCommas)(e.total_spend,2)}),(0,t.jsx)(f.TableCell,{children:e.total_count})]},l))})]})})]}),(0,t.jsxs)(C.TabPanel,{children:[(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsx)(v.default,{className:"mb-4",value:ep,onValueChange:e=>{ex(e),eT(e.from,e.to)}})}),(0,t.jsx)(k.Col,{children:o?(0,t.jsx)("div",{children:(0,t.jsxs)(B.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(R.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsx)(R.MultiSelectItem,{value:String(e),children:e},e))]})}):(0,t.jsx)("div",{children:(0,t.jsxs)(B.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(R.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsxs)(I.SelectItem,{value:String(e),disabled:!0,children:["✨ ",e," (Enterprise only Feature)"]},e))]})})})]}),(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full mb-4",children:[(0,t.jsx)(k.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Spend Per Tag"}),(0,t.jsxs)(_.Text,{children:["Get Started by Tracking cost per tag"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/cost_tracking",target:"_blank",children:"here"})]}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Q,index:"name",categories:["spend"],colors:["cyan"]})]})}),(0,t.jsx)(k.Col,{numColSpan:2})]})]})]})]})})}],735042)},345244,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(752978),r=e.i(994388),s=e.i(309426),n=e.i(599724),i=e.i(350967),o=e.i(278587),c=e.i(304967),d=e.i(629569),u=e.i(389083),m=e.i(677667),h=e.i(898667),g=e.i(130643),p=e.i(808613),x=e.i(311451),f=e.i(199133),b=e.i(592968),y=e.i(827252),j=e.i(702597),v=e.i(355619),w=e.i(764205),k=e.i(727749),_=e.i(435451),C=e.i(860585),N=e.i(500330),S=e.i(678784),T=e.i(118366),M=e.i(464571);let E=({tagId:e,onClose:a,accessToken:s,is_admin:i,editTag:o})=>{let[E]=p.Form.useForm(),[I,O]=(0,l.useState)(null),[A,D]=(0,l.useState)(o),[B,R]=(0,l.useState)([]),[F,P]=(0,l.useState)({}),$=async(e,t)=>{await (0,N.copyToClipboard)(e)&&(P(e=>({...e,[t]:!0})),setTimeout(()=>{P(e=>({...e,[t]:!1}))},2e3))},L=async()=>{if(s)try{let t=(await (0,w.tagInfoCall)(s,[e]))[e];t&&(O(t),o&&E.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),k.default.fromBackend("Error fetching tag details: "+e)}};(0,l.useEffect)(()=>{L()},[e,s]),(0,l.useEffect)(()=>{s&&(0,j.fetchUserModels)("dummy-user","Admin",s,R)},[s]);let H=async e=>{if(s)try{await (0,w.tagUpdateCall)(s,{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}),k.default.success("Tag updated successfully"),D(!1),L()}catch(e){console.error("Error updating tag:",e),k.default.fromBackend("Error updating tag: "+e)}};return I?(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)(r.Button,{onClick:a,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 text-sm border border-gray-200",children:I.name}),(0,t.jsx)(M.Button,{type:"text",size:"small",icon:F["tag-name"]?(0,t.jsx)(S.CheckIcon,{size:12}):(0,t.jsx)(T.CopyIcon,{size:12}),onClick:()=>$(I.name,"tag-name"),className:`transition-all duration-200 ${F["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:I.description||"No description"})]}),i&&!A&&(0,t.jsx)(r.Button,{onClick:()=>D(!0),children:"Edit Tag"})]}),A?(0,t.jsx)(c.Card,{children:(0,t.jsxs)(p.Form,{form:E,onFinish:H,layout:"vertical",initialValues:I,children:[(0,t.jsx)(p.Form.Item,{label:"Tag Name",name:"name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(x.Input,{className:"rounded-md border-gray-300"})}),(0,t.jsx)(p.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(x.Input.TextArea,{rows:4})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process this type of data",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:B.map(e=>(0,t.jsx)(f.Select.Option,{value:e,children:(0,v.getModelDisplayName)(e)},e))})}),(0,t.jsxs)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(_.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(C.default,{onChange:e=>E.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)(r.Button,{onClick:()=>D(!1),children:"Cancel"}),(0,t.jsx)(r.Button,{type:"submit",children:"Save Changes"})]})]})}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.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:I.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Description"}),(0,t.jsx)(n.Text,{children:I.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:I.models&&0!==I.models.length?I.models.map(e=>(0,t.jsx)(u.Badge,{color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:I.model_info?.[e]||e})},e)):(0,t.jsx)(u.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:I.created_at?new Date(I.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:I.updated_at?new Date(I.updated_at).toLocaleString():"-"})]})]})]}),I.litellm_budget_table&&(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.Title,{children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[void 0!==I.litellm_budget_table.max_budget&&null!==I.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:["$",I.litellm_budget_table.max_budget]})]}),I.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:I.litellm_budget_table.budget_duration})]}),void 0!==I.litellm_budget_table.tpm_limit&&null!==I.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:I.litellm_budget_table.tpm_limit.toLocaleString()})]}),void 0!==I.litellm_budget_table.rpm_limit&&null!==I.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:I.litellm_budget_table.rpm_limit.toLocaleString()})]})]})]})]})]}):(0,t.jsx)("div",{children:"Loading..."})};var I=e.i(871943),O=e.i(360820),A=e.i(591935),D=e.i(94629),B=e.i(68155),R=e.i(152990),F=e.i(682830),P=e.i(269200),$=e.i(942232),L=e.i(977572),H=e.i(427612),z=e.i(64848),V=e.i(496020);let U="This is just a spend tag that was passed dynamically in a request. It does not control any LLM models.",q=({data:e,onEdit:s,onDelete:i,onSelectTag:o})=>{let[c,d]=l.default.useState([{id:"created_at",desc:!0}]),m=[{header:"Tag Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,a=l.description===U;return(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(b.Tooltip,{title:a?"You cannot view the information of a dynamically generated spend tag":l.name,children:(0,t.jsx)(r.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5",onClick:()=>o(l.name),disabled:a,children:l.name})})})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(b.Tooltip,{title:l.description,children:(0,t.jsx)("span",{className:"text-xs",children:l.description||"-"})})}},{header:"Allowed Models",accessorKey:"models",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:l?.models?.length===0?(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"red",children:"All Models"}):l?.models?.map(e=>(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:(0,t.jsx)(n.Text,{children:l.model_info?.[e]||e})})},e))})}},{header:"Created",accessorKey:"created_at",sortingFn:"datetime",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("span",{className:"text-xs",children:new Date(l.created_at).toLocaleDateString()})}},{id:"actions",header:"Actions",cell:({row:e})=>{let l=e.original,r=l.description===U;return(0,t.jsxs)("div",{className:"flex space-x-2",children:[r?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be edited",children:(0,t.jsx)(a.Icon,{icon:A.PencilAltIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Edit tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Edit tag",children:(0,t.jsx)(a.Icon,{icon:A.PencilAltIcon,size:"sm",onClick:()=>s(l),className:"cursor-pointer hover:text-blue-500"})}),r?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be deleted",children:(0,t.jsx)(a.Icon,{icon:B.TrashIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Delete tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Delete tag",children:(0,t.jsx)(a.Icon,{icon:B.TrashIcon,size:"sm",onClick:()=>i(l.name),className:"cursor-pointer hover:text-red-500"})})]})}}],h=(0,R.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:d,getCoreRowModel:(0,F.getCoreRowModel)(),getSortedRowModel:(0,F.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(P.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(H.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(V.TableRow,{children:e.headers.map(e=>(0,t.jsx)(z.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,R.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(O.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(I.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(D.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)($.TableBody,{children:h.getRowModel().rows.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(V.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(L.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,R.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(V.TableRow,{children:(0,t.jsx)(L.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No tags found"})})})})})]})})})};var W=e.i(779241),G=e.i(212931);let K=({visible:e,onCancel:l,onSubmit:a,availableModels:s})=>{let[n]=p.Form.useForm();return(0,t.jsx)(G.Modal,{title:"Create New Tag",open:e,width:800,footer:null,onCancel:()=>{n.resetFields(),l()},children:(0,t.jsxs)(p.Form,{form:n,onFinish:e=>{a(e),n.resetFields()},labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(p.Form.Item,{label:"Tag Name",name:"tag_name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(W.TextInput,{})}),(0,t.jsx)(p.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(x.Input.TextArea,{rows:4})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process requests from this tag",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_llms",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:s.map(e=>(0,t.jsx)(f.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)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits (Optional)"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(p.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend. When reached, requests with this tag will be blocked",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(_.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(p.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(C.default,{onChange:e=>n.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)(r.Button,{type:"submit",children:"Create Tag"})})]})})};e.s(["default",0,({accessToken:e,userID:c,userRole:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1),[p,x]=(0,l.useState)(null),[f,b]=(0,l.useState)(!1),[y,j]=(0,l.useState)(!1),[v,_]=(0,l.useState)(null),[C,N]=(0,l.useState)(""),[S,T]=(0,l.useState)([]),M=async()=>{if(e)try{let t=await (0,w.tagListCall)(e);console.log("List tags response:",t),m(Object.values(t))}catch(e){console.error("Error fetching tags:",e),k.default.fromBackend("Error fetching tags: "+e)}},I=async t=>{if(e)try{await (0,w.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}),k.default.success("Tag created successfully"),g(!1),M()}catch(e){console.error("Error creating tag:",e),k.default.fromBackend("Error creating tag: "+e)}},O=async e=>{_(e),j(!0)},A=async()=>{if(e&&v){try{await (0,w.tagDeleteCall)(e,v),k.default.success("Tag deleted successfully"),M()}catch(e){console.error("Error deleting tag:",e),k.default.fromBackend("Error deleting tag: "+e)}j(!1),_(null)}};return(0,l.useEffect)(()=>{c&&d&&e&&(async()=>{try{let t=await (0,w.modelInfoCall)(e,c,d);t&&t.data&&T(t.data)}catch(e){console.error("Error fetching models:",e),k.default.fromBackend("Error fetching models: "+e)}})()},[e,c,d]),(0,l.useEffect)(()=>{M()},[e]),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:p?(0,t.jsx)(E,{tagId:p,onClose:()=>{x(null),b(!1)},accessToken:e,is_admin:"Admin"===d,editTag:f}):(0,t.jsxs)("div",{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between mt-2 w-full items-center mb-4",children:[(0,t.jsx)("h1",{children:"Tag Management"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[C&&(0,t.jsxs)(n.Text,{children:["Last Refreshed: ",C]}),(0,t.jsx)(a.Icon,{icon:o.RefreshIcon,variant:"shadow",size:"xs",className:"self-center cursor-pointer",onClick:()=>{M(),N(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(n.Text,{className:"mb-4",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)(r.Button,{className:"mb-4",onClick:()=>g(!0),children:"+ Create New Tag"}),(0,t.jsx)(i.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,t.jsx)(s.Col,{numColSpan:1,children:(0,t.jsx)(q,{data:u,onEdit:e=>{x(e.name),b(!0)},onDelete:O,onSelectTag:x})})}),(0,t.jsx)(K,{visible:h,onCancel:()=>g(!1),onSubmit:I,availableModels:S}),y&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Tag"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this tag?"})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(r.Button,{onClick:A,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(r.Button,{onClick:()=>{j(!1),_(null)},children:"Cancel"})]})]})]})})]})})}],345244)},368670,e=>{"use strict";var t=e.i(764205),l=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,l.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},226898,972520,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(389083),o=e.i(64848),c=e.i(977572),d=e.i(942232),u=e.i(599724),m=e.i(994388),h=e.i(752978),g=e.i(793130),p=e.i(404206),x=e.i(723731),f=e.i(653824),b=e.i(881073),y=e.i(197647),j=e.i(764205),v=e.i(28651),w=e.i(68155),k=e.i(220508),_=e.i(464571),C=e.i(727749),N=e.i(158392);let S=({accessToken:e,userRole:a,userID:r,modelData:s})=>{let[n,i]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)({}),[m,h]=(0,l.useState)({});return((0,l.useEffect)(()=>{e&&a&&r&&((0,j.getCallbacksCall)(e,r,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy;let l=t.routing_strategy||null;i(e=>({...e,routerSettings:t,selectedStrategy:l}))}),(0,j.getRouterSettingsCall)(e).then(e=>{if(console.log("router settings from API",e),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}}),u(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&c(l.options),e.routing_strategy_descriptions&&h(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&&i(e=>({...e,enableTagFiltering:a.field_value}))}}))},[e,a,r]),e)?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(N.default,{value:n,onChange:i,routerFieldsMetadata:d,availableRoutingStrategies:o,routingStrategyDescriptions:m}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(_.Button,{onClick:()=>window.location.reload(),children:"Reset"}),(0,t.jsx)(_.Button,{type:"primary",onClick:()=>{if(!e)return;let t=n.routerSettings;console.log("router_settings",t);let l=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),a=new Set(["model_group_alias","retry_policy"]),r=Object.fromEntries(Object.entries({...t,enable_tag_filtering:n.enableTagFiltering}).map(([e,t])=>{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,n.selectedStrategy];if("enable_tag_filtering"===e)return[e,n.enableTagFiltering];if("routing_strategy_args"===e&&"latency-based-routing"===n.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)),console.log(`setRoutingStrategyArgs: ${e}`),["routing_strategy_args",e]}return null}).filter(e=>null!=e));console.log("updatedVariables",r);try{(0,j.setCallbacksCall)(e,{router_settings:r})}catch(e){C.default.fromBackend("Failed to update router settings: "+e)}C.default.success("router settings updated successfully")},children:"Save Changes"})]})]}):null};e.i(247167);var T=e.i(368670);let M=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 E=e.i(122577),I=e.i(592968),O=e.i(898586),A=e.i(356449),D=e.i(127952),B=e.i(418371),R=e.i(888259),F=e.i(689020),P=e.i(212931);let $=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function L({open:e,onCancel:l,children:a}){return(0,t.jsx)(P.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)($,{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})})}e.s(["ArrowRight",()=>$],972520);var H=e.i(419470);function z({models:e,accessToken:a,value:r=[],onChange:s}){let[n,i]=(0,l.useState)(!1),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)(0),[h,g]=(0,l.useState)(!1),[p,x]=(0,l.useState)([{id:"1",primaryModel:null,fallbackModels:[]}]);(0,l.useEffect)(()=>{n&&(x([{id:"1",primaryModel:null,fallbackModels:[]}]),u(e=>e+1))},[n]),(0,l.useEffect)(()=>{let e=async()=>{try{let e=await (0,F.fetchAvailableModels)(a);console.log("Fetched models for fallbacks:",e),c(e)}catch(e){console.error("Error fetching model info for fallbacks:",e)}};n&&e()},[a,n]);let f=Array.from(new Set(o.map(e=>e.model_group))).sort(),b=()=>{i(!1),x([{id:"1",primaryModel:null,fallbackModels:[]}])},y=async()=>{let e=p.filter(e=>!e.primaryModel||0===e.fallbackModels.length);if(e.length>0)return void R.default.error(`Please complete configuration for all groups. ${e.length} group(s) incomplete.`);let t=[...r||[],...p.map(e=>({[e.primaryModel]:e.fallbackModels}))];if(s){g(!0);try{await s(t),C.default.success(`${p.length} fallback configuration(s) added successfully!`),b()}catch(e){console.error("Error saving fallbacks:",e)}finally{g(!1)}}else C.default.fromBackend("onChange callback not provided")};return(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Button,{className:"mx-auto",onClick:()=>i(!0),icon:()=>(0,t.jsx)("span",{className:"mr-1",children:"+"}),children:"Add Fallbacks"}),(0,t.jsxs)(L,{open:n,onCancel:b,children:[(0,t.jsx)(H.FallbackSelectionForm,{groups:p,onGroupsChange:x,availableModels:f,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)(_.Button,{type:"default",onClick:b,disabled:h,children:"Cancel"}),(0,t.jsx)(_.Button,{type:"default",onClick:y,disabled:0===p.length||h,loading:h,children:h?"Saving Configuration...":"Save All Configurations"})]})]})]})}let V="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 U(e,l){console.log=function(){};let a=window.location.origin,r=new A.default.OpenAI({apiKey:l,baseURL:a,dangerouslyAllowBrowser:!0});try{C.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});C.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){C.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`)}}let q=({accessToken:e,userRole:a,userID:i,modelData:u})=>{let[m,g]=(0,l.useState)({}),[p,x]=(0,l.useState)(!1),[f,b]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),{data:k}=(0,T.useModelCostMap)(),_=e=>null!=k&&"object"==typeof k&&e in k?k[e].litellm_provider??"":"";(0,l.useEffect)(()=>{e&&a&&i&&(0,j.getCallbacksCall)(e,i,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)})},[e,a,i]);let N=e=>{b(e),v(!0)},S=async()=>{if(!f||!e)return;let t=Object.keys(f)[0];if(!t)return;x(!0);let l=m.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={...m,fallbacks:l};try{await (0,j.setCallbacksCall)(e,{router_settings:a}),g(a),C.default.success("Router settings updated successfully")}catch(e){C.default.fromBackend("Failed to update router settings: "+e)}finally{x(!1),v(!1),b(null)}};if(!e)return null;let A=async t=>{if(!e)return;let l={...m,fallbacks:t};try{await (0,j.setCallbacksCall)(e,{router_settings:l}),g(l)}catch(t){throw C.default.fromBackend("Failed to update router settings: "+t),e&&a&&i&&(0,j.getCallbacksCall)(e,i,a).then(e=>{let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)}),t}},R=Array.isArray(m.fallbacks)&&m.fallbacks.length>0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z,{models:u?.data?u.data.map(e=>e.model_name):[],accessToken:e||"",value:m.fallbacks||[],onChange:A}),R?(0,t.jsxs)(r.Table,{children:[(0,t.jsx)(s.TableHead,{children:(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(o.TableHeaderCell,{children:"Model Name"}),(0,t.jsx)(o.TableHeaderCell,{children:"Fallbacks"}),(0,t.jsx)(o.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(d.TableBody,{children:m.fallbacks.map((a,r)=>Object.entries(a).map(([s,i])=>{let o;return(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(c.TableCell,{className:"align-top",children:(o=_?.(s)??s,(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(B.ProviderLogo,{provider:o,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:s})]}))}),(0,t.jsx)(c.TableCell,{className:"align-top",children:function(e,a,r){let s=Array.isArray(a)?a:[];if(0===s.length)return null;let n=({modelName:e})=>{let l=r?.(e)??e;return(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(B.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)(M,{className:"w-5 h-5 stroke-[2.5]"})}),(0,t.jsx)("span",{className:"flex flex-wrap items-start gap-1 min-w-0",children:s.map((e,a)=>(0,t.jsxs)(l.default.Fragment,{children:[a>0&&(0,t.jsx)(h.Icon,{icon:M,size:"xs",className:"shrink-0 text-gray-400"}),(0,t.jsx)(n,{modelName:e})]},e))})]})}(0,Array.isArray(i)?i:[],_)}),(0,t.jsxs)(c.TableCell,{className:"align-top",children:[(0,t.jsx)(I.Tooltip,{title:"Test fallback",children:(0,t.jsx)(h.Icon,{icon:E.PlayIcon,size:"sm",onClick:()=>U(Object.keys(a)[0],e||""),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(I.Tooltip,{title:"Delete fallback",children:(0,t.jsx)("span",{"data-testid":"delete-fallback-button",role:"button",tabIndex:0,onClick:()=>N(a),onKeyDown:e=>"Enter"===e.key&&N(a),className:"cursor-pointer inline-flex",children:(0,t.jsx)(h.Icon,{icon:w.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)(O.Typography.Text,{type:"secondary",children:"No fallbacks configured. Add fallbacks to automatically try another model when the primary fails."})}),(0,t.jsx)(D.default,{isOpen:y,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:f?Object.keys(f)[0]:"",code:!0}],onCancel:()=>{v(!1),b(null)},onOk:S,confirmLoading:p})]})};e.s(["default",0,({accessToken:e,userRole:_,userID:C,modelData:N})=>{let[T,M]=(0,l.useState)([]);(0,l.useEffect)(()=>{e&&(0,j.getGeneralSettingsCall)(e).then(e=>{M(e)})},[e]);let E=(e,t)=>{M(T.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.TabGroup,{className:"h-[75vh] w-full",children:[(0,t.jsxs)(b.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(y.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(y.Tab,{value:"2",children:"Fallbacks"}),(0,t.jsx)(y.Tab,{value:"3",children:"General"})]}),(0,t.jsxs)(x.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(S,{accessToken:e,userRole:_,userID:C,modelData:N})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:_,userID:C,modelData:N})}),(0,t.jsx)(p.TabPanel,{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)(o.TableHeaderCell,{children:"Setting"}),(0,t.jsx)(o.TableHeaderCell,{children:"Value"}),(0,t.jsx)(o.TableHeaderCell,{children:"Status"}),(0,t.jsx)(o.TableHeaderCell,{children:"Action"})]})}),(0,t.jsx)(d.TableBody,{children:T.filter(e=>"TypedDictionary"!==e.field_type).map((l,a)=>(0,t.jsxs)(n.TableRow,{children:[(0,t.jsxs)(c.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)(c.TableCell,{children:"Integer"==l.field_type?(0,t.jsx)(v.InputNumber,{step:1,value:l.field_value,onChange:e=>E(l.field_name,e)}):"Boolean"==l.field_type?(0,t.jsx)(g.Switch,{checked:!0===l.field_value||"true"===l.field_value,onChange:e=>E(l.field_name,e)}):null}),(0,t.jsx)(c.TableCell,{children:!0==l.stored_in_db?(0,t.jsx)(i.Badge,{icon:k.CheckCircleIcon,className:"text-white",children:"In DB"}):!1==l.stored_in_db?(0,t.jsx)(i.Badge,{className:"text-gray bg-white outline",children:"In Config"}):(0,t.jsx)(i.Badge,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,t.jsxs)(c.TableCell,{children:[(0,t.jsx)(m.Button,{onClick:()=>((t,l)=>{if(!e)return;let a=T[l].field_value;if(null!=a&&void 0!=a)try{(0,j.updateConfigFieldSetting)(e,t,a);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:!0}:e);M(l)}catch(e){}})(l.field_name,a),children:"Update"}),(0,t.jsx)(h.Icon,{icon:w.TrashIcon,color:"red",onClick:()=>((t,l)=>{if(e)try{(0,j.deleteConfigFieldSetting)(e,t);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:null,field_value:null}:e);M(l)}catch(e){}})(l.field_name,0),children:"Reset"})]})]},a))})]})})})]})]})}):null}],226898)},559061,e=>{"use strict";var t=e.i(843476),l=e.i(584935),a=e.i(304967),r=e.i(309426),s=e.i(350967),n=e.i(752978),i=e.i(621642),o=e.i(25080),c=e.i(37091),d=e.i(197647),u=e.i(653824),m=e.i(881073),h=e.i(404206),g=e.i(723731),p=e.i(599724),x=e.i(271645),f=e.i(727749),b=e.i(144267),y=e.i(278587),j=e.i(764205),v=e.i(994388),w=e.i(220508),k=e.i(964306),_=e.i(551332);let C=({responseTimeMs:e})=>null==e?null:(0,t.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-500 font-mono",children:[(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 6V12L16 14M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,t.jsxs)("span",{children:[e.toFixed(0),"ms"]})]}),N=e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{}return t},S=({label:e,value:l})=>{let[a,r]=x.default.useState(!1),[s,n]=x.default.useState(!1),i=l?.toString()||"N/A",o=i.length>50?i.substring(0,50)+"...":i;return(0,t.jsx)("tr",{className:"hover:bg-gray-50",children:(0,t.jsx)("td",{className:"px-4 py-2 align-top",colSpan:2,children:(0,t.jsxs)("div",{className:"flex items-center justify-between group",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[(0,t.jsx)("button",{onClick:()=>r(!a),className:"text-gray-400 hover:text-gray-600 mr-2",children:a?"▼":"▶"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm text-gray-600",children:e}),(0,t.jsx)("pre",{className:"mt-1 text-sm font-mono text-gray-800 whitespace-pre-wrap",children:a?i:o})]})]}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(i),n(!0),setTimeout(()=>n(!1),2e3)},className:"opacity-0 group-hover:opacity-100 text-gray-400 hover:text-gray-600",children:(0,t.jsx)(_.ClipboardCopyIcon,{className:"h-4 w-4"})})]})})})},T=({response:e})=>{let l=null,a={},r={};try{if(e?.error)try{let t="string"==typeof e.error.message?JSON.parse(e.error.message):e.error.message;l={message:t?.message||"Unknown error",traceback:t?.traceback||"No traceback available",litellm_params:t?.litellm_cache_params||{},health_check_cache_params:t?.health_check_cache_params||{}},a=N(l.litellm_params)||{},r=N(l.health_check_cache_params)||{}}catch(t){console.warn("Error parsing error details:",t),l={message:String(e.error.message||"Unknown error"),traceback:"Error parsing details",litellm_params:{},health_check_cache_params:{}}}else a=N(e?.litellm_cache_params)||{},r=N(e?.health_check_cache_params)||{}}catch(e){console.warn("Error in response parsing:",e),a={},r={}}let s={redis_host:r?.redis_client?.connection_pool?.connection_kwargs?.host||r?.redis_async_client?.connection_pool?.connection_kwargs?.host||r?.connection_kwargs?.host||r?.host||"N/A",redis_port:r?.redis_client?.connection_pool?.connection_kwargs?.port||r?.redis_async_client?.connection_pool?.connection_kwargs?.port||r?.connection_kwargs?.port||r?.port||"N/A",redis_version:r?.redis_version||"N/A",startup_nodes:(()=>{try{if(r?.redis_kwargs?.startup_nodes)return JSON.stringify(r.redis_kwargs.startup_nodes);let e=r?.redis_client?.connection_pool?.connection_kwargs?.host||r?.redis_async_client?.connection_pool?.connection_kwargs?.host,t=r?.redis_client?.connection_pool?.connection_kwargs?.port||r?.redis_async_client?.connection_pool?.connection_kwargs?.port;return e&&t?JSON.stringify([{host:e,port:t}]):"N/A"}catch(e){return"N/A"}})(),namespace:r?.namespace||"N/A"};return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,t.jsxs)(u.TabGroup,{children:[(0,t.jsxs)(m.TabList,{className:"border-b border-gray-200 px-4",children:[(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Summary"}),(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Raw Response"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-6",children:[e?.status==="healthy"?(0,t.jsx)(w.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}):(0,t.jsx)(k.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsxs)(p.Text,{className:`text-sm font-medium ${e?.status==="healthy"?"text-green-500":"text-red-500"}`,children:["Cache Status: ",e?.status||"unhealthy"]})]}),(0,t.jsx)("table",{className:"w-full border-collapse",children:(0,t.jsxs)("tbody",{children:[l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold text-red-600",children:"Error Details"})}),(0,t.jsx)(S,{label:"Error Message",value:l.message}),(0,t.jsx)(S,{label:"Traceback",value:l.traceback})]}),(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Cache Details"})}),(0,t.jsx)(S,{label:"Cache Configuration",value:String(a?.type)}),(0,t.jsx)(S,{label:"Ping Response",value:String(e.ping_response)}),(0,t.jsx)(S,{label:"Set Cache Response",value:e.set_cache_response||"N/A"}),(0,t.jsx)(S,{label:"litellm_settings.cache_params",value:JSON.stringify(a,null,2)}),a?.type==="redis"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Redis Details"})}),(0,t.jsx)(S,{label:"Redis Host",value:s.redis_host||"N/A"}),(0,t.jsx)(S,{label:"Redis Port",value:s.redis_port||"N/A"}),(0,t.jsx)(S,{label:"Redis Version",value:s.redis_version||"N/A"}),(0,t.jsx)(S,{label:"Startup Nodes",value:s.startup_nodes||"N/A"}),(0,t.jsx)(S,{label:"Namespace",value:s.namespace||"N/A"})]})]})})]})}),(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded-md p-4 font-mono text-sm",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words overflow-auto max-h-[500px]",children:(()=>{try{let t={...e,litellm_cache_params:a,health_check_cache_params:r},l=JSON.parse(JSON.stringify(t,(e,t)=>{if("string"==typeof t)try{return JSON.parse(t)}catch{}return t}));return JSON.stringify(l,null,2)}catch(e){return"Error formatting JSON: "+e.message}})()})})})]})]})})},M=({accessToken:e,healthCheckResponse:l,runCachingHealthCheck:a,responseTimeMs:r})=>{let[s,n]=x.default.useState(null),[i,o]=x.default.useState(!1),c=async()=>{o(!0);let e=performance.now();await a(),n(performance.now()-e),o(!1)};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(v.Button,{onClick:c,disabled:i,className:"bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 text-white text-sm px-4 py-2 rounded-md",children:i?"Running Health Check...":"Run Health Check"}),(0,t.jsx)(C,{responseTimeMs:s})]}),l&&(0,t.jsx)(T,{response:l})]})};var E=e.i(677667),I=e.i(898667),O=e.i(130643),A=e.i(206929),D=e.i(35983);let B=({redisType:e,redisTypeDescriptions:l,onTypeChange:a})=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Redis Type"}),(0,t.jsxs)(A.Select,{value:e,onValueChange:a,children:[(0,t.jsx)(D.SelectItem,{value:"node",children:"Node (Single Instance)"}),(0,t.jsx)(D.SelectItem,{value:"cluster",children:"Cluster"}),(0,t.jsx)(D.SelectItem,{value:"sentinel",children:"Sentinel"}),(0,t.jsx)(D.SelectItem,{value:"semantic",children:"Semantic"})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:l[e]||"Select the type of Redis deployment you're using"})]});var R=e.i(135214),F=e.i(620250),P=e.i(779241),$=e.i(199133),L=e.i(689020),H=e.i(435451);let z=({field:e,currentValue:l})=>{let[a,r]=(0,x.useState)([]),[s,n]=(0,x.useState)(l||""),{accessToken:i}=(0,R.default)();if((0,x.useEffect)(()=>{i&&(async()=>{try{let e=await (0,L.fetchAvailableModels)(i);console.log("Fetched models for selector:",e),e.length>0&&r(e)}catch(e){console.error("Error fetching model info:",e)}})()},[i]),"Boolean"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",name:e.field_name,defaultChecked:!0===l||"true"===l,className:"h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:e.field_description})]})]});if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(H.default,{name:e.field_name,type:"number",defaultValue:l,placeholder:e.field_description}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("List"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)("textarea",{name:e.field_name,defaultValue:"object"==typeof l?JSON.stringify(l,null,2):l,placeholder:e.field_description,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500",rows:4}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("Models_Select"===e.field_type){let l=a.filter(e=>"embedding"===e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)($.Select,{value:s,onChange:n,showSearch:!0,placeholder:"Search and select a model...",options:l,style:{width:"100%"},className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("input",{type:"hidden",name:e.field_name,value:s}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})}if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(F.NumberInput,{name:e.field_name,defaultValue:l,placeholder:e.field_description,step:"Float"===e.field_type?.01:1}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});let o="password"===e.field_name||e.field_name.includes("password")?"password":"text";return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(P.TextInput,{name:e.field_name,type:o,defaultValue:l,placeholder:e.field_description}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})},V=(e,t)=>e.find(e=>e.field_name===t),U=(e,t)=>{let l={type:"redis"};return e.forEach(e=>{if("redis_type"===e.field_name||null!==e.redis_type&&void 0!==e.redis_type&&e.redis_type!==t)return;let a=e.field_name,r=null;if("Boolean"===e.field_type){let e=document.querySelector(`input[name="${a}"]`);e?.checked!==void 0&&(r=e.checked)}else if("List"===e.field_type){let e=document.querySelector(`textarea[name="${a}"]`);if(e?.value)try{r=JSON.parse(e.value)}catch(e){console.error(`Invalid JSON for ${a}:`,e)}}else{let t=document.querySelector(`input[name="${a}"]`);if(t?.value){let l=t.value.trim();if(""!==l)if("Integer"===e.field_type){let e=Number(l);isNaN(e)||(r=e)}else if("Float"===e.field_type){let e=Number(l);isNaN(e)||(r=e)}else r=l}}null!=r&&(l[a]=r)}),l},q=({accessToken:e,userRole:l,userID:a})=>{let r,s,n,i,o,[c,d]=(0,x.useState)({}),[u,m]=(0,x.useState)([]),[h,g]=(0,x.useState)({}),[p,b]=(0,x.useState)("node"),[y,w]=(0,x.useState)(!1),[k,_]=(0,x.useState)(!1),C=(0,x.useCallback)(async()=>{try{let t=await (0,j.getCacheSettingsCall)(e);console.log("cache settings from API",t),t.fields&&m(t.fields),t.current_values&&(d(t.current_values),t.current_values.redis_type&&b(t.current_values.redis_type)),t.redis_type_descriptions&&g(t.redis_type_descriptions)}catch(e){console.error("Failed to load cache settings:",e),f.default.fromBackend("Failed to load cache settings")}},[e]);(0,x.useEffect)(()=>{e&&C()},[e,C]);let N=async()=>{if(e){w(!0);try{let t=U(u,p),l=await (0,j.testCacheConnectionCall)(e,t);"success"===l.status?f.default.success("Cache connection test successful!"):f.default.fromBackend(`Connection test failed: ${l.message||l.error}`)}catch(e){console.error("Test connection error:",e),f.default.fromBackend(`Connection test failed: ${e.message||"Unknown error"}`)}finally{w(!1)}}},S=async()=>{if(e){_(!0);try{let t=U(u,p);"semantic"===p&&(t.type="redis-semantic"),await (0,j.updateCacheSettingsCall)(e,t),f.default.success("Cache settings updated successfully"),await C()}catch(e){console.error("Failed to save cache settings:",e),f.default.fromBackend("Failed to update cache settings")}finally{_(!1)}}};if(!e)return null;let{basicFields:T,sslFields:M,cacheManagementFields:A,gcpFields:D,clusterFields:R,sentinelFields:F,semanticFields:P}=(r=["host","port","password","username"].map(e=>V(u,e)).filter(Boolean),s=["ssl","ssl_cert_reqs","ssl_check_hostname"].map(e=>V(u,e)).filter(Boolean),n=["namespace","ttl","max_connections"].map(e=>V(u,e)).filter(Boolean),i=["gcp_service_account","gcp_ssl_ca_certs"].map(e=>V(u,e)).filter(Boolean),o=u.filter(e=>"cluster"===e.redis_type),{basicFields:r,sslFields:s,cacheManagementFields:n,gcpFields:i,clusterFields:o,sentinelFields:u.filter(e=>"sentinel"===e.redis_type),semanticFields:u.filter(e=>"semantic"===e.redis_type)});return(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:"Cache Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure Redis cache for LiteLLM"})]}),(0,t.jsx)(B,{redisType:p,redisTypeDescriptions:h,onTypeChange:b}),(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Connection Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:T.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),"cluster"===p&&R.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Cluster Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6",children:R.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),"sentinel"===p&&F.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Sentinel Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:F.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),"semantic"===p&&P.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Semantic Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:P.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),(0,t.jsxs)(E.Accordion,{className:"mt-4",children:[(0,t.jsx)(I.AccordionHeader,{children:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Advanced Settings"})}),(0,t.jsx)(O.AccordionBody,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[M.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"SSL Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:M.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),A.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"Cache Management"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:A.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),D.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"GCP Authentication"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:D.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]})]})})]})]}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(v.Button,{variant:"secondary",size:"sm",onClick:N,disabled:y,className:"text-sm",children:y?"Testing...":"Test Connection"}),(0,t.jsx)(v.Button,{size:"sm",onClick:S,disabled:k,className:"text-sm font-medium",children:k?"Saving...":"Save Changes"})]})]})},W=e=>{if(e)return e.toISOString().split("T")[0]};function G(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}e.s(["default",0,({accessToken:e,token:v,userRole:w,userID:k,premiumUser:_})=>{let[C,N]=(0,x.useState)([]),[S,T]=(0,x.useState)([]),[E,I]=(0,x.useState)([]),[O,A]=(0,x.useState)([]),[D,B]=(0,x.useState)("0"),[R,F]=(0,x.useState)("0"),[P,$]=(0,x.useState)("0"),[L,H]=(0,x.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[z,V]=(0,x.useState)(""),[U,K]=(0,x.useState)("");(0,x.useEffect)(()=>{e&&L&&((async()=>{A(await (0,j.adminGlobalCacheActivity)(e,W(L.from),W(L.to)))})(),V(new Date().toLocaleString()))},[e]);let Y=Array.from(new Set(O.map(e=>e?.api_key??""))),J=Array.from(new Set(O.map(e=>e?.model??"")));Array.from(new Set(O.map(e=>e?.call_type??"")));let Q=async(t,l)=>{t&&l&&e&&A(await (0,j.adminGlobalCacheActivity)(e,W(t),W(l)))};(0,x.useEffect)(()=>{console.log("DATA IN CACHE DASHBOARD",O);let e=O;S.length>0&&(e=e.filter(e=>S.includes(e.api_key))),E.length>0&&(e=e.filter(e=>E.includes(e.model))),console.log("before processed data in cache dashboard",e);let t=0,l=0,a=0,r=e.reduce((e,r)=>{console.log("Processing item:",r),r.call_type||(console.log("Item has no call_type:",r),r.call_type="Unknown"),t+=(r.total_rows||0)-(r.cache_hit_true_rows||0),l+=r.cache_hit_true_rows||0,a+=r.cached_completion_tokens||0;let s=e.find(e=>e.name===r.call_type);return s?(s["LLM API requests"]+=(r.total_rows||0)-(r.cache_hit_true_rows||0),s["Cache hit"]+=r.cache_hit_true_rows||0,s["Cached Completion Tokens"]+=r.cached_completion_tokens||0,s["Generated Completion Tokens"]+=r.generated_completion_tokens||0):e.push({name:r.call_type,"LLM API requests":(r.total_rows||0)-(r.cache_hit_true_rows||0),"Cache hit":r.cache_hit_true_rows||0,"Cached Completion Tokens":r.cached_completion_tokens||0,"Generated Completion Tokens":r.generated_completion_tokens||0}),e},[]);B(G(l)),F(G(a));let s=l+t;s>0?$((l/s*100).toFixed(2)):$("0"),N(r),console.log("PROCESSED DATA IN CACHE DASHBOARD",r)},[S,E,L,O]);let X=async()=>{try{f.default.info("Running cache health check..."),K("");let t=await (0,j.cachingHealthCheckCall)(null!==e?e:"");console.log("CACHING HEALTH CHECK RESPONSE",t),K(t)}catch(t){let e;if(console.error("Error running health check:",t),t&&t.message)try{let l=JSON.parse(t.message);l.error&&(l=l.error),e=l}catch(l){e={message:t.message}}else e={message:"Unknown error occurred"};K({error:e})}};return(0,t.jsxs)(u.TabGroup,{className:"gap-2 p-8 h-full w-full mt-2 mb-8",children:[(0,t.jsxs)(m.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(d.Tab,{children:"Cache Analytics"}),(0,t.jsx)(d.Tab,{children:"Cache Health"}),(0,t.jsx)(d.Tab,{children:"Cache Settings"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[z&&(0,t.jsxs)(p.Text,{children:["Last Refreshed: ",z]}),(0,t.jsx)(n.Icon,{icon:y.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:()=>{V(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(a.Card,{children:[(0,t.jsxs)(s.Grid,{numItems:3,className:"gap-4 mt-4",children:[(0,t.jsx)(r.Col,{children:(0,t.jsx)(i.MultiSelect,{placeholder:"Select Virtual Keys",value:S,onValueChange:T,children:Y.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(r.Col,{children:(0,t.jsx)(i.MultiSelect,{placeholder:"Select Models",value:E,onValueChange:I,children:J.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(r.Col,{children:(0,t.jsx)(b.default,{value:L,onValueChange:e=>{H(e),Q(e.from,e.to)}})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mt-4",children:[(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hit Ratio"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsxs)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:[P,"%"]})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hits"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:D})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cached Tokens"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:R})})]})]}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cache Hits vs API Requests"}),(0,t.jsx)(l.BarChart,{title:"Cache Hits vs API Requests",data:C,stack:!0,index:"name",valueFormatter:G,categories:["LLM API requests","Cache hit"],colors:["sky","teal"],yAxisWidth:48}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cached Completion Tokens vs Generated Completion Tokens"}),(0,t.jsx)(l.BarChart,{className:"mt-6",data:C,stack:!0,index:"name",valueFormatter:G,categories:["Generated Completion Tokens","Cached Completion Tokens"],colors:["sky","teal"],yAxisWidth:48})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(M,{accessToken:e,healthCheckResponse:U,runCachingHealthCheck:X})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:w,userID:k})})]})]})}],559061)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/466ba0a8a546c4fd.js b/litellm/proxy/_experimental/out/_next/static/chunks/466ba0a8a546c4fd.js new file mode 100644 index 0000000000..a20a1607bd --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/466ba0a8a546c4fd.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,801312,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:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var i=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["default",0,a],801312)},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(529681),i=e.i(702779),a=e.i(563113),l=e.i(763731),o=e.i(121872),s=e.i(242064);e.i(296059);var c=e.i(915654);e.i(262370);var d=e.i(135551),u=e.i(183293),m=e.i(246422),g=e.i(838378);let p=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return(0,g.mergeToken)(e,{tagFontSize:i,tagLineHeight:(0,c.unit)(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},f=e=>({defaultBg:new d.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),h=(0,m.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,l=a(r).sub(n).equal(),o=a(t).sub(n).equal();return{[i]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:l}}),[`${i}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(p(e)),f);var b=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 $=t.forwardRef((e,r)=>{let{prefixCls:i,style:a,className:l,checked:o,children:c,icon:d,onChange:u,onClick:m}=e,g=b(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:f}=t.useContext(s.ConfigContext),$=p("tag",i),[y,w,C]=h($),k=(0,n.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==f?void 0:f.className,l,w,C);return y(t.createElement("span",Object.assign({},g,{ref:r,style:Object.assign(Object.assign({},a),null==f?void 0:f.style),className:k,onClick:e=>{null==u||u(!o),null==m||m(e)}}),d,t.createElement("span",null,c)))});var y=e.i(403541);let w=(0,m.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=p(e),(0,y.genPresetColor)(t,(e,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:a,borderColor:a},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},f),C=(e,t,n)=>{let r="string"!=typeof n?n:n.charAt(0).toUpperCase()+n.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},k=(0,m.genSubStyleComponent)(["Tag","status"],e=>{let t=p(e);return[C(t,"success","Success"),C(t,"processing","Info"),C(t,"error","Error"),C(t,"warning","Warning")]},f);var v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 S=t.forwardRef((e,c)=>{let{prefixCls:d,className:u,rootClassName:m,style:g,children:p,icon:f,color:b,onClose:$,bordered:y=!0,visible:C}=e,S=v(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:x,direction:I,tag:O}=t.useContext(s.ConfigContext),[E,j]=t.useState(!0),z=(0,r.default)(S,["closeIcon","closable"]);t.useEffect(()=>{void 0!==C&&j(C)},[C]);let B=(0,i.isPresetColor)(b),R=(0,i.isPresetStatusColor)(b),N=B||R,T=Object.assign(Object.assign({backgroundColor:b&&!N?b:void 0},null==O?void 0:O.style),g),M=x("tag",d),[P,_,A]=h(M),U=(0,n.default)(M,null==O?void 0:O.className,{[`${M}-${b}`]:N,[`${M}-has-color`]:b&&!N,[`${M}-hidden`]:!E,[`${M}-rtl`]:"rtl"===I,[`${M}-borderless`]:!y},u,m,_,A),L=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||j(!1)},[,H]=(0,a.useClosable)((0,a.pickClosable)(e),(0,a.pickClosable)(O),{closable:!1,closeIconRender:e=>{let r=t.createElement("span",{className:`${M}-close-icon`,onClick:L},e);return(0,l.replaceElement)(e,r,e=>({onClick:t=>{var n;null==(n=null==e?void 0:e.onClick)||n.call(e,t),L(t)},className:(0,n.default)(null==e?void 0:e.className,`${M}-close-icon`)}))}}),W="function"==typeof S.onClick||p&&"a"===p.type,G=f||null,q=G?t.createElement(t.Fragment,null,G,p&&t.createElement("span",null,p)):p,D=t.createElement("span",Object.assign({},z,{ref:c,className:U,style:T}),q,H,B&&t.createElement(w,{key:"preset",prefixCls:M}),R&&t.createElement(k,{key:"status",prefixCls:M}));return P(W?t.createElement(o.default,{component:"Tag"},D):D)});S.CheckableTag=$,e.s(["Tag",0,S],262218)},190144,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:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};var i=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["default",0,a],190144)},735049,e=>{"use strict";var t=e.i(654310),n=function(e){if((0,t.default)()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],r=window.document.documentElement;return n.some(function(e){return e in r.style})}return!1},r=function(e,t){if(!n(e))return!1;var r=document.createElement("div"),i=r.style[e];return r.style[e]=t,r.style[e]!==i};function i(e,t){return Array.isArray(e)||void 0===t?n(e):r(e,t)}e.s(["isStyleSupport",()=>i])},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},618566,(e,t,n)=>{t.exports=e.r(976562)},321836,e=>{"use strict";let t="litellm_return_url",n="redirect_to";function r(){return window.location.href}function i(){let e=r();e&&function(e,t,n=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function o(){return new URLSearchParams(window.location.search).get(n)}function s(e,t){let i=t||r();if(!i||i.includes("/login"))return e;let a=e.includes("?")?"&":"?";return`${e}${a}${n}=${encodeURIComponent(i)}`}function c(){let e=o();if(e)return e;let t=a();return t||null}function d(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function u(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),n=window.location.hostname;if(t.hostname!==n)return!1;if(d())return!0;return t.origin===window.location.origin}catch{return!1}}function m(e){try{let t=new URL(e,window.location.origin),n=t.pathname;n.length>1&&n.endsWith("/")&&(n=n.slice(0,-1));let r=new URLSearchParams(t.search),i=new URLSearchParams;Array.from(r.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{i.append(e,t)});let a=i.toString(),l=t.hash||"";return`${t.origin}${n}${a?`?${a}`:""}${l}`}catch{return e}}function g(){let e=o();if(e){if(u(e))return l(),e;d()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=a();if(t){if(u(t))return l(),t;d()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>s,"clearStoredReturnUrl",()=>l,"consumeReturnUrl",()=>g,"getReturnUrl",()=>c,"isValidReturnUrl",()=>u,"normalizeUrlForCompare",()=>m,"storeReturnUrl",()=>i])},161281,e=>{"use strict";var t=e.i(947293);function n(e){try{let n=(0,t.jwtDecode)(e);if(n&&"number"==typeof n.exp)return 1e3*n.exp<=Date.now();return!1}catch{return!0}}function r(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function i(e){return!!e&&null!==r(e)&&!n(e)}e.s(["checkTokenValidity",()=>i,"decodeToken",()=>r,"isJwtExpired",()=>n])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],n=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>n(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,n,"rolesWithWriteAccess",0,["Internal User","Admin","proxy_admin"]])},135214,e=>{"use strict";var t=e.i(764205),n=e.i(268004),r=e.i(161281),i=e.i(321836),a=e.i(618566),l=e.i(271645),o=e.i(708347),s=e.i(612256);e.s(["default",0,()=>{let e=(0,a.useRouter)(),{data:c,isLoading:d}=(0,s.useUIConfig)(),u="u">typeof document?(0,n.getCookie)("token"):null,m=(0,l.useMemo)(()=>(0,r.decodeToken)(u),[u]),g=(0,l.useMemo)(()=>(0,r.checkTokenValidity)(u),[u])&&!c?.admin_ui_disabled,p=(0,l.useCallback)(()=>{(0,i.storeReturnUrl)();let n=`${(0,t.getProxyBaseUrl)()}/ui/login`,r=(0,i.buildLoginUrlWithReturn)(n);e.replace(r)},[e]);return(0,l.useEffect)(()=>{!d&&(g||(u&&(0,n.clearTokenCookies)(),p()))},[d,g,u,p]),{isLoading:d,isAuthorized:g,token:g?u:null,accessToken:m?.key??null,userId:m?.user_id??null,userEmail:m?.user_email??null,userRole:(0,o.formatUserRole)(m?.user_role),premiumUser:m?.premium_user??null,disabledPersonalKeyCreation:m?.disabled_non_admin_personal_key_creation??null,showSSOBanner:m?.login_method==="username_password"}}])},95779,e=>{"use strict";var t=e.i(480731);let n={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},r=[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",()=>n,"themeColorRange",()=>r])},563113,887719,e=>{"use strict";var t=e.i(271645),n=e.i(864517),r=e.i(244009),i=e.i(408850),a=e.i(87414);let l=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{void 0!==e[n]&&(t[n]=e[n])})}),t};function o(e){if(!e)return;let{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function s(e){let{closable:n,closeIcon:r}=e||{};return t.default.useMemo(()=>{if(!n&&(!1===n||!1===r||null===r))return!1;if(void 0===n&&void 0===r)return null;let e={closeIcon:"boolean"!=typeof r&&null!==r?r:void 0};return n&&"object"==typeof n&&(e=Object.assign(Object.assign({},e),n)),e},[n,r])}e.s(["default",0,l],887719);let c={};e.s(["pickClosable",()=>o,"useClosable",0,(e,o,d=c)=>{let u=s(e),m=s(o),[g]=(0,i.useLocale)("global",a.default.global),p="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),f=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(n.default,null)},d),[d]),h=t.default.useMemo(()=>!1!==u&&(u?l(f,m,u):!1!==m&&(m?l(f,m):!!f.closable&&f)),[u,m,f]);return t.default.useMemo(()=>{var e,n;if(!1===h)return[!1,null,p,{}];let{closeIconRender:i}=f,{closeIcon:a}=h,l=a,o=(0,r.default)(h,!0);return null!=l&&(i&&(l=i(a)),l=t.default.isValidElement(l)?t.default.cloneElement(l,Object.assign(Object.assign(Object.assign({},l.props),{"aria-label":null!=(n=null==(e=l.props)?void 0:e["aria-label"])?n:g.close}),o)):t.default.createElement("span",Object.assign({"aria-label":g.close},o),l)),[!0,l,p,o]},[p,g.close,h,f])}],563113)},389083,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(829087),i=e.i(480731),a=e.i(95779),l=e.i(444755),o=e.i(673706);let s={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"}},c={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"}},d=(0,o.makeClassName)("Badge"),u=n.default.forwardRef((e,u)=>{let{color:m,icon:g,size:p=i.Sizes.SM,tooltip:f,className:h,children:b}=e,$=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),y=g||null,{tooltipProps:w,getReferenceProps:C}=(0,r.useTooltip)();return n.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,w.refs.setReference]),className:(0,l.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,l.tremorTwMerge)((0,o.getColorClassNames)(m,a.colorPalette.background).bgColor,(0,o.getColorClassNames)(m,a.colorPalette.iconText).textColor,(0,o.getColorClassNames)(m,a.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,l.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"),s[p].paddingX,s[p].paddingY,s[p].fontSize,h)},C,$),n.default.createElement(r.default,Object.assign({text:f},w)),y?n.default.createElement(y,{className:(0,l.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[p].height,c[p].width)}):null,n.default.createElement("span",{className:(0,l.tremorTwMerge)(d("text"),"whitespace-nowrap")},b))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(242064),i=e.i(517455);e.i(296059);var a=e.i(915654),l=e.i(183293),o=e.i(246422),s=e.i(838378);let c=(0,o.genStyleHooks)("Divider",e=>{let t=(0,s.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:s,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,l.resetComponent)(e)),{borderBlockStart:`${(0,a.unit)(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,a.unit)(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,a.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,a.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,a.unit)(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${s} * 100%)`},"&::after":{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${s} * 100%)`},"&::after":{width:`calc(${s} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var d=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 u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:a,direction:l,className:o,style:s}=(0,r.useComponentConfig)("divider"),{prefixCls:m,type:g="horizontal",orientation:p="center",orientationMargin:f,className:h,rootClassName:b,children:$,dashed:y,variant:w="solid",plain:C,style:k,size:v}=e,S=d(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),x=a("divider",m),[I,O,E]=c(x),j=u[(0,i.default)(v)],z=!!$,B=t.useMemo(()=>"left"===p?"rtl"===l?"end":"start":"right"===p?"rtl"===l?"start":"end":p,[l,p]),R="start"===B&&null!=f,N="end"===B&&null!=f,T=(0,n.default)(x,o,O,E,`${x}-${g}`,{[`${x}-with-text`]:z,[`${x}-with-text-${B}`]:z,[`${x}-dashed`]:!!y,[`${x}-${w}`]:"solid"!==w,[`${x}-plain`]:!!C,[`${x}-rtl`]:"rtl"===l,[`${x}-no-default-orientation-margin-start`]:R,[`${x}-no-default-orientation-margin-end`]:N,[`${x}-${j}`]:!!j},h,b),M=t.useMemo(()=>"number"==typeof f?f:/^\d+$/.test(f)?Number(f):f,[f]);return I(t.createElement("div",Object.assign({className:T,style:Object.assign(Object.assign({},s),k)},S,{role:"separator"}),$&&"vertical"!==g&&t.createElement("span",{className:`${x}-inner-text`,style:{marginInlineStart:R?M:void 0,marginInlineEnd:N?M:void 0}},$)))}],312361)},475254,e=>{"use strict";var t=e.i(271645);let n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},r=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:s,iconNode:c,...d},u)=>(0,t.createElement)("svg",{ref:u,...i,width:n,height:n,stroke:e,strokeWidth:l?24*Number(a)/Number(n):a,className:r("lucide",o),...!s&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(s)?s:[s]])),l=(e,i)=>{let l=(0,t.forwardRef)(({className:l,...o},s)=>(0,t.createElement)(a,{ref:s,iconNode:i,className:r(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=n(e),l};e.s(["default",()=>l],475254)},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(739295),r=e.i(343794),i=e.i(931067),a=e.i(211577),l=e.i(392221),o=e.i(703923),s=e.i(914949),c=e.i(404948),d=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,n){var u,m=e.prefixCls,g=void 0===m?"rc-switch":m,p=e.className,f=e.checked,h=e.defaultChecked,b=e.disabled,$=e.loadingIcon,y=e.checkedChildren,w=e.unCheckedChildren,C=e.onClick,k=e.onChange,v=e.onKeyDown,S=(0,o.default)(e,d),x=(0,s.default)(!1,{value:f,defaultValue:h}),I=(0,l.default)(x,2),O=I[0],E=I[1];function j(e,t){var n=O;return b||(E(n=e),null==k||k(n,t)),n}var z=(0,r.default)(g,p,(u={},(0,a.default)(u,"".concat(g,"-checked"),O),(0,a.default)(u,"".concat(g,"-disabled"),b),u));return t.createElement("button",(0,i.default)({},S,{type:"button",role:"switch","aria-checked":O,disabled:b,className:z,ref:n,onKeyDown:function(e){e.which===c.default.LEFT?j(!1,e):e.which===c.default.RIGHT&&j(!0,e),null==v||v(e)},onClick:function(e){var t=j(!O,e);null==C||C(t,e)}}),$,t.createElement("span",{className:"".concat(g,"-inner")},t.createElement("span",{className:"".concat(g,"-inner-checked")},y),t.createElement("span",{className:"".concat(g,"-inner-unchecked")},w)))});u.displayName="Switch";var m=e.i(121872),g=e.i(242064),p=e.i(937328),f=e.i(517455);e.i(296059);var h=e.i(915654);e.i(262370);var b=e.i(135551),$=e.i(183293),y=e.i(246422),w=e.i(838378);let C=(0,y.genStyleHooks)("Switch",e=>{let t=(0,w.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:(0,h.unit)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:l,calc:o}=e,s=`${t}-inner`,c=(0,h.unit)(o(l).add(o(r).mul(2)).equal()),d=(0,h.unit)(o(a).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${d})`,marginInlineEnd:`calc(100% - ${c} + ${d})`},[`${s}-unchecked`]:{marginTop:o(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${d})`,marginInlineEnd:`calc(-100% + ${c} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:o(r).mul(2).equal(),marginInlineEnd:o(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:o(r).mul(-1).mul(2).equal(),marginInlineEnd:o(r).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:l(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,h.unit)(l(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:l,handleSizeSM:o,calc:s}=e,c=`${t}-inner`,d=(0,h.unit)(s(o).add(s(r).mul(2)).equal()),u=(0,h.unit)(s(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:(0,h.unit)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:a,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${c}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:s(s(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,h.unit)(s(o).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,l=r/2,o=a-4,s=l-4;return{trackHeight:a,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*s+4,trackPadding:2,handleBg:i,handleSize:o,handleSizeSM:s,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:s/2,innerMaxMarginSM:s+2+4}});var k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 v=t.forwardRef((e,i)=>{let{prefixCls:a,size:l,disabled:o,loading:c,className:d,rootClassName:h,style:b,checked:$,value:y,defaultChecked:w,defaultValue:v,onChange:S}=e,x=k(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[I,O]=(0,s.default)(!1,{value:null!=$?$:y,defaultValue:null!=w?w:v}),{getPrefixCls:E,direction:j,switch:z}=t.useContext(g.ConfigContext),B=t.useContext(p.default),R=(null!=o?o:B)||c,N=E("switch",a),T=t.createElement("div",{className:`${N}-handle`},c&&t.createElement(n.default,{className:`${N}-loading-icon`})),[M,P,_]=C(N),A=(0,f.default)(l),U=(0,r.default)(null==z?void 0:z.className,{[`${N}-small`]:"small"===A,[`${N}-loading`]:c,[`${N}-rtl`]:"rtl"===j},d,h,P,_),L=Object.assign(Object.assign({},null==z?void 0:z.style),b);return M(t.createElement(m.default,{component:"Switch",disabled:R},t.createElement(u,Object.assign({},x,{checked:I,onChange:(...e)=>{O(e[0]),null==S||S.apply(void 0,e)},prefixCls:N,className:U,style:L,disabled:R,ref:i,loadingIcon:T}))))});v.__ANT_SWITCH=!0,e.s(["Switch",0,v],790848)},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(876556);function i(e){return["small","middle","large"].includes(e)}function a(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>i,"isValidGapNumber",()=>a],908286);var l=e.i(242064),o=e.i(249616),s=e.i(372409),c=e.i(246422);let d=(0,c.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:l,fontSizeSM:o,borderRadiusLG:c,borderRadiusSM:d,colorBgContainerDisabled:u,lineWidth:m}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,background:u,borderWidth:m,borderStyle:"solid",borderColor:i,borderRadius:n,"&-large":{fontSize:l,borderRadius:c},"&-small":{paddingInline:a,borderRadius:d,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,s.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 m=t.default.forwardRef((e,r)=>{let{className:i,children:a,style:s,prefixCls:c}=e,m=u(e,["className","children","style","prefixCls"]),{getPrefixCls:g,direction:p}=t.default.useContext(l.ConfigContext),f=g("space-addon",c),[h,b,$]=d(f),{compactItemClassnames:y,compactSize:w}=(0,o.useCompactItemContext)(f,p),C=(0,n.default)(f,b,y,$,{[`${f}-${w}`]:w},i);return h(t.default.createElement("div",Object.assign({ref:r,className:C,style:s},m),a))}),g=t.default.createContext({latestIndex:0}),p=g.Provider,f=({className:e,index:n,children:r,split:i,style:a})=>{let{latestIndex:l}=t.useContext(g);return null==r?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:a},r),n{let t=(0,h.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var $=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 y=t.forwardRef((e,o)=>{var s;let{getPrefixCls:c,direction:d,size:u,className:m,style:g,classNames:h,styles:y}=(0,l.useComponentConfig)("space"),{size:w=null!=u?u:"small",align:C,className:k,rootClassName:v,children:S,direction:x="horizontal",prefixCls:I,split:O,style:E,wrap:j=!1,classNames:z,styles:B}=e,R=$(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[N,T]=Array.isArray(w)?w:[w,w],M=i(T),P=i(N),_=a(T),A=a(N),U=(0,r.default)(S,{keepEmpty:!0}),L=void 0===C&&"horizontal"===x?"center":C,H=c("space",I),[W,G,q]=b(H),D=(0,n.default)(H,m,G,`${H}-${x}`,{[`${H}-rtl`]:"rtl"===d,[`${H}-align-${L}`]:L,[`${H}-gap-row-${T}`]:M,[`${H}-gap-col-${N}`]:P},k,v,q),V=(0,n.default)(`${H}-item`,null!=(s=null==z?void 0:z.item)?s:h.item),X=Object.assign(Object.assign({},y.item),null==B?void 0:B.item),F=U.map((e,n)=>{let r=(null==e?void 0:e.key)||`${V}-${n}`;return t.createElement(f,{className:V,key:r,index:n,split:O,style:X},e)}),Y=t.useMemo(()=>({latestIndex:U.reduce((e,t,n)=>null!=t?n:e,0)}),[U]);if(0===U.length)return null;let K={};return j&&(K.flexWrap="wrap"),!P&&A&&(K.columnGap=N),!M&&_&&(K.rowGap=T),W(t.createElement("div",Object.assign({ref:o,className:D,style:Object.assign(Object.assign(Object.assign({},K),g),E)},R),t.createElement(p,{value:Y},F)))});y.Compact=o.default,y.Addon=m,e.s(["default",0,y],38243)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4d3700bffc110569.js b/litellm/proxy/_experimental/out/_next/static/chunks/4d3700bffc110569.js new file mode 100644 index 0000000000..e4cee22475 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/4d3700bffc110569.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function s(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function r(e,r){let a=t(e);return isNaN(r)?s(e,NaN):(r&&a.setDate(a.getDate()+r),a)}function a(e,r){let a=t(e);if(isNaN(r))return s(e,NaN);if(!r)return a;let i=a.getDate(),l=s(e,a.getTime());return(l.setMonth(a.getMonth()+r+1,0),i>=l.getDate())?l:(a.setFullYear(l.getFullYear(),l.getMonth(),i),a)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>s],96226),e.s(["addDays",()=>r],439189),e.s(["addMonths",()=>a],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),s=e.i(343794),r=e.i(529681),a=e.i(908286),i=e.i(242064),l=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["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"],d=function(e,t){let r,a,i;return(0,s.default)(Object.assign(Object.assign(Object.assign({},(r=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${r}`]:r&&o.includes(r)})),(a={},u.forEach(s=>{a[`${e}-align-${s}`]=t.align===s}),a[`${e}-align-stretch`]=!t.align&&!!t.vertical,a)),(i={},c.forEach(s=>{i[`${e}-justify-${s}`]=t.justify===s}),i)))},p=(0,l.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:s,paddingLG:r}=e,a=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:s,flexGapLG:r});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(a),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(a),(e=>{let{componentCls:t}=e,s={};return o.forEach(e=>{s[`${t}-wrap-${e}`]={flexWrap:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return u.forEach(e=>{s[`${t}-align-${e}`]={alignItems:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return c.forEach(e=>{s[`${t}-justify-${e}`]={justifyContent:e}}),s})(a)]},()=>({}),{resetStyle:!1});var h=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(s[r[a]]=e[r[a]]);return s};let m=t.default.forwardRef((e,l)=>{let{prefixCls:n,rootClassName:o,className:c,style:u,flex:m,gap:g,vertical:x=!1,component:f="div",children:v}=e,y=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:b,direction:j,getPrefixCls:w}=t.default.useContext(i.ConfigContext),N=w("flex",n),[S,M,k]=p(N),C=null!=x?x:null==b?void 0:b.vertical,O=(0,s.default)(c,o,null==b?void 0:b.className,N,M,k,d(N,e),{[`${N}-rtl`]:"rtl"===j,[`${N}-gap-${g}`]:(0,a.isPresetSize)(g),[`${N}-vertical`]:C}),_=Object.assign(Object.assign({},null==b?void 0:b.style),u);return m&&(_.flex=m),g&&!(0,a.isPresetSize)(g)&&(_.gap=g),S(t.default.createElement(f,Object.assign({ref:l,className:O,style:_},(0,r.default)(y,["justify","wrap","align"])),v))});e.s(["Flex",0,m],525720)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let s=e.i(264042).Row;e.s(["Row",0,s],621192)},214541,e=>{"use strict";var t=e.i(271645),s=e.i(135214),r=e.i(270345);e.s(["default",0,()=>{let[e,a]=(0,t.useState)([]),{accessToken:i,userId:l,userRole:n}=(0,s.default)();return(0,t.useEffect)(()=>{(async()=>{a(await (0,r.fetchTeams)(i,l,n,null))})()},[i,l,n]),{teams:e,setTeams:a}}])},891547,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:i,className:l,accessToken:n,disabled:o})=>{let[c,u]=(0,s.useState)([]),[d,p]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,a.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{p(!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=>{console.log("Selected guardrails:",t),e(t)},value:i,loading:d,className:l,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),s=e.i(271645),r=e.i(199133),a=e.i(764205);function i(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let s=e.version_number??1,r=e.version_status??"draft";return{label:`${e.policy_name} — v${s} (${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:l,className:n,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,p]=(0,s.useState)([]),[h,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,a.getPoliciesList)(o);e.policies&&(p(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[o,u]),(0,t.jsx)("div",{children:(0,t.jsx)(r.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:h,className:n,allowClear:!0,options:i(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>i])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),s=e.i(271645);let r={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 a=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(a.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ArrowLeftOutlined",0,i],447566)},292639,e=>{"use strict";var t=e.i(764205),s=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,s.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},250980,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],250980)},502547,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,s],502547)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),s=e.i(114272),r=e.i(540143),a=e.i(915823),i=e.i(619273),l=class extends a.Subscribable{#e;#t=void 0;#s;#r;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,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#i()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#a(){let e=this.#s?.state??(0,s.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}}#i(e){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,s){let a=(0,n.useQueryClient)(s),[o]=t.useState(()=>new l(a,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(r.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(i.noop)},[o]);if(c.error&&(0,i.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={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 a=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(a.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ClockCircleOutlined",0,i],637235)},384767,e=>{"use strict";var t=e.i(843476),s=e.i(599724),r=e.i(271645),a=e.i(389083);let i=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 l=e.i(764205);let n=function({vectorStores:e,accessToken:n}){let[o,c]=(0,r.useState)([]);return(0,r.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,l.vectorStoreListCall)(n);e.data&&c(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)(i,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(s.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,s)=>{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},s)})}):(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)(i,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=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 c=e.i(871943),u=e.i(502547),d=e.i(592968);let p=function({mcpServers:e,mcpAccessGroups:i=[],mcpToolPermissions:n={},mcpToolsets:p=[],accessToken:h}){let[m,g]=(0,r.useState)([]),[x,f]=(0,r.useState)([]),[v,y]=(0,r.useState)(new Set),[b,j]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{(async()=>{if(h&&e.length>0)try{let e=await (0,l.fetchMCPServers)(h);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[h,e.length]),(0,r.useEffect)(()=>{(async()=>{if(h&&p.length>0)try{let e=await (0,l.fetchMCPToolsets)(h),t=Array.isArray(e)?e.filter(e=>p.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[h,p.length]);let w=[...e.map(e=>({type:"server",value:e})),...i.map(e=>({type:"accessGroup",value:e}))],N=w.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)(o,{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:"blue",size:"xs",children:N})]}),N>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[w.map((e,s)=>{let r="server"===e.type?n[e.value]:void 0,a=r&&r.length>0,i=v.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 s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s}))},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)(d.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=m.find(t=>t.server_id===e);if(t){let s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),a&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),i?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&i&&(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,s)=>(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},s))})})]},s)}),p.length>0&&p.map((e,s)=>{let r=x.find(t=>t.toolset_id===e),a=b.has(e),i=r?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>i>0&&void j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-purple-200 transition-all ${i>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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),i>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:i}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===i?"tool":"tools"}),a?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),i>0&&a&&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,s)=>(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]},s))})})]},`toolset-${s}`)})]}):(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)(o,{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"})]})]})},h=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"}))}),m=function({agents:e,agentAccessGroups:i=[],accessToken:n}){let[o,c]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,l.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&c(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let u=[...e.map(e=>({type:"agent",value:e})),...i.map(e=>({type:"accessGroup",value:e}))],p=u.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)(h,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(a.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:u.map((e,s)=>(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)(d.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 flex-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 s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})})})},s))}):(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)(h,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.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:a="",accessToken:i}){let l=e?.vector_stores||[],o=e?.mcp_servers||[],c=e?.mcp_access_groups||[],u=e?.mcp_tool_permissions||{},d=e?.mcp_toolsets||[],h=e?.agents||[],g=e?.agent_access_groups||[],x=(0,t.jsxs)("div",{className:"card"===r?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:l,accessToken:i}),(0,t.jsx)(p,{mcpServers:o,mcpAccessGroups:c,mcpToolPermissions:u,mcpToolsets:d,accessToken:i}),(0,t.jsx)(m,{agents:h,agentAccessGroups:g,accessToken:i})]});return"card"===r?(0,t.jsxs)("div",{className:`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)(s.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),x]}):(0,t.jsxs)("div",{className:`${a}`,children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/520f8fdc54fcd4f0.js b/litellm/proxy/_experimental/out/_next/static/chunks/520f8fdc54fcd4f0.js new file mode 100644 index 0000000000..bebc261002 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/520f8fdc54fcd4f0.js @@ -0,0 +1,91 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,111790,758472,280881,e=>{"use strict";e.s([],111790);var t=e.i(843476),s=e.i(708347),r=e.i(750113),l=e.i(994388),a=e.i(197647),n=e.i(653824),i=e.i(881073),o=e.i(404206),c=e.i(723731),d=e.i(599724),m=e.i(629569),u=e.i(844444),x=e.i(869216),p=e.i(212931),h=e.i(199133),g=e.i(592968),f=e.i(898586),b=e.i(271645),j=e.i(500727),y=e.i(266027),v=e.i(912598),N=e.i(243652),_=e.i(764205),w=e.i(135214);let S=(0,N.createQueryKeys)("mcpServerHealth");var C=e.i(727749),T=e.i(988846),k=e.i(678784),A=e.i(995926),I=e.i(328196),P=e.i(302202),O=e.i(409797),M=e.i(54131),F=e.i(440987);let E=[{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}]}],L=E.flatMap(e=>e.fields),R="mcp_required_fields",z={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 U({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 B({action:e,serverName:s,isCurrentlyActive:r,onConfirm:l,onCancel:a}){let[n,i]=(0,b.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)(I.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 make it active and available for use.":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-none 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 q({requiredFields:e,onChange:s,onSave:r,isSaving:l}){let[a,n]=(0,b.useState)(!1),i=L.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)(F.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)(M.ChevronUpIcon,{className:"h-4 w-4 text-gray-400"}):(0,t.jsx)(O.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:E.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 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 V({server:e,onApprove:s,onReject:r,requiredFields:l}){let a=e.approval_status??"active",n=z[a]??z.active,i=L.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)(P.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-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 flex-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 flex-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 flex-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)(A.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 flex-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 flex-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)(A.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 $({accessToken:e}){let[s,r]=(0,b.useState)({total:0,pending_review:0,active:0,rejected:0,items:[]}),[l,a]=(0,b.useState)(""),[n,i]=(0,b.useState)("all"),[o,c]=(0,b.useState)(null),[d,m]=(0,b.useState)(!0),[u,x]=(0,b.useState)(null),[p,h]=(0,b.useState)([]),[g,f]=(0,b.useState)(!1),j=(0,b.useCallback)(async()=>{if(!e)return void m(!1);m(!0),x(null);try{let[t,s]=await Promise.all([(0,_.fetchMCPSubmissions)(e),(0,_.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===R);e&&Array.isArray(e.field_value)&&h(e.field_value)}}catch(e){x(e instanceof Error?e.message:"Failed to load submissions")}finally{m(!1)}},[e]);(0,b.useEffect)(()=>{j()},[j]);let y=async()=>{if(e){f(!0);try{await (0,_.updateConfigFieldSetting)(e,R,p),C.default.success("Submission rules saved")}catch{C.default.fromBackend("Failed to save submission rules")}finally{f(!1)}}},v=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 N(t,s){if(e)try{await (0,_.approveMCPServer)(e,t),await j(),C.default.success(`MCP server "${s}" approved`)}catch{C.default.fromBackend("Failed to approve MCP server")}finally{c(null)}}async function w(t,s,r){if(e)try{await (0,_.rejectMCPServer)(e,t,r),await j(),C.default.success(`MCP server "${s}" rejected`)}catch{C.default.fromBackend("Failed to reject MCP server")}finally{c(null)}}return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)(q,{requiredFields:p,onChange:h,onSave:y,isSaving:g}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(U,{label:"Total Submitted",value:s.total,color:"text-gray-900"}),(0,t.jsx)(U,{label:"Pending Review",value:s.pending_review,color:"text-yellow-600"}),(0,t.jsx)(U,{label:"Active",value:s.active,color:"text-green-600"}),(0,t.jsx)(U,{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)(T.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-none 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-none 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…"}),u&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:u}),!d&&!u&&0===v.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No MCP server submissions match your filters."}),!d&&!u&&v.map(e=>(0,t.jsx)(V,{server:e,requiredFields:p,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)(B,{action:o.action,serverName:o.serverName,isCurrentlyActive:o.isCurrentlyActive,onConfirm:e=>"approve"===o.action?N(o.serverId,o.serverName):w(o.serverId,o.serverName,e),onCancel:()=>c(null)})]})}var D=e.i(808613),H=e.i(311451),K=e.i(998573),W=e.i(482725),J=e.i(988297),Y=e.i(797672),G=e.i(68155),Q=e.i(699857),Z=e.i(149121);let{Text:X}=f.Typography;function ee({serverId:e,serverName:s,accessToken:r,selectedTools:l,onToggle:a}){let[n,i]=(0,b.useState)([]),[o,c]=(0,b.useState)(!1),[d,m]=(0,b.useState)(!1),u=new Set(l.filter(t=>t.server_id===e).map(e=>e.tool_name)),x=(0,b.useCallback)(async()=>{if(r&&!(n.length>0)){c(!0);try{let t=await (0,_.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||x(),m(!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 flex-shrink-0"}),s,u.size>0&&(0,t.jsxs)("span",{className:"ml-1 text-xs text-purple-600 font-semibold",children:[u.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)(W.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=u.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 flex-shrink-0 mt-0.5",children:"✓"})]},s.name)})})})]})}function et({open:e,onClose:s,onSave:r,accessToken:a,initialToolset:n}){let[i]=D.Form.useForm(),[o,c]=(0,b.useState)(n?.tools||[]),[m,u]=(0,b.useState)(!1),[x,h]=(0,b.useState)(""),{data:g=[]}=(0,j.useMCPServers)();b.default.useEffect(()=>{e&&(i.setFieldsValue({toolset_name:n?.toolset_name||"",description:n?.description||""}),c(n?.tools||[]),h(""))},[e,n]);let f=e=>{c(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])},y=async()=>{let e=await i.validateFields();u(!0);try{await r(e.toolset_name,e.description,o),s()}finally{u(!1)}},v=g.filter(e=>{let t=x.toLowerCase();return!t||(e.alias||"").toLowerCase().includes(t)||(e.server_name||"").toLowerCase().includes(t)});return(0,t.jsxs)(p.Modal,{open:e,onCancel:s,title:n?"Edit Toolset":"New Toolset",width:960,footer:null,forceRender:!0,children:[(0,t.jsx)(D.Form,{form:i,layout:"vertical",className:"mt-2",children:(0,t.jsxs)("div",{className:"flex gap-4 mb-4",children:[(0,t.jsx)(D.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)(H.Input,{placeholder:"e.g. github-linear-tools"})}),(0,t.jsx)(D.Form.Item,{label:"Description",name:"description",className:"flex-1 mb-0",children:(0,t.jsx)(H.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)(d.Text,{className:"text-sm font-semibold text-gray-700",children:"Available Tools"})}),(0,t.jsx)(H.Input,{placeholder:"Search MCP servers...",value:x,onChange:e=>h(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)(d.Text,{className:"text-gray-400 text-sm",children:0===g.length?"No MCP servers configured":"No servers match your search"}):v.map(e=>(0,t.jsx)(ee,{serverId:e.server_id,serverName:e.alias||e.server_name||e.server_id,accessToken:a,selectedTools:o,onToggle:f},e.server_id))})]}),(0,t.jsx)("div",{className:"w-px bg-gray-200 flex-shrink-0"}),(0,t.jsxs)("div",{className:"w-72 flex-shrink-0",children:[(0,t.jsxs)(d.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:["(",o.length," tools)"]})]}),(0,t.jsx)("div",{className:"space-y-1 overflow-y-auto",style:{maxHeight:340},children:0===o.length?(0,t.jsx)(d.Text,{className:"text-gray-400 text-sm",children:"No tools added yet"}):o.map((e,s)=>(0,t.jsxs)("button",{type:"button",onClick:()=>f(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: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 flex-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)(l.Button,{variant:"secondary",onClick:s,children:"Cancel"}),(0,t.jsx)(l.Button,{onClick:y,loading:m,children:n?"Save Changes":"Create Toolset"})]})]})}function es(){let[e,s]=(0,b.useState)(!1),r=(0,_.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 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 border bg-white hover:bg-gray-50 text-gray-400 hover:text-gray-600 border-gray-200 transition-colors",children:e?"✓":"copy"})]})]})}function er({accessToken:e,userRole:s}){let r=(0,v.useQueryClient)(),{data:a=[],isLoading:n}=(0,Q.useMCPToolsets)(),[i,o]=(0,b.useState)(!1),[c,u]=(0,b.useState)(null),[x,h]=(0,b.useState)(null),[g,f]=(0,b.useState)(!1),j="Admin"===s||"proxy_admin"===s,y=async(t,s,l)=>{e&&(await (0,_.createMCPToolset)(e,{toolset_name:t,description:s,tools:l}),K.message.success("Toolset created"),r.invalidateQueries({queryKey:["mcpToolsets"]}))},N=async(t,s,l)=>{e&&c&&(await (0,_.updateMCPToolset)(e,{toolset_id:c.toolset_id,toolset_name:t,description:s,tools:l}),K.message.success("Toolset updated"),r.invalidateQueries({queryKey:["mcpToolsets"]}),u(null))},w=async()=>{if(e&&x){f(!0);try{await (0,_.deleteMCPToolset)(e,x),K.message.success("Toolset deleted"),r.invalidateQueries({queryKey:["mcpToolsets"]}),h(null)}finally{f(!1)}}},S=(0,_.getProxyBaseUrl)(),C=[{header:"Toolset ID",accessorKey:"toolset_id",cell:({row:e})=>(0,t.jsxs)("span",{className:"font-mono text-xs bg-gray-100 px-2 py-0.5 rounded text-gray-600",children:[e.original.toolset_id.slice(0,8),"…"]})},{header:"Name",accessorKey:"toolset_name",cell:({row:e})=>{let s=`${S}/toolset/${e.original.toolset_name}/mcp`;return(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-purple-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:e.original.toolset_name})]}),(0,t.jsx)("button",{type:"button",className:"text-xs text-gray-400 hover:text-purple-600 font-mono truncate max-w-xs text-left transition-colors",onClick:()=>navigator.clipboard.writeText(s),title:"Click to copy endpoint URL",children:s})]})}},{header:"Description",accessorKey:"description",cell:({row:e})=>(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.original.description||"—"})},{header:"Tools",accessorKey:"tools",cell:({row:e})=>{let s=e.original.tools;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-xs",children:[s.slice(0,4).map((e,s)=>(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-purple-50 border border-purple-200 text-purple-700 text-xs",children:e.tool_name},s)),s.length>4&&(0,t.jsxs)("span",{className:"text-xs text-gray-400 self-center",children:["+",s.length-4," more"]})]})}},{header:"Created",accessorKey:"created_at",cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"—"})},...j?[{header:"",id:"actions",cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center gap-1 justify-end",children:[(0,t.jsx)("button",{type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 hover:text-gray-700 transition-colors",onClick:()=>u(e.original),children:(0,t.jsx)(Y.PencilIcon,{className:"h-4 w-4"})}),(0,t.jsx)("button",{type:"button",className:"p-1.5 rounded-lg hover:bg-red-50 text-gray-400 hover:text-red-500 transition-colors",onClick:()=>h(e.original.toolset_id),children:(0,t.jsx)(G.TrashIcon,{className:"h-4 w-4"})})]})}]:[]];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)(m.Title,{children:"MCP Toolsets"}),(0,t.jsx)(d.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."})]}),j&&(0,t.jsx)(l.Button,{icon:J.PlusIcon,onClick:()=>o(!0),children:"New Toolset"})]}),(0,t.jsx)(es,{}),(0,t.jsx)(Z.DataTable,{data:a,columns:C,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:n,noDataMessage:"No toolsets yet. Click 'New Toolset' to create one.",loadingMessage:"Loading toolsets...",enableSorting:!0}),(0,t.jsx)(et,{open:i,onClose:()=>o(!1),onSave:y,accessToken:e}),c&&(0,t.jsx)(et,{open:!!c,onClose:()=>u(null),onSave:N,accessToken:e,initialToolset:c}),(0,t.jsx)(p.Modal,{open:!!x,onCancel:()=>h(null),onOk:w,okText:"Delete",okButtonProps:{danger:!0,loading:g},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 el=e.i(790848),ea=e.i(362024),en=e.i(827252),ei=e.i(779241),eo=e.i(292335),ec=e.i(28651);let ed="rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",em=({label:e,tooltip:s})=>(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[e,(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),eu=({isM2M:e,isEditing:s=!1,oauthFlow:r,initialFlowType:a,docsUrl:n})=>{let i=s?" (leave blank to keep existing)":"";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Form.Item,{label:(0,t.jsx)(em,{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",...a?{initialValue:a}:{},children:(0,t.jsxs)(h.Select,{className:"rounded-lg",size:"large",children:[(0,t.jsx)(h.Select.Option,{value:eo.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)(h.Select.Option,{value:eo.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)(D.Form.Item,{label:(0,t.jsx)(em,{label:"Client ID",tooltip:"OAuth2 client ID for the client_credentials grant."}),name:["credentials","client_id"],rules:[{required:!0,message:"Client ID is required for M2M OAuth"}],children:(0,t.jsx)(ei.TextInput,{type:"password",placeholder:`Enter OAuth client ID${i}`,className:ed})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsx)(em,{label:"Client Secret",tooltip:"OAuth2 client secret for the client_credentials grant."}),name:["credentials","client_secret"],rules:[{required:!0,message:"Client Secret is required for M2M OAuth"}],children:(0,t.jsx)(ei.TextInput,{type:"password",placeholder:`Enter OAuth client secret${i}`,className:ed})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsx)(em,{label:"Token URL",tooltip:"Token endpoint URL for the client_credentials grant."}),name:"token_url",rules:[{required:!0,message:"Token URL is required for M2M OAuth"}],children:(0,t.jsx)(ei.TextInput,{placeholder:"https://auth.example.com/oauth/token",className:ed})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsx)(em,{label:"Scopes (optional)",tooltip:"Optional scopes to request with the client_credentials grant."}),name:["credentials","scopes"],children:(0,t.jsx)(h.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)(em,{label:"Client ID (optional)",tooltip:"Provide only if your MCP server cannot handle dynamic client registration."}),n&&(0,t.jsx)("a",{href:n,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)(ei.TextInput,{type:"password",placeholder:`Enter client ID${i}`,className:ed})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsx)(em,{label:"Client Secret (optional)",tooltip:"Provide only if your MCP server cannot handle dynamic client registration."}),name:["credentials","client_secret"],children:(0,t.jsx)(ei.TextInput,{type:"password",placeholder:`Enter client secret${i}`,className:ed})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsx)(em,{label:"Scopes (optional)",tooltip:"Optional scopes requested during token exchange. Separate multiple scopes with enter or commas."}),name:["credentials","scopes"],children:(0,t.jsx)(h.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsx)(em,{label:"Authorization URL (optional)",tooltip:"Optional override for the authorization endpoint."}),name:"authorization_url",children:(0,t.jsx)(ei.TextInput,{placeholder:"https://example.com/oauth/authorize",className:ed})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsx)(em,{label:"Token URL (optional)",tooltip:"Optional override for the token endpoint."}),name:"token_url",children:(0,t.jsx)(ei.TextInput,{placeholder:"https://example.com/oauth/token",className:ed})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsx)(em,{label:"Registration URL (optional)",tooltip:"Optional override for the dynamic client registration endpoint."}),name:"registration_url",children:(0,t.jsx)(ei.TextInput,{placeholder:"https://example.com/oauth/register",className:ed})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsx)(em,{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)(H.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)(D.Form.Item,{label:(0,t.jsx)(em,{label:"Token Storage TTL (seconds, optional)",tooltip:"How long to cache each user's OAuth access token in Redis before evicting it (regardless of 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)(ec.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)(l.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 ex=e.i(906579),ep=e.i(458505),eh=e.i(366308),eg=e.i(304967);let ef=({value:e={},onChange:s,tools:r=[],disabled:l=!1})=>(0,t.jsx)(eg.Card,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)(ep.DollarOutlined,{className:"text-green-600"}),(0,t.jsx)(m.Title,{children:"Cost Configuration"}),(0,t.jsx)(g.Tooltip,{title:"Configure costs for this MCP server's tool calls. Set a default rate and per-tool overrides.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Default Cost per Query ($)",(0,t.jsx)(g.Tooltip,{title:"Default cost charged for each tool call to this server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)(ec.InputNumber,{min:0,step:1e-4,precision:4,placeholder:"0.0000",value:e.default_cost_per_query,onChange:t=>{let r={...e,default_cost_per_query:t};s?.(r)},disabled:l,style:{width:"200px"},addonBefore:"$"}),(0,t.jsx)(d.Text,{className:"block mt-1 text-gray-500 text-sm",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 text-gray-700",children:["Tool-Specific Costs ($)",(0,t.jsx)(g.Tooltip,{title:"Override the default cost for specific tools. Leave blank to use the default rate.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)(ea.Collapse,{items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(eh.ToolOutlined,{className:"mr-2 text-blue-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Available Tools"}),(0,t.jsx)(ex.Badge,{count:r.length,style:{backgroundColor:"#52c41a",marginLeft:"8px"}})]}),children:(0,t.jsx)("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:r.map((r,a)=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(d.Text,{className:"font-medium text-gray-900",children:r.name}),r.description&&(0,t.jsx)(d.Text,{className:"text-gray-500 text-sm block mt-1",children:r.description})]}),(0,t.jsx)("div",{className:"ml-4",children:(0,t.jsx)(ec.InputNumber,{min:0,step:1e-4,precision:4,placeholder:"Use default",value:e.tool_name_to_cost_per_query?.[r.name],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)},disabled:l,style:{width:"120px"},addonBefore:"$"})})]},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 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsx)(d.Text,{className:"text-blue-800 font-medium",children:"Cost Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[e.default_cost_per_query&&(0,t.jsxs)(d.Text,{className:"text-blue-700",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)(d.Text,{className:"text-blue-700",children:["• ",e,": $",s.toFixed(4)," per query"]},e))]})]})]})});var eb=e.i(464571),ej=e.i(560445),ey=e.i(245704),ev=e.i(270377),eN=e.i(91979);let e_=({formValues:e,tools:s,isLoadingTools:r,toolsError:l,toolsErrorStackTrace:a,canFetchTools:n,fetchTools:i})=>n||e.url||e.spec_path?(0,t.jsx)(eg.Card,{children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ey.CheckCircleOutlined,{className:"text-blue-600"}),(0,t.jsx)(m.Title,{children:"Connection Status"})]}),!n&&(e.url||e.spec_path)&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(eh.ToolOutlined,{className:"text-2xl mb-2"}),(0,t.jsx)(d.Text,{children:"Complete required fields to test connection"}),(0,t.jsx)("br",{}),(0,t.jsx)(d.Text,{className:"text-sm",children:"Fill in URL, Transport, and Authentication to test MCP server connection"})]}),n&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"text-gray-700 font-medium",children:r?"Testing connection to MCP server...":s.length>0?"Connection successful":l?"Connection failed":"Ready to test connection"}),(0,t.jsx)("br",{}),(0,t.jsxs)(d.Text,{className:"text-gray-500 text-sm",children:["Server: ",e.url||e.spec_path]})]}),r&&(0,t.jsxs)("div",{className:"flex items-center text-blue-600",children:[(0,t.jsx)(W.Spin,{size:"small",className:"mr-2"}),(0,t.jsx)(d.Text,{className:"text-blue-600",children:"Connecting..."})]}),!r&&!l&&s.length>0&&(0,t.jsxs)("div",{className:"flex items-center text-green-600",children:[(0,t.jsx)(ey.CheckCircleOutlined,{className:"mr-1"}),(0,t.jsx)(d.Text,{className:"text-green-600 font-medium",children:"Connected"})]}),l&&(0,t.jsxs)("div",{className:"flex items-center text-red-600",children:[(0,t.jsx)(ev.ExclamationCircleOutlined,{className:"mr-1"}),(0,t.jsx)(d.Text,{className:"text-red-600 font-medium",children:"Failed"})]})]}),r&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,t.jsx)(W.Spin,{size:"large"}),(0,t.jsx)(d.Text,{className:"ml-3",children:"Testing connection and loading tools..."})]}),l&&(0,t.jsx)(ej.Alert,{message:"Connection Failed",description:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{children:l}),a&&(0,t.jsx)(ea.Collapse,{items:[{key:"stack-trace",label:"Stack Trace",children:(0,t.jsx)("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"12px",fontFamily:"monospace",margin:0,padding:"8px",backgroundColor:"#f5f5f5",borderRadius:"4px",maxHeight:"400px",overflow:"auto"},children:a})}],style:{marginTop:"12px"}})]}),type:"error",showIcon:!0,action:(0,t.jsx)(eb.Button,{icon:(0,t.jsx)(eN.ReloadOutlined,{}),onClick:i,size:"small",children:"Retry"})}),!r&&0===s.length&&!l&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-500 border rounded-lg border-dashed",children:[(0,t.jsx)(ey.CheckCircleOutlined,{className:"text-2xl mb-2 text-green-500"}),(0,t.jsx)(d.Text,{className:"text-green-600 font-medium",children:"Connection successful!"}),(0,t.jsx)("br",{}),(0,t.jsx)(d.Text,{className:"text-gray-500",children:"No tools found for this MCP server"})]})]})]})}):null;var ew=e.i(928685),eS=e.i(751904),eC=e.i(536916),eT=e.i(91739);let ek=({accessToken:e,oauthAccessToken:t,formValues:s,enabled:r=!0})=>{let[l,a]=(0,b.useState)([]),[n,i]=(0,b.useState)(!1),[o,c]=(0,b.useState)(null),[d,m]=(0,b.useState)(null),[u,x]=(0,b.useState)(!1),p=s.auth_type===eo.AUTH_TYPE.OAUTH2&&s.oauth_flow_type===eo.OAUTH_FLOW.M2M,h=s.auth_type===eo.AUTH_TYPE.OAUTH2&&!p,g=s.transport===eo.TRANSPORT.OPENAPI,f=g?!!s.spec_path:!!s.url,j=g?!!(f&&e):!!(f&&s.transport&&s.auth_type&&e&&(!h||t)),y=JSON.stringify(s.static_headers??{}),v=JSON.stringify(s.credentials??{}),N=async()=>{if(e&&(s.url||s.spec_path)&&(!h||t||g)){i(!0),c(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===eo.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,_.testMCPToolsListRequest)(e,i,t);if(o.tools&&!o.error)a(o.tools),c(null),m(null),o.tools.length>0&&!u&&x(!0);else{let e=o.message||"Failed to retrieve tools list";c(e),m(o.stack_trace||null),a([]),x(!1)}}catch(e){console.error("Tools fetch error:",e),c(e instanceof Error?e.message:String(e)),m(null),a([]),x(!1)}finally{i(!1)}}},w=()=>{a([]),c(null),m(null),x(!1)};return(0,b.useEffect)(()=>{r&&(j?N():w())},[s.url,s.spec_path,s.transport,s.auth_type,e,r,t,j,y,v]),{tools:l,isLoadingTools:n,toolsError:o,toolsErrorStackTrace:d,hasShownSuccessMessage:u,canFetchTools:j,fetchTools:N,clearTools:w}};var eA=e.i(531516);let eI=({tool:e,isEnabled:s,isEditExpanded:r,toolNameToDisplayName:l,toolNameToDescription:a,onToggle:n,onToggleExpand:i,onDisplayNameChange:o,onDescriptionChange:c})=>(0,t.jsxs)("div",{className:`rounded-lg border transition-colors ${s?"bg-blue-50 border-blue-300 hover:border-blue-400":"bg-gray-50 border-gray-200 hover:border-gray-300"}`,children:[(0,t.jsx)("div",{className:"p-4 cursor-pointer",onClick:()=>n(e.name),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(eC.Checkbox,{checked:s,onChange:()=>n(e.name)}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Text,{className:"font-medium text-gray-900",children:l[e.name]||e.name}),(0,t.jsx)("span",{className:`px-2 py-0.5 text-xs rounded-full font-medium ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Enabled":"Disabled"}),l[e.name]&&(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs rounded-full font-medium bg-purple-100 text-purple-800",children:"Custom name"})]}),(a[e.name]||e.description)&&(0,t.jsx)(d.Text,{className:"text-gray-500 text-sm block mt-1",children:a[e.name]||e.description}),(0,t.jsx)(d.Text,{className:"text-gray-400 text-xs block mt-1",children:s?"✓ Users can call this tool":"✗ Users cannot call this tool"})]}),(0,t.jsx)("button",{type:"button",onClick:t=>i(e.name,t),className:`p-1.5 rounded-md transition-colors ${r?"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`,title:"Edit display name and description",children:(0,t.jsx)(eS.EditOutlined,{})})]})}),r&&(0,t.jsxs)("div",{className:"px-4 pb-4 pt-3 border-t border-gray-200 space-y-3 bg-gray-50 rounded-b-lg",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-600 mb-1 block",children:"Display Name"}),(0,t.jsx)(H.Input,{placeholder:e.name,value:l[e.name]||"",onChange:t=>o(e.name,t.target.value)}),(0,t.jsx)(d.Text,{className:"text-xs text-gray-400 mt-1 block",children:"Override how this tool's name appears to users. Leave blank to use original."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-600 mb-1 block",children:"Description"}),(0,t.jsx)(H.Input.TextArea,{placeholder:e.description||"No description",value:a[e.name]||"",onChange:t=>c(e.name,t.target.value),rows:2}),(0,t.jsx)(d.Text,{className:"text-xs text-gray-400 mt-1 block",children:"Override the tool description shown to users. Leave blank to use original."})]})]})]}),eP=({accessToken:e,oauthAccessToken:s,formValues:r,allowedTools:l,existingAllowedTools:a,onAllowedToolsChange:n,toolNameToDisplayName:i,toolNameToDescription:o,onToolNameToDisplayNameChange:c,onToolNameToDescriptionChange:u,keyTools:x,externalTools:p,externalIsLoading:h,externalError:g,externalCanFetch:f})=>{let j=(0,b.useRef)([]),[y,v]=(0,b.useState)(""),[N,_]=(0,b.useState)("crud"),w=(0,b.useRef)(!1),S=(0,b.useRef)(""),[C,T]=(0,b.useState)(new Set),k=void 0!==p,A=ek({accessToken:e,oauthAccessToken:s,formValues:r,enabled:!k}),I=k?p:A.tools,P=k?h??!1:A.isLoadingTools,O=k?g??null:A.toolsError,M=k?f??!1:A.canFetchTools,F=(0,b.useMemo)(()=>{if(!x||0===x.length||0===I.length)return[];let e=new Set,t=[];for(let s of x){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=I.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=I.find(s=>!e.has(s.name)&&l(s.name).includes(t))}a&&(t.push(a),e.add(a.name))}return t},[x,I]),E=(0,b.useMemo)(()=>new Set(F.map(e=>e.name)),[F]),L=(0,b.useMemo)(()=>I.filter(e=>{let t=y.toLowerCase();return e.name.toLowerCase().includes(t)||e.description&&e.description.toLowerCase().includes(t)}),[I,y]),R=(0,b.useMemo)(()=>L.filter(e=>E.has(e.name)),[L,E]),z=(0,b.useMemo)(()=>L.filter(e=>!E.has(e.name)),[L,E]);(0,b.useEffect)(()=>{let e=I.map(e=>e.name).sort().join(","),t=j.current.map(e=>e.name).sort().join(","),s=F.map(e=>e.name).sort().join(",");if(s!==S.current&&(S.current=s,""!==s&&(w.current=!1)),I.length>0&&e!==t){let e=I.map(e=>e.name);w.current?n(l.filter(t=>e.includes(t))):(w.current=!0,a&&a.length>0?n(a.filter(t=>e.includes(t))):F.length>0?n(F.map(e=>e.name).filter(t=>e.includes(t))):n(e))}j.current=I},[I,l,a,n,F]);let U=e=>{l.includes(e)?n(l.filter(t=>t!==e)):n([...l,e])},B=(e,t)=>{t.stopPropagation(),T(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},q=(e,t)=>{let s={...i};t?s[e]=t:delete s[e],c(s)},V=(e,t)=>{let s={...o};t?s[e]=t:delete s[e],u(s)};return M||r.url||r.spec_path?(0,t.jsx)(eg.Card,{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)(eh.ToolOutlined,{className:"text-blue-600"}),(0,t.jsx)(m.Title,{children:"Tool Configuration"}),I.length>0&&(0,t.jsx)(ex.Badge,{count:I.length,style:{backgroundColor:"#52c41a"}})]}),I.length>0&&(0,t.jsx)(eT.Radio.Group,{value:N,onChange:e=>_(e.target.value),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(d.Text,{className:"text-blue-800 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."]})}),P&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,t.jsx)(W.Spin,{size:"large"}),(0,t.jsx)(d.Text,{className:"ml-3",children:"Loading tools from spec..."})]}),O&&!P&&(0,t.jsxs)("div",{className:"text-center py-6 text-red-500 border rounded-lg border-dashed border-red-300 bg-red-50",children:[(0,t.jsx)(eh.ToolOutlined,{className:"text-2xl mb-2"}),(0,t.jsx)(d.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)("br",{}),(0,t.jsx)(d.Text,{className:"text-sm text-red-500",children:O})]}),!P&&!O&&0===I.length&&M&&(x&&x.length>0?(0,t.jsxs)("div",{className:"text-center py-4 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(eh.ToolOutlined,{className:"text-2xl mb-2"}),(0,t.jsx)(d.Text,{children:"No tools loaded from spec"}),(0,t.jsxs)(d.Text,{className:"text-sm block mt-1",children:["Expected tools: ",x.map(e=>e.name).join(", ")]})]}):(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(eh.ToolOutlined,{className:"text-2xl mb-2"}),(0,t.jsx)(d.Text,{children:"No tools available for configuration"}),(0,t.jsx)("br",{}),(0,t.jsx)(d.Text,{className:"text-sm",children:"Connect to an MCP server with tools to configure them"})]})),!M&&(r.url||r.spec_path)&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(eh.ToolOutlined,{className:"text-2xl mb-2"}),(0,t.jsx)(d.Text,{children:"Complete required fields to configure tools"}),(0,t.jsx)("br",{}),(0,t.jsx)(d.Text,{className:"text-sm",children:"Fill in URL, Transport, and Authentication to load available tools"})]}),!P&&!O&&I.length>0&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-green-50 rounded-lg border border-green-200",children:[(0,t.jsx)(ey.CheckCircleOutlined,{className:"text-green-600"}),(0,t.jsxs)(d.Text,{className:"text-green-700 font-medium",children:[l.length," of ",I.length," ",1===I.length?"tool":"tools"," enabled for user access"]})]}),(0,t.jsx)(H.Input,{placeholder:"Search tools by name or description...",prefix:(0,t.jsx)(ew.SearchOutlined,{className:"text-gray-400"}),value:y,onChange:e=>v(e.target.value),allowClear:!0,className:"rounded-lg",size:"large"}),"crud"===N&&(0,t.jsx)(eA.default,{tools:I,searchFilter:y,value:0===l.length?void 0:l,onChange:e=>n(e)}),"flat"===N&&(0,t.jsx)(t.Fragment,{children:0===L.length?(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(ew.SearchOutlined,{className:"text-2xl mb-2"}),(0,t.jsxs)(d.Text,{children:['No tools found matching "',y,'"']})]}):(0,t.jsxs)("div",{className:"space-y-2",children:[R.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 text-gray-500 uppercase tracking-wide",children:"Suggested tools"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let e=F.map(e=>e.name);n([...l.filter(e=>!E.has(e)),...e])},className:"text-xs text-blue-600 hover:text-blue-700",children:"Enable all"}),(0,t.jsx)("button",{type:"button",onClick:()=>{n(l.filter(e=>!E.has(e)))},className:"text-xs text-gray-500 hover:text-gray-700",children:"Disable all"})]})]}),R.map(e=>(0,t.jsx)(eI,{tool:e,isEnabled:l.includes(e.name),isEditExpanded:C.has(e.name),toolNameToDisplayName:i,toolNameToDescription:o,onToggle:U,onToggleExpand:B,onDisplayNameChange:q,onDescriptionChange:V},e.name))]}),z.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 text-gray-500 uppercase tracking-wide",children:R.length>0?"All tools":"Tools"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let e=I.filter(e=>!E.has(e.name)).map(e=>e.name),t=new Set(l);n([...l,...e.filter(e=>!t.has(e))])},className:"text-xs text-blue-600 hover:text-blue-700",children:"Enable all"}),(0,t.jsx)("button",{type:"button",onClick:()=>{n(l.filter(e=>E.has(e)))},className:"text-xs text-gray-500 hover:text-gray-700",children:"Disable all"})]})]}),z.map(e=>(0,t.jsx)(eI,{tool:e,isEnabled:l.includes(e.name),isEditExpanded:C.has(e.name),toolNameToDisplayName:i,toolNameToDescription:o,onToggle:U,onToggleExpand:B,onDisplayNameChange:q,onDescriptionChange:V},e.name))]})]})})]})]})}):null},eO=({isVisible:e,required:s=!0})=>e?(0,t.jsx)(D.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)(g.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)(en.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)(H.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 eM=e.i(770914),eF=e.i(564897),eE=e.i(646563);let{Panel:eL}=ea.Collapse,eR=({availableAccessGroups:e,mcpServer:s,searchValue:r,setSearchValue:l,getAccessGroupOptions:a})=>{let n=D.Form.useFormInstance();return(0,b.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)}"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)}else n.setFieldValue("allow_all_keys",!1),n.setFieldValue("available_on_public_internet",!0)},[s,n]),(0,t.jsx)(ea.Collapse,{className:"bg-gray-50 border border-gray-200 rounded-lg",expandIconPosition:"end",ghost:!1,children:(0,t.jsx)(eL,{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)(g.Tooltip,{title:"When enabled, every API key can access this MCP server.",children:(0,t.jsx)(en.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)(D.Form.Item,{name:"allow_all_keys",valuePropName:"checked",initialValue:s?.allow_all_keys??!1,className:"mb-0",children:(0,t.jsx)(el.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)(g.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)(en.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)(D.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)(el.Switch,{})})]}),(0,t.jsx)(D.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)(g.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)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"mcp_access_groups",className:"mb-4",children:(0,t.jsx)(h.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)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Extra Headers",(0,t.jsx)(g.Tooltip,{title:"Forward custom headers from incoming requests to this MCP server (e.g., Authorization, X-Custom-Header, User-Agent)",children:(0,t.jsx)(en.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)(h.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)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Static Headers",(0,t.jsx)(g.Tooltip,{title:"Send these key-value headers with every request to this MCP server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),required:!1,children:(0,t.jsx)(D.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)(eM.Space,{className:"flex w-full",align:"baseline",size:"middle",children:[(0,t.jsx)(D.Form.Item,{...l,name:[s,"header"],className:"flex-1",rules:[{required:!0,message:"Header name is required"}],children:(0,t.jsx)(H.Input,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header name (e.g., X-API-Key)"})}),(0,t.jsx)(D.Form.Item,{...l,name:[s,"value"],className:"flex-1",rules:[{required:!0,message:"Header value is required"}],children:(0,t.jsx)(H.Input,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header value"})}),(0,t.jsx)(eF.MinusCircleOutlined,{onClick:()=>r(s),className:"text-gray-500 hover:text-red-500 cursor-pointer"})]},e)),(0,t.jsx)(eb.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(eE.PlusOutlined,{}),block:!0,children:"Add Static Header"})]})})})]})},"permissions")})},ez=({accessToken:e,selectedName:s,onSelect:r})=>{let[l,a]=(0,b.useState)([]),[n,i]=(0,b.useState)(!1),[o,c]=(0,b.useState)(new Set);return((0,b.useEffect)(()=>{e&&(i(!0),(0,_.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 text-gray-700",children:"Popular APIs"}),(0,t.jsx)("div",{className:"flex justify-center py-6",children:(0,t.jsx)(W.Spin,{size:"small"})})]}):0===l.length?null:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",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:`flex flex-col items-center gap-1.5 p-3 rounded-lg border transition-all cursor-pointer + ${l?"border-blue-500 bg-blue-50 shadow-sm":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[a?(0,t.jsx)("span",{className:"w-7 h-7 rounded-full bg-gray-200 flex items-center justify-center text-sm font-bold text-gray-600",children:e.title.charAt(0)}):(0,t.jsx)("img",{src:e.icon_url,alt:e.title,className:"w-7 h-7 object-contain",onError:()=>{var t;return t=e.name,void c(e=>new Set(e).add(t))}}),(0,t.jsx)("span",{className:"text-xs text-gray-600 text-center leading-tight font-medium",children:e.title})]},e.name)})}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-2",children:"Select an API to pre-fill the spec URL and OAuth 2.0 settings, or enter your own spec URL below."})]})},eU=({form:e,accessToken:s,onValuesChange:r,onKeyToolsChange:l,onLogoUrlChange:a,onOAuthDocsUrlChange:n})=>{let[i,o]=(0,b.useState)(null);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ez,{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=eo.AUTH_TYPE.OAUTH2,s.oauth_flow_type=eo.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)(D.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)(g.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)(en.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)(H.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 eB=e.i(596239);let eq="/ui/assets/logos/",eV=[{name:"GitHub",url:`${eq}github.svg`},{name:"Slack",url:`${eq}slack.svg`},{name:"Notion",url:`${eq}notion.svg`},{name:"Linear",url:`${eq}linear.svg`},{name:"Jira",url:`${eq}jira.svg`},{name:"Figma",url:`${eq}figma.svg`},{name:"Gmail",url:`${eq}gmail.svg`},{name:"Google Drive",url:`${eq}google_drive.svg`},{name:"Stripe",url:`${eq}stripe.svg`},{name:"Shopify",url:`${eq}shopify.svg`},{name:"Salesforce",url:`${eq}salesforce.svg`},{name:"HubSpot",url:`${eq}hubspot.svg`},{name:"Twilio",url:`${eq}twilio.svg`},{name:"Cloudflare",url:`${eq}cloudflare.svg`},{name:"Sentry",url:`${eq}sentry.svg`},{name:"PostgreSQL",url:`${eq}postgresql.svg`},{name:"Snowflake",url:`${eq}snowflake.svg`},{name:"Zapier",url:`${eq}zapier.svg`},{name:"Google",url:`${eq}google.svg`},{name:"GitLab",url:`${eq}gitlab.svg`}],e$=({value:e,onChange:s})=>{let[r,l]=(0,b.useState)(new Set);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Logo"}),(0,t.jsx)(g.Tooltip,{title:"Select a well-known logo or paste a URL to any image. The logo is shown on the admin and chat pages.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-blue-400 hover:text-blue-600 cursor-help"})})]}),e&&(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsx)("img",{src:e,alt:"Selected logo",className:"w-10 h-10 object-contain rounded",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e})}),(0,t.jsx)("button",{type:"button",onClick:()=>s?.(void 0),className:"text-xs text-gray-400 hover:text-red-500 cursor-pointer bg-transparent border-none",children:"✕"})]}),(0,t.jsx)("div",{className:"grid grid-cols-10 gap-1.5 mb-3",children:eV.map(a=>{let n=e===a.url;return r.has(a.url)?null:(0,t.jsx)(g.Tooltip,{title:a.name,children:(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=a.url,void s?.(e===t?void 0:t)},className:`flex items-center justify-center p-2 rounded-lg border transition-all cursor-pointer + ${n?"border-blue-500 bg-blue-50 shadow-sm":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,style:{width:40,height:40},children:(0,t.jsx)("img",{src:a.url,alt:a.name,className:"w-5 h-5 object-contain",onError:()=>{var e;return e=a.url,void l(t=>new Set(t).add(e))}})})},a.name)})}),(0,t.jsx)(H.Input,{prefix:(0,t.jsx)(eB.LinkOutlined,{className:"text-gray-400"}),placeholder:"Or paste a custom logo URL...",value:e&&!eV.some(t=>t.url===e)?e:"",onChange:e=>{let t=e.target.value.trim();s?.(t||void 0)},className:"rounded-lg",size:"small"})]})},eD=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}}},eH=e=>{let{token:t}=eD(e);return{maskedUrl:(e=>{let{token:t,baseUrl:s}=eD(e);return t?s+"...":e})(e),hasToken:!!t}},eK=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(),eW=e=>e&&(e.includes("-")||e.includes(" "))?Promise.reject("Cannot contain '-' (hyphen) or spaces. Please use '_' (underscore) instead."):Promise.resolve();var eJ=e.i(122520),eY=e.i(165615),eG=e.i(434166);let eQ=({accessToken:e,getCredentials:t,getTemporaryPayload:s,onTokenReceived:r,onBeforeRedirect:l})=>{let[a,n]=(0,b.useState)("idle"),[i,o]=(0,b.useState)(null),[c,d]=(0,b.useState)(null),m=(0,b.useRef)(!1),u="litellm-mcp-oauth-flow-state",x="litellm-mcp-oauth-result",p="litellm-mcp-oauth-return-url",h=(e,t)=>{(0,eG.setSecureItem)(e,t)},g=e=>{try{return(0,eG.getSecureItem)(e)}catch(t){return console.warn(`Failed to get storage item ${e}`,t),null}},f=()=>{try{window.sessionStorage.removeItem(u),window.sessionStorage.removeItem(x),window.sessionStorage.removeItem(p),window.localStorage.removeItem(u),window.localStorage.removeItem(x),window.localStorage.removeItem(p)}catch(e){console.warn("Failed to clear OAuth storage",e)}},j=()=>{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`},y=(0,b.useCallback)(async()=>{let r=t()||{};if(!e){o("Missing admin token"),C.default.error("Access token missing. Please re-authenticate and try again.");return}let a=s();if(!a||!a.url||!a.transport){let e="Please complete server URL and transport before starting OAuth.";o(e),C.default.error(e);return}try{n("authorizing"),o(null);let t=await (0,_.cacheTemporaryMcpServer)(e,a),s=t?.server_id?.trim();if(!s)throw Error("Temporary MCP server identifier missing. Please retry.");let i={};if(!(a.credentials?.client_id&&a.credentials?.client_secret)){let t=await (0,_.registerMcpOAuthClient)(e,s,{client_name:a.alias||a.server_name||s,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:a.credentials&&a.credentials.client_secret?"client_secret_post":"none"});i={clientId:t?.client_id,clientSecret:t?.client_secret}}let c=(0,eY.generateCodeVerifier)(),d=await (0,eY.generateCodeChallenge)(c),m=crypto.randomUUID(),x=i.clientId||r.client_id,g=Array.isArray(r.scopes)?r.scopes.filter(e=>e&&e.trim().length>0).join(" "):void 0,f=(0,_.buildMcpOAuthAuthorizeUrl)({serverId:s,clientId:x,redirectUri:j(),state:m,codeChallenge:d,scope:g}),b={state:m,codeVerifier:c,clientId:x,clientSecret:i.clientSecret||r.client_secret,serverId:s,redirectUri:j()};if(l)try{l()}catch(e){console.error("Failed to prepare for OAuth redirect",e)}try{h(u,JSON.stringify(b)),h(p,window.location.href)}catch(e){throw Error("Unable to access browser storage for OAuth. Please enable storage and retry.")}window.location.href=f}catch(t){console.error("Failed to start OAuth flow",t),n("error");let e=(0,eJ.extractErrorMessage)(t);o(e),C.default.error(e)}},[e,t,s,l]),v=(0,b.useCallback)(async()=>{if(m.current)return;let e=null,t=null;try{let s=g(x);if(!s)return;m.current=!0,e=JSON.parse(s);let r=g(u);t=r?JSON.parse(r):null}catch(e){f(),m.current=!1,o("Failed to resume OAuth flow. Please retry."),n("error"),C.default.error("Failed to resume OAuth flow. Please retry.");return}if(!e){m.current=!1;return}try{window.sessionStorage.removeItem(x),window.localStorage.removeItem(x)}catch(e){}try{if(!t||!t.state||!t.codeVerifier||!t.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(!e.state||e.state!==t.state)throw Error("OAuth state mismatch. Please retry.");if(e.error)throw Error(e.error_description||e.error);if(!e.code)throw Error("Authorization code missing in callback.");n("exchanging");let s=await (0,_.exchangeMcpOAuthToken)({serverId:t.serverId,code:e.code,clientId:t.clientId,clientSecret:t.clientSecret,codeVerifier:t.codeVerifier,redirectUri:t.redirectUri});r(s),d(s),n("success"),o(null),C.default.success("OAuth token retrieved successfully")}catch(t){let e=(0,eJ.extractErrorMessage)(t);o(e),n("error"),C.default.error(e)}finally{f(),setTimeout(()=>{m.current=!1},1e3)}},[r]);return(0,b.useEffect)(()=>{v()},[v]),{startOAuthFlow:y,status:a,error:i,tokenResponse:c}},eZ="../ui/assets/logos/mcp_logo.png",eX=[eo.AUTH_TYPE.API_KEY,eo.AUTH_TYPE.BEARER_TOKEN,eo.AUTH_TYPE.TOKEN,eo.AUTH_TYPE.BASIC],e0=[...eX,eo.AUTH_TYPE.OAUTH2,eo.AUTH_TYPE.AWS_SIGV4],e2="litellm-mcp-oauth-create-state",e1=e=>Array.isArray(e)?e.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value??""),e},{}):{},e5=({userRole:e,accessToken:r,onCreateSuccess:a,isModalVisible:n,setModalVisible:i,availableAccessGroups:o,prefillData:c,onBackToDiscovery:d})=>{let[m]=D.Form.useForm(),[u,x]=(0,b.useState)(!1),[f,j]=(0,b.useState)({}),[y,v]=(0,b.useState)({}),[N,w]=(0,b.useState)(null),[S,T]=(0,b.useState)(!1),[k,A]=(0,b.useState)([]),[I,P]=(0,b.useState)({}),[O,M]=(0,b.useState)({}),[F,E]=(0,b.useState)(""),[L,R]=(0,b.useState)([]),[z,U]=(0,b.useState)(""),[B,q]=(0,b.useState)(null),[V,$]=(0,b.useState)(void 0),[K,W]=(0,b.useState)(null),{tools:J,isLoadingTools:Y,toolsError:G,toolsErrorStackTrace:Q,canFetchTools:Z,fetchTools:X,clearTools:ee}=ek({accessToken:r,oauthAccessToken:B,formValues:y,enabled:!0}),et=y.auth_type,es=!!et&&eX.includes(et),er=et===eo.AUTH_TYPE.OAUTH2,ec=et===eo.AUTH_TYPE.AWS_SIGV4,ed=er&&y.oauth_flow_type===eo.OAUTH_FLOW.M2M,{startOAuthFlow:em,status:ex,error:ep,tokenResponse:eh}=eQ({accessToken:r,getCredentials:()=>m.getFieldValue("credentials"),getTemporaryPayload:()=>{let e=m.getFieldsValue(!0),t=e.transport||F,s=e.url||(t===eo.TRANSPORT.OPENAPI?e.spec_path:void 0);if(!s||!t)return null;let r=e1(e.static_headers);return{server_id:void 0,server_name:e.server_name,alias:e.alias,description:e.description,url:s,transport:t===eo.TRANSPORT.OPENAPI?"http":t,auth_type:eo.AUTH_TYPE.OAUTH2,credentials:e.credentials,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=>{if(q(e?.access_token??null),e?.access_token){let t={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}};m.setFieldsValue({credentials:t}),C.default.success("OAuth authorization successful! Please click 'Create MCP Server' to save the configuration.")}},onBeforeRedirect:()=>{try{let e=m.getFieldsValue(!0);(0,eG.setSecureItem)(e2,JSON.stringify({modalVisible:n,formValues:e,transportType:F,costConfig:f,allowedTools:k,searchValue:z,aliasManuallyEdited:S,logoUrl:V}))}catch(e){console.warn("Failed to persist MCP create state",e)}}});b.default.useEffect(()=>{let e=(0,eG.getSecureItem)(e2);if(e)try{let t=JSON.parse(e);t.modalVisible&&i(!0);let s=t.formValues?.transport||t.transportType||"";s&&E(s),t.formValues&&w({values:t.formValues,transport:s}),t.costConfig&&j(t.costConfig),t.allowedTools&&A(t.allowedTools),t.searchValue&&U(t.searchValue),"boolean"==typeof t.aliasManuallyEdited&&T(t.aliasManuallyEdited),t.logoUrl&&$(t.logoUrl)}catch(e){console.error("Failed to restore MCP create state",e)}finally{window.sessionStorage.removeItem(e2)}},[m,i]),b.default.useEffect(()=>{N&&(F||N.transport,(!N.transport||F)&&(m.setFieldsValue(N.values),v(N.values),w(null)))},[N,m,F]),b.default.useEffect(()=>{if(!n||!c)return;let e=(c.name||"").replace(/[^a-zA-Z0-9_]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,""),t=c.transport||"";E(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);m.setFieldsValue(s),v(s),T(!1)},[n,c,m]);let eg=async e=>{x(!0);try{let{static_headers:t,stdio_config:s,credentials:l,allow_all_keys:n,available_on_public_internet:o,token_validation_json:c,...d}=e,u=d.mcp_access_groups,p=e1(t),h=l&&"object"==typeof l?Object.entries(l).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,g={};if(s&&"stdio"===F)try{let e=JSON.parse(s),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],d.server_name||(d.server_name=r.replace(/-/g,"_"))}}g={command:t.command,args:t.args,env:t.env},console.log("Parsed stdio config:",g)}catch(e){C.default.fromBackend("Invalid JSON in stdio configuration");return}d.transport===eo.TRANSPORT.OPENAPI&&(d.transport="http");let b=null;if(c&&""!==c.trim())try{b=JSON.parse(c)}catch{C.default.fromBackend("Invalid JSON in Token Validation Rules"),x(!1);return}let y={...d,...g,stdio_config:void 0,mcp_info:{server_name:d.server_name||d.url,description:d.description,logo_url:V||void 0,mcp_server_cost_info:Object.keys(f).length>0?f:null},mcp_access_groups:u,alias:d.alias,allowed_tools:k.length>0?k:null,tool_name_to_display_name:Object.keys(I).length>0?I:null,tool_name_to_description:Object.keys(O).length>0?O:null,allow_all_keys:!!n,available_on_public_internet:!!o,static_headers:p,...null!==b&&{token_validation:b}};if(y.static_headers=p,d.auth_type&&e0.includes(d.auth_type)&&h&&Object.keys(h).length>0&&(y.credentials=h),console.log(`Payload: ${JSON.stringify(y)}`),null!=r){let e=ej?await (0,_.createMCPServer)(r,y):await (0,_.registerMCPServer)(r,y);C.default.success(ej?"MCP Server created successfully":"MCP Server submitted for admin review"),m.resetFields(),j({}),ee(),A([]),T(!1),$(void 0),i(!1),a(e)}}catch(t){let e=t instanceof Error?t.message:String(t);C.default.fromBackend(ej?`Error creating MCP Server: ${e}`:`Error submitting MCP Server: ${e}`)}finally{x(!1)}},eb=()=>{m.resetFields(),j({}),ee(),A([]),T(!1),$(void 0),i(!1)};b.default.useEffect(()=>{if(!S&&y.server_name){let e=y.server_name.replace(/\s+/g,"_");m.setFieldsValue({alias:e}),v(t=>({...t,alias:e}))}},[y.server_name]),b.default.useEffect(()=>{n||v({})},[n]);let ej=(0,s.isAdminRole)(e);return(0,t.jsx)(p.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:eZ,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:ej?"Add New MCP Server":"Submit MCP Server for Review"})]}),open:n,width:1e3,onCancel:eb,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)(D.Form,{form:m,onFinish:eg,onValuesChange:(e,t)=>v(t),layout:"vertical",className:"space-y-6",children:[!ej&&(0,t.jsxs)("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 before it becomes active."," ","Note: 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)(D.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)(g.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)(en.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)=>eW(t)}],children:(0,t.jsx)(ei.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)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Alias",(0,t.jsx)(g.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)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"alias",rules:[{required:!1},{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(ei.TextInput,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",onChange:()=>T(!0)})}),(0,t.jsx)(D.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)(ei.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)(e$,{value:V,onChange:$}),(0,t.jsx)(D.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)(ei.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)(D.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)(h.Select,{placeholder:"Select transport",className:"rounded-lg",size:"large",onChange:e=>{E(e),"stdio"===e?m.setFieldsValue({url:void 0,spec_path:void 0,auth_type:void 0,credentials:void 0}):e===eo.TRANSPORT.OPENAPI?m.setFieldsValue({url:void 0,command:void 0,args:void 0,env:void 0}):m.setFieldsValue({spec_path:void 0,command:void 0,args:void 0,env:void 0})},value:F,children:[(0,t.jsx)(h.Select.Option,{value:"http",children:"Streamable HTTP (Recommended)"}),(0,t.jsx)(h.Select.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(h.Select.Option,{value:"stdio",children:"Standard Input/Output (stdio)"}),(0,t.jsx)(h.Select.Option,{value:eo.TRANSPORT.OPENAPI,children:"OpenAPI Spec"})]})}),("http"===F||"sse"===F)&&(0,t.jsx)(D.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)=>eK(t)}],children:(0,t.jsx)(H.Input,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),F===eo.TRANSPORT.OPENAPI&&(0,t.jsx)(eU,{form:m,accessToken:n?r:null,onValuesChange:e=>v(t=>({...t,...e})),onKeyToolsChange:R,onLogoUrlChange:$,onOAuthDocsUrlChange:W}),F===eo.TRANSPORT.OPENAPI&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.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)(g.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)(en.InfoCircleOutlined,{className:"text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"is_byok",valuePropName:"checked",children:(0,t.jsx)(el.Switch,{})}),(0,t.jsx)(D.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)(en.InfoCircleOutlined,{className:"mt-0.5 flex-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",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)(en.InfoCircleOutlined,{className:"mt-0.5 flex-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)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Access Description",(0,t.jsx)(g.Tooltip,{title:"List of permissions shown to users in the connection modal (e.g. 'Create and manage Jira issues')",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"byok_description",children:(0,t.jsx)(h.Select,{mode:"tags",placeholder:"Add access description items (press Enter after each)",className:"w-full",tokenSeparators:[","]})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["API Key Help URL",(0,t.jsx)(g.Tooltip,{title:"Optional link shown to users to help them find their API key",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"byok_api_key_help_url",children:(0,t.jsx)(H.Input,{placeholder:"https://docs.example.com/api-keys"})})]}):null})]}),"stdio"!==F&&""!==F&&(0,t.jsx)(ea.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)(D.Form.Item,{name:"auth_type",rules:[{required:!0,message:"Please select an auth type"}],children:(0,t.jsxs)(h.Select,{placeholder:"Select auth type",className:"rounded-lg",size:"large",children:[(0,t.jsx)(h.Select.Option,{value:"none",children:"None"}),(0,t.jsx)(h.Select.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(h.Select.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(h.Select.Option,{value:"token",children:"Token"}),(0,t.jsx)(h.Select.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(h.Select.Option,{value:"oauth2",children:"OAuth"}),(0,t.jsx)(h.Select.Option,{value:"aws_sigv4",children:"AWS SigV4 (Bedrock AgentCore MCPs)"})]})}),es&&(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(g.Tooltip,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(en.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)(ei.TextInput,{type:"password",placeholder:"Enter token or secret",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),er&&(0,t.jsx)(eu,{isM2M:ed,initialFlowType:eo.OAUTH_FLOW.INTERACTIVE,docsUrl:K,oauthFlow:{startOAuthFlow:em,status:ex,error:ep,tokenResponse:eh}})]})}]}),"stdio"!==F&&""!==F&&ec&&(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)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Region",(0,t.jsx)(g.Tooltip,{title:"AWS region for SigV4 signing (e.g., us-east-1)",children:(0,t.jsx)(en.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)(H.Input,{placeholder:"us-east-1",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.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)(g.Tooltip,{title:"AWS service name for SigV4 signing. Defaults to 'bedrock-agentcore'.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_service_name"],children:(0,t.jsx)(H.Input,{placeholder:"bedrock-agentcore",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.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)(g.Tooltip,{title:"Optional. If not provided, falls back to the boto3 credential chain (IAM role, env vars, etc.).",children:(0,t.jsx)(en.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)(H.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)(D.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)(g.Tooltip,{title:"Optional. Required if AWS Access Key ID is provided.",children:(0,t.jsx)(en.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)(H.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)(D.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)(g.Tooltip,{title:"Optional. Only needed for temporary STS credentials.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_token"],children:(0,t.jsx)(H.Input.Password,{placeholder:"Enter session token (optional)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.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)(g.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)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_role_name"],children:(0,t.jsx)(H.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)(D.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)(g.Tooltip,{title:"Optional. Session name for the AssumeRole call — appears in CloudTrail logs. Auto-generated if omitted.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_name"],children:(0,t.jsx)(H.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)(eO,{isVisible:"stdio"===F})]}),(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)(eR,{availableAccessGroups:o,mcpServer:null,searchValue:z,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 z&&!o.some(e=>e.toLowerCase().includes(z.toLowerCase()))&&e.push({value:z,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:z}),(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)(e_,{formValues:y,tools:J,isLoadingTools:Y,toolsError:G,toolsErrorStackTrace:Q,canFetchTools:Z,fetchTools:X})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(eP,{accessToken:r,oauthAccessToken:B,formValues:y,allowedTools:k,existingAllowedTools:null,onAllowedToolsChange:A,toolNameToDisplayName:I,toolNameToDescription:O,onToolNameToDisplayNameChange:P,onToolNameToDescriptionChange:M,keyTools:L,externalTools:J,externalIsLoading:Y,externalError:G,externalCanFetch:Z})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(ef,{value:f,onChange:j,tools:J.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)(l.Button,{variant:"secondary",onClick:eb,children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"primary",loading:u,children:u?"Creating...":"Add MCP Server"})]})]})})})};var e4=e.i(175712),e6=e.i(118366),e3=e.i(475254);let e7=(0,e3.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",()=>e7],758472);let e8=(0,e3.default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),e9=(0,e3.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 te=e.i(634831),tt=e.i(438100);let ts=(0,e3.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"}]]);var tr=e.i(500330);let{Title:tl,Text:ta}=f.Typography,{Panel:tn}=ea.Collapse,ti=({icon:e,title:s,description:r,children:l,serverName:a,accessGroups:n=["dev-group"]})=>{let[i,o]=(0,b.useState)(!1);return(0,t.jsxs)(e4.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)(tl,{level:5,className:"mb-0",children:s}),(0,t.jsx)(ta,{className:"text-gray-600",children:r})]})]}),a&&("Implementation Example"===s||"Configuration"===s)&&(0,t.jsxs)(D.Form.Item,{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(el.Switch,{size:"small",checked:i,onChange:o}),(0,t.jsxs)(ta,{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)(ej.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"'})]})]})})]}),b.default.Children.map(l,e=>{if(b.default.isValidElement(e)&&e.props.hasOwnProperty("code")&&e.props.hasOwnProperty("copyKey")){let t=e.props.code;if(t&&t.includes('"headers":'))return b.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})]})},to=({currentServerAccessGroups:e=[]})=>{let s=(0,_.getProxyBaseUrl)(),[r,l]=(0,b.useState)({}),[u,x]=(0,b.useState)({openai:[],litellm:[],cursor:[],http:[]}),[p]=(0,b.useState)("Zapier_MCP"),h=async(e,t)=>{await (0,tr.copyToClipboard)(e)&&(l(e=>({...e,[t]:!0})),setTimeout(()=>{l(e=>({...e,[t]:!1}))},2e3))},g=({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)(e7,{size:16,className:"text-blue-600"}),(0,t.jsx)(ta,{strong:!0,className:"text-gray-700",children:l})]}),(0,t.jsxs)(e4.Card,{className:`bg-gray-50 border border-gray-200 relative ${a}`,children:[(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:r[s]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(e6.CopyIcon,{size:12}),onClick:()=>h(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})]})]}),f=({step:e,title:s,children:r})=>(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:"flex-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)(ta,{strong:!0,className:"text-gray-800 block mb-2",children:s}),r]})]});return(0,t.jsx)("div",{children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Title,{className:"text-3xl font-bold text-gray-900 mb-3",children:"Connect to your MCP client"}),(0,t.jsx)(d.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)(n.TabGroup,{className:"w-full",children:[(0,t.jsx)(i.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)(a.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)(e7,{size:18}),"OpenAI API"]})}),(0,t.jsx)(a.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)(ts,{size:18}),"LiteLLM Proxy"]})}),(0,t.jsx)(a.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)(e8,{size:18}),"Cursor"]})}),(0,t.jsx)(a.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)(e9,{size:18}),"Streamable HTTP"]})})]})}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-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)(e7,{className:"text-blue-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-blue-900",children:"OpenAI Responses API Integration"})]}),(0,t.jsx)(ta,{className:"text-blue-700",children:"Connect OpenAI Responses API to your LiteLLM MCP server for seamless tool integration"})]}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(ti,{icon:(0,t.jsx)(tt.KeyIcon,{className:"text-blue-600",size:16}),title:"API Key Setup",description:"Configure your OpenAI API key for authentication",children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsxs)(ta,{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)(te.ExternalLinkIcon,{size:12})]})]})}),(0,t.jsx)(g,{title:"Environment Variable",code:'export OPENAI_API_KEY="sk-..."',copyKey:"openai-env"})]})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(P.ServerIcon,{className:"text-blue-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"openai-server-url"})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e7,{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)(g,{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)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-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)(ts,{className:"text-emerald-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-emerald-900",children:"LiteLLM Proxy API Integration"})]}),(0,t.jsx)(ta,{className:"text-emerald-700",children:"Connect to LiteLLM Proxy Responses API for seamless tool integration with multiple model providers"})]}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(ti,{icon:(0,t.jsx)(tt.KeyIcon,{className:"text-emerald-600",size:16}),title:"Virtual Key Setup",description:"Configure your LiteLLM Proxy Virtual Key for authentication",children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(ta,{children:"Get your Virtual Key from your LiteLLM Proxy dashboard or contact your administrator"})}),(0,t.jsx)(g,{title:"Environment Variable",code:'export LITELLM_API_KEY="sk-..."',copyKey:"litellm-env"})]})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(P.ServerIcon,{className:"text-emerald-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"litellm-server-url"})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e7,{className:"text-emerald-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the LiteLLM Proxy Responses API",serverName:p,accessGroups:["dev-group"],children:(0,t.jsx)(g,{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)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-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)(e8,{className:"text-purple-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-purple-900",children:"Cursor IDE Integration"})]}),(0,t.jsx)(ta,{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)(e4.Card,{className:"border border-gray-200",children:[(0,t.jsx)(tl,{level:5,className:"mb-4 text-gray-800",children:"Setup Instructions"}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(f,{step:1,title:"Open Cursor Settings",children:(0,t.jsxs)(ta,{className:"text-gray-600",children:["Use the keyboard shortcut ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"⇧+⌘+J"})," (Mac) or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+Shift+J"})," (Windows/Linux)"]})}),(0,t.jsx)(f,{step:2,title:"Navigate to MCP Tools",children:(0,t.jsx)(ta,{className:"text-gray-600",children:'Go to the "MCP Tools" tab and click "New MCP Server"'})}),(0,t.jsxs)(f,{step:3,title:"Add Configuration",children:[(0,t.jsxs)(ta,{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",children:"Cmd+S"})," or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+S"})]}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e7,{className:"text-purple-600",size:16}),title:"Configuration",description:"Cursor MCP configuration",serverName:"Zapier Gmail",accessGroups:["dev-group"],children:(0,t.jsx)(g,{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)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-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)(e9,{className:"text-green-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-green-900",children:"Streamable HTTP Transport"})]}),(0,t.jsx)(ta,{className:"text-green-700",children:"Connect to LiteLLM MCP using HTTP transport. Compatible with any MCP client that supports HTTP streaming."})]}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e9,{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)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(ta,{children:"Each MCP client supports different transports. Refer to your client documentation to determine the appropriate transport method."})}),(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"http-server-url"}),(0,t.jsx)(g,{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)(eb.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)(te.ExternalLinkIcon,{size:14}),children:"Learn more about MCP transports"})})]})})]}),{})})]})]})]})})};var tc=e.i(752978),td=e.i(591935),tm=e.i(492030);let tu=({server:e,isLoadingHealth:s,isRechecking:r,onRecheck:l})=>{let[a,n]=(0,b.useState)(!1),i=e.status||"unknown",o=e.last_health_check,c=e.health_check_error;if(s||r)return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-400 px-2 py-0.5 rounded-full bg-gray-50 border border-gray-100",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-gray-300 animate-pulse"}),"Checking"]});let d=!!l,m=(0,t.jsxs)("div",{className:"max-w-xs",children:[(0,t.jsxs)("div",{className:"font-semibold mb-1",children:["Health Status: ",i]}),o&&(0,t.jsxs)("div",{className:"text-xs mb-1",children:["Last Check: ",new Date(o).toLocaleString()]}),c&&(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"font-medium text-red-400 mb-1",children:"Error:"}),(0,t.jsx)("div",{className:"break-words",children:c})]}),!o&&!c&&(0,t.jsx)("div",{className:"text-xs text-gray-400",children:"No health check data available"}),d&&(0,t.jsx)("div",{className:"text-xs text-gray-400 mt-1",children:"Click to recheck"})]});return(0,t.jsx)(g.Tooltip,{title:m,placement:"top",children:(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full ${(e=>{switch(e){case"healthy":return"text-green-700 bg-green-50 border border-green-200";case"unhealthy":return"text-red-700 bg-red-50 border border-red-200";default:return"text-gray-600 bg-gray-50 border border-gray-200"}})(i)} ${d?"cursor-pointer hover:opacity-80":"cursor-default"}`,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onClick:d?()=>l(e.server_id):void 0,children:[(0,t.jsx)("span",{children:a&&d?"↻":(e=>{switch(e){case"healthy":return"✓";case"unhealthy":return"✗";default:return"?"}})(i)}),a&&d?"Recheck":i.charAt(0).toUpperCase()+i.slice(1)]})})};var tx=e.i(530212),tp=e.i(848725);let th=b.forwardRef(function(e,t){return b.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),b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}))});var tg=e.i(350967),tf=e.i(954616);function tb(e){if(!e)return[];if(Array.isArray(e))return e.map(e=>tj(e)).filter(e=>void 0!==e);let t=tj(e);return void 0===t?[]:[t]}function tj(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]=tj(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=tb(t);return e.length?e:s}return Array.isArray(t)?s.map((e,s)=>tj(t[s]??t[t.length-1],e)):s.map(e=>tj(t,e))}return void 0!==s?s:tb(e.items)}if(void 0!==s)return s;switch(e.type){case"integer":case"number":return 0;case"boolean":return!1;default:return""}}let ty=e=>{let t=tj(e);if("object"===e.type||"array"===e.type){let s="array"===e.type?[]:{};return JSON.stringify(t??s,null,2)}return t};function tv({tool:e,onSubmit:s,isLoading:r,result:a,error:n,onClose:i}){let[o]=D.Form.useForm(),[c,d]=b.default.useState("formatted"),[m,u]=b.default.useState(null),[x,p]=b.default.useState(null),f=b.default.useMemo(()=>"string"==typeof e.inputSchema?{type:"object",properties:{input:{type:"string",description:"Input for this tool"}},required:["input"]}:e.inputSchema,[e.inputSchema]),j=b.default.useMemo(()=>f.properties&&f.properties.params&&"object"===f.properties.params.type&&f.properties.params.properties?{type:"object",properties:f.properties.params.properties,required:f.properties.params.required||[]}:f,[f]);b.default.useEffect(()=>{if(o.resetFields(),!j.properties)return;let e={};Object.entries(j.properties).forEach(([t,s])=>{e[t]=ty(s)}),o.setFieldsValue(e)},[o,j,e]),b.default.useEffect(()=>{m&&(a||n)&&p(Date.now()-m)},[a,n,m]);let y=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}},v=async()=>{await y(JSON.stringify(a,null,2))?C.default.success("Result copied to clipboard"):C.default.fromBackend("Failed to copy result")},N=async()=>{await y(e.name)?C.default.success("Tool name copied to clipboard"):C.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: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:N,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)(l.Button,{onClick:i,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)(g.Tooltip,{title:"Configure the input parameters for this tool call",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)(D.Form,{form:o,onFinish:e=>{u(Date.now()),p(null);let t={};Object.entries(e).forEach(([e,s])=>{let r=j.properties?.[e];if(r&&null!=s&&""!==s)switch(r.type){case"boolean":t[e]="true"===s||!0===s;break;case"number":case"integer":{let l=Number(s);t[e]=Number.isNaN(l)?s:"integer"===r.type?Math.trunc(l):l;break}case"object":case"array":try{let l="string"==typeof s?JSON.parse(s):s,a="object"===r.type&&null!==l&&"object"==typeof l&&!Array.isArray(l),n="array"===r.type&&Array.isArray(l);"object"===r.type&&a||"array"===r.type&&n?t[e]=l:t[e]=s}catch(r){t[e]=s}break;case"string":t[e]=String(s);break;default:t[e]=s}else null!=s&&""!==s&&(t[e]=s)}),s(f.properties&&f.properties.params&&"object"===f.properties.params.type&&f.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)(D.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)(ei.TextInput,{placeholder:"Enter input for this tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})}):void 0===j.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(j.properties).map(([s,r])=>{let l=ty(r),a=`${e.name}-${s}`;return(0,t.jsxs)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[s," ",j.required?.includes(s)&&(0,t.jsx)("span",{className:"text-red-500",children:"*"}),r.description&&(0,t.jsx)(g.Tooltip,{title:r.description,children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:s,initialValue:l,rules:[{required:j.required?.includes(s),message:`Please enter ${s}`},..."object"===r.type||"array"===r.type?[{validator:(e,t)=>{if((null==t||""===t)&&!j.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-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors",defaultValue:l??"",children:[!j.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)(ei.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-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors"}),"boolean"===r.type&&(0,t.jsxs)(h.Select,{placeholder:`Select ${s}`,allowClear:!j.required?.includes(s),className:"w-full",children:[(0,t.jsx)(h.Select.Option,{value:!0,children:"True"}),(0,t.jsx)(h.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-sm focus:outline-none 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)(l.Button,{onClick:()=>o.submit(),disabled:r,variant:"primary",className:"w-full",loading:r,children:r?"Calling Tool...":a||n?"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:a||n||r?(0,t.jsxs)("div",{className:"space-y-3",children:[a&&!r&&!n&&(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!==x&&(0,t.jsxs)("span",{className:"text-xs text-green-600 ml-1",children:["• ",(x/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 border border-green-300 p-0.5",children:[(0,t.jsx)("button",{onClick:()=>d("formatted"),className:`px-2 py-1 text-xs font-medium rounded transition-colors ${"formatted"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"}`,children:"Formatted"}),(0,t.jsx)("button",{onClick:()=>d("json"),className:`px-2 py-1 text-xs font-medium rounded transition-colors ${"json"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"}`,children:"JSON"})]}),(0,t.jsx)("button",{onClick:v,className:"p-1 hover:bg-green-100 rounded 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"})]}),n&&(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:"flex-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!==x&&(0,t.jsxs)("span",{className:"text-xs text-red-600",children:["• ",(x/1e3).toFixed(2),"s"]})]}),(0,t.jsx)("div",{className:"bg-white border border-red-200 rounded 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:n.message})})]})]})}),a&&!r&&!n&&(0,t.jsx)("div",{className:"space-y-3",children:"formatted"===c?a.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 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 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 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 p-3 border border-gray-200",children:(0,t.jsx)("img",{src:e.url,alt:"Tool result",className:"max-w-full h-auto rounded shadow-sm"})})})]}),"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",children:[(0,t.jsx)("div",{className:"flex-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 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(a,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.'})]})})})]})]})]})}var tN=e.i(983561),t_=e.i(438957);let tw=({serverId:e,accessToken:s,auth_type:r,userRole:l,userID:a,serverAlias:n,extraHeaders:i})=>{let[o,c]=(0,b.useState)(null),[u,x]=(0,b.useState)(null),[p,h]=(0,b.useState)(null),[g,f]=(0,b.useState)(""),[j,v]=(0,b.useState)({}),[N,w]=(0,b.useState)(!1),S=i&&i.length>0,C=()=>{if(!n||!S)return;let e={};return Object.entries(j).forEach(([t,s])=>{s&&s.trim()&&(e[`x-mcp-${n}-${t.toLowerCase()}`]=s)}),Object.keys(e).length>0?e:void 0},{data:T,isLoading:k,error:A,refetch:I}=(0,y.useQuery)({queryKey:["mcpTools",e,j],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,_.listMCPTools)(s,e,C())},enabled:!!s,staleTime:3e4}),{mutate:P,isPending:O}=(0,tf.useMutation)({mutationFn:async t=>{if(!s)throw Error("Access Token required");try{return await (0,_.callMCPTool)(s,e,t.tool.name,t.arguments,{customHeaders:C()})}catch(e){throw e}},onSuccess:e=>{x(e.content),h(null)},onError:e=>{h(e),x(null)}}),M=T?.tools||[],F=M.filter(e=>{let t=g.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 h-screen p-4 bg-white",children:(0,t.jsx)(eg.Card,{className:"w-full rounded-xl shadow-md overflow-hidden",children:(0,t.jsxs)("div",{className:"flex h-auto w-full gap-4",children:[(0,t.jsxs)("div",{className:"w-1/4 p-4 bg-gray-50 flex flex-col",children:[(0,t.jsx)(m.Title,{className:"text-xl font-semibold mb-6 mt-2",children:"MCP Tools"}),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[S&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(t_.KeyOutlined,{className:"text-blue-600 mr-2"}),(0,t.jsx)(d.Text,{className:"text-sm font-medium text-blue-800",children:"Additional Headers"})]}),(0,t.jsx)(eb.Button,{size:"small",type:"link",onClick:()=>w(!N),className:"text-blue-700 p-0 h-auto",children:N?"Hide":"Configure"})]}),!N&&0===Object.keys(j).length&&(0,t.jsx)(d.Text,{className:"text-xs text-blue-700",children:'This server requires additional headers. Click "Configure" to provide values.'}),N&&(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[i?.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:e}),(0,t.jsx)(H.Input,{size:"small",placeholder:`Enter ${e}`,value:j[e]||"",onChange:t=>{v({...j,[e]:t.target.value})},prefix:(0,t.jsx)(t_.KeyOutlined,{className:"text-gray-400"}),className:"rounded"})]},e)),(0,t.jsx)(eb.Button,{size:"small",type:"primary",onClick:()=>{I(),w(!1)},disabled:Object.values(j).every(e=>!e||!e.trim()),className:"w-full mt-2",children:"Load Tools"})]}),!N&&Object.keys(j).length>0&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)(d.Text,{className:"text-xs text-green-700 flex items-center",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 bg-green-500 rounded-full mr-2"}),Object.keys(j).length," header(s) configured"]})})]}),(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)(d.Text,{className:"font-medium block mb-3 text-gray-700 flex items-center",children:[(0,t.jsx)(eh.ToolOutlined,{className:"mr-2"})," Available Tools",M.length>0&&(0,t.jsx)("span",{className:"ml-2 bg-blue-100 text-blue-800 text-xs font-medium px-2 py-0.5 rounded-full",children:M.length})]}),M.length>0&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(H.Input,{placeholder:"Search tools...",prefix:(0,t.jsx)(ew.SearchOutlined,{className:"text-gray-400"}),value:g,onChange:e=>f(e.target.value),allowClear:!0,className:"rounded-lg",size:"middle"})}),k&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 bg-white border border-gray-200 rounded-lg",children:[(0,t.jsxs)("div",{className:"relative mb-3",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700",children:"Loading tools..."})]}),T?.error&&!k&&!M.length&&(0,t.jsx)("div",{className:"p-3 text-xs text-red-800 rounded-lg bg-red-50 border border-red-200",children:(0,t.jsxs)("p",{className:"font-medium",children:["Error: ",T.message]})}),!k&&!T?.error&&(!M||0===M.length)&&(0,t.jsxs)("div",{className:"p-4 text-center bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"mx-auto w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center mb-2",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-gray-400",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:"text-xs font-medium text-gray-700 mb-1",children:"No tools available"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"No tools found for this server"})]}),!k&&!T?.error&&M.length>0&&(0,t.jsx)(t.Fragment,{children:0===F.length?(0,t.jsxs)("div",{className:"p-4 text-center bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)(ew.SearchOutlined,{className:"text-2xl text-gray-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 mb-1",children:"No tools found"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:['No tools match "',g,'"']})]}):(0,t.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto min-h-0 mcp-tools-scrollable",style:{maxHeight:"400px",scrollbarWidth:"auto",scrollbarColor:"#cbd5e0 #f7fafc"},children:F.map(e=>(0,t.jsxs)("div",{className:`border rounded-lg p-3 cursor-pointer transition-all hover:shadow-sm ${o?.name===e.name?"border-blue-500 bg-blue-50 ring-1 ring-blue-200":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>{c(e),x(null),h(null)},children:[(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[e.mcp_info.logo_url&&(0,t.jsx)("img",{src:e.mcp_info.logo_url,alt:`${e.mcp_info.server_name} logo`,className:"w-4 h-4 object-contain flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"font-mono text-xs font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 truncate",children:e.mcp_info.server_name}),(0,t.jsx)("p",{className:"text-xs text-gray-600 mt-1 line-clamp-2 leading-relaxed",children:e.description})]})]}),o?.name===e.name&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-blue-200",children:(0,t.jsxs)("div",{className:"flex items-center text-xs font-medium text-blue-700",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:"w-3/4 flex flex-col bg-white",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,t.jsx)(m.Title,{className:"text-xl font-semibold mb-0",children:"Tool Testing Playground"})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto p-4",children:o?(0,t.jsx)("div",{className:"h-full",children:(0,t.jsx)(tv,{tool:o,onSubmit:e=>{P({tool:o,arguments:e})},result:u,error:p,isLoading:O,onClose:()=>c(null)})}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(tN.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)(d.Text,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select a Tool to Test"}),(0,t.jsx)(d.Text,{className:"text-center text-gray-500 max-w-md",children:"Choose a tool from the left sidebar to start testing its functionality with custom inputs."})]})})]})]})})})},tS=[eo.AUTH_TYPE.API_KEY,eo.AUTH_TYPE.BEARER_TOKEN,eo.AUTH_TYPE.TOKEN,eo.AUTH_TYPE.BASIC],tC=[...tS,eo.AUTH_TYPE.OAUTH2,eo.AUTH_TYPE.AWS_SIGV4],tT="litellm-mcp-oauth-edit-state",tk=({mcpServer:e,accessToken:s,onCancel:r,onSuccess:d,availableAccessGroups:m})=>{let[u]=D.Form.useForm(),[x,p]=(0,b.useState)({}),[f,j]=(0,b.useState)([]),[y,v]=(0,b.useState)(!1),[N,w]=(0,b.useState)(null),[S,T]=(0,b.useState)(""),[k,A]=(0,b.useState)(!1),[I,P]=(0,b.useState)([]),[O,M]=(0,b.useState)({}),[F,E]=(0,b.useState)({}),[L,R]=(0,b.useState)(null),[z,U]=(0,b.useState)(e.mcp_info?.logo_url||void 0),B=D.Form.useWatch("auth_type",u),q=D.Form.useWatch("transport",u),V="stdio"===q,$=q===eo.TRANSPORT.OPENAPI,K=!!B&&tS.includes(B),W=B===eo.AUTH_TYPE.OAUTH2,J=B===eo.AUTH_TYPE.AWS_SIGV4,Y=D.Form.useWatch("oauth_flow_type",u),G=W&&Y===eo.OAUTH_FLOW.M2M,[Q,Z]=(0,b.useState)(null),X=D.Form.useWatch("url",u),ee=D.Form.useWatch("spec_path",u),et=D.Form.useWatch("server_name",u),es=D.Form.useWatch("auth_type",u),er=D.Form.useWatch("static_headers",u),el=D.Form.useWatch("credentials",u),ea=D.Form.useWatch("authorization_url",u),ei=D.Form.useWatch("token_url",u),ed=D.Form.useWatch("registration_url",u),{startOAuthFlow:em,status:eu,error:ex,tokenResponse:ep}=eQ({accessToken:s,getCredentials:()=>u.getFieldValue("credentials"),getTemporaryPayload:()=>{let t=u.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??""),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:eo.AUTH_TYPE.OAUTH2,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:e=>{if(Z(e?.access_token??null),e?.access_token){let t={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.setFieldsValue({credentials:t}),C.default.success("OAuth authorization successful! Please click 'Update MCP Server' to save the credentials.")}},onBeforeRedirect:()=>{try{let t=u.getFieldsValue(!0);(0,eG.setSecureItem)(tT,JSON.stringify({serverId:e.server_id,formValues:t,costConfig:x,allowedTools:I,searchValue:S,aliasManuallyEdited:k}))}catch(e){console.warn("Failed to persist MCP edit state",e)}}}),eh=b.default.useMemo(()=>e.static_headers?Object.entries(e.static_headers).map(([e,t])=>({header:e,value:null!=t?String(t):""})):[],[e.static_headers]),eg=b.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]),ej=b.default.useMemo(()=>e.spec_path&&"stdio"!==e.transport?eo.TRANSPORT.OPENAPI:e.transport,[e]),ey=b.default.useMemo(()=>({...e,transport:ej,static_headers:eh,extra_headers:e.extra_headers||[],oauth_flow_type:e.token_url?eo.OAUTH_FLOW.M2M:eo.OAUTH_FLOW.INTERACTIVE,token_validation_json:e.token_validation?JSON.stringify(e.token_validation,null,2):void 0}),[e,ej,eh,eg]);(0,b.useEffect)(()=>{e.mcp_info?.mcp_server_cost_info&&p(e.mcp_info.mcp_server_cost_info)},[e]),(0,b.useEffect)(()=>{e.allowed_tools&&P(e.allowed_tools),M(e.tool_name_to_display_name??{}),E(e.tool_name_to_description??{})},[e]),(0,b.useEffect)(()=>{let t=(0,eG.getSecureItem)(tT);if(t)try{let s=JSON.parse(t);if(!s||s.serverId!==e.server_id)return;s.formValues&&R({...e,...s.formValues}),s.costConfig&&p(s.costConfig),s.allowedTools&&P(s.allowedTools),s.searchValue&&T(s.searchValue),"boolean"==typeof s.aliasManuallyEdited&&A(s.aliasManuallyEdited)}catch(e){console.error("Failed to restore MCP edit state",e)}finally{window.sessionStorage.removeItem(tT)}},[u,e]),(0,b.useEffect)(()=>{if(!L)return;let t=L.transport||e.transport;t&&t!==u.getFieldValue("transport")?u.setFieldsValue({transport:t}):(u.setFieldsValue(L),R(null))},[L,u,e.transport]),(0,b.useEffect)(()=>{if(e.mcp_access_groups){let t=e.mcp_access_groups.map(e=>"string"==typeof e?e:e.name||String(e));u.setFieldValue("mcp_access_groups",t)}},[e]),(0,b.useEffect)(()=>{e.server_id&&""!==e.server_id.trim()&&ev()},[e,s]);let ev=async()=>{if(s&&e.server_id){v(!0),w(null);try{let t=await (0,_.listMCPTools)(s,e.server_id);t.tools&&!t.error?j(t.tools):(console.error("Failed to fetch tools:",t.message),j([]),w(t.message||"Failed to load tools"))}catch(e){console.error("Tools fetch error:",e),j([]),w(e instanceof Error?e.message:"Failed to load tools")}finally{v(!1)}}},eN=async t=>{if(s)try{let{static_headers:r,credentials:l,stdio_config:a,env_json:n,command:i,args:o,allow_all_keys:c,available_on_public_internet:m,token_validation_json:u,...p}=t,h=(p.mcp_access_groups||[]).map(e=>"string"==typeof e?e:e.name||String(e)),g=Array.isArray(r)?r.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value??""),e},{}):{},f=l&&"object"==typeof l?Object.entries(l).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,b={};if("stdio"===p.transport)if(a)try{let e=JSON.parse(a),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(!(b={command:t?.command?String(t.command):void 0,args:s,env:r}).command)return void C.default.fromBackend("Stdio configuration must include a command")}catch{C.default.fromBackend("Invalid JSON in stdio configuration");return}else{let e={};if(n)try{let t=JSON.parse(n);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{C.default.fromBackend("Invalid JSON in stdio env configuration");return}let t=Array.isArray(o)?o.map(e=>String(e)).filter(e=>""!==e.trim()):[],s=i?String(i).trim():"";if(!s)return void C.default.fromBackend("Stdio transport requires a command");b={command:s,args:t,env:e}}p.transport===eo.TRANSPORT.OPENAPI&&(p.transport="http");let j=null;if(u&&""!==u.trim())try{j=JSON.parse(u)}catch{C.default.fromBackend("Invalid JSON in Token Validation Rules");return}let y=p.server_name||p.url||e.server_name||e.url||p.alias||e.alias||"unknown",v={...p,...b,stdio_config:void 0,env_json:void 0,server_id:e.server_id,mcp_info:{server_name:y,description:p.description,logo_url:z||void 0,mcp_server_cost_info:Object.keys(x).length>0?x:null},mcp_access_groups:h,alias:p.alias,extra_headers:p.extra_headers||[],allowed_tools:I.length>0?I:null,tool_name_to_display_name:Object.keys(O).length>0?O:null,tool_name_to_description:Object.keys(F).length>0?F:null,disallowed_tools:p.disallowed_tools||[],static_headers:g,allow_all_keys:!!(c??e.allow_all_keys),available_on_public_internet:!!(m??e.available_on_public_internet),...null!==j||e.token_validation?{token_validation:j}:{}};p.auth_type&&tC.includes(p.auth_type)&&f&&Object.keys(f).length>0&&(v.credentials=f);let N=await (0,_.updateMCPServer)(s,v);C.default.success("MCP Server updated successfully"),d(N)}catch(e){C.default.fromBackend("Failed to update MCP Server"+(e?.message?`: ${e.message}`:""))}};return(0,t.jsxs)(n.TabGroup,{children:[(0,t.jsxs)(i.TabList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(a.Tab,{children:"Server Configuration"}),(0,t.jsx)(a.Tab,{children:"Cost Configuration"})]}),(0,t.jsxs)(c.TabPanels,{className:"mt-6",children:[(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)(D.Form,{form:u,onFinish:eN,initialValues:ey,layout:"vertical",children:[(0,t.jsx)(D.Form.Item,{label:"MCP Server Name",name:"server_name",rules:[{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(H.Input,{className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.Form.Item,{label:"Alias",name:"alias",rules:[{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(H.Input,{onChange:()=>A(!0),className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(H.Input,{className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(e$,{value:z,onChange:U}),(0,t.jsx)(D.Form.Item,{label:"Transport Type",name:"transport",rules:[{required:!0}],children:(0,t.jsxs)(h.Select,{onChange:e=>{"stdio"===e?u.setFieldsValue({url:void 0,spec_path:void 0,auth_type:void 0,credentials:void 0,authorization_url:void 0,token_url:void 0,registration_url:void 0}):e===eo.TRANSPORT.OPENAPI?u.setFieldsValue({url:void 0,command:void 0,args:void 0,env_json:void 0,stdio_config:void 0}):u.setFieldsValue({spec_path:void 0,command:void 0,args:void 0,env_json:void 0,stdio_config:void 0})},children:[(0,t.jsx)(h.Select.Option,{value:"http",children:"Streamable HTTP (Recommended)"}),(0,t.jsx)(h.Select.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(h.Select.Option,{value:"stdio",children:"Standard Input/Output (stdio)"}),(0,t.jsx)(h.Select.Option,{value:eo.TRANSPORT.OPENAPI,children:"OpenAPI Spec"})]})}),!V&&!$&&(0,t.jsx)(D.Form.Item,{label:"MCP Server URL",name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,t)=>eK(t)}],children:(0,t.jsx)(H.Input,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),$&&(0,t.jsx)(D.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)(g.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)(en.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)(H.Input,{placeholder:"https://petstore3.swagger.io/api/v3/openapi.json",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!V&&(0,t.jsx)(D.Form.Item,{label:"Authentication",name:"auth_type",rules:[{required:!0}],children:(0,t.jsxs)(h.Select,{children:[(0,t.jsx)(h.Select.Option,{value:"none",children:"None"}),(0,t.jsx)(h.Select.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(h.Select.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(h.Select.Option,{value:"token",children:"Token"}),(0,t.jsx)(h.Select.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(h.Select.Option,{value:"oauth2",children:"OAuth"}),(0,t.jsx)(h.Select.Option,{value:"aws_sigv4",children:"AWS SigV4 (Bedrock AgentCore MCPs)"})]})}),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)(D.Form.Item,{label:"Command",name:"command",rules:[{required:!0,message:"Please enter a command for stdio transport"}],children:(0,t.jsx)(H.Input,{placeholder:"e.g., npx",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.Form.Item,{label:"Args",name:"args",children:(0,t.jsx)(h.Select,{mode:"tags",size:"large",tokenSeparators:[","],placeholder:"Add args (press enter or comma)",className:"rounded-lg"})}),(0,t.jsx)(D.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)(H.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)(eO,{isVisible:!0,required:!1})]}),!V&&K&&(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(g.Tooltip,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(en.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)(H.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&&W&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client ID (optional)",(0,t.jsx)(g.Tooltip,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_id"],children:(0,t.jsx)(H.Input.Password,{placeholder:"Enter OAuth client ID (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client Secret (optional)",(0,t.jsx)(g.Tooltip,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_secret"],children:(0,t.jsx)(H.Input.Password,{placeholder:"Enter OAuth client secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Scopes (optional)",(0,t.jsx)(g.Tooltip,{title:"Add scopes to override the default scope list used for this MCP server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","scopes"],children:(0,t.jsx)(h.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authorization URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the authorization endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"authorization_url",children:(0,t.jsx)(H.Input,{placeholder:"https://example.com/oauth/authorize",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the token endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_url",children:(0,t.jsx)(H.Input,{placeholder:"https://example.com/oauth/token",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Registration URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the dynamic client registration endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"registration_url",children:(0,t.jsx)(H.Input,{placeholder:"https://example.com/oauth/register",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!G&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token Validation Rules (optional)",(0,t.jsx)(g.Tooltip,{title:'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.',children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),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)(H.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)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token Storage TTL (seconds, optional)",(0,t.jsx)(g.Tooltip,{title:"How long to cache each user's OAuth access token in Redis before evicting it (regardless of 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.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_storage_ttl_seconds",children:(0,t.jsx)(ec.InputNumber,{min:1,placeholder:"e.g. 3600",style:{width:"100%"},className:"rounded-lg"})})]}),(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)(l.Button,{variant:"secondary",onClick:em,disabled:"authorizing"===eu||"exchanging"===eu,children:"authorizing"===eu?"Waiting for authorization...":"exchanging"===eu?"Exchanging authorization code...":"Authorize & Fetch Token"}),ex&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:ex}),"success"===eu&&ep?.access_token&&(0,t.jsxs)("p",{className:"text-sm text-green-600",children:["Token fetched. Expires in ",ep.expires_in??"?"," seconds."]})]})]}),!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)(D.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Region",(0,t.jsx)(g.Tooltip,{title:"AWS region for SigV4 signing (e.g., us-east-1)",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_region_name"],rules:[],children:(0,t.jsx)(H.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)(D.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)(g.Tooltip,{title:"AWS service name for SigV4 signing. Defaults to 'bedrock-agentcore'.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_service_name"],children:(0,t.jsx)(H.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)(D.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)(g.Tooltip,{title:"Optional. If not provided, falls back to the boto3 credential chain (IAM role, env vars, etc.).",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_access_key_id"],rules:[],children:(0,t.jsx)(H.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)(D.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)(g.Tooltip,{title:"Optional. Required if AWS Access Key ID is provided.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_secret_access_key"],rules:[],children:(0,t.jsx)(H.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)(D.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)(g.Tooltip,{title:"Optional. Only needed for temporary STS credentials.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_token"],children:(0,t.jsx)(H.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)(D.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)(g.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)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_role_name"],children:(0,t.jsx)(H.Input,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(D.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)(g.Tooltip,{title:"Optional. Session name for the AssumeRole call — appears in CloudTrail logs. Auto-generated if omitted.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_name"],children:(0,t.jsx)(H.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)(eR,{availableAccessGroups:m,mcpServer:e,searchValue:S,setSearchValue:T,getAccessGroupOptions:()=>{let e=m.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 S&&!m.some(e=>e.toLowerCase().includes(S.toLowerCase()))&&e.push({value:S,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:S}),(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)(eP,{accessToken:s,oauthAccessToken:Q,formValues:{server_id:e.server_id,server_name:et??e.server_name,url:X??e.url,spec_path:ee??e.spec_path,transport:q??e.transport,auth_type:es??e.auth_type,mcp_info:e.mcp_info,oauth_flow_type:ei??e.token_url?eo.OAUTH_FLOW.M2M:eo.OAUTH_FLOW.INTERACTIVE,static_headers:er??e.static_headers,credentials:el,authorization_url:ea??e.authorization_url,token_url:ei??e.token_url,registration_url:ed??e.registration_url},allowedTools:I,existingAllowedTools:e.allowed_tools||null,onAllowedToolsChange:P,toolNameToDisplayName:O,toolNameToDescription:F,onToolNameToDisplayNameChange:M,onToolNameToDescriptionChange:E,externalTools:f,externalIsLoading:y,externalError:N,externalCanFetch:!!e.server_id})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(eb.Button,{onClick:r,children:"Cancel"}),(0,t.jsx)(l.Button,{type:"submit",children:"Save Changes"})]})]})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(ef,{value:x,onChange:p,tools:f,disabled:y}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(eb.Button,{onClick:r,children:"Cancel"}),(0,t.jsx)(l.Button,{onClick:()=>u.submit(),children:"Save Changes"})]})]})})]})]})},tA=({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 pt-6 border-t border-gray-200",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)(d.Text,{className:"font-medium",children:"Default Cost per Query"}),(0,t.jsxs)("div",{className:"text-green-600 font-mono",children:["$",e.default_cost_per_query.toFixed(4)]})]}),r&&e?.tool_name_to_cost_per_query&&(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"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 justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,t.jsx)(d.Text,{className:"font-medium",children:e}),(0,t.jsxs)(d.Text,{className:"text-green-600 font-mono",children:["$",s.toFixed(4)," per query"]})]},e))})]}),(0,t.jsxs)("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsx)(d.Text,{className:"text-blue-800 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)(d.Text,{className:"text-blue-700",children:["• Default cost: $",e.default_cost_per_query.toFixed(4)," per query"]}),r&&e?.tool_name_to_cost_per_query&&(0,t.jsxs)(d.Text,{className:"text-blue-700",children:["• ",Object.keys(e.tool_name_to_cost_per_query).length," tool(s) with custom pricing"]})]})]})]})}):(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200",children:(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsx)("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded-lg",children:(0,t.jsx)(d.Text,{className:"text-gray-600",children:"No cost configuration set for this server. Tool calls will be charged at $0.00 per tool call."})})})})},tI=({mcpServer:e,onBack:s,isEditing:r,isProxyAdmin:u,accessToken:x,userRole:p,userID:h,availableAccessGroups:g})=>{let[f,j]=(0,b.useState)(r),[y,v]=(0,b.useState)(!1),[N,_]=(0,b.useState)({}),[w,S]=(0,b.useState)(0),C=e.url??"",{maskedUrl:T,hasToken:A}=C?eH(C):{maskedUrl:"—",hasToken:!1},I=(e,t)=>e?A?t?e:T:e:"—",P=async(e,t)=>{await (0,tr.copyToClipboard)(e)&&(_(e=>({...e,[t]:!0})),setTimeout(()=>{_(e=>({...e,[t]:!1}))},2e3))},O=e=>{let s=e.toUpperCase();return(0,t.jsx)("span",{className:"inline-flex items-center text-sm font-medium px-2.5 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:s})},M=e=>(0,t.jsx)("span",{className:"inline-flex items-center text-sm font-medium px-2.5 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:e});return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(l.Button,{icon:tx.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Servers"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(m.Title,{className:"text-2xl",children:e.server_name||e.alias||"Unnamed Server"}),(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:N["mcp-server_name"]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(e6.CopyIcon,{size:12}),onClick:()=>P(e.server_name||e.alias,"mcp-server_name"),className:`transition-all duration-200 ${N["mcp-server_name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`}),e.alias&&e.server_name&&e.alias!==e.server_name&&(0,t.jsx)("span",{className:"ml-2 inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-gray-100 text-gray-600 border border-gray-200 font-mono",children:e.alias})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[(0,t.jsx)(d.Text,{className:"text-gray-400 font-mono text-xs",children:e.server_id}),(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:N["mcp-server-id"]?(0,t.jsx)(k.CheckIcon,{size:10}):(0,t.jsx)(e6.CopyIcon,{size:10}),onClick:()=>P(e.server_id,"mcp-server-id"),className:`transition-all duration-200 ${N["mcp-server-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-300 hover:text-gray-500 hover:bg-gray-50"}`})]}),e.description&&(0,t.jsx)(d.Text,{className:"text-gray-500 mt-2",children:e.description})]}),(0,t.jsxs)(n.TabGroup,{index:w,onIndexChange:S,children:[(0,t.jsx)(i.TabList,{className:"mb-4",children:[(0,t.jsx)(a.Tab,{children:"Overview"},"overview"),(0,t.jsx)(a.Tab,{children:"MCP Tools"},"tools"),...u?[(0,t.jsx)(a.Tab,{children:"Settings"},"settings")]:[]]}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsxs)(o.TabPanel,{children:[(0,t.jsxs)(tg.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-4",children:[(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Transport"}),(0,t.jsx)("div",{className:"mt-3",children:O((0,eo.handleTransport)(e.transport??void 0,e.spec_path??void 0))})]}),(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Authentication"}),(0,t.jsx)("div",{className:"mt-3",children:M((0,eo.handleAuth)(e.auth_type??void 0))})]}),(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Host URL"}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(d.Text,{className:"break-all overflow-wrap-anywhere font-mono text-sm",children:I(e.url,y)}),A&&(0,t.jsx)("button",{onClick:()=>v(!y),className:"p-1 hover:bg-gray-100 rounded flex-shrink-0",children:(0,t.jsx)(tc.Icon,{icon:y?th:tp.EyeIcon,size:"sm",className:"text-gray-500"})})]})]})]}),(0,t.jsxs)(eg.Card,{className:"mt-4 p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Cost Configuration"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(tA,{costConfig:e.mcp_info?.mcp_server_cost_info})})]})]}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tw,{serverId:e.server_id,accessToken:x,auth_type:e.auth_type,userRole:p,userID:h,serverAlias:e.alias,extraHeaders:e.extra_headers})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)(eg.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(m.Title,{children:"MCP Server Settings"}),f?null:(0,t.jsx)(l.Button,{variant:"light",onClick:()=>j(!0),children:"Edit Settings"})]}),f?(0,t.jsx)(tk,{mcpServer:e,accessToken:x,onCancel:()=>j(!1),onSuccess:e=>{j(!1),s()},availableAccessGroups:g}):(0,t.jsxs)("div",{className:"divide-y divide-gray-100",children:[(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Server Name"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.server_name||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Alias"}),(0,t.jsx)("div",{className:"col-span-2 text-sm font-mono text-gray-900",children:e.alias||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Description"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.description||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"URL"}),(0,t.jsxs)("div",{className:"col-span-2 text-sm font-mono text-gray-900 break-all flex items-center gap-2",children:[I(e.url,y),A&&(0,t.jsx)("button",{onClick:()=>v(!y),className:"p-1 hover:bg-gray-100 rounded flex-shrink-0",children:(0,t.jsx)(tc.Icon,{icon:y?th:tp.EyeIcon,size:"sm",className:"text-gray-500"})})]})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Transport"}),(0,t.jsx)("div",{className:"col-span-2",children:O((0,eo.handleTransport)(e.transport,e.spec_path))})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Authentication"}),(0,t.jsx)("div",{className:"col-span-2",children:M((0,eo.handleAuth)(e.auth_type))})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Extra Headers"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.extra_headers&&e.extra_headers.length>0?e.extra_headers.join(", "):(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Allow All Keys"}),(0,t.jsx)("div",{className:"col-span-2",children:e.allow_all_keys?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Enabled"]}):(0,t.jsx)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-gray-50 text-gray-600 rounded-full border border-gray-200 text-xs font-medium",children:"Disabled"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Network Access"}),(0,t.jsx)("div",{className:"col-span-2",children:e.available_on_public_internet?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Public"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-orange-50 text-orange-700 rounded-full border border-orange-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-orange-500"}),"Internal only"]})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",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)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-gray-100 text-gray-700 border border-gray-200",children:"string"==typeof e?e:e?.name??""},s))}):(0,t.jsx)("span",{className:"text-sm text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",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)("span",{className:"inline-flex items-center text-xs font-mono font-medium px-2 py-0.5 rounded bg-blue-50 text-blue-700 border border-blue-200",children:e},s))}):(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-green-50 text-green-700 border border-green-200",children:"All tools enabled"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Cost"}),(0,t.jsx)("div",{className:"col-span-2",children:(0,t.jsx)(tA,{costConfig:e.mcp_info?.mcp_server_cost_info})})]})]})]})})]})]})]})},tP=(0,N.createQueryKeys)("mcpSemanticFilterSettings"),tO=(0,N.createQueryKeys)("mcpSemanticFilterSettings");var tM=e.i(178654),tF=e.i(621192),tE=e.i(981339),tL=e.i(850627),tR=e.i(987432),tz=e.i(689020),tU=e.i(245094),tB=e.i(788191),tq=e.i(653496),tV=e.i(992619);function t$({accessToken:e,testQuery:s,setTestQuery:r,testModel:l,setTestModel:a,isTesting:n,onTest:i,filterEnabled:o,testResult:c,curlCommand:d}){return(0,t.jsx)(e4.Card,{title:"Test Configuration",style:{marginBottom:16},children:(0,t.jsx)(tq.Tabs,{defaultActiveKey:"test",items:[{key:"test",label:"Test",children:(0,t.jsxs)(eM.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:[(0,t.jsx)(tB.PlayCircleOutlined,{})," Test Query"]}),(0,t.jsx)(H.Input.TextArea,{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)(tV.default,{accessToken:e||"",value:l,onChange:a,disabled:n,showLabel:!0,labelText:"Select Model"})}),(0,t.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tB.PlayCircleOutlined,{}),onClick:i,loading:n,disabled:!s||!l||!o,block:!0,children:"Test Filter"}),!o&&(0,t.jsx)(ej.Alert,{type:"warning",message:"Semantic filtering is disabled",description:"Enable semantic filtering and save settings to test the filter.",showIcon:!0}),c&&(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Typography.Title,{level:5,children:"Results"}),(0,t.jsx)(ej.Alert,{type:"success",message:`${c.selectedTools} tools selected`,description:`Filtered from ${c.totalTools} available tools`,showIcon:!0,style:{marginBottom:16}}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:"Selected Tools:"}),(0,t.jsx)("ul",{style:{paddingLeft:20,margin:0},children:c.tools.map((e,s)=>(0,t.jsx)("li",{style:{marginBottom:4},children:(0,t.jsx)(f.Typography.Text,{children:e})},s))})]})]})]})},{key:"api",label:"API Usage",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(eM.Space,{style:{marginBottom:8},children:[(0,t.jsx)(tU.CodeOutlined,{}),(0,t.jsx)(f.Typography.Text,{strong:!0,children:"API Usage"})]}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block",marginBottom:8},children:"Use this curl command to test the semantic filter with your current configuration."}),(0,t.jsx)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:"Response headers to check:"}),(0,t.jsxs)("ul",{style:{paddingLeft:20,margin:"0 0 12px 0"},children:[(0,t.jsxs)("li",{children:[(0,t.jsx)(f.Typography.Text,{children:"x-litellm-semantic-filter: shows total tools → selected tools"}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block"},children:"Example: 10→3"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)(f.Typography.Text,{children:"x-litellm-semantic-filter-tools: CSV of selected tool names"}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block"},children:"Example: wikipedia-fetch,github-search,slack-post"})]})]}),(0,t.jsx)("pre",{style:{background:"#f5f5f5",padding:12,borderRadius:4,overflow:"auto",fontSize:12,margin:0},children:d})]})}]})})}let tD=async({accessToken:e,testModel:t,testQuery:s,setIsTesting:r,setTestResult:l})=>{if(!s||!t||!e)return void C.default.error("Please enter a query and select a model");r(!0),l(null);try{let{headers:r}=await (0,_.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 C.default.warning("Semantic filter is not enabled or no tools were filtered");l(a),C.default.success("Semantic filter test completed successfully")}catch(e){console.error("Test failed:",e),C.default.error("Failed to test semantic filter")}finally{r(!1)}};function tH({accessToken:e}){var s;let l,{data:a,isLoading:n,isError:i,error:o}=(()=>{let{accessToken:e}=(0,w.default)();return(0,y.useQuery)({queryKey:tP.list({}),queryFn:async()=>await (0,_.getMCPSemanticFilterSettings)(e),enabled:!!e,staleTime:36e5,gcTime:36e5})})(),{mutate:c,isPending:d,error:m}=(s=e||"",l=(0,v.useQueryClient)(),(0,tf.useMutation)({mutationFn:async e=>{if(!s)throw Error("Access token is required");return(0,_.updateMCPSemanticFilterSettings)(s,e)},onSuccess:()=>{l.invalidateQueries({queryKey:tO.all})}})),[u]=D.Form.useForm(),[x,p]=(0,b.useState)(!1),[j,N]=(0,b.useState)(!1),[S,T]=(0,b.useState)([]),[k,A]=(0,b.useState)(!0),[I,P]=(0,b.useState)(""),[O,M]=(0,b.useState)("gpt-4o"),[F,E]=(0,b.useState)(null),[L,R]=(0,b.useState)(!1),z=a?.field_schema,U=a?.values??{};(0,b.useEffect)(()=>{(async()=>{if(e)try{A(!0);let t=(await (0,tz.fetchAvailableModels)(e)).filter(e=>"embedding"===e.mode);T(t)}catch(e){console.error("Error fetching embedding models:",e)}finally{A(!1)}})()},[e]),(0,b.useEffect)(()=>{U&&(u.setFieldsValue({enabled:U.enabled??!1,embedding_model:U.embedding_model??"text-embedding-3-small",top_k:U.top_k??10,similarity_threshold:U.similarity_threshold??.3}),N(!1))},[U,u]);let B=async()=>{try{let e=await u.validateFields();c(e,{onSuccess:()=>{N(!1),p(!0),setTimeout(()=>p(!1),3e3),C.default.success("Settings updated successfully. Changes will be applied across all pods within 10 seconds.")},onError:e=>{C.default.fromBackend(e)}})}catch(e){console.error("Form validation failed:",e)}},q=async()=>{e&&await tD({accessToken:e,testModel:O,testQuery:I,setIsTesting:R,setTestResult:E})};return e?(0,t.jsx)("div",{style:{width:"100%"},children:n?(0,t.jsx)(tE.Skeleton,{active:!0}):i?(0,t.jsx)(ej.Alert,{type:"error",message:"Could not load MCP Semantic Filter settings",description:o instanceof Error?o.message:void 0,style:{marginBottom:24}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ej.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}}),x&&(0,t.jsx)(ej.Alert,{type:"success",message:"Settings saved successfully",icon:(0,t.jsx)(ey.CheckCircleOutlined,{}),showIcon:!0,closable:!0,style:{marginBottom:16}}),m&&(0,t.jsx)(ej.Alert,{type:"error",message:"Could not update settings",description:m instanceof Error?m.message:void 0,style:{marginBottom:16}}),(0,t.jsxs)(tF.Row,{gutter:24,children:[(0,t.jsx)(tM.Col,{xs:24,lg:12,children:(0,t.jsxs)(D.Form,{form:u,layout:"vertical",disabled:d,onValuesChange:()=>{N(!0)},children:[(0,t.jsxs)(e4.Card,{style:{marginBottom:16},children:[(0,t.jsx)(D.Form.Item,{name:"enabled",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Enable Semantic Filtering"}),(0,t.jsx)(g.Tooltip,{title:"When enabled, only the most relevant MCP tools will be included in requests based on semantic similarity",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),valuePropName:"checked",children:(0,t.jsx)(el.Switch,{disabled:d})}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block",marginTop:-16,marginBottom:16},children:z?.properties?.enabled?.description})]}),(0,t.jsxs)(e4.Card,{title:"Configuration",style:{marginBottom:16},children:[(0,t.jsx)(D.Form.Item,{name:"embedding_model",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Embedding Model"}),(0,t.jsx)(g.Tooltip,{title:"The model used to generate embeddings for semantic matching",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(h.Select,{options:S.map(e=>({label:e.model_group,value:e.model_group})),placeholder:k?"Loading models...":"Select embedding model",showSearch:!0,disabled:d||k,loading:k,notFoundContent:k?"Loading...":"No embedding models available"})}),(0,t.jsx)(D.Form.Item,{name:"top_k",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Top K Results"}),(0,t.jsx)(g.Tooltip,{title:"Maximum number of tools to return after filtering",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(ec.InputNumber,{min:1,max:100,style:{width:"100%"},disabled:d})}),(0,t.jsx)(D.Form.Item,{name:"similarity_threshold",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Similarity Threshold"}),(0,t.jsx)(g.Tooltip,{title:"Minimum similarity score (0-1) for a tool to be included",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(tL.Slider,{min:0,max:1,step:.05,marks:{0:"0.0",.3:"0.3",.5:"0.5",.7:"0.7",1:"1.0"},disabled:d})})]}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,t.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tR.SaveOutlined,{}),onClick:B,loading:d,disabled:!j,children:"Save Settings"})})]})}),(0,t.jsx)(tM.Col,{xs:24,lg:12,children:(0,t.jsx)(t$,{accessToken:e,testQuery:I,setTestQuery:P,testModel:O,setTestModel:M,isTesting:L,onTest:q,filterEnabled:!!U.enabled,testResult:F,curlCommand:`curl --location 'http://localhost:4000/v1/responses' \\ +--header 'Content-Type: application/json' \\ +--header 'Authorization: Bearer sk-1234' \\ +--data '{ + "model": "${O}", + "input": [ + { + "role": "user", + "content": "${I||"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 tK=e.i(262218);let{Text:tW}=f.Typography,tJ=({accessToken:e})=>{let s,[r,l]=(0,b.useState)(!0),[a,n]=(0,b.useState)(!1),[i,o]=(0,b.useState)([]),[c,d]=(0,b.useState)(null);(0,b.useEffect)(()=>{m(),u()},[e]);let m=async()=>{if(e){l(!0);try{for(let t of(await (0,_.getGeneralSettingsCall)(e)))"mcp_internal_ip_ranges"===t.field_name&&t.field_value&&o(t.field_value)}catch(e){console.error("Failed to load MCP network settings:",e)}finally{l(!1)}}},u=async()=>{if(!e)return;let t=await (0,_.fetchMCPClientIp)(e);t&&d(t)},x=async()=>{if(e){n(!0);try{i.length>0?await (0,_.updateConfigFieldSetting)(e,"mcp_internal_ip_ranges",i):await (0,_.deleteConfigFieldSetting)(e,"mcp_internal_ip_ranges")}catch(e){console.error("Failed to save MCP network settings:",e)}finally{n(!1)}}};if(r)return(0,t.jsx)("div",{className:"flex justify-center py-12",children:(0,t.jsx)(W.Spin,{})});let p=c?4!==(s=c.split(".")).length?c+"/32":`${s[0]}.${s[1]}.${s[2]}.0/24`:null;return(0,t.jsxs)("div",{className:"space-y-6 p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(tW,{className:"text-lg font-semibold",children:"Private IP Ranges"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",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)(e4.Card,{children:[c&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg",children:[(0,t.jsxs)(tW,{className:"text-sm text-blue-700",children:["Your current IP: ",(0,t.jsx)("span",{className:"font-mono font-medium",children:c})]}),p&&!i.includes(p)&&(0,t.jsxs)("div",{className:"mt-1",children:[(0,t.jsx)(tW,{className:"text-sm text-blue-600",children:"Suggested range: "}),(0,t.jsx)(tK.Tag,{className:"cursor-pointer font-mono",color:"blue",icon:(0,t.jsx)(eE.PlusOutlined,{}),onClick:()=>{!i.includes(p)&&o([...i,p])},children:p})]})]}),(0,t.jsx)("div",{className:"flex items-center mb-2",children:(0,t.jsx)(tW,{className:"font-medium",children:"Your Private Network Ranges"})}),(0,t.jsx)(h.Select,{mode:"tags",value:i,onChange:o,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",tokenSeparators:[","],className:"w-full",size:"large",allowClear:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-2",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.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tR.SaveOutlined,{}),onClick:x,loading:a,children:"Save"})})]})},{Search:tY}=H.Input,{Text:tG}=f.Typography,tQ=["#3B82F6","#10B981","#F59E0B","#EF4444","#8B5CF6","#EC4899","#06B6D4","#84CC16"],tZ=({isVisible:e,onClose:s,onSelectServer:r,onCustomServer:l,accessToken:a})=>{let[n,i]=(0,b.useState)([]),[o,c]=(0,b.useState)([]),[d,m]=(0,b.useState)(!1),[u,x]=(0,b.useState)(null),[h,g]=(0,b.useState)(""),[f,j]=(0,b.useState)("All");(0,b.useEffect)(()=>{e&&a&&(m(!0),x(null),(0,_.fetchDiscoverableMCPServers)(a).then(e=>{i(e.servers||[]),c(e.categories||[])}).catch(e=>{x(e.message||"Failed to load MCP servers")}).finally(()=>{m(!1)}))},[e,a]),(0,b.useEffect)(()=>{e&&(g(""),j("All"))},[e]);let y=(0,b.useMemo)(()=>{let e=n;if("All"!==f&&(e=e.filter(e=>e.category===f)),h.trim()){let t=h.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.title.toLowerCase().includes(t)||e.description.toLowerCase().includes(t))}return e},[n,f,h]),v=(0,b.useMemo)(()=>{let e={};for(let t of y){let s=t.category||"Other";e[s]||(e[s]=[]),e[s].push(t)}return e},[y]);return(0,t.jsxs)(p.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center justify-between pb-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("img",{src:eZ,alt:"MCP Logo",className:"w-8 h-8 object-contain",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"}}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add MCP Server"})]}),(0,t.jsx)("button",{onClick:l,className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer bg-transparent border-none font-medium",children:"+ Custom Server"})]}),open:e,onCancel:s,footer:null,width:1e3,className:"top-8",styles:{body:{padding:"24px",maxHeight:"70vh",overflowY:"auto"},header:{padding:"24px 24px 0 24px",border:"none"}},children:[(0,t.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:12},children:["All",...o].map(e=>{let s=f===e;return(0,t.jsx)("button",{onClick:()=>j(e),style:{padding:"4px 12px",borderRadius:4,border:s?"1px solid #111827":"1px solid #e5e7eb",background:s?"#111827":"#fff",color:s?"#fff":"#4b5563",cursor:"pointer",fontSize:12,fontWeight:s?500:400,lineHeight:"20px"},children:e},e)})}),(0,t.jsx)(tY,{placeholder:"Search servers...",value:h,onChange:e=>g(e.target.value),style:{marginBottom:16},allowClear:!0}),d&&(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:Array.from({length:8}).map((e,s)=>(0,t.jsx)("div",{style:{height:36,borderRadius:6,background:"#f9fafb"}},s))}),u&&(0,t.jsx)("div",{style:{textAlign:"center",padding:"32px 0",color:"#9ca3af"},children:(0,t.jsxs)(tG,{children:["Failed to load servers: ",u]})}),!d&&!u&&0===y.length&&(0,t.jsx)("div",{style:{textAlign:"center",padding:"32px 0",color:"#9ca3af"},children:(0,t.jsxs)(tG,{children:["No servers found."," ",(0,t.jsx)("a",{onClick:l,style:{color:"#2563eb",cursor:"pointer"},children:"Add a custom server"})]})}),!d&&!u&&Object.entries(v).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:500,color:"#9ca3af",textTransform:"uppercase",letterSpacing:"0.05em",padding:"6px 0",borderBottom:"1px solid #f3f4f6",marginBottom:4},children:e}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0 16px"},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)%tQ.length,{initial:l,backgroundColor:tQ[a]});return(0,t.jsxs)("div",{onClick:()=>r(e),style:{display:"flex",alignItems:"center",padding:"8px 10px",borderRadius:6,cursor:"pointer",transition:"background 0.1s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f9fafb"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:[e.icon_url?(0,t.jsx)("img",{src:e.icon_url,alt:e.title,style:{width:20,height:20,objectFit:"contain",flexShrink:0,marginRight:12},onError:e=>{let t=e.currentTarget;t.style.display="none";let s=t.nextElementSibling;s&&(s.style.display="flex")}}):null,(0,t.jsx)("div",{style:{width:20,height:20,borderRadius:4,backgroundColor:n.backgroundColor,color:"#fff",display:e.icon_url?"none":"flex",alignItems:"center",justifyContent:"center",fontWeight:600,fontSize:11,flexShrink:0,marginRight:12},children:n.initial}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:400,color:"#111827",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title||e.name}),(0,t.jsx)("span",{style:{color:"#d1d5db",fontSize:14,flexShrink:0,marginLeft:8},children:"›"})]},e.name)})})]},e))]})};var tX=e.i(611052);let{Text:t0,Title:t2}=f.Typography,{Option:t1}=h.Select;e.s(["MCPServers",0,({accessToken:e,userRole:f,userID:N})=>{let{data:T,isLoading:k,refetch:A}=(0,j.useMCPServers)(),{data:I,isLoading:P,recheckServerHealth:O,recheckingServerIds:M}=(()=>{let{accessToken:e}=(0,w.default)(),t=(0,v.useQueryClient)(),[s,r]=(0,b.useState)(new Set),l=(0,y.useQuery)({queryKey:S.lists(),queryFn:async()=>await (0,_.fetchMCPServerHealth)(e),enabled:!!e,refetchInterval:3e4}),a=(0,b.useCallback)(async s=>{if(e){r(e=>new Set(e).add(s));try{let r=await (0,_.fetchMCPServerHealth)(e,[s]);t.setQueriesData({queryKey:S.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}})(),F=(0,b.useMemo)(()=>{if(!T)return[];if(!I)return T;let e=new Map(I.map(e=>[e.server_id,e.status]));return T.map(t=>{let s=e.get(t.server_id);return{...t,status:s||t.status}})},[T,I]),[E,L]=(0,b.useState)(null),[R,z]=(0,b.useState)(!1),[U,B]=(0,b.useState)(null),[q,V]=(0,b.useState)(!1),[D,H]=(0,b.useState)("all"),[K,W]=(0,b.useState)("all"),[J,Y]=(0,b.useState)([]),[Q,X]=(0,b.useState)(!1),[ee,et]=(0,b.useState)(!1),[es,el]=(0,b.useState)(null),[ea,en]=(0,b.useState)(!1),[ei,eo]=(0,b.useState)(null),ec="Internal User"===f;(0,b.useEffect)(()=>{try{let e=(0,eG.getSecureItem)("litellm-mcp-oauth-edit-state");if(!e)return;let t=JSON.parse(e);t?.serverId&&(B(t.serverId),V(!0))}catch(e){console.error("Failed to restore MCP edit view state",e)}},[]);let ed=b.default.useMemo(()=>{if(!F)return[];let e=new Set,t=[];return F.forEach(s=>{s.teams&&s.teams.forEach(s=>{let r=s.team_id;e.has(r)||(e.add(r),t.push(s))})}),t},[F]),em=b.default.useMemo(()=>F?Array.from(new Set(F.flatMap(e=>e.mcp_access_groups).filter(e=>null!=e))):[],[F]),eu=(0,b.useCallback)((e,t)=>{if(!F)return Y([]);let s=F;"personal"===e?Y([]):("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))),Y([...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)))},[F]);(0,b.useEffect)(()=>{eu(D,K)},[F,D,K,eu]);let ex=b.default.useMemo(()=>{let e,s,r,l;return e=e=>{B(e),V(!1)},s=e=>{B(e),V(!0)},r=ep,l=e=>eo(e),[{accessorKey:"server_id",header:"Server ID",enableSorting:!0,cell:({row:s})=>(0,t.jsxs)("button",{onClick:()=>e(s.original.server_id),className:"font-mono text-blue-600 bg-blue-50 hover:bg-blue-100 text-xs font-medium px-2 py-0.5 rounded-md border border-blue-200 text-left truncate whitespace-nowrap cursor-pointer max-w-[15ch] transition-colors",children:[s.original.server_id.slice(0,7),"..."]})},{accessorKey:"server_name",header:"Name",enableSorting:!0,cell:({row:e})=>{let s=e.original.mcp_info?.logo_url,r=e.original.server_name;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s?(0,t.jsx)("img",{src:s,alt:`${r??"MCP"} logo`,className:"h-5 w-5 rounded object-contain flex-shrink-0",onError:e=>{e.target.style.display="none"}}):null,(0,t.jsx)("span",{children:r})]})}},{accessorKey:"alias",header:"Alias",enableSorting:!0},{id:"url",header:"URL",cell:({row:e})=>{let s=e.original.url;if(!s)return(0,t.jsx)("span",{className:"text-gray-400",children:"—"});let{maskedUrl:r}=eH(s);return(0,t.jsx)("span",{className:"font-mono text-sm",children:r})}},{accessorKey:"transport",header:"Transport",enableSorting:!0,cell:({row:e})=>{let s=e.original.transport||"http",r=(e.original.spec_path&&"stdio"!==s?"OPENAPI":s).toUpperCase();return(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:r})}},{accessorKey:"auth_type",header:"Auth Type",enableSorting:!0,cell:({getValue:e})=>{let s=e()||"none";return(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:s})}},{id:"health_status",header:"Health Status",cell:({row:e})=>(0,t.jsx)(tu,{server:e.original,isLoadingHealth:P,isRechecking:M?.has(e.original.server_id),onRecheck:O})},{id:"mcp_access_groups",header:"Access Groups",cell:({row:e})=>{let s=e.original.mcp_access_groups;if(Array.isArray(s)&&s.length>0&&"string"==typeof s[0]){let e=s.join(", ");return(0,t.jsx)(g.Tooltip,{title:e,children:(0,t.jsxs)("div",{className:"flex items-center gap-1 max-w-[200px]",children:[(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-1.5 py-0.5 rounded bg-gray-100 text-gray-700 border border-gray-200 truncate max-w-[140px]",children:s[0]}),s.length>1&&(0,t.jsxs)("span",{className:"text-xs text-gray-400 font-medium",children:["+",s.length-1]})]})})}return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"})}},{id:"available_on_public_internet",header:"Network Access",cell:({row:e})=>e.original.available_on_public_internet?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Public"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-orange-50 text-orange-700 rounded-full border border-orange-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-orange-500"}),"Internal"]})},{header:"Created",accessorKey:"created_at",enableSorting:!0,sortingFn:"datetime",cell:({row:e})=>{let s=e.original;if(!s.created_at)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"});let r=new Date(s.created_at);return(0,t.jsx)(g.Tooltip,{title:r.toLocaleString(),children:(0,t.jsx)("span",{className:"text-xs text-gray-600",children:r.toLocaleDateString()})})}},{header:"Updated",accessorKey:"updated_at",enableSorting:!0,sortingFn:"datetime",cell:({row:e})=>{let s=e.original;if(!s.updated_at)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"});let r=new Date(s.updated_at);return(0,t.jsx)(g.Tooltip,{title:r.toLocaleString(),children:(0,t.jsx)("span",{className:"text-xs text-gray-600",children:r.toLocaleDateString()})})}},{id:"byok_credential",header:"Credential",cell:({row:e})=>{let s=e.original;return s.is_byok?s.has_user_credential?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full bg-green-50 text-green-700 border border-green-200",children:[(0,t.jsx)(tm.CheckOutlined,{style:{fontSize:10}})," Connected"]}),l&&(0,t.jsx)("button",{className:"text-xs text-gray-400 hover:text-blue-600 transition-colors",onClick:()=>l(s),children:"Update"})]}):l?(0,t.jsx)("button",{className:"text-xs bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded-md font-medium transition-colors shadow-sm",onClick:()=>l(s),children:"Connect"}):null:(0,t.jsx)("span",{className:"text-gray-300 text-xs",children:"—"})}},{id:"actions",header:"Actions",cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(g.Tooltip,{title:"Edit",children:(0,t.jsx)("button",{onClick:()=>s(e.original.server_id),className:"p-1.5 rounded-md text-gray-400 hover:text-blue-600 hover:bg-blue-50 transition-colors",children:(0,t.jsx)(tc.Icon,{icon:td.PencilAltIcon,size:"sm"})})}),(0,t.jsx)(g.Tooltip,{title:"Delete",children:(0,t.jsx)("button",{onClick:()=>r(e.original.server_id),className:"p-1.5 rounded-md text-gray-400 hover:text-red-600 hover:bg-red-50 transition-colors",children:(0,t.jsx)(tc.Icon,{icon:G.TrashIcon,size:"sm"})})})]})}]},[f,P,O,M]);function ep(e){L(e),z(!0)}let eh=async()=>{if(null!=E&&null!=e)try{en(!0),await (0,_.deleteMCPServer)(e,E),C.default.success("Deleted MCP Server successfully"),A()}catch(e){console.error("Error deleting the mcp server:",e)}finally{en(!1),z(!1),L(null)}},eg=E?(T||[]).find(e=>e.server_id===E):null,ef=b.default.useMemo(()=>J.find(e=>e.server_id===U)||{server_id:"",server_name:"",alias:"",url:"",transport:"",auth_type:"",created_at:"",created_by:"",updated_at:"",updated_by:""},[J,U]),eb=b.default.useCallback(()=>{V(!1),B(null),A()},[A]);return e&&f&&N?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(p.Modal,{open:R,title:"Delete MCP Server?",onOk:eh,okText:ea?"Deleting...":"Delete",onCancel:()=>{z(!1),L(null)},cancelText:"Cancel",cancelButtonProps:{disabled:ea},okButtonProps:{danger:!0},confirmLoading:ea,children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(t0,{className:"text-gray-600",children:"This action is permanent and cannot be undone. All associated configurations will be removed."}),eg&&(0,t.jsx)("div",{className:"mt-3 p-4 bg-gray-50 rounded-lg border border-gray-200",children:(0,t.jsxs)(x.Descriptions,{column:1,size:"small",colon:!1,children:[eg.server_name&&(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"Name"}),children:(0,t.jsx)(t0,{strong:!0,className:"text-sm",children:eg.server_name})}),(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"ID"}),children:(0,t.jsx)(t0,{code:!0,className:"text-xs",children:eg.server_id})}),eg.url&&(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"URL"}),children:(0,t.jsx)(t0,{code:!0,className:"text-xs break-all",children:eg.url})})]})})]})}),(0,t.jsx)(e5,{userRole:f,accessToken:e,onCreateSuccess:e=>{Y(t=>[...t,e]),X(!1),A()},isModalVisible:Q,setModalVisible:X,availableAccessGroups:em,prefillData:es,onBackToDiscovery:()=>{X(!1),el(null),et(!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)(m.Title,{children:"MCP Servers"}),J.length>0&&(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded-full bg-gray-100 text-gray-600 border border-gray-200",children:J.length})]}),(0,t.jsx)(d.Text,{className:"text-tremor-content mt-1",children:"Configure and manage your MCP servers"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.isAdminRole)(f)&&(0,t.jsx)(l.Button,{className:"flex-shrink-0",onClick:()=>et(!0),children:"+ Add New MCP Server"}),!(0,s.isAdminRole)(f)&&(0,t.jsx)(l.Button,{className:"flex-shrink-0",onClick:()=>{el(null),X(!0)},variant:"secondary",children:"+ Submit MCP Server"})]})]}),(0,t.jsx)(tZ,{isVisible:ee,onClose:()=>et(!1),onSelectServer:e=>{el(e),et(!1),X(!0)},onCustomServer:()=>{el(null),et(!1),X(!0)},accessToken:e}),(0,t.jsxs)(n.TabGroup,{className:"w-full h-full",children:[(0,t.jsx)(i.TabList,{className:"flex justify-between mt-2 w-full items-center",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(a.Tab,{children:"All Servers"}),(0,t.jsx)(a.Tab,{children:"Toolsets"}),(0,t.jsx)(a.Tab,{children:"Connect"}),(0,t.jsx)(a.Tab,{children:"Semantic Filter"}),(0,t.jsx)(a.Tab,{children:"Network Settings"}),(0,s.isAdminRole)(f)&&(0,t.jsx)(a.Tab,{children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:["Submitted MCPs ",(0,t.jsx)(u.default,{})]})})]})}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{children:U?(0,t.jsx)(tI,{mcpServer:ef,onBack:eb,isProxyAdmin:(0,s.isAdminRole)(f),isEditing:q,accessToken:e,userID:N,userRole:f,availableAccessGroups:em},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 bg-white rounded-lg px-4 py-3 border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-600 whitespace-nowrap",children:"Team"}),(0,t.jsxs)(h.Select,{value:D,onChange:e=>{H(e),eu(e,K)},style:{width:220},size:"middle",children:[(0,t.jsx)(t1,{value:"all",children:(0,t.jsx)("span",{className:"font-medium",children:ec?"All Available Servers":"All Servers"})}),(0,t.jsx)(t1,{value:"personal",children:(0,t.jsx)("span",{className:"font-medium",children:"Personal"})}),ed.map(e=>(0,t.jsx)(t1,{value:e.team_id,children:(0,t.jsx)("span",{className:"font-medium",children:e.team_alias||e.team_id})},e.team_id))]})]}),(0,t.jsx)("div",{className:"h-6 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(d.Text,{className:"text-sm font-medium text-gray-600 whitespace-nowrap",children:["Access Group",(0,t.jsx)(g.Tooltip,{title:"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.",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{marginLeft:4,color:"#9ca3af"}})})]}),(0,t.jsxs)(h.Select,{value:K,onChange:e=>{W(e),eu(D,e)},style:{width:220},size:"middle",children:[(0,t.jsx)(t1,{value:"all",children:(0,t.jsx)("span",{className:"font-medium",children:"All Access Groups"})}),em.map(e=>(0,t.jsx)(t1,{value:e,children:(0,t.jsx)("span",{className:"font-medium",children:e})},e))]})]})]})})}),(0,t.jsx)("div",{className:"w-full mt-6",children:(0,t.jsx)(Z.DataTable,{data:J,columns:ex,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:k,noDataMessage:"No MCP servers configured. Click '+ Add New MCP Server' to get started.",loadingMessage:"Loading MCP servers...",enableSorting:!0})})]})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(er,{accessToken:e,userRole:f})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(to,{})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tH,{accessToken:e})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tJ,{accessToken:e})}),(0,s.isAdminRole)(f)&&(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)($,{accessToken:e})})]})]}),ei&&(0,t.jsx)(tX.ByokCredentialModal,{server:ei,open:!!ei,onClose:()=>eo(null),onSuccess:e=>{A(),eo(null)},accessToken:e||""})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:f,userID:N}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))}],280881)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5fe49a1e116126de.js b/litellm/proxy/_experimental/out/_next/static/chunks/5fe49a1e116126de.js new file mode 100644 index 0000000000..dedec1b41b --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/5fe49a1e116126de.js @@ -0,0 +1,3 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},906579,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),r=e.i(361275),n=e.i(702779),i=e.i(763731),o=e.i(242064);e.i(296059);var l=e.i(915654),s=e.i(694758),c=e.i(183293),u=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%)"}}),v=new s.Keyframes("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),h=new s.Keyframes("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),p=new s.Keyframes("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),b=new s.Keyframes("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),y=e=>{let{fontHeight:t,lineWidth:a,marginXS:r,colorBorderBg:n}=e,i=e.colorTextLightSolid,o=e.colorError,l=e.colorErrorHover;return(0,f.mergeToken)(e,{badgeFontHeight:t,badgeShadowSize:a,badgeTextColor:i,badgeColor:o,badgeColorHover:l,badgeShadowColor:n,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},w=e=>{let{fontSize:t,lineHeight:a,fontSizeSM:r,lineWidth:n}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*a)-2*n,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}},$=(0,d.genStyleHooks)("Badge",e=>(e=>{let{componentCls:t,iconCls:a,antCls:r,badgeShadowSize:n,textFontSize:i,textFontSizeSM:o,statusSize:s,dotSize:d,textFontWeight:f,indicatorHeight:y,indicatorHeightSM:w,marginXS:$,calc:E}=e,S=`${r}-scroll-number`,x=(0,u.genPresetColor)(e,(e,{darkColor:a})=>({[`&${t} ${t}-color-${e}`]:{background:a,[`&:not(${t}-count)`]:{color:a},"a:hover &":{background:a}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:y,height:y,color:e.badgeTextColor,fontWeight:f,fontSize:i,lineHeight:(0,l.unit)(y),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:E(y).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:o,lineHeight:(0,l.unit)(w),borderRadius:E(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%",[`&${a}-spin`]:{animationName:b,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:$,color:e.colorText,fontSize:e.fontSize}}}),x),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:p,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:y,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${S}-only-unit`]:{height:y,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%)"}}})}})(y(e)),w),E=(0,d.genStyleHooks)(["Badge","Ribbon"],e=>(e=>{let{antCls:t,badgeFontHeight:a,marginXS:r,badgeRibbonOffset:n,calc:i}=e,o=`${t}-ribbon`,s=`${t}-ribbon-wrapper`,d=(0,u.genPresetColor)(e,(e,{darkColor:t})=>({[`&${o}-color-${e}`]:{background:t,color:t}}));return{[s]:{position:"relative"},[o]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"absolute",top:r,padding:`0 ${(0,l.unit)(e.paddingXS)}`,color:e.colorPrimary,lineHeight:(0,l.unit)(a),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${o}-text`]:{color:e.badgeTextColor},[`${o}-corner`]:{position:"absolute",top:"100%",width:n,height:n,color:"currentcolor",border:`${(0,l.unit)(i(n).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),d),{[`&${o}-placement-end`]:{insetInlineEnd:i(n).mul(-1).equal(),borderEndEndRadius:0,[`${o}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${o}-placement-start`]:{insetInlineStart:i(n).mul(-1).equal(),borderEndStartRadius:0,[`${o}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}})(y(e)),w),S=e=>{let r,{prefixCls:n,value:i,current:o,offset:l=0}=e;return l&&(r={position:"absolute",top:`${l}00%`,left:0}),t.createElement("span",{style:r,className:(0,a.default)(`${n}-only-unit`,{current:o})},i)},x=e=>{let a,r,{prefixCls:n,count:i,value:o}=e,l=Number(o),s=Math.abs(i),[c,u]=t.useState(l),[d,f]=t.useState(s),m=()=>{u(l),f(s)};if(t.useEffect(()=>{let e=setTimeout(m,1e3);return()=>clearTimeout(e)},[l]),c===l||Number.isNaN(l)||Number.isNaN(c))a=[t.createElement(S,Object.assign({},e,{key:l,current:!0}))],r={transition:"none"};else{a=[];let n=l+10,i=[];for(let e=l;e<=n;e+=1)i.push(e);let o=de%10===c);a=(o<0?i.slice(0,u+1):i.slice(u)).map((a,r)=>t.createElement(S,Object.assign({},e,{key:a,value:a%10,offset:o<0?r-u:r,current:r===u}))),r={transform:`translateY(${-function(e,t,a){let r=e,n=0;for(;(r+10)%10!==t;)r+=a,n+=a;return n}(c,l,o)}00%)`}}return t.createElement("span",{className:`${n}-only`,style:r,onTransitionEnd:m},a)};var O=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let z=t.forwardRef((e,r)=>{let{prefixCls:n,count:l,className:s,motionClassName:c,style:u,title:d,show:f,component:m="sup",children:g}=e,v=O(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:h}=t.useContext(o.ConfigContext),p=h("scroll-number",n),b=Object.assign(Object.assign({},v),{"data-show":f,style:u,className:(0,a.default)(p,s,c),title:d}),y=l;if(l&&Number(l)%1==0){let e=String(l).split("");y=t.createElement("bdi",null,e.map((a,r)=>t.createElement(x,{prefixCls:p,count:Number(l),value:a,key:e.length-r})))}return((null==u?void 0:u.borderColor)&&(b.style=Object.assign(Object.assign({},u),{boxShadow:`0 0 0 1px ${u.borderColor} inset`})),g)?(0,i.cloneElement)(g,e=>({className:(0,a.default)(`${p}-custom-component`,null==e?void 0:e.className,c)})):t.createElement(m,Object.assign({},b,{ref:r}),y)});var C=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let _=t.forwardRef((e,l)=>{var s,c,u,d,f;let{prefixCls:m,scrollNumberPrefixCls:g,children:v,status:h,text:p,color:b,count:y=null,overflowCount:w=99,dot:E=!1,size:S="default",title:x,offset:O,style:_,className:j,rootClassName:M,classNames:k,styles:I,showZero:L=!1}=e,N=C(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:P,direction:R,badge:H}=t.useContext(o.ConfigContext),T=P("badge",m),[B,V,D]=$(T),A=y>w?`${w}+`:y,F="0"===A||0===A||"0"===p||0===p,U=null===y||F&&!L,W=(null!=h||null!=b)&&U,K=null!=h||!F,q=E&&!F,Q=q?"":A,G=(0,t.useMemo)(()=>((null==Q||""===Q)&&(null==p||""===p)||F&&!L)&&!q,[Q,F,L,q,p]),Z=(0,t.useRef)(y);G||(Z.current=y);let X=Z.current,Y=(0,t.useRef)(Q);G||(Y.current=Q);let J=Y.current,ee=(0,t.useRef)(q);G||(ee.current=q);let et=(0,t.useMemo)(()=>{if(!O)return Object.assign(Object.assign({},null==H?void 0:H.style),_);let e={marginTop:O[1]};return"rtl"===R?e.left=Number.parseInt(O[0],10):e.right=-Number.parseInt(O[0],10),Object.assign(Object.assign(Object.assign({},e),null==H?void 0:H.style),_)},[R,O,_,null==H?void 0:H.style]),ea=null!=x?x:"string"==typeof X||"number"==typeof X?X:void 0,er=!G&&(0===p?L:!!p&&!0!==p),en=er?t.createElement("span",{className:`${T}-status-text`},p):null,ei=X&&"object"==typeof X?(0,i.cloneElement)(X,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,eo=(0,n.isPresetColor)(b,!1),el=(0,a.default)(null==k?void 0:k.indicator,null==(s=null==H?void 0:H.classNames)?void 0:s.indicator,{[`${T}-status-dot`]:W,[`${T}-status-${h}`]:!!h,[`${T}-color-${b}`]:eo}),es={};b&&!eo&&(es.color=b,es.background=b);let ec=(0,a.default)(T,{[`${T}-status`]:W,[`${T}-not-a-wrapper`]:!v,[`${T}-rtl`]:"rtl"===R},j,M,null==H?void 0:H.className,null==(c=null==H?void 0:H.classNames)?void 0:c.root,null==k?void 0:k.root,V,D);if(!v&&W&&(p||K||!U)){let e=et.color;return B(t.createElement("span",Object.assign({},N,{className:ec,style:Object.assign(Object.assign(Object.assign({},null==I?void 0:I.root),null==(u=null==H?void 0:H.styles)?void 0:u.root),et)}),t.createElement("span",{className:el,style:Object.assign(Object.assign(Object.assign({},null==I?void 0:I.indicator),null==(d=null==H?void 0:H.styles)?void 0:d.indicator),es)}),er&&t.createElement("span",{style:{color:e},className:`${T}-status-text`},p)))}return B(t.createElement("span",Object.assign({ref:l},N,{className:ec,style:Object.assign(Object.assign({},null==(f=null==H?void 0:H.styles)?void 0:f.root),null==I?void 0:I.root)}),v,t.createElement(r.default,{visible:!G,motionName:`${T}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:e})=>{var r,n;let i=P("scroll-number",g),o=ee.current,l=(0,a.default)(null==k?void 0:k.indicator,null==(r=null==H?void 0:H.classNames)?void 0:r.indicator,{[`${T}-dot`]:o,[`${T}-count`]:!o,[`${T}-count-sm`]:"small"===S,[`${T}-multiple-words`]:!o&&J&&J.toString().length>1,[`${T}-status-${h}`]:!!h,[`${T}-color-${b}`]:eo}),s=Object.assign(Object.assign(Object.assign({},null==I?void 0:I.indicator),null==(n=null==H?void 0:H.styles)?void 0:n.indicator),et);return b&&!eo&&((s=s||{}).background=b),t.createElement(z,{prefixCls:i,show:!G,motionClassName:e,className:l,count:J,title:ea,style:s,key:"scrollNumber"},ei)}),en))});_.Ribbon=e=>{let{className:r,prefixCls:i,style:l,color:s,children:c,text:u,placement:d="end",rootClassName:f}=e,{getPrefixCls:m,direction:g}=t.useContext(o.ConfigContext),v=m("ribbon",i),h=`${v}-wrapper`,[p,b,y]=E(v,h),w=(0,n.isPresetColor)(s,!1),$=(0,a.default)(v,`${v}-placement-${d}`,{[`${v}-rtl`]:"rtl"===g,[`${v}-color-${s}`]:w},r),S={},x={};return s&&!w&&(S.background=s,x.color=s),p(t.createElement("div",{className:(0,a.default)(h,f,b,y)},c,t.createElement("div",{className:(0,a.default)($,b),style:Object.assign(Object.assign({},S),l)},t.createElement("span",{className:`${v}-text`},u),t.createElement("div",{className:`${v}-corner`,style:x}))))},e.s(["Badge",0,_],906579)},948401,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:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["MailOutlined",0,i],948401)},983561,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:"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 n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["RobotOutlined",0,i],983561)},56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},771674,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:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["UserOutlined",0,i],771674)},645526,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:"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),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["TeamOutlined",0,i],645526)},109799,e=>{"use strict";var t=e.i(135214),a=e.i(764205),r=e.i(266027),n=e.i(912598);let i=(0,e.i(243652).createQueryKeys)("organizations");e.s(["organizationKeys",0,i,"useOrganization",0,e=>{let o=(0,n.useQueryClient)(),{accessToken:l}=(0,t.default)();return(0,r.useQuery)({queryKey:i.detail(e),enabled:!!(l&&e),queryFn:async()=>{if(!l||!e)throw Error("Missing auth or teamId");return(0,a.organizationInfoCall)(l,e)},initialData:()=>{if(!e)return;let t=o.getQueryData(i.list({}));return t?.find(t=>t.organization_id===e)}})},"useOrganizations",0,()=>{let{accessToken:e,userId:n,userRole:o}=(0,t.default)();return(0,r.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.organizationListCall)(e),enabled:!!(e&&n&&o)})}])},993914,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:"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),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["FileTextOutlined",0,i],993914)},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",()=>t])},560445,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(201072),r=e.i(726289),n=e.i(864517),i=e.i(562901),o=e.i(779573),l=e.i(343794),s=e.i(361275),c=e.i(244009),u=e.i(611935),d=e.i(763731),f=e.i(242064);e.i(296059);var m=e.i(915654),g=e.i(183293),v=e.i(246422);let h=(e,t,a,r,n)=>({background:e,border:`${(0,m.unit)(r.lineWidth)} ${r.lineType} ${t}`,[`${n}-icon`]:{color:a}}),p=(0,v.genStyleHooks)("Alert",e=>[(e=>{let{componentCls:t,motionDurationSlow:a,marginXS:r,marginSM:n,fontSize:i,fontSizeLG:o,lineHeight:l,borderRadiusLG:s,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:m,defaultPadding:v}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"relative",display:"flex",alignItems:"center",padding:v,wordWrap:"break-word",borderRadius:s,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:l},"&-message":{color:f},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${a} ${c}, opacity ${a} ${c}, + padding-top ${a} ${c}, padding-bottom ${a} ${c}, + margin-bottom ${a} ${c}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",padding:m,[`${t}-icon`]:{marginInlineEnd:n,fontSize:u,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:r,color:f,fontSize:o},[`${t}-description`]:{display:"block",color:d}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}})(e),(e=>{let{componentCls:t,colorSuccess:a,colorSuccessBorder:r,colorSuccessBg:n,colorWarning:i,colorWarningBorder:o,colorWarningBg:l,colorError:s,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:m}=e;return{[t]:{"&-success":h(n,r,a,e,t),"&-info":h(m,f,d,e,t),"&-warning":h(l,o,i,e,t),"&-error":Object.assign(Object.assign({},h(u,c,s,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}})(e),(e=>{let{componentCls:t,iconCls:a,motionDurationMid:r,marginXS:n,fontSizeIcon:i,colorIcon:o,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:n},[`${t}-close-icon`]:{marginInlineStart:n,padding:0,overflow:"hidden",fontSize:i,lineHeight:(0,m.unit)(i),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${a}-close`]:{color:o,transition:`color ${r}`,"&:hover":{color:l}}},"&-close-text":{color:o,transition:`color ${r}`,"&:hover":{color:l}}}}})(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}));var b=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let y={success:a.default,info:o.default,error:r.default,warning:i.default},w=e=>{let{icon:a,prefixCls:r,type:n}=e,i=y[n]||null;return a?(0,d.replaceElement)(a,t.createElement("span",{className:`${r}-icon`},a),()=>({className:(0,l.default)(`${r}-icon`,a.props.className)})):t.createElement(i,{className:`${r}-icon`})},$=e=>{let{isClosable:a,prefixCls:r,closeIcon:i,handleClose:o,ariaProps:l}=e,s=!0===i||void 0===i?t.createElement(n.default,null):i;return a?t.createElement("button",Object.assign({type:"button",onClick:o,className:`${r}-close-icon`,tabIndex:0},l),s):null},E=t.forwardRef((e,a)=>{let{description:r,prefixCls:n,message:i,banner:o,className:d,rootClassName:m,style:g,onMouseEnter:v,onMouseLeave:h,onClick:y,afterClose:E,showIcon:S,closable:x,closeText:O,closeIcon:z,action:C,id:_}=e,j=b(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[M,k]=t.useState(!1),I=t.useRef(null);t.useImperativeHandle(a,()=>({nativeElement:I.current}));let{getPrefixCls:L,direction:N,closable:P,closeIcon:R,className:H,style:T}=(0,f.useComponentConfig)("alert"),B=L("alert",n),[V,D,A]=p(B),F=t=>{var a;k(!0),null==(a=e.onClose)||a.call(e,t)},U=t.useMemo(()=>void 0!==e.type?e.type:o?"warning":"info",[e.type,o]),W=t.useMemo(()=>"object"==typeof x&&!!x.closeIcon||!!O||("boolean"==typeof x?x:!1!==z&&null!=z||!!P),[O,z,x,P]),K=!!o&&void 0===S||S,q=(0,l.default)(B,`${B}-${U}`,{[`${B}-with-description`]:!!r,[`${B}-no-icon`]:!K,[`${B}-banner`]:!!o,[`${B}-rtl`]:"rtl"===N},H,d,m,A,D),Q=(0,c.default)(j,{aria:!0,data:!0}),G=t.useMemo(()=>"object"==typeof x&&x.closeIcon?x.closeIcon:O||(void 0!==z?z:"object"==typeof P&&P.closeIcon?P.closeIcon:R),[z,x,P,O,R]),Z=t.useMemo(()=>{let e=null!=x?x:P;if("object"==typeof e){let{closeIcon:t}=e;return b(e,["closeIcon"])}return{}},[x,P]);return V(t.createElement(s.default,{visible:!M,motionName:`${B}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:E},({className:a,style:n},o)=>t.createElement("div",Object.assign({id:_,ref:(0,u.composeRef)(I,o),"data-show":!M,className:(0,l.default)(q,a),style:Object.assign(Object.assign(Object.assign({},T),g),n),onMouseEnter:v,onMouseLeave:h,onClick:y,role:"alert"},Q),K?t.createElement(w,{description:r,icon:e.icon,prefixCls:B,type:U}):null,t.createElement("div",{className:`${B}-content`},i?t.createElement("div",{className:`${B}-message`},i):null,r?t.createElement("div",{className:`${B}-description`},r):null),C?t.createElement("div",{className:`${B}-action`},C):null,t.createElement($,{isClosable:W,prefixCls:B,closeIcon:G,handleClose:F,ariaProps:Z}))))});var S=e.i(278409),x=e.i(233848),O=e.i(487806),z=e.i(479671),C=e.i(480002),_=e.i(868917);let j=function(e){function a(){var e,t,r;return(0,S.default)(this,a),t=a,r=arguments,t=(0,O.default)(t),(e=(0,C.default)(this,(0,z.default)()?Reflect.construct(t,r||[],(0,O.default)(this).constructor):t.apply(this,r))).state={error:void 0,info:{componentStack:""}},e}return(0,_.default)(a,e),(0,x.default)(a,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,description:a,id:r,children:n}=this.props,{error:i,info:o}=this.state,l=(null==o?void 0:o.componentStack)||null,s=void 0===e?(i||"").toString():e;return i?t.createElement(E,{id:r,type:"error",message:s,description:t.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},void 0===a?l:a)}):n}}])}(t.Component);E.ErrorBoundary=j,e.s(["Alert",0,E],560445)},366845,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 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["default",0,i],366845)},621482,e=>{"use strict";var t=e.i(869230),a=e.i(992571),r=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,a.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,a.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:l,isRefetchError:s}=n,c=r.fetchMeta?.fetchMore?.direction,u=l&&"forward"===c,d=i&&"forward"===c,f=l&&"backward"===c,m=i&&"backward"===c;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a.hasNextPage)(t,r.data),hasPreviousPage:(0,a.hasPreviousPage)(t,r.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:m,isRefetchError:s&&!u&&!f,isRefetching:o&&!d&&!m}}},n=e.i(469637);function i(e,t){return(0,n.useBaseQuery)(e,r,t)}e.s(["useInfiniteQuery",()=>i],621482)},270345,e=>{"use strict";var t=e.i(764205);let a=async(e,a,r,n)=>"Admin"!=r&&"Admin Viewer"!=r?await (0,t.teamListCall)(e,n?.organization_id||null,a):await (0,t.teamListCall)(e,n?.organization_id||null);e.s(["fetchTeams",0,a])},785242,e=>{"use strict";var t=e.i(619273),a=e.i(621482),r=e.i(266027),n=e.i(912598),i=e.i(135214),o=e.i(270345),l=e.i(243652),s=e.i(764205);let c=async(e,t,a,r={})=>{try{let n=(0,s.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:r.teamID,organization_id:r.organizationID,team_alias:r.team_alias,user_id:r.userID,page:t,page_size:a,sort_by:r.sortBy,sort_order:r.sortOrder,status:r.status}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${n?`${n}/v2/team/list`:"/v2/team/list"}?${i}`,l=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}let c=await l.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to list teams:",e),e}},u=(0,l.createQueryKeys)("teams"),d=(0,l.createQueryKeys)("infiniteTeams"),f=async(e,t,a,r={})=>{try{let n=(0,s.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:r.teamID,organization_id:r.organizationID,team_alias:r.team_alias,user_id:r.userID,page:t,page_size:a,sort_by:r.sortBy,sort_order:r.sortOrder,status:"deleted"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${n?`${n}/v2/team/list`:"/v2/team/list"}?${i}`,l=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}let c=await l.json();if(console.log("/team/list?status=deleted API Response:",c),c&&"object"==typeof c&&"teams"in c)return c.teams;return c}catch(e){throw console.error("Failed to list deleted teams:",e),e}},m=(0,l.createQueryKeys)("deletedTeams");e.s(["teamListCall",0,c,"useDeletedTeams",0,(e,a,n={})=>{let{accessToken:o}=(0,i.default)();return(0,r.useQuery)({queryKey:m.list({page:e,limit:a,...n}),queryFn:async()=>await f(o,e,a,n),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})},"useInfiniteTeams",0,(e=50,t,r)=>{let{accessToken:n,userId:o,userRole:l}=(0,i.default)(),s="Admin"===l||"Admin Viewer"===l;return(0,a.useInfiniteQuery)({queryKey:d.list({filters:{pageSize:e,...t&&{search:t},...r&&{organizationId:r},...o&&{userId:o}}}),queryFn:async({pageParam:a})=>await c(n,a,e,{team_alias:t||void 0,organizationID:r,userID:s?void 0:o}),initialPageParam:1,getNextPageParam:e=>{if(e.page{let{accessToken:t}=(0,i.default)(),a=(0,n.useQueryClient)();return(0,r.useQuery)({queryKey:u.detail(e),enabled:!!(t&&e),queryFn:async()=>{if(!t||!e)throw Error("Missing auth or teamId");return(0,s.teamInfoCall)(t,e)},initialData:()=>{if(!e)return;let t=a.getQueryData(u.list({}));return t?.find(t=>t.team_id===e)}})},"useTeams",0,()=>{let{accessToken:e,userId:t,userRole:a}=(0,i.default)();return(0,r.useQuery)({queryKey:u.list({}),queryFn:async()=>await (0,o.fetchTeams)(e,t,a,null),enabled:!!e})}])},44121,186515,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:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["MenuFoldOutlined",0,i],44121);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var l=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:o}))});e.s(["MenuUnfoldOutlined",0,l],186515)},295320,283713,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:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["CloudServerOutlined",0,i],295320);var o=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,r=e?.workers??[],[n,i]=(0,a.useState)(()=>localStorage.getItem(s));(0,a.useEffect)(()=>{if(!n||0===r.length)return;let e=r.find(e=>e.worker_id===n);e&&(0,o.switchToWorkerUrl)(e.url)},[n,r]);let c=r.find(e=>e.worker_id===n)??null,u=(0,a.useCallback)(e=>{let t=r.find(t=>t.worker_id===e);t&&(i(e),localStorage.setItem(s,e),(0,o.switchToWorkerUrl)(t.url))},[r]);return{isControlPlane:t,workers:r,selectedWorkerId:n,selectedWorker:c,selectWorker:u,disconnectFromWorker:(0,a.useCallback)(()=>{i(null),localStorage.removeItem(s),(0,o.switchToWorkerUrl)(null)},[])}}],283713)},755151,e=>{"use strict";var t=e.i(247153);e.s(["DownOutlined",()=>t.default])},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},818581,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useMergedRef",{enumerable:!0,get:function(){return n}});let r=e.r(271645);function n(e,t){let a=(0,r.useRef)(null),n=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=a.current;e&&(a.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(a.current=i(e,r)),t&&(n.current=i(t,r))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let a=e(t);return"function"==typeof a?a:()=>e(null)}}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},62478,e=>{"use strict";var t=e.i(764205);let a=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,a])},602073,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["SafetyOutlined",0,i],602073)},100486,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:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["CrownOutlined",0,i],100486)},275144,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(764205);let n=(0,a.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:i})=>{let[o,l]=(0,a.useState)(null),[s,c]=(0,a.useState)(null);return(0,a.useEffect)(()=>{(async()=>{try{let e=(0,r.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",a=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(a.ok){let e=await a.json();e.values?.logo_url&&l(e.values.logo_url),e.values?.favicon_url&&c(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,a.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:o,setLogoUrl:l,faviconUrl:s,setFaviconUrl:c},children:e})},"useTheme",0,()=>{let e=(0,a.useContext)(n);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},115571,e=>{"use strict";let t="local-storage-change";function a(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))}function r(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}}function n(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}function i(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}}e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",()=>a,"getLocalStorageItem",()=>r,"removeLocalStorageItem",()=>i,"setLocalStorageItem",()=>n])},371401,e=>{"use strict";var t=e.i(115571),a=e.i(271645);function r(e){let a=t=>{"disableUsageIndicator"===t.key&&e()},r=t=>{let{key:a}=t.detail;"disableUsageIndicator"===a&&e()};return window.addEventListener("storage",a),window.addEventListener(t.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",a),window.removeEventListener(t.LOCAL_STORAGE_EVENT,r)}}function n(){return"true"===(0,t.getLocalStorageItem)("disableUsageIndicator")}function i(){return(0,a.useSyncExternalStore)(r,n)}e.s(["useDisableUsageIndicator",()=>i])},19732,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:"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 n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ExperimentOutlined",0,i],19732)},788191,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:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["PlayCircleOutlined",0,i],788191)},399219,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",()=>t])},299251,153702,777579,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:"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 n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["BankOutlined",0,i],299251);let o={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 l=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:o}))});e.s(["BarChartOutlined",0,l],153702);let s={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 c=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["LineChartOutlined",0,c],777579)},878894,664659,531278,e=>{"use strict";var t=e.i(582458);e.s(["AlertTriangle",()=>t.default],878894);var a=e.i(631171);e.s(["ChevronDown",()=>a.default],664659);let r=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>r],531278)},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",()=>t])},438957,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:"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 n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["KeyOutlined",0,i],438957)},366308,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:"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 n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ToolOutlined",0,i],366308)},313603,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:"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 n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["SettingOutlined",0,i],313603)},872934,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ExportOutlined",0,i],872934)},232164,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:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["TagsOutlined",0,i],232164)},210612,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:"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 n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["DatabaseOutlined",0,i],210612)},218129,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:"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 n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ApiOutlined",0,i],218129)},844444,e=>{"use strict";var t=e.i(843476),a=e.i(906579),r=e.i(271645),n=e.i(115571);function i(e){let t=t=>{"disableShowNewBadge"===t.key&&e()},a=t=>{let{key:a}=t.detail;"disableShowNewBadge"===a&&e()};return window.addEventListener("storage",t),window.addEventListener(n.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",t),window.removeEventListener(n.LOCAL_STORAGE_EVENT,a)}}function o(){return"true"===(0,n.getLocalStorageItem)("disableShowNewBadge")}function l({children:e,dot:n=!1}){return(0,r.useSyncExternalStore)(i,o)?e?(0,t.jsx)(t.Fragment,{children:e}):null:e?(0,t.jsx)(a.Badge,{color:"blue",count:n?void 0:"New",dot:n,children:e}):(0,t.jsx)(a.Badge,{color:"blue",count:n?void 0:"New",dot:n})}e.s(["default",()=>l],844444)},477189,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:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["AppstoreOutlined",0,i],477189)},902739,e=>{"use strict";var t=e.i(843476),a=e.i(111672),r=e.i(764205),n=e.i(135214),i=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:o,sidebarCollapsed:l})=>{let{accessToken:s}=(0,n.default)(),[c,u]=(0,i.useState)(null),[d,f]=(0,i.useState)(!1),[m,g]=(0,i.useState)(!1),[v,h]=(0,i.useState)(!1),[p,b]=(0,i.useState)(!1),[y,w]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{(async()=>{if(!s)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,r.getUISettings)(s);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),u(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&f(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&h(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&b(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&w(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[s]),(0,t.jsx)(a.default,{setPage:e,defaultSelectedKey:o,collapsed:l,enabledPagesInternalUsers:c,enableProjectsUI:d,disableAgentsForInternalUsers:m,allowAgentsForTeamAdmins:v,disableVectorStoresForInternalUsers:p,allowVectorStoresForTeamAdmins:y})}])},216370,e=>{"use strict";var t=e.i(247167),a=e.i(843476),r=e.i(271645),n=e.i(402874),i=e.i(275144),o=e.i(902739),l=e.i(135214),s=e.i(618566),c=e.i(560445),u=e.i(521323);let d=()=>{let{data:e}=(0,u.useHealthReadiness)();return e?.is_detailed_debug?(0,a.jsx)(c.Alert,{message:"Performance Warning: Detailed Debug Mode Active",description:(0,a.jsxs)(a.Fragment,{children:["Detailed debug logging (",(0,a.jsx)("code",{children:"LITELLM_LOG=DEBUG"}),") is currently enabled. This mode logs extensive diagnostic information and will significantly degrade performance. It should only be used for troubleshooting and disabled in production environments."]}),type:"warning",showIcon:!0,banner:!0,style:{marginBottom:0,borderRadius:0}}):null},f=function(e){let t=(e??"").trim();if(!t)return"";let a=t.replace(/^\/+/,"").replace(/\/+$/,"");return a?`/${a}/`:"/"}(t.default.env.NEXT_PUBLIC_BASE_URL);function m(e){let t=e.startsWith("/")?e.slice(1):e,a=`${f}${t}`;return a.startsWith("/")?a:`/${a}`}let g={"api-reference":"api-reference"};function v({children:e}){let t=(0,s.useRouter)(),c=(0,s.useSearchParams)(),{accessToken:u,userRole:f,userId:v,userEmail:h,premiumUser:p}=(0,l.default)(),[b,y]=r.default.useState(!1),[w,$]=(0,r.useState)(()=>c.get("page")||"api-keys");return(0,r.useEffect)(()=>{$(c.get("page")||"api-keys")},[c]),(0,a.jsx)(i.ThemeProvider,{accessToken:"",children:(0,a.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,a.jsx)(n.default,{isPublicPage:!1,sidebarCollapsed:b,onToggleSidebar:()=>y(e=>!e),userID:v,userEmail:h,userRole:f,premiumUser:p,proxySettings:void 0,setProxySettings:()=>{},accessToken:u,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,a.jsx)(d,{}),(0,a.jsxs)("div",{className:"flex flex-1 overflow-auto",children:[(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(o.default,{setPage:e=>{let a=g[e];if(a){t.push(m(a)),$(e);return}t.push(m(`?page=${e}`)),$(e)},defaultSelectedKey:w,sidebarCollapsed:b})}),(0,a.jsx)("main",{className:"flex-1",children:e})]})]})})}function h({children:e}){return(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,a.jsx)(v,{children:e})})}e.s(["default",()=>h],216370)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/656330759aeeb883.js b/litellm/proxy/_experimental/out/_next/static/chunks/656330759aeeb883.js new file mode 100644 index 0000000000..7ca4a61c78 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/656330759aeeb883.js @@ -0,0 +1,3 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,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:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"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,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[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 ${a?"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 ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(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:l(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},i=(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}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,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 ${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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),x=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=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)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{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)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(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 a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{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 gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(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:[n(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:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{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)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`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)(d,{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)(o,{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 p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},m=(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}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(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:()=>n(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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({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 a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=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)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&m(`${i} blocked`,"red"),n>0&&m(`${n} masked`,"blue"),0===i&&0===n&&m("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&m(`${a.length} patterns`,"slate"),l.length>0&&m(`${l.length} keywords`,"slate"),r.length>0&&m(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",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.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{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)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",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.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:m(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(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"})]}),y=()=>(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"})]}),j=()=>(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"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(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:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(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:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded 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:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(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))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,x]=(0,s.useState)(!1),[m,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),x(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>x(!1))},[e,a]),(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)(b,{title:"EU AI Act",data:l,loading:o,error:m}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(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},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,C=()=>(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"})]}),T=({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"})]}),L=({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"})]}),M=()=>(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"})]}),A=()=>(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"})}),D=({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"})}),E=()=>(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"})}),I=({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 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,z=({response:e})=>{let[a,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(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(D,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},O=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);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:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(A,{}):"llm"===e.type?(0,t.jsx)(M,{}):e.isSuccess?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),m=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(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))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} 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:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),(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:m}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),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 text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(D,{expanded:n})]})]}),n&&(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)(I,{matchDetails:e.match_details}),c>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 text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(x,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(z,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm 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)(C,{}),(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:[r.length," guardrail",1!==r.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 ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(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,i," 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(r,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)(E,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,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)(O,{entries:r})}),(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:r.map((e,s)=>(0,t.jsx)(R,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},93648,245767,313793,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(560445),l=e.i(207082),r=e.i(135214),i=e.i(500330),n=e.i(871943),o=e.i(360820),d=e.i(94629),c=e.i(152990),x=e.i(682830),m=e.i(269200),u=e.i(942232),p=e.i(977572),h=e.i(427612),g=e.i(64848),f=e.i(496020),y=e.i(592968);function j({keys:e,totalCount:a,isLoading:l,isFetching:r,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,i.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,c.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),getPaginationRowModel:(0,x.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[l||r?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[l||r?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:l||r||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:l||r||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:l||r?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function b(){let{premiumUser:e}=(0,r.default)(),[i,n]=(0,s.useState)(0),[o]=(0,s.useState)(50),{data:d,isPending:c,isFetching:x}=(0,l.useDeletedKeys)(i+1,o);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(j,{keys:d?.keys||[],totalCount:d?.total_count||0,isLoading:c,isFetching:x,pageIndex:i,pageSize:o,onPageChange:n})]})}e.s(["default",()=>b],93648);var v=e.i(785242),_=e.i(389083),N=e.i(599724),w=e.i(355619);function S({teams:e,isLoading:a,isFetching:l}){let[r,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),b=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,i.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(_.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,w.getModelDisplayName)(e).slice(0,30)}...`:(0,w.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(_.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(N.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],v=(0,c.useReactTable)({data:e,columns:b,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:r},onSortingChange:j,getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||l?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:v.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:v.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${v.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:a||l?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?v.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function k(){let{premiumUser:e}=(0,r.default)(),{data:s,isPending:l,isFetching:i}=(0,v.useDeletedTeams)(1,100);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(S,{teams:s||[],isLoading:l,isFetching:i})]})}e.s(["default",()=>k],245767);var C=e.i(663435);e.s(["default",0,({value:e,onChange:s})=>(0,t.jsx)(C.default,{value:e,onChange:s})],313793);var T=e.i(625901),L=e.i(56456),M=e.i(152473),A=e.i(199133),D=e.i(770914);let{Text:E}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[x,m]=(0,M.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,T.useInfiniteModelInfo)(i,x||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(A.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),m(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(L.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(D.Space,{direction:"vertical",children:[(0,t.jsxs)(D.Space,{direction:"horizontal",children:[(0,t.jsx)(E,{strong:!0,children:"Model name:"}),(0,t.jsx)(E,{ellipsis:!0,children:s})]}),(0,t.jsxs)(E,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(E,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(L.LoadingOutlined,{spin:!0})})]})})}],291950)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),x=e.i(482725),m=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.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(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function D({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,D]=(0,s.useState)(""),[E,I]=(0,s.useState)(""),[z,O]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,E,z,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:E||void 0,action:z||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../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"}})]});let K=$.data?.audit_logs??[],W=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{D(e),_(1)},onChange:e=>{e.target.value||(D(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{O(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{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"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(m.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:W,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(x.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>D],942161)},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},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 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"}]])},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.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"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.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"})}),x=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),m=({count:e})=>(0,t.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,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.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,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.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,t.jsx)(x,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(m,{});let f=(0,t.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,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(x,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:e?()=>(0,t.jsx)(h,{label:"TTFT (s)",field:"ttft_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:e?()=>(0,t.jsx)(h,{label:"Model",field:"model",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({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 flex-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",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 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])},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o,rawInputTokens:d,cacheReadTokens:c,cacheCreationTokens:x})=>{let m=o?.toLowerCase()==="true",u=void 0!==i||void 0!==n,p=e?.input_cost!==void 0||e?.output_cost!==void 0,h=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(p||u||h||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 g=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),f=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),y=m?0:e?.input_cost,j=m?0:e?.output_cost,b=m?0:e?.original_cost,v=m?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.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:[l(a),m&&" (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=m?0:(y??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:[l(s),null!=d&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",d.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:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_read_cost),(c??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(c??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:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_creation_cost),(x??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(x??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:[l(y),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.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:[l(j),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.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:l(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:l(s)})]},e))]}),!m&&(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:l(b)})]})}),(g||f)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[g&&(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 (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(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:["-",l(e.discount_amount)]})]})]}),f&&(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 (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((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:["+",l(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:[l(v),m&&" (Cached)"]})]})})]})}]})})}])},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",x="Model",m="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[x]:"",[m]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[D,E]=(0,t.useState)(null),I=(0,t.useRef)(0),z=(0,t.useRef)(M),O=(0,t.useRef)(!1),R=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[m]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[x]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&E({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),E({data:[],total:0,page:1,page_size:v,total_pages:0})}},[y,j,b,_,v,k,C]),P=(0,t.useMemo)(()=>(0,i.default)((e,t)=>R(e,t),300),[R]);(0,t.useEffect)(()=>()=>P.cancel(),[P]);let B=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[m]||M[u]||M[g]||M[f]||M[x]),[M]);(0,t.useEffect)(()=>{z.current=M,O.current=B},[M,B]),(0,t.useEffect)(()=>{O.current&&y&&(P.cancel(),R(z.current,T))},[k,C,T,j,b,_]);let F=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:v,total_pages:0};if(B)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[x]&&(t=t.filter(e=>e.model_id===M[x])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,B]),q=(0,t.useMemo)(()=>B?null!==D?D:{data:[],total:0,page:1,page_size:v,total_pages:0}:F,[B,D,F]),{data:H}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y}),$=(0,t.useCallback)((e=T)=>{B&&y&&(P.cancel(),R(M,e))},[B,y,M,T,R,P]);return{filters:M,filteredLogs:q,hasBackendFilters:B,allTeams:H,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),E(null),P(s,1)),s})},handleFilterReset:()=>{A(L),E(null),P.cancel(),N(1)},refetchWithFilters:$}}e.s(["useLogFilterLogic",()=>y],504809)},894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.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",()=>a],283086);let l=(0,s.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",()=>l],195116)},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,x=e.i(755151),m=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(x.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,m.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,m.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},869939,e=>{"use strict";var t=e.i(843476),s=e.i(175712),a=e.i(262218),l=e.i(291542),r=e.i(898586),i=e.i(770914),n=e.i(592968),o=e.i(245704),d=e.i(518617),c=e.i(19732);let{Text:x}=r.Typography;function m({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)(c.ExperimentOutlined,{style:{fontSize:16,color:"#6366f1"}}),(0,t.jsx)(x,{strong:!0,style:{fontSize:15},children:"LLM Judge Results"})]}),s.map((e,s)=>(0,t.jsx)(u,{entry:e},e.eval_id||s))]}):null}function u({entry:e}){let r=e.passed,c=r?"#52c41a":"#ff4d4f",m=(e.verdicts||[]).filter(e=>"overall"!==(e.criterion_name||"").toLowerCase()),u=[{title:"Criterion",dataIndex:"criterion_name",key:"criterion_name",width:160,render:e=>(0,t.jsx)(x,{strong:!0,style:{whiteSpace:"nowrap"},children:e})},{title:"Weight",dataIndex:"weight",key:"weight",width:65,render:e=>null!=e?(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:[e,"%"]}):null},{title:"Score",dataIndex:"score",key:"score",width:65,render:e=>(0,t.jsx)(x,{style:{color:e>=70?"#52c41a":e>=50?"#faad14":"#ff4d4f",fontWeight:600},children:e})},{title:(0,t.jsx)(n.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 a=s.score*s.weight/100;return(0,t.jsx)(x,{type:"secondary",style:{fontSize:12},children:a%1==0?a:a.toFixed(1)})}},{title:"Comment",dataIndex:"reasoning",key:"reasoning",ellipsis:{showTitle:!1},render:e=>(0,t.jsx)(n.Tooltip,{title:e,children:(0,t.jsx)("span",{style:{fontSize:12},children:e})})}];return(0,t.jsxs)(s.Card,{size:"small",className:"mb-3",style:{borderLeft:`3px solid ${c}`},title:(0,t.jsxs)(i.Space,{children:[r?(0,t.jsx)(o.CheckCircleOutlined,{style:{color:"#52c41a"}}):(0,t.jsx)(d.CloseCircleOutlined,{style:{color:"#ff4d4f"}}),(0,t.jsx)(x,{strong:!0,children:e.eval_name}),(0,t.jsx)(a.Tag,{color:r?"success":"error",children:r?"PASSED":"FAILED"}),(0,t.jsx)(n.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)(x,{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)(i.Space,{size:"small",children:[e.judge_model&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Judge: ",e.judge_model]}),null!=e.iteration&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Iter: ",e.iteration+1]})]}),children:[e.eval_error&&(0,t.jsxs)(x,{type:"warning",style:{display:"block",marginBottom:8,fontSize:12},children:["Judge error: ",e.eval_error]}),m.length>0?(0,t.jsx)(l.Table,{dataSource:m,columns:u,pagination:!1,size:"small",rowKey:"criterion_name",scroll:{x:!0},summary:()=>{if(!m.some(e=>null!=e.weight))return null;let e=m.reduce((e,t)=>e+(null!=t.weight?t.score*t.weight/100:0),0);return(0,t.jsxs)(l.Table.Summary.Row,{children:[(0,t.jsx)(l.Table.Summary.Cell,{index:0,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12},children:"Total"})}),(0,t.jsx)(l.Table.Summary.Cell,{index:1}),(0,t.jsx)(l.Table.Summary.Cell,{index:2}),(0,t.jsx)(l.Table.Summary.Cell,{index:3,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12,color:c},children:e%1==0?e:e.toFixed(1)})}),(0,t.jsx)(l.Table.Summary.Cell,{index:4})]})}}):(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Score: ",e.overall_score?.toFixed(1)," — no per-criterion breakdown available."]})]})}e.s(["default",()=>m])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),x=e.i(195116),m=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(869939),M=e.i(70635),A=e.i(70969),D=e.i(916925);function E({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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 i,n;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:a}=(0,D.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(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:r(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:r(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:(i=e.start_time,n=e.end_time,`${((n-i)*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,r)=>{let i=a[`${s}-${r}`]||!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}-${r}`,void l(t=>({...t,[e]:!t[e]}))},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)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+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)})]})]})]}),i&&(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",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>E],331052);var I=e.i(592968),z=e.i(207066);let{Text:O}=g.Typography;function R({value:e,maxWidth:s=z.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(I.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:z.FONT_FAMILY_MONO,fontSize:z.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:P}=g.Typography;function B({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(P,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let F=e=>!!e&&e instanceof Date,q=e=>"object"==typeof e&&null!==e,H=e=>!!e&&e instanceof Object&&"function"==typeof e;function $(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function Y(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:x,outerRef:m,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},$(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!m.current)return;let s=m.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=m.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:S,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)&&(x?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},$(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},$(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(U,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:x,beforeExpandChange:u,outerRef:m}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function K(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function W(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function V(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=F(l)?l.toISOString():H(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},$(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function U(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(W,Object.assign({},e)):!q(t)||F(t)||H(t)?(0,s.createElement)(V,Object.assign({},e)):(0,s.createElement)(K,Object.assign({},e))}let G={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},J=()=>!0,Q=e=>{let{data:t,style:a=G,shouldExpandNode:l=J,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&q(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(U,{key:t,field:t,value:n,style:{...G,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(U,{value:t,style:{...G,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>Q,"defaultStyles",()=>G],867612);let{Text:X}=g.Typography;function Z({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:z.JSON_MAX_HEIGHT,overflow:"auto",background:z.COLOR_BG_LIGHT,padding:z.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(Q,{data:e,style:G,clickToExpandNode:!0})})}):(0,t.jsx)(X,{type:"secondary",children:"No data"})}function ee(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function et(e){return Array.isArray(e)?e:e?[e]:[]}function es(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var ea=e.i(366308),el=e.i(755151),er=e.i(291542);let{Text:ei}=g.Typography;function en({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})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(ei,{code:!0,children:[e,s.required&&(0,t.jsx)(ei,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(ei,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(ei,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(ei,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(ei,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(er.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(ei,{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 eo({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:ed}=g.Typography;function ec({tool:e}){let[a,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)(ed,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(en,{tool:e}):(0,t.jsx)(eo,{tool:e})]})}let{Text:ex}=g.Typography;function em({tool:e}){let[a,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(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(ea.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ex,{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"}),a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ec,{tool:e})})]})}let{Text:eu}=g.Typography;function ep({log:e}){let s=function(e){let t,s=!(t=es(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 a=function(e){let t=es(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(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.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:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eu,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(eu,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let eh=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eg=e.i(888259),ef=e.i(264843),ey=e.i(624001);let{Text:ej}=g.Typography;function eb({type:e,tokens:s,cost:l,onCopy:r,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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(ef.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ej,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(I.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:ev}=g.Typography;function e_({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(ev,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(ev,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(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,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:eN}=g.Typography;function ew({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)(eN,{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)(eN,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(eN,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:eS}=g.Typography;function ek({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(eS,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(ew,{tool:e,compact:l},e.id||s))})]}):null}let{Text:eC}=g.Typography;function eT({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(eC,{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: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,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(ek,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eL({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=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)(eb,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eg.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(e_,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eT,{messages:c}),d&&(0,t.jsx)(ek,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eM}=g.Typography;function eA({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eg.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(ek,{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)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eM,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eD=e.i(782273),eE=e.i(313603),eI=e.i(793916);let{Text:ez}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(eR,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eP,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.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 eR({session:e,turnCount:a}){let[l,r]=(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:()=>r(!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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eE.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(ez,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(ez,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eD.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)(eI.AudioOutlined,{}):(0,t.jsx)(ef.MessageOutlined,{})," ",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)(eH,{label:"Model",value:e.model}),(0,t.jsx)(eH,{label:"Voice",value:e.voice}),(0,t.jsx)(eH,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eH,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eH,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eH,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eH,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eH,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(ez,{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 eP({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:l?.completion_tokens??n,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:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eB,{response:e,index:s},e.id||s))})})]})}function eB({response:e,index:s}){let a=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)(ez,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(I.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(ez,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eF,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eq,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eq,{label:"Output",details:l.output_token_details})]})}function eF({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)(ez,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eI.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(ef.MessageOutlined,{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:a})]},s):null})]}):null}function eq({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(ez,{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:a.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 eH({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(ez,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function e$({request:e,response:s,metrics:a}){let l,r,i;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)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&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})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:eh(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eL,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eA,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:eY}=g.Typography;function eK({logEntry:e,isLoadingDetails:s=!1,accessToken:a}){var l,r;let i=e.metadata||{},n="failure"===i.status,o=n?i.error_information:null,d=!!(l=e.messages)&&(Array.isArray(l)?l.length>0:"object"==typeof l&&Object.keys(l).length>0),c=!!(r=e.response)&&Object.keys(ee(r)).length>0,x=!d&&!c&&!n&&!s,m=i?.guardrail_information,u=et(m),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`,j=i?.eval_information,b=i.vector_store_request_metadata&&Array.isArray(i.vector_store_request_metadata)&&i.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${z.DRAWER_CONTENT_PADDING} ${z.DRAWER_CONTENT_PADDING} 0`},children:[n&&o&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eW,{errorInfo:o}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eV,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(R,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(R,{value:e.api_base,maxWidth:z.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),p&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eU,{label:g,maskedCount:h})})]})})}),(0,t.jsx)(eG,{logEntry:e,metadata:i}),(0,t.jsx)(M.CostBreakdownViewer,{costBreakdown:i?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit,rawInputTokens:i?.additional_usage_values?.prompt_tokens_details?.text_tokens,cacheReadTokens:i?.additional_usage_values?.cache_read_input_tokens,cacheCreationTokens:i?.additional_usage_values?.cache_creation_input_tokens}),(0,t.jsx)(ep,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(A.ConfigInfoMessage,{show:x})}),s?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eJ,{hasResponse:c,hasError:n,getRawRequest:()=>ee(e.proxy_server_request||e.messages),getFormattedResponse:()=>n&&o?{error:{message:o.error_message||"An error occurred",type:o.error_class||"error",code:o.error_code||"unknown",param:null}}:ee(e.response),logEntry:e}),p&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:m,accessToken:a??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),null!=j&&(0,t.jsx)(L.default,{data:j}),b&&(0,t.jsx)(E,{data:i.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eX,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:z.DRAWER_CONTENT_PADDING}})]})}function eW({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eV({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(eY,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:z.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eU({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:z.SPACING_MEDIUM,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"]})]})}function eG({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default",o=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),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Input Tokens",children:(0,C.formatNumberWithCommas)(o)}),(0,t.jsx)(f.Descriptions.Item,{label:"Output Tokens",children:(0,C.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(B,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.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)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.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)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eJ({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(z.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),x=i.spend??0,m=i.prompt_tokens||0,u=i.completion_tokens||0,p=m+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?x*m/p:0,y=g?h.output_cost??0:p>0?x*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(e$,{request:l(),response:r(),metrics:{prompt_tokens:m,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(eY,{copyable:{text:JSON.stringify(n===z.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===z.TAB_RESPONSE&&!e&&!a}),items:[{key:z.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:(0,t.jsx)(Z,{data:l(),mode:"formatted"})})},{key:z.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:e||a?(0,t.jsx)(Z,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eQ({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 eX({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eY,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:z.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:z.FONT_SIZE_SMALL,fontFamily:z.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eZ=e.i(764205),e0=e.i(266027),e1=e.i(135214);function e2({row:e,isSelected:s,onClick:a}){let l=m.MCP_CALL_TYPES.includes(e.call_type),r=m.AGENT_CALL_TYPES.includes(e.call_type),i=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:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(x.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(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:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.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]})]})}function e5({open:e,onClose:d,logEntry:c,sessionId:x,accessToken:u,allLogs:g=[],onSelectLog:f,startTime:y}){let j=!!x,[b,v]=(0,s.useState)(null),[_,N]=(0,s.useState)(!1),[w,S]=(0,s.useState)(!1),{data:k=[]}=(0,e0.useQuery)({queryKey:["sessionLogs",x],queryFn:async()=>{if(!x||!u)return[];let e=await (0,eZ.sessionSpendLogsCall)(u,x);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!m.MCP_CALL_TYPES.includes(e.call_type),a=+!!m.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&j&&x&&u)}),T=(0,s.useMemo)(()=>j?k.length?b?k.find(e=>e.request_id===b)||k[0]:c?.request_id&&k.find(e=>e.request_id===c.request_id)||k[0]:null:c,[j,c,b,k]);(0,s.useEffect)(()=>{j&&k.length&&(b&&k.some(e=>e.request_id===b)||v(c?.request_id&&k.some(e=>e.request_id===c.request_id)?c.request_id:k[0].request_id))},[j,c,b,k]),(0,s.useEffect)(()=>{e?N(!1):(j&&v(null),S(!1))},[e,j]);let{selectNextLog:L,selectPreviousLog:M}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:T,allLogs:j?k:g,onClose:d,onSelectLog:e=>{j&&v(e.request_id),f?.(e)}}),A=((e,t,s)=>{let{accessToken:a}=(0,e1.default)();return(0,e0.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eZ.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(T?.request_id,y,e&&!!T?.request_id),D=A.data,E=A.isLoading,I=(0,s.useMemo)(()=>T?{...T,messages:D?.messages||T.messages,response:D?.response||T.response,proxy_server_request:D?.proxy_server_request||T.proxy_server_request}:null,[T,D]),O=T?.metadata||{},R="failure"===O.status?"Failure":"Success",P="failure"===O.status?"error":"success",B=O?.user_api_key_team_alias||"default",F=k.reduce((e,t)=>e+(t.spend||0),0),q=k.length>0?new Date(Math.min(...k.map(e=>new Date(e.startTime).getTime()))):null,H=k.length>0?new Date(Math.max(...k.map(e=>new Date(e.endTime).getTime()))):null,$=q&&H?((H.getTime()-q.getTime())/1e3).toFixed(2):"0.00",Y=k.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,K=k.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,W=k.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length,V=j?k:T?[T]:[],U=j?x||"":T?.request_id||"",G=U.length>14?`${U.slice(0,11)}...`:U,J=async()=>{if(U)try{await navigator.clipboard.writeText(U),S(!0),setTimeout(()=>S(!1),1200)}catch{}};return T&&I?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:z.DRAWER_WIDTH,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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>N(!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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>N(!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:j?"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:G}),(0,t.jsx)("button",{type:"button",onClick:J,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:w?(0,t.jsx)(r.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:[V.length," req",[j?Y:V.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?K:V.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?W:V.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),j?(0,C.getSpendString)(F):(0,C.getSpendString)(T.spend||0),j&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),$,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[et(O?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eQ,{guardrailEntries:et(O?.guardrail_information)})}),j?(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"}),V.map((e,s)=>{let a=s===V.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"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e2,{row:e,isSelected:e.request_id===T.request_id,onClick:()=>{v(e.request_id),f?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:V.map(e=>(0,t.jsx)(e2,{row:e,isSelected:e.request_id===T.request_id,onClick:()=>f?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:T,onClose:d,onPrevious:M,onNext:L,statusLabel:R,statusColor:P,environment:B}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eK,{logEntry:I,isLoadingDetails:E,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e5],502626),e.s([],3565)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(772345),o=e.i(793130),d=e.i(197647),c=e.i(653824),x=e.i(881073),m=e.i(404206),u=e.i(723731),p=e.i(464571),h=e.i(708347),g=e.i(93648),f=e.i(245767),y=e.i(313793),j=e.i(50882),b=e.i(291950),v=e.i(969550),_=e.i(764205),N=e.i(20147),w=e.i(942161),S=e.i(245099);e.i(70969);var k=e.i(97859);e.i(70635),e.i(339086);var C=e.i(504809);e.i(3565);var T=e.i(502626);e.i(727749),e.i(867612);var L=e.i(149121);function M({accessToken:e,token:M,userRole:A,userID:D,premiumUser:E}){let[I,z]=(0,i.useState)(""),[O,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),$=(0,i.useRef)(null),Y=(0,i.useRef)(null),K=(0,i.useRef)(null),[W,V]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[U,G]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)(!1),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(""),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,ex]=(0,i.useState)(null),[em,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(""),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(A&&h.internalUserRoles.includes(A)),[eb,ev]=(0,i.useState)("request logs"),[e_,eN]=(0,i.useState)(null),[ew,eS]=(0,i.useState)(!1),[ek,eC]=(0,i.useState)(null),[eT,eL]=(0,i.useState)("startTime"),[eM,eA]=(0,i.useState)("desc"),[eD,eE]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eI,ez]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eI))},[eI]);let[eO,eR]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{em&&e&&ex({...(await (0,_.keyInfoV1Call)(e,em)).info,token:em,api_key:em})})()},[em,e]),(0,i.useEffect)(()=>{function e(e){$.current&&!$.current.contains(e.target)&&B(!1),Y.current&&!Y.current.contains(e.target)&&R(!1),K.current&&!K.current.contains(e.target)&&Z(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{A&&h.internalUserRoles.includes(A)&&ej(!0)},[A]);let eP=(0,a.useQuery)({queryKey:["logs","table",F,H,W,U,el,ei,ey?D:null,ep,eo,eT,eM],queryFn:async()=>{if(!e||!M||!A||!D)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(W).utc().format("YYYY-MM-DD HH:mm:ss"),s=J?(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,_.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:ei||void 0,team_id:el||void 0,user_id:ey?D??void 0:void 0,end_user:eg||void 0,status_filter:ep||void 0,model_id:eo||void 0,sort_by:eT,sort_order:eM}})},enabled:!!e&&!!M&&!!A&&!!D&&"request logs"===eb&&eD,refetchInterval:!!eI&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),eB=(0,i.useDeferredValue)(eP.isFetching),eF=eP.isFetching||eB,eq=eP.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eH,filteredLogs:e$,hasBackendFilters:eY,allTeams:eK,handleFilterChange:eW,handleFilterReset:eV,refetchWithFilters:eU}=(0,C.useLogFilterLogic)({logs:eq,accessToken:e,startTime:W,endTime:U,pageSize:H,isCustomDate:J,setCurrentPage:q,userID:D,userRole:A,sortBy:eT,sortOrder:eM,currentPage:F}),eG=(0,i.useCallback)(()=>{eV(),V((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),Q(!1),eR({value:24,unit:"hours"}),q(1)},[eV]);if((0,i.useEffect)(()=>{eE(!eY)},[eY]),(0,i.useEffect)(()=>{e&&(eH["Team ID"]?er(eH["Team ID"]):er(""),eh(eH.Status||""),ed(eH.Model||""),ef(eH["End User"]||""),en(eH["Key Hash"]||""))},[eH,e]),!e||!M||!A||!D)return null;let eJ=e$.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),eQ=eJ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),k.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:k.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),eX=new Map;for(let e of eJ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=k.MCP_CALL_TYPES.includes(e.call_type),s=eX.get(e.session_id);s&&(!s.isMcp||t)||eX.set(e.session_id,{requestId:e.request_id,isMcp:t})}let eZ=eJ.map(e=>{let t=e.session_id?eQ[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eu(e),onSessionClick:t=>{t&&(eC(t),eN(e),eS(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||eX.get(e.session_id)?.requestId===e.request_id)||[],e0=[{name:"Team ID",label:"Team ID",customComponent:y.default},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:b.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:j.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,_.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return k.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=k.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!k.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e1=k.QUICK_SELECT_OPTIONS.find(e=>e.value===eO.value&&e.unit===eO.unit),e2=J?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"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=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(J,W,U):e1?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(c.TabGroup,{defaultIndex:0,onIndexChange:e=>ev(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(d.Tab,{children:"Request Logs"}),(0,t.jsx)(d.Tab,{children:"Audit Logs"}),(0,t.jsx)(d.Tab,{children:"Deleted Keys"}),(0,t.jsx)(d.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(u.TabPanels,{children:[(0,t.jsxs)(m.TabPanel,{children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"})}),ec&&em&&ec.api_key===em?(0,t.jsx)(N.default,{keyId:em,keyData:ec,teams:eK??[],onClose:()=>eu(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{options:e0,onApplyFilters:eW,onResetFilters:eG}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>z(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:K,children:[(0,t.jsxs)("button",{onClick:()=>Z(!X),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",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:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e2]}),X&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[k.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e2===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),V((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eR({value:e.value,unit:e.unit}),Q(!1),Z(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${J?"bg-blue-50 text-blue-600":""}`,onClick:()=>Q(!J),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(o.Switch,{color:"green",checked:eI,defaultChecked:!0,onChange:ez})]}),{}),(0,t.jsx)(p.Button,{type:"default",icon:(0,t.jsx)(n.SyncOutlined,{spin:eF}),onClick:()=>{eY?eU():eP.refetch()},disabled:eF,title:"Fetch data",children:eF?"Fetching":"Fetch"})]}),J&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:W,onChange:e=>{V(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eP.isLoading?"...":e$?(F-1)*H+1:0," -"," ",eP.isLoading?"...":e$?Math.min(F*H,e$.total):0," ","of ",eP.isLoading?"...":e$?e$.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eP.isLoading?"...":F," of"," ",eP.isLoading?"...":e$?e$.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eP.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(e$.total_pages||1,e+1)),disabled:eP.isLoading||F===(e$.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eI&&1===F&&eD&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>ez(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(L.DataTable,{columns:(0,S.createColumns)({sortBy:eT,sortOrder:eM,onSortChange:(e,t)=>{eL(e),eA(t),q(1)}}),data:eZ,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eC(e.session_id),eN(e),eS(!0);return}eC(null),eN(e),eS(!0)},isLoading:eP.isLoading})]})]})]}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(w.default,{userID:D,userRole:A,token:M,accessToken:e,isActive:"audit logs"===eb,premiumUser:E})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(g.default,{})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(f.default,{})})]})]}),(0,t.jsx)(T.LogDetailsDrawer,{open:ew,onClose:()=>{eS(!1),eC(null)},logEntry:e_,sessionId:ek,accessToken:e,allLogs:eZ,onSelectLog:e=>{eN(e)},startTime:(0,r.default)(W).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>M],936190)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/67de745d18bddc74.css b/litellm/proxy/_experimental/out/_next/static/chunks/67de745d18bddc74.css new file mode 100644 index 0000000000..2b98fde35f --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/67de745d18bddc74.css @@ -0,0 +1 @@ +*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}input:where([type=text]),input:where(:not([type])),input:where([type=email]),input:where([type=url]),input:where([type=password]),input:where([type=number]),input:where([type=date]),input:where([type=datetime-local]),input:where([type=month]),input:where([type=search]),input:where([type=tel]),input:where([type=time]),input:where([type=week]),select:where([multiple]),textarea,select{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:#6b7280;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}input:where([type=text]):focus,input:where(:not([type])):focus,input:where([type=email]):focus,input:where([type=url]):focus,input:where([type=password]):focus,input:where([type=number]):focus,input:where([type=date]):focus,input:where([type=datetime-local]):focus,input:where([type=month]):focus,input:where([type=search]):focus,input:where([type=tel]):focus,input:where([type=time]):focus,input:where([type=week]):focus,select:where([multiple]):focus,textarea:focus,select:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb;outline:2px solid #0000}input::-moz-placeholder{color:#6b7280;opacity:1}textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{-webkit-print-color-adjust:exact;print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}select:where([multiple]),select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;-webkit-print-color-adjust:unset;print-color-adjust:unset;padding-right:.75rem}input:where([type=checkbox]),input:where([type=radio]){appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:#2563eb;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:#6b7280;flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}input:where([type=checkbox]){border-radius:0}input:where([type=radio]){border-radius:100%}input:where([type=checkbox]):focus,input:where([type=radio]):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}input:where([type=checkbox]):checked,input:where([type=radio]):checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}input:where([type=checkbox]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors:active){input:where([type=checkbox]):checked{appearance:auto}}input:where([type=radio]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors:active){input:where([type=radio]):checked{appearance:auto}}input:where([type=checkbox]):checked:hover,input:where([type=checkbox]):checked:focus,input:where([type=radio]):checked:hover,input:where([type=radio]):checked:focus{background-color:currentColor;border-color:#0000}input:where([type=checkbox]):indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media (forced-colors:active){input:where([type=checkbox]):indeterminate{appearance:auto}}input:where([type=checkbox]):indeterminate:hover,input:where([type=checkbox]):indeterminate:focus{background-color:currentColor;border-color:#0000}input:where([type=file]){background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}input:where([type=file]):focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip:auto;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-inset-1{inset:-.25rem}.inset-0{inset:0}.inset-x-\[-1\.5rem\]{left:-1.5rem;right:-1.5rem}.inset-y-0{top:0;bottom:0}.-left-2{left:-.5rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.bottom-4{bottom:1rem}.bottom-6{bottom:1.5rem}.bottom-\[-1\.5rem\]{bottom:-1.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-4{left:1rem}.right-0{right:0}.right-1{right:.25rem}.right-1\/2{right:50%}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-4{top:1rem}.top-8{top:2rem}.top-full{top:100%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-1{grid-column:span 1/span 1}.col-span-10{grid-column:span 10/span 10}.col-span-11{grid-column:span 11/span 11}.col-span-12{grid-column:span 12/span 12}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-5{grid-column:span 5/span 5}.col-span-6{grid-column:span 6/span 6}.col-span-7{grid-column:span 7/span 7}.col-span-8{grid-column:span 8/span 8}.col-span-9{grid-column:span 9/span 9}.\!m-0{margin:0!important}.m-0{margin:0}.m-2{margin:.5rem}.m-8{margin:2rem}.-my-4{margin-top:-1rem;margin-bottom:-1rem}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-2\.5{margin-left:.625rem;margin-right:.625rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.\!mb-0{margin-bottom:0!important}.-mb-px{margin-bottom:-1px}.-ml-0{margin-left:0}.-ml-0\.5{margin-left:-.125rem}.-ml-1{margin-left:-.25rem}.-ml-1\.5{margin-left:-.375rem}.-ml-px{margin-left:-1px}.-mr-1{margin-right:-.25rem}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-11{margin-left:2.75rem}.ml-12{margin-left:3rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.ml-7{margin-left:1.75rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-10{margin-right:2.5rem}.mr-2{margin-right:.5rem}.mr-2\.5{margin-right:.625rem}.mr-20{margin-right:5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.box-border{box-sizing:border-box}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.inline{display:inline}.\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.size-12{width:3rem;height:3rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.\!h-8{height:2rem!important}.h-0{height:0}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-\[100vh\]{height:100vh}.h-\[1px\]{height:1px}.h-\[22\.4px\]{height:22.4px}.h-\[350px\]{height:350px}.h-\[600px\]{height:600px}.h-\[75vh\]{height:75vh}.h-\[80vh\]{height:80vh}.h-\[calc\(100vh-200px\)\]{height:calc(100vh - 200px)}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-28{max-height:7rem}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-8{max-height:2rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[228px\]{max-height:228px}.max-h-\[234px\]{max-height:234px}.max-h-\[400px\]{max-height:400px}.max-h-\[500px\]{max-height:500px}.max-h-\[50vh\]{max-height:50vh}.max-h-\[520px\]{max-height:520px}.max-h-\[600px\]{max-height:600px}.max-h-\[65vh\]{max-height:65vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(100vh-385px\)\]{max-height:calc(100vh - 385px)}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-8{min-height:2rem}.min-h-\[100px\]{min-height:100px}.min-h-\[120px\]{min-height:120px}.min-h-\[280px\]{min-height:280px}.min-h-\[380px\]{min-height:380px}.min-h-\[400px\]{min-height:400px}.min-h-\[44px\]{min-height:44px}.min-h-\[500px\]{min-height:500px}.min-h-\[750px\]{min-height:750px}.min-h-\[calc\(100vh-160px\)\]{min-height:calc(100vh - 160px)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.\!w-8{width:2rem!important}.w-0{width:0}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-1\/4{width:25%}.w-10{width:2.5rem}.w-11\/12{width:91.6667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[120px\]{width:120px}.w-\[180px\]{width:180px}.w-\[280px\]{width:280px}.w-\[300px\]{width:300px}.w-\[400px\]{width:400px}.w-\[90\%\]{width:90%}.w-\[var\(--button-width\)\]{width:var(--button-width)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.w-screen{width:100vw}.\!min-w-8{min-width:2rem!important}.min-w-0{min-width:0}.min-w-44{min-width:11rem}.min-w-\[100px\]{min-width:100px}.min-w-\[10rem\]{min-width:10rem}.min-w-\[150px\]{min-width:150px}.min-w-\[200px\]{min-width:200px}.min-w-\[220px\]{min-width:220px}.min-w-\[600px\]{min-width:600px}.min-w-\[88px\]{min-width:88px}.min-w-\[90px\]{min-width:90px}.min-w-full{min-width:100%}.min-w-min{min-width:min-content}.max-w-2xl{max-width:42rem}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-40{max-width:10rem}.max-w-48{max-width:12rem}.max-w-4xl{max-width:56rem}.max-w-64{max-width:16rem}.max-w-6xl{max-width:72rem}.max-w-\[100px\]{max-width:100px}.max-w-\[140px\]{max-width:140px}.max-w-\[150px\]{max-width:150px}.max-w-\[15ch\]{max-width:15ch}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[20ch\]{max-width:20ch}.max-w-\[240px\]{max-width:240px}.max-w-\[250px\]{max-width:250px}.max-w-\[300px\]{max-width:300px}.max-w-\[40ch\]{max-width:40ch}.max-w-\[75\%\]{max-width:75%}.max-w-\[80\%\]{max-width:80%}.max-w-\[85\%\]{max-width:85%}.max-w-\[88\%\]{max-width:88%}.max-w-\[95\%\]{max-width:95%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1}.flex-\[2\]{flex:2}.flex-auto{flex:auto}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-translate-y-4{--tw-translate-y:-1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-0\.5{--tw-translate-x:.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-4{--tw-translate-x:1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x:1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y:1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate:-180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.animate-bounce{animation:1s infinite bounce}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x)var(--tw-pan-y)var(--tw-pinch-zoom)}.select-none{-webkit-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.snap-mandatory{--tw-scroll-snap-strictness:mandatory}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.auto-rows-\[minmax\(0\,1fr\)\]{grid-auto-rows:minmax(0,1fr)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.grid-cols-\[auto\]{grid-template-columns:auto}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-none{grid-template-columns:none}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.\!items-center{align-items:center!important}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.\!justify-center{justify-content:center!important}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-1{row-gap:.25rem}.gap-y-4{row-gap:1rem}.gap-y-5{row-gap:1.25rem}.space-x-0\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.125rem*var(--tw-space-x-reverse));margin-left:calc(.125rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.375rem*var(--tw-space-x-reverse));margin-left:calc(.375rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2.5rem*var(--tw-space-x-reverse));margin-left:calc(2.5rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.625rem*var(--tw-space-x-reverse));margin-left:calc(.625rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem*var(--tw-space-x-reverse));margin-left:calc(1.25rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.5rem*var(--tw-space-x-reverse));margin-left:calc(1.5rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem*var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse:1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-right-width:calc(1px*var(--tw-divide-x-reverse));border-left-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:1}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity,1))}.divide-gray-50>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(249 250 251/var(--tw-divide-opacity,1))}.divide-tremor-border>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity,1))}.self-start{align-self:flex-start}.self-center{align-self:center}.justify-self-end{justify-self:end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-x-clip{overflow-x:clip}.overflow-x-scroll{overflow-x:scroll}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.\!rounded-md{border-radius:.375rem!important}.\!rounded-none{border-radius:0!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\[1px\]{border-radius:1px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-tremor-default{border-radius:.5rem}.rounded-tremor-full{border-radius:9999px}.rounded-tremor-small{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-2xl{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.rounded-b-lg,.rounded-b-tremor-default{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-l-tremor-default{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-tremor-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-l-tremor-small{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-r-tremor-default{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-r-tremor-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-r-tremor-small{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg,.rounded-t-tremor-default{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-br-md{border-bottom-right-radius:.375rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.\!border{border-width:1px!important}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-4{border-bottom-width:4px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-4{border-right-width:4px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-t-\[1px\]{border-top-width:1px}.border-dashed{border-style:dashed}.\!border-none{border-style:none!important}.border-none{border-style:none}.\!border-slate-200{--tw-border-opacity:1!important;border-color:rgb(226 232 240/var(--tw-border-opacity,1))!important}.border-\[\#6366f1\]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-amber-100{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.border-amber-400{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.border-amber-50{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}.border-amber-500{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.border-amber-600{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}.border-amber-700{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}.border-amber-800{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}.border-amber-900{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}.border-amber-950{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}.border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.border-blue-50{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.border-blue-700{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}.border-blue-800{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.border-blue-900{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}.border-blue-950{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}.border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.border-cyan-300{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.border-cyan-400{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.border-cyan-50{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}.border-cyan-500{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.border-cyan-600{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}.border-cyan-700{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}.border-cyan-800{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}.border-cyan-900{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}.border-cyan-950{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}.border-dark-tremor-background{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.border-dark-tremor-border{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.border-dark-tremor-brand{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-dark-tremor-brand-emphasis{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.border-dark-tremor-brand-inverted{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.border-dark-tremor-brand-subtle{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.border-emerald-100{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}.border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.border-emerald-300{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.border-emerald-400{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}.border-emerald-50{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}.border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.border-emerald-600{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}.border-emerald-700{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}.border-emerald-800{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}.border-emerald-900{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}.border-emerald-950{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}.border-fuchsia-100{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}.border-fuchsia-200{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}.border-fuchsia-300{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.border-fuchsia-400{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}.border-fuchsia-50{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}.border-fuchsia-500{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}.border-fuchsia-600{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}.border-fuchsia-700{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}.border-fuchsia-800{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}.border-fuchsia-900{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}.border-fuchsia-950{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-200\/60{border-color:#e5e7eb99}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.border-gray-50{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}.border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.border-gray-900{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.border-gray-950{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}.border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.border-green-50{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-green-600{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}.border-green-700{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}.border-green-800{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.border-green-900{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}.border-green-950{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}.border-indigo-100{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}.border-indigo-200{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}.border-indigo-300{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.border-indigo-400{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.border-indigo-50{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}.border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-indigo-600{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}.border-indigo-700{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.border-indigo-800{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.border-indigo-900{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}.border-indigo-950{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.border-lime-100{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}.border-lime-200{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}.border-lime-300{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.border-lime-400{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}.border-lime-50{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}.border-lime-500{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}.border-lime-600{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}.border-lime-700{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}.border-lime-800{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}.border-lime-900{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}.border-lime-950{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}.border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.border-neutral-300{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.border-neutral-400{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.border-neutral-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.border-neutral-500{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}.border-neutral-600{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}.border-neutral-700{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.border-neutral-800{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}.border-neutral-900{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.border-neutral-950{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}.border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.border-orange-300{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.border-orange-400{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}.border-orange-50{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}.border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.border-orange-600{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}.border-orange-700{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}.border-orange-800{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}.border-orange-900{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}.border-orange-950{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}.border-pink-100{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}.border-pink-200{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}.border-pink-300{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.border-pink-400{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}.border-pink-50{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}.border-pink-500{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}.border-pink-600{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}.border-pink-700{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}.border-pink-800{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}.border-pink-900{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.border-pink-950{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}.border-purple-100{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}.border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.border-purple-300{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.border-purple-400{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}.border-purple-50{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}.border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.border-purple-600{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}.border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}.border-purple-800{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}.border-purple-900{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}.border-purple-950{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}.border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.border-red-50{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.border-red-900{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}.border-red-950{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}.border-rose-100{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}.border-rose-200{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}.border-rose-300{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.border-rose-400{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}.border-rose-50{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}.border-rose-500{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.border-rose-600{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}.border-rose-700{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}.border-rose-800{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}.border-rose-900{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}.border-rose-950{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}.border-sky-100{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.border-sky-400{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.border-sky-50{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}.border-sky-500{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}.border-sky-600{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}.border-sky-700{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}.border-sky-800{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}.border-sky-900{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}.border-sky-950{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}.border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}.border-slate-50{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.border-slate-900{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}.border-slate-950{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}.border-stone-100{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}.border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.border-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.border-stone-50{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}.border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.border-stone-700{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}.border-stone-800{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}.border-stone-900{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}.border-stone-950{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}.border-teal-100{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}.border-teal-200{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}.border-teal-300{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.border-teal-400{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}.border-teal-50{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}.border-teal-500{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}.border-teal-600{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}.border-teal-700{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}.border-teal-800{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}.border-teal-900{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}.border-teal-950{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}.border-transparent{border-color:#0000}.border-tremor-background{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-tremor-border{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-tremor-brand{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-tremor-brand-emphasis{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.border-tremor-brand-inverted{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-tremor-brand-subtle{--tw-border-opacity:1;border-color:rgb(142 145 235/var(--tw-border-opacity,1))}.border-violet-100{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}.border-violet-200{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}.border-violet-300{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.border-violet-400{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}.border-violet-50{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}.border-violet-500{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}.border-violet-600{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}.border-violet-700{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}.border-violet-800{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}.border-violet-900{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}.border-violet-950{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}.border-yellow-100{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.border-yellow-300{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}.border-yellow-50{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.border-yellow-600{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}.border-yellow-700{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}.border-yellow-800{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.border-yellow-900{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}.border-yellow-950{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}.border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.border-zinc-400{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.border-zinc-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.border-zinc-500{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.border-zinc-600{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}.border-zinc-700{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.border-zinc-950{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}.border-l-blue-500{--tw-border-opacity:1;border-left-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-l-transparent{border-left-color:#0000}.border-r-gray-200{--tw-border-opacity:1;border-right-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-t-transparent{border-top-color:#0000}.\!bg-blue-600{--tw-bg-opacity:1!important;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))!important}.\!bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-\[\#1e1e1e\]{--tw-bg-opacity:1;background-color:rgb(30 30 30/var(--tw-bg-opacity,1))}.bg-\[\#6366f1\]{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-amber-200{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}.bg-amber-300{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}.bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.bg-amber-700{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.bg-amber-800{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}.bg-amber-900{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}.bg-amber-950{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/90{background-color:#000000e6}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-50\/30{background-color:#eff6ff4d}.bg-blue-50\/60{background-color:#eff6ff99}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-blue-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.bg-blue-800{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}.bg-blue-900{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.bg-blue-950{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-cyan-200{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}.bg-cyan-300{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}.bg-cyan-400{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.bg-cyan-700{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}.bg-cyan-800{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}.bg-cyan-900{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}.bg-cyan-950{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}.bg-dark-tremor-background{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.bg-dark-tremor-background-subtle{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand-emphasis{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand-faint{--tw-bg-opacity:1;background-color:rgb(11 18 41/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand-muted{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.bg-dark-tremor-content-subtle{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.bg-emerald-200{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}.bg-emerald-300{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.bg-emerald-700{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.bg-emerald-800{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}.bg-emerald-900{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}.bg-emerald-950{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}.bg-fuchsia-100{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.bg-fuchsia-200{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}.bg-fuchsia-300{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}.bg-fuchsia-400{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}.bg-fuchsia-50{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}.bg-fuchsia-500{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.bg-fuchsia-600{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}.bg-fuchsia-700{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}.bg-fuchsia-800{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}.bg-fuchsia-900{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}.bg-fuchsia-950{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-100\/50{background-color:#f3f4f680}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-50\/50{background-color:#f9fafb80}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.bg-gray-950{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}.bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.bg-green-800{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}.bg-green-900{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.bg-green-950{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}.bg-indigo-300{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}.bg-indigo-400{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}.bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}.bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}.bg-indigo-950{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.bg-lime-100{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.bg-lime-200{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}.bg-lime-300{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}.bg-lime-400{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}.bg-lime-50{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}.bg-lime-500{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.bg-lime-600{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}.bg-lime-700{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}.bg-lime-800{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}.bg-lime-900{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}.bg-lime-950{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-neutral-200{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.bg-neutral-400{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-neutral-500{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}.bg-neutral-600{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}.bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.bg-neutral-950{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}.bg-orange-300{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}.bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}.bg-orange-700{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}.bg-orange-800{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}.bg-orange-900{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}.bg-orange-950{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}.bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}.bg-pink-300{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}.bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.bg-pink-500{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.bg-pink-600{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}.bg-pink-700{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}.bg-pink-800{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}.bg-pink-900{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}.bg-pink-950{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.bg-purple-200{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}.bg-purple-300{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}.bg-purple-400{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}.bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.bg-purple-800{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}.bg-purple-900{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.bg-purple-950{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.bg-red-300{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-50\/30{background-color:#fef2f24d}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.bg-red-800{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}.bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.bg-rose-100{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.bg-rose-200{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}.bg-rose-300{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}.bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}.bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.bg-rose-700{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}.bg-rose-800{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}.bg-rose-900{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}.bg-rose-950{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}.bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-sky-200{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}.bg-sky-300{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}.bg-sky-400{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.bg-sky-700{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}.bg-sky-800{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}.bg-sky-900{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}.bg-sky-950{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.bg-slate-500{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}.bg-slate-600{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.bg-slate-950{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.bg-slate-950\/30{background-color:#0206174d}.bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.bg-stone-200{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.bg-stone-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}.bg-stone-50{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.bg-stone-700{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}.bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.bg-stone-950{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}.bg-teal-100{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.bg-teal-200{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}.bg-teal-300{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}.bg-teal-400{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}.bg-teal-50{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}.bg-teal-500{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.bg-teal-600{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}.bg-teal-700{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}.bg-teal-800{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}.bg-teal-900{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}.bg-teal-950{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}.bg-transparent{background-color:#0000}.bg-tremor-background{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-tremor-background-emphasis{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-tremor-background-muted{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-tremor-background-subtle{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-tremor-border{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-tremor-brand{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-tremor-brand-muted{--tw-bg-opacity:1;background-color:rgb(134 136 239/var(--tw-bg-opacity,1))}.bg-tremor-brand-muted\/50{background-color:#8688ef80}.bg-tremor-brand-subtle{--tw-bg-opacity:1;background-color:rgb(142 145 235/var(--tw-bg-opacity,1))}.bg-tremor-content-subtle{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-violet-200{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}.bg-violet-300{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}.bg-violet-400{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}.bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.bg-violet-700{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}.bg-violet-800{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}.bg-violet-900{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}.bg-violet-950{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/80{background-color:#fffc}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}.bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}.bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.bg-yellow-700{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}.bg-yellow-800{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}.bg-yellow-900{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}.bg-yellow-950{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.bg-zinc-400{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-zinc-500{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.bg-zinc-600{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.bg-zinc-700{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.bg-opacity-10{--tw-bg-opacity:.1}.bg-opacity-20{--tw-bg-opacity:.2}.bg-opacity-30{--tw-bg-opacity:.3}.bg-opacity-40{--tw-bg-opacity:.4}.bg-opacity-50{--tw-bg-opacity:.5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:#eff6ff var(--tw-gradient-from-position);--tw-gradient-to:#eff6ff00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-blue-600{--tw-gradient-from:#2563eb var(--tw-gradient-from-position);--tw-gradient-to:#2563eb00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-50{--tw-gradient-from:#ecfdf5 var(--tw-gradient-from-position);--tw-gradient-to:#ecfdf500 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-green-50{--tw-gradient-from:#f0fdf4 var(--tw-gradient-from-position);--tw-gradient-to:#f0fdf400 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-purple-50{--tw-gradient-from:#faf5ff var(--tw-gradient-from-position);--tw-gradient-to:#faf5ff00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-slate-50{--tw-gradient-from:#f8fafc var(--tw-gradient-from-position);--tw-gradient-to:#f8fafc00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-teal-400{--tw-gradient-from:#2dd4bf var(--tw-gradient-from-position);--tw-gradient-to:#2dd4bf00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-blue-50{--tw-gradient-to:#eff6ff var(--tw-gradient-to-position)}.to-cyan-600{--tw-gradient-to:#0891b2 var(--tw-gradient-to-position)}.to-green-50{--tw-gradient-to:#f0fdf4 var(--tw-gradient-to-position)}.to-indigo-50{--tw-gradient-to:#eef2ff var(--tw-gradient-to-position)}.to-indigo-800{--tw-gradient-to:#3730a3 var(--tw-gradient-to-position)}.to-purple-50{--tw-gradient-to:#faf5ff var(--tw-gradient-to-position)}.to-teal-50{--tw-gradient-to:#f0fdfa var(--tw-gradient-to-position)}.bg-repeat{background-repeat:repeat}.fill-amber-100{fill:#fef3c7}.fill-amber-200{fill:#fde68a}.fill-amber-300{fill:#fcd34d}.fill-amber-400{fill:#fbbf24}.fill-amber-50{fill:#fffbeb}.fill-amber-500{fill:#f59e0b}.fill-amber-600{fill:#d97706}.fill-amber-700{fill:#b45309}.fill-amber-800{fill:#92400e}.fill-amber-900{fill:#78350f}.fill-amber-950{fill:#451a03}.fill-blue-100{fill:#dbeafe}.fill-blue-200{fill:#bfdbfe}.fill-blue-300{fill:#93c5fd}.fill-blue-400{fill:#60a5fa}.fill-blue-50{fill:#eff6ff}.fill-blue-500{fill:#3b82f6}.fill-blue-600{fill:#2563eb}.fill-blue-700{fill:#1d4ed8}.fill-blue-800{fill:#1e40af}.fill-blue-900{fill:#1e3a8a}.fill-blue-950{fill:#172554}.fill-cyan-100{fill:#cffafe}.fill-cyan-200{fill:#a5f3fc}.fill-cyan-300{fill:#67e8f9}.fill-cyan-400{fill:#22d3ee}.fill-cyan-50{fill:#ecfeff}.fill-cyan-500{fill:#06b6d4}.fill-cyan-600{fill:#0891b2}.fill-cyan-700{fill:#0e7490}.fill-cyan-800{fill:#155e75}.fill-cyan-900{fill:#164e63}.fill-cyan-950{fill:#083344}.fill-dark-tremor-content{fill:#6b7280}.fill-dark-tremor-content-emphasis{fill:#e5e7eb}.fill-emerald-100{fill:#d1fae5}.fill-emerald-200{fill:#a7f3d0}.fill-emerald-300{fill:#6ee7b7}.fill-emerald-400{fill:#34d399}.fill-emerald-50{fill:#ecfdf5}.fill-emerald-500{fill:#10b981}.fill-emerald-600{fill:#059669}.fill-emerald-700{fill:#047857}.fill-emerald-800{fill:#065f46}.fill-emerald-900{fill:#064e3b}.fill-emerald-950{fill:#022c22}.fill-fuchsia-100{fill:#fae8ff}.fill-fuchsia-200{fill:#f5d0fe}.fill-fuchsia-300{fill:#f0abfc}.fill-fuchsia-400{fill:#e879f9}.fill-fuchsia-50{fill:#fdf4ff}.fill-fuchsia-500{fill:#d946ef}.fill-fuchsia-600{fill:#c026d3}.fill-fuchsia-700{fill:#a21caf}.fill-fuchsia-800{fill:#86198f}.fill-fuchsia-900{fill:#701a75}.fill-fuchsia-950{fill:#4a044e}.fill-gray-100{fill:#f3f4f6}.fill-gray-200{fill:#e5e7eb}.fill-gray-300{fill:#d1d5db}.fill-gray-400{fill:#9ca3af}.fill-gray-50{fill:#f9fafb}.fill-gray-500{fill:#6b7280}.fill-gray-600{fill:#4b5563}.fill-gray-700{fill:#374151}.fill-gray-800{fill:#1f2937}.fill-gray-900{fill:#111827}.fill-gray-950{fill:#030712}.fill-green-100{fill:#dcfce7}.fill-green-200{fill:#bbf7d0}.fill-green-300{fill:#86efac}.fill-green-400{fill:#4ade80}.fill-green-50{fill:#f0fdf4}.fill-green-500{fill:#22c55e}.fill-green-600{fill:#16a34a}.fill-green-700{fill:#15803d}.fill-green-800{fill:#166534}.fill-green-900{fill:#14532d}.fill-green-950{fill:#052e16}.fill-indigo-100{fill:#e0e7ff}.fill-indigo-200{fill:#c7d2fe}.fill-indigo-300{fill:#a5b4fc}.fill-indigo-400{fill:#818cf8}.fill-indigo-50{fill:#eef2ff}.fill-indigo-500{fill:#6366f1}.fill-indigo-600{fill:#4f46e5}.fill-indigo-700{fill:#4338ca}.fill-indigo-800{fill:#3730a3}.fill-indigo-900{fill:#312e81}.fill-indigo-950{fill:#1e1b4b}.fill-lime-100{fill:#ecfccb}.fill-lime-200{fill:#d9f99d}.fill-lime-300{fill:#bef264}.fill-lime-400{fill:#a3e635}.fill-lime-50{fill:#f7fee7}.fill-lime-500{fill:#84cc16}.fill-lime-600{fill:#65a30d}.fill-lime-700{fill:#4d7c0f}.fill-lime-800{fill:#3f6212}.fill-lime-900{fill:#365314}.fill-lime-950{fill:#1a2e05}.fill-neutral-100{fill:#f5f5f5}.fill-neutral-200{fill:#e5e5e5}.fill-neutral-300{fill:#d4d4d4}.fill-neutral-400{fill:#a3a3a3}.fill-neutral-50{fill:#fafafa}.fill-neutral-500{fill:#737373}.fill-neutral-600{fill:#525252}.fill-neutral-700{fill:#404040}.fill-neutral-800{fill:#262626}.fill-neutral-900{fill:#171717}.fill-neutral-950{fill:#0a0a0a}.fill-orange-100{fill:#ffedd5}.fill-orange-200{fill:#fed7aa}.fill-orange-300{fill:#fdba74}.fill-orange-400{fill:#fb923c}.fill-orange-50{fill:#fff7ed}.fill-orange-500{fill:#f97316}.fill-orange-600{fill:#ea580c}.fill-orange-700{fill:#c2410c}.fill-orange-800{fill:#9a3412}.fill-orange-900{fill:#7c2d12}.fill-orange-950{fill:#431407}.fill-pink-100{fill:#fce7f3}.fill-pink-200{fill:#fbcfe8}.fill-pink-300{fill:#f9a8d4}.fill-pink-400{fill:#f472b6}.fill-pink-50{fill:#fdf2f8}.fill-pink-500{fill:#ec4899}.fill-pink-600{fill:#db2777}.fill-pink-700{fill:#be185d}.fill-pink-800{fill:#9d174d}.fill-pink-900{fill:#831843}.fill-pink-950{fill:#500724}.fill-purple-100{fill:#f3e8ff}.fill-purple-200{fill:#e9d5ff}.fill-purple-300{fill:#d8b4fe}.fill-purple-400{fill:#c084fc}.fill-purple-50{fill:#faf5ff}.fill-purple-500{fill:#a855f7}.fill-purple-600{fill:#9333ea}.fill-purple-700{fill:#7e22ce}.fill-purple-800{fill:#6b21a8}.fill-purple-900{fill:#581c87}.fill-purple-950{fill:#3b0764}.fill-red-100{fill:#fee2e2}.fill-red-200{fill:#fecaca}.fill-red-300{fill:#fca5a5}.fill-red-400{fill:#f87171}.fill-red-50{fill:#fef2f2}.fill-red-500{fill:#ef4444}.fill-red-600{fill:#dc2626}.fill-red-700{fill:#b91c1c}.fill-red-800{fill:#991b1b}.fill-red-900{fill:#7f1d1d}.fill-red-950{fill:#450a0a}.fill-rose-100{fill:#ffe4e6}.fill-rose-200{fill:#fecdd3}.fill-rose-300{fill:#fda4af}.fill-rose-400{fill:#fb7185}.fill-rose-50{fill:#fff1f2}.fill-rose-500{fill:#f43f5e}.fill-rose-600{fill:#e11d48}.fill-rose-700{fill:#be123c}.fill-rose-800{fill:#9f1239}.fill-rose-900{fill:#881337}.fill-rose-950{fill:#4c0519}.fill-sky-100{fill:#e0f2fe}.fill-sky-200{fill:#bae6fd}.fill-sky-300{fill:#7dd3fc}.fill-sky-400{fill:#38bdf8}.fill-sky-50{fill:#f0f9ff}.fill-sky-500{fill:#0ea5e9}.fill-sky-600{fill:#0284c7}.fill-sky-700{fill:#0369a1}.fill-sky-800{fill:#075985}.fill-sky-900{fill:#0c4a6e}.fill-sky-950{fill:#082f49}.fill-slate-100{fill:#f1f5f9}.fill-slate-200{fill:#e2e8f0}.fill-slate-300{fill:#cbd5e1}.fill-slate-400{fill:#94a3b8}.fill-slate-50{fill:#f8fafc}.fill-slate-500{fill:#64748b}.fill-slate-600{fill:#475569}.fill-slate-700{fill:#334155}.fill-slate-800{fill:#1e293b}.fill-slate-900{fill:#0f172a}.fill-slate-950{fill:#020617}.fill-stone-100{fill:#f5f5f4}.fill-stone-200{fill:#e7e5e4}.fill-stone-300{fill:#d6d3d1}.fill-stone-400{fill:#a8a29e}.fill-stone-50{fill:#fafaf9}.fill-stone-500{fill:#78716c}.fill-stone-600{fill:#57534e}.fill-stone-700{fill:#44403c}.fill-stone-800{fill:#292524}.fill-stone-900{fill:#1c1917}.fill-stone-950{fill:#0c0a09}.fill-teal-100{fill:#ccfbf1}.fill-teal-200{fill:#99f6e4}.fill-teal-300{fill:#5eead4}.fill-teal-400{fill:#2dd4bf}.fill-teal-50{fill:#f0fdfa}.fill-teal-500{fill:#14b8a6}.fill-teal-600{fill:#0d9488}.fill-teal-700{fill:#0f766e}.fill-teal-800{fill:#115e59}.fill-teal-900{fill:#134e4a}.fill-teal-950{fill:#042f2e}.fill-tremor-content{fill:#6b7280}.fill-tremor-content-emphasis{fill:#374151}.fill-violet-100{fill:#ede9fe}.fill-violet-200{fill:#ddd6fe}.fill-violet-300{fill:#c4b5fd}.fill-violet-400{fill:#a78bfa}.fill-violet-50{fill:#f5f3ff}.fill-violet-500{fill:#8b5cf6}.fill-violet-600{fill:#7c3aed}.fill-violet-700{fill:#6d28d9}.fill-violet-800{fill:#5b21b6}.fill-violet-900{fill:#4c1d95}.fill-violet-950{fill:#2e1065}.fill-yellow-100{fill:#fef9c3}.fill-yellow-200{fill:#fef08a}.fill-yellow-300{fill:#fde047}.fill-yellow-400{fill:#facc15}.fill-yellow-50{fill:#fefce8}.fill-yellow-500{fill:#eab308}.fill-yellow-600{fill:#ca8a04}.fill-yellow-700{fill:#a16207}.fill-yellow-800{fill:#854d0e}.fill-yellow-900{fill:#713f12}.fill-yellow-950{fill:#422006}.fill-zinc-100{fill:#f4f4f5}.fill-zinc-200{fill:#e4e4e7}.fill-zinc-300{fill:#d4d4d8}.fill-zinc-400{fill:#a1a1aa}.fill-zinc-50{fill:#fafafa}.fill-zinc-500{fill:#71717a}.fill-zinc-600{fill:#52525b}.fill-zinc-700{fill:#3f3f46}.fill-zinc-800{fill:#27272a}.fill-zinc-900{fill:#18181b}.fill-zinc-950{fill:#09090b}.stroke-amber-100{stroke:#fef3c7}.stroke-amber-200{stroke:#fde68a}.stroke-amber-300{stroke:#fcd34d}.stroke-amber-400{stroke:#fbbf24}.stroke-amber-50{stroke:#fffbeb}.stroke-amber-500{stroke:#f59e0b}.stroke-amber-600{stroke:#d97706}.stroke-amber-700{stroke:#b45309}.stroke-amber-800{stroke:#92400e}.stroke-amber-900{stroke:#78350f}.stroke-amber-950{stroke:#451a03}.stroke-blue-100{stroke:#dbeafe}.stroke-blue-200{stroke:#bfdbfe}.stroke-blue-300{stroke:#93c5fd}.stroke-blue-400{stroke:#60a5fa}.stroke-blue-50{stroke:#eff6ff}.stroke-blue-500{stroke:#3b82f6}.stroke-blue-600{stroke:#2563eb}.stroke-blue-700{stroke:#1d4ed8}.stroke-blue-800{stroke:#1e40af}.stroke-blue-900{stroke:#1e3a8a}.stroke-blue-950{stroke:#172554}.stroke-cyan-100{stroke:#cffafe}.stroke-cyan-200{stroke:#a5f3fc}.stroke-cyan-300{stroke:#67e8f9}.stroke-cyan-400{stroke:#22d3ee}.stroke-cyan-50{stroke:#ecfeff}.stroke-cyan-500{stroke:#06b6d4}.stroke-cyan-600{stroke:#0891b2}.stroke-cyan-700{stroke:#0e7490}.stroke-cyan-800{stroke:#155e75}.stroke-cyan-900{stroke:#164e63}.stroke-cyan-950{stroke:#083344}.stroke-dark-tremor-background{stroke:#111827}.stroke-dark-tremor-border{stroke:#374151}.stroke-emerald-100{stroke:#d1fae5}.stroke-emerald-200{stroke:#a7f3d0}.stroke-emerald-300{stroke:#6ee7b7}.stroke-emerald-400{stroke:#34d399}.stroke-emerald-50{stroke:#ecfdf5}.stroke-emerald-500{stroke:#10b981}.stroke-emerald-600{stroke:#059669}.stroke-emerald-700{stroke:#047857}.stroke-emerald-800{stroke:#065f46}.stroke-emerald-900{stroke:#064e3b}.stroke-emerald-950{stroke:#022c22}.stroke-fuchsia-100{stroke:#fae8ff}.stroke-fuchsia-200{stroke:#f5d0fe}.stroke-fuchsia-300{stroke:#f0abfc}.stroke-fuchsia-400{stroke:#e879f9}.stroke-fuchsia-50{stroke:#fdf4ff}.stroke-fuchsia-500{stroke:#d946ef}.stroke-fuchsia-600{stroke:#c026d3}.stroke-fuchsia-700{stroke:#a21caf}.stroke-fuchsia-800{stroke:#86198f}.stroke-fuchsia-900{stroke:#701a75}.stroke-fuchsia-950{stroke:#4a044e}.stroke-gray-100{stroke:#f3f4f6}.stroke-gray-200{stroke:#e5e7eb}.stroke-gray-300{stroke:#d1d5db}.stroke-gray-400{stroke:#9ca3af}.stroke-gray-50{stroke:#f9fafb}.stroke-gray-500{stroke:#6b7280}.stroke-gray-600{stroke:#4b5563}.stroke-gray-700{stroke:#374151}.stroke-gray-800{stroke:#1f2937}.stroke-gray-900{stroke:#111827}.stroke-gray-950{stroke:#030712}.stroke-green-100{stroke:#dcfce7}.stroke-green-200{stroke:#bbf7d0}.stroke-green-300{stroke:#86efac}.stroke-green-400{stroke:#4ade80}.stroke-green-50{stroke:#f0fdf4}.stroke-green-500{stroke:#22c55e}.stroke-green-600{stroke:#16a34a}.stroke-green-700{stroke:#15803d}.stroke-green-800{stroke:#166534}.stroke-green-900{stroke:#14532d}.stroke-green-950{stroke:#052e16}.stroke-indigo-100{stroke:#e0e7ff}.stroke-indigo-200{stroke:#c7d2fe}.stroke-indigo-300{stroke:#a5b4fc}.stroke-indigo-400{stroke:#818cf8}.stroke-indigo-50{stroke:#eef2ff}.stroke-indigo-500{stroke:#6366f1}.stroke-indigo-600{stroke:#4f46e5}.stroke-indigo-700{stroke:#4338ca}.stroke-indigo-800{stroke:#3730a3}.stroke-indigo-900{stroke:#312e81}.stroke-indigo-950{stroke:#1e1b4b}.stroke-lime-100{stroke:#ecfccb}.stroke-lime-200{stroke:#d9f99d}.stroke-lime-300{stroke:#bef264}.stroke-lime-400{stroke:#a3e635}.stroke-lime-50{stroke:#f7fee7}.stroke-lime-500{stroke:#84cc16}.stroke-lime-600{stroke:#65a30d}.stroke-lime-700{stroke:#4d7c0f}.stroke-lime-800{stroke:#3f6212}.stroke-lime-900{stroke:#365314}.stroke-lime-950{stroke:#1a2e05}.stroke-neutral-100{stroke:#f5f5f5}.stroke-neutral-200{stroke:#e5e5e5}.stroke-neutral-300{stroke:#d4d4d4}.stroke-neutral-400{stroke:#a3a3a3}.stroke-neutral-50{stroke:#fafafa}.stroke-neutral-500{stroke:#737373}.stroke-neutral-600{stroke:#525252}.stroke-neutral-700{stroke:#404040}.stroke-neutral-800{stroke:#262626}.stroke-neutral-900{stroke:#171717}.stroke-neutral-950{stroke:#0a0a0a}.stroke-orange-100{stroke:#ffedd5}.stroke-orange-200{stroke:#fed7aa}.stroke-orange-300{stroke:#fdba74}.stroke-orange-400{stroke:#fb923c}.stroke-orange-50{stroke:#fff7ed}.stroke-orange-500{stroke:#f97316}.stroke-orange-600{stroke:#ea580c}.stroke-orange-700{stroke:#c2410c}.stroke-orange-800{stroke:#9a3412}.stroke-orange-900{stroke:#7c2d12}.stroke-orange-950{stroke:#431407}.stroke-pink-100{stroke:#fce7f3}.stroke-pink-200{stroke:#fbcfe8}.stroke-pink-300{stroke:#f9a8d4}.stroke-pink-400{stroke:#f472b6}.stroke-pink-50{stroke:#fdf2f8}.stroke-pink-500{stroke:#ec4899}.stroke-pink-600{stroke:#db2777}.stroke-pink-700{stroke:#be185d}.stroke-pink-800{stroke:#9d174d}.stroke-pink-900{stroke:#831843}.stroke-pink-950{stroke:#500724}.stroke-purple-100{stroke:#f3e8ff}.stroke-purple-200{stroke:#e9d5ff}.stroke-purple-300{stroke:#d8b4fe}.stroke-purple-400{stroke:#c084fc}.stroke-purple-50{stroke:#faf5ff}.stroke-purple-500{stroke:#a855f7}.stroke-purple-600{stroke:#9333ea}.stroke-purple-700{stroke:#7e22ce}.stroke-purple-800{stroke:#6b21a8}.stroke-purple-900{stroke:#581c87}.stroke-purple-950{stroke:#3b0764}.stroke-red-100{stroke:#fee2e2}.stroke-red-200{stroke:#fecaca}.stroke-red-300{stroke:#fca5a5}.stroke-red-400{stroke:#f87171}.stroke-red-50{stroke:#fef2f2}.stroke-red-500{stroke:#ef4444}.stroke-red-600{stroke:#dc2626}.stroke-red-700{stroke:#b91c1c}.stroke-red-800{stroke:#991b1b}.stroke-red-900{stroke:#7f1d1d}.stroke-red-950{stroke:#450a0a}.stroke-rose-100{stroke:#ffe4e6}.stroke-rose-200{stroke:#fecdd3}.stroke-rose-300{stroke:#fda4af}.stroke-rose-400{stroke:#fb7185}.stroke-rose-50{stroke:#fff1f2}.stroke-rose-500{stroke:#f43f5e}.stroke-rose-600{stroke:#e11d48}.stroke-rose-700{stroke:#be123c}.stroke-rose-800{stroke:#9f1239}.stroke-rose-900{stroke:#881337}.stroke-rose-950{stroke:#4c0519}.stroke-sky-100{stroke:#e0f2fe}.stroke-sky-200{stroke:#bae6fd}.stroke-sky-300{stroke:#7dd3fc}.stroke-sky-400{stroke:#38bdf8}.stroke-sky-50{stroke:#f0f9ff}.stroke-sky-500{stroke:#0ea5e9}.stroke-sky-600{stroke:#0284c7}.stroke-sky-700{stroke:#0369a1}.stroke-sky-800{stroke:#075985}.stroke-sky-900{stroke:#0c4a6e}.stroke-sky-950{stroke:#082f49}.stroke-slate-100{stroke:#f1f5f9}.stroke-slate-200{stroke:#e2e8f0}.stroke-slate-300{stroke:#cbd5e1}.stroke-slate-400{stroke:#94a3b8}.stroke-slate-50{stroke:#f8fafc}.stroke-slate-500{stroke:#64748b}.stroke-slate-600{stroke:#475569}.stroke-slate-700{stroke:#334155}.stroke-slate-800{stroke:#1e293b}.stroke-slate-900{stroke:#0f172a}.stroke-slate-950{stroke:#020617}.stroke-stone-100{stroke:#f5f5f4}.stroke-stone-200{stroke:#e7e5e4}.stroke-stone-300{stroke:#d6d3d1}.stroke-stone-400{stroke:#a8a29e}.stroke-stone-50{stroke:#fafaf9}.stroke-stone-500{stroke:#78716c}.stroke-stone-600{stroke:#57534e}.stroke-stone-700{stroke:#44403c}.stroke-stone-800{stroke:#292524}.stroke-stone-900{stroke:#1c1917}.stroke-stone-950{stroke:#0c0a09}.stroke-teal-100{stroke:#ccfbf1}.stroke-teal-200{stroke:#99f6e4}.stroke-teal-300{stroke:#5eead4}.stroke-teal-400{stroke:#2dd4bf}.stroke-teal-50{stroke:#f0fdfa}.stroke-teal-500{stroke:#14b8a6}.stroke-teal-600{stroke:#0d9488}.stroke-teal-700{stroke:#0f766e}.stroke-teal-800{stroke:#115e59}.stroke-teal-900{stroke:#134e4a}.stroke-teal-950{stroke:#042f2e}.stroke-tremor-background{stroke:#fff}.stroke-tremor-border{stroke:#e5e7eb}.stroke-tremor-brand{stroke:#6366f1}.stroke-tremor-brand-muted\/50{stroke:#8688ef80}.stroke-violet-100{stroke:#ede9fe}.stroke-violet-200{stroke:#ddd6fe}.stroke-violet-300{stroke:#c4b5fd}.stroke-violet-400{stroke:#a78bfa}.stroke-violet-50{stroke:#f5f3ff}.stroke-violet-500{stroke:#8b5cf6}.stroke-violet-600{stroke:#7c3aed}.stroke-violet-700{stroke:#6d28d9}.stroke-violet-800{stroke:#5b21b6}.stroke-violet-900{stroke:#4c1d95}.stroke-violet-950{stroke:#2e1065}.stroke-yellow-100{stroke:#fef9c3}.stroke-yellow-200{stroke:#fef08a}.stroke-yellow-300{stroke:#fde047}.stroke-yellow-400{stroke:#facc15}.stroke-yellow-50{stroke:#fefce8}.stroke-yellow-500{stroke:#eab308}.stroke-yellow-600{stroke:#ca8a04}.stroke-yellow-700{stroke:#a16207}.stroke-yellow-800{stroke:#854d0e}.stroke-yellow-900{stroke:#713f12}.stroke-yellow-950{stroke:#422006}.stroke-zinc-100{stroke:#f4f4f5}.stroke-zinc-200{stroke:#e4e4e7}.stroke-zinc-300{stroke:#d4d4d8}.stroke-zinc-400{stroke:#a1a1aa}.stroke-zinc-50{stroke:#fafafa}.stroke-zinc-500{stroke:#71717a}.stroke-zinc-600{stroke:#52525b}.stroke-zinc-700{stroke:#3f3f46}.stroke-zinc-800{stroke:#27272a}.stroke-zinc-900{stroke:#18181b}.stroke-zinc-950{stroke:#09090b}.stroke-1{stroke-width:1px}.stroke-\[2\.5\]{stroke-width:2.5px}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.\!p-3{padding:.75rem!important}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[10px\]{padding-top:10px;padding-bottom:10px}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-0{padding-left:0}.pl-10{padding-left:2.5rem}.pl-11{padding-left:2.75rem}.pl-12{padding-left:3rem}.pl-14{padding-left:3.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-7{padding-left:1.75rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-0{padding-right:0}.pr-1{padding-right:.25rem}.pr-1\.5{padding-right:.375rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-14{padding-right:3.5rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.\!text-tremor-label{font-size:.75rem!important;line-height:.3rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-tremor-default{font-size:.775rem;line-height:1.15rem}.text-tremor-label{font-size:.75rem;line-height:.3rem}.text-tremor-metric{font-size:1.675rem;line-height:2.15rem}.text-tremor-title{font-size:1.025rem;line-height:1.65rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.\!text-tremor-content-subtle{--tw-text-opacity:1!important;color:rgb(156 163 175/var(--tw-text-opacity,1))!important}.\!text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.text-\[\#6366f1\]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-\[\#d1d5db\]\/15{color:#d1d5db26}.text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-amber-50{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-amber-900{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}.text-amber-950{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-blue-100{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.text-blue-200{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.text-blue-300{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-blue-50{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.text-blue-950{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}.text-current{color:currentColor}.text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.text-cyan-500{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.text-dark-tremor-brand{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-dark-tremor-brand-emphasis{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.text-dark-tremor-brand-inverted{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.text-dark-tremor-content{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-dark-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-dark-tremor-content-subtle{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-emerald-900{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}.text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.text-fuchsia-200{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}.text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.text-fuchsia-50{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}.text-fuchsia-500{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}.text-fuchsia-600{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}.text-fuchsia-700{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.text-fuchsia-800{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}.text-fuchsia-900{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}.text-fuchsia-950{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-gray-950{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.text-green-100{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.text-green-200{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.text-green-300{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-50{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.text-green-950{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}.text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.text-indigo-400{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.text-indigo-50{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}.text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.text-indigo-900{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}.text-indigo-950{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.text-inherit{color:inherit}.text-lime-100{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}.text-lime-200{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}.text-lime-300{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}.text-lime-400{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.text-lime-50{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}.text-lime-500{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}.text-lime-600{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}.text-lime-700{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}.text-lime-800{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}.text-lime-900{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.text-lime-950{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}.text-neutral-100{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}.text-neutral-200{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.text-neutral-300{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.text-orange-100{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}.text-orange-200{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}.text-orange-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.text-orange-50{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}.text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.text-orange-900{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}.text-orange-950{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}.text-pink-100{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}.text-pink-200{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}.text-pink-300{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}.text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.text-pink-50{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}.text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.text-pink-800{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.text-pink-900{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}.text-pink-950{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}.text-purple-100{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}.text-purple-200{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}.text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.text-purple-50{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}.text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.text-purple-900{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}.text-purple-950{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}.text-red-100{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-50{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.text-red-950{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}.text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.text-rose-50{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}.text-rose-500{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}.text-rose-700{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.text-rose-800{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}.text-rose-900{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}.text-rose-950{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}.text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.text-sky-50{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}.text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-sky-800{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}.text-sky-900{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}.text-sky-950{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.text-stone-500{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}.text-stone-600{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}.text-stone-700{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.text-stone-950{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}.text-teal-100{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}.text-teal-200{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}.text-teal-300{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}.text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.text-teal-50{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}.text-teal-500{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}.text-teal-600{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}.text-teal-700{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}.text-teal-800{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}.text-teal-900{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.text-teal-950{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}.text-transparent{color:#0000}.text-tremor-brand{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-tremor-brand-emphasis{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-tremor-brand-inverted{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-tremor-content{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-tremor-content-strong{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-tremor-content-subtle{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.text-violet-50{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}.text-violet-500{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}.text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.text-violet-900{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}.text-violet-950{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-100{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.text-yellow-200{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}.text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.text-yellow-50{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.text-yellow-950{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}.text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.placeholder-gray-400::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}.accent-dark-tremor-brand,.accent-tremor-brand{accent-color:#6366f1}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px #00000040;--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[-4px_0_4px_-4px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:-4px 0 4px -4px #0000001a;--tw-shadow-colored:-4px 0 4px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[-4px_0_8px_-6px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:-4px 0 8px -6px #0000001a;--tw-shadow-colored:-4px 0 8px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-dark-tremor-card{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-dark-tremor-input{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-tremor-card{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-tremor-dropdown{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-tremor-input{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-indigo-500\/20{--tw-shadow-color:#6366f133;--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline-offset:2px;outline:2px solid #0000}.outline{outline-style:solid}.outline-tremor-brand{outline-color:#6366f1}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-amber-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 243 199/var(--tw-ring-opacity,1))}.ring-amber-200{--tw-ring-opacity:1;--tw-ring-color:rgb(253 230 138/var(--tw-ring-opacity,1))}.ring-amber-300{--tw-ring-opacity:1;--tw-ring-color:rgb(252 211 77/var(--tw-ring-opacity,1))}.ring-amber-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 191 36/var(--tw-ring-opacity,1))}.ring-amber-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 251 235/var(--tw-ring-opacity,1))}.ring-amber-500{--tw-ring-opacity:1;--tw-ring-color:rgb(245 158 11/var(--tw-ring-opacity,1))}.ring-amber-600{--tw-ring-opacity:1;--tw-ring-color:rgb(217 119 6/var(--tw-ring-opacity,1))}.ring-amber-700{--tw-ring-opacity:1;--tw-ring-color:rgb(180 83 9/var(--tw-ring-opacity,1))}.ring-amber-800{--tw-ring-opacity:1;--tw-ring-color:rgb(146 64 14/var(--tw-ring-opacity,1))}.ring-amber-900{--tw-ring-opacity:1;--tw-ring-color:rgb(120 53 15/var(--tw-ring-opacity,1))}.ring-amber-950{--tw-ring-opacity:1;--tw-ring-color:rgb(69 26 3/var(--tw-ring-opacity,1))}.ring-blue-100{--tw-ring-opacity:1;--tw-ring-color:rgb(219 234 254/var(--tw-ring-opacity,1))}.ring-blue-200{--tw-ring-opacity:1;--tw-ring-color:rgb(191 219 254/var(--tw-ring-opacity,1))}.ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}.ring-blue-400{--tw-ring-opacity:1;--tw-ring-color:rgb(96 165 250/var(--tw-ring-opacity,1))}.ring-blue-50{--tw-ring-opacity:1;--tw-ring-color:rgb(239 246 255/var(--tw-ring-opacity,1))}.ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.ring-blue-600{--tw-ring-opacity:1;--tw-ring-color:rgb(37 99 235/var(--tw-ring-opacity,1))}.ring-blue-700{--tw-ring-opacity:1;--tw-ring-color:rgb(29 78 216/var(--tw-ring-opacity,1))}.ring-blue-800{--tw-ring-opacity:1;--tw-ring-color:rgb(30 64 175/var(--tw-ring-opacity,1))}.ring-blue-900{--tw-ring-opacity:1;--tw-ring-color:rgb(30 58 138/var(--tw-ring-opacity,1))}.ring-blue-950{--tw-ring-opacity:1;--tw-ring-color:rgb(23 37 84/var(--tw-ring-opacity,1))}.ring-cyan-100{--tw-ring-opacity:1;--tw-ring-color:rgb(207 250 254/var(--tw-ring-opacity,1))}.ring-cyan-200{--tw-ring-opacity:1;--tw-ring-color:rgb(165 243 252/var(--tw-ring-opacity,1))}.ring-cyan-300{--tw-ring-opacity:1;--tw-ring-color:rgb(103 232 249/var(--tw-ring-opacity,1))}.ring-cyan-400{--tw-ring-opacity:1;--tw-ring-color:rgb(34 211 238/var(--tw-ring-opacity,1))}.ring-cyan-50{--tw-ring-opacity:1;--tw-ring-color:rgb(236 254 255/var(--tw-ring-opacity,1))}.ring-cyan-500{--tw-ring-opacity:1;--tw-ring-color:rgb(6 182 212/var(--tw-ring-opacity,1))}.ring-cyan-600{--tw-ring-opacity:1;--tw-ring-color:rgb(8 145 178/var(--tw-ring-opacity,1))}.ring-cyan-700{--tw-ring-opacity:1;--tw-ring-color:rgb(14 116 144/var(--tw-ring-opacity,1))}.ring-cyan-800{--tw-ring-opacity:1;--tw-ring-color:rgb(21 94 117/var(--tw-ring-opacity,1))}.ring-cyan-900{--tw-ring-opacity:1;--tw-ring-color:rgb(22 78 99/var(--tw-ring-opacity,1))}.ring-cyan-950{--tw-ring-opacity:1;--tw-ring-color:rgb(8 51 68/var(--tw-ring-opacity,1))}.ring-dark-tremor-ring{--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity,1))}.ring-emerald-100{--tw-ring-opacity:1;--tw-ring-color:rgb(209 250 229/var(--tw-ring-opacity,1))}.ring-emerald-200{--tw-ring-opacity:1;--tw-ring-color:rgb(167 243 208/var(--tw-ring-opacity,1))}.ring-emerald-300{--tw-ring-opacity:1;--tw-ring-color:rgb(110 231 183/var(--tw-ring-opacity,1))}.ring-emerald-400{--tw-ring-opacity:1;--tw-ring-color:rgb(52 211 153/var(--tw-ring-opacity,1))}.ring-emerald-50{--tw-ring-opacity:1;--tw-ring-color:rgb(236 253 245/var(--tw-ring-opacity,1))}.ring-emerald-500{--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity,1))}.ring-emerald-600{--tw-ring-opacity:1;--tw-ring-color:rgb(5 150 105/var(--tw-ring-opacity,1))}.ring-emerald-700{--tw-ring-opacity:1;--tw-ring-color:rgb(4 120 87/var(--tw-ring-opacity,1))}.ring-emerald-800{--tw-ring-opacity:1;--tw-ring-color:rgb(6 95 70/var(--tw-ring-opacity,1))}.ring-emerald-900{--tw-ring-opacity:1;--tw-ring-color:rgb(6 78 59/var(--tw-ring-opacity,1))}.ring-emerald-950{--tw-ring-opacity:1;--tw-ring-color:rgb(2 44 34/var(--tw-ring-opacity,1))}.ring-fuchsia-100{--tw-ring-opacity:1;--tw-ring-color:rgb(250 232 255/var(--tw-ring-opacity,1))}.ring-fuchsia-200{--tw-ring-opacity:1;--tw-ring-color:rgb(245 208 254/var(--tw-ring-opacity,1))}.ring-fuchsia-300{--tw-ring-opacity:1;--tw-ring-color:rgb(240 171 252/var(--tw-ring-opacity,1))}.ring-fuchsia-400{--tw-ring-opacity:1;--tw-ring-color:rgb(232 121 249/var(--tw-ring-opacity,1))}.ring-fuchsia-50{--tw-ring-opacity:1;--tw-ring-color:rgb(253 244 255/var(--tw-ring-opacity,1))}.ring-fuchsia-500{--tw-ring-opacity:1;--tw-ring-color:rgb(217 70 239/var(--tw-ring-opacity,1))}.ring-fuchsia-600{--tw-ring-opacity:1;--tw-ring-color:rgb(192 38 211/var(--tw-ring-opacity,1))}.ring-fuchsia-700{--tw-ring-opacity:1;--tw-ring-color:rgb(162 28 175/var(--tw-ring-opacity,1))}.ring-fuchsia-800{--tw-ring-opacity:1;--tw-ring-color:rgb(134 25 143/var(--tw-ring-opacity,1))}.ring-fuchsia-900{--tw-ring-opacity:1;--tw-ring-color:rgb(112 26 117/var(--tw-ring-opacity,1))}.ring-fuchsia-950{--tw-ring-opacity:1;--tw-ring-color:rgb(74 4 78/var(--tw-ring-opacity,1))}.ring-gray-100{--tw-ring-opacity:1;--tw-ring-color:rgb(243 244 246/var(--tw-ring-opacity,1))}.ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity,1))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity,1))}.ring-gray-400{--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity,1))}.ring-gray-50{--tw-ring-opacity:1;--tw-ring-color:rgb(249 250 251/var(--tw-ring-opacity,1))}.ring-gray-500{--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity,1))}.ring-gray-600{--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity,1))}.ring-gray-700{--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity,1))}.ring-gray-800{--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity,1))}.ring-gray-900{--tw-ring-opacity:1;--tw-ring-color:rgb(17 24 39/var(--tw-ring-opacity,1))}.ring-gray-950{--tw-ring-opacity:1;--tw-ring-color:rgb(3 7 18/var(--tw-ring-opacity,1))}.ring-green-100{--tw-ring-opacity:1;--tw-ring-color:rgb(220 252 231/var(--tw-ring-opacity,1))}.ring-green-200{--tw-ring-opacity:1;--tw-ring-color:rgb(187 247 208/var(--tw-ring-opacity,1))}.ring-green-300{--tw-ring-opacity:1;--tw-ring-color:rgb(134 239 172/var(--tw-ring-opacity,1))}.ring-green-400{--tw-ring-opacity:1;--tw-ring-color:rgb(74 222 128/var(--tw-ring-opacity,1))}.ring-green-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 253 244/var(--tw-ring-opacity,1))}.ring-green-500{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity,1))}.ring-green-600{--tw-ring-opacity:1;--tw-ring-color:rgb(22 163 74/var(--tw-ring-opacity,1))}.ring-green-700{--tw-ring-opacity:1;--tw-ring-color:rgb(21 128 61/var(--tw-ring-opacity,1))}.ring-green-800{--tw-ring-opacity:1;--tw-ring-color:rgb(22 101 52/var(--tw-ring-opacity,1))}.ring-green-900{--tw-ring-opacity:1;--tw-ring-color:rgb(20 83 45/var(--tw-ring-opacity,1))}.ring-green-950{--tw-ring-opacity:1;--tw-ring-color:rgb(5 46 22/var(--tw-ring-opacity,1))}.ring-indigo-100{--tw-ring-opacity:1;--tw-ring-color:rgb(224 231 255/var(--tw-ring-opacity,1))}.ring-indigo-200{--tw-ring-opacity:1;--tw-ring-color:rgb(199 210 254/var(--tw-ring-opacity,1))}.ring-indigo-300{--tw-ring-opacity:1;--tw-ring-color:rgb(165 180 252/var(--tw-ring-opacity,1))}.ring-indigo-400{--tw-ring-opacity:1;--tw-ring-color:rgb(129 140 248/var(--tw-ring-opacity,1))}.ring-indigo-50{--tw-ring-opacity:1;--tw-ring-color:rgb(238 242 255/var(--tw-ring-opacity,1))}.ring-indigo-500{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity,1))}.ring-indigo-600{--tw-ring-opacity:1;--tw-ring-color:rgb(79 70 229/var(--tw-ring-opacity,1))}.ring-indigo-700{--tw-ring-opacity:1;--tw-ring-color:rgb(67 56 202/var(--tw-ring-opacity,1))}.ring-indigo-800{--tw-ring-opacity:1;--tw-ring-color:rgb(55 48 163/var(--tw-ring-opacity,1))}.ring-indigo-900{--tw-ring-opacity:1;--tw-ring-color:rgb(49 46 129/var(--tw-ring-opacity,1))}.ring-indigo-950{--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity,1))}.ring-lime-100{--tw-ring-opacity:1;--tw-ring-color:rgb(236 252 203/var(--tw-ring-opacity,1))}.ring-lime-200{--tw-ring-opacity:1;--tw-ring-color:rgb(217 249 157/var(--tw-ring-opacity,1))}.ring-lime-300{--tw-ring-opacity:1;--tw-ring-color:rgb(190 242 100/var(--tw-ring-opacity,1))}.ring-lime-400{--tw-ring-opacity:1;--tw-ring-color:rgb(163 230 53/var(--tw-ring-opacity,1))}.ring-lime-50{--tw-ring-opacity:1;--tw-ring-color:rgb(247 254 231/var(--tw-ring-opacity,1))}.ring-lime-500{--tw-ring-opacity:1;--tw-ring-color:rgb(132 204 22/var(--tw-ring-opacity,1))}.ring-lime-600{--tw-ring-opacity:1;--tw-ring-color:rgb(101 163 13/var(--tw-ring-opacity,1))}.ring-lime-700{--tw-ring-opacity:1;--tw-ring-color:rgb(77 124 15/var(--tw-ring-opacity,1))}.ring-lime-800{--tw-ring-opacity:1;--tw-ring-color:rgb(63 98 18/var(--tw-ring-opacity,1))}.ring-lime-900{--tw-ring-opacity:1;--tw-ring-color:rgb(54 83 20/var(--tw-ring-opacity,1))}.ring-lime-950{--tw-ring-opacity:1;--tw-ring-color:rgb(26 46 5/var(--tw-ring-opacity,1))}.ring-neutral-100{--tw-ring-opacity:1;--tw-ring-color:rgb(245 245 245/var(--tw-ring-opacity,1))}.ring-neutral-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 229 229/var(--tw-ring-opacity,1))}.ring-neutral-300{--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 212/var(--tw-ring-opacity,1))}.ring-neutral-400{--tw-ring-opacity:1;--tw-ring-color:rgb(163 163 163/var(--tw-ring-opacity,1))}.ring-neutral-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 250/var(--tw-ring-opacity,1))}.ring-neutral-500{--tw-ring-opacity:1;--tw-ring-color:rgb(115 115 115/var(--tw-ring-opacity,1))}.ring-neutral-600{--tw-ring-opacity:1;--tw-ring-color:rgb(82 82 82/var(--tw-ring-opacity,1))}.ring-neutral-700{--tw-ring-opacity:1;--tw-ring-color:rgb(64 64 64/var(--tw-ring-opacity,1))}.ring-neutral-800{--tw-ring-opacity:1;--tw-ring-color:rgb(38 38 38/var(--tw-ring-opacity,1))}.ring-neutral-900{--tw-ring-opacity:1;--tw-ring-color:rgb(23 23 23/var(--tw-ring-opacity,1))}.ring-neutral-950{--tw-ring-opacity:1;--tw-ring-color:rgb(10 10 10/var(--tw-ring-opacity,1))}.ring-orange-100{--tw-ring-opacity:1;--tw-ring-color:rgb(255 237 213/var(--tw-ring-opacity,1))}.ring-orange-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 215 170/var(--tw-ring-opacity,1))}.ring-orange-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 186 116/var(--tw-ring-opacity,1))}.ring-orange-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 146 60/var(--tw-ring-opacity,1))}.ring-orange-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 247 237/var(--tw-ring-opacity,1))}.ring-orange-500{--tw-ring-opacity:1;--tw-ring-color:rgb(249 115 22/var(--tw-ring-opacity,1))}.ring-orange-600{--tw-ring-opacity:1;--tw-ring-color:rgb(234 88 12/var(--tw-ring-opacity,1))}.ring-orange-700{--tw-ring-opacity:1;--tw-ring-color:rgb(194 65 12/var(--tw-ring-opacity,1))}.ring-orange-800{--tw-ring-opacity:1;--tw-ring-color:rgb(154 52 18/var(--tw-ring-opacity,1))}.ring-orange-900{--tw-ring-opacity:1;--tw-ring-color:rgb(124 45 18/var(--tw-ring-opacity,1))}.ring-orange-950{--tw-ring-opacity:1;--tw-ring-color:rgb(67 20 7/var(--tw-ring-opacity,1))}.ring-pink-100{--tw-ring-opacity:1;--tw-ring-color:rgb(252 231 243/var(--tw-ring-opacity,1))}.ring-pink-200{--tw-ring-opacity:1;--tw-ring-color:rgb(251 207 232/var(--tw-ring-opacity,1))}.ring-pink-300{--tw-ring-opacity:1;--tw-ring-color:rgb(249 168 212/var(--tw-ring-opacity,1))}.ring-pink-400{--tw-ring-opacity:1;--tw-ring-color:rgb(244 114 182/var(--tw-ring-opacity,1))}.ring-pink-50{--tw-ring-opacity:1;--tw-ring-color:rgb(253 242 248/var(--tw-ring-opacity,1))}.ring-pink-500{--tw-ring-opacity:1;--tw-ring-color:rgb(236 72 153/var(--tw-ring-opacity,1))}.ring-pink-600{--tw-ring-opacity:1;--tw-ring-color:rgb(219 39 119/var(--tw-ring-opacity,1))}.ring-pink-700{--tw-ring-opacity:1;--tw-ring-color:rgb(190 24 93/var(--tw-ring-opacity,1))}.ring-pink-800{--tw-ring-opacity:1;--tw-ring-color:rgb(157 23 77/var(--tw-ring-opacity,1))}.ring-pink-900{--tw-ring-opacity:1;--tw-ring-color:rgb(131 24 67/var(--tw-ring-opacity,1))}.ring-pink-950{--tw-ring-opacity:1;--tw-ring-color:rgb(80 7 36/var(--tw-ring-opacity,1))}.ring-purple-100{--tw-ring-opacity:1;--tw-ring-color:rgb(243 232 255/var(--tw-ring-opacity,1))}.ring-purple-200{--tw-ring-opacity:1;--tw-ring-color:rgb(233 213 255/var(--tw-ring-opacity,1))}.ring-purple-300{--tw-ring-opacity:1;--tw-ring-color:rgb(216 180 254/var(--tw-ring-opacity,1))}.ring-purple-400{--tw-ring-opacity:1;--tw-ring-color:rgb(192 132 252/var(--tw-ring-opacity,1))}.ring-purple-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 245 255/var(--tw-ring-opacity,1))}.ring-purple-500{--tw-ring-opacity:1;--tw-ring-color:rgb(168 85 247/var(--tw-ring-opacity,1))}.ring-purple-600{--tw-ring-opacity:1;--tw-ring-color:rgb(147 51 234/var(--tw-ring-opacity,1))}.ring-purple-700{--tw-ring-opacity:1;--tw-ring-color:rgb(126 34 206/var(--tw-ring-opacity,1))}.ring-purple-800{--tw-ring-opacity:1;--tw-ring-color:rgb(107 33 168/var(--tw-ring-opacity,1))}.ring-purple-900{--tw-ring-opacity:1;--tw-ring-color:rgb(88 28 135/var(--tw-ring-opacity,1))}.ring-purple-950{--tw-ring-opacity:1;--tw-ring-color:rgb(59 7 100/var(--tw-ring-opacity,1))}.ring-red-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 226 226/var(--tw-ring-opacity,1))}.ring-red-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 202 202/var(--tw-ring-opacity,1))}.ring-red-300{--tw-ring-opacity:1;--tw-ring-color:rgb(252 165 165/var(--tw-ring-opacity,1))}.ring-red-400{--tw-ring-opacity:1;--tw-ring-color:rgb(248 113 113/var(--tw-ring-opacity,1))}.ring-red-50{--tw-ring-opacity:1;--tw-ring-color:rgb(254 242 242/var(--tw-ring-opacity,1))}.ring-red-500{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.ring-red-600{--tw-ring-opacity:1;--tw-ring-color:rgb(220 38 38/var(--tw-ring-opacity,1))}.ring-red-700{--tw-ring-opacity:1;--tw-ring-color:rgb(185 28 28/var(--tw-ring-opacity,1))}.ring-red-800{--tw-ring-opacity:1;--tw-ring-color:rgb(153 27 27/var(--tw-ring-opacity,1))}.ring-red-900{--tw-ring-opacity:1;--tw-ring-color:rgb(127 29 29/var(--tw-ring-opacity,1))}.ring-red-950{--tw-ring-opacity:1;--tw-ring-color:rgb(69 10 10/var(--tw-ring-opacity,1))}.ring-rose-100{--tw-ring-opacity:1;--tw-ring-color:rgb(255 228 230/var(--tw-ring-opacity,1))}.ring-rose-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 205 211/var(--tw-ring-opacity,1))}.ring-rose-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 164 175/var(--tw-ring-opacity,1))}.ring-rose-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 113 133/var(--tw-ring-opacity,1))}.ring-rose-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 241 242/var(--tw-ring-opacity,1))}.ring-rose-500{--tw-ring-opacity:1;--tw-ring-color:rgb(244 63 94/var(--tw-ring-opacity,1))}.ring-rose-600{--tw-ring-opacity:1;--tw-ring-color:rgb(225 29 72/var(--tw-ring-opacity,1))}.ring-rose-700{--tw-ring-opacity:1;--tw-ring-color:rgb(190 18 60/var(--tw-ring-opacity,1))}.ring-rose-800{--tw-ring-opacity:1;--tw-ring-color:rgb(159 18 57/var(--tw-ring-opacity,1))}.ring-rose-900{--tw-ring-opacity:1;--tw-ring-color:rgb(136 19 55/var(--tw-ring-opacity,1))}.ring-rose-950{--tw-ring-opacity:1;--tw-ring-color:rgb(76 5 25/var(--tw-ring-opacity,1))}.ring-sky-100{--tw-ring-opacity:1;--tw-ring-color:rgb(224 242 254/var(--tw-ring-opacity,1))}.ring-sky-200{--tw-ring-opacity:1;--tw-ring-color:rgb(186 230 253/var(--tw-ring-opacity,1))}.ring-sky-300{--tw-ring-opacity:1;--tw-ring-color:rgb(125 211 252/var(--tw-ring-opacity,1))}.ring-sky-400{--tw-ring-opacity:1;--tw-ring-color:rgb(56 189 248/var(--tw-ring-opacity,1))}.ring-sky-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 249 255/var(--tw-ring-opacity,1))}.ring-sky-500{--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity,1))}.ring-sky-600{--tw-ring-opacity:1;--tw-ring-color:rgb(2 132 199/var(--tw-ring-opacity,1))}.ring-sky-700{--tw-ring-opacity:1;--tw-ring-color:rgb(3 105 161/var(--tw-ring-opacity,1))}.ring-sky-800{--tw-ring-opacity:1;--tw-ring-color:rgb(7 89 133/var(--tw-ring-opacity,1))}.ring-sky-900{--tw-ring-opacity:1;--tw-ring-color:rgb(12 74 110/var(--tw-ring-opacity,1))}.ring-sky-950{--tw-ring-opacity:1;--tw-ring-color:rgb(8 47 73/var(--tw-ring-opacity,1))}.ring-slate-100{--tw-ring-opacity:1;--tw-ring-color:rgb(241 245 249/var(--tw-ring-opacity,1))}.ring-slate-200{--tw-ring-opacity:1;--tw-ring-color:rgb(226 232 240/var(--tw-ring-opacity,1))}.ring-slate-300{--tw-ring-opacity:1;--tw-ring-color:rgb(203 213 225/var(--tw-ring-opacity,1))}.ring-slate-400{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.ring-slate-50{--tw-ring-opacity:1;--tw-ring-color:rgb(248 250 252/var(--tw-ring-opacity,1))}.ring-slate-500{--tw-ring-opacity:1;--tw-ring-color:rgb(100 116 139/var(--tw-ring-opacity,1))}.ring-slate-600{--tw-ring-opacity:1;--tw-ring-color:rgb(71 85 105/var(--tw-ring-opacity,1))}.ring-slate-700{--tw-ring-opacity:1;--tw-ring-color:rgb(51 65 85/var(--tw-ring-opacity,1))}.ring-slate-800{--tw-ring-opacity:1;--tw-ring-color:rgb(30 41 59/var(--tw-ring-opacity,1))}.ring-slate-900{--tw-ring-opacity:1;--tw-ring-color:rgb(15 23 42/var(--tw-ring-opacity,1))}.ring-slate-950{--tw-ring-opacity:1;--tw-ring-color:rgb(2 6 23/var(--tw-ring-opacity,1))}.ring-stone-100{--tw-ring-opacity:1;--tw-ring-color:rgb(245 245 244/var(--tw-ring-opacity,1))}.ring-stone-200{--tw-ring-opacity:1;--tw-ring-color:rgb(231 229 228/var(--tw-ring-opacity,1))}.ring-stone-300{--tw-ring-opacity:1;--tw-ring-color:rgb(214 211 209/var(--tw-ring-opacity,1))}.ring-stone-400{--tw-ring-opacity:1;--tw-ring-color:rgb(168 162 158/var(--tw-ring-opacity,1))}.ring-stone-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 249/var(--tw-ring-opacity,1))}.ring-stone-500{--tw-ring-opacity:1;--tw-ring-color:rgb(120 113 108/var(--tw-ring-opacity,1))}.ring-stone-600{--tw-ring-opacity:1;--tw-ring-color:rgb(87 83 78/var(--tw-ring-opacity,1))}.ring-stone-700{--tw-ring-opacity:1;--tw-ring-color:rgb(68 64 60/var(--tw-ring-opacity,1))}.ring-stone-800{--tw-ring-opacity:1;--tw-ring-color:rgb(41 37 36/var(--tw-ring-opacity,1))}.ring-stone-900{--tw-ring-opacity:1;--tw-ring-color:rgb(28 25 23/var(--tw-ring-opacity,1))}.ring-stone-950{--tw-ring-opacity:1;--tw-ring-color:rgb(12 10 9/var(--tw-ring-opacity,1))}.ring-teal-100{--tw-ring-opacity:1;--tw-ring-color:rgb(204 251 241/var(--tw-ring-opacity,1))}.ring-teal-200{--tw-ring-opacity:1;--tw-ring-color:rgb(153 246 228/var(--tw-ring-opacity,1))}.ring-teal-300{--tw-ring-opacity:1;--tw-ring-color:rgb(94 234 212/var(--tw-ring-opacity,1))}.ring-teal-400{--tw-ring-opacity:1;--tw-ring-color:rgb(45 212 191/var(--tw-ring-opacity,1))}.ring-teal-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 253 250/var(--tw-ring-opacity,1))}.ring-teal-500{--tw-ring-opacity:1;--tw-ring-color:rgb(20 184 166/var(--tw-ring-opacity,1))}.ring-teal-600{--tw-ring-opacity:1;--tw-ring-color:rgb(13 148 136/var(--tw-ring-opacity,1))}.ring-teal-700{--tw-ring-opacity:1;--tw-ring-color:rgb(15 118 110/var(--tw-ring-opacity,1))}.ring-teal-800{--tw-ring-opacity:1;--tw-ring-color:rgb(17 94 89/var(--tw-ring-opacity,1))}.ring-teal-900{--tw-ring-opacity:1;--tw-ring-color:rgb(19 78 74/var(--tw-ring-opacity,1))}.ring-teal-950{--tw-ring-opacity:1;--tw-ring-color:rgb(4 47 46/var(--tw-ring-opacity,1))}.ring-tremor-brand-inverted{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.ring-tremor-brand-muted{--tw-ring-opacity:1;--tw-ring-color:rgb(134 136 239/var(--tw-ring-opacity,1))}.ring-tremor-brand\/20{--tw-ring-color:#6366f133}.ring-tremor-ring{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity,1))}.ring-violet-100{--tw-ring-opacity:1;--tw-ring-color:rgb(237 233 254/var(--tw-ring-opacity,1))}.ring-violet-200{--tw-ring-opacity:1;--tw-ring-color:rgb(221 214 254/var(--tw-ring-opacity,1))}.ring-violet-300{--tw-ring-opacity:1;--tw-ring-color:rgb(196 181 253/var(--tw-ring-opacity,1))}.ring-violet-400{--tw-ring-opacity:1;--tw-ring-color:rgb(167 139 250/var(--tw-ring-opacity,1))}.ring-violet-50{--tw-ring-opacity:1;--tw-ring-color:rgb(245 243 255/var(--tw-ring-opacity,1))}.ring-violet-500{--tw-ring-opacity:1;--tw-ring-color:rgb(139 92 246/var(--tw-ring-opacity,1))}.ring-violet-600{--tw-ring-opacity:1;--tw-ring-color:rgb(124 58 237/var(--tw-ring-opacity,1))}.ring-violet-700{--tw-ring-opacity:1;--tw-ring-color:rgb(109 40 217/var(--tw-ring-opacity,1))}.ring-violet-800{--tw-ring-opacity:1;--tw-ring-color:rgb(91 33 182/var(--tw-ring-opacity,1))}.ring-violet-900{--tw-ring-opacity:1;--tw-ring-color:rgb(76 29 149/var(--tw-ring-opacity,1))}.ring-violet-950{--tw-ring-opacity:1;--tw-ring-color:rgb(46 16 101/var(--tw-ring-opacity,1))}.ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.ring-yellow-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 249 195/var(--tw-ring-opacity,1))}.ring-yellow-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 240 138/var(--tw-ring-opacity,1))}.ring-yellow-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 224 71/var(--tw-ring-opacity,1))}.ring-yellow-400{--tw-ring-opacity:1;--tw-ring-color:rgb(250 204 21/var(--tw-ring-opacity,1))}.ring-yellow-50{--tw-ring-opacity:1;--tw-ring-color:rgb(254 252 232/var(--tw-ring-opacity,1))}.ring-yellow-500{--tw-ring-opacity:1;--tw-ring-color:rgb(234 179 8/var(--tw-ring-opacity,1))}.ring-yellow-600{--tw-ring-opacity:1;--tw-ring-color:rgb(202 138 4/var(--tw-ring-opacity,1))}.ring-yellow-700{--tw-ring-opacity:1;--tw-ring-color:rgb(161 98 7/var(--tw-ring-opacity,1))}.ring-yellow-800{--tw-ring-opacity:1;--tw-ring-color:rgb(133 77 14/var(--tw-ring-opacity,1))}.ring-yellow-900{--tw-ring-opacity:1;--tw-ring-color:rgb(113 63 18/var(--tw-ring-opacity,1))}.ring-yellow-950{--tw-ring-opacity:1;--tw-ring-color:rgb(66 32 6/var(--tw-ring-opacity,1))}.ring-zinc-100{--tw-ring-opacity:1;--tw-ring-color:rgb(244 244 245/var(--tw-ring-opacity,1))}.ring-zinc-200{--tw-ring-opacity:1;--tw-ring-color:rgb(228 228 231/var(--tw-ring-opacity,1))}.ring-zinc-300{--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.ring-zinc-400{--tw-ring-opacity:1;--tw-ring-color:rgb(161 161 170/var(--tw-ring-opacity,1))}.ring-zinc-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 250/var(--tw-ring-opacity,1))}.ring-zinc-500{--tw-ring-opacity:1;--tw-ring-color:rgb(113 113 122/var(--tw-ring-opacity,1))}.ring-zinc-600{--tw-ring-opacity:1;--tw-ring-color:rgb(82 82 91/var(--tw-ring-opacity,1))}.ring-zinc-700{--tw-ring-opacity:1;--tw-ring-color:rgb(63 63 70/var(--tw-ring-opacity,1))}.ring-zinc-800{--tw-ring-opacity:1;--tw-ring-color:rgb(39 39 42/var(--tw-ring-opacity,1))}.ring-zinc-900{--tw-ring-opacity:1;--tw-ring-color:rgb(24 24 27/var(--tw-ring-opacity,1))}.ring-zinc-950{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.ring-opacity-20{--tw-ring-opacity:.2}.ring-opacity-40{--tw-ring-opacity:.4}.blur{--tw-blur:blur(8px);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px #00000012)drop-shadow(0 2px 2px #0000000f);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.filter{filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-property:box-shadow;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[--anchor-gap\:4px\]{--anchor-gap:4px}.\[appearance\:textfield\]{appearance:textfield}.\[scrollbar-width\:none\]{scrollbar-width:none}:root{--foreground-rgb:0,0,0;--background-start-rgb:255,255,255;--background-end-rgb:255,255,255;--neutral-border:#dcddeb}body{color:rgb(var(--foreground-rgb));background:linear-gradient(to bottom,transparent,rgb(var(--background-end-rgb)))rgb(var(--background-start-rgb))}.table-wrapper{margin:0 24px;overflow-x:scroll}.custom-border{border:1px solid var(--neutral-border)}.placeholder\:text-gray-400::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.placeholder\:text-red-500::placeholder{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.placeholder\:text-tremor-content::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.placeholder\:text-tremor-content-subtle::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.first\:rounded-l-\[4px\]:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.first\:border-l-0:first-child{border-left-width:0}.last\:mb-0:last-child{margin-bottom:0}.last\:rounded-r-\[4px\]:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.last\:border-0:last-child{border-width:0}.last\:border-b-0:last-child{border-bottom-width:0}.focus-within\:relative:focus-within{position:relative}.focus-within\:border-blue-400:focus-within{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.focus-within\:ring-2:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\:ring-blue-500\/20:focus-within{--tw-ring-color:#3b82f633}.hover\:border-b-2:hover{border-bottom-width:2px}.hover\:border-\[\#5558e3\]:hover{--tw-border-opacity:1;border-color:rgb(85 88 227/var(--tw-border-opacity,1))}.hover\:border-amber-100:hover{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}.hover\:border-amber-200:hover{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.hover\:border-amber-300:hover{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.hover\:border-amber-400:hover{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.hover\:border-amber-50:hover{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}.hover\:border-amber-500:hover{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.hover\:border-amber-600:hover{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}.hover\:border-amber-700:hover{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}.hover\:border-amber-800:hover{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}.hover\:border-amber-900:hover{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}.hover\:border-amber-950:hover{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}.hover\:border-blue-100:hover{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.hover\:border-blue-200:hover{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.hover\:border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.hover\:border-blue-50:hover{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}.hover\:border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.hover\:border-blue-600:hover{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.hover\:border-blue-700:hover{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}.hover\:border-blue-800:hover{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.hover\:border-blue-900:hover{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}.hover\:border-blue-950:hover{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}.hover\:border-cyan-100:hover{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.hover\:border-cyan-200:hover{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.hover\:border-cyan-300:hover{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.hover\:border-cyan-400:hover{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.hover\:border-cyan-50:hover{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}.hover\:border-cyan-500:hover{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.hover\:border-cyan-600:hover{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}.hover\:border-cyan-700:hover{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}.hover\:border-cyan-800:hover{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}.hover\:border-cyan-900:hover{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}.hover\:border-cyan-950:hover{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}.hover\:border-emerald-100:hover{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}.hover\:border-emerald-200:hover{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.hover\:border-emerald-300:hover{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.hover\:border-emerald-400:hover{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}.hover\:border-emerald-50:hover{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}.hover\:border-emerald-500:hover{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.hover\:border-emerald-600:hover{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}.hover\:border-emerald-700:hover{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}.hover\:border-emerald-800:hover{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}.hover\:border-emerald-900:hover{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}.hover\:border-emerald-950:hover{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}.hover\:border-fuchsia-100:hover{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}.hover\:border-fuchsia-200:hover{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}.hover\:border-fuchsia-300:hover{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.hover\:border-fuchsia-400:hover{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}.hover\:border-fuchsia-50:hover{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}.hover\:border-fuchsia-500:hover{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}.hover\:border-fuchsia-600:hover{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}.hover\:border-fuchsia-700:hover{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}.hover\:border-fuchsia-800:hover{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}.hover\:border-fuchsia-900:hover{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}.hover\:border-fuchsia-950:hover{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}.hover\:border-gray-100:hover{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.hover\:border-gray-200:hover{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.hover\:border-gray-400:hover{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.hover\:border-gray-50:hover{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}.hover\:border-gray-500:hover{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.hover\:border-gray-600:hover{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.hover\:border-gray-700:hover{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.hover\:border-gray-800:hover{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.hover\:border-gray-900:hover{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.hover\:border-gray-950:hover{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}.hover\:border-green-100:hover{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.hover\:border-green-200:hover{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.hover\:border-green-300:hover{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.hover\:border-green-400:hover{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.hover\:border-green-50:hover{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}.hover\:border-green-500:hover{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.hover\:border-green-600:hover{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}.hover\:border-green-700:hover{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}.hover\:border-green-800:hover{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.hover\:border-green-900:hover{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}.hover\:border-green-950:hover{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}.hover\:border-indigo-100:hover{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}.hover\:border-indigo-200:hover{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}.hover\:border-indigo-300:hover{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.hover\:border-indigo-400:hover{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.hover\:border-indigo-50:hover{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}.hover\:border-indigo-500:hover{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.hover\:border-indigo-600:hover{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}.hover\:border-indigo-700:hover{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.hover\:border-indigo-800:hover{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.hover\:border-indigo-900:hover{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}.hover\:border-indigo-950:hover{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.hover\:border-lime-100:hover{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}.hover\:border-lime-200:hover{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}.hover\:border-lime-300:hover{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.hover\:border-lime-400:hover{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}.hover\:border-lime-50:hover{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}.hover\:border-lime-500:hover{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}.hover\:border-lime-600:hover{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}.hover\:border-lime-700:hover{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}.hover\:border-lime-800:hover{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}.hover\:border-lime-900:hover{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}.hover\:border-lime-950:hover{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}.hover\:border-neutral-100:hover{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.hover\:border-neutral-200:hover{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.hover\:border-neutral-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.hover\:border-neutral-400:hover{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.hover\:border-neutral-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.hover\:border-neutral-500:hover{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}.hover\:border-neutral-600:hover{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}.hover\:border-neutral-700:hover{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.hover\:border-neutral-800:hover{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}.hover\:border-neutral-900:hover{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.hover\:border-neutral-950:hover{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}.hover\:border-orange-100:hover{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.hover\:border-orange-200:hover{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.hover\:border-orange-300:hover{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.hover\:border-orange-400:hover{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}.hover\:border-orange-50:hover{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}.hover\:border-orange-500:hover{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.hover\:border-orange-600:hover{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}.hover\:border-orange-700:hover{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}.hover\:border-orange-800:hover{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}.hover\:border-orange-900:hover{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}.hover\:border-orange-950:hover{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}.hover\:border-pink-100:hover{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}.hover\:border-pink-200:hover{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}.hover\:border-pink-300:hover{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.hover\:border-pink-400:hover{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}.hover\:border-pink-50:hover{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}.hover\:border-pink-500:hover{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}.hover\:border-pink-600:hover{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}.hover\:border-pink-700:hover{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}.hover\:border-pink-800:hover{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}.hover\:border-pink-900:hover{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.hover\:border-pink-950:hover{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}.hover\:border-purple-100:hover{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}.hover\:border-purple-200:hover{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.hover\:border-purple-300:hover{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.hover\:border-purple-400:hover{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}.hover\:border-purple-50:hover{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}.hover\:border-purple-500:hover{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.hover\:border-purple-600:hover{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}.hover\:border-purple-700:hover{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}.hover\:border-purple-800:hover{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}.hover\:border-purple-900:hover{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}.hover\:border-purple-950:hover{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}.hover\:border-red-100:hover{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.hover\:border-red-200:hover{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.hover\:border-red-300:hover{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.hover\:border-red-400:hover{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.hover\:border-red-50:hover{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}.hover\:border-red-500:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.hover\:border-red-600:hover{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.hover\:border-red-700:hover{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.hover\:border-red-800:hover{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.hover\:border-red-900:hover{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}.hover\:border-red-950:hover{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}.hover\:border-rose-100:hover{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}.hover\:border-rose-200:hover{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}.hover\:border-rose-300:hover{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.hover\:border-rose-400:hover{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}.hover\:border-rose-50:hover{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}.hover\:border-rose-500:hover{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.hover\:border-rose-600:hover{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}.hover\:border-rose-700:hover{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}.hover\:border-rose-800:hover{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}.hover\:border-rose-900:hover{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}.hover\:border-rose-950:hover{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}.hover\:border-sky-100:hover{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}.hover\:border-sky-200:hover{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.hover\:border-sky-300:hover{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.hover\:border-sky-400:hover{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.hover\:border-sky-50:hover{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}.hover\:border-sky-500:hover{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}.hover\:border-sky-600:hover{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}.hover\:border-sky-700:hover{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}.hover\:border-sky-800:hover{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}.hover\:border-sky-900:hover{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}.hover\:border-sky-950:hover{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}.hover\:border-slate-100:hover{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.hover\:border-slate-200:hover{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.hover\:border-slate-300:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.hover\:border-slate-400:hover{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}.hover\:border-slate-50:hover{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.hover\:border-slate-500:hover{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.hover\:border-slate-600:hover{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.hover\:border-slate-700:hover{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.hover\:border-slate-800:hover{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.hover\:border-slate-900:hover{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}.hover\:border-slate-950:hover{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}.hover\:border-stone-100:hover{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}.hover\:border-stone-200:hover{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.hover\:border-stone-300:hover{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.hover\:border-stone-400:hover{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.hover\:border-stone-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}.hover\:border-stone-500:hover{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.hover\:border-stone-600:hover{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.hover\:border-stone-700:hover{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}.hover\:border-stone-800:hover{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}.hover\:border-stone-900:hover{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}.hover\:border-stone-950:hover{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}.hover\:border-teal-100:hover{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}.hover\:border-teal-200:hover{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}.hover\:border-teal-300:hover{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.hover\:border-teal-400:hover{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}.hover\:border-teal-50:hover{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}.hover\:border-teal-500:hover{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}.hover\:border-teal-600:hover{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}.hover\:border-teal-700:hover{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}.hover\:border-teal-800:hover{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}.hover\:border-teal-900:hover{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}.hover\:border-teal-950:hover{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}.hover\:border-tremor-brand-emphasis:hover{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.hover\:border-tremor-content:hover{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.hover\:border-violet-100:hover{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}.hover\:border-violet-200:hover{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}.hover\:border-violet-300:hover{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.hover\:border-violet-400:hover{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}.hover\:border-violet-50:hover{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}.hover\:border-violet-500:hover{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}.hover\:border-violet-600:hover{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}.hover\:border-violet-700:hover{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}.hover\:border-violet-800:hover{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}.hover\:border-violet-900:hover{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}.hover\:border-violet-950:hover{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}.hover\:border-yellow-100:hover{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}.hover\:border-yellow-200:hover{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.hover\:border-yellow-300:hover{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.hover\:border-yellow-400:hover{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}.hover\:border-yellow-50:hover{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}.hover\:border-yellow-500:hover{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.hover\:border-yellow-600:hover{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}.hover\:border-yellow-700:hover{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}.hover\:border-yellow-800:hover{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.hover\:border-yellow-900:hover{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}.hover\:border-yellow-950:hover{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}.hover\:border-zinc-100:hover{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.hover\:border-zinc-200:hover{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.hover\:border-zinc-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.hover\:border-zinc-400:hover{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.hover\:border-zinc-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.hover\:border-zinc-500:hover{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.hover\:border-zinc-600:hover{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}.hover\:border-zinc-700:hover{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.hover\:border-zinc-800:hover{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.hover\:border-zinc-900:hover{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.hover\:border-zinc-950:hover{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}.hover\:\!bg-blue-500:hover{--tw-bg-opacity:1!important;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))!important}.hover\:\!bg-blue-700:hover{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))!important}.hover\:bg-\[\#5558e3\]:hover{--tw-bg-opacity:1;background-color:rgb(85 88 227/var(--tw-bg-opacity,1))}.hover\:bg-amber-100:hover{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.hover\:bg-amber-200:hover{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}.hover\:bg-amber-300:hover{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}.hover\:bg-amber-400:hover{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.hover\:bg-amber-50:hover{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.hover\:bg-amber-500:hover{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.hover\:bg-amber-600:hover{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.hover\:bg-amber-700:hover{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.hover\:bg-amber-800:hover{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}.hover\:bg-amber-900:hover{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}.hover\:bg-amber-950:hover{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.hover\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.hover\:bg-blue-300:hover{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}.hover\:bg-blue-400:hover{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.hover\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.hover\:bg-blue-50\/50:hover{background-color:#eff6ff80}.hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.hover\:bg-blue-600:hover{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-blue-800:hover{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}.hover\:bg-blue-900:hover{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.hover\:bg-blue-950:hover{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.hover\:bg-cyan-100:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.hover\:bg-cyan-200:hover{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}.hover\:bg-cyan-300:hover{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}.hover\:bg-cyan-400:hover{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}.hover\:bg-cyan-50:hover{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.hover\:bg-cyan-500:hover{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.hover\:bg-cyan-600:hover{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.hover\:bg-cyan-700:hover{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}.hover\:bg-cyan-800:hover{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}.hover\:bg-cyan-900:hover{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}.hover\:bg-cyan-950:hover{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}.hover\:bg-emerald-100:hover{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.hover\:bg-emerald-200:hover{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}.hover\:bg-emerald-300:hover{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}.hover\:bg-emerald-400:hover{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.hover\:bg-emerald-50:hover{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.hover\:bg-emerald-500:hover{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.hover\:bg-emerald-600:hover{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.hover\:bg-emerald-700:hover{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.hover\:bg-emerald-800:hover{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}.hover\:bg-emerald-900:hover{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}.hover\:bg-emerald-950:hover{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-100:hover{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-200:hover{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-300:hover{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-400:hover{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-50:hover{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-500:hover{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-600:hover{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-700:hover{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-800:hover{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-900:hover{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-950:hover{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.hover\:bg-gray-400:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.hover\:bg-gray-950:hover{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}.hover\:bg-green-100:hover{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.hover\:bg-green-200:hover{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}.hover\:bg-green-300:hover{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.hover\:bg-green-400:hover{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.hover\:bg-green-50:hover{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.hover\:bg-green-500:hover{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.hover\:bg-green-600:hover{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.hover\:bg-green-800:hover{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}.hover\:bg-green-900:hover{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.hover\:bg-green-950:hover{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.hover\:bg-indigo-100:hover{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.hover\:bg-indigo-200:hover{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}.hover\:bg-indigo-300:hover{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}.hover\:bg-indigo-400:hover{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.hover\:bg-indigo-50:hover{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.hover\:bg-indigo-500:hover{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.hover\:bg-indigo-600:hover{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.hover\:bg-indigo-800:hover{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}.hover\:bg-indigo-900:hover{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}.hover\:bg-indigo-950:hover{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.hover\:bg-lime-100:hover{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.hover\:bg-lime-200:hover{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}.hover\:bg-lime-300:hover{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}.hover\:bg-lime-400:hover{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}.hover\:bg-lime-50:hover{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}.hover\:bg-lime-500:hover{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.hover\:bg-lime-600:hover{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}.hover\:bg-lime-700:hover{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}.hover\:bg-lime-800:hover{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}.hover\:bg-lime-900:hover{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}.hover\:bg-lime-950:hover{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}.hover\:bg-neutral-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.hover\:bg-neutral-200:hover{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.hover\:bg-neutral-300:hover{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.hover\:bg-neutral-400:hover{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.hover\:bg-neutral-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\:bg-neutral-500:hover{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}.hover\:bg-neutral-600:hover{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}.hover\:bg-neutral-700:hover{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.hover\:bg-neutral-800:hover{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.hover\:bg-neutral-900:hover{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.hover\:bg-neutral-950:hover{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}.hover\:bg-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\:bg-orange-200:hover{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}.hover\:bg-orange-300:hover{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}.hover\:bg-orange-400:hover{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.hover\:bg-orange-50:hover{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.hover\:bg-orange-500:hover{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.hover\:bg-orange-600:hover{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}.hover\:bg-orange-700:hover{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}.hover\:bg-orange-800:hover{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}.hover\:bg-orange-900:hover{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}.hover\:bg-orange-950:hover{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}.hover\:bg-pink-100:hover{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.hover\:bg-pink-200:hover{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}.hover\:bg-pink-300:hover{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}.hover\:bg-pink-400:hover{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}.hover\:bg-pink-50:hover{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.hover\:bg-pink-500:hover{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.hover\:bg-pink-600:hover{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}.hover\:bg-pink-700:hover{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}.hover\:bg-pink-800:hover{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}.hover\:bg-pink-900:hover{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}.hover\:bg-pink-950:hover{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}.hover\:bg-purple-100:hover{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.hover\:bg-purple-200:hover{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}.hover\:bg-purple-300:hover{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}.hover\:bg-purple-400:hover{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}.hover\:bg-purple-50:hover{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.hover\:bg-purple-500:hover{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.hover\:bg-purple-600:hover{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}.hover\:bg-purple-700:hover{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.hover\:bg-purple-800:hover{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}.hover\:bg-purple-900:hover{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.hover\:bg-purple-950:hover{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}.hover\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.hover\:bg-red-300:hover{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}.hover\:bg-red-400:hover{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-red-500:hover{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.hover\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.hover\:bg-red-800:hover{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}.hover\:bg-red-900:hover{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.hover\:bg-red-950:hover{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.hover\:bg-rose-100:hover{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.hover\:bg-rose-200:hover{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}.hover\:bg-rose-300:hover{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}.hover\:bg-rose-400:hover{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.hover\:bg-rose-50:hover{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}.hover\:bg-rose-500:hover{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.hover\:bg-rose-600:hover{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.hover\:bg-rose-700:hover{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}.hover\:bg-rose-800:hover{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}.hover\:bg-rose-900:hover{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}.hover\:bg-rose-950:hover{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}.hover\:bg-sky-100:hover{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.hover\:bg-sky-200:hover{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}.hover\:bg-sky-300:hover{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}.hover\:bg-sky-400:hover{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}.hover\:bg-sky-50:hover{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.hover\:bg-sky-500:hover{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.hover\:bg-sky-600:hover{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.hover\:bg-sky-700:hover{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}.hover\:bg-sky-800:hover{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}.hover\:bg-sky-900:hover{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}.hover\:bg-sky-950:hover{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\:bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\:bg-slate-300:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.hover\:bg-slate-400:hover{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.hover\:bg-slate-500:hover{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}.hover\:bg-slate-600:hover{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.hover\:bg-slate-700:hover{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.hover\:bg-slate-900:hover{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.hover\:bg-slate-950:hover{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.hover\:bg-stone-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.hover\:bg-stone-200:hover{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.hover\:bg-stone-300:hover{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.hover\:bg-stone-400:hover{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}.hover\:bg-stone-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.hover\:bg-stone-500:hover{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.hover\:bg-stone-600:hover{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.hover\:bg-stone-700:hover{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}.hover\:bg-stone-800:hover{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.hover\:bg-stone-900:hover{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.hover\:bg-stone-950:hover{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}.hover\:bg-teal-100:hover{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.hover\:bg-teal-200:hover{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}.hover\:bg-teal-300:hover{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}.hover\:bg-teal-400:hover{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}.hover\:bg-teal-50:hover{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}.hover\:bg-teal-500:hover{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.hover\:bg-teal-600:hover{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}.hover\:bg-teal-700:hover{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}.hover\:bg-teal-800:hover{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}.hover\:bg-teal-900:hover{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}.hover\:bg-teal-950:hover{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}.hover\:bg-tremor-background-muted:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-tremor-background-subtle:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-tremor-brand-emphasis:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.hover\:bg-violet-100:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.hover\:bg-violet-200:hover{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}.hover\:bg-violet-300:hover{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}.hover\:bg-violet-400:hover{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}.hover\:bg-violet-50:hover{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.hover\:bg-violet-500:hover{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.hover\:bg-violet-600:hover{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.hover\:bg-violet-700:hover{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}.hover\:bg-violet-800:hover{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}.hover\:bg-violet-900:hover{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}.hover\:bg-violet-950:hover{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}.hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.hover\:bg-yellow-100:hover{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.hover\:bg-yellow-200:hover{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}.hover\:bg-yellow-300:hover{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}.hover\:bg-yellow-400:hover{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.hover\:bg-yellow-50:hover{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.hover\:bg-yellow-500:hover{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.hover\:bg-yellow-600:hover{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.hover\:bg-yellow-700:hover{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}.hover\:bg-yellow-800:hover{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}.hover\:bg-yellow-900:hover{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}.hover\:bg-yellow-950:hover{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.hover\:bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\:bg-zinc-200:hover{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.hover\:bg-zinc-300:hover{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.hover\:bg-zinc-400:hover{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.hover\:bg-zinc-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\:bg-zinc-500:hover{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.hover\:bg-zinc-600:hover{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.hover\:bg-zinc-700:hover{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.hover\:bg-zinc-800:hover{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.hover\:bg-zinc-900:hover{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.hover\:bg-zinc-950:hover{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.hover\:bg-opacity-20:hover{--tw-bg-opacity:.2}.hover\:text-\[\#5558e3\]:hover{--tw-text-opacity:1;color:rgb(85 88 227/var(--tw-text-opacity,1))}.hover\:text-amber-100:hover{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.hover\:text-amber-200:hover{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.hover\:text-amber-300:hover{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.hover\:text-amber-400:hover{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.hover\:text-amber-50:hover{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}.hover\:text-amber-500:hover{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.hover\:text-amber-600:hover{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.hover\:text-amber-700:hover{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.hover\:text-amber-800:hover{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.hover\:text-amber-900:hover{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}.hover\:text-amber-950:hover{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}.hover\:text-blue-100:hover{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.hover\:text-blue-200:hover{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.hover\:text-blue-300:hover{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.hover\:text-blue-400:hover{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.hover\:text-blue-50:hover{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}.hover\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-blue-900:hover{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.hover\:text-blue-950:hover{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}.hover\:text-cyan-100:hover{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.hover\:text-cyan-200:hover{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.hover\:text-cyan-300:hover{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.hover\:text-cyan-400:hover{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.hover\:text-cyan-50:hover{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.hover\:text-cyan-500:hover{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.hover\:text-cyan-600:hover{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.hover\:text-cyan-700:hover{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.hover\:text-cyan-800:hover{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.hover\:text-cyan-900:hover{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.hover\:text-cyan-950:hover{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.hover\:text-emerald-100:hover{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.hover\:text-emerald-200:hover{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.hover\:text-emerald-300:hover{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.hover\:text-emerald-400:hover{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.hover\:text-emerald-50:hover{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.hover\:text-emerald-500:hover{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.hover\:text-emerald-600:hover{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.hover\:text-emerald-700:hover{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.hover\:text-emerald-800:hover{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.hover\:text-emerald-900:hover{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}.hover\:text-emerald-950:hover{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.hover\:text-fuchsia-100:hover{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.hover\:text-fuchsia-200:hover{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}.hover\:text-fuchsia-300:hover{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.hover\:text-fuchsia-400:hover{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.hover\:text-fuchsia-50:hover{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}.hover\:text-fuchsia-500:hover{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}.hover\:text-fuchsia-600:hover{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}.hover\:text-fuchsia-700:hover{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.hover\:text-fuchsia-800:hover{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}.hover\:text-fuchsia-900:hover{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}.hover\:text-fuchsia-950:hover{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}.hover\:text-gray-100:hover{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.hover\:text-gray-200:hover{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.hover\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.hover\:text-gray-400:hover{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.hover\:text-gray-50:hover{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.hover\:text-gray-950:hover{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.hover\:text-green-100:hover{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.hover\:text-green-200:hover{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.hover\:text-green-300:hover{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}.hover\:text-green-400:hover{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.hover\:text-green-50:hover{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}.hover\:text-green-500:hover{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.hover\:text-green-600:hover{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.hover\:text-green-800:hover{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.hover\:text-green-900:hover{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.hover\:text-green-950:hover{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}.hover\:text-indigo-100:hover{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.hover\:text-indigo-200:hover{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.hover\:text-indigo-300:hover{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.hover\:text-indigo-400:hover{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.hover\:text-indigo-50:hover{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.hover\:text-indigo-600:hover{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}.hover\:text-indigo-700:hover{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.hover\:text-indigo-800:hover{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.hover\:text-indigo-900:hover{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}.hover\:text-indigo-950:hover{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.hover\:text-lime-100:hover{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}.hover\:text-lime-200:hover{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}.hover\:text-lime-300:hover{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}.hover\:text-lime-400:hover{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.hover\:text-lime-50:hover{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}.hover\:text-lime-500:hover{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}.hover\:text-lime-600:hover{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}.hover\:text-lime-700:hover{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}.hover\:text-lime-800:hover{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}.hover\:text-lime-900:hover{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.hover\:text-lime-950:hover{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}.hover\:text-neutral-100:hover{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}.hover\:text-neutral-200:hover{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.hover\:text-neutral-300:hover{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.hover\:text-neutral-400:hover{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.hover\:text-neutral-50:hover{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.hover\:text-neutral-500:hover{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.hover\:text-neutral-600:hover{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.hover\:text-neutral-700:hover{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.hover\:text-neutral-800:hover{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.hover\:text-neutral-900:hover{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.hover\:text-neutral-950:hover{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.hover\:text-orange-100:hover{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}.hover\:text-orange-200:hover{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}.hover\:text-orange-300:hover{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.hover\:text-orange-400:hover{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.hover\:text-orange-50:hover{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}.hover\:text-orange-500:hover{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.hover\:text-orange-600:hover{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.hover\:text-orange-700:hover{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.hover\:text-orange-800:hover{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.hover\:text-orange-900:hover{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}.hover\:text-orange-950:hover{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}.hover\:text-pink-100:hover{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}.hover\:text-pink-200:hover{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}.hover\:text-pink-300:hover{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}.hover\:text-pink-400:hover{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.hover\:text-pink-50:hover{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}.hover\:text-pink-500:hover{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.hover\:text-pink-600:hover{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.hover\:text-pink-700:hover{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.hover\:text-pink-800:hover{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.hover\:text-pink-900:hover{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}.hover\:text-pink-950:hover{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}.hover\:text-purple-100:hover{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}.hover\:text-purple-200:hover{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.hover\:text-purple-300:hover{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}.hover\:text-purple-400:hover{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.hover\:text-purple-50:hover{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}.hover\:text-purple-500:hover{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.hover\:text-purple-600:hover{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.hover\:text-purple-700:hover{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.hover\:text-purple-800:hover{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.hover\:text-purple-900:hover{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}.hover\:text-purple-950:hover{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}.hover\:text-red-100:hover{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.hover\:text-red-200:hover{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.hover\:text-red-300:hover{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.hover\:text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\:text-red-50:hover{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.hover\:text-red-600:hover{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.hover\:text-red-800:hover{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.hover\:text-red-900:hover{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.hover\:text-red-950:hover{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}.hover\:text-rose-100:hover{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.hover\:text-rose-200:hover{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.hover\:text-rose-300:hover{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.hover\:text-rose-400:hover{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.hover\:text-rose-50:hover{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}.hover\:text-rose-500:hover{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.hover\:text-rose-600:hover{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}.hover\:text-rose-700:hover{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.hover\:text-rose-800:hover{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}.hover\:text-rose-900:hover{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}.hover\:text-rose-950:hover{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}.hover\:text-sky-100:hover{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.hover\:text-sky-200:hover{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.hover\:text-sky-300:hover{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.hover\:text-sky-400:hover{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.hover\:text-sky-50:hover{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}.hover\:text-sky-500:hover{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}.hover\:text-sky-600:hover{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.hover\:text-sky-700:hover{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.hover\:text-sky-800:hover{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}.hover\:text-sky-900:hover{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}.hover\:text-sky-950:hover{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}.hover\:text-slate-100:hover{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.hover\:text-slate-200:hover{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.hover\:text-slate-300:hover{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.hover\:text-slate-400:hover{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.hover\:text-slate-50:hover{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.hover\:text-slate-500:hover{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.hover\:text-slate-600:hover{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.hover\:text-slate-700:hover{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.hover\:text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\:text-slate-950:hover{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.hover\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.hover\:text-stone-200:hover{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.hover\:text-stone-300:hover{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.hover\:text-stone-400:hover{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.hover\:text-stone-50:hover{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.hover\:text-stone-500:hover{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}.hover\:text-stone-600:hover{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}.hover\:text-stone-700:hover{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.hover\:text-stone-800:hover{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.hover\:text-stone-900:hover{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.hover\:text-stone-950:hover{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}.hover\:text-teal-100:hover{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}.hover\:text-teal-200:hover{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}.hover\:text-teal-300:hover{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}.hover\:text-teal-400:hover{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.hover\:text-teal-50:hover{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}.hover\:text-teal-500:hover{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}.hover\:text-teal-600:hover{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}.hover\:text-teal-700:hover{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}.hover\:text-teal-800:hover{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}.hover\:text-teal-900:hover{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.hover\:text-teal-950:hover{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}.hover\:text-tremor-brand-emphasis:hover{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.hover\:text-tremor-content:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.hover\:text-tremor-content-emphasis:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-violet-100:hover{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.hover\:text-violet-200:hover{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.hover\:text-violet-300:hover{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.hover\:text-violet-400:hover{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.hover\:text-violet-50:hover{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}.hover\:text-violet-500:hover{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}.hover\:text-violet-600:hover{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.hover\:text-violet-700:hover{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.hover\:text-violet-800:hover{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.hover\:text-violet-900:hover{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}.hover\:text-violet-950:hover{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}.hover\:text-yellow-100:hover{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.hover\:text-yellow-200:hover{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}.hover\:text-yellow-300:hover{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.hover\:text-yellow-400:hover{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.hover\:text-yellow-50:hover{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}.hover\:text-yellow-500:hover{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.hover\:text-yellow-600:hover{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.hover\:text-yellow-700:hover{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.hover\:text-yellow-800:hover{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.hover\:text-yellow-900:hover{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.hover\:text-yellow-950:hover{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}.hover\:text-zinc-100:hover{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.hover\:text-zinc-200:hover{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.hover\:text-zinc-300:hover{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.hover\:text-zinc-400:hover{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.hover\:text-zinc-50:hover{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.hover\:text-zinc-500:hover{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\:text-zinc-600:hover{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.hover\:text-zinc-700:hover{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.hover\:text-zinc-800:hover{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.hover\:text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\:text-zinc-950:hover{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-indigo-500\/50:hover{--tw-shadow-color:#6366f180;--tw-shadow:var(--tw-shadow-colored)}.focus\:border-blue-400:focus{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.focus\:border-indigo-500:focus{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.focus\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.focus\:border-transparent:focus{border-color:#0000}.focus\:border-tremor-brand-subtle:focus{--tw-border-opacity:1;border-color:rgb(142 145 235/var(--tw-border-opacity,1))}.focus\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\:ring-blue-500\/20:focus{--tw-ring-color:#3b82f633}.focus\:ring-indigo-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity,1))}.focus\:ring-red-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(254 202 202/var(--tw-ring-opacity,1))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.focus\:ring-tremor-brand-muted:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(134 136 239/var(--tw-ring-opacity,1))}.focus\:ring-offset-1:focus{--tw-ring-offset-width:1px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:outline-none:focus-visible{outline-offset:2px;outline:2px solid #0000}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-blue-500:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.active\:translate-y-\[0\.5px\]:active{--tw-translate-y:.5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:\!bg-gray-300:disabled{--tw-bg-opacity:1!important;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))!important}.disabled\:bg-indigo-400:disabled{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.disabled\:\!text-gray-500:disabled{--tw-text-opacity:1!important;color:rgb(107 114 128/var(--tw-text-opacity,1))!important}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:hover\:bg-transparent:hover:disabled{background-color:#0000}.group:hover .group-hover\:bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.group:hover .group-hover\:bg-tremor-brand-subtle\/30{background-color:#8e91eb4d}.group:hover .group-hover\:bg-opacity-30{--tw-bg-opacity:.3}.group:hover .group-hover\:text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.group:hover .group-hover\:opacity-100{opacity:1}.group:active .group-active\:scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.aria-selected\:\!bg-tremor-background-subtle[aria-selected=true]{--tw-bg-opacity:1!important;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))!important}.aria-selected\:bg-tremor-background-emphasis[aria-selected=true]{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.aria-selected\:\!text-tremor-content[aria-selected=true]{--tw-text-opacity:1!important;color:rgb(107 114 128/var(--tw-text-opacity,1))!important}.aria-selected\:text-dark-tremor-brand-inverted[aria-selected=true]{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.aria-selected\:text-tremor-brand-inverted[aria-selected=true],.aria-selected\:text-tremor-content-inverted[aria-selected=true]{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.data-\[selected\]\:border-b-2[data-selected]{border-bottom-width:2px}.data-\[selected\]\:border-tremor-border[data-selected]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.data-\[selected\]\:border-tremor-brand[data-selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.data-\[focus\]\:bg-tremor-background-muted[data-focus]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.data-\[selected\]\:bg-tremor-background[data-selected]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\[selected\]\:bg-tremor-background-muted[data-selected]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.data-\[focus\]\:text-tremor-content-strong[data-focus]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.data-\[selected\]\:text-tremor-brand[data-selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.data-\[selected\]\:text-tremor-content-strong[data-selected]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.data-\[closed\]\:opacity-0[data-closed]{opacity:0}.data-\[selected\]\:shadow-tremor-input[data-selected]{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\[enter\]\:duration-300[data-enter]{transition-duration:.3s}.data-\[leave\]\:duration-200[data-leave]{transition-duration:.2s}.data-\[enter\]\:ease-out[data-enter]{transition-timing-function:cubic-bezier(0,0,.2,1)}.data-\[leave\]\:ease-in[data-leave]{transition-timing-function:cubic-bezier(.4,0,1,1)}.ui-selected\:border-amber-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}.ui-selected\:border-amber-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.ui-selected\:border-amber-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.ui-selected\:border-amber-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.ui-selected\:border-amber-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}.ui-selected\:border-amber-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.ui-selected\:border-amber-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}.ui-selected\:border-amber-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}.ui-selected\:border-amber-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}.ui-selected\:border-amber-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}.ui-selected\:border-amber-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}.ui-selected\:border-blue-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.ui-selected\:border-blue-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.ui-selected\:border-blue-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.ui-selected\:border-blue-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.ui-selected\:border-blue-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}.ui-selected\:border-blue-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.ui-selected\:border-blue-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.ui-selected\:border-blue-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}.ui-selected\:border-blue-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.ui-selected\:border-blue-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}.ui-selected\:border-blue-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}.ui-selected\:border-gray-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.ui-selected\:border-gray-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.ui-selected\:border-gray-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.ui-selected\:border-gray-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.ui-selected\:border-gray-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}.ui-selected\:border-gray-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.ui-selected\:border-gray-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.ui-selected\:border-gray-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.ui-selected\:border-gray-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.ui-selected\:border-gray-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.ui-selected\:border-gray-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}.ui-selected\:border-green-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.ui-selected\:border-green-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.ui-selected\:border-green-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.ui-selected\:border-green-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.ui-selected\:border-green-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}.ui-selected\:border-green-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.ui-selected\:border-green-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}.ui-selected\:border-green-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}.ui-selected\:border-green-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.ui-selected\:border-green-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}.ui-selected\:border-green-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.ui-selected\:border-lime-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}.ui-selected\:border-lime-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}.ui-selected\:border-lime-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.ui-selected\:border-lime-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}.ui-selected\:border-lime-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}.ui-selected\:border-lime-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}.ui-selected\:border-lime-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}.ui-selected\:border-lime-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}.ui-selected\:border-lime-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}.ui-selected\:border-lime-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}.ui-selected\:border-lime-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}.ui-selected\:border-orange-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.ui-selected\:border-orange-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.ui-selected\:border-orange-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.ui-selected\:border-orange-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}.ui-selected\:border-orange-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}.ui-selected\:border-orange-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.ui-selected\:border-orange-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}.ui-selected\:border-orange-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}.ui-selected\:border-orange-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}.ui-selected\:border-orange-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}.ui-selected\:border-orange-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}.ui-selected\:border-pink-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}.ui-selected\:border-pink-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}.ui-selected\:border-pink-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.ui-selected\:border-pink-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}.ui-selected\:border-pink-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}.ui-selected\:border-pink-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}.ui-selected\:border-pink-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}.ui-selected\:border-pink-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}.ui-selected\:border-pink-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}.ui-selected\:border-pink-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.ui-selected\:border-pink-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}.ui-selected\:border-purple-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}.ui-selected\:border-purple-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.ui-selected\:border-purple-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.ui-selected\:border-purple-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}.ui-selected\:border-purple-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}.ui-selected\:border-purple-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.ui-selected\:border-purple-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}.ui-selected\:border-purple-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}.ui-selected\:border-purple-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}.ui-selected\:border-purple-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}.ui-selected\:border-purple-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}.ui-selected\:border-red-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.ui-selected\:border-red-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.ui-selected\:border-red-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.ui-selected\:border-red-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.ui-selected\:border-red-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}.ui-selected\:border-red-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.ui-selected\:border-red-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.ui-selected\:border-red-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.ui-selected\:border-red-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.ui-selected\:border-red-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}.ui-selected\:border-red-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}.ui-selected\:border-rose-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}.ui-selected\:border-rose-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}.ui-selected\:border-rose-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.ui-selected\:border-rose-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}.ui-selected\:border-rose-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}.ui-selected\:border-rose-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.ui-selected\:border-rose-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}.ui-selected\:border-rose-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}.ui-selected\:border-rose-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}.ui-selected\:border-rose-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}.ui-selected\:border-rose-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}.ui-selected\:border-sky-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}.ui-selected\:border-sky-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.ui-selected\:border-sky-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.ui-selected\:border-sky-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.ui-selected\:border-sky-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}.ui-selected\:border-sky-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}.ui-selected\:border-sky-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}.ui-selected\:border-sky-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}.ui-selected\:border-sky-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}.ui-selected\:border-sky-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}.ui-selected\:border-sky-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}.ui-selected\:border-slate-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.ui-selected\:border-slate-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.ui-selected\:border-slate-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ui-selected\:border-slate-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}.ui-selected\:border-slate-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.ui-selected\:border-slate-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.ui-selected\:border-slate-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.ui-selected\:border-slate-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.ui-selected\:border-slate-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.ui-selected\:border-slate-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}.ui-selected\:border-slate-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}.ui-selected\:border-stone-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}.ui-selected\:border-stone-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.ui-selected\:border-stone-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.ui-selected\:border-stone-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.ui-selected\:border-stone-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}.ui-selected\:border-stone-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.ui-selected\:border-stone-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.ui-selected\:border-stone-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}.ui-selected\:border-stone-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}.ui-selected\:border-stone-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}.ui-selected\:border-stone-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}.ui-selected\:border-teal-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}.ui-selected\:border-teal-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}.ui-selected\:border-teal-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.ui-selected\:border-teal-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}.ui-selected\:border-teal-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}.ui-selected\:border-teal-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}.ui-selected\:border-teal-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}.ui-selected\:border-teal-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}.ui-selected\:border-teal-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}.ui-selected\:border-teal-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}.ui-selected\:border-teal-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}.ui-selected\:border-violet-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}.ui-selected\:border-violet-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}.ui-selected\:border-violet-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.ui-selected\:border-violet-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}.ui-selected\:border-violet-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}.ui-selected\:border-violet-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}.ui-selected\:border-violet-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}.ui-selected\:border-violet-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}.ui-selected\:border-violet-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}.ui-selected\:border-violet-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}.ui-selected\:border-violet-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}.ui-selected\:bg-amber-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.ui-selected\:text-amber-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.ui-selected\:text-amber-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.ui-selected\:text-amber-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.ui-selected\:text-amber-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.ui-selected\:text-amber-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}.ui-selected\:text-amber-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.ui-selected\:text-amber-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.ui-selected\:text-amber-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.ui-selected\:text-amber-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.ui-selected\:text-amber-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}.ui-selected\:text-amber-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}.ui-selected\:text-blue-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.ui-selected\:text-blue-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.ui-selected\:text-blue-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.ui-selected\:text-blue-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.ui-selected\:text-blue-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}.ui-selected\:text-blue-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.ui-selected\:text-blue-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.ui-selected\:text-blue-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.ui-selected\:text-blue-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.ui-selected\:text-blue-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.ui-selected\:text-blue-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}.ui-selected\:text-gray-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.ui-selected\:text-gray-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.ui-selected\:text-gray-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.ui-selected\:text-gray-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.ui-selected\:text-gray-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.ui-selected\:text-gray-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.ui-selected\:text-gray-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.ui-selected\:text-gray-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.ui-selected\:text-gray-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.ui-selected\:text-gray-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.ui-selected\:text-gray-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.ui-selected\:text-green-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.ui-selected\:text-green-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.ui-selected\:text-green-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}.ui-selected\:text-green-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.ui-selected\:text-green-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}.ui-selected\:text-green-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.ui-selected\:text-green-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.ui-selected\:text-green-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.ui-selected\:text-green-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.ui-selected\:text-green-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.ui-selected\:text-green-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.ui-selected\:text-lime-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}.ui-selected\:text-lime-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}.ui-selected\:text-lime-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}.ui-selected\:text-lime-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.ui-selected\:text-lime-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}.ui-selected\:text-lime-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}.ui-selected\:text-lime-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}.ui-selected\:text-lime-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}.ui-selected\:text-lime-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}.ui-selected\:text-lime-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.ui-selected\:text-lime-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.ui-selected\:text-orange-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}.ui-selected\:text-orange-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}.ui-selected\:text-orange-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.ui-selected\:text-orange-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.ui-selected\:text-orange-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}.ui-selected\:text-orange-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.ui-selected\:text-orange-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.ui-selected\:text-orange-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.ui-selected\:text-orange-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.ui-selected\:text-orange-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}.ui-selected\:text-orange-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}.ui-selected\:text-pink-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}.ui-selected\:text-pink-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}.ui-selected\:text-pink-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}.ui-selected\:text-pink-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.ui-selected\:text-pink-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}.ui-selected\:text-pink-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.ui-selected\:text-pink-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.ui-selected\:text-pink-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.ui-selected\:text-pink-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.ui-selected\:text-pink-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}.ui-selected\:text-pink-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}.ui-selected\:text-purple-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}.ui-selected\:text-purple-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.ui-selected\:text-purple-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}.ui-selected\:text-purple-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.ui-selected\:text-purple-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}.ui-selected\:text-purple-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.ui-selected\:text-purple-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.ui-selected\:text-purple-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.ui-selected\:text-purple-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.ui-selected\:text-purple-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}.ui-selected\:text-purple-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}.ui-selected\:text-red-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.ui-selected\:text-red-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.ui-selected\:text-red-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.ui-selected\:text-red-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.ui-selected\:text-red-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.ui-selected\:text-red-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.ui-selected\:text-red-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.ui-selected\:text-red-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.ui-selected\:text-red-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.ui-selected\:text-red-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.ui-selected\:text-red-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}.ui-selected\:text-rose-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.ui-selected\:text-rose-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.ui-selected\:text-rose-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.ui-selected\:text-rose-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.ui-selected\:text-rose-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}.ui-selected\:text-rose-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.ui-selected\:text-rose-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}.ui-selected\:text-rose-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.ui-selected\:text-rose-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}.ui-selected\:text-rose-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}.ui-selected\:text-rose-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}.ui-selected\:text-sky-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.ui-selected\:text-sky-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.ui-selected\:text-sky-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.ui-selected\:text-sky-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.ui-selected\:text-sky-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}.ui-selected\:text-sky-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}.ui-selected\:text-sky-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.ui-selected\:text-sky-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.ui-selected\:text-sky-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}.ui-selected\:text-sky-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}.ui-selected\:text-sky-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}.ui-selected\:text-slate-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.ui-selected\:text-slate-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.ui-selected\:text-slate-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.ui-selected\:text-slate-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.ui-selected\:text-slate-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.ui-selected\:text-slate-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.ui-selected\:text-slate-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.ui-selected\:text-slate-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.ui-selected\:text-slate-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.ui-selected\:text-slate-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.ui-selected\:text-slate-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.ui-selected\:text-stone-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.ui-selected\:text-stone-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.ui-selected\:text-stone-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.ui-selected\:text-stone-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.ui-selected\:text-stone-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.ui-selected\:text-stone-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}.ui-selected\:text-stone-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}.ui-selected\:text-stone-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.ui-selected\:text-stone-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.ui-selected\:text-stone-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.ui-selected\:text-stone-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}.ui-selected\:text-teal-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}.ui-selected\:text-teal-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}.ui-selected\:text-teal-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}.ui-selected\:text-teal-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.ui-selected\:text-teal-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}.ui-selected\:text-teal-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}.ui-selected\:text-teal-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}.ui-selected\:text-teal-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}.ui-selected\:text-teal-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}.ui-selected\:text-teal-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.ui-selected\:text-teal-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}.ui-selected\:text-violet-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.ui-selected\:text-violet-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.ui-selected\:text-violet-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.ui-selected\:text-violet-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.ui-selected\:text-violet-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}.ui-selected\:text-violet-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}.ui-selected\:text-violet-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.ui-selected\:text-violet-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.ui-selected\:text-violet-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.ui-selected\:text-violet-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}.ui-selected\:text-violet-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-100{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-400{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-50{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-500{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-600{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-700{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-800{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-900{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-950{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-50{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-700{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-800{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-900{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-950{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-300{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-400{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-50{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-500{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-600{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-700{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-800{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-900{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-950{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-100{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-300{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-400{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-50{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-600{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-700{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-800{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-900{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-950{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-100{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-200{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-300{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-400{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-50{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-500{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-600{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-700{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-800{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-900{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-950{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-50{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-900{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-950{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-50{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-600{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-700{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-800{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-900{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-950{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-100{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-200{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-300{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-400{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-50{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-600{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-700{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-800{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-900{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-950{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-100{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-200{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-300{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-400{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-50{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-500{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-600{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-700{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-800{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-900{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-950{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-300{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-400{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-500{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-600{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-700{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-800{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-900{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-950{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-300{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-400{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-50{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-600{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-700{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-800{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-900{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-950{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-100{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-200{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-300{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-400{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-50{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-500{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-600{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-700{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-800{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-900{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-950{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-100{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-300{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-400{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-50{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-600{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-800{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-900{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-950{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-50{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-900{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-950{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-100{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-200{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-300{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-400{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-50{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-500{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-600{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-700{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-800{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-900{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-950{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-100{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-400{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-50{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-500{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-600{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-700{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-800{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-900{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-950{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-50{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-900{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-950{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-100{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-50{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-700{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-800{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-900{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-950{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-100{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-200{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-300{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-400{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-50{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-500{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-600{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-700{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-800{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-900{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-950{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-100{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-200{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-300{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-400{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-50{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-500{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-600{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-700{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-800{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-900{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-950{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-100{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-300{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-50{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-600{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-700{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-800{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-900{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-950{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-400{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-500{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-600{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-700{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-950{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-200{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-300{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-700{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-800{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-900{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-950{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-800{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-900{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-950{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-200{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-300{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-400{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-700{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-800{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-900{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-950{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-200{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-300{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-700{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-800{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-900{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-950{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-100{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-200{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-300{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-400{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-50{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-500{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-600{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-700{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-800{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-900{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-950{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-950{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-800{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-900{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-950{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-300{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-400{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-950{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-100{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-200{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-300{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-400{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-50{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-500{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-600{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-700{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-800{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-900{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-950{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-200{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-400{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-500{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-600{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-950{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-300{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-700{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-800{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-900{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-950{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-300{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-500{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-600{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-700{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-800{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-900{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-950{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-200{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-300{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-400{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-800{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-900{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-950{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-300{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-800{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-100{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-200{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-300{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-700{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-800{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-900{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-950{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-200{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-300{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-400{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-700{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-800{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-900{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-950{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-500{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-600{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-950{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-200{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-50{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-700{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-950{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-100{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-200{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-300{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-400{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-50{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-500{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-600{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-700{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-800{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-900{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-950{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-200{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-300{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-400{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-700{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-800{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-900{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-950{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-700{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-800{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-900{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-950{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-400{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-500{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-600{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-700{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-50{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-900{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-950{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-100{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-200{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-300{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-50{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-950{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-500{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-900{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-200{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-50{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-500{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-600{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-700{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-800{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-900{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-950{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-950{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-100{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-200{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-300{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-50{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-950{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-400{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-50{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-900{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-950{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-100{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-200{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-300{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-400{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-50{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-500{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-600{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-700{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-800{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-900{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-950{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-100{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-200{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-300{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-100{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-200{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-50{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-900{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-950{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-100{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-200{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-300{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-50{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-800{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-900{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-950{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-100{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-200{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-50{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-900{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-950{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-100{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-50{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-950{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-50{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-500{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-700{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-800{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-900{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-950{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-50{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-800{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-900{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-950{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-500{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-600{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-700{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-950{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-100{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-200{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-300{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-50{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-500{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-600{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-700{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-800{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-900{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-950{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-50{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-500{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-900{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-950{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-100{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-200{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-50{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-950{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.dark\:divide-dark-tremor-border:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity,1))}.dark\:border-dark-tremor-background:is(.dark *){--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-border:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand:is(.dark *){--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand-emphasis:is(.dark *){--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand-inverted:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand-subtle:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.dark\:border-red-500:is(.dark *){--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.dark\:bg-dark-tremor-background:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-background-emphasis:is(.dark *){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-background-muted:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-background-subtle:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-border:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-brand:is(.dark *){--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-brand-muted:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-brand-muted\/50:is(.dark *){background-color:#1e1b4b80}.dark\:bg-dark-tremor-brand-muted\/70:is(.dark *){background-color:#1e1b4bb3}.dark\:bg-dark-tremor-brand-subtle\/60:is(.dark *){background-color:#3730a399}.dark\:bg-dark-tremor-content-subtle:is(.dark *){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.dark\:bg-slate-950\/50:is(.dark *){background-color:#02061780}.dark\:bg-white:is(.dark *){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.dark\:bg-opacity-10:is(.dark *){--tw-bg-opacity:.1}.dark\:bg-opacity-5:is(.dark *){--tw-bg-opacity:.05}.dark\:fill-dark-tremor-content:is(.dark *){fill:#6b7280}.dark\:fill-dark-tremor-content-emphasis:is(.dark *){fill:#e5e7eb}.dark\:stroke-dark-tremor-background:is(.dark *){stroke:#111827}.dark\:stroke-dark-tremor-border:is(.dark *){stroke:#374151}.dark\:stroke-dark-tremor-brand:is(.dark *){stroke:#6366f1}.dark\:stroke-dark-tremor-brand-muted:is(.dark *){stroke:#1e1b4b}.dark\:text-dark-tremor-brand:is(.dark *){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-brand-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-brand-inverted:is(.dark *){--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content-strong:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content-subtle:is(.dark *){--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.dark\:text-red-500:is(.dark *){--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.dark\:text-tremor-content-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.dark\:accent-dark-tremor-brand:is(.dark *){accent-color:#6366f1}.dark\:opacity-25:is(.dark *){opacity:.25}.dark\:shadow-dark-tremor-card:is(.dark *){--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:shadow-dark-tremor-dropdown:is(.dark *){--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:shadow-dark-tremor-input:is(.dark *){--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:outline-dark-tremor-brand:is(.dark *){outline-color:#6366f1}.dark\:ring-dark-tremor-brand-inverted:is(.dark *),.dark\:ring-dark-tremor-brand-muted:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity,1))}.dark\:ring-dark-tremor-ring:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity,1))}.dark\:ring-opacity-60:is(.dark *){--tw-ring-opacity:.6}.dark\:placeholder\:text-dark-tremor-content:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-dark-tremor-content:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-dark-tremor-content-subtle:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.dark\:placeholder\:text-dark-tremor-content-subtle:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.dark\:placeholder\:text-red-500:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.dark\:placeholder\:text-red-500:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content-subtle:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content-subtle:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.dark\:hover\:border-dark-tremor-brand-emphasis:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.dark\:hover\:bg-dark-tremor-background-muted:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:hover\:bg-dark-tremor-background-subtle:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\:hover\:bg-dark-tremor-background-subtle\/40:hover:is(.dark *){background-color:#1f293766}.dark\:hover\:bg-dark-tremor-brand-emphasis:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.dark\:hover\:bg-dark-tremor-brand-faint:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(11 18 41/var(--tw-bg-opacity,1))}.hover\:dark\:\!bg-gray-100:is(.dark *):hover{--tw-bg-opacity:1!important;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))!important}.hover\:dark\:bg-gray-100:is(.dark *):hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.dark\:hover\:bg-opacity-20:hover:is(.dark *){--tw-bg-opacity:.2}.dark\:hover\:text-dark-tremor-brand-emphasis:hover:is(.dark *){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.dark\:hover\:text-dark-tremor-content:hover:is(.dark *),.dark\:hover\:text-tremor-content:hover:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:hover\:text-tremor-content-emphasis:hover:is(.dark *){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:dark\:text-dark-tremor-content:is(.dark *):hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:focus\:border-dark-tremor-brand-subtle:focus:is(.dark *),.focus\:dark\:border-dark-tremor-brand-subtle:is(.dark *):focus{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.dark\:focus\:ring-dark-tremor-brand-muted:focus:is(.dark *),.focus\:dark\:ring-dark-tremor-brand-muted:is(.dark *):focus{--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity,1))}.group:hover .group-hover\:dark\:bg-dark-tremor-brand-subtle\/70:is(.dark *){background-color:#3730a3b3}.group:hover .dark\:group-hover\:text-dark-tremor-content-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.aria-selected\:dark\:\!bg-dark-tremor-background-subtle:is(.dark *)[aria-selected=true]{--tw-bg-opacity:1!important;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))!important}.dark\:aria-selected\:bg-dark-tremor-background-emphasis[aria-selected=true]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.dark\:aria-selected\:text-dark-tremor-brand-inverted[aria-selected=true]:is(.dark *){--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.dark\:aria-selected\:text-dark-tremor-content-inverted[aria-selected=true]:is(.dark *){--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:border-dark-tremor-border[data-selected]:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.data-\[selected\]\:dark\:border-dark-tremor-brand:is(.dark *)[data-selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.dark\:data-\[focus\]\:bg-dark-tremor-background-muted[data-focus]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:data-\[selected\]\:bg-dark-tremor-background[data-selected]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.dark\:data-\[selected\]\:bg-dark-tremor-background-muted[data-selected]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:data-\[focus\]\:text-dark-tremor-content-strong[data-focus]:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:text-dark-tremor-brand[data-selected]:is(.dark *){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:text-dark-tremor-content-strong[data-selected]:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.data-\[selected\]\:dark\:text-dark-tremor-brand:is(.dark *)[data-selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:shadow-dark-tremor-input[data-selected]:is(.dark *){--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:640px){.sm\:col-span-1{grid-column:span 1/span 1}.sm\:col-span-10{grid-column:span 10/span 10}.sm\:col-span-11{grid-column:span 11/span 11}.sm\:col-span-12{grid-column:span 12/span 12}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:col-span-4{grid-column:span 4/span 4}.sm\:col-span-5{grid-column:span 5/span 5}.sm\:col-span-6{grid-column:span 6/span 6}.sm\:col-span-7{grid-column:span 7/span 7}.sm\:col-span-8{grid-column:span 8/span 8}.sm\:col-span-9{grid-column:span 9/span 9}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:mb-0{margin-bottom:0}.sm\:ml-4{margin-left:1rem}.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:flex{display:flex}.sm\:h-screen{height:100vh}.sm\:w-64{width:16rem}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.sm\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.sm\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.sm\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.sm\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.sm\:grid-cols-none{grid-template-columns:none}.sm\:flex-row{flex-direction:row}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pb-4{padding-bottom:1rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}}@media (min-width:768px){.md\:col-span-1{grid-column:span 1/span 1}.md\:col-span-10{grid-column:span 10/span 10}.md\:col-span-11{grid-column:span 11/span 11}.md\:col-span-12{grid-column:span 12/span 12}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-span-3{grid-column:span 3/span 3}.md\:col-span-4{grid-column:span 4/span 4}.md\:col-span-5{grid-column:span 5/span 5}.md\:col-span-6{grid-column:span 6/span 6}.md\:col-span-7{grid-column:span 7/span 7}.md\:col-span-8{grid-column:span 8/span 8}.md\:col-span-9{grid-column:span 9/span 9}.md\:table-cell{display:table-cell}.md\:hidden{display:none}.md\:w-64{width:16rem}.md\:w-72{width:18rem}.md\:w-auto{width:auto}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.md\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.md\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.md\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.md\:grid-cols-none{grid-template-columns:none}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}}@media (min-width:1024px){.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-10{grid-column:span 10/span 10}.lg\:col-span-11{grid-column:span 11/span 11}.lg\:col-span-12{grid-column:span 12/span 12}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:col-span-4{grid-column:span 4/span 4}.lg\:col-span-5{grid-column:span 5/span 5}.lg\:col-span-6{grid-column:span 6/span 6}.lg\:col-span-7{grid-column:span 7/span 7}.lg\:col-span-8{grid-column:span 8/span 8}.lg\:col-span-9{grid-column:span 9/span 9}.lg\:inline{display:inline}.lg\:table-cell{display:table-cell}.lg\:hidden{display:none}.lg\:w-72{width:18rem}.lg\:max-w-\[200px\]{max-width:200px}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.lg\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.lg\:grid-cols-none{grid-template-columns:none}}@media (min-width:1280px){.xl\:table-cell{display:table-cell}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{appearance:none}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:not\(\[data-selected\]\)\]\:text-tremor-content:not([data-selected]){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:hover\:text-tremor-content-emphasis:hover:not([data-selected]){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:dark\:text-dark-tremor-content:is(.dark *):not([data-selected]),.dark\:\[\&\:not\(\[data-selected\]\)\]\:text-dark-tremor-content:not([data-selected]):is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:dark\:hover\:border-dark-tremor-content-emphasis:hover:is(.dark *):not([data-selected]){--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:dark\:hover\:text-dark-tremor-content-emphasis:hover:is(.dark *):not([data-selected]),.dark\:\[\&\:not\(\[data-selected\]\)\]\:hover\:text-dark-tremor-content-emphasis:hover:not([data-selected]):is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.\[\&_\.ant-table-cell\]\:py-0\.5 .ant-table-cell{padding-top:.125rem;padding-bottom:.125rem}.\[\&_\.ant-table-thead_\.ant-table-cell\]\:py-1 .ant-table-thead .ant-table-cell{padding-top:.25rem;padding-bottom:.25rem}.\[\&_\.ant-tabs-content\]\:h-full .ant-tabs-content{height:100%}.\[\&_\.ant-tabs-nav\]\:pl-4 .ant-tabs-nav{padding-left:1rem}.\[\&_\.ant-tabs-tabpane\]\:h-full .ant-tabs-tabpane{height:100%}.\[\&_\[role\=\'tree\'\]\]\:bg-white [role=tree]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\[\&_\[role\=\'tree\'\]\]\:text-slate-900 [role=tree]{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.\[\&_td\]\:py-0\.5 td{padding-top:.125rem;padding-bottom:.125rem}.\[\&_td\]\:py-2 td{padding-top:.5rem;padding-bottom:.5rem}.\[\&_th\]\:py-1 th{padding-top:.25rem;padding-bottom:.25rem}.\[\&_th\]\:py-2 th{padding-top:.5rem;padding-bottom:.5rem} diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/703b445810a4c51f.js b/litellm/proxy/_experimental/out/_next/static/chunks/703b445810a4c51f.js new file mode 100644 index 0000000000..bfb4735136 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/703b445810a4c51f.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),i=e.i(829087),a=e.i(480731),n=e.i(444755),o=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"}},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,o.makeClassName)("Icon"),m=r.default.forwardRef((e,m)=>{let{icon:g,variant:h="simple",tooltip:f,size:p=a.Sizes.SM,color:b,className:v}=e,x=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),y=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,o.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,o.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,o.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,o.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,o.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,o.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,n.tremorTwMerge)((0,o.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,o.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,o.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,o.getColorClassNames)(t,l.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,n.tremorTwMerge)((0,o.getColorClassNames)(t,l.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,b),{tooltipProps:C,getReferenceProps:k}=(0,i.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([m,C.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[h].rounded,c[h].border,c[h].shadow,c[h].ring,s[p].paddingX,s[p].paddingY,v)},k,x),r.default.createElement(i.default,Object.assign({text:f},C)),r.default.createElement(g,{className:(0,n.tremorTwMerge)(u("icon"),"shrink-0",d[p].height,d[p].width)}))});m.displayName="Icon",e.s(["default",()=>m],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},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",()=>t])},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",()=>t])},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",()=>t])},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),r=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 a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["UploadOutlined",0,n],519756)},530212,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 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,r],530212)},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,i]of Object.entries(t))e in r&&(r[e]=i);return r}let i=(e,t=0,r=!1,i=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!i)return"-";let a={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",a);let n=e<0?"-":"",o=Math.abs(e),l=o,s="";return o>=1e6?(l=o/1e6,s="M"):o>=1e3&&(l=o/1e3,s="K"),`${n}${l.toLocaleString("en-US",a)}${s}`},a=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return n(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),n(e,r)}},n=(e,r)=>{try{let i=document.createElement("textarea");i.value=e,i.style.position="fixed",i.style.left="-999999px",i.style.top="-999999px",i.setAttribute("readonly",""),document.body.appendChild(i),i.focus(),i.select();let a=document.execCommand("copy");if(document.body.removeChild(i),a)return t.default.success(r),!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,a,"formatNumberWithCommas",0,i,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=i(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},435451,620250,e=>{"use strict";var t=e.i(843476),r=e.i(290571),i=e.i(271645);let a=e=>{var t=(0,r.__rest)(e,[]);return i.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"}),i.default.createElement("path",{d:"M12 4v16m8-8H4"}))},n=e=>{var t=(0,r.__rest)(e,[]);return i.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"}),i.default.createElement("path",{d:"M20 12H4"}))};var o=e.i(444755),l=e.i(673706),s=e.i(677955);let d="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",c="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",u=i.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:g,onValueChange:h,onChange:f}=e,p=(0,r.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),b=(0,i.useRef)(null),[v,x]=i.default.useState(!1),y=i.default.useCallback(()=>{x(!0)},[]),C=i.default.useCallback(()=>{x(!1)},[]),[k,$]=i.default.useState(!1),w=i.default.useCallback(()=>{$(!0)},[]),S=i.default.useCallback(()=>{$(!1)},[]);return i.default.createElement(s.default,Object.assign({type:"number",ref:(0,l.mergeRefs)([b,t]),disabled:g,makeInputClassName:(0,l.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=b.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&&S()},onChange:e=>{g||(null==h||h(parseFloat(e.target.value)),null==f||f(e))},stepper:m?i.default.createElement("div",{className:(0,o.tremorTwMerge)("flex justify-center align-middle")},i.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;g||(null==(e=b.current)||e.stepDown(),null==(t=b.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,o.tremorTwMerge)(!g&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},i.default.createElement(n,{"data-testid":"step-down",className:(v?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),i.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;g||(null==(e=b.current)||e.stepUp(),null==(t=b.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,o.tremorTwMerge)(!g&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},i.default.createElement(a,{"data-testid":"step-up",className:(k?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},p))});u.displayName="NumberInput",e.s(["NumberInput",()=>u],620250),e.s(["default",0,({step:e=.01,style:r={width:"100%"},placeholder:i="Enter a numerical value",min:a,max:n,onChange:o,...l})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:r,placeholder:i,min:a,max:n,onChange:o,...l})],435451)},663435,152473,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(199133),a=e.i(898586),n=e.i(56456);let o={enabled:!0,leading:!1,trailing:!0,wait:0,onExecute:()=>{}};class l{constructor(e,t){this.fn=e,this._canLeadingExecute=!0,this._isPending=!1,this._executionCount=0,this._options={...o,...t}}setOptions(e){return this._options={...this._options,...e},this._options.enabled||(this._isPending=!1),this._options}getOptions(){return this._options}maybeExecute(...e){this._options.leading&&this._canLeadingExecute&&(this.executeFunction(...e),this._canLeadingExecute=!1),(this._options.leading||this._options.trailing)&&(this._isPending=!0),this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=setTimeout(()=>{this._canLeadingExecute=!0,this._isPending=!1,this._options.trailing&&this.executeFunction(...e)},this._options.wait)}executeFunction(...e){this._options.enabled&&(this.fn(...e),this._executionCount++,this._options.onExecute(this))}cancel(){this._timeoutId&&(clearTimeout(this._timeoutId),this._canLeadingExecute=!0,this._isPending=!1)}getExecutionCount(){return this._executionCount}getIsPending(){return this._options.enabled&&this._isPending}}function s(e,t){let[i,a]=(0,r.useState)(e),n=function(e,t){let[i]=(0,r.useState)(()=>{var r;return Object.getOwnPropertyNames(Object.getPrototypeOf(r=new l(e,t))).filter(e=>"function"==typeof r[e]).reduce((e,t)=>{let i=r[t];return"function"==typeof i&&(e[t]=i.bind(r)),e},{})});return i.setOptions(t),i}(a,t);return[i,n.maybeExecute,n]}e.s(["useDebouncedState",()=>s],152473);var d=e.i(785242);let{Text:c}=a.Typography;e.s(["default",0,({value:e,onChange:a,onTeamSelect:o,disabled:l,organizationId:u,pageSize:m=20})=>{let[g,h]=(0,r.useState)(""),[f,p]=s("",{wait:300}),{data:b,fetchNextPage:v,hasNextPage:x,isFetchingNextPage:y,isLoading:C}=(0,d.useInfiniteTeams)(m,f||void 0,u),k=(0,r.useMemo)(()=>{if(!b?.pages)return[];let e=new Set,t=[];for(let r of b.pages)for(let i of r.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=>{a?.(e??""),o&&o(e?k.find(t=>t.team_id===e)??null:null)},disabled:l,allowClear:!0,filterOption:!1,onSearch:e=>{h(e),p(e)},searchValue:g,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&x&&!y&&v()},loading:C,notFoundContent:C?(0,t.jsx)(n.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)(n.LoadingOutlined,{spin:!0})})]}),children:k.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))})}],663435)},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),i=e.i(540143),a=e.i(915823),n=e.i(619273),o=class extends a.Subscribable{#e;#t=void 0;#r;#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,n.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,n.hashKey)(t.mutationKey)!==(0,n.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.#a(),this.#n(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#n()}mutate(e,t){return this.#i=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#a(){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}}#n(e){i.notifyManager.batch(()=>{if(this.#i&&this.hasListeners()){let t=this.#t.variables,r=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,r,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(e.data,null,t,r,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#i.onError?.(e.error,t,r,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(void 0,e.error,t,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},l=e.i(912598);function s(e,r){let a=(0,l.useQueryClient)(r),[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(n.noop)},[s]);if(d.error&&(0,n.shouldThrowError)(s.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>s],954616)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),r=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:"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 a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["ClockCircleOutlined",0,n],637235)},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),i=e.i(673706),a=e.i(271645);let n=a.default.forwardRef((e,n)=>{let{color:o,className:l,children:s}=e;return a.default.createElement("p",{ref:n,className:(0,r.tremorTwMerge)("text-tremor-default",o?(0,i.getColorClassNames)(o,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),l)},s)});n.displayName="Text",e.s(["default",()=>n],936325),e.s(["Text",()=>n],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),i=e.i(480731),a=e.i(95779),n=e.i(444755),o=e.i(673706);let l=(0,o.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:d="",decorationColor:c,children:u,className:m}=e,g=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,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",c?(0,o.getColorClassNames)(c,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case i.HorizontalPositions.Left:return"border-l-4";case i.VerticalPositions.Top:return"border-t-4";case i.HorizontalPositions.Right:return"border-r-4";case i.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),m)},g),u)});s.displayName="Card",e.s(["Card",()=>s],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),i=e.i(444755),a=e.i(673706),n=e.i(271645);let o=n.default.forwardRef((e,o)=>{let{color:l,children:s,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return n.default.createElement("p",Object.assign({ref:o,className:(0,i.tremorTwMerge)("font-medium text-tremor-title",l?(0,a.getColorClassNames)(l,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},c),s)});o.displayName="Title",e.s(["Title",()=>o],629569)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>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 i={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 a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["ArrowLeftOutlined",0,n],447566)},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},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",()=>t])},149192,e=>{"use strict";var t=e.i(864517);e.s(["CloseOutlined",()=>t.default])},245094,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["CodeOutlined",0,n],245094)},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["CheckCircleOutlined",0,n],245704)},518617,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={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 a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["CloseCircleOutlined",0,n],518617)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),r=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-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 a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["StopOutlined",0,n],724154)},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},678784,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",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},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",()=>t])},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["SaveOutlined",0,n],987432)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var r=e.i(546467);e.s(["ExternalLinkIcon",()=>r.default],634831);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(["KeyIcon",()=>i],438100)},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},573421,e=>{"use strict";e.i(247167);var t=e.i(8211),r=e.i(271645),i=e.i(343794),a=e.i(887719),n=e.i(908206),o=e.i(242064),l=e.i(721132),s=e.i(517455),d=e.i(264042),c=e.i(150073),u=e.i(165370),m=e.i(244451);let g=r.default.createContext({});g.Consumer;var h=e.i(763731),f=e.i(211576),p=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[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])&&(r[i[a]]=e[i[a]]);return r};let b=r.default.forwardRef((e,t)=>{let a,{prefixCls:n,children:l,actions:s,extra:d,styles:c,className:u,classNames:m,colStyle:b}=e,v=p(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:x,itemLayout:y}=(0,r.useContext)(g),{getPrefixCls:C,list:k}=(0,r.useContext)(o.ConfigContext),$=e=>{var t,r;return(0,i.default)(null==(r=null==(t=null==k?void 0:k.item)?void 0:t.classNames)?void 0:r[e],null==m?void 0:m[e])},w=e=>{var t,r;return Object.assign(Object.assign({},null==(r=null==(t=null==k?void 0:k.item)?void 0:t.styles)?void 0:r[e]),null==c?void 0:c[e])},S=C("list",n),E=s&&s.length>0&&r.default.createElement("ul",{className:(0,i.default)(`${S}-item-action`,$("actions")),key:"actions",style:w("actions")},s.map((e,t)=>r.default.createElement("li",{key:`${S}-item-action-${t}`},e,t!==s.length-1&&r.default.createElement("em",{className:`${S}-item-action-split`})))),O=r.default.createElement(x?"div":"li",Object.assign({},v,x?{}:{ref:t},{className:(0,i.default)(`${S}-item`,{[`${S}-item-no-flex`]:!("vertical"===y?!!d:(a=!1,r.Children.forEach(l,e=>{"string"==typeof e&&(a=!0)}),!(a&&r.Children.count(l)>1)))},u)}),"vertical"===y&&d?[r.default.createElement("div",{className:`${S}-item-main`,key:"content"},l,E),r.default.createElement("div",{className:(0,i.default)(`${S}-item-extra`,$("extra")),key:"extra",style:w("extra")},d)]:[l,E,(0,h.cloneElement)(d,{key:"extra"})]);return x?r.default.createElement(f.Col,{ref:t,flex:1,style:b},O):O});b.Meta=e=>{var{prefixCls:t,className:a,avatar:n,title:l,description:s}=e,d=p(e,["prefixCls","className","avatar","title","description"]);let{getPrefixCls:c}=(0,r.useContext)(o.ConfigContext),u=c("list",t),m=(0,i.default)(`${u}-item-meta`,a),g=r.default.createElement("div",{className:`${u}-item-meta-content`},l&&r.default.createElement("h4",{className:`${u}-item-meta-title`},l),s&&r.default.createElement("div",{className:`${u}-item-meta-description`},s));return r.default.createElement("div",Object.assign({},d,{className:m}),n&&r.default.createElement("div",{className:`${u}-item-meta-avatar`},n),(l||s)&&g)},e.i(296059);var v=e.i(915654),x=e.i(183293),y=e.i(246422),C=e.i(838378);let k=(0,y.genStyleHooks)("List",e=>{let t=(0,C.mergeToken)(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[(e=>{let{componentCls:t,antCls:r,controlHeight:i,minHeight:a,paddingSM:n,marginLG:o,padding:l,itemPadding:s,colorPrimary:d,itemPaddingSM:c,itemPaddingLG:u,paddingXS:m,margin:g,colorText:h,colorTextDescription:f,motionDurationSlow:p,lineWidth:b,headerBg:y,footerBg:C,emptyTextPadding:k,metaMarginBottom:$,avatarMarginRight:w,titleMarginBottom:S,descriptionFontSize:E}=e;return{[t]:Object.assign(Object.assign({},(0,x.resetComponent)(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:y},[`${t}-footer`]:{background:C},[`${t}-header, ${t}-footer`]:{paddingBlock:n},[`${t}-pagination`]:{marginBlockStart:o,[`${r}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:a,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:s,color:h,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:w},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:h},[`${t}-item-meta-title`]:{margin:`0 0 ${(0,v.unit)(e.marginXXS)} 0`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:h,transition:`all ${p}`,"&:hover":{color:d}}},[`${t}-item-meta-description`]:{color:f,fontSize:E,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${(0,v.unit)(m)}`,color:f,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:b,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${(0,v.unit)(l)} 0`,color:f,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:k,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${r}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:g,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:o},[`${t}-item-meta`]:{marginBlockEnd:$,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:S,color:h,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:l,marginInlineStart:"auto","> li":{padding:`0 ${(0,v.unit)(l)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:i},[`${t}-split${t}-something-after-last-item ${r}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:u},[`${t}-sm ${t}-item`]:{padding:c},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}})(t),(e=>{let{listBorderedCls:t,componentCls:r,paddingLG:i,margin:a,itemPaddingSM:n,itemPaddingLG:o,marginLG:l,borderRadiusLG:s}=e,d=(0,v.unit)(e.calc(s).sub(e.lineWidth).equal());return{[t]:{border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:s,[`${r}-header`]:{borderRadius:`${d} ${d} 0 0`},[`${r}-footer`]:{borderRadius:`0 0 ${d} ${d}`},[`${r}-header,${r}-footer,${r}-item`]:{paddingInline:i},[`${r}-pagination`]:{margin:`${(0,v.unit)(a)} ${(0,v.unit)(l)}`}},[`${t}${r}-sm`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:n}},[`${t}${r}-lg`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:o}}}})(t),(e=>{let{componentCls:t,screenSM:r,screenMD:i,marginLG:a,marginSM:n,margin:o}=e;return{[`@media screen and (max-width:${i}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:a}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:a}}}},[`@media screen and (max-width: ${r}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:n}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${(0,v.unit)(o)}`}}}}}})(t)]},e=>({contentWidth:220,itemPadding:`${(0,v.unit)(e.paddingContentVertical)} 0`,itemPaddingSM:`${(0,v.unit)(e.paddingContentVerticalSM)} ${(0,v.unit)(e.paddingContentHorizontal)}`,itemPaddingLG:`${(0,v.unit)(e.paddingContentVerticalLG)} ${(0,v.unit)(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}));var $=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[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])&&(r[i[a]]=e[i[a]]);return r};let w=r.forwardRef(function(e,h){let{pagination:f=!1,prefixCls:p,bordered:b=!1,split:v=!0,className:x,rootClassName:y,style:C,children:w,itemLayout:S,loadMore:E,grid:O,dataSource:M=[],size:N,header:j,footer:z,loading:P=!1,rowKey:_,renderItem:T,locale:I}=e,L=$(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),R=f&&"object"==typeof f?f:{},[B,H]=r.useState(R.defaultCurrent||1),[V,A]=r.useState(R.defaultPageSize||10),{getPrefixCls:W,direction:K,className:D,style:F}=(0,o.useComponentConfig)("list"),{renderEmpty:U}=r.useContext(o.ConfigContext),X=e=>(t,r)=>{var i;H(t),A(r),f&&(null==(i=null==f?void 0:f[e])||i.call(f,t,r))},q=X("onChange"),Y=X("onShowSizeChange"),G=!!(E||f||z),J=W("list",p),[Q,Z,ee]=k(J),et=P;"boolean"==typeof et&&(et={spinning:et});let er=!!(null==et?void 0:et.spinning),ei=(0,s.default)(N),ea="";switch(ei){case"large":ea="lg";break;case"small":ea="sm"}let en=(0,i.default)(J,{[`${J}-vertical`]:"vertical"===S,[`${J}-${ea}`]:ea,[`${J}-split`]:v,[`${J}-bordered`]:b,[`${J}-loading`]:er,[`${J}-grid`]:!!O,[`${J}-something-after-last-item`]:G,[`${J}-rtl`]:"rtl"===K},D,x,y,Z,ee),eo=(0,a.default)({current:1,total:0,position:"bottom"},{total:M.length,current:B,pageSize:V},f||{}),el=Math.ceil(eo.total/eo.pageSize);eo.current=Math.min(eo.current,el);let es=f&&r.createElement("div",{className:(0,i.default)(`${J}-pagination`)},r.createElement(u.default,Object.assign({align:"end"},eo,{onChange:q,onShowSizeChange:Y}))),ed=(0,t.default)(M);f&&M.length>(eo.current-1)*eo.pageSize&&(ed=(0,t.default)(M).splice((eo.current-1)*eo.pageSize,eo.pageSize));let ec=Object.keys(O||{}).some(e=>["xs","sm","md","lg","xl","xxl"].includes(e)),eu=(0,c.default)(ec),em=r.useMemo(()=>{for(let e=0;e{if(!O)return;let e=em&&O[em]?O[em]:O.column;if(e)return{width:`${100/e}%`,maxWidth:`${100/e}%`}},[JSON.stringify(O),em]),eh=er&&r.createElement("div",{style:{minHeight:53}});if(ed.length>0){let e=ed.map((e,t)=>{let i;return T?((i="function"==typeof _?_(e):_?e[_]:e.key)||(i=`list-item-${t}`),r.createElement(r.Fragment,{key:i},T(e,t))):null});eh=O?r.createElement(d.Row,{gutter:O.gutter},r.Children.map(e,e=>r.createElement("div",{key:null==e?void 0:e.key,style:eg},e))):r.createElement("ul",{className:`${J}-items`},e)}else w||er||(eh=r.createElement("div",{className:`${J}-empty-text`},(null==I?void 0:I.emptyText)||(null==U?void 0:U("List"))||r.createElement(l.default,{componentName:"List"})));let ef=eo.position,ep=r.useMemo(()=>({grid:O,itemLayout:S}),[JSON.stringify(O),S]);return Q(r.createElement(g.Provider,{value:ep},r.createElement("div",Object.assign({ref:h,style:Object.assign(Object.assign({},F),C),className:en},L),("top"===ef||"both"===ef)&&es,j&&r.createElement("div",{className:`${J}-header`},j),r.createElement(m.default,Object.assign({},et),eh,w),z&&r.createElement("div",{className:`${J}-footer`},z),E||("bottom"===ef||"both"===ef)&&es)))});w.Item=b,e.s(["List",0,w],573421)},837007,e=>{"use strict";var t=e.i(603908);e.s(["PlusIcon",()=>t.default])},509345,e=>{"use strict";var t=e.i(843476),r=e.i(487304),i=e.i(135214);e.s(["default",0,()=>{let{accessToken:e}=(0,i.default)();return(0,t.jsx)(r.default,{accessToken:e})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7736882a2e4e2f73.js b/litellm/proxy/_experimental/out/_next/static/chunks/7736882a2e4e2f73.js new file mode 100644 index 0000000000..993aeded23 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/7736882a2e4e2f73.js @@ -0,0 +1,17 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,384767,e=>{"use strict";var t=e.i(843476),r=e.i(599724),a=e.i(271645),l=e.i(389083);let n=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:"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(764205);let o=function({vectorStores:e,accessToken:o}){let[s,d]=(0,a.useState)([]);return(0,a.useEffect)(()=>{(async()=>{if(o&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(o);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)}})()},[o,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)(l.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 a;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:(a=s.find(t=>t.vector_store_id===e))?`${a.vector_store_name||a.vector_store_id} (${a.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"})]})]})},s=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 d=e.i(871943),c=e.i(502547),m=e.i(592968);let g=function({mcpServers:e,mcpAccessGroups:n=[],mcpToolPermissions:o={},mcpToolsets:g=[],accessToken:u}){let[p,b]=(0,a.useState)([]),[h,f]=(0,a.useState)([]),[x,v]=(0,a.useState)(new Set),[y,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{(async()=>{if(u&&e.length>0)try{let e=await (0,i.fetchMCPServers)(u);e&&Array.isArray(e)?b(e):e.data&&Array.isArray(e.data)&&b(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[u,e.length]),(0,a.useEffect)(()=>{(async()=>{if(u&&g.length>0)try{let e=await (0,i.fetchMCPToolsets)(u),t=Array.isArray(e)?e.filter(e=>g.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[u,g.length]);let $=[...e.map(e=>({type:"server",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],w=$.length+g.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)(s,{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)(l.Badge,{color:"blue",size:"xs",children:w})]}),w>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[$.map((e,r)=>{let a="server"===e.type?o[e.value]:void 0,l=a&&a.length>0,n=x.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return l&&(t=e.value,void v(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 ${l?"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)(m.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 flex-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} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),l&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:a.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===a.length?"tool":"tools"}),n?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l&&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:a.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)}),g.length>0&&g.map((e,r)=>{let a=h.find(t=>t.toolset_id===e),l=y.has(e),n=a?.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:a?.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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),n>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),l?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),n>0&&l&&a&&(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:a.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)(s,{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"})]})]})},u=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:"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"}))}),p=function({agents:e,agentAccessGroups:n=[],accessToken:o}){let[s,d]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(o&&e.length>0)try{let e=await (0,i.getAgentsList)(o);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[o,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],g=c.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)(u,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(l.Badge,{color:"purple",size:"xs",children:g})]}),g>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.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)(m.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=s.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 flex-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 uppercase tracking-wide flex-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)(u,{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:a="card",className:l="",accessToken:n}){let i=e?.vector_stores||[],s=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},m=e?.mcp_toolsets||[],u=e?.agents||[],b=e?.agent_access_groups||[],h=(0,t.jsxs)("div",{className:"card"===a?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(o,{vectorStores:i,accessToken:n}),(0,t.jsx)(g,{mcpServers:s,mcpAccessGroups:d,mcpToolPermissions:c,mcpToolsets:m,accessToken:n}),(0,t.jsx)(p,{agents:u,agentAccessGroups:b,accessToken:n})]});return"card"===a?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${l}`,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"})]})}),h]}):(0,t.jsxs)("div",{className:`${l}`,children:[(0,t.jsx)(r.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),h]})}],384767)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(908206),l=e.i(242064),n=e.i(517455),i=e.i(150073);let o={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 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},m=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 g=e=>{let{itemPrefixCls:a,component:l,span:n,className:i,style:o,labelStyle:d,contentStyle:c,bordered:m,label:g,content:u,colon:p,type:b,styles:h}=e,{classNames:f}=t.useContext(s),x=Object.assign(Object.assign({},d),null==h?void 0:h.label),v=Object.assign(Object.assign({},c),null==h?void 0:h.content);if(m)return t.createElement(l,{colSpan:n,style:o,className:(0,r.default)(i,{[`${a}-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:x},g),null!=u&&t.createElement("span",{style:v},u));return t.createElement(l,{colSpan:n,style:o,className:(0,r.default)(`${a}-item`,i)},t.createElement("div",{className:`${a}-item-container`},null!=g&&t.createElement("span",{style:x,className:(0,r.default)(`${a}-item-label`,null==f?void 0:f.label,{[`${a}-item-no-colon`]:!p})},g),null!=u&&t.createElement("span",{style:v,className:(0,r.default)(`${a}-item-content`,null==f?void 0:f.content)},u)))};function u(e,{colon:r,prefixCls:a,bordered:l},{component:n,type:i,showLabel:o,showContent:s,labelStyle:d,contentStyle:c,styles:m}){return e.map(({label:e,children:u,prefixCls:p=a,className:b,style:h,labelStyle:f,contentStyle:x,span:v=1,key:y,styles:j},$)=>"string"==typeof n?t.createElement(g,{key:`${i}-${y||$}`,className:b,style:h,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==m?void 0:m.label),f),null==j?void 0:j.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==m?void 0:m.content),x),null==j?void 0:j.content)},span:v,colon:r,component:n,itemPrefixCls:p,bordered:l,label:o?e:null,content:s?u:null,type:i}):[t.createElement(g,{key:`label-${y||$}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==m?void 0:m.label),h),f),null==j?void 0:j.label),span:1,colon:r,component:n[0],itemPrefixCls:p,bordered:l,label:e,type:"label"}),t.createElement(g,{key:`content-${y||$}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==m?void 0:m.content),h),x),null==j?void 0:j.content),span:2*v-1,component:n[1],itemPrefixCls:p,bordered:l,content:u,type:"content"})])}let p=e=>{let r=t.useContext(s),{prefixCls:a,vertical:l,row:n,index:i,bordered:o}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${a}-row`},u(n,e,Object.assign({component:"th",type:"label",showLabel:!0},r))),t.createElement("tr",{key:`content-${i}`,className:`${a}-row`},u(n,e,Object.assign({component:"td",type:"content",showContent:!0},r)))):t.createElement("tr",{key:i,className:`${a}-row`},u(n,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},r)))};e.i(296059);var b=e.i(915654),h=e.i(183293),f=e.i(246422),x=e.i(838378);let v=(0,f.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:r,itemPaddingBottom:a,itemPaddingEnd:l,colonMarginRight:n,colonMarginLeft:i,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,h.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:r}=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:r,"&::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: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:r,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,b.unit)(i)} ${(0,b.unit)(n)}`},[`&${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,x.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 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 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 j=e=>{let g,{prefixCls:u,title:b,extra:h,column:f,colon:x=!0,bordered:j,layout:$,children:w,className:C,rootClassName:O,style:k,size:N,labelStyle:S,contentStyle:E,styles:T,items:z,classNames:B}=e,M=y(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:P,direction:R,className:L,style:H,classNames:I,styles:_}=(0,l.useComponentConfig)("descriptions"),A=P("descriptions",u),W=(0,i.default)(),q=t.useMemo(()=>{var e;return"number"==typeof f?f:null!=(e=(0,a.matchScreen)(W,Object.assign(Object.assign({},o),f)))?e:3},[W,f]),G=(g=t.useMemo(()=>z||(0,d.default)(w).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[z,w]),t.useMemo(()=>g.map(e=>{var{span:t}=e,r=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},r),{filled:!0}):Object.assign(Object.assign({},r),{span:"number"==typeof t?t:(0,a.matchScreen)(W,t)})}),[g,W])),F=(0,n.default)(N),X=((e,r)=>{let[a,l]=(0,t.useMemo)(()=>{let t,a,l,n;return t=[],a=[],l=!1,n=0,r.filter(e=>e).forEach(r=>{let{filled:i}=r,o=m(r,["filled"]);if(i){a.push(o),t.push(a),a=[],n=0;return}let s=e-n;(n+=r.span||1)>=e?(n>e?(l=!0,a.push(Object.assign(Object.assign({},o),{span:s}))):a.push(o),t.push(a),a=[],n=0):a.push(o)}),a.length>0&&t.push(a),[t=t.map(t=>{let r=t.reduce((e,t)=>e+(t.span||1),0);if(r({labelStyle:S,contentStyle:E,styles:{content:Object.assign(Object.assign({},_.content),null==T?void 0:T.content),label:Object.assign(Object.assign({},_.label),null==T?void 0:T.label)},classNames:{label:(0,r.default)(I.label,null==B?void 0:B.label),content:(0,r.default)(I.content,null==B?void 0:B.content)}}),[S,E,T,B,I,_]);return D(t.createElement(s.Provider,{value:V},t.createElement("div",Object.assign({className:(0,r.default)(A,L,I.root,null==B?void 0:B.root,{[`${A}-${F}`]:F&&"default"!==F,[`${A}-bordered`]:!!j,[`${A}-rtl`]:"rtl"===R},C,O,Y,K),style:Object.assign(Object.assign(Object.assign(Object.assign({},H),_.root),null==T?void 0:T.root),k)},M),(b||h)&&t.createElement("div",{className:(0,r.default)(`${A}-header`,I.header,null==B?void 0:B.header),style:Object.assign(Object.assign({},_.header),null==T?void 0:T.header)},b&&t.createElement("div",{className:(0,r.default)(`${A}-title`,I.title,null==B?void 0:B.title),style:Object.assign(Object.assign({},_.title),null==T?void 0:T.title)},b),h&&t.createElement("div",{className:(0,r.default)(`${A}-extra`,I.extra,null==B?void 0:B.extra),style:Object.assign(Object.assign({},_.extra),null==T?void 0:T.extra)},h)),t.createElement("div",{className:`${A}-view`},t.createElement("table",null,t.createElement("tbody",null,X.map((e,r)=>t.createElement(p,{key:r,index:r,colon:x,prefixCls:A,vertical:"vertical"===$,bordered:j,row:e}))))))))};j.Item=({children:e})=>e,e.s(["Descriptions",0,j],869216)},270377,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:"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),n=r.forwardRef(function(e,n){return r.createElement(l.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ExclamationCircleOutlined",0,n],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(242064),n=e.i(517455),i=e.i(185793),o=e.i(721369),s=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 d=e=>{var{prefixCls:a,className:n,hoverable:i=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("card",a),m=(0,r.default)(`${c}-grid`,n,{[`${c}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},o,{className:m}))};e.i(296059);var c=e.i(915654),m=e.i(183293),g=e.i(246422),u=e.i(838378);let p=(0,g.genStyleHooks)("Card",e=>{let t=(0,u.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:r,cardHeadPadding:a,colorBorderSecondary:l,boxShadowTertiary:n,bodyPadding:i,extraColor:o}=e;return{[t]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:n},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:a,headerPadding:l,tabsMarginBottom:n}=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,m.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},m.textEllipsis),{[` + > ${r}-typography, + > ${r}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:n,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:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:i,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:a,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${(0,c.unit)(l)} 0 0 0 ${r}, + 0 ${(0,c.unit)(l)} 0 0 ${r}, + ${(0,c.unit)(l)} ${(0,c.unit)(l)} 0 0 ${r}, + ${(0,c.unit)(l)} 0 0 0 ${r} inset, + 0 ${(0,c.unit)(l)} 0 0 ${r} 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:r,actionsLiMargin:a,cardActionsIconSize:l,colorBorderSecondary:n,actionsBg:i}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:i,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${n}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},(0,m.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), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:l,lineHeight:(0,c.unit)(e.calc(l).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${n}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,c.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,m.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},m.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:r}},[`${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:r,headerPadding:a,bodyPadding:l}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(a)}`,background:r,"&-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:r,headerPaddingSM:a,headerHeightSM:l,headerFontSizeSM:n}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:l,padding:`0 ${(0,c.unit)(a)}`,fontSize:n,[`> ${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 b=e.i(792812),h=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 f=e=>{let{actionClasses:r,actions:a=[],actionStyle:l}=e;return t.createElement("ul",{className:r,style:l},a.map((e,r)=>{let l=`action-${r}`;return t.createElement("li",{style:{width:`${100/a.length}%`},key:l},t.createElement("span",null,e))}))},x=t.forwardRef((e,s)=>{let c,{prefixCls:m,className:g,rootClassName:u,style:x,extra:v,headStyle:y={},bodyStyle:j={},title:$,loading:w,bordered:C,variant:O,size:k,type:N,cover:S,actions:E,tabList:T,children:z,activeTabKey:B,defaultActiveTabKey:M,tabBarExtraContent:P,hoverable:R,tabProps:L={},classNames:H,styles:I}=e,_=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:A,direction:W,card:q}=t.useContext(l.ConfigContext),[G]=(0,b.default)("card",O,C),F=e=>{var t;return(0,r.default)(null==(t=null==q?void 0:q.classNames)?void 0:t[e],null==H?void 0:H[e])},X=e=>{var t;return Object.assign(Object.assign({},null==(t=null==q?void 0:q.styles)?void 0:t[e]),null==I?void 0:I[e])},D=t.useMemo(()=>{let e=!1;return t.Children.forEach(z,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[z]),Y=A("card",m),[K,V,U]=p(Y),Q=t.createElement(i.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},z),J=void 0!==B,Z=Object.assign(Object.assign({},L),{[J?"activeKey":"defaultActiveKey"]:J?B:M,tabBarExtraContent:P}),ee=(0,n.default)(k),et=ee&&"default"!==ee?ee:"large",er=T?t.createElement(o.default,Object.assign({size:et},Z,{className:`${Y}-head-tabs`,onChange:t=>{var r;null==(r=e.onTabChange)||r.call(e,t)},items:T.map(e=>{var{tab:t}=e;return Object.assign({label:t},h(e,["tab"]))})})):null;if($||v||er){let e=(0,r.default)(`${Y}-head`,F("header")),a=(0,r.default)(`${Y}-head-title`,F("title")),l=(0,r.default)(`${Y}-extra`,F("extra")),n=Object.assign(Object.assign({},y),X("header"));c=t.createElement("div",{className:e,style:n},t.createElement("div",{className:`${Y}-head-wrapper`},$&&t.createElement("div",{className:a,style:X("title")},$),v&&t.createElement("div",{className:l,style:X("extra")},v)),er)}let ea=(0,r.default)(`${Y}-cover`,F("cover")),el=S?t.createElement("div",{className:ea,style:X("cover")},S):null,en=(0,r.default)(`${Y}-body`,F("body")),ei=Object.assign(Object.assign({},j),X("body")),eo=t.createElement("div",{className:en,style:ei},w?Q:z),es=(0,r.default)(`${Y}-actions`,F("actions")),ed=(null==E?void 0:E.length)?t.createElement(f,{actionClasses:es,actionStyle:X("actions"),actions:E}):null,ec=(0,a.default)(_,["onTabChange"]),em=(0,r.default)(Y,null==q?void 0:q.className,{[`${Y}-loading`]:w,[`${Y}-bordered`]:"borderless"!==G,[`${Y}-hoverable`]:R,[`${Y}-contain-grid`]:D,[`${Y}-contain-tabs`]:null==T?void 0:T.length,[`${Y}-${ee}`]:ee,[`${Y}-type-${N}`]:!!N,[`${Y}-rtl`]:"rtl"===W},g,u,V,U),eg=Object.assign(Object.assign({},null==q?void 0:q.style),x);return K(t.createElement("div",Object.assign({ref:s},ec,{className:em,style:eg}),c,el,eo,ed))});var 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 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};x.Grid=d,x.Meta=e=>{let{prefixCls:a,className:n,avatar:i,title:o,description:s}=e,d=v(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(l.ConfigContext),m=c("card",a),g=(0,r.default)(`${m}-meta`,n),u=i?t.createElement("div",{className:`${m}-meta-avatar`},i):null,p=o?t.createElement("div",{className:`${m}-meta-title`},o):null,b=s?t.createElement("div",{className:`${m}-meta-description`},s):null,h=p||b?t.createElement("div",{className:`${m}-meta-detail`},p,b):null;return t.createElement("div",Object.assign({},d,{className:g}),u,h)},e.s(["Card",0,x],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),r=e.i(560445),a=e.i(175712),l=e.i(869216),n=e.i(311451),i=e.i(212931),o=e.i(898586);e.i(296059);var s=e.i(868297),d=e.i(732961),c=e.i(289882),m=e.i(170517),g=e.i(628882),u=e.i(320890),p=e.i(104458),b=e.i(722319),h=e.i(8398),f=e.i(279728);e.i(765846);var x=e.i(602716),v=e.i(328052);e.i(262370);var y=e.i(135551);let j=(e,t)=>new y.FastColor(e).setA(t).toRgbString(),$=(e,t)=>new y.FastColor(e).lighten(t).toHexString(),w=e=>{let t=(0,x.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]}},C=(e,t)=>{let r=e||"#000",a=t||"#fff";return{colorBgBase:r,colorTextBase:a,colorText:j(a,.85),colorTextSecondary:j(a,.65),colorTextTertiary:j(a,.45),colorTextQuaternary:j(a,.25),colorFill:j(a,.18),colorFillSecondary:j(a,.12),colorFillTertiary:j(a,.08),colorFillQuaternary:j(a,.04),colorBgSolid:j(a,.95),colorBgSolidHover:j(a,1),colorBgSolidActive:j(a,.9),colorBgElevated:$(r,12),colorBgContainer:$(r,8),colorBgLayout:$(r,0),colorBgSpotlight:$(r,26),colorBgBlur:j(a,.04),colorBorder:$(r,26),colorBorderSecondary:$(r,19)}},O={defaultSeed:u.defaultConfig.token,useToken:function(){let[e,t,r]=(0,p.useToken)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:b.default,darkAlgorithm:(e,t)=>{let r=Object.keys(m.defaultPresetColors).map(t=>{let r=(0,x.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,a,l)=>(e[`${t}-${l+1}`]=r[l],e[`${t}${l+1}`]=r[l],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),a=null!=t?t:(0,b.default)(e),l=(0,v.default)(e,{generateColorPalettes:w,generateNeutralColorPalettes:C});return Object.assign(Object.assign(Object.assign(Object.assign({},a),r),l),{colorPrimaryBg:l.colorPrimaryBorder,colorPrimaryBgHover:l.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,b.default)(e),a=r.fontSizeSM,l=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,a=r-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,f.default)(a)),{controlHeight:l}),(0,h.default)(Object.assign(Object.assign({},r),{controlHeight:l})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):c.default,r=Object.assign(Object.assign({},m.default),null==e?void 0:e.token);return(0,d.getComputedToken)(r,{override:null==e?void 0:e.token},t,g.default)},defaultConfig:u.defaultConfig,_internalContext:u.DesignTokenContext};e.s(["theme",0,O],368869);var k=e.i(270377),N=e.i(271645);function S({isOpen:e,title:s,alertMessage:d,message:c,resourceInformationTitle:m,resourceInformation:g,onCancel:u,onOk:p,confirmLoading:b,requiredConfirmation:h}){let{Title:f,Text:x}=o.Typography,{token:v}=O.useToken(),[y,j]=(0,N.useState)("");return(0,N.useEffect)(()=>{e&&j("")},[e]),(0,t.jsx)(i.Modal,{title:s,open:e,onOk:p,onCancel:u,confirmLoading:b,okText:b?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!h&&y!==h||b},cancelButtonProps:{disabled:b},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(r.Alert,{message:d,type:"warning"}),(0,t.jsx)(a.Card,{title:m,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:g&&g.map(({label:e,value:r,...a})=>(0,t.jsx)(l.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(x,{...a,children:r??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(x,{children:c})}),h&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(x,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(x,{children:"Type "}),(0,t.jsx)(x,{strong:!0,type:"danger",children:h}),(0,t.jsx)(x,{children:" to confirm deletion:"})]}),(0,t.jsx)(n.Input,{value:y,onChange:e=>j(e.target.value),placeholder:h,className:"rounded-md",prefix:(0,t.jsx)(k.ExclamationCircleOutlined,{style:{color:v.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>S],127952)},530212,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 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,r],530212)},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)},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var l=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(l.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["default",0,n],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(529681);let n=e=>{let{prefixCls:a,className:l,style:n,size:i,shape:o}=e,s=(0,r.default)({[`${a}-lg`]:"large"===i,[`${a}-sm`]:"small"===i}),d=(0,r.default)({[`${a}-circle`]:"circle"===o,[`${a}-square`]:"square"===o,[`${a}-round`]:"round"===o}),c=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(a,s,d,l),style:Object.assign(Object.assign({},c),n)})};e.i(296059);var i=e.i(694758),o=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),m=e=>({height:e,lineHeight:(0,o.unit)(e)}),g=e=>Object.assign({width:e},m(e)),u=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},m(e)),p=e=>Object.assign({width:e},m(e)),b=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},h=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},m(e)),f=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:l,skeletonButtonCls:n,skeletonInputCls:i,skeletonImageCls:o,controlHeight:s,controlHeightLG:d,controlHeightSM:m,gradientFromColor:f,padding:x,marginSM:v,borderRadius:y,titleHeight:j,blockRadius:$,paragraphLiHeight:w,controlHeightXS:C,paragraphMarginTop:O}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:x,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:f},g(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},g(d)),[`${r}-sm`]:Object.assign({},g(m))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:j,background:f,borderRadius:$,[`+ ${l}`]:{marginBlockStart:m}},[l]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:f,borderRadius:$,"+ li":{marginBlockStart:C}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${l} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:v,[`+ ${l}`]:{marginBlockStart:O}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:l,controlHeightSM:n,gradientFromColor:i,calc:o}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:o(a).mul(2).equal(),minWidth:o(a).mul(2).equal()},h(a,o))},b(e,a,r)),{[`${r}-lg`]:Object.assign({},h(l,o))}),b(e,l,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},h(n,o))}),b(e,n,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:l,controlHeightSM:n}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},g(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},g(l)),[`${t}${t}-sm`]:Object.assign({},g(n))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:l,controlHeightSM:n,gradientFromColor:i,calc:o}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},u(t,o)),[`${a}-lg`]:Object.assign({},u(l,o)),[`${a}-sm`]:Object.assign({},u(n,o))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:l,calc:n}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:l},p(n(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},p(r)),{maxWidth:n(r).mul(4).equal(),maxHeight:n(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[n]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${l} > li, + ${r}, + ${n}, + ${i}, + ${o} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),x=e=>{let{prefixCls:a,className:l,style:n,rows:i=0}=e,o=Array.from({length:i}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:n},o)},v=({prefixCls:e,className:a,width:l,style:n})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},n)});function y(e){return e&&"object"==typeof e?e:{}}let j=e=>{let{prefixCls:l,loading:i,className:o,rootClassName:s,style:d,children:c,avatar:m=!1,title:g=!0,paragraph:u=!0,active:p,round:b}=e,{getPrefixCls:h,direction:j,className:$,style:w}=(0,a.useComponentConfig)("skeleton"),C=h("skeleton",l),[O,k,N]=f(C);if(i||!("loading"in e)){let e,a,l=!!m,i=!!g,c=!!u;if(l){let r=Object.assign(Object.assign({prefixCls:`${C}-avatar`},i&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),y(m));e=t.createElement("div",{className:`${C}-header`},t.createElement(n,Object.assign({},r)))}if(i||c){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${C}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),y(g));e=t.createElement(v,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${C}-paragraph`},(e={},l&&i||(e.width="61%"),!l&&i?e.rows=3:e.rows=2,e)),y(u));r=t.createElement(x,Object.assign({},a))}a=t.createElement("div",{className:`${C}-content`},e,r)}let h=(0,r.default)(C,{[`${C}-with-avatar`]:l,[`${C}-active`]:p,[`${C}-rtl`]:"rtl"===j,[`${C}-round`]:b},$,o,s,k,N);return O(t.createElement("div",{className:h,style:Object.assign(Object.assign({},w),d)},e,a))}return null!=c?c:null};j.Button=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,block:c=!1,size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",i),[p,b,h]=f(u),x=(0,l.default)(e,["prefixCls"]),v=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},o,s,b,h);return p(t.createElement("div",{className:v},t.createElement(n,Object.assign({prefixCls:`${u}-button`,size:m},x))))},j.Avatar=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,shape:c="circle",size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",i),[p,b,h]=f(u),x=(0,l.default)(e,["prefixCls","className"]),v=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d},o,s,b,h);return p(t.createElement("div",{className:v},t.createElement(n,Object.assign({prefixCls:`${u}-avatar`,shape:c,size:m},x))))},j.Input=e=>{let{prefixCls:i,className:o,rootClassName:s,active:d,block:c,size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",i),[p,b,h]=f(u),x=(0,l.default)(e,["prefixCls"]),v=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},o,s,b,h);return p(t.createElement("div",{className:v},t.createElement(n,Object.assign({prefixCls:`${u}-input`,size:m},x))))},j.Image=e=>{let{prefixCls:l,className:n,rootClassName:i,style:o,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[m,g,u]=f(c),p=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},n,i,g,u);return m(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${c}-image`,n),style:o},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`})))))},j.Node=e=>{let{prefixCls:l,className:n,rootClassName:i,style:o,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),m=c("skeleton",l),[g,u,p]=f(m),b=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:s},u,n,i,p);return g(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${m}-image`,n),style:o},d)))},e.s(["default",0,j],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],n=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,o=(e,t,r,a,l)=>{clearTimeout(a.current);let i=n(e);t(i),r.current=i,l&&l({current:i})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let m=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 g=e.i(95779);let u={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,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,g.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,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},b=(0,c.makeClassName)("Button"),h=({loading:e,iconSize:t,iconPosition:r,Icon:l,needMargin:n,transitionStatus:i})=>{let o=n?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),g={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(m,{className:(0,d.tremorTwMerge)(b("icon"),"animate-spin shrink-0",o,g.default,g[i]),style:{transition:"width 150ms"}}):a.default.createElement(l,{className:(0,d.tremorTwMerge)(b("icon"),"shrink-0",t,o)})},f=a.default.forwardRef((e,l)=>{let{icon:m,iconPosition:g=s.HorizontalPositions.Left,size:f=s.Sizes.SM,color:x,variant:v="primary",disabled:y,loading:j=!1,loadingText:$,children:w,tooltip:C,className:O}=e,k=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),N=j||y,S=void 0!==m||j,E=j&&$,T=!(!w&&!E),z=(0,d.tremorTwMerge)(u[f].height,u[f].width),B="light"!==v?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",M=p(v,x),P=("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"}})[f],{tooltipProps:R,getReferenceProps:L}=(0,r.useTooltip)(300),[H,I]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:l,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:m,onStateChange:g}={})=>{let[u,p]=(0,a.useState)(()=>n(d?2:i(c))),b=(0,a.useRef)(u),h=(0,a.useRef)(0),[f,x]="object"==typeof s?[s.enter,s.exit]:[s,s],v=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(b.current._s,m);e&&o(e,p,b,h,g)},[g,m]);return[u,(0,a.useCallback)(a=>{let n=e=>{switch(o(e,p,b,h,g),e){case 1:f>=0&&(h.current=((...e)=>setTimeout(...e))(v,f));break;case 4:x>=0&&(h.current=((...e)=>setTimeout(...e))(v,x));break;case 0:case 3:h.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||n(e+1)},0)}},s=b.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||n(e?+!r:2):s&&n(t?l?3:4:i(m))},[v,g,e,t,r,l,f,x,m]),v]})({timeout:50});return(0,a.useEffect)(()=>{I(j)},[j]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([l,R.refs.setReference]),className:(0,d.tremorTwMerge)(b("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",B,P.paddingX,P.paddingY,P.fontSize,M.textColor,M.bgColor,M.borderColor,M.hoverBorderColor,N?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(p(v,x).hoverTextColor,p(v,x).hoverBgColor,p(v,x).hoverBorderColor),O),disabled:N},L,k),a.default.createElement(r.default,Object.assign({text:C},R)),S&&g!==s.HorizontalPositions.Right?a.default.createElement(h,{loading:j,iconSize:z,iconPosition:g,Icon:m,transitionStatus:H.status,needMargin:T}):null,E||w?a.default.createElement("span",{className:(0,d.tremorTwMerge)(b("text"),"text-tremor-default whitespace-nowrap")},E?$:w):null,S&&g===s.HorizontalPositions.Right?a.default.createElement(h,{loading:j,iconSize:z,iconPosition:g,Icon:m,transitionStatus:H.status,needMargin:T}):null)});f.displayName="Button",e.s(["Button",()=>f],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",o)},r.default.createElement("table",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});n.displayName="Table",e.s(["Table",()=>n],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",o)},s),i))});n.displayName="TableBody",e.s(["TableBody",()=>n],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",o)},s),i))});n.displayName="TableCell",e.s(["TableCell",()=>n],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",o)},s),i))});n.displayName="TableHead",e.s(["TableHead",()=>n],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:n,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",o)},s),i))});n.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>n],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),n=r.default.forwardRef((e,n)=>{let{children:i,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("row"),o)},s),i))});n.displayName="TableRow",e.s(["TableRow",()=>n],496020)},68155,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 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,r],68155)},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)},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)},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)},292639,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},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)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7fe89dd32bb4f5b6.js b/litellm/proxy/_experimental/out/_next/static/chunks/7fe89dd32bb4f5b6.js new file mode 100644 index 0000000000..514b3dcf3c --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/7fe89dd32bb4f5b6.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,362133,457202,439061,182399,234779,374615,330995,592143,372943,899268,87316,655900,299023,25652,882293,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ApartmentOutlined",0,r],362133);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-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-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["AuditOutlined",0,n],457202);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"};var d=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:o}))});e.s(["BgColorsOutlined",0,d],439061);let c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"};var m=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:c}))});e.s(["BlockOutlined",0,m],182399);let u={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-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};var g=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:u}))});e.s(["BookOutlined",0,g],234779);let x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var p=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:x}))});e.s(["CreditCardOutlined",0,p],374615);var h=e.i(366845);e.s(["FolderOutlined",()=>h.default],330995);var f=e.i(609587);e.s(["ConfigProvider",()=>f.default],592143);var y=e.i(8211),b=e.i(343794),v=e.i(529681),j=e.i(242064),N=e.i(704914),k=e.i(876556),w=e.i(290224),O=e.i(251224),_=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,s=Object.getOwnPropertySymbols(e);lt.indexOf(s[l])&&Object.prototype.propertyIsEnumerable.call(e,s[l])&&(a[s[l]]=e[s[l]]);return a};function L({suffixCls:e,tagName:t,displayName:s}){return s=>a.forwardRef((l,r)=>a.createElement(s,Object.assign({ref:r,suffixCls:e,tagName:t},l)))}let C=a.forwardRef((e,t)=>{let{prefixCls:s,suffixCls:l,className:r,tagName:i}=e,n=_(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:o}=a.useContext(j.ConfigContext),d=o("layout",s),[c,m,u]=(0,O.default)(d),g=l?`${d}-${l}`:d;return c(a.createElement(i,Object.assign({className:(0,b.default)(s||g,r,m,u),ref:t},n)))}),S=a.forwardRef((e,t)=>{let{direction:s}=a.useContext(j.ConfigContext),[l,r]=a.useState([]),{prefixCls:i,className:n,rootClassName:o,children:d,hasSider:c,tagName:m,style:u}=e,g=_(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),x=(0,v.default)(g,["suffixCls"]),{getPrefixCls:p,className:h,style:f}=(0,j.useComponentConfig)("layout"),L=p("layout",i),C="boolean"==typeof c?c:!!l.length||(0,k.default)(d).some(e=>e.type===w.default),[S,M,H]=(0,O.default)(L),P=(0,b.default)(L,{[`${L}-has-sider`]:C,[`${L}-rtl`]:"rtl"===s},h,n,o,M,H),z=a.useMemo(()=>({siderHook:{addSider:e=>{r(t=>[].concat((0,y.default)(t),[e]))},removeSider:e=>{r(t=>t.filter(t=>t!==e))}}}),[]);return S(a.createElement(N.LayoutContext.Provider,{value:z},a.createElement(m,Object.assign({ref:t,className:P,style:Object.assign(Object.assign({},f),u)},x),d)))}),M=L({tagName:"div",displayName:"Layout"})(S),H=L({suffixCls:"header",tagName:"header",displayName:"Header"})(C),P=L({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(C),z=L({suffixCls:"content",tagName:"main",displayName:"Content"})(C);M.Header=H,M.Footer=P,M.Content=z,M.Sider=w.default,M._InternalSiderContext=w.SiderContext,e.s(["Layout",0,M],372943);var T=e.i(60699);e.s(["Menu",()=>T.default],899268);var R=e.i(475254);let E=(0,R.default)("calendar",[["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"}]]);e.s(["Calendar",()=>E],87316);var U=e.i(399219);e.s(["ChevronUp",()=>U.default],655900);let A=(0,R.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>A],299023);let B=(0,R.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>B],25652);let V=(0,R.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["UserCheck",()=>V],882293)},761911,98740,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>t],98740),e.s(["Users",()=>t],761911)},111672,e=>{"use strict";var t=e.i(247167),a=e.i(843476),s=e.i(109799),l=e.i(785242),r=e.i(135214),i=e.i(218129),n=e.i(362133),o=e.i(477189),d=e.i(457202),c=e.i(299251),m=e.i(153702),u=e.i(439061),g=e.i(182399),x=e.i(234779),p=e.i(374615),h=e.i(210612),f=e.i(19732),y=e.i(872934),b=e.i(993914),v=e.i(330995),j=e.i(438957),N=e.i(777579),k=e.i(788191),w=e.i(983561),O=e.i(602073),_=e.i(928685),L=e.i(313603),C=e.i(232164),S=e.i(645526),M=e.i(366308),H=e.i(771674),P=e.i(592143),z=e.i(372943),T=e.i(899268),R=e.i(271645),E=e.i(708347),U=e.i(844444),A=e.i(371401);e.i(389083);var B=e.i(878894),V=e.i(87316);e.i(664659),e.i(655900);var $=e.i(531278),I=e.i(299023),D=e.i(25652),K=e.i(882293),F=e.i(761911),W=e.i(764205);let G=(...e)=>e.filter(Boolean).join(" ");function q({accessToken:e,width:t=220}){let s=(0,A.useDisableUsageIndicator)(),[l,r]=(0,R.useState)(!1),[i,n]=(0,R.useState)(!1),[o,d]=(0,R.useState)(null),[c,m]=(0,R.useState)(null),[u,g]=(0,R.useState)(!1),[x,p]=(0,R.useState)(null);(0,R.useEffect)(()=>{(async()=>{if(e){g(!0),p(null);try{let[t,a]=await Promise.all([(0,W.getRemainingUsers)(e),(0,W.getLicenseInfo)(e).catch(()=>null)]);d(t),m(a)}catch(e){console.error("Failed to fetch usage data:",e),p("Failed to load usage data")}finally{g(!1)}}})()},[e]);let h=c?.expiration_date?(e=>{if(!e)return null;let t=new Date(e+"T00:00:00Z"),a=new Date;return a.setHours(0,0,0,0),Math.ceil((t.getTime()-a.getTime())/864e5)})(c.expiration_date):null,f=null!==h&&h<0,y=null!==h&&h>=0&&h<30,{isOverLimit:b,isNearLimit:v,usagePercentage:j,userMetrics:N,teamMetrics:k}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let t=e.total_users?e.total_users_used/e.total_users*100:0,a=t>100,s=t>=80&&t<=100,l=e.total_teams?e.total_teams_used/e.total_teams*100:0,r=l>100,i=l>=80&&l<=100,n=a||r;return{isOverLimit:n,isNearLimit:(s||i)&&!n,usagePercentage:Math.max(t,l),userMetrics:{isOverLimit:a,isNearLimit:s,usagePercentage:t},teamMetrics:{isOverLimit:r,isNearLimit:i,usagePercentage:l}}})(o),w=b||v||f||y,O=b||f,_=(v||y)&&!O;return s||!e||o?.total_users===null&&o?.total_teams===null?null:(0,a.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:`${Math.min(t,220)}px`},children:(0,a.jsx)(()=>i?(0,a.jsx)("button",{onClick:()=>n(!1),className:G("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),w&&(0,a.jsx)("span",{className:"flex-shrink-0",children:O?(0,a.jsx)(B.AlertTriangle,{className:"h-3 w-3"}):_?(0,a.jsx)(D.TrendingUp,{className:"h-3 w-3"}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[o&&null!==o.total_users&&(0,a.jsxs)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",o.total_users_used,"/",o.total_users]}),o&&null!==o.total_teams&&(0,a.jsxs)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",o.total_teams_used,"/",o.total_teams]}),c?.expiration_date&&null!==h&&(0,a.jsx)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-700 border-gray-200"),children:h<0?"Exp!":`${h}d`}),!o||null===o.total_users&&null===o.total_teams&&!c&&(0,a.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):u?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,a.jsx)($.Loader2,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):x||!o?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:x||"No data"})}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]})}):(0,a.jsxs)("div",{className:G("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[c?.has_license&&c.expiration_date&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",f&&"border-red-200 bg-red-50",y&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(V.Calendar,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"License"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-600 border-gray-200"),children:f?"Expired":y?"Expiring soon":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Status:"}),(0,a.jsx)("span",{className:G("font-medium text-right",f&&"text-red-600",y&&"text-yellow-600"),children:(e=>{if(null===e)return"No expiration";if(e<0)return"Expired";if(0===e)return"Expires today";if(1===e)return"1 day remaining";if(e<30)return`${e} days remaining`;if(e<60)return"1 month remaining";let t=Math.floor(e/30);return`${t} months remaining`})(h)})]}),c.license_type&&(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Type:"}),(0,a.jsx)("span",{className:"font-medium text-right capitalize",children:c.license_type})]})]}),null!==o.total_users&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(F.Users,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Users"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_users_used,"/",o.total_users]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:G("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:o.total_users_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:G("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(N.usagePercentage,100)}%`}})})]}),null!==o.total_teams&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",k.isOverLimit&&"border-red-200 bg-red-50",k.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(K.UserCheck,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Teams"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:k.isOverLimit?"Over limit":k.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_teams_used,"/",o.total_teams]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:G("font-medium text-right",k.isOverLimit&&"text-red-600",k.isNearLimit&&"text-yellow-600"),children:o.total_teams_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(k.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:G("h-2 rounded-full transition-all duration-300",k.isOverLimit&&"bg-red-500",k.isNearLimit&&"bg-yellow-500",!k.isOverLimit&&!k.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(k.usagePercentage,100)}%`}})})]})]})]}),{})})}let{Sider:Y}=z.Layout,X={"api-reference":"api-reference"},Z=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,a.jsx)(j.KeyOutlined,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,a.jsx)(k.PlayCircleOutlined,{}),roles:E.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:E.rolesWithWriteAccess},{key:"agentic",page:"agentic",label:"Agentic",icon:(0,a.jsx)(w.RobotOutlined,{}),children:[{key:"agents",page:"agents",label:"Agents",icon:(0,a.jsx)(w.RobotOutlined,{}),roles:E.rolesWithWriteAccess},{key:"workflows",page:"workflows",label:"Workflow Runs",icon:(0,a.jsx)(n.ApartmentOutlined,{})},{key:"memory",page:"memory",label:"Memory",icon:(0,a.jsx)(x.BookOutlined,{})}]},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,a.jsx)(M.ToolOutlined,{})},{key:"skills",page:"skills",label:"Skills",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:E.all_admin_roles},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,a.jsx)(O.SafetyOutlined,{})},{key:"policies",page:"policies",label:(0,a.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,a.jsx)(d.AuditOutlined,{}),roles:E.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,a.jsx)(M.ToolOutlined,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,a.jsx)(_.SearchOutlined,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,a.jsx)(h.DatabaseOutlined,{})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,a.jsx)(O.SafetyOutlined,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,a.jsx)(m.BarChartOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles],label:"Usage"},{key:"logs",page:"logs",label:"Logs",icon:(0,a.jsx)(N.LineChartOutlined,{})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,a.jsx)(O.SafetyOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,a.jsx)(S.TeamOutlined,{})},{key:"projects",page:"projects",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,a.jsx)(U.default,{})]}),icon:(0,a.jsx)(v.FolderOutlined,{}),roles:E.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,a.jsx)(H.UserOutlined,{}),roles:E.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,a.jsx)(c.BankOutlined,{}),roles:E.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:E.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,a.jsx)(p.CreditCardOutlined,{}),roles:E.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api-reference",page:"api-reference",label:"API Reference",icon:(0,a.jsx)(i.ApiOutlined,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,a.jsx)(o.AppstoreOutlined,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,a.jsx)(x.BookOutlined,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,a.jsx)(f.ExperimentOutlined,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,a.jsx)(h.DatabaseOutlined,{}),roles:E.all_admin_roles},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,a.jsx)(b.FileTextOutlined,{}),roles:E.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,a.jsx)(C.TagsOutlined,{}),roles:E.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,a.jsx)(m.BarChartOutlined,{})}]}]},{groupLabel:"SETTINGS",roles:E.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,a.jsx)(U.default,{})]}),icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings ",(0,a.jsx)(U.default,{dot:!0,children:(0,a.jsx)("span",{})})]}),icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,a.jsx)(m.BarChartOutlined,{}),roles:E.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,a.jsx)(u.BgColorsOutlined,{}),roles:E.all_admin_roles}]}]}];e.s(["default",0,({setPage:e,defaultSelectedKey:i,collapsed:n=!1,enabledPagesInternalUsers:o,enableProjectsUI:d,disableAgentsForInternalUsers:c,allowAgentsForTeamAdmins:m,disableVectorStoresForInternalUsers:u,allowVectorStoresForTeamAdmins:g})=>{let x,{userId:p,accessToken:h,userRole:f}=(0,r.default)(),{data:b}=(0,s.useOrganizations)(),{data:v}=(0,l.useTeams)(),j=(0,R.useMemo)(()=>!!p&&!!b&&b.some(e=>e.members?.some(e=>e.user_id===p&&"org_admin"===e.user_role)),[p,b]),N=(0,R.useMemo)(()=>(0,E.isUserTeamAdminForAnyTeam)(v??null,p??""),[v,p]),k=t=>{if(X[t])return void e(t);let a=new URLSearchParams(window.location.search);a.set("page",t),window.history.pushState(null,"",`?${a.toString()}`),e(t)},w=(e,s,l)=>{let r;if(l)return(0,a.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{color:"inherit",textDecoration:"none"},children:[e," ",(0,a.jsx)(y.ExportOutlined,{style:{fontSize:10,marginLeft:4}})]});let i=X[s],n=i?function(e){let a=(t.default.env.NEXT_PUBLIC_BASE_URL??"").replace(/^\/+|\/+$/g,""),s=a?`/${a}/`:"/";if(W.serverRootPath&&"/"!==W.serverRootPath){let e=W.serverRootPath.replace(/\/+$/,""),t=s.replace(/^\/+/,"");s=`${e}/${t}`}return`${s}${e}`}(i):((r=new URLSearchParams(window.location.search)).set("page",s),`?${r.toString()}`);return(0,a.jsx)("a",{href:n,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button?e.stopPropagation():e.preventDefault()},style:{color:"inherit",textDecoration:"none"},children:e})},O=e=>{let t=(0,E.isAdminRole)(f);return null!=o&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:f,isAdmin:t,enabledPagesInternalUsers:o}),e.map(e=>({...e,children:e.children?O(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key){if(!(!e.roles||e.roles.includes(f)||j))return!1;if(!t&&null!=o){let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0}if("projects"===e.key&&!d||!t&&"agents"===e.key&&c&&!(m&&N)||!t&&"vector-stores"===e.key&&u&&!(g&&N)||e.roles&&!e.roles.includes(f))return!1;if(!t&&null!=o){if(e.children&&e.children.length>0&&e.children.some(e=>o.includes(e.page)))return console.log(`[LeftNav] Parent "${e.page}" (${e.key}): VISIBLE (has visible children)`),!0;let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0})},_=(e=>{for(let t of Z)for(let a of t.items){if(a.page===e)return a.key;if(a.children){let t=a.children.find(t=>t.page===e);if(t)return t.key}}return"api-keys"})(i);return(0,a.jsx)(z.Layout,{children:(0,a.jsxs)(Y,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,a.jsx)(P.ConfigProvider,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,a.jsx)(T.Menu,{mode:"inline",selectedKeys:[_],defaultOpenKeys:[],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(x=[],Z.forEach(e=>{if(e.roles&&!e.roles.includes(f))return;let t=O(e.items);0!==t.length&&x.push({type:"group",label:n?null:(0,a.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:e.groupLabel}),children:t.map(e=>({key:e.key,icon:e.icon,label:w(e.label,e.page,e.external_url),children:e.children?.map(e=>({key:e.key,icon:e.icon,label:w(e.label,e.page,e.external_url),onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):k(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):k(e.page)}}))})}),x)})}),(0,E.isAdminRole)(f)&&!n&&(0,a.jsx)(q,{accessToken:h,width:220})]})})},"menuGroups",()=>Z],111672)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/83b7a29872dd94fb.js b/litellm/proxy/_experimental/out/_next/static/chunks/83b7a29872dd94fb.js new file mode 100644 index 0000000000..69712da661 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/83b7a29872dd94fb.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,475254,e=>{"use strict";var t=e.i(271645);let n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},r=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:c,iconNode:s,...d},u)=>(0,t.createElement)("svg",{ref:u,...i,width:n,height:n,stroke:e,strokeWidth:l?24*Number(a)/Number(n):a,className:r("lucide",o),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...s.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(c)?c:[c]])),l=(e,i)=>{let l=(0,t.forwardRef)(({className:l,...o},c)=>(0,t.createElement)(a,{ref:c,iconNode:i,className:r(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=n(e),l};e.s(["default",()=>l],475254)},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(739295),r=e.i(343794),i=e.i(931067),a=e.i(211577),l=e.i(392221),o=e.i(703923),c=e.i(914949),s=e.i(404948),d=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,n){var u,g=e.prefixCls,m=void 0===g?"rc-switch":g,p=e.className,h=e.checked,f=e.defaultChecked,b=e.disabled,$=e.loadingIcon,y=e.checkedChildren,S=e.unCheckedChildren,v=e.onClick,k=e.onChange,C=e.onKeyDown,w=(0,o.default)(e,d),I=(0,c.default)(!1,{value:h,defaultValue:f}),x=(0,l.default)(I,2),O=x[0],E=x[1];function z(e,t){var n=O;return b||(E(n=e),null==k||k(n,t)),n}var j=(0,r.default)(m,p,(u={},(0,a.default)(u,"".concat(m,"-checked"),O),(0,a.default)(u,"".concat(m,"-disabled"),b),u));return t.createElement("button",(0,i.default)({},w,{type:"button",role:"switch","aria-checked":O,disabled:b,className:j,ref:n,onKeyDown:function(e){e.which===s.default.LEFT?z(!1,e):e.which===s.default.RIGHT&&z(!0,e),null==C||C(e)},onClick:function(e){var t=z(!O,e);null==v||v(t,e)}}),$,t.createElement("span",{className:"".concat(m,"-inner")},t.createElement("span",{className:"".concat(m,"-inner-checked")},y),t.createElement("span",{className:"".concat(m,"-inner-unchecked")},S)))});u.displayName="Switch";var g=e.i(121872),m=e.i(242064),p=e.i(937328),h=e.i(517455);e.i(296059);var f=e.i(915654);e.i(262370);var b=e.i(135551),$=e.i(183293),y=e.i(246422),S=e.i(838378);let v=(0,y.genStyleHooks)("Switch",e=>{let t=(0,S.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:(0,f.unit)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:l,calc:o}=e,c=`${t}-inner`,s=(0,f.unit)(o(l).add(o(r).mul(2)).equal()),d=(0,f.unit)(o(a).mul(2).equal());return{[t]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${c}-checked, ${c}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${d})`,marginInlineEnd:`calc(100% - ${s} + ${d})`},[`${c}-unchecked`]:{marginTop:o(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${c}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${d})`,marginInlineEnd:`calc(-100% + ${s} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:o(r).mul(2).equal(),marginInlineEnd:o(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:o(r).mul(-1).mul(2).equal(),marginInlineEnd:o(r).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:l(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(l(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:l,handleSizeSM:o,calc:c}=e,s=`${t}-inner`,d=(0,f.unit)(c(o).add(c(r).mul(2)).equal()),u=(0,f.unit)(c(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:(0,f.unit)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:a,[`${s}-checked, ${s}-unchecked`]:{minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${s}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:c(c(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(c(o).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,l=r/2,o=a-4,c=l-4;return{trackHeight:a,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:i,handleSize:o,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}});var k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 C=t.forwardRef((e,i)=>{let{prefixCls:a,size:l,disabled:o,loading:s,className:d,rootClassName:f,style:b,checked:$,value:y,defaultChecked:S,defaultValue:C,onChange:w}=e,I=k(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[x,O]=(0,c.default)(!1,{value:null!=$?$:y,defaultValue:null!=S?S:C}),{getPrefixCls:E,direction:z,switch:j}=t.useContext(m.ConfigContext),N=t.useContext(p.default),P=(null!=o?o:N)||s,T=E("switch",a),M=t.createElement("div",{className:`${T}-handle`},s&&t.createElement(n.default,{className:`${T}-loading-icon`})),[B,H,L]=v(T),R=(0,h.default)(l),q=(0,r.default)(null==j?void 0:j.className,{[`${T}-small`]:"small"===R,[`${T}-loading`]:s,[`${T}-rtl`]:"rtl"===z},d,f,H,L),G=Object.assign(Object.assign({},null==j?void 0:j.style),b);return B(t.createElement(g.default,{component:"Switch",disabled:P},t.createElement(u,Object.assign({},I,{checked:x,onChange:(...e)=>{O(e[0]),null==w||w.apply(void 0,e)},prefixCls:T,className:q,style:G,disabled:P,ref:i,loadingIcon:M}))))});C.__ANT_SWITCH=!0,e.s(["Switch",0,C],790848)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(876556);function i(e){return["small","middle","large"].includes(e)}function a(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>i,"isValidGapNumber",()=>a],908286);var l=e.i(242064),o=e.i(249616),c=e.i(372409),s=e.i(246422);let d=(0,s.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:l,fontSizeSM:o,borderRadiusLG:s,borderRadiusSM:d,colorBgContainerDisabled:u,lineWidth:g}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,background:u,borderWidth:g,borderStyle:"solid",borderColor:i,borderRadius:n,"&-large":{fontSize:l,borderRadius:s},"&-small":{paddingInline:a,borderRadius:d,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,c.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 g=t.default.forwardRef((e,r)=>{let{className:i,children:a,style:c,prefixCls:s}=e,g=u(e,["className","children","style","prefixCls"]),{getPrefixCls:m,direction:p}=t.default.useContext(l.ConfigContext),h=m("space-addon",s),[f,b,$]=d(h),{compactItemClassnames:y,compactSize:S}=(0,o.useCompactItemContext)(h,p),v=(0,n.default)(h,b,y,$,{[`${h}-${S}`]:S},i);return f(t.default.createElement("div",Object.assign({ref:r,className:v,style:c},g),a))}),m=t.default.createContext({latestIndex:0}),p=m.Provider,h=({className:e,index:n,children:r,split:i,style:a})=>{let{latestIndex:l}=t.useContext(m);return null==r?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:a},r),n{let t=(0,f.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var $=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 y=t.forwardRef((e,o)=>{var c;let{getPrefixCls:s,direction:d,size:u,className:g,style:m,classNames:f,styles:y}=(0,l.useComponentConfig)("space"),{size:S=null!=u?u:"small",align:v,className:k,rootClassName:C,children:w,direction:I="horizontal",prefixCls:x,split:O,style:E,wrap:z=!1,classNames:j,styles:N}=e,P=$(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[T,M]=Array.isArray(S)?S:[S,S],B=i(M),H=i(T),L=a(M),R=a(T),q=(0,r.default)(w,{keepEmpty:!0}),G=void 0===v&&"horizontal"===I?"center":v,A=s("space",x),[W,D,X]=b(A),F=(0,n.default)(A,g,D,`${A}-${I}`,{[`${A}-rtl`]:"rtl"===d,[`${A}-align-${G}`]:G,[`${A}-gap-row-${M}`]:B,[`${A}-gap-col-${T}`]:H},k,C,X),K=(0,n.default)(`${A}-item`,null!=(c=null==j?void 0:j.item)?c:f.item),U=Object.assign(Object.assign({},y.item),null==N?void 0:N.item),V=q.map((e,n)=>{let r=(null==e?void 0:e.key)||`${K}-${n}`;return t.createElement(h,{className:K,key:r,index:n,split:O,style:U},e)}),Q=t.useMemo(()=>({latestIndex:q.reduce((e,t,n)=>null!=t?n:e,0)}),[q]);if(0===q.length)return null;let _={};return z&&(_.flexWrap="wrap"),!H&&R&&(_.columnGap=T),!B&&L&&(_.rowGap=M),W(t.createElement("div",Object.assign({ref:o,className:F,style:Object.assign(Object.assign(Object.assign({},_),m),E)},P),t.createElement(p,{value:Q},V)))});y.Compact=o.default,y.Addon=g,e.s(["default",0,y],38243)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},801312,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:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var i=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["default",0,a],801312)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(242064),i=e.i(517455);e.i(296059);var a=e.i(915654),l=e.i(183293),o=e.i(246422),c=e.i(838378);let s=(0,o.genStyleHooks)("Divider",e=>{let t=(0,c.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:c,verticalMarginInline:s}=e;return{[t]:Object.assign(Object.assign({},(0,l.resetComponent)(e)),{borderBlockStart:`${(0,a.unit)(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,a.unit)(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,a.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,a.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,a.unit)(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${c} * 100%)`},"&::after":{width:`calc(100% - ${c} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${c} * 100%)`},"&::after":{width:`calc(${c} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var d=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 u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:a,direction:l,className:o,style:c}=(0,r.useComponentConfig)("divider"),{prefixCls:g,type:m="horizontal",orientation:p="center",orientationMargin:h,className:f,rootClassName:b,children:$,dashed:y,variant:S="solid",plain:v,style:k,size:C}=e,w=d(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),I=a("divider",g),[x,O,E]=s(I),z=u[(0,i.default)(C)],j=!!$,N=t.useMemo(()=>"left"===p?"rtl"===l?"end":"start":"right"===p?"rtl"===l?"start":"end":p,[l,p]),P="start"===N&&null!=h,T="end"===N&&null!=h,M=(0,n.default)(I,o,O,E,`${I}-${m}`,{[`${I}-with-text`]:j,[`${I}-with-text-${N}`]:j,[`${I}-dashed`]:!!y,[`${I}-${S}`]:"solid"!==S,[`${I}-plain`]:!!v,[`${I}-rtl`]:"rtl"===l,[`${I}-no-default-orientation-margin-start`]:P,[`${I}-no-default-orientation-margin-end`]:T,[`${I}-${z}`]:!!z},f,b),B=t.useMemo(()=>"number"==typeof h?h:/^\d+$/.test(h)?Number(h):h,[h]);return x(t.createElement("div",Object.assign({className:M,style:Object.assign(Object.assign({},c),k)},w,{role:"separator"}),$&&"vertical"!==m&&t.createElement("span",{className:`${I}-inner-text`,style:{marginInlineStart:P?B:void 0,marginInlineEnd:T?B:void 0}},$)))}],312361)},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(529681),i=e.i(702779),a=e.i(563113),l=e.i(763731),o=e.i(121872),c=e.i(242064);e.i(296059);var s=e.i(915654);e.i(262370);var d=e.i(135551),u=e.i(183293),g=e.i(246422),m=e.i(838378);let p=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return(0,m.mergeToken)(e,{tagFontSize:i,tagLineHeight:(0,s.unit)(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},h=e=>({defaultBg:new d.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),f=(0,g.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,l=a(r).sub(n).equal(),o=a(t).sub(n).equal();return{[i]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,s.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:l}}),[`${i}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(p(e)),h);var b=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 $=t.forwardRef((e,r)=>{let{prefixCls:i,style:a,className:l,checked:o,children:s,icon:d,onChange:u,onClick:g}=e,m=b(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:h}=t.useContext(c.ConfigContext),$=p("tag",i),[y,S,v]=f($),k=(0,n.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==h?void 0:h.className,l,S,v);return y(t.createElement("span",Object.assign({},m,{ref:r,style:Object.assign(Object.assign({},a),null==h?void 0:h.style),className:k,onClick:e=>{null==u||u(!o),null==g||g(e)}}),d,t.createElement("span",null,s)))});var y=e.i(403541);let S=(0,g.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=p(e),(0,y.genPresetColor)(t,(e,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:a,borderColor:a},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},h),v=(e,t,n)=>{let r="string"!=typeof n?n:n.charAt(0).toUpperCase()+n.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},k=(0,g.genSubStyleComponent)(["Tag","status"],e=>{let t=p(e);return[v(t,"success","Success"),v(t,"processing","Info"),v(t,"error","Error"),v(t,"warning","Warning")]},h);var C=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 w=t.forwardRef((e,s)=>{let{prefixCls:d,className:u,rootClassName:g,style:m,children:p,icon:h,color:b,onClose:$,bordered:y=!0,visible:v}=e,w=C(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:I,direction:x,tag:O}=t.useContext(c.ConfigContext),[E,z]=t.useState(!0),j=(0,r.default)(w,["closeIcon","closable"]);t.useEffect(()=>{void 0!==v&&z(v)},[v]);let N=(0,i.isPresetColor)(b),P=(0,i.isPresetStatusColor)(b),T=N||P,M=Object.assign(Object.assign({backgroundColor:b&&!T?b:void 0},null==O?void 0:O.style),m),B=I("tag",d),[H,L,R]=f(B),q=(0,n.default)(B,null==O?void 0:O.className,{[`${B}-${b}`]:T,[`${B}-has-color`]:b&&!T,[`${B}-hidden`]:!E,[`${B}-rtl`]:"rtl"===x,[`${B}-borderless`]:!y},u,g,L,R),G=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||z(!1)},[,A]=(0,a.useClosable)((0,a.pickClosable)(e),(0,a.pickClosable)(O),{closable:!1,closeIconRender:e=>{let r=t.createElement("span",{className:`${B}-close-icon`,onClick:G},e);return(0,l.replaceElement)(e,r,e=>({onClick:t=>{var n;null==(n=null==e?void 0:e.onClick)||n.call(e,t),G(t)},className:(0,n.default)(null==e?void 0:e.className,`${B}-close-icon`)}))}}),W="function"==typeof w.onClick||p&&"a"===p.type,D=h||null,X=D?t.createElement(t.Fragment,null,D,p&&t.createElement("span",null,p)):p,F=t.createElement("span",Object.assign({},j,{ref:s,className:q,style:M}),X,A,N&&t.createElement(S,{key:"preset",prefixCls:B}),P&&t.createElement(k,{key:"status",prefixCls:B}));return H(W?t.createElement(o.default,{component:"Tag"},F):F)});w.CheckableTag=$,e.s(["Tag",0,w],262218)},292639,e=>{"use strict";var t=e.i(764205),n=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,n.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},250980,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 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,n],250980)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/844dee1ac01fba04.js b/litellm/proxy/_experimental/out/_next/static/chunks/844dee1ac01fba04.js new file mode 100644 index 0000000000..4ba5f0103f --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/844dee1ac01fba04.js @@ -0,0 +1,8 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),o=e.i(908286),l=e.i(242064),n=e.i(246422),i=e.i(838378);let s=["wrap","nowrap","wrap-reverse"],d=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],c=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let a,o,l;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&s.includes(a)})),(o={},c.forEach(r=>{o[`${e}-align-${r}`]=t.align===r}),o[`${e}-align-stretch`]=!t.align&&!!t.vertical,o)),(l={},d.forEach(r=>{l[`${e}-justify-${r}`]=t.justify===r}),l)))},m=(0,n.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,o=(0,i.mergeToken)(e,{flexGapSM:t,flexGap:r,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"}}}})(o),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(o),(e=>{let{componentCls:t}=e,r={};return s.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(o),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(o),(e=>{let{componentCls:t}=e,r={};return d.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(o)]},()=>({}),{resetStyle:!1});var g=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 f=t.default.forwardRef((e,n)=>{let{prefixCls:i,rootClassName:s,className:d,style:c,flex:f,gap:p,vertical:b=!1,component:h="div",children:C}=e,y=g(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:x,getPrefixCls:w}=t.default.useContext(l.ConfigContext),k=w("flex",i),[O,$,j]=m(k),N=null!=b?b:null==v?void 0:v.vertical,T=(0,r.default)(d,s,null==v?void 0:v.className,k,$,j,u(k,e),{[`${k}-rtl`]:"rtl"===x,[`${k}-gap-${p}`]:(0,o.isPresetSize)(p),[`${k}-vertical`]:N}),E=Object.assign(Object.assign({},null==v?void 0:v.style),c);return f&&(E.flex=f),p&&!(0,o.isPresetSize)(p)&&(E.gap=p),O(t.default.createElement(h,Object.assign({ref:n,className:T,style:E},(0,a.default)(y,["justify","wrap","align"])),C))});e.s(["Flex",0,f],525720)},292639,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},743151,(e,t,r)=>{"use strict";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)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var o=i(e.r(271645)),l=i(e.r(844343)),n=["text","onCopy","options","children"];function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function d(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,n),a=o.default.Children.only(t);return o.default.cloneElement(a,d(d({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var a=e.r(743151).CopyToClipboard;a.CopyToClipboard=a,t.exports=a},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var o=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(o.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),o=e.i(529681);let l=e=>{let{prefixCls:a,className:o,style:l,size:n,shape:i}=e,s=(0,r.default)({[`${a}-lg`]:"large"===n,[`${a}-sm`]:"small"===n}),d=(0,r.default)({[`${a}-circle`]:"circle"===i,[`${a}-square`]:"square"===i,[`${a}-round`]:"round"===i}),c=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(a,s,d,o),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var n=e.i(694758),i=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,i.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),f=e=>Object.assign({width:e},u(e)),p=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),h=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:o,skeletonButtonCls:l,skeletonInputCls:n,skeletonImageCls:i,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:h,padding:C,marginSM:y,borderRadius:v,titleHeight:x,blockRadius:w,paragraphLiHeight:k,controlHeightXS:O,paragraphMarginTop:$}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:C,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:h},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:x,background:h,borderRadius:w,[`+ ${o}`]:{marginBlockStart:u}},[o]:{padding:0,"> li":{width:"100%",height:k,listStyle:"none",background:h,borderRadius:w,"+ li":{marginBlockStart:O}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${o} > li`]:{borderRadius:v}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:y,[`+ ${o}`]:{marginBlockStart:$}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=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:i(a).mul(2).equal(),minWidth:i(a).mul(2).equal()},b(a,i))},p(e,a,r)),{[`${r}-lg`]:Object.assign({},b(o,i))}),p(e,o,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(l,i))}),p(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(o)),[`${t}${t}-sm`]:Object.assign({},m(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},g(t,i)),[`${a}-lg`]:Object.assign({},g(o,i)),[`${a}-sm`]:Object.assign({},g(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:o,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:o},f(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${o} > li, + ${r}, + ${l}, + ${n}, + ${i} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),C=e=>{let{prefixCls:a,className:o,style:l,rows:n=0}=e,i=Array.from({length:n}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,o),style:l},i)},y=({prefixCls:e,className:a,width:o,style:l})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:o},l)});function v(e){return e&&"object"==typeof e?e:{}}let x=e=>{let{prefixCls:o,loading:n,className:i,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:p}=e,{getPrefixCls:b,direction:x,className:w,style:k}=(0,a.useComponentConfig)("skeleton"),O=b("skeleton",o),[$,j,N]=h(O);if(n||!("loading"in e)){let e,a,o=!!u,n=!!m,c=!!g;if(o){let r=Object.assign(Object.assign({prefixCls:`${O}-avatar`},n&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),v(u));e=t.createElement("div",{className:`${O}-header`},t.createElement(l,Object.assign({},r)))}if(n||c){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${O}-title`},!o&&c?{width:"38%"}:o&&c?{width:"50%"}:{}),v(m));e=t.createElement(y,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${O}-paragraph`},(e={},o&&n||(e.width="61%"),!o&&n?e.rows=3:e.rows=2,e)),v(g));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${O}-content`},e,r)}let b=(0,r.default)(O,{[`${O}-with-avatar`]:o,[`${O}-active`]:f,[`${O}-rtl`]:"rtl"===x,[`${O}-round`]:p},w,i,s,j,N);return $(t.createElement("div",{className:b,style:Object.assign(Object.assign({},k),d)},e,a))}return null!=c?c:null};x.Button=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",n),[f,p,b]=h(g),C=(0,o.default)(e,["prefixCls"]),y=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,p,b);return f(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-button`,size:u},C))))},x.Avatar=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",n),[f,p,b]=h(g),C=(0,o.default)(e,["prefixCls","className"]),y=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},i,s,p,b);return f(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},C))))},x.Input=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",n),[f,p,b]=h(g),C=(0,o.default)(e,["prefixCls"]),y=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,p,b);return f(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-input`,size:u},C))))},x.Image=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",o),[u,m,g]=h(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},l,n,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,l),style:i},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`})))))},x.Node=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",o),[m,g,f]=h(u),p=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,l,n,f);return m(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${u}-image`,l),style:i},d)))},e.s(["default",0,x],185793)},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"],l=e=>({_s:e,status:o[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),n=e=>e?6:5,i=(e,t,r,a,o)=>{clearTimeout(a.current);let n=l(e);t(n),r.current=n,o&&o({current:n})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let u=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 g={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"}},f=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,c.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:l,transitionStatus:n})=>{let i=l?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(u,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",i,m.default,m[n]),style:{transition:"width 150ms"}}):a.default.createElement(o,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,i)})},h=a.default.forwardRef((e,o)=>{let{icon:u,iconPosition:m=s.HorizontalPositions.Left,size:h=s.Sizes.SM,color:C,variant:y="primary",disabled:v,loading:x=!1,loadingText:w,children:k,tooltip:O,className:$}=e,j=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),N=x||v,T=void 0!==u||x,E=x&&w,P=!(!k&&!E),S=(0,d.tremorTwMerge)(g[h].height,g[h].width),R="light"!==y?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",M=f(y,C),z=("light"!==y?{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:_}=(0,r.useTooltip)(300),[q,H]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[g,f]=(0,a.useState)(()=>l(d?2:n(c))),p=(0,a.useRef)(g),b=(0,a.useRef)(0),[h,C]="object"==typeof s?[s.enter,s.exit]:[s,s],y=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return n(t)}})(p.current._s,u);e&&i(e,f,p,b,m)},[m,u]);return[g,(0,a.useCallback)(a=>{let l=e=>{switch(i(e,f,p,b,m),e){case 1:h>=0&&(b.current=((...e)=>setTimeout(...e))(y,h));break;case 4:C>=0&&(b.current=((...e)=>setTimeout(...e))(y,C));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},s=p.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||l(e?+!r:2):s&&l(t?o?3:4:n(u))},[y,m,e,t,r,o,h,C,u]),y]})({timeout:50});return(0,a.useEffect)(()=>{H(x)},[x]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([o,B.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",R,z.paddingX,z.paddingY,z.fontSize,M.textColor,M.bgColor,M.borderColor,M.hoverBorderColor,N?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(f(y,C).hoverTextColor,f(y,C).hoverBgColor,f(y,C).hoverBorderColor),$),disabled:N},_,j),a.default.createElement(r.default,Object.assign({text:O},B)),T&&m!==s.HorizontalPositions.Right?a.default.createElement(b,{loading:x,iconSize:S,iconPosition:m,Icon:u,transitionStatus:q.status,needMargin:P}):null,E||k?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},E?w:k):null,T&&m===s.HorizontalPositions.Right?a.default.createElement(b,{loading:x,iconSize:S,iconPosition:m,Icon:u,transitionStatus:q.status,needMargin:P}):null)});h.displayName="Button",e.s(["Button",()=>h],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("Table"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(o("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),n))});l.displayName="Table",e.s(["Table",()=>l],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableBody"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),n))});l.displayName="TableBody",e.s(["TableBody",()=>l],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),n))});l.displayName="TableCell",e.s(["TableCell",()=>l],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHead"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),n))});l.displayName="TableHead",e.s(["TableHead",()=>l],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHeaderCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},s),n))});l.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>l],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableRow"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("row"),i)},s),n))});l.displayName="TableRow",e.s(["TableRow",()=>l],496020)},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),a=e.i(673706),o=e.i(271645);let l=o.default.forwardRef((e,l)=>{let{color:n,className:i,children:s}=e;return o.default.createElement("p",{ref:l,className:(0,r.tremorTwMerge)("text-tremor-default",n?(0,a.getColorClassNames)(n,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),i)},s)});l.displayName="Text",e.s(["default",()=>l],936325),e.s(["Text",()=>l],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),o=e.i(95779),l=e.i(444755),n=e.i(673706);let i=(0,n.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:d="",decorationColor:c,children:u,className:m}=e,g=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,className:(0,l.tremorTwMerge)(i("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,n.getColorClassNames)(c,o.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),m)},g),u)});s.displayName="Card",e.s(["Card",()=>s],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),o=e.i(673706),l=e.i(271645);let n=l.default.forwardRef((e,n)=>{let{color:i,children:s,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return l.default.createElement("p",Object.assign({ref:n,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",i?(0,o.getColorClassNames)(i,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},c),s)});n.displayName="Title",e.s(["Title",()=>n],629569)},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 o=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(o.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["ClockCircleOutlined",0,l],637235)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/8a408f05ec0cdac4.js b/litellm/proxy/_experimental/out/_next/static/chunks/8a408f05ec0cdac4.js new file mode 100644 index 0000000000..dbac1dc8af --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/8a408f05ec0cdac4.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},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",()=>t])},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",()=>t])},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",()=>t])},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),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])},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(199133),o=e.i(764205);e.s(["default",0,({onChange:e,value:n,className:a,accessToken:s,placeholder:l="Select vector stores",disabled:c=!1})=>{let[d,h]=(0,r.useState)([]),[u,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(s){p(!0);try{let e=await (0,o.vectorStoreListCall)(s);e.data&&h(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[s]),(0,t.jsx)("div",{children:(0,t.jsx)(i.Select,{mode:"multiple",placeholder:l,onChange:e,value:n,loading:u,className:a,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})})}])},59935,(e,t,r)=>{var i;let o;e.e,i=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},i=!r.document&&!!r.postMessage,o=r.IS_PAPA_WORKER||!1,n={},a=0,s={};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=v(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new p(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var i=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,o)r.postMessage({results:n,workerId:s.WORKER_ID,finished:i});else if(_(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=n=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!i||!_(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),i||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):o&&this._config.error&&r.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=s.RemoteChunkSize),l.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,r,o=this._config.downloadRequestHeaders;for(r in o)t.setRequestHeader(r,o[r])}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 d(e){(e=e||{}).chunkSize||(e.chunkSize=s.LocalChunkSize),l.call(this,e);var t,r,i="u">typeof FileReader;this.stream=function(e){this._input=e,r=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 h(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function u(e){l.call(this,e=e||{});var t=[],r=!0,i=!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(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=y(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!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 p(e){var t,r,i,o,n=/^\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)))$/,l=this,c=0,d=0,h=!1,u=!1,p=[],m={data:[],errors:[],meta:{}};function k(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function b(){if(m&&i&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines&&(m.data=m.data.filter(function(e){return!k(e)})),y()){if(m)if(Array.isArray(m.data[0])){for(var t,r=0;y()&&r(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(n.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):a.test(r)?new Date(r):""===r?null:r):r)(s=e.header?o>=p.length?"__parsed_extra":p[o]:s,l=e.transform?e.transform(l,s):l);"__parsed_extra"===s?(i[s]=i[s]||[],i[s].push(l)):i[s]=l}return e.header&&(o>p.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+o,d+r):oe.preview?r.abort():(m.data=m.data[0],o(m,l))))}),this.parse=function(o,n,a){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(o,l)),i=!1,e.delimiter?_(e.delimiter)&&(e.delimiter=e.delimiter(o),m.meta.delimiter=e.delimiter):((l=((t,r,i,o,n)=>{var a,l,c,d;n=n||[","," ","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var h=0;h=r.length/2?"\r\n":"\r"}}function f(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t=(e=e||{}).delimiter,r=e.newline,i=e.comments,o=e.step,n=e.preview,a=e.fastMode,l=null,c=!1,d=null==e.quoteChar?'"':e.quoteChar,h=d;if(void 0!==e.escapeChar&&(h=e.escapeChar),("string"!=typeof t||-1=n)return D(!0);break}C.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:x.length,index:u}),M++}}else if(i&&0===E.length&&s.substring(u,u+y)===i){if(-1===j)return D();u=j+v,j=s.indexOf(r,u),T=s.indexOf(t,u)}else if(-1!==T&&(T=n)return D(!0)}return F();function I(e){x.push(e),S=u}function L(e){return -1!==e&&(e=s.substring(M+1,e))&&""===e.trim()?e.length:0}function F(e){return m||(void 0===e&&(e=s.substring(u)),E.push(e),u=k,I(E),w&&N()),D()}function H(e){u=e,I(E),E=[],j=s.indexOf(r,u)}function D(i){if(e.header&&!g&&x.length&&!c){var o=x[0],n=Object.create(null),a=new Set(o);let t=!1;for(let r=0;r{if("object"==typeof t){if("string"!=typeof t.delimiter||s.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(n=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");d=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),t.escapeFormulae instanceof RegExp?h=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(h=/^[=+\-@\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 p(null,e,c);if("object"==typeof e[0])return p(d||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||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])),p(e.fields||[],e.data||[],c);throw Error("Unable to serialize unrecognized input");function p(e,t,r){var a="",s=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var r=0;r{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),r=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:"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 o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["ClockCircleOutlined",0,n],637235)},921511,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(199133),o=e.i(764205);function n(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let r=e.version_number??1,i=e.version_status??"draft";return{label:`${e.policy_name} — v${r} (${i})${e.description?` — ${e.description}`:""}`,value:"production"===i?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:a,className:s,accessToken:l,disabled:c,onPoliciesLoaded:d})=>{let[h,u]=(0,r.useState)([]),[p,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(l){f(!0);try{let e=await (0,o.getPoliciesList)(l);e.policies&&(u(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{f(!1)}}})()},[l,d]),(0,t.jsx)("div",{children:(0,t.jsx)(i.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:a,loading:p,className:s,allowClear:!0,options:n(h),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>n])},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(199133),o=e.i(764205);e.s(["default",0,({onChange:e,value:n,className:a,accessToken:s,disabled:l})=>{let[c,d]=(0,r.useState)([]),[h,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(s){u(!0);try{let e=await (0,o.getGuardrailsList)(s);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{u(!1)}}})()},[s]),(0,t.jsx)("div",{children:(0,t.jsx)(i.Select,{mode:"multiple",disabled:l,placeholder:l?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:n,loading:h,className:a,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},367240,555436,e=>{"use strict";let t=(0,e.i(475254).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>t],367240);var r=e.i(54943);e.s(["Search",()=>r.default],555436)},678784,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",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},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",()=>t])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["SaveOutlined",0,n],987432)},531245,657150,e=>{"use strict";let t=(0,e.i(475254).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["default",()=>t],657150),e.s(["Bot",()=>t],531245)},431343,569074,e=>{"use strict";var t=e.i(475254);let r=(0,t.default)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["Play",()=>r],431343);let i=(0,t.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",()=>i],569074)},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},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",()=>t],727612)},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},673709,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=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 a={'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)(i.CheckIcon,{size:16}):(0,t.jsx)(o,{size:16})}),(0,t.jsx)(n.Prism,{language:s,style:a,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],673709)},903446,e=>{"use strict";let t=(0,e.i(475254).default)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",()=>t])},132104,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};var o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["ArrowUpOutlined",0,n],132104)},447593,989022,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["ClearOutlined",0,n],447593);var a=e.i(843476),s=e.i(592968),l=e.i(637235);let c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 394c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H400V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v236H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h228v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h164c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V394h164zM628 630H400V394h228v236z"}}]},name:"number",theme:"outlined"};var d=r.forwardRef(function(e,i){return r.createElement(o.default,(0,t.default)({},e,{ref:i,icon:c}))});let h={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"};var u=r.forwardRef(function(e,i){return r.createElement(o.default,(0,t.default)({},e,{ref:i,icon:h}))}),p=e.i(872934),f=e.i(812618),g=e.i(366308),m=e.i(458505);e.s(["default",0,({timeToFirstToken:e,totalLatency:t,usage:r,toolName:i})=>e||t||r?(0,a.jsxs)("div",{className:"response-metrics mt-2 pt-2 border-t border-gray-100 text-xs text-gray-500 flex flex-wrap gap-3",children:[void 0!==e&&(0,a.jsx)(s.Tooltip,{title:"Time to first token",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(l.ClockCircleOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["TTFT: ",(e/1e3).toFixed(2),"s"]})]})}),void 0!==t&&(0,a.jsx)(s.Tooltip,{title:"Total latency",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(l.ClockCircleOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Total Latency: ",(t/1e3).toFixed(2),"s"]})]})}),r?.promptTokens!==void 0&&(0,a.jsx)(s.Tooltip,{title:"Prompt tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(u,{className:"mr-1"}),(0,a.jsxs)("span",{children:["In: ",r.promptTokens]})]})}),r?.completionTokens!==void 0&&(0,a.jsx)(s.Tooltip,{title:"Completion tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(p.ExportOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Out: ",r.completionTokens]})]})}),r?.reasoningTokens!==void 0&&(0,a.jsx)(s.Tooltip,{title:"Reasoning tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(f.BulbOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Reasoning: ",r.reasoningTokens]})]})}),r?.totalTokens!==void 0&&(0,a.jsx)(s.Tooltip,{title:"Total tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(d,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Total: ",r.totalTokens]})]})}),r?.cost!==void 0&&(0,a.jsx)(s.Tooltip,{title:"Cost",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(m.DollarOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["$",r.cost.toFixed(6)]})]})}),i&&(0,a.jsx)(s.Tooltip,{title:"Tool used",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(g.ToolOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Tool: ",i]})]})})]}):null],989022)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/8c6f8ac32c75a373.js b/litellm/proxy/_experimental/out/_next/static/chunks/8c6f8ac32c75a373.js new file mode 100644 index 0000000000..6b2907dbed --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/8c6f8ac32c75a373.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},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",()=>t])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},988297,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:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,a],988297)},797672,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:"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,a],797672)},992619,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(779241),l=e.i(599724),r=e.i(199133),i=e.i(983561),n=e.i(689020);e.s(["default",0,({accessToken:e,value:o,placeholder:d="Select a Model",onChange:c,disabled:u=!1,style:m,className:p,showLabel:g=!0,labelText:h="Select Model"})=>{let[x,f]=(0,a.useState)(o),[y,b]=(0,a.useState)(!1),[v,j]=(0,a.useState)([]),_=(0,a.useRef)(null);return(0,a.useEffect)(()=>{f(o)},[o]),(0,a.useEffect)(()=>{e&&(async()=>{try{let t=await (0,n.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&j(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[g&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.RobotOutlined,{className:"mr-2"})," ",h]}),(0,t.jsx)(r.Select,{value:x,placeholder:d,onChange:e=>{"custom"===e?(b(!0),f(void 0)):(b(!1),f(e),c&&c(e))},options:[...Array.from(new Set(v.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:u}),y&&(0,t.jsx)(s.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{f(e),c&&c(e)},500)},disabled:u})]})}])},500727,699857,696609,531516,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(135214);let r=(0,a.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:a}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,s.fetchMCPServers)(a,e),enabled:!!a})}],500727);let i=(0,a.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list(),queryFn:async()=>await (0,s.fetchMCPToolsets)(e),enabled:!!e})}],699857);var n=e.i(843476),o=e.i(271645),d=e.i(536916),c=e.i(599724),u=e.i(409797),m=e.i(246349),m=m;let p=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,g=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,h=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,x=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function f(e,t=""){let a=e.toLowerCase();if(x.test(a))return"read";if(p.test(a))return"delete";if(h.test(a))return"update";if(g.test(a))return"create";if(t){let e=t.toLowerCase();if(x.test(e))return"read";if(p.test(e))return"delete";if(h.test(e))return"update";if(g.test(e))return"create"}return"unknown"}function y(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let a of e)t[f(a.name,a.description)].push(a);return t}let b={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,b,"classifyToolOp",()=>f,"groupToolsByCrud",()=>y],696609);let v=["read","create","update","delete","unknown"],j={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"},_={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={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:t,onChange:a,readOnly:s=!1,searchFilter:l=""})=>{let[r,i]=(0,o.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),p=(0,o.useMemo)(()=>y(e),[e]),g=(0,o.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),h=e=>{if(s)return;let t=new Set(g);t.has(e)?t.delete(e):t.add(e),a(Array.from(t))};return 0===e.length?null:(0,n.jsx)("div",{className:"space-y-3",children:v.map(e=>{let t,o=p[e];if(0===o.length)return null;if(l){let e=l.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let x=b[e],f=(t=p[e]).length>0&&t.every(e=>g.has(e.name)),y=(e=>{let t=p[e];if(0===t.length)return!1;let a=t.filter(e=>g.has(e.name)).length;return a>0&&a{i(t=>({...t,[e]:!t[e]}))},children:[v?(0,n.jsx)(m.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,n.jsx)(u.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,n.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:x.label}),(0,n.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${j[x.risk]}`,children:"high"===x.risk?"High Risk":"medium"===x.risk?"Medium Risk":"low"===x.risk?"Safe":"Unclassified"}),(0,n.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>g.has(e.name)).length,"/",o.length," allowed"]})]}),!s&&(0,n.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,n.jsx)(c.Text,{className:"text-xs text-gray-500",children:f?"All on":y?"Partial":"All off"}),(0,n.jsx)(d.Checkbox,{checked:f,indeterminate:y,onChange:t=>((e,t)=>{if(s)return;let l=new Set(g);for(let a of p[e])t?l.add(a.name):l.delete(a.name);a(Array.from(l))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!v&&(0,n.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:x.description}),!v&&(0,n.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!l||e.name.toLowerCase().includes(l.toLowerCase())||(e.description??"").toLowerCase().includes(l.toLowerCase())).map(e=>{let t,a=(t=e.name,g.has(t));return(0,n.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!s?"cursor-pointer":""} ${a?"":"opacity-60"}`,onClick:()=>h(e.name),children:[(0,n.jsx)(d.Checkbox,{checked:a,onChange:()=>h(e.name),disabled:s,onClick:e=>e.stopPropagation()}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,n.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,n.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${a?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:a?"on":"off"})]},e.name)})})]},e)})})}],531516)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var a=e.i(841947);e.s(["X",()=>a.default],37727)},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",()=>t])},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",()=>t])},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",()=>t])},158392,419470,e=>{"use strict";var t=e.i(843476),a=e.i(311451);let s={ttl:3600,lowest_latency_buffer:0},l=({routingStrategyArgs:e})=>{let l={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||s).map(([e,s])=>(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:l[e]||""}),(0,t.jsx)(a.Input,{name:e,defaultValue:"object"==typeof s?JSON.stringify(s,null,2):s?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},r=({routerSettings:e,routerFieldsMetadata:s})=>(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,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).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:s[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:s[e]?.field_description||""}),(0,t.jsx)(a.Input,{name:e,defaultValue:null==l||"null"===l?"":"object"==typeof l?JSON.stringify(l,null,2):l?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var i=e.i(199133);let n=({selectedStrategy:e,availableStrategies:a,routingStrategyDescriptions:s,routerFieldsMetadata:l,onStrategyChange:r})=>(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:l.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(i.Select,{value:e,onChange:r,style:{width:"100%"},size:"large",children:a.map(e=>(0,t.jsx)(i.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}),s[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:s[e]})]})},e))})})]});var o=e.i(790848);let d=({enabled:e,routerFieldsMetadata:a,onToggle:s})=>(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:a.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[a.enable_tag_filtering?.field_description||"",a.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:a.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(o.Switch,{checked:e,onChange:s,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:a,routerFieldsMetadata:s,availableRoutingStrategies:i,routingStrategyDescriptions:o})=>(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"})]}),i.length>0&&(0,t.jsx)(n,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:i,routingStrategyDescriptions:o,routerFieldsMetadata:s,onStrategyChange:t=>{a({...e,selectedStrategy:t})}}),(0,t.jsx)(d,{enabled:e.enableTagFiltering,routerFieldsMetadata:s,onToggle:t=>{a({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(l,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(r,{routerSettings:e.routerSettings,routerFieldsMetadata:s})]})],158392);var c=e.i(994388),u=e.i(653496),m=e.i(107233),p=e.i(271645),g=e.i(888259),h=e.i(592968),x=e.i(361653),x=x;let f=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var y=e.i(37727);function b({group:e,onChange:a,availableModels:s,maxFallbacks:l}){let r=s.filter(t=>t!==e.primaryModel),n=e.fallbackModels.length{let s=[...e.fallbackModels];s.includes(t)&&(s=s.filter(e=>e!==t)),a({...e,primaryModel:t,fallbackModels:s})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:s.map(e=>({label:e,value:e}))}),!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",children:[(0,t.jsx)(x.default,{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-sm",children:[(0,t.jsx)(f,{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 ",l," 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)(i.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:n?"Select fallback models to add...":`Maximum ${l} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let s=t.slice(0,l);a({...e,fallbackModels:s})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:r.map(e=>({label:e,value:e})),optionRender:(a,s)=>{let l=e.fallbackModels.includes(a.value),r=l?e.fallbackModels.indexOf(a.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[l&&null!==r&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:r}),(0,t.jsx)("span",{children:a.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(h.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:n?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${l} used)`:`Maximum ${l} 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((s,l)=>(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-sm 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 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:l+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:s})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==l),void a({...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)(y.X,{className:"w-4 h-4"})})]},`${s}-${l}`))})]})]})]})}function v({groups:e,onGroupsChange:a,availableModels:s,maxFallbacks:l=10,maxGroups:r=5}){let[i,n]=(0,p.useState)(e.length>0?e[0].id:"1");(0,p.useEffect)(()=>{e.length>0?e.some(e=>e.id===i)||n(e[0].id):n("1")},[e]);let o=()=>{if(e.length>=r)return;let t=Date.now().toString();a([...e,{id:t,primaryModel:null,fallbackModels:[]}]),n(t)},d=t=>{a(e.map(e=>e.id===t.id?t:e))},h=e.map((a,r)=>{let i=a.primaryModel?a.primaryModel:`Group ${r+1}`;return{key:a.id,label:i,closable:e.length>1,children:(0,t.jsx)(b,{group:a,onChange:d,availableModels:s,maxFallbacks:l})}});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)(c.Button,{variant:"primary",onClick:o,icon:()=>(0,t.jsx)(m.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:i,onChange:n,onEdit:(t,s)=>{"add"===s?o():"remove"===s&&e.length>1&&(t=>{if(1===e.length)return g.default.warning("At least one group is required");let s=e.filter(e=>e.id!==t);a(s),i===t&&s.length>0&&n(s[s.length-1].id)})(t)},items:h,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=r})}e.s(["FallbackSelectionForm",()=>v],419470)},645526,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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 l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["TeamOutlined",0,r],645526)},109799,e=>{"use strict";var t=e.i(135214),a=e.i(764205),s=e.i(266027),l=e.i(912598);let r=(0,e.i(243652).createQueryKeys)("organizations");e.s(["organizationKeys",0,r,"useOrganization",0,e=>{let i=(0,l.useQueryClient)(),{accessToken:n}=(0,t.default)();return(0,s.useQuery)({queryKey:r.detail(e),enabled:!!(n&&e),queryFn:async()=>{if(!n||!e)throw Error("Missing auth or teamId");return(0,a.organizationInfoCall)(n,e)},initialData:()=>{if(!e)return;let t=i.getQueryData(r.list({}));return t?.find(t=>t.organization_id===e)}})},"useOrganizations",0,()=>{let{accessToken:e,userId:l,userRole:i}=(0,t.default)();return(0,s.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,a.organizationListCall)(e),enabled:!!(e&&l&&i)})}])},993914,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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 l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["FileTextOutlined",0,r],993914)},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",()=>t])},621482,e=>{"use strict";var t=e.i(869230),a=e.i(992571),s=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,a.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,a.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:s}=e,l=super.createResult(e,t),{isFetching:r,isRefetching:i,isError:n,isRefetchError:o}=l,d=s.fetchMeta?.fetchMore?.direction,c=n&&"forward"===d,u=r&&"forward"===d,m=n&&"backward"===d,p=r&&"backward"===d;return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a.hasNextPage)(t,s.data),hasPreviousPage:(0,a.hasPreviousPage)(t,s.data),isFetchNextPageError:c,isFetchingNextPage:u,isFetchPreviousPageError:m,isFetchingPreviousPage:p,isRefetchError:o&&!c&&!m,isRefetching:i&&!u&&!p}}},l=e.i(469637);function r(e,t){return(0,l.useBaseQuery)(e,s,t)}e.s(["useInfiniteQuery",()=>r],621482)},270345,e=>{"use strict";var t=e.i(764205);let a=async(e,a,s,l)=>"Admin"!=s&&"Admin Viewer"!=s?await (0,t.teamListCall)(e,l?.organization_id||null,a):await (0,t.teamListCall)(e,l?.organization_id||null);e.s(["fetchTeams",0,a])},785242,e=>{"use strict";var t=e.i(619273),a=e.i(621482),s=e.i(266027),l=e.i(912598),r=e.i(135214),i=e.i(270345),n=e.i(243652),o=e.i(764205);let d=async(e,t,a,s={})=>{try{let l=(0,o.getProxyBaseUrl)(),r=new URLSearchParams(Object.entries({team_id:s.teamID,organization_id:s.organizationID,team_alias:s.team_alias,user_id:s.userID,page:t,page_size:a,sort_by:s.sortBy,sort_order:s.sortOrder,status:s.status}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${r}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let d=await n.json();return console.log("/v2/team/list API Response:",d),d}catch(e){throw console.error("Failed to list teams:",e),e}},c=(0,n.createQueryKeys)("teams"),u=(0,n.createQueryKeys)("infiniteTeams"),m=async(e,t,a,s={})=>{try{let l=(0,o.getProxyBaseUrl)(),r=new URLSearchParams(Object.entries({team_id:s.teamID,organization_id:s.organizationID,team_alias:s.team_alias,user_id:s.userID,page:t,page_size:a,sort_by:s.sortBy,sort_order:s.sortOrder,status:"deleted"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${r}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let d=await n.json();if(console.log("/team/list?status=deleted API Response:",d),d&&"object"==typeof d&&"teams"in d)return d.teams;return d}catch(e){throw console.error("Failed to list deleted teams:",e),e}},p=(0,n.createQueryKeys)("deletedTeams");e.s(["teamListCall",0,d,"useDeletedTeams",0,(e,a,l={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:p.list({page:e,limit:a,...l}),queryFn:async()=>await m(i,e,a,l),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useInfiniteTeams",0,(e=50,t,s)=>{let{accessToken:l,userId:i,userRole:n}=(0,r.default)(),o="Admin"===n||"Admin Viewer"===n;return(0,a.useInfiniteQuery)({queryKey:u.list({filters:{pageSize:e,...t&&{search:t},...s&&{organizationId:s},...i&&{userId:i}}}),queryFn:async({pageParam:a})=>await d(l,a,e,{team_alias:t||void 0,organizationID:s,userID:o?void 0:i}),initialPageParam:1,getNextPageParam:e=>{if(e.page{let{accessToken:t}=(0,r.default)(),a=(0,l.useQueryClient)();return(0,s.useQuery)({queryKey:c.detail(e),enabled:!!(t&&e),queryFn:async()=>{if(!t||!e)throw Error("Missing auth or teamId");return(0,o.teamInfoCall)(t,e)},initialData:()=>{if(!e)return;let t=a.getQueryData(c.list({}));return t?.find(t=>t.team_id===e)}})},"useTeams",0,()=>{let{accessToken:e,userId:t,userRole:a}=(0,r.default)();return(0,s.useQuery)({queryKey:c.list({}),queryFn:async()=>await (0,i.fetchTeams)(e,t,a,null),enabled:!!e})}])},309426,e=>{"use strict";var t=e.i(290571),a=e.i(444755),s=e.i(673706),l=e.i(271645),r=e.i(46757);let i=(0,s.makeClassName)("Col"),n=l.default.forwardRef((e,s)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:p,numColSpanLg:g,children:h,className:x}=e,f=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),y=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return l.default.createElement("div",Object.assign({ref:s,className:(0,a.tremorTwMerge)(i("root"),(n=y(u,r.colSpan),o=y(m,r.colSpanSm),d=y(p,r.colSpanMd),c=y(g,r.colSpanLg),(0,a.tremorTwMerge)(n,o,d,c)),x)},f),h)});n.displayName="Col",e.s(["Col",()=>n],309426)},950724,(e,t,a)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},100236,(e,t,a)=>{t.exports=e.g&&e.g.Object===Object&&e.g},139088,(e,t,a)=>{var s=e.r(100236),l="object"==typeof self&&self&&self.Object===Object&&self;t.exports=s||l||Function("return this")()},631926,(e,t,a)=>{var s=e.r(139088);t.exports=function(){return s.Date.now()}},748891,(e,t,a)=>{var s=/\s/;t.exports=function(e){for(var t=e.length;t--&&s.test(e.charAt(t)););return t}},830364,(e,t,a)=>{var s=e.r(748891),l=/^\s+/;t.exports=function(e){return e?e.slice(0,s(e)+1).replace(l,""):e}},630353,(e,t,a)=>{t.exports=e.r(139088).Symbol},243436,(e,t,a)=>{var s=e.r(630353),l=Object.prototype,r=l.hasOwnProperty,i=l.toString,n=s?s.toStringTag:void 0;t.exports=function(e){var t=r.call(e,n),a=e[n];try{e[n]=void 0;var s=!0}catch(e){}var l=i.call(e);return s&&(t?e[n]=a:delete e[n]),l}},223243,(e,t,a)=>{var s=Object.prototype.toString;t.exports=function(e){return s.call(e)}},377684,(e,t,a)=>{var s=e.r(630353),l=e.r(243436),r=e.r(223243),i=s?s.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?l(e):r(e)}},877289,(e,t,a)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},361884,(e,t,a)=>{var s=e.r(377684),l=e.r(877289);t.exports=function(e){return"symbol"==typeof e||l(e)&&"[object Symbol]"==s(e)}},773759,(e,t,a)=>{var s=e.r(830364),l=e.r(950724),r=e.r(361884),i=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(r(e))return i;if(l(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=l(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var a=o.test(e);return a||d.test(e)?c(e.slice(2),a?2:8):n.test(e)?i:+e}},374009,(e,t,a)=>{var s=e.r(950724),l=e.r(631926),r=e.r(773759),i=Math.max,n=Math.min;t.exports=function(e,t,a){var o,d,c,u,m,p,g=0,h=!1,x=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var a=o,s=d;return o=d=void 0,g=t,u=e.apply(s,a)}function b(e){var a=e-p,s=e-g;return void 0===p||a>=t||a<0||x&&s>=c}function v(){var e,a,s,r=l();if(b(r))return j(r);m=setTimeout(v,(e=r-p,a=r-g,s=t-e,x?n(s,c-a):s))}function j(e){return(m=void 0,f&&o)?y(e):(o=d=void 0,u)}function _(){var e,a=l(),s=b(a);if(o=arguments,d=this,p=a,s){if(void 0===m)return g=e=p,m=setTimeout(v,t),h?y(e):u;if(x)return clearTimeout(m),m=setTimeout(v,t),y(p)}return void 0===m&&(m=setTimeout(v,t)),u}return t=r(t)||0,s(a)&&(h=!!a.leading,c=(x="maxWait"in a)?i(r(a.maxWait)||0,t):c,f="trailing"in a?!!a.trailing:f),_.cancel=function(){void 0!==m&&clearTimeout(m),g=0,o=p=d=m=void 0},_.flush=function(){return void 0===m?u:j(l())},_}},964306,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:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["XCircleIcon",0,a],964306)},435451,620250,e=>{"use strict";var t=e.i(843476),a=e.i(290571),s=e.i(271645);let l=e=>{var t=(0,a.__rest)(e,[]);return s.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"}),s.default.createElement("path",{d:"M12 4v16m8-8H4"}))},r=e=>{var t=(0,a.__rest)(e,[]);return s.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"}),s.default.createElement("path",{d:"M20 12H4"}))};var i=e.i(444755),n=e.i(673706),o=e.i(677955);let d="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",c="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",u=s.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:p,onValueChange:g,onChange:h}=e,x=(0,a.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),f=(0,s.useRef)(null),[y,b]=s.default.useState(!1),v=s.default.useCallback(()=>{b(!0)},[]),j=s.default.useCallback(()=>{b(!1)},[]),[_,w]=s.default.useState(!1),k=s.default.useCallback(()=>{w(!0)},[]),N=s.default.useCallback(()=>{w(!1)},[]);return s.default.createElement(o.default,Object.assign({type:"number",ref:(0,n.mergeRefs)([f,t]),disabled:p,makeInputClassName:(0,n.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=f.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&v(),"ArrowUp"===e.key&&k()},onKeyUp:e=>{"ArrowDown"===e.key&&j(),"ArrowUp"===e.key&&N()},onChange:e=>{p||(null==g||g(parseFloat(e.target.value)),null==h||h(e))},stepper:m?s.default.createElement("div",{className:(0,i.tremorTwMerge)("flex justify-center align-middle")},s.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=f.current)||e.stepDown(),null==(t=f.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},s.default.createElement(r,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),s.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=f.current)||e.stepUp(),null==(t=f.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},s.default.createElement(l,{"data-testid":"step-up",className:(_?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},x))});u.displayName="NumberInput",e.s(["NumberInput",()=>u],620250),e.s(["default",0,({step:e=.01,style:a={width:"100%"},placeholder:s="Enter a numerical value",min:l,max:r,onChange:i,...n})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:a,placeholder:s,min:l,max:r,onChange:i,...n})],435451)},677667,674175,886148,543086,e=>{"use strict";let t,a;var s,l=e.i(290571),r=e.i(429427),i=e.i(371330),n=e.i(271645),o=e.i(394487),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(83733);let p=(0,n.createContext)(()=>{});function g({value:e,children:t}){return n.default.createElement(p.Provider,{value:e},t)}e.s(["CloseProvider",()=>g],674175);var h=e.i(233137),x=e.i(233538),f=e.i(397701),y=e.i(402155),b=e.i(700020);let v=null!=(s=n.default.startTransition)?s:function(e){e()};var j=e.i(998348),_=((t=_||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),w=((a=w||{})[a.ToggleDisclosure=0]="ToggleDisclosure",a[a.CloseDisclosure=1]="CloseDisclosure",a[a.SetButtonId=2]="SetButtonId",a[a.SetPanelId=3]="SetPanelId",a[a.SetButtonElement=4]="SetButtonElement",a[a.SetPanelElement=5]="SetPanelElement",a);let k={0:e=>({...e,disclosureState:(0,f.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}},N=(0,n.createContext)(null);function S(e){let t=(0,n.useContext)(N);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,S),t}return t}N.displayName="DisclosureContext";let C=(0,n.createContext)(null);C.displayName="DisclosureAPIContext";let T=(0,n.createContext)(null);function I(e,t){return(0,f.match)(t.type,k,e,t)}T.displayName="DisclosurePanelContext";let M=n.Fragment,E=b.RenderFeatures.RenderStrategy|b.RenderFeatures.Static,A=Object.assign((0,b.forwardRefWithAs)(function(e,t){let{defaultOpen:a=!1,...s}=e,l=(0,n.useRef)(null),r=(0,u.useSyncRefs)(t,(0,u.optionalRef)(e=>{l.current=e},void 0===e.as||e.as===n.Fragment)),i=(0,n.useReducer)(I,{disclosureState:+!a,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:c},m]=i,p=(0,d.useEvent)(e=>{m({type:1});let t=(0,y.getOwnerDocument)(l);if(!t||!c)return;let a=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(c):t.getElementById(c);null==a||a.focus()}),x=(0,n.useMemo)(()=>({close:p}),[p]),v=(0,n.useMemo)(()=>({open:0===o,close:p}),[o,p]),j=(0,b.useRender)();return n.default.createElement(N.Provider,{value:i},n.default.createElement(C.Provider,{value:x},n.default.createElement(g,{value:p},n.default.createElement(h.OpenClosedProvider,{value:(0,f.match)(o,{0:h.State.Open,1:h.State.Closed})},j({ourProps:{ref:r},theirProps:s,slot:v,defaultTag:M,name:"Disclosure"})))))}),{Button:(0,b.forwardRefWithAs)(function(e,t){let a=(0,n.useId)(),{id:s=`headlessui-disclosure-button-${a}`,disabled:l=!1,autoFocus:m=!1,...p}=e,[g,h]=S("Disclosure.Button"),f=(0,n.useContext)(T),y=null!==f&&f===g.panelId,v=(0,n.useRef)(null),_=(0,u.useSyncRefs)(v,t,(0,d.useEvent)(e=>{if(!y)return h({type:4,element:e})}));(0,n.useEffect)(()=>{if(!y)return h({type:2,buttonId:s}),()=>{h({type:2,buttonId:null})}},[s,h,y]);let w=(0,d.useEvent)(e=>{var t;if(y){if(1===g.disclosureState)return;switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0}),null==(t=g.buttonElement)||t.focus()}}else switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0})}}),k=(0,d.useEvent)(e=>{e.key===j.Keys.Space&&e.preventDefault()}),N=(0,d.useEvent)(e=>{var t;(0,x.isDisabledReactIssue7711)(e.currentTarget)||l||(y?(h({type:0}),null==(t=g.buttonElement)||t.focus()):h({type:0}))}),{isFocusVisible:C,focusProps:I}=(0,r.useFocusRing)({autoFocus:m}),{isHovered:M,hoverProps:E}=(0,i.useHover)({isDisabled:l}),{pressed:A,pressProps:P}=(0,o.useActivePress)({disabled:l}),L=(0,n.useMemo)(()=>({open:0===g.disclosureState,hover:M,active:A,disabled:l,focus:C,autofocus:m}),[g,M,A,C,l,m]),O=(0,c.useResolveButtonType)(e,g.buttonElement),F=y?(0,b.mergeProps)({ref:_,type:O,disabled:l||void 0,autoFocus:m,onKeyDown:w,onClick:N},I,E,P):(0,b.mergeProps)({ref:_,id:s,type:O,"aria-expanded":0===g.disclosureState,"aria-controls":g.panelElement?g.panelId:void 0,disabled:l||void 0,autoFocus:m,onKeyDown:w,onKeyUp:k,onClick:N},I,E,P);return(0,b.useRender)()({ourProps:F,theirProps:p,slot:L,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,b.forwardRefWithAs)(function(e,t){let a=(0,n.useId)(),{id:s=`headlessui-disclosure-panel-${a}`,transition:l=!1,...r}=e,[i,o]=S("Disclosure.Panel"),{close:c}=function e(t){let a=(0,n.useContext)(C);if(null===a){let a=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,e),a}return a}("Disclosure.Panel"),[p,g]=(0,n.useState)(null),x=(0,u.useSyncRefs)(t,(0,d.useEvent)(e=>{v(()=>o({type:5,element:e}))}),g);(0,n.useEffect)(()=>(o({type:3,panelId:s}),()=>{o({type:3,panelId:null})}),[s,o]);let f=(0,h.useOpenClosed)(),[y,j]=(0,m.useTransition)(l,p,null!==f?(f&h.State.Open)===h.State.Open:0===i.disclosureState),_=(0,n.useMemo)(()=>({open:0===i.disclosureState,close:c}),[i.disclosureState,c]),w={ref:x,id:s,...(0,m.transitionDataAttributes)(j)},k=(0,b.useRender)();return n.default.createElement(h.ResetOpenClosedProvider,null,n.default.createElement(T.Provider,{value:i.panelId},k({ourProps:w,theirProps:r,slot:_,defaultTag:"div",features:E,visible:y,name:"Disclosure.Panel"})))})});e.s(["Disclosure",()=>A],886148);let P=(0,n.createContext)(void 0);var L=e.i(444755);let O=(0,e.i(673706).makeClassName)("Accordion"),F=(0,n.createContext)({isOpen:!1}),D=n.default.forwardRef((e,t)=>{var a;let{defaultOpen:s=!1,children:r,className:i}=e,o=(0,l.__rest)(e,["defaultOpen","children","className"]),d=null!=(a=(0,n.useContext)(P))?a:(0,L.tremorTwMerge)("rounded-tremor-default border");return n.default.createElement(A,Object.assign({as:"div",ref:t,className:(0,L.tremorTwMerge)(O("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",d,i),defaultOpen:s},o),({open:e})=>n.default.createElement(F.Provider,{value:{isOpen:e}},r))});D.displayName="Accordion",e.s(["OpenContext",()=>F,"default",()=>D],543086),e.s(["Accordion",()=>D],677667)},898667,e=>{"use strict";var t=e.i(290571),a=e.i(271645),s=e.i(886148);let l=e=>{var s=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},s),a.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),i=e.i(444755);let n=(0,e.i(673706).makeClassName)("AccordionHeader"),o=a.default.forwardRef((e,o)=>{let{children:d,className:c}=e,u=(0,t.__rest)(e,["children","className"]),{isOpen:m}=(0,a.useContext)(r.OpenContext);return a.default.createElement(s.Disclosure.Button,Object.assign({ref:o,className:(0,i.tremorTwMerge)(n("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",c)},u),a.default.createElement("div",{className:(0,i.tremorTwMerge)(n("children"),"flex flex-1 text-inherit mr-4")},d),a.default.createElement("div",null,a.default.createElement(l,{className:(0,i.tremorTwMerge)(n("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",()=>o],898667)},130643,e=>{"use strict";var t=e.i(290571),a=e.i(271645),s=e.i(886148),l=e.i(444755);let r=(0,e.i(673706).makeClassName)("AccordionBody"),i=a.default.forwardRef((e,i)=>{let{children:n,className:o}=e,d=(0,t.__rest)(e,["children","className"]);return a.default.createElement(s.Disclosure.Panel,Object.assign({ref:i,className:(0,l.tremorTwMerge)(r("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",o)},d),n)});i.displayName="AccordionBody",e.s(["AccordionBody",()=>i],130643)},109034,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(135214);let r=(0,a.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:a,userRole:i}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,s.tagListCall)(e),enabled:!!(e&&a&&i)})}])},9314,263147,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(981339),l=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),a=`${t}/v1/access_group`,s=await fetch(a,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return s.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:f}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});let y=(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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(a.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,notFoundContent:f?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(y.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:y.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},552130,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,a.useState)([]),[m,p]=(0,a.useState)([]),[g,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getAgentsList)(n),t=e?.agents||[];u(t);let a=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>a.add(e))}),p(Array.from(a))}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`}))],f=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(s.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:f,loading:g,className:i,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)(s.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))})})}])},844565,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,a.useState)([]),[p,g]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,l.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,a=e.methods;return a&&a.length>0?a.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(s.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,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:"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,a],810757);let s=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:"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,s],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",a=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],s=a.reduce((e,t)=>(e[t.displayName]=t,e),{}),l=a.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=a.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,s,"callback_map",0,l,"mapDisplayToInternalNames",0,e=>e.map(e=>l[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},75921,e=>{"use strict";var t=e.i(843476),a=e.i(266027),s=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,s.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:s,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:f}=(0,n.useMCPServers)(h),{data:y=[],isLoading:b}=(()=>{let{accessToken:e}=(0,r.default)();return(0,a.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:v=[],isLoading:j}=(0,o.useMCPToolsets)(),_=new Set(y),w=[...y.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`})),...v.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],k={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},N={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...s?.servers||[],...s?.accessGroups||[],...(s?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let a=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),s=t.filter(e=>!e.startsWith(c));e({servers:s.filter(e=>!_.has(e)),accessGroups:s.filter(e=>_.has(e)),toolsets:a})},value:S,loading:f||b||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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:k[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:k[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:N[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(764205),l=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,a.useState)({}),[f,y]=(0,a.useState)({}),[b,v]=(0,a.useState)({}),[j,_]=(0,a.useState)({}),w=(0,a.useRef)(u);(0,a.useEffect)(()=>{w.current=u},[u]);let k=(0,a.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),N=async(e,t)=>{y(t=>({...t,[e]:!0})),v(t=>({...t,[e]:""}));try{let a=await (0,s.listMCPTools)(t,e);if(a.error)v(t=>({...t,[e]:a.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=a.tools||[];x(a=>({...a,[e]:t}));let s=w.current;if(!s[e]&&t.length>0){let a=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...s,[e]:a})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),v(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{y(t=>({...t,[e]:!1}))}};(0,a.useEffect)(()=>{k.forEach(t=>{h[t.server_id]||f[t.server_id]||N(t.server_id,e)})},[k,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:k.map(e=>{let a=e.server_name||e.alias||e.server_id,s=h[e.server_id]||[],n=u[e.server_id]||[],d=f[e.server_id],c=b[e.server_id],g=j[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)(l.Text,{className:"font-semibold text-gray-900",children:a}),e.description&&(0,t.jsx)(l.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&s.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>_(a=>({...a,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 a;return a=h[t=e.server_id]||[],void m({...u,[t]:a.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)(r.Spin,{size:"large"}),(0,t.jsx)(l.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)(l.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(l.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&s.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:s,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&s.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:s.map(a=>{let s=n.includes(a.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{if(p)return;let t=s?n.filter(e=>e!==a.name):[...n,a.name];S(e.server_id,t)},disabled:p,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)(l.Text,{className:"font-medium text-gray-900",children:a.name}),(0,t.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["- ",a.description||"No description"]})]})})]},a.name)})}),!d&&!c&&0===s.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(l.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(592968),l=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=a.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:f=[],onDisabledCallbacksChange:y})=>{let b=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),v=Object.keys(p.callbackInfo),j=e=>{x?.(e)},_=(t,a,s)=>{let l=[...e];if("callback_name"===a){let e=p.callback_map[s]||s;l[t]={...l[t],[a]:e,callback_vars:{}}}else l[t]={...l[t],[a]:s};j(l)},w=(t,a,s)=>{let l=[...e];l[t]={...l[t],callback_vars:{...l[t].callback_vars,[a]:s}},j(l)};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)(s.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(a.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);y?.(t)},style:{width:"100%"},optionLabelProp:"label",children:v.map(e=>{let a=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(s.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(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)(l.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)(s.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((l,d)=>{let u=l.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===l.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(a.Select,{value:u,placeholder:"Select integration",onChange:e=>_(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:b.map(e=>{let a=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(s.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(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)(a.Select,{value:l.callback_type,onChange:e=>_(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,a)=>{if(!e.callback_name)return null;let l=Object.entries(p.callback_map).find(([t,a])=>a===e.callback_name)?.[0];if(!l)return null;let i=p.callbackInfo[l]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([l,i])=>(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:l.replace(/_/g," ")}),(0,t.jsx)(s.Tooltip,{title:`Environment variable reference recommended: os.environ/${l.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(a,l,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(a,l,e.target.value)})]},l))})]})})(l,d)]})]},d)})}),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'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(404206),l=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,a.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,f]=(0,a.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[y,b]=(0,a.useState)([]),[v,j]=(0,a.useState)([]),[_,w]=(0,a.useState)([]),[k,N]=(0,a.useState)([]),[S,C]=(0,a.useState)({}),[T,I]=(0,a.useState)({}),M=(0,a.useRef)(!1),E=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(M.current&&e===E.current){M.current=!1;return}if(M.current&&e!==E.current&&(M.current=!1),e!==E.current)if(E.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...a}=e;f({routerSettings:a,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let s=e.fallbacks||[];b(s),j(s&&0!==s.length?s.map((e,t)=>{let[a,s]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:a||null,fallbackModels:s||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),b([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,a.useEffect)(()=>{e&&(0,o.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 a=e.fields.find(e=>"routing_strategy"===e.field_name);a?.options&&N(a.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,a.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let A=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),a=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:y.length>0?y:null}).map(([a,s])=>{if("routing_strategy_args"!==a&&"routing_strategy"!==a&&"enable_tag_filtering"!==a&&"fallbacks"!==a){let l=document.querySelector(`input[name="${a}"]`);if(l){if(void 0!==l.value&&""!==l.value){let r=((a,s,l)=>{if(null==s)return l;let r=String(s).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(a)){let e=Number(r);return Number.isNaN(e)?l:e}if(t.has(a)){if(""===r)return null;try{return JSON.parse(r)}catch{return l}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(a,l.value,s);return[a,r]}return[a,null]}}else if("routing_strategy"===a)return[a,x.selectedStrategy];else if("enable_tag_filtering"===a)return[a,x.enableTagFiltering];else if("fallbacks"===a)return[a,y.length>0?y:null];else if("routing_strategy_args"===a&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),a={};return e?.value&&(a.lowest_latency_buffer=Number(e.value)),t?.value&&(a.ttl=Number(t.value)),["routing_strategy_args",Object.keys(a).length>0?a:null]}return[a,s]}).filter(e=>null!=e)),s=(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:s(a.routing_strategy),allowed_fails:s(a.allowed_fails,!0),cooldown_time:s(a.cooldown_time,!0),num_retries:s(a.num_retries,!0),timeout:s(a.timeout,!0),retry_after:s(a.retry_after,!0),fallbacks:y.length>0?y:null,context_window_fallbacks:s(a.context_window_fallbacks),retry_policy:s(a.retry_policy),model_group_alias:s(a.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:s(a.routing_strategy_args)}};(0,a.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{M.current=!0,p({router_settings:A()})},100);return()=>clearTimeout(e)},[x,y]);let P=Array.from(new Set(_.map(e=>e.model_group))).sort();return((0,a.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:A()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(l.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(s.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(s.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:v,onGroupsChange:e=>{j(e),b(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:P,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},207082,e=>{"use strict";var t=e.i(619273),a=e.i(266027),s=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,s.createQueryKeys)("keys"),n=async(e,t,a,s={})=>{try{let r=(0,l.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:s.teamID,project_id:s.projectID,organization_id:s.organizationID,key_alias:s.selectedKeyAlias,key_hash:s.keyHash,user_id:s.userID,page:t,size:a,sort_by:s.sortBy,sort_order:s.sortOrder,expand:s.expand,status:s.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,s.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,s,l={})=>{let{accessToken:i}=(0,r.default)();return(0,a.useQuery)({queryKey:o.list({page:e,limit:s,...l}),queryFn:async()=>await n(i,e,s,{...l,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,s,l={})=>{let{accessToken:o}=(0,r.default)();return(0,a.useQuery)({queryKey:i.list({page:e,limit:s,...l}),queryFn:async()=>await n(o,e,s,l),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(708347),r=e.i(135214);let i=(0,a.createQueryKeys)("projects"),n=async e=>{let t=(0,s.getProxyBaseUrl)(),a=`${t}/project/list`,l=await fetch(a,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return l.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:a}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&l.all_admin_roles.includes(a||"")})}])},392110,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=s.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:f})=>{let y=p&&!["7d","30d","90d","180d","365d"].includes(p),[b,v]=(0,a.useState)(y),[j,_]=(0,a.useState)(y?p:""),[w,k]=(0,a.useState)(e?.getFieldValue?.("duration")||"");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)(l.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&f&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let a=t.target.checked;f(a),a&&(k(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{k(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(l.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(l.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(s.Select,{value:b?"custom":p,onChange:e=>{"custom"===e?v(!0):(v(!1),_(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),b&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;_(t),g(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)"})]})]})]})]}),u&&(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."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),a=e.i(808613),s=e.i(199133),l=e.i(592968),r=e.i(827252);let{Option:i}=s.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(a.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(l.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(s.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),a=e.i(199133);let{Text:s}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:l,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(a.Select,{showSearch:!0,placeholder:"All Organizations",value:l,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,a)=>{if(!a)return!1;let s=e?.find(e=>e.organization_id===a.key);if(!s)return!1;let l=t.toLowerCase().trim(),r=(s.organization_alias||"").toLowerCase(),i=(s.organization_id||"").toLowerCase();return r.includes(l)||i.includes(l)},children:e?.map(e=>(0,t.jsxs)(a.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(s,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(28651),l=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,a,s)=>{i(e.map((e,l)=>l===t?{...e,[a]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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)(l.Select,{value:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(s.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(a.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(a.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},533882,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(250980),l=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:f={},onAliasUpdate:y,showExampleConfig:b=!0})=>{let[v,j]=(0,a.useState)([]),[_,w]=(0,a.useState)({aliasName:"",targetModel:""}),[k,N]=(0,a.useState)(null);(0,a.useEffect)(()=>{j(Object.entries(f).map(([e,t],a)=>({id:`${a}-${e}`,aliasName:e,targetModel:t})))},[f]);let S=()=>{if(!k)return;if(!k.aliasName||!k.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.id!==k.id&&e.aliasName===k.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=v.map(e=>e.id===k.id?k:e);j(e),N(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),x.default.success("Alias updated successfully")},C=()=>{N(null)},T=v.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:_.aliasName,onChange:e=>w({..._,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:_.targetModel,placeholder:"Select target model",onChange:e=>w({..._,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!_.aliasName||!_.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.aliasName===_.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...v,{id:`${Date.now()}-${_.aliasName}`,aliasName:_.aliasName,targetModel:_.targetModel}];j(e),w({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),x.default.success("Alias added successfully")},disabled:!_.aliasName||!_.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!_.aliasName||!_.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(s.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)(p.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:[v.map(a=>(0,t.jsx)(p.TableRow,{className:"h-8",children:k&&k.id===a.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:k.aliasName,onChange:e=>N({...k,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:k.targetModel,onChange:e=>N({...k,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:a.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:a.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{N({...a})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(l.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,s;return e=a.id,j(t=v.filter(t=>t.id!==e)),s={},void(t.forEach(e=>{s[e.aliasName]=e.targetModel}),y&&y(s),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},a.id)),0===v.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.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)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,a])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',a,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(266484);e.s(["default",0,function({value:e,onChange:l,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(s.default,{value:e,onChange:l,disabledCallbacks:i,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)(a.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"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(482725),l=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(a.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(s.Spin,{indicator:(0,t.jsx)(l.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let a=c?.find(e=>e.project_id===t.key);if(!a)return!1;let s=e.toLowerCase().trim(),l=(a.project_alias||"").toLowerCase(),r=(a.project_id||"").toLowerCase();return l.includes(s)||r.includes(s)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(a.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),a=e.i(207082),s=e.i(109799),l=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),f=e.i(599724),y=e.i(779241),b=e.i(629569),v=e.i(464571),j=e.i(808613),_=e.i(311451),w=e.i(212931),k=e.i(91739),N=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),M=e.i(271645),E=e.i(708347),A=e.i(552130),P=e.i(557662),L=e.i(9314),O=e.i(860585),F=e.i(82946),D=e.i(392110),R=e.i(533882),$=e.i(844565),B=e.i(651904),z=e.i(939510),K=e.i(460285),V=e.i(663435),U=e.i(363256),G=e.i(575260),q=e.i(371455),H=e.i(319312),W=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[a,s]=(0,M.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{s(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>s(!1),2e3)},children:(0,t.jsx)(v.Button,{type:"primary",style:{marginTop:12},children:a?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var ea=e.i(435451),es=e.i(916940);let{Option:el}=N.Select,er=async(e,t,a,s)=>{try{if(null===e||null===t)return[];if(null!==a){let l=(await (0,X.modelAvailableCall)(a,e,t,!0,s,!0)).data.map(e=>e.id);return console.log("available_model_names:",l),l}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,a,s)=>{try{if(null===e||null===t)return;if(null!==a){let l=(await (0,X.modelAvailableCall)(a,e,t)).data.map(e=>e.id);console.log("available_model_names:",l),s(l)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&E.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,s.useOrganizations)(),{data:ef,isLoading:ey}=(0,l.useProjects)(),{data:eb}=(0,i.useUISettings)(),{data:ev}=(0,r.useTags)(),ej=!!eb?.values?.enable_projects_ui,e_=!!eb?.values?.disable_custom_api_keys,ew=ev?Object.values(ev).map(e=>({value:e.name,label:e.name})):[],ek=(0,c.useQueryClient)(),[eN]=j.Form.useForm(),[eS,eC]=(0,M.useState)(!1),[eT,eI]=(0,M.useState)(null),[eM,eE]=(0,M.useState)(null),[eA,eP]=(0,M.useState)([]),[eL,eO]=(0,M.useState)([]),[eF,eD]=(0,M.useState)("you"),[eR,e$]=(0,M.useState)(!1),[eB,ez]=(0,M.useState)(null),[eK,eV]=(0,M.useState)([]),[eU,eG]=(0,M.useState)([]),[eq,eH]=(0,M.useState)([]),[eW,eQ]=(0,M.useState)([]),[eJ,eY]=(0,M.useState)(e),[eX,eZ]=(0,M.useState)(null),[e0,e1]=(0,M.useState)(null),[e2,e4]=(0,M.useState)(!1),[e3,e6]=(0,M.useState)(null),[e5,e7]=(0,M.useState)({}),[e8,e9]=(0,M.useState)([]),[te,tt]=(0,M.useState)(!1),[ta,ts]=(0,M.useState)([]),[tl,tr]=(0,M.useState)([]),[ti,tn]=(0,M.useState)("llm_api"),[to,td]=(0,M.useState)({}),[tc,tu]=(0,M.useState)(!1),[tm,tp]=(0,M.useState)("30d"),[tg,th]=(0,M.useState)(null),[tx,tf]=(0,M.useState)([]),[ty,tb]=(0,M.useState)(0),[tv,tj]=(0,M.useState)([]),[t_,tw]=(0,M.useState)(null),tk=()=>{eC(!1),eN.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),tb(e=>e+1),tw(null),eZ(null),e1(null),tf([])},tN=()=>{eC(!1),eI(null),eY(null),eN.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),tb(e=>e+1),tw(null),eZ(null),e1(null),tf([])};(0,M.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eP)},[ec,eu,em]),(0,M.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,M.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eG(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eH(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);eV(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,M.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,M.useEffect)(()=>{if(eo&&!eR&&Z&&em&&E.rolesWithWriteAccess.includes(em)&&(eC(!0),e$(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?eD("you"):eD(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),eN.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&eN.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&ez(ed.models),ed.key_type&&(tn(ed.key_type),eN.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eR,eN,em]);let tS=eL.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,s=e?.key_alias??"",l=e?.team_id??null;if((ee?.filter(e=>e.team_id===l).map(e=>e.key_alias)??[]).includes(s))throw Error(`Key alias ${s} already exists for team with ID ${l}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eF)e.user_id=eu;else if("agent"===eF){if(!t_)return void Y.default.fromBackend("Please select an agent");e.agent_id=t_}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eF&&(r.service_account_id=e.key_alias),eW.length>0&&(r={...r,logging:eW.filter(e=>e.callback_name)}),tl.length>0){let e=(0,P.mapDisplayToInternalNames)(tl);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),a&&a.length>0&&(e.object_permission.mcp_access_groups=a),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:a}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),a&&a.length>0&&(e.object_permission.agent_access_groups=a),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eF?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),ek.invalidateQueries({queryKey:a.keyKeys.lists()}),eI(t.key),eE(t.soft_budget),Y.default.success("Virtual Key Created"),eN.resetFields(),tf([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 a=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),s=t?.error||t;s?.message&&(a=s.message)}}else{let t=e?.error||e;t?.message&&(a=t.message)}}catch(e){}return t.includes("team_member_permission_error")||a.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);Y.default.fromBackend(e)}};(0,M.useEffect)(()=>{if(e0){let e=ef?.find(e=>e.project_id===e0);eO(e?.models??[]),eN.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eO(Array.from(new Set([...eJ?.models??[],...e])))}),eB||eN.setFieldValue("models",[]),eN.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,eN]),(0,M.useEffect)(()=>{if(!eB||0===eB.length||!eL||0===eL.length)return;let e=eB.filter(e=>eL.includes(e));e.length>0&&eN.setFieldsValue({models:e}),ez(null)},[eB,eL,eN]),(0,M.useEffect)(()=>{if(!e0||!Z)return;let e=ef?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),eN.setFieldValue("team_id",t.team_id))},[Z,e0,ef]);let tT=async e=>{if(!e)return void e9([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let a=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e9(a)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,M.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&E.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tk,onCancel:tN,children:(0,t.jsxs)(j.Form,{form:eN,onFinish:tC,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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(k.Radio.Group,{onChange:e=>eD(e.target.value),value:eF,children:[(0,t.jsx)(k.Radio,{value:"you",children:"You"}),(0,t.jsx)(k.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(k.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(k.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eF&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eF,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)(N.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tI(e)},onSelect:(e,t)=>{let a;return a=t.user,void eN.setFieldsValue({user_id:a.user_id})},options:e8,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(v.Button,{onClick:()=>e4(!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"===eF&&(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)(N.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:t_,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tv.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(U.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),eN.setFieldValue("team_id",void 0),eN.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eF,message:"Please select a team for the service account"}],help:"service_account"===eF?"required":"",children:(0,t.jsx)(V.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),eN.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),eN.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),eN.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(G.default,{projects:ef,teamId:eJ?.team_id,loading:ey||!Z,onChange:e=>{if(!e){e1(null),eY(null),eN.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(f.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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eF||"another_user"===eF?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eF||"another_user"===eF?"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"===eF?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(y.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(N.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&eN.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(el,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eL.map(e=>(0,t.jsx)(el,{value:e,children:(0,W.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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)(N.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tn(e),("management"===e||"read_only"===e)&&eN.setFieldsValue({models:[]})},children:[(0,t.jsx)(el,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(el,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(el,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.max_budget&&a>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ea.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(O.default,{onChange:e=>eN.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(H.BudgetWindowsEditor,{value:tx,onChange:tf})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.tpm_limit&&a>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ea.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eN,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.rpm_limit&&a>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ea.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eN,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eU.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(L.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)($.default,{onChange:e=>eN.setFieldValue("allowed_passthrough_routes",e),value:eN.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(es.default,{onChange:e=>eN.setFieldValue("allowed_vector_store_ids",e),value:eN.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(_.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>eN.setFieldValue("allowed_mcp_servers_and_groups",e),value:eN.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(_.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:eN.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:eN.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eN.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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)(A.default,{onChange:e=>eN.setFieldValue("allowed_agents_and_groups",e),value:eN.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{value:eW,onChange:eQ,premiumUser:!0,disabledCallbacks:tl,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(B.default,{value:eW,onChange:eQ,premiumUser:!1,disabledCallbacks:tl,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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)(K.default,{accessToken:ec||"",value:tg||void 0,onChange:th,modelData:eA.length>0?{data:eA.map(e=>({model_name:e}))}:void 0},ty)})})]},`router-settings-accordion-${ty}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(f.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)(R.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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:eN,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(_.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(F.default,{schemaComponent:"GenerateKeyRequest",form:eN,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...e_?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(v.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e5,onUserCreated:e=>{e6(e),eN.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tk,onCancel:tN,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!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(f.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/914ef0e7b2f44614.js b/litellm/proxy/_experimental/out/_next/static/chunks/914ef0e7b2f44614.js new file mode 100644 index 0000000000..ca50136532 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/914ef0e7b2f44614.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),s=e.i(618566),a=e.i(947293),i=e.i(764205),r=e.i(954616),n=e.i(266027),o=e.i(612256);let d=(0,e.i(243652).createQueryKeys)("onboarding");var c=e.i(482725),u=e.i(56456);function g(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(c.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var m=e.i(560445),h=e.i(464571);function x(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(m.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(h.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),f=e.i(808613),y=e.i(311451),w=e.i(898586);function j({variant:e,userEmail:s,isPending:a,claimError:i,onSubmit:r}){let[n]=f.Form.useForm();return l.default.useEffect(()=>{s&&n.setFieldValue("user_email",s)},[s,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(m.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(h.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(f.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>r({password:e.password}),children:[(0,t.jsx)(f.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),i&&(0,t.jsx)(m.Alert,{type:"error",message:i,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(h.Button,{htmlType:"submit",loading:a,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function v({variant:e}){let c=(0,s.useSearchParams)().get("invitation_id"),[u,m]=l.default.useState(null),{data:h,isLoading:p,isError:f}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:d.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,i.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(c),{mutate:y,isPending:w}=(0,r.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:s})=>await (0,i.claimOnboardingToken)(e,t,l,s)}),v=h?.token?(0,a.jwtDecode)(h.token):null,S=v?.user_email??"",b=v?.user_id??null,_=v?.key??null,N=h?.token??null;return p?(0,t.jsx)(g,{}):f?(0,t.jsx)(x,{}):(0,t.jsx)(j,{variant:e,userEmail:S,isPending:w,claimError:u,onSubmit:e=>{_&&N&&b&&c&&(m(null),y({accessToken:_,inviteId:c,userId:b,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,i.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{m(e.message||"Failed to submit. Please try again.")}}))}})}function S(){let e=(0,s.useSearchParams)().get("action");return(0,t.jsx)(v,{variant:"reset_password"===e?"reset_password":"signup"})}function b(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(S,{})})}e.s(["default",()=>b],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),s=e.i(243652),a=e.i(764205),i=e.i(135214);let r=(0,s.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),d=e.i(199133),c=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:s,placeholder:u="Select a key alias",style:g,pageSize:m=50,allowClear:h=!0,disabled:x=!1,allFilters:p})=>{let[f,y]=(0,c.useState)(""),[w,j]=(0,o.useDebouncedState)("",{wait:300}),{data:v,fetchNextPage:S,hasNextPage:b,isFetchingNextPage:_,isLoading:N}=((e=50,t,s)=>{let{accessToken:n}=(0,i.default)();return(0,l.useInfiniteQuery)({queryKey:r.list({filters:{size:e,...t&&{search:t},...s&&{team_id:s}}}),queryFn:async({pageParam:l})=>await (0,a.keyAliasesCall)(n,l,e,t,s),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!v?.pages)return[];let e=new Set,t=[];for(let l of v.pages)for(let s of l.aliases)!s||e.has(s)||(e.add(s),t.push({label:s,value:s}));return t},[v]);return(0,t.jsx)(d.Select,{value:e||void 0,onChange:e=>{s?.(e??"")},placeholder:u,style:{width:"100%",...g},allowClear:h,disabled:x,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),j(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&b&&!_&&S()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:k,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),s=e.i(309426),a=e.i(350967),i=e.i(898586),r=e.i(947293),n=e.i(618566),o=e.i(271645),d=e.i(566606),c=e.i(584578),u=e.i(764205),g=e.i(702597),m=e.i(207082),h=e.i(109799),x=e.i(500330),p=e.i(871943),f=e.i(502547),y=e.i(360820),w=e.i(94629),j=e.i(152990),v=e.i(682830),S=e.i(389083),b=e.i(994388),_=e.i(752978),N=e.i(269200),k=e.i(942232),z=e.i(977572),I=e.i(427612),C=e.i(64848),D=e.i(496020),T=e.i(599724),A=e.i(827252),P=e.i(772345),O=e.i(464571),U=e.i(282786),R=e.i(981339),K=e.i(262218),L=e.i(592968),E=e.i(355619),B=e.i(633627),M=e.i(374009),$=e.i(700514),F=e.i(135214),V=e.i(50882),H=e.i(969550),W=e.i(304911),q=e.i(20147);function J({teams:e,organizations:l,onSortChange:s,currentSort:a}){let{data:r}=(0,h.useOrganizations)(),n=r??l??[],[d,c]=(0,o.useState)(null),[g,J]=o.default.useState(()=>a?[{id:a.sortBy,desc:"desc"===a.sortOrder}]:[{id:"created_at",desc:!0}]),[G,Q]=o.default.useState({pageIndex:0,pageSize:50}),Z=g.length>0?g[0].id:null,X=g.length>0?g[0].desc?"desc":"asc":null,{data:Y,isPending:ee,isFetching:et,isError:el,refetch:es}=(0,m.useKeys)(G.pageIndex+1,G.pageSize,{sortBy:Z||void 0,sortOrder:X||void 0,expand:"user"}),[ea,ei]=(0,o.useState)({}),{filters:er,filteredKeys:en,filteredTotalCount:eo,allTeams:ed,allOrganizations:ec,handleFilterChange:eu,handleFilterReset:eg}=function({keys:e,teams:t,organizations:l}){let s={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:a}=(0,F.default)(),[i,r]=(0,o.useState)(s),[n,d]=(0,o.useState)(t||[]),[c,g]=(0,o.useState)(l||[]),[m,h]=(0,o.useState)(e),[x,p]=(0,o.useState)(null),f=(0,o.useRef)(0),y=(0,o.useCallback)((0,M.default)(async e=>{if(!a)return;let t=Date.now();f.current=t;try{let l=await (0,u.keyListCall)(a,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,$.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===f.current&&l&&(h(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[a]);return(0,o.useEffect)(()=>{if(!e)return void h([]);let t=[...e];i["Team ID"]&&(t=t.filter(e=>e.team_id===i["Team ID"])),i["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===i["Organization ID"])),h(t)},[e,i]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,B.fetchAllTeams)(a);e.length>0&&d(e);let t=await (0,B.fetchAllOrganizations)(a);t.length>0&&g(t)};a&&e()},[a]),(0,o.useEffect)(()=>{t&&t.length>0&&d(e=>e.length{l&&l.length>0&&g(e=>e.length{r({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...i,...e})},handleFilterReset:()=>{r(s),p(null),y(s)}}}({keys:Y?.keys||[],teams:e,organizations:l}),em=(0,o.useDeferredValue)(et),eh=(et||em)&&!el,ex=eo??Y?.total_count??0;(0,o.useEffect)(()=>{if(es){let e=()=>{es()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[es]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)(L.Tooltip,{title:l,children:(0,t.jsx)(b.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:s,overflow:"hidden"},onClick:()=>c(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:l??"-"})}},{id:"status",header:"Status",size:100,enableSorting:!1,cell:({row:e})=>{let l=e.original,s=!0===l.blocked,a=!0===(l.metadata??{}).scim_blocked;return s?(0,t.jsx)(L.Tooltip,{title:a?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401.",children:(0,t.jsx)(K.Tag,{color:"red","data-testid":`key-status-${l.token_id}`,children:"Blocked"})}):(0,t.jsx)(K.Tag,{color:"green","data-testid":`key-status-${l.token_id}`,children:"Active"})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let s=l.getValue();if(!s)return"-";let a=e?.find(e=>e.team_id===s),i=a?.team_alias||s,r=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:i})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let s=n.find(e=>e.organization_id===l),a=s?.organization_alias||l,i=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:a})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(U.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(A.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.user?.user_alias??null,a=l.user?.user_email??l.user_email??null,r=l.user_id??null,n="default_user_id"===r,o=s||a||r,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:a},{label:"User ID",value:r}].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)(i.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||a?(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(W.default,{userId:r})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let s=e.row.original.created_by_user,a=s?.user_alias??null,r=s?.user_email??null,n="default_user_id"===l,o=a||r||l,d=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:r},{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)(i.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||r?(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(W.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(U.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(A.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let s=new Date(l);return(0,t.jsx)(L.Tooltip,{title:s.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:s.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,x.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,x.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(S.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})}):(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)(_.Icon,{icon:ea[e.row.id]?p.ChevronDownIcon:f.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{ei(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)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,E.getModelDisplayName)(e).slice(0,30)}...`:(0,E.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(S.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(T.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[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)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,E.getModelDisplayName)(e).slice(0,30)}...`:(0,E.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"]})]})}}],[e,n]),ef=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ey=(0,j.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:g,pagination:G},onSortingChange:e=>{let t="function"==typeof e?e(g):e;if(J(t),t&&t.length>0){let e=t[0],l=e.id,a=e.desc?"desc":"asc";eu({...er,"Sort By":l,"Sort Order":a},!0),s?.(l,a)}},onPaginationChange:Q,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),getPaginationRowModel:(0,v.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(ex/G.pageSize)});o.default.useEffect(()=>{a&&J([{id:a.sortBy,desc:"desc"===a.sortOrder}])},[a]);let{pageIndex:ew,pageSize:ej}=ey.getState().pagination,ev=Math.min((ew+1)*ej,ex),eS=`${ew*ej+1} - ${ev}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:d?(0,t.jsx)(q.default,{keyId:d.token,onClose:()=>c(null),keyData:d,teams:ed,onDelete:es}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(H.default,{options:ef,onApplyFilters:eu,initialValues:er,onResetFilters:eg})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(R.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",eS," of ",ex," results"]}),(0,t.jsx)(O.Button,{type:"default",icon:(0,t.jsx)(P.SyncOutlined,{spin:eh}),onClick:()=>{es()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(R.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ew+1," of ",ey.getPageCount()]}),ee?(0,t.jsx)(R.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.previousPage(),disabled:ee||!ey.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),ee?(0,t.jsx)(R.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.nextPage(),disabled:ee||!ey.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ey.getCenterTotalSize()},children:[(0,t.jsx)(I.TableHead,{children:ey.getHeaderGroups().map(e=>(0,t.jsx)(D.TableRow,{children:e.headers.map(e=>(0,t.jsx)(C.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(y.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(w.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ey.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(k.TableBody,{children:ee?(0,t.jsx)(D.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ey.getRowModel().rows.map(e=>(0,t.jsx)(D.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(z.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(D.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:m,teams:h,keys:x,setUserRole:p,userEmail:f,setUserEmail:y,setTeams:w,setKeys:j,premiumUser:v,organizations:S,addKey:b,createClicked:_,autoOpenCreate:N,prefillData:k})=>{let[z,I]=(0,o.useState)(null),[C,D]=(0,o.useState)(null),T=(0,n.useSearchParams)(),A=(0,l.getCookie)("token"),P=T.get("invitation_id"),[O,U]=(0,o.useState)(null),[R,K]=(0,o.useState)(null),[L,E]=(0,o.useState)([]),[B,M]=(0,o.useState)(null),[$,F]=(0,o.useState)(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(A){let e=(0,r.jwtDecode)(A);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),U(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),p(t)}else console.log("User role not defined");e.user_email?y(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&O&&m&&!z){let t=sessionStorage.getItem("userModels"+e);t?E(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(C)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(O);M(t);let l=await (0,u.userGetInfoV2)(O,e);I(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let s=(await (0,u.modelAvailableCall)(O,e,m)).data.map(e=>e.id);console.log("available_model_names:",s),E(s),console.log("userModels:",L),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")&&V()}})(),(0,c.fetchTeams)(O,e,m,C,w))}},[e,A,O,m]),(0,o.useEffect)(()=>{O&&(async()=>{try{let e=await (0,u.keyInfoCall)(O,[O]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&V()}})()},[O]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(C)}, accessToken: ${O}, userID: ${e}, userRole: ${m}`),O&&(console.log("fetching teams"),(0,c.fetchTeams)(O,e,m,C,w))},[C]),(0,o.useEffect)(()=>{if(null!==x&&null!=$&&null!==$.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(x)}`),x))$.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===$.team_id&&(e+=t.spend);console.log(`sum: ${e}`),K(e)}else if(null!==x){let e=0;for(let t of x)e+=t.spend;K(e)}},[$]),null!=P)return(0,t.jsx)(d.default,{});function V(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==A)return console.log("All cookies before redirect:",document.cookie),V(),null;try{let e=(0,r.jwtDecode)(A);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),V(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),V(),null}if(null==O)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==m&&p("App Owner"),m&&"Admin Viewer"==m){let{Title:e,Paragraph:l}=i.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",$),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(a.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(s.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(g.default,{team:$,teams:h,data:x,addKey:b,autoOpenCreate:N,prefillData:k},$?$.team_id:null),(0,t.jsx)(J,{teams:h,organizations:S})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/91a13e42c88cfff6.js b/litellm/proxy/_experimental/out/_next/static/chunks/91a13e42c88cfff6.js new file mode 100644 index 0000000000..99b52c6a02 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/91a13e42c88cfff6.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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",c="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|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},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 g="$isDayjsObject",p=function(e){return e instanceof b||!(!e||!e[g])},x=function e(t,r,a){var n;if(!t)return h;if("string"==typeof t){var s=t.toLowerCase();f[s]&&(n=s),r&&(f[s]=r,n=s);var i=t.split("-");if(!n&&i.length>1)return e(i[0])}else{var l=t.name;f[l]=t,n=l}return!a&&n&&(h=n),n||!a&&h},y=function(e,t){if(p(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new b(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)},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)},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var n=e.i(464571),s=e.i(311451),i=e.i(199133),l=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[m,h]=(0,r.useState)(!1),[f,g]=(0,r.useState)(u),[p,x]=(0,r.useState)({}),[y,v]=(0,r.useState)({}),[b,j]=(0,r.useState)({}),[w,$]=(0,r.useState)({}),C=(0,r.useCallback)((0,l.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){v(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);x(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{v(e=>({...e,[t.name]:!1}))}}},300),[]),S=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!w[e.name]){v(t=>({...t,[e.name]:!0})),$(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{v(t=>({...t,[e.name]:!1}))}}},[w]);(0,r.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!w[e.name]&&S(e)})},[m,e,S,w]);let k=(e,t)=>{let r={...f,[e]:t};g(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(n.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:d}),(0,t.jsx)(n.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),g(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,n=e.find(e=>e.label===r||e.name===r);return n?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:n.label||n.name}),n.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${n.label||n.name}...`,value:f[n.name]||void 0,onChange:e=>k(n.name,e),onOpenChange:e=>{e&&n.isSearchable&&!w[n.name]&&S(n)},onSearch:e=>{j(t=>({...t,[n.name]:e})),n.searchFn&&C(e,n)},filterOption:!1,loading:y[n.name],options:p[n.name]||[],allowClear:!0,notFoundContent:y[n.name]?"Loading...":"No results found"}):n.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${n.label||n.name}...`,value:f[n.name]||void 0,onChange:e=>k(n.name,e),allowClear:!0,children:n.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):n.customComponent?(a=n.customComponent,(0,t.jsx)(a,{value:f[n.name]||void 0,onChange:e=>k(n.name,e??""),placeholder:`Select ${n.label||n.name}...`,allFilters:f})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${n.label||n.name}...`,value:f[n.name]||"",onChange:e=>k(n.name,e.target.value),allowClear:!0})]},n.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let n of e){let e=n?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=n?.organization_id??n?.org_id;s&&"string"==typeof s&&r.add(s.trim());let i=n?.user_id;if(i&&"string"==typeof i){let e=n?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let n=new Set,s=new Set,i=new Map,l=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=l?.keys||[],c=l?.total_pages??1;r(o,n,s,i);let u=Math.min(c,10)-1;if(u>0){let l=Array.from({length:u},(r,n)=>(0,t.keyListCall)(e,null,a,null,null,null,n+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(l)))"fulfilled"===e.status&&r(e.value?.keys||[],n,s,i)}return{keyAliases:Array.from(n).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},n=async(e,r)=>{if(!e)return[];try{let a=[],n=1,s=!0;for(;s;){let i=await (0,t.teamListCall)(e,r||null,null);a=[...a,...i],n{if(!e)return[];try{let r=[],a=1,n=!0;for(;n;){let s=await (0,t.organizationListCall)(e);r=[...r,...s],a{"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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},678784,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",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(914949),n=e.i(404948);let s=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,s],836938);var i=e.i(613541),l=e.i(763731),o=e.i(242064),c=e.i(491816);e.i(793154);var u=e.i(880476),d=e.i(183293),m=e.i(717356),h=e.i(320560),f=e.i(307358),g=e.i(246422),p=e.i(838378),x=e.i(617933);let y=(0,g.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,a=(0,p.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:a,fontWeightStrong:n,innerPadding:s,boxShadowSecondary:i,colorTextHeading:l,borderRadiusLG:o,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:m,popoverBg:f,titleBorderBottom:g,innerContentPadding:p,titlePadding:x}=e;return[{[t]:Object.assign(Object.assign({},(0,d.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:o,boxShadow:i,padding:s},[`${t}-title`]:{minWidth:a,marginBottom:u,color:l,fontWeight:n,borderBottom:g,padding:x},[`${t}-inner-content`]:{color:r,padding:p}})},(0,h.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:x.PresetColors.map(r=>{let a=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:a,padding:n,wireframe:s,zIndexPopupBase:i,borderRadiusLG:l,marginXS:o,lineType:c,colorSplit:u,paddingSM:d}=e,m=r-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:i+30},(0,f.getArrowToken)(e)),(0,h.getArrowOffsetToken)({contentRadius:l,limitVerticalRadius:!0})),{innerPadding:12*!s,titleMarginBottom:s?0:o,titlePadding:s?`${m/2}px ${n}px ${m/2-t}px`:0,titleBorderBottom:s?`${t}px ${c} ${u}`:"none",innerContentPadding:s?`${d}px ${n}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var 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 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};let b=({title:e,content:r,prefixCls:a})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),r&&t.createElement("div",{className:`${a}-inner-content`},r)):null,j=e=>{let{hashId:a,prefixCls:n,className:i,style:l,placement:o="top",title:c,content:d,children:m}=e,h=s(c),f=s(d),g=(0,r.default)(a,n,`${n}-pure`,`${n}-placement-${o}`,i);return t.createElement("div",{className:g,style:l},t.createElement("div",{className:`${n}-arrow`}),t.createElement(u.Popup,Object.assign({},e,{className:a,prefixCls:n}),m||t.createElement(b,{prefixCls:n,title:h,content:f})))},w=e=>{let{prefixCls:a,className:n}=e,s=v(e,["prefixCls","className"]),{getPrefixCls:i}=t.useContext(o.ConfigContext),l=i("popover",a),[c,u,d]=y(l);return c(t.createElement(j,Object.assign({},s,{prefixCls:l,hashId:u,className:(0,r.default)(n,d)})))};e.s(["Overlay",0,b,"default",0,w],310730);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 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};let C=t.forwardRef((e,u)=>{var d,m;let{prefixCls:h,title:f,content:g,overlayClassName:p,placement:x="top",trigger:v="hover",children:j,mouseEnterDelay:w=.1,mouseLeaveDelay:C=.1,onOpenChange:S,overlayStyle:k={},styles:M,classNames:O}=e,N=$(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:_,className:T,style:D,classNames:E,styles:z}=(0,o.useComponentConfig)("popover"),A=_("popover",h),[L,B,H]=y(A),I=_(),P=(0,r.default)(p,B,H,T,E.root,null==O?void 0:O.root),V=(0,r.default)(E.body,null==O?void 0:O.body),[W,R]=(0,a.default)(!1,{value:null!=(d=e.open)?d:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),F=(e,t)=>{R(e,!0),null==S||S(e,t)},Y=s(f),U=s(g);return L(t.createElement(c.default,Object.assign({placement:x,trigger:v,mouseEnterDelay:w,mouseLeaveDelay:C},N,{prefixCls:A,classNames:{root:P,body:V},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},z.root),D),k),null==M?void 0:M.root),body:Object.assign(Object.assign({},z.body),null==M?void 0:M.body)},ref:u,open:W,onOpenChange:e=>{F(e)},overlay:Y||U?t.createElement(b,{prefixCls:A,title:Y,content:U}):null,transitionName:(0,i.getTransitionName)(I,"zoom-big",N.transitionName),"data-popover-inject":!0}),(0,l.cloneElement)(j,{onKeyDown:e=>{var r,a;(0,t.isValidElement)(j)&&(null==(a=null==j?void 0:(r=j.props).onKeyDown)||a.call(r,e)),e.keyCode===n.default.ESC&&F(!1,e)}})))});C._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,C],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},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)},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",()=>t])},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)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},584578,e=>{"use strict";var t=e.i(764205);let r=async(e,r,a,n,s)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,n?.organization_id||null,r):await (0,t.teamListCall)(e,n?.organization_id||null),console.log(`givenTeams: ${i}`),s(i)};e.s(["fetchTeams",0,r])},468133,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(175712),n=e.i(464571),s=e.i(28651),i=e.i(898586),l=e.i(482725),o=e.i(199133),c=e.i(262218),u=e.i(621192),d=e.i(178654),m=e.i(751904),h=e.i(987432),f=e.i(764205),g=e.i(860585),p=e.i(355619),x=e.i(727749),y=e.i(162386);let{Title:v,Text:b}=i.Typography,j=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],w=({label:e,description:r,isEditing:a,viewContent:n,editContent:s})=>(0,t.jsxs)(u.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(d.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:r})]}),(0,t.jsx)(d.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:a?s:n})})]}),$=()=>(0,t.jsx)(b,{className:"text-gray-400 italic",children:"Not set"}),C=(e,r)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:r?r(e):e},e))}):(0,t.jsx)($,{}),S={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[i,u]=(0,r.useState)(!0),[d,k]=(0,r.useState)(S),[M,O]=(0,r.useState)(!1),[N,_]=(0,r.useState)(S),[T,D]=(0,r.useState)(!1),[E,z]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(!e)return u(!1);try{let t=await (0,f.getDefaultTeamSettings)(e),r={...S,...t.values||{}};k(r),_(r)}catch(e){console.error("Error fetching team SSO settings:",e),z(!0),x.default.fromBackend("Failed to fetch team settings")}finally{u(!1)}})()},[e]);let A=async()=>{if(e){D(!0);try{let t=await (0,f.updateDefaultTeamSettings)(e,N),r={...S,...t.settings||{}};k(r),_(r),O(!1),x.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),x.default.fromBackend("Failed to update team settings")}finally{D(!1)}}},L=(e,t)=>{_(r=>({...r,[e]:t}))};return i?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(l.Spin,{size:"large"})}):E?(0,t.jsx)(a.Card,{children:(0,t.jsx)(b,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(a.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(b,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:M?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(n.Button,{onClick:()=>{O(!1),_(d)},disabled:T,children:"Cancel"}),(0,t.jsx)(n.Button,{type:"primary",onClick:A,loading:T,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(n.Button,{onClick:()=>O(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:M,viewContent:null!=d.max_budget?(0,t.jsxs)(b,{children:["$",Number(d.max_budget).toLocaleString()]}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.max_budget,onChange:e=>L("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(w,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:M,viewContent:d.budget_duration?(0,t.jsx)(b,{children:(0,g.getBudgetDurationLabel)(d.budget_duration)}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(g.default,{value:N.budget_duration||null,onChange:e=>L("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(w,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:M,viewContent:null!=d.tpm_limit?(0,t.jsx)(b,{children:d.tpm_limit.toLocaleString()}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.tpm_limit,onChange:e=>L("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(w,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:M,viewContent:null!=d.rpm_limit?(0,t.jsx)(b,{children:d.rpm_limit.toLocaleString()}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.rpm_limit,onChange:e=>L("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Models",description:"Default list of models that new teams can access.",isEditing:M,viewContent:C(d.models,p.getModelDisplayName),editContent:(0,t.jsx)(y.ModelSelect,{value:N.models||[],onChange:e=>L("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(w,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:M,viewContent:C(d.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:N.team_member_permissions||[],onChange:e=>L("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:r,onClose:a})=>(0,t.jsx)(c.Tag,{color:"blue",closable:r,onClose:a,className:"mr-1 mt-1 mb-1",children:e}),children:j.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},747871,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(269200),n=e.i(942232),s=e.i(977572),i=e.i(427612),l=e.i(64848),o=e.i(496020),c=e.i(304967),u=e.i(994388),d=e.i(599724),m=e.i(389083),h=e.i(764205),f=e.i(727749);e.s(["default",0,({accessToken:e,userID:g})=>{let[p,x]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(e&&g)try{let t=await (0,h.availableTeamListCall)(e);x(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,g]);let y=async t=>{if(e&&g)try{await (0,h.teamMemberAddCall)(e,t,{user_id:g,role:"user"}),f.default.success("Successfully joined team"),x(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),f.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(i.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(l.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(l.TableHeaderCell,{children:"Description"}),(0,t.jsx)(l.TableHeaderCell,{children:"Members"}),(0,t.jsx)(l.TableHeaderCell,{children:"Models"}),(0,t.jsx)(l.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(n.TableBody,{children:[p.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Text,{children:e.team_alias})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Text,{children:e.description||"No description available"})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsxs)(d.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,r)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(d.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},r)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(d.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Button,{size:"xs",variant:"secondary",onClick:()=>y(e.team_id),children:"Join Team"})})]},e.team_id)),0===p.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(s.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(d.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9b3228c4ea02711c.js b/litellm/proxy/_experimental/out/_next/static/chunks/9b3228c4ea02711c.js new file mode 100644 index 0000000000..8f22b18a56 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/9b3228c4ea02711c.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},916925,e=>{"use strict";var t,r=((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 Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",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.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);let n={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",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"},a="../ui/assets/logos/",i={"A2A Agent":`${a}a2a_agent.png`,Ai21:`${a}ai21.svg`,"Ai21 Chat":`${a}ai21.svg`,"AI/ML API":`${a}aiml_api.svg`,"Aiohttp Openai":`${a}openai_small.svg`,Anthropic:`${a}anthropic.svg`,"Anthropic Text":`${a}anthropic.svg`,AssemblyAI:`${a}assemblyai_small.png`,Azure:`${a}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${a}microsoft_azure.svg`,"Azure Text":`${a}microsoft_azure.svg`,Baseten:`${a}baseten.svg`,"Amazon Bedrock":`${a}bedrock.svg`,"Amazon Bedrock Mantle":`${a}bedrock.svg`,"AWS SageMaker":`${a}bedrock.svg`,Cerebras:`${a}cerebras.svg`,Cloudflare:`${a}cloudflare.svg`,Codestral:`${a}mistral.svg`,Cohere:`${a}cohere.svg`,"Cohere Chat":`${a}cohere.svg`,Cometapi:`${a}cometapi.svg`,Cursor:`${a}cursor.svg`,"Databricks (Qwen API)":`${a}databricks.svg`,Dashscope:`${a}dashscope.svg`,Deepseek:`${a}deepseek.svg`,Deepgram:`${a}deepgram.png`,DeepInfra:`${a}deepinfra.png`,ElevenLabs:`${a}elevenlabs.png`,"Fal AI":`${a}fal_ai.jpg`,"Featherless Ai":`${a}featherless.svg`,"Fireworks AI":`${a}fireworks.svg`,Friendliai:`${a}friendli.svg`,"Github Copilot":`${a}github_copilot.svg`,"Google AI Studio":`${a}google.svg`,GradientAI:`${a}gradientai.svg`,Groq:`${a}groq.svg`,vllm:`${a}vllm.png`,Huggingface:`${a}huggingface.svg`,Hyperbolic:`${a}hyperbolic.svg`,Infinity:`${a}infinity.png`,"Jina AI":`${a}jina.png`,"Lambda Ai":`${a}lambda.svg`,"Lm Studio":`${a}lmstudio.svg`,"Meta Llama":`${a}meta_llama.svg`,MiniMax:`${a}minimax.svg`,"Mistral AI":`${a}mistral.svg`,Moonshot:`${a}moonshot.svg`,Morph:`${a}morph.svg`,Nebius:`${a}nebius.svg`,Novita:`${a}novita.svg`,"Nvidia Nim":`${a}nvidia_nim.svg`,Ollama:`${a}ollama.svg`,"Ollama Chat":`${a}ollama.svg`,Oobabooga:`${a}openai_small.svg`,OpenAI:`${a}openai_small.svg`,"Openai Like":`${a}openai_small.svg`,"OpenAI Text Completion":`${a}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${a}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${a}openai_small.svg`,Openrouter:`${a}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${a}oracle.svg`,Perplexity:`${a}perplexity-ai.svg`,Recraft:`${a}recraft.svg`,Replicate:`${a}replicate.svg`,RunwayML:`${a}runwayml.png`,Sagemaker:`${a}bedrock.svg`,Sambanova:`${a}sambanova.svg`,"SAP Generative AI Hub":`${a}sap.png`,Snowflake:`${a}snowflake.svg`,"Text-Completion-Codestral":`${a}mistral.svg`,TogetherAI:`${a}togetherai.svg`,Topaz:`${a}topaz.svg`,Triton:`${a}nvidia_triton.png`,V0:`${a}v0.svg`,"Vercel Ai Gateway":`${a}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${a}google.svg`,"Vertex Ai Beta":`${a}google.svg`,Vllm:`${a}vllm.png`,VolcEngine:`${a}volcengine.png`,"Voyage AI":`${a}voyage.webp`,Watsonx:`${a}watsonx.svg`,"Watsonx Text":`${a}watsonx.svg`,xAI:`${a}xai.svg`,Xinference:`${a}xinference.svg`};e.s(["Providers",()=>r,"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 return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let t=Object.keys(n).find(t=>n[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=r[t];return{logo:i[a],displayName:a}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let r=n[e];console.log(`Provider mapped to: ${r}`);let a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let n=t.litellm_provider;(n===r||"string"==typeof n&&n.includes(r))&&a.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),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&&(console.log("Adding sagemaker chat models"),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,i,"provider_map",0,n])},798496,e=>{"use strict";var t=e.i(843476),r=e.i(152990),n=e.i(682830),a=e.i(271645),i=e.i(269200),o=e.i(427612),s=e.i(64848),l=e.i(942232),u=e.i(496020),c=e.i(977572),d=e.i(94629),m=e.i(360820),f=e.i(871943);function h({data:e=[],columns:h,isLoading:p=!1,defaultSorting:g=[],pagination:v,onPaginationChange:b,enablePagination:y=!1,onRowClick:A}){let[_,C]=a.default.useState(g),[w]=a.default.useState("onChange"),[S,x]=a.default.useState({}),[E,O]=a.default.useState({}),T=(0,r.useReactTable)({data:e,columns:h,state:{sorting:_,columnSizing:S,columnVisibility:E,...y&&v?{pagination:v}:{}},columnResizeMode:w,onSortingChange:C,onColumnSizingChange:x,onColumnVisibilityChange:O,...y&&b?{onPaginationChange:b}:{},getCoreRowModel:(0,n.getCoreRowModel)(),getSortedRowModel:(0,n.getSortedRowModel)(),...y?{getPaginationRowModel:(0,n.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(i.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:T.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(o.TableHead,{children:T.getHeaderGroups().map(e=>(0,t.jsx)(u.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(s.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,r.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(m.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(f.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(l.TableBody,{children:p?(0,t.jsx)(u.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:h.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):T.getRowModel().rows.length>0?T.getRowModel().rows.map(e=>(0,t.jsx)(u.TableRow,{onClick:()=>A?.(e.original),className:A?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,r.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(u.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:h.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>h])},757440,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let n=e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>n])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),n=e.i(271645);let a=e=>{var t=(0,r.__rest)(e,[]);return n.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),n.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"}))};e.s(["default",()=>a],446428);var i=e.i(746725),o=e.i(914189),s=e.i(553521),l=e.i(835696),u=e.i(941444),c=e.i(178677),d=e.i(294316),m=e.i(83733),f=e.i(233137),h=e.i(732607),p=e.i(397701),g=e.i(700020);function v(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:w)!==n.Fragment||1===n.default.Children.count(e.children)}let b=(0,n.createContext)(null);b.displayName="TransitionContext";var y=((t=y||{}).Visible="visible",t.Hidden="hidden",t);let A=(0,n.createContext)(null);function _(e){return"children"in e?_(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function C(e,t){let r=(0,u.useLatestValue)(e),a=(0,n.useRef)([]),l=(0,s.useIsMounted)(),c=(0,i.useDisposables)(),d=(0,o.useEvent)((e,t=g.RenderStrategy.Hidden)=>{let n=a.current.findIndex(({el:t})=>t===e);-1!==n&&((0,p.match)(t,{[g.RenderStrategy.Unmount](){a.current.splice(n,1)},[g.RenderStrategy.Hidden](){a.current[n].state="hidden"}}),c.microTask(()=>{var e;!_(a)&&l.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,o.useEvent)(e=>{let t=a.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):a.current.push({el:e,state:"visible"}),()=>d(e,g.RenderStrategy.Unmount)}),f=(0,n.useRef)([]),h=(0,n.useRef)(Promise.resolve()),v=(0,n.useRef)({enter:[],leave:[]}),b=(0,o.useEvent)((e,r,n)=>{f.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=>{f.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?h.current=h.current.then(()=>null==t?void 0:t.wait.current).then(()=>n(r)):n(r)}),y=(0,o.useEvent)((e,t,r)=>{Promise.all(v.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=f.current.shift())||e()}).then(()=>r(t))});return(0,n.useMemo)(()=>({children:a,register:m,unregister:d,onStart:b,onStop:y,wait:h,chains:v}),[m,d,a,b,y,v,h])}A.displayName="NestingContext";let w=n.Fragment,S=g.RenderFeatures.RenderStrategy,x=(0,g.forwardRefWithAs)(function(e,t){let{show:r,appear:a=!1,unmount:i=!0,...s}=e,u=(0,n.useRef)(null),m=v(e),h=(0,d.useSyncRefs)(...m?[u,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let p=(0,f.useOpenClosed)();if(void 0===r&&null!==p&&(r=(p&f.State.Open)===f.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[y,w]=(0,n.useState)(r?"visible":"hidden"),x=C(()=>{r||w("hidden")}),[O,T]=(0,n.useState)(!0),I=(0,n.useRef)([r]);(0,l.useIsoMorphicEffect)(()=>{!1!==O&&I.current[I.current.length-1]!==r&&(I.current.push(r),T(!1))},[I,r]);let M=(0,n.useMemo)(()=>({show:r,appear:a,initial:O}),[r,a,O]);(0,l.useIsoMorphicEffect)(()=>{r?w("visible"):_(x)||null===u.current||w("hidden")},[r,x]);let k={unmount:i},$=(0,o.useEvent)(()=>{var t;O&&T(!1),null==(t=e.beforeEnter)||t.call(e)}),R=(0,o.useEvent)(()=>{var t;O&&T(!1),null==(t=e.beforeLeave)||t.call(e)}),N=(0,g.useRender)();return n.default.createElement(A.Provider,{value:x},n.default.createElement(b.Provider,{value:M},N({ourProps:{...k,as:n.Fragment,children:n.default.createElement(E,{ref:h,...k,...s,beforeEnter:$,beforeLeave:R})},theirProps:{},defaultTag:n.Fragment,features:S,visible:"visible"===y,name:"Transition"})))}),E=(0,g.forwardRefWithAs)(function(e,t){var r,a;let{transition:i=!0,beforeEnter:s,afterEnter:u,beforeLeave:y,afterLeave:x,enter:E,enterFrom:O,enterTo:T,entered:I,leave:M,leaveFrom:k,leaveTo:$,...R}=e,[N,L]=(0,n.useState)(null),D=(0,n.useRef)(null),P=v(e),j=(0,d.useSyncRefs)(...P?[D,t,L]:null===t?[]:[t]),z=null==(r=R.unmount)||r?g.RenderStrategy.Unmount:g.RenderStrategy.Hidden,{show:F,appear:H,initial:V}=function(){let e=(0,n.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[B,G]=(0,n.useState)(F?"visible":"hidden"),U=function(){let e=(0,n.useContext)(A);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:W,unregister:q}=U;(0,l.useIsoMorphicEffect)(()=>W(D),[W,D]),(0,l.useIsoMorphicEffect)(()=>{if(z===g.RenderStrategy.Hidden&&D.current)return F&&"visible"!==B?void G("visible"):(0,p.match)(B,{hidden:()=>q(D),visible:()=>W(D)})},[B,D,W,q,F,z]);let K=(0,c.useServerHandoffComplete)();(0,l.useIsoMorphicEffect)(()=>{if(P&&K&&"visible"===B&&null===D.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,B,K,P]);let Y=V&&!H,X=H&&F&&V,Z=(0,n.useRef)(!1),J=C(()=>{Z.current||(G("hidden"),q(D))},U),Q=(0,o.useEvent)(e=>{Z.current=!0,J.onStart(D,e?"enter":"leave",e=>{"enter"===e?null==s||s():"leave"===e&&(null==y||y())})}),ee=(0,o.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,J.onStop(D,t,e=>{"enter"===e?null==u||u():"leave"===e&&(null==x||x())}),"leave"!==t||_(J)||(G("hidden"),q(D))});(0,n.useEffect)(()=>{P&&i||(Q(F),ee(F))},[F,P,i]);let et=!(!i||!P||!K||Y),[,er]=(0,m.useTransition)(et,N,F,{start:Q,end:ee}),en=(0,g.compact)({ref:j,className:(null==(a=(0,h.classNames)(R.className,X&&E,X&&O,er.enter&&E,er.enter&&er.closed&&O,er.enter&&!er.closed&&T,er.leave&&M,er.leave&&!er.closed&&k,er.leave&&er.closed&&$,!er.transition&&F&&I))?void 0:a.trim())||void 0,...(0,m.transitionDataAttributes)(er)}),ea=0;"visible"===B&&(ea|=f.State.Open),"hidden"===B&&(ea|=f.State.Closed),er.enter&&(ea|=f.State.Opening),er.leave&&(ea|=f.State.Closing);let ei=(0,g.useRender)();return n.default.createElement(A.Provider,{value:J},n.default.createElement(f.OpenClosedProvider,{value:ea},ei({ourProps:en,theirProps:R,defaultTag:w,features:S,visible:"visible"===B,name:"Transition.Child"})))}),O=(0,g.forwardRefWithAs)(function(e,t){let r=null!==(0,n.useContext)(b),a=null!==(0,f.useOpenClosed)();return n.default.createElement(n.default.Fragment,null,!r&&a?n.default.createElement(x,{ref:t,...e}):n.default.createElement(E,{ref:t,...e}))}),T=Object.assign(x,{Child:O,Root:x});e.s(["Transition",()=>T],854056)},206929,e=>{"use strict";var t=e.i(290571),r=e.i(757440),n=e.i(271645),a=e.i(446428),i=e.i(444755),o=e.i(673706),s=e.i(103471),l=e.i(495470),u=e.i(854056),c=e.i(888288);let d=(0,o.makeClassName)("Select"),m=n.default.forwardRef((e,o)=>{let{defaultValue:m="",value:f,onValueChange:h,placeholder:p="Select...",disabled:g=!1,icon:v,enableClear:b=!1,required:y,children:A,name:_,error:C=!1,errorMessage:w,className:S,id:x}=e,E=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),O=(0,n.useRef)(null),T=n.Children.toArray(A),[I,M]=(0,c.default)(m,f),k=(0,n.useMemo)(()=>{let e=n.default.Children.toArray(A).filter(n.isValidElement);return(0,s.constructValueToNameMapping)(e)},[A]);return n.default.createElement("div",{className:(0,i.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",S)},n.default.createElement("div",{className:"relative"},n.default.createElement("select",{title:"select-hidden",required:y,className:(0,i.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:I,onChange:e=>{e.preventDefault()},name:_,disabled:g,id:x,onFocus:()=>{let e=O.current;e&&e.focus()}},n.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},p),T.map(e=>{let t=e.props.value,r=e.props.children;return n.default.createElement("option",{className:"hidden",key:t,value:t},r)})),n.default.createElement(l.Listbox,Object.assign({as:"div",ref:o,defaultValue:I,value:I,onChange:e=>{null==h||h(e),M(e)},disabled:g,id:x},E),({value:e})=>{var t;return n.default.createElement(n.default.Fragment,null,n.default.createElement(l.ListboxButton,{ref:O,className:(0,i.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",v?"pl-10":"pl-3",(0,s.getSelectButtonColors)((0,s.hasValue)(e),g,C))},v&&n.default.createElement("span",{className:(0,i.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},n.default.createElement(v,{className:(0,i.tremorTwMerge)(d("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),n.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=k.get(e))?t:p),n.default.createElement("span",{className:(0,i.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},n.default.createElement(r.default,{className:(0,i.tremorTwMerge)(d("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&I?n.default.createElement("button",{type:"button",className:(0,i.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),M(""),null==h||h("")}},n.default.createElement(a.default,{className:(0,i.tremorTwMerge)(d("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,n.default.createElement(u.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},n.default.createElement(l.ListboxOptions,{anchor:"bottom start",className:(0,i.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},A)))})),C&&w?n.default.createElement("p",{className:(0,i.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},w):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},37091,e=>{"use strict";var t=e.i(290571),r=e.i(95779),n=e.i(444755),a=e.i(673706),i=e.i(271645);let o=i.default.forwardRef((e,o)=>{let{color:s,children:l,className:u}=e,c=(0,t.__rest)(e,["color","children","className"]);return i.default.createElement("p",Object.assign({ref:o,className:(0,n.tremorTwMerge)(s?(0,a.getColorClassNames)(s,r.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",u)},c),l)});o.displayName="Subtitle",e.s(["Subtitle",()=>o],37091)},368670,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let n=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,r.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},502275,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:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,r],502275)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={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 a=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["StopOutlined",0,i],724154)},446891,836991,e=>{"use strict";var t=e.i(843476),r=e.i(464571),n=e.i(326373),a=e.i(94629),i=e.i(360820),o=e.i(871943),s=e.i(271645);let l=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:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,l],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:s})=>{let u=[{key:"asc",label:"Ascending",icon:(0,t.jsx)(i.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,t.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,t.jsx)(l,{className:"h-4 w-4"})}];return(0,t.jsx)(n.Dropdown,{menu:{items:u,onClick:({key:e})=>{"asc"===e?s("asc"):"desc"===e?s("desc"):"reset"===e&&s(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,t.jsx)(r.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,t.jsx)(i.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,t.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"}):(0,t.jsx)(a.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={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),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["MinusCircleOutlined",0,i],564897)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={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),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["SaveOutlined",0,i],987432)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},153472,e=>{"use strict";var t,r,n=e.i(266027),a=e.i(954616),i=e.i(912598),o=e.i(243652),s=e.i(135214),l=e.i(764205),u=((t={}).GENERAL_SETTINGS="general_settings",t),c=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let d=async(e,t)=>{try{let r=l.proxyBaseUrl?`${l.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,n=await fetch(r,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},m=(0,o.createQueryKeys)("proxyConfig"),f=async(e,t)=>{try{let r=l.proxyBaseUrl?`${l.proxyBaseUrl}/config/field/delete`:"/config/field/delete",n=await fetch(r,{method:"POST",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>u,"GeneralSettingsFieldName",()=>c,"proxyConfigKeys",0,m,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,s.default)(),t=(0,i.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:m.all})}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,s.default)();return(0,n.useQuery)({queryKey:m.list({filters:{configType:e}}),queryFn:async()=>await d(t,e),enabled:!!t})}])},475647,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};var a=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["PlusCircleOutlined",0,i],475647)},286536,77705,e=>{"use strict";var t=e.i(475254);let r=(0,t.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",()=>r],286536);let n=(0,t.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",()=>n],77705)},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={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),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["GlobalOutlined",0,i],160818)},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),n=e.i(371330),a=e.i(271645),i=e.i(394487),o=e.i(503269),s=e.i(214520),l=e.i(746725),u=e.i(914189),c=e.i(144279),d=e.i(294316),m=e.i(601893),f=e.i(140721),h=e.i(942803),p=e.i(233538),g=e.i(694421),v=e.i(700020),b=e.i(35889),y=e.i(998348),A=e.i(722678);let _=(0,a.createContext)(null);_.displayName="GroupContext";let C=a.Fragment,w=Object.assign((0,v.forwardRefWithAs)(function(e,t){var C;let w=(0,a.useId)(),S=(0,h.useProvidedId)(),x=(0,m.useDisabled)(),{id:E=S||`headlessui-switch-${w}`,disabled:O=x||!1,checked:T,defaultChecked:I,onChange:M,name:k,value:$,form:R,autoFocus:N=!1,...L}=e,D=(0,a.useContext)(_),[P,j]=(0,a.useState)(null),z=(0,a.useRef)(null),F=(0,d.useSyncRefs)(z,t,null===D?null:D.setSwitch,j),H=(0,s.useDefaultValue)(I),[V,B]=(0,o.useControllable)(T,M,null!=H&&H),G=(0,l.useDisposables)(),[U,W]=(0,a.useState)(!1),q=(0,u.useEvent)(()=>{W(!0),null==B||B(!V),G.nextFrame(()=>{W(!1)})}),K=(0,u.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),q()}),Y=(0,u.useEvent)(e=>{e.key===y.Keys.Space?(e.preventDefault(),q()):e.key===y.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),X=(0,u.useEvent)(e=>e.preventDefault()),Z=(0,A.useLabelledBy)(),J=(0,b.useDescribedBy)(),{isFocusVisible:Q,focusProps:ee}=(0,r.useFocusRing)({autoFocus:N}),{isHovered:et,hoverProps:er}=(0,n.useHover)({isDisabled:O}),{pressed:en,pressProps:ea}=(0,i.useActivePress)({disabled:O}),ei=(0,a.useMemo)(()=>({checked:V,disabled:O,hover:et,focus:Q,active:en,autofocus:N,changing:U}),[V,et,Q,en,O,U,N]),eo=(0,v.mergeProps)({id:E,ref:F,role:"switch",type:(0,c.useResolveButtonType)(e,P),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":V,"aria-labelledby":Z,"aria-describedby":J,disabled:O||void 0,autoFocus:N,onClick:K,onKeyUp:Y,onKeyPress:X},ee,er,ea),es=(0,a.useCallback)(()=>{if(void 0!==H)return null==B?void 0:B(H)},[B,H]),el=(0,v.useRender)();return a.default.createElement(a.default.Fragment,null,null!=k&&a.default.createElement(f.FormFields,{disabled:O,data:{[k]:$||"on"},overrides:{type:"checkbox",checked:V},form:R,onReset:es}),el({ourProps:eo,theirProps:L,slot:ei,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,a.useState)(null),[i,o]=(0,A.useLabels)(),[s,l]=(0,b.useDescriptions)(),u=(0,a.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),c=(0,v.useRender)();return a.default.createElement(l,{name:"Switch.Description",value:s},a.default.createElement(o,{name:"Switch.Label",value:i,props:{htmlFor:null==(t=u.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},a.default.createElement(_.Provider,{value:u},c({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:A.Label,Description:b.Description});var S=e.i(888288),x=e.i(95779),E=e.i(444755),O=e.i(673706),T=e.i(829087);let I=(0,O.makeClassName)("Switch"),M=a.default.forwardRef((e,r)=>{let{checked:n,defaultChecked:i=!1,onChange:o,color:s,name:l,error:u,errorMessage:c,disabled:d,required:m,tooltip:f,id:h}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:s?(0,O.getColorClassNames)(s,x.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:s?(0,O.getColorClassNames)(s,x.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[v,b]=(0,S.default)(i,n),[y,A]=(0,a.useState)(!1),{tooltipProps:_,getReferenceProps:C}=(0,T.useTooltip)(300);return a.default.createElement("div",{className:"flex flex-row items-center justify-start"},a.default.createElement(T.default,Object.assign({text:f},_)),a.default.createElement("div",Object.assign({ref:(0,O.mergeRefs)([r,_.refs.setReference]),className:(0,E.tremorTwMerge)(I("root"),"flex flex-row relative h-5")},p,C),a.default.createElement("input",{type:"checkbox",className:(0,E.tremorTwMerge)(I("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:l,required:m,checked:v,onChange:e=>{e.preventDefault()}}),a.default.createElement(w,{checked:v,onChange:e=>{b(e),null==o||o(e)},disabled:d,className:(0,E.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",d?"cursor-not-allowed":""),onFocus:()=>A(!0),onBlur:()=>A(!1),id:h},a.default.createElement("span",{className:(0,E.tremorTwMerge)(I("sr-only"),"sr-only")},"Switch ",v?"on":"off"),a.default.createElement("span",{"aria-hidden":"true",className:(0,E.tremorTwMerge)(I("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,E.tremorTwMerge)(I("round"),v?(0,E.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",y?(0,E.tremorTwMerge)("ring-2",g.ringColor):"")}))),u&&c?a.default.createElement("p",{className:(0,E.tremorTwMerge)(I("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});M.displayName="Switch",e.s(["Switch",()=>M],793130)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:a="w-4 h-4"})=>{let[i,o]=(0,r.useState)(!1),{logo:s}=(0,n.getProviderLogoAndName)(e);return i||!s?(0,t.jsx)("div",{className:`${a} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:s,alt:`${e} logo`,className:a,onError:()=>o(!0)})}])},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])},516015,(e,t,r)=>{},898547,(e,t,r)=>{var n=e.i(247167);e.r(516015);var a=e.r(271645),i=a&&"object"==typeof a&&"default"in a?a:{default:a},o=void 0!==n.default&&n.default.env&&!0,s=function(e){return"[object String]"===Object.prototype.toString.call(e)},l=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,a=t.optimizeForSpeed,i=void 0===a?o:a;u(s(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",u("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var l="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=l?l.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){u("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),u(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(u(!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||(o||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(n){o||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 n=this._tags[e];u(n,"old rule at index `"+e+"` not found"),n.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},d={};function m(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return d[n]||(d[n]="jsx-"+c(e+"-"+r)),d[n]}function f(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),n=r.styleId,a=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var i=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=i,this._instancesCounts[n]=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 n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),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],n=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var a=m(n,r);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return f(a,e)}):[f(a,t)]}}return{styleId:m(n),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 h}function v(){return a.useContext(p)}p.displayName="StyleSheetContext";var b=i.default.useInsertionEffect||i.default.useLayoutEffect,y="u">typeof window?g():void 0;function A(e){var t=y||v();return t&&("u"{t.exports=e.r(898547).style},822315,(e,t,r)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",r="minute",n="hour",a="week",i="month",o="quarter",s="year",l="date",u="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|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 n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.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 A||!(!e||!e[p])},v=function e(t,r,n){var a;if(!t)return f;if("string"==typeof t){var i=t.toLowerCase();h[i]&&(a=i),r&&(h[i]=r,a=i);var o=t.split("-");if(!a&&o.length>1)return e(o[0])}else{var s=t.name;h[s]=t,a=s}return!n&&a&&(f=a),a||!n&&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 A(r)},y={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(271645),r=e.i(562901),n=e.i(343794),a=e.i(914949),i=e.i(529681),o=e.i(242064),s=e.i(829672),l=e.i(285781),u=e.i(836938),c=e.i(920228),d=e.i(62405),m=e.i(408850),f=e.i(87414),h=e.i(310730);let p=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:r,antCls:n,zIndexPopup:a,colorText:i,colorWarning:o,marginXXS:s,marginXS:l,fontSize:u,fontWeightStrong:c,colorTextHeading:d}=e;return{[t]:{zIndex:a,[`&${n}-popover`]:{fontSize:u},[`${t}-message`]:{marginBottom:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${r}`]:{color:o,fontSize:u,lineHeight:1,marginInlineEnd:l},[`${t}-title`]:{fontWeight:c,color:d,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:s,color:i}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:l}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var g=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let v=e=>{let{prefixCls:n,okButtonProps:a,cancelButtonProps:i,title:s,description:h,cancelText:p,okText:g,okType:v="primary",icon:b=t.createElement(r.default,null),showCancel:y=!0,close:A,onConfirm:_,onCancel:C,onPopupClick:w}=e,{getPrefixCls:S}=t.useContext(o.ConfigContext),[x]=(0,m.useLocale)("Popconfirm",f.default.Popconfirm),E=(0,u.getRenderPropValue)(s),O=(0,u.getRenderPropValue)(h);return t.createElement("div",{className:`${n}-inner-content`,onClick:w},t.createElement("div",{className:`${n}-message`},b&&t.createElement("span",{className:`${n}-message-icon`},b),t.createElement("div",{className:`${n}-message-text`},E&&t.createElement("div",{className:`${n}-title`},E),O&&t.createElement("div",{className:`${n}-description`},O))),t.createElement("div",{className:`${n}-buttons`},y&&t.createElement(c.default,Object.assign({onClick:C,size:"small"},i),p||(null==x?void 0:x.cancelText)),t.createElement(l.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,d.convertLegacyProps)(v)),a),actionFn:_,close:A,prefixCls:S("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},g||(null==x?void 0:x.okText))))};var 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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let y=t.forwardRef((e,l)=>{var u,c;let{prefixCls:d,placement:m="top",trigger:f="click",okType:h="primary",icon:g=t.createElement(r.default,null),children:y,overlayClassName:A,onOpenChange:_,onVisibleChange:C,overlayStyle:w,styles:S,classNames:x}=e,E=b(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:O,className:T,style:I,classNames:M,styles:k}=(0,o.useComponentConfig)("popconfirm"),[$,R]=(0,a.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(c=e.defaultOpen)?c:e.defaultVisible}),N=(e,t)=>{R(e,!0),null==C||C(e),null==_||_(e,t)},L=O("popconfirm",d),D=(0,n.default)(L,T,A,M.root,null==x?void 0:x.root),P=(0,n.default)(M.body,null==x?void 0:x.body),[j]=p(L);return j(t.createElement(s.default,Object.assign({},(0,i.default)(E,["title"]),{trigger:f,placement:m,onOpenChange:(t,r)=>{let{disabled:n=!1}=e;n||N(t,r)},open:$,ref:l,classNames:{root:D,body:P},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},k.root),I),w),null==S?void 0:S.root),body:Object.assign(Object.assign({},k.body),null==S?void 0:S.body)},content:t.createElement(v,Object.assign({okType:h,icon:g},e,{prefixCls:L,close:e=>{N(!1,e)},onConfirm:t=>{var r;return null==(r=e.onConfirm)?void 0:r.call(void 0,t)},onCancel:t=>{var r;N(!1,t),null==(r=e.onCancel)||r.call(void 0,t)}})),"data-popover-inject":!0}),y))});y._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:r,placement:a,className:i,style:s}=e,l=g(e,["prefixCls","placement","className","style"]),{getPrefixCls:u}=t.useContext(o.ConfigContext),c=u("popconfirm",r),[d]=p(c);return d(t.createElement(h.default,{placement:a,className:(0,n.default)(c,i),style:s,content:t.createElement(v,Object.assign({prefixCls:c},l))}))},e.s(["Popconfirm",0,y],883552)},664307,e=>{"use strict";var t=e.i(843476),r=e.i(135214),n=e.i(214541),a=e.i(271645),i=e.i(161059);e.s(["default",0,()=>{let{token:e,premiumUser:o}=(0,r.default)(),[s,l]=(0,a.useState)([]),{teams:u}=(0,n.default)();return(0,t.jsx)(i.default,{token:e,modelData:{data:[]},keys:s,setModelData:()=>{},premiumUser:o,teams:u})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9ddd2809961d4f8c.js b/litellm/proxy/_experimental/out/_next/static/chunks/9ddd2809961d4f8c.js new file mode 100644 index 0000000000..01f81a38dc --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/9ddd2809961d4f8c.js @@ -0,0 +1,420 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,755151,e=>{"use strict";var t=e.i(247153);e.s(["DownOutlined",()=>t.default])},916925,e=>{"use strict";var t,i=((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 Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",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.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);let a={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",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"},o="../ui/assets/logos/",r={"A2A Agent":`${o}a2a_agent.png`,Ai21:`${o}ai21.svg`,"Ai21 Chat":`${o}ai21.svg`,"AI/ML API":`${o}aiml_api.svg`,"Aiohttp Openai":`${o}openai_small.svg`,Anthropic:`${o}anthropic.svg`,"Anthropic Text":`${o}anthropic.svg`,AssemblyAI:`${o}assemblyai_small.png`,Azure:`${o}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${o}microsoft_azure.svg`,"Azure Text":`${o}microsoft_azure.svg`,Baseten:`${o}baseten.svg`,"Amazon Bedrock":`${o}bedrock.svg`,"Amazon Bedrock Mantle":`${o}bedrock.svg`,"AWS SageMaker":`${o}bedrock.svg`,Cerebras:`${o}cerebras.svg`,Cloudflare:`${o}cloudflare.svg`,Codestral:`${o}mistral.svg`,Cohere:`${o}cohere.svg`,"Cohere Chat":`${o}cohere.svg`,Cometapi:`${o}cometapi.svg`,Cursor:`${o}cursor.svg`,"Databricks (Qwen API)":`${o}databricks.svg`,Dashscope:`${o}dashscope.svg`,Deepseek:`${o}deepseek.svg`,Deepgram:`${o}deepgram.png`,DeepInfra:`${o}deepinfra.png`,ElevenLabs:`${o}elevenlabs.png`,"Fal AI":`${o}fal_ai.jpg`,"Featherless Ai":`${o}featherless.svg`,"Fireworks AI":`${o}fireworks.svg`,Friendliai:`${o}friendli.svg`,"Github Copilot":`${o}github_copilot.svg`,"Google AI Studio":`${o}google.svg`,GradientAI:`${o}gradientai.svg`,Groq:`${o}groq.svg`,vllm:`${o}vllm.png`,Huggingface:`${o}huggingface.svg`,Hyperbolic:`${o}hyperbolic.svg`,Infinity:`${o}infinity.png`,"Jina AI":`${o}jina.png`,"Lambda Ai":`${o}lambda.svg`,"Lm Studio":`${o}lmstudio.svg`,"Meta Llama":`${o}meta_llama.svg`,MiniMax:`${o}minimax.svg`,"Mistral AI":`${o}mistral.svg`,Moonshot:`${o}moonshot.svg`,Morph:`${o}morph.svg`,Nebius:`${o}nebius.svg`,Novita:`${o}novita.svg`,"Nvidia Nim":`${o}nvidia_nim.svg`,Ollama:`${o}ollama.svg`,"Ollama Chat":`${o}ollama.svg`,Oobabooga:`${o}openai_small.svg`,OpenAI:`${o}openai_small.svg`,"Openai Like":`${o}openai_small.svg`,"OpenAI Text Completion":`${o}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${o}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${o}openai_small.svg`,Openrouter:`${o}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${o}oracle.svg`,Perplexity:`${o}perplexity-ai.svg`,Recraft:`${o}recraft.svg`,Replicate:`${o}replicate.svg`,RunwayML:`${o}runwayml.png`,Sagemaker:`${o}bedrock.svg`,Sambanova:`${o}sambanova.svg`,"SAP Generative AI Hub":`${o}sap.png`,Snowflake:`${o}snowflake.svg`,"Text-Completion-Codestral":`${o}mistral.svg`,TogetherAI:`${o}togetherai.svg`,Topaz:`${o}topaz.svg`,Triton:`${o}nvidia_triton.png`,V0:`${o}v0.svg`,"Vercel Ai Gateway":`${o}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${o}google.svg`,"Vertex Ai Beta":`${o}google.svg`,Vllm:`${o}vllm.png`,VolcEngine:`${o}volcengine.png`,"Voyage AI":`${o}voyage.webp`,Watsonx:`${o}watsonx.svg`,"Watsonx Text":`${o}watsonx.svg`,xAI:`${o}xai.svg`,Xinference:`${o}xinference.svg`};e.s(["Providers",()=>i,"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 return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:r[e],displayName:e}}let t=Object.keys(a).find(t=>a[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let o=i[t];return{logo:r[o],displayName:o}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let i=a[e];console.log(`Provider mapped to: ${i}`);let o=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let a=t.litellm_provider;(a===i||"string"==typeof a&&a.includes(i))&&o.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&o.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&o.push(e)}))),o},"providerLogoMap",0,r,"provider_map",0,a])},652272,209261,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(447566),o=e.i(166406),r=e.i(492030),n=e.i(596239);let l=e=>"github"===e.source.source&&e.source.repo?`/plugin marketplace add ${e.source.repo}`:"url"===e.source.source&&e.source.url?`/plugin marketplace add ${e.source.url}`:`/plugin marketplace add ${e.name}`;e.s(["formatInstallCommand",0,l,"getCategoryBadgeColor",0,e=>{if(!e)return"gray";let t=e.toLowerCase();if(t.includes("development")||t.includes("dev"))return"blue";if(t.includes("productivity")||t.includes("workflow"))return"green";if(t.includes("learning")||t.includes("education"))return"purple";if(t.includes("security")||t.includes("safety"))return"red";if(t.includes("data")||t.includes("analytics"))return"orange";else if(t.includes("integration")||t.includes("api"))return"yellow";return"gray"},"isValidEmail",0,e=>!e||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),"isValidSemanticVersion",0,e=>!e||/^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?$/.test(e),"isValidUrl",0,e=>{if(!e)return!0;try{return new URL(e),!0}catch{return!1}},"parseKeywords",0,e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>""!==e):[],"validatePluginName",0,e=>!!e&&""!==e.trim()&&/^[a-z0-9-]+$/.test(e)],209261),e.s(["default",0,({skill:e,onBack:s})=>{let c,[d,p]=(0,i.useState)("overview"),[u,g]=(0,i.useState)(null),m=(e,t)=>{navigator.clipboard.writeText(e),g(t),setTimeout(()=>g(null),2e3)},f="github"===(c=e.source).source&&c.repo?`https://github.com/${c.repo}`:"git-subdir"===c.source&&c.url?c.path?`${c.url}/tree/main/${c.path}`:c.url:"url"===c.source&&c.url?c.url:null,h=l(e),_=[...e.category?[{property:"Category",value:e.category}]:[],...e.domain?[{property:"Domain",value:e.domain}]:[],...e.namespace?[{property:"Namespace",value:e.namespace}]:[],...e.version?[{property:"Version",value:e.version}]:[],...e.author?.name?[{property:"Author",value:e.author.name}]:[],...e.created_at?[{property:"Added",value:new Date(e.created_at).toLocaleDateString()}]:[]];return(0,t.jsxs)("div",{style:{padding:"24px 32px 24px 0"},children:[(0,t.jsxs)("div",{onClick:s,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(a.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:"Skills"})]}),(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name}),e.description&&(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"8px 0 0 0",lineHeight:1.6},children:e.description})]}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28,marginTop:24},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:[{key:"overview",label:"Overview"},{key:"usage",label:"How to Use"}].map(e=>(0,t.jsx)("div",{onClick:()=>p(e.key),style:{padding:"12px 20px",fontSize:14,color:d===e.key?"#1a73e8":"#5f6368",borderBottom:d===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:d===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===d&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Skill Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Metadata registered with this skill"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:160},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:_.map((e,i)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},i))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Status"}),(0,t.jsx)("span",{style:{fontSize:12,padding:"3px 10px",borderRadius:12,backgroundColor:e.enabled?"#e6f4ea":"#f1f3f4",color:e.enabled?"#137333":"#5f6368",fontWeight:500},children:e.enabled?"Public":"Draft"})]}),f&&(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Source"}),(0,t.jsxs)("a",{href:f,target:"_blank",rel:"noopener noreferrer",style:{fontSize:13,color:"#1a73e8",wordBreak:"break-all",display:"flex",alignItems:"center",gap:4},children:[f.replace("https://",""),(0,t.jsx)(n.LinkOutlined,{style:{fontSize:11,flexShrink:0}})]})]}),e.keywords&&e.keywords.length>0&&(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.keywords.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Skill ID"}),(0,t.jsx)("div",{style:{fontSize:12,fontFamily:"monospace",color:"#3c4043",wordBreak:"break-all"},children:e.id})]})]})]}),"usage"===d&&(0,t.jsxs)("div",{style:{maxWidth:640},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 8px 0"},children:"Using this skill"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 24px 0",lineHeight:1.6},children:"Once your proxy is set as a marketplace, enable this skill in Claude Code with one command:"}),(0,t.jsxs)("div",{style:{border:"1px solid #dadce0",borderRadius:8,overflow:"hidden",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#3c4043",fontWeight:500},children:"Run in Claude Code"}),(0,t.jsxs)("button",{onClick:()=>m(h,"install"),style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"install"===u?"#137333":"#1a73e8",background:"none",border:"none",cursor:"pointer",padding:0},children:["install"===u?(0,t.jsx)(r.CheckOutlined,{}):(0,t.jsx)(o.CopyOutlined,{}),"install"===u?"Copied":"Copy"]})]}),(0,t.jsx)("pre",{style:{margin:0,padding:"14px 16px",fontSize:14,fontFamily:"monospace",color:"#202124",backgroundColor:"#fff"},children:h})]}),(0,t.jsxs)("p",{style:{fontSize:13,color:"#5f6368",lineHeight:1.6,margin:0},children:["Don't have the marketplace configured yet?"," ",(0,t.jsx)("span",{onClick:()=>p("setup"),style:{color:"#1a73e8",cursor:"pointer"},children:"See one-time setup →"})]})]}),"setup"===d&&(0,t.jsxs)("div",{style:{maxWidth:640},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 8px 0"},children:"One-time marketplace setup"}),(0,t.jsxs)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 24px 0",lineHeight:1.6},children:["Add this to ",(0,t.jsx)("code",{style:{fontSize:13,backgroundColor:"#f1f3f4",padding:"1px 6px",borderRadius:4},children:"~/.claude/settings.json"})," to point Claude Code at your proxy:"]}),(0,t.jsxs)("div",{style:{border:"1px solid #dadce0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#3c4043",fontWeight:500},children:"~/.claude/settings.json"}),(0,t.jsxs)("button",{onClick:()=>{m(JSON.stringify({extraKnownMarketplaces:{"my-org":{source:"url",url:`${window.location.origin}/claude-code/marketplace.json`}}},null,2),"settings")},style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"settings"===u?"#137333":"#1a73e8",background:"none",border:"none",cursor:"pointer",padding:0},children:["settings"===u?(0,t.jsx)(r.CheckOutlined,{}):(0,t.jsx)(o.CopyOutlined,{}),"settings"===u?"Copied":"Copy"]})]}),(0,t.jsx)("pre",{style:{margin:0,padding:"14px 16px",fontSize:13,fontFamily:"monospace",color:"#202124",backgroundColor:"#fff"},children:JSON.stringify({extraKnownMarketplaces:{"my-org":{source:"url",url:`${window.location.origin}/claude-code/marketplace.json`}}},null,2)})]})]})]})}],652272)},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",()=>t])},371401,e=>{"use strict";var t=e.i(115571),i=e.i(271645);function a(e){let i=t=>{"disableUsageIndicator"===t.key&&e()},a=t=>{let{key:i}=t.detail;"disableUsageIndicator"===i&&e()};return window.addEventListener("storage",i),window.addEventListener(t.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",i),window.removeEventListener(t.LOCAL_STORAGE_EVENT,a)}}function o(){return"true"===(0,t.getLocalStorageItem)("disableUsageIndicator")}function r(){return(0,i.useSyncExternalStore)(a,o)}e.s(["useDisableUsageIndicator",()=>r])},275144,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(764205);let o=(0,i.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:r})=>{let[n,l]=(0,i.useState)(null),[s,c]=(0,i.useState)(null);return(0,i.useEffect)(()=>{(async()=>{try{let e=(0,a.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",i=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(i.ok){let e=await i.json();e.values?.logo_url&&l(e.values.logo_url),e.values?.favicon_url&&c(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,i.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)(o.Provider,{value:{logoUrl:n,setLogoUrl:l,faviconUrl:s,setFaviconUrl:c},children:e})},"useTheme",0,()=>{let e=(0,i.useContext)(o);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},44121,186515,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:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["MenuFoldOutlined",0,r],44121);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var l=i.forwardRef(function(e,a){return i.createElement(o.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["MenuUnfoldOutlined",0,l],186515)},295320,283713,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:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["CloudServerOutlined",0,r],295320);var n=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,a=e?.workers??[],[o,r]=(0,i.useState)(()=>localStorage.getItem(s));(0,i.useEffect)(()=>{if(!o||0===a.length)return;let e=a.find(e=>e.worker_id===o);e&&(0,n.switchToWorkerUrl)(e.url)},[o,a]);let c=a.find(e=>e.worker_id===o)??null,d=(0,i.useCallback)(e=>{let t=a.find(t=>t.worker_id===e);t&&(r(e),localStorage.setItem(s,e),(0,n.switchToWorkerUrl)(t.url))},[a]);return{isControlPlane:t,workers:a,selectedWorkerId:o,selectedWorker:c,selectWorker:d,disconnectFromWorker:(0,i.useCallback)(()=>{r(null),localStorage.removeItem(s),(0,n.switchToWorkerUrl)(null)},[])}}],283713)},818581,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"useMergedRef",{enumerable:!0,get:function(){return o}});let a=e.r(271645);function o(e,t){let i=(0,a.useRef)(null),o=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=i.current;e&&(i.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(i.current=r(e,a)),t&&(o.current=r(t,a))},[e,t])}function r(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let i=e(t);return"function"==typeof i?i:()=>e(null)}}("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},62478,e=>{"use strict";var t=e.i(764205);let i=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,i])},602073,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["SafetyOutlined",0,r],602073)},190272,785913,e=>{"use strict";var t,i,a=((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),o=((i={}).IMAGE="image",i.VIDEO="video",i.CHAT="chat",i.RESPONSES="responses",i.IMAGE_EDITS="image_edits",i.ANTHROPIC_MESSAGES="anthropic_messages",i.EMBEDDINGS="embeddings",i.SPEECH="speech",i.TRANSCRIPTION="transcription",i.A2A_AGENTS="a2a_agents",i.MCP="mcp",i.REALTIME="realtime",i);let r={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",()=>o,"getEndpointType",0,e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let t=r[e];return console.log("endpointType:",t),t}return"chat"}],785913),e.s(["generateCodeSnippet",0,e=>{let t,{apiKeySource:i,accessToken:a,apiKey:r,inputMessage:n,chatHistory:l,selectedTags:s,selectedVectorStores:c,selectedGuardrails:d,selectedPolicies:p,selectedMCPServers:u,mcpServers:g,mcpServerToolRestrictions:m,selectedVoice:f,endpointType:h,selectedModel:_,selectedSdk:v,proxySettings:A}=e,x="session"===i?a:r,b=window.location.origin,y=A?.LITELLM_UI_API_DOC_BASE_URL;y&&y.trim()?b=y:A?.PROXY_BASE_URL&&(b=A.PROXY_BASE_URL);let I=n||"Your prompt here",E=I.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),w=l.filter(e=>!e.isImage).map(({role:e,content:t})=>({role:e,content:t})),C={};s.length>0&&(C.tags=s),c.length>0&&(C.vector_stores=c),d.length>0&&(C.guardrails=d),p.length>0&&(C.policies=p);let S=_||"your-model-name",O="azure"===v?`import openai + +client = openai.AzureOpenAI( + api_key="${x||"YOUR_LITELLM_API_KEY"}", + azure_endpoint="${b}", + api_version="2024-02-01" +)`:`import openai + +client = openai.OpenAI( + api_key="${x||"YOUR_LITELLM_API_KEY"}", + base_url="${b}" +)`;switch(h){case o.CHAT:{let e=Object.keys(C).length>0,i="";if(e){let e=JSON.stringify({metadata:C},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();i=`, + extra_body=${e}`}let a=w.length>0?w:[{role:"user",content:I}];t=` +import base64 + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Example with text only +response = client.chat.completions.create( + model="${S}", + messages=${JSON.stringify(a,null,4)}${i} +) + +print(response) + +# Example with image or PDF (uncomment and provide file path to use) +# base64_file = encode_image("path/to/your/file.jpg") # or .pdf +# response_with_file = client.chat.completions.create( +# model="${S}", +# messages=[ +# { +# "role": "user", +# "content": [ +# { +# "type": "text", +# "text": "${E}" +# }, +# { +# "type": "image_url", +# "image_url": { +# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file} +# } +# } +# ] +# } +# ]${i} +# ) +# print(response_with_file) +`;break}case o.RESPONSES:{let e=Object.keys(C).length>0,i="";if(e){let e=JSON.stringify({metadata:C},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();i=`, + extra_body=${e}`}let a=w.length>0?w:[{role:"user",content:I}];t=` +import base64 + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Example with text only +response = client.responses.create( + model="${S}", + input=${JSON.stringify(a,null,4)}${i} +) + +print(response.output_text) + +# Example with image or PDF (uncomment and provide file path to use) +# base64_file = encode_image("path/to/your/file.jpg") # or .pdf +# response_with_file = client.responses.create( +# model="${S}", +# input=[ +# { +# "role": "user", +# "content": [ +# {"type": "input_text", "text": "${E}"}, +# { +# "type": "input_image", +# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file} +# }, +# ], +# } +# ]${i} +# ) +# print(response_with_file.output_text) +`;break}case o.IMAGE:t="azure"===v?` +# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI. +# This snippet uses 'client.images.generate' and will create a new image based on your prompt. +# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context. +import os +import requests +import json +import time +from PIL import Image + +result = client.images.generate( + model="${S}", + prompt="${n}", + n=1 +) + +json_response = json.loads(result.model_dump_json()) + +# Set the directory for the stored image +image_dir = os.path.join(os.curdir, 'images') + +# If the directory doesn't exist, create it +if not os.path.isdir(image_dir): + os.mkdir(image_dir) + +# Initialize the image path +image_filename = f"generated_image_{int(time.time())}.png" +image_path = os.path.join(image_dir, image_filename) + +try: + # Retrieve the generated image + if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"): + image_url = json_response["data"][0]["url"] + generated_image = requests.get(image_url).content + with open(image_path, "wb") as image_file: + image_file.write(generated_image) + + print(f"Image saved to {image_path}") + # Display the image + image = Image.open(image_path) + image.show() + else: + print("Could not find image URL in response.") + print("Full response:", json_response) +except Exception as e: + print(f"An error occurred: {e}") + print("Full response:", json_response) +`:` +import base64 +import os +import time +import json +from PIL import Image +import requests + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Helper function to create a file (simplified for this example) +def create_file(image_path): + # In a real implementation, this would upload the file to OpenAI + # For this example, we'll just return a placeholder ID + return f"file_{os.path.basename(image_path).replace('.', '_')}" + +# The prompt entered by the user +prompt = "${E}" + +# Encode images to base64 +base64_image1 = encode_image("body-lotion.png") +base64_image2 = encode_image("soap.png") + +# Create file IDs +file_id1 = create_file("body-lotion.png") +file_id2 = create_file("incense-kit.png") + +response = client.responses.create( + model="${S}", + input=[ + { + "role": "user", + "content": [ + {"type": "input_text", "text": prompt}, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image1}", + }, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image2}", + }, + { + "type": "input_image", + "file_id": file_id1, + }, + { + "type": "input_image", + "file_id": file_id2, + } + ], + } + ], + tools=[{"type": "image_generation"}], +) + +# Process the response +image_generation_calls = [ + output + for output in response.output + if output.type == "image_generation_call" +] + +image_data = [output.result for output in image_generation_calls] + +if image_data: + image_base64 = image_data[0] + image_filename = f"edited_image_{int(time.time())}.png" + with open(image_filename, "wb") as f: + f.write(base64.b64decode(image_base64)) + print(f"Image saved to {image_filename}") +else: + # If no image is generated, there might be a text response with an explanation + text_response = [output.text for output in response.output if hasattr(output, 'text')] + if text_response: + print("No image generated. Model response:") + print("\\n".join(text_response)) + else: + print("No image data found in response.") + print("Full response for debugging:") + print(response) +`;break;case o.IMAGE_EDITS:t="azure"===v?` +import base64 +import os +import time +import json +from PIL import Image +import requests + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# The prompt entered by the user +prompt = "${E}" + +# Encode images to base64 +base64_image1 = encode_image("body-lotion.png") +base64_image2 = encode_image("soap.png") + +# Create file IDs +file_id1 = create_file("body-lotion.png") +file_id2 = create_file("incense-kit.png") + +response = client.responses.create( + model="${S}", + input=[ + { + "role": "user", + "content": [ + {"type": "input_text", "text": prompt}, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image1}", + }, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image2}", + }, + { + "type": "input_image", + "file_id": file_id1, + }, + { + "type": "input_image", + "file_id": file_id2, + } + ], + } + ], + tools=[{"type": "image_generation"}], +) + +# Process the response +image_generation_calls = [ + output + for output in response.output + if output.type == "image_generation_call" +] + +image_data = [output.result for output in image_generation_calls] + +if image_data: + image_base64 = image_data[0] + image_filename = f"edited_image_{int(time.time())}.png" + with open(image_filename, "wb") as f: + f.write(base64.b64decode(image_base64)) + print(f"Image saved to {image_filename}") +else: + # If no image is generated, there might be a text response with an explanation + text_response = [output.text for output in response.output if hasattr(output, 'text')] + if text_response: + print("No image generated. Model response:") + print("\\n".join(text_response)) + else: + print("No image data found in response.") + print("Full response for debugging:") + print(response) +`:` +import base64 +import os +import time + +# Helper function to encode images to base64 +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Helper function to create a file (simplified for this example) +def create_file(image_path): + # In a real implementation, this would upload the file to OpenAI + # For this example, we'll just return a placeholder ID + return f"file_{os.path.basename(image_path).replace('.', '_')}" + +# The prompt entered by the user +prompt = "${E}" + +# Encode images to base64 +base64_image1 = encode_image("body-lotion.png") +base64_image2 = encode_image("soap.png") + +# Create file IDs +file_id1 = create_file("body-lotion.png") +file_id2 = create_file("incense-kit.png") + +response = client.responses.create( + model="${S}", + input=[ + { + "role": "user", + "content": [ + {"type": "input_text", "text": prompt}, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image1}", + }, + { + "type": "input_image", + "image_url": f"data:image/jpeg;base64,{base64_image2}", + }, + { + "type": "input_image", + "file_id": file_id1, + }, + { + "type": "input_image", + "file_id": file_id2, + } + ], + } + ], + tools=[{"type": "image_generation"}], +) + +# Process the response +image_generation_calls = [ + output + for output in response.output + if output.type == "image_generation_call" +] + +image_data = [output.result for output in image_generation_calls] + +if image_data: + image_base64 = image_data[0] + image_filename = f"edited_image_{int(time.time())}.png" + with open(image_filename, "wb") as f: + f.write(base64.b64decode(image_base64)) + print(f"Image saved to {image_filename}") +else: + # If no image is generated, there might be a text response with an explanation + text_response = [output.text for output in response.output if hasattr(output, 'text')] + if text_response: + print("No image generated. Model response:") + print("\\n".join(text_response)) + else: + print("No image data found in response.") + print("Full response for debugging:") + print(response) +`;break;case o.EMBEDDINGS:t=` +response = client.embeddings.create( + input="${n||"Your string here"}", + model="${S}", + encoding_format="base64" # or "float" +) + +print(response.data[0].embedding) +`;break;case o.TRANSCRIPTION:t=` +# Open the audio file +audio_file = open("path/to/your/audio/file.mp3", "rb") + +# Make the transcription request +response = client.audio.transcriptions.create( + model="${S}", + file=audio_file${n?`, + prompt="${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} +) + +print(response.text) +`;break;case o.SPEECH:t=` +# Make the text-to-speech request +response = client.audio.speech.create( + model="${S}", + input="${n||"Your text to convert to speech here"}", + voice="${f}" # Options: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer +) + +# Save the audio to a file +output_filename = "output_speech.mp3" +response.stream_to_file(output_filename) +print(f"Audio saved to {output_filename}") + +# Optional: Customize response format and speed +# response = client.audio.speech.create( +# model="${S}", +# input="${n||"Your text to convert to speech here"}", +# voice="alloy", +# response_format="mp3", # Options: mp3, opus, aac, flac, wav, pcm +# speed=1.0 # Range: 0.25 to 4.0 +# ) +# response.stream_to_file("output_speech.mp3") +`;break;default:t="\n# Code generation for this endpoint is not implemented yet."}return`${O} +${t}`}],190272)},115571,e=>{"use strict";let t="local-storage-change";function i(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))}function a(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}}function o(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}function r(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}}e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",()=>i,"getLocalStorageItem",()=>a,"removeLocalStorageItem",()=>r,"setLocalStorageItem",()=>o])},596239,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:"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 o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["LinkOutlined",0,r],596239)},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},798496,e=>{"use strict";var t=e.i(843476),i=e.i(152990),a=e.i(682830),o=e.i(271645),r=e.i(269200),n=e.i(427612),l=e.i(64848),s=e.i(942232),c=e.i(496020),d=e.i(977572),p=e.i(94629),u=e.i(360820),g=e.i(871943);function m({data:e=[],columns:m,isLoading:f=!1,defaultSorting:h=[],pagination:_,onPaginationChange:v,enablePagination:A=!1,onRowClick:x}){let[b,y]=o.default.useState(h),[I]=o.default.useState("onChange"),[E,w]=o.default.useState({}),[C,S]=o.default.useState({}),O=(0,i.useReactTable)({data:e,columns:m,state:{sorting:b,columnSizing:E,columnVisibility:C,...A&&_?{pagination:_}:{}},columnResizeMode:I,onSortingChange:y,onColumnSizingChange:w,onColumnVisibilityChange:S,...A&&v?{onPaginationChange:v}:{},getCoreRowModel:(0,a.getCoreRowModel)(),getSortedRowModel:(0,a.getSortedRowModel)(),...A?{getPaginationRowModel:(0,a.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(r.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:O.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(n.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(l.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,i.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(u.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(g.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(p.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(s.TableBody,{children:f?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):O.getRowModel().rows.length>0?O.getRowModel().rows.map(e=>(0,t.jsx)(c.TableRow,{onClick:()=>x?.(e.original),className:x?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,i.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>m])},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,i],94629)},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},434626,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 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,i],434626)},100486,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:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["CrownOutlined",0,r],100486)},771674,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:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["UserOutlined",0,r],771674)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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 o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ArrowLeftOutlined",0,r],447566)},948401,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:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["MailOutlined",0,r],948401)},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a542eaa81bba9029.js b/litellm/proxy/_experimental/out/_next/static/chunks/a542eaa81bba9029.js new file mode 100644 index 0000000000..d8d333df58 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/a542eaa81bba9029.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,l],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),l=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 s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ArrowLeftOutlined",0,r],447566)},891547,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,disabled:o})=>{let[c,d]=(0,l.useState)([]),[u,m]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,s.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:r,loading:u,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),l=e.i(271645),a=e.i(199133),s=e.i(764205);function r(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let l=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${l} (${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:i,className:n,accessToken:o,disabled:c,onPoliciesLoaded:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(o){g(!0);try{let e=await (0,s.getPoliciesList)(o);e.policies&&(m(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{g(!1)}}})()},[o,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:i,loading:h,className:n,allowClear:!0,options:r(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>r])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),l=e.i(114272),a=e.i(540143),s=e.i(915823),r=e.i(619273),i=class extends s.Subscribable{#e;#t=void 0;#l;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}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.#l,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#l?.state.status==="pending"&&this.#l.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#l?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#l?.removeObserver(this),this.#l=void 0,this.#s(),this.#r()}mutate(e,t){return this.#a=t,this.#l?.removeObserver(this),this.#l=this.#e.getMutationCache().build(this.#e,this.options),this.#l.addObserver(this),this.#l.execute(e)}#s(){let e=this.#l?.state??(0,l.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,l=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,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,l,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,l,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,l){let s=(0,n.useQueryClient)(l),[o]=t.useState(()=>new i(s,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=t.useCallback((e,t)=>{o.mutate(e,t).catch(r.noop)},[o]);if(c.error&&(0,r.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ClockCircleOutlined",0,r],637235)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let l=e.i(264042).Row;e.s(["Row",0,l],621192)},214541,e=>{"use strict";var t=e.i(271645),l=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,s]=(0,t.useState)([]),{accessToken:r,userId:i,userRole:n}=(0,l.default)();return(0,t.useEffect)(()=>{(async()=>{s(await (0,a.fetchTeams)(r,i,n,null))})()},[r,i,n]),{teams:e,setTeams:s}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function l(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let s=t(e);return isNaN(a)?l(e,NaN):(a&&s.setDate(s.getDate()+a),s)}function s(e,a){let s=t(e);if(isNaN(a))return l(e,NaN);if(!a)return s;let r=s.getDate(),i=l(e,s.getTime());return(i.setMonth(s.getMonth()+a+1,0),r>=i.getDate())?i:(s.setFullYear(i.getFullYear(),i.getMonth(),r),s)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>l],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>s],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(529681),s=e.i(908286),r=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],d=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let a,s,r;return(0,l.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(s={},d.forEach(l=>{s[`${e}-align-${l}`]=t.align===l}),s[`${e}-align-stretch`]=!t.align&&!!t.vertical,s)),(r={},c.forEach(l=>{r[`${e}-justify-${l}`]=t.justify===l}),r)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:l,paddingLG:a}=e,s=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:l,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"}}}})(s),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(s),(e=>{let{componentCls:t}=e,l={};return o.forEach(e=>{l[`${t}-wrap-${e}`]={flexWrap:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return d.forEach(e=>{l[`${t}-align-${e}`]={alignItems:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return c.forEach(e=>{l[`${t}-justify-${e}`]={justifyContent:e}}),l})(s)]},()=>({}),{resetStyle:!1});var h=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let g=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:d,flex:g,gap:f,vertical:p=!1,component:x="div",children:y}=e,w=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:b,getPrefixCls:j}=t.default.useContext(r.ConfigContext),S=j("flex",n),[_,N,C]=m(S),k=null!=p?p:null==v?void 0:v.vertical,z=(0,l.default)(c,o,null==v?void 0:v.className,S,N,C,u(S,e),{[`${S}-rtl`]:"rtl"===b,[`${S}-gap-${f}`]:(0,s.isPresetSize)(f),[`${S}-vertical`]:k}),O=Object.assign(Object.assign({},null==v?void 0:v.style),d);return g&&(O.flex=g),f&&!(0,s.isPresetSize)(f)&&(O.gap=f),_(t.default.createElement(x,Object.assign({ref:i,className:z,style:O},(0,a.default)(w,["justify","wrap","align"])),y))});e.s(["Flex",0,g],525720)},633627,e=>{"use strict";var t=e.i(764205);let l=(e,t,l,a)=>{for(let s of e){let e=s?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let r=s?.organization_id??s?.org_id;r&&"string"==typeof r&&l.add(r.trim());let i=s?.user_id;if(i&&"string"==typeof i){let e=s?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let s=new Set,r=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;l(o,s,r,i);let d=Math.min(c,10)-1;if(d>0){let n=Array.from({length:d},(l,s)=>(0,t.keyListCall)(e,null,a,null,null,null,s+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&l(e.value?.keys||[],s,r,i)}return{keyAliases:Array.from(s).sort(),organizationIds:Array.from(r).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},s=async(e,l)=>{if(!e)return[];try{let a=[],s=1,r=!0;for(;r;){let i=await (0,t.teamListCall)(e,l||null,null);a=[...a,...i],s{if(!e)return[];try{let l=[],a=1,s=!0;for(;s;){let r=await (0,t.organizationListCall)(e);l=[...l,...r],a{"use strict";var t=e.i(843476),l=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var s=e.i(464571),r=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:d={},buttonLabel:u="Filters"})=>{let[m,h]=(0,l.useState)(!1),[g,f]=(0,l.useState)(d),[p,x]=(0,l.useState)({}),[y,w]=(0,l.useState)({}),[v,b]=(0,l.useState)({}),[j,S]=(0,l.useState)({}),_=(0,l.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){w(e=>({...e,[t.name]:!0}));try{let l=await t.searchFn(e);x(e=>({...e,[t.name]:l}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{w(e=>({...e,[t.name]:!1}))}}},300),[]),N=(0,l.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!j[e.name]){w(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(l=>({...l,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{w(t=>({...t,[e.name]:!1}))}}},[j]);(0,l.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!j[e.name]&&N(e)})},[m,e,N,j]);let C=(e,t)=>{let l={...g,[e]:t};f(l),o(l)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(s.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:u}),(0,t.jsx)(s.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),f(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(l=>{let a,s=e.find(e=>e.label===l||e.name===l);return s?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:s.label||s.name}),s.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),onOpenChange:e=>{e&&s.isSearchable&&!j[s.name]&&N(s)},onSearch:e=>{b(t=>({...t,[s.name]:e})),s.searchFn&&_(e,s)},filterOption:!1,loading:y[s.name],options:p[s.name]||[],allowClear:!0,notFoundContent:y[s.name]?"Loading...":"No results found"}):s.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),allowClear:!0,children:s.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):s.customComponent?(a=s.customComponent,(0,t.jsx)(a,{value:g[s.name]||void 0,onChange:e=>C(s.name,e??""),placeholder:`Select ${s.label||s.name}...`,allFilters:g})):(0,t.jsx)(r.Input,{className:"w-full",placeholder:`Enter ${s.label||s.name}...`,value:g[s.name]||"",onChange:e=>C(s.name,e.target.value),allowClear:!0})]},s.name):null})})]})}],969550)},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,s,r)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,s?.organization_id||null,l):await (0,t.teamListCall)(e,s?.organization_id||null),console.log(`givenTeams: ${i}`),r(i)};e.s(["fetchTeams",0,l])},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),s=e.i(947293),r=e.i(764205),i=e.i(954616),n=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function f(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),x=e.i(808613),y=e.i(311451),w=e.i(898586);function v({variant:e,userEmail:a,isPending:s,claimError:r,onSubmit:i}){let[n]=x.Form.useForm();return l.default.useEffect(()=>{a&&n.setFieldValue("user_email",a)},[a,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(x.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>i({password:e.password}),children:[(0,t.jsx)(x.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(x.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),r&&(0,t.jsx)(h.Alert,{type:"error",message:r,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:s,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function b({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:p,isError:x}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,r.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:y,isPending:w}=(0,i.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,r.claimOnboardingToken)(e,t,l,a)}),b=g?.token?(0,s.jwtDecode)(g.token):null,j=b?.user_email??"",S=b?.user_id??null,_=b?.key??null,N=g?.token??null;return p?(0,t.jsx)(m,{}):x?(0,t.jsx)(f,{}):(0,t.jsx)(v,{variant:e,userEmail:j,isPending:w,claimError:u,onSubmit:e=>{_&&N&&S&&d&&(h(null),y({accessToken:_,inviteId:d,userId:S,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,r.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function j(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(b,{variant:"reset_password"===e?"reset_password":"signup"})}function S(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(j,{})})}e.s(["default",()=>S],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),s=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:f=!1,allFilters:p})=>{let[x,y]=(0,d.useState)(""),[w,v]=(0,o.useDebouncedState)("",{wait:300}),{data:b,fetchNextPage:j,hasNextPage:S,isFetchingNextPage:_,isLoading:N}=((e=50,t,a)=>{let{accessToken:n}=(0,r.default)();return(0,l.useInfiniteQuery)({queryKey:i.list({filters:{size:e,...t&&{search:t},...a&&{team_id:a}}}),queryFn:async({pageParam:l})=>await (0,s.keyAliasesCall)(n,l,e,t,a),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!b?.pages)return[];let e=new Set,t=[];for(let l of b.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[b]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:f,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),v(e)},searchValue:x,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&S&&!_&&j()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:C,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),s=e.i(350967),r=e.i(898586),i=e.i(947293),n=e.i(618566),o=e.i(271645),c=e.i(566606),d=e.i(584578),u=e.i(764205),m=e.i(702597),h=e.i(207082),g=e.i(109799),f=e.i(500330),p=e.i(871943),x=e.i(502547),y=e.i(360820),w=e.i(94629),v=e.i(152990),b=e.i(682830),j=e.i(389083),S=e.i(994388),_=e.i(752978),N=e.i(269200),C=e.i(942232),k=e.i(977572),z=e.i(427612),O=e.i(64848),I=e.i(496020),D=e.i(599724),T=e.i(827252),E=e.i(772345),M=e.i(464571),P=e.i(282786),A=e.i(981339),R=e.i(262218),L=e.i(592968),$=e.i(355619),U=e.i(633627),K=e.i(374009),F=e.i(700514),B=e.i(135214),V=e.i(50882),H=e.i(969550),G=e.i(304911),W=e.i(20147);function q({teams:e,organizations:l,onSortChange:a,currentSort:s}){let{data:i}=(0,g.useOrganizations)(),n=i??l??[],[c,d]=(0,o.useState)(null),[m,q]=o.default.useState(()=>s?[{id:s.sortBy,desc:"desc"===s.sortOrder}]:[{id:"created_at",desc:!0}]),[J,Q]=o.default.useState({pageIndex:0,pageSize:50}),Y=m.length>0?m[0].id:null,Z=m.length>0?m[0].desc?"desc":"asc":null,{data:X,isPending:ee,isFetching:et,isError:el,refetch:ea}=(0,h.useKeys)(J.pageIndex+1,J.pageSize,{sortBy:Y||void 0,sortOrder:Z||void 0,expand:"user"}),[es,er]=(0,o.useState)({}),{filters:ei,filteredKeys:en,filteredTotalCount:eo,allTeams:ec,allOrganizations:ed,handleFilterChange:eu,handleFilterReset:em}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:s}=(0,B.default)(),[r,i]=(0,o.useState)(a),[n,c]=(0,o.useState)(t||[]),[d,m]=(0,o.useState)(l||[]),[h,g]=(0,o.useState)(e),[f,p]=(0,o.useState)(null),x=(0,o.useRef)(0),y=(0,o.useCallback)((0,K.default)(async e=>{if(!s)return;let t=Date.now();x.current=t;try{let l=await (0,u.keyListCall)(s,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,F.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===x.current&&l&&(g(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[s]);return(0,o.useEffect)(()=>{if(!e)return void g([]);let t=[...e];r["Team ID"]&&(t=t.filter(e=>e.team_id===r["Team ID"])),r["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===r["Organization ID"])),g(t)},[e,r]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,U.fetchAllTeams)(s);e.length>0&&c(e);let t=await (0,U.fetchAllOrganizations)(s);t.length>0&&m(t)};s&&e()},[s]),(0,o.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{i({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...r,...e})},handleFilterReset:()=>{i(a),p(null),y(a)}}}({keys:X?.keys||[],teams:e,organizations:l}),eh=(0,o.useDeferredValue)(et),eg=(et||eh)&&!el,ef=eo??X?.total_count??0;(0,o.useEffect)(()=>{if(ea){let e=()=>{ea()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[ea]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(L.Tooltip,{title:l,children:(0,t.jsx)(S.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})}},{id:"status",header:"Status",size:100,enableSorting:!1,cell:({row:e})=>{let l=e.original;if(!0!==l.blocked)return(0,t.jsx)(R.Tag,{color:"green","data-testid":`key-status-${l.token_id}`,children:"Active"});let a=l.metadata?.scim_blocked===!0;return(0,t.jsx)(L.Tooltip,{title:a?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401.",children:(0,t.jsx)(R.Tag,{color:"red","data-testid":`key-status-${l.token_id}`,children:"Blocked"})})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let s=e?.find(e=>e.team_id===a),r=s?.team_alias||a,i=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=n.find(e=>e.organization_id===l),s=a?.organization_alias||l,r=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(P.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,s=l.user?.user_email??l.user_email??null,i=l.user_id??null,n="default_user_id"===i,o=a||s||i,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:s},{label:"User ID",value:i}].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)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||s?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(G.default,{userId:i})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,s=a?.user_alias??null,i=a?.user_email??null,n="default_user_id"===l,o=s||i||l,c=(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)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||i?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(G.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(P.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(L.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,f.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,f.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(j.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})}):(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)(_.Icon,{icon:es[e.row.id]?p.ChevronDownIcon:x.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{er(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)(j.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(j.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,$.getModelDisplayName)(e).slice(0,30)}...`:(0,$.getModelDisplayName)(e)})},l)),l.length>3&&!es[e.row.id]&&(0,t.jsx)(j.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(D.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),es[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)(j.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(j.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,$.getModelDisplayName)(e).slice(0,30)}...`:(0,$.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"]})]})}}],[e,n]),ex=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ey=(0,v.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:J},onSortingChange:e=>{let t="function"==typeof e?e(m):e;if(q(t),t&&t.length>0){let e=t[0],l=e.id,s=e.desc?"desc":"asc";eu({...ei,"Sort By":l,"Sort Order":s},!0),a?.(l,s)}},onPaginationChange:Q,getCoreRowModel:(0,b.getCoreRowModel)(),getSortedRowModel:(0,b.getSortedRowModel)(),getPaginationRowModel:(0,b.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(ef/J.pageSize)});o.default.useEffect(()=>{s&&q([{id:s.sortBy,desc:"desc"===s.sortOrder}])},[s]);let{pageIndex:ew,pageSize:ev}=ey.getState().pagination,eb=Math.min((ew+1)*ev,ef),ej=`${ew*ev+1} - ${eb}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:c?(0,t.jsx)(W.default,{keyId:c.token,onClose:()=>d(null),keyData:c,teams:ec,onDelete:ea}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(H.default,{options:ex,onApplyFilters:eu,initialValues:ei,onResetFilters:em})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",ej," of ",ef," results"]}),(0,t.jsx)(M.Button,{type:"default",icon:(0,t.jsx)(E.SyncOutlined,{spin:eg}),onClick:()=>{ea()},disabled:eg,title:"Fetch data",children:eg?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ew+1," of ",ey.getPageCount()]}),ee?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.previousPage(),disabled:ee||!ey.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),ee?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.nextPage(),disabled:ee||!ey.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ey.getCenterTotalSize()},children:[(0,t.jsx)(z.TableHead,{children:ey.getHeaderGroups().map(e=>(0,t.jsx)(I.TableRow,{children:e.headers.map(e=>(0,t.jsx)(O.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,v.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(y.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(w.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ey.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(C.TableBody,{children:ee?(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ey.getRowModel().rows.map(e=>(0,t.jsx)(I.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(k.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:h,teams:g,keys:f,setUserRole:p,userEmail:x,setUserEmail:y,setTeams:w,setKeys:v,premiumUser:b,organizations:j,addKey:S,createClicked:_,autoOpenCreate:N,prefillData:C})=>{let[k,z]=(0,o.useState)(null),[O,I]=(0,o.useState)(null),D=(0,n.useSearchParams)(),T=(0,l.getCookie)("token"),E=D.get("invitation_id"),[M,P]=(0,o.useState)(null),[A,R]=(0,o.useState)(null),[L,$]=(0,o.useState)([]),[U,K]=(0,o.useState)(null),[F,B]=(0,o.useState)(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(T){let e=(0,i.jwtDecode)(T);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),P(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),p(t)}else console.log("User role not defined");e.user_email?y(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&M&&h&&!k){let t=sessionStorage.getItem("userModels"+e);t?$(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(O)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(M);K(t);let l=await (0,u.userGetInfoV2)(M,e);z(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,u.modelAvailableCall)(M,e,h)).data.map(e=>e.id);console.log("available_model_names:",a),$(a),console.log("userModels:",L),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&V()}})(),(0,d.fetchTeams)(M,e,h,O,w))}},[e,T,M,h]),(0,o.useEffect)(()=>{M&&(async()=>{try{let e=await (0,u.keyInfoCall)(M,[M]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&V()}})()},[M]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(O)}, accessToken: ${M}, userID: ${e}, userRole: ${h}`),M&&(console.log("fetching teams"),(0,d.fetchTeams)(M,e,h,O,w))},[O]),(0,o.useEffect)(()=>{if(null!==f&&null!=F&&null!==F.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(f)}`),f))F.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===F.team_id&&(e+=t.spend);console.log(`sum: ${e}`),R(e)}else if(null!==f){let e=0;for(let t of f)e+=t.spend;R(e)}},[F]),null!=E)return(0,t.jsx)(c.default,{});function V(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==T)return console.log("All cookies before redirect:",document.cookie),V(),null;try{let e=(0,i.jwtDecode)(T);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),V(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),V(),null}if(null==M)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==h&&p("App Owner"),h&&"Admin Viewer"==h){let{Title:e,Paragraph:l}=r.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",F),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(m.default,{team:F,teams:g,data:f,addKey:S,autoOpenCreate:N,prefillData:C},F?F.team_id:null),(0,t.jsx)(q,{teams:g,organizations:j})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ba3052c7fda27695.js b/litellm/proxy/_experimental/out/_next/static/chunks/ba3052c7fda27695.js new file mode 100644 index 0000000000..b75ad232d6 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/ba3052c7fda27695.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,757440,e=>{"use strict";var t=e.i(290571),s=e.i(271645);let a=e=>{var a=(0,t.__rest)(e,[]);return s.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},a),s.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>a])},446428,854056,e=>{"use strict";let t;var s=e.i(290571),a=e.i(271645);let l=e=>{var t=(0,s.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.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"}))};e.s(["default",()=>l],446428);var r=e.i(746725),i=e.i(914189),n=e.i(553521),d=e.i(835696),o=e.i(941444),c=e.i(178677),u=e.i(294316),m=e.i(83733),h=e.i(233137),x=e.i(732607),g=e.i(397701),f=e.i(700020);function p(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:S)!==a.Fragment||1===a.default.Children.count(e.children)}let b=(0,a.createContext)(null);b.displayName="TransitionContext";var j=((t=j||{}).Visible="visible",t.Hidden="hidden",t);let v=(0,a.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 _(e,t){let s=(0,o.useLatestValue)(e),l=(0,a.useRef)([]),d=(0,n.useIsMounted)(),c=(0,r.useDisposables)(),u=(0,i.useEvent)((e,t=f.RenderStrategy.Hidden)=>{let a=l.current.findIndex(({el:t})=>t===e);-1!==a&&((0,g.match)(t,{[f.RenderStrategy.Unmount](){l.current.splice(a,1)},[f.RenderStrategy.Hidden](){l.current[a].state="hidden"}}),c.microTask(()=>{var e;!y(l)&&d.current&&(null==(e=s.current)||e.call(s))}))}),m=(0,i.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,f.RenderStrategy.Unmount)}),h=(0,a.useRef)([]),x=(0,a.useRef)(Promise.resolve()),p=(0,a.useRef)({enter:[],leave:[]}),b=(0,i.useEvent)((e,s,a)=>{h.current.splice(0),t&&(t.chains.current[s]=t.chains.current[s].filter(([t])=>t!==e)),null==t||t.chains.current[s].push([e,new Promise(e=>{h.current.push(e)})]),null==t||t.chains.current[s].push([e,new Promise(e=>{Promise.all(p.current[s].map(([e,t])=>t)).then(()=>e())})]),"enter"===s?x.current=x.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(s)):a(s)}),j=(0,i.useEvent)((e,t,s)=>{Promise.all(p.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=h.current.shift())||e()}).then(()=>s(t))});return(0,a.useMemo)(()=>({children:l,register:m,unregister:u,onStart:b,onStop:j,wait:x,chains:p}),[m,u,l,b,j,p,x])}v.displayName="NestingContext";let S=a.Fragment,w=f.RenderFeatures.RenderStrategy,N=(0,f.forwardRefWithAs)(function(e,t){let{show:s,appear:l=!1,unmount:r=!0,...n}=e,o=(0,a.useRef)(null),m=p(e),x=(0,u.useSyncRefs)(...m?[o,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let g=(0,h.useOpenClosed)();if(void 0===s&&null!==g&&(s=(g&h.State.Open)===h.State.Open),void 0===s)throw Error("A is used but it is missing a `show={true | false}` prop.");let[j,S]=(0,a.useState)(s?"visible":"hidden"),N=_(()=>{s||S("hidden")}),[T,k]=(0,a.useState)(!0),I=(0,a.useRef)([s]);(0,d.useIsoMorphicEffect)(()=>{!1!==T&&I.current[I.current.length-1]!==s&&(I.current.push(s),k(!1))},[I,s]);let E=(0,a.useMemo)(()=>({show:s,appear:l,initial:T}),[s,l,T]);(0,d.useIsoMorphicEffect)(()=>{s?S("visible"):y(N)||null===o.current||S("hidden")},[s,N]);let U={unmount:r},R=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeEnter)||t.call(e)}),B=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeLeave)||t.call(e)}),M=(0,f.useRender)();return a.default.createElement(v.Provider,{value:N},a.default.createElement(b.Provider,{value:E},M({ourProps:{...U,as:a.Fragment,children:a.default.createElement(C,{ref:x,...U,...n,beforeEnter:R,beforeLeave:B})},theirProps:{},defaultTag:a.Fragment,features:w,visible:"visible"===j,name:"Transition"})))}),C=(0,f.forwardRefWithAs)(function(e,t){var s,l;let{transition:r=!0,beforeEnter:n,afterEnter:o,beforeLeave:j,afterLeave:N,enter:C,enterFrom:T,enterTo:k,entered:I,leave:E,leaveFrom:U,leaveTo:R,...B}=e,[M,F]=(0,a.useState)(null),D=(0,a.useRef)(null),A=p(e),L=(0,u.useSyncRefs)(...A?[D,t,F]:null===t?[]:[t]),O=null==(s=B.unmount)||s?f.RenderStrategy.Unmount:f.RenderStrategy.Hidden,{show:P,appear:z,initial:V}=function(){let e=(0,a.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[$,K]=(0,a.useState)(P?"visible":"hidden"),H=function(){let e=(0,a.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:q,unregister:G}=H;(0,d.useIsoMorphicEffect)(()=>q(D),[q,D]),(0,d.useIsoMorphicEffect)(()=>{if(O===f.RenderStrategy.Hidden&&D.current)return P&&"visible"!==$?void K("visible"):(0,g.match)($,{hidden:()=>G(D),visible:()=>q(D)})},[$,D,q,G,P,O]);let W=(0,c.useServerHandoffComplete)();(0,d.useIsoMorphicEffect)(()=>{if(A&&W&&"visible"===$&&null===D.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,$,W,A]);let J=V&&!z,Q=z&&P&&V,Z=(0,a.useRef)(!1),Y=_(()=>{Z.current||(K("hidden"),G(D))},H),X=(0,i.useEvent)(e=>{Z.current=!0,Y.onStart(D,e?"enter":"leave",e=>{"enter"===e?null==n||n():"leave"===e&&(null==j||j())})}),ee=(0,i.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Y.onStop(D,t,e=>{"enter"===e?null==o||o():"leave"===e&&(null==N||N())}),"leave"!==t||y(Y)||(K("hidden"),G(D))});(0,a.useEffect)(()=>{A&&r||(X(P),ee(P))},[P,A,r]);let et=!(!r||!A||!W||J),[,es]=(0,m.useTransition)(et,M,P,{start:X,end:ee}),ea=(0,f.compact)({ref:L,className:(null==(l=(0,x.classNames)(B.className,Q&&C,Q&&T,es.enter&&C,es.enter&&es.closed&&T,es.enter&&!es.closed&&k,es.leave&&E,es.leave&&!es.closed&&U,es.leave&&es.closed&&R,!es.transition&&P&&I))?void 0:l.trim())||void 0,...(0,m.transitionDataAttributes)(es)}),el=0;"visible"===$&&(el|=h.State.Open),"hidden"===$&&(el|=h.State.Closed),es.enter&&(el|=h.State.Opening),es.leave&&(el|=h.State.Closing);let er=(0,f.useRender)();return a.default.createElement(v.Provider,{value:Y},a.default.createElement(h.OpenClosedProvider,{value:el},er({ourProps:ea,theirProps:B,defaultTag:S,features:w,visible:"visible"===$,name:"Transition.Child"})))}),T=(0,f.forwardRefWithAs)(function(e,t){let s=null!==(0,a.useContext)(b),l=null!==(0,h.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!s&&l?a.default.createElement(N,{ref:t,...e}):a.default.createElement(C,{ref:t,...e}))}),k=Object.assign(N,{Child:T,Root:N});e.s(["Transition",()=>k],854056)},206929,e=>{"use strict";var t=e.i(290571),s=e.i(757440),a=e.i(271645),l=e.i(446428),r=e.i(444755),i=e.i(673706),n=e.i(103471),d=e.i(495470),o=e.i(854056),c=e.i(888288);let u=(0,i.makeClassName)("Select"),m=a.default.forwardRef((e,i)=>{let{defaultValue:m="",value:h,onValueChange:x,placeholder:g="Select...",disabled:f=!1,icon:p,enableClear:b=!1,required:j,children:v,name:y,error:_=!1,errorMessage:S,className:w,id:N}=e,C=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),T=(0,a.useRef)(null),k=a.Children.toArray(v),[I,E]=(0,c.default)(m,h),U=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(v).filter(a.isValidElement);return(0,n.constructValueToNameMapping)(e)},[v]);return a.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",w)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:j,className:(0,r.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:I,onChange:e=>{e.preventDefault()},name:y,disabled:f,id:N,onFocus:()=>{let e=T.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},g),k.map(e=>{let t=e.props.value,s=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},s)})),a.default.createElement(d.Listbox,Object.assign({as:"div",ref:i,defaultValue:I,value:I,onChange:e=>{null==x||x(e),E(e)},disabled:f,id:N},C),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(d.ListboxButton,{ref:T,className:(0,r.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",p?"pl-10":"pl-3",(0,n.getSelectButtonColors)((0,n.hasValue)(e),f,_))},p&&a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(p,{className:(0,r.tremorTwMerge)(u("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=U.get(e))?t:g),a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(s.default,{className:(0,r.tremorTwMerge)(u("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&I?a.default.createElement("button",{type:"button",className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E(""),null==x||x("")}},a.default.createElement(l.default,{className:(0,r.tremorTwMerge)(u("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(o.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.default.createElement(d.ListboxOptions,{anchor:"bottom start",className:(0,r.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},v)))})),_&&S?a.default.createElement("p",{className:(0,r.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},S):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},502275,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,s],502275)},78085,e=>{"use strict";var t=e.i(290571),s=e.i(103471),a=e.i(888288),l=e.i(271645),r=e.i(444755),i=e.i(673706);let n=(0,i.makeClassName)("Textarea"),d=l.default.forwardRef((e,d)=>{let{value:o,defaultValue:c="",placeholder:u="Type...",error:m=!1,errorMessage:h,disabled:x=!1,className:g,onChange:f,onValueChange:p,autoHeight:b=!1}=e,j=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[v,y]=(0,a.default)(c,o),_=(0,l.useRef)(null),S=(0,s.hasValue)(v);return(0,l.useEffect)(()=>{let e=_.current;if(b&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[b,_,v]),l.default.createElement(l.default.Fragment,null,l.default.createElement("textarea",Object.assign({ref:(0,i.mergeRefs)([_,d]),value:v,placeholder:u,disabled:x,className:(0,r.tremorTwMerge)(n("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,s.getSelectButtonColors)(S,x,m),x?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",g),"data-testid":"text-area",onChange:e=>{null==f||f(e),y(e.target.value),null==p||p(e.target.value)}},j)),m&&h?l.default.createElement("p",{className:(0,r.tremorTwMerge)(n("errorMessage"),"text-sm text-red-500 mt-1")},h):null)});d.displayName="Textarea",e.s(["Textarea",()=>d],78085)},114600,e=>{"use strict";var t=e.i(290571),s=e.i(444755),a=e.i(673706),l=e.i(271645);let r=(0,a.makeClassName)("Divider"),i=l.default.forwardRef((e,a)=>{let{className:i,children:n}=e,d=(0,t.__rest)(e,["className","children"]);return l.default.createElement("div",Object.assign({ref:a,className:(0,s.tremorTwMerge)(r("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",i)},d),n?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.default.createElement("div",{className:(0,s.tremorTwMerge)("text-inherit whitespace-nowrap")},n),l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});i.displayName="Divider",e.s(["Divider",()=>i],114600)},910119,e=>{"use strict";var t=e.i(843476),s=e.i(197647),a=e.i(653824),l=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),h=e.i(199133),x=e.i(28651),g=e.i(175712),f=e.i(770914),p=e.i(536916),b=e.i(764205),j=e.i(827252),v=e.i(994388),y=e.i(35983),_=e.i(779241),S=e.i(78085),w=e.i(808613),N=e.i(592968),C=e.i(708347),T=e.i(860585),k=e.i(355619),I=e.i(435451);function E({userData:e,onCancel:s,onSubmit:a,teams:l,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=w.Form.useForm(),[x,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let t=e.user_info?.max_budget,s=null==t;g(s),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:s?"":t,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,t.jsxs)(w.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(x||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),a(e)},layout:"vertical",children:[!u&&(0,t.jsx)(w.Form.Item,{label:"User ID",name:"user_id",children:(0,t.jsx)(_.TextInput,{disabled:!0})}),!u&&(0,t.jsx)(w.Form.Item,{label:"Email",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Alias",name:"user_alias",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(N.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,t.jsx)(j.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,t.jsx)(h.Select,{children:c&&Object.entries(c).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Personal Models"," ",(0,t.jsx)(N.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,t.jsx)(j.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsxs)(h.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!C.all_admin_roles.includes(d||""),children:[(0,t.jsx)(h.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(h.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,t.jsx)(h.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,t.jsx)("span",{children:"Max Budget (USD)"}),(0,t.jsx)(p.Checkbox,{checked:x,onChange:e=>{let t=e.target.checked;g(t),t&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,t)=>x||""!==t&&null!=t?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,t.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:x})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)(w.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(v.Button,{variant:"secondary",type:"button",onClick:s,children:"Cancel"}),(0,t.jsx)(v.Button,{type:"submit",children:"Save Changes"})]})]})}var U=e.i(727749),R=e.i(888259);let{Text:B,Title:M}=c.Typography,F=({open:e,onCancel:s,selectedUsers:a,possibleUIRoles:l,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:j,allowAllUsers:v=!1})=>{let[y,_]=(0,n.useState)(!1),[S,w]=(0,n.useState)([]),[N,C]=(0,n.useState)(null),[T,k]=(0,n.useState)(!1),[I,F]=(0,n.useState)(!1),D=()=>{w([]),C(null),k(!1),F(!1),s()},A=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),L=async e=>{if(console.log("formValues",e),!r)return void U.default.fromBackend("Access token not found");_(!0);try{let t=a.map(e=>e.user_id),l={};e.user_role&&""!==e.user_role&&(l.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(l.max_budget=e.max_budget),e.models&&e.models.length>0&&(l.models=e.models),e.budget_duration&&""!==e.budget_duration&&(l.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(l.metadata=e.metadata);let n=Object.keys(l).length>0,d=T&&S.length>0;if(!n&&!d)return void U.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,b.userBulkUpdateUserCall)(r,l,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,b.userBulkUpdateUserCall)(r,l,t),o.push(`Updated ${t.length} user(s)`);if(d){let e=[];for(let t of S)try{let s=null;s=I?null:a.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let l=await (0,b.teamBulkMemberAddCall)(r,t,s||null,N||void 0,I);console.log("result",l),e.push({teamId:t,success:!0,successfulAdditions:l.successful_additions,failedAdditions:l.failed_additions})}catch(s){console.error(`Failed to add users to team ${t}:`,s),e.push({teamId:t,success:!1,error:s})}let t=e.filter(e=>e.success),s=e.filter(e=>!e.success);if(t.length>0){let e=t.reduce((e,t)=>e+t.successfulAdditions,0);o.push(`Added users to ${t.length} team(s) (${e} total additions)`)}s.length>0&&R.default.warning(`Failed to add users to ${s.length} team(s)`)}o.length>0&&U.default.success(o.join(". ")),w([]),C(null),k(!1),F(!1),i(),s()}catch(e){console.error("Bulk operation failed:",e),U.default.fromBackend("Failed to perform bulk operations")}finally{_(!1)}};return(0,t.jsxs)(o.Modal,{open:e,onCancel:D,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${a.length} User(s)`,width:800,children:[v&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(p.Checkbox,{checked:I,onChange:e=>F(e.target.checked),children:(0,t.jsx)(B,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsx)(B,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(M,{level:5,children:["Selected Users (",a.length,"):"]}),(0,t.jsx)(m.Table,{size:"small",bordered:!0,dataSource:a,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,t.jsx)(B,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:l?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,t.jsx)(u.Divider,{}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)(B,{children:[(0,t.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,t.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,t.jsxs)(f.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsx)(p.Checkbox,{checked:T,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Select Teams:"}),(0,t.jsx)(h.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:w,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Team Budget (Optional):"}),(0,t.jsx)(x.InputNumber,{placeholder:"Max budget per user in team",value:N,onChange:e=>C(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,t.jsx)(E,{userData:A,onCancel:D,onSubmit:L,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:j,possibleUIRoles:l,isBulkEdit:!0}),y&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,t.jsxs)(B,{children:["Updating ",I?"all users":a.length," user(s)..."]})})]})};var D=e.i(371455);let A=({visible:e,possibleUIRoles:s,onCancel:a,user:l,onSubmit:r})=>{let[i,c]=(0,n.useState)(l),[u]=w.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[l]);let m=async()=>{u.resetFields(),a()},g=async e=>{r(e),u.resetFields(),a()};return l?(0,t.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+l.user_id,width:1e3,children:(0,t.jsx)(w.Form,{form:u,onFinish:g,initialValues:l,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(h.Select,{children:s&&Object.entries(s).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,t.jsx)(x.InputNumber,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,t.jsx)(I.default,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var L=e.i(172372),O=e.i(500330),P=e.i(152473),z=e.i(266027),V=e.i(912598),$=e.i(127952),K=e.i(304967),H=e.i(629569),q=e.i(599724),G=e.i(114600),W=e.i(482725),J=e.i(790848),Q=e.i(646563),Z=e.i(955135);let Y=({accessToken:e,possibleUIRoles:s,userID:a,userRole:l})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[f,p]=(0,n.useState)({}),[j,v]=(0,n.useState)(!1),[y,S]=(0,n.useState)([]),{Paragraph:w}=c.Typography,{Option:N}=h.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let t=await (0,b.getInternalUserSettings)(e);if(u(t),p(t.values||{}),e)try{let t=await (0,b.modelAvailableCall)(e,a,l);if(t&&t.data){let e=t.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),U.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let C=async()=>{if(e){v(!0);try{let t=Object.entries(f).reduce((e,[t,s])=>(e[t]=""===s?null:s,e),{}),s=await (0,b.updateInternalUserSettings)(e,t);u({...o,values:s.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),U.default.fromBackend("Failed to update settings: "+e)}finally{v(!1)}}},I=(e,t)=>{p(s=>({...s,[e]:t}))},E=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(W.Spin,{size:"large"})}):o?(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(d.Button,{onClick:()=>{g(!1),p(o.values||{})},disabled:j,children:"Cancel"}),(0,t.jsx)(d.Button,{type:"primary",onClick:C,loading:j,children:"Save Changes"})]}):(0,t.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,t.jsx)(w,{className:"mb-4",children:o.field_schema.description}),(0,t.jsx)(G.Divider,{}),(0,t.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:a}=o;return a&&a.properties?Object.entries(a.properties).map(([a,l])=>{let r=e[a],i=a.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,t.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,t.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,t.jsx)(w,{className:"text-sm text-gray-500 mt-1",children:l.description||"No description available"}),m?(0,t.jsx)("div",{className:"mt-2",children:((e,a,l)=>{let r=a.type;if("teams"===e){let s,a;return(0,t.jsx)("div",{className:"mt-2",children:(s=E(f[e]||[]),a=(e,t,a)=>{let l=[...s];l[e]={...l[e],[t]:a},I("teams",l)},(0,t.jsxs)("div",{className:"space-y-3",children:[s.map((e,l)=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)(q.Text,{className:"font-medium",children:["Team ",l+1]}),(0,t.jsx)(d.Button,{size:"small",danger:!0,icon:(0,t.jsx)(Z.DeleteOutlined,{}),onClick:()=>{I("teams",s.filter((e,t)=>t!==l))},children:"Remove"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,t.jsx)(_.TextInput,{value:e.team_id,onChange:e=>a(l,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,t.jsx)(x.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>a(l,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,t.jsxs)(h.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>a(l,"user_role",e),children:[(0,t.jsx)(N,{value:"user",children:"User"}),(0,t.jsx)(N,{value:"admin",children:"Admin"})]})]})]})]},l)),(0,t.jsx)(d.Button,{icon:(0,t.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...s,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&s)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:Object.entries(s).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(N,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:a})]})},e))});if("budget_duration"===e)return(0,t.jsx)(T.default,{value:f[e]||null,onChange:t=>I(e,t),className:"mt-2"});if("boolean"===r)return(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(J.Switch,{checked:!!f[e],onChange:t=>I(e,t)})});if("array"===r&&a.items?.enum)return(0,t.jsx)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:a.items.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else if("models"===e)return(0,t.jsxs)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:[(0,t.jsx)(N,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,t.jsx)(N,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),y.map(e=>(0,t.jsx)(N,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&a.enum)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:a.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else return(0,t.jsx)(_.TextInput,{value:void 0!==f[e]?String(f[e]):"",onChange:t=>I(e,t.target.value),placeholder:a.description||"",className:"mt-2"})})(a,l,0)}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,a)=>{if(null==a)return(0,t.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(a)){if(0===a.length)return(0,t.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=E(a);return(0,t.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,s)=>(0,t.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,t.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,t.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,O.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,t.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},s))})}if("user_role"===e&&s&&s[a]){let{ui_label:e,description:l}=s[a];return(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:e}),l&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:l})]})}if("budget_duration"===e)return(0,t.jsx)("span",{children:(0,T.getBudgetDurationLabel)(a)});if("boolean"==typeof a)return(0,t.jsx)("span",{children:a?"Enabled":"Disabled"});if("models"===e&&Array.isArray(a))return 0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},s))});if("object"==typeof a)return Array.isArray(a)?0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(a,null,2)});return(0,t.jsx)("span",{children:String(a)})})(a,r)})]},a)}):(0,t.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,t.jsx)(K.Card,{children:(0,t.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var X=e.i(389083),ee=e.i(350967),et=e.i(752978),es=e.i(262218),ea=e.i(591935),el=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,s,a,l,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(N.Tooltip,{title:e.original.user_id,children:(0,t.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,t.jsx)(N.Tooltip,{title:"Copy User ID",children:(0,t.jsx)(en.CopyOutlined,{onClick:t=>{t.stopPropagation(),(0,O.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>{let s;return(s=e.original.metadata)&&"object"==typeof s&&!1===s.scim_active?(0,t.jsx)(N.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,t.jsx)(es.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,t.jsx)(es.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})}},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:s})=>(0,t.jsx)("span",{className:"text-xs",children:e?.[s.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.spend?(0,O.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"SSO ID"}),(0,t.jsx)(N.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,t.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,t.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,t.jsxs)(X.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,t.jsx)(X.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(N.Tooltip,{title:"Edit user details",children:(0,t.jsx)(et.Icon,{icon:ea.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(N.Tooltip,{title:"Delete user",children:(0,t.jsx)(et.Icon,{icon:el.TrashIcon,size:"sm",onClick:()=>a(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,t.jsx)(N.Tooltip,{title:"Reset Password",children:(0,t.jsx)(et.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>l(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:s,isUserSelected:a,isAllSelected:l,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,t.jsx)(p.Checkbox,{indeterminate:r,checked:l,onChange:e=>s(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:s})=>(0,t.jsx)(p.Checkbox,{checked:a(s.original),onChange:t=>e(s.original,t.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),eh=e.i(64848),ex=e.i(942232),eg=e.i(496020),ef=e.i(977572),ep=e.i(206929),eb=e.i(94629),ej=e.i(360820),ev=e.i(871943),ey=e.i(981339),e_=e.i(530212),eS=e.i(988297),ew=e.i(118366),eN=e.i(678784);function eC({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:x,possibleUIRoles:g,initialTab:f=0,startInEditMode:p=!1}){let[j,y]=(0,n.useState)(null),[_,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[R,B]=(0,n.useState)(!1),[M,F]=(0,n.useState)(!0),[D,A]=(0,n.useState)(p),[P,z]=(0,n.useState)([]),[V,G]=(0,n.useState)(!1),[W,J]=(0,n.useState)(null),[Q,Z]=(0,n.useState)(null),[Y,X]=(0,n.useState)(f),[et,es]=(0,n.useState)({}),[ea,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ep,eb]=(0,n.useState)(null),[ej,ev]=(0,n.useState)(!1),[ey,eC]=(0,n.useState)(!1),[eT,ek]=(0,n.useState)([]),[eI,eE]=(0,n.useState)(""),[eU,eR]=(0,n.useState)("user"),[eB,eM]=(0,n.useState)(!1);n.default.useEffect(()=>{Z((0,b.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0)try{let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),s=await Promise.all(e);S(s)}catch{S(t.teams.map(e=>({team_id:e,team_alias:null})))}let s=(await (0,b.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(s)}catch(e){console.error("Error fetching user data:",e),U.default.fromBackend("Failed to fetch user data")}finally{F(!1)}})()},[u,e,m]);let eF="proxy_admin"===m||"Admin"===m,eD=async()=>{if(u){eM(!0);try{let e=await (0,b.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eM(!1)}}},eA=async()=>{if(u&&eI){ev(!0);try{await (0,b.teamMemberAddCall)(u,eI,{role:eU,user_id:e}),U.default.success("User added to team successfully"),ed(!1);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),U.default.fromBackend(e?.message||"Failed to add user to team")}finally{ev(!1)}}},eL=async()=>{if(u&&ep){eC(!0);try{await (0,b.teamMemberDeleteCall)(u,ep.team_id,{role:"user",user_id:e}),U.default.success("User removed from team successfully"),ec(!1),eb(null);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),U.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eC(!1)}}},eO=eT.filter(e=>!_.some(t=>t.team_id===e.team_id)),eP=async()=>{if(!u)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let t=await (0,b.invitationCreateCall)(u,e);J(t),G(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;B(!0),await (0,b.userDeleteCall)(u,[e]),U.default.success("User deleted successfully"),x&&x(),c()}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{I(!1),B(!1)}},eV=async e=>{try{if(!u||!j)return;await (0,b.userUpdateUserCall)(u,e,null),y({...j,user_email:e.user_email??j.user_email,user_alias:e.user_alias??j.user_alias,models:e.models??j.models,max_budget:e.max_budget??j.max_budget,budget_duration:e.budget_duration??j.budget_duration,metadata:e.metadata??j.metadata}),U.default.success("User updated successfully"),A(!1)}catch(e){console.error("Error updating user:",e),U.default.fromBackend("Failed to update user")}};if(M)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"Loading user data..."})]});if(!j)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"User not found"})]});let e$=async(e,t)=>{await (0,O.copyToClipboard)(e)&&(es(e=>({...e,[t]:!0})),setTimeout(()=>{es(e=>({...e,[t]:!1}))},2e3))},eK={user_id:j.user_id,user_info:{user_email:j.user_email,user_alias:j.user_alias,user_role:j.user_role,models:j.models,max_budget:j.max_budget,budget_duration:j.budget_duration,metadata:j.metadata}};return(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)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(H.Title,{children:j.user_email||"User"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"text-gray-500 font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(v.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:eP,className:"flex items-center",children:"Reset Password"}),(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,t.jsx)($.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:j.user_email},{label:"User ID",value:j.user_id,code:!0},{label:"Global Proxy Role",value:j.user_role&&g?.[j.user_role]?.ui_label||j.user_role||"-"},{label:"Total Spend (USD)",value:null!==j.spend&&void 0!==j.spend?j.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:R}),(0,t.jsxs)(a.TabGroup,{defaultIndex:Y,onIndexChange:X,children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Overview"}),(0,t.jsx)(s.Tab,{children:"Details"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(H.Title,{children:["$",(0,O.formatNumberWithCommas)(j.spend||0,4)]}),(0,t.jsxs)(q.Text,{children:["of"," ",null!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"]})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)(q.Text,{children:"Teams"}),eF&&(0,t.jsx)(v.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eE(""),eR("user"),ed(!0),eD()},children:"Add Team"})]}),(0,t.jsxs)("div",{className:"mt-2",children:[_.length>0?(0,t.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,t.jsxs)(eu.Table,{children:[(0,t.jsx)(em.TableHead,{children:(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(eh.TableHeaderCell,{children:"Team Name"}),eF&&(0,t.jsx)(eh.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,t.jsx)(ex.TableBody,{children:_.slice(0,ea?_.length:20).map(e=>(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(ef.TableCell,{children:e.team_alias||e.team_id}),eF&&(0,t.jsx)(ef.TableCell,{className:"text-right",children:(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{eb(e),ec(!0)}})})]},e.team_id))})]})}):(0,t.jsx)(q.Text,{children:"No teams"}),!ea&&_.length>20&&(0,t.jsxs)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",_.length-20," more"]}),ea&&_.length>20&&(0,t.jsx)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Personal Models"}),(0,t.jsx)("div",{className:"mt-2",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)(q.Text,{children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"User Settings"}),!D&&m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsx)(v.Button,{onClick:()=>A(!0),children:"Edit Settings"})]}),D&&j?(0,t.jsx)(E,{userData:eK,onCancel:()=>A(!1),onSubmit:eV,teams:_,accessToken:u,userID:e,userRole:m,userModels:P,possibleUIRoles:g}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,t.jsx)(q.Text,{children:j.user_email||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,t.jsx)(q.Text,{children:j.user_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,t.jsx)(q.Text,{children:j.user_role||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(q.Text,{children:j.created_at?new Date(j.created_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(q.Text,{children:j.updated_at?new Date(j.updated_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsx)(q.Text,{children:null!==j.max_budget&&void 0!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,t.jsx)(q.Text,{children:(0,T.getBudgetDurationLabel)(j.budget_duration??null)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(j.metadata||{},null,2)})]})]})]})})]})]}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:V,setIsInvitationLinkModalVisible:G,baseUrl:Q||"",invitationLinkData:W,modalType:"resetPassword"}),(0,t.jsx)($.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ep?.team_alias||ep?.team_id},{label:"User ID",value:j?.user_id,code:!0},{label:"Email",value:j?.user_email}],onCancel:()=>{ec(!1),eb(null)},onOk:eL,confirmLoading:ey}),(0,t.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!ej,children:(0,t.jsxs)(w.Form,{layout:"vertical",onFinish:eA,children:[(0,t.jsx)(w.Form.Item,{label:"Team",required:!0,children:(0,t.jsx)(h.Select,{showSearch:!0,value:eI||void 0,onChange:eE,placeholder:"Select a team",filterOption:(e,t)=>{let s=eO.find(e=>e.team_id===t?.value);return!!s&&s.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eB,children:eO.map(e=>(0,t.jsx)(h.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,t.jsx)(w.Form.Item,{label:"Member Role",children:(0,t.jsxs)(h.Select,{value:eU,onChange:eR,children:[(0,t.jsx)(h.Select.Option,{value:"user",children:(0,t.jsxs)(N.Tooltip,{title:"Can view team info, but not manage it",children:[(0,t.jsx)("span",{className:"font-medium",children:"user"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,t.jsx)(h.Select.Option,{value:"admin",children:(0,t.jsxs)(N.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,t.jsx)("span",{className:"font-medium",children:"admin"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:ej,disabled:!eI,children:ej?"Adding...":"Add to Team"})})]})})]})}var eT=e.i(655913),ek=e.i(38419),eI=e.i(78334),eE=e.i(555436),eU=e.i(284614);let eR=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eB({data:e=[],columns:s,isLoading:a=!1,onSortChange:l,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:h=[],onSelectionChange:x,enableSelection:g=!1,filters:f,updateFilters:p,initialFilters:b,teams:j,userListResponse:v,currentPage:_,handlePageChange:S}){let[w,N]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[C,T]=n.default.useState(null),[k,I]=n.default.useState(!1),[E,U]=n.default.useState(!1),R=(e,t=!1)=>{T(e),I(t)},B=(e,t)=>{x&&(t?x([...h,e]):x(h.filter(t=>t.user_id!==e.user_id)))},M=t=>{x&&(t?x(e):x([]))},F=e=>h.some(t=>t.user_id===e.user_id),D=e.length>0&&h.length===e.length,A=h.length>0&&h.lengtho?ed(o,c,u,m,R,g?{selectedUsers:h,onSelectUser:B,onSelectAll:M,isUserSelected:F,isAllSelected:D,isIndeterminate:A}:void 0):s,[o,c,u,m,R,s,g,h,D,A]),O=(0,eo.useReactTable)({data:e,columns:L,state:{sorting:w},onSortingChange:e=>{let t="function"==typeof e?e(w):e;if(N(t),t&&Array.isArray(t)&&t.length>0&&t[0]){let e=t[0];if(e.id){let t=e.id,s=e.desc?"desc":"asc";l?.(t,s)}}else l?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&N([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),C)?(0,t.jsx)(eC,{userId:C,onClose:()=>{T(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(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)(eT.FilterInput,{placeholder:"Search by email...",value:f.email,onChange:e=>p({email:e}),icon:eE.Search}),(0,t.jsx)(ek.FiltersButton,{onClick:()=>U(!E),active:E,hasActiveFilters:!!(f.user_id||f.user_role||f.team)}),(0,t.jsx)(eI.ResetFiltersButton,{onClick:()=>{p(b)}})]}),E&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by User ID",value:f.user_id,onChange:e=>p({user_id:e}),icon:eU.User}),(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by SSO ID",value:f.sso_user_id,onChange:e=>p({sso_user_id:e}),icon:eR}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.user_role,onValueChange:e=>p({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s.ui_label},e))})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.team,onValueChange:e=>p({team:e}),placeholder:"Select Team",children:j?.map(e=>(0,t.jsx)(y.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[a?(0,t.jsx)(ey.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",v&&v.users&&v.users.length>0?(v.page-1)*v.page_size+1:0," ","-"," ",v&&v.users?Math.min(v.page*v.page_size,v.total):0," ","of ",v?v.total:0," results"]}),(0,t.jsx)("div",{className:"flex space-x-2",children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>S(_-1),disabled:1===_,className:`px-3 py-1 text-sm border rounded-md ${1===_?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,t.jsx)("button",{onClick:()=>S(_+1),disabled:!v||_>=v.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!v||_>=v.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,t.jsx)("div",{className:"overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(em.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eh.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(ej.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ev.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eb.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(ex.TableBody,{children:a?(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?O.getRowModel().rows.map(e=>(0,t.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(ef.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&R(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eM,Title:eF}=c.Typography,eD={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:h})=>{let x=!!c&&(0,C.isProxyAdminRole)(c),g=(0,V.useQueryClient)(),[f,p]=(0,n.useState)(1),[j,v]=(0,n.useState)(!1),[y,_]=(0,n.useState)(null),[S,w]=(0,n.useState)(!1),[N,T]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[E,R]=(0,n.useState)("users"),[B,M]=(0,n.useState)(eD),[K,H,q]=(0,P.useDebouncedState)(B,{wait:300}),[G,W]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Z,X]=(0,n.useState)(null),[ee,et]=(0,n.useState)([]),[es,ea]=(0,n.useState)(!1),[el,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),w(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{X((0,b.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let t=(await (0,b.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",t),en(t)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{M(t=>{let s={...t,...e};return H(s),s})},eu=(e,t)=>{ec({sort_by:e,sort_order:t})},em=async t=>{if(!e)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let s=await (0,b.invitationCreateCall)(e,t);Q(s),W(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},eh=async()=>{if(k&&e)try{T(!0),await (0,b.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:t}}),U.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{w(!1),I(null),T(!1)}},ex=async()=>{_(null),v(!1)},eg=async t=>{if(console.log("inside handleEditSubmit:",t),e&&o&&c&&u){try{let s=await (0,b.userUpdateUserCall)(e,t,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.map(e=>e.user_id===s.data.user_id?(0,O.updateExistingKeys)(e,s.data):e);return{...e,users:t}}),U.default.success(`User ${t.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}_(null),v(!1)}},ef=async e=>{p(e)},ep=e=>{et(e)},eb=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:K,currentPage:f,orgAdminOrgIds:h}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.userListCall)(e,K.user_id?[K.user_id]:null,f,25,K.email||null,K.user_role||null,K.team||null,K.sso_user_id||null,K.sort_by,K.sort_order,h?h.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),ej=eb.data,ev=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,e_=ed(ev,e=>{_(e),v(!0)},eo,em,()=>{});return(0,t.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("div",{className:"flex space-x-3",children:eb.isLoading?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ev}),x&&(0,t.jsx)(d.Button,{onClick:()=>{er(!el),et([])},type:el?"primary":"default",className:"flex items-center",children:el?"Cancel Selection":"Select Users"}),x&&el&&(0,t.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?U.default.fromBackend("Please select users to edit"):ea(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),x?(0,t.jsxs)(a.TabGroup,{defaultIndex:0,onIndexChange:e=>R(0===e?"users":"settings"),children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Users"}),(0,t.jsx)(s.Tab,{children:"Default User Settings"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:el,selectedUsers:ee,onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef})}),(0,t.jsx)(r.TabPanel,{children:u&&c&&e?(0,t.jsx)(Y,{accessToken:e,possibleUIRoles:ev,userID:u,userRole:c}):(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(ey.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef}),(0,t.jsx)(A,{visible:j,possibleUIRoles:ev,onCancel:ex,user:y,onSubmit:eg}),(0,t.jsx)($.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ev?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{w(!1),I(null)},onOk:eh,confirmLoading:N}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:G,setIsInvitationLinkModalVisible:W,baseUrl:Z||"",invitationLinkData:J,modalType:"resetPassword"}),(0,t.jsx)(F,{open:es,onCancel:()=>ea(!1),selectedUsers:ee,possibleUIRoles:ev,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),et([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,C.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/bdaa8fe6e6022114.js b/litellm/proxy/_experimental/out/_next/static/chunks/bdaa8fe6e6022114.js new file mode 100644 index 0000000000..29229e4ec2 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/bdaa8fe6e6022114.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,l],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),l=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 s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ArrowLeftOutlined",0,r],447566)},891547,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,disabled:o})=>{let[c,d]=(0,l.useState)([]),[u,m]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,s.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:r,loading:u,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),l=e.i(271645),a=e.i(199133),s=e.i(764205);function r(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let l=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${l} (${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:i,className:n,accessToken:o,disabled:c,onPoliciesLoaded:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(o){g(!0);try{let e=await (0,s.getPoliciesList)(o);e.policies&&(m(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{g(!1)}}})()},[o,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:i,loading:h,className:n,allowClear:!0,options:r(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>r])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),l=e.i(114272),a=e.i(540143),s=e.i(915823),r=e.i(619273),i=class extends s.Subscribable{#e;#t=void 0;#l;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}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.#l,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#l?.state.status==="pending"&&this.#l.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#l?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#l?.removeObserver(this),this.#l=void 0,this.#s(),this.#r()}mutate(e,t){return this.#a=t,this.#l?.removeObserver(this),this.#l=this.#e.getMutationCache().build(this.#e,this.options),this.#l.addObserver(this),this.#l.execute(e)}#s(){let e=this.#l?.state??(0,l.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,l=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,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,l,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,l,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,l){let s=(0,n.useQueryClient)(l),[o]=t.useState(()=>new i(s,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=t.useCallback((e,t)=>{o.mutate(e,t).catch(r.noop)},[o]);if(c.error&&(0,r.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ClockCircleOutlined",0,r],637235)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let l=e.i(264042).Row;e.s(["Row",0,l],621192)},214541,e=>{"use strict";var t=e.i(271645),l=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,s]=(0,t.useState)([]),{accessToken:r,userId:i,userRole:n}=(0,l.default)();return(0,t.useEffect)(()=>{(async()=>{s(await (0,a.fetchTeams)(r,i,n,null))})()},[r,i,n]),{teams:e,setTeams:s}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function l(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let s=t(e);return isNaN(a)?l(e,NaN):(a&&s.setDate(s.getDate()+a),s)}function s(e,a){let s=t(e);if(isNaN(a))return l(e,NaN);if(!a)return s;let r=s.getDate(),i=l(e,s.getTime());return(i.setMonth(s.getMonth()+a+1,0),r>=i.getDate())?i:(s.setFullYear(i.getFullYear(),i.getMonth(),r),s)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>l],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>s],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(529681),s=e.i(908286),r=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],d=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let a,s,r;return(0,l.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(s={},d.forEach(l=>{s[`${e}-align-${l}`]=t.align===l}),s[`${e}-align-stretch`]=!t.align&&!!t.vertical,s)),(r={},c.forEach(l=>{r[`${e}-justify-${l}`]=t.justify===l}),r)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:l,paddingLG:a}=e,s=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:l,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"}}}})(s),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(s),(e=>{let{componentCls:t}=e,l={};return o.forEach(e=>{l[`${t}-wrap-${e}`]={flexWrap:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return d.forEach(e=>{l[`${t}-align-${e}`]={alignItems:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return c.forEach(e=>{l[`${t}-justify-${e}`]={justifyContent:e}}),l})(s)]},()=>({}),{resetStyle:!1});var h=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let g=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:d,flex:g,gap:f,vertical:p=!1,component:x="div",children:y}=e,w=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:b,getPrefixCls:j}=t.default.useContext(r.ConfigContext),S=j("flex",n),[_,N,C]=m(S),k=null!=p?p:null==v?void 0:v.vertical,z=(0,l.default)(c,o,null==v?void 0:v.className,S,N,C,u(S,e),{[`${S}-rtl`]:"rtl"===b,[`${S}-gap-${f}`]:(0,s.isPresetSize)(f),[`${S}-vertical`]:k}),O=Object.assign(Object.assign({},null==v?void 0:v.style),d);return g&&(O.flex=g),f&&!(0,s.isPresetSize)(f)&&(O.gap=f),_(t.default.createElement(x,Object.assign({ref:i,className:z,style:O},(0,a.default)(w,["justify","wrap","align"])),y))});e.s(["Flex",0,g],525720)},633627,e=>{"use strict";var t=e.i(764205);let l=(e,t,l,a)=>{for(let s of e){let e=s?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let r=s?.organization_id??s?.org_id;r&&"string"==typeof r&&l.add(r.trim());let i=s?.user_id;if(i&&"string"==typeof i){let e=s?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let s=new Set,r=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;l(o,s,r,i);let d=Math.min(c,10)-1;if(d>0){let n=Array.from({length:d},(l,s)=>(0,t.keyListCall)(e,null,a,null,null,null,s+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&l(e.value?.keys||[],s,r,i)}return{keyAliases:Array.from(s).sort(),organizationIds:Array.from(r).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},s=async(e,l)=>{if(!e)return[];try{let a=[],s=1,r=!0;for(;r;){let i=await (0,t.teamListCall)(e,l||null,null);a=[...a,...i],s{if(!e)return[];try{let l=[],a=1,s=!0;for(;s;){let r=await (0,t.organizationListCall)(e);l=[...l,...r],a{"use strict";var t=e.i(843476),l=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var s=e.i(464571),r=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:d={},buttonLabel:u="Filters"})=>{let[m,h]=(0,l.useState)(!1),[g,f]=(0,l.useState)(d),[p,x]=(0,l.useState)({}),[y,w]=(0,l.useState)({}),[v,b]=(0,l.useState)({}),[j,S]=(0,l.useState)({}),_=(0,l.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){w(e=>({...e,[t.name]:!0}));try{let l=await t.searchFn(e);x(e=>({...e,[t.name]:l}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{w(e=>({...e,[t.name]:!1}))}}},300),[]),N=(0,l.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!j[e.name]){w(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(l=>({...l,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{w(t=>({...t,[e.name]:!1}))}}},[j]);(0,l.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!j[e.name]&&N(e)})},[m,e,N,j]);let C=(e,t)=>{let l={...g,[e]:t};f(l),o(l)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(s.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:u}),(0,t.jsx)(s.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),f(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(l=>{let a,s=e.find(e=>e.label===l||e.name===l);return s?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:s.label||s.name}),s.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),onOpenChange:e=>{e&&s.isSearchable&&!j[s.name]&&N(s)},onSearch:e=>{b(t=>({...t,[s.name]:e})),s.searchFn&&_(e,s)},filterOption:!1,loading:y[s.name],options:p[s.name]||[],allowClear:!0,notFoundContent:y[s.name]?"Loading...":"No results found"}):s.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),allowClear:!0,children:s.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):s.customComponent?(a=s.customComponent,(0,t.jsx)(a,{value:g[s.name]||void 0,onChange:e=>C(s.name,e??""),placeholder:`Select ${s.label||s.name}...`,allFilters:g})):(0,t.jsx)(r.Input,{className:"w-full",placeholder:`Enter ${s.label||s.name}...`,value:g[s.name]||"",onChange:e=>C(s.name,e.target.value),allowClear:!0})]},s.name):null})})]})}],969550)},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,s,r)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,s?.organization_id||null,l):await (0,t.teamListCall)(e,s?.organization_id||null),console.log(`givenTeams: ${i}`),r(i)};e.s(["fetchTeams",0,l])},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),s=e.i(947293),r=e.i(764205),i=e.i(954616),n=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function f(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),x=e.i(808613),y=e.i(311451),w=e.i(898586);function v({variant:e,userEmail:a,isPending:s,claimError:r,onSubmit:i}){let[n]=x.Form.useForm();return l.default.useEffect(()=>{a&&n.setFieldValue("user_email",a)},[a,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(x.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>i({password:e.password}),children:[(0,t.jsx)(x.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(x.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),r&&(0,t.jsx)(h.Alert,{type:"error",message:r,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:s,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function b({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:p,isError:x}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,r.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:y,isPending:w}=(0,i.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,r.claimOnboardingToken)(e,t,l,a)}),b=g?.token?(0,s.jwtDecode)(g.token):null,j=b?.user_email??"",S=b?.user_id??null,_=b?.key??null,N=g?.token??null;return p?(0,t.jsx)(m,{}):x?(0,t.jsx)(f,{}):(0,t.jsx)(v,{variant:e,userEmail:j,isPending:w,claimError:u,onSubmit:e=>{_&&N&&S&&d&&(h(null),y({accessToken:_,inviteId:d,userId:S,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,r.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function j(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(b,{variant:"reset_password"===e?"reset_password":"signup"})}function S(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(j,{})})}e.s(["default",()=>S],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),s=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:f=!1,allFilters:p})=>{let[x,y]=(0,d.useState)(""),[w,v]=(0,o.useDebouncedState)("",{wait:300}),{data:b,fetchNextPage:j,hasNextPage:S,isFetchingNextPage:_,isLoading:N}=((e=50,t,a)=>{let{accessToken:n}=(0,r.default)();return(0,l.useInfiniteQuery)({queryKey:i.list({filters:{size:e,...t&&{search:t},...a&&{team_id:a}}}),queryFn:async({pageParam:l})=>await (0,s.keyAliasesCall)(n,l,e,t,a),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!b?.pages)return[];let e=new Set,t=[];for(let l of b.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[b]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:f,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),v(e)},searchValue:x,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&S&&!_&&j()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:C,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),s=e.i(350967),r=e.i(898586),i=e.i(947293),n=e.i(618566),o=e.i(271645),c=e.i(566606),d=e.i(584578),u=e.i(764205),m=e.i(702597),h=e.i(207082),g=e.i(109799),f=e.i(500330),p=e.i(871943),x=e.i(502547),y=e.i(360820),w=e.i(94629),v=e.i(152990),b=e.i(682830),j=e.i(389083),S=e.i(994388),_=e.i(752978),N=e.i(269200),C=e.i(942232),k=e.i(977572),z=e.i(427612),O=e.i(64848),I=e.i(496020),D=e.i(599724),T=e.i(827252),E=e.i(772345),M=e.i(464571),P=e.i(282786),A=e.i(981339),R=e.i(262218),L=e.i(592968),$=e.i(355619),U=e.i(633627),K=e.i(374009),F=e.i(700514),B=e.i(135214),V=e.i(50882),H=e.i(969550),G=e.i(304911),W=e.i(20147);function q({teams:e,organizations:l,onSortChange:a,currentSort:s}){let{data:i}=(0,g.useOrganizations)(),n=i??l??[],[c,d]=(0,o.useState)(null),[m,q]=o.default.useState(()=>s?[{id:s.sortBy,desc:"desc"===s.sortOrder}]:[{id:"created_at",desc:!0}]),[J,Q]=o.default.useState({pageIndex:0,pageSize:50}),Y=m.length>0?m[0].id:null,Z=m.length>0?m[0].desc?"desc":"asc":null,{data:X,isPending:ee,isFetching:et,isError:el,refetch:ea}=(0,h.useKeys)(J.pageIndex+1,J.pageSize,{sortBy:Y||void 0,sortOrder:Z||void 0,expand:"user"}),[es,er]=(0,o.useState)({}),{filters:ei,filteredKeys:en,filteredTotalCount:eo,allTeams:ec,allOrganizations:ed,handleFilterChange:eu,handleFilterReset:em}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:s}=(0,B.default)(),[r,i]=(0,o.useState)(a),[n,c]=(0,o.useState)(t||[]),[d,m]=(0,o.useState)(l||[]),[h,g]=(0,o.useState)(e),[f,p]=(0,o.useState)(null),x=(0,o.useRef)(0),y=(0,o.useCallback)((0,K.default)(async e=>{if(!s)return;let t=Date.now();x.current=t;try{let l=await (0,u.keyListCall)(s,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,F.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===x.current&&l&&(g(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[s]);return(0,o.useEffect)(()=>{if(!e)return void g([]);let t=[...e];r["Team ID"]&&(t=t.filter(e=>e.team_id===r["Team ID"])),r["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===r["Organization ID"])),g(t)},[e,r]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,U.fetchAllTeams)(s);e.length>0&&c(e);let t=await (0,U.fetchAllOrganizations)(s);t.length>0&&m(t)};s&&e()},[s]),(0,o.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{i({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...r,...e})},handleFilterReset:()=>{i(a),p(null),y(a)}}}({keys:X?.keys||[],teams:e,organizations:l}),eh=(0,o.useDeferredValue)(et),eg=(et||eh)&&!el,ef=eo??X?.total_count??0;(0,o.useEffect)(()=>{if(ea){let e=()=>{ea()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[ea]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(L.Tooltip,{title:l,children:(0,t.jsx)(S.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})}},{id:"status",header:"Status",size:100,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=!0===l.blocked,s=!0===(l.metadata??{}).scim_blocked;return a?(0,t.jsx)(L.Tooltip,{title:s?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401.",children:(0,t.jsx)(R.Tag,{color:"red","data-testid":`key-status-${l.token_id}`,children:"Blocked"})}):(0,t.jsx)(R.Tag,{color:"green","data-testid":`key-status-${l.token_id}`,children:"Active"})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let s=e?.find(e=>e.team_id===a),r=s?.team_alias||a,i=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=n.find(e=>e.organization_id===l),s=a?.organization_alias||l,r=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(P.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,s=l.user?.user_email??l.user_email??null,i=l.user_id??null,n="default_user_id"===i,o=a||s||i,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:s},{label:"User ID",value:i}].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)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||s?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(G.default,{userId:i})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,s=a?.user_alias??null,i=a?.user_email??null,n="default_user_id"===l,o=s||i||l,c=(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)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||i?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(G.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(P.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(L.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,f.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,f.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(j.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})}):(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)(_.Icon,{icon:es[e.row.id]?p.ChevronDownIcon:x.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{er(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)(j.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(j.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,$.getModelDisplayName)(e).slice(0,30)}...`:(0,$.getModelDisplayName)(e)})},l)),l.length>3&&!es[e.row.id]&&(0,t.jsx)(j.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(D.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),es[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)(j.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(j.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,$.getModelDisplayName)(e).slice(0,30)}...`:(0,$.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"]})]})}}],[e,n]),ex=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ey=(0,v.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:J},onSortingChange:e=>{let t="function"==typeof e?e(m):e;if(q(t),t&&t.length>0){let e=t[0],l=e.id,s=e.desc?"desc":"asc";eu({...ei,"Sort By":l,"Sort Order":s},!0),a?.(l,s)}},onPaginationChange:Q,getCoreRowModel:(0,b.getCoreRowModel)(),getSortedRowModel:(0,b.getSortedRowModel)(),getPaginationRowModel:(0,b.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(ef/J.pageSize)});o.default.useEffect(()=>{s&&q([{id:s.sortBy,desc:"desc"===s.sortOrder}])},[s]);let{pageIndex:ew,pageSize:ev}=ey.getState().pagination,eb=Math.min((ew+1)*ev,ef),ej=`${ew*ev+1} - ${eb}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:c?(0,t.jsx)(W.default,{keyId:c.token,onClose:()=>d(null),keyData:c,teams:ec,onDelete:ea}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(H.default,{options:ex,onApplyFilters:eu,initialValues:ei,onResetFilters:em})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",ej," of ",ef," results"]}),(0,t.jsx)(M.Button,{type:"default",icon:(0,t.jsx)(E.SyncOutlined,{spin:eg}),onClick:()=>{ea()},disabled:eg,title:"Fetch data",children:eg?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ew+1," of ",ey.getPageCount()]}),ee?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.previousPage(),disabled:ee||!ey.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),ee?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.nextPage(),disabled:ee||!ey.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ey.getCenterTotalSize()},children:[(0,t.jsx)(z.TableHead,{children:ey.getHeaderGroups().map(e=>(0,t.jsx)(I.TableRow,{children:e.headers.map(e=>(0,t.jsx)(O.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,v.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(y.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(w.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ey.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(C.TableBody,{children:ee?(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ey.getRowModel().rows.map(e=>(0,t.jsx)(I.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(k.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:h,teams:g,keys:f,setUserRole:p,userEmail:x,setUserEmail:y,setTeams:w,setKeys:v,premiumUser:b,organizations:j,addKey:S,createClicked:_,autoOpenCreate:N,prefillData:C})=>{let[k,z]=(0,o.useState)(null),[O,I]=(0,o.useState)(null),D=(0,n.useSearchParams)(),T=(0,l.getCookie)("token"),E=D.get("invitation_id"),[M,P]=(0,o.useState)(null),[A,R]=(0,o.useState)(null),[L,$]=(0,o.useState)([]),[U,K]=(0,o.useState)(null),[F,B]=(0,o.useState)(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(T){let e=(0,i.jwtDecode)(T);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),P(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),p(t)}else console.log("User role not defined");e.user_email?y(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&M&&h&&!k){let t=sessionStorage.getItem("userModels"+e);t?$(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(O)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(M);K(t);let l=await (0,u.userGetInfoV2)(M,e);z(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,u.modelAvailableCall)(M,e,h)).data.map(e=>e.id);console.log("available_model_names:",a),$(a),console.log("userModels:",L),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&V()}})(),(0,d.fetchTeams)(M,e,h,O,w))}},[e,T,M,h]),(0,o.useEffect)(()=>{M&&(async()=>{try{let e=await (0,u.keyInfoCall)(M,[M]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&V()}})()},[M]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(O)}, accessToken: ${M}, userID: ${e}, userRole: ${h}`),M&&(console.log("fetching teams"),(0,d.fetchTeams)(M,e,h,O,w))},[O]),(0,o.useEffect)(()=>{if(null!==f&&null!=F&&null!==F.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(f)}`),f))F.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===F.team_id&&(e+=t.spend);console.log(`sum: ${e}`),R(e)}else if(null!==f){let e=0;for(let t of f)e+=t.spend;R(e)}},[F]),null!=E)return(0,t.jsx)(c.default,{});function V(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==T)return console.log("All cookies before redirect:",document.cookie),V(),null;try{let e=(0,i.jwtDecode)(T);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),V(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),V(),null}if(null==M)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==h&&p("App Owner"),h&&"Admin Viewer"==h){let{Title:e,Paragraph:l}=r.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",F),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(m.default,{team:F,teams:g,data:f,addKey:S,autoOpenCreate:N,prefillData:C},F?F.team_id:null),(0,t.jsx)(q,{teams:g,organizations:j})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/cbab30fb3f911abc.js b/litellm/proxy/_experimental/out/_next/static/chunks/cbab30fb3f911abc.js new file mode 100644 index 0000000000..a93dca7961 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/cbab30fb3f911abc.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,844444,e=>{"use strict";var t=e.i(843476),a=e.i(906579),l=e.i(271645),s=e.i(115571);function r(e){let t=t=>{"disableShowNewBadge"===t.key&&e()},a=t=>{let{key:a}=t.detail;"disableShowNewBadge"===a&&e()};return window.addEventListener("storage",t),window.addEventListener(s.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",t),window.removeEventListener(s.LOCAL_STORAGE_EVENT,a)}}function i(){return"true"===(0,s.getLocalStorageItem)("disableShowNewBadge")}function n({children:e,dot:s=!1}){return(0,l.useSyncExternalStore)(r,i)?e?(0,t.jsx)(t.Fragment,{children:e}):null:e?(0,t.jsx)(a.Badge,{color:"blue",count:s?void 0:"New",dot:s,children:e}):(0,t.jsx)(a.Badge,{color:"blue",count:s?void 0:"New",dot:s})}e.s(["default",()=>n],844444)},477189,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["AppstoreOutlined",0,r],477189)},19732,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={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 s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["ExperimentOutlined",0,r],19732)},788191,e=>{"use strict";e.i(247167);var t=e.i(931067),a=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:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["PlayCircleOutlined",0,r],788191)},399219,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",()=>t])},299251,153702,777579,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={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 s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["BankOutlined",0,r],299251);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"};var n=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:i}))});e.s(["BarChartOutlined",0,n],153702);let o={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 c=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["LineChartOutlined",0,c],777579)},362133,457202,439061,182399,234779,374615,330995,592143,372943,899268,87316,655900,299023,25652,882293,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["ApartmentOutlined",0,r],362133);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-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-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};var n=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:i}))});e.s(["AuditOutlined",0,n],457202);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"};var c=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["BgColorsOutlined",0,c],439061);let d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"};var u=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:d}))});e.s(["BlockOutlined",0,u],182399);let m={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-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};var g=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:m}))});e.s(["BookOutlined",0,g],234779);let h={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var x=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:h}))});e.s(["CreditCardOutlined",0,x],374615);var f=e.i(366845);e.s(["FolderOutlined",()=>f.default],330995);var p=e.i(609587);e.s(["ConfigProvider",()=>p.default],592143);var y=e.i(8211),v=e.i(343794),b=e.i(529681),j=e.i(242064),w=e.i(704914),N=e.i(876556),k=e.i(290224),O=e.i(251224),L=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,l=Object.getOwnPropertySymbols(e);st.indexOf(l[s])&&Object.prototype.propertyIsEnumerable.call(e,l[s])&&(a[l[s]]=e[l[s]]);return a};function _({suffixCls:e,tagName:t,displayName:l}){return l=>a.forwardRef((s,r)=>a.createElement(l,Object.assign({ref:r,suffixCls:e,tagName:t},s)))}let z=a.forwardRef((e,t)=>{let{prefixCls:l,suffixCls:s,className:r,tagName:i}=e,n=L(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:o}=a.useContext(j.ConfigContext),c=o("layout",l),[d,u,m]=(0,O.default)(c),g=s?`${c}-${s}`:c;return d(a.createElement(i,Object.assign({className:(0,v.default)(l||g,r,u,m),ref:t},n)))}),C=a.forwardRef((e,t)=>{let{direction:l}=a.useContext(j.ConfigContext),[s,r]=a.useState([]),{prefixCls:i,className:n,rootClassName:o,children:c,hasSider:d,tagName:u,style:m}=e,g=L(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),h=(0,b.default)(g,["suffixCls"]),{getPrefixCls:x,className:f,style:p}=(0,j.useComponentConfig)("layout"),_=x("layout",i),z="boolean"==typeof d?d:!!s.length||(0,N.default)(c).some(e=>e.type===k.default),[C,S,M]=(0,O.default)(_),H=(0,v.default)(_,{[`${_}-has-sider`]:z,[`${_}-rtl`]:"rtl"===l},f,n,o,S,M),E=a.useMemo(()=>({siderHook:{addSider:e=>{r(t=>[].concat((0,y.default)(t),[e]))},removeSider:e=>{r(t=>t.filter(t=>t!==e))}}}),[]);return C(a.createElement(w.LayoutContext.Provider,{value:E},a.createElement(u,Object.assign({ref:t,className:H,style:Object.assign(Object.assign({},p),m)},h),c)))}),S=_({tagName:"div",displayName:"Layout"})(C),M=_({suffixCls:"header",tagName:"header",displayName:"Header"})(z),H=_({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(z),E=_({suffixCls:"content",tagName:"main",displayName:"Content"})(z);S.Header=M,S.Footer=H,S.Content=E,S.Sider=k.default,S._InternalSiderContext=k.SiderContext,e.s(["Layout",0,S],372943);var V=e.i(60699);e.s(["Menu",()=>V.default],899268);var B=e.i(475254);let R=(0,B.default)("calendar",[["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"}]]);e.s(["Calendar",()=>R],87316);var P=e.i(399219);e.s(["ChevronUp",()=>P.default],655900);let T=(0,B.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>T],299023);let A=(0,B.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>A],25652);let U=(0,B.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["UserCheck",()=>U],882293)},761911,98740,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>t],98740),e.s(["Users",()=>t],761911)},111672,e=>{"use strict";var t=e.i(247167),a=e.i(843476),l=e.i(109799),s=e.i(785242),r=e.i(135214),i=e.i(218129),n=e.i(362133),o=e.i(477189),c=e.i(457202),d=e.i(299251),u=e.i(153702),m=e.i(439061),g=e.i(182399),h=e.i(234779),x=e.i(374615),f=e.i(210612),p=e.i(19732),y=e.i(872934),v=e.i(993914),b=e.i(330995),j=e.i(438957),w=e.i(777579),N=e.i(788191),k=e.i(983561),O=e.i(602073),L=e.i(928685),_=e.i(313603),z=e.i(232164),C=e.i(645526),S=e.i(366308),M=e.i(771674),H=e.i(592143),E=e.i(372943),V=e.i(899268),B=e.i(271645),R=e.i(708347),P=e.i(844444),T=e.i(371401);e.i(389083);var A=e.i(878894),U=e.i(87316);e.i(664659),e.i(655900);var $=e.i(531278),I=e.i(299023),D=e.i(25652),K=e.i(882293),F=e.i(761911),W=e.i(764205);let G=(...e)=>e.filter(Boolean).join(" ");function q({accessToken:e,width:t=220}){let l=(0,T.useDisableUsageIndicator)(),[s,r]=(0,B.useState)(!1),[i,n]=(0,B.useState)(!1),[o,c]=(0,B.useState)(null),[d,u]=(0,B.useState)(null),[m,g]=(0,B.useState)(!1),[h,x]=(0,B.useState)(null);(0,B.useEffect)(()=>{(async()=>{if(e){g(!0),x(null);try{let[t,a]=await Promise.all([(0,W.getRemainingUsers)(e),(0,W.getLicenseInfo)(e).catch(()=>null)]);c(t),u(a)}catch(e){console.error("Failed to fetch usage data:",e),x("Failed to load usage data")}finally{g(!1)}}})()},[e]);let f=d?.expiration_date?(e=>{if(!e)return null;let t=new Date(e+"T00:00:00Z"),a=new Date;return a.setHours(0,0,0,0),Math.ceil((t.getTime()-a.getTime())/864e5)})(d.expiration_date):null,p=null!==f&&f<0,y=null!==f&&f>=0&&f<30,{isOverLimit:v,isNearLimit:b,usagePercentage:j,userMetrics:w,teamMetrics:N}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let t=e.total_users?e.total_users_used/e.total_users*100:0,a=t>100,l=t>=80&&t<=100,s=e.total_teams?e.total_teams_used/e.total_teams*100:0,r=s>100,i=s>=80&&s<=100,n=a||r;return{isOverLimit:n,isNearLimit:(l||i)&&!n,usagePercentage:Math.max(t,s),userMetrics:{isOverLimit:a,isNearLimit:l,usagePercentage:t},teamMetrics:{isOverLimit:r,isNearLimit:i,usagePercentage:s}}})(o),k=v||b||p||y,O=v||p,L=(b||y)&&!O;return l||!e||o?.total_users===null&&o?.total_teams===null?null:(0,a.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:`${Math.min(t,220)}px`},children:(0,a.jsx)(()=>i?(0,a.jsx)("button",{onClick:()=>n(!1),className:G("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),k&&(0,a.jsx)("span",{className:"flex-shrink-0",children:O?(0,a.jsx)(A.AlertTriangle,{className:"h-3 w-3"}):L?(0,a.jsx)(D.TrendingUp,{className:"h-3 w-3"}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[o&&null!==o.total_users&&(0,a.jsxs)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",w.isOverLimit&&"bg-red-50 text-red-700 border-red-200",w.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!w.isOverLimit&&!w.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",o.total_users_used,"/",o.total_users]}),o&&null!==o.total_teams&&(0,a.jsxs)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",o.total_teams_used,"/",o.total_teams]}),d?.expiration_date&&null!==f&&(0,a.jsx)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",p&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!p&&!y&&"bg-gray-50 text-gray-700 border-gray-200"),children:f<0?"Exp!":`${f}d`}),!o||null===o.total_users&&null===o.total_teams&&!d&&(0,a.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):m?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,a.jsx)($.Loader2,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):h||!o?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:h||"No data"})}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]})}):(0,a.jsxs)("div",{className:G("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[d?.has_license&&d.expiration_date&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",p&&"border-red-200 bg-red-50",y&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(U.Calendar,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"License"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",p&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!p&&!y&&"bg-gray-50 text-gray-600 border-gray-200"),children:p?"Expired":y?"Expiring soon":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Status:"}),(0,a.jsx)("span",{className:G("font-medium text-right",p&&"text-red-600",y&&"text-yellow-600"),children:(e=>{if(null===e)return"No expiration";if(e<0)return"Expired";if(0===e)return"Expires today";if(1===e)return"1 day remaining";if(e<30)return`${e} days remaining`;if(e<60)return"1 month remaining";let t=Math.floor(e/30);return`${t} months remaining`})(f)})]}),d.license_type&&(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Type:"}),(0,a.jsx)("span",{className:"font-medium text-right capitalize",children:d.license_type})]})]}),null!==o.total_users&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",w.isOverLimit&&"border-red-200 bg-red-50",w.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(F.Users,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Users"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",w.isOverLimit&&"bg-red-50 text-red-700 border-red-200",w.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!w.isOverLimit&&!w.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:w.isOverLimit?"Over limit":w.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_users_used,"/",o.total_users]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:G("font-medium text-right",w.isOverLimit&&"text-red-600",w.isNearLimit&&"text-yellow-600"),children:o.total_users_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(w.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:G("h-2 rounded-full transition-all duration-300",w.isOverLimit&&"bg-red-500",w.isNearLimit&&"bg-yellow-500",!w.isOverLimit&&!w.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(w.usagePercentage,100)}%`}})})]}),null!==o.total_teams&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(K.UserCheck,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Teams"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_teams_used,"/",o.total_teams]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:G("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:o.total_teams_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:G("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(N.usagePercentage,100)}%`}})})]})]})]}),{})})}let{Sider:Y}=E.Layout,X={"api-reference":"api-reference"},Z=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,a.jsx)(j.KeyOutlined,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,a.jsx)(N.PlayCircleOutlined,{}),roles:R.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:R.rolesWithWriteAccess},{key:"agentic",page:"agentic",label:"Agentic",icon:(0,a.jsx)(k.RobotOutlined,{}),children:[{key:"agents",page:"agents",label:"Agents",icon:(0,a.jsx)(k.RobotOutlined,{}),roles:R.rolesWithWriteAccess},{key:"workflows",page:"workflows",label:"Workflow Runs",icon:(0,a.jsx)(n.ApartmentOutlined,{})},{key:"memory",page:"memory",label:"Memory",icon:(0,a.jsx)(h.BookOutlined,{})}]},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,a.jsx)(S.ToolOutlined,{})},{key:"skills",page:"skills",label:"Skills",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:R.all_admin_roles},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,a.jsx)(O.SafetyOutlined,{})},{key:"policies",page:"policies",label:(0,a.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,a.jsx)(c.AuditOutlined,{}),roles:R.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,a.jsx)(S.ToolOutlined,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,a.jsx)(L.SearchOutlined,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,a.jsx)(f.DatabaseOutlined,{})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,a.jsx)(O.SafetyOutlined,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,a.jsx)(u.BarChartOutlined,{}),roles:[...R.all_admin_roles,...R.internalUserRoles],label:"Usage"},{key:"logs",page:"logs",label:"Logs",icon:(0,a.jsx)(w.LineChartOutlined,{})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,a.jsx)(O.SafetyOutlined,{}),roles:[...R.all_admin_roles,...R.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,a.jsx)(C.TeamOutlined,{})},{key:"projects",page:"projects",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,a.jsx)(P.default,{})]}),icon:(0,a.jsx)(b.FolderOutlined,{}),roles:R.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,a.jsx)(M.UserOutlined,{}),roles:R.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,a.jsx)(d.BankOutlined,{}),roles:R.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:R.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,a.jsx)(x.CreditCardOutlined,{}),roles:R.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api-reference",page:"api-reference",label:"API Reference",icon:(0,a.jsx)(i.ApiOutlined,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,a.jsx)(o.AppstoreOutlined,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,a.jsx)(h.BookOutlined,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,a.jsx)(p.ExperimentOutlined,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,a.jsx)(f.DatabaseOutlined,{}),roles:R.all_admin_roles},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,a.jsx)(v.FileTextOutlined,{}),roles:R.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:[...R.all_admin_roles,...R.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,a.jsx)(z.TagsOutlined,{}),roles:R.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,a.jsx)(u.BarChartOutlined,{})}]}]},{groupLabel:"SETTINGS",roles:R.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,a.jsx)(P.default,{})]}),icon:(0,a.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,a.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,a.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings ",(0,a.jsx)(P.default,{dot:!0,children:(0,a.jsx)("span",{})})]}),icon:(0,a.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,a.jsx)(u.BarChartOutlined,{}),roles:R.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,a.jsx)(m.BgColorsOutlined,{}),roles:R.all_admin_roles}]}]}];e.s(["default",0,({setPage:e,defaultSelectedKey:i,collapsed:n=!1,enabledPagesInternalUsers:o,enableProjectsUI:c,disableAgentsForInternalUsers:d,allowAgentsForTeamAdmins:u,disableVectorStoresForInternalUsers:m,allowVectorStoresForTeamAdmins:g})=>{let h,{userId:x,accessToken:f,userRole:p}=(0,r.default)(),{data:v}=(0,l.useOrganizations)(),{data:b}=(0,s.useTeams)(),j=(0,B.useMemo)(()=>!!x&&!!v&&v.some(e=>e.members?.some(e=>e.user_id===x&&"org_admin"===e.user_role)),[x,v]),w=(0,B.useMemo)(()=>(0,R.isUserTeamAdminForAnyTeam)(b??null,x??""),[b,x]),N=t=>{if(X[t])return void e(t);let a=new URLSearchParams(window.location.search);a.set("page",t),window.history.pushState(null,"",`?${a.toString()}`),e(t)},k=(e,l,s)=>{let r;if(s)return(0,a.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{color:"inherit",textDecoration:"none"},children:[e," ",(0,a.jsx)(y.ExportOutlined,{style:{fontSize:10,marginLeft:4}})]});let i=X[l],n=i?function(e){let a=(t.default.env.NEXT_PUBLIC_BASE_URL??"").replace(/^\/+|\/+$/g,""),l=a?`/${a}/`:"/";if(W.serverRootPath&&"/"!==W.serverRootPath){let e=W.serverRootPath.replace(/\/+$/,""),t=l.replace(/^\/+/,"");l=`${e}/${t}`}return`${l}${e}`}(i):((r=new URLSearchParams(window.location.search)).set("page",l),`?${r.toString()}`);return(0,a.jsx)("a",{href:n,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button?e.stopPropagation():e.preventDefault()},style:{color:"inherit",textDecoration:"none"},children:e})},O=e=>{let t=(0,R.isAdminRole)(p);return null!=o&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:p,isAdmin:t,enabledPagesInternalUsers:o}),e.map(e=>({...e,children:e.children?O(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key){if(!(!e.roles||e.roles.includes(p)||j))return!1;if(!t&&null!=o){let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0}if("projects"===e.key&&!c||!t&&"agents"===e.key&&d&&!(u&&w)||!t&&"vector-stores"===e.key&&m&&!(g&&w)||e.roles&&!e.roles.includes(p))return!1;if(!t&&null!=o){if(e.children&&e.children.length>0&&e.children.some(e=>o.includes(e.page)))return console.log(`[LeftNav] Parent "${e.page}" (${e.key}): VISIBLE (has visible children)`),!0;let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0})},L=(e=>{for(let t of Z)for(let a of t.items){if(a.page===e)return a.key;if(a.children){let t=a.children.find(t=>t.page===e);if(t)return t.key}}return"api-keys"})(i);return(0,a.jsx)(E.Layout,{children:(0,a.jsxs)(Y,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,a.jsx)(H.ConfigProvider,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,a.jsx)(V.Menu,{mode:"inline",selectedKeys:[L],defaultOpenKeys:[],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(h=[],Z.forEach(e=>{if(e.roles&&!e.roles.includes(p))return;let t=O(e.items);0!==t.length&&h.push({type:"group",label:n?null:(0,a.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:e.groupLabel}),children:t.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),children:e.children?.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):N(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):N(e.page)}}))})}),h)})}),(0,R.isAdminRole)(p)&&!n&&(0,a.jsx)(q,{accessToken:f,width:220})]})})},"menuGroups",()=>Z],111672)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/cc5fe661d375c3b5.js b/litellm/proxy/_experimental/out/_next/static/chunks/cc5fe661d375c3b5.js new file mode 100644 index 0000000000..f00c4131fc --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/cc5fe661d375c3b5.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,738014,e=>{"use strict";var l=e.i(135214),t=e.i(764205),a=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:n}=(0,l.default)();return(0,a.useQuery)({queryKey:r.detail(n),queryFn:async()=>await (0,t.userGetInfoV2)(e),enabled:!!(e&&n)})}])},625901,e=>{"use strict";var l=e.i(266027),t=e.i(621482),a=e.i(243652),r=e.i(764205),n=e.i(135214);let i=(0,a.createQueryKeys)("models"),s=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let d=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:t,userRole:a}=(0,n.default)();return(0,l.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,r.modelAvailableCall)(e,t,a,!0,null,!0,!1,"expand"),enabled:!!(e&&t&&a)})},"useInfiniteModelInfo",0,(e=50,l)=>{let{accessToken:a,userId:i,userRole:s}=(0,n.default)();return(0,t.useInfiniteQuery)({queryKey:d.list({filters:{...i&&{userId:i},...s&&{userRole:s},size:e,...l&&{search:l}}}),queryFn:async({pageParam:t})=>await (0,r.modelInfoCall)(a,i,s,t,e,l),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,n.default)();return(0,l.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,r.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,t=50,a,s,o,d,c)=>{let{accessToken:u,userId:m,userRole:p}=(0,n.default)();return(0,l.useQuery)({queryKey:i.list({filters:{...m&&{userId:m},...p&&{userRole:p},page:e,size:t,...a&&{search:a},...s&&{modelId:s},...o&&{teamId:o},...d&&{sortBy:d},...c&&{sortOrder:c}}}),queryFn:async()=>await (0,r.modelInfoCall)(u,m,p,e,t,a,s,o,d,c),enabled:!!(u&&m&&p)})}])},907308,e=>{"use strict";var l=e.i(843476),t=e.i(271645),a=e.i(212931),r=e.i(808613),n=e.i(464571),i=e.i(199133),s=e.i(592968),o=e.i(213205),d=e.i(374009),c=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:u,onSubmit:m,accessToken:p,title:h="Add Team Member",roles:f=[{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:g="user",teamId:y})=>{let[x]=r.Form.useForm(),[b,v]=(0,t.useState)([]),[j,w]=(0,t.useState)(!1),[C,O]=(0,t.useState)("user_email"),[S,_]=(0,t.useState)(!1),k=async(e,l)=>{if(!e)return void v([]);w(!0);try{let t=new URLSearchParams;if(t.append(l,e),y&&t.append("team_id",y),null==p)return;let a=(await (0,c.userFilterUICall)(p,t)).map(e=>({label:"user_email"===l?`${e.user_email}`:`${e.user_id}`,value:"user_email"===l?e.user_email:e.user_id,user:e}));v(a)}catch(e){console.error("Error fetching users:",e)}finally{w(!1)}},I=(0,t.useCallback)((0,d.default)((e,l)=>k(e,l),300),[]),N=(e,l)=>{O(l),I(e,l)},E=(e,l)=>{let t=l.user;x.setFieldsValue({user_email:t.user_email,user_id:t.user_id,role:x.getFieldValue("role")})},M=async e=>{_(!0);try{await m(e)}finally{_(!1)}};return(0,l.jsx)(a.Modal,{title:h,open:e,onCancel:()=>{x.resetFields(),v([]),u()},footer:null,width:800,maskClosable:!S,children:(0,l.jsxs)(r.Form,{form:x,onFinish:M,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:g},children:[(0,l.jsx)(r.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,l.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>N(e,"user_email"),onSelect:(e,l)=>E(e,l),options:"user_email"===C?b:[],loading:j,allowClear:!0,"data-testid":"member-email-search"})}),(0,l.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,l.jsx)(r.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,l.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>N(e,"user_id"),onSelect:(e,l)=>E(e,l),options:"user_id"===C?b:[],loading:j,allowClear:!0})}),(0,l.jsx)(r.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,l.jsx)(i.Select,{defaultValue:g,children:f.map(e=>(0,l.jsx)(i.Select.Option,{value:e.value,children:(0,l.jsxs)(s.Tooltip,{title:e.description,children:[(0,l.jsx)("span",{className:"font-medium",children:e.label}),(0,l.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,l.jsx)("div",{className:"text-right mt-4",children:(0,l.jsx)(n.Button,{type:"primary",htmlType:"submit",icon:(0,l.jsx)(o.UserAddOutlined,{}),loading:S,children:S?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var l=e.i(843476),t=e.i(625901),a=e.i(109799),r=e.i(785242),n=e.i(738014),i=e.i(199133),s=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:l,options:t})=>l&&t?.includeUserModels?l:[],team:({allProxyModels:e,selectedOrganization:l,userModels:t})=>l?l.models.includes(d.value)||0===l.models.length?e:e.filter(e=>l.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:p,organizationID:h,options:f,context:g,dataTestId:y,value:x=[],onChange:b,style:v}=e,{includeUserModels:j,showAllTeamModelsOption:w,showAllProxyModelsOverride:C,includeSpecialOptions:O}=f||{},{data:S,isLoading:_}=(0,t.useAllProxyModels)(),{data:k,isLoading:I}=(0,r.useTeam)(p),{data:N,isLoading:E}=(0,a.useOrganization)(h),{data:M,isLoading:A}=(0,n.useCurrentUser)(),F=e=>u.some(l=>l.value===e),P=x.some(F),T=N?.models.includes(d.value)||N?.models.length===0;if(_||I||E||A)return(0,l.jsx)(s.Skeleton.Input,{active:!0,block:!0});let{wildcard:$,regular:z}=(e=>{let l=[],t=[];for(let a of e)a.endsWith("/*")?l.push(a):t.push(a);return{wildcard:l,regular:t}})(((e,l,t)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(l.options?.showAllProxyModelsOverride)return a;let r=m[l.context];return r?r({allProxyModels:a,...t,options:l.options}):[]})(S?.data??[],e,{selectedTeam:k,selectedOrganization:N,userModels:M?.models}));return(0,l.jsx)(i.Select,{"data-testid":y,value:x,onChange:e=>{let l=e.filter(F);b(l.length>0?[l[l.length-1]]:e)},style:v,options:[O?{label:(0,l.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...C||T&&O||"global"===g?[{label:(0,l.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:x.length>0&&x.some(e=>F(e)&&e!==d.value),key:d.value}]:[],{label:(0,l.jsx)("span",{children:"No Default Models"}),value:c.value,disabled:x.length>0&&x.some(e=>F(e)&&e!==c.value),key:c.value}]}:[],...$.length>0?[{label:(0,l.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:$.map(e=>{let t=e.replace("/*",""),a=t.charAt(0).toUpperCase()+t.slice(1);return{label:(0,l.jsx)("span",{children:`All ${a} models`}),value:e,disabled:P}})}]:[],{label:(0,l.jsx)("span",{children:"Models"}),title:"Models",options:z.map(e=>({label:(0,l.jsx)("span",{children:e}),value:e,disabled:P}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,l.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,l.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},276173,e=>{"use strict";var l=e.i(843476),t=e.i(599724),a=e.i(779241),r=e.i(464571),n=e.i(808613),i=e.i(212931),s=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:c,onSubmit:u,initialData:m,mode:p,config:h})=>{let f,[g]=n.Form.useForm(),[y,x]=(0,o.useState)(!1);console.log("Initial Data:",m),(0,o.useEffect)(()=>{if(e)if("edit"===p&&m){let e={...m,role:m.role||h.defaultRole,max_budget_in_team:m.max_budget_in_team||null,tpm_limit:m.tpm_limit||null,rpm_limit:m.rpm_limit||null,allowed_models:m.allowed_models||[]};console.log("Setting form values:",e),g.setFieldsValue(e)}else g.resetFields(),g.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,m,p,g,h.defaultRole,h.roleOptions]);let b=async e=>{try{x(!0);let l=Object.entries(e).reduce((e,[l,t])=>{if("string"==typeof t){let a=t.trim();return""===a&&("max_budget_in_team"===l||"tpm_limit"===l||"rpm_limit"===l)?{...e,[l]:null}:{...e,[l]:a}}return{...e,[l]:t}},{});console.log("Submitting form data:",l),await Promise.resolve(u(l)),g.resetFields()}catch(e){console.error("Form submission error:",e)}finally{x(!1)}};return(0,l.jsx)(i.Modal,{title:h.title||("add"===p?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:c,children:(0,l.jsxs)(n.Form,{form:g,onFinish:b,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.showEmail&&(0,l.jsx)(n.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,l.jsx)(a.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,l.jsx)("div",{className:"text-center mb-4",children:(0,l.jsx)(t.Text,{children:"OR"})}),h.showUserId&&(0,l.jsx)(n.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,l.jsx)(a.TextInput,{placeholder:"user_123"})}),(0,l.jsx)(n.Form.Item,{label:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{children:"Role"}),"edit"===p&&m&&(0,l.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(f=m.role,h.roleOptions.find(e=>e.value===f)?.label||f),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,l.jsx)(s.Select,{children:"edit"===p&&m?[...h.roleOptions.filter(e=>e.value===m.role),...h.roleOptions.filter(e=>e.value!==m.role)].map(e=>(0,l.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,l.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value))})}),h.additionalFields?.map(e=>(0,l.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,l.jsx)(a.TextInput,{placeholder:e.placeholder});case"numerical":return(0,l.jsx)(d.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,l.jsx)(s.Select,{children:e.options?.map(e=>(0,l.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value))});case"multi-select":return(0,l.jsx)(s.Select,{mode:"multiple",placeholder:e.placeholder||"Select options",options:e.options,allowClear:!0});default:return null}})(e)},e.name)),(0,l.jsxs)("div",{className:"text-right mt-6",children:[(0,l.jsx)(r.Button,{onClick:c,className:"mr-2",disabled:y,children:"Cancel"}),(0,l.jsx)(r.Button,{type:"default",htmlType:"submit",loading:y,children:"add"===p?y?"Adding...":"Add Member":y?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var l=e.i(843476),t=e.i(100486),a=e.i(827252),r=e.i(213205),n=e.i(771674),i=e.i(464571),s=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:p}=u.Typography;function h({members:e,canEdit:u,onEdit:h,onDelete:f,onAddMember:g,roleColumnTitle:y="Role",roleTooltip:x,extraColumns:b=[],showDeleteForMember:v,emptyText:j}){let w=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,l.jsx)(p,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,l.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,l.jsx)(p,{children:e||"-"})},{title:x?(0,l.jsxs)(s.Space,{direction:"horizontal",children:[y,(0,l.jsx)(c.Tooltip,{title:x,children:(0,l.jsx)(a.InfoCircleOutlined,{})})]}):y,dataIndex:"role",key:"role",render:e=>(0,l.jsxs)(s.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,l.jsx)(t.CrownOutlined,{}):(0,l.jsx)(n.UserOutlined,{}),(0,l.jsx)(p,{style:{textTransform:"capitalize"},children:e||"-"})]})},...b,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,t)=>u?(0,l.jsxs)(s.Space,{children:[(0,l.jsx)(m.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(t)}),(!v||v(t))&&(0,l.jsx)(m.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>f(t)})]}):null}];return(0,l.jsxs)(s.Space,{direction:"vertical",style:{width:"100%"},children:[(0,l.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,l.jsx)(o.Table,{columns:w,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:j?{emptyText:j}:void 0}),g&&u&&(0,l.jsx)(i.Button,{icon:(0,l.jsx)(r.UserAddOutlined,{}),type:"primary",onClick:g,children:"Add Member"})]})}e.s(["default",()=>h])},91979,e=>{"use strict";e.i(247167);var l=e.i(931067),t=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 r=e.i(9583),n=t.forwardRef(function(e,n){return t.createElement(r.default,(0,l.default)({},e,{ref:n,icon:a}))});e.s(["ReloadOutlined",0,n],91979)},969550,e=>{"use strict";var l=e.i(843476),t=e.i(271645);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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var r=e.i(464571),n=e.i(311451),i=e.i(199133),s=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:d,initialValues:c={},buttonLabel:u="Filters"})=>{let[m,p]=(0,t.useState)(!1),[h,f]=(0,t.useState)(c),[g,y]=(0,t.useState)({}),[x,b]=(0,t.useState)({}),[v,j]=(0,t.useState)({}),[w,C]=(0,t.useState)({}),O=(0,t.useCallback)((0,s.default)(async(e,l)=>{if(l.isSearchable&&l.searchFn){b(e=>({...e,[l.name]:!0}));try{let t=await l.searchFn(e);y(e=>({...e,[l.name]:t}))}catch(e){console.error("Error searching:",e),y(e=>({...e,[l.name]:[]}))}finally{b(e=>({...e,[l.name]:!1}))}}},300),[]),S=(0,t.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!w[e.name]){b(l=>({...l,[e.name]:!0})),C(l=>({...l,[e.name]:!0}));try{let l=await e.searchFn("");y(t=>({...t,[e.name]:l}))}catch(l){console.error("Error loading initial options:",l),y(l=>({...l,[e.name]:[]}))}finally{b(l=>({...l,[e.name]:!1}))}}},[w]);(0,t.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!w[e.name]&&S(e)})},[m,e,S,w]);let _=(e,l)=>{let t={...h,[e]:l};f(t),o(t)};return(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,l.jsx)(r.Button,{icon:(0,l.jsx)(a,{className:"h-4 w-4"}),onClick:()=>p(!m),className:"flex items-center gap-2",children:u}),(0,l.jsx)(r.Button,{onClick:()=>{let l={};e.forEach(e=>{l[e.name]=""}),f(l),d()},children:"Reset Filters"})]}),m&&(0,l.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(t=>{let a,r=e.find(e=>e.label===t||e.name===t);return r?(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)("label",{className:"text-sm text-gray-600",children:r.label||r.name}),r.isSearchable?(0,l.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${r.label||r.name}...`,value:h[r.name]||void 0,onChange:e=>_(r.name,e),onOpenChange:e=>{e&&r.isSearchable&&!w[r.name]&&S(r)},onSearch:e=>{j(l=>({...l,[r.name]:e})),r.searchFn&&O(e,r)},filterOption:!1,loading:x[r.name],options:g[r.name]||[],allowClear:!0,notFoundContent:x[r.name]?"Loading...":"No results found"}):r.options?(0,l.jsx)(i.Select,{className:"w-full",placeholder:`Select ${r.label||r.name}...`,value:h[r.name]||void 0,onChange:e=>_(r.name,e),allowClear:!0,children:r.options.map(e=>(0,l.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):r.customComponent?(a=r.customComponent,(0,l.jsx)(a,{value:h[r.name]||void 0,onChange:e=>_(r.name,e??""),placeholder:`Select ${r.label||r.name}...`,allFilters:h})):(0,l.jsx)(n.Input,{className:"w-full",placeholder:`Enter ${r.label||r.name}...`,value:h[r.name]||"",onChange:e=>_(r.name,e.target.value),allowClear:!0})]},r.name):null})})]})}],969550)},633627,e=>{"use strict";var l=e.i(764205);let t=(e,l,t,a)=>{for(let r of e){let e=r?.key_alias;e&&"string"==typeof e&&l.add(e.trim());let n=r?.organization_id??r?.org_id;n&&"string"==typeof n&&t.add(n.trim());let i=r?.user_id;if(i&&"string"==typeof i){let e=r?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let r=new Set,n=new Set,i=new Map,s=await (0,l.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=s?.keys||[],d=s?.total_pages??1;t(o,r,n,i);let c=Math.min(d,10)-1;if(c>0){let s=Array.from({length:c},(t,r)=>(0,l.keyListCall)(e,null,a,null,null,null,r+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(s)))"fulfilled"===e.status&&t(e.value?.keys||[],r,n,i)}return{keyAliases:Array.from(r).sort(),organizationIds:Array.from(n).sort(),userIds:Array.from(i.entries()).map(([e,l])=>({id:e,email:l}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},r=async(e,t)=>{if(!e)return[];try{let a=[],r=1,n=!0;for(;n;){let i=await (0,l.teamListCall)(e,t||null,null);a=[...a,...i],r{if(!e)return[];try{let t=[],a=1,r=!0;for(;r;){let n=await (0,l.organizationListCall)(e);t=[...t,...n],a{"use strict";var l=e.i(271645);let t=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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,t],94629)},991124,e=>{"use strict";let l=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>l])},678784,678745,e=>{"use strict";let l=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>l],678745),e.s(["CheckIcon",()=>l],678784)},118366,e=>{"use strict";var l=e.i(991124);e.s(["CopyIcon",()=>l.default])},829672,836938,310730,e=>{"use strict";e.i(247167);var l=e.i(271645),t=e.i(343794),a=e.i(914949),r=e.i(404948);let n=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,n],836938);var i=e.i(613541),s=e.i(763731),o=e.i(242064),d=e.i(491816);e.i(793154);var c=e.i(880476),u=e.i(183293),m=e.i(717356),p=e.i(320560),h=e.i(307358),f=e.i(246422),g=e.i(838378),y=e.i(617933);let x=(0,f.genStyleHooks)("Popover",e=>{let{colorBgElevated:l,colorText:t}=e,a=(0,g.mergeToken)(e,{popoverBg:l,popoverColor:t});return[(e=>{let{componentCls:l,popoverColor:t,titleMinWidth:a,fontWeightStrong:r,innerPadding:n,boxShadowSecondary:i,colorTextHeading:s,borderRadiusLG:o,zIndexPopup:d,titleMarginBottom:c,colorBgElevated:m,popoverBg:h,titleBorderBottom:f,innerContentPadding:g,titlePadding:y}=e;return[{[l]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${l}-content`]:{position:"relative"},[`${l}-inner`]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:o,boxShadow:i,padding:n},[`${l}-title`]:{minWidth:a,marginBottom:c,color:s,fontWeight:r,borderBottom:f,padding:y},[`${l}-inner-content`]:{color:t,padding:g}})},(0,p.default)(e,"var(--antd-arrow-background-color)"),{[`${l}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${l}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:l}=e;return{[l]:y.PresetColors.map(t=>{let a=e[`${t}6`];return{[`&${l}-${t}`]:{"--antd-arrow-background-color":a,[`${l}-inner`]:{backgroundColor:a},[`${l}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:l,controlHeight:t,fontHeight:a,padding:r,wireframe:n,zIndexPopupBase:i,borderRadiusLG:s,marginXS:o,lineType:d,colorSplit:c,paddingSM:u}=e,m=t-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:i+30},(0,h.getArrowToken)(e)),(0,p.getArrowOffsetToken)({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:12*!n,titleMarginBottom:n?0:o,titlePadding:n?`${m/2}px ${r}px ${m/2-l}px`:0,titleBorderBottom:n?`${l}px ${d} ${c}`:"none",innerContentPadding:n?`${u}px ${r}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var b=function(e,l){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>l.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rl.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]]);return t};let v=({title:e,content:t,prefixCls:a})=>e||t?l.createElement(l.Fragment,null,e&&l.createElement("div",{className:`${a}-title`},e),t&&l.createElement("div",{className:`${a}-inner-content`},t)):null,j=e=>{let{hashId:a,prefixCls:r,className:i,style:s,placement:o="top",title:d,content:u,children:m}=e,p=n(d),h=n(u),f=(0,t.default)(a,r,`${r}-pure`,`${r}-placement-${o}`,i);return l.createElement("div",{className:f,style:s},l.createElement("div",{className:`${r}-arrow`}),l.createElement(c.Popup,Object.assign({},e,{className:a,prefixCls:r}),m||l.createElement(v,{prefixCls:r,title:p,content:h})))},w=e=>{let{prefixCls:a,className:r}=e,n=b(e,["prefixCls","className"]),{getPrefixCls:i}=l.useContext(o.ConfigContext),s=i("popover",a),[d,c,u]=x(s);return d(l.createElement(j,Object.assign({},n,{prefixCls:s,hashId:c,className:(0,t.default)(r,u)})))};e.s(["Overlay",0,v,"default",0,w],310730);var C=function(e,l){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>l.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rl.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]]);return t};let O=l.forwardRef((e,c)=>{var u,m;let{prefixCls:p,title:h,content:f,overlayClassName:g,placement:y="top",trigger:b="hover",children:j,mouseEnterDelay:w=.1,mouseLeaveDelay:O=.1,onOpenChange:S,overlayStyle:_={},styles:k,classNames:I}=e,N=C(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:M,style:A,classNames:F,styles:P}=(0,o.useComponentConfig)("popover"),T=E("popover",p),[$,z,R]=x(T),U=E(),D=(0,t.default)(g,z,R,M,F.root,null==I?void 0:I.root),L=(0,t.default)(F.body,null==I?void 0:I.body),[B,K]=(0,a.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),V=(e,l)=>{K(e,!0),null==S||S(e,l)},W=n(h),q=n(f);return $(l.createElement(d.default,Object.assign({placement:y,trigger:b,mouseEnterDelay:w,mouseLeaveDelay:O},N,{prefixCls:T,classNames:{root:D,body:L},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},P.root),A),_),null==k?void 0:k.root),body:Object.assign(Object.assign({},P.body),null==k?void 0:k.body)},ref:c,open:B,onOpenChange:e=>{V(e)},overlay:W||q?l.createElement(v,{prefixCls:T,title:W,content:q}):null,transitionName:(0,i.getTransitionName)(U,"zoom-big",N.transitionName),"data-popover-inject":!0}),(0,s.cloneElement)(j,{onKeyDown:e=>{var t,a;(0,l.isValidElement)(j)&&(null==(a=null==j?void 0:(t=j.props).onKeyDown)||a.call(t,e)),e.keyCode===r.default.ESC&&V(!1,e)}})))});O._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,O],829672)},282786,e=>{"use strict";var l=e.i(829672);e.s(["Popover",()=>l.default])},751904,e=>{"use strict";var l=e.i(401361);e.s(["EditOutlined",()=>l.default])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ccda7c12f9795cba.js b/litellm/proxy/_experimental/out/_next/static/chunks/ccda7c12f9795cba.js new file mode 100644 index 0000000000..ecfa8dda1b --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/ccda7c12f9795cba.js @@ -0,0 +1,84 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:P}=n.Select,T=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(P,{value:"BLOCK",children:"Block"}),(0,l.jsx)(P,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,P]=m.default.useState(""),[T,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void P(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}P(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),P("")}).finally(()=>{L(!1)})}else P(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),P(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),T?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:H,Text:q}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(q,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(q,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:P,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,H]=(0,m.useState)(!1),[q,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[X,Z]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>H(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(T,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:P,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:q,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!q)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===q);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:q,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:X,patternRegex:ee,patternAction:ea,onNameChange:Z,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{X&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:X,pattern:ee,action:ea}),H(!1),Z(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{H(!1),Z(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var X=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let Z={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),Z=t,t},et=()=>Object.keys(Z).length>0?Z:X,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge",Xecguard:"xecguard"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,XecGuard:`${en}xecguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",()=>em,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",()=>ec],180766);var eu=e.i(435451);let{Title:ep}=d.Typography,eg=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eu.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ex=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ep,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eg,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var eh=e.i(482725),ef=e.i(850627);let ey=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(eh.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ef.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var ej=e.i(592968),e_=e.i(750113);let eb=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(ej.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(ej.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(ej.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(ej.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(ej.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var ev=e.i(536916),ew=e.i(149192),eN=e.i(741585),eN=eN,eC=e.i(724154);e.i(247167);var eS=e.i(931067);let ek={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eI=e.i(9583),eA=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:ek}))});let{Text:eO}=d.Typography,{Option:eP}=n.Select,eT=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eA,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eO,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eP,{value:e.category,children:e.category},e.category))})]}),eL=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eO,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(ej.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(ew.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eN.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(eC.StopOutlined,{}),children:"Select All & Block"})]})]}),eB=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eO,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eO,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(ev.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eO,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eP,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eN.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(eC.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eF,Text:e$}=d.Typography,eE=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eF,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(e$,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eT,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eL,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(eB,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eM=e.i(304967),eR=e.i(599724),eG=e.i(312361),ez=e.i(21548),eD=e.i(827252);let eK={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eH=({value:e,onChange:t,disabled:a=!1})=>{let r={...eK,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(eR.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eG.Divider,{}),0===r.rules.length?(0,l.jsx)(ez.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eM.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(eR.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eG.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(eR.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(ej.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eq,Text:eJ,Link:eU}=d.Typography,{Option:eW}=n.Select,eV={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,P]=(0,m.useState)([]),[T,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[H,q]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,X]=(0,m.useState)(void 0),[Z,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,ep]=(0,m.useState)(!1),[eg,eh]=(0,m.useState)([]),[ef,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),e_=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),q(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},ew=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eN=(e,t)=>{C(a=>({...a,[e]:t}))},eC=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},eS=()=>{x.resetFields(),j(null),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),X(void 0),en("warn"),ec(""),ep(!1),k(0)},ek=()=>{eS(),t()},eI=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);if(void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=H&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),H&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ef.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ef.rules,r.litellm_params.default_action=ef.default_action,r.litellm_params.on_disallowed_action=ef.on_disallowed_action,ef.violation_message_template&&(r.litellm_params.violation_message_template=ef.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),Z&&"realtime"===W&&(r.litellm_params.on_violation=Z),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),eS(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eA=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:H,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{q(e),U(t)}}):null},eO=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:ek,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:ek,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit"},children:eO.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eW,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eW,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eW,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.pre_call})]})}),(0,l.jsx)(eW,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.during_call})]})}),(0,l.jsx)(eW,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.post_call})]})}),(0,l.jsx)(eW,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!e_&&!ei(y)&&!es(y)&&(0,l.jsx)(ey,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:ew,onActionSelect:eN,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eA("categories");if(es(y))return(0,l.jsx)(eb,{availableModels:eg,form:x});if(!y)return null;if(e_)return(0,l.jsx)(eH,{value:ef,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eA("patterns");return null;case 3:if(ei(y))return eA("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),ep(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>ep(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>X(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:Z===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:ek,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):s=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let n={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:s}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(n));let m=`/guardrails/${d}`,g=await fetch(m,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(n)});if(!g.ok){let e=await g.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tt.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(tr,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(tr,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tr,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(tr,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(tr,{value:"inherit",children:"Use global default"}),(0,l.jsx)(tr,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(tr,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "api_key": "your_aporia_api_key", + "project_name": "your_project_name" +}`})});case"AimSecurity":return(0,l.jsx)(r.Form.Item,{label:"Aim Security Configuration",name:"config",tooltip:"JSON configuration for Aim Security",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "api_key": "your_aim_api_key" +}`})});case"Bedrock":return(0,l.jsx)(r.Form.Item,{label:"Amazon Bedrock Configuration",name:"config",tooltip:"JSON configuration for Amazon Bedrock guardrails",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "guardrail_id": "your_guardrail_id", + "guardrail_version": "your_guardrail_version" +}`})});case"GuardrailsAI":return(0,l.jsx)(r.Form.Item,{label:"Guardrails.ai Configuration",name:"config",tooltip:"JSON configuration for Guardrails.ai",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "api_key": "your_guardrails_api_key", + "guardrail_id": "your_guardrail_id" +}`})});case"LakeraAI":return(0,l.jsx)(r.Form.Item,{label:"Lakera AI Configuration",name:"config",tooltip:"JSON configuration for Lakera AI",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "api_key": "your_lakera_api_key" +}`})});case"PromptInjection":return(0,l.jsx)(r.Form.Item,{label:"Prompt Injection Configuration",name:"config",tooltip:"JSON configuration for prompt injection detection",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "threshold": 0.8 +}`})});default:return(0,l.jsx)(r.Form.Item,{label:"Custom Configuration",name:"config",tooltip:"JSON configuration for your custom guardrail",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ + "key1": "value1", + "key2": "value2" +}`})})}})(),(0,l.jsxs)("div",{className:"flex justify-end space-x-2 mt-4",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:I,loading:h,children:"Update Guardrail"})]})]})})};var ts=((a={}).DB="db",a.CONFIG="config",a);e.s(["default",0,({guardrailsList:e,isLoading:t,onDeleteClick:a,accessToken:r,onGuardrailUpdated:i,isAdmin:s=!1,onGuardrailClick:n})=>{let[o,d]=(0,m.useState)([{id:"created_at",desc:!0}]),[c,u]=(0,m.useState)(!1),[p,g]=(0,m.useState)(null),x=e=>e?new Date(e).toLocaleString():"-",h=[{header:"Guardrail ID",accessorKey:"guardrail_id",cell:e=>(0,l.jsx)(ej.Tooltip,{title:String(e.getValue()||""),children:(0,l.jsx)(e4.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>e.getValue()&&n(e.getValue()),children:e.getValue()?`${String(e.getValue()).slice(0,7)}...`:""})})},{header:"Name",accessorKey:"guardrail_name",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.guardrail_name,children:(0,l.jsx)("span",{className:"text-xs font-medium",children:t.guardrail_name||"-"})})}},{header:"Provider",accessorKey:"litellm_params.guardrail",cell:({row:e})=>{let{logo:t,displayName:a}=ed(e.original.litellm_params.guardrail);return(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,l.jsx)("img",{src:t,alt:`${a} logo`,className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)("span",{className:"text-xs",children:a})]})}},{header:"Mode",accessorKey:"litellm_params.mode",cell:({row:e})=>{let t=e.original;return(0,l.jsx)("span",{className:"text-xs",children:t.litellm_params.mode})}},{header:"Default On",accessorKey:"litellm_params.default_on",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(e7.Badge,{color:t.litellm_params?.default_on?"green":"gray",className:"text-xs font-normal",size:"xs",children:t.litellm_params?.default_on?"Default On":"Default Off"})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.created_at,children:(0,l.jsx)("span",{className:"text-xs",children:x(t.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.updated_at,children:(0,l.jsx)("span",{className:"text-xs",children:x(t.updated_at)})})}},{id:"actions",header:"Actions",cell:({row:e})=>{let t=e.original,r=t.guardrail_definition_location===ts.CONFIG;return(0,l.jsx)("div",{className:"flex space-x-2",children:r?(0,l.jsx)(ej.Tooltip,{title:"Config guardrail cannot be deleted on the dashboard. Please delete it from the config file.",children:(0,l.jsx)(e2.Icon,{"data-testid":"config-delete-icon",icon:e5.TrashIcon,size:"sm",className:"cursor-not-allowed text-gray-400",title:"Config guardrail cannot be deleted on the dashboard. Please delete it from the config file.","aria-label":"Delete guardrail (config)"})}):(0,l.jsx)(ej.Tooltip,{title:"Delete guardrail",children:(0,l.jsx)(e2.Icon,{icon:e5.TrashIcon,size:"sm",onClick:()=>t.guardrail_id&&a(t.guardrail_id,t.guardrail_name||"Unnamed Guardrail"),className:"cursor-pointer hover:text-red-500"})})})}}],f=(0,e9.useReactTable)({data:e,columns:h,state:{sorting:o},onSortingChange:d,getCoreRowModel:(0,te.getCoreRowModel)(),getSortedRowModel:(0,te.getSortedRowModel)(),enableSorting:!0});return(0,l.jsxs)("div",{className:"rounded-lg custom-border relative",children:[(0,l.jsx)("div",{className:"overflow-x-auto",children:(0,l.jsxs)(eY.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,l.jsx)(eZ.TableHead,{children:f.getHeaderGroups().map(e=>(0,l.jsx)(e1.TableRow,{children:e.headers.map(e=>(0,l.jsx)(e0.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,l.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,e9.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,l.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,l.jsx)(e8.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,l.jsx)(e3.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,l.jsx)(e6.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,l.jsx)(eQ.TableBody,{children:t?(0,l.jsx)(e1.TableRow,{children:(0,l.jsx)(eX.TableCell,{colSpan:h.length,className:"h-8 text-center",children:(0,l.jsx)("div",{className:"text-center text-gray-500",children:(0,l.jsx)("p",{children:"Loading..."})})})}):e.length>0?f.getRowModel().rows.map(e=>(0,l.jsx)(e1.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,l.jsx)(eX.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,e9.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,l.jsx)(e1.TableRow,{children:(0,l.jsx)(eX.TableCell,{colSpan:h.length,className:"h-8 text-center",children:(0,l.jsx)("div",{className:"text-center text-gray-500",children:(0,l.jsx)("p",{children:"No guardrails found"})})})})})]})}),p&&(0,l.jsx)(ti,{visible:c,onClose:()=>u(!1),accessToken:r,onSuccess:()=>{u(!1),g(null),i()},guardrailId:p.guardrail_id||"",fullLitellmParams:p.litellm_params,initialValues:{guardrail_name:p.guardrail_name||"",provider:Object.keys(ea).find(e=>ea[e]===p?.litellm_params.guardrail)||"",mode:p.litellm_params.mode,default_on:p.litellm_params.default_on,pii_entities_config:p.litellm_params.pii_entities_config,skip_system_message_choice:ec(p.litellm_params?.skip_system_message_in_guardrail),...p.guardrail_info}})]})}],782719);var tn=e.i(500330),to=e.i(245094),eN=eN,td=e.i(530212),tc=e.i(350967),tm=e.i(197647),tu=e.i(653824),tp=e.i(881073),tg=e.i(404206),tx=e.i(723731),th=e.i(629569),tf=e.i(678784),ty=e.i(118366),tj=e.i(560445);let{Text:t_}=d.Typography,{Option:tb}=n.Select,tv=({categories:e,onActionChange:t,onSeverityChange:a,onRemove:r,readOnly:i=!1})=>{let s=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(e,t)=>(0,l.jsxs)("div",{children:[(0,l.jsx)(t_,{strong:!0,children:e}),e!==t.category&&(0,l.jsx)("div",{children:(0,l.jsx)(t_,{type:"secondary",style:{fontSize:12},children:t.category})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>i?(0,l.jsx)(o.Tag,{color:{high:"red",medium:"orange",low:"yellow"}[e],children:e.toUpperCase()}):(0,l.jsxs)(n.Select,{value:e,onChange:e=>a?.(t.id,e),style:{width:150},size:"small",children:[(0,l.jsx)(tb,{value:"high",children:"High"}),(0,l.jsx)(tb,{value:"medium",children:"Medium"}),(0,l.jsx)(tb,{value:"low",children:"Low"})]})},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>i?(0,l.jsx)(o.Tag,{color:"BLOCK"===e?"red":"blue",children:e}):(0,l.jsxs)(n.Select,{value:e,onChange:e=>t?.(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(tb,{value:"BLOCK",children:"Block"}),(0,l.jsx)(tb,{value:"MASK",children:"Mask"})]})}];return(i||s.push({title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r?.(t.id),children:"Delete"})}),0===e.length)?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No categories configured."}):(0,l.jsx)(I.Table,{dataSource:e,columns:s,rowKey:"id",pagination:!1,size:"small"})},tw=({patterns:e,blockedWords:t,categories:a=[],readOnly:r=!0,onPatternActionChange:i,onPatternRemove:s,onBlockedWordUpdate:n,onBlockedWordRemove:o,onCategoryActionChange:d,onCategorySeverityChange:c,onCategoryRemove:m})=>{if(0===e.length&&0===t.length&&0===a.length)return null;let u=()=>{};return(0,l.jsxs)(l.Fragment,{children:[a.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Content Categories"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[a.length," categories configured"]})]}),(0,l.jsx)(tv,{categories:a,onActionChange:r?void 0:d,onSeverityChange:r?void 0:c,onRemove:r?void 0:m,readOnly:r})]}),e.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Pattern Detection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[e.length," patterns configured"]})]}),(0,l.jsx)(T,{patterns:e,onActionChange:r?u:i||u,onRemove:r?u:s||u})]}),t.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Blocked Keywords"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[t.length," keywords configured"]})]}),(0,l.jsx)(F,{keywords:t,onActionChange:r?u:n||u,onRemove:r?u:o||u})]})]})},{Text:tN}=d.Typography,tC=({guardrailData:e,guardrailSettings:t,isEditing:a,accessToken:r,onDataChange:i,onUnsavedChanges:s})=>{let[n,o]=(0,m.useState)([]),[d,c]=(0,m.useState)([]),[u,p]=(0,m.useState)([]),[g,x]=(0,m.useState)([]),[h,f]=(0,m.useState)([]),[y,j]=(0,m.useState)([]),[_,b]=(0,m.useState)(!1),[v,w]=(0,m.useState)(null),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(null);(0,m.useEffect)(()=>{if(e?.litellm_params?.patterns){let t=e.litellm_params.patterns.map((e,t)=>({id:`pattern-${t}`,type:"prebuilt"===e.pattern_type?"prebuilt":"custom",name:e.pattern_name||e.name,display_name:e.display_name,pattern:e.pattern,action:e.action||"BLOCK"}));o(t),x(t)}else o([]),x([]);if(e?.litellm_params?.blocked_words){let t=e.litellm_params.blocked_words.map((e,t)=>({id:`word-${t}`,keyword:e.keyword,action:e.action||"BLOCK",description:e.description}));c(t),f(t)}else c([]),f([]);if(e?.litellm_params?.categories?.length>0){let a=t?.content_filter_settings?.content_categories?Object.fromEntries(t.content_filter_settings.content_categories.map(e=>[e.name,e])):{},l=e.litellm_params.categories.map((e,t)=>{let l=a[e.category];return{id:`category-${t}`,category:e.category,display_name:l?.display_name??e.category,action:e.action||"BLOCK",severity_threshold:e.severity_threshold||"medium"}});p(l),j(l)}else p([]),j([]);let a=e?.litellm_params?.competitor_intent_config;if(a&&"object"==typeof a){let e=!!(a.brand_self&&Array.isArray(a.brand_self)&&a.brand_self.length>0),t={competitor_intent_type:a.competitor_intent_type??"airline",brand_self:Array.isArray(a.brand_self)?a.brand_self:[],locations:Array.isArray(a.locations)?a.locations:[],competitors:Array.isArray(a.competitors)?a.competitors:[],policy:a.policy??{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:"number"==typeof a.threshold_high?a.threshold_high:.7,threshold_medium:"number"==typeof a.threshold_medium?a.threshold_medium:.45,threshold_low:"number"==typeof a.threshold_low?a.threshold_low:.3};b(e),w(t),C(e),k(t)}else b(!1),w(null),C(!1),k(null)},[e,t?.content_filter_settings?.content_categories]),(0,m.useEffect)(()=>{i&&i(n,d,u,_,v)},[n,d,u,_,v,i]);let I=m.default.useMemo(()=>{let e=JSON.stringify(n)!==JSON.stringify(g),t=JSON.stringify(d)!==JSON.stringify(h),a=JSON.stringify(u)!==JSON.stringify(y),l=_!==N||JSON.stringify(v)!==JSON.stringify(S);return e||t||a||l},[n,d,u,_,v,g,h,y,N,S]);return((0,m.useEffect)(()=>{a&&s&&s(I)},[I,a,s]),e?.litellm_params?.guardrail!=="litellm_content_filter")?null:a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"Content Filter Configuration"}),I&&(0,l.jsx)(tj.Alert,{type:"warning",showIcon:!0,className:"mb-4",message:(0,l.jsx)(tN,{children:'You have unsaved changes to patterns or keywords. Remember to click "Save Changes" at the bottom.'})}),(0,l.jsx)("div",{className:"mb-6",children:t&&t.content_filter_settings&&(0,l.jsx)(Q,{prebuiltPatterns:t.content_filter_settings.prebuilt_patterns||[],categories:t.content_filter_settings.pattern_categories||[],selectedPatterns:n,blockedWords:d,onPatternAdd:e=>o([...n,e]),onPatternRemove:e=>o(n.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>o(n.map(a=>a.id===e?{...a,action:t}:a)),onBlockedWordAdd:e=>c([...d,e]),onBlockedWordRemove:e=>c(d.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>c(d.map(l=>l.id===e?{...l,[t]:a}:l)),onFileUpload:e=>{console.log("File uploaded:",e)},accessToken:r,contentCategories:t.content_filter_settings.content_categories||[],selectedContentCategories:u,onContentCategoryAdd:e=>p([...u,e]),onContentCategoryRemove:e=>p(u.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>p(u.map(l=>l.id===e?{...l,[t]:a}:l)),competitorIntentEnabled:_,competitorIntentConfig:v,onCompetitorIntentChange:(e,t)=>{b(e),w(t)}})})]}):(0,l.jsx)(tw,{patterns:n,blockedWords:d,categories:u,readOnly:!0})};var tS=e.i(788191),tk=e.i(245704),tI=e.i(518617);let tA={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};var tO=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:tA}))}),tP=e.i(987432);let tT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M892 772h-80v-80c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v80h-80c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h80v80c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-80h80c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM373.5 498.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.8-1.7-203.2 89.2-203.2 200 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.8-1.1 6.4-4.8 5.9-8.8zM824 472c0-109.4-87.9-198.3-196.9-200C516.3 270.3 424 361.2 424 472c0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C357 742.6 326 814.8 324 891.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.5C505.8 695.7 563 672 624 672c110.4 0 200-89.5 200-200zm-109.5 90.5C690.3 586.7 658.2 600 624 600s-66.3-13.3-90.5-37.5a127.26 127.26 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-.1 34.2-13.4 66.3-37.6 90.5z"}}]},name:"usergroup-add",theme:"outlined"};var tL=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:tT}))}),tB=e.i(872934);let{Panel:tF}=$.Collapse,{TextArea:t$}=i.Input,tE={empty:{name:"Empty Template",code:`async def apply_guardrail(inputs, request_data, input_type): + # inputs: {texts, images, tools, tool_calls, structured_messages, model} + # request_data: {model, user_id, team_id, end_user_id, metadata} + # input_type: "request" or "response" + return allow()`},blockSSN:{name:"Block SSN",code:`def apply_guardrail(inputs, request_data, input_type): + for text in inputs["texts"]: + if regex_match(text, r"\\d{3}-\\d{2}-\\d{4}"): + return block("SSN detected") + return allow()`},redactEmail:{name:"Redact Emails",code:`def apply_guardrail(inputs, request_data, input_type): + pattern = r"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}" + modified = [] + for text in inputs["texts"]: + modified.append(regex_replace(text, pattern, "[EMAIL REDACTED]")) + return modify(texts=modified)`},blockSQL:{name:"Block SQL Injection",code:`def apply_guardrail(inputs, request_data, input_type): + if input_type != "request": + return allow() + for text in inputs["texts"]: + if contains_code_language(text, ["sql"]): + return block("SQL code not allowed") + return allow()`},validateJSON:{name:"Validate JSON",code:`def apply_guardrail(inputs, request_data, input_type): + if input_type != "response": + return allow() + + schema = {"type": "object", "required": ["name", "value"]} + + for text in inputs["texts"]: + obj = json_parse(text) + if obj is None: + return block("Invalid JSON response") + if not json_schema_valid(obj, schema): + return block("Response missing required fields") + return allow()`},externalAPI:{name:"External API Check (async)",code:`async def apply_guardrail(inputs, request_data, input_type): + # Call an external moderation API (async for non-blocking) + for text in inputs["texts"]: + response = await http_post( + "https://api.example.com/moderate", + body={"text": text, "user_id": request_data["user_id"]}, + headers={"Authorization": "Bearer YOUR_API_KEY"}, + timeout=10 + ) + + if not response["success"]: + # API call failed, allow by default or block + return allow() + + if response["body"].get("flagged"): + return block(response["body"].get("reason", "Content flagged")) + + return allow()`}},tM={"Return Values":[{name:"allow()",desc:"Let request/response through"},{name:"block(reason)",desc:"Reject with message"},{name:"modify(texts=[], images=[], tool_calls=[])",desc:"Transform content"}],"HTTP Requests (async)":[{name:"await http_request(url, method, headers, body)",desc:"Make async HTTP request"},{name:"await http_get(url, headers)",desc:"Async GET request"},{name:"await http_post(url, body, headers)",desc:"Async POST request"}],"Regex Functions":[{name:"regex_match(text, pattern)",desc:"Returns True if pattern found"},{name:"regex_replace(text, pattern, replacement)",desc:"Replace all matches"},{name:"regex_find_all(text, pattern)",desc:"Return list of matches"}],"JSON Functions":[{name:"json_parse(text)",desc:"Parse JSON string, returns None on error"},{name:"json_stringify(obj)",desc:"Convert to JSON string"},{name:"json_schema_valid(obj, schema)",desc:"Validate against JSON schema"}],"URL Functions":[{name:"extract_urls(text)",desc:"Extract all URLs from text"},{name:"is_valid_url(url)",desc:"Check if URL is valid"},{name:"all_urls_valid(text)",desc:"Check all URLs in text are valid"}],"Code Detection":[{name:"detect_code(text)",desc:"Returns True if code detected"},{name:"detect_code_languages(text)",desc:"Returns list of detected languages"},{name:'contains_code_language(text, ["sql"])',desc:"Check for specific languages"}],"Text Utilities":[{name:"contains(text, substring)",desc:"Check if substring exists"},{name:"contains_any(text, [substr1, substr2])",desc:"Check if any substring exists"},{name:"word_count(text)",desc:"Count words"},{name:"char_count(text)",desc:"Count characters"},{name:"lower(text) / upper(text) / trim(text)",desc:"String transforms"}]},tR=[{value:"pre_call",label:"pre_call (Request)"},{value:"post_call",label:"post_call (Response)"},{value:"during_call",label:"during_call (Parallel)"},{value:"logging_only",label:"logging_only"},{value:"pre_mcp_call",label:"pre_mcp_call (Before MCP Tool Call)"},{value:"post_mcp_call",label:"post_mcp_call (After MCP Tool Call)"},{value:"during_mcp_call",label:"during_mcp_call (During MCP Tool Call)"}],tG=({visible:e,onClose:t,onSuccess:a,accessToken:r,editData:i})=>{let o=!!i,[d,c]=(0,m.useState)(""),[g,x]=(0,m.useState)(["pre_call"]),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)("empty"),[_,b]=(0,m.useState)(tE.empty.code),[v,w]=(0,m.useState)(!1),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(!1),I={texts:["Hello, my SSN is 123-45-6789"],images:[],tools:[{type:"function",function:{name:"get_weather",description:"Get the current weather in a location",parameters:{type:"object",properties:{location:{type:"string",description:"City name"}},required:["location"]}}}],tool_calls:[],structured_messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"Hello, my SSN is 123-45-6789"}],model:"gpt-4"},A={texts:["The weather in San Francisco is 72°F and sunny."],images:[],tools:[],tool_calls:[{id:"call_abc123",type:"function",function:{name:"get_weather",arguments:'{"location": "San Francisco"}'}}],structured_messages:[],model:"gpt-4"},O={texts:['Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'],images:[],tools:[{type:"function",function:{name:"read_wiki_structure",description:"Read the structure of a GitHub repository (MCP tool passed as OpenAI tool)",parameters:{type:"object",properties:{repoName:{type:"string",description:"Repository name, e.g. BerriAI/litellm"}},required:["repoName"]}}}],tool_calls:[{id:"call_mcp_001",type:"function",function:{name:"read_wiki_structure",arguments:'{"repoName": "BerriAI/litellm"}'}}],structured_messages:[{role:"user",content:'Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'}],model:"mcp-tool-call"},[P,T]=(0,m.useState)(JSON.stringify(I,null,2)),[L,B]=(0,m.useState)(null),[F,E]=(0,m.useState)(null),M=(0,m.useRef)(null),R=e=>null==e?["pre_call"]:Array.isArray(e)?e.length?e:["pre_call"]:[e];(0,m.useEffect)(()=>{e&&(i?(c(i.guardrail_name||""),x(R(i.litellm_params?.mode)),f(i.litellm_params?.default_on||!1),b(i.litellm_params?.custom_code||tE.empty.code),j("")):(c(""),x(["pre_call"]),f(!1),j("empty"),b(tE.empty.code)),B(null),k(!1))},[e,i]);let G=async e=>{try{await navigator.clipboard.writeText(e),E(e),setTimeout(()=>E(null),2e3)}catch(e){console.error("Failed to copy:",e)}},z=async()=>{if(!d.trim())return void u.default.fromBackend("Please enter a guardrail name");if(!_.trim())return void u.default.fromBackend("Please enter custom code");if(!r)return void u.default.fromBackend("No access token available");w(!0);try{if(o&&i){let e={litellm_params:{custom_code:_}};d!==i.guardrail_name&&(e.guardrail_name=d);let t=R(i.litellm_params?.mode);(g.length!==t.length||g.some((e,a)=>e!==t[a]))&&(e.litellm_params.mode=g),h!==i.litellm_params?.default_on&&(e.litellm_params.default_on=h),await (0,p.updateGuardrailCall)(r,i.guardrail_id,e),u.default.success("Custom code guardrail updated successfully")}else await (0,p.createGuardrailCall)(r,{guardrail_name:d,litellm_params:{guardrail:"custom_code",mode:g,default_on:h,custom_code:_},guardrail_info:{}}),u.default.success("Custom code guardrail created successfully");a(),t()}catch(e){console.error("Failed to save guardrail:",e),u.default.fromBackend(`Failed to ${o?"update":"create"} guardrail: `+(e instanceof Error?e.message:String(e)))}finally{w(!1)}},K=async()=>{if(!r)return void B({error:"No access token available"});C(!0),B(null);try{let e;try{e=JSON.parse(P)}catch(e){B({error:"Invalid test input JSON"}),C(!1);return}e.texts||(e.texts=[]);let t=["pre_call","pre_mcp_call"],a=["post_call","post_mcp_call"],l=g.some(e=>t.includes(e))?"request":g.some(e=>a.includes(e))?"response":"request",i=await (0,p.testCustomCodeGuardrail)(r,{custom_code:_,test_input:e,input_type:l,request_data:{model:"test-model",metadata:{}}});i.success&&i.result?B(i.result):i.error?B({error:i.error,error_type:i.error_type}):B({error:"Unknown error occurred"})}catch(e){console.error("Failed to test custom code:",e),B({error:e instanceof Error?e.message:"Failed to test custom code"})}finally{C(!1)}},H=_.split("\n").length;return(0,l.jsxs)(s.Modal,{open:e,onCancel:t,footer:null,width:1400,className:"custom-code-modal",closable:!0,destroyOnClose:!0,children:[(0,l.jsxs)("div",{className:"flex flex-col h-[80vh]",children:[(0,l.jsxs)("div",{className:"pb-4 border-b border-gray-200",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:o?"Edit Custom Guardrail":"Create Custom Guardrail"}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Define custom logic using Python-like syntax"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-4 py-4 border-b border-gray-100",children:[(0,l.jsxs)("div",{className:"flex-1 max-w-[200px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Guardrail Name"}),(0,l.jsx)(tt.TextInput,{value:d,onValueChange:c,placeholder:"e.g., block-pii-custom"})]}),(0,l.jsxs)("div",{className:"w-[280px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Mode (can select multiple)"}),(0,l.jsx)(n.Select,{mode:"multiple",value:g,onChange:x,options:tR,className:"w-full",size:"middle",placeholder:"Select modes"})]}),(0,l.jsxs)("div",{className:"w-[180px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Template"}),(0,l.jsx)(n.Select,{value:y,onChange:e=>{j(e),b(tE[e].code)},className:"w-full",size:"middle",dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(eG.Divider,{style:{margin:"8px 0"}}),(0,l.jsxs)("div",{style:{padding:"8px 12px",cursor:"pointer",color:"#1890ff",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px"},onClick:e=>{e.preventDefault(),window.open("https://models.litellm.ai/guardrails","_blank")},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f0f0f0"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"},children:[(0,l.jsx)(tL,{}),(0,l.jsx)("span",{children:"Browse Community templates"}),(0,l.jsx)(tB.ExportOutlined,{style:{fontSize:"10px"}})]})]}),children:(0,l.jsx)(n.Select.OptGroup,{label:"STANDARD",children:Object.entries(tE).map(([e,t])=>(0,l.jsx)(n.Select.Option,{value:e,children:t.name},e))})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pt-5",children:[(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Default On"}),(0,l.jsx)(D.Switch,{checked:h,onChange:f})]})]}),(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden mt-4 gap-6",children:[(0,l.jsxs)("div",{className:"flex-[2] flex flex-col min-w-0 overflow-y-auto",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2 flex-shrink-0",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Python Logic"}),(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Restricted environment (no imports)"})]}),(0,l.jsxs)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e] flex-shrink-0",style:{minHeight:"300px",maxHeight:"400px"},children:[(0,l.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-12 bg-[#1e1e1e] border-r border-gray-700 text-right pr-3 pt-3 select-none overflow-hidden",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6"},children:Array.from({length:Math.max(H,20)},(e,t)=>(0,l.jsx)("div",{className:"text-gray-500 h-[22.4px]",children:t+1},t+1))}),(0,l.jsx)("textarea",{ref:M,value:_,onChange:e=>b(e.target.value),onKeyDown:e=>{if("Tab"===e.key){e.preventDefault();let t=e.currentTarget,a=t.selectionStart,l=t.selectionEnd;b(_.substring(0,a)+" "+_.substring(l)),setTimeout(()=>{t.selectionStart=t.selectionEnd=a+4},0)}},spellCheck:!1,className:"w-full h-full pl-14 pr-4 pt-3 pb-3 resize-none focus:outline-none bg-transparent text-gray-200",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6",tabSize:4}})]}),(0,l.jsx)($.Collapse,{activeKey:S?["test"]:[],onChange:e=>k(e.includes("test")),className:"mt-3 bg-white border border-gray-200 rounded-lg flex-shrink-0",expandIcon:({isActive:e})=>(0,l.jsx)(tO,{rotate:90*!!e}),children:(0,l.jsx)(tF,{header:(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,l.jsx)(tS.PlayCircleOutlined,{className:"text-blue-500"}),"Test Your Guardrail"]}),children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600",children:"Test Input (JSON)"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs text-gray-500",children:"Load example:"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(I,null,2)),className:"px-2 py-1 text-xs rounded border border-orange-200 bg-orange-50 text-orange-700 hover:bg-orange-100 transition-colors",children:"Pre-call"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(O,null,2)),className:"px-2 py-1 text-xs rounded border border-purple-200 bg-purple-50 text-purple-700 hover:bg-purple-100 transition-colors",children:"Pre MCP"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(A,null,2)),className:"px-2 py-1 text-xs rounded border border-green-200 bg-green-50 text-green-700 hover:bg-green-100 transition-colors",children:"Post-call"})]})]}),(0,l.jsx)("div",{className:"mb-2 p-2 bg-gray-50 rounded text-xs text-gray-600 border border-gray-200",children:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"texts"}),": Message content (always)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"images"}),": Base64 images (vision)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tools"}),": Tool definitions ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"}),", MCP as OpenAI tool ",(0,l.jsx)("span",{className:"text-purple-600",children:"(pre_mcp_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tool_calls"}),": LLM tool calls ",(0,l.jsx)("span",{className:"text-green-600",children:"(post_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"structured_messages"}),": Full messages ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"model"}),": Model name (always)"]})]})}),(0,l.jsx)(t$,{value:P,onChange:e=>T(e.target.value),rows:8,className:"font-mono text-xs",placeholder:'{"texts": ["test message"], ...}'})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{size:"xs",onClick:K,disabled:N,icon:tS.PlayCircleOutlined,children:N?"Running...":"Run Test"}),L&&(0,l.jsx)("div",{className:`flex items-center gap-2 text-sm ${L.error?"text-red-600":"allow"===L.action?"text-green-600":"block"===L.action?"text-orange-600":"text-blue-600"}`,children:L.error?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{}),(0,l.jsxs)("span",{children:[L.error_type&&(0,l.jsxs)("span",{className:"font-medium",children:["[",L.error_type,"] "]}),L.error]})]}):"allow"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Allowed"]}):"block"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{})," Blocked: ",L.reason]}):"modify"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Modified",L.texts&&L.texts.length>0&&(0,l.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:["→ ",L.texts[0].substring(0,50),L.texts[0].length>50?"...":""]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," ",L.action||"Unknown"]})})]})]})},"test")}),(0,l.jsxs)("div",{className:"mt-3 p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-lg flex items-center justify-between flex-shrink-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"bg-blue-100 rounded-full p-2",children:(0,l.jsx)(tL,{className:"text-blue-600 text-lg"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-gray-900",children:"Built a useful guardrail?"}),(0,l.jsx)("div",{className:"text-xs text-gray-600",children:"Share it with the community and help others build faster"})]})]}),(0,l.jsx)(e4.Button,{size:"xs",onClick:()=>window.open("https://github.com/BerriAI/litellm-guardrails","_blank"),icon:tB.ExportOutlined,className:"bg-blue-600 hover:bg-blue-700 text-white border-0",children:"Contribute Template"})]})]}),(0,l.jsxs)("div",{className:"w-[300px] flex-shrink-0 overflow-auto border-l border-gray-200 pl-6",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)("span",{className:"font-semibold text-gray-700",children:"Available Primitives"})]}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Click to copy functions to clipboard"}),(0,l.jsx)($.Collapse,{defaultActiveKey:["Return Values"],className:"primitives-collapse bg-transparent border-0",expandIconPosition:"end",children:Object.entries(tM).map(([e,t])=>(0,l.jsx)(tF,{header:(0,l.jsx)("span",{className:"text-sm font-medium text-gray-700",children:e}),className:"bg-white mb-2 rounded-lg border border-gray-200",children:(0,l.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,l.jsx)("button",{onClick:()=>G(e.name),className:`w-full text-left px-2 py-2 rounded transition-colors ${F===e.name?"bg-green-100":"bg-gray-50 hover:bg-blue-50"}`,children:F===e.name?(0,l.jsxs)("span",{className:"flex items-center gap-1 text-xs font-mono text-green-700",children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Copied!"]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"text-xs font-mono text-gray-800",children:e.name}),(0,l.jsx)("div",{className:"text-[10px] text-gray-500 mt-0.5",children:e.desc})]})},e.name))})},e))})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-gray-200",children:[(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Changes are auto-saved to local draft"}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:z,loading:v,disabled:v||!d.trim(),icon:tP.SaveOutlined,children:o?"Update Guardrail":"Save Guardrail"})]})]})]}),(0,l.jsx)("style",{children:` + .custom-code-modal .ant-modal-content { + padding: 24px; + } + .custom-code-modal .ant-modal-close { + top: 20px; + right: 20px; + } + .primitives-collapse .ant-collapse-item { + border: none !important; + } + .primitives-collapse .ant-collapse-header { + padding: 8px 12px !important; + } + .primitives-collapse .ant-collapse-content-box { + padding: 8px 12px !important; + } + `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let o,[d,g]=(0,m.useState)(null),[x,h]=(0,m.useState)(null),[f,y]=(0,m.useState)(!0),[j,_]=(0,m.useState)(!1),[b]=r.Form.useForm(),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(null),[I,A]=(0,m.useState)({}),[O,P]=(0,m.useState)(!1),T={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[L,B]=(0,m.useState)(T),[F,$]=(0,m.useState)(!1),[E,M]=(0,m.useState)(!1),R=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),G=(0,m.useCallback)((e,t,a,l,r)=>{R.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(y(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(g(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(w([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),w(t),C(a)}}else w([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{y(!1)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);h(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},K=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);k(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{D()},[a]),(0,m.useEffect)(()=>{z(),K()},[e,a]),(0,m.useEffect)(()=>{if(d&&b){let e={...d.litellm_params||{}};delete e.skip_system_message_in_guardrail,b.setFieldsValue({guardrail_name:d.guardrail_name,...e,skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}})}},[d,x,b]);let H=(0,m.useCallback)(()=>{d?.litellm_params?.guardrail==="tool_permission"?B({rules:d.litellm_params?.rules||[],default_action:(d.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:d.litellm_params?.violation_message_template||""}):B(T),$(!1)},[d]);(0,m.useEffect)(()=>{H()},[H]);let q=async t=>{try{if(!a)return;let o={litellm_params:{}};t.guardrail_name!==d.guardrail_name&&(o.guardrail_name=t.guardrail_name),t.default_on!==d.litellm_params?.default_on&&(o.litellm_params.default_on=t.default_on);let c=ec(d.litellm_params?.skip_system_message_in_guardrail),m=t.skip_system_message_choice;void 0!==m&&m!==c&&("inherit"===m?o.litellm_params.skip_system_message_in_guardrail=null:"yes"===m?o.litellm_params.skip_system_message_in_guardrail=!0:o.litellm_params.skip_system_message_in_guardrail=!1);let g=d.guardrail_info,h=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(g)!==JSON.stringify(h)&&(o.guardrail_info=h);let f=d.litellm_params?.pii_entities_config||{},y={};if(v.forEach(e=>{y[e]=N[e]||"MASK"}),JSON.stringify(f)!==JSON.stringify(y)&&(o.litellm_params.pii_entities_config=y),d.litellm_params?.guardrail==="litellm_content_filter"&&O){var l,r,i,s,n;let e,t=(l=R.current.patterns||[],r=R.current.blockedWords||[],i=R.current.categories||[],s=R.current.competitorIntentEnabled,n=R.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);o.litellm_params.patterns=t.patterns,o.litellm_params.blocked_words=t.blocked_words,o.litellm_params.categories=t.categories,o.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(d.litellm_params?.guardrail==="tool_permission"){let e=d.litellm_params?.rules||[],t=L.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(d.litellm_params?.default_action||"deny").toLowerCase(),r=(L.default_action||"deny").toLowerCase(),i=l!==r,s=(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(L.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=d.litellm_params?.violation_message_template||"",u=L.violation_message_template||"",p=m!==u;(F||a||i||c||p)&&(o.litellm_params.rules=t,o.litellm_params.default_action=r,o.litellm_params.on_disallowed_action=n,o.litellm_params.violation_message_template=u||null)}let j=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",j);let b=d.litellm_params?.guardrail==="tool_permission";if(x&&j&&!b){let e=x[ea[j]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=d.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?o.litellm_params[e]=a:null!=l&&""!==l&&(o.litellm_params[e]=null))})}if(0===Object.keys(o.litellm_params).length&&delete o.litellm_params,0===Object.keys(o).length){u.default.info("No changes detected"),_(!1);return}await (0,p.updateGuardrailCall)(a,e,o),u.default.success("Guardrail updated successfully"),P(!1),z(),_(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(f)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let J=e=>e?new Date(e).toLocaleString():"-",{logo:U,displayName:W}=ed(d.litellm_params?.guardrail||""),V=async(e,t)=>{await (0,tn.copyToClipboard)(e)&&(A(e=>({...e,[t]:!0})),setTimeout(()=>{A(e=>({...e,[t]:!1}))},2e3))},Y="config"===d.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(td.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(th.Title,{children:d.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eR.Text,{className:"text-gray-500 font-mono",children:d.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:I["guardrail-id"]?(0,l.jsx)(tf.CheckIcon,{size:12}):(0,l.jsx)(ty.CopyIcon,{size:12}),onClick:()=>V(d.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${I["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tu.TabGroup,{children:[(0,l.jsxs)(tp.TabList,{className:"mb-4",children:[(0,l.jsx)(tm.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(tm.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tx.TabPanels,{children:[(0,l.jsxs)(tg.TabPanel,{children:[(0,l.jsxs)(tc.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[U&&(0,l.jsx)("img",{src:U,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(th.Title,{children:W})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:d.litellm_params?.mode||"-"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:J(d.created_at)}),(0,l.jsxs)(eR.Text,{children:["Last Updated: ",J(d.updated_at)]})]})]})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsx)(eR.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(d.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eR.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(eN.default,{}):(0,l.jsx)(eC.StopOutlined,{}),String(t)]})})]},e))})]})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsx)(eH,{value:L,disabled:!0})}),d.litellm_params?.guardrail==="custom_code"&&d.litellm_params?.custom_code&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eR.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!Y&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:d.litellm_params.custom_code})})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(tg.TabPanel,{children:(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(th.Title,{children:"Guardrail Settings"}),Y&&(0,l.jsx)(ej.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})}),!j&&!Y&&(d.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>_(!0),children:"Edit Settings"}))]}),j?(0,l.jsxs)(r.Form,{form:b,onFinish:q,initialValues:{guardrail_name:d.guardrail_name,...(o={...d.litellm_params||{}},delete o.skip_system_message_in_guardrail,o),skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{label:"Skip system messages in guardrail",name:"skip_system_message_choice",tooltip:"Unified guardrails: omit role: system from guardrail input (LLM still gets full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),d.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:S&&(0,l.jsx)(eE,{entities:S.supported_entities,actions:S.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:S.pii_entity_categories})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!0,accessToken:a,onDataChange:G,onUnsavedChanges:P}),(d.litellm_params?.guardrail==="tool_permission"||x)&&(0,l.jsx)(eG.Divider,{orientation:"left",children:"Provider Settings"}),d.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eH,{value:L,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ey,{selectedProvider:Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail)||null,accessToken:a,providerParams:x,value:d.litellm_params}),x&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);if(!e)return null;let t=x[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:d.litellm_params}):null})()]}),(0,l.jsx)(eG.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{_(!1),P(!1),H()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:d.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:d.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Yes":"No"})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:J(d.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:J(d.updated_at)})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eH,{value:L,disabled:!0})]})]})})]})]}),(0,l.jsx)(tG,{visible:E,onClose:()=>M(!1),onSuccess:()=>{M(!1),z()},accessToken:a,editData:d?{guardrail_id:d.guardrail_id,guardrail_name:d.guardrail_name,litellm_params:d.litellm_params}:null})]})}],969641);var tz=e.i(573421),tD=e.i(19732),tK=e.i(928685),tH=e.i(166406),tq=e.i(637235),tJ=e.i(755151),tU=e.i(240647);let{Text:tW}=d.Typography,tV=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tk.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tY}=i.Input,{Text:tQ}=d.Typography,tX=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ej.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eD.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tY,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(e4.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tV,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[s,n]=(0,m.useState)(new Set),[o,c]=(0,m.useState)(""),[g,x]=(0,m.useState)([]),[f,y]=(0,m.useState)([]),[j,_]=(0,m.useState)(!1),b=e.filter(e=>e.guardrail_name?.toLowerCase().includes(o.toLowerCase())),v=async e=>{if(0===s.size||!a)return;_(!0),x([]),y([]);let t=[],l=[];await Promise.all(Array.from(s).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),x(t),y(l),_(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(h.Card,{className:"h-full",styles:{body:{padding:0,height:"100%"}},children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(i.Input,{prefix:(0,l.jsx)(tK.SearchOutlined,{}),placeholder:"Search guardrails...",value:o,onChange:e=>c(e.target.value)})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(eh.Spin,{})}):0===b.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(ez.Empty,{description:o?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(tz.List,{dataSource:b,renderItem:e=>(0,l.jsx)(tz.List.Item,{onClick:()=>{var t;let a;e.guardrail_name&&(t=e.guardrail_name,(a=new Set(s)).has(t)?a.delete(t):a.add(t),n(a))},style:{paddingLeft:24,paddingRight:16},className:`cursor-pointer hover:bg-gray-50 transition-colors ${s.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(tz.List.Item.Meta,{title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tD.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(d.Typography.Text,{className:"text-xs text-gray-600",children:[s.size," of ",b.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(d.Typography.Title,{level:2,className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===s.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tD.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tX,{guardrailNames:Array.from(s),onSubmit:v,results:g.length>0?g:null,errors:f.length>0?f:null,isLoading:j,onClose:()=>n(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tG],64352);let tZ="../ui/assets/logos/",t0=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tZ}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tZ}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tZ}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tZ}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tZ}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tZ}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tZ}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tZ}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tZ}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tZ}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tZ}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tZ}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tZ}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tZ}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tZ}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tZ}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tZ}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tZ}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tZ}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tZ}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tZ}akto.svg`,tags:["Security","Safety","Monitoring"]},{id:"promptguard",name:"PromptGuard",description:"AI security gateway with prompt injection detection, PII redaction, topic filtering, entity blocklists, and hallucination detection. Self-hostable with drop-in proxy integration.",category:"partner",logo:`${tZ}promptguard.svg`,tags:["Security","Prompt Injection","PII"],providerKey:"Promptguard",eval:{f1:94.9,precision:100,recall:90.4,testCases:5384,latency:"~150ms"}},{id:"xecguard",name:"XecGuard",description:"CyCraft XecGuard AI security gateway. Multi-policy scanning (prompt injection, harmful content, PII, system-prompt enforcement) plus RAG context grounding.",category:"partner",logo:`${tZ}xecguard.svg`,tags:["Security","Policy","Grounding","RAG"],providerKey:"Xecguard"}];e.s(["ALL_CARDS",0,t0],230312)},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(464571),r=e.i(326373),i=e.i(653496),s=e.i(755151),n=e.i(646563),o=e.i(245094),d=e.i(764205),c=e.i(185357),m=e.i(782719),u=e.i(708347),p=e.i(969641),g=e.i(476993),x=e.i(727749),h=e.i(127952),f=e.i(180766);e.i(824296);var y=e.i(64352),j=e.i(311451),_=e.i(928685),b=e.i(266537),v=e.i(230312),w=e.i(826910);let N=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},C=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(N,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(w.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var S=e.i(447566);let k={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1},promptguard:{provider:"Promptguard",guardrailNameSuggestion:"PromptGuard",mode:"pre_call",defaultOn:!1},xecguard:{provider:"Xecguard",guardrailNameSuggestion:"XecGuard",mode:"pre_call",defaultOn:!1}},I=({card:e,onBack:r,accessToken:i,onGuardrailCreated:s})=>{let[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)("overview"),u=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],p=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],g=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:r,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(S.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(l.Button,{onClick:()=>o(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:g.map(e=>(0,t.jsx)("div",{onClick:()=>m(e.key),style:{padding:"12px 20px",fontSize:14,color:d===e.key?"#1a73e8":"#5f6368",borderBottom:d===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:d===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===d&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:u.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:p.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(c.default,{visible:n,onClose:()=>o(!1),accessToken:i,onSuccess:()=>{o(!1),s()},preset:k[e.id]})]})},A=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=v.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(I,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(j.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(_.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]})]})};var O=e.i(988846),P=e.i(837007),T=e.i(409797),L=e.i(54131),B=e.i(995926),F=e.i(678784),$=e.i(634831),E=e.i(438100),M=e.i(302202),R=e.i(328196),G=e.i(879664);e.s(["InfoIcon",()=>G.default],168118);var G=G,z=e.i(212931),D=e.i(808613),K=e.i(199133),H=e.i(663435),q=e.i(954616),J=e.i(912598),U=e.i(135214),W=e.i(243652);let V=async(e,t)=>{let a=(0,d.getProxyBaseUrl)(),l=`${a}/guardrails/register`,r=await fetch(l,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.json().catch(()=>({})),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return r.json()},Y=(0,W.createQueryKeys)("guardrails");function Q(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt: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),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let X={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{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"}},Z={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function ee({label:e,value:a,color:l}){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 ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function et({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function ea({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=X[e.status],c=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,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.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(M.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,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:o,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,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function el({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function er({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=X[e.status],y=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(B.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(el,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)($.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(el,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(E.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(G.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)($.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(F.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(B.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ei({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="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 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(F.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(R.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,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,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function es({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[c,m]=(0,a.useState)("all"),[u,p]=(0,a.useState)(null),[g,h]=(0,a.useState)(new Set),[f,y]=(0,a.useState)(null),[_,b]=(0,a.useState)(!0),[v,w]=(0,a.useState)(null),[N,C]=(0,a.useState)(""),[S,k]=(0,a.useState)(!1),[I]=D.Form.useForm(),A=(()=>{let{accessToken:e}=(0,U.default)(),t=(0,J.useQueryClient)();return(0,q.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return V(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:Y.all})}})})();(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let T=(0,a.useCallback)(async()=>{if(!e)return void b(!1);b(!0),w(null);try{let t="all"===c?void 0:"pending"===c?"pending_review":c,a=await (0,d.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(Q)),s(a.summary)}catch(e){w(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{b(!1)}},[e,c,N]);(0,a.useEffect)(()=>{T()},[T]);let L=l.find(e=>e.id===u)??null,B=i.total,F=i.pending_review,$=i.active,E=i.rejected;async function M(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),x.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{x.default.fromBackend("Failed to update forward API key")}}async function R(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),x.default.success("Static headers updated")}catch{x.default.fromBackend("Failed to update static headers")}}async function G(t,a){if(e)try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),x.default.success("Forward client headers updated")}catch{x.default.fromBackend("Failed to update forward client headers")}}async function W(t){if(e)try{await (0,d.approveGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail approved")}catch{x.default.fromBackend("Failed to approve guardrail")}}async function X(t){if(e)try{await (0,d.rejectGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail rejected")}catch{x.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${L?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ee,{label:"Total Submitted",value:B,color:"text-gray-900"}),(0,t.jsx)(ee,{label:"Pending Review",value:F,color:"text-yellow-600"}),(0,t.jsx)(ee,{label:"Active",value:$,color:"text-green-600"}),(0,t.jsx)(ee,{label:"Rejected",value:E,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)(O.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 guardrails...",value:n,onChange:e=>o(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-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:c,onChange:e=>m(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none 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",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>k(!0),className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)(P.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[_&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),v&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:v}),!_&&!v&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!_&&!v&&l.map(e=>(0,t.jsx)(ea,{guardrail:e,isSelected:u===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>p(u===e.id?null:e.id),onToggleForwardKey:()=>M(e.id),onToggleHeaders:()=>{var t;return t=e.id,void h(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>y({id:e.id,action:"approve"}),onReject:()=>y({id:e.id,action:"reject"})},e.id))]})]}),L&&(0,t.jsx)(er,{guardrail:L,onClose:()=>p(null),onApprove:()=>y({id:L.id,action:"approve"}),onReject:()=>y({id:L.id,action:"reject"}),onToggleForwardKey:()=>M(L.id),onUpdateCustomHeaders:e=>R(L.id,e),onUpdateExtraHeaders:e=>G(L.id,e)}),f&&(0,t.jsx)(ei,{action:f.action,guardrailName:l.find(e=>e.id===f.id)?.name??"",onConfirm:()=>"approve"===f.action?W(f.id):X(f.id),onCancel:()=>y(null)}),(0,t.jsxs)(z.Modal,{title:"Submit Guardrail for Review",open:S,onCancel:()=>{k(!1),I.resetFields()},onOk:()=>I.submit(),okText:"Submit for Review",children:[(0,t.jsx)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800 mb-4",children:"Your guardrail will be sent for admin review before it becomes active."}),(0,t.jsxs)(D.Form,{form:I,layout:"vertical",initialValues:{mode:"pre_call"},onFinish:async e=>{let t={...e.extra_litellm_params?JSON.parse(e.extra_litellm_params):{},guardrail:"generic_guardrail_api",mode:e.mode,api_base:e.api_base};try{await A.mutateAsync({team_id:e.team_id,guardrail_name:e.guardrail_name,litellm_params:t,guardrail_info:e.guardrail_info?JSON.parse(e.guardrail_info):void 0}),x.default.success("Guardrail submitted for review"),k(!1),I.resetFields(),T()}catch{}},children:[(0,t.jsx)(D.Form.Item,{label:"Team",name:"team_id",rules:[{required:!0,message:"Select a team"}],children:(0,t.jsx)(H.default,{})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Enter a guardrail name"}],children:(0,t.jsx)(j.Input,{placeholder:"e.g. pii-detection"})}),(0,t.jsx)(D.Form.Item,{label:"Mode",name:"mode",rules:[{required:!0,message:"Select a mode"}],children:(0,t.jsxs)(K.Select,{children:[(0,t.jsx)(K.Select.Option,{value:"pre_call",children:"Pre Call"}),(0,t.jsx)(K.Select.Option,{value:"post_call",children:"Post Call"}),(0,t.jsx)(K.Select.Option,{value:"during_call",children:"During Call"})]})}),(0,t.jsx)(D.Form.Item,{label:"API Base URL",name:"api_base",rules:[{required:!0,message:"Enter the API base URL"},{type:"url",message:"Must be a valid URL"}],children:(0,t.jsx)(j.Input,{placeholder:"https://your-guardrail-api.com/v1/check",className:"font-mono"})}),(0,t.jsx)(D.Form.Item,{label:"Additional litellm_params (optional)",name:"extra_litellm_params",tooltip:"JSON object merged into litellm_params. e.g. forward_api_key, headers, model, unreachable_fallback",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if("object"!=typeof e||Array.isArray(e))return Promise.reject("Must be a JSON object");return Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"forward_api_key": true, "headers": {"X-Custom": "value"}}'})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Info (optional)",name:"guardrail_info",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"description": "Detects PII in requests"}'})})]})]})]})}e.s(["default",0,({accessToken:e,userRole:j})=>{let[_,b]=(0,a.useState)([]),[v,w]=(0,a.useState)(!1),[N,C]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[I,O]=(0,a.useState)(!1),[P,T]=(0,a.useState)(null),[L,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),E=!!j&&(0,u.isAdminRole)(j),M=async()=>{if(e){k(!0);try{let t=await (0,d.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),b(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{k(!1)}}};(0,a.useEffect)(()=>{M()},[e]);let R=()=>{M()},G=async()=>{if(P&&e){O(!0);try{await (0,d.deleteGuardrailCall)(e,P.guardrail_id),x.default.success(`Guardrail "${P.guardrail_name}" deleted successfully`),await M()}catch(e){console.error("Error deleting guardrail:",e),x.default.fromBackend("Failed to delete guardrail")}finally{O(!1),B(!1),T(null)}}},z=P&&P.litellm_params?(0,f.getGuardrailLogoAndName)(P.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsx)(i.Tabs,{defaultActiveKey:"submitted",items:[...E?[{key:"garden",label:"Guardrail Garden",children:(0,t.jsx)(A,{accessToken:e,onGuardrailCreated:R})},{key:"guardrails",label:"Guardrails",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(r.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(n.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{F&&$(null),w(!0)}},{key:"custom_code",icon:(0,t.jsx)(o.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{F&&$(null),C(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(s.DownOutlined,{className:"ml-2"})]})})}),F?(0,t.jsx)(p.default,{guardrailId:F,onClose:()=>$(null),accessToken:e,isAdmin:E}):(0,t.jsx)(m.default,{guardrailsList:_,isLoading:S,onDeleteClick:(e,t)=>{T(_.find(t=>t.guardrail_id===e)||null),B(!0)},accessToken:e,onGuardrailUpdated:M,isAdmin:E,onGuardrailClick:e=>$(e)}),(0,t.jsx)(c.default,{visible:v,onClose:()=>{w(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(y.CustomCodeModal,{visible:N,onClose:()=>{C(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(h.default,{isOpen:L,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${P?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:P?.guardrail_name},{label:"ID",value:P?.guardrail_id,code:!0},{label:"Provider",value:z},{label:"Mode",value:P?.litellm_params.mode},{label:"Default On",value:P?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{B(!1),T(null)},onOk:G,confirmLoading:I})]})},{key:"playground",label:"Test Playground",disabled:!e,children:(0,t.jsx)(g.default,{guardrailsList:_,isLoading:S,accessToken:e,onClose:()=>{}})}]:[],{key:"submitted",label:"Submitted Guardrails",children:(0,t.jsx)(es,{accessToken:e})}]})})}],487304)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d0510af52e5b6373.js b/litellm/proxy/_experimental/out/_next/static/chunks/d0510af52e5b6373.js new file mode 100644 index 0000000000..0328d9aeab --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/d0510af52e5b6373.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21548,t=>{"use strict";var e=t.i(616303);t.s(["Empty",()=>e.default])},918549,t=>{"use strict";let e=(0,t.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);t.s(["default",()=>e])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d57a01eeb0a140e9.js b/litellm/proxy/_experimental/out/_next/static/chunks/d57a01eeb0a140e9.js new file mode 100644 index 0000000000..fa175e2925 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/d57a01eeb0a140e9.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,757440,e=>{"use strict";var t=e.i(290571),s=e.i(271645);let a=e=>{var a=(0,t.__rest)(e,[]);return s.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},a),s.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>a])},446428,854056,e=>{"use strict";let t;var s=e.i(290571),a=e.i(271645);let l=e=>{var t=(0,s.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.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"}))};e.s(["default",()=>l],446428);var r=e.i(746725),i=e.i(914189),n=e.i(553521),d=e.i(835696),o=e.i(941444),c=e.i(178677),u=e.i(294316),m=e.i(83733),h=e.i(233137),x=e.i(732607),g=e.i(397701),f=e.i(700020);function p(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:S)!==a.Fragment||1===a.default.Children.count(e.children)}let b=(0,a.createContext)(null);b.displayName="TransitionContext";var j=((t=j||{}).Visible="visible",t.Hidden="hidden",t);let v=(0,a.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 _(e,t){let s=(0,o.useLatestValue)(e),l=(0,a.useRef)([]),d=(0,n.useIsMounted)(),c=(0,r.useDisposables)(),u=(0,i.useEvent)((e,t=f.RenderStrategy.Hidden)=>{let a=l.current.findIndex(({el:t})=>t===e);-1!==a&&((0,g.match)(t,{[f.RenderStrategy.Unmount](){l.current.splice(a,1)},[f.RenderStrategy.Hidden](){l.current[a].state="hidden"}}),c.microTask(()=>{var e;!y(l)&&d.current&&(null==(e=s.current)||e.call(s))}))}),m=(0,i.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,f.RenderStrategy.Unmount)}),h=(0,a.useRef)([]),x=(0,a.useRef)(Promise.resolve()),p=(0,a.useRef)({enter:[],leave:[]}),b=(0,i.useEvent)((e,s,a)=>{h.current.splice(0),t&&(t.chains.current[s]=t.chains.current[s].filter(([t])=>t!==e)),null==t||t.chains.current[s].push([e,new Promise(e=>{h.current.push(e)})]),null==t||t.chains.current[s].push([e,new Promise(e=>{Promise.all(p.current[s].map(([e,t])=>t)).then(()=>e())})]),"enter"===s?x.current=x.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(s)):a(s)}),j=(0,i.useEvent)((e,t,s)=>{Promise.all(p.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=h.current.shift())||e()}).then(()=>s(t))});return(0,a.useMemo)(()=>({children:l,register:m,unregister:u,onStart:b,onStop:j,wait:x,chains:p}),[m,u,l,b,j,p,x])}v.displayName="NestingContext";let S=a.Fragment,w=f.RenderFeatures.RenderStrategy,N=(0,f.forwardRefWithAs)(function(e,t){let{show:s,appear:l=!1,unmount:r=!0,...n}=e,o=(0,a.useRef)(null),m=p(e),x=(0,u.useSyncRefs)(...m?[o,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let g=(0,h.useOpenClosed)();if(void 0===s&&null!==g&&(s=(g&h.State.Open)===h.State.Open),void 0===s)throw Error("A is used but it is missing a `show={true | false}` prop.");let[j,S]=(0,a.useState)(s?"visible":"hidden"),N=_(()=>{s||S("hidden")}),[T,k]=(0,a.useState)(!0),I=(0,a.useRef)([s]);(0,d.useIsoMorphicEffect)(()=>{!1!==T&&I.current[I.current.length-1]!==s&&(I.current.push(s),k(!1))},[I,s]);let E=(0,a.useMemo)(()=>({show:s,appear:l,initial:T}),[s,l,T]);(0,d.useIsoMorphicEffect)(()=>{s?S("visible"):y(N)||null===o.current||S("hidden")},[s,N]);let U={unmount:r},R=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeEnter)||t.call(e)}),B=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeLeave)||t.call(e)}),M=(0,f.useRender)();return a.default.createElement(v.Provider,{value:N},a.default.createElement(b.Provider,{value:E},M({ourProps:{...U,as:a.Fragment,children:a.default.createElement(C,{ref:x,...U,...n,beforeEnter:R,beforeLeave:B})},theirProps:{},defaultTag:a.Fragment,features:w,visible:"visible"===j,name:"Transition"})))}),C=(0,f.forwardRefWithAs)(function(e,t){var s,l;let{transition:r=!0,beforeEnter:n,afterEnter:o,beforeLeave:j,afterLeave:N,enter:C,enterFrom:T,enterTo:k,entered:I,leave:E,leaveFrom:U,leaveTo:R,...B}=e,[M,F]=(0,a.useState)(null),D=(0,a.useRef)(null),A=p(e),L=(0,u.useSyncRefs)(...A?[D,t,F]:null===t?[]:[t]),O=null==(s=B.unmount)||s?f.RenderStrategy.Unmount:f.RenderStrategy.Hidden,{show:P,appear:z,initial:V}=function(){let e=(0,a.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[$,K]=(0,a.useState)(P?"visible":"hidden"),H=function(){let e=(0,a.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:q,unregister:G}=H;(0,d.useIsoMorphicEffect)(()=>q(D),[q,D]),(0,d.useIsoMorphicEffect)(()=>{if(O===f.RenderStrategy.Hidden&&D.current)return P&&"visible"!==$?void K("visible"):(0,g.match)($,{hidden:()=>G(D),visible:()=>q(D)})},[$,D,q,G,P,O]);let W=(0,c.useServerHandoffComplete)();(0,d.useIsoMorphicEffect)(()=>{if(A&&W&&"visible"===$&&null===D.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,$,W,A]);let J=V&&!z,Q=z&&P&&V,Z=(0,a.useRef)(!1),Y=_(()=>{Z.current||(K("hidden"),G(D))},H),X=(0,i.useEvent)(e=>{Z.current=!0,Y.onStart(D,e?"enter":"leave",e=>{"enter"===e?null==n||n():"leave"===e&&(null==j||j())})}),ee=(0,i.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Y.onStop(D,t,e=>{"enter"===e?null==o||o():"leave"===e&&(null==N||N())}),"leave"!==t||y(Y)||(K("hidden"),G(D))});(0,a.useEffect)(()=>{A&&r||(X(P),ee(P))},[P,A,r]);let et=!(!r||!A||!W||J),[,es]=(0,m.useTransition)(et,M,P,{start:X,end:ee}),ea=(0,f.compact)({ref:L,className:(null==(l=(0,x.classNames)(B.className,Q&&C,Q&&T,es.enter&&C,es.enter&&es.closed&&T,es.enter&&!es.closed&&k,es.leave&&E,es.leave&&!es.closed&&U,es.leave&&es.closed&&R,!es.transition&&P&&I))?void 0:l.trim())||void 0,...(0,m.transitionDataAttributes)(es)}),el=0;"visible"===$&&(el|=h.State.Open),"hidden"===$&&(el|=h.State.Closed),es.enter&&(el|=h.State.Opening),es.leave&&(el|=h.State.Closing);let er=(0,f.useRender)();return a.default.createElement(v.Provider,{value:Y},a.default.createElement(h.OpenClosedProvider,{value:el},er({ourProps:ea,theirProps:B,defaultTag:S,features:w,visible:"visible"===$,name:"Transition.Child"})))}),T=(0,f.forwardRefWithAs)(function(e,t){let s=null!==(0,a.useContext)(b),l=null!==(0,h.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!s&&l?a.default.createElement(N,{ref:t,...e}):a.default.createElement(C,{ref:t,...e}))}),k=Object.assign(N,{Child:T,Root:N});e.s(["Transition",()=>k],854056)},206929,e=>{"use strict";var t=e.i(290571),s=e.i(757440),a=e.i(271645),l=e.i(446428),r=e.i(444755),i=e.i(673706),n=e.i(103471),d=e.i(495470),o=e.i(854056),c=e.i(888288);let u=(0,i.makeClassName)("Select"),m=a.default.forwardRef((e,i)=>{let{defaultValue:m="",value:h,onValueChange:x,placeholder:g="Select...",disabled:f=!1,icon:p,enableClear:b=!1,required:j,children:v,name:y,error:_=!1,errorMessage:S,className:w,id:N}=e,C=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),T=(0,a.useRef)(null),k=a.Children.toArray(v),[I,E]=(0,c.default)(m,h),U=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(v).filter(a.isValidElement);return(0,n.constructValueToNameMapping)(e)},[v]);return a.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",w)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:j,className:(0,r.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:I,onChange:e=>{e.preventDefault()},name:y,disabled:f,id:N,onFocus:()=>{let e=T.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},g),k.map(e=>{let t=e.props.value,s=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},s)})),a.default.createElement(d.Listbox,Object.assign({as:"div",ref:i,defaultValue:I,value:I,onChange:e=>{null==x||x(e),E(e)},disabled:f,id:N},C),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(d.ListboxButton,{ref:T,className:(0,r.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",p?"pl-10":"pl-3",(0,n.getSelectButtonColors)((0,n.hasValue)(e),f,_))},p&&a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(p,{className:(0,r.tremorTwMerge)(u("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=U.get(e))?t:g),a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(s.default,{className:(0,r.tremorTwMerge)(u("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&I?a.default.createElement("button",{type:"button",className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E(""),null==x||x("")}},a.default.createElement(l.default,{className:(0,r.tremorTwMerge)(u("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(o.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.default.createElement(d.ListboxOptions,{anchor:"bottom start",className:(0,r.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},v)))})),_&&S?a.default.createElement("p",{className:(0,r.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},S):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},502275,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,s],502275)},78085,e=>{"use strict";var t=e.i(290571),s=e.i(103471),a=e.i(888288),l=e.i(271645),r=e.i(444755),i=e.i(673706);let n=(0,i.makeClassName)("Textarea"),d=l.default.forwardRef((e,d)=>{let{value:o,defaultValue:c="",placeholder:u="Type...",error:m=!1,errorMessage:h,disabled:x=!1,className:g,onChange:f,onValueChange:p,autoHeight:b=!1}=e,j=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[v,y]=(0,a.default)(c,o),_=(0,l.useRef)(null),S=(0,s.hasValue)(v);return(0,l.useEffect)(()=>{let e=_.current;if(b&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[b,_,v]),l.default.createElement(l.default.Fragment,null,l.default.createElement("textarea",Object.assign({ref:(0,i.mergeRefs)([_,d]),value:v,placeholder:u,disabled:x,className:(0,r.tremorTwMerge)(n("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,s.getSelectButtonColors)(S,x,m),x?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",g),"data-testid":"text-area",onChange:e=>{null==f||f(e),y(e.target.value),null==p||p(e.target.value)}},j)),m&&h?l.default.createElement("p",{className:(0,r.tremorTwMerge)(n("errorMessage"),"text-sm text-red-500 mt-1")},h):null)});d.displayName="Textarea",e.s(["Textarea",()=>d],78085)},114600,e=>{"use strict";var t=e.i(290571),s=e.i(444755),a=e.i(673706),l=e.i(271645);let r=(0,a.makeClassName)("Divider"),i=l.default.forwardRef((e,a)=>{let{className:i,children:n}=e,d=(0,t.__rest)(e,["className","children"]);return l.default.createElement("div",Object.assign({ref:a,className:(0,s.tremorTwMerge)(r("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",i)},d),n?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.default.createElement("div",{className:(0,s.tremorTwMerge)("text-inherit whitespace-nowrap")},n),l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});i.displayName="Divider",e.s(["Divider",()=>i],114600)},910119,e=>{"use strict";var t=e.i(843476),s=e.i(197647),a=e.i(653824),l=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),h=e.i(199133),x=e.i(28651),g=e.i(175712),f=e.i(770914),p=e.i(536916),b=e.i(764205),j=e.i(827252),v=e.i(994388),y=e.i(35983),_=e.i(779241),S=e.i(78085),w=e.i(808613),N=e.i(592968),C=e.i(708347),T=e.i(860585),k=e.i(355619),I=e.i(435451);function E({userData:e,onCancel:s,onSubmit:a,teams:l,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=w.Form.useForm(),[x,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let t=e.user_info?.max_budget,s=null==t;g(s),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:s?"":t,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,t.jsxs)(w.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(x||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),a(e)},layout:"vertical",children:[!u&&(0,t.jsx)(w.Form.Item,{label:"User ID",name:"user_id",children:(0,t.jsx)(_.TextInput,{disabled:!0})}),!u&&(0,t.jsx)(w.Form.Item,{label:"Email",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Alias",name:"user_alias",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(N.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,t.jsx)(j.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,t.jsx)(h.Select,{children:c&&Object.entries(c).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Personal Models"," ",(0,t.jsx)(N.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,t.jsx)(j.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsxs)(h.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!C.all_admin_roles.includes(d||""),children:[(0,t.jsx)(h.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(h.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,t.jsx)(h.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,t.jsx)("span",{children:"Max Budget (USD)"}),(0,t.jsx)(p.Checkbox,{checked:x,onChange:e=>{let t=e.target.checked;g(t),t&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,t)=>x||""!==t&&null!=t?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,t.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:x})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)(w.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(v.Button,{variant:"secondary",type:"button",onClick:s,children:"Cancel"}),(0,t.jsx)(v.Button,{type:"submit",children:"Save Changes"})]})]})}var U=e.i(727749),R=e.i(888259);let{Text:B,Title:M}=c.Typography,F=({open:e,onCancel:s,selectedUsers:a,possibleUIRoles:l,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:j,allowAllUsers:v=!1})=>{let[y,_]=(0,n.useState)(!1),[S,w]=(0,n.useState)([]),[N,C]=(0,n.useState)(null),[T,k]=(0,n.useState)(!1),[I,F]=(0,n.useState)(!1),D=()=>{w([]),C(null),k(!1),F(!1),s()},A=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),L=async e=>{if(console.log("formValues",e),!r)return void U.default.fromBackend("Access token not found");_(!0);try{let t=a.map(e=>e.user_id),l={};e.user_role&&""!==e.user_role&&(l.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(l.max_budget=e.max_budget),e.models&&e.models.length>0&&(l.models=e.models),e.budget_duration&&""!==e.budget_duration&&(l.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(l.metadata=e.metadata);let n=Object.keys(l).length>0,d=T&&S.length>0;if(!n&&!d)return void U.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,b.userBulkUpdateUserCall)(r,l,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,b.userBulkUpdateUserCall)(r,l,t),o.push(`Updated ${t.length} user(s)`);if(d){let e=[];for(let t of S)try{let s=null;s=I?null:a.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let l=await (0,b.teamBulkMemberAddCall)(r,t,s||null,N||void 0,I);console.log("result",l),e.push({teamId:t,success:!0,successfulAdditions:l.successful_additions,failedAdditions:l.failed_additions})}catch(s){console.error(`Failed to add users to team ${t}:`,s),e.push({teamId:t,success:!1,error:s})}let t=e.filter(e=>e.success),s=e.filter(e=>!e.success);if(t.length>0){let e=t.reduce((e,t)=>e+t.successfulAdditions,0);o.push(`Added users to ${t.length} team(s) (${e} total additions)`)}s.length>0&&R.default.warning(`Failed to add users to ${s.length} team(s)`)}o.length>0&&U.default.success(o.join(". ")),w([]),C(null),k(!1),F(!1),i(),s()}catch(e){console.error("Bulk operation failed:",e),U.default.fromBackend("Failed to perform bulk operations")}finally{_(!1)}};return(0,t.jsxs)(o.Modal,{open:e,onCancel:D,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${a.length} User(s)`,width:800,children:[v&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(p.Checkbox,{checked:I,onChange:e=>F(e.target.checked),children:(0,t.jsx)(B,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsx)(B,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(M,{level:5,children:["Selected Users (",a.length,"):"]}),(0,t.jsx)(m.Table,{size:"small",bordered:!0,dataSource:a,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,t.jsx)(B,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:l?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,t.jsx)(u.Divider,{}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)(B,{children:[(0,t.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,t.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,t.jsxs)(f.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsx)(p.Checkbox,{checked:T,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Select Teams:"}),(0,t.jsx)(h.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:w,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Team Budget (Optional):"}),(0,t.jsx)(x.InputNumber,{placeholder:"Max budget per user in team",value:N,onChange:e=>C(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,t.jsx)(E,{userData:A,onCancel:D,onSubmit:L,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:j,possibleUIRoles:l,isBulkEdit:!0}),y&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,t.jsxs)(B,{children:["Updating ",I?"all users":a.length," user(s)..."]})})]})};var D=e.i(371455);let A=({visible:e,possibleUIRoles:s,onCancel:a,user:l,onSubmit:r})=>{let[i,c]=(0,n.useState)(l),[u]=w.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[l]);let m=async()=>{u.resetFields(),a()},g=async e=>{r(e),u.resetFields(),a()};return l?(0,t.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+l.user_id,width:1e3,children:(0,t.jsx)(w.Form,{form:u,onFinish:g,initialValues:l,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(h.Select,{children:s&&Object.entries(s).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,t.jsx)(x.InputNumber,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,t.jsx)(I.default,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var L=e.i(172372),O=e.i(500330),P=e.i(152473),z=e.i(266027),V=e.i(912598),$=e.i(127952),K=e.i(304967),H=e.i(629569),q=e.i(599724),G=e.i(114600),W=e.i(482725),J=e.i(790848),Q=e.i(646563),Z=e.i(955135);let Y=({accessToken:e,possibleUIRoles:s,userID:a,userRole:l})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[f,p]=(0,n.useState)({}),[j,v]=(0,n.useState)(!1),[y,S]=(0,n.useState)([]),{Paragraph:w}=c.Typography,{Option:N}=h.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let t=await (0,b.getInternalUserSettings)(e);if(u(t),p(t.values||{}),e)try{let t=await (0,b.modelAvailableCall)(e,a,l);if(t&&t.data){let e=t.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),U.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let C=async()=>{if(e){v(!0);try{let t=Object.entries(f).reduce((e,[t,s])=>(e[t]=""===s?null:s,e),{}),s=await (0,b.updateInternalUserSettings)(e,t);u({...o,values:s.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),U.default.fromBackend("Failed to update settings: "+e)}finally{v(!1)}}},I=(e,t)=>{p(s=>({...s,[e]:t}))},E=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(W.Spin,{size:"large"})}):o?(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(d.Button,{onClick:()=>{g(!1),p(o.values||{})},disabled:j,children:"Cancel"}),(0,t.jsx)(d.Button,{type:"primary",onClick:C,loading:j,children:"Save Changes"})]}):(0,t.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,t.jsx)(w,{className:"mb-4",children:o.field_schema.description}),(0,t.jsx)(G.Divider,{}),(0,t.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:a}=o;return a&&a.properties?Object.entries(a.properties).map(([a,l])=>{let r=e[a],i=a.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,t.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,t.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,t.jsx)(w,{className:"text-sm text-gray-500 mt-1",children:l.description||"No description available"}),m?(0,t.jsx)("div",{className:"mt-2",children:((e,a,l)=>{let r=a.type;if("teams"===e){let s,a;return(0,t.jsx)("div",{className:"mt-2",children:(s=E(f[e]||[]),a=(e,t,a)=>{let l=[...s];l[e]={...l[e],[t]:a},I("teams",l)},(0,t.jsxs)("div",{className:"space-y-3",children:[s.map((e,l)=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)(q.Text,{className:"font-medium",children:["Team ",l+1]}),(0,t.jsx)(d.Button,{size:"small",danger:!0,icon:(0,t.jsx)(Z.DeleteOutlined,{}),onClick:()=>{I("teams",s.filter((e,t)=>t!==l))},children:"Remove"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,t.jsx)(_.TextInput,{value:e.team_id,onChange:e=>a(l,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,t.jsx)(x.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>a(l,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,t.jsxs)(h.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>a(l,"user_role",e),children:[(0,t.jsx)(N,{value:"user",children:"User"}),(0,t.jsx)(N,{value:"admin",children:"Admin"})]})]})]})]},l)),(0,t.jsx)(d.Button,{icon:(0,t.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...s,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&s)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:Object.entries(s).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(N,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:a})]})},e))});if("budget_duration"===e)return(0,t.jsx)(T.default,{value:f[e]||null,onChange:t=>I(e,t),className:"mt-2"});if("boolean"===r)return(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(J.Switch,{checked:!!f[e],onChange:t=>I(e,t)})});if("array"===r&&a.items?.enum)return(0,t.jsx)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:a.items.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else if("models"===e)return(0,t.jsxs)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:[(0,t.jsx)(N,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,t.jsx)(N,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),y.map(e=>(0,t.jsx)(N,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&a.enum)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:a.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else return(0,t.jsx)(_.TextInput,{value:void 0!==f[e]?String(f[e]):"",onChange:t=>I(e,t.target.value),placeholder:a.description||"",className:"mt-2"})})(a,l,0)}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,a)=>{if(null==a)return(0,t.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(a)){if(0===a.length)return(0,t.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=E(a);return(0,t.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,s)=>(0,t.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,t.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,t.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,O.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,t.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},s))})}if("user_role"===e&&s&&s[a]){let{ui_label:e,description:l}=s[a];return(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:e}),l&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:l})]})}if("budget_duration"===e)return(0,t.jsx)("span",{children:(0,T.getBudgetDurationLabel)(a)});if("boolean"==typeof a)return(0,t.jsx)("span",{children:a?"Enabled":"Disabled"});if("models"===e&&Array.isArray(a))return 0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},s))});if("object"==typeof a)return Array.isArray(a)?0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(a,null,2)});return(0,t.jsx)("span",{children:String(a)})})(a,r)})]},a)}):(0,t.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,t.jsx)(K.Card,{children:(0,t.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var X=e.i(389083),ee=e.i(350967),et=e.i(752978),es=e.i(262218),ea=e.i(591935),el=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,s,a,l,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(N.Tooltip,{title:e.original.user_id,children:(0,t.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,t.jsx)(N.Tooltip,{title:"Copy User ID",children:(0,t.jsx)(en.CopyOutlined,{onClick:t=>{t.stopPropagation(),(0,O.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>e.original.metadata?.scim_active===!1?(0,t.jsx)(N.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,t.jsx)(es.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,t.jsx)(es.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:s})=>(0,t.jsx)("span",{className:"text-xs",children:e?.[s.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.spend?(0,O.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"SSO ID"}),(0,t.jsx)(N.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,t.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,t.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,t.jsxs)(X.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,t.jsx)(X.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(N.Tooltip,{title:"Edit user details",children:(0,t.jsx)(et.Icon,{icon:ea.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(N.Tooltip,{title:"Delete user",children:(0,t.jsx)(et.Icon,{icon:el.TrashIcon,size:"sm",onClick:()=>a(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,t.jsx)(N.Tooltip,{title:"Reset Password",children:(0,t.jsx)(et.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>l(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:s,isUserSelected:a,isAllSelected:l,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,t.jsx)(p.Checkbox,{indeterminate:r,checked:l,onChange:e=>s(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:s})=>(0,t.jsx)(p.Checkbox,{checked:a(s.original),onChange:t=>e(s.original,t.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),eh=e.i(64848),ex=e.i(942232),eg=e.i(496020),ef=e.i(977572),ep=e.i(206929),eb=e.i(94629),ej=e.i(360820),ev=e.i(871943),ey=e.i(981339),e_=e.i(530212),eS=e.i(988297),ew=e.i(118366),eN=e.i(678784);function eC({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:x,possibleUIRoles:g,initialTab:f=0,startInEditMode:p=!1}){let[j,y]=(0,n.useState)(null),[_,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[R,B]=(0,n.useState)(!1),[M,F]=(0,n.useState)(!0),[D,A]=(0,n.useState)(p),[P,z]=(0,n.useState)([]),[V,G]=(0,n.useState)(!1),[W,J]=(0,n.useState)(null),[Q,Z]=(0,n.useState)(null),[Y,X]=(0,n.useState)(f),[et,es]=(0,n.useState)({}),[ea,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ep,eb]=(0,n.useState)(null),[ej,ev]=(0,n.useState)(!1),[ey,eC]=(0,n.useState)(!1),[eT,ek]=(0,n.useState)([]),[eI,eE]=(0,n.useState)(""),[eU,eR]=(0,n.useState)("user"),[eB,eM]=(0,n.useState)(!1);n.default.useEffect(()=>{Z((0,b.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0)try{let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),s=await Promise.all(e);S(s)}catch{S(t.teams.map(e=>({team_id:e,team_alias:null})))}let s=(await (0,b.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(s)}catch(e){console.error("Error fetching user data:",e),U.default.fromBackend("Failed to fetch user data")}finally{F(!1)}})()},[u,e,m]);let eF="proxy_admin"===m||"Admin"===m,eD=async()=>{if(u){eM(!0);try{let e=await (0,b.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eM(!1)}}},eA=async()=>{if(u&&eI){ev(!0);try{await (0,b.teamMemberAddCall)(u,eI,{role:eU,user_id:e}),U.default.success("User added to team successfully"),ed(!1);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),U.default.fromBackend(e?.message||"Failed to add user to team")}finally{ev(!1)}}},eL=async()=>{if(u&&ep){eC(!0);try{await (0,b.teamMemberDeleteCall)(u,ep.team_id,{role:"user",user_id:e}),U.default.success("User removed from team successfully"),ec(!1),eb(null);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),U.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eC(!1)}}},eO=eT.filter(e=>!_.some(t=>t.team_id===e.team_id)),eP=async()=>{if(!u)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let t=await (0,b.invitationCreateCall)(u,e);J(t),G(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;B(!0),await (0,b.userDeleteCall)(u,[e]),U.default.success("User deleted successfully"),x&&x(),c()}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{I(!1),B(!1)}},eV=async e=>{try{if(!u||!j)return;await (0,b.userUpdateUserCall)(u,e,null),y({...j,user_email:e.user_email??j.user_email,user_alias:e.user_alias??j.user_alias,models:e.models??j.models,max_budget:e.max_budget??j.max_budget,budget_duration:e.budget_duration??j.budget_duration,metadata:e.metadata??j.metadata}),U.default.success("User updated successfully"),A(!1)}catch(e){console.error("Error updating user:",e),U.default.fromBackend("Failed to update user")}};if(M)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"Loading user data..."})]});if(!j)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"User not found"})]});let e$=async(e,t)=>{await (0,O.copyToClipboard)(e)&&(es(e=>({...e,[t]:!0})),setTimeout(()=>{es(e=>({...e,[t]:!1}))},2e3))},eK={user_id:j.user_id,user_info:{user_email:j.user_email,user_alias:j.user_alias,user_role:j.user_role,models:j.models,max_budget:j.max_budget,budget_duration:j.budget_duration,metadata:j.metadata}};return(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)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(H.Title,{children:j.user_email||"User"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"text-gray-500 font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(v.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:eP,className:"flex items-center",children:"Reset Password"}),(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,t.jsx)($.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:j.user_email},{label:"User ID",value:j.user_id,code:!0},{label:"Global Proxy Role",value:j.user_role&&g?.[j.user_role]?.ui_label||j.user_role||"-"},{label:"Total Spend (USD)",value:null!==j.spend&&void 0!==j.spend?j.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:R}),(0,t.jsxs)(a.TabGroup,{defaultIndex:Y,onIndexChange:X,children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Overview"}),(0,t.jsx)(s.Tab,{children:"Details"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(H.Title,{children:["$",(0,O.formatNumberWithCommas)(j.spend||0,4)]}),(0,t.jsxs)(q.Text,{children:["of"," ",null!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"]})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)(q.Text,{children:"Teams"}),eF&&(0,t.jsx)(v.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eE(""),eR("user"),ed(!0),eD()},children:"Add Team"})]}),(0,t.jsxs)("div",{className:"mt-2",children:[_.length>0?(0,t.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,t.jsxs)(eu.Table,{children:[(0,t.jsx)(em.TableHead,{children:(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(eh.TableHeaderCell,{children:"Team Name"}),eF&&(0,t.jsx)(eh.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,t.jsx)(ex.TableBody,{children:_.slice(0,ea?_.length:20).map(e=>(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(ef.TableCell,{children:e.team_alias||e.team_id}),eF&&(0,t.jsx)(ef.TableCell,{className:"text-right",children:(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{eb(e),ec(!0)}})})]},e.team_id))})]})}):(0,t.jsx)(q.Text,{children:"No teams"}),!ea&&_.length>20&&(0,t.jsxs)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",_.length-20," more"]}),ea&&_.length>20&&(0,t.jsx)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Personal Models"}),(0,t.jsx)("div",{className:"mt-2",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)(q.Text,{children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"User Settings"}),!D&&m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsx)(v.Button,{onClick:()=>A(!0),children:"Edit Settings"})]}),D&&j?(0,t.jsx)(E,{userData:eK,onCancel:()=>A(!1),onSubmit:eV,teams:_,accessToken:u,userID:e,userRole:m,userModels:P,possibleUIRoles:g}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,t.jsx)(q.Text,{children:j.user_email||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,t.jsx)(q.Text,{children:j.user_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,t.jsx)(q.Text,{children:j.user_role||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(q.Text,{children:j.created_at?new Date(j.created_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(q.Text,{children:j.updated_at?new Date(j.updated_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsx)(q.Text,{children:null!==j.max_budget&&void 0!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,t.jsx)(q.Text,{children:(0,T.getBudgetDurationLabel)(j.budget_duration??null)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(j.metadata||{},null,2)})]})]})]})})]})]}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:V,setIsInvitationLinkModalVisible:G,baseUrl:Q||"",invitationLinkData:W,modalType:"resetPassword"}),(0,t.jsx)($.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ep?.team_alias||ep?.team_id},{label:"User ID",value:j?.user_id,code:!0},{label:"Email",value:j?.user_email}],onCancel:()=>{ec(!1),eb(null)},onOk:eL,confirmLoading:ey}),(0,t.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!ej,children:(0,t.jsxs)(w.Form,{layout:"vertical",onFinish:eA,children:[(0,t.jsx)(w.Form.Item,{label:"Team",required:!0,children:(0,t.jsx)(h.Select,{showSearch:!0,value:eI||void 0,onChange:eE,placeholder:"Select a team",filterOption:(e,t)=>{let s=eO.find(e=>e.team_id===t?.value);return!!s&&s.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eB,children:eO.map(e=>(0,t.jsx)(h.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,t.jsx)(w.Form.Item,{label:"Member Role",children:(0,t.jsxs)(h.Select,{value:eU,onChange:eR,children:[(0,t.jsx)(h.Select.Option,{value:"user",children:(0,t.jsxs)(N.Tooltip,{title:"Can view team info, but not manage it",children:[(0,t.jsx)("span",{className:"font-medium",children:"user"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,t.jsx)(h.Select.Option,{value:"admin",children:(0,t.jsxs)(N.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,t.jsx)("span",{className:"font-medium",children:"admin"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:ej,disabled:!eI,children:ej?"Adding...":"Add to Team"})})]})})]})}var eT=e.i(655913),ek=e.i(38419),eI=e.i(78334),eE=e.i(555436),eU=e.i(284614);let eR=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eB({data:e=[],columns:s,isLoading:a=!1,onSortChange:l,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:h=[],onSelectionChange:x,enableSelection:g=!1,filters:f,updateFilters:p,initialFilters:b,teams:j,userListResponse:v,currentPage:_,handlePageChange:S}){let[w,N]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[C,T]=n.default.useState(null),[k,I]=n.default.useState(!1),[E,U]=n.default.useState(!1),R=(e,t=!1)=>{T(e),I(t)},B=(e,t)=>{x&&(t?x([...h,e]):x(h.filter(t=>t.user_id!==e.user_id)))},M=t=>{x&&(t?x(e):x([]))},F=e=>h.some(t=>t.user_id===e.user_id),D=e.length>0&&h.length===e.length,A=h.length>0&&h.lengtho?ed(o,c,u,m,R,g?{selectedUsers:h,onSelectUser:B,onSelectAll:M,isUserSelected:F,isAllSelected:D,isIndeterminate:A}:void 0):s,[o,c,u,m,R,s,g,h,D,A]),O=(0,eo.useReactTable)({data:e,columns:L,state:{sorting:w},onSortingChange:e=>{let t="function"==typeof e?e(w):e;if(N(t),t&&Array.isArray(t)&&t.length>0&&t[0]){let e=t[0];if(e.id){let t=e.id,s=e.desc?"desc":"asc";l?.(t,s)}}else l?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&N([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),C)?(0,t.jsx)(eC,{userId:C,onClose:()=>{T(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(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)(eT.FilterInput,{placeholder:"Search by email...",value:f.email,onChange:e=>p({email:e}),icon:eE.Search}),(0,t.jsx)(ek.FiltersButton,{onClick:()=>U(!E),active:E,hasActiveFilters:!!(f.user_id||f.user_role||f.team)}),(0,t.jsx)(eI.ResetFiltersButton,{onClick:()=>{p(b)}})]}),E&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by User ID",value:f.user_id,onChange:e=>p({user_id:e}),icon:eU.User}),(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by SSO ID",value:f.sso_user_id,onChange:e=>p({sso_user_id:e}),icon:eR}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.user_role,onValueChange:e=>p({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s.ui_label},e))})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.team,onValueChange:e=>p({team:e}),placeholder:"Select Team",children:j?.map(e=>(0,t.jsx)(y.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[a?(0,t.jsx)(ey.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",v&&v.users&&v.users.length>0?(v.page-1)*v.page_size+1:0," ","-"," ",v&&v.users?Math.min(v.page*v.page_size,v.total):0," ","of ",v?v.total:0," results"]}),(0,t.jsx)("div",{className:"flex space-x-2",children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>S(_-1),disabled:1===_,className:`px-3 py-1 text-sm border rounded-md ${1===_?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,t.jsx)("button",{onClick:()=>S(_+1),disabled:!v||_>=v.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!v||_>=v.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,t.jsx)("div",{className:"overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(em.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eh.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(ej.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ev.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eb.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(ex.TableBody,{children:a?(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?O.getRowModel().rows.map(e=>(0,t.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(ef.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&R(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eM,Title:eF}=c.Typography,eD={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:h})=>{let x=!!c&&(0,C.isProxyAdminRole)(c),g=(0,V.useQueryClient)(),[f,p]=(0,n.useState)(1),[j,v]=(0,n.useState)(!1),[y,_]=(0,n.useState)(null),[S,w]=(0,n.useState)(!1),[N,T]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[E,R]=(0,n.useState)("users"),[B,M]=(0,n.useState)(eD),[K,H,q]=(0,P.useDebouncedState)(B,{wait:300}),[G,W]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Z,X]=(0,n.useState)(null),[ee,et]=(0,n.useState)([]),[es,ea]=(0,n.useState)(!1),[el,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),w(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{X((0,b.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let t=(await (0,b.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",t),en(t)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{M(t=>{let s={...t,...e};return H(s),s})},eu=(e,t)=>{ec({sort_by:e,sort_order:t})},em=async t=>{if(!e)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let s=await (0,b.invitationCreateCall)(e,t);Q(s),W(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},eh=async()=>{if(k&&e)try{T(!0),await (0,b.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:t}}),U.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{w(!1),I(null),T(!1)}},ex=async()=>{_(null),v(!1)},eg=async t=>{if(console.log("inside handleEditSubmit:",t),e&&o&&c&&u){try{let s=await (0,b.userUpdateUserCall)(e,t,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.map(e=>e.user_id===s.data.user_id?(0,O.updateExistingKeys)(e,s.data):e);return{...e,users:t}}),U.default.success(`User ${t.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}_(null),v(!1)}},ef=async e=>{p(e)},ep=e=>{et(e)},eb=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:K,currentPage:f,orgAdminOrgIds:h}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.userListCall)(e,K.user_id?[K.user_id]:null,f,25,K.email||null,K.user_role||null,K.team||null,K.sso_user_id||null,K.sort_by,K.sort_order,h?h.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),ej=eb.data,ev=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,e_=ed(ev,e=>{_(e),v(!0)},eo,em,()=>{});return(0,t.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("div",{className:"flex space-x-3",children:eb.isLoading?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ev}),x&&(0,t.jsx)(d.Button,{onClick:()=>{er(!el),et([])},type:el?"primary":"default",className:"flex items-center",children:el?"Cancel Selection":"Select Users"}),x&&el&&(0,t.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?U.default.fromBackend("Please select users to edit"):ea(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),x?(0,t.jsxs)(a.TabGroup,{defaultIndex:0,onIndexChange:e=>R(0===e?"users":"settings"),children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Users"}),(0,t.jsx)(s.Tab,{children:"Default User Settings"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:el,selectedUsers:ee,onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef})}),(0,t.jsx)(r.TabPanel,{children:u&&c&&e?(0,t.jsx)(Y,{accessToken:e,possibleUIRoles:ev,userID:u,userRole:c}):(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(ey.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef}),(0,t.jsx)(A,{visible:j,possibleUIRoles:ev,onCancel:ex,user:y,onSubmit:eg}),(0,t.jsx)($.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ev?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{w(!1),I(null)},onOk:eh,confirmLoading:N}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:G,setIsInvitationLinkModalVisible:W,baseUrl:Z||"",invitationLinkData:J,modalType:"resetPassword"}),(0,t.jsx)(F,{open:es,onCancel:()=>ea(!1),selectedUsers:ee,possibleUIRoles:ev,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),et([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,C.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d6ab357d1bbb53f0.js b/litellm/proxy/_experimental/out/_next/static/chunks/d6ab357d1bbb53f0.js new file mode 100644 index 0000000000..cb630ecd3f --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/d6ab357d1bbb53f0.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},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",()=>t],727612)},878894,664659,531278,e=>{"use strict";var t=e.i(582458);e.s(["AlertTriangle",()=>t.default],878894);var r=e.i(631171);e.s(["ChevronDown",()=>r.default],664659);let s=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>s],531278)},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",()=>t])},438957,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:"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),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["KeyOutlined",0,l],438957)},366308,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:"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),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ToolOutlined",0,l],366308)},313603,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:"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),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SettingOutlined",0,l],313603)},872934,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"};var i=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ExportOutlined",0,l],872934)},232164,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:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"};var i=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["TagsOutlined",0,l],232164)},210612,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:"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 i=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["DatabaseOutlined",0,l],210612)},218129,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:"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 i=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ApiOutlined",0,l],218129)},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},153472,e=>{"use strict";var t,r,s=e.i(266027),i=e.i(954616),l=e.i(912598),a=e.i(243652),n=e.i(135214),o=e.i(764205),c=((t={}).GENERAL_SETTINGS="general_settings",t),d=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let u=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,o.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}},p=(0,a.createQueryKeys)("proxyConfig"),m=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,o.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",()=>d,"proxyConfigKeys",0,p,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,n.default)(),t=(0,l.useQueryClient)();return(0,i.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await m(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:p.all})}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,n.default)();return(0,s.useQuery)({queryKey:p.list({filters:{configType:e}}),queryFn:async()=>await u(t,e),enabled:!!t})}])},475647,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 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};var i=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["PlusCircleOutlined",0,l],475647)},286536,77705,e=>{"use strict";var t=e.i(475254);let r=(0,t.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",()=>r],286536);let s=(0,t.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",()=>s],77705)},366283,e=>{"use strict";var t=e.i(290571),r=e.i(271645),s=e.i(95779),i=e.i(444755),l=e.i(673706);let a=(0,l.makeClassName)("Callout"),n=r.default.forwardRef((e,n)=>{let{title:o,icon:c,color:d,className:u,children:p}=e,m=(0,t.__rest)(e,["title","icon","color","className","children"]);return r.default.createElement("div",Object.assign({ref:n,className:(0,i.tremorTwMerge)(a("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",d?(0,i.tremorTwMerge)((0,l.getColorClassNames)(d,s.colorPalette.background).bgColor,(0,l.getColorClassNames)(d,s.colorPalette.darkBorder).borderColor,(0,l.getColorClassNames)(d,s.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,i.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},m),r.default.createElement("div",{className:(0,i.tremorTwMerge)(a("header"),"flex items-start")},c?r.default.createElement(c,{className:(0,i.tremorTwMerge)(a("icon"),"flex-none h-5 w-5 mr-1.5")}):null,r.default.createElement("h4",{className:(0,i.tremorTwMerge)(a("title"),"font-semibold")},o)),r.default.createElement("p",{className:(0,i.tremorTwMerge)(a("body"),"overflow-y-auto",p?"mt-2":"")},p))});n.displayName="Callout",e.s(["Callout",()=>n],366283)},105278,e=>{"use strict";var t=e.i(843476),r=e.i(135214),s=e.i(994388),i=e.i(366283),l=e.i(304967),a=e.i(269200),n=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),p=e.i(560445),m=e.i(464571),g=e.i(808613),h=e.i(311451),_=e.i(212931),x=e.i(770914),f=e.i(653496),y=e.i(898586),j=e.i(271645),v=e.i(844444),S=e.i(700514),b=e.i(727749),w=e.i(764205),C=e.i(629569),I=e.i(599724),T=e.i(350967),k=e.i(779241),E=e.i(114600),N=e.i(237016),O=e.i(596239),F=e.i(438957),M=e.i(166406),A=e.i(270377),P=e.i(475647),B=e.i(190702);let z=({accessToken:e,userID:r,proxySettings:a})=>{let[n]=g.Form.useForm(),[o,c]=(0,j.useState)(!1),[d,u]=(0,j.useState)(null),[p,m]=(0,j.useState)("");(0,j.useEffect)(()=>{let e="";m(e=a&&a.PROXY_BASE_URL&&void 0!==a.PROXY_BASE_URL?a.PROXY_BASE_URL:window.location.origin)},[a]);let h=`${p}/scim/v2`,_=async t=>{if(!e||!r)return void b.default.fromBackend("You need to be logged in to create a SCIM token");try{c(!0);let s={key_alias:t.key_alias||"SCIM Access Token",team_id:null,models:[],allowed_routes:["/scim/*"]},i=await (0,w.keyCreateCall)(e,r,s);u(i),b.default.success("SCIM token created successfully")}catch(e){console.error("Error creating SCIM token:",e),b.default.fromBackend("Failed to create SCIM token: "+(0,B.parseErrorMessage)(e))}finally{c(!1)}};return(0,t.jsx)(T.Grid,{numItems:1,children:(0,t.jsxs)(l.Card,{children:[(0,t.jsx)("div",{className:"flex items-center mb-4",children:(0,t.jsx)(C.Title,{children:"SCIM Configuration"})}),(0,t.jsx)(I.Text,{className:"text-gray-600",children:"System for Cross-domain Identity Management (SCIM) allows you to automatically provision and manage users and groups in LiteLLM."}),(0,t.jsx)(E.Divider,{}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"1"}),(0,t.jsxs)(C.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(O.LinkOutlined,{className:"h-5 w-5 mr-2"}),"SCIM Tenant URL"]})]}),(0,t.jsx)(I.Text,{className:"text-gray-600 mb-3",children:"Use this URL in your identity provider SCIM integration settings."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:h,disabled:!0,className:"flex-grow"}),(0,t.jsx)(N.CopyToClipboard,{text:h,onCopy:()=>b.default.success("URL copied to clipboard"),children:(0,t.jsxs)(s.Button,{variant:"primary",className:"ml-2 flex items-center",children:[(0,t.jsx)(M.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"2"}),(0,t.jsxs)(C.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(F.KeyOutlined,{className:"h-5 w-5 mr-2"}),"Authentication Token"]})]}),(0,t.jsx)(i.Callout,{title:"Using SCIM",color:"blue",className:"mb-4",children:"You need a SCIM token to authenticate with the SCIM API. Create one below and use it in your SCIM provider configuration."}),d?(0,t.jsxs)(l.Card,{className:"border border-yellow-300 bg-yellow-50",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-yellow-800",children:[(0,t.jsx)(A.ExclamationCircleOutlined,{className:"h-5 w-5 mr-2"}),(0,t.jsx)(C.Title,{className:"text-lg text-yellow-800",children:"Your SCIM Token"})]}),(0,t.jsx)(I.Text,{className:"text-yellow-800 mb-4 font-medium",children:"Make sure to copy this token now. You will not be able to see it again."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:d.key,className:"flex-grow mr-2 bg-white",type:"password",disabled:!0}),(0,t.jsx)(N.CopyToClipboard,{text:d.key,onCopy:()=>b.default.success("Token copied to clipboard"),children:(0,t.jsxs)(s.Button,{variant:"primary",className:"flex items-center",children:[(0,t.jsx)(M.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]}),(0,t.jsxs)(s.Button,{className:"mt-4 flex items-center",variant:"secondary",onClick:()=>u(null),children:[(0,t.jsx)(P.PlusCircleOutlined,{className:"h-4 w-4 mr-1"}),"Create Another Token"]})]}):(0,t.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,t.jsxs)(g.Form,{form:n,onFinish:_,layout:"vertical",children:[(0,t.jsx)(g.Form.Item,{name:"key_alias",label:"Token Name",rules:[{required:!0,message:"Please enter a name for your token"}],children:(0,t.jsx)(k.TextInput,{placeholder:"SCIM Access Token"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsxs)(s.Button,{variant:"primary",type:"submit",loading:o,className:"flex items-center",children:[(0,t.jsx)(F.KeyOutlined,{className:"h-4 w-4 mr-1"}),"Create SCIM Token"]})})]})})]})]})]})})};var L=e.i(153472),U=e.i(954616),R=e.i(912598);let D=async(e,t)=>{let r=(0,w.getProxyBaseUrl)(),s=r?`${r}/config/update`:"/config/update",i=await fetch(s,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:t.store_prompts_in_spend_logs,...t.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:t.maximum_spend_logs_retention_period}}})});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update spend logs settings")}return await i.json()};var G=e.i(637235),V=e.i(175712),q=e.i(981339),H=e.i(790848);let $=()=>{let[e]=g.Form.useForm(),{mutate:s,isPending:i}=(()=>{let{accessToken:e}=(0,r.default)(),t=(0,R.useQueryClient)();return(0,U.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await D(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:L.proxyConfigKeys.all})}})})(),{mutate:l,isPending:a}=(0,L.useDeleteProxyConfigField)(),{data:n,isLoading:o}=(0,L.useProxyConfig)(L.ConfigType.GENERAL_SETTINGS),c=g.Form.useWatch("store_prompts_in_spend_logs",e),d=(0,j.useMemo)(()=>{if(!n)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let e=n.find(e=>"store_prompts_in_spend_logs"===e.field_name),t=n.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:e?.field_value??!1,maximum_spend_logs_retention_period:t?.field_value??void 0}},[n]);return(0,t.jsx)(V.Card,{title:"Logging Settings",children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[(0,t.jsx)(y.Typography.Paragraph,{style:{marginBottom:0},type:"secondary",children:"Proxy-wide settings that control how request and response data are written to spend logs."}),(0,t.jsxs)(g.Form,{form:e,layout:"vertical",onFinish:e=>{let t=e.maximum_spend_logs_retention_period,r="string"==typeof t&&""!==t.trim(),i={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...r&&{maximum_spend_logs_retention_period:t}},a=()=>s(i,{onSuccess:()=>b.default.success("Spend logs settings updated successfully"),onError:e=>b.default.fromBackend("Failed to save spend logs settings: "+(0,B.parseErrorMessage)(e))});r?a():l({config_type:L.ConfigType.GENERAL_SETTINGS,field_name:L.GeneralSettingsFieldName.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD},{onError:e=>console.warn("Failed to delete retention period field (may not exist):",e),onSettled:a})},initialValues:d,children:[(0,t.jsx)(g.Form.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:n?.find(e=>"store_prompts_in_spend_logs"===e.field_name)?.field_description||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:o?(0,t.jsx)(q.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(H.Switch,{checked:c??!1,onChange:t=>e.setFieldValue("store_prompts_in_spend_logs",t)})}),(0,t.jsx)(g.Form.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:n?.find(e=>"maximum_spend_logs_retention_period"===e.field_name)?.field_description||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:o?(0,t.jsx)(q.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(h.Input,{placeholder:"e.g., 7d, 30d",prefix:(0,t.jsx)(G.ClockCircleOutlined,{})})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:i||a,disabled:o,children:i||a?"Saving...":"Save Settings"})})]},n?JSON.stringify(d):"loading")]})})};var K=e.i(266027),Q=e.i(243652);let W=(0,Q.createQueryKeys)("sso"),J=()=>{let{accessToken:e,userId:t,userRole:s}=(0,r.default)();return(0,K.useQuery)({queryKey:W.detail("settings"),queryFn:async()=>await (0,w.getSSOSettings)(e),enabled:!!(e&&t&&s)})};var Y=e.i(869216),X=e.i(262218),Z=e.i(688511),ee=e.i(98919),et=e.i(727612);let er={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},es={google:"Google SSO",microsoft:"Microsoft SSO",okta:"Okta / Auth0 SSO",generic:"Generic SSO"},ei={internal_user_viewer:"Internal Viewer",internal_user:"Internal User",proxy_admin_viewer:"Proxy Admin Viewer",proxy_admin:"Proxy Admin"};var el=e.i(536916),ea=e.i(199133);let en={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},eo=({form:e,onFormSubmit:r})=>(0,t.jsx)("div",{children:(0,t.jsxs)(g.Form,{form:e,onFinish:r,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(g.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(ea.Select,{children:Object.entries(er).map(([e,r])=>(0,t.jsx)(ea.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[r&&(0,t.jsx)("img",{src:r,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsx)("span",{children:es[e]||e.charAt(0).toUpperCase()+e.slice(1)+" SSO"})]})},e))})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let r,s=e("sso_provider");return s&&(r=en[s])?r.fields.map(e=>(0,t.jsx)(g.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(h.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let r=e("sso_provider");return"okta"===r||"generic"===r?(0,t.jsx)(g.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(el.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let r=e("use_role_mappings"),s=e("sso_provider");return r&&("okta"===s||"generic"===s)?(0,t.jsx)(g.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let r=e("use_role_mappings"),s=e("sso_provider");return r&&("okta"===s||"generic"===s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(ea.Select,{children:[(0,t.jsx)(ea.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(ea.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(ea.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(ea.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let r=e("sso_provider");return"okta"===r||"generic"===r?(0,t.jsx)(g.Form.Item,{label:"Use Team Mappings",name:"use_team_mappings",valuePropName:"checked",children:(0,t.jsx)(el.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_team_mappings!==t.use_team_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let r=e("use_team_mappings"),s=e("sso_provider");return r&&("okta"===s||"generic"===s)?(0,t.jsx)(g.Form.Item,{label:"Team IDs JWT Field",name:"team_ids_jwt_field",rules:[{required:!0,message:"Please enter the team IDs JWT field"}],children:(0,t.jsx)(k.TextInput,{})}):null}})]})}),ec=()=>{let{accessToken:e}=(0,r.default)();return(0,U.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await (0,w.updateSSOSettings)(e,t)}})},ed=e=>{let{proxy_admin_teams:t,admin_viewer_teams:r,internal_user_teams:s,internal_viewer_teams:i,default_role:l,group_claim:a,use_role_mappings:n,use_team_mappings:o,team_ids_jwt_field:c,...d}=e,u={...d},p=d.sso_provider;if(n&&("okta"===p||"generic"===p)){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:a,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[l]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(r),internal_user:e(s),internal_user_viewer:e(i)}}}return o&&("okta"===p||"generic"===p)&&(u.team_mappings={team_ids_jwt_field:c}),u},eu=e=>e.google_client_id?"google":e.microsoft_client_id?"microsoft":e.generic_client_id?e.generic_authorization_endpoint?.includes("okta")||e.generic_authorization_endpoint?.includes("auth0")?"okta":"generic":null,ep=({isVisible:e,onCancel:r,onSuccess:s})=>{let[i]=g.Form.useForm(),{mutateAsync:l,isPending:a}=ec(),n=async e=>{let t=ed(e);await l(t,{onSuccess:()=>{b.default.success("SSO settings added successfully"),s()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}})},o=()=>{i.resetFields(),r()};return(0,t.jsx)(_.Modal,{title:"Add SSO",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:o,disabled:a,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:a,onClick:()=>i.submit(),children:a?"Adding...":"Add SSO"})]}),onCancel:o,children:(0,t.jsx)(eo,{form:i,onFormSubmit:n})})};var em=e.i(127952);let eg=({isVisible:e,onCancel:r,onSuccess:s})=>{let{data:i}=J(),{mutateAsync:l,isPending:a}=ec(),n=async()=>{await l({google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null,team_mappings:null},{onSuccess:()=>{b.default.success("SSO settings cleared successfully"),r(),s()},onError:e=>{b.default.fromBackend("Failed to clear SSO settings: "+(0,B.parseErrorMessage)(e))}})};return(0,t.jsx)(em.default,{isOpen:e,title:"Confirm Clear SSO Settings",alertMessage:"This action cannot be undone.",message:"Are you sure you want to clear all SSO settings? Users will no longer be able to login using SSO after this change.",resourceInformationTitle:"SSO Settings",resourceInformation:[{label:"Provider",value:i?.values&&eu(i?.values)||"Generic"}],onCancel:r,onOk:n,confirmLoading:a})},eh=({isVisible:e,onCancel:r,onSuccess:s})=>{let[i]=g.Form.useForm(),l=J(),{mutateAsync:a,isPending:n}=ec();(0,j.useEffect)(()=>{if(e&&l.data&&l.data.values){let e=l.data;console.log("Raw SSO data received:",e),console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let r={};if(e.values.role_mappings){let t=e.values.role_mappings,s=e=>e&&0!==e.length?e.join(", "):"";r={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:s(t.roles?.proxy_admin),admin_viewer_teams:s(t.roles?.proxy_admin_viewer),internal_user_teams:s(t.roles?.internal_user),internal_viewer_teams:s(t.roles?.internal_user_viewer)}}let s={};e.values.team_mappings&&(s={use_team_mappings:!0,team_ids_jwt_field:e.values.team_mappings.team_ids_jwt_field});let a={sso_provider:t,...e.values,...r,...s};console.log("Setting form values:",a),i.resetFields(),setTimeout(()=>{i.setFieldsValue(a),console.log("Form values set, current form values:",i.getFieldsValue())},100)}},[e,l.data,i]);let o=async e=>{try{let t=ed(e);await a(t,{onSuccess:()=>{b.default.success("SSO settings updated successfully"),s()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}})}catch(e){b.default.fromBackend("Failed to process SSO settings: "+(0,B.parseErrorMessage)(e))}},c=()=>{i.resetFields(),r()};return(0,t.jsx)(_.Modal,{title:"Edit SSO Settings",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:c,disabled:n,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:n,onClick:()=>i.submit(),children:n?"Saving...":"Save"})]}),onCancel:c,children:(0,t.jsx)(eo,{form:i,onFormSubmit:o})})};var e_=e.i(286536),ex=e.i(77705);function ef({defaultHidden:e=!0,value:r}){let[s,i]=(0,j.useState)(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-gray-600 flex-1",children:r?s?"•".repeat(r.length):r:(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})}),r&&(0,t.jsx)(m.Button,{type:"text",size:"small",icon:s?(0,t.jsx)(e_.Eye,{className:"w-4 h-4"}):(0,t.jsx)(ex.EyeOff,{className:"w-4 h-4"}),onClick:()=>i(!s),className:"text-gray-400 hover:text-gray-600"})]})}var ey=e.i(312361),ej=e.i(291542),ev=e.i(761911);let{Title:eS,Text:eb}=y.Typography;function ew({roleMappings:e}){if(!e)return null;let r=[{title:"Role",dataIndex:"role",key:"role",render:e=>(0,t.jsx)(eb,{strong:!0,children:ei[e]})},{title:"Mapped Groups",dataIndex:"groups",key:"groups",render:e=>(0,t.jsx)(t.Fragment,{children:e.length>0?e.map((e,r)=>(0,t.jsx)(X.Tag,{color:"blue",children:e},r)):(0,t.jsx)(eb,{className:"text-gray-400 italic",children:"No groups mapped"})})}];return(0,t.jsxs)(V.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ev.Users,{className:"w-6 h-6 text-gray-400 mb-2"}),(0,t.jsx)(eS,{level:3,children:"Role Mappings"})]}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eS,{level:5,children:"Group Claim"}),(0,t.jsx)("div",{children:(0,t.jsx)(eb,{code:!0,children:e.group_claim})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eS,{level:5,children:"Default Role"}),(0,t.jsx)("div",{children:(0,t.jsx)(eb,{strong:!0,children:ei[e.default_role]})})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsx)(ej.Table,{columns:r,dataSource:Object.entries(e.roles).map(([e,t])=>({role:e,groups:t})),pagination:!1,bordered:!0,size:"small",className:"w-full"})]})]})}var eC=e.i(21548);let{Title:eI,Paragraph:eT}=y.Typography;function ek({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(eC.Empty,{image:eC.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(eI,{level:4,children:"No SSO Configuration Found"}),(0,t.jsx)(eT,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Single Sign-On (SSO) to enable seamless authentication for your team members using your identity provider."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure SSO"})})})}let{Title:eE,Text:eN}=y.Typography;function eO(){return(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ee.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eE,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eN,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(q.Skeleton.Button,{active:!0,size:"default",style:{width:170,height:32}}),(0,t.jsx)(q.Skeleton.Button,{active:!0,size:"default",style:{width:190,height:32}})]})]}),(0,t.jsxs)(Y.Descriptions,{bordered:!0,...{column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},children:[(0,t.jsx)(Y.Descriptions.Item,{label:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:100,height:16}})})}),(0,t.jsx)(Y.Descriptions.Item,{label:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:200,height:16}})}),(0,t.jsx)(Y.Descriptions.Item,{label:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:250,height:16}})}),(0,t.jsx)(Y.Descriptions.Item,{label:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:180,height:16}})}),(0,t.jsx)(Y.Descriptions.Item,{label:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(q.Skeleton.Node,{active:!0,style:{width:220,height:16}})})]})]})})}let{Title:eF,Text:eM}=y.Typography;function eA(){let{data:e,refetch:r,isLoading:s}=J(),[i,l]=(0,j.useState)(!1),[a,n]=(0,j.useState)(!1),[o,c]=(0,j.useState)(!1),d=!!e?.values.google_client_id||!!e?.values.microsoft_client_id||!!e?.values.generic_client_id,u=e?.values?eu(e.values):null,p=!!e?.values.role_mappings,g=!!e?.values.team_mappings,h=e=>(0,t.jsx)(eM,{className:"font-mono text-gray-600 text-sm",copyable:!!e,children:e||"-"}),_=e=>e||(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),f=e=>e.team_mappings?.team_ids_jwt_field?(0,t.jsx)(X.Tag,{children:e.team_mappings.team_ids_jwt_field}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),y={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},v={google:{providerText:es.google,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ef,{value:e.google_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ef,{value:e.google_client_secret})},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)}]},microsoft:{providerText:es.microsoft,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ef,{value:e.microsoft_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ef,{value:e.microsoft_client_secret})},{label:"Tenant",render:e=>_(e.microsoft_tenant)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)}]},okta:{providerText:es.okta,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ef,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ef,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>h(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>h(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>h(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)},g?{label:"Team IDs JWT Field",render:e=>f(e)}:null]},generic:{providerText:es.generic,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ef,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ef,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>h(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>h(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>h(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)},g?{label:"Team IDs JWT Field",render:e=>f(e)}:null]}};return(0,t.jsxs)(t.Fragment,{children:[s?(0,t.jsx)(eO,{}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ee.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eF,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eM,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(Z.Edit,{className:"w-4 h-4"}),onClick:()=>c(!0),children:"Edit SSO Settings"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)(et.Trash2,{className:"w-4 h-4"}),onClick:()=>l(!0),children:"Delete SSO Settings"})]})})]}),d?(()=>{if(!e?.values||!u)return null;let{values:r}=e,s=v[u];return s?(0,t.jsxs)(Y.Descriptions,{bordered:!0,...y,children:[(0,t.jsx)(Y.Descriptions.Item,{label:"Provider",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[er[u]&&(0,t.jsx)("img",{src:er[u],alt:u,style:{height:24,width:24,objectFit:"contain"}}),(0,t.jsx)("span",{children:s.providerText})]})}),s.fields.map((e,s)=>e&&(0,t.jsx)(Y.Descriptions.Item,{label:e.label,children:e.render(r)},s))]}):null})():(0,t.jsx)(ek,{onAdd:()=>n(!0)})]})}),p&&(0,t.jsx)(ew,{roleMappings:e?.values.role_mappings})]}),(0,t.jsx)(eg,{isVisible:i,onCancel:()=>l(!1),onSuccess:()=>r()}),(0,t.jsx)(ep,{isVisible:a,onCancel:()=>n(!1),onSuccess:()=>{n(!1),r()}}),(0,t.jsx)(eh,{isVisible:o,onCancel:()=>c(!1),onSuccess:()=>{c(!1),r()}})]})}var eP=e.i(292639);let eB=(0,Q.createQueryKeys)("uiSettings");var ez=e.i(111672);let eL={"api-keys":"Manage virtual keys for API access and authentication","llm-playground":"Interactive playground for testing LLM requests",models:"Configure and manage LLM models and endpoints",agents:"Create and manage AI agents",agentic:"Manage agentic resources: agents, workflow runs, and memory",workflows:"Track and inspect durable workflow run history","mcp-servers":"Configure Model Context Protocol servers",memory:"Inspect and manage agent memory entries stored under /v1/memory",guardrails:"Set up content moderation and safety guardrails",policies:"Define access control and usage policies","search-tools":"Configure RAG search and retrieval tools","tool-policies":"Configure tool use policies and permissions","vector-stores":"Manage vector databases for embeddings",new_usage:"View usage analytics and metrics",logs:"Access request and response logs","guardrails-monitor":"Monitor guardrail performance and view logs",users:"Manage internal user accounts and permissions",teams:"Create and manage teams for access control",organizations:"Manage organizations and their members",projects:"Manage projects within teams","access-groups":"Manage access groups for role-based permissions",budgets:"Set and monitor spending budgets","api-reference":"Browse API documentation and endpoints","model-hub-table":"Explore available AI models and providers","learning-resources":"Access tutorials and documentation",caching:"Configure response caching settings","transform-request":"Set up request transformation rules","cost-tracking":"Track and analyze API costs","ui-theme":"Customize dashboard appearance","tag-management":"Organize resources with tags",prompts:"Manage and version prompt templates",skills:"Browse and manage Claude Code skills",usage:"View legacy usage dashboard","router-settings":"Configure routing and load balancing settings","logging-and-alerts":"Set up logging and alert configurations","admin-panel":"Access admin panel and settings"};var eU=e.i(708347);let eR=e=>!e||0===e.length||e.some(e=>eU.internalUserRoles.includes(e));var eD=e.i(362024);function eG({enabledPagesInternalUsers:e,enabledPagesPropertyDescription:r,isUpdating:s,onUpdate:i}){let l=null!=e,a=(0,j.useMemo)(()=>{let e;return e=[],ez.menuGroups.forEach(t=>{t.items.forEach(r=>{if(r.page&&"tools"!==r.page&&"experimental"!==r.page&&"settings"!==r.page&&eR(r.roles)){let s="string"==typeof r.label?r.label:r.key;e.push({page:r.page,label:s,group:t.groupLabel,description:eL[r.page]||"No description available"})}if(r.children){let s="string"==typeof r.label?r.label:r.key;r.children.forEach(r=>{if(eR(r.roles)){let i="string"==typeof r.label?r.label:r.key;e.push({page:r.page,label:i,group:`${t.groupLabel} > ${s}`,description:eL[r.page]||"No description available"})}})}})}),e},[]),n=(0,j.useMemo)(()=>{let e={};return a.forEach(t=>{e[t.group]||(e[t.group]=[]),e[t.group].push(t)}),e},[a]),[o,c]=(0,j.useState)(e||[]);return(0,j.useMemo)(()=>{e?c(e):c([])},[e]),(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsxs)(x.Space,{align:"center",children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Internal User Page Visibility"}),!l&&(0,t.jsx)(X.Tag,{color:"default",style:{marginLeft:"8px"},children:"Not set (all pages visible)"}),l&&(0,t.jsxs)(X.Tag,{color:"blue",style:{marginLeft:"8px"},children:[o.length," page",1!==o.length?"s":""," selected"]})]}),r&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:r}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"By default, all pages are visible to internal users. Select specific pages to restrict visibility."}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",color:"#8b5cf6"},children:"Note: Only pages accessible to internal user roles are shown here. Admin-only pages are excluded as they cannot be made visible to internal users regardless of this setting."})]}),(0,t.jsx)(eD.Collapse,{items:[{key:"page-visibility",label:"Configure Page Visibility",children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(el.Checkbox.Group,{value:o,onChange:c,style:{width:"100%"},children:(0,t.jsx)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:Object.entries(n).map(([e,r])=>(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Typography.Text,{strong:!0,style:{fontSize:"11px",color:"#6b7280",letterSpacing:"0.05em",display:"block",marginBottom:"8px"},children:e}),(0,t.jsx)(x.Space,{direction:"vertical",size:"small",style:{marginLeft:"16px",width:"100%"},children:r.map(e=>(0,t.jsx)("div",{style:{marginBottom:"4px"},children:(0,t.jsx)(el.Checkbox,{value:e.page,children:(0,t.jsxs)(x.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(y.Typography.Text,{children:e.label}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px"},children:e.description})]})})},e.page))})]},e))})}),(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{type:"primary",onClick:()=>{i({enabled_ui_pages_internal_users:o.length>0?o:null})},loading:s,disabled:s,children:"Save Page Visibility Settings"}),l&&(0,t.jsx)(m.Button,{onClick:()=>{c([]),i({enabled_ui_pages_internal_users:null})},loading:s,disabled:s,children:"Reset to Default (All Pages)"})]})]})}]})]})}function eV(){let e,{accessToken:s}=(0,r.default)(),{data:i,isLoading:l,isError:a,error:n}=(0,eP.useUISettings)(),{mutate:o,isPending:c,error:d}=(e=(0,R.useQueryClient)(),(0,U.useMutation)({mutationFn:async e=>{if(!s)throw Error("Access token is required");return(0,w.updateUiSettings)(s,e)},onSuccess:()=>{e.invalidateQueries({queryKey:eB.all})}})),u=i?.field_schema,m=u?.properties?.disable_model_add_for_internal_users,g=u?.properties?.disable_team_admin_delete_team_user,h=u?.properties?.require_auth_for_public_ai_hub,_=u?.properties?.forward_client_headers_to_llm_api,f=u?.properties?.forward_llm_provider_auth_headers,j=u?.properties?.enable_projects_ui,v=u?.properties?.enabled_ui_pages_internal_users,S=u?.properties?.disable_agents_for_internal_users,C=u?.properties?.allow_agents_for_team_admins,I=u?.properties?.disable_vector_stores_for_internal_users,T=u?.properties?.allow_vector_stores_for_team_admins,k=u?.properties?.scope_user_search_to_org,E=u?.properties?.disable_custom_api_keys,N=i?.values??{},O=!!N.disable_model_add_for_internal_users,F=!!N.disable_team_admin_delete_team_user,M=!!N.disable_agents_for_internal_users,A=!!N.disable_vector_stores_for_internal_users;return(0,t.jsx)(V.Card,{title:"UI Settings",children:l?(0,t.jsx)(q.Skeleton,{active:!0}):a?(0,t.jsx)(p.Alert,{type:"error",message:"Could not load UI settings",description:n instanceof Error?n.message:void 0}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[u?.description&&(0,t.jsx)(y.Typography.Paragraph,{style:{marginBottom:0},children:u.description}),d&&(0,t.jsx)(p.Alert,{type:"error",message:"Could not update UI settings",description:d instanceof Error?d.message:void 0}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:O,disabled:c,loading:c,onChange:e=>{o({disable_model_add_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":m?.description??"Disable model add for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable model add for internal users"}),m?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:m.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:F,disabled:c,loading:c,onChange:e=>{o({disable_team_admin_delete_team_user:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":g?.description??"Disable team admin delete team user"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable team admin delete team user"}),g?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:g.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:N.require_auth_for_public_ai_hub,disabled:c,loading:c,onChange:e=>{o({require_auth_for_public_ai_hub:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":h?.description??"Require authentication for public AI Hub"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Require authentication for public AI Hub"}),h?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:h.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:!!N.forward_client_headers_to_llm_api,disabled:c,loading:c,onChange:e=>{o({forward_client_headers_to_llm_api:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":_?.description??"Forward client headers to LLM API"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Forward client headers to LLM API"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:_?.description??"Forwards client headers (Authorization, anthropic-beta, and x-* custom headers) to the upstream LLM. Enable for Claude Code with a Max subscription (forwards the OAuth token) or to pass custom/tracing headers through to the provider. Independent of the BYOK toggle — enable only the one(s) you need."})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:!!N.forward_llm_provider_auth_headers,disabled:c,loading:c,onChange:e=>{o({forward_llm_provider_auth_headers:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":f?.description??"Forward LLM provider auth headers"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Forward LLM provider auth headers"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:f?.description??"Forwards provider auth headers (x-api-key, x-goog-api-key, api-key, ocp-apim-subscription-key) to the upstream LLM, overriding any deployment-configured key for that request. Enable for Claude Code BYOK (clients bring their own API key). Independent of the client-headers toggle — enable only the one(s) you need."})]})]}),j&&(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:!!N.enable_projects_ui,disabled:c,loading:c,onChange:e=>{o({enable_projects_ui:e},{onSuccess:()=>{b.default.success("UI settings updated successfully. Refreshing page..."),setTimeout(()=>window.location.reload(),1e3)},onError:e=>{b.default.fromBackend(e)}})},"aria-label":j.description??"Enable Projects UI"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"[BETA] Enable Projects (page will refresh)"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:j.description??"If enabled, shows the Projects feature in the UI sidebar and the project field in key management."})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:M,disabled:c,loading:c,onChange:e=>{o({disable_agents_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":S?.description??"Disable agents for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable agents for internal users"}),S?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:S.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(H.Switch,{checked:!!N.allow_agents_for_team_admins,disabled:c||!M,loading:c,onChange:e=>{o({allow_agents_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":C?.description??"Allow agents for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:M?void 0:"secondary",children:"Allow agents for team admins"}),C?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:C.description})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:A,disabled:c,loading:c,onChange:e=>{o({disable_vector_stores_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":I?.description??"Disable vector stores for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable vector stores for internal users"}),I?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:I.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(H.Switch,{checked:!!N.allow_vector_stores_for_team_admins,disabled:c||!A,loading:c,onChange:e=>{o({allow_vector_stores_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":T?.description??"Allow vector stores for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:A?void 0:"secondary",children:"Allow vector stores for team admins"}),T?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:T.description})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:!!N.scope_user_search_to_org,disabled:c,loading:c,onChange:e=>{o({scope_user_search_to_org:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":k?.description??"Scope user search to organization"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Scope user search to organization"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:k?.description??"If enabled, the user search endpoint restricts results by organization. When off, any authenticated user can search all users."})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(H.Switch,{checked:!!N.disable_custom_api_keys,disabled:c,loading:c,onChange:e=>{o({disable_custom_api_keys:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":E?.description??"Disable custom Virtual key values"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable custom Virtual key values"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:E?.description??"If true, users cannot specify custom key values. All keys must be auto-generated."})]})]}),(0,t.jsx)(ey.Divider,{}),(0,t.jsx)(eG,{enabledPagesInternalUsers:N.enabled_ui_pages_internal_users,enabledPagesPropertyDescription:v?.description,isUpdating:c,onUpdate:e=>{o(e,{onSuccess:()=>{b.default.success("Page visibility settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})}})]})})}let eq=async e=>{let t=(0,w.getProxyBaseUrl)(),r=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",s=await fetch(r,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!s.ok){let e=await s.json();throw Error((0,w.deriveErrorMessage)(e))}return await s.json()},eH=async(e,t)=>{let r=(0,w.getProxyBaseUrl)(),s=r?`${r}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",i=await fetch(s,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok){let e=await i.json();throw Error((0,w.deriveErrorMessage)(e))}return await i.json()},e$=async e=>{let t=(0,w.getProxyBaseUrl)(),r=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",s=await fetch(r,{method:"DELETE",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!s.ok){let e=await s.json();throw Error((0,w.deriveErrorMessage)(e))}return await s.json()},eK=async e=>{let t=(0,w.getProxyBaseUrl)(),r=t?`${t}/config_overrides/hashicorp_vault/test_connection`:"/config_overrides/hashicorp_vault/test_connection",s=await fetch(r,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!s.ok){let e=await s.json();throw Error((0,w.deriveErrorMessage)(e))}return await s.json()},eQ=(0,Q.createQueryKeys)("hashicorpVaultConfig"),eW=()=>{let{accessToken:e}=(0,r.default)();return(0,K.useQuery)({queryKey:eQ.list({}),queryFn:async()=>{if(!e)throw Error("Access token is required");return eq(e)},enabled:!!e,staleTime:36e5,gcTime:36e5})},eJ=e=>{let t=(0,R.useQueryClient)();return(0,U.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return eH(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:eQ.all})}})};var eY=e.i(525720),eX=e.i(475254);let eZ=(0,eX.default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]),e0=(0,eX.default)("plug-zap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]),e1=new Set(["vault_token","approle_secret_id","client_key"]),e2={vault_addr:"Vault Address",vault_namespace:"Namespace",vault_mount_name:"KV Mount Name",vault_path_prefix:"Path Prefix",vault_token:"Token",approle_role_id:"Role ID",approle_secret_id:"Secret ID",approle_mount_path:"Mount Path",client_cert:"Client Certificate",client_key:"Client Key",vault_cert_role:"Certificate Role"},e3=[{title:"Connection",fields:["vault_addr","vault_namespace","vault_mount_name","vault_path_prefix"]},{title:"Token Authentication",subtitle:"Use a Vault token to authenticate. Only one auth method is required.",fields:["vault_token"]},{title:"AppRole Authentication",subtitle:"Use AppRole credentials to authenticate. Only one auth method is required.",fields:["approle_role_id","approle_secret_id","approle_mount_path"]},{title:"TLS",subtitle:"Optional client certificate for mTLS.",fields:["client_cert","client_key","vault_cert_role"]}],e4=({isVisible:e,onCancel:s,onSuccess:i})=>{let[l]=g.Form.useForm(),{accessToken:a}=(0,r.default)(),{data:n}=eW(),{mutate:o,isPending:c}=eJ(a),d=n?.field_schema,u=d?.properties??{},p=n?.values??{};(0,j.useEffect)(()=>{if(e&&n){l.resetFields();let e={};for(let[t,r]of Object.entries(p))e1.has(t)||(e[t]=r);l.setFieldsValue(e)}},[e,n,l]);let f=()=>{l.resetFields(),s()},v=e=>{let r=u[e];if(!r)return null;let s="vault_addr"===e?[{pattern:/^https?:\/\/.+/,message:"Must start with http:// or https://"}]:void 0,i=e1.has(e),l=p[e],a=i&&null!=l&&""!==l?`Leave blank to keep existing (${l})`:r?.description;return(0,t.jsx)(g.Form.Item,{name:e,label:e2[e]??e,rules:s,children:i?(0,t.jsx)(h.Input.Password,{placeholder:a}):(0,t.jsx)(h.Input,{placeholder:r?.description})},e)};return(0,t.jsx)(_.Modal,{title:"Edit Hashicorp Vault Configuration",open:e,width:700,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:f,disabled:c,children:"Cancel"}),(0,t.jsx)(m.Button,{type:"primary",loading:c,onClick:()=>l.submit(),children:c?"Saving...":"Save"})]}),onCancel:f,children:(0,t.jsx)(g.Form,{form:l,layout:"vertical",onFinish:e=>{let t={};for(let[r,s]of Object.entries(e))null!=s&&""!==s?t[r]=s:e1.has(r)||(t[r]="");o(t,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration updated successfully"),i()},onError:e=>{b.default.fromBackend(e)}})},children:e3.map((e,r)=>(0,t.jsxs)("div",{children:[r>0&&(0,t.jsx)(ey.Divider,{}),(0,t.jsx)(y.Typography.Title,{level:5,style:{marginBottom:4},children:e.title}),e.subtitle&&(0,t.jsx)(y.Typography.Paragraph,{type:"secondary",style:{marginBottom:16},children:e.subtitle}),e.fields.map(v)]},e.title))})})},{Title:e6,Paragraph:e8}=y.Typography;function e7({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(eC.Empty,{image:eC.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(e6,{level:4,children:"No Vault Configuration Found"}),(0,t.jsx)(e8,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Hashicorp Vault to securely manage provider API keys and secrets for your LiteLLM deployment."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure Vault"})})})}let{Title:e5,Text:e9}=y.Typography,te={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}};function tt(){let e,{accessToken:s}=(0,r.default)(),{data:i,isLoading:l,isError:a,error:n}=eW(),{mutate:o,isPending:c}=(e=(0,R.useQueryClient)(),(0,U.useMutation)({mutationFn:async()=>{if(!s)throw Error("Access token is required");return e$(s)},onSuccess:()=>{e.invalidateQueries({queryKey:eQ.all})}})),{mutate:d,isPending:u}=eJ(s),[g,h]=(0,j.useState)(!1),[_,f]=(0,j.useState)(!1),[v,S]=(0,j.useState)(null),[w,C]=(0,j.useState)(!1),I=i?.values??{},T=!!I.vault_addr,k=async()=>{if(s){C(!0);try{let e=await eK(s);b.default.success(e.message||"Connection to Vault successful!")}catch(e){b.default.fromBackend(e)}finally{C(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(V.Card,{children:(0,t.jsx)(q.Skeleton,{active:!0})}):a?(0,t.jsx)(V.Card,{children:(0,t.jsx)(p.Alert,{type:"error",message:"Could not load Hashicorp Vault configuration",description:n instanceof Error?n.message:void 0})}):(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)(eY.Flex,{justify:"space-between",align:"center",children:[(0,t.jsxs)(eY.Flex,{align:"center",gap:12,children:[(0,t.jsx)(eZ,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(e5,{level:3,style:{marginBottom:0},children:"Hashicorp Vault"}),(0,t.jsx)(e9,{type:"secondary",children:"Manage secret manager configuration"})]})]}),(0,t.jsx)(x.Space,{children:T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(e0,{className:"w-4 h-4"}),loading:w,onClick:k,children:"Test Connection"}),(0,t.jsx)(m.Button,{icon:(0,t.jsx)(Z.Edit,{className:"w-4 h-4"}),onClick:()=>h(!0),children:"Edit Configuration"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)(et.Trash2,{className:"w-4 h-4"}),onClick:()=>f(!0),children:"Delete Configuration"})]})})]}),T&&(0,t.jsx)(p.Alert,{type:"info",showIcon:!0,message:'Secrets must be stored with the field name "key"',description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e9,{code:!0,children:"vault kv put secret/SECRET_NAME key=secret_value"}),(0,t.jsx)("br",{}),(0,t.jsx)(y.Typography.Link,{href:"https://docs.litellm.ai/docs/secret_managers/hashicorp_vault",target:"_blank",children:"View documentation"})]})}),T?(()=>{let e=Object.entries(I).filter(([e,t])=>null!=t&&""!==t);return 0===e.length?null:(0,t.jsxs)(Y.Descriptions,{bordered:!0,...te,children:[(0,t.jsx)(Y.Descriptions.Item,{label:"Auth Method",children:(0,t.jsx)(e9,{children:I.approle_role_id||I.approle_secret_id?"AppRole":I.client_cert&&I.client_key?"TLS Certificate":I.vault_token?"Token":"None"})}),e.map(([e])=>{let r;return(0,t.jsx)(Y.Descriptions.Item,{label:e2[e]??e,children:(r=I[e])?e1.has(e)?(0,t.jsxs)(eY.Flex,{justify:"space-between",align:"center",children:[(0,t.jsx)(e9,{className:"font-mono text-gray-600",children:r}),(0,t.jsx)(m.Button,{type:"text",size:"small",danger:!0,icon:(0,t.jsx)(et.Trash2,{className:"w-3.5 h-3.5"}),onClick:()=>S(e)})]}):(0,t.jsx)(e9,{className:"font-mono text-gray-600",children:r}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})},e)})]})})():(0,t.jsx)(e7,{onAdd:()=>h(!0)})]})}),(0,t.jsx)(e4,{isVisible:g,onCancel:()=>h(!1),onSuccess:()=>h(!1)}),(0,t.jsx)(em.default,{isOpen:_,title:"Delete Hashicorp Vault Configuration?",message:"Models using Vault secrets will lose access to their API keys until a new configuration is saved.",resourceInformationTitle:"Vault Configuration",resourceInformation:[{label:"Vault Address",value:I.vault_addr}],onCancel:()=>f(!1),onOk:()=>{o(void 0,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration deleted"),f(!1)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:c}),(0,t.jsx)(em.default,{isOpen:null!==v,title:`Clear ${v?e2[v]??v:""}?`,message:"This will remove the stored value.",resourceInformationTitle:"Field",resourceInformation:[{label:"Field",value:v?e2[v]??v:""}],onCancel:()=>S(null),onOk:()=>{v&&d({[v]:""},{onSuccess:()=>{b.default.success(`${e2[v]??v} cleared`),S(null)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:u})]})}let tr={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},ts={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},ti=({isAddSSOModalVisible:e,isInstructionsModalVisible:r,handleAddSSOOk:s,handleAddSSOCancel:i,handleShowInstructions:l,handleInstructionsOk:a,handleInstructionsCancel:n,form:o,accessToken:c,ssoConfigured:d=!1})=>{let[u,p]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e&&c)try{let e=await (0,w.getSSOSettings)(c);if(console.log("Raw SSO data received:",e),e&&e.values){console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let r={};if(e.values.role_mappings){let t=e.values.role_mappings,s=e=>e&&0!==e.length?e.join(", "):"";r={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:s(t.roles?.proxy_admin),admin_viewer_teams:s(t.roles?.proxy_admin_viewer),internal_user_teams:s(t.roles?.internal_user),internal_viewer_teams:s(t.roles?.internal_user_viewer)}}let s={sso_provider:t,proxy_base_url:e.values.proxy_base_url,user_email:e.values.user_email,...e.values,...r};console.log("Setting form values:",s),o.resetFields(),setTimeout(()=>{o.setFieldsValue(s),console.log("Form values set, current form values:",o.getFieldsValue())},100)}}catch(e){console.error("Failed to load SSO settings:",e)}})()},[e,c,o]);let x=async e=>{if(!c)return void b.default.fromBackend("No access token available");try{let{proxy_admin_teams:t,admin_viewer_teams:r,internal_user_teams:s,internal_viewer_teams:i,default_role:a,group_claim:n,use_role_mappings:o,...d}=e,u={...d};if(o){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:n,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[a]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(r),internal_user:e(s),internal_user_viewer:e(i)}}}await (0,w.updateSSOSettings)(c,u),l(e)}catch(e){b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}},f=async()=>{if(!c)return void b.default.fromBackend("No access token available");try{await (0,w.updateSSOSettings)(c,{google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null}),o.resetFields(),p(!1),s(),b.default.success("SSO settings cleared successfully")}catch(e){console.error("Failed to clear SSO settings:",e),b.default.fromBackend("Failed to clear SSO settings")}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.Modal,{title:d?"Edit SSO Settings":"Add SSO",open:e,width:800,footer:null,onOk:s,onCancel:i,children:(0,t.jsxs)(g.Form,{form:o,onFinish:x,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(ea.Select,{children:Object.entries(tr).map(([e,r])=>(0,t.jsx)(ea.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[r&&(0,t.jsx)("img",{src:r,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsxs)("span",{children:["okta"===e.toLowerCase()?"Okta / Auth0":e.charAt(0).toUpperCase()+e.slice(1)," ","SSO"]})]})},e))})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let r,s=e("sso_provider");return s&&(r=ts[s])?r.fields.map(e=>(0,t.jsx)(g.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(h.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let r=e("sso_provider");return"okta"===r||"generic"===r?(0,t.jsx)(g.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(el.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsx)(g.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(ea.Select,{children:[(0,t.jsx)(ea.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(ea.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(ea.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(ea.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null})]}),(0,t.jsxs)("div",{style:{textAlign:"right",marginTop:"10px",display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px"},children:[d&&(0,t.jsx)(m.Button,{onClick:()=>p(!0),style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#5558eb",e.currentTarget.style.borderColor="#5558eb"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1",e.currentTarget.style.borderColor="#6366f1"},children:"Clear"}),(0,t.jsx)(m.Button,{htmlType:"submit",children:"Save"})]})]})}),(0,t.jsxs)(_.Modal,{title:"Confirm Clear SSO Settings",open:u,onOk:f,onCancel:()=>p(!1),okText:"Yes, Clear",cancelText:"Cancel",okButtonProps:{danger:!0,style:{backgroundColor:"#dc2626",borderColor:"#dc2626"}},children:[(0,t.jsx)("p",{children:"Are you sure you want to clear all SSO settings? This action cannot be undone."}),(0,t.jsx)("p",{children:"Users will no longer be able to login using SSO after this change."})]}),(0,t.jsxs)(_.Modal,{title:"SSO Setup Instructions",open:r,width:800,footer:null,onOk:a,onCancel:n,children:[(0,t.jsx)("p",{children:"Follow these steps to complete the SSO setup:"}),(0,t.jsx)(I.Text,{className:"mt-2",children:"1. DO NOT Exit this TAB"}),(0,t.jsx)(I.Text,{className:"mt-2",children:"2. Open a new tab, visit your proxy base url"}),(0,t.jsx)(I.Text,{className:"mt-2",children:"3. Confirm your SSO is configured correctly and you can login on the new Tab"}),(0,t.jsx)(I.Text,{className:"mt-2",children:"4. If Step 3 is successful, you can close this tab"}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(m.Button,{onClick:a,children:"Done"})})]})]})},tl=({accessToken:e,onSuccess:r})=>{let[s]=g.Form.useForm(),[i,l]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e)try{let t=await (0,w.getSSOSettings)(e);if(t&&t.values){let e=t.values.ui_access_mode,r={};e&&"object"==typeof e?r={ui_access_mode_type:e.type,restricted_sso_group:e.restricted_sso_group,sso_group_jwt_field:e.sso_group_jwt_field}:"string"==typeof e&&(r={ui_access_mode_type:e,restricted_sso_group:t.values.restricted_sso_group,sso_group_jwt_field:t.values.team_ids_jwt_field||t.values.sso_group_jwt_field}),s.setFieldsValue(r)}}catch(e){console.error("Failed to load UI access settings:",e)}})()},[e,s]);let a=async t=>{if(!e)return void b.default.fromBackend("No access token available");l(!0);try{let s;s="all_authenticated_users"===t.ui_access_mode_type?{ui_access_mode:"none"}:{ui_access_mode:{type:t.ui_access_mode_type,restricted_sso_group:t.restricted_sso_group,sso_group_jwt_field:t.sso_group_jwt_field}},await (0,w.updateSSOSettings)(e,s),r()}catch(e){console.error("Failed to save UI access settings:",e),b.default.fromBackend("Failed to save UI access settings")}finally{l(!1)}};return(0,t.jsxs)("div",{style:{padding:"16px"},children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},children:(0,t.jsx)(I.Text,{style:{fontSize:"14px",color:"#6b7280"},children:"Configure who can access the UI interface and how group information is extracted from JWT tokens."})}),(0,t.jsxs)(g.Form,{form:s,onFinish:a,layout:"vertical",children:[(0,t.jsx)(g.Form.Item,{label:"UI Access Mode",name:"ui_access_mode_type",tooltip:"Controls who can access the UI interface",children:(0,t.jsxs)(ea.Select,{placeholder:"Select access mode",children:[(0,t.jsx)(ea.Select.Option,{value:"all_authenticated_users",children:"All Authenticated Users"}),(0,t.jsx)(ea.Select.Option,{value:"restricted_sso_group",children:"Restricted SSO Group"})]})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.ui_access_mode_type!==t.ui_access_mode_type,children:({getFieldValue:e})=>"restricted_sso_group"===e("ui_access_mode_type")?(0,t.jsx)(g.Form.Item,{label:"Restricted SSO Group",name:"restricted_sso_group",rules:[{required:!0,message:"Please enter the restricted SSO group"}],children:(0,t.jsx)(k.TextInput,{placeholder:"ui-access-group"})}):null}),(0,t.jsx)(g.Form.Item,{label:"SSO Group JWT Field",name:"sso_group_jwt_field",tooltip:"JWT field name that contains team/group information. Use dot notation to access nested fields.",children:(0,t.jsx)(k.TextInput,{placeholder:"groups"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"16px"},children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:i,style:{backgroundColor:"#6366f1",borderColor:"#6366f1"},children:"Update UI Access Control"})})]})]})},{Title:ta,Paragraph:tn,Text:to}=y.Typography;e.s(["default",0,({proxySettings:e})=>{let{premiumUser:y,accessToken:C,userId:I}=(0,r.default)(),[T]=g.Form.useForm(),[k,E]=(0,j.useState)(!1),[N,O]=(0,j.useState)(!1),[F,M]=(0,j.useState)(!1),[A,P]=(0,j.useState)(!1),[B,L]=(0,j.useState)(!1),[U,R]=(0,j.useState)(!1),[D,G]=(0,j.useState)([]),[V,q]=(0,j.useState)(null),[H,K]=(0,j.useState)(!1),Q=(0,S.useBaseUrl)(),W="All IP Addresses Allowed",J=Q;J+="/fallback/login";let Y=async()=>{if(C)try{let e=await (0,w.getSSOSettings)(C);if(e&&e.values){let t=e.values.google_client_id&&e.values.google_client_secret,r=e.values.microsoft_client_id&&e.values.microsoft_client_secret,s=e.values.generic_client_id&&e.values.generic_client_secret;K(t||r||s)}else K(!1)}catch(e){console.error("Error checking SSO configuration:",e),K(!1)}},X=async()=>{try{if(!0!==y)return void b.default.fromBackend("This feature is only available for premium users. Please upgrade your account.");if(C){let e=await (0,w.getAllowedIPs)(C);G(e&&e.length>0?e:[W])}else G([W])}catch(e){console.error("Error fetching allowed IPs:",e),b.default.fromBackend(`Failed to fetch allowed IPs ${e}`),G([W])}finally{!0===y&&M(!0)}},Z=async e=>{try{if(C){await (0,w.addAllowedIP)(C,e.ip);let t=await (0,w.getAllowedIPs)(C);G(t),b.default.success("IP address added successfully")}}catch(e){console.error("Error adding IP:",e),b.default.fromBackend(`Failed to add IP address ${e}`)}finally{P(!1)}},ee=async e=>{q(e),L(!0)},et=async()=>{if(V&&C)try{await (0,w.deleteAllowedIP)(C,V);let e=await (0,w.getAllowedIPs)(C);G(e.length>0?e:[W]),b.default.success("IP address deleted successfully")}catch(e){console.error("Error deleting IP:",e),b.default.fromBackend(`Failed to delete IP address ${e}`)}finally{L(!1),q(null)}};(0,j.useEffect)(()=>{Y()},[C,y,Y]);let er=()=>{R(!1)},es=[{key:"sso-settings",label:"SSO Settings",children:(0,t.jsx)(eA,{})},{key:"security-settings",label:"Security Settings",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(ta,{level:4,children:" ✨ Security Settings"}),(0,t.jsx)(p.Alert,{message:"SSO Configuration Deprecated",description:"Editing SSO Settings on this page is deprecated and will be removed in a future version. Please use the SSO Settings tab for SSO configuration.",type:"warning",showIcon:!0}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",marginTop:"1rem",marginLeft:"0.5rem"},children:[(0,t.jsx)("div",{children:(0,t.jsx)(s.Button,{style:{width:"150px"},onClick:()=>E(!0),children:H?"Edit SSO Settings":"Add SSO"})}),(0,t.jsx)("div",{children:(0,t.jsx)(s.Button,{style:{width:"150px"},onClick:X,children:"Allowed IPs"})}),(0,t.jsx)("div",{children:(0,t.jsx)(s.Button,{style:{width:"150px"},onClick:()=>!0===y?R(!0):b.default.fromBackend("Only premium users can configure UI access control"),children:"UI Access Control"})})]})]}),(0,t.jsxs)("div",{className:"flex justify-start mb-4",children:[(0,t.jsx)(ti,{isAddSSOModalVisible:k,isInstructionsModalVisible:N,handleAddSSOOk:()=>{E(!1),T.resetFields(),C&&y&&Y()},handleAddSSOCancel:()=>{E(!1),T.resetFields()},handleShowInstructions:e=>{E(!1),O(!0)},handleInstructionsOk:()=>{O(!1),C&&y&&Y()},handleInstructionsCancel:()=>{O(!1),C&&y&&Y()},form:T,accessToken:C,ssoConfigured:H}),(0,t.jsx)(_.Modal,{title:"Manage Allowed IP Addresses",width:800,open:F,onCancel:()=>M(!1),footer:[(0,t.jsx)(s.Button,{className:"mx-1",onClick:()=>P(!0),children:"Add IP Address"},"add"),(0,t.jsx)(s.Button,{onClick:()=>M(!1),children:"Close"},"close")],children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"IP Address"}),(0,t.jsx)(d.TableHeaderCell,{className:"text-right",children:"Action"})]})}),(0,t.jsx)(n.TableBody,{children:D.map((e,r)=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e}),(0,t.jsx)(o.TableCell,{className:"text-right",children:e!==W&&(0,t.jsx)(s.Button,{onClick:()=>ee(e),color:"red",size:"xs",children:"Delete"})})]},r))})]})}),(0,t.jsx)(_.Modal,{title:"Add Allowed IP Address",open:A,onCancel:()=>P(!1),footer:null,children:(0,t.jsxs)(g.Form,{onFinish:Z,children:[(0,t.jsx)(g.Form.Item,{name:"ip",rules:[{required:!0,message:"Please enter an IP address"}],children:(0,t.jsx)(h.Input,{placeholder:"Enter IP address"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{htmlType:"submit",children:"Add IP Address"})})]})}),(0,t.jsx)(_.Modal,{title:"Confirm Delete",open:B,onCancel:()=>L(!1),onOk:et,footer:[(0,t.jsx)(s.Button,{className:"mx-1",onClick:()=>et(),children:"Yes"},"delete"),(0,t.jsx)(s.Button,{onClick:()=>L(!1),children:"Close"},"close")],children:(0,t.jsxs)(to,{children:["Are you sure you want to delete the IP address: ",V,"?"]})}),(0,t.jsx)(_.Modal,{title:"UI Access Control Settings",open:U,width:600,footer:null,onOk:er,onCancel:()=>{R(!1)},children:(0,t.jsx)(tl,{accessToken:C,onSuccess:()=>{er(),b.default.success("UI Access Control settings updated successfully")}})})]}),(0,t.jsxs)(i.Callout,{title:"Login without SSO",color:"teal",children:["If you need to login without sso, you can access"," ",(0,t.jsxs)("a",{href:J,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)("b",{children:J})," "]})]})]})},{key:"scim",label:"SCIM",children:(0,t.jsx)(z,{accessToken:C,userID:I,proxySettings:e})},{key:"ui-settings",label:(0,t.jsx)(x.Space,{children:(0,t.jsxs)(to,{children:["UI Settings ",(0,t.jsx)(v.default,{})]})}),children:(0,t.jsx)(eV,{})},{key:"logging-settings",label:"Logging Settings",children:(0,t.jsx)($,{})},{key:"hashicorp-vault",label:"Hashicorp Vault",children:(0,t.jsx)(tt,{})}];return(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsx)(ta,{level:4,children:"Admin Access "}),(0,t.jsx)(tn,{children:"Go to 'Internal Users' page to add other admins."}),(0,t.jsx)(f.Tabs,{items:es})]})}],105278)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d705b57c88e51101.js b/litellm/proxy/_experimental/out/_next/static/chunks/d705b57c88e51101.js new file mode 100644 index 0000000000..a3f167f2ba --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/d705b57c88e51101.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),s=e.i(618566),a=e.i(947293),i=e.i(764205),r=e.i(954616),n=e.i(266027),o=e.i(612256);let d=(0,e.i(243652).createQueryKeys)("onboarding");var c=e.i(482725),u=e.i(56456);function g(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(c.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var m=e.i(560445),h=e.i(464571);function x(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(m.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(h.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),f=e.i(808613),y=e.i(311451),w=e.i(898586);function j({variant:e,userEmail:s,isPending:a,claimError:i,onSubmit:r}){let[n]=f.Form.useForm();return l.default.useEffect(()=>{s&&n.setFieldValue("user_email",s)},[s,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(m.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(h.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(f.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>r({password:e.password}),children:[(0,t.jsx)(f.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),i&&(0,t.jsx)(m.Alert,{type:"error",message:i,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(h.Button,{htmlType:"submit",loading:a,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function v({variant:e}){let c=(0,s.useSearchParams)().get("invitation_id"),[u,m]=l.default.useState(null),{data:h,isLoading:p,isError:f}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:d.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,i.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(c),{mutate:y,isPending:w}=(0,r.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:s})=>await (0,i.claimOnboardingToken)(e,t,l,s)}),v=h?.token?(0,a.jwtDecode)(h.token):null,S=v?.user_email??"",b=v?.user_id??null,_=v?.key??null,N=h?.token??null;return p?(0,t.jsx)(g,{}):f?(0,t.jsx)(x,{}):(0,t.jsx)(j,{variant:e,userEmail:S,isPending:w,claimError:u,onSubmit:e=>{_&&N&&b&&c&&(m(null),y({accessToken:_,inviteId:c,userId:b,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,i.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{m(e.message||"Failed to submit. Please try again.")}}))}})}function S(){let e=(0,s.useSearchParams)().get("action");return(0,t.jsx)(v,{variant:"reset_password"===e?"reset_password":"signup"})}function b(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(S,{})})}e.s(["default",()=>b],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),s=e.i(243652),a=e.i(764205),i=e.i(135214);let r=(0,s.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),d=e.i(199133),c=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:s,placeholder:u="Select a key alias",style:g,pageSize:m=50,allowClear:h=!0,disabled:x=!1,allFilters:p})=>{let[f,y]=(0,c.useState)(""),[w,j]=(0,o.useDebouncedState)("",{wait:300}),{data:v,fetchNextPage:S,hasNextPage:b,isFetchingNextPage:_,isLoading:N}=((e=50,t,s)=>{let{accessToken:n}=(0,i.default)();return(0,l.useInfiniteQuery)({queryKey:r.list({filters:{size:e,...t&&{search:t},...s&&{team_id:s}}}),queryFn:async({pageParam:l})=>await (0,a.keyAliasesCall)(n,l,e,t,s),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!v?.pages)return[];let e=new Set,t=[];for(let l of v.pages)for(let s of l.aliases)!s||e.has(s)||(e.add(s),t.push({label:s,value:s}));return t},[v]);return(0,t.jsx)(d.Select,{value:e||void 0,onChange:e=>{s?.(e??"")},placeholder:u,style:{width:"100%",...g},allowClear:h,disabled:x,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),j(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&b&&!_&&S()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:k,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),s=e.i(309426),a=e.i(350967),i=e.i(898586),r=e.i(947293),n=e.i(618566),o=e.i(271645),d=e.i(566606),c=e.i(584578),u=e.i(764205),g=e.i(702597),m=e.i(207082),h=e.i(109799),x=e.i(500330),p=e.i(871943),f=e.i(502547),y=e.i(360820),w=e.i(94629),j=e.i(152990),v=e.i(682830),S=e.i(389083),b=e.i(994388),_=e.i(752978),N=e.i(269200),k=e.i(942232),z=e.i(977572),I=e.i(427612),C=e.i(64848),D=e.i(496020),T=e.i(599724),A=e.i(827252),P=e.i(772345),O=e.i(464571),U=e.i(282786),R=e.i(981339),K=e.i(262218),L=e.i(592968),E=e.i(355619),B=e.i(633627),M=e.i(374009),$=e.i(700514),F=e.i(135214),V=e.i(50882),H=e.i(969550),W=e.i(304911),q=e.i(20147);function J({teams:e,organizations:l,onSortChange:s,currentSort:a}){let{data:r}=(0,h.useOrganizations)(),n=r??l??[],[d,c]=(0,o.useState)(null),[g,J]=o.default.useState(()=>a?[{id:a.sortBy,desc:"desc"===a.sortOrder}]:[{id:"created_at",desc:!0}]),[G,Q]=o.default.useState({pageIndex:0,pageSize:50}),Z=g.length>0?g[0].id:null,X=g.length>0?g[0].desc?"desc":"asc":null,{data:Y,isPending:ee,isFetching:et,isError:el,refetch:es}=(0,m.useKeys)(G.pageIndex+1,G.pageSize,{sortBy:Z||void 0,sortOrder:X||void 0,expand:"user"}),[ea,ei]=(0,o.useState)({}),{filters:er,filteredKeys:en,filteredTotalCount:eo,allTeams:ed,allOrganizations:ec,handleFilterChange:eu,handleFilterReset:eg}=function({keys:e,teams:t,organizations:l}){let s={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:a}=(0,F.default)(),[i,r]=(0,o.useState)(s),[n,d]=(0,o.useState)(t||[]),[c,g]=(0,o.useState)(l||[]),[m,h]=(0,o.useState)(e),[x,p]=(0,o.useState)(null),f=(0,o.useRef)(0),y=(0,o.useCallback)((0,M.default)(async e=>{if(!a)return;let t=Date.now();f.current=t;try{let l=await (0,u.keyListCall)(a,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,$.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===f.current&&l&&(h(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[a]);return(0,o.useEffect)(()=>{if(!e)return void h([]);let t=[...e];i["Team ID"]&&(t=t.filter(e=>e.team_id===i["Team ID"])),i["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===i["Organization ID"])),h(t)},[e,i]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,B.fetchAllTeams)(a);e.length>0&&d(e);let t=await (0,B.fetchAllOrganizations)(a);t.length>0&&g(t)};a&&e()},[a]),(0,o.useEffect)(()=>{t&&t.length>0&&d(e=>e.length{l&&l.length>0&&g(e=>e.length{r({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...i,...e})},handleFilterReset:()=>{r(s),p(null),y(s)}}}({keys:Y?.keys||[],teams:e,organizations:l}),em=(0,o.useDeferredValue)(et),eh=(et||em)&&!el,ex=eo??Y?.total_count??0;(0,o.useEffect)(()=>{if(es){let e=()=>{es()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[es]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)(L.Tooltip,{title:l,children:(0,t.jsx)(b.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:s,overflow:"hidden"},onClick:()=>c(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:l??"-"})}},{id:"status",header:"Status",size:100,enableSorting:!1,cell:({row:e})=>{let l=e.original;if(!0!==l.blocked)return(0,t.jsx)(K.Tag,{color:"green","data-testid":`key-status-${l.token_id}`,children:"Active"});let s=l.metadata?.scim_blocked===!0;return(0,t.jsx)(L.Tooltip,{title:s?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401.",children:(0,t.jsx)(K.Tag,{color:"red","data-testid":`key-status-${l.token_id}`,children:"Blocked"})})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let s=l.getValue();if(!s)return"-";let a=e?.find(e=>e.team_id===s),i=a?.team_alias||s,r=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:i})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let s=n.find(e=>e.organization_id===l),a=s?.organization_alias||l,i=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:a})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(U.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(A.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.user?.user_alias??null,a=l.user?.user_email??l.user_email??null,r=l.user_id??null,n="default_user_id"===r,o=s||a||r,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:a},{label:"User ID",value:r}].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)(i.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||a?(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(W.default,{userId:r})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let s=e.row.original.created_by_user,a=s?.user_alias??null,r=s?.user_email??null,n="default_user_id"===l,o=a||r||l,d=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:r},{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)(i.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||r?(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(W.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(U.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(A.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let s=new Date(l);return(0,t.jsx)(L.Tooltip,{title:s.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:s.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,x.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,x.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(S.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})}):(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)(_.Icon,{icon:ea[e.row.id]?p.ChevronDownIcon:f.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{ei(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)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,E.getModelDisplayName)(e).slice(0,30)}...`:(0,E.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(S.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(T.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[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)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,E.getModelDisplayName)(e).slice(0,30)}...`:(0,E.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"]})]})}}],[e,n]),ef=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ey=(0,j.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:g,pagination:G},onSortingChange:e=>{let t="function"==typeof e?e(g):e;if(J(t),t&&t.length>0){let e=t[0],l=e.id,a=e.desc?"desc":"asc";eu({...er,"Sort By":l,"Sort Order":a},!0),s?.(l,a)}},onPaginationChange:Q,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),getPaginationRowModel:(0,v.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(ex/G.pageSize)});o.default.useEffect(()=>{a&&J([{id:a.sortBy,desc:"desc"===a.sortOrder}])},[a]);let{pageIndex:ew,pageSize:ej}=ey.getState().pagination,ev=Math.min((ew+1)*ej,ex),eS=`${ew*ej+1} - ${ev}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:d?(0,t.jsx)(q.default,{keyId:d.token,onClose:()=>c(null),keyData:d,teams:ed,onDelete:es}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(H.default,{options:ef,onApplyFilters:eu,initialValues:er,onResetFilters:eg})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(R.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",eS," of ",ex," results"]}),(0,t.jsx)(O.Button,{type:"default",icon:(0,t.jsx)(P.SyncOutlined,{spin:eh}),onClick:()=>{es()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(R.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ew+1," of ",ey.getPageCount()]}),ee?(0,t.jsx)(R.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.previousPage(),disabled:ee||!ey.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),ee?(0,t.jsx)(R.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.nextPage(),disabled:ee||!ey.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ey.getCenterTotalSize()},children:[(0,t.jsx)(I.TableHead,{children:ey.getHeaderGroups().map(e=>(0,t.jsx)(D.TableRow,{children:e.headers.map(e=>(0,t.jsx)(C.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(y.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(w.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ey.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(k.TableBody,{children:ee?(0,t.jsx)(D.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ey.getRowModel().rows.map(e=>(0,t.jsx)(D.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(z.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(D.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:m,teams:h,keys:x,setUserRole:p,userEmail:f,setUserEmail:y,setTeams:w,setKeys:j,premiumUser:v,organizations:S,addKey:b,createClicked:_,autoOpenCreate:N,prefillData:k})=>{let[z,I]=(0,o.useState)(null),[C,D]=(0,o.useState)(null),T=(0,n.useSearchParams)(),A=(0,l.getCookie)("token"),P=T.get("invitation_id"),[O,U]=(0,o.useState)(null),[R,K]=(0,o.useState)(null),[L,E]=(0,o.useState)([]),[B,M]=(0,o.useState)(null),[$,F]=(0,o.useState)(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(A){let e=(0,r.jwtDecode)(A);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),U(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),p(t)}else console.log("User role not defined");e.user_email?y(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&O&&m&&!z){let t=sessionStorage.getItem("userModels"+e);t?E(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(C)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(O);M(t);let l=await (0,u.userGetInfoV2)(O,e);I(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let s=(await (0,u.modelAvailableCall)(O,e,m)).data.map(e=>e.id);console.log("available_model_names:",s),E(s),console.log("userModels:",L),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")&&V()}})(),(0,c.fetchTeams)(O,e,m,C,w))}},[e,A,O,m]),(0,o.useEffect)(()=>{O&&(async()=>{try{let e=await (0,u.keyInfoCall)(O,[O]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&V()}})()},[O]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(C)}, accessToken: ${O}, userID: ${e}, userRole: ${m}`),O&&(console.log("fetching teams"),(0,c.fetchTeams)(O,e,m,C,w))},[C]),(0,o.useEffect)(()=>{if(null!==x&&null!=$&&null!==$.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(x)}`),x))$.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===$.team_id&&(e+=t.spend);console.log(`sum: ${e}`),K(e)}else if(null!==x){let e=0;for(let t of x)e+=t.spend;K(e)}},[$]),null!=P)return(0,t.jsx)(d.default,{});function V(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==A)return console.log("All cookies before redirect:",document.cookie),V(),null;try{let e=(0,r.jwtDecode)(A);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),V(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),V(),null}if(null==O)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==m&&p("App Owner"),m&&"Admin Viewer"==m){let{Title:e,Paragraph:l}=i.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",$),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(a.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(s.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(g.default,{team:$,teams:h,data:x,addKey:b,autoOpenCreate:N,prefillData:k},$?$.team_id:null),(0,t.jsx)(J,{teams:h,organizations:S})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/de6dee28e382bd35.js b/litellm/proxy/_experimental/out/_next/static/chunks/de6dee28e382bd35.js new file mode 100644 index 0000000000..a388fea3f4 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/de6dee28e382bd35.js @@ -0,0 +1,8 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),l=e.i(444755),n=e.i(673706),i=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"}},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:""}},g=(0,n.makeClassName)("Icon"),m=r.default.forwardRef((e,m)=>{let{icon:u,variant:b="simple",tooltip:p,size:f=o.Sizes.SM,color:h,className:C}=e,x=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),k=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.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,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.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,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,n.getColorClassNames)(t,i.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(b,h),{tooltipProps:v,getReferenceProps:w}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,n.mergeRefs)([m,v.refs.setReference]),className:(0,l.tremorTwMerge)(g("root"),"inline-flex shrink-0 items-center justify-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,c[b].rounded,c[b].border,c[b].shadow,c[b].ring,s[f].paddingX,s[f].paddingY,C)},w,x),r.default.createElement(a.default,Object.assign({text:p},v)),r.default.createElement(u,{className:(0,l.tremorTwMerge)(g("icon"),"shrink-0",d[f].height,d[f].width)}))});m.displayName="Icon",e.s(["default",()=>m],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var o=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(o.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),o=e.i(529681);let l=e=>{let{prefixCls:a,className:o,style:l,size:n,shape:i}=e,s=(0,r.default)({[`${a}-lg`]:"large"===n,[`${a}-sm`]:"small"===n}),d=(0,r.default)({[`${a}-circle`]:"circle"===i,[`${a}-square`]:"square"===i,[`${a}-round`]:"round"===i}),c=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(a,s,d,o),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var n=e.i(694758),i=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),g=e=>({height:e,lineHeight:(0,i.unit)(e)}),m=e=>Object.assign({width:e},g(e)),u=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},g(e)),b=e=>Object.assign({width:e},g(e)),p=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},f=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},g(e)),h=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:o,skeletonButtonCls:l,skeletonInputCls:n,skeletonImageCls:i,controlHeight:s,controlHeightLG:d,controlHeightSM:g,gradientFromColor:h,padding:C,marginSM:x,borderRadius:k,titleHeight:v,blockRadius:w,paragraphLiHeight:y,controlHeightXS:$,paragraphMarginTop:N}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:C,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:h},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(g))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:v,background:h,borderRadius:w,[`+ ${o}`]:{marginBlockStart:g}},[o]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:h,borderRadius:w,"+ li":{marginBlockStart:$}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${o} > li`]:{borderRadius:k}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:x,[`+ ${o}`]:{marginBlockStart:N}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=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:i(a).mul(2).equal(),minWidth:i(a).mul(2).equal()},f(a,i))},p(e,a,r)),{[`${r}-lg`]:Object.assign({},f(o,i))}),p(e,o,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},f(l,i))}),p(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(o)),[`${t}${t}-sm`]:Object.assign({},m(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},u(t,i)),[`${a}-lg`]:Object.assign({},u(o,i)),[`${a}-sm`]:Object.assign({},u(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:o,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:o},b(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},b(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${o} > li, + ${r}, + ${l}, + ${n}, + ${i} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),C=e=>{let{prefixCls:a,className:o,style:l,rows:n=0}=e,i=Array.from({length:n}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,o),style:l},i)},x=({prefixCls:e,className:a,width:o,style:l})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:o},l)});function k(e){return e&&"object"==typeof e?e:{}}let v=e=>{let{prefixCls:o,loading:n,className:i,rootClassName:s,style:d,children:c,avatar:g=!1,title:m=!0,paragraph:u=!0,active:b,round:p}=e,{getPrefixCls:f,direction:v,className:w,style:y}=(0,a.useComponentConfig)("skeleton"),$=f("skeleton",o),[N,O,j]=h($);if(n||!("loading"in e)){let e,a,o=!!g,n=!!m,c=!!u;if(o){let r=Object.assign(Object.assign({prefixCls:`${$}-avatar`},n&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),k(g));e=t.createElement("div",{className:`${$}-header`},t.createElement(l,Object.assign({},r)))}if(n||c){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${$}-title`},!o&&c?{width:"38%"}:o&&c?{width:"50%"}:{}),k(m));e=t.createElement(x,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},o&&n||(e.width="61%"),!o&&n?e.rows=3:e.rows=2,e)),k(u));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${$}-content`},e,r)}let f=(0,r.default)($,{[`${$}-with-avatar`]:o,[`${$}-active`]:b,[`${$}-rtl`]:"rtl"===v,[`${$}-round`]:p},w,i,s,O,j);return N(t.createElement("div",{className:f,style:Object.assign(Object.assign({},y),d)},e,a))}return null!=c?c:null};v.Button=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c=!1,size:g="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),u=m("skeleton",n),[b,p,f]=h(u),C=(0,o.default)(e,["prefixCls"]),x=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},i,s,p,f);return b(t.createElement("div",{className:x},t.createElement(l,Object.assign({prefixCls:`${u}-button`,size:g},C))))},v.Avatar=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,shape:c="circle",size:g="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),u=m("skeleton",n),[b,p,f]=h(u),C=(0,o.default)(e,["prefixCls","className"]),x=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d},i,s,p,f);return b(t.createElement("div",{className:x},t.createElement(l,Object.assign({prefixCls:`${u}-avatar`,shape:c,size:g},C))))},v.Input=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c,size:g="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),u=m("skeleton",n),[b,p,f]=h(u),C=(0,o.default)(e,["prefixCls"]),x=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},i,s,p,f);return b(t.createElement("div",{className:x},t.createElement(l,Object.assign({prefixCls:`${u}-input`,size:g},C))))},v.Image=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",o),[g,m,u]=h(c),b=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},l,n,m,u);return g(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${c}-image`,l),style:i},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`})))))},v.Node=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),g=c("skeleton",o),[m,u,b]=h(g),p=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:s},u,l,n,b);return m(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${g}-image`,l),style:i},d)))},e.s(["default",0,v],185793)},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"],l=e=>({_s:e,status:o[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),n=e=>e?6:5,i=(e,t,r,a,o)=>{clearTimeout(a.current);let n=l(e);t(n),r.current=n,o&&o({current:n})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let g=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 u={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,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,c.makeClassName)("Button"),f=({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:l,transitionStatus:n})=>{let i=l?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(g,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",i,m.default,m[n]),style:{transition:"width 150ms"}}):a.default.createElement(o,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,i)})},h=a.default.forwardRef((e,o)=>{let{icon:g,iconPosition:m=s.HorizontalPositions.Left,size:h=s.Sizes.SM,color:C,variant:x="primary",disabled:k,loading:v=!1,loadingText:w,children:y,tooltip:$,className:N}=e,O=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),j=v||k,E=void 0!==g||v,T=v&&w,P=!(!y&&!T),M=(0,d.tremorTwMerge)(u[h].height,u[h].width),S="light"!==x?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",R=b(x,C),z=("light"!==x?{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:q}=(0,r.useTooltip)(300),[_,H]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:g,onStateChange:m}={})=>{let[u,b]=(0,a.useState)(()=>l(d?2:n(c))),p=(0,a.useRef)(u),f=(0,a.useRef)(0),[h,C]="object"==typeof s?[s.enter,s.exit]:[s,s],x=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return n(t)}})(p.current._s,g);e&&i(e,b,p,f,m)},[m,g]);return[u,(0,a.useCallback)(a=>{let l=e=>{switch(i(e,b,p,f,m),e){case 1:h>=0&&(f.current=((...e)=>setTimeout(...e))(x,h));break;case 4:C>=0&&(f.current=((...e)=>setTimeout(...e))(x,C));break;case 0:case 3:f.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},s=p.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||l(e?+!r:2):s&&l(t?o?3:4:n(g))},[x,m,e,t,r,o,h,C,g]),x]})({timeout:50});return(0,a.useEffect)(()=>{H(v)},[v]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([o,B.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",S,z.paddingX,z.paddingY,z.fontSize,R.textColor,R.bgColor,R.borderColor,R.hoverBorderColor,j?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(b(x,C).hoverTextColor,b(x,C).hoverBgColor,b(x,C).hoverBorderColor),N),disabled:j},q,O),a.default.createElement(r.default,Object.assign({text:$},B)),E&&m!==s.HorizontalPositions.Right?a.default.createElement(f,{loading:v,iconSize:M,iconPosition:m,Icon:g,transitionStatus:_.status,needMargin:P}):null,T||y?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},T?w:y):null,E&&m===s.HorizontalPositions.Right?a.default.createElement(f,{loading:v,iconSize:M,iconPosition:m,Icon:g,transitionStatus:_.status,needMargin:P}):null)});h.displayName="Button",e.s(["Button",()=>h],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("Table"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(o("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),n))});l.displayName="Table",e.s(["Table",()=>l],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHead"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),n))});l.displayName="TableHead",e.s(["TableHead",()=>l],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHeaderCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},s),n))});l.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>l],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableBody"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),n))});l.displayName="TableBody",e.s(["TableBody",()=>l],942232)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableRow"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("row"),i)},s),n))});l.displayName="TableRow",e.s(["TableRow",()=>l],496020)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),n))});l.displayName="TableCell",e.s(["TableCell",()=>l],977572)},68155,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 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,r],68155)},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)},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)},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)},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(914949),o=e.i(404948);let l=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,l],836938);var n=e.i(613541),i=e.i(763731),s=e.i(242064),d=e.i(491816);e.i(793154);var c=e.i(880476),g=e.i(183293),m=e.i(717356),u=e.i(320560),b=e.i(307358),p=e.i(246422),f=e.i(838378),h=e.i(617933);let C=(0,p.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,a=(0,f.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:a,fontWeightStrong:o,innerPadding:l,boxShadowSecondary:n,colorTextHeading:i,borderRadiusLG:s,zIndexPopup:d,titleMarginBottom:c,colorBgElevated:m,popoverBg:b,titleBorderBottom:p,innerContentPadding:f,titlePadding:h}=e;return[{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:b,backgroundClip:"padding-box",borderRadius:s,boxShadow:n,padding:l},[`${t}-title`]:{minWidth:a,marginBottom:c,color:i,fontWeight:o,borderBottom:p,padding:h},[`${t}-inner-content`]:{color:r,padding:f}})},(0,u.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:h.PresetColors.map(r=>{let a=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:a,padding:o,wireframe:l,zIndexPopupBase:n,borderRadiusLG:i,marginXS:s,lineType:d,colorSplit:c,paddingSM:g}=e,m=r-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:n+30},(0,b.getArrowToken)(e)),(0,u.getArrowOffsetToken)({contentRadius:i,limitVerticalRadius:!0})),{innerPadding:12*!l,titleMarginBottom:l?0:s,titlePadding:l?`${m/2}px ${o}px ${m/2-t}px`:0,titleBorderBottom:l?`${t}px ${d} ${c}`:"none",innerContentPadding:l?`${g}px ${o}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var 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 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 k=({title:e,content:r,prefixCls:a})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),r&&t.createElement("div",{className:`${a}-inner-content`},r)):null,v=e=>{let{hashId:a,prefixCls:o,className:n,style:i,placement:s="top",title:d,content:g,children:m}=e,u=l(d),b=l(g),p=(0,r.default)(a,o,`${o}-pure`,`${o}-placement-${s}`,n);return t.createElement("div",{className:p,style:i},t.createElement("div",{className:`${o}-arrow`}),t.createElement(c.Popup,Object.assign({},e,{className:a,prefixCls:o}),m||t.createElement(k,{prefixCls:o,title:u,content:b})))},w=e=>{let{prefixCls:a,className:o}=e,l=x(e,["prefixCls","className"]),{getPrefixCls:n}=t.useContext(s.ConfigContext),i=n("popover",a),[d,c,g]=C(i);return d(t.createElement(v,Object.assign({},l,{prefixCls:i,hashId:c,className:(0,r.default)(o,g)})))};e.s(["Overlay",0,k,"default",0,w],310730);var 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 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.forwardRef((e,c)=>{var g,m;let{prefixCls:u,title:b,content:p,overlayClassName:f,placement:h="top",trigger:x="hover",children:v,mouseEnterDelay:w=.1,mouseLeaveDelay:$=.1,onOpenChange:N,overlayStyle:O={},styles:j,classNames:E}=e,T=y(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:P,className:M,style:S,classNames:R,styles:z}=(0,s.useComponentConfig)("popover"),B=P("popover",u),[q,_,H]=C(B),I=P(),A=(0,r.default)(f,_,H,M,R.root,null==E?void 0:E.root),L=(0,r.default)(R.body,null==E?void 0:E.body),[W,X]=(0,a.default)(!1,{value:null!=(g=e.open)?g:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),Y=(e,t)=>{X(e,!0),null==N||N(e,t)},D=l(b),F=l(p);return q(t.createElement(d.default,Object.assign({placement:h,trigger:x,mouseEnterDelay:w,mouseLeaveDelay:$},T,{prefixCls:B,classNames:{root:A,body:L},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},z.root),S),O),null==j?void 0:j.root),body:Object.assign(Object.assign({},z.body),null==j?void 0:j.body)},ref:c,open:W,onOpenChange:e=>{Y(e)},overlay:D||F?t.createElement(k,{prefixCls:B,title:D,content:F}):null,transitionName:(0,n.getTransitionName)(I,"zoom-big",T.transitionName),"data-popover-inject":!0}),(0,i.cloneElement)(v,{onKeyDown:e=>{var r,a;(0,t.isValidElement)(v)&&(null==(a=null==v?void 0:(r=v.props).onKeyDown)||a.call(r,e)),e.keyCode===o.default.ESC&&Y(!1,e)}})))});$._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,$],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},995118,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(764205),o=e.i(135214),l=e.i(693569),n=e.i(214541);e.s(["default",0,()=>{let{accessToken:e,userRole:i,userId:s,premiumUser:d,userEmail:c}=(0,o.default)(),{teams:g,setTeams:m}=(0,n.default)(),[u,b]=(0,r.useState)(!1),[p,f]=(0,r.useState)([]),{keys:h,isLoading:C,error:x,pagination:k,refresh:v,setKeys:w}=(({selectedTeam:e,currentOrg:t,selectedKeyAlias:o,accessToken:l,createClicked:n,expand:i=[]})=>{let[s,d]=(0,r.useState)({keys:[],total_count:0,current_page:1,total_pages:0}),[c,g]=(0,r.useState)(!0),[m,u]=(0,r.useState)(null),b=async(e={})=>{try{if(console.log("calling fetchKeys"),!l)return void console.log("accessToken",l);g(!0);let t="number"==typeof e.page?e.page:1,r="number"==typeof e.pageSize?e.pageSize:100,o=await (0,a.keyListCall)(l,null,null,null,null,null,t,r,null,null,i.join(","));console.log("data",o),d(o),u(null)}catch(e){u(e instanceof Error?e:Error("An error occurred"))}finally{g(!1)}};return(0,r.useEffect)(()=>{b(),console.log("selectedTeam",e,"currentOrg",t,"accessToken",l,"selectedKeyAlias",o)},[e,t,l,o,n]),{keys:s.keys,isLoading:c,error:m,pagination:{currentPage:s.current_page,totalPages:s.total_pages,totalCount:s.total_count},refresh:b,setKeys:e=>{d(t=>{let r="function"==typeof e?e(t.keys):e;return{...t,keys:r}})}}})({selectedKeyAlias:null,currentOrg:null,accessToken:e||"",createClicked:u});return(0,t.jsx)(l.default,{userID:s,userRole:i,userEmail:c,teams:g,keys:h,setUserRole:()=>{},setUserEmail:()=>{},setTeams:m,setKeys:w,premiumUser:d,organizations:p,addKey:e=>{w(t=>t?[...t,e]:[e]),b(()=>!u)},createClicked:u})}],995118)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e000783224957b5f.js b/litellm/proxy/_experimental/out/_next/static/chunks/e000783224957b5f.js new file mode 100644 index 0000000000..8f814010d3 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/e000783224957b5f.js @@ -0,0 +1,8 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),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])},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",()=>t])},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),i=e.i(983561),n=e.i(689020);e.s(["default",0,({accessToken:e,value:s,placeholder:d="Select a Model",onChange:c,disabled:u=!1,style:m,className:g,showLabel:f=!0,labelText:h="Select Model"})=>{let[b,p]=(0,r.useState)(s),[v,C]=(0,r.useState)(!1),[x,w]=(0,r.useState)([]),k=(0,r.useRef)(null);return(0,r.useEffect)(()=>{p(s)},[s]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,n.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&w(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[f&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.RobotOutlined,{className:"mr-2"})," ",h]}),(0,t.jsx)(o.Select,{value:b,placeholder:d,onChange:e=>{"custom"===e?(C(!0),p(void 0)):(C(!1),p(e),c&&c(e))},options:[...Array.from(new Set(x.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 ${g||""}`,disabled:u}),v&&(0,t.jsx)(a.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{p(e),c&&c(e)},500)},disabled:u})]})}])},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])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,a]of Object.entries(t))e in r&&(r[e]=a);return r}let a=(e,t=0,r=!1,a=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!a)return"-";let l={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",l);let o=e<0?"-":"",i=Math.abs(e),n=i,s="";return i>=1e6?(n=i/1e6,s="M"):i>=1e3&&(n=i/1e3,s="K"),`${o}${n.toLocaleString("en-US",l)}${s}`},l=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return o(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),o(e,r)}},o=(e,r)=>{try{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",a.setAttribute("readonly",""),document.body.appendChild(a),a.focus(),a.select();let l=document.execCommand("copy");if(document.body.removeChild(a),l)return t.default.success(r),!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,l,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=a(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},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 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(["ClockCircleOutlined",0,o],637235)},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};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(["default",0,o],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(529681);let o=e=>{let{prefixCls:a,className:l,style:o,size:i,shape:n}=e,s=(0,r.default)({[`${a}-lg`]:"large"===i,[`${a}-sm`]:"small"===i}),d=(0,r.default)({[`${a}-circle`]:"circle"===n,[`${a}-square`]:"square"===n,[`${a}-round`]:"round"===n}),c=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(a,s,d,l),style:Object.assign(Object.assign({},c),o)})};e.i(296059);var i=e.i(694758),n=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,n.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),f=e=>Object.assign({width:e},u(e)),h=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),p=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:l,skeletonButtonCls:o,skeletonInputCls:i,skeletonImageCls:n,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:p,padding:v,marginSM:C,borderRadius:x,titleHeight:w,blockRadius:k,paragraphLiHeight:$,controlHeightXS:y,paragraphMarginTop:N}=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:p},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:w,background:p,borderRadius:k,[`+ ${l}`]:{marginBlockStart:u}},[l]:{padding:0,"> li":{width:"100%",height:$,listStyle:"none",background:p,borderRadius:k,"+ li":{marginBlockStart:y}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${l} > li`]:{borderRadius:x}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:C,[`+ ${l}`]:{marginBlockStart:N}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:l,controlHeightSM:o,gradientFromColor:i,calc:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:n(a).mul(2).equal(),minWidth:n(a).mul(2).equal()},b(a,n))},h(e,a,r)),{[`${r}-lg`]:Object.assign({},b(l,n))}),h(e,l,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(o,n))}),h(e,o,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:l,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(l)),[`${t}${t}-sm`]:Object.assign({},m(o))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:l,controlHeightSM:o,gradientFromColor:i,calc:n}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},g(t,n)),[`${a}-lg`]:Object.assign({},g(l,n)),[`${a}-sm`]:Object.assign({},g(o,n))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:l,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:l},f(o(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(r)),{maxWidth:o(r).mul(4).equal(),maxHeight:o(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${l} > li, + ${r}, + ${o}, + ${i}, + ${n} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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:a,className:l,style:o,rows:i=0}=e,n=Array.from({length:i}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:o},n)},C=({prefixCls:e,className:a,width:l,style:o})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},o)});function x(e){return e&&"object"==typeof e?e:{}}let w=e=>{let{prefixCls:l,loading:i,className:n,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:h}=e,{getPrefixCls:b,direction:w,className:k,style:$}=(0,a.useComponentConfig)("skeleton"),y=b("skeleton",l),[N,j,E]=p(y);if(i||!("loading"in e)){let e,a,l=!!u,i=!!m,c=!!g;if(l){let r=Object.assign(Object.assign({prefixCls:`${y}-avatar`},i&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),x(u));e=t.createElement("div",{className:`${y}-header`},t.createElement(o,Object.assign({},r)))}if(i||c){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${y}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),x(m));e=t.createElement(C,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},(e={},l&&i||(e.width="61%"),!l&&i?e.rows=3:e.rows=2,e)),x(g));r=t.createElement(v,Object.assign({},a))}a=t.createElement("div",{className:`${y}-content`},e,r)}let b=(0,r.default)(y,{[`${y}-with-avatar`]:l,[`${y}-active`]:f,[`${y}-rtl`]:"rtl"===w,[`${y}-round`]:h},k,n,s,j,E);return N(t.createElement("div",{className:b,style:Object.assign(Object.assign({},$),d)},e,a))}return null!=c?c:null};w.Button=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-button`,size:u},v))))},w.Avatar=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls","className"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},v))))},w.Input=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-input`,size:u},v))))},w.Image=e=>{let{prefixCls:l,className:o,rootClassName:i,style:n,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[u,m,g]=p(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},o,i,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,o),style:n},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`})))))},w.Node=e=>{let{prefixCls:l,className:o,rootClassName:i,style:n,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",l),[m,g,f]=p(u),h=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,o,i,f);return m(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${u}-image`,o),style:n},d)))},e.s(["default",0,w],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],o=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,n=(e,t,r,a,l)=>{clearTimeout(a.current);let i=o(e);t(i),r.current=i,l&&l({current:i})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let u=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 g={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"}},f=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},h=(0,c.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:l,needMargin:o,transitionStatus:i})=>{let n=o?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(u,{className:(0,d.tremorTwMerge)(h("icon"),"animate-spin shrink-0",n,m.default,m[i]),style:{transition:"width 150ms"}}):a.default.createElement(l,{className:(0,d.tremorTwMerge)(h("icon"),"shrink-0",t,n)})},p=a.default.forwardRef((e,l)=>{let{icon:u,iconPosition:m=s.HorizontalPositions.Left,size:p=s.Sizes.SM,color:v,variant:C="primary",disabled:x,loading:w=!1,loadingText:k,children:$,tooltip:y,className:N}=e,j=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),E=w||x,T=void 0!==u||w,O=w&&k,M=!(!$&&!O),S=(0,d.tremorTwMerge)(g[p].height,g[p].width),R="light"!==C?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",z=f(C,v),B=("light"!==C?{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"}})[p],{tooltipProps:q,getReferenceProps:P}=(0,r.useTooltip)(300),[H,L]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:l,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[g,f]=(0,a.useState)(()=>o(d?2:i(c))),h=(0,a.useRef)(g),b=(0,a.useRef)(0),[p,v]="object"==typeof s?[s.enter,s.exit]:[s,s],C=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(h.current._s,u);e&&n(e,f,h,b,m)},[m,u]);return[g,(0,a.useCallback)(a=>{let o=e=>{switch(n(e,f,h,b,m),e){case 1:p>=0&&(b.current=((...e)=>setTimeout(...e))(C,p));break;case 4:v>=0&&(b.current=((...e)=>setTimeout(...e))(C,v));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||o(e+1)},0)}},s=h.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||o(e?+!r:2):s&&o(t?l?3:4:i(u))},[C,m,e,t,r,l,p,v,u]),C]})({timeout:50});return(0,a.useEffect)(()=>{L(w)},[w]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([l,q.refs.setReference]),className:(0,d.tremorTwMerge)(h("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",R,B.paddingX,B.paddingY,B.fontSize,z.textColor,z.bgColor,z.borderColor,z.hoverBorderColor,E?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(f(C,v).hoverTextColor,f(C,v).hoverBgColor,f(C,v).hoverBorderColor),N),disabled:E},P,j),a.default.createElement(r.default,Object.assign({text:y},q)),T&&m!==s.HorizontalPositions.Right?a.default.createElement(b,{loading:w,iconSize:S,iconPosition:m,Icon:u,transitionStatus:H.status,needMargin:M}):null,O||$?a.default.createElement("span",{className:(0,d.tremorTwMerge)(h("text"),"text-tremor-default whitespace-nowrap")},O?k:$):null,T&&m===s.HorizontalPositions.Right?a.default.createElement(b,{loading:w,iconSize:S,iconPosition:m,Icon:u,transitionStatus:H.status,needMargin:M}):null)});p.displayName="Button",e.s(["Button",()=>p],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",n)},r.default.createElement("table",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});o.displayName="Table",e.s(["Table",()=>o],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",n)},s),i))});o.displayName="TableBody",e.s(["TableBody",()=>o],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",n)},s),i))});o.displayName="TableCell",e.s(["TableCell",()=>o],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",n)},s),i))});o.displayName="TableHead",e.s(["TableHead",()=>o],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:o,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",n)},s),i))});o.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>o],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("row"),n)},s),i))});o.displayName="TableRow",e.s(["TableRow",()=>o],496020)},68155,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 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,r],68155)},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)},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)},530212,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 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,r],530212)},519756,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:"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 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(["UploadOutlined",0,o],519756)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e79e33b8b366ae69.js b/litellm/proxy/_experimental/out/_next/static/chunks/e79e33b8b366ae69.js new file mode 100644 index 0000000000..a987d4d9ec --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/e79e33b8b366ae69.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,446891,836991,e=>{"use strict";var t=e.i(843476),r=e.i(464571),a=e.i(326373),l=e.i(94629),s=e.i(360820),n=e.i(871943),i=e.i(271645);let o=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,o],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:i})=>{let c=[{key:"asc",label:"Ascending",icon:(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,t.jsx)(o,{className:"h-4 w-4"})}];return(0,t.jsx)(a.Dropdown,{menu:{items:c,onClick:({key:e})=>{"asc"===e?i("asc"):"desc"===e?i("desc"):"reset"===e&&i(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,t.jsx)(r.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"}):(0,t.jsx)(l.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891)},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ArrowLeftOutlined",0,s],447566)},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var l=e.i(464571),s=e.i(311451),n=e.i(199133),i=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[h,m]=(0,r.useState)(!1),[f,p]=(0,r.useState)(u),[g,b]=(0,r.useState)({}),[y,v]=(0,r.useState)({}),[w,x]=(0,r.useState)({}),[C,S]=(0,r.useState)({}),j=(0,r.useCallback)((0,i.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){v(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);b(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),b(e=>({...e,[t.name]:[]}))}finally{v(e=>({...e,[t.name]:!1}))}}},300),[]),k=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!C[e.name]){v(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");b(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),b(t=>({...t,[e.name]:[]}))}finally{v(t=>({...t,[e.name]:!1}))}}},[C]);(0,r.useEffect)(()=>{h&&e.forEach(e=>{e.isSearchable&&!C[e.name]&&k(e)})},[h,e,k,C]);let M=(e,t)=>{let r={...f,[e]:t};p(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>m(!h),className:"flex items-center gap-2",children:d}),(0,t.jsx)(l.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),h&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,l=e.find(e=>e.label===r||e.name===r);return l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:l.label||l.name}),l.isSearchable?(0,t.jsx)(n.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${l.label||l.name}...`,value:f[l.name]||void 0,onChange:e=>M(l.name,e),onOpenChange:e=>{e&&l.isSearchable&&!C[l.name]&&k(l)},onSearch:e=>{x(t=>({...t,[l.name]:e})),l.searchFn&&j(e,l)},filterOption:!1,loading:y[l.name],options:g[l.name]||[],allowClear:!0,notFoundContent:y[l.name]?"Loading...":"No results found"}):l.options?(0,t.jsx)(n.Select,{className:"w-full",placeholder:`Select ${l.label||l.name}...`,value:f[l.name]||void 0,onChange:e=>M(l.name,e),allowClear:!0,children:l.options.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))}):l.customComponent?(a=l.customComponent,(0,t.jsx)(a,{value:f[l.name]||void 0,onChange:e=>M(l.name,e??""),placeholder:`Select ${l.label||l.name}...`,allFilters:f})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${l.label||l.name}...`,value:f[l.name]||"",onChange:e=>M(l.name,e.target.value),allowClear:!0})]},l.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let l of e){let e=l?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=l?.organization_id??l?.org_id;s&&"string"==typeof s&&r.add(s.trim());let n=l?.user_id;if(n&&"string"==typeof n){let e=l?.user?.user_email||n;a.set(n,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let l=new Set,s=new Set,n=new Map,i=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=i?.keys||[],c=i?.total_pages??1;r(o,l,s,n);let u=Math.min(c,10)-1;if(u>0){let i=Array.from({length:u},(r,l)=>(0,t.keyListCall)(e,null,a,null,null,null,l+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(i)))"fulfilled"===e.status&&r(e.value?.keys||[],l,s,n)}return{keyAliases:Array.from(l).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(n.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},l=async(e,r)=>{if(!e)return[];try{let a=[],l=1,s=!0;for(;s;){let n=await (0,t.teamListCall)(e,r||null,null);a=[...a,...n],l{if(!e)return[];try{let r=[],a=1,l=!0;for(;l;){let s=await (0,t.organizationListCall)(e);r=[...r,...s],a{"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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ReloadOutlined",0,s],91979)},625901,e=>{"use strict";var t=e.i(266027),r=e.i(621482),a=e.i(243652),l=e.i(764205),s=e.i(135214);let n=(0,a.createQueryKeys)("models"),i=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let c=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:r,userRole:a}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,r,a,!0,null,!0,!1,"expand"),enabled:!!(e&&r&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:n,userRole:i}=(0,s.default)();return(0,r.useInfiniteQuery)({queryKey:c.list({filters:{...n&&{userId:n},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:r})=>await (0,l.modelInfoCall)(a,n,i,r,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,r=50,a,i,o,c,u)=>{let{accessToken:d,userId:h,userRole:m}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({filters:{...h&&{userId:h},...m&&{userRole:m},page:e,size:r,...a&&{search:a},...i&&{modelId:i},...o&&{teamId:o},...c&&{sortBy:c},...u&&{sortOrder:u}}}),queryFn:async()=>await (0,l.modelInfoCall)(d,h,m,e,r,a,i,o,c,u),enabled:!!(d&&h&&m)})}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),a=e.i(371330),l=e.i(271645),s=e.i(394487),n=e.i(503269),i=e.i(214520),o=e.i(746725),c=e.i(914189),u=e.i(144279),d=e.i(294316),h=e.i(601893),m=e.i(140721),f=e.i(942803),p=e.i(233538),g=e.i(694421),b=e.i(700020),y=e.i(35889),v=e.i(998348),w=e.i(722678);let x=(0,l.createContext)(null);x.displayName="GroupContext";let C=l.Fragment,S=Object.assign((0,b.forwardRefWithAs)(function(e,t){var C;let S=(0,l.useId)(),j=(0,f.useProvidedId)(),k=(0,h.useDisabled)(),{id:M=j||`headlessui-switch-${S}`,disabled:E=k||!1,checked:N,defaultChecked:R,onChange:O,name:T,value:P,form:D,autoFocus:I=!1,...F}=e,L=(0,l.useContext)(x),[$,_]=(0,l.useState)(null),K=(0,l.useRef)(null),A=(0,d.useSyncRefs)(K,t,null===L?null:L.setSwitch,_),z=(0,i.useDefaultValue)(R),[B,H]=(0,n.useControllable)(N,O,null!=z&&z),G=(0,o.useDisposables)(),[q,Q]=(0,l.useState)(!1),U=(0,c.useEvent)(()=>{Q(!0),null==H||H(!B),G.nextFrame(()=>{Q(!1)})}),V=(0,c.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),U()}),W=(0,c.useEvent)(e=>{e.key===v.Keys.Space?(e.preventDefault(),U()):e.key===v.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),Y=(0,c.useEvent)(e=>e.preventDefault()),X=(0,w.useLabelledBy)(),J=(0,y.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:I}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:E}),{pressed:ea,pressProps:el}=(0,s.useActivePress)({disabled:E}),es=(0,l.useMemo)(()=>({checked:B,disabled:E,hover:et,focus:Z,active:ea,autofocus:I,changing:q}),[B,et,Z,ea,E,q,I]),en=(0,b.mergeProps)({id:M,ref:A,role:"switch",type:(0,u.useResolveButtonType)(e,$),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":B,"aria-labelledby":X,"aria-describedby":J,disabled:E||void 0,autoFocus:I,onClick:V,onKeyUp:W,onKeyPress:Y},ee,er,el),ei=(0,l.useCallback)(()=>{if(void 0!==z)return null==H?void 0:H(z)},[H,z]),eo=(0,b.useRender)();return l.default.createElement(l.default.Fragment,null,null!=T&&l.default.createElement(m.FormFields,{disabled:E,data:{[T]:P||"on"},overrides:{type:"checkbox",checked:B},form:D,onReset:ei}),eo({ourProps:en,theirProps:F,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,l.useState)(null),[s,n]=(0,w.useLabels)(),[i,o]=(0,y.useDescriptions)(),c=(0,l.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),u=(0,b.useRender)();return l.default.createElement(o,{name:"Switch.Description",value:i},l.default.createElement(n,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},l.default.createElement(x.Provider,{value:c},u({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:w.Label,Description:y.Description});var j=e.i(888288),k=e.i(95779),M=e.i(444755),E=e.i(673706),N=e.i(829087);let R=(0,E.makeClassName)("Switch"),O=l.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:s=!1,onChange:n,color:i,name:o,error:c,errorMessage:u,disabled:d,required:h,tooltip:m,id:f}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:i?(0,E.getColorClassNames)(i,k.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,E.getColorClassNames)(i,k.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[b,y]=(0,j.default)(s,a),[v,w]=(0,l.useState)(!1),{tooltipProps:x,getReferenceProps:C}=(0,N.useTooltip)(300);return l.default.createElement("div",{className:"flex flex-row items-center justify-start"},l.default.createElement(N.default,Object.assign({text:m},x)),l.default.createElement("div",Object.assign({ref:(0,E.mergeRefs)([r,x.refs.setReference]),className:(0,M.tremorTwMerge)(R("root"),"flex flex-row relative h-5")},p,C),l.default.createElement("input",{type:"checkbox",className:(0,M.tremorTwMerge)(R("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:h,checked:b,onChange:e=>{e.preventDefault()}}),l.default.createElement(S,{checked:b,onChange:e=>{y(e),null==n||n(e)},disabled:d,className:(0,M.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",d?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:f},l.default.createElement("span",{className:(0,M.tremorTwMerge)(R("sr-only"),"sr-only")},"Switch ",b?"on":"off"),l.default.createElement("span",{"aria-hidden":"true",className:(0,M.tremorTwMerge)(R("background"),b?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")}),l.default.createElement("span",{"aria-hidden":"true",className:(0,M.tremorTwMerge)(R("round"),b?(0,M.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",v?(0,M.tremorTwMerge)("ring-2",g.ringColor):"")}))),c&&u?l.default.createElement("p",{className:(0,M.tremorTwMerge)(R("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});O.displayName="Switch",e.s(["Switch",()=>O],793130)},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),l=e.i(682830),s=e.i(269200),n=e.i(427612),i=e.i(64848),o=e.i(942232),c=e.i(496020),u=e.i(977572);function d({data:e=[],columns:d,onRowClick:h,renderSubComponent:m,renderChildRows:f,getRowCanExpand:p,isLoading:g=!1,loadingMessage:b="🚅 Loading logs...",noDataMessage:y="No logs found",enableSorting:v=!1}){let w=!!(m||f)&&!!p,[x,C]=(0,r.useState)([]),S=(0,a.useReactTable)({data:e,columns:d,...v&&{state:{sorting:x},onSortingChange:C,enableSortingRemoval:!1},...w&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,l.getCoreRowModel)(),...v&&{getSortedRowModel:(0,l.getSortedRowModel)()},...w&&{getExpandedRowModel:(0,l.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(n.TableHead,{children:S.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let r=v&&e.column.getCanSort(),l=e.column.getIsSorted();return(0,t.jsx)(i.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===l?"↑":"desc"===l?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:g?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})}):S.getRowModel().rows.length>0?S.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${h?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>h?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),w&&e.getIsExpanded()&&f&&f({row:e}),w&&e.getIsExpanded()&&m&&!f&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:m({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:y})})})})})]})})}e.s(["DataTable",()=>d])},888288,e=>{"use strict";var t=e.i(271645);let r=(e,r)=>{let a=void 0!==r,[l,s]=(0,t.useState)(e);return[a?r:l,e=>{a||s(e)}]};e.s(["default",()=>r])},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:n,accessToken:i,disabled:o})=>{let[c,u]=(0,r.useState)([]),[d,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(i){h(!0);try{let e=await (0,l.getGuardrailsList)(i);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{h(!1)}}})()},[i]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:s,loading:d,className:n,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),a=e.i(199133),l=e.i(764205);function s(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:n,className:i,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,h]=(0,r.useState)([]),[m,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){f(!0);try{let e=await (0,l.getPoliciesList)(o);e.policies&&(h(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{f(!1)}}})()},[o,u]),(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:n,loading:m,className:i,allowClear:!0,options:s(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>s])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),l=e.i(915823),s=e.i(619273),n=class extends l.Subscribable{#e;#t=void 0;#r;#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,s.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.hashKey)(t.mutationKey)!==(0,s.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.#l(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#l(),this.#s()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#l(){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}}#s(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=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,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},i=e.i(912598);function o(e,r){let l=(0,i.useQueryClient)(r),[o]=t.useState(()=>new n(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(s.noop)},[o]);if(c.error&&(0,s.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ClockCircleOutlined",0,s],637235)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let r=e.i(264042).Row;e.s(["Row",0,r],621192)},214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,l]=(0,t.useState)([]),{accessToken:s,userId:n,userRole:i}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{l(await (0,a.fetchTeams)(s,n,i,null))})()},[s,n,i]),{teams:e,setTeams:l}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let l=t(e);return isNaN(a)?r(e,NaN):(a&&l.setDate(l.getDate()+a),l)}function l(e,a){let l=t(e);if(isNaN(a))return r(e,NaN);if(!a)return l;let s=l.getDate(),n=r(e,l.getTime());return(n.setMonth(l.getMonth()+a+1,0),s>=n.getDate())?n:(l.setFullYear(n.getFullYear(),n.getMonth(),s),l)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>l],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(908286),s=e.i(242064),n=e.i(246422),i=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["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"],d=function(e,t){let a,l,s;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(l={},u.forEach(r=>{l[`${e}-align-${r}`]=t.align===r}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(s={},c.forEach(r=>{s[`${e}-justify-${r}`]=t.justify===r}),s)))},h=(0,n.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,l=(0,i.mergeToken)(e,{flexGapSM:t,flexGap:r,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,r={};return o.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(l)]},()=>({}),{resetStyle:!1});var m=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 f=t.default.forwardRef((e,n)=>{let{prefixCls:i,rootClassName:o,className:c,style:u,flex:f,gap:p,vertical:g=!1,component:b="div",children:y}=e,v=m(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:w,direction:x,getPrefixCls:C}=t.default.useContext(s.ConfigContext),S=C("flex",i),[j,k,M]=h(S),E=null!=g?g:null==w?void 0:w.vertical,N=(0,r.default)(c,o,null==w?void 0:w.className,S,k,M,d(S,e),{[`${S}-rtl`]:"rtl"===x,[`${S}-gap-${p}`]:(0,l.isPresetSize)(p),[`${S}-vertical`]:E}),R=Object.assign(Object.assign({},null==w?void 0:w.style),u);return f&&(R.flex=f),p&&!(0,l.isPresetSize)(p)&&(R.gap=p),j(t.default.createElement(b,Object.assign({ref:n,className:N,style:R},(0,a.default)(v,["justify","wrap","align"])),y))});e.s(["Flex",0,f],525720)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/f27456ba72075ad9.js b/litellm/proxy/_experimental/out/_next/static/chunks/f27456ba72075ad9.js new file mode 100644 index 0000000000..898d67998e --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/f27456ba72075ad9.js @@ -0,0 +1,7 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,954616,e=>{"use strict";var t=e.i(271645),a=e.i(114272),s=e.i(540143),r=e.i(915823),l=e.i(619273),i=class extends r.Subscribable{#e;#t=void 0;#a;#s;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.#a,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#r(),this.#l()}mutate(e,t){return this.#s=t,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(e)}#r(){let e=this.#a?.state??(0,a.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){s.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,a,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,a,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,a){let r=(0,n.useQueryClient)(a),[o]=t.useState(()=>new i(r,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let d=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(s.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=t.useCallback((e,t)=>{o.mutate(e,t).catch(l.noop)},[o]);if(d.error&&(0,l.shouldThrowError)(o.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>o],954616)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},530212,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:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,a],530212)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let a=e.i(264042).Row;e.s(["Row",0,a],621192)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),s=e.i(529681),r=e.i(908286),l=e.i(242064),i=e.i(246422),n=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"],c=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let s,r,l;return(0,a.default)(Object.assign(Object.assign(Object.assign({},(s=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${s}`]:s&&o.includes(s)})),(r={},c.forEach(a=>{r[`${e}-align-${a}`]=t.align===a}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r)),(l={},d.forEach(a=>{l[`${e}-justify-${a}`]=t.justify===a}),l)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:a,paddingLG:s}=e,r=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:a,flexGapLG:s});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(r),(e=>{let{componentCls:t}=e,a={};return o.forEach(e=>{a[`${t}-wrap-${e}`]={flexWrap:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return c.forEach(e=>{a[`${t}-align-${e}`]={alignItems:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return d.forEach(e=>{a[`${t}-justify-${e}`]={justifyContent:e}}),a})(r)]},()=>({}),{resetStyle:!1});var p=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let h=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:d,style:c,flex:h,gap:g,vertical:x=!1,component:f="div",children:y}=e,b=p(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:j,getPrefixCls:_}=t.default.useContext(l.ConfigContext),w=_("flex",n),[k,N,S]=m(w),C=null!=x?x:null==v?void 0:v.vertical,T=(0,a.default)(d,o,null==v?void 0:v.className,w,N,S,u(w,e),{[`${w}-rtl`]:"rtl"===j,[`${w}-gap-${g}`]:(0,r.isPresetSize)(g),[`${w}-vertical`]:C}),$=Object.assign(Object.assign({},null==v?void 0:v.style),c);return h&&($.flex=h),g&&!(0,r.isPresetSize)(g)&&($.gap=g),k(t.default.createElement(f,Object.assign({ref:i,className:T,style:$},(0,s.default)(b,["justify","wrap","align"])),y))});e.s(["Flex",0,h],525720)},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)},771674,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["UserOutlined",0,l],771674)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),a=e.i(271645);let s={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=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ArrowLeftOutlined",0,l],447566)},948401,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["MailOutlined",0,l],948401)},384767,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(271645),r=e.i(389083);let l=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(764205);let n=function({vectorStores:e,accessToken:n}){let[o,d]=(0,s.useState)([]);return(0,s.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)(r.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 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},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"})]})]})},o=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:"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 d=e.i(871943),c=e.i(502547),u=e.i(592968);let m=function({mcpServers:e,mcpAccessGroups:l=[],mcpToolPermissions:n={},mcpToolsets:m=[],accessToken:p}){let[h,g]=(0,s.useState)([]),[x,f]=(0,s.useState)([]),[y,b]=(0,s.useState)(new Set),[v,j]=(0,s.useState)(new Set);(0,s.useEffect)(()=>{(async()=>{if(p&&e.length>0)try{let e=await (0,i.fetchMCPServers)(p);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[p,e.length]),(0,s.useEffect)(()=>{(async()=>{if(p&&m.length>0)try{let e=await (0,i.fetchMCPToolsets)(p),t=Array.isArray(e)?e.filter(e=>m.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[p,m.length]);let _=[...e.map(e=>({type:"server",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],w=_.length+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)(o,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(r.Badge,{color:"blue",size:"xs",children:w})]}),w>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[_.map((e,a)=>{let s="server"===e.type?n[e.value]:void 0,r=s&&s.length>0,l=y.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return r&&(t=e.value,void b(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 ${r?"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)(u.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=h.find(t=>t.server_id===e);if(t){let a=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),r&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),l?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),r&&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:s.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)}),m.length>0&&m.map((e,a)=>{let s=x.find(t=>t.toolset_id===e),r=v.has(e),l=s?.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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),l>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),r?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l>0&&r&&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,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)(o,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No MCP servers, access groups, or toolsets configured"})]})]})},p=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"}))}),h=function({agents:e,agentAccessGroups:l=[],accessToken:n}){let[o,d]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,i.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],m=c.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)(p,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(r.Badge,{color:"purple",size:"xs",children:m})]}),m>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.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)(u.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 flex-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 flex-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 uppercase tracking-wide flex-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)(p,{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:s="card",className:r="",accessToken:l}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},u=e?.mcp_toolsets||[],p=e?.agents||[],g=e?.agent_access_groups||[],x=(0,t.jsxs)("div",{className:"card"===s?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:i,accessToken:l}),(0,t.jsx)(m,{mcpServers:o,mcpAccessGroups:d,mcpToolPermissions:c,mcpToolsets:u,accessToken:l}),(0,t.jsx)(h,{agents:p,agentAccessGroups:g,accessToken:l})]});return"card"===s?(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)(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"})]})}),x]}):(0,t.jsxs)("div",{className:`${r}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)},891547,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);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,r.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",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)(s.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:l,loading:u,className:i,allowClear:!0,options:d.map(e=>(console.log("Mapping guardrail:",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),s=e.i(199133),r=e.i(764205);function l(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let a=e.version_number??1,s=e.version_status??"draft";return{label:`${e.policy_name} — v${a} (${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:n,accessToken:o,disabled:d,onPoliciesLoaded:c})=>{let[u,m]=(0,a.useState)([]),[p,h]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,r.getPoliciesList)(o);e.policies&&(m(e.policies),c?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{h(!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:p,className:n,allowClear:!0,options:l(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>l])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ClockCircleOutlined",0,l],637235)},916940,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,placeholder:o="Select vector stores",disabled:d=!1})=>{let[c,u]=(0,a.useState)([]),[m,p]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,r.vectorStoreListCall)(n);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",placeholder:o,onChange:e,value:l,loading:m,className:i,allowClear:!0,options:c.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:d})})}])},689020,e=>{"use strict";var t=e.i(764205);let a=async e=>{try{let a=await (0,t.modelHubCall)(e);if(console.log("model_info:",a),a?.data.length>0){let e=a.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,a])},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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 r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["RobotOutlined",0,l],983561)},244451,e=>{"use strict";let t;e.i(247167);var a=e.i(271645),s=e.i(343794),r=e.i(242064),l=e.i(763731),i=e.i(174428);let n=80*Math.PI,o=e=>{let{dotClassName:t,style:r,hasCircleCls:l}=e;return a.createElement("circle",{className:(0,s.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]=a.useState(!1);(0,i.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let p={strokeDashoffset:`${n/4}`,strokeDasharray:`${n*m/100} ${n*(100-m)/100}`};return a.createElement("span",{className:(0,s.default)(l,`${r}-progress`,m<=0&&d)},a.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},a.createElement(o,{dotClassName:r,hasCircleCls:!0}),a.createElement(o,{dotClassName:r,style:p})))};function c(e){let{prefixCls:t,percent:r=0}=e,l=`${t}-dot`,i=`${l}-holder`,n=`${i}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:(0,s.default)(i,r>0&&n)},a.createElement("span",{className:(0,s.default)(l,`${t}-dot-spin`)},[1,2,3,4].map(e=>a.createElement("i",{className:`${t}-dot-item`,key:e})))),a.createElement(d,{prefixCls:t,percent:r}))}function u(e){var t;let{prefixCls:r,indicator:i,percent:n}=e,o=`${r}-dot`;return i&&a.isValidElement(i)?(0,l.cloneElement)(i,{className:(0,s.default)(null==(t=i.props)?void 0:t.className,o),percent:n}):a.createElement(c,{prefixCls:r,percent:n})}e.i(296059);var m=e.i(694758),p=e.i(183293),h=e.i(246422),g=e.i(838378);let x=new m.Keyframes("antSpinMove",{to:{opacity:1}}),f=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),y=(0,h.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:a}=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:a(a(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:a(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:a(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:a(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:a(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(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:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),height:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:x,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:f,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:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal(),height:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,g.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:a}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:a}}),b=[[30,.05],[70,.03],[96,.01]];var v=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let j=e=>{var l;let{prefixCls:i,spinning:n=!0,delay:o=0,className:d,rootClassName:c,size:m="default",tip:p,wrapperClassName:h,style:g,children:x,fullscreen:f=!1,indicator:j,percent:_}=e,w=v(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:k,direction:N,className:S,style:C,indicator:T}=(0,r.useComponentConfig)("spin"),$=k("spin",i),[I,O,E]=y($),[M,A]=a.useState(()=>n&&(!n||!o||!!Number.isNaN(Number(o)))),F=function(e,t){let[s,r]=a.useState(0),l=a.useRef(null),i="auto"===t;return a.useEffect(()=>(i&&e&&(r(0),l.current=setInterval(()=>{r(e=>{let t=100-e;for(let a=0;a{l.current&&(clearInterval(l.current),l.current=null)}),[i,e]),i?s:t}(M,_);a.useEffect(()=>{if(n){let e=function(e,t,a){var s,r=a||{},l=r.noTrailing,i=void 0!==l&&l,n=r.noLeading,o=void 0!==n&&n,d=r.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function p(){s&&clearTimeout(s)}function h(){for(var a=arguments.length,r=Array(a),l=0;le?o?(m=Date.now(),i||(s=setTimeout(c?g:h,e))):h():!0!==i&&(s=setTimeout(c?g:h,void 0===c?e-d:e)))}return h.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},h}(o,()=>{A(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}A(!1)},[o,n]);let z=a.useMemo(()=>void 0!==x&&!f,[x,f]),D=(0,s.default)($,S,{[`${$}-sm`]:"small"===m,[`${$}-lg`]:"large"===m,[`${$}-spinning`]:M,[`${$}-show-text`]:!!p,[`${$}-rtl`]:"rtl"===N},d,!f&&c,O,E),L=(0,s.default)(`${$}-container`,{[`${$}-blur`]:M}),R=null!=(l=null!=j?j:T)?l:t,P=Object.assign(Object.assign({},C),g),B=a.createElement("div",Object.assign({},w,{style:P,className:D,"aria-live":"polite","aria-busy":M}),a.createElement(u,{prefixCls:$,indicator:R,percent:F}),p&&(z||f)?a.createElement("div",{className:`${$}-text`},p):null);return I(z?a.createElement("div",Object.assign({},w,{className:(0,s.default)(`${$}-nested-loading`,h,O,E)}),M&&a.createElement("div",{key:"loading"},B),a.createElement("div",{className:L,key:"container"},x)):f?a.createElement("div",{className:(0,s.default)(`${$}-fullscreen`,{[`${$}-fullscreen-show`]:M},c,O,E)},B):B)};j.setDefaultIndicator=e=>{t=e},e.s(["default",0,j],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},91874,e=>{"use strict";var t=e.i(931067),a=e.i(209428),s=e.i(211577),r=e.i(392221),l=e.i(703923),i=e.i(343794),n=e.i(914949),o=e.i(271645),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],c=(0,o.forwardRef)(function(e,c){var u=e.prefixCls,m=void 0===u?"rc-checkbox":u,p=e.className,h=e.style,g=e.checked,x=e.disabled,f=e.defaultChecked,y=e.type,b=void 0===y?"checkbox":y,v=e.title,j=e.onChange,_=(0,l.default)(e,d),w=(0,o.useRef)(null),k=(0,o.useRef)(null),N=(0,n.default)(void 0!==f&&f,{value:g}),S=(0,r.default)(N,2),C=S[0],T=S[1];(0,o.useImperativeHandle)(c,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:k.current}});var $=(0,i.default)(m,p,(0,s.default)((0,s.default)({},"".concat(m,"-checked"),C),"".concat(m,"-disabled"),x));return o.createElement("span",{className:$,title:v,style:h,ref:k},o.createElement("input",(0,t.default)({},_,{className:"".concat(m,"-input"),ref:w,onChange:function(t){x||("checked"in e||T(t.target.checked),null==j||j({target:(0,a.default)((0,a.default)({},e),{},{type:b,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:x,checked:!!C,type:b})),o.createElement("span",{className:"".concat(m,"-inner")}))});e.s(["default",0,c])},681216,e=>{"use strict";var t=e.i(271645),a=e.i(963188);function s(e){let s=t.default.useRef(null),r=()=>{a.default.cancel(s.current),s.current=null};return[()=>{r(),s.current=(0,a.default)(()=>{s.current=null})},t=>{s.current&&(t.stopPropagation(),r()),null==e||e(t)}]}e.s(["default",()=>s])},421512,236836,e=>{"use strict";let t=e.i(271645).default.createContext(null);e.s(["default",0,t],421512),e.i(296059);var a=e.i(915654),s=e.i(183293),r=e.i(246422),l=e.i(838378);function i(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,s.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,s.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,s.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,s.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}})},{[` + ${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,l.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let n=(0,r.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[i(t,e)]);e.s(["default",0,n,"getStyle",()=>i],236836)},374276,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),s=e.i(91874),r=e.i(611935),l=e.i(121872),i=e.i(26905),n=e.i(242064),o=e.i(937328),d=e.i(321883),c=e.i(62139),u=e.i(421512),m=e.i(236836),p=e.i(681216),h=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let g=t.forwardRef((e,g)=>{var x;let{prefixCls:f,className:y,rootClassName:b,children:v,indeterminate:j=!1,style:_,onMouseEnter:w,onMouseLeave:k,skipGroup:N=!1,disabled:S}=e,C=h(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:T,direction:$,checkbox:I}=t.useContext(n.ConfigContext),O=t.useContext(u.default),{isFormItemInput:E}=t.useContext(c.FormItemInputContext),M=t.useContext(o.default),A=null!=(x=(null==O?void 0:O.disabled)||S)?x:M,F=t.useRef(C.value),z=t.useRef(null),D=(0,r.composeRef)(g,z);t.useEffect(()=>{null==O||O.registerValue(C.value)},[]),t.useEffect(()=>{if(!N)return C.value!==F.current&&(null==O||O.cancelValue(F.current),null==O||O.registerValue(C.value),F.current=C.value),()=>null==O?void 0:O.cancelValue(C.value)},[C.value]),t.useEffect(()=>{var e;(null==(e=z.current)?void 0:e.input)&&(z.current.input.indeterminate=j)},[j]);let L=T("checkbox",f),R=(0,d.default)(L),[P,B,K]=(0,m.default)(L,R),V=Object.assign({},C);O&&!N&&(V.onChange=(...e)=>{C.onChange&&C.onChange.apply(C,e),O.toggleOption&&O.toggleOption({label:v,value:C.value})},V.name=O.name,V.checked=O.value.includes(C.value));let G=(0,a.default)(`${L}-wrapper`,{[`${L}-rtl`]:"rtl"===$,[`${L}-wrapper-checked`]:V.checked,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:E},null==I?void 0:I.className,y,b,K,R,B),U=(0,a.default)({[`${L}-indeterminate`]:j},i.TARGET_CLS,B),[H,W]=(0,p.default)(V.onClick);return P(t.createElement(l.default,{component:"Checkbox",disabled:A},t.createElement("label",{className:G,style:Object.assign(Object.assign({},null==I?void 0:I.style),_),onMouseEnter:w,onMouseLeave:k,onClick:H},t.createElement(s.default,Object.assign({},V,{onClick:W,prefixCls:L,className:U,disabled:A,ref:D})),null!=v&&t.createElement("span",{className:`${L}-label`},v))))});var x=e.i(8211),f=e.i(529681),y=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let b=t.forwardRef((e,s)=>{let{defaultValue:r,children:l,options:i=[],prefixCls:o,className:c,rootClassName:p,style:h,onChange:b}=e,v=y(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:j,direction:_}=t.useContext(n.ConfigContext),[w,k]=t.useState(v.value||r||[]),[N,S]=t.useState([]);t.useEffect(()=>{"value"in v&&k(v.value||[])},[v.value]);let C=t.useMemo(()=>i.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[i]),T=e=>{S(t=>t.filter(t=>t!==e))},$=e=>{S(t=>[].concat((0,x.default)(t),[e]))},I=e=>{let t=w.indexOf(e.value),a=(0,x.default)(w);-1===t?a.push(e.value):a.splice(t,1),"value"in v||k(a),null==b||b(a.filter(e=>N.includes(e)).sort((e,t)=>C.findIndex(t=>t.value===e)-C.findIndex(e=>e.value===t)))},O=j("checkbox",o),E=`${O}-group`,M=(0,d.default)(O),[A,F,z]=(0,m.default)(O,M),D=(0,f.default)(v,["value","disabled"]),L=i.length?C.map(e=>t.createElement(g,{prefixCls:O,key:e.value.toString(),disabled:"disabled"in e?e.disabled:v.disabled,value:e.value,checked:w.includes(e.value),onChange:e.onChange,className:(0,a.default)(`${E}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):l,R=t.useMemo(()=>({toggleOption:I,value:w,disabled:v.disabled,name:v.name,registerValue:$,cancelValue:T}),[I,w,v.disabled,v.name,$,T]),P=(0,a.default)(E,{[`${E}-rtl`]:"rtl"===_},c,p,z,M,F);return A(t.createElement("div",Object.assign({className:P,style:h},D,{ref:s}),t.createElement(u.default.Provider,{value:R},L)))});g.Group=b,g.__ANT_CHECKBOX=!0,e.s(["default",0,g],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},214541,e=>{"use strict";var t=e.i(271645),a=e.i(135214),s=e.i(270345);e.s(["default",0,()=>{let[e,r]=(0,t.useState)([]),{accessToken:l,userId:i,userRole:n}=(0,a.default)();return(0,t.useEffect)(()=>{(async()=>{r(await (0,s.fetchTeams)(l,i,n,null))})()},[l,i,n]),{teams:e,setTeams:r}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function a(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function s(e,s){let r=t(e);return isNaN(s)?a(e,NaN):(s&&r.setDate(r.getDate()+s),r)}function r(e,s){let r=t(e);if(isNaN(s))return a(e,NaN);if(!s)return r;let l=r.getDate(),i=a(e,r.getTime());return(i.setMonth(r.getMonth()+s+1,0),l>=i.getDate())?i:(r.setFullYear(i.getFullYear(),i.getMonth(),l),r)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>a],96226),e.s(["addDays",()=>s],439189),e.s(["addMonths",()=>r],497245)},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SyncOutlined",0,l],772345)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ThunderboltOutlined",0,l],962944)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),r=e.i(477386),l=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,r)=>{var i;let n=(i=e.callback_name,Object.entries(l.callback_map).find(([e,t])=>t===i)?.[0]||i),o=l.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},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)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=l.reverse_callback_map[e]||e,n=l.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(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)(r.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,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:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),d]})}])},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:r=[],onDisabledCallbacksChange:l})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:l})])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=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 r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["CalendarOutlined",0,l],72713)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SafetyCertificateOutlined",0,l],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(r.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function r({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>r])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),r=e.i(592968),l=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),u=e.i(646563),m=e.i(771674),p=e.i(948401),h=e.i(72713),g=e.i(637235),x=e.i(962944),f=e.i(534172),y=e.i(3750),b=e.i(304911);let{Text:v}=s.Typography;function j({label:e,value:a,icon:s,truncate:r=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(b.default,{userId:a}):(0,t.jsx)(v,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:r,style:r?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(l.Space,{size:4,children:[(0,t.jsx)(v,{type:"secondary",children:s}),(0,t.jsx)(v,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:_,Text:w}=s.Typography;function k({data:e,onBack:s,onCreateNew:b,onRegenerate:v,onDelete:k,onResetSpend:N,canModifyKey:S=!0,backButtonText:C="Back to Keys",regenerateDisabled:T=!1,regenerateTooltip:$}){return(0,t.jsxs)("div",{children:[b&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(u.PlusOutlined,{}),onClick:b,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:C})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(w,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),S&&(0,t.jsxs)(l.Space,{children:[(0,t.jsx)(r.Tooltip,{title:$||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:v,disabled:T,children:"Regenerate Key"})})}),N&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(y.TransactionOutlined,{}),onClick:N,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:k,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(j,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(p.MailOutlined,{})}),(0,t.jsx)(j,{label:"User ID",value:e.userId,icon:(0,t.jsx)(m.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(j,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(h.CalendarOutlined,{})}),(0,t.jsx)(j,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(f.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(j,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(j,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(x.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>k],784647);var N=e.i(599724),S=e.i(389083),C=e.i(278587),T=e.i(271645);let $=T.forwardRef(function(e,t){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:t},e),T.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:r,nextRotationAt:l,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(C.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(N.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(S.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(N.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||r||l)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)($,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(N.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(N.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(r||l)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)($,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(N.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(N.Text,{className:"text-sm text-gray-600",children:o(l||r||"")})]})]}),e&&!s&&!r&&!l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)($,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(N.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!r&&!l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(N.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(N.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(N.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let I=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!I.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},65932,272753,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),r=e.i(135214),l=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),r=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,l=await fetch(r,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return l.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,r.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:l.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(492030),d=e.i(166406),c=e.i(772345),u=e.i(560445),m=e.i(464571),p=e.i(178654),h=e.i(525720),g=e.i(808613),x=e.i(311451),f=e.i(28651),y=e.i(212931),b=e.i(621192),v=e.i(770914),j=e.i(898586),_=e.i(439189),w=e.i(497245),k=e.i(96226),N=e.i(435684);function S(e,t){let{years:a=0,months:s=0,weeks:r=0,days:l=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,N.toDate)(e),c=s||a?(0,w.addMonths)(d,s+12*a):d,u=l||r?(0,_.addDays)(c,l+7*r):c;return(0,k.constructFrom)(e,u.getTime()+1e3*(o+60*(n+60*i)))}var C=e.i(271645),T=e.i(237016),$=e.i(727749);let{Text:I}=j.Typography;function O({selectedToken:e,visible:t,onClose:a,onKeyUpdate:l}){let{accessToken:i}=(0,r.default)(),[j]=g.Form.useForm(),[_,w]=(0,C.useState)(null),[k,N]=(0,C.useState)(null),[O,E]=(0,C.useState)(null),[M,A]=(0,C.useState)(!1),[F,z]=(0,C.useState)(!1);(0,C.useEffect)(()=>{t&&e&&i&&j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""})},[t,e,j,i]);let D=e=>{if(!e)return null;try{let t,a=parseInt(e);if(Number.isNaN(a))throw Error("Invalid duration format");let s=new Date;if(e.endsWith("mo"))t=S(s,{months:a});else if(e.endsWith("s"))t=S(s,{seconds:a});else if(e.endsWith("m"))t=S(s,{minutes:a});else if(e.endsWith("h"))t=S(s,{hours:a});else if(e.endsWith("d"))t=S(s,{days:a});else if(e.endsWith("w"))t=S(s,{weeks:a});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,C.useEffect)(()=>{k?.duration?E(D(k.duration)):E(null)},[k?.duration]);let L=async()=>{if(e&&i){A(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(i,e.token||e.token_id,t);w(a.key),$.default.success("Virtual Key regenerated successfully");let r={...a,token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?D(t.duration)??e.expires:e.expires};l&&l(r),A(!1)}catch(e){console.error("Error regenerating key:",e),$.default.fromBackend(e),A(!1)}}},R=()=>{w(null),A(!1),z(!1),j.resetFields(),a()};return(0,n.jsx)(y.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:R,width:520,maskClosable:!1,footer:_?[(0,n.jsxs)(v.Space,{children:[(0,n.jsx)(m.Button,{onClick:R,children:"Close"}),(0,n.jsx)(T.CopyToClipboard,{text:_,onCopy:()=>{z(!0)},children:(0,n.jsx)(m.Button,{type:"primary",icon:F?(0,n.jsx)(o.CheckOutlined,{}):(0,n.jsx)(d.CopyOutlined,{}),children:F?"Copied":"Copy Key"})})]},"footer-actions")]:[(0,n.jsxs)(v.Space,{children:[(0,n.jsx)(m.Button,{onClick:R,children:"Cancel"}),(0,n.jsx)(m.Button,{type:"primary",icon:(0,n.jsx)(c.SyncOutlined,{}),onClick:L,loading:M,children:"Regenerate"})]},"footer-actions")],children:_?(0,n.jsxs)(h.Flex,{vertical:!0,gap:"middle",children:[(0,n.jsx)(u.Alert,{type:"warning",showIcon:!0,message:"Save it now, you will not see it again"}),(0,n.jsxs)(h.Flex,{vertical:!0,gap:2,children:[(0,n.jsx)(I,{type:"secondary",style:{fontSize:12},children:"Key Alias"}),(0,n.jsx)(I,{children:e?.key_alias||"No alias set"})]}),(0,n.jsxs)(h.Flex,{vertical:!0,gap:6,children:[(0,n.jsx)(I,{type:"secondary",style:{fontSize:12},children:"Virtual Key"}),(0,n.jsx)("div",{style:{background:"#f5f5f5",border:"1px solid #e8e8e8",borderRadius:6,padding:"14px 16px",fontFamily:"SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace",fontSize:16,wordBreak:"break-all",color:"#262626"},children:_})]})]}):(0,n.jsxs)(g.Form,{form:j,layout:"vertical",style:{marginTop:4},onValuesChange:e=>{"duration"in e&&N(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(g.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(x.Input,{disabled:!0})}),(0,n.jsxs)(b.Row,{gutter:12,children:[(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(f.InputNumber,{step:.01,precision:2,style:{width:"100%"}})})}),(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(f.InputNumber,{style:{width:"100%"}})})}),(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(f.InputNumber,{style:{width:"100%"}})})})]}),(0,n.jsxs)(b.Row,{gutter:12,children:[(0,n.jsx)(p.Col,{span:12,children:(0,n.jsx)(g.Form.Item,{name:"duration",label:"Expire Key",extra:(0,n.jsxs)(h.Flex,{vertical:!0,gap:2,children:[(0,n.jsxs)(I,{type:"secondary",style:{fontSize:12},children:["Current expiry:"," ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),O&&(0,n.jsxs)(I,{type:"success",style:{fontSize:12},children:["New expiry: ",O]})]}),children:(0,n.jsx)(x.Input,{placeholder:"e.g. 30s, 30h, 30d"})})}),(0,n.jsx)(p.Col,{span:12,children:(0,n.jsx)(g.Form.Item,{name:"grace_period",label:"Grace Period",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",extra:(0,n.jsx)(I,{type:"secondary",style:{fontSize:12},children:"Recommended: 24h to 72h for production keys"}),rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(x.Input,{placeholder:"e.g. 24h, 2d"})})})]})]})})}e.s(["RegenerateKeyModal",()=>O],272753)},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),r=e.i(292639),l=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),u=e.i(304967),m=e.i(350967),p=e.i(197647),h=e.i(653824),g=e.i(881073),x=e.i(404206),f=e.i(723731),y=e.i(599724),b=e.i(629569),v=e.i(808613),j=e.i(212931),_=e.i(262218),w=e.i(784647),k=e.i(271645),N=e.i(708347),S=e.i(557662),C=e.i(505022),T=e.i(127952),$=e.i(721929),I=e.i(643449),O=e.i(727749),E=e.i(764205),M=e.i(65932),A=e.i(384767),F=e.i(272753),z=e.i(190702),D=e.i(891547),L=e.i(109799),R=e.i(921511),P=e.i(827252),B=e.i(779241),K=e.i(311451),V=e.i(199133),G=e.i(790848),U=e.i(592968),H=e.i(552130),W=e.i(9314),q=e.i(392110),X=e.i(844565),J=e.i(939510),Q=e.i(363256),Y=e.i(319312),Z=e.i(75921),ee=e.i(390605),et=e.i(702597),ea=e.i(435451),es=e.i(183588),er=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:l,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:u=!1}){let m=u||null!=d&&N.rolesWithWriteAccess.includes(d),[p]=v.Form.useForm(),[h,g]=(0,k.useState)([]),[x,f]=(0,k.useState)({}),y=i?.find(t=>t.team_id===e.team_id),[b,j]=(0,k.useState)([]),[_,w]=(0,k.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[C,T]=(0,k.useState)(e.organization_id||null),[I,M]=(0,k.useState)(e.auto_rotate||!1),[A,F]=(0,k.useState)(e.rotation_interval||""),[z,el]=(0,k.useState)(!e.expires),[ei,en]=(0,k.useState)(!1),[eo,ed]=(0,k.useState)(Array.isArray(e.budget_limits)?e.budget_limits:[]),{data:ec,isLoading:eu}=(0,L.useOrganizations)(),{data:em}=(0,s.useProjects)(),{data:ep}=(0,r.useUISettings)(),eh=!!ep?.values?.enable_projects_ui,eg=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=em?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,k.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,E.modelAvailableCall)(n,o,d)).data.map(e=>e.id);j(e)}else if(y?.team_id){let e=await (0,et.fetchTeamModels)(o,d,n,y.team_id);j(Array.from(new Set([...y.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,E.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,y,e.team_id]),(0,k.useEffect)(()=>{p.setFieldValue("disabled_callbacks",_)},[p,_]);let ef=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,ey={...e,token:e.token||e.token_id,budget_duration:ef(e.budget_duration),metadata:(0,$.formatMetadataForDisplay)((0,$.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,$.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,k.useEffect)(()=>{p.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:ef(e.budget_duration),metadata:(0,$.formatMetadataForDisplay)((0,$.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,$.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,p]),(0,k.useEffect)(()=>{p.setFieldValue("auto_rotate",I)},[I,p]),(0,k.useEffect)(()=>{A&&p.setFieldValue("rotation_interval",A)},[A,p]),(0,k.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,E.tagListCall)(n);f(e)}catch(e){O.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eb=async e=>{try{if(en(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}z&&(e.duration=null);let t=eo.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);e.budget_limits=t.length>0?t:void 0,await l(e)}finally{en(!1)}};return(0,t.jsxs)(v.Form,{form:p,onFinish:eb,initialValues:ey,layout:"vertical",children:[(0,t.jsx)(v.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(B.TextInput,{})}),(0,t.jsx)(v.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(v.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",r="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],l=r.includes("management_routes")||r.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(V.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:l,value:l?[]:i,onChange:e=>a("models",e),children:[b.length>0&&(0,t.jsx)(V.Select.Option,{value:"all-team-models",children:"All Team Models"}),b.map(e=>(0,t.jsx)(V.Select.Option,{value:e,children:e},e))]}),l&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(v.Form.Item,{label:"Key Type",children:(0,t.jsx)(v.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let r=e("allowed_routes")||"",l=(s="string"==typeof r&&""!==r.trim()?r.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(V.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:l,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(V.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(V.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(V.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(U.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(K.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(v.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(ea.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(v.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(V.Select,{placeholder:"n/a",children:[(0,t.jsx)(V.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(V.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(V.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(U.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)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.BudgetWindowsEditor,{value:eo,onChange:ed})}),(0,t.jsx)(v.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(ea.default,{min:0})}),(0,t.jsx)(J.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(v.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(ea.default,{min:0})}),(0,t.jsx)(J.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(v.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(ea.default,{min:0})}),(0,t.jsx)(v.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(K.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(v.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(K.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(v.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(D.default,{onChange:e=>{p.setFieldValue("guardrails",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(U.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)(G.Switch,{disabled:!m,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(U.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(R.default,{onChange:e=>{p.setFieldValue("policies",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(v.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(V.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(x).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(v.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(U.Tooltip,{title:u?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(V.Select,{mode:"tags",style:{width:"100%"},disabled:!u,placeholder:u?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:h.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(U.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)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(W.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(v.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(U.Tooltip,{title:u?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(X.default,{onChange:e=>p.setFieldValue("allowed_passthrough_routes",e),value:p.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:u?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!u})})}),(0,t.jsx)(v.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(er.default,{onChange:e=>p.setFieldValue("vector_stores",e),value:p.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(v.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(Z.default,{onChange:e=>p.setFieldValue("mcp_servers_and_groups",e),value:p.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(v.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(K.Input,{type:"hidden"})}),(0,t.jsx)(v.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)(ee.default,{accessToken:n||"",selectedServers:p.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:p.getFieldValue("mcp_tool_permissions")||{},onChange:e=>p.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(v.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(H.default,{onChange:e=>p.setFieldValue("agents_and_groups",e),value:p.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(U.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Q.default,{organizations:ec,loading:eu,disabled:"Admin"!==d,onChange:e=>{T(e||null),p.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(v.Form.Item,{label:"Team ID",name:"team_id",help:eh&&eg?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(V.Select,{placeholder:"Select team",showSearch:!0,disabled:eh&&eg,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(T(t.organization_id),p.setFieldValue("organization_id",t.organization_id)):e||(T(null),p.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=C?i?.filter(e=>e.organization_id===C):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(C?i?.filter(e=>e.organization_id===C):i)?.map(e=>(0,t.jsx)(V.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),eh&&eg&&(0,t.jsx)(v.Form.Item,{label:"Project",children:(0,t.jsx)(K.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(v.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(es.default,{value:p.getFieldValue("logging_settings"),onChange:e=>p.setFieldValue("logging_settings",e),disabledCallbacks:_,onDisabledCallbacksChange:e=>{w((0,S.mapInternalToDisplayNames)(e)),p.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(v.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(K.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:p,autoRotationEnabled:I,onAutoRotationChange:M,rotationInterval:A,onRotationIntervalChange:F,neverExpire:z,onNeverExpireChange:el}),(0,t.jsx)(v.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(K.Input,{})})]}),(0,t.jsx)(v.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)(v.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)(v.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)(v.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:ei,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:ei,children:"Save Changes"})]})})]})}let ei=["policies","guardrails","prompts","tags","allowed_passthrough_routes"],en=e=>null==e||Array.isArray(e)&&0===e.length||"string"==typeof e&&""===e.trim();function eo({onClose:e,keyData:D,teams:L,onKeyDataUpdate:R,onDelete:P,backButtonText:B="Back to Keys"}){let K,{accessToken:V,userId:G,userRole:U,premiumUser:H}=(0,a.default)(),W=H||null!=U&&N.rolesWithWriteAccess.includes(U),{teams:q}=(0,l.default)(),{data:X}=(0,s.useProjects)(),{data:J}=(0,r.useUISettings)(),Q=!!J?.values?.enable_projects_ui,[Y,Z]=(0,k.useState)(!1),[ee]=v.Form.useForm(),[et,ea]=(0,k.useState)(!1),[es,er]=(0,k.useState)(!1),[eo,ed]=(0,k.useState)(""),[ec,eu]=(0,k.useState)(!1),[em,ep]=(0,k.useState)(!1),{mutate:eh,isPending:eg}=(0,M.useResetKeySpend)(),[ex,ef]=(0,k.useState)(D),[ey,eb]=(0,k.useState)(null),[ev,ej]=(0,k.useState)(!1),[e_,ew]=(0,k.useState)({}),[ek,eN]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{D&&ef(D)},[D]),(0,k.useEffect)(()=>{(async()=>{let e=ex?.metadata?.policies;if(!V||!e||!Array.isArray(e)||0===e.length)return;eN(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,E.getPolicyInfoWithGuardrails)(V,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ew(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eN(!1)}})()},[V,ex?.metadata?.policies]),(0,k.useEffect)(()=>{if(ev){let e=setTimeout(()=>{ej(!1)},5e3);return()=>clearTimeout(e)}},[ev]),!ex)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:B}),(0,t.jsx)(y.Text,{children:"Key not found"})]});let eS=async e=>{try{if(!V)return;let t=e.token;for(let a of(e.key=t,W||(delete e.guardrails,delete e.prompts),ei)){let t=ex.metadata?.[a]??ex[a];en(e[a])&&en(t)&&delete e[a]}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ex.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a,toolsets:s}=e.mcp_servers_and_groups||{servers:[],accessGroups:[],toolsets:[]};e.object_permission={...ex.object_permission,mcp_servers:t||[],mcp_access_groups:a||[],mcp_toolsets:s||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,S.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),O.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,S.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,E.keyUpdateCall)(V,e);ef(e=>e?{...e,...a}:void 0),R&&R(a),O.default.success("Key updated successfully"),Z(!1)}catch(e){O.default.fromBackend((0,z.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eC=async()=>{try{if(er(!0),!V)return;await (0,E.keyDeleteCall)(V,ex.token||ex.token_id),O.default.success("Key deleted successfully"),P&&P(),e()}catch(e){console.error("Error deleting the key:",e),O.default.fromBackend(e)}finally{er(!1),ea(!1),ed("")}},eT=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},e$=(0,N.isProxyAdminRole)(U||"")||q&&(0,N.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ex.team_id)[0]?.members_with_roles,G||"")||G===ex.user_id&&"Internal Viewer"!==U,eI=(0,N.isProxyAdminRole)(U||"")||q&&(0,N.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ex.team_id)[0]?.members_with_roles,G||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(w.KeyInfoHeader,{data:{keyName:ex.key_alias||"Virtual Key",keyId:ex.token_id||ex.token,userId:ex.user_id||"",userEmail:ex.user_email||"",createdBy:ex.user_email||ex.user_id||"",createdAt:ex.created_at?eT(ex.created_at):"",lastUpdated:ex.updated_at?eT(ex.updated_at):"",lastActive:ex.last_active?eT(ex.last_active):"Never"},onBack:e,onRegenerate:()=>eu(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>ep(!0):void 0,canModifyKey:e$,backButtonText:B,regenerateDisabled:!H,regenerateTooltip:H?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(F.RegenerateKeyModal,{selectedToken:ex,visible:ec,onClose:()=>eu(!1),onKeyUpdate:e=>{ef(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),eb(new Date),ej(!0),R&&R({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(T.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:ex?.key_alias||"-"},{label:"Key ID",value:ex?.token_id||ex?.token||"-",code:!0},{label:"Team ID",value:ex?.team_id||"-",code:!0},{label:"Spend",value:ex?.spend?`$${(0,i.formatNumberWithCommas)(ex.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),ed("")},onOk:eC,confirmLoading:es,requiredConfirmation:ex?.key_alias}),(0,t.jsxs)(j.Modal,{title:"Reset Key Spend",open:em,onOk:()=>{eh(ex.token||ex.token_id,{onSuccess:()=>{ef(e=>e?{...e,spend:0}:void 0),R&&R({spend:0}),O.default.success("Key spend reset to $0"),ep(!1)},onError:e=>{O.default.fromBackend((0,z.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>ep(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:eg,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:ex?.key_alias||ex?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(h.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(p.Tab,{children:"Overview"}),(0,t.jsx)(p.Tab,{children:"Settings"})]}),(0,t.jsxs)(f.TabPanels,{children:[(0,t.jsx)(x.TabPanel,{children:(0,t.jsxs)(m.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(y.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(b.Title,{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)]}),(0,t.jsxs)(y.Text,{children:["of"," ",null!==ex.max_budget?`$${(0,i.formatNumberWithCommas)(ex.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(y.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Text,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(y.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ex.models&&ex.models.length>0?ex.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(y.Text,{children:"No models specified"})})]}),(0,t.jsx)(u.Card,{children:(0,t.jsx)(A.default,{objectPermission:ex.object_permission,variant:"inline",accessToken:V})}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(y.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(ex.metadata?.guardrails)&&ex.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ex.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(y.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof ex.metadata?.disable_global_guardrails&&!0===ex.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(y.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(ex.metadata?.policies)&&ex.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ex.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ek&&(0,t.jsx)(y.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ek&&e_[e]&&e_[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(y.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e_[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(y.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(I.default,{loggingConfigs:(0,$.extractLoggingSettings)(ex.metadata),disabledCallbacks:Array.isArray(ex.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(ex.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(C.default,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(x.TabPanel,{children:(0,t.jsxs)(u.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)(b.Title,{children:"Key Settings"}),!Y&&e$&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),Y?(0,t.jsx)(el,{keyData:ex,onCancel:()=>Z(!1),onSubmit:eS,teams:L,accessToken:V,userID:G,userRole:U,premiumUser:H}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(y.Text,{className:"font-mono",children:ex.token_id||ex.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(y.Text,{children:ex.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(y.Text,{className:"font-mono",children:ex.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(y.Text,{children:ex.team_id||"Not Set"})]}),Q&&(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(y.Text,{children:ex.project_id?(K=X?.find(e=>e.project_id===ex.project_id),K?.project_alias?`${K.project_alias} (${ex.project_id})`:ex.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(y.Text,{children:(ex.organization_id??ex.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(y.Text,{children:eT(ex.created_at)})]}),ey&&(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Text,{children:eT(ey)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(y.Text,{children:ex.expires?eT(ex.expires):"Never"})]}),(0,t.jsx)(C.default,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(y.Text,{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(y.Text,{children:null!==ex.max_budget?`$${(0,i.formatNumberWithCommas)(ex.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ex.metadata?.tags)&&ex.metadata.tags.length>0?ex.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(y.Text,{children:Array.isArray(ex.metadata?.prompts)&&ex.metadata.prompts.length>0?ex.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ex.allowed_routes)&&ex.allowed_routes.length>0?ex.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(y.Text,{children:Array.isArray(ex.metadata?.allowed_passthrough_routes)&&ex.metadata.allowed_passthrough_routes.length>0?ex.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(y.Text,{children:ex.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ex.models&&ex.models.length>0?ex.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(y.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(y.Text,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Max Parallel Requests:"," ",null!==ex.max_parallel_requests?ex.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Model TPM Limits:"," ",ex.metadata?.model_tpm_limit?JSON.stringify(ex.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Model RPM Limits:"," ",ex.metadata?.model_rpm_limit?JSON.stringify(ex.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,$.formatMetadataForDisplay)((0,$.stripTagsFromMetadata)(ex.metadata))})]}),(0,t.jsx)(A.default,{objectPermission:ex.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:V}),(0,t.jsx)(I.default,{loggingConfigs:(0,$.extractLoggingSettings)(ex.metadata),disabledCallbacks:Array.isArray(ex.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(ex.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>eo],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/f4cb209365e2229d.js b/litellm/proxy/_experimental/out/_next/static/chunks/f4cb209365e2229d.js new file mode 100644 index 0000000000..4551f9e8cb --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/f4cb209365e2229d.js @@ -0,0 +1,8 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},551332,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:"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"}))});e.s(["ClipboardCopyIcon",0,r],551332)},902555,e=>{"use strict";var t=e.i(843476),r=e.i(591935),a=e.i(122577),o=e.i(278587),l=e.i(68155),n=e.i(360820),i=e.i(871943),s=e.i(434626),d=e.i(551332),c=e.i(592968),m=e.i(115504),g=e.i(752978);function u({icon:e,onClick:r,className:a,disabled:o,dataTestId:l}){return o?(0,t.jsx)(g.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":l}):(0,t.jsx)(g.Icon,{icon:e,size:"sm",onClick:r,className:(0,m.cx)("cursor-pointer",a),"data-testid":l})}let b={Edit:{icon:r.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:l.TrashIcon,className:"hover:text-red-600"},Test:{icon:a.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:o.RefreshIcon,className:"hover:text-green-600"},Up:{icon:n.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:i.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:s.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function h({onClick:e,tooltipText:r,disabled:a=!1,disabledTooltipText:o,dataTestId:l,variant:n}){let{icon:i,className:s}=b[n];return(0,t.jsx)(c.Tooltip,{title:a?o:r,children:(0,t.jsx)("span",{children:(0,t.jsx)(u,{icon:i,onClick:e,className:s,disabled:a,dataTestId:l})})})}e.s(["default",()=>h],902555)},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)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),l=e.i(444755),n=e.i(673706),i=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"}},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:""}},m=(0,n.makeClassName)("Icon"),g=r.default.forwardRef((e,g)=>{let{icon:u,variant:b="simple",tooltip:h,size:f=o.Sizes.SM,color:p,className:C}=e,k=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),x=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.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,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.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,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,n.getColorClassNames)(t,i.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(b,p),{tooltipProps:w,getReferenceProps:v}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,n.mergeRefs)([g,w.refs.setReference]),className:(0,l.tremorTwMerge)(m("root"),"inline-flex shrink-0 items-center justify-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,c[b].rounded,c[b].border,c[b].shadow,c[b].ring,s[f].paddingX,s[f].paddingY,C)},v,k),r.default.createElement(a.default,Object.assign({text:h},w)),r.default.createElement(u,{className:(0,l.tremorTwMerge)(m("icon"),"shrink-0",d[f].height,d[f].width)}))});g.displayName="Icon",e.s(["default",()=>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)},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var o=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(o.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),o=e.i(529681);let l=e=>{let{prefixCls:a,className:o,style:l,size:n,shape:i}=e,s=(0,r.default)({[`${a}-lg`]:"large"===n,[`${a}-sm`]:"small"===n}),d=(0,r.default)({[`${a}-circle`]:"circle"===i,[`${a}-square`]:"square"===i,[`${a}-round`]:"round"===i}),c=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(a,s,d,o),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var n=e.i(694758),i=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),m=e=>({height:e,lineHeight:(0,i.unit)(e)}),g=e=>Object.assign({width:e},m(e)),u=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},m(e)),b=e=>Object.assign({width:e},m(e)),h=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},f=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},m(e)),p=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:o,skeletonButtonCls:l,skeletonInputCls:n,skeletonImageCls:i,controlHeight:s,controlHeightLG:d,controlHeightSM:m,gradientFromColor:p,padding:C,marginSM:k,borderRadius:x,titleHeight:w,blockRadius:v,paragraphLiHeight:N,controlHeightXS:$,paragraphMarginTop:j}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:C,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:p},g(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},g(d)),[`${r}-sm`]:Object.assign({},g(m))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:w,background:p,borderRadius:v,[`+ ${o}`]:{marginBlockStart:m}},[o]:{padding:0,"> li":{width:"100%",height:N,listStyle:"none",background:p,borderRadius:v,"+ li":{marginBlockStart:$}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${o} > li`]:{borderRadius:x}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:k,[`+ ${o}`]:{marginBlockStart:j}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=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:i(a).mul(2).equal(),minWidth:i(a).mul(2).equal()},f(a,i))},h(e,a,r)),{[`${r}-lg`]:Object.assign({},f(o,i))}),h(e,o,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},f(l,i))}),h(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},g(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},g(o)),[`${t}${t}-sm`]:Object.assign({},g(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},u(t,i)),[`${a}-lg`]:Object.assign({},u(o,i)),[`${a}-sm`]:Object.assign({},u(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:o,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:o},b(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},b(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${o} > li, + ${r}, + ${l}, + ${n}, + ${i} + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),C=e=>{let{prefixCls:a,className:o,style:l,rows:n=0}=e,i=Array.from({length:n}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,o),style:l},i)},k=({prefixCls:e,className:a,width:o,style:l})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:o},l)});function x(e){return e&&"object"==typeof e?e:{}}let w=e=>{let{prefixCls:o,loading:n,className:i,rootClassName:s,style:d,children:c,avatar:m=!1,title:g=!0,paragraph:u=!0,active:b,round:h}=e,{getPrefixCls:f,direction:w,className:v,style:N}=(0,a.useComponentConfig)("skeleton"),$=f("skeleton",o),[j,y,E]=p($);if(n||!("loading"in e)){let e,a,o=!!m,n=!!g,c=!!u;if(o){let r=Object.assign(Object.assign({prefixCls:`${$}-avatar`},n&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),x(m));e=t.createElement("div",{className:`${$}-header`},t.createElement(l,Object.assign({},r)))}if(n||c){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${$}-title`},!o&&c?{width:"38%"}:o&&c?{width:"50%"}:{}),x(g));e=t.createElement(k,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},o&&n||(e.width="61%"),!o&&n?e.rows=3:e.rows=2,e)),x(u));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${$}-content`},e,r)}let f=(0,r.default)($,{[`${$}-with-avatar`]:o,[`${$}-active`]:b,[`${$}-rtl`]:"rtl"===w,[`${$}-round`]:h},v,i,s,y,E);return j(t.createElement("div",{className:f,style:Object.assign(Object.assign({},N),d)},e,a))}return null!=c?c:null};w.Button=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c=!1,size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[b,h,f]=p(u),C=(0,o.default)(e,["prefixCls"]),k=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},i,s,h,f);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${u}-button`,size:m},C))))},w.Avatar=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,shape:c="circle",size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[b,h,f]=p(u),C=(0,o.default)(e,["prefixCls","className"]),k=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d},i,s,h,f);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${u}-avatar`,shape:c,size:m},C))))},w.Input=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c,size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[b,h,f]=p(u),C=(0,o.default)(e,["prefixCls"]),k=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},i,s,h,f);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${u}-input`,size:m},C))))},w.Image=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",o),[m,g,u]=p(c),b=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},l,n,g,u);return m(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${c}-image`,l),style:i},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`})))))},w.Node=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),m=c("skeleton",o),[g,u,b]=p(m),h=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:s},u,l,n,b);return g(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${m}-image`,l),style:i},d)))},e.s(["default",0,w],185793)},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"],l=e=>({_s:e,status:o[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),n=e=>e?6:5,i=(e,t,r,a,o)=>{clearTimeout(a.current);let n=l(e);t(n),r.current=n,o&&o({current:n})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let m=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 g=e.i(95779);let u={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,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,g.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,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},h=(0,c.makeClassName)("Button"),f=({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:l,transitionStatus:n})=>{let i=l?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),g={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(m,{className:(0,d.tremorTwMerge)(h("icon"),"animate-spin shrink-0",i,g.default,g[n]),style:{transition:"width 150ms"}}):a.default.createElement(o,{className:(0,d.tremorTwMerge)(h("icon"),"shrink-0",t,i)})},p=a.default.forwardRef((e,o)=>{let{icon:m,iconPosition:g=s.HorizontalPositions.Left,size:p=s.Sizes.SM,color:C,variant:k="primary",disabled:x,loading:w=!1,loadingText:v,children:N,tooltip:$,className:j}=e,y=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),E=w||x,T=void 0!==m||w,O=w&&v,M=!(!N&&!O),R=(0,d.tremorTwMerge)(u[p].height,u[p].width),z="light"!==k?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",P=b(k,C),B=("light"!==k?{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"}})[p],{tooltipProps:S,getReferenceProps:I}=(0,r.useTooltip)(300),[L,q]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:m,onStateChange:g}={})=>{let[u,b]=(0,a.useState)(()=>l(d?2:n(c))),h=(0,a.useRef)(u),f=(0,a.useRef)(0),[p,C]="object"==typeof s?[s.enter,s.exit]:[s,s],k=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return n(t)}})(h.current._s,m);e&&i(e,b,h,f,g)},[g,m]);return[u,(0,a.useCallback)(a=>{let l=e=>{switch(i(e,b,h,f,g),e){case 1:p>=0&&(f.current=((...e)=>setTimeout(...e))(k,p));break;case 4:C>=0&&(f.current=((...e)=>setTimeout(...e))(k,C));break;case 0:case 3:f.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},s=h.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||l(e?+!r:2):s&&l(t?o?3:4:n(m))},[k,g,e,t,r,o,p,C,m]),k]})({timeout:50});return(0,a.useEffect)(()=>{q(w)},[w]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([o,S.refs.setReference]),className:(0,d.tremorTwMerge)(h("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",z,B.paddingX,B.paddingY,B.fontSize,P.textColor,P.bgColor,P.borderColor,P.hoverBorderColor,E?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(b(k,C).hoverTextColor,b(k,C).hoverBgColor,b(k,C).hoverBorderColor),j),disabled:E},I,y),a.default.createElement(r.default,Object.assign({text:$},S)),T&&g!==s.HorizontalPositions.Right?a.default.createElement(f,{loading:w,iconSize:R,iconPosition:g,Icon:m,transitionStatus:L.status,needMargin:M}):null,O||N?a.default.createElement("span",{className:(0,d.tremorTwMerge)(h("text"),"text-tremor-default whitespace-nowrap")},O?v:N):null,T&&g===s.HorizontalPositions.Right?a.default.createElement(f,{loading:w,iconSize:R,iconPosition:g,Icon:m,transitionStatus:L.status,needMargin:M}):null)});p.displayName="Button",e.s(["Button",()=>p],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("Table"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(o("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),n))});l.displayName="Table",e.s(["Table",()=>l],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHead"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),n))});l.displayName="TableHead",e.s(["TableHead",()=>l],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHeaderCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},s),n))});l.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>l],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableBody"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),n))});l.displayName="TableBody",e.s(["TableBody",()=>l],942232)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableRow"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("row"),i)},s),n))});l.displayName="TableRow",e.s(["TableRow",()=>l],496020)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),n))});l.displayName="TableCell",e.s(["TableCell",()=>l],977572)},68155,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 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,r],68155)},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)},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)},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)},207670,e=>{"use strict";function t(){for(var e,t,r=0,a="",o=arguments.length;rt,"default",0,t])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_buildManifest.js new file mode 100644 index 0000000000..d74e1661bb --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_buildManifest.js @@ -0,0 +1,16 @@ +self.__BUILD_MANIFEST = { + "__rewrites": { + "afterFiles": [], + "beforeFiles": [ + { + "source": "/litellm-asset-prefix/_next/:path+", + "destination": "/_next/:path+" + } + ], + "fallback": [] + }, + "sortedPages": [ + "/_app", + "/_error" + ] +};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_clientMiddlewareManifest.json b/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_clientMiddlewareManifest.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_clientMiddlewareManifest.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_ssgManifest.js new file mode 100644 index 0000000000..5b3ff592fd --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_ssgManifest.js @@ -0,0 +1 @@ +self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_buildManifest.js new file mode 100644 index 0000000000..d74e1661bb --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_buildManifest.js @@ -0,0 +1,16 @@ +self.__BUILD_MANIFEST = { + "__rewrites": { + "afterFiles": [], + "beforeFiles": [ + { + "source": "/litellm-asset-prefix/_next/:path+", + "destination": "/_next/:path+" + } + ], + "fallback": [] + }, + "sortedPages": [ + "/_app", + "/_error" + ] +};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_clientMiddlewareManifest.json b/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_clientMiddlewareManifest.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_clientMiddlewareManifest.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_ssgManifest.js new file mode 100644 index 0000000000..5b3ff592fd --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_ssgManifest.js @@ -0,0 +1 @@ +self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_not-found.html b/litellm/proxy/_experimental/out/_not-found.html new file mode 100644 index 0000000000..6b6eb14c20 --- /dev/null +++ b/litellm/proxy/_experimental/out/_not-found.html @@ -0,0 +1 @@ +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/_not-found.txt b/litellm/proxy/_experimental/out/_not-found.txt index 80a0bd3e95..eb4013b00e 100644 --- a/litellm/proxy/_experimental/out/_not-found.txt +++ b/litellm/proxy/_experimental/out/_not-found.txt @@ -9,8 +9,8 @@ b:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] d:I[168027,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] e:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] 8:null diff --git a/litellm/proxy/_experimental/out/_not-found/__next._full.txt b/litellm/proxy/_experimental/out/_not-found/__next._full.txt index 80a0bd3e95..eb4013b00e 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._full.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._full.txt @@ -9,8 +9,8 @@ b:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] d:I[168027,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] e:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] 8:null diff --git a/litellm/proxy/_experimental/out/_not-found/__next._head.txt b/litellm/proxy/_experimental/out/_not-found/__next._head.txt index c376e9eb7f..34d932d6d5 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._head.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/_not-found/__next._index.txt b/litellm/proxy/_experimental/out/_not-found/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._index.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt b/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt index 10302f0ef0..bf3c2c3f02 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt @@ -1,5 +1,5 @@ 1:"$Sreact.fragment" 2:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 3:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","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."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","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."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false} 4:null diff --git a/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt b/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/_not-found/__next._tree.txt b/litellm/proxy/_experimental/out/_not-found/__next._tree.txt index b410b9f42e..9c9e6e22e0 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._tree.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._tree.txt @@ -1,3 +1,3 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/api-reference.html b/litellm/proxy/_experimental/out/api-reference.html new file mode 100644 index 0000000000..eb7a1c14bf --- /dev/null +++ b/litellm/proxy/_experimental/out/api-reference.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/api-reference.txt b/litellm/proxy/_experimental/out/api-reference.txt index 2f38947a1c..322af719e2 100644 --- a/litellm/proxy/_experimental/out/api-reference.txt +++ b/litellm/proxy/_experimental/out/api-reference.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +e:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt index 975b07521a..a024f0dd51 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +3:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/api-reference/__next._full.txt b/litellm/proxy/_experimental/out/api-reference/__next._full.txt index 2f38947a1c..322af719e2 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._full.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +e:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/api-reference/__next._head.txt b/litellm/proxy/_experimental/out/api-reference/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._head.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/api-reference/__next._index.txt b/litellm/proxy/_experimental/out/api-reference/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._index.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/api-reference/__next._tree.txt b/litellm/proxy/_experimental/out/api-reference/__next._tree.txt index 8d3f0b6f93..5c091b7e11 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._tree.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-reference","paramType":null,"paramKey":"api-reference","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-reference","paramType":null,"paramKey":"api-reference","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/assets/logos/xecguard.svg b/litellm/proxy/_experimental/out/assets/logos/xecguard.svg new file mode 100644 index 0000000000..060718dc36 --- /dev/null +++ b/litellm/proxy/_experimental/out/assets/logos/xecguard.svg @@ -0,0 +1,4 @@ + + + + diff --git a/litellm/proxy/_experimental/out/chat.html b/litellm/proxy/_experimental/out/chat.html new file mode 100644 index 0000000000..7022246337 --- /dev/null +++ b/litellm/proxy/_experimental/out/chat.html @@ -0,0 +1 @@ +LiteLLM Dashboard \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/chat.txt b/litellm/proxy/_experimental/out/chat.txt new file mode 100644 index 0000000000..0958fa472a --- /dev/null +++ b/litellm/proxy/_experimental/out/chat.txt @@ -0,0 +1,22 @@ +1:"$Sreact.fragment" +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] +4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] +5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] +6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +7:I[321443,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js"],"default"] +a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +b:"$Sreact.suspense" +d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +11:I[168027,[],"default"] +:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","chat"],"q":"","i":false,"f":[[["",{"children":["chat",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +8:{} +9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" +e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +12:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +c:null +10:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L12","4",{}]] diff --git a/litellm/proxy/_experimental/out/chat/__next._full.txt b/litellm/proxy/_experimental/out/chat/__next._full.txt new file mode 100644 index 0000000000..0958fa472a --- /dev/null +++ b/litellm/proxy/_experimental/out/chat/__next._full.txt @@ -0,0 +1,22 @@ +1:"$Sreact.fragment" +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] +4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] +5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] +6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +7:I[321443,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js"],"default"] +a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +b:"$Sreact.suspense" +d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +11:I[168027,[],"default"] +:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","chat"],"q":"","i":false,"f":[[["",{"children":["chat",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +8:{} +9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" +e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +12:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +c:null +10:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L12","4",{}]] diff --git a/litellm/proxy/_experimental/out/chat/__next._head.txt b/litellm/proxy/_experimental/out/chat/__next._head.txt new file mode 100644 index 0000000000..c99f06703d --- /dev/null +++ b/litellm/proxy/_experimental/out/chat/__next._head.txt @@ -0,0 +1,6 @@ +1:"$Sreact.fragment" +2:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +4:"$Sreact.suspense" +5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/chat/__next._index.txt b/litellm/proxy/_experimental/out/chat/__next._index.txt new file mode 100644 index 0000000000..e999484c30 --- /dev/null +++ b/litellm/proxy/_experimental/out/chat/__next._index.txt @@ -0,0 +1,8 @@ +1:"$Sreact.fragment" +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] +4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] +5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] +:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/chat/__next._tree.txt b/litellm/proxy/_experimental/out/chat/__next._tree.txt new file mode 100644 index 0000000000..c9219f0c13 --- /dev/null +++ b/litellm/proxy/_experimental/out/chat/__next._tree.txt @@ -0,0 +1,4 @@ +:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"chat","paramType":null,"paramKey":"chat","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/chat/__next.chat.__PAGE__.txt b/litellm/proxy/_experimental/out/chat/__next.chat.__PAGE__.txt new file mode 100644 index 0000000000..264e6ffa5f --- /dev/null +++ b/litellm/proxy/_experimental/out/chat/__next.chat.__PAGE__.txt @@ -0,0 +1,9 @@ +1:"$Sreact.fragment" +2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +3:I[321443,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js"],"default"] +6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +7:"$Sreact.suspense" +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +4:{} +5:"$0:rsc:props:children:0:props:serverProvidedParams:params" +8:null diff --git a/litellm/proxy/_experimental/out/chat/__next.chat.txt b/litellm/proxy/_experimental/out/chat/__next.chat.txt new file mode 100644 index 0000000000..fce37fb5ff --- /dev/null +++ b/litellm/proxy/_experimental/out/chat/__next.chat.txt @@ -0,0 +1,4 @@ +1:"$Sreact.fragment" +2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] +3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground.html b/litellm/proxy/_experimental/out/experimental/api-playground.html new file mode 100644 index 0000000000..29b3e3ebe4 --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/api-playground.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/api-playground.txt b/litellm/proxy/_experimental/out/experimental/api-playground.txt index 2a24d1cb1e..e8b0d957fc 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] +f:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt index a17df7a4cf..5648c8ddca 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] +3:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt index 2a24d1cb1e..e8b0d957fc 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] +f:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt index a76e00140d..97224d7836 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-playground","paramType":null,"paramKey":"api-playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-playground","paramType":null,"paramKey":"api-playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/budgets.html b/litellm/proxy/_experimental/out/experimental/budgets.html new file mode 100644 index 0000000000..9ece823014 --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/budgets.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/budgets.txt b/litellm/proxy/_experimental/out/experimental/budgets.txt index 6b0dd557b7..c6a83a1663 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +f:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt index 293a3b00f7..82feeffdad 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +3:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt index 6b0dd557b7..c6a83a1663 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +f:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt index fdaebde378..9baf2d01d9 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"budgets","paramType":null,"paramKey":"budgets","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"budgets","paramType":null,"paramKey":"budgets","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/caching.html b/litellm/proxy/_experimental/out/experimental/caching.html new file mode 100644 index 0000000000..987859d830 --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/caching.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/caching.txt b/litellm/proxy/_experimental/out/experimental/caching.txt index 08093e107f..aff3811698 100644 --- a/litellm/proxy/_experimental/out/experimental/caching.txt +++ b/litellm/proxy/_experimental/out/experimental/caching.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] +f:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt index f88451ba3a..be57c7b988 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] +3:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt index 08093e107f..aff3811698 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] +f:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt index 4aaf458e8b..eec08e5f5c 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"caching","paramType":null,"paramKey":"caching","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"caching","paramType":null,"paramKey":"caching","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins.html b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.html new file mode 100644 index 0000000000..4964594641 --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt index 5f341d5f94..1a0d75faef 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] +f:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt index b9bdd95ea1..63225e7764 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] +3:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt index 5f341d5f94..1a0d75faef 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] +f:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt index bab4575bdb..271ce874f0 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"claude-code-plugins","paramType":null,"paramKey":"claude-code-plugins","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"claude-code-plugins","paramType":null,"paramKey":"claude-code-plugins","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage.html b/litellm/proxy/_experimental/out/experimental/old-usage.html new file mode 100644 index 0000000000..d1d35965ea --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/old-usage.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/old-usage.txt b/litellm/proxy/_experimental/out/experimental/old-usage.txt index a9c0ee3c85..835500182c 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] +f:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt index a216544354..c7de0d0838 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] +3:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt index a9c0ee3c85..835500182c 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] +f:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt index 2f656cb667..5ce3bc97b5 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"old-usage","paramType":null,"paramKey":"old-usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"old-usage","paramType":null,"paramKey":"old-usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/prompts.html b/litellm/proxy/_experimental/out/experimental/prompts.html new file mode 100644 index 0000000000..9ace588339 --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/prompts.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/prompts.txt b/litellm/proxy/_experimental/out/experimental/prompts.txt index 28d6ceed0e..2fe32d4770 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/fa8dcdcf9803fe4f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] +f:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/fa8dcdcf9803fe4f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt index 25ef67d4ca..ec08482e5a 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/fa8dcdcf9803fe4f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] +3:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/fa8dcdcf9803fe4f.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt index 28d6ceed0e..2fe32d4770 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/fa8dcdcf9803fe4f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] +f:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/fa8dcdcf9803fe4f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt index d46a3219ec..8fa48d923d 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"prompts","paramType":null,"paramKey":"prompts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"prompts","paramType":null,"paramKey":"prompts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management.html b/litellm/proxy/_experimental/out/experimental/tag-management.html new file mode 100644 index 0000000000..a779a67876 --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/tag-management.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/tag-management.txt b/litellm/proxy/_experimental/out/experimental/tag-management.txt index 79feca9da6..053cb2a9e5 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] +f:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt index bc0f92d491..e3518cd46e 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] +3:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt index 79feca9da6..053cb2a9e5 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] +f:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt index c6dfb28d7e..3e610f1ac1 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"tag-management","paramType":null,"paramKey":"tag-management","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"tag-management","paramType":null,"paramKey":"tag-management","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/guardrails.html b/litellm/proxy/_experimental/out/guardrails.html new file mode 100644 index 0000000000..bfad9ba24c --- /dev/null +++ b/litellm/proxy/_experimental/out/guardrails.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/guardrails.txt b/litellm/proxy/_experimental/out/guardrails.txt index 6d3b741e69..e80fae1338 100644 --- a/litellm/proxy/_experimental/out/guardrails.txt +++ b/litellm/proxy/_experimental/out/guardrails.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/45249a290b3ea558.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/038e83c8eab81a79.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/45249a290b3ea558.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/038e83c8eab81a79.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt index e52d2716fe..7f5073f9e2 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/45249a290b3ea558.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/038e83c8eab81a79.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +3:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/45249a290b3ea558.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/038e83c8eab81a79.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/guardrails/__next._full.txt b/litellm/proxy/_experimental/out/guardrails/__next._full.txt index 6d3b741e69..e80fae1338 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._full.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._full.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/45249a290b3ea558.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/038e83c8eab81a79.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/45249a290b3ea558.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/038e83c8eab81a79.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/guardrails/__next._head.txt b/litellm/proxy/_experimental/out/guardrails/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._head.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/guardrails/__next._index.txt b/litellm/proxy/_experimental/out/guardrails/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._index.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/guardrails/__next._tree.txt b/litellm/proxy/_experimental/out/guardrails/__next._tree.txt index 313f4197a4..7af2d90b22 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._tree.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"guardrails","paramType":null,"paramKey":"guardrails","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"guardrails","paramType":null,"paramKey":"guardrails","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/index.html b/litellm/proxy/_experimental/out/index.html index 06dc73cb21..3ac492fc95 100644 --- a/litellm/proxy/_experimental/out/index.html +++ b/litellm/proxy/_experimental/out/index.html @@ -1 +1 @@ -LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file +LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/index.txt b/litellm/proxy/_experimental/out/index.txt index 66ed8c623b..ce6e57a795 100644 --- a/litellm/proxy/_experimental/out/index.txt +++ b/litellm/proxy/_experimental/out/index.txt @@ -4,56 +4,57 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/cd677ff381b90c30.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/40ec1228b231a0d1.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/d8cd2d44272d51c8.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/fe5abdcdb57db543.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/65968777d52ff874.js","/litellm-asset-prefix/_next/static/chunks/a1b5b0c54192471e.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","/litellm-asset-prefix/_next/static/chunks/2005c732f6d6cbb4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/e7cc7b98b893b20d.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/e1f572e8226962e3.js"],"default"] -2e:I[168027,[],"default"] +7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js"],"default"] +2f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cd677ff381b90c30.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/40ec1228b231a0d1.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d8cd2d44272d51c8.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/fe5abdcdb57db543.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b"],"$L2c"]}],{},null,false,false]},null,false,false],"$L2d",false]],"m":"$undefined","G":["$2e",[]],"S":true} -2f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -30:"$Sreact.suspense" -32:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -34:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c"],"$L2d"]}],{},null,false,false]},null,false,false],"$L2e",false]],"m":"$undefined","G":["$2f",[]],"S":true} +30:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +31:"$Sreact.suspense" +33:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +35:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","async":true,"nonce":"$undefined"}] b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}] c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true,"nonce":"$undefined"}] d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true,"nonce":"$undefined"}] e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","async":true,"nonce":"$undefined"}] -f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] -10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] -11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","async":true,"nonce":"$undefined"}] -12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}] -13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] +f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}] +10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true,"nonce":"$undefined"}] +11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","async":true,"nonce":"$undefined"}] +12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","async":true,"nonce":"$undefined"}] +13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}] 14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","async":true,"nonce":"$undefined"}] -15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","async":true,"nonce":"$undefined"}] -16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}] -17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}] +15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] +16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","async":true,"nonce":"$undefined"}] +17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] 18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","async":true,"nonce":"$undefined"}] -19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] -1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}] -1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] -1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/65968777d52ff874.js","async":true,"nonce":"$undefined"}] -1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/a1b5b0c54192471e.js","async":true,"nonce":"$undefined"}] +19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] +1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","async":true,"nonce":"$undefined"}] +1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","async":true,"nonce":"$undefined"}] +1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","async":true,"nonce":"$undefined"}] +1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] 1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] 1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}] 20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","async":true,"nonce":"$undefined"}] -21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] +21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}] 22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}] 23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true,"nonce":"$undefined"}] 24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","async":true,"nonce":"$undefined"}] -25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/2005c732f6d6cbb4.js","async":true,"nonce":"$undefined"}] -26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true,"nonce":"$undefined"}] -27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","async":true,"nonce":"$undefined"}] -28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true,"nonce":"$undefined"}] -29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/e7cc7b98b893b20d.js","async":true,"nonce":"$undefined"}] -2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true,"nonce":"$undefined"}] -2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f572e8226962e3.js","async":true,"nonce":"$undefined"}] -2c:["$","$L2f",null,{"children":["$","$30",null,{"name":"Next.MetadataOutlet","children":"$@31"}]}] -2d:["$","$1","h",{"children":[null,["$","$L32",null,{"children":"$L33"}],["$","div",null,{"hidden":true,"children":["$","$L34",null,{"children":["$","$30",null,{"name":"Next.Metadata","children":"$L35"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true,"nonce":"$undefined"}] +26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] +27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] +28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","async":true,"nonce":"$undefined"}] +29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}] +2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}] +2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true,"nonce":"$undefined"}] +2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js","async":true,"nonce":"$undefined"}] +2d:["$","$L30",null,{"children":["$","$31",null,{"name":"Next.MetadataOutlet","children":"$@32"}]}] +2e:["$","$1","h",{"children":[null,["$","$L33",null,{"children":"$L34"}],["$","div",null,{"hidden":true,"children":["$","$L35",null,{"children":["$","$31",null,{"name":"Next.Metadata","children":"$L36"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:{} 9:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params" -33:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -36:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -31:null -35:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L36","4",{}]] +34:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +37:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +32:null +36:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L37","4",{}]] diff --git a/litellm/proxy/_experimental/out/login.html b/litellm/proxy/_experimental/out/login.html new file mode 100644 index 0000000000..3e8ea6a74a --- /dev/null +++ b/litellm/proxy/_experimental/out/login.html @@ -0,0 +1 @@ +LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/login.txt b/litellm/proxy/_experimental/out/login.txt index e765be39c0..f37dae0d07 100644 --- a/litellm/proxy/_experimental/out/login.txt +++ b/litellm/proxy/_experimental/out/login.txt @@ -11,9 +11,9 @@ d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 11:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/login/__next._full.txt b/litellm/proxy/_experimental/out/login/__next._full.txt index e765be39c0..f37dae0d07 100644 --- a/litellm/proxy/_experimental/out/login/__next._full.txt +++ b/litellm/proxy/_experimental/out/login/__next._full.txt @@ -11,9 +11,9 @@ d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 11:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/login/__next._head.txt b/litellm/proxy/_experimental/out/login/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/login/__next._head.txt +++ b/litellm/proxy/_experimental/out/login/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/login/__next._index.txt b/litellm/proxy/_experimental/out/login/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/login/__next._index.txt +++ b/litellm/proxy/_experimental/out/login/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/login/__next._tree.txt b/litellm/proxy/_experimental/out/login/__next._tree.txt index 363ace1542..b4f68c41b5 100644 --- a/litellm/proxy/_experimental/out/login/__next._tree.txt +++ b/litellm/proxy/_experimental/out/login/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"login","paramType":null,"paramKey":"login","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"login","paramType":null,"paramKey":"login","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/login/__next.login.__PAGE__.txt b/litellm/proxy/_experimental/out/login/__next.login.__PAGE__.txt index 113529672d..e87a73fd92 100644 --- a/litellm/proxy/_experimental/out/login/__next.login.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/login/__next.login.__PAGE__.txt @@ -3,7 +3,7 @@ 3:I[594542,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/login/__next.login.txt b/litellm/proxy/_experimental/out/login/__next.login.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/login/__next.login.txt +++ b/litellm/proxy/_experimental/out/login/__next.login.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs.html b/litellm/proxy/_experimental/out/logs.html new file mode 100644 index 0000000000..d5ed0b9827 --- /dev/null +++ b/litellm/proxy/_experimental/out/logs.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/logs.txt b/litellm/proxy/_experimental/out/logs.txt index ea389ec61a..f90cf1a062 100644 --- a/litellm/proxy/_experimental/out/logs.txt +++ b/litellm/proxy/_experimental/out/logs.txt @@ -4,26 +4,25 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/72debc51022299b8.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b23ca2957db2e3d.js","/litellm-asset-prefix/_next/static/chunks/277cc236a763c2bc.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/72debc51022299b8.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/5b23ca2957db2e3d.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/277cc236a763c2bc.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt index efc42c1a5b..467de592b3 100644 --- a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/72debc51022299b8.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b23ca2957db2e3d.js","/litellm-asset-prefix/_next/static/chunks/277cc236a763c2bc.js"],"default"] +3:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/72debc51022299b8.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/5b23ca2957db2e3d.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/277cc236a763c2bc.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.txt b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.txt +++ b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/logs/__next._full.txt b/litellm/proxy/_experimental/out/logs/__next._full.txt index ea389ec61a..f90cf1a062 100644 --- a/litellm/proxy/_experimental/out/logs/__next._full.txt +++ b/litellm/proxy/_experimental/out/logs/__next._full.txt @@ -4,26 +4,25 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/72debc51022299b8.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b23ca2957db2e3d.js","/litellm-asset-prefix/_next/static/chunks/277cc236a763c2bc.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/72debc51022299b8.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/5b23ca2957db2e3d.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/277cc236a763c2bc.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/logs/__next._head.txt b/litellm/proxy/_experimental/out/logs/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/logs/__next._head.txt +++ b/litellm/proxy/_experimental/out/logs/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs/__next._index.txt b/litellm/proxy/_experimental/out/logs/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/logs/__next._index.txt +++ b/litellm/proxy/_experimental/out/logs/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs/__next._tree.txt b/litellm/proxy/_experimental/out/logs/__next._tree.txt index 0fe2b8a55c..d691aaa8b9 100644 --- a/litellm/proxy/_experimental/out/logs/__next._tree.txt +++ b/litellm/proxy/_experimental/out/logs/__next._tree.txt @@ -1,5 +1,5 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"logs","paramType":null,"paramKey":"logs","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"logs","paramType":null,"paramKey":"logs","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback.html b/litellm/proxy/_experimental/out/mcp/oauth/callback.html new file mode 100644 index 0000000000..c5509ef143 --- /dev/null +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback.txt index f04edb3ade..ee0847db50 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback.txt @@ -11,9 +11,9 @@ d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 11:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt index f04edb3ade..ee0847db50 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt @@ -11,9 +11,9 @@ d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 11:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt index edd94a1fb6..a40f7f5316 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp","paramType":null,"paramKey":"mcp","hasRuntimePrefetch":false,"slots":{"children":{"name":"oauth","paramType":null,"paramKey":"oauth","hasRuntimePrefetch":false,"slots":{"children":{"name":"callback","paramType":null,"paramKey":"callback","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp","paramType":null,"paramKey":"mcp","hasRuntimePrefetch":false,"slots":{"children":{"name":"oauth","paramType":null,"paramKey":"oauth","hasRuntimePrefetch":false,"slots":{"children":{"name":"callback","paramType":null,"paramKey":"callback","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt index b03cb1029e..7ae3166f84 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt @@ -3,7 +3,7 @@ 3:I[346328,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub.html b/litellm/proxy/_experimental/out/model-hub.html new file mode 100644 index 0000000000..e9eb094080 --- /dev/null +++ b/litellm/proxy/_experimental/out/model-hub.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/model-hub.txt b/litellm/proxy/_experimental/out/model-hub.txt index 54609e563e..469e859050 100644 --- a/litellm/proxy/_experimental/out/model-hub.txt +++ b/litellm/proxy/_experimental/out/model-hub.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt index c7892b8773..c03265c707 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +3:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/model-hub/__next._full.txt b/litellm/proxy/_experimental/out/model-hub/__next._full.txt index 54609e563e..469e859050 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._full.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._full.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/model-hub/__next._head.txt b/litellm/proxy/_experimental/out/model-hub/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._head.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub/__next._index.txt b/litellm/proxy/_experimental/out/model-hub/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._index.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub/__next._tree.txt b/litellm/proxy/_experimental/out/model-hub/__next._tree.txt index eaf8255fd0..6a35dc3c4e 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._tree.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"model-hub","paramType":null,"paramKey":"model-hub","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"model-hub","paramType":null,"paramKey":"model-hub","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/model_hub.html b/litellm/proxy/_experimental/out/model_hub.html new file mode 100644 index 0000000000..54864e5f7b --- /dev/null +++ b/litellm/proxy/_experimental/out/model_hub.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/model_hub.txt b/litellm/proxy/_experimental/out/model_hub.txt index 3efa409c36..8a40bb763e 100644 --- a/litellm/proxy/_experimental/out/model_hub.txt +++ b/litellm/proxy/_experimental/out/model_hub.txt @@ -4,15 +4,15 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/05d900c88781d712.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/a61a87ca92d576e9.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] +7:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 11:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/05d900c88781d712.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a61a87ca92d576e9.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],"$Lf","$L10"]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],"$Lf","$L10"]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] f:["$","div",null,{"hidden":true,"children":["$","$L12",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L13"}]}]}] 10:["$","meta",null,{"name":"next-size-adjust","content":""}] diff --git a/litellm/proxy/_experimental/out/model_hub/__next._full.txt b/litellm/proxy/_experimental/out/model_hub/__next._full.txt index 3efa409c36..8a40bb763e 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._full.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._full.txt @@ -4,15 +4,15 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/05d900c88781d712.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/a61a87ca92d576e9.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] +7:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 11:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/05d900c88781d712.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a61a87ca92d576e9.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],"$Lf","$L10"]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],"$Lf","$L10"]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] f:["$","div",null,{"hidden":true,"children":["$","$L12",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L13"}]}]}] 10:["$","meta",null,{"name":"next-size-adjust","content":""}] diff --git a/litellm/proxy/_experimental/out/model_hub/__next._head.txt b/litellm/proxy/_experimental/out/model_hub/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._head.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub/__next._index.txt b/litellm/proxy/_experimental/out/model_hub/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._index.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub/__next._tree.txt b/litellm/proxy/_experimental/out/model_hub/__next._tree.txt index 7037891ba8..1e6fe9eb4c 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._tree.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub","paramType":null,"paramKey":"model_hub","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub","paramType":null,"paramKey":"model_hub","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__PAGE__.txt b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__PAGE__.txt index e5739806b0..62dede6e1c 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/05d900c88781d712.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/a61a87ca92d576e9.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] +3:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/05d900c88781d712.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a61a87ca92d576e9.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub_table.html b/litellm/proxy/_experimental/out/model_hub_table.html new file mode 100644 index 0000000000..2227c512e6 --- /dev/null +++ b/litellm/proxy/_experimental/out/model_hub_table.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/model_hub_table.txt b/litellm/proxy/_experimental/out/model_hub_table.txt index 4442586cd7..91d5b18df0 100644 --- a/litellm/proxy/_experimental/out/model_hub_table.txt +++ b/litellm/proxy/_experimental/out/model_hub_table.txt @@ -4,18 +4,18 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/aa7c40f46cb1b417.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/623eaea02d123060.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] +7:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/aa7c40f46cb1b417.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] a:["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true,"nonce":"$undefined"}] -b:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/623eaea02d123060.js","async":true,"nonce":"$undefined"}] +b:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","async":true,"nonce":"$undefined"}] c:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}] d:["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}] e:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt index 4442586cd7..91d5b18df0 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt @@ -4,18 +4,18 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/aa7c40f46cb1b417.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/623eaea02d123060.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] +7:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/aa7c40f46cb1b417.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] a:["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true,"nonce":"$undefined"}] -b:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/623eaea02d123060.js","async":true,"nonce":"$undefined"}] +b:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","async":true,"nonce":"$undefined"}] c:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}] d:["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}] e:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt index bf9a5c7e0e..a8031c66a6 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub_table","paramType":null,"paramKey":"model_hub_table","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub_table","paramType":null,"paramKey":"model_hub_table","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__PAGE__.txt b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__PAGE__.txt index 6eb5741bb8..682b8ffbb3 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/aa7c40f46cb1b417.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/623eaea02d123060.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] +3:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/aa7c40f46cb1b417.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/623eaea02d123060.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints.html b/litellm/proxy/_experimental/out/models-and-endpoints.html new file mode 100644 index 0000000000..a9e7db168c --- /dev/null +++ b/litellm/proxy/_experimental/out/models-and-endpoints.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/models-and-endpoints.txt b/litellm/proxy/_experimental/out/models-and-endpoints.txt index 024d060655..3731a8b43d 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints.txt @@ -4,20 +4,20 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/a0b3f7d6c7b4d358.js","/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/44fd25e5d70e1a25.js","/litellm-asset-prefix/_next/static/chunks/bacdab4ef587dc3f.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +e:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b3f7d6c7b4d358.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/44fd25e5d70e1a25.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/bacdab4ef587dc3f.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +9:["$","$L5",null,{}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt index 82374a6673..f993e06b91 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/a0b3f7d6c7b4d358.js","/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/44fd25e5d70e1a25.js","/litellm-asset-prefix/_next/static/chunks/bacdab4ef587dc3f.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +3:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b3f7d6c7b4d358.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/44fd25e5d70e1a25.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/bacdab4ef587dc3f.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt index 024d060655..3731a8b43d 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt @@ -4,20 +4,20 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/a0b3f7d6c7b4d358.js","/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/44fd25e5d70e1a25.js","/litellm-asset-prefix/_next/static/chunks/bacdab4ef587dc3f.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +e:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b3f7d6c7b4d358.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/e871b803455fadee.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/44fd25e5d70e1a25.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/bacdab4ef587dc3f.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +9:["$","$L5",null,{}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt index 7795e4f767..0a26ae8292 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"models-and-endpoints","paramType":null,"paramKey":"models-and-endpoints","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"models-and-endpoints","paramType":null,"paramKey":"models-and-endpoints","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/onboarding.html b/litellm/proxy/_experimental/out/onboarding.html new file mode 100644 index 0000000000..081f983da6 --- /dev/null +++ b/litellm/proxy/_experimental/out/onboarding.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/onboarding.txt b/litellm/proxy/_experimental/out/onboarding.txt index dac1ae1bef..f78943759c 100644 --- a/litellm/proxy/_experimental/out/onboarding.txt +++ b/litellm/proxy/_experimental/out/onboarding.txt @@ -11,9 +11,9 @@ d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 11:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/onboarding/__next._full.txt b/litellm/proxy/_experimental/out/onboarding/__next._full.txt index dac1ae1bef..f78943759c 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._full.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._full.txt @@ -11,9 +11,9 @@ d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 11:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/onboarding/__next._head.txt b/litellm/proxy/_experimental/out/onboarding/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._head.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/onboarding/__next._index.txt b/litellm/proxy/_experimental/out/onboarding/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._index.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/onboarding/__next._tree.txt b/litellm/proxy/_experimental/out/onboarding/__next._tree.txt index f2d2aa7c76..11a069ff3c 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._tree.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"onboarding","paramType":null,"paramKey":"onboarding","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"onboarding","paramType":null,"paramKey":"onboarding","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__PAGE__.txt b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__PAGE__.txt index 1dabf2cdc9..2fe7b920ab 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__PAGE__.txt @@ -3,7 +3,7 @@ 3:I[566606,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations.html b/litellm/proxy/_experimental/out/organizations.html new file mode 100644 index 0000000000..dfcd4575f1 --- /dev/null +++ b/litellm/proxy/_experimental/out/organizations.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/organizations.txt b/litellm/proxy/_experimental/out/organizations.txt index 72e0f98760..33405900b0 100644 --- a/litellm/proxy/_experimental/out/organizations.txt +++ b/litellm/proxy/_experimental/out/organizations.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +e:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt index 3872609331..ccce0cce71 100644 --- a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +3:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt +++ b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/organizations/__next._full.txt b/litellm/proxy/_experimental/out/organizations/__next._full.txt index 72e0f98760..33405900b0 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._full.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +e:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/organizations/__next._head.txt b/litellm/proxy/_experimental/out/organizations/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._head.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations/__next._index.txt b/litellm/proxy/_experimental/out/organizations/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._index.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations/__next._tree.txt b/litellm/proxy/_experimental/out/organizations/__next._tree.txt index 6f1e61aa67..3554a16a36 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._tree.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"organizations","paramType":null,"paramKey":"organizations","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"organizations","paramType":null,"paramKey":"organizations","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/playground.html b/litellm/proxy/_experimental/out/playground.html new file mode 100644 index 0000000000..7907cc307d --- /dev/null +++ b/litellm/proxy/_experimental/out/playground.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/playground.txt b/litellm/proxy/_experimental/out/playground.txt index 0bfdd1f660..39ad161bab 100644 --- a/litellm/proxy/_experimental/out/playground.txt +++ b/litellm/proxy/_experimental/out/playground.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/5a6ef256a98646ae.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/5a6ef256a98646ae.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt index 49e59053db..6b5ce8a2e8 100644 --- a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/5a6ef256a98646ae.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js"],"default"] +3:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/5a6ef256a98646ae.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.txt b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.txt +++ b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/playground/__next._full.txt b/litellm/proxy/_experimental/out/playground/__next._full.txt index 0bfdd1f660..39ad161bab 100644 --- a/litellm/proxy/_experimental/out/playground/__next._full.txt +++ b/litellm/proxy/_experimental/out/playground/__next._full.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/5a6ef256a98646ae.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/5a6ef256a98646ae.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/playground/__next._head.txt b/litellm/proxy/_experimental/out/playground/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/playground/__next._head.txt +++ b/litellm/proxy/_experimental/out/playground/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/playground/__next._index.txt b/litellm/proxy/_experimental/out/playground/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/playground/__next._index.txt +++ b/litellm/proxy/_experimental/out/playground/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/playground/__next._tree.txt b/litellm/proxy/_experimental/out/playground/__next._tree.txt index b5b907f32d..3e3e41774c 100644 --- a/litellm/proxy/_experimental/out/playground/__next._tree.txt +++ b/litellm/proxy/_experimental/out/playground/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"playground","paramType":null,"paramKey":"playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"playground","paramType":null,"paramKey":"playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/policies.html b/litellm/proxy/_experimental/out/policies.html new file mode 100644 index 0000000000..a47febb1c4 --- /dev/null +++ b/litellm/proxy/_experimental/out/policies.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/policies.txt b/litellm/proxy/_experimental/out/policies.txt index 560d50fa59..fd180d548d 100644 --- a/litellm/proxy/_experimental/out/policies.txt +++ b/litellm/proxy/_experimental/out/policies.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt index 2e1e47380b..8516ae0082 100644 --- a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] +3:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.txt b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.txt +++ b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/policies/__next._full.txt b/litellm/proxy/_experimental/out/policies/__next._full.txt index 560d50fa59..fd180d548d 100644 --- a/litellm/proxy/_experimental/out/policies/__next._full.txt +++ b/litellm/proxy/_experimental/out/policies/__next._full.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/policies/__next._head.txt b/litellm/proxy/_experimental/out/policies/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/policies/__next._head.txt +++ b/litellm/proxy/_experimental/out/policies/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/policies/__next._index.txt b/litellm/proxy/_experimental/out/policies/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/policies/__next._index.txt +++ b/litellm/proxy/_experimental/out/policies/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/policies/__next._tree.txt b/litellm/proxy/_experimental/out/policies/__next._tree.txt index 0f572be9f7..f6aa8091b3 100644 --- a/litellm/proxy/_experimental/out/policies/__next._tree.txt +++ b/litellm/proxy/_experimental/out/policies/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"policies","paramType":null,"paramKey":"policies","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"policies","paramType":null,"paramKey":"policies","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings.html b/litellm/proxy/_experimental/out/settings/admin-settings.html new file mode 100644 index 0000000000..4cf8ecf409 --- /dev/null +++ b/litellm/proxy/_experimental/out/settings/admin-settings.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/admin-settings.txt b/litellm/proxy/_experimental/out/settings/admin-settings.txt index 9b55c03ead..2323d96d82 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/98ddd18b25554abd.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/6dc89cea942b737a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/6665fdc6e86f173a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +f:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/98ddd18b25554abd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6dc89cea942b737a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6665fdc6e86f173a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt index 4f39634e5d..8719d198ab 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/98ddd18b25554abd.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/6dc89cea942b737a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/6665fdc6e86f173a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +3:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/98ddd18b25554abd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6dc89cea942b737a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6665fdc6e86f173a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt index 9b55c03ead..2323d96d82 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/98ddd18b25554abd.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/6dc89cea942b737a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/6665fdc6e86f173a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +f:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/98ddd18b25554abd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6dc89cea942b737a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6665fdc6e86f173a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt index 6cb176ab6f..2794e09e6e 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"admin-settings","paramType":null,"paramKey":"admin-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"admin-settings","paramType":null,"paramKey":"admin-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts.html b/litellm/proxy/_experimental/out/settings/logging-and-alerts.html new file mode 100644 index 0000000000..bca4fef528 --- /dev/null +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt index f6f5587acc..4975b821e8 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +f:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt index e867f64690..335ee76251 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +3:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt index f6f5587acc..4975b821e8 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +f:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt index 39721efc17..b4b039407a 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"logging-and-alerts","paramType":null,"paramKey":"logging-and-alerts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"logging-and-alerts","paramType":null,"paramKey":"logging-and-alerts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/router-settings.html b/litellm/proxy/_experimental/out/settings/router-settings.html new file mode 100644 index 0000000000..11790bca75 --- /dev/null +++ b/litellm/proxy/_experimental/out/settings/router-settings.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/router-settings.txt b/litellm/proxy/_experimental/out/settings/router-settings.txt index e51ca56b67..0b3a779195 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js"],"default"] +f:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt index b555c0ce9c..cc00121b6c 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js"],"default"] +3:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt index e51ca56b67..0b3a779195 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js"],"default"] +f:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt index f9943c3b9a..7c194e0e27 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"router-settings","paramType":null,"paramKey":"router-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"router-settings","paramType":null,"paramKey":"router-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme.html b/litellm/proxy/_experimental/out/settings/ui-theme.html new file mode 100644 index 0000000000..2326368f23 --- /dev/null +++ b/litellm/proxy/_experimental/out/settings/ui-theme.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/ui-theme.txt b/litellm/proxy/_experimental/out/settings/ui-theme.txt index 58f51c8545..cd736f01eb 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] +f:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt index cb364a5033..0f502ef779 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] +3:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt index 58f51c8545..cd736f01eb 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] +f:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt index 1a6399b3ce..c8533eafe2 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"ui-theme","paramType":null,"paramKey":"ui-theme","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"ui-theme","paramType":null,"paramKey":"ui-theme","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/skills.html b/litellm/proxy/_experimental/out/skills.html new file mode 100644 index 0000000000..3a16190e58 --- /dev/null +++ b/litellm/proxy/_experimental/out/skills.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/skills.txt b/litellm/proxy/_experimental/out/skills.txt index d643361959..7d44660f49 100644 --- a/litellm/proxy/_experimental/out/skills.txt +++ b/litellm/proxy/_experimental/out/skills.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","skills"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["skills",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","skills"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["skills",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt index e69cdb7ada..253da51c71 100644 --- a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] +3:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.txt b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.txt +++ b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/skills/__next._full.txt b/litellm/proxy/_experimental/out/skills/__next._full.txt index d643361959..7d44660f49 100644 --- a/litellm/proxy/_experimental/out/skills/__next._full.txt +++ b/litellm/proxy/_experimental/out/skills/__next._full.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","skills"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["skills",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","skills"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["skills",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/skills/__next._head.txt b/litellm/proxy/_experimental/out/skills/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/skills/__next._head.txt +++ b/litellm/proxy/_experimental/out/skills/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/skills/__next._index.txt b/litellm/proxy/_experimental/out/skills/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/skills/__next._index.txt +++ b/litellm/proxy/_experimental/out/skills/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/skills/__next._tree.txt b/litellm/proxy/_experimental/out/skills/__next._tree.txt index 41dc203f40..6b1577550b 100644 --- a/litellm/proxy/_experimental/out/skills/__next._tree.txt +++ b/litellm/proxy/_experimental/out/skills/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"skills","paramType":null,"paramKey":"skills","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"skills","paramType":null,"paramKey":"skills","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/teams.html b/litellm/proxy/_experimental/out/teams.html new file mode 100644 index 0000000000..4d3144109f --- /dev/null +++ b/litellm/proxy/_experimental/out/teams.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/teams.txt b/litellm/proxy/_experimental/out/teams.txt index 0f467a74dd..a043c5809e 100644 --- a/litellm/proxy/_experimental/out/teams.txt +++ b/litellm/proxy/_experimental/out/teams.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/ef8798600e862605.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/e637f1fc0218b4f2.js","/litellm-asset-prefix/_next/static/chunks/c1def3f9c2ccf0b5.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3ac3a9a88413bb27.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ef8798600e862605.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e637f1fc0218b4f2.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/c1def3f9c2ccf0b5.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/3ac3a9a88413bb27.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt index d58cc19401..79e078d73b 100644 --- a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/ef8798600e862605.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/e637f1fc0218b4f2.js","/litellm-asset-prefix/_next/static/chunks/c1def3f9c2ccf0b5.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3ac3a9a88413bb27.js"],"default"] +3:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ef8798600e862605.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e637f1fc0218b4f2.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/c1def3f9c2ccf0b5.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/3ac3a9a88413bb27.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.txt b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.txt +++ b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/teams/__next._full.txt b/litellm/proxy/_experimental/out/teams/__next._full.txt index 0f467a74dd..a043c5809e 100644 --- a/litellm/proxy/_experimental/out/teams/__next._full.txt +++ b/litellm/proxy/_experimental/out/teams/__next._full.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/ef8798600e862605.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/e637f1fc0218b4f2.js","/litellm-asset-prefix/_next/static/chunks/c1def3f9c2ccf0b5.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3ac3a9a88413bb27.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ef8798600e862605.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e637f1fc0218b4f2.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/c1def3f9c2ccf0b5.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/3ac3a9a88413bb27.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/teams/__next._head.txt b/litellm/proxy/_experimental/out/teams/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/teams/__next._head.txt +++ b/litellm/proxy/_experimental/out/teams/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/teams/__next._index.txt b/litellm/proxy/_experimental/out/teams/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/teams/__next._index.txt +++ b/litellm/proxy/_experimental/out/teams/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/teams/__next._tree.txt b/litellm/proxy/_experimental/out/teams/__next._tree.txt index 9d36b8d440..d60a7f15be 100644 --- a/litellm/proxy/_experimental/out/teams/__next._tree.txt +++ b/litellm/proxy/_experimental/out/teams/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"teams","paramType":null,"paramKey":"teams","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"teams","paramType":null,"paramKey":"teams","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/test-key.html b/litellm/proxy/_experimental/out/test-key.html new file mode 100644 index 0000000000..cb826c9c7a --- /dev/null +++ b/litellm/proxy/_experimental/out/test-key.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/test-key.txt b/litellm/proxy/_experimental/out/test-key.txt index 3ab5e88ed8..8e42724c98 100644 --- a/litellm/proxy/_experimental/out/test-key.txt +++ b/litellm/proxy/_experimental/out/test-key.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt index 4c280c19a3..3c6cae9ad2 100644 --- a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] +3:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt +++ b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/test-key/__next._full.txt b/litellm/proxy/_experimental/out/test-key/__next._full.txt index 3ab5e88ed8..8e42724c98 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._full.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._full.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/test-key/__next._head.txt b/litellm/proxy/_experimental/out/test-key/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._head.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/test-key/__next._index.txt b/litellm/proxy/_experimental/out/test-key/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._index.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/test-key/__next._tree.txt b/litellm/proxy/_experimental/out/test-key/__next._tree.txt index 036b186533..020f14ed7f 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._tree.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"test-key","paramType":null,"paramKey":"test-key","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"test-key","paramType":null,"paramKey":"test-key","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers.html b/litellm/proxy/_experimental/out/tools/mcp-servers.html new file mode 100644 index 0000000000..384856bd1a --- /dev/null +++ b/litellm/proxy/_experimental/out/tools/mcp-servers.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers.txt b/litellm/proxy/_experimental/out/tools/mcp-servers.txt index 5984d8ae32..b08d892065 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js"],"default"] +f:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt index 6a289b8dea..3f806301ef 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js"],"default"] +3:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt index 5984d8ae32..b08d892065 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js"],"default"] +f:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3daef8922b68e600.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt index 386df20452..fa19b6cac9 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp-servers","paramType":null,"paramKey":"mcp-servers","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp-servers","paramType":null,"paramKey":"mcp-servers","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores.html b/litellm/proxy/_experimental/out/tools/vector-stores.html new file mode 100644 index 0000000000..8413c4ead5 --- /dev/null +++ b/litellm/proxy/_experimental/out/tools/vector-stores.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/tools/vector-stores.txt b/litellm/proxy/_experimental/out/tools/vector-stores.txt index 5cd62b559d..db29739014 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] +f:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt index bd0e61d746..70daa4e64e 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] +3:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt index 5cd62b559d..db29739014 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] +f:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] +9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt index 6f7938fae4..4b302e1578 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"vector-stores","paramType":null,"paramKey":"vector-stores","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"vector-stores","paramType":null,"paramKey":"vector-stores","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/usage.html b/litellm/proxy/_experimental/out/usage.html new file mode 100644 index 0000000000..bfae462b9f --- /dev/null +++ b/litellm/proxy/_experimental/out/usage.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/usage.txt b/litellm/proxy/_experimental/out/usage.txt index b1c74fb568..3ada0bc4ee 100644 --- a/litellm/proxy/_experimental/out/usage.txt +++ b/litellm/proxy/_experimental/out/usage.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/37e7834517e667e4.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/bbe974da1fd4f044.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/4a97ab1044d56ea9.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/37e7834517e667e4.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/bbe974da1fd4f044.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/4a97ab1044d56ea9.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt index 1c890ad3a6..3edfd53dd6 100644 --- a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/37e7834517e667e4.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/bbe974da1fd4f044.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/4a97ab1044d56ea9.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js"],"default"] +3:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/37e7834517e667e4.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/bbe974da1fd4f044.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/4a97ab1044d56ea9.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.txt b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.txt +++ b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/usage/__next._full.txt b/litellm/proxy/_experimental/out/usage/__next._full.txt index b1c74fb568..3ada0bc4ee 100644 --- a/litellm/proxy/_experimental/out/usage/__next._full.txt +++ b/litellm/proxy/_experimental/out/usage/__next._full.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/37e7834517e667e4.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/bbe974da1fd4f044.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/4a97ab1044d56ea9.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/37e7834517e667e4.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/bbe974da1fd4f044.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/4a97ab1044d56ea9.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/usage/__next._head.txt b/litellm/proxy/_experimental/out/usage/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/usage/__next._head.txt +++ b/litellm/proxy/_experimental/out/usage/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/usage/__next._index.txt b/litellm/proxy/_experimental/out/usage/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/usage/__next._index.txt +++ b/litellm/proxy/_experimental/out/usage/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/usage/__next._tree.txt b/litellm/proxy/_experimental/out/usage/__next._tree.txt index 0e4d9ac27a..6a33df1d27 100644 --- a/litellm/proxy/_experimental/out/usage/__next._tree.txt +++ b/litellm/proxy/_experimental/out/usage/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"usage","paramType":null,"paramKey":"usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"usage","paramType":null,"paramKey":"usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/users.html b/litellm/proxy/_experimental/out/users.html new file mode 100644 index 0000000000..e99abcc8ed --- /dev/null +++ b/litellm/proxy/_experimental/out/users.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/users.txt b/litellm/proxy/_experimental/out/users.txt index ef44339143..b1d14c0ff6 100644 --- a/litellm/proxy/_experimental/out/users.txt +++ b/litellm/proxy/_experimental/out/users.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt index 7869809db1..3f3c26d23c 100644 --- a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] +3:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.txt b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.txt +++ b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/users/__next._full.txt b/litellm/proxy/_experimental/out/users/__next._full.txt index ef44339143..b1d14c0ff6 100644 --- a/litellm/proxy/_experimental/out/users/__next._full.txt +++ b/litellm/proxy/_experimental/out/users/__next._full.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/users/__next._head.txt b/litellm/proxy/_experimental/out/users/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/users/__next._head.txt +++ b/litellm/proxy/_experimental/out/users/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/users/__next._index.txt b/litellm/proxy/_experimental/out/users/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/users/__next._index.txt +++ b/litellm/proxy/_experimental/out/users/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/users/__next._tree.txt b/litellm/proxy/_experimental/out/users/__next._tree.txt index 9e0569e2a5..ed62249698 100644 --- a/litellm/proxy/_experimental/out/users/__next._tree.txt +++ b/litellm/proxy/_experimental/out/users/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"users","paramType":null,"paramKey":"users","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"users","paramType":null,"paramKey":"users","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/virtual-keys.html b/litellm/proxy/_experimental/out/virtual-keys.html new file mode 100644 index 0000000000..7961a20e83 --- /dev/null +++ b/litellm/proxy/_experimental/out/virtual-keys.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/virtual-keys.txt b/litellm/proxy/_experimental/out/virtual-keys.txt index e34f353218..4abf2301fc 100644 --- a/litellm/proxy/_experimental/out/virtual-keys.txt +++ b/litellm/proxy/_experimental/out/virtual-keys.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/8127cf0d5ad2772a.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/e8b12a8b1fe94fe9.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8127cf0d5ad2772a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/e8b12a8b1fe94fe9.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt index 5df141478e..dd07602c56 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt index eab8d42a38..4f10494a2e 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/8127cf0d5ad2772a.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/e8b12a8b1fe94fe9.js"],"default"] +3:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8127cf0d5ad2772a.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/e8b12a8b1fe94fe9.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt index 12f813af35..fce37fb5ff 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt index e34f353218..4abf2301fc 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt @@ -4,25 +4,24 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js"],"default"] -c:I[168027,[],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"zxkD4-EPlgfKHDTw8O869","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/f7c95eaa060d1f99.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} -d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/f7c95eaa060d1f99.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/c2f31fa6e9a867a9.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/e1ddb2a5fb23f5a5.js","/litellm-asset-prefix/_next/static/chunks/0e6dadb6a51341b5.js","/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","/litellm-asset-prefix/_next/static/chunks/8127cf0d5ad2772a.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/e8b12a8b1fe94fe9.js"],"default"] -11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -12:"$Sreact.suspense" -14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a5b10ff77096a982.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8127cf0d5ad2772a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/e8b12a8b1fe94fe9.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] -b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] +d:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js"],"default"] +10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +11:"$Sreact.suspense" +13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] +15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -f:{} -10:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" -15:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -18:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -13:null -17:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L18","4",{}]] +e:{} +f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" +14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] +12:null +16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]] diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt index 635c8e398b..c99f06703d 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt index d026a48036..e999484c30 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt @@ -4,5 +4,5 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt index 2658313773..a4b60293af 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/e0cb6755699177c1.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"zxkD4-EPlgfKHDTw8O869","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"virtual-keys","paramType":null,"paramKey":"virtual-keys","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"virtual-keys","paramType":null,"paramKey":"virtual-keys","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} From 5faf75dceb72e7f0671af067a57e6f0f2de0334d Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Fri, 1 May 2026 20:39:03 -0700 Subject: [PATCH 7/8] chore: update Next.js build artifacts (2026-05-02 03:39 UTC, node v20.20.2) --- .../out/{404/index.html => 404.html} | 2 +- .../_experimental/out/__next.__PAGE__.txt | 20 +- .../proxy/_experimental/out/__next._full.txt | 32 +- .../proxy/_experimental/out/__next._head.txt | 2 +- .../proxy/_experimental/out/__next._index.txt | 2 +- .../proxy/_experimental/out/__next._tree.txt | 2 +- .../_buildManifest.js | 0 .../_clientMiddlewareManifest.json | 0 .../_ssgManifest.js | 0 ...fe89dd32bb4f5b6.js => 0377ae18aae60c57.js} | 2 +- .../_next/static/chunks/038e83c8eab81a79.js | 84 ---- .../_next/static/chunks/039fd44300b25e02.js | 1 + .../_next/static/chunks/05d900c88781d712.js | 1 - ...e5ddb5784b2b78a.js => 0636443d6303b49b.js} | 2 +- ...c36bfe1ba5e3ba8.js => 0c3e8651e0e97232.js} | 12 +- ...aa9f9b9bb3e054b.js => 0cdfadbcf4b8c9e4.js} | 2 +- ...27456ba72075ad9.js => 0dbc6df9aa2513ad.js} | 2 +- .../_next/static/chunks/0e6dadb6a51341b5.js | 1 - .../_next/static/chunks/11429586d5e74f7f.js | 1 + ...8a5548f64cd2f73.js => 171a03c36a999407.js} | 6 +- ...56330759aeeb883.js => 17816faaae727f81.js} | 4 +- .../_next/static/chunks/1d0991370c308b4d.js | 1 - .../_next/static/chunks/2005c732f6d6cbb4.js | 84 ---- .../_next/static/chunks/276409aa6cbc14db.js | 1 + .../_next/static/chunks/277cc236a763c2bc.js | 3 - .../_next/static/chunks/2faf62c238d105eb.js | 1 - .../_next/static/chunks/37e7834517e667e4.js | 1 - .../_next/static/chunks/38db69571fd2ddd2.js | 231 ---------- ...12bdf0901df004a.js => 3a35f4a4b0831887.js} | 2 +- .../_next/static/chunks/3ac3a9a88413bb27.js | 1 - .../_next/static/chunks/3daef8922b68e600.js | 91 ---- ...cda7c12f9795cba.js => 3e917c79aadd945b.js} | 6 +- .../_next/static/chunks/3f8f8f2ea9713f7b.js | 1 - ...230559fcabaea23.js => 406bbb9c89fee7ee.js} | 2 +- .../_next/static/chunks/40ec1228b231a0d1.js | 1 - ...c5fe661d375c3b5.js => 4142aa9f47c16185.js} | 2 +- ...908525d8a1d1a33.js => 426f2755d11d3697.js} | 4 +- .../_next/static/chunks/432e162c2ee31f73.js | 72 --- .../_next/static/chunks/44fd25e5d70e1a25.js | 1 - .../_next/static/chunks/45249a290b3ea558.js | 1 - .../_next/static/chunks/466ba0a8a546c4fd.js | 1 - .../_next/static/chunks/47a838c67cdd745e.js | 1 - .../_next/static/chunks/47be83d4515c6599.js | 1 - .../_next/static/chunks/4a97ab1044d56ea9.js | 8 - ...b8dcb3ad5dfb8de.js => 4e06277331e725da.js} | 12 +- .../_next/static/chunks/50d8a95e62930b35.js | 1 - .../_next/static/chunks/54563d12ee8915f4.js | 1 + .../_next/static/chunks/570d770996d98e0f.js | 1 + ...d3700bffc110569.js => 57d42681e5c19818.js} | 2 +- .../_next/static/chunks/5a6ef256a98646ae.js | 1 - .../_next/static/chunks/5b23ca2957db2e3d.js | 8 - ...f6e5b838f18b8e6.js => 5ca32057c3affe38.js} | 6 +- .../_next/static/chunks/5da3aa6d4034aceb.js | 72 +++ .../_next/static/chunks/5f2d62a75803a3f7.js | 1 + .../_next/static/chunks/623eaea02d123060.js | 7 - .../_next/static/chunks/6392214b899e5c07.js | 1 - .../_next/static/chunks/65968777d52ff874.js | 7 - .../_next/static/chunks/6665fdc6e86f173a.js | 1 - .../_next/static/chunks/673491d4036a0cfe.js | 1 + .../_next/static/chunks/6dc89cea942b737a.js | 8 - .../_next/static/chunks/72debc51022299b8.js | 1 - .../_next/static/chunks/7a2c975c414f5b5b.js | 1 + .../_next/static/chunks/7c797521435cb59c.js | 1 - .../_next/static/chunks/7e2dbe0d25a79405.js | 1 + .../_next/static/chunks/7e4551c11f7f1e8a.js | 1 - .../_next/static/chunks/7ede3688da5c7a5f.js | 1 - .../_next/static/chunks/8127cf0d5ad2772a.js | 1 - .../_next/static/chunks/82a3cc31a8cf4b5f.js | 8 + ...5cc063d4c1cb77b.js => 8489ea6f0be86483.js} | 2 +- ...149faf92f484aca.js => 878832edb30e99a4.js} | 12 +- .../_next/static/chunks/8a26922c4b7235a4.js | 1 + .../_next/static/chunks/8c17e934bd227606.js | 231 ++++++++++ ...c6f8ac32c75a373.js => 907d812b2431487b.js} | 2 +- .../_next/static/chunks/914ef0e7b2f44614.js | 1 - .../_next/static/chunks/91a13e42c88cfff6.js | 1 - ...8170e1c551aede4.js => 92516c9f878f0819.js} | 2 +- ...57a01eeb0a140e9.js => 94f7208f5087e27c.js} | 2 +- .../_next/static/chunks/98ddd18b25554abd.js | 1 - .../_next/static/chunks/9b19f9f63c383201.js | 1 - ...9eca5447bef7f55.js => 9bbebdeb3f1cb03f.js} | 4 +- ...abd1c9341cacb49.js => 9fbdf10b9cf445d9.js} | 2 +- .../_next/static/chunks/a0b3f7d6c7b4d358.js | 8 - .../_next/static/chunks/a1abfc2f35c701cc.js | 8 - .../_next/static/chunks/a1b5b0c54192471e.js | 3 - .../_next/static/chunks/a542eaa81bba9029.js | 1 - .../_next/static/chunks/a5b10ff77096a982.js | 10 - .../_next/static/chunks/a61a87ca92d576e9.js | 420 ------------------ .../_next/static/chunks/aa7c40f46cb1b417.js | 420 ------------------ ...736882a2e4e2f73.js => b533b97d3f73eba2.js} | 2 +- .../_next/static/chunks/ba3052c7fda27695.js | 1 - ...bab30fb3f911abc.js => baadbd26839e7b66.js} | 2 +- .../_next/static/chunks/bacdab4ef587dc3f.js | 1 - .../_next/static/chunks/bbe974da1fd4f044.js | 1 - .../_next/static/chunks/bdaa8fe6e6022114.js | 1 - .../_next/static/chunks/c1def3f9c2ccf0b5.js | 1 - .../_next/static/chunks/c2f31fa6e9a867a9.js | 1 - ...023bf9fd490e7e0.js => c3c84f2fc1b1e9db.js} | 2 +- .../_next/static/chunks/c7110a3f717e0317.js | 1 + .../_next/static/chunks/cd677ff381b90c30.js | 1 - .../_next/static/chunks/d415c843a5441964.js | 1 + .../_next/static/chunks/d6be8091255a78cc.js | 1 - .../_next/static/chunks/d705b57c88e51101.js | 1 - .../_next/static/chunks/d8cd2d44272d51c8.js | 1 - .../_next/static/chunks/e0cb6755699177c1.css | 1 - .../_next/static/chunks/e1ddb2a5fb23f5a5.js | 1 - .../_next/static/chunks/e1f572e8226962e3.js | 72 --- .../_next/static/chunks/e2f70fb83dabbe21.js | 1 + .../_next/static/chunks/e637f1fc0218b4f2.js | 1 - .../_next/static/chunks/e79e33b8b366ae69.js | 1 - .../_next/static/chunks/e7cc7b98b893b20d.js | 231 ---------- .../_next/static/chunks/e871b803455fadee.js | 1 - .../_next/static/chunks/e8b12a8b1fe94fe9.js | 8 - .../_next/static/chunks/e9906ef85805c46e.js | 1 + .../_next/static/chunks/ee7884930918dcb9.js | 1 + .../_next/static/chunks/ef8798600e862605.js | 1 - ...51e5ff2dc4928c2.js => efea414bda877fd0.js} | 2 +- .../_next/static/chunks/f520a8d0cb8aca9e.js | 1 + .../_next/static/chunks/f5fc27663c2424f7.js | 1 - .../_next/static/chunks/f7c95eaa060d1f99.js | 3 - ...c8c73d0d20d640f.js => fa36bea8808c8054.js} | 2 +- .../_next/static/chunks/fa8dcdcf9803fe4f.js | 8 - ...a91b0fa4d619698.js => fb125648f2dae104.js} | 2 +- .../_next/static/chunks/fba48608afe1d559.js | 1 - .../_next/static/chunks/fe5abdcdb57db543.js | 1 - .../lw0pr129QWvsGxcNhZmh0/_buildManifest.js | 16 - .../_clientMiddlewareManifest.json | 1 - .../lw0pr129QWvsGxcNhZmh0/_ssgManifest.js | 1 - .../zxkD4-EPlgfKHDTw8O869/_buildManifest.js | 16 - .../_clientMiddlewareManifest.json | 1 - .../zxkD4-EPlgfKHDTw8O869/_ssgManifest.js | 1 - .../index.html => _not-found.html} | 2 +- .../proxy/_experimental/out/_not-found.txt | 2 +- .../out/_not-found/__next._full.txt | 2 +- .../out/_not-found/__next._head.txt | 2 +- .../out/_not-found/__next._index.txt | 2 +- .../_not-found/__next._not-found.__PAGE__.txt | 2 +- .../out/_not-found/__next._not-found.txt | 2 +- .../out/_not-found/__next._tree.txt | 2 +- .../_experimental/out/api-reference.html | 1 + .../proxy/_experimental/out/api-reference.txt | 6 +- ...KGRhc2hib2FyZCk.api-reference.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.api-reference.txt | 2 +- .../api-reference/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/api-reference/__next._full.txt | 6 +- .../out/api-reference/__next._head.txt | 2 +- .../out/api-reference/__next._index.txt | 2 +- .../out/api-reference/__next._tree.txt | 2 +- .../out/api-reference/index.html | 1 - .../_experimental/out/assets/logos/qohash.jpg | Bin 0 -> 11581 bytes litellm/proxy/_experimental/out/chat.html | 2 +- litellm/proxy/_experimental/out/chat.txt | 4 +- .../_experimental/out/chat/__next._full.txt | 4 +- .../_experimental/out/chat/__next._head.txt | 2 +- .../_experimental/out/chat/__next._index.txt | 2 +- .../_experimental/out/chat/__next._tree.txt | 2 +- .../out/chat/__next.chat.__PAGE__.txt | 4 +- .../_experimental/out/chat/__next.chat.txt | 2 +- .../out/experimental/api-playground.html | 1 + .../out/experimental/api-playground.txt | 6 +- ...k.experimental.api-playground.__PAGE__.txt | 4 +- ...2hib2FyZCk.experimental.api-playground.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../api-playground/__next._full.txt | 6 +- .../api-playground/__next._head.txt | 2 +- .../api-playground/__next._index.txt | 2 +- .../api-playground/__next._tree.txt | 2 +- .../experimental/api-playground/index.html | 1 - .../out/experimental/budgets.html | 1 + .../out/experimental/budgets.txt | 8 +- ...ib2FyZCk.experimental.budgets.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.experimental.budgets.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../budgets/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/experimental/budgets/__next._full.txt | 8 +- .../out/experimental/budgets/__next._head.txt | 2 +- .../experimental/budgets/__next._index.txt | 2 +- .../out/experimental/budgets/__next._tree.txt | 2 +- .../out/experimental/budgets/index.html | 1 - .../out/experimental/caching.html | 1 + .../out/experimental/caching.txt | 6 +- ...ib2FyZCk.experimental.caching.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.experimental.caching.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../caching/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/experimental/caching/__next._full.txt | 6 +- .../out/experimental/caching/__next._head.txt | 2 +- .../experimental/caching/__next._index.txt | 2 +- .../out/experimental/caching/__next._tree.txt | 2 +- .../out/experimental/caching/index.html | 1 - .../out/experimental/claude-code-plugins.html | 1 + .../out/experimental/claude-code-plugins.txt | 6 +- ...erimental.claude-code-plugins.__PAGE__.txt | 4 +- ...FyZCk.experimental.claude-code-plugins.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../claude-code-plugins/__next._full.txt | 6 +- .../claude-code-plugins/__next._head.txt | 2 +- .../claude-code-plugins/__next._index.txt | 2 +- .../claude-code-plugins/__next._tree.txt | 2 +- .../claude-code-plugins/index.html | 1 - .../out/experimental/old-usage.html | 1 + .../out/experimental/old-usage.txt | 8 +- ...2FyZCk.experimental.old-usage.__PAGE__.txt | 4 +- ...KGRhc2hib2FyZCk.experimental.old-usage.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../old-usage/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../experimental/old-usage/__next._full.txt | 8 +- .../experimental/old-usage/__next._head.txt | 2 +- .../experimental/old-usage/__next._index.txt | 2 +- .../experimental/old-usage/__next._tree.txt | 2 +- .../out/experimental/old-usage/index.html | 1 - .../out/experimental/prompts.html | 1 + .../out/experimental/prompts.txt | 8 +- ...ib2FyZCk.experimental.prompts.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.experimental.prompts.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../prompts/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/experimental/prompts/__next._full.txt | 8 +- .../out/experimental/prompts/__next._head.txt | 2 +- .../experimental/prompts/__next._index.txt | 2 +- .../out/experimental/prompts/__next._tree.txt | 2 +- .../out/experimental/prompts/index.html | 1 - .../out/experimental/tag-management.html | 1 + .../out/experimental/tag-management.txt | 8 +- ...k.experimental.tag-management.__PAGE__.txt | 4 +- ...2hib2FyZCk.experimental.tag-management.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../tag-management/__next._full.txt | 8 +- .../tag-management/__next._head.txt | 2 +- .../tag-management/__next._index.txt | 2 +- .../tag-management/__next._tree.txt | 2 +- .../experimental/tag-management/index.html | 1 - .../proxy/_experimental/out/guardrails.html | 1 + .../proxy/_experimental/out/guardrails.txt | 8 +- ...t.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.guardrails.txt | 2 +- .../guardrails/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/guardrails/__next._full.txt | 8 +- .../out/guardrails/__next._head.txt | 2 +- .../out/guardrails/__next._index.txt | 2 +- .../out/guardrails/__next._tree.txt | 2 +- .../_experimental/out/guardrails/index.html | 1 - litellm/proxy/_experimental/out/index.html | 2 +- litellm/proxy/_experimental/out/index.txt | 32 +- .../out/{login/index.html => login.html} | 2 +- litellm/proxy/_experimental/out/login.txt | 4 +- .../_experimental/out/login/__next._full.txt | 4 +- .../_experimental/out/login/__next._head.txt | 2 +- .../_experimental/out/login/__next._index.txt | 2 +- .../_experimental/out/login/__next._tree.txt | 2 +- .../out/login/__next.login.__PAGE__.txt | 4 +- .../_experimental/out/login/__next.login.txt | 2 +- litellm/proxy/_experimental/out/logs.html | 1 + litellm/proxy/_experimental/out/logs.txt | 8 +- .../__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt | 4 +- .../out/logs/__next.!KGRhc2hib2FyZCk.logs.txt | 2 +- .../out/logs/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../_experimental/out/logs/__next._full.txt | 8 +- .../_experimental/out/logs/__next._head.txt | 2 +- .../_experimental/out/logs/__next._index.txt | 2 +- .../_experimental/out/logs/__next._tree.txt | 2 +- .../proxy/_experimental/out/logs/index.html | 1 - .../{callback/index.html => callback.html} | 2 +- .../_experimental/out/mcp/oauth/callback.txt | 2 +- .../out/mcp/oauth/callback/__next._full.txt | 2 +- .../out/mcp/oauth/callback/__next._head.txt | 2 +- .../out/mcp/oauth/callback/__next._index.txt | 2 +- .../out/mcp/oauth/callback/__next._tree.txt | 2 +- .../__next.mcp.oauth.callback.__PAGE__.txt | 2 +- .../callback/__next.mcp.oauth.callback.txt | 2 +- .../mcp/oauth/callback/__next.mcp.oauth.txt | 2 +- .../out/mcp/oauth/callback/__next.mcp.txt | 2 +- .../proxy/_experimental/out/model-hub.html | 1 + litellm/proxy/_experimental/out/model-hub.txt | 8 +- ...xt.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.model-hub.txt | 2 +- .../out/model-hub/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/model-hub/__next._full.txt | 8 +- .../out/model-hub/__next._head.txt | 2 +- .../out/model-hub/__next._index.txt | 2 +- .../out/model-hub/__next._tree.txt | 2 +- .../_experimental/out/model-hub/index.html | 1 - .../{model_hub/index.html => model_hub.html} | 2 +- litellm/proxy/_experimental/out/model_hub.txt | 4 +- .../out/model_hub/__next._full.txt | 4 +- .../out/model_hub/__next._head.txt | 2 +- .../out/model_hub/__next._index.txt | 2 +- .../out/model_hub/__next._tree.txt | 2 +- .../model_hub/__next.model_hub.__PAGE__.txt | 4 +- .../out/model_hub/__next.model_hub.txt | 2 +- .../index.html => model_hub_table.html} | 2 +- .../_experimental/out/model_hub_table.txt | 6 +- .../out/model_hub_table/__next._full.txt | 6 +- .../out/model_hub_table/__next._head.txt | 2 +- .../out/model_hub_table/__next._index.txt | 2 +- .../out/model_hub_table/__next._tree.txt | 2 +- .../__next.model_hub_table.__PAGE__.txt | 4 +- .../__next.model_hub_table.txt | 2 +- .../out/models-and-endpoints.html | 1 + .../out/models-and-endpoints.txt | 8 +- ...ib2FyZCk.models-and-endpoints.__PAGE__.txt | 4 +- ....!KGRhc2hib2FyZCk.models-and-endpoints.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/models-and-endpoints/__next._full.txt | 8 +- .../out/models-and-endpoints/__next._head.txt | 2 +- .../models-and-endpoints/__next._index.txt | 2 +- .../out/models-and-endpoints/__next._tree.txt | 2 +- .../out/models-and-endpoints/index.html | 1 - .../index.html => onboarding.html} | 2 +- .../proxy/_experimental/out/onboarding.txt | 4 +- .../out/onboarding/__next._full.txt | 4 +- .../out/onboarding/__next._head.txt | 2 +- .../out/onboarding/__next._index.txt | 2 +- .../out/onboarding/__next._tree.txt | 2 +- .../onboarding/__next.onboarding.__PAGE__.txt | 4 +- .../out/onboarding/__next.onboarding.txt | 2 +- .../_experimental/out/organizations.html | 1 + .../proxy/_experimental/out/organizations.txt | 8 +- ...KGRhc2hib2FyZCk.organizations.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.organizations.txt | 2 +- .../organizations/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/organizations/__next._full.txt | 8 +- .../out/organizations/__next._head.txt | 2 +- .../out/organizations/__next._index.txt | 2 +- .../out/organizations/__next._tree.txt | 2 +- .../out/organizations/index.html | 1 - .../proxy/_experimental/out/playground.html | 1 + .../proxy/_experimental/out/playground.txt | 8 +- ...t.!KGRhc2hib2FyZCk.playground.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.playground.txt | 2 +- .../playground/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/playground/__next._full.txt | 8 +- .../out/playground/__next._head.txt | 2 +- .../out/playground/__next._index.txt | 2 +- .../out/playground/__next._tree.txt | 2 +- .../_experimental/out/playground/index.html | 1 - litellm/proxy/_experimental/out/policies.html | 1 + litellm/proxy/_experimental/out/policies.txt | 6 +- ...ext.!KGRhc2hib2FyZCk.policies.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.policies.txt | 2 +- .../out/policies/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/policies/__next._full.txt | 6 +- .../out/policies/__next._head.txt | 2 +- .../out/policies/__next._index.txt | 2 +- .../out/policies/__next._tree.txt | 2 +- .../_experimental/out/policies/index.html | 1 - .../out/settings/admin-settings.html | 1 + .../out/settings/admin-settings.txt | 6 +- ...FyZCk.settings.admin-settings.__PAGE__.txt | 4 +- ...GRhc2hib2FyZCk.settings.admin-settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../settings/admin-settings/__next._full.txt | 6 +- .../settings/admin-settings/__next._head.txt | 2 +- .../settings/admin-settings/__next._index.txt | 2 +- .../settings/admin-settings/__next._tree.txt | 2 +- .../out/settings/admin-settings/index.html | 1 - .../out/settings/logging-and-alerts.html | 1 + .../out/settings/logging-and-alerts.txt | 6 +- ...k.settings.logging-and-alerts.__PAGE__.txt | 4 +- ...2hib2FyZCk.settings.logging-and-alerts.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../logging-and-alerts/__next._full.txt | 6 +- .../logging-and-alerts/__next._head.txt | 2 +- .../logging-and-alerts/__next._index.txt | 2 +- .../logging-and-alerts/__next._tree.txt | 2 +- .../settings/logging-and-alerts/index.html | 1 - .../out/settings/router-settings.html | 1 + .../out/settings/router-settings.txt | 8 +- ...yZCk.settings.router-settings.__PAGE__.txt | 4 +- ...Rhc2hib2FyZCk.settings.router-settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 +- .../settings/router-settings/__next._full.txt | 8 +- .../settings/router-settings/__next._head.txt | 2 +- .../router-settings/__next._index.txt | 2 +- .../settings/router-settings/__next._tree.txt | 2 +- .../out/settings/router-settings/index.html | 1 - .../_experimental/out/settings/ui-theme.html | 1 + .../_experimental/out/settings/ui-theme.txt | 6 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 2 +- ...c2hib2FyZCk.settings.ui-theme.__PAGE__.txt | 4 +- ...ext.!KGRhc2hib2FyZCk.settings.ui-theme.txt | 2 +- .../ui-theme/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/settings/ui-theme/__next._full.txt | 6 +- .../out/settings/ui-theme/__next._head.txt | 2 +- .../out/settings/ui-theme/__next._index.txt | 2 +- .../out/settings/ui-theme/__next._tree.txt | 2 +- .../out/settings/ui-theme/index.html | 1 - litellm/proxy/_experimental/out/skills.html | 1 + litellm/proxy/_experimental/out/skills.txt | 6 +- ..._next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt | 4 +- .../skills/__next.!KGRhc2hib2FyZCk.skills.txt | 2 +- .../out/skills/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../_experimental/out/skills/__next._full.txt | 6 +- .../_experimental/out/skills/__next._head.txt | 2 +- .../out/skills/__next._index.txt | 2 +- .../_experimental/out/skills/__next._tree.txt | 2 +- .../proxy/_experimental/out/skills/index.html | 1 - litellm/proxy/_experimental/out/teams.html | 1 + litellm/proxy/_experimental/out/teams.txt | 8 +- ...__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt | 4 +- .../teams/__next.!KGRhc2hib2FyZCk.teams.txt | 2 +- .../out/teams/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../_experimental/out/teams/__next._full.txt | 8 +- .../_experimental/out/teams/__next._head.txt | 2 +- .../_experimental/out/teams/__next._index.txt | 2 +- .../_experimental/out/teams/__next._tree.txt | 2 +- .../proxy/_experimental/out/teams/index.html | 1 - litellm/proxy/_experimental/out/test-key.html | 1 + litellm/proxy/_experimental/out/test-key.txt | 8 +- ...ext.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.test-key.txt | 2 +- .../out/test-key/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/test-key/__next._full.txt | 8 +- .../out/test-key/__next._head.txt | 2 +- .../out/test-key/__next._index.txt | 2 +- .../out/test-key/__next._tree.txt | 2 +- .../_experimental/out/test-key/index.html | 1 - .../_experimental/out/tools/mcp-servers.html | 1 + .../_experimental/out/tools/mcp-servers.txt | 6 +- ...c2hib2FyZCk.tools.mcp-servers.__PAGE__.txt | 4 +- ...ext.!KGRhc2hib2FyZCk.tools.mcp-servers.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.tools.txt | 2 +- .../mcp-servers/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/tools/mcp-servers/__next._full.txt | 6 +- .../out/tools/mcp-servers/__next._head.txt | 2 +- .../out/tools/mcp-servers/__next._index.txt | 2 +- .../out/tools/mcp-servers/__next._tree.txt | 2 +- .../out/tools/mcp-servers/index.html | 1 - .../out/tools/vector-stores.html | 1 + .../_experimental/out/tools/vector-stores.txt | 6 +- .../__next.!KGRhc2hib2FyZCk.tools.txt | 2 +- ...hib2FyZCk.tools.vector-stores.__PAGE__.txt | 4 +- ...t.!KGRhc2hib2FyZCk.tools.vector-stores.txt | 2 +- .../vector-stores/__next.!KGRhc2hib2FyZCk.txt | 4 +- .../out/tools/vector-stores/__next._full.txt | 6 +- .../out/tools/vector-stores/__next._head.txt | 2 +- .../out/tools/vector-stores/__next._index.txt | 2 +- .../out/tools/vector-stores/__next._tree.txt | 2 +- .../out/tools/vector-stores/index.html | 1 - litellm/proxy/_experimental/out/usage.html | 1 + litellm/proxy/_experimental/out/usage.txt | 8 +- .../out/usage/__next.!KGRhc2hib2FyZCk.txt | 4 +- ...__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt | 4 +- .../usage/__next.!KGRhc2hib2FyZCk.usage.txt | 2 +- .../_experimental/out/usage/__next._full.txt | 8 +- .../_experimental/out/usage/__next._head.txt | 2 +- .../_experimental/out/usage/__next._index.txt | 2 +- .../_experimental/out/usage/__next._tree.txt | 2 +- .../proxy/_experimental/out/usage/index.html | 1 - litellm/proxy/_experimental/out/users.html | 1 + litellm/proxy/_experimental/out/users.txt | 8 +- .../out/users/__next.!KGRhc2hib2FyZCk.txt | 4 +- ...__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt | 4 +- .../users/__next.!KGRhc2hib2FyZCk.users.txt | 2 +- .../_experimental/out/users/__next._full.txt | 8 +- .../_experimental/out/users/__next._head.txt | 2 +- .../_experimental/out/users/__next._index.txt | 2 +- .../_experimental/out/users/__next._tree.txt | 2 +- .../proxy/_experimental/out/users/index.html | 1 - .../proxy/_experimental/out/virtual-keys.html | 1 + .../proxy/_experimental/out/virtual-keys.txt | 8 +- .../virtual-keys/__next.!KGRhc2hib2FyZCk.txt | 4 +- ...!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt | 4 +- .../__next.!KGRhc2hib2FyZCk.virtual-keys.txt | 2 +- .../out/virtual-keys/__next._full.txt | 8 +- .../out/virtual-keys/__next._head.txt | 2 +- .../out/virtual-keys/__next._index.txt | 2 +- .../out/virtual-keys/__next._tree.txt | 2 +- .../_experimental/out/virtual-keys/index.html | 1 - 474 files changed, 951 insertions(+), 2500 deletions(-) rename litellm/proxy/_experimental/out/{404/index.html => 404.html} (96%) rename litellm/proxy/_experimental/out/_next/static/{gMHOlKxZQjZlw5mZpwC2b => Qm-T2egqyzNalOph06c_b}/_buildManifest.js (100%) rename litellm/proxy/_experimental/out/_next/static/{gMHOlKxZQjZlw5mZpwC2b => Qm-T2egqyzNalOph06c_b}/_clientMiddlewareManifest.json (100%) rename litellm/proxy/_experimental/out/_next/static/{gMHOlKxZQjZlw5mZpwC2b => Qm-T2egqyzNalOph06c_b}/_ssgManifest.js (100%) rename litellm/proxy/_experimental/out/_next/static/chunks/{7fe89dd32bb4f5b6.js => 0377ae18aae60c57.js} (65%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/038e83c8eab81a79.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/039fd44300b25e02.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05d900c88781d712.js rename litellm/proxy/_experimental/out/_next/static/chunks/{be5ddb5784b2b78a.js => 0636443d6303b49b.js} (64%) rename litellm/proxy/_experimental/out/_next/static/chunks/{7c36bfe1ba5e3ba8.js => 0c3e8651e0e97232.js} (63%) rename litellm/proxy/_experimental/out/_next/static/chunks/{eaa9f9b9bb3e054b.js => 0cdfadbcf4b8c9e4.js} (99%) rename litellm/proxy/_experimental/out/_next/static/chunks/{f27456ba72075ad9.js => 0dbc6df9aa2513ad.js} (81%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0e6dadb6a51341b5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/11429586d5e74f7f.js rename litellm/proxy/_experimental/out/_next/static/chunks/{18a5548f64cd2f73.js => 171a03c36a999407.js} (74%) rename litellm/proxy/_experimental/out/_next/static/chunks/{656330759aeeb883.js => 17816faaae727f81.js} (50%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1d0991370c308b4d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2005c732f6d6cbb4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/276409aa6cbc14db.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/277cc236a763c2bc.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2faf62c238d105eb.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/37e7834517e667e4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/38db69571fd2ddd2.js rename litellm/proxy/_experimental/out/_next/static/chunks/{b12bdf0901df004a.js => 3a35f4a4b0831887.js} (75%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3ac3a9a88413bb27.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3daef8922b68e600.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ccda7c12f9795cba.js => 3e917c79aadd945b.js} (74%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3f8f8f2ea9713f7b.js rename litellm/proxy/_experimental/out/_next/static/chunks/{a230559fcabaea23.js => 406bbb9c89fee7ee.js} (99%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/40ec1228b231a0d1.js rename litellm/proxy/_experimental/out/_next/static/chunks/{cc5fe661d375c3b5.js => 4142aa9f47c16185.js} (62%) rename litellm/proxy/_experimental/out/_next/static/chunks/{8908525d8a1d1a33.js => 426f2755d11d3697.js} (77%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/432e162c2ee31f73.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/44fd25e5d70e1a25.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/45249a290b3ea558.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/466ba0a8a546c4fd.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/47a838c67cdd745e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/47be83d4515c6599.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4a97ab1044d56ea9.js rename litellm/proxy/_experimental/out/_next/static/chunks/{4b8dcb3ad5dfb8de.js => 4e06277331e725da.js} (78%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/50d8a95e62930b35.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/54563d12ee8915f4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/570d770996d98e0f.js rename litellm/proxy/_experimental/out/_next/static/chunks/{4d3700bffc110569.js => 57d42681e5c19818.js} (91%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5a6ef256a98646ae.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5b23ca2957db2e3d.js rename litellm/proxy/_experimental/out/_next/static/chunks/{4f6e5b838f18b8e6.js => 5ca32057c3affe38.js} (51%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5da3aa6d4034aceb.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5f2d62a75803a3f7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/623eaea02d123060.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6392214b899e5c07.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/65968777d52ff874.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6665fdc6e86f173a.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/673491d4036a0cfe.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6dc89cea942b737a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/72debc51022299b8.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7a2c975c414f5b5b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7c797521435cb59c.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7e2dbe0d25a79405.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7e4551c11f7f1e8a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7ede3688da5c7a5f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8127cf0d5ad2772a.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/82a3cc31a8cf4b5f.js rename litellm/proxy/_experimental/out/_next/static/chunks/{05cc063d4c1cb77b.js => 8489ea6f0be86483.js} (94%) rename litellm/proxy/_experimental/out/_next/static/chunks/{7149faf92f484aca.js => 878832edb30e99a4.js} (62%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8a26922c4b7235a4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8c17e934bd227606.js rename litellm/proxy/_experimental/out/_next/static/chunks/{8c6f8ac32c75a373.js => 907d812b2431487b.js} (59%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/914ef0e7b2f44614.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/91a13e42c88cfff6.js rename litellm/proxy/_experimental/out/_next/static/chunks/{58170e1c551aede4.js => 92516c9f878f0819.js} (76%) rename litellm/proxy/_experimental/out/_next/static/chunks/{d57a01eeb0a140e9.js => 94f7208f5087e27c.js} (95%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/98ddd18b25554abd.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9b19f9f63c383201.js rename litellm/proxy/_experimental/out/_next/static/chunks/{29eca5447bef7f55.js => 9bbebdeb3f1cb03f.js} (81%) rename litellm/proxy/_experimental/out/_next/static/chunks/{eabd1c9341cacb49.js => 9fbdf10b9cf445d9.js} (76%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a0b3f7d6c7b4d358.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a1abfc2f35c701cc.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a1b5b0c54192471e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a542eaa81bba9029.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a5b10ff77096a982.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a61a87ca92d576e9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/aa7c40f46cb1b417.js rename litellm/proxy/_experimental/out/_next/static/chunks/{7736882a2e4e2f73.js => b533b97d3f73eba2.js} (76%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ba3052c7fda27695.js rename litellm/proxy/_experimental/out/_next/static/chunks/{cbab30fb3f911abc.js => baadbd26839e7b66.js} (62%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bacdab4ef587dc3f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bbe974da1fd4f044.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bdaa8fe6e6022114.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c1def3f9c2ccf0b5.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c2f31fa6e9a867a9.js rename litellm/proxy/_experimental/out/_next/static/chunks/{5023bf9fd490e7e0.js => c3c84f2fc1b1e9db.js} (96%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c7110a3f717e0317.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cd677ff381b90c30.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d415c843a5441964.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d6be8091255a78cc.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d705b57c88e51101.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d8cd2d44272d51c8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e0cb6755699177c1.css delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e1ddb2a5fb23f5a5.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e1f572e8226962e3.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e2f70fb83dabbe21.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e637f1fc0218b4f2.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e79e33b8b366ae69.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e7cc7b98b893b20d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e871b803455fadee.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e8b12a8b1fe94fe9.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e9906ef85805c46e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ee7884930918dcb9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ef8798600e862605.js rename litellm/proxy/_experimental/out/_next/static/chunks/{951e5ff2dc4928c2.js => efea414bda877fd0.js} (85%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f520a8d0cb8aca9e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f5fc27663c2424f7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f7c95eaa060d1f99.js rename litellm/proxy/_experimental/out/_next/static/chunks/{9c8c73d0d20d640f.js => fa36bea8808c8054.js} (78%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fa8dcdcf9803fe4f.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ca91b0fa4d619698.js => fb125648f2dae104.js} (78%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fba48608afe1d559.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fe5abdcdb57db543.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_buildManifest.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_clientMiddlewareManifest.json delete mode 100644 litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_ssgManifest.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_buildManifest.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_clientMiddlewareManifest.json delete mode 100644 litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_ssgManifest.js rename litellm/proxy/_experimental/out/{_not-found/index.html => _not-found.html} (96%) create mode 100644 litellm/proxy/_experimental/out/api-reference.html delete mode 100644 litellm/proxy/_experimental/out/api-reference/index.html create mode 100644 litellm/proxy/_experimental/out/assets/logos/qohash.jpg create mode 100644 litellm/proxy/_experimental/out/experimental/api-playground.html delete mode 100644 litellm/proxy/_experimental/out/experimental/api-playground/index.html create mode 100644 litellm/proxy/_experimental/out/experimental/budgets.html delete mode 100644 litellm/proxy/_experimental/out/experimental/budgets/index.html create mode 100644 litellm/proxy/_experimental/out/experimental/caching.html delete mode 100644 litellm/proxy/_experimental/out/experimental/caching/index.html create mode 100644 litellm/proxy/_experimental/out/experimental/claude-code-plugins.html delete mode 100644 litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.html create mode 100644 litellm/proxy/_experimental/out/experimental/old-usage.html delete mode 100644 litellm/proxy/_experimental/out/experimental/old-usage/index.html create mode 100644 litellm/proxy/_experimental/out/experimental/prompts.html delete mode 100644 litellm/proxy/_experimental/out/experimental/prompts/index.html create mode 100644 litellm/proxy/_experimental/out/experimental/tag-management.html delete mode 100644 litellm/proxy/_experimental/out/experimental/tag-management/index.html create mode 100644 litellm/proxy/_experimental/out/guardrails.html delete mode 100644 litellm/proxy/_experimental/out/guardrails/index.html rename litellm/proxy/_experimental/out/{login/index.html => login.html} (87%) create mode 100644 litellm/proxy/_experimental/out/logs.html delete mode 100644 litellm/proxy/_experimental/out/logs/index.html rename litellm/proxy/_experimental/out/mcp/oauth/{callback/index.html => callback.html} (95%) create mode 100644 litellm/proxy/_experimental/out/model-hub.html delete mode 100644 litellm/proxy/_experimental/out/model-hub/index.html rename litellm/proxy/_experimental/out/{model_hub/index.html => model_hub.html} (91%) rename litellm/proxy/_experimental/out/{model_hub_table/index.html => model_hub_table.html} (91%) create mode 100644 litellm/proxy/_experimental/out/models-and-endpoints.html delete mode 100644 litellm/proxy/_experimental/out/models-and-endpoints/index.html rename litellm/proxy/_experimental/out/{onboarding/index.html => onboarding.html} (94%) create mode 100644 litellm/proxy/_experimental/out/organizations.html delete mode 100644 litellm/proxy/_experimental/out/organizations/index.html create mode 100644 litellm/proxy/_experimental/out/playground.html delete mode 100644 litellm/proxy/_experimental/out/playground/index.html create mode 100644 litellm/proxy/_experimental/out/policies.html delete mode 100644 litellm/proxy/_experimental/out/policies/index.html create mode 100644 litellm/proxy/_experimental/out/settings/admin-settings.html delete mode 100644 litellm/proxy/_experimental/out/settings/admin-settings/index.html create mode 100644 litellm/proxy/_experimental/out/settings/logging-and-alerts.html delete mode 100644 litellm/proxy/_experimental/out/settings/logging-and-alerts/index.html create mode 100644 litellm/proxy/_experimental/out/settings/router-settings.html delete mode 100644 litellm/proxy/_experimental/out/settings/router-settings/index.html create mode 100644 litellm/proxy/_experimental/out/settings/ui-theme.html delete mode 100644 litellm/proxy/_experimental/out/settings/ui-theme/index.html create mode 100644 litellm/proxy/_experimental/out/skills.html delete mode 100644 litellm/proxy/_experimental/out/skills/index.html create mode 100644 litellm/proxy/_experimental/out/teams.html delete mode 100644 litellm/proxy/_experimental/out/teams/index.html create mode 100644 litellm/proxy/_experimental/out/test-key.html delete mode 100644 litellm/proxy/_experimental/out/test-key/index.html create mode 100644 litellm/proxy/_experimental/out/tools/mcp-servers.html delete mode 100644 litellm/proxy/_experimental/out/tools/mcp-servers/index.html create mode 100644 litellm/proxy/_experimental/out/tools/vector-stores.html delete mode 100644 litellm/proxy/_experimental/out/tools/vector-stores/index.html create mode 100644 litellm/proxy/_experimental/out/usage.html delete mode 100644 litellm/proxy/_experimental/out/usage/index.html create mode 100644 litellm/proxy/_experimental/out/users.html delete mode 100644 litellm/proxy/_experimental/out/users/index.html create mode 100644 litellm/proxy/_experimental/out/virtual-keys.html delete mode 100644 litellm/proxy/_experimental/out/virtual-keys/index.html diff --git a/litellm/proxy/_experimental/out/404/index.html b/litellm/proxy/_experimental/out/404.html similarity index 96% rename from litellm/proxy/_experimental/out/404/index.html rename to litellm/proxy/_experimental/out/404.html index a3e8dd80e8..7271449e12 100644 --- a/litellm/proxy/_experimental/out/404/index.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/__next.__PAGE__.txt b/litellm/proxy/_experimental/out/__next.__PAGE__.txt index 3fddc2162a..1439e4a788 100644 --- a/litellm/proxy/_experimental/out/__next.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/__next.__PAGE__.txt @@ -1,28 +1,28 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js"],"default"] +3:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","/litellm-asset-prefix/_next/static/chunks/e9906ef85805c46e.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/907d812b2431487b.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3e917c79aadd945b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/9bbebdeb3f1cb03f.js","/litellm-asset-prefix/_next/static/chunks/8c17e934bd227606.js","/litellm-asset-prefix/_next/static/chunks/0dbc6df9aa2513ad.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/5f2d62a75803a3f7.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/c7110a3f717e0317.js","/litellm-asset-prefix/_next/static/chunks/fb125648f2dae104.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/94f7208f5087e27c.js","/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","/litellm-asset-prefix/_next/static/chunks/5da3aa6d4034aceb.js"],"default"] 18:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 19:"$Sreact.suspense" :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16"],"$L17"]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e9906ef85805c46e.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/907d812b2431487b.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/3e917c79aadd945b.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/9bbebdeb3f1cb03f.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/8c17e934bd227606.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16"],"$L17"]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" -6:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","async":true}] +6:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbc6df9aa2513ad.js","async":true}] 7:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}] -8:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}] +8:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/5f2d62a75803a3f7.js","async":true}] 9:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}] a:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","async":true}] -b:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true}] +b:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js","async":true}] c:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}] d:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true}] -e:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","async":true}] -f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true}] +e:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/c7110a3f717e0317.js","async":true}] +f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/fb125648f2dae104.js","async":true}] 10:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}] 11:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}] -12:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","async":true}] -13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true}] +12:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/94f7208f5087e27c.js","async":true}] +13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","async":true}] 14:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}] 15:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true}] -16:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js","async":true}] +16:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/5da3aa6d4034aceb.js","async":true}] 17:["$","$L18",null,{"children":["$","$19",null,{"name":"Next.MetadataOutlet","children":"$@1a"}]}] 1a:null diff --git a/litellm/proxy/_experimental/out/__next._full.txt b/litellm/proxy/_experimental/out/__next._full.txt index ce6e57a795..1e2df6be8a 100644 --- a/litellm/proxy/_experimental/out/__next._full.txt +++ b/litellm/proxy/_experimental/out/__next._full.txt @@ -4,52 +4,52 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js"],"default"] +7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","/litellm-asset-prefix/_next/static/chunks/e9906ef85805c46e.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/907d812b2431487b.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3e917c79aadd945b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/9bbebdeb3f1cb03f.js","/litellm-asset-prefix/_next/static/chunks/8c17e934bd227606.js","/litellm-asset-prefix/_next/static/chunks/0dbc6df9aa2513ad.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/5f2d62a75803a3f7.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/c7110a3f717e0317.js","/litellm-asset-prefix/_next/static/chunks/fb125648f2dae104.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/94f7208f5087e27c.js","/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","/litellm-asset-prefix/_next/static/chunks/5da3aa6d4034aceb.js"],"default"] 2f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c"],"$L2d"]}],{},null,false,false]},null,false,false],"$L2e",false]],"m":"$undefined","G":["$2f",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e9906ef85805c46e.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/907d812b2431487b.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c"],"$L2d"]}],{},null,false,false]},null,false,false],"$L2e",false]],"m":"$undefined","G":["$2f",[]],"S":true} 30:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 31:"$Sreact.suspense" 33:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 35:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","async":true,"nonce":"$undefined"}] +a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}] c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true,"nonce":"$undefined"}] d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true,"nonce":"$undefined"}] -e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","async":true,"nonce":"$undefined"}] +e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","async":true,"nonce":"$undefined"}] f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}] 10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true,"nonce":"$undefined"}] 11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","async":true,"nonce":"$undefined"}] -12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","async":true,"nonce":"$undefined"}] +12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","async":true,"nonce":"$undefined"}] 13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}] 14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","async":true,"nonce":"$undefined"}] 15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] -16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","async":true,"nonce":"$undefined"}] +16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/3e917c79aadd945b.js","async":true,"nonce":"$undefined"}] 17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] 18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","async":true,"nonce":"$undefined"}] 19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] -1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","async":true,"nonce":"$undefined"}] -1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","async":true,"nonce":"$undefined"}] -1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","async":true,"nonce":"$undefined"}] +1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/9bbebdeb3f1cb03f.js","async":true,"nonce":"$undefined"}] +1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/8c17e934bd227606.js","async":true,"nonce":"$undefined"}] +1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbc6df9aa2513ad.js","async":true,"nonce":"$undefined"}] 1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] -1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] +1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/5f2d62a75803a3f7.js","async":true,"nonce":"$undefined"}] 1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}] 20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","async":true,"nonce":"$undefined"}] -21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}] +21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js","async":true,"nonce":"$undefined"}] 22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}] 23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true,"nonce":"$undefined"}] -24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","async":true,"nonce":"$undefined"}] -25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true,"nonce":"$undefined"}] +24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/c7110a3f717e0317.js","async":true,"nonce":"$undefined"}] +25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/fb125648f2dae104.js","async":true,"nonce":"$undefined"}] 26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] 27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] -28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","async":true,"nonce":"$undefined"}] -29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}] +28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/94f7208f5087e27c.js","async":true,"nonce":"$undefined"}] +29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","async":true,"nonce":"$undefined"}] 2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}] 2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true,"nonce":"$undefined"}] -2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js","async":true,"nonce":"$undefined"}] +2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/5da3aa6d4034aceb.js","async":true,"nonce":"$undefined"}] 2d:["$","$L30",null,{"children":["$","$31",null,{"name":"Next.MetadataOutlet","children":"$@32"}]}] 2e:["$","$1","h",{"children":[null,["$","$L33",null,{"children":"$L34"}],["$","div",null,{"hidden":true,"children":["$","$L35",null,{"children":["$","$31",null,{"name":"Next.Metadata","children":"$L36"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:{} diff --git a/litellm/proxy/_experimental/out/__next._head.txt b/litellm/proxy/_experimental/out/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/__next._head.txt +++ b/litellm/proxy/_experimental/out/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/__next._index.txt b/litellm/proxy/_experimental/out/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/__next._index.txt +++ b/litellm/proxy/_experimental/out/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/__next._tree.txt b/litellm/proxy/_experimental/out/__next._tree.txt index 82980a3ec1..aedcfa9406 100644 --- a/litellm/proxy/_experimental/out/__next._tree.txt +++ b/litellm/proxy/_experimental/out/__next._tree.txt @@ -2,4 +2,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/Qm-T2egqyzNalOph06c_b/_buildManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_buildManifest.js rename to litellm/proxy/_experimental/out/_next/static/Qm-T2egqyzNalOph06c_b/_buildManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_clientMiddlewareManifest.json b/litellm/proxy/_experimental/out/_next/static/Qm-T2egqyzNalOph06c_b/_clientMiddlewareManifest.json similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_clientMiddlewareManifest.json rename to litellm/proxy/_experimental/out/_next/static/Qm-T2egqyzNalOph06c_b/_clientMiddlewareManifest.json diff --git a/litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/Qm-T2egqyzNalOph06c_b/_ssgManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/gMHOlKxZQjZlw5mZpwC2b/_ssgManifest.js rename to litellm/proxy/_experimental/out/_next/static/Qm-T2egqyzNalOph06c_b/_ssgManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7fe89dd32bb4f5b6.js b/litellm/proxy/_experimental/out/_next/static/chunks/0377ae18aae60c57.js similarity index 65% rename from litellm/proxy/_experimental/out/_next/static/chunks/7fe89dd32bb4f5b6.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0377ae18aae60c57.js index 514b3dcf3c..66e4d15294 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/7fe89dd32bb4f5b6.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0377ae18aae60c57.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,362133,457202,439061,182399,234779,374615,330995,592143,372943,899268,87316,655900,299023,25652,882293,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ApartmentOutlined",0,r],362133);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-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-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["AuditOutlined",0,n],457202);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"};var d=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:o}))});e.s(["BgColorsOutlined",0,d],439061);let c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"};var m=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:c}))});e.s(["BlockOutlined",0,m],182399);let u={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-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};var g=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:u}))});e.s(["BookOutlined",0,g],234779);let x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var p=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:x}))});e.s(["CreditCardOutlined",0,p],374615);var h=e.i(366845);e.s(["FolderOutlined",()=>h.default],330995);var f=e.i(609587);e.s(["ConfigProvider",()=>f.default],592143);var y=e.i(8211),b=e.i(343794),v=e.i(529681),j=e.i(242064),N=e.i(704914),k=e.i(876556),w=e.i(290224),O=e.i(251224),_=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,s=Object.getOwnPropertySymbols(e);lt.indexOf(s[l])&&Object.prototype.propertyIsEnumerable.call(e,s[l])&&(a[s[l]]=e[s[l]]);return a};function L({suffixCls:e,tagName:t,displayName:s}){return s=>a.forwardRef((l,r)=>a.createElement(s,Object.assign({ref:r,suffixCls:e,tagName:t},l)))}let C=a.forwardRef((e,t)=>{let{prefixCls:s,suffixCls:l,className:r,tagName:i}=e,n=_(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:o}=a.useContext(j.ConfigContext),d=o("layout",s),[c,m,u]=(0,O.default)(d),g=l?`${d}-${l}`:d;return c(a.createElement(i,Object.assign({className:(0,b.default)(s||g,r,m,u),ref:t},n)))}),S=a.forwardRef((e,t)=>{let{direction:s}=a.useContext(j.ConfigContext),[l,r]=a.useState([]),{prefixCls:i,className:n,rootClassName:o,children:d,hasSider:c,tagName:m,style:u}=e,g=_(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),x=(0,v.default)(g,["suffixCls"]),{getPrefixCls:p,className:h,style:f}=(0,j.useComponentConfig)("layout"),L=p("layout",i),C="boolean"==typeof c?c:!!l.length||(0,k.default)(d).some(e=>e.type===w.default),[S,M,H]=(0,O.default)(L),P=(0,b.default)(L,{[`${L}-has-sider`]:C,[`${L}-rtl`]:"rtl"===s},h,n,o,M,H),z=a.useMemo(()=>({siderHook:{addSider:e=>{r(t=>[].concat((0,y.default)(t),[e]))},removeSider:e=>{r(t=>t.filter(t=>t!==e))}}}),[]);return S(a.createElement(N.LayoutContext.Provider,{value:z},a.createElement(m,Object.assign({ref:t,className:P,style:Object.assign(Object.assign({},f),u)},x),d)))}),M=L({tagName:"div",displayName:"Layout"})(S),H=L({suffixCls:"header",tagName:"header",displayName:"Header"})(C),P=L({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(C),z=L({suffixCls:"content",tagName:"main",displayName:"Content"})(C);M.Header=H,M.Footer=P,M.Content=z,M.Sider=w.default,M._InternalSiderContext=w.SiderContext,e.s(["Layout",0,M],372943);var T=e.i(60699);e.s(["Menu",()=>T.default],899268);var R=e.i(475254);let E=(0,R.default)("calendar",[["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"}]]);e.s(["Calendar",()=>E],87316);var U=e.i(399219);e.s(["ChevronUp",()=>U.default],655900);let A=(0,R.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>A],299023);let B=(0,R.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>B],25652);let V=(0,R.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["UserCheck",()=>V],882293)},761911,98740,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>t],98740),e.s(["Users",()=>t],761911)},111672,e=>{"use strict";var t=e.i(247167),a=e.i(843476),s=e.i(109799),l=e.i(785242),r=e.i(135214),i=e.i(218129),n=e.i(362133),o=e.i(477189),d=e.i(457202),c=e.i(299251),m=e.i(153702),u=e.i(439061),g=e.i(182399),x=e.i(234779),p=e.i(374615),h=e.i(210612),f=e.i(19732),y=e.i(872934),b=e.i(993914),v=e.i(330995),j=e.i(438957),N=e.i(777579),k=e.i(788191),w=e.i(983561),O=e.i(602073),_=e.i(928685),L=e.i(313603),C=e.i(232164),S=e.i(645526),M=e.i(366308),H=e.i(771674),P=e.i(592143),z=e.i(372943),T=e.i(899268),R=e.i(271645),E=e.i(708347),U=e.i(844444),A=e.i(371401);e.i(389083);var B=e.i(878894),V=e.i(87316);e.i(664659),e.i(655900);var $=e.i(531278),I=e.i(299023),D=e.i(25652),K=e.i(882293),F=e.i(761911),W=e.i(764205);let G=(...e)=>e.filter(Boolean).join(" ");function q({accessToken:e,width:t=220}){let s=(0,A.useDisableUsageIndicator)(),[l,r]=(0,R.useState)(!1),[i,n]=(0,R.useState)(!1),[o,d]=(0,R.useState)(null),[c,m]=(0,R.useState)(null),[u,g]=(0,R.useState)(!1),[x,p]=(0,R.useState)(null);(0,R.useEffect)(()=>{(async()=>{if(e){g(!0),p(null);try{let[t,a]=await Promise.all([(0,W.getRemainingUsers)(e),(0,W.getLicenseInfo)(e).catch(()=>null)]);d(t),m(a)}catch(e){console.error("Failed to fetch usage data:",e),p("Failed to load usage data")}finally{g(!1)}}})()},[e]);let h=c?.expiration_date?(e=>{if(!e)return null;let t=new Date(e+"T00:00:00Z"),a=new Date;return a.setHours(0,0,0,0),Math.ceil((t.getTime()-a.getTime())/864e5)})(c.expiration_date):null,f=null!==h&&h<0,y=null!==h&&h>=0&&h<30,{isOverLimit:b,isNearLimit:v,usagePercentage:j,userMetrics:N,teamMetrics:k}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let t=e.total_users?e.total_users_used/e.total_users*100:0,a=t>100,s=t>=80&&t<=100,l=e.total_teams?e.total_teams_used/e.total_teams*100:0,r=l>100,i=l>=80&&l<=100,n=a||r;return{isOverLimit:n,isNearLimit:(s||i)&&!n,usagePercentage:Math.max(t,l),userMetrics:{isOverLimit:a,isNearLimit:s,usagePercentage:t},teamMetrics:{isOverLimit:r,isNearLimit:i,usagePercentage:l}}})(o),w=b||v||f||y,O=b||f,_=(v||y)&&!O;return s||!e||o?.total_users===null&&o?.total_teams===null?null:(0,a.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:`${Math.min(t,220)}px`},children:(0,a.jsx)(()=>i?(0,a.jsx)("button",{onClick:()=>n(!1),className:G("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),w&&(0,a.jsx)("span",{className:"flex-shrink-0",children:O?(0,a.jsx)(B.AlertTriangle,{className:"h-3 w-3"}):_?(0,a.jsx)(D.TrendingUp,{className:"h-3 w-3"}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[o&&null!==o.total_users&&(0,a.jsxs)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",o.total_users_used,"/",o.total_users]}),o&&null!==o.total_teams&&(0,a.jsxs)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",o.total_teams_used,"/",o.total_teams]}),c?.expiration_date&&null!==h&&(0,a.jsx)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-700 border-gray-200"),children:h<0?"Exp!":`${h}d`}),!o||null===o.total_users&&null===o.total_teams&&!c&&(0,a.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):u?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,a.jsx)($.Loader2,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):x||!o?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:x||"No data"})}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]})}):(0,a.jsxs)("div",{className:G("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[c?.has_license&&c.expiration_date&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",f&&"border-red-200 bg-red-50",y&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(V.Calendar,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"License"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-600 border-gray-200"),children:f?"Expired":y?"Expiring soon":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Status:"}),(0,a.jsx)("span",{className:G("font-medium text-right",f&&"text-red-600",y&&"text-yellow-600"),children:(e=>{if(null===e)return"No expiration";if(e<0)return"Expired";if(0===e)return"Expires today";if(1===e)return"1 day remaining";if(e<30)return`${e} days remaining`;if(e<60)return"1 month remaining";let t=Math.floor(e/30);return`${t} months remaining`})(h)})]}),c.license_type&&(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Type:"}),(0,a.jsx)("span",{className:"font-medium text-right capitalize",children:c.license_type})]})]}),null!==o.total_users&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(F.Users,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Users"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_users_used,"/",o.total_users]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:G("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:o.total_users_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:G("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(N.usagePercentage,100)}%`}})})]}),null!==o.total_teams&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",k.isOverLimit&&"border-red-200 bg-red-50",k.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(K.UserCheck,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Teams"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:k.isOverLimit?"Over limit":k.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_teams_used,"/",o.total_teams]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:G("font-medium text-right",k.isOverLimit&&"text-red-600",k.isNearLimit&&"text-yellow-600"),children:o.total_teams_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(k.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:G("h-2 rounded-full transition-all duration-300",k.isOverLimit&&"bg-red-500",k.isNearLimit&&"bg-yellow-500",!k.isOverLimit&&!k.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(k.usagePercentage,100)}%`}})})]})]})]}),{})})}let{Sider:Y}=z.Layout,X={"api-reference":"api-reference"},Z=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,a.jsx)(j.KeyOutlined,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,a.jsx)(k.PlayCircleOutlined,{}),roles:E.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:E.rolesWithWriteAccess},{key:"agentic",page:"agentic",label:"Agentic",icon:(0,a.jsx)(w.RobotOutlined,{}),children:[{key:"agents",page:"agents",label:"Agents",icon:(0,a.jsx)(w.RobotOutlined,{}),roles:E.rolesWithWriteAccess},{key:"workflows",page:"workflows",label:"Workflow Runs",icon:(0,a.jsx)(n.ApartmentOutlined,{})},{key:"memory",page:"memory",label:"Memory",icon:(0,a.jsx)(x.BookOutlined,{})}]},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,a.jsx)(M.ToolOutlined,{})},{key:"skills",page:"skills",label:"Skills",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:E.all_admin_roles},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,a.jsx)(O.SafetyOutlined,{})},{key:"policies",page:"policies",label:(0,a.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,a.jsx)(d.AuditOutlined,{}),roles:E.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,a.jsx)(M.ToolOutlined,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,a.jsx)(_.SearchOutlined,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,a.jsx)(h.DatabaseOutlined,{})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,a.jsx)(O.SafetyOutlined,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,a.jsx)(m.BarChartOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles],label:"Usage"},{key:"logs",page:"logs",label:"Logs",icon:(0,a.jsx)(N.LineChartOutlined,{})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,a.jsx)(O.SafetyOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,a.jsx)(S.TeamOutlined,{})},{key:"projects",page:"projects",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,a.jsx)(U.default,{})]}),icon:(0,a.jsx)(v.FolderOutlined,{}),roles:E.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,a.jsx)(H.UserOutlined,{}),roles:E.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,a.jsx)(c.BankOutlined,{}),roles:E.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:E.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,a.jsx)(p.CreditCardOutlined,{}),roles:E.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api-reference",page:"api-reference",label:"API Reference",icon:(0,a.jsx)(i.ApiOutlined,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,a.jsx)(o.AppstoreOutlined,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,a.jsx)(x.BookOutlined,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,a.jsx)(f.ExperimentOutlined,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,a.jsx)(h.DatabaseOutlined,{}),roles:E.all_admin_roles},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,a.jsx)(b.FileTextOutlined,{}),roles:E.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,a.jsx)(C.TagsOutlined,{}),roles:E.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,a.jsx)(m.BarChartOutlined,{})}]}]},{groupLabel:"SETTINGS",roles:E.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,a.jsx)(U.default,{})]}),icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings ",(0,a.jsx)(U.default,{dot:!0,children:(0,a.jsx)("span",{})})]}),icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,a.jsx)(m.BarChartOutlined,{}),roles:E.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,a.jsx)(u.BgColorsOutlined,{}),roles:E.all_admin_roles}]}]}];e.s(["default",0,({setPage:e,defaultSelectedKey:i,collapsed:n=!1,enabledPagesInternalUsers:o,enableProjectsUI:d,disableAgentsForInternalUsers:c,allowAgentsForTeamAdmins:m,disableVectorStoresForInternalUsers:u,allowVectorStoresForTeamAdmins:g})=>{let x,{userId:p,accessToken:h,userRole:f}=(0,r.default)(),{data:b}=(0,s.useOrganizations)(),{data:v}=(0,l.useTeams)(),j=(0,R.useMemo)(()=>!!p&&!!b&&b.some(e=>e.members?.some(e=>e.user_id===p&&"org_admin"===e.user_role)),[p,b]),N=(0,R.useMemo)(()=>(0,E.isUserTeamAdminForAnyTeam)(v??null,p??""),[v,p]),k=t=>{if(X[t])return void e(t);let a=new URLSearchParams(window.location.search);a.set("page",t),window.history.pushState(null,"",`?${a.toString()}`),e(t)},w=(e,s,l)=>{let r;if(l)return(0,a.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{color:"inherit",textDecoration:"none"},children:[e," ",(0,a.jsx)(y.ExportOutlined,{style:{fontSize:10,marginLeft:4}})]});let i=X[s],n=i?function(e){let a=(t.default.env.NEXT_PUBLIC_BASE_URL??"").replace(/^\/+|\/+$/g,""),s=a?`/${a}/`:"/";if(W.serverRootPath&&"/"!==W.serverRootPath){let e=W.serverRootPath.replace(/\/+$/,""),t=s.replace(/^\/+/,"");s=`${e}/${t}`}return`${s}${e}`}(i):((r=new URLSearchParams(window.location.search)).set("page",s),`?${r.toString()}`);return(0,a.jsx)("a",{href:n,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button?e.stopPropagation():e.preventDefault()},style:{color:"inherit",textDecoration:"none"},children:e})},O=e=>{let t=(0,E.isAdminRole)(f);return null!=o&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:f,isAdmin:t,enabledPagesInternalUsers:o}),e.map(e=>({...e,children:e.children?O(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key){if(!(!e.roles||e.roles.includes(f)||j))return!1;if(!t&&null!=o){let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0}if("projects"===e.key&&!d||!t&&"agents"===e.key&&c&&!(m&&N)||!t&&"vector-stores"===e.key&&u&&!(g&&N)||e.roles&&!e.roles.includes(f))return!1;if(!t&&null!=o){if(e.children&&e.children.length>0&&e.children.some(e=>o.includes(e.page)))return console.log(`[LeftNav] Parent "${e.page}" (${e.key}): VISIBLE (has visible children)`),!0;let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0})},_=(e=>{for(let t of Z)for(let a of t.items){if(a.page===e)return a.key;if(a.children){let t=a.children.find(t=>t.page===e);if(t)return t.key}}return"api-keys"})(i);return(0,a.jsx)(z.Layout,{children:(0,a.jsxs)(Y,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,a.jsx)(P.ConfigProvider,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,a.jsx)(T.Menu,{mode:"inline",selectedKeys:[_],defaultOpenKeys:[],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(x=[],Z.forEach(e=>{if(e.roles&&!e.roles.includes(f))return;let t=O(e.items);0!==t.length&&x.push({type:"group",label:n?null:(0,a.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:e.groupLabel}),children:t.map(e=>({key:e.key,icon:e.icon,label:w(e.label,e.page,e.external_url),children:e.children?.map(e=>({key:e.key,icon:e.icon,label:w(e.label,e.page,e.external_url),onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):k(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):k(e.page)}}))})}),x)})}),(0,E.isAdminRole)(f)&&!n&&(0,a.jsx)(q,{accessToken:h,width:220})]})})},"menuGroups",()=>Z],111672)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,362133,457202,439061,182399,234779,374615,330995,592143,372943,899268,87316,655900,299023,25652,882293,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ApartmentOutlined",0,r],362133);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-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-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["AuditOutlined",0,n],457202);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"};var d=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:o}))});e.s(["BgColorsOutlined",0,d],439061);let c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"};var m=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:c}))});e.s(["BlockOutlined",0,m],182399);let u={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-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};var g=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:u}))});e.s(["BookOutlined",0,g],234779);let x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var p=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:x}))});e.s(["CreditCardOutlined",0,p],374615);var h=e.i(366845);e.s(["FolderOutlined",()=>h.default],330995);var f=e.i(609587);e.s(["ConfigProvider",()=>f.default],592143);var y=e.i(8211),b=e.i(343794),v=e.i(529681),j=e.i(242064),N=e.i(704914),k=e.i(876556),w=e.i(290224),O=e.i(251224),_=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,s=Object.getOwnPropertySymbols(e);lt.indexOf(s[l])&&Object.prototype.propertyIsEnumerable.call(e,s[l])&&(a[s[l]]=e[s[l]]);return a};function L({suffixCls:e,tagName:t,displayName:s}){return s=>a.forwardRef((l,r)=>a.createElement(s,Object.assign({ref:r,suffixCls:e,tagName:t},l)))}let C=a.forwardRef((e,t)=>{let{prefixCls:s,suffixCls:l,className:r,tagName:i}=e,n=_(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:o}=a.useContext(j.ConfigContext),d=o("layout",s),[c,m,u]=(0,O.default)(d),g=l?`${d}-${l}`:d;return c(a.createElement(i,Object.assign({className:(0,b.default)(s||g,r,m,u),ref:t},n)))}),S=a.forwardRef((e,t)=>{let{direction:s}=a.useContext(j.ConfigContext),[l,r]=a.useState([]),{prefixCls:i,className:n,rootClassName:o,children:d,hasSider:c,tagName:m,style:u}=e,g=_(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),x=(0,v.default)(g,["suffixCls"]),{getPrefixCls:p,className:h,style:f}=(0,j.useComponentConfig)("layout"),L=p("layout",i),C="boolean"==typeof c?c:!!l.length||(0,k.default)(d).some(e=>e.type===w.default),[S,M,P]=(0,O.default)(L),H=(0,b.default)(L,{[`${L}-has-sider`]:C,[`${L}-rtl`]:"rtl"===s},h,n,o,M,P),z=a.useMemo(()=>({siderHook:{addSider:e=>{r(t=>[].concat((0,y.default)(t),[e]))},removeSider:e=>{r(t=>t.filter(t=>t!==e))}}}),[]);return S(a.createElement(N.LayoutContext.Provider,{value:z},a.createElement(m,Object.assign({ref:t,className:H,style:Object.assign(Object.assign({},f),u)},x),d)))}),M=L({tagName:"div",displayName:"Layout"})(S),P=L({suffixCls:"header",tagName:"header",displayName:"Header"})(C),H=L({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(C),z=L({suffixCls:"content",tagName:"main",displayName:"Content"})(C);M.Header=P,M.Footer=H,M.Content=z,M.Sider=w.default,M._InternalSiderContext=w.SiderContext,e.s(["Layout",0,M],372943);var T=e.i(60699);e.s(["Menu",()=>T.default],899268);var R=e.i(475254);let E=(0,R.default)("calendar",[["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"}]]);e.s(["Calendar",()=>E],87316);var U=e.i(399219);e.s(["ChevronUp",()=>U.default],655900);let V=(0,R.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>V],299023);let A=(0,R.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>A],25652);let B=(0,R.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["UserCheck",()=>B],882293)},761911,98740,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>t],98740),e.s(["Users",()=>t],761911)},111672,e=>{"use strict";var t=e.i(247167),a=e.i(843476),s=e.i(109799),l=e.i(785242),r=e.i(135214),i=e.i(218129),n=e.i(362133),o=e.i(477189),d=e.i(457202),c=e.i(299251),m=e.i(153702),u=e.i(439061),g=e.i(182399),x=e.i(234779),p=e.i(374615),h=e.i(210612),f=e.i(19732),y=e.i(872934),b=e.i(993914),v=e.i(330995),j=e.i(438957),N=e.i(777579),k=e.i(788191),w=e.i(983561),O=e.i(602073),_=e.i(928685),L=e.i(313603),C=e.i(232164),S=e.i(645526),M=e.i(366308),P=e.i(771674),H=e.i(592143),z=e.i(372943),T=e.i(899268),R=e.i(271645),E=e.i(708347),U=e.i(844444),V=e.i(371401);e.i(389083);var A=e.i(878894),B=e.i(87316);e.i(664659),e.i(655900);var $=e.i(531278),I=e.i(299023),D=e.i(25652),K=e.i(882293),F=e.i(761911),W=e.i(764205);let G=(...e)=>e.filter(Boolean).join(" ");function q({accessToken:e,width:t=220}){let s=(0,V.useDisableUsageIndicator)(),[l,r]=(0,R.useState)(!1),[i,n]=(0,R.useState)(!1),[o,d]=(0,R.useState)(null),[c,m]=(0,R.useState)(null),[u,g]=(0,R.useState)(!1),[x,p]=(0,R.useState)(null);(0,R.useEffect)(()=>{(async()=>{if(e){g(!0),p(null);try{let[t,a]=await Promise.all([(0,W.getRemainingUsers)(e),(0,W.getLicenseInfo)(e).catch(()=>null)]);d(t),m(a)}catch(e){console.error("Failed to fetch usage data:",e),p("Failed to load usage data")}finally{g(!1)}}})()},[e]);let h=c?.expiration_date?(e=>{if(!e)return null;let t=new Date(e+"T00:00:00Z"),a=new Date;return a.setHours(0,0,0,0),Math.ceil((t.getTime()-a.getTime())/864e5)})(c.expiration_date):null,f=null!==h&&h<0,y=null!==h&&h>=0&&h<30,{isOverLimit:b,isNearLimit:v,usagePercentage:j,userMetrics:N,teamMetrics:k}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let t=e.total_users?e.total_users_used/e.total_users*100:0,a=t>100,s=t>=80&&t<=100,l=e.total_teams?e.total_teams_used/e.total_teams*100:0,r=l>100,i=l>=80&&l<=100,n=a||r;return{isOverLimit:n,isNearLimit:(s||i)&&!n,usagePercentage:Math.max(t,l),userMetrics:{isOverLimit:a,isNearLimit:s,usagePercentage:t},teamMetrics:{isOverLimit:r,isNearLimit:i,usagePercentage:l}}})(o),w=b||v||f||y,O=b||f,_=(v||y)&&!O;return s||!e||o?.total_users===null&&o?.total_teams===null?null:(0,a.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:`${Math.min(t,220)}px`},children:(0,a.jsx)(()=>i?(0,a.jsx)("button",{onClick:()=>n(!1),className:G("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),w&&(0,a.jsx)("span",{className:"flex-shrink-0",children:O?(0,a.jsx)(A.AlertTriangle,{className:"h-3 w-3"}):_?(0,a.jsx)(D.TrendingUp,{className:"h-3 w-3"}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[o&&null!==o.total_users&&(0,a.jsxs)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",o.total_users_used,"/",o.total_users]}),o&&null!==o.total_teams&&(0,a.jsxs)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",o.total_teams_used,"/",o.total_teams]}),c?.expiration_date&&null!==h&&(0,a.jsx)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-700 border-gray-200"),children:h<0?"Exp!":`${h}d`}),!o||null===o.total_users&&null===o.total_teams&&!c&&(0,a.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):u?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,a.jsx)($.Loader2,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):x||!o?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:x||"No data"})}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]})}):(0,a.jsxs)("div",{className:G("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[c?.has_license&&c.expiration_date&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",f&&"border-red-200 bg-red-50",y&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(B.Calendar,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"License"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-600 border-gray-200"),children:f?"Expired":y?"Expiring soon":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Status:"}),(0,a.jsx)("span",{className:G("font-medium text-right",f&&"text-red-600",y&&"text-yellow-600"),children:(e=>{if(null===e)return"No expiration";if(e<0)return"Expired";if(0===e)return"Expires today";if(1===e)return"1 day remaining";if(e<30)return`${e} days remaining`;if(e<60)return"1 month remaining";let t=Math.floor(e/30);return`${t} months remaining`})(h)})]}),c.license_type&&(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Type:"}),(0,a.jsx)("span",{className:"font-medium text-right capitalize",children:c.license_type})]})]}),null!==o.total_users&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(F.Users,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Users"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_users_used,"/",o.total_users]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:G("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:o.total_users_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:G("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(N.usagePercentage,100)}%`}})})]}),null!==o.total_teams&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",k.isOverLimit&&"border-red-200 bg-red-50",k.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(K.UserCheck,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Teams"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:k.isOverLimit?"Over limit":k.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_teams_used,"/",o.total_teams]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:G("font-medium text-right",k.isOverLimit&&"text-red-600",k.isNearLimit&&"text-yellow-600"),children:o.total_teams_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(k.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:G("h-2 rounded-full transition-all duration-300",k.isOverLimit&&"bg-red-500",k.isNearLimit&&"bg-yellow-500",!k.isOverLimit&&!k.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(k.usagePercentage,100)}%`}})})]})]})]}),{})})}let{Sider:Y}=z.Layout,X={"api-reference":"api-reference"},Z=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,a.jsx)(j.KeyOutlined,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,a.jsx)(k.PlayCircleOutlined,{}),roles:E.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:E.rolesAllowedToViewWriteScopedPages},{key:"agentic",page:"agentic",label:"Agentic",icon:(0,a.jsx)(w.RobotOutlined,{}),children:[{key:"agents",page:"agents",label:"Agents",icon:(0,a.jsx)(w.RobotOutlined,{}),roles:E.rolesAllowedToViewWriteScopedPages},{key:"workflows",page:"workflows",label:"Workflow Runs",icon:(0,a.jsx)(n.ApartmentOutlined,{})},{key:"memory",page:"memory",label:"Memory",icon:(0,a.jsx)(x.BookOutlined,{})}]},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,a.jsx)(M.ToolOutlined,{})},{key:"skills",page:"skills",label:"Skills",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:E.all_admin_roles},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,a.jsx)(O.SafetyOutlined,{})},{key:"policies",page:"policies",label:(0,a.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,a.jsx)(d.AuditOutlined,{}),roles:E.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,a.jsx)(M.ToolOutlined,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,a.jsx)(_.SearchOutlined,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,a.jsx)(h.DatabaseOutlined,{})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,a.jsx)(O.SafetyOutlined,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,a.jsx)(m.BarChartOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles],label:"Usage"},{key:"logs",page:"logs",label:"Logs",icon:(0,a.jsx)(N.LineChartOutlined,{})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,a.jsx)(O.SafetyOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,a.jsx)(S.TeamOutlined,{})},{key:"projects",page:"projects",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,a.jsx)(U.default,{})]}),icon:(0,a.jsx)(v.FolderOutlined,{}),roles:E.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,a.jsx)(P.UserOutlined,{}),roles:E.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,a.jsx)(c.BankOutlined,{}),roles:E.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:E.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,a.jsx)(p.CreditCardOutlined,{}),roles:E.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api-reference",page:"api-reference",label:"API Reference",icon:(0,a.jsx)(i.ApiOutlined,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,a.jsx)(o.AppstoreOutlined,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,a.jsx)(x.BookOutlined,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,a.jsx)(f.ExperimentOutlined,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,a.jsx)(h.DatabaseOutlined,{}),roles:E.all_admin_roles},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,a.jsx)(b.FileTextOutlined,{}),roles:E.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:[...E.all_admin_roles,...E.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,a.jsx)(C.TagsOutlined,{}),roles:E.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,a.jsx)(m.BarChartOutlined,{})}]}]},{groupLabel:"SETTINGS",roles:E.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,a.jsx)(U.default,{})]}),icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings ",(0,a.jsx)(U.default,{dot:!0,children:(0,a.jsx)("span",{})})]}),icon:(0,a.jsx)(L.SettingOutlined,{}),roles:E.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,a.jsx)(m.BarChartOutlined,{}),roles:E.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,a.jsx)(u.BgColorsOutlined,{}),roles:E.all_admin_roles}]}]}];e.s(["default",0,({setPage:e,defaultSelectedKey:i,collapsed:n=!1,enabledPagesInternalUsers:o,enableProjectsUI:d,disableAgentsForInternalUsers:c,allowAgentsForTeamAdmins:m,disableVectorStoresForInternalUsers:u,allowVectorStoresForTeamAdmins:g})=>{let x,{userId:p,accessToken:h,userRole:f}=(0,r.default)(),{data:b}=(0,s.useOrganizations)(),{data:v}=(0,l.useTeams)(),j=(0,R.useMemo)(()=>!!p&&!!b&&b.some(e=>e.members?.some(e=>e.user_id===p&&"org_admin"===e.user_role)),[p,b]),N=(0,R.useMemo)(()=>(0,E.isUserTeamAdminForAnyTeam)(v??null,p??""),[v,p]),k=t=>{if(X[t])return void e(t);let a=new URLSearchParams(window.location.search);a.set("page",t),window.history.pushState(null,"",`?${a.toString()}`),e(t)},w=(e,s,l)=>{let r;if(l)return(0,a.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{color:"inherit",textDecoration:"none"},children:[e," ",(0,a.jsx)(y.ExportOutlined,{style:{fontSize:10,marginLeft:4}})]});let i=X[s],n=i?function(e){let a=(t.default.env.NEXT_PUBLIC_BASE_URL??"").replace(/^\/+|\/+$/g,""),s=a?`/${a}/`:"/";if(W.serverRootPath&&"/"!==W.serverRootPath){let e=W.serverRootPath.replace(/\/+$/,""),t=s.replace(/^\/+/,"");s=`${e}/${t}`}return`${s}${e}`}(i):((r=new URLSearchParams(window.location.search)).set("page",s),`?${r.toString()}`);return(0,a.jsx)("a",{href:n,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button?e.stopPropagation():e.preventDefault()},style:{color:"inherit",textDecoration:"none"},children:e})},O=e=>{let t=(0,E.isAdminRole)(f);return null!=o&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:f,isAdmin:t,enabledPagesInternalUsers:o}),e.map(e=>({...e,children:e.children?O(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key){if(!(!e.roles||e.roles.includes(f)||j))return!1;if(!t&&null!=o){let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0}if("projects"===e.key&&!d||!t&&"agents"===e.key&&c&&!(m&&N)||!t&&"vector-stores"===e.key&&u&&!(g&&N)||e.roles&&!e.roles.includes(f))return!1;if(!t&&null!=o){if(e.children&&e.children.length>0&&e.children.some(e=>o.includes(e.page)))return console.log(`[LeftNav] Parent "${e.page}" (${e.key}): VISIBLE (has visible children)`),!0;let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0})},_=(e=>{for(let t of Z)for(let a of t.items){if(a.page===e)return a.key;if(a.children){let t=a.children.find(t=>t.page===e);if(t)return t.key}}return"api-keys"})(i);return(0,a.jsx)(z.Layout,{children:(0,a.jsxs)(Y,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,a.jsx)(H.ConfigProvider,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,a.jsx)(T.Menu,{mode:"inline",selectedKeys:[_],defaultOpenKeys:[],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(x=[],Z.forEach(e=>{if(e.roles&&!e.roles.includes(f))return;let t=O(e.items);0!==t.length&&x.push({type:"group",label:n?null:(0,a.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:e.groupLabel}),children:t.map(e=>({key:e.key,icon:e.icon,label:w(e.label,e.page,e.external_url),children:e.children?.map(e=>({key:e.key,icon:e.icon,label:w(e.label,e.page,e.external_url),onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):k(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):k(e.page)}}))})}),x)})}),(0,E.isAdminRole)(f)&&!n&&(0,a.jsx)(q,{accessToken:h,width:220})]})})},"menuGroups",()=>Z],111672)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/038e83c8eab81a79.js b/litellm/proxy/_experimental/out/_next/static/chunks/038e83c8eab81a79.js deleted file mode 100644 index a0f95ffb2b..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/038e83c8eab81a79.js +++ /dev/null @@ -1,84 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:T}=n.Select,P=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(T,{value:"BLOCK",children:"Block"}),(0,l.jsx)(T,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,T]=m.default.useState(""),[P,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void T(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}T(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),T("")}).finally(()=>{L(!1)})}else T(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),T(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),P?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:H,Text:q}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(q,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(q,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:T,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,H]=(0,m.useState)(!1),[q,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[Z,X]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>H(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(P,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:T,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:q,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!q)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===q);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:q,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:Z,patternRegex:ee,patternAction:ea,onNameChange:X,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{Z&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:Z,pattern:ee,action:ea}),H(!1),X(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{H(!1),X(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var Z=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let X={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),X=t,t},et=()=>Object.keys(X).length>0?X:Z,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",()=>em,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",()=>ec],180766);var eu=e.i(435451);let{Title:ep}=d.Typography,eg=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eu.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ex=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ep,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eg,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var eh=e.i(482725),ef=e.i(850627);let ey=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(eh.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ef.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var ej=e.i(592968),e_=e.i(750113);let eb=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(ej.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(ej.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(ej.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(ej.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(ej.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var ev=e.i(536916),ew=e.i(149192),eN=e.i(741585),eN=eN,eC=e.i(724154);e.i(247167);var eS=e.i(931067);let ek={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eI=e.i(9583),eA=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:ek}))});let{Text:eO}=d.Typography,{Option:eT}=n.Select,eP=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eA,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eO,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eT,{value:e.category,children:e.category},e.category))})]}),eL=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eO,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(ej.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(ew.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eN.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(eC.StopOutlined,{}),children:"Select All & Block"})]})]}),eB=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eO,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eO,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(ev.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eO,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eT,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eN.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(eC.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eF,Text:e$}=d.Typography,eE=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eF,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(e$,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eP,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eL,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(eB,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eM=e.i(304967),eR=e.i(599724),eG=e.i(312361),ez=e.i(21548),eD=e.i(827252);let eK={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eH=({value:e,onChange:t,disabled:a=!1})=>{let r={...eK,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(eR.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eG.Divider,{}),0===r.rules.length?(0,l.jsx)(ez.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eM.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(eR.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eG.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(eR.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(ej.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eq,Text:eJ,Link:eU}=d.Typography,{Option:eW}=n.Select,eV={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,T]=(0,m.useState)([]),[P,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[H,q]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,Z]=(0,m.useState)(void 0),[X,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,ep]=(0,m.useState)(!1),[eg,eh]=(0,m.useState)([]),[ef,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),e_=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),q(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},ew=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eN=(e,t)=>{C(a=>({...a,[e]:t}))},eC=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},eS=()=>{x.resetFields(),j(null),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),Z(void 0),en("warn"),ec(""),ep(!1),k(0)},ek=()=>{eS(),t()},eI=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);if(void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=H&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),H&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ef.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ef.rules,r.litellm_params.default_action=ef.default_action,r.litellm_params.on_disallowed_action=ef.on_disallowed_action,ef.violation_message_template&&(r.litellm_params.violation_message_template=ef.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),X&&"realtime"===W&&(r.litellm_params.on_violation=X),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),eS(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eA=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:H,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{q(e),U(t)}}):null},eO=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:ek,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:ek,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit"},children:eO.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eW,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eW,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eW,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.pre_call})]})}),(0,l.jsx)(eW,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.during_call})]})}),(0,l.jsx)(eW,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.post_call})]})}),(0,l.jsx)(eW,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!e_&&!ei(y)&&!es(y)&&(0,l.jsx)(ey,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:ew,onActionSelect:eN,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eA("categories");if(es(y))return(0,l.jsx)(eb,{availableModels:eg,form:x});if(!y)return null;if(e_)return(0,l.jsx)(eH,{value:ef,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eA("patterns");return null;case 3:if(ei(y))return eA("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),ep(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>ep(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>Z(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:X===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:ek,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):s=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let n={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:s}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(n));let m=`/guardrails/${d}`,g=await fetch(m,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(n)});if(!g.ok){let e=await g.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tt.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(tr,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(tr,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tr,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(tr,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(tr,{value:"inherit",children:"Use global default"}),(0,l.jsx)(tr,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(tr,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "api_key": "your_aporia_api_key", - "project_name": "your_project_name" -}`})});case"AimSecurity":return(0,l.jsx)(r.Form.Item,{label:"Aim Security Configuration",name:"config",tooltip:"JSON configuration for Aim Security",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "api_key": "your_aim_api_key" -}`})});case"Bedrock":return(0,l.jsx)(r.Form.Item,{label:"Amazon Bedrock Configuration",name:"config",tooltip:"JSON configuration for Amazon Bedrock guardrails",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "guardrail_id": "your_guardrail_id", - "guardrail_version": "your_guardrail_version" -}`})});case"GuardrailsAI":return(0,l.jsx)(r.Form.Item,{label:"Guardrails.ai Configuration",name:"config",tooltip:"JSON configuration for Guardrails.ai",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "api_key": "your_guardrails_api_key", - "guardrail_id": "your_guardrail_id" -}`})});case"LakeraAI":return(0,l.jsx)(r.Form.Item,{label:"Lakera AI Configuration",name:"config",tooltip:"JSON configuration for Lakera AI",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "api_key": "your_lakera_api_key" -}`})});case"PromptInjection":return(0,l.jsx)(r.Form.Item,{label:"Prompt Injection Configuration",name:"config",tooltip:"JSON configuration for prompt injection detection",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "threshold": 0.8 -}`})});default:return(0,l.jsx)(r.Form.Item,{label:"Custom Configuration",name:"config",tooltip:"JSON configuration for your custom guardrail",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "key1": "value1", - "key2": "value2" -}`})})}})(),(0,l.jsxs)("div",{className:"flex justify-end space-x-2 mt-4",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:I,loading:h,children:"Update Guardrail"})]})]})})};var ts=((a={}).DB="db",a.CONFIG="config",a);e.s(["default",0,({guardrailsList:e,isLoading:t,onDeleteClick:a,accessToken:r,onGuardrailUpdated:i,isAdmin:s=!1,onGuardrailClick:n})=>{let[o,d]=(0,m.useState)([{id:"created_at",desc:!0}]),[c,u]=(0,m.useState)(!1),[p,g]=(0,m.useState)(null),x=e=>e?new Date(e).toLocaleString():"-",h=[{header:"Guardrail ID",accessorKey:"guardrail_id",cell:e=>(0,l.jsx)(ej.Tooltip,{title:String(e.getValue()||""),children:(0,l.jsx)(e4.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>e.getValue()&&n(e.getValue()),children:e.getValue()?`${String(e.getValue()).slice(0,7)}...`:""})})},{header:"Name",accessorKey:"guardrail_name",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.guardrail_name,children:(0,l.jsx)("span",{className:"text-xs font-medium",children:t.guardrail_name||"-"})})}},{header:"Provider",accessorKey:"litellm_params.guardrail",cell:({row:e})=>{let{logo:t,displayName:a}=ed(e.original.litellm_params.guardrail);return(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,l.jsx)("img",{src:t,alt:`${a} logo`,className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)("span",{className:"text-xs",children:a})]})}},{header:"Mode",accessorKey:"litellm_params.mode",cell:({row:e})=>{let t=e.original;return(0,l.jsx)("span",{className:"text-xs",children:t.litellm_params.mode})}},{header:"Default On",accessorKey:"litellm_params.default_on",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(e7.Badge,{color:t.litellm_params?.default_on?"green":"gray",className:"text-xs font-normal",size:"xs",children:t.litellm_params?.default_on?"Default On":"Default Off"})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.created_at,children:(0,l.jsx)("span",{className:"text-xs",children:x(t.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.updated_at,children:(0,l.jsx)("span",{className:"text-xs",children:x(t.updated_at)})})}},{id:"actions",header:"Actions",cell:({row:e})=>{let t=e.original,r=t.guardrail_definition_location===ts.CONFIG;return(0,l.jsx)("div",{className:"flex space-x-2",children:r?(0,l.jsx)(ej.Tooltip,{title:"Config guardrail cannot be deleted on the dashboard. Please delete it from the config file.",children:(0,l.jsx)(e2.Icon,{"data-testid":"config-delete-icon",icon:e5.TrashIcon,size:"sm",className:"cursor-not-allowed text-gray-400",title:"Config guardrail cannot be deleted on the dashboard. Please delete it from the config file.","aria-label":"Delete guardrail (config)"})}):(0,l.jsx)(ej.Tooltip,{title:"Delete guardrail",children:(0,l.jsx)(e2.Icon,{icon:e5.TrashIcon,size:"sm",onClick:()=>t.guardrail_id&&a(t.guardrail_id,t.guardrail_name||"Unnamed Guardrail"),className:"cursor-pointer hover:text-red-500"})})})}}],f=(0,e9.useReactTable)({data:e,columns:h,state:{sorting:o},onSortingChange:d,getCoreRowModel:(0,te.getCoreRowModel)(),getSortedRowModel:(0,te.getSortedRowModel)(),enableSorting:!0});return(0,l.jsxs)("div",{className:"rounded-lg custom-border relative",children:[(0,l.jsx)("div",{className:"overflow-x-auto",children:(0,l.jsxs)(eY.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,l.jsx)(eX.TableHead,{children:f.getHeaderGroups().map(e=>(0,l.jsx)(e1.TableRow,{children:e.headers.map(e=>(0,l.jsx)(e0.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,l.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,e9.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,l.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,l.jsx)(e8.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,l.jsx)(e3.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,l.jsx)(e6.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,l.jsx)(eQ.TableBody,{children:t?(0,l.jsx)(e1.TableRow,{children:(0,l.jsx)(eZ.TableCell,{colSpan:h.length,className:"h-8 text-center",children:(0,l.jsx)("div",{className:"text-center text-gray-500",children:(0,l.jsx)("p",{children:"Loading..."})})})}):e.length>0?f.getRowModel().rows.map(e=>(0,l.jsx)(e1.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,l.jsx)(eZ.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,e9.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,l.jsx)(e1.TableRow,{children:(0,l.jsx)(eZ.TableCell,{colSpan:h.length,className:"h-8 text-center",children:(0,l.jsx)("div",{className:"text-center text-gray-500",children:(0,l.jsx)("p",{children:"No guardrails found"})})})})})]})}),p&&(0,l.jsx)(ti,{visible:c,onClose:()=>u(!1),accessToken:r,onSuccess:()=>{u(!1),g(null),i()},guardrailId:p.guardrail_id||"",fullLitellmParams:p.litellm_params,initialValues:{guardrail_name:p.guardrail_name||"",provider:Object.keys(ea).find(e=>ea[e]===p?.litellm_params.guardrail)||"",mode:p.litellm_params.mode,default_on:p.litellm_params.default_on,pii_entities_config:p.litellm_params.pii_entities_config,skip_system_message_choice:ec(p.litellm_params?.skip_system_message_in_guardrail),...p.guardrail_info}})]})}],782719);var tn=e.i(500330),to=e.i(245094),eN=eN,td=e.i(530212),tc=e.i(350967),tm=e.i(197647),tu=e.i(653824),tp=e.i(881073),tg=e.i(404206),tx=e.i(723731),th=e.i(629569),tf=e.i(678784),ty=e.i(118366),tj=e.i(560445);let{Text:t_}=d.Typography,{Option:tb}=n.Select,tv=({categories:e,onActionChange:t,onSeverityChange:a,onRemove:r,readOnly:i=!1})=>{let s=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(e,t)=>(0,l.jsxs)("div",{children:[(0,l.jsx)(t_,{strong:!0,children:e}),e!==t.category&&(0,l.jsx)("div",{children:(0,l.jsx)(t_,{type:"secondary",style:{fontSize:12},children:t.category})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>i?(0,l.jsx)(o.Tag,{color:{high:"red",medium:"orange",low:"yellow"}[e],children:e.toUpperCase()}):(0,l.jsxs)(n.Select,{value:e,onChange:e=>a?.(t.id,e),style:{width:150},size:"small",children:[(0,l.jsx)(tb,{value:"high",children:"High"}),(0,l.jsx)(tb,{value:"medium",children:"Medium"}),(0,l.jsx)(tb,{value:"low",children:"Low"})]})},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>i?(0,l.jsx)(o.Tag,{color:"BLOCK"===e?"red":"blue",children:e}):(0,l.jsxs)(n.Select,{value:e,onChange:e=>t?.(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(tb,{value:"BLOCK",children:"Block"}),(0,l.jsx)(tb,{value:"MASK",children:"Mask"})]})}];return(i||s.push({title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r?.(t.id),children:"Delete"})}),0===e.length)?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No categories configured."}):(0,l.jsx)(I.Table,{dataSource:e,columns:s,rowKey:"id",pagination:!1,size:"small"})},tw=({patterns:e,blockedWords:t,categories:a=[],readOnly:r=!0,onPatternActionChange:i,onPatternRemove:s,onBlockedWordUpdate:n,onBlockedWordRemove:o,onCategoryActionChange:d,onCategorySeverityChange:c,onCategoryRemove:m})=>{if(0===e.length&&0===t.length&&0===a.length)return null;let u=()=>{};return(0,l.jsxs)(l.Fragment,{children:[a.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Content Categories"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[a.length," categories configured"]})]}),(0,l.jsx)(tv,{categories:a,onActionChange:r?void 0:d,onSeverityChange:r?void 0:c,onRemove:r?void 0:m,readOnly:r})]}),e.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Pattern Detection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[e.length," patterns configured"]})]}),(0,l.jsx)(P,{patterns:e,onActionChange:r?u:i||u,onRemove:r?u:s||u})]}),t.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Blocked Keywords"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[t.length," keywords configured"]})]}),(0,l.jsx)(F,{keywords:t,onActionChange:r?u:n||u,onRemove:r?u:o||u})]})]})},{Text:tN}=d.Typography,tC=({guardrailData:e,guardrailSettings:t,isEditing:a,accessToken:r,onDataChange:i,onUnsavedChanges:s})=>{let[n,o]=(0,m.useState)([]),[d,c]=(0,m.useState)([]),[u,p]=(0,m.useState)([]),[g,x]=(0,m.useState)([]),[h,f]=(0,m.useState)([]),[y,j]=(0,m.useState)([]),[_,b]=(0,m.useState)(!1),[v,w]=(0,m.useState)(null),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(null);(0,m.useEffect)(()=>{if(e?.litellm_params?.patterns){let t=e.litellm_params.patterns.map((e,t)=>({id:`pattern-${t}`,type:"prebuilt"===e.pattern_type?"prebuilt":"custom",name:e.pattern_name||e.name,display_name:e.display_name,pattern:e.pattern,action:e.action||"BLOCK"}));o(t),x(t)}else o([]),x([]);if(e?.litellm_params?.blocked_words){let t=e.litellm_params.blocked_words.map((e,t)=>({id:`word-${t}`,keyword:e.keyword,action:e.action||"BLOCK",description:e.description}));c(t),f(t)}else c([]),f([]);if(e?.litellm_params?.categories?.length>0){let a=t?.content_filter_settings?.content_categories?Object.fromEntries(t.content_filter_settings.content_categories.map(e=>[e.name,e])):{},l=e.litellm_params.categories.map((e,t)=>{let l=a[e.category];return{id:`category-${t}`,category:e.category,display_name:l?.display_name??e.category,action:e.action||"BLOCK",severity_threshold:e.severity_threshold||"medium"}});p(l),j(l)}else p([]),j([]);let a=e?.litellm_params?.competitor_intent_config;if(a&&"object"==typeof a){let e=!!(a.brand_self&&Array.isArray(a.brand_self)&&a.brand_self.length>0),t={competitor_intent_type:a.competitor_intent_type??"airline",brand_self:Array.isArray(a.brand_self)?a.brand_self:[],locations:Array.isArray(a.locations)?a.locations:[],competitors:Array.isArray(a.competitors)?a.competitors:[],policy:a.policy??{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:"number"==typeof a.threshold_high?a.threshold_high:.7,threshold_medium:"number"==typeof a.threshold_medium?a.threshold_medium:.45,threshold_low:"number"==typeof a.threshold_low?a.threshold_low:.3};b(e),w(t),C(e),k(t)}else b(!1),w(null),C(!1),k(null)},[e,t?.content_filter_settings?.content_categories]),(0,m.useEffect)(()=>{i&&i(n,d,u,_,v)},[n,d,u,_,v,i]);let I=m.default.useMemo(()=>{let e=JSON.stringify(n)!==JSON.stringify(g),t=JSON.stringify(d)!==JSON.stringify(h),a=JSON.stringify(u)!==JSON.stringify(y),l=_!==N||JSON.stringify(v)!==JSON.stringify(S);return e||t||a||l},[n,d,u,_,v,g,h,y,N,S]);return((0,m.useEffect)(()=>{a&&s&&s(I)},[I,a,s]),e?.litellm_params?.guardrail!=="litellm_content_filter")?null:a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"Content Filter Configuration"}),I&&(0,l.jsx)(tj.Alert,{type:"warning",showIcon:!0,className:"mb-4",message:(0,l.jsx)(tN,{children:'You have unsaved changes to patterns or keywords. Remember to click "Save Changes" at the bottom.'})}),(0,l.jsx)("div",{className:"mb-6",children:t&&t.content_filter_settings&&(0,l.jsx)(Q,{prebuiltPatterns:t.content_filter_settings.prebuilt_patterns||[],categories:t.content_filter_settings.pattern_categories||[],selectedPatterns:n,blockedWords:d,onPatternAdd:e=>o([...n,e]),onPatternRemove:e=>o(n.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>o(n.map(a=>a.id===e?{...a,action:t}:a)),onBlockedWordAdd:e=>c([...d,e]),onBlockedWordRemove:e=>c(d.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>c(d.map(l=>l.id===e?{...l,[t]:a}:l)),onFileUpload:e=>{console.log("File uploaded:",e)},accessToken:r,contentCategories:t.content_filter_settings.content_categories||[],selectedContentCategories:u,onContentCategoryAdd:e=>p([...u,e]),onContentCategoryRemove:e=>p(u.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>p(u.map(l=>l.id===e?{...l,[t]:a}:l)),competitorIntentEnabled:_,competitorIntentConfig:v,onCompetitorIntentChange:(e,t)=>{b(e),w(t)}})})]}):(0,l.jsx)(tw,{patterns:n,blockedWords:d,categories:u,readOnly:!0})};var tS=e.i(788191),tk=e.i(245704),tI=e.i(518617);let tA={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};var tO=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:tA}))}),tT=e.i(987432);let tP={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M892 772h-80v-80c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v80h-80c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h80v80c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-80h80c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM373.5 498.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.8-1.7-203.2 89.2-203.2 200 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.8-1.1 6.4-4.8 5.9-8.8zM824 472c0-109.4-87.9-198.3-196.9-200C516.3 270.3 424 361.2 424 472c0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C357 742.6 326 814.8 324 891.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.5C505.8 695.7 563 672 624 672c110.4 0 200-89.5 200-200zm-109.5 90.5C690.3 586.7 658.2 600 624 600s-66.3-13.3-90.5-37.5a127.26 127.26 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-.1 34.2-13.4 66.3-37.6 90.5z"}}]},name:"usergroup-add",theme:"outlined"};var tL=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:tP}))}),tB=e.i(872934);let{Panel:tF}=$.Collapse,{TextArea:t$}=i.Input,tE={empty:{name:"Empty Template",code:`async def apply_guardrail(inputs, request_data, input_type): - # inputs: {texts, images, tools, tool_calls, structured_messages, model} - # request_data: {model, user_id, team_id, end_user_id, metadata} - # input_type: "request" or "response" - return allow()`},blockSSN:{name:"Block SSN",code:`def apply_guardrail(inputs, request_data, input_type): - for text in inputs["texts"]: - if regex_match(text, r"\\d{3}-\\d{2}-\\d{4}"): - return block("SSN detected") - return allow()`},redactEmail:{name:"Redact Emails",code:`def apply_guardrail(inputs, request_data, input_type): - pattern = r"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}" - modified = [] - for text in inputs["texts"]: - modified.append(regex_replace(text, pattern, "[EMAIL REDACTED]")) - return modify(texts=modified)`},blockSQL:{name:"Block SQL Injection",code:`def apply_guardrail(inputs, request_data, input_type): - if input_type != "request": - return allow() - for text in inputs["texts"]: - if contains_code_language(text, ["sql"]): - return block("SQL code not allowed") - return allow()`},validateJSON:{name:"Validate JSON",code:`def apply_guardrail(inputs, request_data, input_type): - if input_type != "response": - return allow() - - schema = {"type": "object", "required": ["name", "value"]} - - for text in inputs["texts"]: - obj = json_parse(text) - if obj is None: - return block("Invalid JSON response") - if not json_schema_valid(obj, schema): - return block("Response missing required fields") - return allow()`},externalAPI:{name:"External API Check (async)",code:`async def apply_guardrail(inputs, request_data, input_type): - # Call an external moderation API (async for non-blocking) - for text in inputs["texts"]: - response = await http_post( - "https://api.example.com/moderate", - body={"text": text, "user_id": request_data["user_id"]}, - headers={"Authorization": "Bearer YOUR_API_KEY"}, - timeout=10 - ) - - if not response["success"]: - # API call failed, allow by default or block - return allow() - - if response["body"].get("flagged"): - return block(response["body"].get("reason", "Content flagged")) - - return allow()`}},tM={"Return Values":[{name:"allow()",desc:"Let request/response through"},{name:"block(reason)",desc:"Reject with message"},{name:"modify(texts=[], images=[], tool_calls=[])",desc:"Transform content"}],"HTTP Requests (async)":[{name:"await http_request(url, method, headers, body)",desc:"Make async HTTP request"},{name:"await http_get(url, headers)",desc:"Async GET request"},{name:"await http_post(url, body, headers)",desc:"Async POST request"}],"Regex Functions":[{name:"regex_match(text, pattern)",desc:"Returns True if pattern found"},{name:"regex_replace(text, pattern, replacement)",desc:"Replace all matches"},{name:"regex_find_all(text, pattern)",desc:"Return list of matches"}],"JSON Functions":[{name:"json_parse(text)",desc:"Parse JSON string, returns None on error"},{name:"json_stringify(obj)",desc:"Convert to JSON string"},{name:"json_schema_valid(obj, schema)",desc:"Validate against JSON schema"}],"URL Functions":[{name:"extract_urls(text)",desc:"Extract all URLs from text"},{name:"is_valid_url(url)",desc:"Check if URL is valid"},{name:"all_urls_valid(text)",desc:"Check all URLs in text are valid"}],"Code Detection":[{name:"detect_code(text)",desc:"Returns True if code detected"},{name:"detect_code_languages(text)",desc:"Returns list of detected languages"},{name:'contains_code_language(text, ["sql"])',desc:"Check for specific languages"}],"Text Utilities":[{name:"contains(text, substring)",desc:"Check if substring exists"},{name:"contains_any(text, [substr1, substr2])",desc:"Check if any substring exists"},{name:"word_count(text)",desc:"Count words"},{name:"char_count(text)",desc:"Count characters"},{name:"lower(text) / upper(text) / trim(text)",desc:"String transforms"}]},tR=[{value:"pre_call",label:"pre_call (Request)"},{value:"post_call",label:"post_call (Response)"},{value:"during_call",label:"during_call (Parallel)"},{value:"logging_only",label:"logging_only"},{value:"pre_mcp_call",label:"pre_mcp_call (Before MCP Tool Call)"},{value:"post_mcp_call",label:"post_mcp_call (After MCP Tool Call)"},{value:"during_mcp_call",label:"during_mcp_call (During MCP Tool Call)"}],tG=({visible:e,onClose:t,onSuccess:a,accessToken:r,editData:i})=>{let o=!!i,[d,c]=(0,m.useState)(""),[g,x]=(0,m.useState)(["pre_call"]),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)("empty"),[_,b]=(0,m.useState)(tE.empty.code),[v,w]=(0,m.useState)(!1),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(!1),I={texts:["Hello, my SSN is 123-45-6789"],images:[],tools:[{type:"function",function:{name:"get_weather",description:"Get the current weather in a location",parameters:{type:"object",properties:{location:{type:"string",description:"City name"}},required:["location"]}}}],tool_calls:[],structured_messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"Hello, my SSN is 123-45-6789"}],model:"gpt-4"},A={texts:["The weather in San Francisco is 72°F and sunny."],images:[],tools:[],tool_calls:[{id:"call_abc123",type:"function",function:{name:"get_weather",arguments:'{"location": "San Francisco"}'}}],structured_messages:[],model:"gpt-4"},O={texts:['Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'],images:[],tools:[{type:"function",function:{name:"read_wiki_structure",description:"Read the structure of a GitHub repository (MCP tool passed as OpenAI tool)",parameters:{type:"object",properties:{repoName:{type:"string",description:"Repository name, e.g. BerriAI/litellm"}},required:["repoName"]}}}],tool_calls:[{id:"call_mcp_001",type:"function",function:{name:"read_wiki_structure",arguments:'{"repoName": "BerriAI/litellm"}'}}],structured_messages:[{role:"user",content:'Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'}],model:"mcp-tool-call"},[T,P]=(0,m.useState)(JSON.stringify(I,null,2)),[L,B]=(0,m.useState)(null),[F,E]=(0,m.useState)(null),M=(0,m.useRef)(null),R=e=>null==e?["pre_call"]:Array.isArray(e)?e.length?e:["pre_call"]:[e];(0,m.useEffect)(()=>{e&&(i?(c(i.guardrail_name||""),x(R(i.litellm_params?.mode)),f(i.litellm_params?.default_on||!1),b(i.litellm_params?.custom_code||tE.empty.code),j("")):(c(""),x(["pre_call"]),f(!1),j("empty"),b(tE.empty.code)),B(null),k(!1))},[e,i]);let G=async e=>{try{await navigator.clipboard.writeText(e),E(e),setTimeout(()=>E(null),2e3)}catch(e){console.error("Failed to copy:",e)}},z=async()=>{if(!d.trim())return void u.default.fromBackend("Please enter a guardrail name");if(!_.trim())return void u.default.fromBackend("Please enter custom code");if(!r)return void u.default.fromBackend("No access token available");w(!0);try{if(o&&i){let e={litellm_params:{custom_code:_}};d!==i.guardrail_name&&(e.guardrail_name=d);let t=R(i.litellm_params?.mode);(g.length!==t.length||g.some((e,a)=>e!==t[a]))&&(e.litellm_params.mode=g),h!==i.litellm_params?.default_on&&(e.litellm_params.default_on=h),await (0,p.updateGuardrailCall)(r,i.guardrail_id,e),u.default.success("Custom code guardrail updated successfully")}else await (0,p.createGuardrailCall)(r,{guardrail_name:d,litellm_params:{guardrail:"custom_code",mode:g,default_on:h,custom_code:_},guardrail_info:{}}),u.default.success("Custom code guardrail created successfully");a(),t()}catch(e){console.error("Failed to save guardrail:",e),u.default.fromBackend(`Failed to ${o?"update":"create"} guardrail: `+(e instanceof Error?e.message:String(e)))}finally{w(!1)}},K=async()=>{if(!r)return void B({error:"No access token available"});C(!0),B(null);try{let e;try{e=JSON.parse(T)}catch(e){B({error:"Invalid test input JSON"}),C(!1);return}e.texts||(e.texts=[]);let t=["pre_call","pre_mcp_call"],a=["post_call","post_mcp_call"],l=g.some(e=>t.includes(e))?"request":g.some(e=>a.includes(e))?"response":"request",i=await (0,p.testCustomCodeGuardrail)(r,{custom_code:_,test_input:e,input_type:l,request_data:{model:"test-model",metadata:{}}});i.success&&i.result?B(i.result):i.error?B({error:i.error,error_type:i.error_type}):B({error:"Unknown error occurred"})}catch(e){console.error("Failed to test custom code:",e),B({error:e instanceof Error?e.message:"Failed to test custom code"})}finally{C(!1)}},H=_.split("\n").length;return(0,l.jsxs)(s.Modal,{open:e,onCancel:t,footer:null,width:1400,className:"custom-code-modal",closable:!0,destroyOnClose:!0,children:[(0,l.jsxs)("div",{className:"flex flex-col h-[80vh]",children:[(0,l.jsxs)("div",{className:"pb-4 border-b border-gray-200",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:o?"Edit Custom Guardrail":"Create Custom Guardrail"}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Define custom logic using Python-like syntax"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-4 py-4 border-b border-gray-100",children:[(0,l.jsxs)("div",{className:"flex-1 max-w-[200px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Guardrail Name"}),(0,l.jsx)(tt.TextInput,{value:d,onValueChange:c,placeholder:"e.g., block-pii-custom"})]}),(0,l.jsxs)("div",{className:"w-[280px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Mode (can select multiple)"}),(0,l.jsx)(n.Select,{mode:"multiple",value:g,onChange:x,options:tR,className:"w-full",size:"middle",placeholder:"Select modes"})]}),(0,l.jsxs)("div",{className:"w-[180px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Template"}),(0,l.jsx)(n.Select,{value:y,onChange:e=>{j(e),b(tE[e].code)},className:"w-full",size:"middle",dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(eG.Divider,{style:{margin:"8px 0"}}),(0,l.jsxs)("div",{style:{padding:"8px 12px",cursor:"pointer",color:"#1890ff",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px"},onClick:e=>{e.preventDefault(),window.open("https://models.litellm.ai/guardrails","_blank")},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f0f0f0"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"},children:[(0,l.jsx)(tL,{}),(0,l.jsx)("span",{children:"Browse Community templates"}),(0,l.jsx)(tB.ExportOutlined,{style:{fontSize:"10px"}})]})]}),children:(0,l.jsx)(n.Select.OptGroup,{label:"STANDARD",children:Object.entries(tE).map(([e,t])=>(0,l.jsx)(n.Select.Option,{value:e,children:t.name},e))})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pt-5",children:[(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Default On"}),(0,l.jsx)(D.Switch,{checked:h,onChange:f})]})]}),(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden mt-4 gap-6",children:[(0,l.jsxs)("div",{className:"flex-[2] flex flex-col min-w-0 overflow-y-auto",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2 flex-shrink-0",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Python Logic"}),(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Restricted environment (no imports)"})]}),(0,l.jsxs)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e] flex-shrink-0",style:{minHeight:"300px",maxHeight:"400px"},children:[(0,l.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-12 bg-[#1e1e1e] border-r border-gray-700 text-right pr-3 pt-3 select-none overflow-hidden",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6"},children:Array.from({length:Math.max(H,20)},(e,t)=>(0,l.jsx)("div",{className:"text-gray-500 h-[22.4px]",children:t+1},t+1))}),(0,l.jsx)("textarea",{ref:M,value:_,onChange:e=>b(e.target.value),onKeyDown:e=>{if("Tab"===e.key){e.preventDefault();let t=e.currentTarget,a=t.selectionStart,l=t.selectionEnd;b(_.substring(0,a)+" "+_.substring(l)),setTimeout(()=>{t.selectionStart=t.selectionEnd=a+4},0)}},spellCheck:!1,className:"w-full h-full pl-14 pr-4 pt-3 pb-3 resize-none focus:outline-none bg-transparent text-gray-200",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6",tabSize:4}})]}),(0,l.jsx)($.Collapse,{activeKey:S?["test"]:[],onChange:e=>k(e.includes("test")),className:"mt-3 bg-white border border-gray-200 rounded-lg flex-shrink-0",expandIcon:({isActive:e})=>(0,l.jsx)(tO,{rotate:90*!!e}),children:(0,l.jsx)(tF,{header:(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,l.jsx)(tS.PlayCircleOutlined,{className:"text-blue-500"}),"Test Your Guardrail"]}),children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600",children:"Test Input (JSON)"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs text-gray-500",children:"Load example:"}),(0,l.jsx)("button",{type:"button",onClick:()=>P(JSON.stringify(I,null,2)),className:"px-2 py-1 text-xs rounded border border-orange-200 bg-orange-50 text-orange-700 hover:bg-orange-100 transition-colors",children:"Pre-call"}),(0,l.jsx)("button",{type:"button",onClick:()=>P(JSON.stringify(O,null,2)),className:"px-2 py-1 text-xs rounded border border-purple-200 bg-purple-50 text-purple-700 hover:bg-purple-100 transition-colors",children:"Pre MCP"}),(0,l.jsx)("button",{type:"button",onClick:()=>P(JSON.stringify(A,null,2)),className:"px-2 py-1 text-xs rounded border border-green-200 bg-green-50 text-green-700 hover:bg-green-100 transition-colors",children:"Post-call"})]})]}),(0,l.jsx)("div",{className:"mb-2 p-2 bg-gray-50 rounded text-xs text-gray-600 border border-gray-200",children:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"texts"}),": Message content (always)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"images"}),": Base64 images (vision)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tools"}),": Tool definitions ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"}),", MCP as OpenAI tool ",(0,l.jsx)("span",{className:"text-purple-600",children:"(pre_mcp_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tool_calls"}),": LLM tool calls ",(0,l.jsx)("span",{className:"text-green-600",children:"(post_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"structured_messages"}),": Full messages ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"model"}),": Model name (always)"]})]})}),(0,l.jsx)(t$,{value:T,onChange:e=>P(e.target.value),rows:8,className:"font-mono text-xs",placeholder:'{"texts": ["test message"], ...}'})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{size:"xs",onClick:K,disabled:N,icon:tS.PlayCircleOutlined,children:N?"Running...":"Run Test"}),L&&(0,l.jsx)("div",{className:`flex items-center gap-2 text-sm ${L.error?"text-red-600":"allow"===L.action?"text-green-600":"block"===L.action?"text-orange-600":"text-blue-600"}`,children:L.error?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{}),(0,l.jsxs)("span",{children:[L.error_type&&(0,l.jsxs)("span",{className:"font-medium",children:["[",L.error_type,"] "]}),L.error]})]}):"allow"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Allowed"]}):"block"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{})," Blocked: ",L.reason]}):"modify"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Modified",L.texts&&L.texts.length>0&&(0,l.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:["→ ",L.texts[0].substring(0,50),L.texts[0].length>50?"...":""]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," ",L.action||"Unknown"]})})]})]})},"test")}),(0,l.jsxs)("div",{className:"mt-3 p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-lg flex items-center justify-between flex-shrink-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"bg-blue-100 rounded-full p-2",children:(0,l.jsx)(tL,{className:"text-blue-600 text-lg"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-gray-900",children:"Built a useful guardrail?"}),(0,l.jsx)("div",{className:"text-xs text-gray-600",children:"Share it with the community and help others build faster"})]})]}),(0,l.jsx)(e4.Button,{size:"xs",onClick:()=>window.open("https://github.com/BerriAI/litellm-guardrails","_blank"),icon:tB.ExportOutlined,className:"bg-blue-600 hover:bg-blue-700 text-white border-0",children:"Contribute Template"})]})]}),(0,l.jsxs)("div",{className:"w-[300px] flex-shrink-0 overflow-auto border-l border-gray-200 pl-6",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)("span",{className:"font-semibold text-gray-700",children:"Available Primitives"})]}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Click to copy functions to clipboard"}),(0,l.jsx)($.Collapse,{defaultActiveKey:["Return Values"],className:"primitives-collapse bg-transparent border-0",expandIconPosition:"end",children:Object.entries(tM).map(([e,t])=>(0,l.jsx)(tF,{header:(0,l.jsx)("span",{className:"text-sm font-medium text-gray-700",children:e}),className:"bg-white mb-2 rounded-lg border border-gray-200",children:(0,l.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,l.jsx)("button",{onClick:()=>G(e.name),className:`w-full text-left px-2 py-2 rounded transition-colors ${F===e.name?"bg-green-100":"bg-gray-50 hover:bg-blue-50"}`,children:F===e.name?(0,l.jsxs)("span",{className:"flex items-center gap-1 text-xs font-mono text-green-700",children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Copied!"]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"text-xs font-mono text-gray-800",children:e.name}),(0,l.jsx)("div",{className:"text-[10px] text-gray-500 mt-0.5",children:e.desc})]})},e.name))})},e))})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-gray-200",children:[(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Changes are auto-saved to local draft"}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:z,loading:v,disabled:v||!d.trim(),icon:tT.SaveOutlined,children:o?"Update Guardrail":"Save Guardrail"})]})]})]}),(0,l.jsx)("style",{children:` - .custom-code-modal .ant-modal-content { - padding: 24px; - } - .custom-code-modal .ant-modal-close { - top: 20px; - right: 20px; - } - .primitives-collapse .ant-collapse-item { - border: none !important; - } - .primitives-collapse .ant-collapse-header { - padding: 8px 12px !important; - } - .primitives-collapse .ant-collapse-content-box { - padding: 8px 12px !important; - } - `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let o,[d,g]=(0,m.useState)(null),[x,h]=(0,m.useState)(null),[f,y]=(0,m.useState)(!0),[j,_]=(0,m.useState)(!1),[b]=r.Form.useForm(),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(null),[I,A]=(0,m.useState)({}),[O,T]=(0,m.useState)(!1),P={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[L,B]=(0,m.useState)(P),[F,$]=(0,m.useState)(!1),[E,M]=(0,m.useState)(!1),R=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),G=(0,m.useCallback)((e,t,a,l,r)=>{R.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(y(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(g(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(w([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),w(t),C(a)}}else w([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{y(!1)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);h(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},K=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);k(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{D()},[a]),(0,m.useEffect)(()=>{z(),K()},[e,a]),(0,m.useEffect)(()=>{if(d&&b){let e={...d.litellm_params||{}};delete e.skip_system_message_in_guardrail,b.setFieldsValue({guardrail_name:d.guardrail_name,...e,skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}})}},[d,x,b]);let H=(0,m.useCallback)(()=>{d?.litellm_params?.guardrail==="tool_permission"?B({rules:d.litellm_params?.rules||[],default_action:(d.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:d.litellm_params?.violation_message_template||""}):B(P),$(!1)},[d]);(0,m.useEffect)(()=>{H()},[H]);let q=async t=>{try{if(!a)return;let o={litellm_params:{}};t.guardrail_name!==d.guardrail_name&&(o.guardrail_name=t.guardrail_name),t.default_on!==d.litellm_params?.default_on&&(o.litellm_params.default_on=t.default_on);let c=ec(d.litellm_params?.skip_system_message_in_guardrail),m=t.skip_system_message_choice;void 0!==m&&m!==c&&("inherit"===m?o.litellm_params.skip_system_message_in_guardrail=null:"yes"===m?o.litellm_params.skip_system_message_in_guardrail=!0:o.litellm_params.skip_system_message_in_guardrail=!1);let g=d.guardrail_info,h=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(g)!==JSON.stringify(h)&&(o.guardrail_info=h);let f=d.litellm_params?.pii_entities_config||{},y={};if(v.forEach(e=>{y[e]=N[e]||"MASK"}),JSON.stringify(f)!==JSON.stringify(y)&&(o.litellm_params.pii_entities_config=y),d.litellm_params?.guardrail==="litellm_content_filter"&&O){var l,r,i,s,n;let e,t=(l=R.current.patterns||[],r=R.current.blockedWords||[],i=R.current.categories||[],s=R.current.competitorIntentEnabled,n=R.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);o.litellm_params.patterns=t.patterns,o.litellm_params.blocked_words=t.blocked_words,o.litellm_params.categories=t.categories,o.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(d.litellm_params?.guardrail==="tool_permission"){let e=d.litellm_params?.rules||[],t=L.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(d.litellm_params?.default_action||"deny").toLowerCase(),r=(L.default_action||"deny").toLowerCase(),i=l!==r,s=(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(L.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=d.litellm_params?.violation_message_template||"",u=L.violation_message_template||"",p=m!==u;(F||a||i||c||p)&&(o.litellm_params.rules=t,o.litellm_params.default_action=r,o.litellm_params.on_disallowed_action=n,o.litellm_params.violation_message_template=u||null)}let j=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",j);let b=d.litellm_params?.guardrail==="tool_permission";if(x&&j&&!b){let e=x[ea[j]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=d.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?o.litellm_params[e]=a:null!=l&&""!==l&&(o.litellm_params[e]=null))})}if(0===Object.keys(o.litellm_params).length&&delete o.litellm_params,0===Object.keys(o).length){u.default.info("No changes detected"),_(!1);return}await (0,p.updateGuardrailCall)(a,e,o),u.default.success("Guardrail updated successfully"),T(!1),z(),_(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(f)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let J=e=>e?new Date(e).toLocaleString():"-",{logo:U,displayName:W}=ed(d.litellm_params?.guardrail||""),V=async(e,t)=>{await (0,tn.copyToClipboard)(e)&&(A(e=>({...e,[t]:!0})),setTimeout(()=>{A(e=>({...e,[t]:!1}))},2e3))},Y="config"===d.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(td.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(th.Title,{children:d.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eR.Text,{className:"text-gray-500 font-mono",children:d.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:I["guardrail-id"]?(0,l.jsx)(tf.CheckIcon,{size:12}):(0,l.jsx)(ty.CopyIcon,{size:12}),onClick:()=>V(d.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${I["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tu.TabGroup,{children:[(0,l.jsxs)(tp.TabList,{className:"mb-4",children:[(0,l.jsx)(tm.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(tm.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tx.TabPanels,{children:[(0,l.jsxs)(tg.TabPanel,{children:[(0,l.jsxs)(tc.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[U&&(0,l.jsx)("img",{src:U,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(th.Title,{children:W})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:d.litellm_params?.mode||"-"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:J(d.created_at)}),(0,l.jsxs)(eR.Text,{children:["Last Updated: ",J(d.updated_at)]})]})]})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsx)(eR.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(d.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eR.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(eN.default,{}):(0,l.jsx)(eC.StopOutlined,{}),String(t)]})})]},e))})]})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsx)(eH,{value:L,disabled:!0})}),d.litellm_params?.guardrail==="custom_code"&&d.litellm_params?.custom_code&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eR.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!Y&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:d.litellm_params.custom_code})})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(tg.TabPanel,{children:(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(th.Title,{children:"Guardrail Settings"}),Y&&(0,l.jsx)(ej.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})}),!j&&!Y&&(d.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>_(!0),children:"Edit Settings"}))]}),j?(0,l.jsxs)(r.Form,{form:b,onFinish:q,initialValues:{guardrail_name:d.guardrail_name,...(o={...d.litellm_params||{}},delete o.skip_system_message_in_guardrail,o),skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{label:"Skip system messages in guardrail",name:"skip_system_message_choice",tooltip:"Unified guardrails: omit role: system from guardrail input (LLM still gets full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),d.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:S&&(0,l.jsx)(eE,{entities:S.supported_entities,actions:S.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:S.pii_entity_categories})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!0,accessToken:a,onDataChange:G,onUnsavedChanges:T}),(d.litellm_params?.guardrail==="tool_permission"||x)&&(0,l.jsx)(eG.Divider,{orientation:"left",children:"Provider Settings"}),d.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eH,{value:L,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ey,{selectedProvider:Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail)||null,accessToken:a,providerParams:x,value:d.litellm_params}),x&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);if(!e)return null;let t=x[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:d.litellm_params}):null})()]}),(0,l.jsx)(eG.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{_(!1),T(!1),H()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:d.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:d.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Yes":"No"})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:J(d.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:J(d.updated_at)})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eH,{value:L,disabled:!0})]})]})})]})]}),(0,l.jsx)(tG,{visible:E,onClose:()=>M(!1),onSuccess:()=>{M(!1),z()},accessToken:a,editData:d?{guardrail_id:d.guardrail_id,guardrail_name:d.guardrail_name,litellm_params:d.litellm_params}:null})]})}],969641);var tz=e.i(573421),tD=e.i(19732),tK=e.i(928685),tH=e.i(166406),tq=e.i(637235),tJ=e.i(755151),tU=e.i(240647);let{Text:tW}=d.Typography,tV=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tk.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tY}=i.Input,{Text:tQ}=d.Typography,tZ=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ej.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eD.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tY,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(e4.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tV,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[s,n]=(0,m.useState)(new Set),[o,c]=(0,m.useState)(""),[g,x]=(0,m.useState)([]),[f,y]=(0,m.useState)([]),[j,_]=(0,m.useState)(!1),b=e.filter(e=>e.guardrail_name?.toLowerCase().includes(o.toLowerCase())),v=async e=>{if(0===s.size||!a)return;_(!0),x([]),y([]);let t=[],l=[];await Promise.all(Array.from(s).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),x(t),y(l),_(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(h.Card,{className:"h-full",styles:{body:{padding:0,height:"100%"}},children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(i.Input,{prefix:(0,l.jsx)(tK.SearchOutlined,{}),placeholder:"Search guardrails...",value:o,onChange:e=>c(e.target.value)})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(eh.Spin,{})}):0===b.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(ez.Empty,{description:o?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(tz.List,{dataSource:b,renderItem:e=>(0,l.jsx)(tz.List.Item,{onClick:()=>{var t;let a;e.guardrail_name&&(t=e.guardrail_name,(a=new Set(s)).has(t)?a.delete(t):a.add(t),n(a))},style:{paddingLeft:24,paddingRight:16},className:`cursor-pointer hover:bg-gray-50 transition-colors ${s.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(tz.List.Item.Meta,{title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tD.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(d.Typography.Text,{className:"text-xs text-gray-600",children:[s.size," of ",b.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(d.Typography.Title,{level:2,className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===s.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tD.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tZ,{guardrailNames:Array.from(s),onSubmit:v,results:g.length>0?g:null,errors:f.length>0?f:null,isLoading:j,onClose:()=>n(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tG],64352);let tX="../ui/assets/logos/",t0=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tX}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tX}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tX}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tX}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tX}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tX}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tX}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tX}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tX}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tX}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tX}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tX}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tX}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tX}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tX}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tX}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tX}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tX}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tX}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tX}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tX}akto.svg`,tags:["Security","Safety","Monitoring"]},{id:"promptguard",name:"PromptGuard",description:"AI security gateway with prompt injection detection, PII redaction, topic filtering, entity blocklists, and hallucination detection. Self-hostable with drop-in proxy integration.",category:"partner",logo:`${tX}promptguard.svg`,tags:["Security","Prompt Injection","PII"],providerKey:"Promptguard",eval:{f1:94.9,precision:100,recall:90.4,testCases:5384,latency:"~150ms"}}];e.s(["ALL_CARDS",0,t0],230312)},826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(464571),r=e.i(326373),i=e.i(653496),s=e.i(755151),n=e.i(646563),o=e.i(245094),d=e.i(764205),c=e.i(185357),m=e.i(782719),u=e.i(708347),p=e.i(969641),g=e.i(476993),x=e.i(727749),h=e.i(127952),f=e.i(180766);e.i(824296);var y=e.i(64352),j=e.i(311451),_=e.i(928685),b=e.i(266537),v=e.i(230312),w=e.i(826910);let N=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},C=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(N,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(w.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var S=e.i(447566);let k={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1},promptguard:{provider:"Promptguard",guardrailNameSuggestion:"PromptGuard",mode:"pre_call",defaultOn:!1}},I=({card:e,onBack:r,accessToken:i,onGuardrailCreated:s})=>{let[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)("overview"),u=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],p=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],g=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:r,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(S.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(l.Button,{onClick:()=>o(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:g.map(e=>(0,t.jsx)("div",{onClick:()=>m(e.key),style:{padding:"12px 20px",fontSize:14,color:d===e.key?"#1a73e8":"#5f6368",borderBottom:d===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:d===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===d&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:u.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:p.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(c.default,{visible:n,onClose:()=>o(!1),accessToken:i,onSuccess:()=>{o(!1),s()},preset:k[e.id]})]})},A=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=v.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(I,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(j.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(_.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]})]})};var O=e.i(988846),T=e.i(837007),P=e.i(409797),L=e.i(54131),B=e.i(995926),F=e.i(678784),$=e.i(634831),E=e.i(438100),M=e.i(302202),R=e.i(328196),G=e.i(879664);e.s(["InfoIcon",()=>G.default],168118);var G=G,z=e.i(212931),D=e.i(808613),K=e.i(199133),H=e.i(663435),q=e.i(954616),J=e.i(912598),U=e.i(135214),W=e.i(243652);let V=async(e,t)=>{let a=(0,d.getProxyBaseUrl)(),l=`${a}/guardrails/register`,r=await fetch(l,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.json().catch(()=>({})),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return r.json()},Y=(0,W.createQueryKeys)("guardrails");function Q(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt: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),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let Z={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{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"}},X={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function ee({label:e,value:a,color:l}){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 ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function et({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function ea({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=Z[e.status],c=X[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,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.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(M.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,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:o,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,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(P.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function el({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function er({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=Z[e.status],y=X[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(B.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(el,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)($.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(el,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(E.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(P.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(G.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)($.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(F.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(B.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ei({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="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 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(F.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(R.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,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,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function es({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[c,m]=(0,a.useState)("all"),[u,p]=(0,a.useState)(null),[g,h]=(0,a.useState)(new Set),[f,y]=(0,a.useState)(null),[_,b]=(0,a.useState)(!0),[v,w]=(0,a.useState)(null),[N,C]=(0,a.useState)(""),[S,k]=(0,a.useState)(!1),[I]=D.Form.useForm(),A=(()=>{let{accessToken:e}=(0,U.default)(),t=(0,J.useQueryClient)();return(0,q.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return V(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:Y.all})}})})();(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let P=(0,a.useCallback)(async()=>{if(!e)return void b(!1);b(!0),w(null);try{let t="all"===c?void 0:"pending"===c?"pending_review":c,a=await (0,d.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(Q)),s(a.summary)}catch(e){w(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{b(!1)}},[e,c,N]);(0,a.useEffect)(()=>{P()},[P]);let L=l.find(e=>e.id===u)??null,B=i.total,F=i.pending_review,$=i.active,E=i.rejected;async function M(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),x.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{x.default.fromBackend("Failed to update forward API key")}}async function R(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),x.default.success("Static headers updated")}catch{x.default.fromBackend("Failed to update static headers")}}async function G(t,a){if(e)try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),x.default.success("Forward client headers updated")}catch{x.default.fromBackend("Failed to update forward client headers")}}async function W(t){if(e)try{await (0,d.approveGuardrailSubmission)(e,t),y(null),u===t&&p(null),await P(),x.default.success("Guardrail approved")}catch{x.default.fromBackend("Failed to approve guardrail")}}async function Z(t){if(e)try{await (0,d.rejectGuardrailSubmission)(e,t),y(null),u===t&&p(null),await P(),x.default.success("Guardrail rejected")}catch{x.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${L?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ee,{label:"Total Submitted",value:B,color:"text-gray-900"}),(0,t.jsx)(ee,{label:"Pending Review",value:F,color:"text-yellow-600"}),(0,t.jsx)(ee,{label:"Active",value:$,color:"text-green-600"}),(0,t.jsx)(ee,{label:"Rejected",value:E,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)(O.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 guardrails...",value:n,onChange:e=>o(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-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:c,onChange:e=>m(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none 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",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>k(!0),className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)(T.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[_&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),v&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:v}),!_&&!v&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!_&&!v&&l.map(e=>(0,t.jsx)(ea,{guardrail:e,isSelected:u===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>p(u===e.id?null:e.id),onToggleForwardKey:()=>M(e.id),onToggleHeaders:()=>{var t;return t=e.id,void h(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>y({id:e.id,action:"approve"}),onReject:()=>y({id:e.id,action:"reject"})},e.id))]})]}),L&&(0,t.jsx)(er,{guardrail:L,onClose:()=>p(null),onApprove:()=>y({id:L.id,action:"approve"}),onReject:()=>y({id:L.id,action:"reject"}),onToggleForwardKey:()=>M(L.id),onUpdateCustomHeaders:e=>R(L.id,e),onUpdateExtraHeaders:e=>G(L.id,e)}),f&&(0,t.jsx)(ei,{action:f.action,guardrailName:l.find(e=>e.id===f.id)?.name??"",onConfirm:()=>"approve"===f.action?W(f.id):Z(f.id),onCancel:()=>y(null)}),(0,t.jsxs)(z.Modal,{title:"Submit Guardrail for Review",open:S,onCancel:()=>{k(!1),I.resetFields()},onOk:()=>I.submit(),okText:"Submit for Review",children:[(0,t.jsx)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800 mb-4",children:"Your guardrail will be sent for admin review before it becomes active."}),(0,t.jsxs)(D.Form,{form:I,layout:"vertical",initialValues:{mode:"pre_call"},onFinish:async e=>{let t={...e.extra_litellm_params?JSON.parse(e.extra_litellm_params):{},guardrail:"generic_guardrail_api",mode:e.mode,api_base:e.api_base};try{await A.mutateAsync({team_id:e.team_id,guardrail_name:e.guardrail_name,litellm_params:t,guardrail_info:e.guardrail_info?JSON.parse(e.guardrail_info):void 0}),x.default.success("Guardrail submitted for review"),k(!1),I.resetFields(),P()}catch{}},children:[(0,t.jsx)(D.Form.Item,{label:"Team",name:"team_id",rules:[{required:!0,message:"Select a team"}],children:(0,t.jsx)(H.default,{})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Enter a guardrail name"}],children:(0,t.jsx)(j.Input,{placeholder:"e.g. pii-detection"})}),(0,t.jsx)(D.Form.Item,{label:"Mode",name:"mode",rules:[{required:!0,message:"Select a mode"}],children:(0,t.jsxs)(K.Select,{children:[(0,t.jsx)(K.Select.Option,{value:"pre_call",children:"Pre Call"}),(0,t.jsx)(K.Select.Option,{value:"post_call",children:"Post Call"}),(0,t.jsx)(K.Select.Option,{value:"during_call",children:"During Call"})]})}),(0,t.jsx)(D.Form.Item,{label:"API Base URL",name:"api_base",rules:[{required:!0,message:"Enter the API base URL"},{type:"url",message:"Must be a valid URL"}],children:(0,t.jsx)(j.Input,{placeholder:"https://your-guardrail-api.com/v1/check",className:"font-mono"})}),(0,t.jsx)(D.Form.Item,{label:"Additional litellm_params (optional)",name:"extra_litellm_params",tooltip:"JSON object merged into litellm_params. e.g. forward_api_key, headers, model, unreachable_fallback",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if("object"!=typeof e||Array.isArray(e))return Promise.reject("Must be a JSON object");return Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"forward_api_key": true, "headers": {"X-Custom": "value"}}'})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Info (optional)",name:"guardrail_info",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"description": "Detects PII in requests"}'})})]})]})]})}e.s(["default",0,({accessToken:e,userRole:j})=>{let[_,b]=(0,a.useState)([]),[v,w]=(0,a.useState)(!1),[N,C]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[I,O]=(0,a.useState)(!1),[T,P]=(0,a.useState)(null),[L,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),E=!!j&&(0,u.isAdminRole)(j),M=async()=>{if(e){k(!0);try{let t=await (0,d.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),b(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{k(!1)}}};(0,a.useEffect)(()=>{M()},[e]);let R=()=>{M()},G=async()=>{if(T&&e){O(!0);try{await (0,d.deleteGuardrailCall)(e,T.guardrail_id),x.default.success(`Guardrail "${T.guardrail_name}" deleted successfully`),await M()}catch(e){console.error("Error deleting guardrail:",e),x.default.fromBackend("Failed to delete guardrail")}finally{O(!1),B(!1),P(null)}}},z=T&&T.litellm_params?(0,f.getGuardrailLogoAndName)(T.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsx)(i.Tabs,{defaultActiveKey:"submitted",items:[...E?[{key:"garden",label:"Guardrail Garden",children:(0,t.jsx)(A,{accessToken:e,onGuardrailCreated:R})},{key:"guardrails",label:"Guardrails",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(r.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(n.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{F&&$(null),w(!0)}},{key:"custom_code",icon:(0,t.jsx)(o.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{F&&$(null),C(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(s.DownOutlined,{className:"ml-2"})]})})}),F?(0,t.jsx)(p.default,{guardrailId:F,onClose:()=>$(null),accessToken:e,isAdmin:E}):(0,t.jsx)(m.default,{guardrailsList:_,isLoading:S,onDeleteClick:(e,t)=>{P(_.find(t=>t.guardrail_id===e)||null),B(!0)},accessToken:e,onGuardrailUpdated:M,isAdmin:E,onGuardrailClick:e=>$(e)}),(0,t.jsx)(c.default,{visible:v,onClose:()=>{w(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(y.CustomCodeModal,{visible:N,onClose:()=>{C(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(h.default,{isOpen:L,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${T?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:T?.guardrail_name},{label:"ID",value:T?.guardrail_id,code:!0},{label:"Provider",value:z},{label:"Mode",value:T?.litellm_params.mode},{label:"Default On",value:T?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{B(!1),P(null)},onOk:G,confirmLoading:I})]})},{key:"playground",label:"Test Playground",disabled:!e,children:(0,t.jsx)(g.default,{guardrailsList:_,isLoading:S,accessToken:e,onClose:()=>{}})}]:[],{key:"submitted",label:"Submitted Guardrails",children:(0,t.jsx)(es,{accessToken:e})}]})})}],487304)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/039fd44300b25e02.js b/litellm/proxy/_experimental/out/_next/static/chunks/039fd44300b25e02.js new file mode 100644 index 0000000000..f842b9226f --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/039fd44300b25e02.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,l],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),l=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 s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ArrowLeftOutlined",0,r],447566)},891547,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,disabled:o})=>{let[c,d]=(0,l.useState)([]),[u,m]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,s.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:r,loading:u,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),l=e.i(271645),a=e.i(199133),s=e.i(764205);function r(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let l=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${l} (${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:i,className:n,accessToken:o,disabled:c,onPoliciesLoaded:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(o){g(!0);try{let e=await (0,s.getPoliciesList)(o);e.policies&&(m(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{g(!1)}}})()},[o,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:i,loading:h,className:n,allowClear:!0,options:r(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>r])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),l=e.i(114272),a=e.i(540143),s=e.i(915823),r=e.i(619273),i=class extends s.Subscribable{#e;#t=void 0;#l;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}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.#l,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#l?.state.status==="pending"&&this.#l.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#l?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#l?.removeObserver(this),this.#l=void 0,this.#s(),this.#r()}mutate(e,t){return this.#a=t,this.#l?.removeObserver(this),this.#l=this.#e.getMutationCache().build(this.#e,this.options),this.#l.addObserver(this),this.#l.execute(e)}#s(){let e=this.#l?.state??(0,l.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,l=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,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,l,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,l,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,l){let s=(0,n.useQueryClient)(l),[o]=t.useState(()=>new i(s,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=t.useCallback((e,t)=>{o.mutate(e,t).catch(r.noop)},[o]);if(c.error&&(0,r.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ClockCircleOutlined",0,r],637235)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let l=e.i(264042).Row;e.s(["Row",0,l],621192)},214541,e=>{"use strict";var t=e.i(271645),l=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,s]=(0,t.useState)([]),{accessToken:r,userId:i,userRole:n}=(0,l.default)();return(0,t.useEffect)(()=>{(async()=>{s(await (0,a.fetchTeams)(r,i,n,null))})()},[r,i,n]),{teams:e,setTeams:s}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function l(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let s=t(e);return isNaN(a)?l(e,NaN):(a&&s.setDate(s.getDate()+a),s)}function s(e,a){let s=t(e);if(isNaN(a))return l(e,NaN);if(!a)return s;let r=s.getDate(),i=l(e,s.getTime());return(i.setMonth(s.getMonth()+a+1,0),r>=i.getDate())?i:(s.setFullYear(i.getFullYear(),i.getMonth(),r),s)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>l],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>s],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(529681),s=e.i(908286),r=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],d=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let a,s,r;return(0,l.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(s={},d.forEach(l=>{s[`${e}-align-${l}`]=t.align===l}),s[`${e}-align-stretch`]=!t.align&&!!t.vertical,s)),(r={},c.forEach(l=>{r[`${e}-justify-${l}`]=t.justify===l}),r)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:l,paddingLG:a}=e,s=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:l,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"}}}})(s),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(s),(e=>{let{componentCls:t}=e,l={};return o.forEach(e=>{l[`${t}-wrap-${e}`]={flexWrap:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return d.forEach(e=>{l[`${t}-align-${e}`]={alignItems:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return c.forEach(e=>{l[`${t}-justify-${e}`]={justifyContent:e}}),l})(s)]},()=>({}),{resetStyle:!1});var h=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let g=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:d,flex:g,gap:f,vertical:p=!1,component:x="div",children:y}=e,w=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:b,getPrefixCls:S}=t.default.useContext(r.ConfigContext),j=S("flex",n),[_,N,C]=m(j),k=null!=p?p:null==v?void 0:v.vertical,z=(0,l.default)(c,o,null==v?void 0:v.className,j,N,C,u(j,e),{[`${j}-rtl`]:"rtl"===b,[`${j}-gap-${f}`]:(0,s.isPresetSize)(f),[`${j}-vertical`]:k}),O=Object.assign(Object.assign({},null==v?void 0:v.style),d);return g&&(O.flex=g),f&&!(0,s.isPresetSize)(f)&&(O.gap=f),_(t.default.createElement(x,Object.assign({ref:i,className:z,style:O},(0,a.default)(w,["justify","wrap","align"])),y))});e.s(["Flex",0,g],525720)},633627,e=>{"use strict";var t=e.i(764205);let l=(e,t,l,a)=>{for(let s of e){let e=s?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let r=s?.organization_id??s?.org_id;r&&"string"==typeof r&&l.add(r.trim());let i=s?.user_id;if(i&&"string"==typeof i){let e=s?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let s=new Set,r=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;l(o,s,r,i);let d=Math.min(c,10)-1;if(d>0){let n=Array.from({length:d},(l,s)=>(0,t.keyListCall)(e,null,a,null,null,null,s+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&l(e.value?.keys||[],s,r,i)}return{keyAliases:Array.from(s).sort(),organizationIds:Array.from(r).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},s=async(e,l)=>{if(!e)return[];try{let a=[],s=1,r=!0;for(;r;){let i=await (0,t.teamListCall)(e,l||null,null);a=[...a,...i],s{if(!e)return[];try{let l=[],a=1,s=!0;for(;s;){let r=await (0,t.organizationListCall)(e);l=[...l,...r],a{"use strict";var t=e.i(843476),l=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var s=e.i(464571),r=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:d={},buttonLabel:u="Filters"})=>{let[m,h]=(0,l.useState)(!1),[g,f]=(0,l.useState)(d),[p,x]=(0,l.useState)({}),[y,w]=(0,l.useState)({}),[v,b]=(0,l.useState)({}),[S,j]=(0,l.useState)({}),_=(0,l.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){w(e=>({...e,[t.name]:!0}));try{let l=await t.searchFn(e);x(e=>({...e,[t.name]:l}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{w(e=>({...e,[t.name]:!1}))}}},300),[]),N=(0,l.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!S[e.name]){w(t=>({...t,[e.name]:!0})),j(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(l=>({...l,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{w(t=>({...t,[e.name]:!1}))}}},[S]);(0,l.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!S[e.name]&&N(e)})},[m,e,N,S]);let C=(e,t)=>{let l={...g,[e]:t};f(l),o(l)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(s.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:u}),(0,t.jsx)(s.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),f(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model","Public model / search tool"].map(l=>{let a,s=e.find(e=>e.label===l||e.name===l);return s?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:s.label||s.name}),s.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),onOpenChange:e=>{e&&s.isSearchable&&!S[s.name]&&N(s)},onSearch:e=>{b(t=>({...t,[s.name]:e})),s.searchFn&&_(e,s)},filterOption:!1,loading:y[s.name],options:p[s.name]||[],allowClear:!0,notFoundContent:y[s.name]?"Loading...":"No results found"}):s.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),allowClear:!0,children:s.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):s.customComponent?(a=s.customComponent,(0,t.jsx)(a,{value:g[s.name]||void 0,onChange:e=>C(s.name,e??""),placeholder:`Select ${s.label||s.name}...`,allFilters:g})):(0,t.jsx)(r.Input,{className:"w-full",placeholder:`Enter ${s.label||s.name}...`,value:g[s.name]||"",onChange:e=>C(s.name,e.target.value),allowClear:!0})]},s.name):null})})]})}],969550)},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,s,r)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,s?.organization_id||null,l):await (0,t.teamListCall)(e,s?.organization_id||null),console.log(`givenTeams: ${i}`),r(i)};e.s(["fetchTeams",0,l])},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),s=e.i(947293),r=e.i(764205),i=e.i(954616),n=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function f(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),x=e.i(808613),y=e.i(311451),w=e.i(898586);function v({variant:e,userEmail:a,isPending:s,claimError:r,onSubmit:i}){let[n]=x.Form.useForm();return l.default.useEffect(()=>{a&&n.setFieldValue("user_email",a)},[a,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(x.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>i({password:e.password}),children:[(0,t.jsx)(x.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(x.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),r&&(0,t.jsx)(h.Alert,{type:"error",message:r,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:s,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function b({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:p,isError:x}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,r.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:y,isPending:w}=(0,i.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,r.claimOnboardingToken)(e,t,l,a)}),b=g?.token?(0,s.jwtDecode)(g.token):null,S=b?.user_email??"",j=b?.user_id??null,_=b?.key??null;return p?(0,t.jsx)(m,{}):x?(0,t.jsx)(f,{}):(0,t.jsx)(v,{variant:e,userEmail:S,isPending:w,claimError:u,onSubmit:e=>{_&&j&&d&&(h(null),y({accessToken:_,inviteId:d,userId:j,password:e.password},{onSuccess:e=>{if(!e?.token)return void h("Failed to start session. Please try again.");document.cookie=`token=${e.token}; path=/; SameSite=Lax`;let t=(0,r.getProxyBaseUrl)();window.location.href=t?`${t}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function S(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(b,{variant:"reset_password"===e?"reset_password":"signup"})}function j(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(S,{})})}e.s(["default",()=>j],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),s=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:f=!1,allFilters:p})=>{let[x,y]=(0,d.useState)(""),[w,v]=(0,o.useDebouncedState)("",{wait:300}),{data:b,fetchNextPage:S,hasNextPage:j,isFetchingNextPage:_,isLoading:N}=((e=50,t,a)=>{let{accessToken:n}=(0,r.default)();return(0,l.useInfiniteQuery)({queryKey:i.list({filters:{size:e,...t&&{search:t},...a&&{team_id:a}}}),queryFn:async({pageParam:l})=>await (0,s.keyAliasesCall)(n,l,e,t,a),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!b?.pages)return[];let e=new Set,t=[];for(let l of b.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[b]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:f,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),v(e)},searchValue:x,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&j&&!_&&S()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:C,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),s=e.i(350967),r=e.i(947293),i=e.i(618566),n=e.i(271645),o=e.i(566606),c=e.i(584578),d=e.i(764205),u=e.i(702597),m=e.i(207082),h=e.i(109799),g=e.i(500330),f=e.i(871943),p=e.i(502547),x=e.i(360820),y=e.i(94629),w=e.i(152990),v=e.i(682830),b=e.i(389083),S=e.i(994388),j=e.i(752978),_=e.i(269200),N=e.i(942232),C=e.i(977572),k=e.i(427612),z=e.i(64848),O=e.i(496020),I=e.i(599724),D=e.i(827252),T=e.i(772345),E=e.i(464571),M=e.i(282786),P=e.i(981339),R=e.i(262218),A=e.i(592968),L=e.i(898586),$=e.i(355619),U=e.i(633627),K=e.i(374009),F=e.i(700514),B=e.i(135214),V=e.i(50882),H=e.i(969550),G=e.i(304911),W=e.i(20147);function q({teams:e,organizations:l,onSortChange:a,currentSort:s}){let{data:r}=(0,h.useOrganizations)(),i=r??l??[],[o,c]=(0,n.useState)(null),[u,q]=n.default.useState(()=>s?[{id:s.sortBy,desc:"desc"===s.sortOrder}]:[{id:"created_at",desc:!0}]),[J,Q]=n.default.useState({pageIndex:0,pageSize:50}),Y=u.length>0?u[0].id:null,Z=u.length>0?u[0].desc?"desc":"asc":null,{data:X,isPending:ee,isFetching:et,isError:el,refetch:ea}=(0,m.useKeys)(J.pageIndex+1,J.pageSize,{sortBy:Y||void 0,sortOrder:Z||void 0,expand:"user"}),[es,er]=(0,n.useState)({}),{filters:ei,filteredKeys:en,filteredTotalCount:eo,allTeams:ec,allOrganizations:ed,handleFilterChange:eu,handleFilterReset:em}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:s}=(0,B.default)(),[r,i]=(0,n.useState)(a),[o,c]=(0,n.useState)(t||[]),[u,m]=(0,n.useState)(l||[]),[h,g]=(0,n.useState)(e),[f,p]=(0,n.useState)(null),x=(0,n.useRef)(0),y=(0,n.useCallback)((0,K.default)(async e=>{if(!s)return;let t=Date.now();x.current=t;try{let l=await (0,d.keyListCall)(s,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,F.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===x.current&&l&&(g(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[s]);return(0,n.useEffect)(()=>{if(!e)return void g([]);let t=[...e];r["Team ID"]&&(t=t.filter(e=>e.team_id===r["Team ID"])),r["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===r["Organization ID"])),g(t)},[e,r]),(0,n.useEffect)(()=>{let e=async()=>{let e=await (0,U.fetchAllTeams)(s);e.length>0&&c(e);let t=await (0,U.fetchAllOrganizations)(s);t.length>0&&m(t)};s&&e()},[s]),(0,n.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{i({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...r,...e})},handleFilterReset:()=>{i(a),p(null),y(a)}}}({keys:X?.keys||[],teams:e,organizations:l}),eh=(0,n.useDeferredValue)(et),eg=(et||eh)&&!el,ef=eo??X?.total_count??0;(0,n.useEffect)(()=>{if(ea){let e=()=>{ea()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[ea]);let ep=(0,n.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(A.Tooltip,{title:l,children:(0,t.jsx)(S.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>c(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})}},{id:"status",header:"Status",size:100,enableSorting:!1,cell:({row:e})=>{let l=e.original;if(!0!==l.blocked)return(0,t.jsx)(R.Tag,{color:"green","data-testid":`key-status-${l.token_id}`,children:"Active"});let a=l.metadata?.scim_blocked===!0;return(0,t.jsx)(A.Tooltip,{title:a?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401.",children:(0,t.jsx)(R.Tag,{color:"red","data-testid":`key-status-${l.token_id}`,children:"Blocked"})})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let s=e?.find(e=>e.team_id===a),r=s?.team_alias||a,i=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=i.find(e=>e.organization_id===l),s=a?.organization_alias||l,r=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(M.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(D.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,s=l.user?.user_email??l.user_email??null,r=l.user_id??null,i="default_user_id"===r,n=a||s||r,o=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:s},{label:"User ID",value:r}].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)(L.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!i||a||s?(0,t.jsx)(M.Popover,{content:o,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:n||"-"})}):(0,t.jsx)(M.Popover,{content:o,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(G.default,{userId:r})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,s=a?.user_alias??null,r=a?.user_email??null,i="default_user_id"===l,n=s||r||l,o=(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:r},{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)(L.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!i||s||r?(0,t.jsx)(M.Popover,{content:o,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:n})}):(0,t.jsx)(M.Popover,{content:o,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(G.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(M.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(D.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(A.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,g.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,g.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(b.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(I.Text,{children:"All Proxy Models"})}):(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)(j.Icon,{icon:es[e.row.id]?f.ChevronDownIcon:p.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{er(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)(b.Badge,{size:"xs",color:"red",children:(0,t.jsx)(I.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(b.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(I.Text,{children:e.length>30?`${(0,$.getModelDisplayName)(e).slice(0,30)}...`:(0,$.getModelDisplayName)(e)})},l)),l.length>3&&!es[e.row.id]&&(0,t.jsx)(b.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(I.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),es[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)(b.Badge,{size:"xs",color:"red",children:(0,t.jsx)(I.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(b.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(I.Text,{children:e.length>30?`${(0,$.getModelDisplayName)(e).slice(0,30)}...`:(0,$.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"]})]})}}],[e,i]),ex=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ey=(0,w.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:u,pagination:J},onSortingChange:e=>{let t="function"==typeof e?e(u):e;if(q(t),t&&t.length>0){let e=t[0],l=e.id,s=e.desc?"desc":"asc";eu({...ei,"Sort By":l,"Sort Order":s},!0),a?.(l,s)}},onPaginationChange:Q,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),getPaginationRowModel:(0,v.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(ef/J.pageSize)});n.default.useEffect(()=>{s&&q([{id:s.sortBy,desc:"desc"===s.sortOrder}])},[s]);let{pageIndex:ew,pageSize:ev}=ey.getState().pagination,eb=Math.min((ew+1)*ev,ef),eS=`${ew*ev+1} - ${eb}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:o?(0,t.jsx)(W.default,{keyId:o.token,onClose:()=>c(null),keyData:o,teams:ec,onDelete:ea}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(H.default,{options:ex,onApplyFilters:eu,initialValues:ei,onResetFilters:em})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(P.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",eS," of ",ef," results"]}),(0,t.jsx)(E.Button,{type:"default",icon:(0,t.jsx)(T.SyncOutlined,{spin:eg}),onClick:()=>{ea()},disabled:eg,title:"Fetch data",children:eg?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(P.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ew+1," of ",ey.getPageCount()]}),ee?(0,t.jsx)(P.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.previousPage(),disabled:ee||!ey.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),ee?(0,t.jsx)(P.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.nextPage(),disabled:ee||!ey.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(_.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ey.getCenterTotalSize()},children:[(0,t.jsx)(k.TableHead,{children:ey.getHeaderGroups().map(e=>(0,t.jsx)(O.TableRow,{children:e.headers.map(e=>(0,t.jsx)(z.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,w.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(x.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(f.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(y.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ey.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(N.TableBody,{children:ee?(0,t.jsx)(O.TableRow,{children:(0,t.jsx)(C.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ey.getRowModel().rows.map(e=>(0,t.jsx)(O.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(C.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,w.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(O.TableRow,{children:(0,t.jsx)(C.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:m,teams:h,keys:g,setUserRole:f,userEmail:p,setUserEmail:x,setTeams:y,setKeys:w,premiumUser:v,organizations:b,addKey:S,createClicked:j,autoOpenCreate:_,prefillData:N})=>{let[C,k]=(0,n.useState)(null),[z,O]=(0,n.useState)(null),I=(0,i.useSearchParams)(),D=(0,l.getCookie)("token"),T=I.get("invitation_id"),[E,M]=(0,n.useState)(null),[P,R]=(0,n.useState)(null),[A,L]=(0,n.useState)([]),[$,U]=(0,n.useState)(null),[K,F]=(0,n.useState)(null);if((0,n.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,n.useEffect)(()=>{if(D){let e=(0,r.jwtDecode)(D);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),M(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),f(t)}else console.log("User role not defined");e.user_email?x(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&E&&m&&!C){let t=sessionStorage.getItem("userModels"+e);t?L(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(z)}`),(async()=>{try{let t=await (0,d.getProxyUISettings)(E);U(t);let l=await (0,d.userGetInfoV2)(E,e);k(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,d.modelAvailableCall)(E,e,m)).data.map(e=>e.id);console.log("available_model_names:",a),L(a),console.log("userModels:",A),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&B()}})(),(0,c.fetchTeams)(E,e,m,z,y))}},[e,D,E,m]),(0,n.useEffect)(()=>{E&&(async()=>{try{let e=await (0,d.keyInfoCall)(E,[E]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&B()}})()},[E]),(0,n.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(z)}, accessToken: ${E}, userID: ${e}, userRole: ${m}`),E&&(console.log("fetching teams"),(0,c.fetchTeams)(E,e,m,z,y))},[z]),(0,n.useEffect)(()=>{if(null!==g&&null!=K&&null!==K.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(g)}`),g))K.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===K.team_id&&(e+=t.spend);console.log(`sum: ${e}`),R(e)}else if(null!==g){let e=0;for(let t of g)e+=t.spend;R(e)}},[K]),null!=T)return(0,t.jsx)(o.default,{});function B(){(0,l.clearTokenCookies)();let e=(0,d.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==D)return console.log("All cookies before redirect:",document.cookie),B(),null;try{let e=(0,r.jwtDecode)(D);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),B(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),B(),null}if(null==E)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});null==m&&f("App Owner");let V="Admin Viewer"!==m&&"proxy_admin_viewer"!==m;return console.log("inside user dashboard, selected team",K),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[V&&(0,t.jsx)(u.default,{team:K,teams:h,data:g,addKey:S,autoOpenCreate:_,prefillData:N},K?K.team_id:null),(0,t.jsx)(q,{teams:h,organizations:b})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/05d900c88781d712.js b/litellm/proxy/_experimental/out/_next/static/chunks/05d900c88781d712.js deleted file mode 100644 index cdf2168b93..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/05d900c88781d712.js +++ /dev/null @@ -1 +0,0 @@ -(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])},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(739295),n=e.i(343794),a=e.i(931067),i=e.i(211577),l=e.i(392221),o=e.i(703923),c=e.i(914949),d=e.i(404948),s=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,r){var u,g=e.prefixCls,m=void 0===g?"rc-switch":g,p=e.className,h=e.checked,f=e.defaultChecked,b=e.disabled,$=e.loadingIcon,v=e.checkedChildren,y=e.unCheckedChildren,C=e.onClick,S=e.onChange,k=e.onKeyDown,w=(0,o.default)(e,s),x=(0,c.default)(!1,{value:h,defaultValue:f}),I=(0,l.default)(x,2),O=I[0],E=I[1];function N(e,t){var r=O;return b||(E(r=e),null==S||S(r,t)),r}var z=(0,n.default)(m,p,(u={},(0,i.default)(u,"".concat(m,"-checked"),O),(0,i.default)(u,"".concat(m,"-disabled"),b),u));return t.createElement("button",(0,a.default)({},w,{type:"button",role:"switch","aria-checked":O,disabled:b,className:z,ref:r,onKeyDown:function(e){e.which===d.default.LEFT?N(!1,e):e.which===d.default.RIGHT&&N(!0,e),null==k||k(e)},onClick:function(e){var t=N(!O,e);null==C||C(t,e)}}),$,t.createElement("span",{className:"".concat(m,"-inner")},t.createElement("span",{className:"".concat(m,"-inner-checked")},v),t.createElement("span",{className:"".concat(m,"-inner-unchecked")},y)))});u.displayName="Switch";var g=e.i(121872),m=e.i(242064),p=e.i(937328),h=e.i(517455);e.i(296059);var f=e.i(915654);e.i(262370);var b=e.i(135551),$=e.i(183293),v=e.i(246422),y=e.i(838378);let C=(0,v.genStyleHooks)("Switch",e=>{let t=(0,y.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:(0,f.unit)(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:a,innerMaxMargin:i,handleSize:l,calc:o}=e,c=`${t}-inner`,d=(0,f.unit)(o(l).add(o(n).mul(2)).equal()),s=(0,f.unit)(o(i).mul(2).equal());return{[t]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${c}-checked, ${c}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${s})`,marginInlineEnd:`calc(100% - ${d} + ${s})`},[`${c}-unchecked`]:{marginTop:o(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${c}`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${s})`,marginInlineEnd:`calc(-100% + ${d} - ${s})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:o(n).mul(2).equal(),marginInlineEnd:o(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:o(n).mul(-1).mul(2).equal(),marginInlineEnd:o(n).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:r,handleBg:n,handleShadow:a,handleSize:i,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:r,insetInlineStart:r,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:l(i).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(l(i).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:a,innerMinMarginSM:i,innerMaxMarginSM:l,handleSizeSM:o,calc:c}=e,d=`${t}-inner`,s=(0,f.unit)(c(o).add(c(n).mul(2)).equal()),u=(0,f.unit)(c(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:r,lineHeight:(0,f.unit)(r),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:i,[`${d}-checked, ${d}-unchecked`]:{minHeight:r},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${u})`,marginInlineEnd:`calc(100% - ${s} + ${u})`},[`${d}-unchecked`]:{marginTop:c(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:c(c(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:l,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${u})`,marginInlineEnd:`calc(-100% + ${s} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(c(o).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:a}=e,i=t*r,l=n/2,o=i-4,c=l-4;return{trackHeight:i,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:a,handleSize:o,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}});var S=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let k=t.forwardRef((e,a)=>{let{prefixCls:i,size:l,disabled:o,loading:d,className:s,rootClassName:f,style:b,checked:$,value:v,defaultChecked:y,defaultValue:k,onChange:w}=e,x=S(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[I,O]=(0,c.default)(!1,{value:null!=$?$:v,defaultValue:null!=y?y:k}),{getPrefixCls:E,direction:N,switch:z}=t.useContext(m.ConfigContext),j=t.useContext(p.default),P=(null!=o?o:j)||d,T=E("switch",i),M=t.createElement("div",{className:`${T}-handle`},d&&t.createElement(r.default,{className:`${T}-loading-icon`})),[B,q,H]=C(T),R=(0,h.default)(l),L=(0,n.default)(null==z?void 0:z.className,{[`${T}-small`]:"small"===R,[`${T}-loading`]:d,[`${T}-rtl`]:"rtl"===N},s,f,q,H),G=Object.assign(Object.assign({},null==z?void 0:z.style),b);return B(t.createElement(g.default,{component:"Switch",disabled:P},t.createElement(u,Object.assign({},x,{checked:I,onChange:(...e)=>{O(e[0]),null==w||w.apply(void 0,e)},prefixCls:T,className:L,style:G,disabled:P,ref:a,loadingIcon:M}))))});k.__ANT_SWITCH=!0,e.s(["Switch",0,k],790848)},475254,e=>{"use strict";var t=e.i(271645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:c,iconNode:d,...s},u)=>(0,t.createElement)("svg",{ref:u,...a,width:r,height:r,stroke:e,strokeWidth:l?24*Number(i)/Number(r):i,className:n("lucide",o),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(s)&&{"aria-hidden":"true"},...s},[...d.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(c)?c:[c]])),l=(e,a)=>{let l=(0,t.forwardRef)(({className:l,...o},c)=>(0,t.createElement)(i,{ref:c,iconNode:a,className:n(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=r(e),l};e.s(["default",()=>l],475254)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var a=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["default",0,i],959013)},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),n=e.i(673706),a=e.i(271645);let i=a.default.forwardRef((e,i)=>{let{color:l,className:o,children:c}=e;return a.default.createElement("p",{ref:i,className:(0,r.tremorTwMerge)("text-tremor-default",l?(0,n.getColorClassNames)(l,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),o)},c)});i.displayName="Text",e.s(["default",()=>i],936325),e.s(["Text",()=>i],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(480731),a=e.i(95779),i=e.i(444755),l=e.i(673706);let o=(0,l.makeClassName)("Card"),c=r.default.forwardRef((e,c)=>{let{decoration:d="",decorationColor:s,children:u,className:g}=e,m=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:c,className:(0,i.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",s?(0,l.getColorClassNames)(s,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case n.HorizontalPositions.Left:return"border-l-4";case n.VerticalPositions.Top:return"border-t-4";case n.HorizontalPositions.Right:return"border-r-4";case n.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),g)},m),u)});c.displayName="Card",e.s(["Card",()=>c],304967)},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(529681),a=e.i(702779),i=e.i(563113),l=e.i(763731),o=e.i(121872),c=e.i(242064);e.i(296059);var d=e.i(915654);e.i(262370);var s=e.i(135551),u=e.i(183293),g=e.i(246422),m=e.i(838378);let p=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,a=e.fontSizeSM;return(0,m.mergeToken)(e,{tagFontSize:a,tagLineHeight:(0,d.unit)(n(e.lineHeightSM).mul(a).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},h=e=>({defaultBg:new s.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),f=(0,g.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:a,calc:i}=e,l=i(n).sub(r).equal(),o=i(t).sub(r).equal();return{[a]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:l}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(p(e)),h);var 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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let $=t.forwardRef((e,n)=>{let{prefixCls:a,style:i,className:l,checked:o,children:d,icon:s,onChange:u,onClick:g}=e,m=b(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:h}=t.useContext(c.ConfigContext),$=p("tag",a),[v,y,C]=f($),S=(0,r.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==h?void 0:h.className,l,y,C);return v(t.createElement("span",Object.assign({},m,{ref:n,style:Object.assign(Object.assign({},i),null==h?void 0:h.style),className:S,onClick:e=>{null==u||u(!o),null==g||g(e)}}),s,t.createElement("span",null,d)))});var v=e.i(403541);let y=(0,g.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=p(e),(0,v.genPresetColor)(t,(e,{textColor:r,lightBorderColor:n,lightColor:a,darkColor:i})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:r,background:a,borderColor:n,"&-inverse":{color:t.colorTextLightSolid,background:i,borderColor:i},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},h),C=(e,t,r)=>{let n="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},S=(0,g.genSubStyleComponent)(["Tag","status"],e=>{let t=p(e);return[C(t,"success","Success"),C(t,"processing","Info"),C(t,"error","Error"),C(t,"warning","Warning")]},h);var k=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let w=t.forwardRef((e,d)=>{let{prefixCls:s,className:u,rootClassName:g,style:m,children:p,icon:h,color:b,onClose:$,bordered:v=!0,visible:C}=e,w=k(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:x,direction:I,tag:O}=t.useContext(c.ConfigContext),[E,N]=t.useState(!0),z=(0,n.default)(w,["closeIcon","closable"]);t.useEffect(()=>{void 0!==C&&N(C)},[C]);let j=(0,a.isPresetColor)(b),P=(0,a.isPresetStatusColor)(b),T=j||P,M=Object.assign(Object.assign({backgroundColor:b&&!T?b:void 0},null==O?void 0:O.style),m),B=x("tag",s),[q,H,R]=f(B),L=(0,r.default)(B,null==O?void 0:O.className,{[`${B}-${b}`]:T,[`${B}-has-color`]:b&&!T,[`${B}-hidden`]:!E,[`${B}-rtl`]:"rtl"===I,[`${B}-borderless`]:!v},u,g,H,R),G=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||N(!1)},[,A]=(0,i.useClosable)((0,i.pickClosable)(e),(0,i.pickClosable)(O),{closable:!1,closeIconRender:e=>{let n=t.createElement("span",{className:`${B}-close-icon`,onClick:G},e);return(0,l.replaceElement)(e,n,e=>({onClick:t=>{var r;null==(r=null==e?void 0:e.onClick)||r.call(e,t),G(t)},className:(0,r.default)(null==e?void 0:e.className,`${B}-close-icon`)}))}}),W="function"==typeof w.onClick||p&&"a"===p.type,D=h||null,X=D?t.createElement(t.Fragment,null,D,p&&t.createElement("span",null,p)):p,F=t.createElement("span",Object.assign({},z,{ref:d,className:L,style:M}),X,A,j&&t.createElement(y,{key:"preset",prefixCls:B}),P&&t.createElement(S,{key:"status",prefixCls:B}));return q(W?t.createElement(o.default,{component:"Tag"},F):F)});w.CheckableTag=$,e.s(["Tag",0,w],262218)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(876556);function a(e){return["small","middle","large"].includes(e)}function i(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>a,"isValidGapNumber",()=>i],908286);var l=e.i(242064),o=e.i(249616),c=e.i(372409),d=e.i(246422);let s=(0,d.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:a,paddingXS:i,fontSizeLG:l,fontSizeSM:o,borderRadiusLG:d,borderRadiusSM:s,colorBgContainerDisabled:u,lineWidth:g}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:n,margin:0,background:u,borderWidth:g,borderStyle:"solid",borderColor:a,borderRadius:r,"&-large":{fontSize:l,borderRadius:d},"&-small":{paddingInline:i,borderRadius:s,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,c.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let g=t.default.forwardRef((e,n)=>{let{className:a,children:i,style:c,prefixCls:d}=e,g=u(e,["className","children","style","prefixCls"]),{getPrefixCls:m,direction:p}=t.default.useContext(l.ConfigContext),h=m("space-addon",d),[f,b,$]=s(h),{compactItemClassnames:v,compactSize:y}=(0,o.useCompactItemContext)(h,p),C=(0,r.default)(h,b,v,$,{[`${h}-${y}`]:y},a);return f(t.default.createElement("div",Object.assign({ref:n,className:C,style:c},g),i))}),m=t.default.createContext({latestIndex:0}),p=m.Provider,h=({className:e,index:r,children:n,split:a,style:i})=>{let{latestIndex:l}=t.useContext(m);return null==n?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:i},n),r{let t=(0,f.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var $=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let v=t.forwardRef((e,o)=>{var c;let{getPrefixCls:d,direction:s,size:u,className:g,style:m,classNames:f,styles:v}=(0,l.useComponentConfig)("space"),{size:y=null!=u?u:"small",align:C,className:S,rootClassName:k,children:w,direction:x="horizontal",prefixCls:I,split:O,style:E,wrap:N=!1,classNames:z,styles:j}=e,P=$(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[T,M]=Array.isArray(y)?y:[y,y],B=a(M),q=a(T),H=i(M),R=i(T),L=(0,n.default)(w,{keepEmpty:!0}),G=void 0===C&&"horizontal"===x?"center":C,A=d("space",I),[W,D,X]=b(A),F=(0,r.default)(A,g,D,`${A}-${x}`,{[`${A}-rtl`]:"rtl"===s,[`${A}-align-${G}`]:G,[`${A}-gap-row-${M}`]:B,[`${A}-gap-col-${T}`]:q},S,k,X),V=(0,r.default)(`${A}-item`,null!=(c=null==z?void 0:z.item)?c:f.item),_=Object.assign(Object.assign({},v.item),null==j?void 0:j.item),K=L.map((e,r)=>{let n=(null==e?void 0:e.key)||`${V}-${r}`;return t.createElement(h,{className:V,key:n,index:r,split:O,style:_},e)}),U=t.useMemo(()=>({latestIndex:L.reduce((e,t,r)=>null!=t?r:e,0)}),[L]);if(0===L.length)return null;let Q={};return N&&(Q.flexWrap="wrap"),!q&&R&&(Q.columnGap=T),!B&&H&&(Q.rowGap=M),W(t.createElement("div",Object.assign({ref:o,className:F,style:Object.assign(Object.assign(Object.assign({},Q),m),E)},P),t.createElement(p,{value:U},K)))});v.Compact=o.default,v.Addon=g,e.s(["default",0,v],38243)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(242064),a=e.i(517455);e.i(296059);var i=e.i(915654),l=e.i(183293),o=e.i(246422),c=e.i(838378);let d=(0,o.genStyleHooks)("Divider",e=>{let t=(0,c.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:a,textPaddingInline:o,orientationMargin:c,verticalMarginInline:d}=e;return{[t]:Object.assign(Object.assign({},(0,l.resetComponent)(e)),{borderBlockStart:`${(0,i.unit)(a)} solid ${n}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:d,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,i.unit)(a)} solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,i.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,i.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,i.unit)(a)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${c} * 100%)`},"&::after":{width:`calc(100% - ${c} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${c} * 100%)`},"&::after":{width:`calc(${c} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${(0,i.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:n,borderStyle:"dotted",borderWidth:`${(0,i.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var s=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:i,direction:l,className:o,style:c}=(0,n.useComponentConfig)("divider"),{prefixCls:g,type:m="horizontal",orientation:p="center",orientationMargin:h,className:f,rootClassName:b,children:$,dashed:v,variant:y="solid",plain:C,style:S,size:k}=e,w=s(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),x=i("divider",g),[I,O,E]=d(x),N=u[(0,a.default)(k)],z=!!$,j=t.useMemo(()=>"left"===p?"rtl"===l?"end":"start":"right"===p?"rtl"===l?"start":"end":p,[l,p]),P="start"===j&&null!=h,T="end"===j&&null!=h,M=(0,r.default)(x,o,O,E,`${x}-${m}`,{[`${x}-with-text`]:z,[`${x}-with-text-${j}`]:z,[`${x}-dashed`]:!!v,[`${x}-${y}`]:"solid"!==y,[`${x}-plain`]:!!C,[`${x}-rtl`]:"rtl"===l,[`${x}-no-default-orientation-margin-start`]:P,[`${x}-no-default-orientation-margin-end`]:T,[`${x}-${N}`]:!!N},f,b),B=t.useMemo(()=>"number"==typeof h?h:/^\d+$/.test(h)?Number(h):h,[h]);return I(t.createElement("div",Object.assign({className:M,style:Object.assign(Object.assign({},c),S)},w,{role:"separator"}),$&&"vertical"!==m&&t.createElement("span",{className:`${x}-inner-text`,style:{marginInlineStart:P?B:void 0,marginInlineEnd:T?B:void 0}},$)))}],312361)},801312,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var a=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(a.default,(0,t.default)({},e,{ref:i,icon:n}))});e.s(["default",0,i],801312)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/be5ddb5784b2b78a.js b/litellm/proxy/_experimental/out/_next/static/chunks/0636443d6303b49b.js similarity index 64% rename from litellm/proxy/_experimental/out/_next/static/chunks/be5ddb5784b2b78a.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0636443d6303b49b.js index 549a73ad34..0f11efb1ab 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/be5ddb5784b2b78a.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0636443d6303b49b.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,384767,e=>{"use strict";var t=e.i(843476),r=e.i(599724),n=e.i(271645),l=e.i(389083);let a=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:"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(764205);let s=function({vectorStores:e,accessToken:s}){let[o,c]=(0,n.useState)([]);return(0,n.useEffect)(()=>{(async()=>{if(s&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(s);e.data&&c(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)}})()},[s,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)(a,{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)(l.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 n;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:(n=o.find(t=>t.vector_store_id===e))?`${n.vector_store_name||n.vector_store_id} (${n.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)(a,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=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:"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 c=e.i(871943),d=e.i(502547),u=e.i(592968);let g=function({mcpServers:e,mcpAccessGroups:a=[],mcpToolPermissions:s={},mcpToolsets:g=[],accessToken:m}){let[p,b]=(0,n.useState)([]),[h,x]=(0,n.useState)([]),[f,y]=(0,n.useState)(new Set),[v,j]=(0,n.useState)(new Set);(0,n.useEffect)(()=>{(async()=>{if(m&&e.length>0)try{let e=await (0,i.fetchMCPServers)(m);e&&Array.isArray(e)?b(e):e.data&&Array.isArray(e.data)&&b(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[m,e.length]),(0,n.useEffect)(()=>{(async()=>{if(m&&g.length>0)try{let e=await (0,i.fetchMCPToolsets)(m),t=Array.isArray(e)?e.filter(e=>g.includes(e.toolset_id)):[];x(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[m,g.length]);let $=[...e.map(e=>({type:"server",value:e})),...a.map(e=>({type:"accessGroup",value:e}))],O=$.length+g.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)(o,{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)(l.Badge,{color:"blue",size:"xs",children:O})]}),O>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[$.map((e,r)=>{let n="server"===e.type?s[e.value]:void 0,l=n&&n.length>0,a=f.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return l&&(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 ${l?"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)(u.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 flex-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} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),l&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:n.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===n.length?"tool":"tools"}),a?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(d.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l&&a&&(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:n.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)}),g.length>0&&g.map((e,r)=>{let n=h.find(t=>t.toolset_id===e),l=v.has(e),a=n?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>a>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 ${a>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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:n?.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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),a>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:a}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===a?"tool":"tools"}),l?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(d.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a>0&&l&&n&&(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:n.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)(o,{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"})]})]})},m=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:"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"}))}),p=function({agents:e,agentAccessGroups:a=[],accessToken:s}){let[o,c]=(0,n.useState)([]);(0,n.useEffect)(()=>{(async()=>{if(s&&e.length>0)try{let e=await (0,i.getAgentsList)(s);e&&e.agents&&Array.isArray(e.agents)&&c(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[s,e.length]);let d=[...e.map(e=>({type:"agent",value:e})),...a.map(e=>({type:"accessGroup",value:e}))],g=d.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)(m,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(l.Badge,{color:"purple",size:"xs",children:g})]}),g>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:d.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)(u.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 flex-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 flex-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 uppercase tracking-wide flex-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)(m,{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:n="card",className:l="",accessToken:a}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],c=e?.mcp_access_groups||[],d=e?.mcp_tool_permissions||{},u=e?.mcp_toolsets||[],m=e?.agents||[],b=e?.agent_access_groups||[],h=(0,t.jsxs)("div",{className:"card"===n?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(s,{vectorStores:i,accessToken:a}),(0,t.jsx)(g,{mcpServers:o,mcpAccessGroups:c,mcpToolPermissions:d,mcpToolsets:u,accessToken:a}),(0,t.jsx)(p,{agents:m,agentAccessGroups:b,accessToken:a})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${l}`,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"})]})}),h]}):(0,t.jsxs)("div",{className:`${l}`,children:[(0,t.jsx)(r.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),h]})}],384767)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(908206),l=e.i(242064),a=e.i(517455),i=e.i(150073);let s={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},o=t.default.createContext({});var c=e.i(876556),d=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r},u=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let g=e=>{let{itemPrefixCls:n,component:l,span:a,className:i,style:s,labelStyle:c,contentStyle:d,bordered:u,label:g,content:m,colon:p,type:b,styles:h}=e,{classNames:x}=t.useContext(o),f=Object.assign(Object.assign({},c),null==h?void 0:h.label),y=Object.assign(Object.assign({},d),null==h?void 0:h.content);if(u)return t.createElement(l,{colSpan:a,style:s,className:(0,r.default)(i,{[`${n}-item-${b}`]:"label"===b||"content"===b,[null==x?void 0:x.label]:(null==x?void 0:x.label)&&"label"===b,[null==x?void 0:x.content]:(null==x?void 0:x.content)&&"content"===b})},null!=g&&t.createElement("span",{style:f},g),null!=m&&t.createElement("span",{style:y},m));return t.createElement(l,{colSpan:a,style:s,className:(0,r.default)(`${n}-item`,i)},t.createElement("div",{className:`${n}-item-container`},null!=g&&t.createElement("span",{style:f,className:(0,r.default)(`${n}-item-label`,null==x?void 0:x.label,{[`${n}-item-no-colon`]:!p})},g),null!=m&&t.createElement("span",{style:y,className:(0,r.default)(`${n}-item-content`,null==x?void 0:x.content)},m)))};function m(e,{colon:r,prefixCls:n,bordered:l},{component:a,type:i,showLabel:s,showContent:o,labelStyle:c,contentStyle:d,styles:u}){return e.map(({label:e,children:m,prefixCls:p=n,className:b,style:h,labelStyle:x,contentStyle:f,span:y=1,key:v,styles:j},$)=>"string"==typeof a?t.createElement(g,{key:`${i}-${v||$}`,className:b,style:h,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),x),null==j?void 0:j.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),f),null==j?void 0:j.content)},span:y,colon:r,component:a,itemPrefixCls:p,bordered:l,label:s?e:null,content:o?m:null,type:i}):[t.createElement(g,{key:`label-${v||$}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),h),x),null==j?void 0:j.label),span:1,colon:r,component:a[0],itemPrefixCls:p,bordered:l,label:e,type:"label"}),t.createElement(g,{key:`content-${v||$}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),h),f),null==j?void 0:j.content),span:2*y-1,component:a[1],itemPrefixCls:p,bordered:l,content:m,type:"content"})])}let p=e=>{let r=t.useContext(o),{prefixCls:n,vertical:l,row:a,index:i,bordered:s}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${n}-row`},m(a,e,Object.assign({component:"th",type:"label",showLabel:!0},r))),t.createElement("tr",{key:`content-${i}`,className:`${n}-row`},m(a,e,Object.assign({component:"td",type:"content",showContent:!0},r)))):t.createElement("tr",{key:i,className:`${n}-row`},m(a,e,Object.assign({component:s?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},r)))};e.i(296059);var b=e.i(915654),h=e.i(183293),x=e.i(246422),f=e.i(838378);let y=(0,x.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:r,itemPaddingBottom:n,itemPaddingEnd:l,colonMarginRight:a,colonMarginLeft:i,titleMarginBottom:s}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,h.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:r}=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:r,"&::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:s},[`${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:r,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:n,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,b.unit)(i)} ${(0,b.unit)(a)}`},[`&${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,f.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 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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let j=e=>{let g,{prefixCls:m,title:b,extra:h,column:x,colon:f=!0,bordered:j,layout:$,children:O,className:w,rootClassName:S,style:N,size:C,labelStyle:k,contentStyle:E,styles:T,items:B,classNames:z}=e,P=v(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:M,direction:L,className:I,style:R,classNames:_,styles:G}=(0,l.useComponentConfig)("descriptions"),H=M("descriptions",m),A=(0,i.default)(),W=t.useMemo(()=>{var e;return"number"==typeof x?x:null!=(e=(0,n.matchScreen)(A,Object.assign(Object.assign({},s),x)))?e:3},[A,x]),D=(g=t.useMemo(()=>B||(0,c.default)(O).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[B,O]),t.useMemo(()=>g.map(e=>{var{span:t}=e,r=d(e,["span"]);return"filled"===t?Object.assign(Object.assign({},r),{filled:!0}):Object.assign(Object.assign({},r),{span:"number"==typeof t?t:(0,n.matchScreen)(A,t)})}),[g,A])),F=(0,a.default)(C),X=((e,r)=>{let[n,l]=(0,t.useMemo)(()=>{let t,n,l,a;return t=[],n=[],l=!1,a=0,r.filter(e=>e).forEach(r=>{let{filled:i}=r,s=u(r,["filled"]);if(i){n.push(s),t.push(n),n=[],a=0;return}let o=e-a;(a+=r.span||1)>=e?(a>e?(l=!0,n.push(Object.assign(Object.assign({},s),{span:o}))):n.push(s),t.push(n),n=[],a=0):n.push(s)}),n.length>0&&t.push(n),[t=t.map(t=>{let r=t.reduce((e,t)=>e+(t.span||1),0);if(r({labelStyle:k,contentStyle:E,styles:{content:Object.assign(Object.assign({},G.content),null==T?void 0:T.content),label:Object.assign(Object.assign({},G.label),null==T?void 0:T.label)},classNames:{label:(0,r.default)(_.label,null==z?void 0:z.label),content:(0,r.default)(_.content,null==z?void 0:z.content)}}),[k,E,T,z,_,G]);return K(t.createElement(o.Provider,{value:Q},t.createElement("div",Object.assign({className:(0,r.default)(H,I,_.root,null==z?void 0:z.root,{[`${H}-${F}`]:F&&"default"!==F,[`${H}-bordered`]:!!j,[`${H}-rtl`]:"rtl"===L},w,S,q,V),style:Object.assign(Object.assign(Object.assign(Object.assign({},R),G.root),null==T?void 0:T.root),N)},P),(b||h)&&t.createElement("div",{className:(0,r.default)(`${H}-header`,_.header,null==z?void 0:z.header),style:Object.assign(Object.assign({},G.header),null==T?void 0:T.header)},b&&t.createElement("div",{className:(0,r.default)(`${H}-title`,_.title,null==z?void 0:z.title),style:Object.assign(Object.assign({},G.title),null==T?void 0:T.title)},b),h&&t.createElement("div",{className:(0,r.default)(`${H}-extra`,_.extra,null==z?void 0:z.extra),style:Object.assign(Object.assign({},G.extra),null==T?void 0:T.extra)},h)),t.createElement("div",{className:`${H}-view`},t.createElement("table",null,t.createElement("tbody",null,X.map((e,r)=>t.createElement(p,{key:r,index:r,colon:f,prefixCls:H,vertical:"vertical"===$,bordered:j,row:e}))))))))};j.Item=({children:e})=>e,e.s(["Descriptions",0,j],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={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),a=r.forwardRef(function(e,a){return r.createElement(l.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["ExclamationCircleOutlined",0,a],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(529681),l=e.i(242064),a=e.i(517455),i=e.i(185793),s=e.i(721369),o=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let c=e=>{var{prefixCls:n,className:a,hoverable:i=!0}=e,s=o(e,["prefixCls","className","hoverable"]);let{getPrefixCls:c}=t.useContext(l.ConfigContext),d=c("card",n),u=(0,r.default)(`${d}-grid`,a,{[`${d}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},s,{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:r,cardHeadPadding:n,colorBorderSecondary:l,boxShadowTertiary:a,bodyPadding:i,extraColor:s}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:n,headerPadding:l,tabsMarginBottom:a}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,marginBottom:-1,padding:`0 ${(0,d.unit)(l)}`,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,384767,e=>{"use strict";var t=e.i(843476),r=e.i(599724),n=e.i(271645),l=e.i(389083);let a=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:"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(764205);let s=function({vectorStores:e,accessToken:s}){let[o,c]=(0,n.useState)([]);return(0,n.useEffect)(()=>{(async()=>{if(s&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(s);e.data&&c(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)}})()},[s,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)(a,{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)(l.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 n;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:(n=o.find(t=>t.vector_store_id===e))?`${n.vector_store_name||n.vector_store_id} (${n.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)(a,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=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:"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 c=e.i(871943),d=e.i(502547),u=e.i(592968);let g=function({mcpServers:e,mcpAccessGroups:a=[],mcpToolPermissions:s={},mcpToolsets:g=[],accessToken:m}){let[p,b]=(0,n.useState)([]),[h,x]=(0,n.useState)([]),[f,y]=(0,n.useState)(new Set),[v,j]=(0,n.useState)(new Set);(0,n.useEffect)(()=>{(async()=>{if(m&&e.length>0)try{let e=await (0,i.fetchMCPServers)(m);e&&Array.isArray(e)?b(e):e.data&&Array.isArray(e.data)&&b(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[m,e.length]),(0,n.useEffect)(()=>{(async()=>{if(m&&g.length>0)try{let e=await (0,i.fetchMCPToolsets)(m),t=Array.isArray(e)?e.filter(e=>g.includes(e.toolset_id)):[];x(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[m,g.length]);let $=[...e.map(e=>({type:"server",value:e})),...a.map(e=>({type:"accessGroup",value:e}))],O=$.length+g.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)(o,{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)(l.Badge,{color:"blue",size:"xs",children:O})]}),O>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[$.map((e,r)=>{let n="server"===e.type?s[e.value]:void 0,l=n&&n.length>0,a=f.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return l&&(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 ${l?"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)(u.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 flex-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} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),l&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:n.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===n.length?"tool":"tools"}),a?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(d.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l&&a&&(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:n.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)}),g.length>0&&g.map((e,r)=>{let n=h.find(t=>t.toolset_id===e),l=v.has(e),a=n?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>a>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 ${a>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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:n?.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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),a>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:a}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===a?"tool":"tools"}),l?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(d.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a>0&&l&&n&&(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:n.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)(o,{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"})]})]})},m=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:"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"}))}),p=function({agents:e,agentAccessGroups:a=[],accessToken:s}){let[o,c]=(0,n.useState)([]);(0,n.useEffect)(()=>{(async()=>{if(s&&e.length>0)try{let e=await (0,i.getAgentsList)(s);e&&e.agents&&Array.isArray(e.agents)&&c(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[s,e.length]);let d=[...e.map(e=>({type:"agent",value:e})),...a.map(e=>({type:"accessGroup",value:e}))],g=d.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)(m,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(l.Badge,{color:"purple",size:"xs",children:g})]}),g>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:d.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)(u.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 flex-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 flex-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 uppercase tracking-wide flex-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)(m,{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:n="card",className:l="",accessToken:a}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],c=e?.mcp_access_groups||[],d=e?.mcp_tool_permissions||{},u=e?.mcp_toolsets||[],m=e?.agents||[],b=e?.agent_access_groups||[],h=e?.search_tools||[],x=(0,t.jsxs)("div",{className:"card"===n?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(s,{vectorStores:i,accessToken:a}),(0,t.jsx)(g,{mcpServers:o,mcpAccessGroups:c,mcpToolPermissions:d,mcpToolsets:u,accessToken:a}),(0,t.jsx)(p,{agents:m,agentAccessGroups:b,accessToken:a}),(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===h.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:h.join(", ")})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${l}`,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"})]})}),x]}):(0,t.jsxs)("div",{className:`${l}`,children:[(0,t.jsx)(r.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(908206),l=e.i(242064),a=e.i(517455),i=e.i(150073);let s={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},o=t.default.createContext({});var c=e.i(876556),d=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r},u=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let g=e=>{let{itemPrefixCls:n,component:l,span:a,className:i,style:s,labelStyle:c,contentStyle:d,bordered:u,label:g,content:m,colon:p,type:b,styles:h}=e,{classNames:x}=t.useContext(o),f=Object.assign(Object.assign({},c),null==h?void 0:h.label),y=Object.assign(Object.assign({},d),null==h?void 0:h.content);if(u)return t.createElement(l,{colSpan:a,style:s,className:(0,r.default)(i,{[`${n}-item-${b}`]:"label"===b||"content"===b,[null==x?void 0:x.label]:(null==x?void 0:x.label)&&"label"===b,[null==x?void 0:x.content]:(null==x?void 0:x.content)&&"content"===b})},null!=g&&t.createElement("span",{style:f},g),null!=m&&t.createElement("span",{style:y},m));return t.createElement(l,{colSpan:a,style:s,className:(0,r.default)(`${n}-item`,i)},t.createElement("div",{className:`${n}-item-container`},null!=g&&t.createElement("span",{style:f,className:(0,r.default)(`${n}-item-label`,null==x?void 0:x.label,{[`${n}-item-no-colon`]:!p})},g),null!=m&&t.createElement("span",{style:y,className:(0,r.default)(`${n}-item-content`,null==x?void 0:x.content)},m)))};function m(e,{colon:r,prefixCls:n,bordered:l},{component:a,type:i,showLabel:s,showContent:o,labelStyle:c,contentStyle:d,styles:u}){return e.map(({label:e,children:m,prefixCls:p=n,className:b,style:h,labelStyle:x,contentStyle:f,span:y=1,key:v,styles:j},$)=>"string"==typeof a?t.createElement(g,{key:`${i}-${v||$}`,className:b,style:h,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),x),null==j?void 0:j.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),f),null==j?void 0:j.content)},span:y,colon:r,component:a,itemPrefixCls:p,bordered:l,label:s?e:null,content:o?m:null,type:i}):[t.createElement(g,{key:`label-${v||$}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),h),x),null==j?void 0:j.label),span:1,colon:r,component:a[0],itemPrefixCls:p,bordered:l,label:e,type:"label"}),t.createElement(g,{key:`content-${v||$}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),h),f),null==j?void 0:j.content),span:2*y-1,component:a[1],itemPrefixCls:p,bordered:l,content:m,type:"content"})])}let p=e=>{let r=t.useContext(o),{prefixCls:n,vertical:l,row:a,index:i,bordered:s}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${n}-row`},m(a,e,Object.assign({component:"th",type:"label",showLabel:!0},r))),t.createElement("tr",{key:`content-${i}`,className:`${n}-row`},m(a,e,Object.assign({component:"td",type:"content",showContent:!0},r)))):t.createElement("tr",{key:i,className:`${n}-row`},m(a,e,Object.assign({component:s?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},r)))};e.i(296059);var b=e.i(915654),h=e.i(183293),x=e.i(246422),f=e.i(838378);let y=(0,x.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:r,itemPaddingBottom:n,itemPaddingEnd:l,colonMarginRight:a,colonMarginLeft:i,titleMarginBottom:s}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,h.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:r}=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:r,"&::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:s},[`${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:r,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:n,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,b.unit)(i)} ${(0,b.unit)(a)}`},[`&${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,f.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 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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let j=e=>{let g,{prefixCls:m,title:b,extra:h,column:x,colon:f=!0,bordered:j,layout:$,children:O,className:w,rootClassName:S,style:N,size:C,labelStyle:k,contentStyle:E,styles:T,items:B,classNames:z}=e,P=v(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:M,direction:L,className:I,style:R,classNames:_,styles:G}=(0,l.useComponentConfig)("descriptions"),H=M("descriptions",m),A=(0,i.default)(),W=t.useMemo(()=>{var e;return"number"==typeof x?x:null!=(e=(0,n.matchScreen)(A,Object.assign(Object.assign({},s),x)))?e:3},[A,x]),D=(g=t.useMemo(()=>B||(0,c.default)(O).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[B,O]),t.useMemo(()=>g.map(e=>{var{span:t}=e,r=d(e,["span"]);return"filled"===t?Object.assign(Object.assign({},r),{filled:!0}):Object.assign(Object.assign({},r),{span:"number"==typeof t?t:(0,n.matchScreen)(A,t)})}),[g,A])),F=(0,a.default)(C),X=((e,r)=>{let[n,l]=(0,t.useMemo)(()=>{let t,n,l,a;return t=[],n=[],l=!1,a=0,r.filter(e=>e).forEach(r=>{let{filled:i}=r,s=u(r,["filled"]);if(i){n.push(s),t.push(n),n=[],a=0;return}let o=e-a;(a+=r.span||1)>=e?(a>e?(l=!0,n.push(Object.assign(Object.assign({},s),{span:o}))):n.push(s),t.push(n),n=[],a=0):n.push(s)}),n.length>0&&t.push(n),[t=t.map(t=>{let r=t.reduce((e,t)=>e+(t.span||1),0);if(r({labelStyle:k,contentStyle:E,styles:{content:Object.assign(Object.assign({},G.content),null==T?void 0:T.content),label:Object.assign(Object.assign({},G.label),null==T?void 0:T.label)},classNames:{label:(0,r.default)(_.label,null==z?void 0:z.label),content:(0,r.default)(_.content,null==z?void 0:z.content)}}),[k,E,T,z,_,G]);return K(t.createElement(o.Provider,{value:Q},t.createElement("div",Object.assign({className:(0,r.default)(H,I,_.root,null==z?void 0:z.root,{[`${H}-${F}`]:F&&"default"!==F,[`${H}-bordered`]:!!j,[`${H}-rtl`]:"rtl"===L},w,S,q,V),style:Object.assign(Object.assign(Object.assign(Object.assign({},R),G.root),null==T?void 0:T.root),N)},P),(b||h)&&t.createElement("div",{className:(0,r.default)(`${H}-header`,_.header,null==z?void 0:z.header),style:Object.assign(Object.assign({},G.header),null==T?void 0:T.header)},b&&t.createElement("div",{className:(0,r.default)(`${H}-title`,_.title,null==z?void 0:z.title),style:Object.assign(Object.assign({},G.title),null==T?void 0:T.title)},b),h&&t.createElement("div",{className:(0,r.default)(`${H}-extra`,_.extra,null==z?void 0:z.extra),style:Object.assign(Object.assign({},G.extra),null==T?void 0:T.extra)},h)),t.createElement("div",{className:`${H}-view`},t.createElement("table",null,t.createElement("tbody",null,X.map((e,r)=>t.createElement(p,{key:r,index:r,colon:f,prefixCls:H,vertical:"vertical"===$,bordered:j,row:e}))))))))};j.Item=({children:e})=>e,e.s(["Descriptions",0,j],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={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),a=r.forwardRef(function(e,a){return r.createElement(l.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["ExclamationCircleOutlined",0,a],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(529681),l=e.i(242064),a=e.i(517455),i=e.i(185793),s=e.i(721369),o=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 l=0,n=Object.getOwnPropertySymbols(e);lt.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};let c=e=>{var{prefixCls:n,className:a,hoverable:i=!0}=e,s=o(e,["prefixCls","className","hoverable"]);let{getPrefixCls:c}=t.useContext(l.ConfigContext),d=c("card",n),u=(0,r.default)(`${d}-grid`,a,{[`${d}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},s,{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:r,cardHeadPadding:n,colorBorderSecondary:l,boxShadowTertiary:a,bodyPadding:i,extraColor:s}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:n,headerPadding:l,tabsMarginBottom:a}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,marginBottom:-1,padding:`0 ${(0,d.unit)(l)}`,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),{[` > ${r}-typography, > ${r}-typography-edit-content `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:a,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:s,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:i,borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:n,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7c36bfe1ba5e3ba8.js b/litellm/proxy/_experimental/out/_next/static/chunks/0c3e8651e0e97232.js similarity index 63% rename from litellm/proxy/_experimental/out/_next/static/chunks/7c36bfe1ba5e3ba8.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0c3e8651e0e97232.js index 52b32d16f8..de6040bfaf 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/7c36bfe1ba5e3ba8.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0c3e8651e0e97232.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,745434,e=>{"use strict";var t=e.i(843476),l=e.i(994388),i=e.i(389083),s=e.i(599724),a=e.i(592968),n=e.i(262218),r=e.i(166406),c=e.i(827252);e.s(["getAgentHubTableColumns",0,(e,o,d=!1)=>[{header:"Agent Name",accessorKey:"name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(s.Text,{className:"font-medium text-sm",children:l.name}),(0,t.jsx)(a.Tooltip,{title:"Copy agent name",children:(0,t.jsx)(r.CopyOutlined,{onClick:()=>o(l.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(s.Text,{className:"text-xs text-gray-600",children:l.description})})]})}},{header:"Description",accessorKey:"description",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(s.Text,{className:"text-xs line-clamp-2",children:l.description||"-"})},meta:{className:"hidden md:table-cell"}},{header:"Version",accessorKey:"version",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsxs)(i.Badge,{color:"blue",size:"sm",children:["v",l.version]})},meta:{className:"hidden lg:table-cell"}},{header:"Protocol",accessorKey:"protocolVersion",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(s.Text,{className:"text-xs",children:l.protocolVersion||"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let l=e.original.skills||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(s.Text,{className:"text-xs font-medium",children:[l.length," skill",1!==l.length?"s":""]}),l.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,2).map(e=>(0,t.jsx)(n.Tag,{color:"purple",className:"text-xs",children:e.name},e.id)),l.length>2&&(0,t.jsxs)(s.Text,{className:"text-xs text-gray-500",children:["+",l.length-2]})]})]})}},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let l=Object.entries(e.original.capabilities||{}).filter(([e,t])=>!0===t).map(([e])=>e);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(s.Text,{className:"text-gray-500 text-xs",children:"-"}):l.map(e=>(0,t.jsx)(i.Badge,{color:"green",size:"xs",children:e},e))})}},{header:"I/O Modes",accessorKey:"defaultInputModes",enableSorting:!1,cell:({row:e})=>{let l=e.original,i=l.defaultInputModes||[],a=l.defaultOutputModes||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(s.Text,{className:"text-xs",children:[(0,t.jsx)("span",{className:"font-medium",children:"In:"})," ",i.join(", ")||"-"]}),(0,t.jsxs)(s.Text,{className:"text-xs",children:[(0,t.jsx)("span",{className:"font-medium",children:"Out:"})," ",a.join(", ")||"-"]})]})},meta:{className:"hidden xl:table-cell"}},{header:"Public",accessorKey:"is_public",enableSorting:!0,sortingFn:(e,t)=>(!0===e.original.is_public)-(!0===t.original.is_public),cell:({row:e})=>!0===e.original.is_public?(0,t.jsx)(i.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(i.Badge,{color:"gray",size:"xs",children:"No"}),meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:i})=>{let s=i.original;return(0,t.jsxs)(l.Button,{size:"xs",variant:"secondary",onClick:()=>e(s),icon:c.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}]])},280898,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(121229),i=e.i(864517),s=e.i(343794),a=e.i(931067),n=e.i(209428),r=e.i(211577),c=e.i(703923),o=e.i(404948),d=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function m(e){return"string"==typeof e}let x=function(e){var l,i,x,u,h,p=e.className,g=e.prefixCls,b=e.style,j=e.active,f=e.status,v=e.iconPrefix,y=e.icon,N=(e.wrapperStyle,e.stepNumber),S=e.disabled,k=e.description,$=e.title,T=e.subTitle,w=e.progressDot,C=e.stepIcon,_=e.tailContent,P=e.icons,M=e.stepIndex,I=e.onStepClick,B=e.onClick,z=e.render,A=(0,c.default)(e,d),O={};I&&!S&&(O.role="button",O.tabIndex=0,O.onClick=function(e){null==B||B(e),I(M)},O.onKeyDown=function(e){var t=e.which;(t===o.default.ENTER||t===o.default.SPACE)&&I(M)});var H=f||"wait",E=(0,s.default)("".concat(g,"-item"),"".concat(g,"-item-").concat(H),p,(h={},(0,r.default)(h,"".concat(g,"-item-custom"),y),(0,r.default)(h,"".concat(g,"-item-active"),j),(0,r.default)(h,"".concat(g,"-item-disabled"),!0===S),h)),F=(0,n.default)({},b),L=t.createElement("div",(0,a.default)({},A,{className:E,style:F}),t.createElement("div",(0,a.default)({onClick:B},O,{className:"".concat(g,"-item-container")}),t.createElement("div",{className:"".concat(g,"-item-tail")},_),t.createElement("div",{className:"".concat(g,"-item-icon")},(x=(0,s.default)("".concat(g,"-icon"),"".concat(v,"icon"),(l={},(0,r.default)(l,"".concat(v,"icon-").concat(y),y&&m(y)),(0,r.default)(l,"".concat(v,"icon-check"),!y&&"finish"===f&&(P&&!P.finish||!P)),(0,r.default)(l,"".concat(v,"icon-cross"),!y&&"error"===f&&(P&&!P.error||!P)),l)),u=t.createElement("span",{className:"".concat(g,"-icon-dot")}),i=w?"function"==typeof w?t.createElement("span",{className:"".concat(g,"-icon")},w(u,{index:N-1,status:f,title:$,description:k})):t.createElement("span",{className:"".concat(g,"-icon")},u):y&&!m(y)?t.createElement("span",{className:"".concat(g,"-icon")},y):P&&P.finish&&"finish"===f?t.createElement("span",{className:"".concat(g,"-icon")},P.finish):P&&P.error&&"error"===f?t.createElement("span",{className:"".concat(g,"-icon")},P.error):y||"finish"===f||"error"===f?t.createElement("span",{className:x}):t.createElement("span",{className:"".concat(g,"-icon")},N),C&&(i=C({index:N-1,status:f,title:$,description:k,node:i})),i)),t.createElement("div",{className:"".concat(g,"-item-content")},t.createElement("div",{className:"".concat(g,"-item-title")},$,T&&t.createElement("div",{title:"string"==typeof T?T:void 0,className:"".concat(g,"-item-subtitle")},T)),k&&t.createElement("div",{className:"".concat(g,"-item-description")},k))));return z&&(L=z(L)||null),L};var u=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function h(e){var l,i=e.prefixCls,o=void 0===i?"rc-steps":i,d=e.style,m=void 0===d?{}:d,h=e.className,p=(e.children,e.direction),g=e.type,b=void 0===g?"default":g,j=e.labelPlacement,f=e.iconPrefix,v=void 0===f?"rc":f,y=e.status,N=void 0===y?"process":y,S=e.size,k=e.current,$=void 0===k?0:k,T=e.progressDot,w=e.stepIcon,C=e.initial,_=void 0===C?0:C,P=e.icons,M=e.onChange,I=e.itemRender,B=e.items,z=(0,c.default)(e,u),A="inline"===b,O=A||void 0!==T&&T,H=A||void 0===p?"horizontal":p,E=A?void 0:S,F=(0,s.default)(o,"".concat(o,"-").concat(H),h,(l={},(0,r.default)(l,"".concat(o,"-").concat(E),E),(0,r.default)(l,"".concat(o,"-label-").concat(O?"vertical":void 0===j?"horizontal":j),"horizontal"===H),(0,r.default)(l,"".concat(o,"-dot"),!!O),(0,r.default)(l,"".concat(o,"-navigation"),"navigation"===b),(0,r.default)(l,"".concat(o,"-inline"),A),l)),L=function(e){M&&$!==e&&M(e)};return t.default.createElement("div",(0,a.default)({className:F,style:m},z),(void 0===B?[]:B).filter(function(e){return e}).map(function(e,l){var i=(0,n.default)({},e),s=_+l;return"error"===N&&l===$-1&&(i.className="".concat(o,"-next-error")),i.status||(s===$?i.status=N:s<$?i.status="finish":i.status="wait"),A&&(i.icon=void 0,i.subTitle=void 0),!i.render&&I&&(i.render=function(e){return I(i,e)}),t.default.createElement(x,(0,a.default)({},i,{active:s===$,stepNumber:s+1,stepIndex:s,key:s,prefixCls:o,iconPrefix:v,wrapperStyle:m,progressDot:O,stepIcon:w,icons:P,onStepClick:M&&L}))}))}h.Step=x;var p=e.i(242064),g=e.i(517455),b=e.i(150073),j=e.i(309821),f=e.i(491816);e.i(296059);var v=e.i(915654),y=e.i(183293),N=e.i(246422),S=e.i(838378);let k=(e,t)=>{let l=`${t.componentCls}-item`,i=`${e}IconColor`,s=`${e}TitleColor`,a=`${e}DescriptionColor`,n=`${e}TailColor`,r=`${e}IconBgColor`,c=`${e}IconBorderColor`,o=`${e}DotColor`;return{[`${l}-${e} ${l}-icon`]:{backgroundColor:t[r],borderColor:t[c],[`> ${t.componentCls}-icon`]:{color:t[i],[`${t.componentCls}-icon-dot`]:{background:t[o]}}},[`${l}-${e}${l}-custom ${l}-icon`]:{[`> ${t.componentCls}-icon`]:{color:t[o]}},[`${l}-${e} > ${l}-container > ${l}-content > ${l}-title`]:{color:t[s],"&::after":{backgroundColor:t[n]}},[`${l}-${e} > ${l}-container > ${l}-content > ${l}-description`]:{color:t[a]},[`${l}-${e} > ${l}-container > ${l}-tail::after`]:{backgroundColor:t[n]}}},$=(0,N.genStyleHooks)("Steps",e=>{let{colorTextDisabled:t,controlHeightLG:l,colorTextLightSolid:i,colorText:s,colorPrimary:a,colorTextDescription:n,colorTextQuaternary:r,colorError:c,colorBorderSecondary:o,colorSplit:d}=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(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,y.resetComponent)(e)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),(e=>{let{componentCls:t,motionDurationSlow:l}=e,i=`${t}-item`,s=`${i}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[i]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${i}-container > ${i}-tail, > ${i}-container > ${i}-content > ${i}-title::after`]:{display:"none"}}},[`${i}-container`]:{outline:"none",[`&:focus-visible ${s}`]:(0,y.genFocusOutline)(e)},[`${s}, ${i}-content`]:{display:"inline-block",verticalAlign:"top"},[s]:{width:e.iconSize,height:e.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:e.marginXS,fontSize:e.iconFontSize,fontFamily:e.fontFamily,lineHeight:(0,v.unit)(e.iconSize),textAlign:"center",borderRadius:e.iconSize,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} transparent`,transition:`background-color ${l}, border-color ${l}`,[`${t}-icon`]:{position:"relative",top:e.iconTop,color:e.colorPrimary,lineHeight:1}},[`${i}-tail`]:{position:"absolute",top:e.calc(e.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:e.lineWidth,background:e.colorSplit,borderRadius:e.lineWidth,transition:`background ${l}`,content:'""'}},[`${i}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:e.padding,color:e.colorText,fontSize:e.fontSizeLG,lineHeight:(0,v.unit)(e.titleLineHeight),"&::after":{position:"absolute",top:e.calc(e.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:e.lineWidth,background:e.processTailColor,content:'""'}},[`${i}-subtitle`]:{display:"inline",marginInlineStart:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize},[`${i}-description`]:{color:e.colorTextDescription,fontSize:e.fontSize}},k("wait",e)),k("process",e)),{[`${i}-process > ${i}-container > ${i}-title`]:{fontWeight:e.fontWeightStrong}}),k("finish",e)),k("error",e)),{[`${i}${t}-next-error > ${t}-item-title::after`]:{background:e.colorError},[`${i}-disabled`]:{cursor:"not-allowed"}})})(e)),(e=>{let{componentCls:t,motionDurationSlow:l}=e;return{[`& ${t}-item`]:{[`&:not(${t}-item-active)`]:{[`& > ${t}-item-container[role='button']`]:{cursor:"pointer",[`${t}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${t}-icon`]:{transition:`color ${l}`}},"&:hover":{[`${t}-item`]:{"&-title, &-subtitle, &-description":{color:e.colorPrimary}}}},[`&:not(${t}-item-process)`]:{[`& > ${t}-item-container[role='button']:hover`]:{[`${t}-item`]:{"&-icon":{borderColor:e.colorPrimary,[`${t}-icon`]:{color:e.colorPrimary}}}}}}},[`&${t}-horizontal:not(${t}-label-vertical)`]:{[`${t}-item`]:{paddingInlineStart:e.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${t}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:e.descriptionMaxWidth,whiteSpace:"normal"}}}}})(e)),(e=>{let{componentCls:t,customIconTop:l,customIconSize:i,customIconFontSize:s}=e;return{[`${t}-item-custom`]:{[`> ${t}-item-container > ${t}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${t}-icon`]:{top:l,width:i,height:i,fontSize:s,lineHeight:(0,v.unit)(i)}}},[`&:not(${t}-vertical)`]:{[`${t}-item-custom`]:{[`${t}-item-icon`]:{width:"auto",background:"none"}}}}})(e)),(e=>{let{componentCls:t,iconSizeSM:l,fontSizeSM:i,fontSize:s,colorTextDescription:a}=e;return{[`&${t}-small`]:{[`&${t}-horizontal:not(${t}-label-vertical) ${t}-item`]:{paddingInlineStart:e.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${t}-item-icon`]:{width:l,height:l,marginTop:0,marginBottom:0,marginInline:`0 ${(0,v.unit)(e.marginXS)}`,fontSize:i,lineHeight:(0,v.unit)(l),textAlign:"center",borderRadius:l},[`${t}-item-title`]:{paddingInlineEnd:e.paddingSM,fontSize:s,lineHeight:(0,v.unit)(l),"&::after":{top:e.calc(l).div(2).equal()}},[`${t}-item-description`]:{color:a,fontSize:s},[`${t}-item-tail`]:{top:e.calc(l).div(2).sub(e.paddingXXS).equal()},[`${t}-item-custom ${t}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${t}-icon`]:{fontSize:l,lineHeight:(0,v.unit)(l),transform:"none"}}}}})(e)),(e=>{let{componentCls:t,iconSizeSM:l,iconSize:i}=e;return{[`&${t}-vertical`]:{display:"flex",flexDirection:"column",[`> ${t}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${t}-item-icon`]:{float:"left",marginInlineEnd:e.margin},[`${t}-item-content`]:{display:"block",minHeight:e.calc(e.controlHeight).mul(1.5).equal(),overflow:"hidden"},[`${t}-item-title`]:{lineHeight:(0,v.unit)(i)},[`${t}-item-description`]:{paddingBottom:e.paddingSM}},[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.calc(i).div(2).sub(e.lineWidth).equal(),width:e.lineWidth,height:"100%",padding:`${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).add(i).equal())} 0 ${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).equal())}`,"&::after":{width:e.lineWidth,height:"100%"}},[`> ${t}-item:not(:last-child) > ${t}-item-container > ${t}-item-tail`]:{display:"block"},[` > ${t}-item > ${t}-item-container > ${t}-item-content > ${t}-item-title`]:{"&::after":{display:"none"}},[`&${t}-small ${t}-item-container`]:{[`${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.calc(l).div(2).sub(e.lineWidth).equal(),padding:`${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).add(l).equal())} 0 ${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).equal())}`},[`${t}-item-title`]:{lineHeight:(0,v.unit)(l)}}}}})(e)),(e=>{let{componentCls:t}=e,l=`${t}-item`;return{[`${t}-horizontal`]:{[`${l}-tail`]:{transform:"translateY(-50%)"}}}})(e)),(e=>{let{componentCls:t,iconSize:l,lineHeight:i,iconSizeSM:s}=e;return{[`&${t}-label-vertical`]:{[`${t}-item`]:{overflow:"visible","&-tail":{marginInlineStart:e.calc(l).div(2).add(e.controlHeightLG).equal(),padding:`0 ${(0,v.unit)(e.paddingLG)}`},"&-content":{display:"block",width:e.calc(l).div(2).add(e.controlHeightLG).mul(2).equal(),marginTop:e.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:e.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:e.marginXXS,marginInlineStart:0,lineHeight:i}},[`&${t}-small:not(${t}-dot)`]:{[`${t}-item`]:{"&-icon":{marginInlineStart:e.calc(l).sub(s).div(2).add(e.controlHeightLG).equal()}}}}}})(e)),(e=>{let{componentCls:t,descriptionMaxWidth:l,lineHeight:i,dotCurrentSize:s,dotSize:a,motionDurationSlow:n}=e;return{[`&${t}-dot, &${t}-dot${t}-small`]:{[`${t}-item`]:{"&-title":{lineHeight:i},"&-tail":{top:e.calc(e.dotSize).sub(e.calc(e.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:`${(0,v.unit)(e.calc(l).div(2).equal())} 0`,padding:0,"&::after":{width:`calc(100% - ${(0,v.unit)(e.calc(e.marginSM).mul(2).equal())})`,height:e.calc(e.lineWidth).mul(3).equal(),marginInlineStart:e.marginSM}},"&-icon":{width:a,height:a,marginInlineStart:e.calc(e.descriptionMaxWidth).sub(a).div(2).equal(),paddingInlineEnd:0,lineHeight:(0,v.unit)(a),background:"transparent",border:0,[`${t}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${n}`,"&::after":{position:"absolute",top:e.calc(e.marginSM).mul(-1).equal(),insetInlineStart:e.calc(a).sub(e.calc(e.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:e.calc(e.controlHeightLG).mul(1.5).equal(),height:e.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:l},[`&-process ${t}-item-icon`]:{position:"relative",top:e.calc(a).sub(s).div(2).equal(),width:s,height:s,lineHeight:(0,v.unit)(s),background:"none",marginInlineStart:e.calc(e.descriptionMaxWidth).sub(s).div(2).equal()},[`&-process ${t}-icon`]:{[`&:first-child ${t}-icon-dot`]:{insetInlineStart:0}}}},[`&${t}-vertical${t}-dot`]:{[`${t}-item-icon`]:{marginTop:e.calc(e.controlHeight).sub(a).div(2).equal(),marginInlineStart:0,background:"none"},[`${t}-item-process ${t}-item-icon`]:{marginTop:e.calc(e.controlHeight).sub(s).div(2).equal(),top:0,insetInlineStart:e.calc(a).sub(s).div(2).equal(),marginInlineStart:0},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:e.calc(e.controlHeight).sub(a).div(2).equal(),insetInlineStart:0,margin:0,padding:`${(0,v.unit)(e.calc(a).add(e.paddingXS).equal())} 0 ${(0,v.unit)(e.paddingXS)}`,"&::after":{marginInlineStart:e.calc(a).sub(e.lineWidth).div(2).equal()}},[`&${t}-small`]:{[`${t}-item-icon`]:{marginTop:e.calc(e.controlHeightSM).sub(a).div(2).equal()},[`${t}-item-process ${t}-item-icon`]:{marginTop:e.calc(e.controlHeightSM).sub(s).div(2).equal()},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:e.calc(e.controlHeightSM).sub(a).div(2).equal()}},[`${t}-item:first-child ${t}-icon-dot`]:{insetInlineStart:0},[`${t}-item-content`]:{width:"inherit"}}}})(e)),(e=>{let{componentCls:t,navContentMaxWidth:l,navArrowColor:i,stepsNavActiveColor:s,motionDurationSlow:a}=e;return{[`&${t}-navigation`]:{paddingTop:e.paddingSM,[`&${t}-small`]:{[`${t}-item`]:{"&-container":{marginInlineStart:e.calc(e.marginSM).mul(-1).equal()}}},[`${t}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:e.calc(e.margin).mul(-1).equal(),paddingBottom:e.paddingSM,textAlign:"start",transition:`opacity ${a}`,[`${t}-item-content`]:{maxWidth:l},[`${t}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},y.textEllipsis),{"&::after":{display:"none"}})},[`&:not(${t}-item-active)`]:{[`${t}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${(0,v.unit)(e.calc(e.paddingSM).div(2).equal())})`,insetInlineStart:"100%",display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,borderTop:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${i}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${i}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:e.lineWidthBold,backgroundColor:s,transition:`width ${a}, inset-inline-start ${a}`,transitionTimingFunction:"ease-out",content:'""'}},[`${t}-item${t}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${t}-navigation${t}-vertical`]:{[`> ${t}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${t}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:e.calc(e.lineWidth).mul(3).equal(),height:`calc(100% - ${(0,v.unit)(e.marginLG)})`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:e.calc(e.controlHeight).mul(.25).equal(),height:e.calc(e.controlHeight).mul(.25).equal(),marginBottom:e.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}},[`&${t}-navigation${t}-horizontal`]:{[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}}})(e)),(e=>{let{componentCls:t}=e;return{[`&${t}-rtl`]:{direction:"rtl",[`${t}-item`]:{"&-subtitle":{float:"left"}},[`&${t}-navigation`]:{[`${t}-item::after`]:{transform:"rotate(-45deg)"}},[`&${t}-vertical`]:{[`> ${t}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${t}-item-icon`]:{float:"right"}}},[`&${t}-dot`]:{[`${t}-item-icon ${t}-icon-dot, &${t}-small ${t}-item-icon ${t}-icon-dot`]:{float:"right"}}}}})(e)),(e=>{let{antCls:t,componentCls:l,iconSize:i,iconSizeSM:s,processIconColor:a,marginXXS:n,lineWidthBold:r,lineWidth:c,paddingXXS:o}=e,d=e.calc(i).add(e.calc(r).mul(4).equal()).equal(),m=e.calc(s).add(e.calc(e.lineWidth).mul(4).equal()).equal();return{[`&${l}-with-progress`]:{[`${l}-item`]:{paddingTop:o,[`&-process ${l}-item-container ${l}-item-icon ${l}-icon`]:{color:a}},[`&${l}-vertical > ${l}-item `]:{paddingInlineStart:o,[`> ${l}-item-container > ${l}-item-tail`]:{top:n,insetInlineStart:e.calc(i).div(2).sub(c).add(o).equal()}},[`&, &${l}-small`]:{[`&${l}-horizontal ${l}-item:first-child`]:{paddingBottom:o,paddingInlineStart:o}},[`&${l}-small${l}-vertical > ${l}-item > ${l}-item-container > ${l}-item-tail`]:{insetInlineStart:e.calc(s).div(2).sub(c).add(o).equal()},[`&${l}-label-vertical ${l}-item ${l}-item-tail`]:{top:e.calc(i).div(2).add(o).equal()},[`${l}-item-icon`]:{position:"relative",[`${t}-progress`]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:`${(0,v.unit)(d)} !important`,height:`${(0,v.unit)(d)} !important`}}},[`&${l}-small`]:{[`&${l}-label-vertical ${l}-item ${l}-item-tail`]:{top:e.calc(s).div(2).add(o).equal()},[`${l}-item-icon ${t}-progress-inner`]:{width:`${(0,v.unit)(m)} !important`,height:`${(0,v.unit)(m)} !important`}}}}})(e)),(e=>{let{componentCls:t,inlineDotSize:l,inlineTitleColor:i,inlineTailColor:s}=e,a=e.calc(e.paddingXS).add(e.lineWidth).equal(),n={[`${t}-item-container ${t}-item-content ${t}-item-title`]:{color:i}};return{[`&${t}-inline`]:{width:"auto",display:"inline-flex",[`${t}-item`]:{flex:"none","&-container":{padding:`${(0,v.unit)(a)} ${(0,v.unit)(e.paddingXXS)} 0`,margin:`0 ${(0,v.unit)(e.calc(e.marginXXS).div(2).equal())}`,borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:l,height:l,marginInlineStart:`calc(50% - ${(0,v.unit)(e.calc(l).div(2).equal())})`,[`> ${t}-icon`]:{top:0},[`${t}-icon-dot`]:{borderRadius:e.calc(e.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:e.calc(e.marginXS).sub(e.lineWidth).equal()},"&-title":{color:i,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,fontWeight:"normal",marginBottom:e.calc(e.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:e.calc(l).div(2).add(a).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:e.lineWidth,borderRadius:0,marginInlineStart:0,background:s}},[`&:first-child ${t}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${t}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:e.colorBorderBg,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${s}`}},n),"&-finish":Object.assign({[`${t}-item-tail::after`]:{backgroundColor:s},[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:s,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${s}`}},n),"&-error":n,"&-active, &-process":Object.assign({[`${t}-item-icon`]:{width:l,height:l,marginInlineStart:`calc(50% - ${(0,v.unit)(e.calc(l).div(2).equal())})`,top:0}},n),[`&:not(${t}-item-active) > ${t}-item-container[role='button']:hover`]:{[`${t}-item-title`]:{color:i}}}}}})(e))}})((0,S.mergeToken)(e,{processIconColor:i,processTitleColor:s,processDescriptionColor:s,processIconBgColor:a,processIconBorderColor:a,processDotColor:a,processTailColor:d,waitTitleColor:n,waitDescriptionColor:n,waitTailColor:d,waitDotColor:t,finishIconColor:a,finishTitleColor:s,finishDescriptionColor:n,finishTailColor:a,finishDotColor:a,errorIconColor:i,errorTitleColor:c,errorDescriptionColor:c,errorTailColor:d,errorIconBgColor:c,errorIconBorderColor:c,errorDotColor:c,stepsNavActiveColor:a,stepsProgressSize:l,inlineDotSize:6,inlineTitleColor:r,inlineTailColor:o}))},e=>({titleLineHeight:e.controlHeight,customIconSize:e.controlHeight,customIconTop:0,customIconFontSize:e.controlHeightSM,iconSize:e.controlHeight,iconTop:-.5,iconFontSize:e.fontSize,iconSizeSM:e.fontSizeHeading3,dotSize:e.controlHeight/4,dotCurrentSize:e.controlHeightLG/4,navArrowColor:e.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:140,waitIconColor:e.wireframe?e.colorTextDisabled:e.colorTextLabel,waitIconBgColor:e.wireframe?e.colorBgContainer:e.colorFillContent,waitIconBorderColor:e.wireframe?e.colorTextDisabled:"transparent",finishIconBgColor:e.wireframe?e.colorBgContainer:e.controlItemBgActive,finishIconBorderColor:e.wireframe?e.colorPrimary:e.controlItemBgActive}));var T=e.i(876556),w=function(e,t){var l={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(l[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,i=Object.getOwnPropertySymbols(e);st.indexOf(i[s])&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(l[i[s]]=e[i[s]]);return l};let C=e=>{var a,n;let{percent:r,size:c,className:o,rootClassName:d,direction:m,items:x,responsive:u=!0,current:v=0,children:y,style:N}=e,S=w(e,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:k}=(0,b.default)(u),{getPrefixCls:C,direction:_,className:P,style:M}=(0,p.useComponentConfig)("steps"),I=t.useMemo(()=>u&&k?"vertical":m,[u,k,m]),B=(0,g.default)(c),z=C("steps",e.prefixCls),[A,O,H]=$(z),E="inline"===e.type,F=C("",e.iconPrefix),L=(a=x,n=y,a?a:(0,T.default)(n).map(e=>{if(t.isValidElement(e)){let{props:t}=e;return Object.assign({},t)}return null}).filter(e=>e)),D=E?void 0:r,q=Object.assign(Object.assign({},M),N),R=(0,s.default)(P,{[`${z}-rtl`]:"rtl"===_,[`${z}-with-progress`]:void 0!==D},o,d,O,H),W={finish:t.createElement(l.default,{className:`${z}-finish-icon`}),error:t.createElement(i.default,{className:`${z}-error-icon`})};return A(t.createElement(h,Object.assign({icons:W},S,{style:q,current:v,size:B,items:L,itemRender:E?(e,l)=>e.description?t.createElement(f.default,{title:e.description},l):l:void 0,stepIcon:({node:e,status:l})=>"process"===l&&void 0!==D?t.createElement("div",{className:`${z}-progress-icon`},t.createElement(j.default,{type:"circle",percent:D,size:"small"===B?32:40,strokeWidth:4,format:()=>null}),e):e,direction:I,prefixCls:z,iconPrefix:F,className:R})))};C.Step=h.Step,e.s(["Steps",0,C],280898)},934879,e=>{"use strict";var t=e.i(843476),l=e.i(745434),i=e.i(271645),s=e.i(212931),a=e.i(808613),n=e.i(280898),r=e.i(464571),c=e.i(536916),o=e.i(599724),d=e.i(629569),m=e.i(389083),x=e.i(764205),u=e.i(727749);let{Step:h}=n.Steps,p=({visible:e,onClose:l,accessToken:p,agentHubData:g,onSuccess:b})=>{let[j,f]=(0,i.useState)(0),[v,y]=(0,i.useState)(new Set),[N,S]=(0,i.useState)(!1),[k]=a.Form.useForm(),$=()=>{f(0),y(new Set),k.resetFields(),l()};(0,i.useEffect)(()=>{e&&g.length>0&&y(new Set(g.filter(e=>!0===e.is_public).map(e=>e.agent_id||e.name)))},[e,g]);let T=async()=>{if(0===v.size)return void u.default.fromBackend("Please select at least one agent to make public");S(!0);try{let e=Array.from(v);await (0,x.makeAgentsPublicCall)(p,e),u.default.success(`Successfully made ${e.length} agent(s) public!`),$(),b()}catch(e){console.error("Error making agents public:",e),u.default.fromBackend("Failed to make agents public. Please try again.")}finally{S(!1)}};return(0,t.jsx)(s.Modal,{title:"Make Agents Public",open:e,onCancel:$,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:k,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:j,className:"mb-6",children:[(0,t.jsx)(h,{title:"Select Agents"}),(0,t.jsx)(h,{title:"Confirm"})]}),(()=>{switch(j){case 0:let e,l;return e=g.length>0&&g.every(e=>v.has(e.agent_id||e.name)),l=v.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Agents to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?y(new Set(g.map(e=>e.agent_id||e.name))):y(new Set)},disabled:0===g.length,children:["Select All ",g.length>0&&`(${g.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the agents you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these agents."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===g.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No agents available."})}):g.map(e=>{let l=e.agent_id||e.name;return(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:v.has(l),onChange:e=>{var t;let i;return t=e.target.checked,i=new Set(v),void(t?i.add(l):i.delete(l),y(i))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.name}),(0,t.jsxs)(m.Badge,{color:"blue",size:"sm",children:["v",e.version]})]}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:e.description}),e.skills&&e.skills.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[e.skills.slice(0,3).map(e=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e.name},e.id)),e.skills.length>3&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",e.skills.length-3," more"]})]})]})]},l)})})}),v.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:v.size})," agent",1!==v.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making Agents Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these agents public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Agents to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(v).map(e=>{let l=g.find(t=>(t.agent_id||t.name)===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:l?.name||e}),l&&(0,t.jsxs)(m.Badge,{color:"blue",size:"xs",children:["v",l.version]})]}),l?.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:l.description})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:v.size})," agent",1!==v.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===j?$:()=>{1===j&&f(0)},children:0===j?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===j&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===j){if(0===v.size)return void u.default.fromBackend("Please select at least one agent to make public");f(1)}},disabled:0===v.size,children:"Next"}),1===j&&(0,t.jsx)(r.Button,{onClick:T,loading:N,children:"Make Public"})]})]})]})})},{Step:g}=n.Steps,b=({visible:e,onClose:l,accessToken:h,mcpHubData:p,onSuccess:b})=>{let[j,f]=(0,i.useState)(0),[v,y]=(0,i.useState)(new Set),[N,S]=(0,i.useState)(!1),[k]=a.Form.useForm(),$=()=>{f(0),y(new Set),k.resetFields(),l()};(0,i.useEffect)(()=>{e&&p.length>0&&y(new Set(p.filter(e=>e.mcp_info?.is_public===!0).map(e=>e.server_id)))},[e]);let T=async()=>{if(0===v.size)return void u.default.fromBackend("Please select at least one MCP server to make public");S(!0);try{let e=Array.from(v);await (0,x.makeMCPPublicCall)(h,e),u.default.success(`Successfully made ${e.length} MCP server(s) public!`),$(),b()}catch(e){console.error("Error making MCP servers public:",e),u.default.fromBackend("Failed to make MCP servers public. Please try again.")}finally{S(!1)}};return(0,t.jsx)(s.Modal,{title:"Make MCP Servers Public",open:e,onCancel:$,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:k,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:j,className:"mb-6",children:[(0,t.jsx)(g,{title:"Select Servers"}),(0,t.jsx)(g,{title:"Confirm"})]}),(()=>{switch(j){case 0:let e,l;return e=p.length>0&&p.every(e=>v.has(e.server_id)),l=v.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select MCP Servers to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?y(new Set(p.map(e=>e.server_id))):y(new Set)},disabled:0===p.length,children:["Select All ",p.length>0&&`(${p.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the MCP servers you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these servers."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===p.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No MCP servers available."})}):p.map(e=>{let l=e.mcp_info?.is_public===!0;return(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:v.has(e.server_id),onChange:t=>{var l,i;let s;return l=e.server_id,i=t.target.checked,s=new Set(v),void(i?s.add(l):s.delete(l),y(s))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.server_name}),l&&(0,t.jsx)(m.Badge,{color:"emerald",size:"sm",children:"Public"}),(0,t.jsx)(m.Badge,{color:"blue",size:"sm",children:e.transport}),(0,t.jsx)(m.Badge,{color:"active"===e.status||"healthy"===e.status?"green":"inactive"===e.status||"unhealthy"===e.status?"red":"gray",size:"sm",children:e.status||"unknown"})]}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:e.description||e.url}),e.allowed_tools&&e.allowed_tools.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[e.allowed_tools.slice(0,3).map((e,l)=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e},l)),e.allowed_tools.length>3&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",e.allowed_tools.length-3," more"]})]})]})]},e.server_id)})})}),v.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:v.size})," MCP server",1!==v.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making MCP Servers Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these MCP servers public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"MCP Servers to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(v).map(e=>{let l=p.find(t=>t.server_id===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:l?.server_name||e}),l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:l.transport}),(0,t.jsx)(m.Badge,{color:"active"===l.status||"healthy"===l.status?"green":"inactive"===l.status||"unhealthy"===l.status?"red":"gray",size:"xs",children:l.status||"unknown"})]})]}),l?.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:l.description}),l?.url&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-500 mt-1",children:l.url})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:v.size})," MCP server",1!==v.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===j?$:()=>{1===j&&f(0)},children:0===j?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===j&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===j){if(0===v.size)return void u.default.fromBackend("Please select at least one MCP server to make public");f(1)}},disabled:0===v.size,children:"Next"}),1===j&&(0,t.jsx)(r.Button,{onClick:T,loading:N,children:"Make Public"})]})]})]})})};var j=e.i(304967);let f=({modelHubData:e,onFilteredDataChange:l,showFiltersCard:s=!0,className:a=""})=>{let n,r,c,[d,m]=(0,i.useState)(""),[x,u]=(0,i.useState)(""),[h,p]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),f=(0,i.useRef)([]),v=(0,i.useMemo)(()=>e?.filter(e=>{let t=e.model_group.toLowerCase().includes(d.toLowerCase()),l=""===x||e.providers.includes(x),i=""===h||e.mode===h,s=""===g||Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).some(([e])=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")===g);return t&&l&&i&&s})||[],[e,d,x,h,g]);(0,i.useEffect)(()=>{(v.length!==f.current.length||v.some((e,t)=>e.model_group!==f.current[t]?.model_group))&&(f.current=v,l(v))},[v,l]);let y=(0,t.jsxs)("div",{className:"flex flex-wrap gap-4 items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Search Models:"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names...",value:d,onChange:e=>m(e.target.value),className:"border rounded px-3 py-2 w-64 h-10 text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Provider:"}),(0,t.jsxs)("select",{value:x,onChange:e=>u(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-40 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Providers"}),e&&(n=new Set,e.forEach(e=>{e.providers.forEach(e=>n.add(e))}),Array.from(n)).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Mode:"}),(0,t.jsxs)("select",{value:h,onChange:e=>p(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-32 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Modes"}),e&&(r=new Set,e.forEach(e=>{e.mode&&r.add(e.mode)}),Array.from(r)).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Features:"}),(0,t.jsxs)("select",{value:g,onChange:e=>b(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-48 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Features"}),e&&(c=new Set,e.forEach(e=>{Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).forEach(([e])=>{let t=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");c.add(t)})}),Array.from(c).sort()).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(d||x||h||g)&&(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsx)("button",{onClick:()=>{m(""),u(""),p(""),b("")},className:"text-blue-600 hover:text-blue-800 text-sm underline h-10 flex items-center",children:"Clear Filters"})})]});return s?(0,t.jsx)(j.Card,{className:`mb-6 ${a}`,children:y}):(0,t.jsx)("div",{className:a,children:y})},{Step:v}=n.Steps,y=({visible:e,onClose:l,accessToken:h,modelHubData:p,onSuccess:g})=>{let[b,j]=(0,i.useState)(0),[y,N]=(0,i.useState)(new Set),[S,k]=(0,i.useState)([]),[$,T]=(0,i.useState)(!1),[w]=a.Form.useForm(),C=()=>{j(0),N(new Set),k([]),w.resetFields(),l()},_=(0,i.useCallback)(e=>{k(e)},[]);(0,i.useEffect)(()=>{e&&p.length>0&&(k(p),N(new Set(p.filter(e=>!0===e.is_public_model_group).map(e=>e.model_group))))},[e,p]);let P=async()=>{if(0===y.size)return void u.default.fromBackend("Please select at least one model to make public");T(!0);try{let e=Array.from(y);await (0,x.makeModelGroupPublic)(h,e),u.default.success(`Successfully made ${e.length} model group(s) public!`),C(),g()}catch(e){console.error("Error making model groups public:",e),u.default.fromBackend("Failed to make model groups public. Please try again.")}finally{T(!1)}};return(0,t.jsx)(s.Modal,{title:"Make Models Public",open:e,onCancel:C,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:w,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:b,className:"mb-6",children:[(0,t.jsx)(v,{title:"Select Models"}),(0,t.jsx)(v,{title:"Confirm"})]}),(()=>{switch(b){case 0:let e,l;return e=S.length>0&&S.every(e=>y.has(e.model_group)),l=y.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Models to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?N(new Set(S.map(e=>e.model_group))):N(new Set)},disabled:0===S.length,children:["Select All ",S.length>0&&`(${S.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the models you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these models."}),(0,t.jsx)(f,{modelHubData:p,onFilteredDataChange:_,showFiltersCard:!1,className:"border rounded-lg p-4 bg-gray-50"}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===S.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No models match the current filters."})}):S.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:y.has(e.model_group),onChange:t=>{var l,i;let s;return l=e.model_group,i=t.target.checked,s=new Set(y),void(i?s.add(l):s.delete(l),N(s))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.model_group}),e.mode&&(0,t.jsx)(m.Badge,{color:"green",size:"sm",children:e.mode})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e},e))})]})]},e.model_group))})}),y.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:y.size})," model",1!==y.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making Models Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these models public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Models to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(y).map(e=>{let l=p.find(t=>t.model_group===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e}),l&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:l.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e},e))})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:y.size})," model",1!==y.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===b?C:()=>{1===b&&j(0)},children:0===b?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===b&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===b){if(0===y.size)return void u.default.fromBackend("Please select at least one model to make public");j(1)}},disabled:0===y.size,children:"Next"}),1===b&&(0,t.jsx)(r.Button,{onClick:P,loading:$,children:"Make Public"})]})]})]})})};var N=e.i(994388),S=e.i(592968),k=e.i(262218),$=e.i(166406),T=e.i(827252);let w=e=>`$${(1e6*e).toFixed(2)}`,C=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString();var _=e.i(902555),P=e.i(708347),M=e.i(871943),I=e.i(502547),B=e.i(434626),z=e.i(250980),A=e.i(269200),O=e.i(942232),H=e.i(977572),E=e.i(427612),F=e.i(64848),L=e.i(496020),D=e.i(522016);let q=({accessToken:e,userRole:l})=>{let[s,a]=(0,i.useState)([]),[n,r]=(0,i.useState)({url:"",displayName:""}),[c,m]=(0,i.useState)(null),[h,p]=(0,i.useState)(!1),[g,b]=(0,i.useState)(!0),[f,v]=(0,i.useState)(!1),[y,N]=(0,i.useState)([]),S=async()=>{if(e)try{p(!0);let e=await (0,x.getPublicModelHubInfo)();if(e&&e.useful_links){let t=e.useful_links||{},l=Object.entries(t).map(([e,t])=>"object"==typeof t&&null!==t&&"url"in t?{id:`${t.index??0}-${e}`,displayName:e,url:t.url,index:t.index??0}:{id:`0-${e}`,displayName:e,url:t,index:0}).sort((e,t)=>(e.index??0)-(t.index??0)).map((e,t)=>({...e,id:`${t}-${e.displayName}`}));a(l)}else a([])}catch(e){console.error("Error fetching useful links:",e),a([])}finally{p(!1)}};if((0,i.useEffect)(()=>{S()},[e]),!(0,P.isAdminRole)(l||""))return null;let k=async t=>{if(!e)return!1;try{let l={};return t.forEach((e,t)=>{l[e.displayName]={url:e.url,index:t}}),await (0,x.updateUsefulLinksCall)(e,l),!0}catch(e){return console.error("Error saving links:",e),u.default.fromBackend(`Failed to save links - ${e}`),!1}},$=async()=>{if(!n.url||!n.displayName)return;try{new URL(n.url)}catch{u.default.fromBackend("Please enter a valid URL");return}if(s.some(e=>e.displayName===n.displayName))return void u.default.fromBackend("A link with this display name already exists");let e=[...s,{id:`${Date.now()}-${n.displayName}`,displayName:n.displayName,url:n.url}];await k(e)&&(a(e),r({url:"",displayName:""}),u.default.success("Link added successfully"))},T=async()=>{if(!c)return;try{new URL(c.url)}catch{u.default.fromBackend("Please enter a valid URL");return}if(s.some(e=>e.id!==c.id&&e.displayName===c.displayName))return void u.default.fromBackend("A link with this display name already exists");let e=s.map(e=>e.id===c.id?c:e);await k(e)&&(a(e),m(null),u.default.success("Link updated successfully"))},w=()=>{m(null)},C=async e=>{let t=s.filter(t=>t.id!==e);await k(t)&&(a(t),u.default.success("Link deleted successfully"))},q=async()=>{await k(s)&&(v(!1),N([]),u.default.success("Link order saved successfully"))};return(0,t.jsxs)(j.Card,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>b(!g),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(d.Title,{className:"mb-0",children:"Link Management"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Manage the links that are displayed under 'Useful Links' on the public model hub."})]}),(0,t.jsx)("div",{className:"flex items-center",children:g?(0,t.jsx)(M.ChevronDownIcon,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(I.ChevronRightIcon,{className:"w-5 h-5 text-gray-500"})})]}),g&&(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 Link"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Display Name"}),(0,t.jsx)("input",{type:"text",value:n.displayName,onChange:e=>r({...n,displayName:e.target.value}),placeholder:"Friendly name",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:"URL"}),(0,t.jsx)("input",{type:"text",value:n.url,onChange:e=>r({...n,url:e.target.value}),placeholder:"https://example.com",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:$,disabled:!n.url||!n.displayName,className:`flex items-center px-4 py-2 rounded-md text-sm ${!n.url||!n.displayName?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(z.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Link"]})})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700",children:"Manage Existing Links"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)(D.default,{href:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`,target:"_blank",rel:"noopener noreferrer",className:"text-xs bg-blue-50 text-blue-600 px-3 py-1.5 rounded hover:bg-blue-100 flex items-center",title:"Open Public Model Hub",children:["Public Model Hub",(0,t.jsx)(B.ExternalLinkIcon,{className:"w-4 h-4 ml-1"})]}),f?(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:q,className:"text-xs bg-green-600 text-white px-3 py-1.5 rounded hover:bg-green-700",children:"Save Order"}),(0,t.jsx)("button",{onClick:()=>{a([...y]),v(!1),N([])},className:"text-xs bg-gray-50 text-gray-600 px-3 py-1.5 rounded hover:bg-gray-100",children:"Cancel"})]}):(0,t.jsx)("button",{onClick:()=>{c&&m(null),N([...s]),v(!0)},className:"text-xs bg-purple-50 text-purple-600 px-3 py-1.5 rounded hover:bg-purple-100 flex items-center",children:"Rearrange Order"})]})]}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(A.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(E.TableHead,{children:(0,t.jsxs)(L.TableRow,{children:[(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"Display Name"}),(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"URL"}),(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(O.TableBody,{children:[s.map((e,l)=>(0,t.jsx)(L.TableRow,{className:"h-8",children:c&&c.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:c.displayName,onChange:e=>m({...c,displayName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(H.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:c.url,onChange:e=>m({...c,url:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(H.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:T,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:w,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.TableCell,{className:"py-0.5 text-sm text-gray-900",children:e.displayName}),(0,t.jsx)(H.TableCell,{className:"py-0.5 text-sm text-gray-500",children:e.url}),(0,t.jsx)(H.TableCell,{className:"py-0.5 whitespace-nowrap",children:f?(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)(_.default,{variant:"Up",onClick:()=>(e=>{if(0===e)return;let t=[...s];[t[e-1],t[e]]=[t[e],t[e-1]],a(t)})(l),tooltipText:"Move up",disabled:0===l,disabledTooltipText:"Already at the top",dataTestId:`move-up-${e.id}`}),(0,t.jsx)(_.default,{variant:"Down",onClick:()=>(e=>{if(e===s.length-1)return;let t=[...s];[t[e],t[e+1]]=[t[e+1],t[e]],a(t)})(l),tooltipText:"Move down",disabled:l===s.length-1,disabledTooltipText:"Already at the bottom",dataTestId:`move-down-${e.id}`})]}):(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)(_.default,{variant:"Open",onClick:()=>{var t;return t=e.url,void window.open(t,"_blank")},tooltipText:"Open link",dataTestId:`open-link-${e.id}`}),(0,t.jsx)(_.default,{variant:"Edit",onClick:()=>{m({...e})},tooltipText:"Edit link",dataTestId:`edit-link-${e.id}`}),(0,t.jsx)(_.default,{variant:"Delete",onClick:()=>C(e.id),tooltipText:"Delete link",dataTestId:`delete-link-${e.id}`})]})})]})},e.id)),0===s.length&&(0,t.jsx)(L.TableRow,{children:(0,t.jsx)(H.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No links added yet. Add a new link above."})})]})]})})})]})]})};var R=e.i(737033);let{Step:W}=n.Steps,U=({visible:e,onClose:l,accessToken:h,skillsList:p,onSuccess:g})=>{let[b,j]=(0,i.useState)(0),[f,v]=(0,i.useState)(new Set),[y,N]=(0,i.useState)(!1),[S]=a.Form.useForm(),k=()=>{j(0),v(new Set),S.resetFields(),l()};(0,i.useEffect)(()=>{e&&p.length>0&&v(new Set(p.filter(e=>e.enabled).map(e=>e.name)))},[e,p]);let $=async()=>{if(0===f.size)return void u.default.fromBackend("Please select at least one skill");N(!0);try{await Promise.all(p.map(e=>{let t=f.has(e.name);return t&&!e.enabled?(0,x.enableClaudeCodePlugin)(h,e.name):!t&&e.enabled?(0,x.disableClaudeCodePlugin)(h,e.name):Promise.resolve()})),u.default.success(`Skill Hub updated — ${f.size} skill(s) published`),k(),g()}catch(e){console.error("Error publishing skills:",e),u.default.fromBackend("Failed to update skills. Please try again.")}finally{N(!1)}},T=p.length>0&&p.every(e=>f.has(e.name)),w=f.size>0&&!T;return(0,t.jsx)(s.Modal,{title:"Publish to Skill Hub",open:e,onCancel:k,footer:null,width:700,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:S,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:b,className:"mb-6",children:[(0,t.jsx)(W,{title:"Select Skills"}),(0,t.jsx)(W,{title:"Confirm"})]}),0===b?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Skills to Publish"}),(0,t.jsxs)(c.Checkbox,{checked:T,indeterminate:w,onChange:e=>{e.target.checked?v(new Set(p.map(e=>e.name))):v(new Set)},disabled:0===p.length,children:["Select All (",p.length,")"]})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Selected skills will be visible to all users in the Skill Hub. Deselected skills will be unpublished."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===p.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No skills registered yet."})}):p.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:f.has(e.name),onChange:t=>{var l,i;let s;return l=e.name,i=t.target.checked,s=new Set(f),void(i?s.add(l):s.delete(l),v(s))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Text,{className:"font-medium font-mono text-sm",children:e.name}),e.enabled&&(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Public"})]}),e.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-500 truncate max-w-sm",children:e.description})]}),e.domain&&(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e.domain})]},e.name))})}),f.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:f.size})," skill",1!==f.size?"s":""," will be published"]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Publish to Skill Hub"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Note:"})," Published skills will be visible to all users in the Skill Hub tab. Skills not in the list below will be unpublished."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Skills to be published:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(f).map(e=>{let l=p.find(t=>t.name===e);return(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:[(0,t.jsx)(o.Text,{className:"font-mono text-sm",children:e}),l?.domain&&(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:l.domain})]},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:f.size})," skill",1!==f.size?"s":""," will be published"]})})]}),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===b?k:()=>j(0),children:0===b?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===b&&(0,t.jsx)(r.Button,{onClick:()=>{0===f.size?u.default.fromBackend("Please select at least one skill"):j(1)},disabled:0===f.size,children:"Next"}),1===b&&(0,t.jsx)(r.Button,{onClick:$,loading:y,children:"Publish to Hub"})]})]})]})})};var K=e.i(798496),X=e.i(976883),G=e.i(197647),V=e.i(653824),Y=e.i(881073),J=e.i(404206),Q=e.i(723731),Z=e.i(174886),ee=e.i(618566),et=e.i(650056),el=e.i(292639),ei=e.i(161281),es=e.i(268004);e.s(["default",0,({accessToken:e,publicPage:a,premiumUser:n,userRole:r})=>{let c,h,[g,v]=(0,i.useState)(!1),[_,M]=(0,i.useState)(null),[I,B]=(0,i.useState)(!0),[z,A]=(0,i.useState)(!1),[O,H]=(0,i.useState)(!1),[E,F]=(0,i.useState)(null),[L,D]=(0,i.useState)([]),[W,ea]=(0,i.useState)(!1),[en,er]=(0,i.useState)(null),[ec,eo]=(0,i.useState)(!1),[ed,em]=(0,i.useState)(!0),[ex,eu]=(0,i.useState)(null),[eh,ep]=(0,i.useState)(!1),[eg,eb]=(0,i.useState)(null),[ej,ef]=(0,i.useState)(!0),[ev,ey]=(0,i.useState)(null),[eN,eS]=(0,i.useState)(!1),[ek,e$]=(0,i.useState)(!1),[eT,ew]=(0,i.useState)([]),[eC,e_]=(0,i.useState)(!1),[eP,eM]=(0,i.useState)(!1),eI=(0,ee.useRouter)(),{data:eB,isLoading:ez}=(0,el.useUISettings)();(0,i.useEffect)(()=>{if(!ez&&a&&!0===eB?.values?.require_auth_for_public_ai_hub){let e=(0,es.getCookie)("token");if(!(0,ei.checkTokenValidity)(e))return void eI.replace(`${(0,x.getProxyBaseUrl)()}/ui/login`)}},[ez,a,eB,eI]),(0,i.useEffect)(()=>{let t=async e=>{try{B(!0);let t=await (0,x.modelHubCall)(e);console.log("ModelHubData:",t),M(t.data),(0,x.getConfigFieldSetting)(e,"enable_public_model_hub").then(e=>{console.log(`data: ${JSON.stringify(e)}`),!0==e.field_value&&v(!0)}).catch(e=>{})}catch(e){console.error("There was an error fetching the model data",e)}finally{B(!1)}},l=async()=>{try{B(!0),await (0,x.getUiConfig)();let e=await (0,x.modelHubPublicModelsCall)();console.log("ModelHubData:",e),console.log("First model structure:",e[0]),console.log("Model has model_group?",e[0]?.model_group),console.log("Model has providers?",e[0]?.providers),M(e),v(!0)}catch(e){console.error("There was an error fetching the public model data",e)}finally{B(!1)}};e?t(e):a&&l()},[e,a]),(0,i.useEffect)(()=>{let t=async()=>{if(e)try{em(!0);let t=await (0,x.getAgentsList)(e);console.log("AgentHubData:",t);let l=t.agents.map(e=>({agent_id:e.agent_id,...e.agent_card_params,is_public:e.litellm_params.is_public}));er(l)}catch(e){console.error("There was an error fetching the agent data",e)}finally{em(!1)}};a||t()},[a,e]),(0,i.useEffect)(()=>{let t=async()=>{if(e)try{ef(!0);let t=await (0,x.fetchMCPServers)(e);console.log("MCPHubData:",t),eb(t)}catch(e){console.error("There was an error fetching the MCP server data",e)}finally{ef(!1)}};a||t()},[a,e]),(0,i.useEffect)(()=>{(async()=>{if(e)try{e_(!0);let t=!0===a,l=await (0,x.getClaudeCodePluginsList)(e,t);ew(l.plugins)}catch(e){console.error("Error fetching skill hub data",e)}finally{e_(!1)}})()},[e,a]);let eA=()=>{A(!1),H(!1),F(null),ep(!1),eu(null),eS(!1),ey(null)},eO=()=>{A(!1),H(!1),F(null),ep(!1),eu(null),eS(!1),ey(null)},eH=e=>{navigator.clipboard.writeText(e),u.default.success("Copied to clipboard!")},eE=e=>`$${(1e6*e).toFixed(2)}`,eF=(0,i.useCallback)(e=>{D(e)},[]);return(console.log("publicPage: ",a),console.log("publicPageAllowed: ",g),a&&g)?(0,t.jsx)(X.default,{accessToken:e}):(0,t.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[!1==a?(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start",children:[(0,t.jsx)(d.Title,{className:"text-center",children:"AI Hub"}),(0,P.isAdminRole)(r||"")?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Make models, agents, and MCP servers public for developers to know what's available."}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"A list of all public model names personally available to you."})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)(o.Text,{children:"Model Hub URL:"}),(0,t.jsxs)("div",{className:"flex items-center bg-gray-200 px-2 py-1 rounded",children:[(0,t.jsx)(o.Text,{className:"mr-2",children:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`}),(0,t.jsx)("button",{onClick:()=>eH(`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`),className:"p-1 hover:bg-gray-300 rounded transition-colors",title:"Copy URL",children:(0,t.jsx)(Z.Copy,{size:16,className:"text-gray-600"})})]})]})]}),(0,P.isAdminRole)(r||"")&&(0,t.jsx)("div",{className:"mt-8 mb-2",children:(0,t.jsx)(q,{accessToken:e,userRole:r})}),(0,t.jsxs)(V.TabGroup,{children:[(0,t.jsxs)(Y.TabList,{className:"mb-4",children:[(0,t.jsx)(G.Tab,{children:"Model Hub"}),(0,t.jsx)(G.Tab,{children:"Agent Hub"}),(0,t.jsx)(G.Tab,{children:"MCP Hub"}),(0,t.jsx)(G.Tab,{children:"Skill Hub"})]}),(0,t.jsxs)(Q.TabPanels,{children:[(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&(0,P.isAdminRole)(r||"")&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&ea(!0)),children:"Select Models to Make Public"})}),(0,t.jsx)(f,{modelHubData:_||[],onFilteredDataChange:eF}),(0,t.jsx)(K.ModelDataTable,{columns:((e,l,i=!1)=>{let s=[{header:"Public Model Name",accessorKey:"model_group",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let i=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium text-sm",children:i.model_group}),(0,t.jsx)(S.Tooltip,{title:"Copy model name",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(i.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(o.Text,{className:"text-xs text-gray-600",children:i.providers.join(", ")})})]})}},{header:"Provider",accessorKey:"providers",enableSorting:!0,sortingFn:(e,t)=>{let l=e.original.providers.join(", "),i=t.original.providers.join(", ");return l.localeCompare(i)},cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.providers.slice(0,2).map(e=>(0,t.jsx)(k.Tag,{color:"blue",className:"text-xs",children:e},e)),l.providers.length>2&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",l.providers.length-2]})]})},meta:{className:"hidden md:table-cell"}},{header:"Mode",accessorKey:"mode",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return l.mode?(0,t.jsx)(m.Badge,{color:"green",size:"sm",children:l.mode}):(0,t.jsx)(o.Text,{className:"text-gray-500",children:"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Tokens",accessorKey:"max_input_tokens",enableSorting:!0,sortingFn:(e,t)=>(e.original.max_input_tokens||0)+(e.original.max_output_tokens||0)-((t.original.max_input_tokens||0)+(t.original.max_output_tokens||0)),cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsxs)(o.Text,{className:"text-xs",children:[l.max_input_tokens?C(l.max_input_tokens):"-"," /"," ",l.max_output_tokens?C(l.max_output_tokens):"-"]})})},meta:{className:"hidden lg:table-cell"}},{header:"Cost/1M",accessorKey:"input_cost_per_token",enableSorting:!0,sortingFn:(e,t)=>(e.original.input_cost_per_token||0)+(e.original.output_cost_per_token||0)-((t.original.input_cost_per_token||0)+(t.original.output_cost_per_token||0)),cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(o.Text,{className:"text-xs",children:l.input_cost_per_token?w(l.input_cost_per_token):"-"}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-500",children:l.output_cost_per_token?w(l.output_cost_per_token):"-"})]})}},{header:"Features",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let l=Object.entries(e.original).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),i=["green","blue","purple","orange","red","yellow"];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(o.Text,{className:"text-gray-500 text-xs",children:"-"}):l.map((e,l)=>(0,t.jsx)(m.Badge,{color:i[l%i.length],size:"xs",children:e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},e))})}},{header:"Public",accessorKey:"is_public_model_group",enableSorting:!0,sortingFn:(e,t)=>(!0===e.original.is_public_model_group)-(!0===t.original.is_public_model_group),cell:({row:e})=>!0===e.original.is_public_model_group?(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:"No"}),meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:l})=>{let i=l.original;return(0,t.jsxs)(N.Button,{size:"xs",variant:"secondary",onClick:()=>e(i),icon:T.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}];return i?s.filter(e=>!("accessorKey"in e)||"is_public_model_group"!==e.accessorKey):s})(e=>{F(e),A(!0)},eH,a),data:L,isLoading:I,defaultSorting:[{id:"model_group",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",L.length," of ",_?.length||0," models"]})})]}),(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&(0,P.isAdminRole)(r||"")&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&eo(!0)),children:"Select Agents to Make Public"})}),(0,t.jsx)(K.ModelDataTable,{columns:(0,l.getAgentHubTableColumns)(e=>{eu(e),ep(!0)},eH,a),data:en||[],isLoading:ed,defaultSorting:[{id:"name",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",en?.length||0," agent",en?.length!==1?"s":""]})})]}),(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&(0,P.isAdminRole)(r||"")&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&e$(!0)),children:"Select MCP Servers to Make Public"})}),(0,t.jsx)(K.ModelDataTable,{columns:((e,l,i=!1)=>[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let i=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium text-sm",children:i.server_name}),(0,t.jsx)(S.Tooltip,{title:"Copy server name",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(i.server_name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(o.Text,{className:"text-xs text-gray-600",children:i.description||"-"})})]})}},{header:"Description",accessorKey:"description",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(o.Text,{className:"text-xs line-clamp-2",children:l.description||"-"})},meta:{className:"hidden md:table-cell"}},{header:"URL",accessorKey:"url",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let i=e.original;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"text-xs truncate max-w-xs",children:i.url}),(0,t.jsx)(S.Tooltip,{title:"Copy URL",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(i.url),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs flex-shrink-0"})})]})},meta:{className:"hidden lg:table-cell"}},{header:"Transport",accessorKey:"transport",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(m.Badge,{color:"blue",size:"sm",children:l.transport})},meta:{className:"hidden md:table-cell"}},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,i="none"===l.auth_type?"gray":"green";return(0,t.jsx)(m.Badge,{color:i,size:"sm",children:l.auth_type})},meta:{className:"hidden md:table-cell"}},{header:"Status",accessorKey:"status",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,i={active:"green",inactive:"red",unknown:"gray",healthy:"green",unhealthy:"red"}[l.status]||"gray";return(0,t.jsx)(m.Badge,{color:i,size:"sm",children:l.status||"unknown"})}},{header:"Tools",accessorKey:"allowed_tools",enableSorting:!1,cell:({row:e})=>{let l=e.original.allowed_tools||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(o.Text,{className:"text-xs font-medium",children:l.length>0?`${l.length} tool${1!==l.length?"s":""}`:"All tools"}),l.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,2).map((e,l)=>(0,t.jsx)(k.Tag,{color:"purple",className:"text-xs",children:e},l)),l.length>2&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",l.length-2]})]})]})},meta:{className:"hidden lg:table-cell"}},{header:"Created By",accessorKey:"created_by",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(o.Text,{className:"text-xs",children:l.created_by||"-"})},meta:{className:"hidden xl:table-cell"}},{header:"Public",accessorKey:"mcp_info.is_public",enableSorting:!0,sortingFn:(e,t)=>(e.original.mcp_info?.is_public===!0)-(t.original.mcp_info?.is_public===!0),cell:({row:e})=>{let l=e.original;return l.mcp_info?.is_public===!0?(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:"No"})},meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:l})=>{let i=l.original;return(0,t.jsxs)(N.Button,{size:"xs",variant:"secondary",onClick:()=>e(i),icon:T.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}])(e=>{ey(e),eS(!0)},eH,a),data:eg||[],isLoading:ej,defaultSorting:[{id:"server_name",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",eg?.length||0," MCP server",eg?.length!==1?"s":""]})})]}),(0,t.jsxs)(J.TabPanel,{children:[!1==a&&(0,P.isAdminRole)(r||"")&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>eM(!0),children:"Select Skills to Make Public"})}),(0,t.jsx)(R.default,{skills:eT,isLoading:eC,isAdmin:(0,P.isAdminRole)(r||""),accessToken:e,publicPage:a,onPublishSuccess:async()=>{ew((await (0,x.getClaudeCodePluginsList)(e||"",a)).plugins)}})]})]})]})]}):(0,t.jsxs)(j.Card,{className:"mx-auto max-w-xl mt-10",children:[(0,t.jsx)(o.Text,{className:"text-xl text-center mb-2 text-black",children:"Public Model Hub not enabled."}),(0,t.jsx)("p",{className:"text-base text-center text-slate-800",children:"Ask your proxy admin to enable this on their Admin UI."})]}),(0,t.jsx)(s.Modal,{title:"Public Model Hub",width:600,open:O,footer:null,onOk:eA,onCancel:eO,children:(0,t.jsxs)("div",{className:"pt-5 pb-5",children:[(0,t.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,t.jsx)(o.Text,{className:"text-base mr-2",children:"Shareable Link:"}),(0,t.jsx)(o.Text,{className:"max-w-sm ml-2 bg-gray-200 pr-2 pl-2 pt-1 pb-1 text-center rounded",children:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(N.Button,{onClick:()=>{eI.replace(`/model_hub_table?key=${e}`)},children:"See Page"})})]})}),(0,t.jsx)(s.Modal,{title:E?.model_group||"Model Details",width:1e3,open:z,footer:null,onOk:eA,onCancel:eO,children:E&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Model Group:"}),(0,t.jsx)(o.Text,{children:E.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(o.Text,{children:E.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:E.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",children:e},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(o.Text,{children:E.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(o.Text,{children:E.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:E.input_cost_per_token?eE(E.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:E.output_cost_per_token?eE(E.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(c=Object.entries(E).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),h=["green","blue","purple","orange","red","yellow"],0===c.length?(0,t.jsx)(o.Text,{className:"text-gray-500",children:"No special capabilities listed"}):c.map((e,l)=>(0,t.jsx)(m.Badge,{color:h[l%h.length],children:e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},e)))})]}),(E.tpm||E.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[E.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(o.Text,{children:E.tpm.toLocaleString()})]}),E.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(o.Text,{children:E.rpm.toLocaleString()})]})]})]}),E.supported_openai_params&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:E.supported_openai_params.map(e=>(0,t.jsx)(m.Badge,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(et.Prism,{language:"python",className:"text-sm",children:`import openai +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,745434,e=>{"use strict";var t=e.i(843476),l=e.i(994388),s=e.i(389083),i=e.i(599724),a=e.i(592968),n=e.i(262218),r=e.i(166406),c=e.i(827252);e.s(["getAgentHubTableColumns",0,(e,o,d=!1)=>[{header:"Agent Name",accessorKey:"name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(i.Text,{className:"font-medium text-sm",children:l.name}),(0,t.jsx)(a.Tooltip,{title:"Copy agent name",children:(0,t.jsx)(r.CopyOutlined,{onClick:()=>o(l.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(i.Text,{className:"text-xs text-gray-600",children:l.description})})]})}},{header:"Description",accessorKey:"description",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(i.Text,{className:"text-xs line-clamp-2",children:l.description||"-"})},meta:{className:"hidden md:table-cell"}},{header:"Version",accessorKey:"version",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsxs)(s.Badge,{color:"blue",size:"sm",children:["v",l.version]})},meta:{className:"hidden lg:table-cell"}},{header:"Protocol",accessorKey:"protocolVersion",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(i.Text,{className:"text-xs",children:l.protocolVersion||"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let l=e.original.skills||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(i.Text,{className:"text-xs font-medium",children:[l.length," skill",1!==l.length?"s":""]}),l.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,2).map(e=>(0,t.jsx)(n.Tag,{color:"purple",className:"text-xs",children:e.name},e.id)),l.length>2&&(0,t.jsxs)(i.Text,{className:"text-xs text-gray-500",children:["+",l.length-2]})]})]})}},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let l=Object.entries(e.original.capabilities||{}).filter(([e,t])=>!0===t).map(([e])=>e);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(i.Text,{className:"text-gray-500 text-xs",children:"-"}):l.map(e=>(0,t.jsx)(s.Badge,{color:"green",size:"xs",children:e},e))})}},{header:"I/O Modes",accessorKey:"defaultInputModes",enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.defaultInputModes||[],a=l.defaultOutputModes||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(i.Text,{className:"text-xs",children:[(0,t.jsx)("span",{className:"font-medium",children:"In:"})," ",s.join(", ")||"-"]}),(0,t.jsxs)(i.Text,{className:"text-xs",children:[(0,t.jsx)("span",{className:"font-medium",children:"Out:"})," ",a.join(", ")||"-"]})]})},meta:{className:"hidden xl:table-cell"}},{header:"Public",accessorKey:"is_public",enableSorting:!0,sortingFn:(e,t)=>(!0===e.original.is_public)-(!0===t.original.is_public),cell:({row:e})=>!0===e.original.is_public?(0,t.jsx)(s.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(s.Badge,{color:"gray",size:"xs",children:"No"}),meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:s})=>{let i=s.original;return(0,t.jsxs)(l.Button,{size:"xs",variant:"secondary",onClick:()=>e(i),icon:c.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}]])},280898,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(121229),s=e.i(864517),i=e.i(343794),a=e.i(931067),n=e.i(209428),r=e.i(211577),c=e.i(703923),o=e.i(404948),d=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function m(e){return"string"==typeof e}let x=function(e){var l,s,x,u,h,p=e.className,g=e.prefixCls,b=e.style,j=e.active,f=e.status,v=e.iconPrefix,y=e.icon,N=(e.wrapperStyle,e.stepNumber),S=e.disabled,k=e.description,$=e.title,T=e.subTitle,w=e.progressDot,C=e.stepIcon,_=e.tailContent,P=e.icons,M=e.stepIndex,I=e.onStepClick,B=e.onClick,z=e.render,O=(0,c.default)(e,d),A={};I&&!S&&(A.role="button",A.tabIndex=0,A.onClick=function(e){null==B||B(e),I(M)},A.onKeyDown=function(e){var t=e.which;(t===o.default.ENTER||t===o.default.SPACE)&&I(M)});var H=f||"wait",E=(0,i.default)("".concat(g,"-item"),"".concat(g,"-item-").concat(H),p,(h={},(0,r.default)(h,"".concat(g,"-item-custom"),y),(0,r.default)(h,"".concat(g,"-item-active"),j),(0,r.default)(h,"".concat(g,"-item-disabled"),!0===S),h)),F=(0,n.default)({},b),L=t.createElement("div",(0,a.default)({},O,{className:E,style:F}),t.createElement("div",(0,a.default)({onClick:B},A,{className:"".concat(g,"-item-container")}),t.createElement("div",{className:"".concat(g,"-item-tail")},_),t.createElement("div",{className:"".concat(g,"-item-icon")},(x=(0,i.default)("".concat(g,"-icon"),"".concat(v,"icon"),(l={},(0,r.default)(l,"".concat(v,"icon-").concat(y),y&&m(y)),(0,r.default)(l,"".concat(v,"icon-check"),!y&&"finish"===f&&(P&&!P.finish||!P)),(0,r.default)(l,"".concat(v,"icon-cross"),!y&&"error"===f&&(P&&!P.error||!P)),l)),u=t.createElement("span",{className:"".concat(g,"-icon-dot")}),s=w?"function"==typeof w?t.createElement("span",{className:"".concat(g,"-icon")},w(u,{index:N-1,status:f,title:$,description:k})):t.createElement("span",{className:"".concat(g,"-icon")},u):y&&!m(y)?t.createElement("span",{className:"".concat(g,"-icon")},y):P&&P.finish&&"finish"===f?t.createElement("span",{className:"".concat(g,"-icon")},P.finish):P&&P.error&&"error"===f?t.createElement("span",{className:"".concat(g,"-icon")},P.error):y||"finish"===f||"error"===f?t.createElement("span",{className:x}):t.createElement("span",{className:"".concat(g,"-icon")},N),C&&(s=C({index:N-1,status:f,title:$,description:k,node:s})),s)),t.createElement("div",{className:"".concat(g,"-item-content")},t.createElement("div",{className:"".concat(g,"-item-title")},$,T&&t.createElement("div",{title:"string"==typeof T?T:void 0,className:"".concat(g,"-item-subtitle")},T)),k&&t.createElement("div",{className:"".concat(g,"-item-description")},k))));return z&&(L=z(L)||null),L};var u=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function h(e){var l,s=e.prefixCls,o=void 0===s?"rc-steps":s,d=e.style,m=void 0===d?{}:d,h=e.className,p=(e.children,e.direction),g=e.type,b=void 0===g?"default":g,j=e.labelPlacement,f=e.iconPrefix,v=void 0===f?"rc":f,y=e.status,N=void 0===y?"process":y,S=e.size,k=e.current,$=void 0===k?0:k,T=e.progressDot,w=e.stepIcon,C=e.initial,_=void 0===C?0:C,P=e.icons,M=e.onChange,I=e.itemRender,B=e.items,z=(0,c.default)(e,u),O="inline"===b,A=O||void 0!==T&&T,H=O||void 0===p?"horizontal":p,E=O?void 0:S,F=(0,i.default)(o,"".concat(o,"-").concat(H),h,(l={},(0,r.default)(l,"".concat(o,"-").concat(E),E),(0,r.default)(l,"".concat(o,"-label-").concat(A?"vertical":void 0===j?"horizontal":j),"horizontal"===H),(0,r.default)(l,"".concat(o,"-dot"),!!A),(0,r.default)(l,"".concat(o,"-navigation"),"navigation"===b),(0,r.default)(l,"".concat(o,"-inline"),O),l)),L=function(e){M&&$!==e&&M(e)};return t.default.createElement("div",(0,a.default)({className:F,style:m},z),(void 0===B?[]:B).filter(function(e){return e}).map(function(e,l){var s=(0,n.default)({},e),i=_+l;return"error"===N&&l===$-1&&(s.className="".concat(o,"-next-error")),s.status||(i===$?s.status=N:i<$?s.status="finish":s.status="wait"),O&&(s.icon=void 0,s.subTitle=void 0),!s.render&&I&&(s.render=function(e){return I(s,e)}),t.default.createElement(x,(0,a.default)({},s,{active:i===$,stepNumber:i+1,stepIndex:i,key:i,prefixCls:o,iconPrefix:v,wrapperStyle:m,progressDot:A,stepIcon:w,icons:P,onStepClick:M&&L}))}))}h.Step=x;var p=e.i(242064),g=e.i(517455),b=e.i(150073),j=e.i(309821),f=e.i(491816);e.i(296059);var v=e.i(915654),y=e.i(183293),N=e.i(246422),S=e.i(838378);let k=(e,t)=>{let l=`${t.componentCls}-item`,s=`${e}IconColor`,i=`${e}TitleColor`,a=`${e}DescriptionColor`,n=`${e}TailColor`,r=`${e}IconBgColor`,c=`${e}IconBorderColor`,o=`${e}DotColor`;return{[`${l}-${e} ${l}-icon`]:{backgroundColor:t[r],borderColor:t[c],[`> ${t.componentCls}-icon`]:{color:t[s],[`${t.componentCls}-icon-dot`]:{background:t[o]}}},[`${l}-${e}${l}-custom ${l}-icon`]:{[`> ${t.componentCls}-icon`]:{color:t[o]}},[`${l}-${e} > ${l}-container > ${l}-content > ${l}-title`]:{color:t[i],"&::after":{backgroundColor:t[n]}},[`${l}-${e} > ${l}-container > ${l}-content > ${l}-description`]:{color:t[a]},[`${l}-${e} > ${l}-container > ${l}-tail::after`]:{backgroundColor:t[n]}}},$=(0,N.genStyleHooks)("Steps",e=>{let{colorTextDisabled:t,controlHeightLG:l,colorTextLightSolid:s,colorText:i,colorPrimary:a,colorTextDescription:n,colorTextQuaternary:r,colorError:c,colorBorderSecondary:o,colorSplit:d}=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(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,y.resetComponent)(e)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),(e=>{let{componentCls:t,motionDurationSlow:l}=e,s=`${t}-item`,i=`${s}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[s]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${s}-container > ${s}-tail, > ${s}-container > ${s}-content > ${s}-title::after`]:{display:"none"}}},[`${s}-container`]:{outline:"none",[`&:focus-visible ${i}`]:(0,y.genFocusOutline)(e)},[`${i}, ${s}-content`]:{display:"inline-block",verticalAlign:"top"},[i]:{width:e.iconSize,height:e.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:e.marginXS,fontSize:e.iconFontSize,fontFamily:e.fontFamily,lineHeight:(0,v.unit)(e.iconSize),textAlign:"center",borderRadius:e.iconSize,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} transparent`,transition:`background-color ${l}, border-color ${l}`,[`${t}-icon`]:{position:"relative",top:e.iconTop,color:e.colorPrimary,lineHeight:1}},[`${s}-tail`]:{position:"absolute",top:e.calc(e.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:e.lineWidth,background:e.colorSplit,borderRadius:e.lineWidth,transition:`background ${l}`,content:'""'}},[`${s}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:e.padding,color:e.colorText,fontSize:e.fontSizeLG,lineHeight:(0,v.unit)(e.titleLineHeight),"&::after":{position:"absolute",top:e.calc(e.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:e.lineWidth,background:e.processTailColor,content:'""'}},[`${s}-subtitle`]:{display:"inline",marginInlineStart:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize},[`${s}-description`]:{color:e.colorTextDescription,fontSize:e.fontSize}},k("wait",e)),k("process",e)),{[`${s}-process > ${s}-container > ${s}-title`]:{fontWeight:e.fontWeightStrong}}),k("finish",e)),k("error",e)),{[`${s}${t}-next-error > ${t}-item-title::after`]:{background:e.colorError},[`${s}-disabled`]:{cursor:"not-allowed"}})})(e)),(e=>{let{componentCls:t,motionDurationSlow:l}=e;return{[`& ${t}-item`]:{[`&:not(${t}-item-active)`]:{[`& > ${t}-item-container[role='button']`]:{cursor:"pointer",[`${t}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${t}-icon`]:{transition:`color ${l}`}},"&:hover":{[`${t}-item`]:{"&-title, &-subtitle, &-description":{color:e.colorPrimary}}}},[`&:not(${t}-item-process)`]:{[`& > ${t}-item-container[role='button']:hover`]:{[`${t}-item`]:{"&-icon":{borderColor:e.colorPrimary,[`${t}-icon`]:{color:e.colorPrimary}}}}}}},[`&${t}-horizontal:not(${t}-label-vertical)`]:{[`${t}-item`]:{paddingInlineStart:e.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${t}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:e.descriptionMaxWidth,whiteSpace:"normal"}}}}})(e)),(e=>{let{componentCls:t,customIconTop:l,customIconSize:s,customIconFontSize:i}=e;return{[`${t}-item-custom`]:{[`> ${t}-item-container > ${t}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${t}-icon`]:{top:l,width:s,height:s,fontSize:i,lineHeight:(0,v.unit)(s)}}},[`&:not(${t}-vertical)`]:{[`${t}-item-custom`]:{[`${t}-item-icon`]:{width:"auto",background:"none"}}}}})(e)),(e=>{let{componentCls:t,iconSizeSM:l,fontSizeSM:s,fontSize:i,colorTextDescription:a}=e;return{[`&${t}-small`]:{[`&${t}-horizontal:not(${t}-label-vertical) ${t}-item`]:{paddingInlineStart:e.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${t}-item-icon`]:{width:l,height:l,marginTop:0,marginBottom:0,marginInline:`0 ${(0,v.unit)(e.marginXS)}`,fontSize:s,lineHeight:(0,v.unit)(l),textAlign:"center",borderRadius:l},[`${t}-item-title`]:{paddingInlineEnd:e.paddingSM,fontSize:i,lineHeight:(0,v.unit)(l),"&::after":{top:e.calc(l).div(2).equal()}},[`${t}-item-description`]:{color:a,fontSize:i},[`${t}-item-tail`]:{top:e.calc(l).div(2).sub(e.paddingXXS).equal()},[`${t}-item-custom ${t}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${t}-icon`]:{fontSize:l,lineHeight:(0,v.unit)(l),transform:"none"}}}}})(e)),(e=>{let{componentCls:t,iconSizeSM:l,iconSize:s}=e;return{[`&${t}-vertical`]:{display:"flex",flexDirection:"column",[`> ${t}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${t}-item-icon`]:{float:"left",marginInlineEnd:e.margin},[`${t}-item-content`]:{display:"block",minHeight:e.calc(e.controlHeight).mul(1.5).equal(),overflow:"hidden"},[`${t}-item-title`]:{lineHeight:(0,v.unit)(s)},[`${t}-item-description`]:{paddingBottom:e.paddingSM}},[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.calc(s).div(2).sub(e.lineWidth).equal(),width:e.lineWidth,height:"100%",padding:`${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).add(s).equal())} 0 ${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).equal())}`,"&::after":{width:e.lineWidth,height:"100%"}},[`> ${t}-item:not(:last-child) > ${t}-item-container > ${t}-item-tail`]:{display:"block"},[` > ${t}-item > ${t}-item-container > ${t}-item-content > ${t}-item-title`]:{"&::after":{display:"none"}},[`&${t}-small ${t}-item-container`]:{[`${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.calc(l).div(2).sub(e.lineWidth).equal(),padding:`${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).add(l).equal())} 0 ${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).equal())}`},[`${t}-item-title`]:{lineHeight:(0,v.unit)(l)}}}}})(e)),(e=>{let{componentCls:t}=e,l=`${t}-item`;return{[`${t}-horizontal`]:{[`${l}-tail`]:{transform:"translateY(-50%)"}}}})(e)),(e=>{let{componentCls:t,iconSize:l,lineHeight:s,iconSizeSM:i}=e;return{[`&${t}-label-vertical`]:{[`${t}-item`]:{overflow:"visible","&-tail":{marginInlineStart:e.calc(l).div(2).add(e.controlHeightLG).equal(),padding:`0 ${(0,v.unit)(e.paddingLG)}`},"&-content":{display:"block",width:e.calc(l).div(2).add(e.controlHeightLG).mul(2).equal(),marginTop:e.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:e.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:e.marginXXS,marginInlineStart:0,lineHeight:s}},[`&${t}-small:not(${t}-dot)`]:{[`${t}-item`]:{"&-icon":{marginInlineStart:e.calc(l).sub(i).div(2).add(e.controlHeightLG).equal()}}}}}})(e)),(e=>{let{componentCls:t,descriptionMaxWidth:l,lineHeight:s,dotCurrentSize:i,dotSize:a,motionDurationSlow:n}=e;return{[`&${t}-dot, &${t}-dot${t}-small`]:{[`${t}-item`]:{"&-title":{lineHeight:s},"&-tail":{top:e.calc(e.dotSize).sub(e.calc(e.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:`${(0,v.unit)(e.calc(l).div(2).equal())} 0`,padding:0,"&::after":{width:`calc(100% - ${(0,v.unit)(e.calc(e.marginSM).mul(2).equal())})`,height:e.calc(e.lineWidth).mul(3).equal(),marginInlineStart:e.marginSM}},"&-icon":{width:a,height:a,marginInlineStart:e.calc(e.descriptionMaxWidth).sub(a).div(2).equal(),paddingInlineEnd:0,lineHeight:(0,v.unit)(a),background:"transparent",border:0,[`${t}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${n}`,"&::after":{position:"absolute",top:e.calc(e.marginSM).mul(-1).equal(),insetInlineStart:e.calc(a).sub(e.calc(e.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:e.calc(e.controlHeightLG).mul(1.5).equal(),height:e.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:l},[`&-process ${t}-item-icon`]:{position:"relative",top:e.calc(a).sub(i).div(2).equal(),width:i,height:i,lineHeight:(0,v.unit)(i),background:"none",marginInlineStart:e.calc(e.descriptionMaxWidth).sub(i).div(2).equal()},[`&-process ${t}-icon`]:{[`&:first-child ${t}-icon-dot`]:{insetInlineStart:0}}}},[`&${t}-vertical${t}-dot`]:{[`${t}-item-icon`]:{marginTop:e.calc(e.controlHeight).sub(a).div(2).equal(),marginInlineStart:0,background:"none"},[`${t}-item-process ${t}-item-icon`]:{marginTop:e.calc(e.controlHeight).sub(i).div(2).equal(),top:0,insetInlineStart:e.calc(a).sub(i).div(2).equal(),marginInlineStart:0},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:e.calc(e.controlHeight).sub(a).div(2).equal(),insetInlineStart:0,margin:0,padding:`${(0,v.unit)(e.calc(a).add(e.paddingXS).equal())} 0 ${(0,v.unit)(e.paddingXS)}`,"&::after":{marginInlineStart:e.calc(a).sub(e.lineWidth).div(2).equal()}},[`&${t}-small`]:{[`${t}-item-icon`]:{marginTop:e.calc(e.controlHeightSM).sub(a).div(2).equal()},[`${t}-item-process ${t}-item-icon`]:{marginTop:e.calc(e.controlHeightSM).sub(i).div(2).equal()},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:e.calc(e.controlHeightSM).sub(a).div(2).equal()}},[`${t}-item:first-child ${t}-icon-dot`]:{insetInlineStart:0},[`${t}-item-content`]:{width:"inherit"}}}})(e)),(e=>{let{componentCls:t,navContentMaxWidth:l,navArrowColor:s,stepsNavActiveColor:i,motionDurationSlow:a}=e;return{[`&${t}-navigation`]:{paddingTop:e.paddingSM,[`&${t}-small`]:{[`${t}-item`]:{"&-container":{marginInlineStart:e.calc(e.marginSM).mul(-1).equal()}}},[`${t}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:e.calc(e.margin).mul(-1).equal(),paddingBottom:e.paddingSM,textAlign:"start",transition:`opacity ${a}`,[`${t}-item-content`]:{maxWidth:l},[`${t}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},y.textEllipsis),{"&::after":{display:"none"}})},[`&:not(${t}-item-active)`]:{[`${t}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${(0,v.unit)(e.calc(e.paddingSM).div(2).equal())})`,insetInlineStart:"100%",display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,borderTop:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${s}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${s}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:e.lineWidthBold,backgroundColor:i,transition:`width ${a}, inset-inline-start ${a}`,transitionTimingFunction:"ease-out",content:'""'}},[`${t}-item${t}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${t}-navigation${t}-vertical`]:{[`> ${t}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${t}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:e.calc(e.lineWidth).mul(3).equal(),height:`calc(100% - ${(0,v.unit)(e.marginLG)})`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:e.calc(e.controlHeight).mul(.25).equal(),height:e.calc(e.controlHeight).mul(.25).equal(),marginBottom:e.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}},[`&${t}-navigation${t}-horizontal`]:{[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}}})(e)),(e=>{let{componentCls:t}=e;return{[`&${t}-rtl`]:{direction:"rtl",[`${t}-item`]:{"&-subtitle":{float:"left"}},[`&${t}-navigation`]:{[`${t}-item::after`]:{transform:"rotate(-45deg)"}},[`&${t}-vertical`]:{[`> ${t}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${t}-item-icon`]:{float:"right"}}},[`&${t}-dot`]:{[`${t}-item-icon ${t}-icon-dot, &${t}-small ${t}-item-icon ${t}-icon-dot`]:{float:"right"}}}}})(e)),(e=>{let{antCls:t,componentCls:l,iconSize:s,iconSizeSM:i,processIconColor:a,marginXXS:n,lineWidthBold:r,lineWidth:c,paddingXXS:o}=e,d=e.calc(s).add(e.calc(r).mul(4).equal()).equal(),m=e.calc(i).add(e.calc(e.lineWidth).mul(4).equal()).equal();return{[`&${l}-with-progress`]:{[`${l}-item`]:{paddingTop:o,[`&-process ${l}-item-container ${l}-item-icon ${l}-icon`]:{color:a}},[`&${l}-vertical > ${l}-item `]:{paddingInlineStart:o,[`> ${l}-item-container > ${l}-item-tail`]:{top:n,insetInlineStart:e.calc(s).div(2).sub(c).add(o).equal()}},[`&, &${l}-small`]:{[`&${l}-horizontal ${l}-item:first-child`]:{paddingBottom:o,paddingInlineStart:o}},[`&${l}-small${l}-vertical > ${l}-item > ${l}-item-container > ${l}-item-tail`]:{insetInlineStart:e.calc(i).div(2).sub(c).add(o).equal()},[`&${l}-label-vertical ${l}-item ${l}-item-tail`]:{top:e.calc(s).div(2).add(o).equal()},[`${l}-item-icon`]:{position:"relative",[`${t}-progress`]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:`${(0,v.unit)(d)} !important`,height:`${(0,v.unit)(d)} !important`}}},[`&${l}-small`]:{[`&${l}-label-vertical ${l}-item ${l}-item-tail`]:{top:e.calc(i).div(2).add(o).equal()},[`${l}-item-icon ${t}-progress-inner`]:{width:`${(0,v.unit)(m)} !important`,height:`${(0,v.unit)(m)} !important`}}}}})(e)),(e=>{let{componentCls:t,inlineDotSize:l,inlineTitleColor:s,inlineTailColor:i}=e,a=e.calc(e.paddingXS).add(e.lineWidth).equal(),n={[`${t}-item-container ${t}-item-content ${t}-item-title`]:{color:s}};return{[`&${t}-inline`]:{width:"auto",display:"inline-flex",[`${t}-item`]:{flex:"none","&-container":{padding:`${(0,v.unit)(a)} ${(0,v.unit)(e.paddingXXS)} 0`,margin:`0 ${(0,v.unit)(e.calc(e.marginXXS).div(2).equal())}`,borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:l,height:l,marginInlineStart:`calc(50% - ${(0,v.unit)(e.calc(l).div(2).equal())})`,[`> ${t}-icon`]:{top:0},[`${t}-icon-dot`]:{borderRadius:e.calc(e.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:e.calc(e.marginXS).sub(e.lineWidth).equal()},"&-title":{color:s,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,fontWeight:"normal",marginBottom:e.calc(e.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:e.calc(l).div(2).add(a).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:e.lineWidth,borderRadius:0,marginInlineStart:0,background:i}},[`&:first-child ${t}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${t}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:e.colorBorderBg,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${i}`}},n),"&-finish":Object.assign({[`${t}-item-tail::after`]:{backgroundColor:i},[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:i,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${i}`}},n),"&-error":n,"&-active, &-process":Object.assign({[`${t}-item-icon`]:{width:l,height:l,marginInlineStart:`calc(50% - ${(0,v.unit)(e.calc(l).div(2).equal())})`,top:0}},n),[`&:not(${t}-item-active) > ${t}-item-container[role='button']:hover`]:{[`${t}-item-title`]:{color:s}}}}}})(e))}})((0,S.mergeToken)(e,{processIconColor:s,processTitleColor:i,processDescriptionColor:i,processIconBgColor:a,processIconBorderColor:a,processDotColor:a,processTailColor:d,waitTitleColor:n,waitDescriptionColor:n,waitTailColor:d,waitDotColor:t,finishIconColor:a,finishTitleColor:i,finishDescriptionColor:n,finishTailColor:a,finishDotColor:a,errorIconColor:s,errorTitleColor:c,errorDescriptionColor:c,errorTailColor:d,errorIconBgColor:c,errorIconBorderColor:c,errorDotColor:c,stepsNavActiveColor:a,stepsProgressSize:l,inlineDotSize:6,inlineTitleColor:r,inlineTailColor:o}))},e=>({titleLineHeight:e.controlHeight,customIconSize:e.controlHeight,customIconTop:0,customIconFontSize:e.controlHeightSM,iconSize:e.controlHeight,iconTop:-.5,iconFontSize:e.fontSize,iconSizeSM:e.fontSizeHeading3,dotSize:e.controlHeight/4,dotCurrentSize:e.controlHeightLG/4,navArrowColor:e.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:140,waitIconColor:e.wireframe?e.colorTextDisabled:e.colorTextLabel,waitIconBgColor:e.wireframe?e.colorBgContainer:e.colorFillContent,waitIconBorderColor:e.wireframe?e.colorTextDisabled:"transparent",finishIconBgColor:e.wireframe?e.colorBgContainer:e.controlItemBgActive,finishIconBorderColor:e.wireframe?e.colorPrimary:e.controlItemBgActive}));var T=e.i(876556),w=function(e,t){var l={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,s=Object.getOwnPropertySymbols(e);it.indexOf(s[i])&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(l[s[i]]=e[s[i]]);return l};let C=e=>{var a,n;let{percent:r,size:c,className:o,rootClassName:d,direction:m,items:x,responsive:u=!0,current:v=0,children:y,style:N}=e,S=w(e,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:k}=(0,b.default)(u),{getPrefixCls:C,direction:_,className:P,style:M}=(0,p.useComponentConfig)("steps"),I=t.useMemo(()=>u&&k?"vertical":m,[u,k,m]),B=(0,g.default)(c),z=C("steps",e.prefixCls),[O,A,H]=$(z),E="inline"===e.type,F=C("",e.iconPrefix),L=(a=x,n=y,a?a:(0,T.default)(n).map(e=>{if(t.isValidElement(e)){let{props:t}=e;return Object.assign({},t)}return null}).filter(e=>e)),D=E?void 0:r,q=Object.assign(Object.assign({},M),N),R=(0,i.default)(P,{[`${z}-rtl`]:"rtl"===_,[`${z}-with-progress`]:void 0!==D},o,d,A,H),W={finish:t.createElement(l.default,{className:`${z}-finish-icon`}),error:t.createElement(s.default,{className:`${z}-error-icon`})};return O(t.createElement(h,Object.assign({icons:W},S,{style:q,current:v,size:B,items:L,itemRender:E?(e,l)=>e.description?t.createElement(f.default,{title:e.description},l):l:void 0,stepIcon:({node:e,status:l})=>"process"===l&&void 0!==D?t.createElement("div",{className:`${z}-progress-icon`},t.createElement(j.default,{type:"circle",percent:D,size:"small"===B?32:40,strokeWidth:4,format:()=>null}),e):e,direction:I,prefixCls:z,iconPrefix:F,className:R})))};C.Step=h.Step,e.s(["Steps",0,C],280898)},934879,e=>{"use strict";var t=e.i(843476),l=e.i(745434),s=e.i(271645),i=e.i(212931),a=e.i(808613),n=e.i(280898),r=e.i(464571),c=e.i(536916),o=e.i(599724),d=e.i(629569),m=e.i(389083),x=e.i(764205),u=e.i(727749);let{Step:h}=n.Steps,p=({visible:e,onClose:l,accessToken:p,agentHubData:g,onSuccess:b})=>{let[j,f]=(0,s.useState)(0),[v,y]=(0,s.useState)(new Set),[N,S]=(0,s.useState)(!1),[k]=a.Form.useForm(),$=()=>{f(0),y(new Set),k.resetFields(),l()};(0,s.useEffect)(()=>{e&&g.length>0&&y(new Set(g.filter(e=>!0===e.is_public).map(e=>e.agent_id||e.name)))},[e,g]);let T=async()=>{if(0===v.size)return void u.default.fromBackend("Please select at least one agent to make public");S(!0);try{let e=Array.from(v);await (0,x.makeAgentsPublicCall)(p,e),u.default.success(`Successfully made ${e.length} agent(s) public!`),$(),b()}catch(e){console.error("Error making agents public:",e),u.default.fromBackend("Failed to make agents public. Please try again.")}finally{S(!1)}};return(0,t.jsx)(i.Modal,{title:"Make Agents Public",open:e,onCancel:$,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:k,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:j,className:"mb-6",children:[(0,t.jsx)(h,{title:"Select Agents"}),(0,t.jsx)(h,{title:"Confirm"})]}),(()=>{switch(j){case 0:let e,l;return e=g.length>0&&g.every(e=>v.has(e.agent_id||e.name)),l=v.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Agents to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?y(new Set(g.map(e=>e.agent_id||e.name))):y(new Set)},disabled:0===g.length,children:["Select All ",g.length>0&&`(${g.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the agents you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these agents."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===g.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No agents available."})}):g.map(e=>{let l=e.agent_id||e.name;return(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:v.has(l),onChange:e=>{var t;let s;return t=e.target.checked,s=new Set(v),void(t?s.add(l):s.delete(l),y(s))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.name}),(0,t.jsxs)(m.Badge,{color:"blue",size:"sm",children:["v",e.version]})]}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:e.description}),e.skills&&e.skills.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[e.skills.slice(0,3).map(e=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e.name},e.id)),e.skills.length>3&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",e.skills.length-3," more"]})]})]})]},l)})})}),v.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:v.size})," agent",1!==v.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making Agents Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these agents public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Agents to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(v).map(e=>{let l=g.find(t=>(t.agent_id||t.name)===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:l?.name||e}),l&&(0,t.jsxs)(m.Badge,{color:"blue",size:"xs",children:["v",l.version]})]}),l?.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:l.description})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:v.size})," agent",1!==v.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===j?$:()=>{1===j&&f(0)},children:0===j?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===j&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===j){if(0===v.size)return void u.default.fromBackend("Please select at least one agent to make public");f(1)}},disabled:0===v.size,children:"Next"}),1===j&&(0,t.jsx)(r.Button,{onClick:T,loading:N,children:"Make Public"})]})]})]})})},{Step:g}=n.Steps,b=({visible:e,onClose:l,accessToken:h,mcpHubData:p,onSuccess:b})=>{let[j,f]=(0,s.useState)(0),[v,y]=(0,s.useState)(new Set),[N,S]=(0,s.useState)(!1),[k]=a.Form.useForm(),$=()=>{f(0),y(new Set),k.resetFields(),l()};(0,s.useEffect)(()=>{e&&p.length>0&&y(new Set(p.filter(e=>e.mcp_info?.is_public===!0).map(e=>e.server_id)))},[e]);let T=async()=>{if(0===v.size)return void u.default.fromBackend("Please select at least one MCP server to make public");S(!0);try{let e=Array.from(v);await (0,x.makeMCPPublicCall)(h,e),u.default.success(`Successfully made ${e.length} MCP server(s) public!`),$(),b()}catch(e){console.error("Error making MCP servers public:",e),u.default.fromBackend("Failed to make MCP servers public. Please try again.")}finally{S(!1)}};return(0,t.jsx)(i.Modal,{title:"Make MCP Servers Public",open:e,onCancel:$,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:k,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:j,className:"mb-6",children:[(0,t.jsx)(g,{title:"Select Servers"}),(0,t.jsx)(g,{title:"Confirm"})]}),(()=>{switch(j){case 0:let e,l;return e=p.length>0&&p.every(e=>v.has(e.server_id)),l=v.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select MCP Servers to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?y(new Set(p.map(e=>e.server_id))):y(new Set)},disabled:0===p.length,children:["Select All ",p.length>0&&`(${p.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the MCP servers you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these servers."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===p.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No MCP servers available."})}):p.map(e=>{let l=e.mcp_info?.is_public===!0;return(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:v.has(e.server_id),onChange:t=>{var l,s;let i;return l=e.server_id,s=t.target.checked,i=new Set(v),void(s?i.add(l):i.delete(l),y(i))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.server_name}),l&&(0,t.jsx)(m.Badge,{color:"emerald",size:"sm",children:"Public"}),(0,t.jsx)(m.Badge,{color:"blue",size:"sm",children:e.transport}),(0,t.jsx)(m.Badge,{color:"active"===e.status||"healthy"===e.status?"green":"inactive"===e.status||"unhealthy"===e.status?"red":"gray",size:"sm",children:e.status||"unknown"})]}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:e.description||e.url}),e.allowed_tools&&e.allowed_tools.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[e.allowed_tools.slice(0,3).map((e,l)=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e},l)),e.allowed_tools.length>3&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",e.allowed_tools.length-3," more"]})]})]})]},e.server_id)})})}),v.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:v.size})," MCP server",1!==v.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making MCP Servers Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these MCP servers public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"MCP Servers to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(v).map(e=>{let l=p.find(t=>t.server_id===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:l?.server_name||e}),l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:l.transport}),(0,t.jsx)(m.Badge,{color:"active"===l.status||"healthy"===l.status?"green":"inactive"===l.status||"unhealthy"===l.status?"red":"gray",size:"xs",children:l.status||"unknown"})]})]}),l?.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:l.description}),l?.url&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-500 mt-1",children:l.url})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:v.size})," MCP server",1!==v.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===j?$:()=>{1===j&&f(0)},children:0===j?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===j&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===j){if(0===v.size)return void u.default.fromBackend("Please select at least one MCP server to make public");f(1)}},disabled:0===v.size,children:"Next"}),1===j&&(0,t.jsx)(r.Button,{onClick:T,loading:N,children:"Make Public"})]})]})]})})};var j=e.i(304967);let f=({modelHubData:e,onFilteredDataChange:l,showFiltersCard:i=!0,className:a=""})=>{let n,r,c,[d,m]=(0,s.useState)(""),[x,u]=(0,s.useState)(""),[h,p]=(0,s.useState)(""),[g,b]=(0,s.useState)(""),f=(0,s.useRef)([]),v=(0,s.useMemo)(()=>e?.filter(e=>{let t=e.model_group.toLowerCase().includes(d.toLowerCase()),l=""===x||e.providers.includes(x),s=""===h||e.mode===h,i=""===g||Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).some(([e])=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")===g);return t&&l&&s&&i})||[],[e,d,x,h,g]);(0,s.useEffect)(()=>{(v.length!==f.current.length||v.some((e,t)=>e.model_group!==f.current[t]?.model_group))&&(f.current=v,l(v))},[v,l]);let y=(0,t.jsxs)("div",{className:"flex flex-wrap gap-4 items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Search Models:"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names...",value:d,onChange:e=>m(e.target.value),className:"border rounded px-3 py-2 w-64 h-10 text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Provider:"}),(0,t.jsxs)("select",{value:x,onChange:e=>u(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-40 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Providers"}),e&&(n=new Set,e.forEach(e=>{e.providers.forEach(e=>n.add(e))}),Array.from(n)).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Mode:"}),(0,t.jsxs)("select",{value:h,onChange:e=>p(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-32 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Modes"}),e&&(r=new Set,e.forEach(e=>{e.mode&&r.add(e.mode)}),Array.from(r)).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Features:"}),(0,t.jsxs)("select",{value:g,onChange:e=>b(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-48 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Features"}),e&&(c=new Set,e.forEach(e=>{Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).forEach(([e])=>{let t=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");c.add(t)})}),Array.from(c).sort()).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(d||x||h||g)&&(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsx)("button",{onClick:()=>{m(""),u(""),p(""),b("")},className:"text-blue-600 hover:text-blue-800 text-sm underline h-10 flex items-center",children:"Clear Filters"})})]});return i?(0,t.jsx)(j.Card,{className:`mb-6 ${a}`,children:y}):(0,t.jsx)("div",{className:a,children:y})},{Step:v}=n.Steps,y=({visible:e,onClose:l,accessToken:h,modelHubData:p,onSuccess:g})=>{let[b,j]=(0,s.useState)(0),[y,N]=(0,s.useState)(new Set),[S,k]=(0,s.useState)([]),[$,T]=(0,s.useState)(!1),[w]=a.Form.useForm(),C=()=>{j(0),N(new Set),k([]),w.resetFields(),l()},_=(0,s.useCallback)(e=>{k(e)},[]);(0,s.useEffect)(()=>{e&&p.length>0&&(k(p),N(new Set(p.filter(e=>!0===e.is_public_model_group).map(e=>e.model_group))))},[e,p]);let P=async()=>{if(0===y.size)return void u.default.fromBackend("Please select at least one model to make public");T(!0);try{let e=Array.from(y);await (0,x.makeModelGroupPublic)(h,e),u.default.success(`Successfully made ${e.length} model group(s) public!`),C(),g()}catch(e){console.error("Error making model groups public:",e),u.default.fromBackend("Failed to make model groups public. Please try again.")}finally{T(!1)}};return(0,t.jsx)(i.Modal,{title:"Make Models Public",open:e,onCancel:C,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:w,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:b,className:"mb-6",children:[(0,t.jsx)(v,{title:"Select Models"}),(0,t.jsx)(v,{title:"Confirm"})]}),(()=>{switch(b){case 0:let e,l;return e=S.length>0&&S.every(e=>y.has(e.model_group)),l=y.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Models to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?N(new Set(S.map(e=>e.model_group))):N(new Set)},disabled:0===S.length,children:["Select All ",S.length>0&&`(${S.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the models you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these models."}),(0,t.jsx)(f,{modelHubData:p,onFilteredDataChange:_,showFiltersCard:!1,className:"border rounded-lg p-4 bg-gray-50"}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===S.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No models match the current filters."})}):S.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:y.has(e.model_group),onChange:t=>{var l,s;let i;return l=e.model_group,s=t.target.checked,i=new Set(y),void(s?i.add(l):i.delete(l),N(i))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.model_group}),e.mode&&(0,t.jsx)(m.Badge,{color:"green",size:"sm",children:e.mode})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e},e))})]})]},e.model_group))})}),y.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:y.size})," model",1!==y.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making Models Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these models public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Models to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(y).map(e=>{let l=p.find(t=>t.model_group===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e}),l&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:l.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e},e))})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:y.size})," model",1!==y.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===b?C:()=>{1===b&&j(0)},children:0===b?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===b&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===b){if(0===y.size)return void u.default.fromBackend("Please select at least one model to make public");j(1)}},disabled:0===y.size,children:"Next"}),1===b&&(0,t.jsx)(r.Button,{onClick:P,loading:$,children:"Make Public"})]})]})]})})};var N=e.i(994388),S=e.i(592968),k=e.i(262218),$=e.i(166406),T=e.i(827252);let w=e=>`$${(1e6*e).toFixed(2)}`,C=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString();var _=e.i(902555),P=e.i(708347),M=e.i(871943),I=e.i(502547),B=e.i(434626),z=e.i(250980),O=e.i(269200),A=e.i(942232),H=e.i(977572),E=e.i(427612),F=e.i(64848),L=e.i(496020),D=e.i(522016);let q=({accessToken:e,userRole:l})=>{let[i,a]=(0,s.useState)([]),[n,r]=(0,s.useState)({url:"",displayName:""}),[c,m]=(0,s.useState)(null),[h,p]=(0,s.useState)(!1),[g,b]=(0,s.useState)(!0),[f,v]=(0,s.useState)(!1),[y,N]=(0,s.useState)([]),S=async()=>{if(e)try{p(!0);let e=await (0,x.getPublicModelHubInfo)();if(e&&e.useful_links){let t=e.useful_links||{},l=Object.entries(t).map(([e,t])=>"object"==typeof t&&null!==t&&"url"in t?{id:`${t.index??0}-${e}`,displayName:e,url:t.url,index:t.index??0}:{id:`0-${e}`,displayName:e,url:t,index:0}).sort((e,t)=>(e.index??0)-(t.index??0)).map((e,t)=>({...e,id:`${t}-${e.displayName}`}));a(l)}else a([])}catch(e){console.error("Error fetching useful links:",e),a([])}finally{p(!1)}};if((0,s.useEffect)(()=>{S()},[e]),!(0,P.isAdminRole)(l||""))return null;let k=async t=>{if(!e)return!1;try{let l={};return t.forEach((e,t)=>{l[e.displayName]={url:e.url,index:t}}),await (0,x.updateUsefulLinksCall)(e,l),!0}catch(e){return console.error("Error saving links:",e),u.default.fromBackend(`Failed to save links - ${e}`),!1}},$=async()=>{if(!n.url||!n.displayName)return;try{new URL(n.url)}catch{u.default.fromBackend("Please enter a valid URL");return}if(i.some(e=>e.displayName===n.displayName))return void u.default.fromBackend("A link with this display name already exists");let e=[...i,{id:`${Date.now()}-${n.displayName}`,displayName:n.displayName,url:n.url}];await k(e)&&(a(e),r({url:"",displayName:""}),u.default.success("Link added successfully"))},T=async()=>{if(!c)return;try{new URL(c.url)}catch{u.default.fromBackend("Please enter a valid URL");return}if(i.some(e=>e.id!==c.id&&e.displayName===c.displayName))return void u.default.fromBackend("A link with this display name already exists");let e=i.map(e=>e.id===c.id?c:e);await k(e)&&(a(e),m(null),u.default.success("Link updated successfully"))},w=()=>{m(null)},C=async e=>{let t=i.filter(t=>t.id!==e);await k(t)&&(a(t),u.default.success("Link deleted successfully"))},q=async()=>{await k(i)&&(v(!1),N([]),u.default.success("Link order saved successfully"))};return(0,t.jsxs)(j.Card,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>b(!g),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(d.Title,{className:"mb-0",children:"Link Management"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Manage the links that are displayed under 'Useful Links' on the public model hub."})]}),(0,t.jsx)("div",{className:"flex items-center",children:g?(0,t.jsx)(M.ChevronDownIcon,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(I.ChevronRightIcon,{className:"w-5 h-5 text-gray-500"})})]}),g&&(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 Link"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Display Name"}),(0,t.jsx)("input",{type:"text",value:n.displayName,onChange:e=>r({...n,displayName:e.target.value}),placeholder:"Friendly name",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:"URL"}),(0,t.jsx)("input",{type:"text",value:n.url,onChange:e=>r({...n,url:e.target.value}),placeholder:"https://example.com",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:$,disabled:!n.url||!n.displayName,className:`flex items-center px-4 py-2 rounded-md text-sm ${!n.url||!n.displayName?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(z.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Link"]})})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700",children:"Manage Existing Links"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)(D.default,{href:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`,target:"_blank",rel:"noopener noreferrer",className:"text-xs bg-blue-50 text-blue-600 px-3 py-1.5 rounded hover:bg-blue-100 flex items-center",title:"Open Public Model Hub",children:["Public Model Hub",(0,t.jsx)(B.ExternalLinkIcon,{className:"w-4 h-4 ml-1"})]}),f?(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:q,className:"text-xs bg-green-600 text-white px-3 py-1.5 rounded hover:bg-green-700",children:"Save Order"}),(0,t.jsx)("button",{onClick:()=>{a([...y]),v(!1),N([])},className:"text-xs bg-gray-50 text-gray-600 px-3 py-1.5 rounded hover:bg-gray-100",children:"Cancel"})]}):(0,t.jsx)("button",{onClick:()=>{c&&m(null),N([...i]),v(!0)},className:"text-xs bg-purple-50 text-purple-600 px-3 py-1.5 rounded hover:bg-purple-100 flex items-center",children:"Rearrange Order"})]})]}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(O.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(E.TableHead,{children:(0,t.jsxs)(L.TableRow,{children:[(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"Display Name"}),(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"URL"}),(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(A.TableBody,{children:[i.map((e,l)=>(0,t.jsx)(L.TableRow,{className:"h-8",children:c&&c.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:c.displayName,onChange:e=>m({...c,displayName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(H.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:c.url,onChange:e=>m({...c,url:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(H.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:T,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:w,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.TableCell,{className:"py-0.5 text-sm text-gray-900",children:e.displayName}),(0,t.jsx)(H.TableCell,{className:"py-0.5 text-sm text-gray-500",children:e.url}),(0,t.jsx)(H.TableCell,{className:"py-0.5 whitespace-nowrap",children:f?(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)(_.default,{variant:"Up",onClick:()=>(e=>{if(0===e)return;let t=[...i];[t[e-1],t[e]]=[t[e],t[e-1]],a(t)})(l),tooltipText:"Move up",disabled:0===l,disabledTooltipText:"Already at the top",dataTestId:`move-up-${e.id}`}),(0,t.jsx)(_.default,{variant:"Down",onClick:()=>(e=>{if(e===i.length-1)return;let t=[...i];[t[e],t[e+1]]=[t[e+1],t[e]],a(t)})(l),tooltipText:"Move down",disabled:l===i.length-1,disabledTooltipText:"Already at the bottom",dataTestId:`move-down-${e.id}`})]}):(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)(_.default,{variant:"Open",onClick:()=>{var t;return t=e.url,void window.open(t,"_blank")},tooltipText:"Open link",dataTestId:`open-link-${e.id}`}),(0,t.jsx)(_.default,{variant:"Edit",onClick:()=>{m({...e})},tooltipText:"Edit link",dataTestId:`edit-link-${e.id}`}),(0,t.jsx)(_.default,{variant:"Delete",onClick:()=>C(e.id),tooltipText:"Delete link",dataTestId:`delete-link-${e.id}`})]})})]})},e.id)),0===i.length&&(0,t.jsx)(L.TableRow,{children:(0,t.jsx)(H.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No links added yet. Add a new link above."})})]})]})})})]})]})};var R=e.i(737033);let{Step:W}=n.Steps,U=({visible:e,onClose:l,accessToken:h,skillsList:p,onSuccess:g})=>{let[b,j]=(0,s.useState)(0),[f,v]=(0,s.useState)(new Set),[y,N]=(0,s.useState)(!1),[S]=a.Form.useForm(),k=()=>{j(0),v(new Set),S.resetFields(),l()};(0,s.useEffect)(()=>{e&&p.length>0&&v(new Set(p.filter(e=>e.enabled).map(e=>e.name)))},[e,p]);let $=async()=>{if(0===f.size)return void u.default.fromBackend("Please select at least one skill");N(!0);try{await Promise.all(p.map(e=>{let t=f.has(e.name);return t&&!e.enabled?(0,x.enableClaudeCodePlugin)(h,e.name):!t&&e.enabled?(0,x.disableClaudeCodePlugin)(h,e.name):Promise.resolve()})),u.default.success(`Skill Hub updated — ${f.size} skill(s) published`),k(),g()}catch(e){console.error("Error publishing skills:",e),u.default.fromBackend("Failed to update skills. Please try again.")}finally{N(!1)}},T=p.length>0&&p.every(e=>f.has(e.name)),w=f.size>0&&!T;return(0,t.jsx)(i.Modal,{title:"Publish to Skill Hub",open:e,onCancel:k,footer:null,width:700,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:S,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:b,className:"mb-6",children:[(0,t.jsx)(W,{title:"Select Skills"}),(0,t.jsx)(W,{title:"Confirm"})]}),0===b?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Skills to Publish"}),(0,t.jsxs)(c.Checkbox,{checked:T,indeterminate:w,onChange:e=>{e.target.checked?v(new Set(p.map(e=>e.name))):v(new Set)},disabled:0===p.length,children:["Select All (",p.length,")"]})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Selected skills will be visible to all users in the Skill Hub. Deselected skills will be unpublished."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===p.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No skills registered yet."})}):p.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:f.has(e.name),onChange:t=>{var l,s;let i;return l=e.name,s=t.target.checked,i=new Set(f),void(s?i.add(l):i.delete(l),v(i))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Text,{className:"font-medium font-mono text-sm",children:e.name}),e.enabled&&(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Public"})]}),e.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-500 truncate max-w-sm",children:e.description})]}),e.domain&&(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e.domain})]},e.name))})}),f.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:f.size})," skill",1!==f.size?"s":""," will be published"]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Publish to Skill Hub"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Note:"})," Published skills will be visible to all users in the Skill Hub tab. Skills not in the list below will be unpublished."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Skills to be published:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(f).map(e=>{let l=p.find(t=>t.name===e);return(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:[(0,t.jsx)(o.Text,{className:"font-mono text-sm",children:e}),l?.domain&&(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:l.domain})]},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:f.size})," skill",1!==f.size?"s":""," will be published"]})})]}),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===b?k:()=>j(0),children:0===b?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===b&&(0,t.jsx)(r.Button,{onClick:()=>{0===f.size?u.default.fromBackend("Please select at least one skill"):j(1)},disabled:0===f.size,children:"Next"}),1===b&&(0,t.jsx)(r.Button,{onClick:$,loading:y,children:"Publish to Hub"})]})]})]})})};var K=e.i(798496),X=e.i(976883),G=e.i(197647),V=e.i(653824),Y=e.i(881073),J=e.i(404206),Q=e.i(723731),Z=e.i(174886),ee=e.i(618566),et=e.i(650056),el=e.i(292639),es=e.i(161281),ei=e.i(268004);e.s(["default",0,({accessToken:e,publicPage:a,premiumUser:n,userRole:r})=>{let c,h,g=(0,P.isProxyAdminRole)(r||""),[v,_]=(0,s.useState)(!1),[M,I]=(0,s.useState)(null),[B,z]=(0,s.useState)(!0),[O,A]=(0,s.useState)(!1),[H,E]=(0,s.useState)(!1),[F,L]=(0,s.useState)(null),[D,W]=(0,s.useState)([]),[ea,en]=(0,s.useState)(!1),[er,ec]=(0,s.useState)(null),[eo,ed]=(0,s.useState)(!1),[em,ex]=(0,s.useState)(!0),[eu,eh]=(0,s.useState)(null),[ep,eg]=(0,s.useState)(!1),[eb,ej]=(0,s.useState)(null),[ef,ev]=(0,s.useState)(!0),[ey,eN]=(0,s.useState)(null),[eS,ek]=(0,s.useState)(!1),[e$,eT]=(0,s.useState)(!1),[ew,eC]=(0,s.useState)([]),[e_,eP]=(0,s.useState)(!1),[eM,eI]=(0,s.useState)(!1),eB=(0,ee.useRouter)(),{data:ez,isLoading:eO}=(0,el.useUISettings)();(0,s.useEffect)(()=>{if(!eO&&a&&!0===ez?.values?.require_auth_for_public_ai_hub){let e=(0,ei.getCookie)("token");if(!(0,es.checkTokenValidity)(e))return void eB.replace(`${(0,x.getProxyBaseUrl)()}/ui/login`)}},[eO,a,ez,eB]),(0,s.useEffect)(()=>{let t=async e=>{try{z(!0);let t=await (0,x.modelHubCall)(e);console.log("ModelHubData:",t),I(t.data),(0,x.getConfigFieldSetting)(e,"enable_public_model_hub").then(e=>{console.log(`data: ${JSON.stringify(e)}`),!0==e.field_value&&_(!0)}).catch(e=>{})}catch(e){console.error("There was an error fetching the model data",e)}finally{z(!1)}},l=async()=>{try{z(!0),await (0,x.getUiConfig)();let e=await (0,x.modelHubPublicModelsCall)();console.log("ModelHubData:",e),console.log("First model structure:",e[0]),console.log("Model has model_group?",e[0]?.model_group),console.log("Model has providers?",e[0]?.providers),I(e),_(!0)}catch(e){console.error("There was an error fetching the public model data",e)}finally{z(!1)}};e?t(e):a&&l()},[e,a]),(0,s.useEffect)(()=>{let t=async()=>{if(e)try{ex(!0);let t=await (0,x.getAgentsList)(e);console.log("AgentHubData:",t);let l=t.agents.map(e=>({agent_id:e.agent_id,...e.agent_card_params,is_public:e.litellm_params.is_public}));ec(l)}catch(e){console.error("There was an error fetching the agent data",e)}finally{ex(!1)}};a||t()},[a,e]),(0,s.useEffect)(()=>{let t=async()=>{if(e)try{ev(!0);let t=await (0,x.fetchMCPServers)(e);console.log("MCPHubData:",t),ej(t)}catch(e){console.error("There was an error fetching the MCP server data",e)}finally{ev(!1)}};a||t()},[a,e]),(0,s.useEffect)(()=>{(async()=>{if(e)try{eP(!0);let t=!0===a,l=await (0,x.getClaudeCodePluginsList)(e,t);eC(l.plugins)}catch(e){console.error("Error fetching skill hub data",e)}finally{eP(!1)}})()},[e,a]);let eA=()=>{A(!1),E(!1),L(null),eg(!1),eh(null),ek(!1),eN(null)},eH=()=>{A(!1),E(!1),L(null),eg(!1),eh(null),ek(!1),eN(null)},eE=e=>{navigator.clipboard.writeText(e),u.default.success("Copied to clipboard!")},eF=e=>`$${(1e6*e).toFixed(2)}`,eL=(0,s.useCallback)(e=>{W(e)},[]);return(console.log("publicPage: ",a),console.log("publicPageAllowed: ",v),a&&v)?(0,t.jsx)(X.default,{accessToken:e}):(0,t.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[!1==a?(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start",children:[(0,t.jsx)(d.Title,{className:"text-center",children:"AI Hub"}),(0,P.isAdminRole)(r||"")?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Make models, agents, and MCP servers public for developers to know what's available."}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"A list of all public model names personally available to you."})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)(o.Text,{children:"Model Hub URL:"}),(0,t.jsxs)("div",{className:"flex items-center bg-gray-200 px-2 py-1 rounded",children:[(0,t.jsx)(o.Text,{className:"mr-2",children:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`}),(0,t.jsx)("button",{onClick:()=>eE(`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`),className:"p-1 hover:bg-gray-300 rounded transition-colors",title:"Copy URL",children:(0,t.jsx)(Z.Copy,{size:16,className:"text-gray-600"})})]})]})]}),g&&(0,t.jsx)("div",{className:"mt-8 mb-2",children:(0,t.jsx)(q,{accessToken:e,userRole:r})}),(0,t.jsxs)(V.TabGroup,{children:[(0,t.jsxs)(Y.TabList,{className:"mb-4",children:[(0,t.jsx)(G.Tab,{children:"Model Hub"}),(0,t.jsx)(G.Tab,{children:"Agent Hub"}),(0,t.jsx)(G.Tab,{children:"MCP Hub"}),(0,t.jsx)(G.Tab,{children:"Skill Hub"})]}),(0,t.jsxs)(Q.TabPanels,{children:[(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&g&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&en(!0)),children:"Select Models to Make Public"})}),(0,t.jsx)(f,{modelHubData:M||[],onFilteredDataChange:eL}),(0,t.jsx)(K.ModelDataTable,{columns:((e,l,s=!1)=>{let i=[{header:"Public Model Name",accessorKey:"model_group",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let s=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium text-sm",children:s.model_group}),(0,t.jsx)(S.Tooltip,{title:"Copy model name",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(s.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(o.Text,{className:"text-xs text-gray-600",children:s.providers.join(", ")})})]})}},{header:"Provider",accessorKey:"providers",enableSorting:!0,sortingFn:(e,t)=>{let l=e.original.providers.join(", "),s=t.original.providers.join(", ");return l.localeCompare(s)},cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.providers.slice(0,2).map(e=>(0,t.jsx)(k.Tag,{color:"blue",className:"text-xs",children:e},e)),l.providers.length>2&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",l.providers.length-2]})]})},meta:{className:"hidden md:table-cell"}},{header:"Mode",accessorKey:"mode",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return l.mode?(0,t.jsx)(m.Badge,{color:"green",size:"sm",children:l.mode}):(0,t.jsx)(o.Text,{className:"text-gray-500",children:"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Tokens",accessorKey:"max_input_tokens",enableSorting:!0,sortingFn:(e,t)=>(e.original.max_input_tokens||0)+(e.original.max_output_tokens||0)-((t.original.max_input_tokens||0)+(t.original.max_output_tokens||0)),cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsxs)(o.Text,{className:"text-xs",children:[l.max_input_tokens?C(l.max_input_tokens):"-"," /"," ",l.max_output_tokens?C(l.max_output_tokens):"-"]})})},meta:{className:"hidden lg:table-cell"}},{header:"Cost/1M",accessorKey:"input_cost_per_token",enableSorting:!0,sortingFn:(e,t)=>(e.original.input_cost_per_token||0)+(e.original.output_cost_per_token||0)-((t.original.input_cost_per_token||0)+(t.original.output_cost_per_token||0)),cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(o.Text,{className:"text-xs",children:l.input_cost_per_token?w(l.input_cost_per_token):"-"}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-500",children:l.output_cost_per_token?w(l.output_cost_per_token):"-"})]})}},{header:"Features",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let l=Object.entries(e.original).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),s=["green","blue","purple","orange","red","yellow"];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(o.Text,{className:"text-gray-500 text-xs",children:"-"}):l.map((e,l)=>(0,t.jsx)(m.Badge,{color:s[l%s.length],size:"xs",children:e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},e))})}},{header:"Public",accessorKey:"is_public_model_group",enableSorting:!0,sortingFn:(e,t)=>(!0===e.original.is_public_model_group)-(!0===t.original.is_public_model_group),cell:({row:e})=>!0===e.original.is_public_model_group?(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:"No"}),meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:l})=>{let s=l.original;return(0,t.jsxs)(N.Button,{size:"xs",variant:"secondary",onClick:()=>e(s),icon:T.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}];return s?i.filter(e=>!("accessorKey"in e)||"is_public_model_group"!==e.accessorKey):i})(e=>{L(e),A(!0)},eE,a),data:D,isLoading:B,defaultSorting:[{id:"model_group",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",D.length," of ",M?.length||0," models"]})})]}),(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&g&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&ed(!0)),children:"Select Agents to Make Public"})}),(0,t.jsx)(K.ModelDataTable,{columns:(0,l.getAgentHubTableColumns)(e=>{eh(e),eg(!0)},eE,a),data:er||[],isLoading:em,defaultSorting:[{id:"name",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",er?.length||0," agent",er?.length!==1?"s":""]})})]}),(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&g&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&eT(!0)),children:"Select MCP Servers to Make Public"})}),(0,t.jsx)(K.ModelDataTable,{columns:((e,l,s=!1)=>[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let s=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium text-sm",children:s.server_name}),(0,t.jsx)(S.Tooltip,{title:"Copy server name",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(s.server_name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(o.Text,{className:"text-xs text-gray-600",children:s.description||"-"})})]})}},{header:"Description",accessorKey:"description",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(o.Text,{className:"text-xs line-clamp-2",children:l.description||"-"})},meta:{className:"hidden md:table-cell"}},{header:"URL",accessorKey:"url",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let s=e.original;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"text-xs truncate max-w-xs",children:s.url}),(0,t.jsx)(S.Tooltip,{title:"Copy URL",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(s.url),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs flex-shrink-0"})})]})},meta:{className:"hidden lg:table-cell"}},{header:"Transport",accessorKey:"transport",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(m.Badge,{color:"blue",size:"sm",children:l.transport})},meta:{className:"hidden md:table-cell"}},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s="none"===l.auth_type?"gray":"green";return(0,t.jsx)(m.Badge,{color:s,size:"sm",children:l.auth_type})},meta:{className:"hidden md:table-cell"}},{header:"Status",accessorKey:"status",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s={active:"green",inactive:"red",unknown:"gray",healthy:"green",unhealthy:"red"}[l.status]||"gray";return(0,t.jsx)(m.Badge,{color:s,size:"sm",children:l.status||"unknown"})}},{header:"Tools",accessorKey:"allowed_tools",enableSorting:!1,cell:({row:e})=>{let l=e.original.allowed_tools||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(o.Text,{className:"text-xs font-medium",children:l.length>0?`${l.length} tool${1!==l.length?"s":""}`:"All tools"}),l.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,2).map((e,l)=>(0,t.jsx)(k.Tag,{color:"purple",className:"text-xs",children:e},l)),l.length>2&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",l.length-2]})]})]})},meta:{className:"hidden lg:table-cell"}},{header:"Created By",accessorKey:"created_by",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(o.Text,{className:"text-xs",children:l.created_by||"-"})},meta:{className:"hidden xl:table-cell"}},{header:"Public",accessorKey:"mcp_info.is_public",enableSorting:!0,sortingFn:(e,t)=>(e.original.mcp_info?.is_public===!0)-(t.original.mcp_info?.is_public===!0),cell:({row:e})=>{let l=e.original;return l.mcp_info?.is_public===!0?(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:"No"})},meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:l})=>{let s=l.original;return(0,t.jsxs)(N.Button,{size:"xs",variant:"secondary",onClick:()=>e(s),icon:T.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}])(e=>{eN(e),ek(!0)},eE,a),data:eb||[],isLoading:ef,defaultSorting:[{id:"server_name",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",eb?.length||0," MCP server",eb?.length!==1?"s":""]})})]}),(0,t.jsxs)(J.TabPanel,{children:[!1==a&&g&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>eI(!0),children:"Select Skills to Make Public"})}),(0,t.jsx)(R.default,{skills:ew,isLoading:e_,isAdmin:g,accessToken:e,publicPage:a,onPublishSuccess:async()=>{eC((await (0,x.getClaudeCodePluginsList)(e||"",a)).plugins)}})]})]})]})]}):(0,t.jsxs)(j.Card,{className:"mx-auto max-w-xl mt-10",children:[(0,t.jsx)(o.Text,{className:"text-xl text-center mb-2 text-black",children:"Public Model Hub not enabled."}),(0,t.jsx)("p",{className:"text-base text-center text-slate-800",children:"Ask your proxy admin to enable this on their Admin UI."})]}),(0,t.jsx)(i.Modal,{title:"Public Model Hub",width:600,open:H,footer:null,onOk:eA,onCancel:eH,children:(0,t.jsxs)("div",{className:"pt-5 pb-5",children:[(0,t.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,t.jsx)(o.Text,{className:"text-base mr-2",children:"Shareable Link:"}),(0,t.jsx)(o.Text,{className:"max-w-sm ml-2 bg-gray-200 pr-2 pl-2 pt-1 pb-1 text-center rounded",children:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(N.Button,{onClick:()=>{eB.replace(`/model_hub_table?key=${e}`)},children:"See Page"})})]})}),(0,t.jsx)(i.Modal,{title:F?.model_group||"Model Details",width:1e3,open:O,footer:null,onOk:eA,onCancel:eH,children:F&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Model Group:"}),(0,t.jsx)(o.Text,{children:F.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(o.Text,{children:F.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:F.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",children:e},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(o.Text,{children:F.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(o.Text,{children:F.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:F.input_cost_per_token?eF(F.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:F.output_cost_per_token?eF(F.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(c=Object.entries(F).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),h=["green","blue","purple","orange","red","yellow"],0===c.length?(0,t.jsx)(o.Text,{className:"text-gray-500",children:"No special capabilities listed"}):c.map((e,l)=>(0,t.jsx)(m.Badge,{color:h[l%h.length],children:e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},e)))})]}),(F.tpm||F.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[F.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(o.Text,{children:F.tpm.toLocaleString()})]}),F.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(o.Text,{children:F.rpm.toLocaleString()})]})]})]}),F.supported_openai_params&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:F.supported_openai_params.map(e=>(0,t.jsx)(m.Badge,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(et.Prism,{language:"python",className:"text-sm",children:`import openai client = openai.OpenAI( api_key="your_api_key", @@ -6,7 +6,7 @@ client = openai.OpenAI( ) response = client.chat.completions.create( - model="${E.model_group}", + model="${F.model_group}", messages=[ { "role": "user", @@ -15,14 +15,14 @@ response = client.chat.completions.create( ] ) -print(response.choices[0].message.content)`})]})]})}),(0,t.jsx)(s.Modal,{title:ex?.name||"Agent Details",width:1e3,open:eh,footer:null,onOk:eA,onCancel:eO,children:ex&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Name:"}),(0,t.jsx)(o.Text,{children:ex.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Version:"}),(0,t.jsxs)(m.Badge,{color:"blue",children:["v",ex.version]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Protocol Version:"}),(0,t.jsx)(o.Text,{children:ex.protocolVersion})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"URL:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"truncate",children:ex.url}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eH(ex.url),className:"cursor-pointer text-gray-500 hover:text-blue-500"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(o.Text,{className:"mt-1",children:ex.description})]})]}),ex.capabilities&&Object.keys(ex.capabilities).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(ex.capabilities).filter(([e,t])=>!0===t).map(([e])=>(0,t.jsx)(m.Badge,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:ex.defaultInputModes?.map(e=>(0,t.jsx)(m.Badge,{color:"blue",children:e},e))||(0,t.jsx)(o.Text,{children:"Not specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:ex.defaultOutputModes?.map(e=>(0,t.jsx)(m.Badge,{color:"purple",children:e},e))||(0,t.jsx)(o.Text,{children:"Not specified"})})]})]})]}),ex.skills&&ex.skills.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,t.jsx)("div",{className:"space-y-4",children:ex.skills.map(e=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium text-base",children:e.name}),(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["ID: ",e.id]})]}),e.tags&&e.tags.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e.tags.map(e=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e},e))})]}),(0,t.jsx)(o.Text,{className:"text-sm mb-2",children:e.description}),e.examples&&e.examples.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-xs font-medium text-gray-700",children:"Examples:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.examples.map((e,l)=>(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:e},l))})]})]},e.id))})]}),ex.supportsAuthenticatedExtendedCard&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Additional Features"}),(0,t.jsx)(m.Badge,{color:"green",children:"Supports Authenticated Extended Card"})]})]})}),(0,t.jsx)(s.Modal,{title:ev?.server_name||"MCP Server Details",width:1e3,open:eN,footer:null,onOk:eA,onCancel:eO,children:ev&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Server Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Server Name:"}),(0,t.jsx)(o.Text,{children:ev.server_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Server ID:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"text-xs truncate",children:ev.server_id}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eH(ev.server_id),className:"cursor-pointer text-gray-500 hover:text-blue-500"})]})]}),ev.alias&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Alias:"}),(0,t.jsx)(o.Text,{children:ev.alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Transport:"}),(0,t.jsx)(m.Badge,{color:"blue",children:ev.transport})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Auth Type:"}),(0,t.jsx)(m.Badge,{color:"none"===ev.auth_type?"gray":"green",children:ev.auth_type})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Status:"}),(0,t.jsx)(m.Badge,{color:"active"===ev.status||"healthy"===ev.status?"green":"inactive"===ev.status||"unhealthy"===ev.status?"red":"gray",children:ev.status||"unknown"})]})]}),ev.description&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(o.Text,{className:"mt-1",children:ev.description})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Connection Details"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"URL:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,t.jsx)(o.Text,{className:"text-sm break-all bg-gray-100 p-2 rounded flex-1",children:ev.url}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eH(ev.url),className:"cursor-pointer text-gray-500 hover:text-blue-500 flex-shrink-0"})]})]}),ev.command&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Command:"}),(0,t.jsx)(o.Text,{className:"text-sm bg-gray-100 p-2 rounded mt-1 font-mono",children:ev.command})]})]})]}),ev.allowed_tools&&ev.allowed_tools.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Allowed Tools"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ev.allowed_tools.map((e,l)=>(0,t.jsx)(m.Badge,{color:"purple",children:e},l))})]}),ev.teams&&ev.teams.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Teams"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ev.teams.map((e,l)=>(0,t.jsx)(m.Badge,{color:"blue",children:e},l))})]}),ev.mcp_access_groups&&ev.mcp_access_groups.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Access Groups"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ev.mcp_access_groups.map((e,l)=>(0,t.jsx)(m.Badge,{color:"green",children:e},l))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Metadata"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Created By:"}),(0,t.jsx)(o.Text,{children:ev.created_by})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Updated By:"}),(0,t.jsx)(o.Text,{children:ev.updated_by})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Created At:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ev.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Updated At:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ev.updated_at).toLocaleString()})]}),ev.last_health_check&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Last Health Check:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ev.last_health_check).toLocaleString()})]})]}),ev.health_check_error&&(0,t.jsxs)("div",{className:"mt-2 p-2 bg-red-50 rounded",children:[(0,t.jsx)(o.Text,{className:"font-medium text-red-700",children:"Health Check Error:"}),(0,t.jsx)(o.Text,{className:"text-sm text-red-600 mt-1",children:ev.health_check_error})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(et.Prism,{language:"python",className:"text-sm",children:`from fastmcp import Client +print(response.choices[0].message.content)`})]})]})}),(0,t.jsx)(i.Modal,{title:eu?.name||"Agent Details",width:1e3,open:ep,footer:null,onOk:eA,onCancel:eH,children:eu&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Name:"}),(0,t.jsx)(o.Text,{children:eu.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Version:"}),(0,t.jsxs)(m.Badge,{color:"blue",children:["v",eu.version]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Protocol Version:"}),(0,t.jsx)(o.Text,{children:eu.protocolVersion})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"URL:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"truncate",children:eu.url}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eE(eu.url),className:"cursor-pointer text-gray-500 hover:text-blue-500"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(o.Text,{className:"mt-1",children:eu.description})]})]}),eu.capabilities&&Object.keys(eu.capabilities).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(eu.capabilities).filter(([e,t])=>!0===t).map(([e])=>(0,t.jsx)(m.Badge,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:eu.defaultInputModes?.map(e=>(0,t.jsx)(m.Badge,{color:"blue",children:e},e))||(0,t.jsx)(o.Text,{children:"Not specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:eu.defaultOutputModes?.map(e=>(0,t.jsx)(m.Badge,{color:"purple",children:e},e))||(0,t.jsx)(o.Text,{children:"Not specified"})})]})]})]}),eu.skills&&eu.skills.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,t.jsx)("div",{className:"space-y-4",children:eu.skills.map(e=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium text-base",children:e.name}),(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["ID: ",e.id]})]}),e.tags&&e.tags.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e.tags.map(e=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e},e))})]}),(0,t.jsx)(o.Text,{className:"text-sm mb-2",children:e.description}),e.examples&&e.examples.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-xs font-medium text-gray-700",children:"Examples:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.examples.map((e,l)=>(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:e},l))})]})]},e.id))})]}),eu.supportsAuthenticatedExtendedCard&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Additional Features"}),(0,t.jsx)(m.Badge,{color:"green",children:"Supports Authenticated Extended Card"})]})]})}),(0,t.jsx)(i.Modal,{title:ey?.server_name||"MCP Server Details",width:1e3,open:eS,footer:null,onOk:eA,onCancel:eH,children:ey&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Server Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Server Name:"}),(0,t.jsx)(o.Text,{children:ey.server_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Server ID:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"text-xs truncate",children:ey.server_id}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eE(ey.server_id),className:"cursor-pointer text-gray-500 hover:text-blue-500"})]})]}),ey.alias&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Alias:"}),(0,t.jsx)(o.Text,{children:ey.alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Transport:"}),(0,t.jsx)(m.Badge,{color:"blue",children:ey.transport})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Auth Type:"}),(0,t.jsx)(m.Badge,{color:"none"===ey.auth_type?"gray":"green",children:ey.auth_type})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Status:"}),(0,t.jsx)(m.Badge,{color:"active"===ey.status||"healthy"===ey.status?"green":"inactive"===ey.status||"unhealthy"===ey.status?"red":"gray",children:ey.status||"unknown"})]})]}),ey.description&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(o.Text,{className:"mt-1",children:ey.description})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Connection Details"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"URL:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,t.jsx)(o.Text,{className:"text-sm break-all bg-gray-100 p-2 rounded flex-1",children:ey.url}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eE(ey.url),className:"cursor-pointer text-gray-500 hover:text-blue-500 flex-shrink-0"})]})]}),ey.command&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Command:"}),(0,t.jsx)(o.Text,{className:"text-sm bg-gray-100 p-2 rounded mt-1 font-mono",children:ey.command})]})]})]}),ey.allowed_tools&&ey.allowed_tools.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Allowed Tools"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.allowed_tools.map((e,l)=>(0,t.jsx)(m.Badge,{color:"purple",children:e},l))})]}),ey.teams&&ey.teams.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Teams"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.teams.map((e,l)=>(0,t.jsx)(m.Badge,{color:"blue",children:e},l))})]}),ey.mcp_access_groups&&ey.mcp_access_groups.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Access Groups"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.mcp_access_groups.map((e,l)=>(0,t.jsx)(m.Badge,{color:"green",children:e},l))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Metadata"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Created By:"}),(0,t.jsx)(o.Text,{children:ey.created_by})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Updated By:"}),(0,t.jsx)(o.Text,{children:ey.updated_by})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Created At:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ey.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Updated At:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ey.updated_at).toLocaleString()})]}),ey.last_health_check&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Last Health Check:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ey.last_health_check).toLocaleString()})]})]}),ey.health_check_error&&(0,t.jsxs)("div",{className:"mt-2 p-2 bg-red-50 rounded",children:[(0,t.jsx)(o.Text,{className:"font-medium text-red-700",children:"Health Check Error:"}),(0,t.jsx)(o.Text,{className:"text-sm text-red-600 mt-1",children:ey.health_check_error})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(et.Prism,{language:"python",className:"text-sm",children:`from fastmcp import Client import asyncio # Standard MCP configuration config = { "mcpServers": { - "${ev.server_name}": { - "url": "${(0,x.getProxyBaseUrl)()}/${ev.server_name}/mcp", + "${ey.server_name}": { + "url": "${(0,x.getProxyBaseUrl)()}/${ey.server_name}/mcp", "headers": { "x-litellm-api-key": "Bearer sk-1234" } @@ -47,4 +47,4 @@ async def main(): print(f"Response: {response}") if __name__ == "__main__": - asyncio.run(main())`})]})]})}),(0,t.jsx)(y,{visible:W,onClose:()=>ea(!1),accessToken:e||"",modelHubData:_||[],onSuccess:()=>{e&&(async()=>{try{let t=await (0,x.modelHubCall)(e);M(t.data)}catch(e){console.error("Error refreshing model data:",e)}})()}}),(0,t.jsx)(p,{visible:ec,onClose:()=>eo(!1),accessToken:e||"",agentHubData:en||[],onSuccess:()=>{e&&(async()=>{try{let t=(await (0,x.getAgentsList)(e)).agents.map(e=>({agent_id:e.agent_id,...e.agent_card_params,is_public:e.is_public}));er(t)}catch(e){console.error("Error refreshing agent data:",e)}})()}}),(0,t.jsx)(b,{visible:ek,onClose:()=>e$(!1),accessToken:e||"",mcpHubData:eg||[],onSuccess:()=>{e&&(async()=>{try{let t=await (0,x.fetchMCPServers)(e);eb(t)}catch(e){console.error("Error refreshing MCP server data:",e)}})()}}),(0,t.jsx)(U,{visible:eP,onClose:()=>eM(!1),accessToken:e||"",skillsList:eT,onSuccess:async()=>{ew((await (0,x.getClaudeCodePluginsList)(e||"",!0===a)).plugins)}})]})}],934879)}]); \ No newline at end of file + asyncio.run(main())`})]})]})}),(0,t.jsx)(y,{visible:ea,onClose:()=>en(!1),accessToken:e||"",modelHubData:M||[],onSuccess:()=>{e&&(async()=>{try{let t=await (0,x.modelHubCall)(e);I(t.data)}catch(e){console.error("Error refreshing model data:",e)}})()}}),(0,t.jsx)(p,{visible:eo,onClose:()=>ed(!1),accessToken:e||"",agentHubData:er||[],onSuccess:()=>{e&&(async()=>{try{let t=(await (0,x.getAgentsList)(e)).agents.map(e=>({agent_id:e.agent_id,...e.agent_card_params,is_public:e.is_public}));ec(t)}catch(e){console.error("Error refreshing agent data:",e)}})()}}),(0,t.jsx)(b,{visible:e$,onClose:()=>eT(!1),accessToken:e||"",mcpHubData:eb||[],onSuccess:()=>{e&&(async()=>{try{let t=await (0,x.fetchMCPServers)(e);ej(t)}catch(e){console.error("Error refreshing MCP server data:",e)}})()}}),(0,t.jsx)(U,{visible:eM,onClose:()=>eI(!1),accessToken:e||"",skillsList:ew,onSuccess:async()=>{eC((await (0,x.getClaudeCodePluginsList)(e||"",!0===a)).plugins)}})]})}],934879)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/eaa9f9b9bb3e054b.js b/litellm/proxy/_experimental/out/_next/static/chunks/0cdfadbcf4b8c9e4.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/eaa9f9b9bb3e054b.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0cdfadbcf4b8c9e4.js index 90c31ed55e..e3a6771539 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/eaa9f9b9bb3e054b.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0cdfadbcf4b8c9e4.js @@ -4,7 +4,7 @@ ${t}`)}return n})(tN);class tE extends tw{list(e={},t){let{betas:s,...r}=e??{};r Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);let a=this._client._options.timeout;if(!r.stream&&null==a){let e=t$[r.model]??void 0;a=this._client.calculateNonstreamingTimeout(r.max_tokens,e)}return this._client.post("/v1/messages?beta=true",{body:r,timeout:a??6e5,...t,headers:t_([{...s?.toString()!=null?{"anthropic-beta":s?.toString()}:void 0},t?.headers]),stream:e.stream??!1})}stream(e,t){return tM.createMessage(this,e,t)}countTokens(e,t){let{betas:s,...r}=e;return this._client.post("/v1/messages/count_tokens?beta=true",{body:r,...t,headers:t_([{"anthropic-beta":[...s??[],"token-counting-2024-11-01"].toString()},t?.headers])})}}tD.Batches=tA;class tB extends tw{constructor(){super(...arguments),this.models=new tC(this._client),this.messages=new tD(this._client),this.files=new tE(this._client)}}tB.Models=tC,tB.Messages=tD,tB.Files=tE;class tq extends tw{create(e,t){let{betas:s,...r}=e;return this._client.post("/v1/complete",{body:r,timeout:this._client._options.timeout??6e5,...t,headers:t_([{...s?.toString()!=null?{"anthropic-beta":s?.toString()}:void 0},t?.headers]),stream:e.stream??!1})}}let tW="__json_buf";function tz(e){return"tool_use"===e.type||"server_tool_use"===e.type}class tH{constructor(){P.add(this),this.messages=[],this.receivedMessages=[],O.set(this,void 0),this.controller=new AbortController,R.set(this,void 0),I.set(this,()=>{}),M.set(this,()=>{}),L.set(this,void 0),$.set(this,()=>{}),U.set(this,()=>{}),D.set(this,{}),B.set(this,!1),q.set(this,!1),W.set(this,!1),z.set(this,!1),H.set(this,void 0),F.set(this,void 0),V.set(this,e=>{if(e_(this,q,!0,"f"),eE(e)&&(e=new eP),e instanceof eP)return e_(this,W,!0,"f"),this._emit("abort",e);if(e instanceof eT)return this._emit("error",e);if(e instanceof Error){let t=new eT(e.message);return t.cause=e,this._emit("error",t)}return this._emit("error",new eT(String(e)))}),e_(this,R,new Promise((e,t)=>{e_(this,I,e,"f"),e_(this,M,t,"f")}),"f"),e_(this,L,new Promise((e,t)=>{e_(this,$,e,"f"),e_(this,U,t,"f")}),"f"),eN(this,R,"f").catch(()=>{}),eN(this,L,"f").catch(()=>{})}get response(){return eN(this,H,"f")}get request_id(){return eN(this,F,"f")}async withResponse(){let e=await eN(this,R,"f");if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let t=new tH;return t._run(()=>t._fromReadableStream(e)),t}static createMessage(e,t,s){let r=new tH;for(let e of t.messages)r._addMessageParam(e);return r._run(()=>r._createMessage(e,{...t,stream:!0},{...s,headers:{...s?.headers,"X-Stainless-Helper-Method":"stream"}})),r}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},eN(this,V,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,t=!0){this.receivedMessages.push(e),t&&this._emit("message",e)}async _createMessage(e,t,s){let r=s?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener("abort",()=>this.controller.abort())),eN(this,P,"m",K).call(this);let{response:a,data:n}=await e.create({...t,stream:!0},{...s,signal:this.controller.signal}).withResponse();for await(let e of(this._connected(a),n))eN(this,P,"m",X).call(this,e);if(n.controller.signal?.aborted)throw new eP;eN(this,P,"m",Y).call(this)}_connected(e){this.ended||(e_(this,H,e,"f"),e_(this,F,e?.headers.get("request-id"),"f"),eN(this,I,"f").call(this,e),this._emit("connect"))}get ended(){return eN(this,B,"f")}get errored(){return eN(this,q,"f")}get aborted(){return eN(this,W,"f")}abort(){this.controller.abort()}on(e,t){return(eN(this,D,"f")[e]||(eN(this,D,"f")[e]=[])).push({listener:t}),this}off(e,t){let s=eN(this,D,"f")[e];if(!s)return this;let r=s.findIndex(e=>e.listener===t);return r>=0&&s.splice(r,1),this}once(e,t){return(eN(this,D,"f")[e]||(eN(this,D,"f")[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,s)=>{e_(this,z,!0,"f"),"error"!==e&&this.once("error",s),this.once(e,t)})}async done(){e_(this,z,!0,"f"),await eN(this,L,"f")}get currentMessage(){return eN(this,O,"f")}async finalMessage(){return await this.done(),eN(this,P,"m",J).call(this)}async finalText(){return await this.done(),eN(this,P,"m",G).call(this)}_emit(e,...t){if(eN(this,B,"f"))return;"end"===e&&(e_(this,B,!0,"f"),eN(this,$,"f").call(this));let s=eN(this,D,"f")[e];if(s&&(eN(this,D,"f")[e]=s.filter(e=>!e.once),s.forEach(({listener:e})=>e(...t))),"abort"===e){let e=t[0];eN(this,z,"f")||s?.length||Promise.reject(e),eN(this,M,"f").call(this,e),eN(this,U,"f").call(this,e),this._emit("end");return}if("error"===e){let e=t[0];eN(this,z,"f")||s?.length||Promise.reject(e),eN(this,M,"f").call(this,e),eN(this,U,"f").call(this,e),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",eN(this,P,"m",J).call(this))}async _fromReadableStream(e,t){let s=t?.signal;s&&(s.aborted&&this.controller.abort(),s.addEventListener("abort",()=>this.controller.abort())),eN(this,P,"m",K).call(this),this._connected(null);let r=te.fromReadableStream(e,this.controller);for await(let e of r)eN(this,P,"m",X).call(this,e);if(r.controller.signal?.aborted)throw new eP;eN(this,P,"m",Y).call(this)}[(O=new WeakMap,R=new WeakMap,I=new WeakMap,M=new WeakMap,L=new WeakMap,$=new WeakMap,U=new WeakMap,D=new WeakMap,B=new WeakMap,q=new WeakMap,W=new WeakMap,z=new WeakMap,H=new WeakMap,F=new WeakMap,V=new WeakMap,P=new WeakSet,J=function(){if(0===this.receivedMessages.length)throw new eT("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},G=function(){if(0===this.receivedMessages.length)throw new eT("stream ended without producing a Message with role=assistant");let e=this.receivedMessages.at(-1).content.filter(e=>"text"===e.type).map(e=>e.text);if(0===e.length)throw new eT("stream ended without producing a content block with type=text");return e.join(" ")},K=function(){this.ended||e_(this,O,void 0,"f")},X=function(e){if(this.ended)return;let t=eN(this,P,"m",Q).call(this,e);switch(this._emit("streamEvent",e,t),e.type){case"content_block_delta":{let s=t.content.at(-1);switch(e.delta.type){case"text_delta":"text"===s.type&&this._emit("text",e.delta.text,s.text||"");break;case"citations_delta":"text"===s.type&&this._emit("citation",e.delta.citation,s.citations??[]);break;case"input_json_delta":tz(s)&&s.input&&this._emit("inputJson",e.delta.partial_json,s.input);break;case"thinking_delta":"thinking"===s.type&&this._emit("thinking",e.delta.thinking,s.thinking);break;case"signature_delta":"thinking"===s.type&&this._emit("signature",s.signature);break;default:tF(e.delta)}break}case"message_stop":this._addMessageParam(t),this._addMessage(t,!0);break;case"content_block_stop":this._emit("contentBlock",t.content.at(-1));break;case"message_start":e_(this,O,t,"f")}},Y=function(){if(this.ended)throw new eT("stream has ended, this shouldn't happen");let e=eN(this,O,"f");if(!e)throw new eT("request ended without sending any chunks");return e_(this,O,void 0,"f"),e},Q=function(e){let t=eN(this,O,"f");if("message_start"===e.type){if(t)throw new eT(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!t)throw new eT(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":case"content_block_stop":return t;case"message_delta":return t.stop_reason=e.delta.stop_reason,t.stop_sequence=e.delta.stop_sequence,t.usage.output_tokens=e.usage.output_tokens,null!=e.usage.input_tokens&&(t.usage.input_tokens=e.usage.input_tokens),null!=e.usage.cache_creation_input_tokens&&(t.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),null!=e.usage.cache_read_input_tokens&&(t.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),null!=e.usage.server_tool_use&&(t.usage.server_tool_use=e.usage.server_tool_use),t;case"content_block_start":return t.content.push(e.content_block),t;case"content_block_delta":{let s=t.content.at(e.index);switch(e.delta.type){case"text_delta":s?.type==="text"&&(s.text+=e.delta.text);break;case"citations_delta":s?.type==="text"&&(s.citations??(s.citations=[]),s.citations.push(e.delta.citation));break;case"input_json_delta":if(s&&tz(s)){let t=s[tW]||"";Object.defineProperty(s,tW,{value:t+=e.delta.partial_json,enumerable:!1,writable:!0}),t&&(s.input=tO(t))}break;case"thinking_delta":s?.type==="thinking"&&(s.thinking+=e.delta.thinking);break;case"signature_delta":s?.type==="thinking"&&(s.signature=e.delta.signature);break;default:tF(e.delta)}return t}}},Symbol.asyncIterator)](){let e=[],t=[],s=!1;return this.on("streamEvent",s=>{let r=t.shift();r?r.resolve(s):e.push(s)}),this.on("end",()=>{for(let e of(s=!0,t))e.resolve(void 0);t.length=0}),this.on("abort",e=>{for(let r of(s=!0,t))r.reject(e);t.length=0}),this.on("error",e=>{for(let r of(s=!0,t))r.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:s?{value:void 0,done:!0}:new Promise((e,s)=>t.push({resolve:e,reject:s})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new te(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}function tF(e){}class tJ extends tw{create(e,t){return this._client.post("/v1/messages/batches",{body:e,...t})}retrieve(e,t){return this._client.get(tk`/v1/messages/batches/${e}`,t)}list(e={},t){return this._client.getAPIList("/v1/messages/batches",tc,{query:e,...t})}delete(e,t){return this._client.delete(tk`/v1/messages/batches/${e}`,t)}cancel(e,t){return this._client.post(tk`/v1/messages/batches/${e}/cancel`,t)}async results(e,t){let s=await this.retrieve(e);if(!s.results_url)throw new eT(`No batch \`results_url\`; Has it finished processing? ${s.processing_status} - ${s.id}`);return this._client.get(s.results_url,{...t,headers:t_([{Accept:"application/binary"},t?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((e,t)=>tT.fromResponse(t.response,t.controller))}}class tG extends tw{constructor(){super(...arguments),this.batches=new tJ(this._client)}create(e,t){e.model in tV&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${tV[e.model]} Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);let s=this._client._options.timeout;if(!e.stream&&null==s){let t=t$[e.model]??void 0;s=this._client.calculateNonstreamingTimeout(e.max_tokens,t)}return this._client.post("/v1/messages",{body:e,timeout:s??6e5,...t,stream:e.stream??!1})}stream(e,t){return tH.createMessage(this,e,t)}countTokens(e,t){return this._client.post("/v1/messages/count_tokens",{body:e,...t})}}let tV={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025"};tG.Batches=tJ;class tK extends tw{retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tk`/v1/models/${e}`,{...s,headers:t_([{...r?.toString()!=null?{"anthropic-beta":r?.toString()}:void 0},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/models",tc,{query:r,...t,headers:t_([{...s?.toString()!=null?{"anthropic-beta":s?.toString()}:void 0},t?.headers])})}}let tX=e=>void 0!==globalThis.process?globalThis.process.env?.[e]?.trim()??void 0:void 0!==globalThis.Deno?globalThis.Deno.env?.get?.(e)?.trim():void 0;class tY{constructor({baseURL:e=tX("ANTHROPIC_BASE_URL"),apiKey:t=tX("ANTHROPIC_API_KEY")??null,authToken:s=tX("ANTHROPIC_AUTH_TOKEN")??null,...r}={}){Z.set(this,void 0);const a={apiKey:t,authToken:s,...r,baseURL:e||"https://api.anthropic.com"};if(!a.dangerouslyAllowBrowser&&"u">typeof window&&void 0!==window.document&&"u">typeof navigator)throw new eT("It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew Anthropic({ apiKey, dangerouslyAllowBrowser: true });\n");this.baseURL=a.baseURL,this.timeout=a.timeout??tQ.DEFAULT_TIMEOUT,this.logger=a.logger??console;const n="warn";this.logLevel=n,this.logLevel=eJ(a.logLevel,"ClientOptions.logLevel",this)??eJ(tX("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??n,this.fetchOptions=a.fetchOptions,this.maxRetries=a.maxRetries??2,this.fetch=a.fetch??function(){if("u">typeof fetch)return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}(),e_(this,Z,e6,"f"),this._options=a,this.apiKey=t,this.authToken=s}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:t}){if(!(this.apiKey&&e.get("x-api-key")||t.has("x-api-key")||this.authToken&&e.get("authorization"))&&!t.has("authorization"))throw Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}authHeaders(e){return t_([this.apiKeyAuth(e),this.bearerAuth(e)])}apiKeyAuth(e){if(null!=this.apiKey)return t_([{"X-Api-Key":this.apiKey}])}bearerAuth(e){if(null!=this.authToken)return t_([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return Object.entries(e).filter(([e,t])=>void 0!==t).map(([e,t])=>{if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)return`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(null===t)return`${encodeURIComponent(e)}=`;throw new eT(`Cannot stringify type ${typeof t}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}getUserAgent(){return`${this.constructor.name}/JS ${eZ}`}defaultIdempotencyKey(){return`stainless-node-retry-${ek()}`}makeStatusError(e,t,s,r){return eA.generate(e,t,s,r)}buildURL(e,t){let s=new URL(eW.test(e)?e:this.baseURL+(this.baseURL.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),r=this.defaultQuery();return!function(e){if(!e)return!0;for(let t in e)return!1;return!0}(r)&&(t={...r,...t}),"object"==typeof t&&t&&!Array.isArray(t)&&(s.search=this.stringifyQuery(t)),s.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new eT("Streaming is strongly recommended for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 6e5}async prepareOptions(e){}async prepareRequest(e,{url:t,options:s}){}get(e,t){return this.methodRequest("get",e,t)}post(e,t){return this.methodRequest("post",e,t)}patch(e,t){return this.methodRequest("patch",e,t)}put(e,t){return this.methodRequest("put",e,t)}delete(e,t){return this.methodRequest("delete",e,t)}methodRequest(e,t,s){return this.request(Promise.resolve(s).then(s=>({method:e,path:t,...s})))}request(e,t=null){return new ti(this,this.makeRequest(e,t,void 0))}async makeRequest(e,t,s){let r=await e,a=r.maxRetries??this.maxRetries;null==t&&(t=a),await this.prepareOptions(r);let{req:n,url:i,timeout:o}=this.buildRequest(r,{retryCount:a-t});await this.prepareRequest(n,{url:i,options:r});let l="log_"+(0x1000000*Math.random()|0).toString(16).padStart(6,"0"),c=void 0===s?"":`, retryOf: ${s}`,d=Date.now();if(eY(this).debug(`[${l}] sending request`,eQ({retryOfRequestLogID:s,method:r.method,url:i,options:r,headers:n.headers})),r.signal?.aborted)throw new eP;let u=new AbortController,h=await this.fetchWithTimeout(i,n,o,u).catch(eC),m=Date.now();if(h instanceof Error){let e=`retrying, ${t} attempts remaining`;if(r.signal?.aborted)throw new eP;let a=eE(h)||/timed? ?out/i.test(String(h)+("cause"in h?String(h.cause):""));if(t)return eY(this).info(`[${l}] connection ${a?"timed out":"failed"} - ${e}`),eY(this).debug(`[${l}] connection ${a?"timed out":"failed"} (${e})`,eQ({retryOfRequestLogID:s,url:i,durationMs:m-d,message:h.message})),this.retryRequest(r,t,s??l);if(eY(this).info(`[${l}] connection ${a?"timed out":"failed"} - error; no more retries left`),eY(this).debug(`[${l}] connection ${a?"timed out":"failed"} (error; no more retries left)`,eQ({retryOfRequestLogID:s,url:i,durationMs:m-d,message:h.message})),a)throw new eR;throw new eO({cause:h})}let p=[...h.headers.entries()].filter(([e])=>"request-id"===e).map(([e,t])=>", "+e+": "+JSON.stringify(t)).join(""),f=`[${l}${c}${p}] ${n.method} ${i} ${h.ok?"succeeded":"failed"} with status ${h.status} in ${m-d}ms`;if(!h.ok){let e=this.shouldRetry(h);if(t&&e){let e=`retrying, ${t} attempts remaining`;return await e5(h.body),eY(this).info(`${f} - ${e}`),eY(this).debug(`[${l}] response error (${e})`,eQ({retryOfRequestLogID:s,url:h.url,status:h.status,headers:h.headers,durationMs:m-d})),this.retryRequest(r,t,s??l,h.headers)}let a=e?"error; no more retries left":"error; not retryable";eY(this).info(`${f} - ${a}`);let n=await h.text().catch(e=>eC(e).message),i=eH(n),o=i?void 0:n;throw eY(this).debug(`[${l}] response error (${a})`,eQ({retryOfRequestLogID:s,url:h.url,status:h.status,headers:h.headers,message:o,durationMs:Date.now()-d})),this.makeStatusError(h.status,i,o,h.headers)}return eY(this).info(f),eY(this).debug(`[${l}] response start`,eQ({retryOfRequestLogID:s,url:h.url,status:h.status,headers:h.headers,durationMs:m-d})),{response:h,options:r,controller:u,requestLogID:l,retryOfRequestLogID:s,startTime:d}}getAPIList(e,t,s){return this.requestAPIList(t,{method:"get",path:e,...s})}requestAPIList(e,t){return new tl(this,this.makeRequest(t,null,void 0),e)}async fetchWithTimeout(e,t,s,r){let{signal:a,method:n,...i}=t||{};a&&a.addEventListener("abort",()=>r.abort());let o=setTimeout(()=>r.abort(),s),l=globalThis.ReadableStream&&i.body instanceof globalThis.ReadableStream||"object"==typeof i.body&&null!==i.body&&Symbol.asyncIterator in i.body,c={signal:r.signal,...l?{duplex:"half"}:{},method:"GET",...i};n&&(c.method=n.toUpperCase());try{return await this.fetch.call(void 0,e,c)}finally{clearTimeout(o)}}shouldRetry(e){let t=e.headers.get("x-should-retry");return"true"===t||"false"!==t&&(408===e.status||409===e.status||429===e.status||!!(e.status>=500))}async retryRequest(e,t,s,r){let a,n,i=r?.get("retry-after-ms");if(i){let e=parseFloat(i);Number.isNaN(e)||(a=e)}let o=r?.get("retry-after");if(o&&!a){let e=parseFloat(o);a=Number.isNaN(e)?Date.parse(o)-Date.now():1e3*e}if(!(a&&0<=a&&a<6e4)){let s=e.maxRetries??this.maxRetries;a=this.calculateDefaultRetryTimeoutMillis(t,s)}return await (n=a,new Promise(e=>setTimeout(e,n))),this.makeRequest(e,t-1,s)}calculateDefaultRetryTimeoutMillis(e,t){return Math.min(.5*Math.pow(2,t-e),8)*(1-.25*Math.random())*1e3}calculateNonstreamingTimeout(e,t){if(36e5*e/128e3>6e5||null!=t&&e>t)throw new eT("Streaming is strongly recommended for operations that may token longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 6e5}buildRequest(e,{retryCount:t=0}={}){let s={...e},{method:r,path:a,query:n}=s,i=this.buildURL(a,n);"timeout"in s&&((e,t)=>{if("number"!=typeof t||!Number.isInteger(t))throw new eT(`${e} must be an integer`);if(t<0)throw new eT(`${e} must be a positive integer`)})("timeout",s.timeout),s.timeout=s.timeout??this.timeout;let{bodyHeaders:o,body:l}=this.buildBody({options:s}),c=this.buildHeaders({options:e,method:r,bodyHeaders:o,retryCount:t});return{req:{method:r,headers:c,...s.signal&&{signal:s.signal},...globalThis.ReadableStream&&l instanceof globalThis.ReadableStream&&{duplex:"half"},...l&&{body:l},...this.fetchOptions??{},...s.fetchOptions??{}},url:i,timeout:s.timeout}}buildHeaders({options:e,method:t,bodyHeaders:r,retryCount:a}){let n={};this.idempotencyHeader&&"get"!==t&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),n[this.idempotencyHeader]=e.idempotencyKey);let i=t_([n,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(a),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...s??(s=(()=>{let e="u">typeof Deno&&null!=Deno.build?"deno":"u">typeof EdgeRuntime?"edge":"[object process]"===Object.prototype.toString.call(void 0!==globalThis.process?globalThis.process:0)?"node":"unknown";if("deno"===e)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":eZ,"X-Stainless-OS":e1(Deno.build.os),"X-Stainless-Arch":e0(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":"string"==typeof Deno.version?Deno.version:Deno.version?.deno??"unknown"};if("u">typeof EdgeRuntime)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":eZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if("node"===e)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":eZ,"X-Stainless-OS":e1(globalThis.process.platform??"unknown"),"X-Stainless-Arch":e0(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let t=function(){if("u"0&&(g["x-litellm-tags"]=a.join(","));let y=new tQ({apiKey:r,baseURL:f,dangerouslyAllowBrowser:!0,defaultHeaders:g});try{let r=Date.now(),a=!1,m={model:s,messages:e.map(e=>({role:e.role,content:e.content})),stream:!0,max_tokens:1024,litellm_trace_id:c};for await(let e of(d&&(m.vector_store_ids=d),u&&(m.guardrails=u),h&&(m.policies=h),y.messages.stream(m,{signal:n}))){if(console.log("Stream event:",e),"content_block_delta"===e.type){let n=e.delta;if(!a){a=!0;let e=Date.now()-r;console.log("First token received! Time:",e,"ms"),o&&o(e)}"text_delta"===n.type?t("assistant",n.text,s):"reasoning_delta"===n.type&&i&&i(n.text)}if("message_delta"===e.type&&e.usage&&l){let t=e.usage;console.log("Usage data found:",t);let s={completionTokens:t.output_tokens,promptTokens:t.input_tokens,totalTokens:t.input_tokens+t.output_tokens};l(s)}}}catch(e){throw n?.aborted?console.log("Anthropic messages request was cancelled"):t1.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`),e}}e.s(["makeAnthropicMessagesRequest",()=>t2],434788);var t4=e.i(356449);async function t3(e,t,s,r,a,n,i,o,l,c){console.log=function(){},console.log("isLocal:",!1);let d=c||(0,ev.getProxyBaseUrl)(),u=new t4.default.OpenAI({apiKey:a,baseURL:d,dangerouslyAllowBrowser:!0,defaultHeaders:n&&n.length>0?{"x-litellm-tags":n.join(",")}:void 0});try{let a=await u.audio.speech.create({model:r,input:e,voice:t,...o?{response_format:o}:{},...l?{speed:l}:{}},{signal:i}),n=await a.blob(),c=URL.createObjectURL(n);s(c,r)}catch(e){throw i?.aborted?console.log("Audio speech request was cancelled"):t1.default.fromBackend(`Error occurred while generating speech. Please try again. Error: ${e}`),e}}async function t5(e,t,s,r,a,n,i,o,l,c,d){console.log=function(){},console.log("isLocal:",!1);let u=d||(0,ev.getProxyBaseUrl)(),h=new t4.default.OpenAI({apiKey:r,baseURL:u,dangerouslyAllowBrowser:!0,defaultHeaders:a&&a.length>0?{"x-litellm-tags":a.join(",")}:void 0});try{console.log("Processing audio file for transcription:",e.name);let r=await h.audio.transcriptions.create({model:s,file:e,...i?{language:i}:{},...o?{prompt:o}:{},...l?{response_format:l}:{},...void 0!==c?{temperature:c}:{}},{signal:n});if(console.log("Transcription response:",r),r&&r.text)t(r.text,s),t1.default.success("Audio transcribed successfully");else throw Error("No transcription text in response")}catch(e){if(console.error("Error making audio transcription request:",e),n?.aborted)console.log("Audio transcription request was cancelled");else{let t="Failed to transcribe audio";e?.error?.message?t=e.error.message:e?.message&&(t=e.message),t1.default.fromBackend(`Audio transcription failed: ${t}`)}throw e}}async function t6(e,t,s,r,a,n){if(!r)throw Error("Virtual Key is required");console.log=function(){};let i=n||(0,ev.getProxyBaseUrl)(),o={};a&&a.length>0&&(o["x-litellm-tags"]=a.join(","));try{let a=i.endsWith("/")?i.slice(0,-1):i,n=`${a}/embeddings`,l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[(0,ev.getGlobalLitellmHeaderName)()]:`Bearer ${r}`,...o},body:JSON.stringify({model:s,input:e})});if(!l.ok){let e=await l.text();throw Error(e||`Request failed with status ${l.status}`)}let c=await l.json(),d=c?.data?.[0]?.embedding;if(!d)throw Error("No embedding returned from server");t(JSON.stringify(d),c?.model??s)}catch(e){throw t1.default.fromBackend(`Error occurred while making embeddings request. Please try again. Error: ${e}`),e}}e.s(["makeOpenAIAudioSpeechRequest",()=>t3],512882),e.s(["makeOpenAIAudioTranscriptionRequest",()=>t5],584976),e.s(["makeOpenAIEmbeddingsRequest",()=>t6],720762)},488143,(e,t,s)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:s,blurHeight:r,blurDataURL:a,objectFit:n}){let i=s?40*s:e,o=r?40*r:t,l=i&&o?`viewBox='0 0 ${i} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${l}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${l?"none":"contain"===n?"xMidYMid":"cover"===n?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},987690,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return n},imageConfigDefault:function(){return i}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=["default","imgix","cloudinary","akamai","custom"],i={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},908927,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"getImgProps",{enumerable:!0,get:function(){return c}}),e.r(233525);let r=e.r(543369),a=e.r(488143),n=e.r(987690),i=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:s=!1,priority:c=!1,preload:d=!1,loading:u,className:h,quality:m,width:p,height:f,fill:g=!1,style:y,overrideSrc:x,onLoad:b,onLoadingComplete:v,placeholder:w="empty",blurDataURL:j,fetchPriority:S,decoding:_="async",layout:N,objectFit:k,objectPosition:E,lazyBoundary:C,lazyRoot:T,...A},P){var O;let R,I,M,{imgConf:L,showAltText:$,blurComplete:U,defaultLoader:D}=P,B=L||n.imageConfigDefault;if("allSizes"in B)R=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),s=B.qualities?.sort((e,t)=>e-t);R={...B,allSizes:e,deviceSizes:t,qualities:s}}if(void 0===D)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let q=A.loader||D;delete A.loader,delete A.srcSet;let W="__next_img_default"in q;if(W){if("custom"===R.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop. Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=q;q=t=>{let{config:s,...r}=t;return e(r)}}if(N){"fill"===N&&(g=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[N];e&&(y={...y,...e});let s={responsive:"100vw",fill:"100vw"}[N];s&&!t&&(t=s)}let z="",H=l(p),F=l(f);if((O=e)&&"object"==typeof O&&(o(O)||void 0!==O.src)){let t=o(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(I=t.blurWidth,M=t.blurHeight,j=j||t.blurDataURL,z=t.src,!g)if(H||F){if(H&&!F){let e=H/t.width;F=Math.round(t.height*e)}else if(!H&&F){let e=F/t.height;H=Math.round(t.width*e)}}else H=t.width,F=t.height}let J=!c&&!d&&("lazy"===u||void 0===u);(!(e="string"==typeof e?e:z)||e.startsWith("data:")||e.startsWith("blob:"))&&(s=!0,J=!1),R.unoptimized&&(s=!0),W&&!R.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(s=!0);let G=l(m),V=Object.assign(g?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:k,objectPosition:E}:{},$?{}:{color:"transparent"},y),K=U||"empty"===w?null:"blur"===w?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:H,heightInt:F,blurWidth:I,blurHeight:M,blurDataURL:j||"",objectFit:V.objectFit})}")`:`url("${w}")`,X=i.includes(V.objectFit)?"fill"===V.objectFit?"100% 100%":"cover":V.objectFit,Y=K?{backgroundSize:X,backgroundPosition:V.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:K}:{},Q=function({config:e,src:t,unoptimized:s,width:a,quality:n,sizes:i,loader:o}){if(s){let e=(0,r.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let s=t.includes("?")?"&":"?";t=`${t}${s}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:l,kind:c}=function({deviceSizes:e,allSizes:t},s,r){if(r){let s=/(^|\s)(1?\d?\d)vw/g,a=[];for(let e;e=s.exec(r);)a.push(parseInt(e[2]));if(a.length){let s=.01*Math.min(...a);return{widths:t.filter(t=>t>=e[0]*s),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof s?{widths:e,kind:"w"}:{widths:[...new Set([s,2*s].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,a,i),d=l.length-1;return{sizes:i||"w"!==c?i:"100vw",srcSet:l.map((s,r)=>`${o({config:e,src:t,quality:n,width:s})} ${"w"===c?s:r+1}${c}`).join(", "),src:o({config:e,src:t,quality:n,width:l[d]})}}({config:R,src:e,unoptimized:s,width:H,quality:G,sizes:t,loader:q}),Z=J?"lazy":u;return{props:{...A,loading:Z,fetchPriority:S,width:H,height:F,decoding:_,className:h,style:{...V,...Y},sizes:Q.sizes,srcSet:Q.srcSet,src:x||Q.src},meta:{unoptimized:s,preload:d||c,placeholder:w,fill:g}}}},898879,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return o}});let r=e.r(271645),a="u"{}:r.useLayoutEffect,i=a?()=>{}:r.useEffect;function o(e){let{headManager:t,reduceComponentsToState:s}=e;function o(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(s(e))}}return a&&(t?.mountedInstances?.add(e.children),o()),n(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),n(()=>(t&&(t._pendingUpdate=o),()=>{t&&(t._pendingUpdate=o)})),i(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},325633,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return f},defaultHead:function(){return u}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=e.r(563141),i=e.r(151836),o=e.r(843476),l=i._(e.r(271645)),c=n._(e.r(898879)),d=e.r(742732);function u(){return[(0,o.jsx)("meta",{charSet:"utf-8"},"charset"),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function h(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(233525);let m=["name","httpEquiv","charSet","itemProp"];function p(e){let t,s,r,a;return e.reduce(h,[]).reverse().concat(u().reverse()).filter((t=new Set,s=new Set,r=new Set,a={},e=>{let n=!0,i=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){i=!0;let s=e.key.slice(e.key.indexOf("$")+1);t.has(s)?n=!1:t.add(s)}switch(e.type){case"title":case"base":s.has(e.type)?n=!1:s.add(e.type);break;case"meta":for(let t=0,s=m.length;t{let s=e.key||t;return l.default.cloneElement(e,{key:s})})}let f=function({children:e}){let t=(0,l.useContext)(d.HeadManagerContext);return(0,o.jsx)(c.default,{reduceComponentsToState:p,headManager:t,children:e})};("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},918556,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"ImageConfigContext",{enumerable:!0,get:function(){return n}});let r=e.r(563141)._(e.r(271645)),a=e.r(987690),n=r.default.createContext(a.imageConfigDefault)},65856,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"RouterContext",{enumerable:!0,get:function(){return r}});let r=e.r(563141)._(e.r(271645)).default.createContext(null)},670965,(e,t,s)=>{"use strict";function r(e,t){let s=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return i}});let r=e.r(670965),a=e.r(543369);function n({config:e,src:t,width:s,quality:n}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns. -Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let i=(0,r.findClosestQuality)(n,e),o=(0,a.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${s}&q=${i}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}n.__next_img_default=!0;let i=n},605500,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"Image",{enumerable:!0,get:function(){return v}});let r=e.r(563141),a=e.r(151836),n=e.r(843476),i=a._(e.r(271645)),o=r._(e.r(174080)),l=r._(e.r(325633)),c=e.r(908927),d=e.r(987690),u=e.r(918556);e.r(233525);let h=e.r(65856),m=r._(e.r(1948)),p=e.r(818581),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,s,r,a,n,i){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),s?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,a=!1;s.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function y(e){return i.use?{fetchPriority:e}:{fetchpriority:e}}"u"{let E=(0,i.useCallback)(e=>{e&&(_&&(e.src=e.src),e.complete&&g(e,u,x,b,v,m,j))},[e,u,x,b,v,_,m,j]),C=(0,p.useMergedRef)(k,E);return(0,n.jsx)("img",{...N,...y(d),loading:h,width:a,height:r,decoding:o,"data-nimg":f?"fill":"1",className:l,style:c,sizes:s,srcSet:t,src:e,ref:C,onLoad:e=>{g(e.currentTarget,u,x,b,v,m,j)},onError:e=>{w(!0),"empty"!==u&&v(!0),_&&_(e)}})});function b({isAppRouter:e,imgAttributes:t}){let s={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...y(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,s),null):(0,n.jsx)(l.default,{children:(0,n.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...s},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,i.forwardRef)((e,t)=>{let s=(0,i.useContext)(h.RouterContext),r=(0,i.useContext)(u.ImageConfigContext),a=(0,i.useMemo)(()=>{let e=f||r||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),s=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:s,qualities:a,localPatterns:"u"{p.current=o},[o]);let g=(0,i.useRef)(l);(0,i.useEffect)(()=>{g.current=l},[l]);let[y,v]=(0,i.useState)(!1),[w,j]=(0,i.useState)(!1),{props:S,meta:_}=(0,c.getImgProps)(e,{defaultLoader:m.default,imgConf:a,blurComplete:y,showAltText:w});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x,{...S,unoptimized:_.unoptimized,placeholder:_.placeholder,fill:_.fill,onLoadRef:p,onLoadingCompleteRef:g,setBlurComplete:v,setShowAltText:j,sizesInput:e.sizes,ref:t}),_.preload?(0,n.jsx)(b,{isAppRouter:!s,imgAttributes:S}):null]})});("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},794909,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return d},getImageProps:function(){return c}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=e.r(563141),i=e.r(908927),o=e.r(605500),l=n._(e.r(1948));function c(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,s]of Object.entries(t))void 0===s&&delete t[e];return{props:t}}let d=o.Image},657688,(e,t,s)=>{t.exports=e.r(794909)},220486,761793,964421,91500,843153,152401,e=>{"use strict";var t=e.i(843476),s=e.i(218129),r=e.i(132104),a=e.i(447593),n=e.i(245094),i=e.i(210612),o=e.i(955135),l=e.i(827252),c=e.i(438957),d=e.i(596239),u=e.i(56456),h=e.i(124608),m=e.i(983561),p=e.i(602073),f=e.i(313603),g=e.i(782273),y=e.i(232164),x=e.i(366308),b=e.i(304967),v=e.i(599724),w=e.i(779241),j=e.i(629569),S=e.i(994388),_=e.i(464571),N=e.i(311451),k=e.i(212931),E=e.i(282786),C=e.i(199133),T=e.i(482725),A=e.i(592968),P=e.i(898586),O=e.i(515831),R=e.i(271645),I=e.i(650056),M=e.i(219470),L=e.i(422233),$=e.i(891547),U=e.i(921511),D=e.i(235267),B=e.i(611052),q=e.i(727749),W=e.i(764205),z=e.i(318059),H=e.i(916940),F=e.i(953860),J=e.i(434788),G=e.i(512882),V=e.i(584976),K=e.i(254530),X=e.i(720762),Y=e.i(921687),Q=e.i(689020);e.i(247167);var Z=e.i(356449);async function ee(e,t,s,r,a,n,i,o){console.log=function(){},console.log("isLocal:",!1);let l=o||(0,W.getProxyBaseUrl)(),c=new Z.default.OpenAI({apiKey:a,baseURL:l,dangerouslyAllowBrowser:!0,defaultHeaders:n&&n.length>0?{"x-litellm-tags":n.join(",")}:void 0});try{let a=Array.isArray(e)?e:[e],n=[];for(let e=0;e1&&q.default.success(`Successfully processed ${n.length} images`)}catch(e){if(console.error("Error making image edit request:",e),i?.aborted)console.log("Image edits request was cancelled");else{let t="Failed to edit image(s)";e?.error?.message?t=e.error.message:e?.message&&(t=e.message),q.default.fromBackend(`Image edit failed: ${t}`)}throw e}}async function et(e,t,s,r,a,n,i){console.log=function(){},console.log("isLocal:",!1);let o=i||(0,W.getProxyBaseUrl)(),l=new Z.default.OpenAI({apiKey:r,baseURL:o,dangerouslyAllowBrowser:!0,defaultHeaders:a&&a.length>0?{"x-litellm-tags":a.join(",")}:void 0});try{let r=await l.images.generate({model:s,prompt:e},{signal:n});if(console.log(r.data),r.data&&r.data[0])if(r.data[0].url)t(r.data[0].url,s);else if(r.data[0].b64_json){let e=r.data[0].b64_json;t(`data:image/png;base64,${e}`,s)}else throw Error("No image data found in response");else throw Error("Invalid response format")}catch(e){throw n?.aborted?console.log("Image generation request was cancelled"):q.default.fromBackend(`Error occurred while generating image. Please try again. Error: ${e}`),e}}var es=e.i(452598),er=e.i(536916),ea=e.i(28651),en=e.i(850627);let ei=({temperature:e=1,maxTokens:s=2048,useAdvancedParams:r,onTemperatureChange:a,onMaxTokensChange:n,onUseAdvancedParamsChange:i,mockTestFallbacks:o,onMockTestFallbacksChange:c})=>{let[d,u]=(0,R.useState)(!1),h=void 0!==r?r:d,[m,p]=(0,R.useState)(e),[f,g]=(0,R.useState)(s);(0,R.useEffect)(()=>{p(e)},[e]),(0,R.useEffect)(()=>{g(s)},[s]);let y=e=>{let t=e??1;p(t),a?.(t)},x=e=>{let t=e??1e3;g(t),n?.(t)},b=h?"text-gray-700":"text-gray-400";return(0,t.jsxs)("div",{className:"space-y-4 p-4 w-80",children:[(0,t.jsx)(er.Checkbox,{checked:h,onChange:e=>{var t;return t=e.target.checked,void(i?i(t):u(t))},children:(0,t.jsx)("span",{className:"font-medium",children:"Use Advanced Parameters"})}),c&&(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(er.Checkbox,{checked:o??!1,onChange:e=>c(e.target.checked),children:(0,t.jsx)("span",{className:"font-medium",children:"Simulate failure to test fallbacks"})}),(0,t.jsx)(E.Popover,{trigger:"hover",placement:"right",content:(0,t.jsxs)("div",{style:{maxWidth:340},children:[(0,t.jsx)(P.Typography.Paragraph,{className:"text-sm",style:{marginBottom:8},children:"Causes the first request to fail so the router tries fallbacks (if configured). Use this to verify your fallback setup."}),(0,t.jsxs)(P.Typography.Paragraph,{className:"text-sm",style:{marginBottom:0},children:["Behavior can differ when keys, teams, or router settings are configured."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/keys_teams_router_settings",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800",children:"Learn more"})]})]}),children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-xs text-gray-400 cursor-pointer shrink-0 hover:text-gray-600","aria-label":"Help: Simulate failure to test fallbacks"})})]}),(0,t.jsxs)("div",{className:"space-y-4 transition-opacity duration-200",style:{opacity:h?1:.4},children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.Text,{className:`text-sm ${b}`,children:"Temperature"}),(0,t.jsx)(A.Tooltip,{title:"Controls randomness. Lower values make output more deterministic, higher values more creative.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:`text-xs ${b} cursor-help`})})]}),(0,t.jsx)(ea.InputNumber,{min:0,max:2,step:.1,value:m,onChange:y,disabled:!h,precision:1,className:"w-20"})]}),(0,t.jsx)(en.Slider,{min:0,max:2,step:.1,value:m,onChange:y,disabled:!h,marks:{0:"0",1:"1.0",2:"2.0"}})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.Text,{className:`text-sm ${b}`,children:"Max Tokens"}),(0,t.jsx)(A.Tooltip,{title:"Maximum number of tokens to generate in the response.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:`text-xs ${b} cursor-help`})})]}),(0,t.jsx)(ea.InputNumber,{min:1,max:32768,step:1,value:f,onChange:x,disabled:!h})]}),(0,t.jsx)(en.Slider,{min:1,max:32768,step:1,value:f,onChange:x,disabled:!h,marks:{1:"1",32768:"32768"}})]})]})]})};var eo=e.i(785913);let el={ALLOY:"Alloy - Professional and confident",ASH:"Ash - Casual and relaxed",BALAD:"Ballad - Smooth and melodic",CORAL:"Coral - Warm and engaging",ECHO:"Echo - Friendly and conversational",FABLE:"Fable - Wise and measured",NOVA:"Nova - Friendly and conversational",ONYX:"Onyx - Deep and authoritative",SAGE:"Sage - Wise and measured",SHIMMER:"Shimmer - Bright and cheerful"},ec=Object.entries({ALLOY:"alloy",ASH:"ash",BALAD:"ballad",CORAL:"coral",ECHO:"echo",FABLE:"fable",NOVA:"nova",ONYX:"onyx",SAGE:"sage",SHIMMER:"shimmer"}).map(([e,t])=>({value:t,label:el[e]})),ed=[{value:eo.EndpointType.CHAT,label:"/v1/chat/completions"},{value:eo.EndpointType.RESPONSES,label:"/v1/responses"},{value:eo.EndpointType.ANTHROPIC_MESSAGES,label:"/v1/messages"},{value:eo.EndpointType.IMAGE,label:"/v1/images/generations"},{value:eo.EndpointType.IMAGE_EDITS,label:"/v1/images/edits"},{value:eo.EndpointType.EMBEDDINGS,label:"/v1/embeddings"},{value:eo.EndpointType.SPEECH,label:"/v1/audio/speech"},{value:eo.EndpointType.TRANSCRIPTION,label:"/v1/audio/transcriptions"},{value:eo.EndpointType.A2A_AGENTS,label:"/v1/a2a/message/send"},{value:eo.EndpointType.MCP,label:"/mcp-rest/tools/call"},{value:eo.EndpointType.REALTIME,label:"/v1/realtime"}];var eu=e.i(955719),eu=eu;let{Dragger:eh}=O.Upload,em=({chatUploadedImage:e,chatImagePreviewUrl:s,onImageUpload:r,onRemoveImage:a})=>(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(eh,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,t.jsx)(A.Tooltip,{title:"Attach image or PDF",children:(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,t.jsx)(eu.default,{style:{fontSize:"16px"}})})})})});e.s(["default",0,em],761793);let ep=async(e,t)=>({role:"user",content:[{type:"text",text:e},{type:"image_url",image_url:{url:await new Promise((e,s)=>{let r=new FileReader;r.onload=()=>{e(r.result)},r.onerror=s,r.readAsDataURL(t)})}}]}),ef=(e,t,s,r)=>{let a="";t&&r&&(a=r.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let n={role:"user",content:t?`${e} ${a}`:e};return t&&s&&(n.imagePreviewUrl=s),n},eg=e=>"user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&!!e.imagePreviewUrl;e.s(["createChatDisplayMessage",0,ef,"createChatMultimodalMessage",0,ep,"shouldShowChatAttachedImage",0,eg],964421);var ey=e.i(790848),ex=e.i(888259),eb=e.i(270377);let ev=({enabled:e,onEnabledChange:s,selectedModel:r,disabled:a=!1})=>{let i=(e=>{if(!e)return!1;let t=e.toLowerCase();return t.startsWith("openai/")||t.startsWith("gpt-")||t.startsWith("o1")||t.startsWith("o3")||t.includes("openai")})(r);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-3 bg-gradient-to-r from-blue-50 to-purple-50",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)(n.CodeOutlined,{className:"text-blue-500"}),(0,t.jsx)(v.Text,{className:"font-medium text-gray-700",children:"Code Interpreter"}),(0,t.jsx)(A.Tooltip,{title:"Run Python code to generate files, charts, and analyze data. Container is created automatically.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400 text-xs"})})]}),(0,t.jsx)(ey.Switch,{checked:e&&i,onChange:e=>{e&&!i?ex.default.warning("Code Interpreter is only available for OpenAI models"):s(e)},disabled:a||!i,size:"small",className:e&&i?"bg-blue-500":""})]}),!i&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(eb.ExclamationCircleOutlined,{className:"text-amber-500 mt-0.5"}),(0,t.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,t.jsx)("span",{children:"Code Interpreter is currently only supported for OpenAI models. "}),(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new?template=feature_request.yml",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Request support for other providers"})]})]})})]})};var ew=e.i(190272);let ej=({endpointType:e,onEndpointChange:s,className:r})=>(0,t.jsx)("div",{className:r,children:(0,t.jsx)(C.Select,{showSearch:!0,value:e,style:{width:"100%"},onChange:s,options:ed,className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())||(t?.value??"").toLowerCase().includes(e.toLowerCase())})});var eS=e.i(931067);let e_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-pdf",theme:"outlined"};var eN=e.i(9583),ek=R.forwardRef(function(e,t){return R.createElement(eN.default,(0,eS.default)({},e,{ref:t,icon:e_}))});e.s(["FilePdfOutlined",0,ek],91500);let eE=function({file:e,previewUrl:s,onRemove:r}){let a=e.name.toLowerCase().endsWith(".pdf");return(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsx)("div",{className:"relative inline-block",children:a?(0,t.jsx)("div",{className:"w-10 h-10 rounded-md bg-red-500 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"16px",color:"white"}})}):(0,t.jsx)("img",{src:s||"",alt:"Upload preview",className:"w-10 h-10 rounded-md border border-gray-200 object-cover"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:a?"PDF":"Image"})]}),(0,t.jsx)("button",{className:"flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-600 hover:bg-gray-200 rounded-full transition-colors",onClick:r,children:(0,t.jsx)(o.DeleteOutlined,{style:{fontSize:"12px"}})})]})})};var eC=e.i(771674),eT=e.i(918789),eA=e.i(245704),eP=e.i(637235),eO=e.i(166406),eR=e.i(755151),eI=e.i(240647),eM=e.i(993914);let eL=(e,t=8)=>e?e.length>t?`${e.substring(0,t)}…`:e:null,e$=e=>{navigator.clipboard.writeText(e)},eU=({a2aMetadata:e,timeToFirstToken:s,totalLatency:r})=>{let[a,n]=(0,R.useState)(!1);if(!e&&!s&&!r)return null;let{taskId:i,contextId:o,status:l,metadata:c}=e||{},h=(e=>{if(!e)return null;try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return e}})(l?.timestamp);return(0,t.jsxs)("div",{className:"a2a-metrics mt-3 pt-2 border-t border-gray-200 text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-gray-600",children:[(0,t.jsx)(m.RobotOutlined,{className:"mr-1.5 text-blue-500"}),(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"A2A Metadata"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-gray-500 ml-4",children:[l?.state&&(0,t.jsxs)("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${(e=>{switch(e){case"completed":return"bg-green-100 text-green-700";case"working":case"submitted":return"bg-blue-100 text-blue-700";case"failed":case"canceled":return"bg-red-100 text-red-700";default:return"bg-gray-100 text-gray-700"}})(l.state)}`,children:[(e=>{switch(e){case"completed":return(0,t.jsx)(eA.CheckCircleOutlined,{className:"text-green-500"});case"working":case"submitted":return(0,t.jsx)(u.LoadingOutlined,{className:"text-blue-500"});case"failed":case"canceled":return(0,t.jsx)(eb.ExclamationCircleOutlined,{className:"text-red-500"});default:return(0,t.jsx)(eP.ClockCircleOutlined,{className:"text-gray-500"})}})(l.state),(0,t.jsx)("span",{className:"ml-1 capitalize",children:l.state})]}),h&&(0,t.jsx)(A.Tooltip,{title:l?.timestamp,children:(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)(eP.ClockCircleOutlined,{className:"mr-1"}),h]})}),void 0!==r&&(0,t.jsx)(A.Tooltip,{title:"Total latency",children:(0,t.jsxs)("span",{className:"flex items-center text-blue-600",children:[(0,t.jsx)(eP.ClockCircleOutlined,{className:"mr-1"}),(r/1e3).toFixed(2),"s"]})}),void 0!==s&&(0,t.jsx)(A.Tooltip,{title:"Time to first token",children:(0,t.jsxs)("span",{className:"flex items-center text-green-600",children:["TTFT: ",(s/1e3).toFixed(2),"s"]})})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-gray-500 ml-4 mt-1.5",children:[i&&(0,t.jsx)(A.Tooltip,{title:`Click to copy: ${i}`,children:(0,t.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>e$(i),children:[(0,t.jsx)(eM.FileTextOutlined,{className:"mr-1"}),"Task: ",eL(i),(0,t.jsx)(eO.CopyOutlined,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),o&&(0,t.jsx)(A.Tooltip,{title:`Click to copy: ${o}`,children:(0,t.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>e$(o),children:[(0,t.jsx)(d.LinkOutlined,{className:"mr-1"}),"Session: ",eL(o),(0,t.jsx)(eO.CopyOutlined,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),(c||l?.message)&&(0,t.jsxs)(_.Button,{type:"text",size:"small",className:"text-xs text-blue-500 hover:text-blue-700 p-0 h-auto",onClick:()=>n(!a),children:[a?(0,t.jsx)(eR.DownOutlined,{}):(0,t.jsx)(eI.RightOutlined,{}),(0,t.jsx)("span",{className:"ml-1",children:"Details"})]})]}),a&&(0,t.jsxs)("div",{className:"mt-2 ml-4 p-3 bg-gray-50 rounded-md text-gray-600 border border-gray-200",children:[l?.message&&(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"Status Message:"}),(0,t.jsx)("span",{className:"ml-2",children:l.message})]}),i&&(0,t.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Task ID:"}),(0,t.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:i}),(0,t.jsx)(eO.CopyOutlined,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>e$(i)})]}),o&&(0,t.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Session ID:"}),(0,t.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:o}),(0,t.jsx)(eO.CopyOutlined,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>e$(o)})]}),c&&Object.keys(c).length>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"Custom Metadata:"}),(0,t.jsx)("pre",{className:"mt-1.5 p-2 bg-white border border-gray-200 rounded text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:JSON.stringify(c,null,2)})]})]})]})},eD=({message:e})=>e.isAudio&&"string"==typeof e.content?(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)("audio",{controls:!0,src:e.content,className:"max-w-full",style:{maxWidth:"500px"},children:"Your browser does not support the audio element."})}):null;var eB=e.i(657688);let eq=({message:e})=>{if(!eg(e))return null;let s="string"==typeof e.content&&e.content.includes("[PDF attached]");return(0,t.jsx)("div",{className:"mb-2",children:s?(0,t.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,t.jsx)(eB.default,{src:e.imagePreviewUrl||"",alt:"User uploaded image",width:256,height:200,className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px",width:"auto",height:"auto"}})})};e.s(["default",0,eq],843153);var eW=e.i(362024),ez=e.i(737434);let eH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"};var eF=R.forwardRef(function(e,t){return R.createElement(eN.default,(0,eS.default)({},e,{ref:t,icon:eH}))});let eJ=({code:e,containerId:s,annotations:r=[],accessToken:a})=>{let[i,o]=(0,R.useState)({}),[l,c]=(0,R.useState)({}),d=(0,W.getProxyBaseUrl)();(0,R.useEffect)(()=>{let e=async()=>{for(let e of r)if((e.filename?.toLowerCase().endsWith(".png")||e.filename?.toLowerCase().endsWith(".jpg")||e.filename?.toLowerCase().endsWith(".jpeg")||e.filename?.toLowerCase().endsWith(".gif"))&&e.container_id&&e.file_id){c(t=>({...t,[e.file_id]:!0}));try{let t=await fetch(`${d}/v1/containers/${e.container_id}/files/${e.file_id}/content`,{headers:{[(0,W.getGlobalLitellmHeaderName)()]:`Bearer ${a}`}});if(t.ok){let s=await t.blob(),r=URL.createObjectURL(s);o(t=>({...t,[e.file_id]:r}))}}catch(e){console.error("Error fetching image:",e)}finally{c(t=>({...t,[e.file_id]:!1}))}}};return r.length>0&&a&&e(),()=>{Object.values(i).forEach(e=>URL.revokeObjectURL(e))}},[r,a,d]);let h=async e=>{try{let t=await fetch(`${d}/v1/containers/${e.container_id}/files/${e.file_id}/content`,{headers:{[(0,W.getGlobalLitellmHeaderName)()]:`Bearer ${a}`}});if(t.ok){let s=await t.blob(),r=URL.createObjectURL(s),a=document.createElement("a");a.href=r,a.download=e.filename||`file_${e.file_id}`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}}catch(e){console.error("Error downloading file:",e)}},m=r.filter(e=>e.filename?.toLowerCase().endsWith(".png")||e.filename?.toLowerCase().endsWith(".jpg")||e.filename?.toLowerCase().endsWith(".jpeg")||e.filename?.toLowerCase().endsWith(".gif")),p=r.filter(e=>!e.filename?.toLowerCase().endsWith(".png")&&!e.filename?.toLowerCase().endsWith(".jpg")&&!e.filename?.toLowerCase().endsWith(".jpeg")&&!e.filename?.toLowerCase().endsWith(".gif"));return e||0!==r.length?(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[e&&(0,t.jsx)(eW.Collapse,{size:"small",items:[{key:"code",label:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm text-gray-600",children:[(0,t.jsx)(n.CodeOutlined,{})," Python Code Executed"]}),children:(0,t.jsx)(I.Prism,{language:"python",style:M.coy,customStyle:{margin:0,borderRadius:"6px",fontSize:"12px",maxHeight:"300px",overflow:"auto"},children:e})}]}),m.map(e=>(0,t.jsx)("div",{className:"rounded-lg border border-gray-200 overflow-hidden",children:l[e.file_id]?(0,t.jsxs)("div",{className:"flex items-center justify-center p-8 bg-gray-50",children:[(0,t.jsx)(T.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0})}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:"Loading image..."})]}):i[e.file_id]?(0,t.jsxs)("div",{children:[(0,t.jsx)("img",{src:i[e.file_id],alt:e.filename||"Generated chart",className:"max-w-full",style:{maxHeight:"400px"}}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-50 border-t border-gray-200",children:[(0,t.jsxs)("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[(0,t.jsx)(eF,{})," ",e.filename]}),(0,t.jsxs)("button",{onClick:()=>h(e),className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1",children:[(0,t.jsx)(ez.DownloadOutlined,{})," Download"]})]})]}):(0,t.jsx)("div",{className:"flex items-center justify-center p-4 bg-gray-50",children:(0,t.jsx)("span",{className:"text-sm text-gray-400",children:"Image not available"})})},e.file_id)),p.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:p.map(e=>(0,t.jsxs)("button",{onClick:()=>h(e),className:"flex items-center gap-2 px-3 py-2 bg-gray-50 border border-gray-200 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,t.jsx)(eM.FileTextOutlined,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"text-sm",children:e.filename}),(0,t.jsx)(ez.DownloadOutlined,{className:"text-gray-400"})]},e.file_id))})]}):null};var eG=e.i(355343),eV=e.i(966988),eK=e.i(989022);let eX=async(e,t)=>{let s=await new Promise((e,s)=>{let r=new FileReader;r.onload=()=>{e(r.result.split(",")[1])},r.onerror=s,r.readAsDataURL(t)}),r=t.type||(t.name.toLowerCase().endsWith(".pdf")?"application/pdf":"image/jpeg");return{role:"user",content:[{type:"input_text",text:e},{type:"input_image",image_url:`data:${r};base64,${s}`}]}},eY=(e,t,s,r)=>{let a="";t&&r&&(a=r.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let n={role:"user",content:t?`${e} ${a}`:e};return t&&s&&(n.imagePreviewUrl=s),n},eQ=({message:e})=>{if(!("user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&e.imagePreviewUrl))return null;let s="string"==typeof e.content&&e.content.includes("[PDF attached]");return(0,t.jsx)("div",{className:"mb-2",children:s?(0,t.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,t.jsx)("img",{src:e.imagePreviewUrl,alt:"User uploaded image",className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px"}})})};function eZ({searchResults:e}){let[s,r]=(0,R.useState)(!0),[a,n]=(0,R.useState)({});if(!e||0===e.length)return null;let o=e.reduce((e,t)=>e+t.data.length,0);return(0,t.jsxs)("div",{className:"search-results-content mt-1 mb-2",children:[(0,t.jsxs)(_.Button,{type:"text",className:"flex items-center text-xs text-gray-500 hover:text-gray-700",onClick:()=>r(!s),icon:(0,t.jsx)(i.DatabaseOutlined,{}),children:[s?"Hide sources":`Show sources (${o})`,s?(0,t.jsx)(eR.DownOutlined,{className:"ml-1"}):(0,t.jsx)(eI.RightOutlined,{className:"ml-1"})]}),s&&(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md text-sm",children:(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-xs text-gray-600 mb-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:"Query:"}),(0,t.jsxs)("span",{className:"italic",children:['"',e.search_query,'"']}),(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("span",{className:"text-gray-500",children:[e.data.length," result",1!==e.data.length?"s":""]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-md overflow-hidden bg-white",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-2 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>{let e;return e=`${s}-${r}`,void n(t=>({...t,[e]:!t[e]}))},children:(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform flex-shrink-0 ${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.jsx)(eM.FileTextOutlined,{className:"text-gray-400 flex-shrink-0",style:{fontSize:"12px"}}),(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 truncate",children:e.filename||e.file_id||`Result ${r+1}`}),(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-blue-100 text-blue-700 font-mono flex-shrink-0",children:e.score.toFixed(3)})]})}),i&&(0,t.jsx)("div",{className:"border-t border-gray-200 bg-white",children:(0,t.jsxs)("div",{className:"p-3 space-y-2",children:[e.content.map((e,s)=>(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"text-xs font-mono bg-gray-50 p-2 rounded text-gray-800 whitespace-pre-wrap break-words",children:e.text})},s)),e.attributes&&Object.keys(e.attributes).length>0&&(0,t.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-100",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1 font-medium",children:"Metadata:"}),(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(e.attributes).map(([e,s])=>(0,t.jsxs)("div",{className:"text-xs flex gap-2",children:[(0,t.jsxs)("span",{className:"text-gray-500 font-medium",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-700 font-mono break-all",children:String(s)})]},e))})]})]})})]},r)})})]},s))})})]})}e.s(["SearchResultsDisplay",()=>eZ],152401);let e0=function({message:e,isLastMessage:s,endpointType:r,mcpEvents:a,codeInterpreterResult:n,accessToken:i}){let o="user"===e.role;return(0,t.jsx)("div",{className:`mb-4 ${o?"text-right":"text-left"}`,children:(0,t.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:o?"#f0f8ff":"#ffffff",border:o?"1px solid #e6f0fa":"1px solid #f0f0f0",textAlign:"left"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:o?"#e6f0fa":"#f5f5f5"},children:o?(0,t.jsx)(eC.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(m.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),e.reasoningContent&&(0,t.jsx)(eV.default,{reasoningContent:e.reasoningContent}),"assistant"===e.role&&s&&a.length>0&&(r===eo.EndpointType.RESPONSES||r===eo.EndpointType.CHAT)&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(eG.default,{events:a})}),"assistant"===e.role&&e.searchResults&&(0,t.jsx)(eZ,{searchResults:e.searchResults}),"assistant"===e.role&&s&&n&&r===eo.EndpointType.RESPONSES&&(0,t.jsx)(eJ,{code:n.code,containerId:n.containerId,annotations:n.annotations,accessToken:i}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:[e.isImage?(0,t.jsx)("img",{src:"string"==typeof e.content?e.content:"",alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}}):e.isAudio?(0,t.jsx)(eD,{message:e}):(0,t.jsxs)(t.Fragment,{children:[r===eo.EndpointType.RESPONSES&&(0,t.jsx)(eQ,{message:e}),r===eo.EndpointType.CHAT&&(0,t.jsx)(eq,{message:e}),(0,t.jsx)(eT.default,{components:{code({node:e,inline:s,className:r,children:a,...n}){let i=/language-(\w+)/.exec(r||"");return!s&&i?(0,t.jsx)(I.Prism,{style:M.coy,language:i[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...n,children:String(a).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${r} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...n,children:a})},pre:({node:e,...s})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})},children:"string"==typeof e.content?e.content:""}),e.image&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("img",{src:e.image.url,alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}})})]}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&!e.a2aMetadata&&(0,t.jsx)(eK.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage,toolName:e.toolName}),"assistant"===e.role&&e.a2aMetadata&&(0,t.jsx)(eU,{a2aMetadata:e.a2aMetadata,timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency})]})]})})};var eu=eu;let{Dragger:e1}=O.Upload,e2=({responsesUploadedImage:e,responsesImagePreviewUrl:s,onImageUpload:r,onRemoveImage:a})=>(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(e1,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,t.jsx)(A.Tooltip,{title:"Attach image or PDF",children:(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,t.jsx)(eu.default,{style:{fontSize:"16px"}})})})})}),e4=({endpointType:e,responsesSessionId:s,useApiSessionManagement:r,onToggleSessionManagement:a})=>e!==eo.EndpointType.RESPONSES?null:(0,t.jsxs)("div",{className:"mb-4",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)("span",{className:"text-sm font-medium text-gray-700",children:"Session Management"}),(0,t.jsx)(A.Tooltip,{title:"Choose between LiteLLM API session management (using previous_response_id) or UI-based session management (using chat history)",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400",style:{fontSize:"12px"}})})]}),(0,t.jsx)(ey.Switch,{checked:r,onChange:a,checkedChildren:"API",unCheckedChildren:"UI",size:"small"})]}),(0,t.jsxs)("div",{className:`text-xs p-2 rounded-md ${s?"bg-green-50 text-green-700 border border-green-200":"bg-blue-50 text-blue-700 border border-blue-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(l.InfoCircleOutlined,{style:{fontSize:"12px"}}),(()=>{if(!s)return r?"API Session: Ready":"UI Session: Ready";let e=r?"Response ID":"UI Session",t=s.slice(0,10);return`${e}: ${t}...`})()]}),s&&(0,t.jsx)(A.Tooltip,{title:(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"mb-1",children:"Copy response ID to continue session:"}),(0,t.jsx)("div",{className:"bg-gray-800 text-gray-100 p-2 rounded font-mono text-xs whitespace-pre-wrap",children:`curl -X POST "your-proxy-url/v1/responses" \\ +Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let i=(0,r.findClosestQuality)(n,e),o=(0,a.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${s}&q=${i}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}n.__next_img_default=!0;let i=n},605500,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"Image",{enumerable:!0,get:function(){return v}});let r=e.r(563141),a=e.r(151836),n=e.r(843476),i=a._(e.r(271645)),o=r._(e.r(174080)),l=r._(e.r(325633)),c=e.r(908927),d=e.r(987690),u=e.r(918556);e.r(233525);let h=e.r(65856),m=r._(e.r(1948)),p=e.r(818581),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function g(e,t,s,r,a,n,i){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),s?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,a=!1;s.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function y(e){return i.use?{fetchPriority:e}:{fetchpriority:e}}"u"{let E=(0,i.useCallback)(e=>{e&&(_&&(e.src=e.src),e.complete&&g(e,u,x,b,v,m,j))},[e,u,x,b,v,_,m,j]),C=(0,p.useMergedRef)(k,E);return(0,n.jsx)("img",{...N,...y(d),loading:h,width:a,height:r,decoding:o,"data-nimg":f?"fill":"1",className:l,style:c,sizes:s,srcSet:t,src:e,ref:C,onLoad:e=>{g(e.currentTarget,u,x,b,v,m,j)},onError:e=>{w(!0),"empty"!==u&&v(!0),_&&_(e)}})});function b({isAppRouter:e,imgAttributes:t}){let s={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...y(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,s),null):(0,n.jsx)(l.default,{children:(0,n.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...s},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,i.forwardRef)((e,t)=>{let s=(0,i.useContext)(h.RouterContext),r=(0,i.useContext)(u.ImageConfigContext),a=(0,i.useMemo)(()=>{let e=f||r||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),s=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:s,qualities:a,localPatterns:"u"{p.current=o},[o]);let g=(0,i.useRef)(l);(0,i.useEffect)(()=>{g.current=l},[l]);let[y,v]=(0,i.useState)(!1),[w,j]=(0,i.useState)(!1),{props:S,meta:_}=(0,c.getImgProps)(e,{defaultLoader:m.default,imgConf:a,blurComplete:y,showAltText:w});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x,{...S,unoptimized:_.unoptimized,placeholder:_.placeholder,fill:_.fill,onLoadRef:p,onLoadingCompleteRef:g,setBlurComplete:v,setShowAltText:j,sizesInput:e.sizes,ref:t}),_.preload?(0,n.jsx)(b,{isAppRouter:!s,imgAttributes:S}):null]})});("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},794909,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return d},getImageProps:function(){return c}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=e.r(563141),i=e.r(908927),o=e.r(605500),l=n._(e.r(1948));function c(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,s]of Object.entries(t))void 0===s&&delete t[e];return{props:t}}let d=o.Image},657688,(e,t,s)=>{t.exports=e.r(794909)},220486,761793,964421,91500,843153,152401,e=>{"use strict";var t=e.i(843476),s=e.i(218129),r=e.i(132104),a=e.i(447593),n=e.i(245094),i=e.i(210612),o=e.i(955135),l=e.i(827252),c=e.i(438957),d=e.i(596239),u=e.i(56456),h=e.i(124608),m=e.i(983561),p=e.i(602073),f=e.i(313603),g=e.i(782273),y=e.i(232164),x=e.i(366308),b=e.i(304967),v=e.i(599724),w=e.i(779241),j=e.i(629569),S=e.i(994388),_=e.i(464571),N=e.i(311451),k=e.i(212931),E=e.i(282786),C=e.i(199133),T=e.i(482725),A=e.i(592968),P=e.i(898586),O=e.i(515831),R=e.i(271645),I=e.i(650056),M=e.i(219470),L=e.i(422233),$=e.i(891547),U=e.i(921511),D=e.i(235267),B=e.i(611052),q=e.i(727749),W=e.i(764205),z=e.i(318059),H=e.i(916940),F=e.i(953860),J=e.i(434788),G=e.i(512882),V=e.i(584976),K=e.i(254530),X=e.i(720762),Y=e.i(921687),Q=e.i(689020);e.i(247167);var Z=e.i(356449);async function ee(e,t,s,r,a,n,i,o){console.log=function(){},console.log("isLocal:",!1);let l=o||(0,W.getProxyBaseUrl)(),c=new Z.default.OpenAI({apiKey:a,baseURL:l,dangerouslyAllowBrowser:!0,defaultHeaders:n&&n.length>0?{"x-litellm-tags":n.join(",")}:void 0});try{let a=Array.isArray(e)?e:[e],n=[];for(let e=0;e1&&q.default.success(`Successfully processed ${n.length} images`)}catch(e){if(console.error("Error making image edit request:",e),i?.aborted)console.log("Image edits request was cancelled");else{let t="Failed to edit image(s)";e?.error?.message?t=e.error.message:e?.message&&(t=e.message),q.default.fromBackend(`Image edit failed: ${t}`)}throw e}}async function et(e,t,s,r,a,n,i){console.log=function(){},console.log("isLocal:",!1);let o=i||(0,W.getProxyBaseUrl)(),l=new Z.default.OpenAI({apiKey:r,baseURL:o,dangerouslyAllowBrowser:!0,defaultHeaders:a&&a.length>0?{"x-litellm-tags":a.join(",")}:void 0});try{let r=await l.images.generate({model:s,prompt:e},{signal:n});if(console.log(r.data),r.data&&r.data[0])if(r.data[0].url)t(r.data[0].url,s);else if(r.data[0].b64_json){let e=r.data[0].b64_json;t(`data:image/png;base64,${e}`,s)}else throw Error("No image data found in response");else throw Error("Invalid response format")}catch(e){throw n?.aborted?console.log("Image generation request was cancelled"):q.default.fromBackend(`Error occurred while generating image. Please try again. Error: ${e}`),e}}var es=e.i(452598),er=e.i(536916),ea=e.i(28651),en=e.i(850627);let ei=({temperature:e=1,maxTokens:s=2048,useAdvancedParams:r,onTemperatureChange:a,onMaxTokensChange:n,onUseAdvancedParamsChange:i,mockTestFallbacks:o,onMockTestFallbacksChange:c})=>{let[d,u]=(0,R.useState)(!1),h=void 0!==r?r:d,[m,p]=(0,R.useState)(e),[f,g]=(0,R.useState)(s);(0,R.useEffect)(()=>{p(e)},[e]),(0,R.useEffect)(()=>{g(s)},[s]);let y=e=>{let t=e??1;p(t),a?.(t)},x=e=>{let t=e??1e3;g(t),n?.(t)},b=h?"text-gray-700":"text-gray-400";return(0,t.jsxs)("div",{className:"space-y-4 p-4 w-80",children:[(0,t.jsx)(er.Checkbox,{checked:h,onChange:e=>{var t;return t=e.target.checked,void(i?i(t):u(t))},children:(0,t.jsx)("span",{className:"font-medium",children:"Use Advanced Parameters"})}),c&&(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(er.Checkbox,{checked:o??!1,onChange:e=>c(e.target.checked),children:(0,t.jsx)("span",{className:"font-medium",children:"Simulate failure to test fallbacks"})}),(0,t.jsx)(E.Popover,{trigger:"hover",placement:"right",content:(0,t.jsxs)("div",{style:{maxWidth:340},children:[(0,t.jsx)(P.Typography.Paragraph,{className:"text-sm",style:{marginBottom:8},children:"Causes the first request to fail so the router tries fallbacks (if configured). Use this to verify your fallback setup."}),(0,t.jsxs)(P.Typography.Paragraph,{className:"text-sm",style:{marginBottom:0},children:["Behavior can differ when keys, teams, or router settings are configured."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/keys_teams_router_settings",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800",children:"Learn more"})]})]}),children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-xs text-gray-400 cursor-pointer shrink-0 hover:text-gray-600","aria-label":"Help: Simulate failure to test fallbacks"})})]}),(0,t.jsxs)("div",{className:"space-y-4 transition-opacity duration-200",style:{opacity:h?1:.4},children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.Text,{className:`text-sm ${b}`,children:"Temperature"}),(0,t.jsx)(A.Tooltip,{title:"Controls randomness. Lower values make output more deterministic, higher values more creative.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:`text-xs ${b} cursor-help`})})]}),(0,t.jsx)(ea.InputNumber,{min:0,max:2,step:.1,value:m,onChange:y,disabled:!h,precision:1,className:"w-20"})]}),(0,t.jsx)(en.Slider,{min:0,max:2,step:.1,value:m,onChange:y,disabled:!h,marks:{0:"0",1:"1.0",2:"2.0"}})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.Text,{className:`text-sm ${b}`,children:"Max Tokens"}),(0,t.jsx)(A.Tooltip,{title:"Maximum number of tokens to generate in the response.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:`text-xs ${b} cursor-help`})})]}),(0,t.jsx)(ea.InputNumber,{min:1,max:32768,step:1,value:f,onChange:x,disabled:!h})]}),(0,t.jsx)(en.Slider,{min:1,max:32768,step:1,value:f,onChange:x,disabled:!h,marks:{1:"1",32768:"32768"}})]})]})]})};var eo=e.i(785913);let el={ALLOY:"Alloy - Professional and confident",ASH:"Ash - Casual and relaxed",BALAD:"Ballad - Smooth and melodic",CORAL:"Coral - Warm and engaging",ECHO:"Echo - Friendly and conversational",FABLE:"Fable - Wise and measured",NOVA:"Nova - Friendly and conversational",ONYX:"Onyx - Deep and authoritative",SAGE:"Sage - Wise and measured",SHIMMER:"Shimmer - Bright and cheerful"},ec=Object.entries({ALLOY:"alloy",ASH:"ash",BALAD:"ballad",CORAL:"coral",ECHO:"echo",FABLE:"fable",NOVA:"nova",ONYX:"onyx",SAGE:"sage",SHIMMER:"shimmer"}).map(([e,t])=>({value:t,label:el[e]})),ed=[{value:eo.EndpointType.CHAT,label:"/v1/chat/completions"},{value:eo.EndpointType.RESPONSES,label:"/v1/responses"},{value:eo.EndpointType.ANTHROPIC_MESSAGES,label:"/v1/messages"},{value:eo.EndpointType.IMAGE,label:"/v1/images/generations"},{value:eo.EndpointType.IMAGE_EDITS,label:"/v1/images/edits"},{value:eo.EndpointType.EMBEDDINGS,label:"/v1/embeddings"},{value:eo.EndpointType.SPEECH,label:"/v1/audio/speech"},{value:eo.EndpointType.TRANSCRIPTION,label:"/v1/audio/transcriptions"},{value:eo.EndpointType.A2A_AGENTS,label:"/v1/a2a/message/send"},{value:eo.EndpointType.MCP,label:"/mcp-rest/tools/call"},{value:eo.EndpointType.REALTIME,label:"/v1/realtime"}];var eu=e.i(955719),eu=eu;let{Dragger:eh}=O.Upload,em=({chatUploadedImage:e,chatImagePreviewUrl:s,onImageUpload:r,onRemoveImage:a})=>(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(eh,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,t.jsx)(A.Tooltip,{title:"Attach image or PDF",children:(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,t.jsx)(eu.default,{style:{fontSize:"16px"}})})})})});e.s(["default",0,em],761793);let ep=async(e,t)=>({role:"user",content:[{type:"text",text:e},{type:"image_url",image_url:{url:await new Promise((e,s)=>{let r=new FileReader;r.onload=()=>{e(r.result)},r.onerror=s,r.readAsDataURL(t)})}}]}),ef=(e,t,s,r)=>{let a="";t&&r&&(a=r.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let n={role:"user",content:t?`${e} ${a}`:e};return t&&s&&(n.imagePreviewUrl=s),n},eg=e=>"user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&!!e.imagePreviewUrl;e.s(["createChatDisplayMessage",0,ef,"createChatMultimodalMessage",0,ep,"shouldShowChatAttachedImage",0,eg],964421);var ey=e.i(790848),ex=e.i(888259),eb=e.i(270377);let ev=({enabled:e,onEnabledChange:s,selectedModel:r,disabled:a=!1})=>{let i=(e=>{if(!e)return!1;let t=e.toLowerCase();return t.startsWith("openai/")||t.startsWith("gpt-")||t.startsWith("o1")||t.startsWith("o3")||t.includes("openai")})(r);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-3 bg-gradient-to-r from-blue-50 to-purple-50",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)(n.CodeOutlined,{className:"text-blue-500"}),(0,t.jsx)(v.Text,{className:"font-medium text-gray-700",children:"Code Interpreter"}),(0,t.jsx)(A.Tooltip,{title:"Run Python code to generate files, charts, and analyze data. Container is created automatically.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400 text-xs"})})]}),(0,t.jsx)(ey.Switch,{checked:e&&i,onChange:e=>{e&&!i?ex.default.warning("Code Interpreter is only available for OpenAI models"):s(e)},disabled:a||!i,size:"small",className:e&&i?"bg-blue-500":""})]}),!i&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(eb.ExclamationCircleOutlined,{className:"text-amber-500 mt-0.5"}),(0,t.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,t.jsx)("span",{children:"Code Interpreter is currently only supported for OpenAI models. "}),(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new?template=feature_request.yml",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Request support for other providers"})]})]})})]})};var ew=e.i(190272);let ej=({endpointType:e,onEndpointChange:s,className:r})=>(0,t.jsx)("div",{className:r,children:(0,t.jsx)(C.Select,{showSearch:!0,value:e,style:{width:"100%"},onChange:s,options:ed,className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())||(t?.value??"").toLowerCase().includes(e.toLowerCase())})});var eS=e.i(931067);let e_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-pdf",theme:"outlined"};var eN=e.i(9583),ek=R.forwardRef(function(e,t){return R.createElement(eN.default,(0,eS.default)({},e,{ref:t,icon:e_}))});e.s(["FilePdfOutlined",0,ek],91500);let eE=function({file:e,previewUrl:s,onRemove:r}){let a=e.name.toLowerCase().endsWith(".pdf");return(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsx)("div",{className:"relative inline-block",children:a?(0,t.jsx)("div",{className:"w-10 h-10 rounded-md bg-red-500 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"16px",color:"white"}})}):(0,t.jsx)("img",{src:s||"",alt:"Upload preview",className:"w-10 h-10 rounded-md border border-gray-200 object-cover"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:a?"PDF":"Image"})]}),(0,t.jsx)("button",{className:"flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-600 hover:bg-gray-200 rounded-full transition-colors",onClick:r,children:(0,t.jsx)(o.DeleteOutlined,{style:{fontSize:"12px"}})})]})})};var eC=e.i(771674),eT=e.i(918789),eA=e.i(245704),eP=e.i(637235),eO=e.i(166406),eR=e.i(755151),eI=e.i(240647),eM=e.i(993914);let eL=(e,t=8)=>e?e.length>t?`${e.substring(0,t)}…`:e:null,e$=e=>{navigator.clipboard.writeText(e)},eU=({a2aMetadata:e,timeToFirstToken:s,totalLatency:r})=>{let[a,n]=(0,R.useState)(!1);if(!e&&!s&&!r)return null;let{taskId:i,contextId:o,status:l,metadata:c}=e||{},h=(e=>{if(!e)return null;try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return e}})(l?.timestamp);return(0,t.jsxs)("div",{className:"a2a-metrics mt-3 pt-2 border-t border-gray-200 text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-gray-600",children:[(0,t.jsx)(m.RobotOutlined,{className:"mr-1.5 text-blue-500"}),(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"A2A Metadata"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-gray-500 ml-4",children:[l?.state&&(0,t.jsxs)("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${(e=>{switch(e){case"completed":return"bg-green-100 text-green-700";case"working":case"submitted":return"bg-blue-100 text-blue-700";case"failed":case"canceled":return"bg-red-100 text-red-700";default:return"bg-gray-100 text-gray-700"}})(l.state)}`,children:[(e=>{switch(e){case"completed":return(0,t.jsx)(eA.CheckCircleOutlined,{className:"text-green-500"});case"working":case"submitted":return(0,t.jsx)(u.LoadingOutlined,{className:"text-blue-500"});case"failed":case"canceled":return(0,t.jsx)(eb.ExclamationCircleOutlined,{className:"text-red-500"});default:return(0,t.jsx)(eP.ClockCircleOutlined,{className:"text-gray-500"})}})(l.state),(0,t.jsx)("span",{className:"ml-1 capitalize",children:l.state})]}),h&&(0,t.jsx)(A.Tooltip,{title:l?.timestamp,children:(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)(eP.ClockCircleOutlined,{className:"mr-1"}),h]})}),void 0!==r&&(0,t.jsx)(A.Tooltip,{title:"Total latency",children:(0,t.jsxs)("span",{className:"flex items-center text-blue-600",children:[(0,t.jsx)(eP.ClockCircleOutlined,{className:"mr-1"}),(r/1e3).toFixed(2),"s"]})}),void 0!==s&&(0,t.jsx)(A.Tooltip,{title:"Time to first token",children:(0,t.jsxs)("span",{className:"flex items-center text-green-600",children:["TTFT: ",(s/1e3).toFixed(2),"s"]})})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-gray-500 ml-4 mt-1.5",children:[i&&(0,t.jsx)(A.Tooltip,{title:`Click to copy: ${i}`,children:(0,t.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>e$(i),children:[(0,t.jsx)(eM.FileTextOutlined,{className:"mr-1"}),"Task: ",eL(i),(0,t.jsx)(eO.CopyOutlined,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),o&&(0,t.jsx)(A.Tooltip,{title:`Click to copy: ${o}`,children:(0,t.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>e$(o),children:[(0,t.jsx)(d.LinkOutlined,{className:"mr-1"}),"Session: ",eL(o),(0,t.jsx)(eO.CopyOutlined,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),(c||l?.message)&&(0,t.jsxs)(_.Button,{type:"text",size:"small",className:"text-xs text-blue-500 hover:text-blue-700 p-0 h-auto",onClick:()=>n(!a),children:[a?(0,t.jsx)(eR.DownOutlined,{}):(0,t.jsx)(eI.RightOutlined,{}),(0,t.jsx)("span",{className:"ml-1",children:"Details"})]})]}),a&&(0,t.jsxs)("div",{className:"mt-2 ml-4 p-3 bg-gray-50 rounded-md text-gray-600 border border-gray-200",children:[l?.message&&(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"Status Message:"}),(0,t.jsx)("span",{className:"ml-2",children:l.message})]}),i&&(0,t.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Task ID:"}),(0,t.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:i}),(0,t.jsx)(eO.CopyOutlined,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>e$(i)})]}),o&&(0,t.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Session ID:"}),(0,t.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:o}),(0,t.jsx)(eO.CopyOutlined,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>e$(o)})]}),c&&Object.keys(c).length>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"Custom Metadata:"}),(0,t.jsx)("pre",{className:"mt-1.5 p-2 bg-white border border-gray-200 rounded text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:JSON.stringify(c,null,2)})]})]})]})},eD=({message:e})=>e.isAudio&&"string"==typeof e.content?(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)("audio",{controls:!0,src:e.content,className:"max-w-full",style:{maxWidth:"500px"},children:"Your browser does not support the audio element."})}):null;var eB=e.i(657688);let eq=({message:e})=>{if(!eg(e))return null;let s="string"==typeof e.content&&e.content.includes("[PDF attached]");return(0,t.jsx)("div",{className:"mb-2",children:s?(0,t.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,t.jsx)(eB.default,{src:e.imagePreviewUrl||"",alt:"User uploaded image",width:256,height:200,className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px",width:"auto",height:"auto"}})})};e.s(["default",0,eq],843153);var eW=e.i(362024),ez=e.i(737434);let eH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"};var eF=R.forwardRef(function(e,t){return R.createElement(eN.default,(0,eS.default)({},e,{ref:t,icon:eH}))});let eJ=({code:e,containerId:s,annotations:r=[],accessToken:a})=>{let[i,o]=(0,R.useState)({}),[l,c]=(0,R.useState)({}),d=(0,W.getProxyBaseUrl)();(0,R.useEffect)(()=>{let e=async()=>{for(let e of r)if((e.filename?.toLowerCase().endsWith(".png")||e.filename?.toLowerCase().endsWith(".jpg")||e.filename?.toLowerCase().endsWith(".jpeg")||e.filename?.toLowerCase().endsWith(".gif"))&&e.container_id&&e.file_id){c(t=>({...t,[e.file_id]:!0}));try{let t=await fetch(`${d}/v1/containers/${e.container_id}/files/${e.file_id}/content`,{headers:{[(0,W.getGlobalLitellmHeaderName)()]:`Bearer ${a}`}});if(t.ok){let s=await t.blob(),r=URL.createObjectURL(s);o(t=>({...t,[e.file_id]:r}))}}catch(e){console.error("Error fetching image:",e)}finally{c(t=>({...t,[e.file_id]:!1}))}}};return r.length>0&&a&&e(),()=>{Object.values(i).forEach(e=>URL.revokeObjectURL(e))}},[r,a,d]);let h=async e=>{try{let t=await fetch(`${d}/v1/containers/${e.container_id}/files/${e.file_id}/content`,{headers:{[(0,W.getGlobalLitellmHeaderName)()]:`Bearer ${a}`}});if(t.ok){let s=await t.blob(),r=URL.createObjectURL(s),a=document.createElement("a");a.href=r,a.download=e.filename||`file_${e.file_id}`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}}catch(e){console.error("Error downloading file:",e)}},m=r.filter(e=>e.filename?.toLowerCase().endsWith(".png")||e.filename?.toLowerCase().endsWith(".jpg")||e.filename?.toLowerCase().endsWith(".jpeg")||e.filename?.toLowerCase().endsWith(".gif")),p=r.filter(e=>!e.filename?.toLowerCase().endsWith(".png")&&!e.filename?.toLowerCase().endsWith(".jpg")&&!e.filename?.toLowerCase().endsWith(".jpeg")&&!e.filename?.toLowerCase().endsWith(".gif"));return e||0!==r.length?(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[e&&(0,t.jsx)(eW.Collapse,{size:"small",items:[{key:"code",label:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm text-gray-600",children:[(0,t.jsx)(n.CodeOutlined,{})," Python Code Executed"]}),children:(0,t.jsx)(I.Prism,{language:"python",style:M.coy,customStyle:{margin:0,borderRadius:"6px",fontSize:"12px",maxHeight:"300px",overflow:"auto"},children:e})}]}),m.map(e=>(0,t.jsx)("div",{className:"rounded-lg border border-gray-200 overflow-hidden",children:l[e.file_id]?(0,t.jsxs)("div",{className:"flex items-center justify-center p-8 bg-gray-50",children:[(0,t.jsx)(T.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0})}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:"Loading image..."})]}):i[e.file_id]?(0,t.jsxs)("div",{children:[(0,t.jsx)("img",{src:i[e.file_id],alt:e.filename||"Generated chart",className:"max-w-full",style:{maxHeight:"400px"}}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-50 border-t border-gray-200",children:[(0,t.jsxs)("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[(0,t.jsx)(eF,{})," ",e.filename]}),(0,t.jsxs)("button",{onClick:()=>h(e),className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1",children:[(0,t.jsx)(ez.DownloadOutlined,{})," Download"]})]})]}):(0,t.jsx)("div",{className:"flex items-center justify-center p-4 bg-gray-50",children:(0,t.jsx)("span",{className:"text-sm text-gray-400",children:"Image not available"})})},e.file_id)),p.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:p.map(e=>(0,t.jsxs)("button",{onClick:()=>h(e),className:"flex items-center gap-2 px-3 py-2 bg-gray-50 border border-gray-200 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,t.jsx)(eM.FileTextOutlined,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"text-sm",children:e.filename}),(0,t.jsx)(ez.DownloadOutlined,{className:"text-gray-400"})]},e.file_id))})]}):null};var eG=e.i(355343),eV=e.i(966988),eK=e.i(989022);let eX=async(e,t)=>{let s=await new Promise((e,s)=>{let r=new FileReader;r.onload=()=>{e(r.result.split(",")[1])},r.onerror=s,r.readAsDataURL(t)}),r=t.type||(t.name.toLowerCase().endsWith(".pdf")?"application/pdf":"image/jpeg");return{role:"user",content:[{type:"input_text",text:e},{type:"input_image",image_url:`data:${r};base64,${s}`}]}},eY=(e,t,s,r)=>{let a="";t&&r&&(a=r.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let n={role:"user",content:t?`${e} ${a}`:e};return t&&s&&(n.imagePreviewUrl=s),n},eQ=({message:e})=>{if(!("user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&e.imagePreviewUrl))return null;let s="string"==typeof e.content&&e.content.includes("[PDF attached]");return(0,t.jsx)("div",{className:"mb-2",children:s?(0,t.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,t.jsx)("img",{src:e.imagePreviewUrl,alt:"User uploaded image",className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px"}})})};function eZ({searchResults:e}){let[s,r]=(0,R.useState)(!0),[a,n]=(0,R.useState)({});if(!e||0===e.length)return null;let o=e.reduce((e,t)=>e+t.data.length,0);return(0,t.jsxs)("div",{className:"search-results-content mt-1 mb-2",children:[(0,t.jsxs)(_.Button,{type:"text",className:"flex items-center text-xs text-gray-500 hover:text-gray-700",onClick:()=>r(!s),icon:(0,t.jsx)(i.DatabaseOutlined,{}),children:[s?"Hide sources":`Show sources (${o})`,s?(0,t.jsx)(eR.DownOutlined,{className:"ml-1"}):(0,t.jsx)(eI.RightOutlined,{className:"ml-1"})]}),s&&(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md text-sm",children:(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-xs text-gray-600 mb-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:"Query:"}),(0,t.jsxs)("span",{className:"italic",children:['"',e.search_query,'"']}),(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("span",{className:"text-gray-500",children:[e.data.length," result",1!==e.data.length?"s":""]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-md overflow-hidden bg-white",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-2 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>{let e;return e=`${s}-${r}`,void n(t=>({...t,[e]:!t[e]}))},children:(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform flex-shrink-0 ${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.jsx)(eM.FileTextOutlined,{className:"text-gray-400 flex-shrink-0",style:{fontSize:"12px"}}),(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 truncate",children:e.filename||e.file_id||`Result ${r+1}`}),(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-blue-100 text-blue-700 font-mono flex-shrink-0",children:e.score.toFixed(3)})]})}),i&&(0,t.jsx)("div",{className:"border-t border-gray-200 bg-white",children:(0,t.jsxs)("div",{className:"p-3 space-y-2",children:[e.content.map((e,s)=>(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"text-xs font-mono bg-gray-50 p-2 rounded text-gray-800 whitespace-pre-wrap break-words",children:e.text})},s)),e.attributes&&Object.keys(e.attributes).length>0&&(0,t.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-100",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1 font-medium",children:"Metadata:"}),(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(e.attributes).map(([e,s])=>(0,t.jsxs)("div",{className:"text-xs flex gap-2",children:[(0,t.jsxs)("span",{className:"text-gray-500 font-medium",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-700 font-mono break-all",children:String(s)})]},e))})]})]})})]},r)})})]},s))})})]})}e.s(["SearchResultsDisplay",()=>eZ],152401);let e0=function({message:e,isLastMessage:s,endpointType:r,mcpEvents:a,codeInterpreterResult:n,accessToken:i}){let o="user"===e.role;return(0,t.jsx)("div",{className:`mb-4 ${o?"text-right":"text-left"}`,children:(0,t.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:o?"#f0f8ff":"#ffffff",border:o?"1px solid #e6f0fa":"1px solid #f0f0f0",textAlign:"left"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:o?"#e6f0fa":"#f5f5f5"},children:o?(0,t.jsx)(eC.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(m.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),e.reasoningContent&&(0,t.jsx)(eV.default,{reasoningContent:e.reasoningContent}),"assistant"===e.role&&s&&a.length>0&&(r===eo.EndpointType.RESPONSES||r===eo.EndpointType.CHAT)&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(eG.default,{events:a})}),"assistant"===e.role&&e.searchResults&&(0,t.jsx)(eZ,{searchResults:e.searchResults}),"assistant"===e.role&&s&&n&&r===eo.EndpointType.RESPONSES&&(0,t.jsx)(eJ,{code:n.code,containerId:n.containerId,annotations:n.annotations,accessToken:i}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:[e.isImage?(0,t.jsx)("img",{src:"string"==typeof e.content?e.content:"",alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}}):e.isAudio?(0,t.jsx)(eD,{message:e}):(0,t.jsxs)(t.Fragment,{children:[r===eo.EndpointType.RESPONSES&&(0,t.jsx)(eQ,{message:e}),r===eo.EndpointType.CHAT&&(0,t.jsx)(eq,{message:e}),(0,t.jsx)(eT.default,{components:{code({node:e,inline:s,className:r,children:a,...n}){let i=/language-(\w+)/.exec(r||"");return!s&&i?(0,t.jsx)(I.Prism,{style:M.coy,language:i[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...n,children:String(a).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${r} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...n,children:a})},pre:({node:e,...s})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})},children:"string"==typeof e.content?e.content:""}),e.image&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("img",{src:e.image.url,alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}})})]}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&!e.a2aMetadata&&(0,t.jsx)(eK.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage,toolName:e.toolName}),"assistant"===e.role&&e.a2aMetadata&&(0,t.jsx)(eU,{a2aMetadata:e.a2aMetadata,timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency})]})]})})};var eu=eu;let{Dragger:e1}=O.Upload,e2=({responsesUploadedImage:e,responsesImagePreviewUrl:s,onImageUpload:r,onRemoveImage:a})=>(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(e1,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,t.jsx)(A.Tooltip,{title:"Attach image or PDF",children:(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,t.jsx)(eu.default,{style:{fontSize:"16px"}})})})})}),e4=({endpointType:e,responsesSessionId:s,useApiSessionManagement:r,onToggleSessionManagement:a})=>e!==eo.EndpointType.RESPONSES?null:(0,t.jsxs)("div",{className:"mb-4",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)("span",{className:"text-sm font-medium text-gray-700",children:"Session Management"}),(0,t.jsx)(A.Tooltip,{title:"Choose between LiteLLM API session management (using previous_response_id) or UI-based session management (using chat history)",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400",style:{fontSize:"12px"}})})]}),(0,t.jsx)(ey.Switch,{checked:r,onChange:a,checkedChildren:"API",unCheckedChildren:"UI",size:"small"})]}),(0,t.jsxs)("div",{className:`text-xs p-2 rounded-md ${s?"bg-green-50 text-green-700 border border-green-200":"bg-blue-50 text-blue-700 border border-blue-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(l.InfoCircleOutlined,{style:{fontSize:"12px"}}),(()=>{if(!s)return r?"API Session: Ready":"UI Session: Ready";let e=r?"Response ID":"UI Session",t=s.slice(0,10);return`${e}: ${t}...`})()]}),s&&(0,t.jsx)(A.Tooltip,{title:(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"mb-1",children:"Copy response ID to continue session:"}),(0,t.jsx)("div",{className:"bg-gray-800 text-gray-100 p-2 rounded font-mono text-xs whitespace-pre-wrap",children:`curl -X POST "your-proxy-url/v1/responses" \\ -H "Authorization: Bearer your-api-key" \\ -H "Content-Type: application/json" \\ -d '{ diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/f27456ba72075ad9.js b/litellm/proxy/_experimental/out/_next/static/chunks/0dbc6df9aa2513ad.js similarity index 81% rename from litellm/proxy/_experimental/out/_next/static/chunks/f27456ba72075ad9.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0dbc6df9aa2513ad.js index 898d67998e..36fc247cdc 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/f27456ba72075ad9.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0dbc6df9aa2513ad.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),a=e.i(114272),s=e.i(540143),r=e.i(915823),l=e.i(619273),i=class extends r.Subscribable{#e;#t=void 0;#a;#s;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.#a,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#r(),this.#l()}mutate(e,t){return this.#s=t,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(e)}#r(){let e=this.#a?.state??(0,a.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){s.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,a,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,a,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,a){let r=(0,n.useQueryClient)(a),[o]=t.useState(()=>new i(r,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let d=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(s.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=t.useCallback((e,t)=>{o.mutate(e,t).catch(l.noop)},[o]);if(d.error&&(0,l.shouldThrowError)(o.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>o],954616)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},530212,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:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,a],530212)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let a=e.i(264042).Row;e.s(["Row",0,a],621192)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),s=e.i(529681),r=e.i(908286),l=e.i(242064),i=e.i(246422),n=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"],c=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let s,r,l;return(0,a.default)(Object.assign(Object.assign(Object.assign({},(s=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${s}`]:s&&o.includes(s)})),(r={},c.forEach(a=>{r[`${e}-align-${a}`]=t.align===a}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r)),(l={},d.forEach(a=>{l[`${e}-justify-${a}`]=t.justify===a}),l)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:a,paddingLG:s}=e,r=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:a,flexGapLG:s});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(r),(e=>{let{componentCls:t}=e,a={};return o.forEach(e=>{a[`${t}-wrap-${e}`]={flexWrap:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return c.forEach(e=>{a[`${t}-align-${e}`]={alignItems:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return d.forEach(e=>{a[`${t}-justify-${e}`]={justifyContent:e}}),a})(r)]},()=>({}),{resetStyle:!1});var p=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let h=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:d,style:c,flex:h,gap:g,vertical:x=!1,component:f="div",children:y}=e,b=p(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:j,getPrefixCls:_}=t.default.useContext(l.ConfigContext),w=_("flex",n),[k,N,S]=m(w),C=null!=x?x:null==v?void 0:v.vertical,T=(0,a.default)(d,o,null==v?void 0:v.className,w,N,S,u(w,e),{[`${w}-rtl`]:"rtl"===j,[`${w}-gap-${g}`]:(0,r.isPresetSize)(g),[`${w}-vertical`]:C}),$=Object.assign(Object.assign({},null==v?void 0:v.style),c);return h&&($.flex=h),g&&!(0,r.isPresetSize)(g)&&($.gap=g),k(t.default.createElement(f,Object.assign({ref:i,className:T,style:$},(0,s.default)(b,["justify","wrap","align"])),y))});e.s(["Flex",0,h],525720)},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)},771674,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["UserOutlined",0,l],771674)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),a=e.i(271645);let s={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=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ArrowLeftOutlined",0,l],447566)},948401,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["MailOutlined",0,l],948401)},384767,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(271645),r=e.i(389083);let l=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(764205);let n=function({vectorStores:e,accessToken:n}){let[o,d]=(0,s.useState)([]);return(0,s.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)(r.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 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},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"})]})]})},o=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:"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 d=e.i(871943),c=e.i(502547),u=e.i(592968);let m=function({mcpServers:e,mcpAccessGroups:l=[],mcpToolPermissions:n={},mcpToolsets:m=[],accessToken:p}){let[h,g]=(0,s.useState)([]),[x,f]=(0,s.useState)([]),[y,b]=(0,s.useState)(new Set),[v,j]=(0,s.useState)(new Set);(0,s.useEffect)(()=>{(async()=>{if(p&&e.length>0)try{let e=await (0,i.fetchMCPServers)(p);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[p,e.length]),(0,s.useEffect)(()=>{(async()=>{if(p&&m.length>0)try{let e=await (0,i.fetchMCPToolsets)(p),t=Array.isArray(e)?e.filter(e=>m.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[p,m.length]);let _=[...e.map(e=>({type:"server",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],w=_.length+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)(o,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(r.Badge,{color:"blue",size:"xs",children:w})]}),w>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[_.map((e,a)=>{let s="server"===e.type?n[e.value]:void 0,r=s&&s.length>0,l=y.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return r&&(t=e.value,void b(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 ${r?"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)(u.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=h.find(t=>t.server_id===e);if(t){let a=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),r&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),l?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),r&&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:s.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)}),m.length>0&&m.map((e,a)=>{let s=x.find(t=>t.toolset_id===e),r=v.has(e),l=s?.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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),l>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),r?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l>0&&r&&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,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)(o,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No MCP servers, access groups, or toolsets configured"})]})]})},p=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"}))}),h=function({agents:e,agentAccessGroups:l=[],accessToken:n}){let[o,d]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,i.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],m=c.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)(p,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(r.Badge,{color:"purple",size:"xs",children:m})]}),m>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.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)(u.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 flex-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 flex-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 uppercase tracking-wide flex-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)(p,{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:s="card",className:r="",accessToken:l}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},u=e?.mcp_toolsets||[],p=e?.agents||[],g=e?.agent_access_groups||[],x=(0,t.jsxs)("div",{className:"card"===s?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:i,accessToken:l}),(0,t.jsx)(m,{mcpServers:o,mcpAccessGroups:d,mcpToolPermissions:c,mcpToolsets:u,accessToken:l}),(0,t.jsx)(h,{agents:p,agentAccessGroups:g,accessToken:l})]});return"card"===s?(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)(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"})]})}),x]}):(0,t.jsxs)("div",{className:`${r}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)},891547,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);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,r.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",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)(s.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:l,loading:u,className:i,allowClear:!0,options:d.map(e=>(console.log("Mapping guardrail:",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),s=e.i(199133),r=e.i(764205);function l(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let a=e.version_number??1,s=e.version_status??"draft";return{label:`${e.policy_name} — v${a} (${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:n,accessToken:o,disabled:d,onPoliciesLoaded:c})=>{let[u,m]=(0,a.useState)([]),[p,h]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,r.getPoliciesList)(o);e.policies&&(m(e.policies),c?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{h(!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:p,className:n,allowClear:!0,options:l(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>l])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ClockCircleOutlined",0,l],637235)},916940,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,placeholder:o="Select vector stores",disabled:d=!1})=>{let[c,u]=(0,a.useState)([]),[m,p]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,r.vectorStoreListCall)(n);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",placeholder:o,onChange:e,value:l,loading:m,className:i,allowClear:!0,options:c.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:d})})}])},689020,e=>{"use strict";var t=e.i(764205);let a=async e=>{try{let a=await (0,t.modelHubCall)(e);if(console.log("model_info:",a),a?.data.length>0){let e=a.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,a])},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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 r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["RobotOutlined",0,l],983561)},244451,e=>{"use strict";let t;e.i(247167);var a=e.i(271645),s=e.i(343794),r=e.i(242064),l=e.i(763731),i=e.i(174428);let n=80*Math.PI,o=e=>{let{dotClassName:t,style:r,hasCircleCls:l}=e;return a.createElement("circle",{className:(0,s.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]=a.useState(!1);(0,i.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let p={strokeDashoffset:`${n/4}`,strokeDasharray:`${n*m/100} ${n*(100-m)/100}`};return a.createElement("span",{className:(0,s.default)(l,`${r}-progress`,m<=0&&d)},a.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},a.createElement(o,{dotClassName:r,hasCircleCls:!0}),a.createElement(o,{dotClassName:r,style:p})))};function c(e){let{prefixCls:t,percent:r=0}=e,l=`${t}-dot`,i=`${l}-holder`,n=`${i}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:(0,s.default)(i,r>0&&n)},a.createElement("span",{className:(0,s.default)(l,`${t}-dot-spin`)},[1,2,3,4].map(e=>a.createElement("i",{className:`${t}-dot-item`,key:e})))),a.createElement(d,{prefixCls:t,percent:r}))}function u(e){var t;let{prefixCls:r,indicator:i,percent:n}=e,o=`${r}-dot`;return i&&a.isValidElement(i)?(0,l.cloneElement)(i,{className:(0,s.default)(null==(t=i.props)?void 0:t.className,o),percent:n}):a.createElement(c,{prefixCls:r,percent:n})}e.i(296059);var m=e.i(694758),p=e.i(183293),h=e.i(246422),g=e.i(838378);let x=new m.Keyframes("antSpinMove",{to:{opacity:1}}),f=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),y=(0,h.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:a}=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:a(a(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:a(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:a(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:a(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:a(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(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:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),height:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:x,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:f,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:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal(),height:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,g.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:a}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:a}}),b=[[30,.05],[70,.03],[96,.01]];var v=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let j=e=>{var l;let{prefixCls:i,spinning:n=!0,delay:o=0,className:d,rootClassName:c,size:m="default",tip:p,wrapperClassName:h,style:g,children:x,fullscreen:f=!1,indicator:j,percent:_}=e,w=v(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:k,direction:N,className:S,style:C,indicator:T}=(0,r.useComponentConfig)("spin"),$=k("spin",i),[I,O,E]=y($),[M,A]=a.useState(()=>n&&(!n||!o||!!Number.isNaN(Number(o)))),F=function(e,t){let[s,r]=a.useState(0),l=a.useRef(null),i="auto"===t;return a.useEffect(()=>(i&&e&&(r(0),l.current=setInterval(()=>{r(e=>{let t=100-e;for(let a=0;a{l.current&&(clearInterval(l.current),l.current=null)}),[i,e]),i?s:t}(M,_);a.useEffect(()=>{if(n){let e=function(e,t,a){var s,r=a||{},l=r.noTrailing,i=void 0!==l&&l,n=r.noLeading,o=void 0!==n&&n,d=r.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function p(){s&&clearTimeout(s)}function h(){for(var a=arguments.length,r=Array(a),l=0;le?o?(m=Date.now(),i||(s=setTimeout(c?g:h,e))):h():!0!==i&&(s=setTimeout(c?g:h,void 0===c?e-d:e)))}return h.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},h}(o,()=>{A(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}A(!1)},[o,n]);let z=a.useMemo(()=>void 0!==x&&!f,[x,f]),D=(0,s.default)($,S,{[`${$}-sm`]:"small"===m,[`${$}-lg`]:"large"===m,[`${$}-spinning`]:M,[`${$}-show-text`]:!!p,[`${$}-rtl`]:"rtl"===N},d,!f&&c,O,E),L=(0,s.default)(`${$}-container`,{[`${$}-blur`]:M}),R=null!=(l=null!=j?j:T)?l:t,P=Object.assign(Object.assign({},C),g),B=a.createElement("div",Object.assign({},w,{style:P,className:D,"aria-live":"polite","aria-busy":M}),a.createElement(u,{prefixCls:$,indicator:R,percent:F}),p&&(z||f)?a.createElement("div",{className:`${$}-text`},p):null);return I(z?a.createElement("div",Object.assign({},w,{className:(0,s.default)(`${$}-nested-loading`,h,O,E)}),M&&a.createElement("div",{key:"loading"},B),a.createElement("div",{className:L,key:"container"},x)):f?a.createElement("div",{className:(0,s.default)(`${$}-fullscreen`,{[`${$}-fullscreen-show`]:M},c,O,E)},B):B)};j.setDefaultIndicator=e=>{t=e},e.s(["default",0,j],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},91874,e=>{"use strict";var t=e.i(931067),a=e.i(209428),s=e.i(211577),r=e.i(392221),l=e.i(703923),i=e.i(343794),n=e.i(914949),o=e.i(271645),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],c=(0,o.forwardRef)(function(e,c){var u=e.prefixCls,m=void 0===u?"rc-checkbox":u,p=e.className,h=e.style,g=e.checked,x=e.disabled,f=e.defaultChecked,y=e.type,b=void 0===y?"checkbox":y,v=e.title,j=e.onChange,_=(0,l.default)(e,d),w=(0,o.useRef)(null),k=(0,o.useRef)(null),N=(0,n.default)(void 0!==f&&f,{value:g}),S=(0,r.default)(N,2),C=S[0],T=S[1];(0,o.useImperativeHandle)(c,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:k.current}});var $=(0,i.default)(m,p,(0,s.default)((0,s.default)({},"".concat(m,"-checked"),C),"".concat(m,"-disabled"),x));return o.createElement("span",{className:$,title:v,style:h,ref:k},o.createElement("input",(0,t.default)({},_,{className:"".concat(m,"-input"),ref:w,onChange:function(t){x||("checked"in e||T(t.target.checked),null==j||j({target:(0,a.default)((0,a.default)({},e),{},{type:b,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:x,checked:!!C,type:b})),o.createElement("span",{className:"".concat(m,"-inner")}))});e.s(["default",0,c])},681216,e=>{"use strict";var t=e.i(271645),a=e.i(963188);function s(e){let s=t.default.useRef(null),r=()=>{a.default.cancel(s.current),s.current=null};return[()=>{r(),s.current=(0,a.default)(()=>{s.current=null})},t=>{s.current&&(t.stopPropagation(),r()),null==e||e(t)}]}e.s(["default",()=>s])},421512,236836,e=>{"use strict";let t=e.i(271645).default.createContext(null);e.s(["default",0,t],421512),e.i(296059);var a=e.i(915654),s=e.i(183293),r=e.i(246422),l=e.i(838378);function i(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,s.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,s.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,s.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,s.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}})},{[` +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,954616,e=>{"use strict";var t=e.i(271645),a=e.i(114272),s=e.i(540143),r=e.i(915823),l=e.i(619273),i=class extends r.Subscribable{#e;#t=void 0;#a;#s;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.#a,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#r(),this.#l()}mutate(e,t){return this.#s=t,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(e)}#r(){let e=this.#a?.state??(0,a.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){s.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,a,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,a,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,a){let r=(0,n.useQueryClient)(a),[o]=t.useState(()=>new i(r,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let d=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(s.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=t.useCallback((e,t)=>{o.mutate(e,t).catch(l.noop)},[o]);if(d.error&&(0,l.shouldThrowError)(o.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>o],954616)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},530212,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:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,a],530212)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let a=e.i(264042).Row;e.s(["Row",0,a],621192)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),s=e.i(529681),r=e.i(908286),l=e.i(242064),i=e.i(246422),n=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"],c=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let s,r,l;return(0,a.default)(Object.assign(Object.assign(Object.assign({},(s=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${s}`]:s&&o.includes(s)})),(r={},c.forEach(a=>{r[`${e}-align-${a}`]=t.align===a}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r)),(l={},d.forEach(a=>{l[`${e}-justify-${a}`]=t.justify===a}),l)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:a,paddingLG:s}=e,r=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:a,flexGapLG:s});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(r),(e=>{let{componentCls:t}=e,a={};return o.forEach(e=>{a[`${t}-wrap-${e}`]={flexWrap:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return c.forEach(e=>{a[`${t}-align-${e}`]={alignItems:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return d.forEach(e=>{a[`${t}-justify-${e}`]={justifyContent:e}}),a})(r)]},()=>({}),{resetStyle:!1});var p=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let h=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:d,style:c,flex:h,gap:g,vertical:x=!1,component:f="div",children:y}=e,b=p(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:j,getPrefixCls:_}=t.default.useContext(l.ConfigContext),w=_("flex",n),[k,N,S]=m(w),C=null!=x?x:null==v?void 0:v.vertical,T=(0,a.default)(d,o,null==v?void 0:v.className,w,N,S,u(w,e),{[`${w}-rtl`]:"rtl"===j,[`${w}-gap-${g}`]:(0,r.isPresetSize)(g),[`${w}-vertical`]:C}),$=Object.assign(Object.assign({},null==v?void 0:v.style),c);return h&&($.flex=h),g&&!(0,r.isPresetSize)(g)&&($.gap=g),k(t.default.createElement(f,Object.assign({ref:i,className:T,style:$},(0,s.default)(b,["justify","wrap","align"])),y))});e.s(["Flex",0,h],525720)},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)},771674,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["UserOutlined",0,l],771674)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),a=e.i(271645);let s={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=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ArrowLeftOutlined",0,l],447566)},948401,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["MailOutlined",0,l],948401)},384767,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(271645),r=e.i(389083);let l=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(764205);let n=function({vectorStores:e,accessToken:n}){let[o,d]=(0,s.useState)([]);return(0,s.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)(r.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 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},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"})]})]})},o=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:"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 d=e.i(871943),c=e.i(502547),u=e.i(592968);let m=function({mcpServers:e,mcpAccessGroups:l=[],mcpToolPermissions:n={},mcpToolsets:m=[],accessToken:p}){let[h,g]=(0,s.useState)([]),[x,f]=(0,s.useState)([]),[y,b]=(0,s.useState)(new Set),[v,j]=(0,s.useState)(new Set);(0,s.useEffect)(()=>{(async()=>{if(p&&e.length>0)try{let e=await (0,i.fetchMCPServers)(p);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[p,e.length]),(0,s.useEffect)(()=>{(async()=>{if(p&&m.length>0)try{let e=await (0,i.fetchMCPToolsets)(p),t=Array.isArray(e)?e.filter(e=>m.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[p,m.length]);let _=[...e.map(e=>({type:"server",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],w=_.length+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)(o,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(r.Badge,{color:"blue",size:"xs",children:w})]}),w>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[_.map((e,a)=>{let s="server"===e.type?n[e.value]:void 0,r=s&&s.length>0,l=y.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return r&&(t=e.value,void b(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 ${r?"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)(u.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=h.find(t=>t.server_id===e);if(t){let a=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),r&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),l?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),r&&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:s.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)}),m.length>0&&m.map((e,a)=>{let s=x.find(t=>t.toolset_id===e),r=v.has(e),l=s?.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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),l>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),r?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l>0&&r&&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,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)(o,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No MCP servers, access groups, or toolsets configured"})]})]})},p=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"}))}),h=function({agents:e,agentAccessGroups:l=[],accessToken:n}){let[o,d]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,i.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],m=c.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)(p,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(r.Badge,{color:"purple",size:"xs",children:m})]}),m>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.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)(u.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 flex-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 flex-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 uppercase tracking-wide flex-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)(p,{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:s="card",className:r="",accessToken:l}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},u=e?.mcp_toolsets||[],p=e?.agents||[],g=e?.agent_access_groups||[],x=e?.search_tools||[],f=(0,t.jsxs)("div",{className:"card"===s?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:i,accessToken:l}),(0,t.jsx)(m,{mcpServers:o,mcpAccessGroups:d,mcpToolPermissions:c,mcpToolsets:u,accessToken:l}),(0,t.jsx)(h,{agents:p,agentAccessGroups:g,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===x.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:x.join(", ")})]})]});return"card"===s?(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)(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:`${r}`,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),s=e.i(199133),r=e.i(764205);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,r.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",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)(s.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:l,loading:u,className:i,allowClear:!0,options:d.map(e=>(console.log("Mapping guardrail:",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),s=e.i(199133),r=e.i(764205);function l(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let a=e.version_number??1,s=e.version_status??"draft";return{label:`${e.policy_name} — v${a} (${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:n,accessToken:o,disabled:d,onPoliciesLoaded:c})=>{let[u,m]=(0,a.useState)([]),[p,h]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,r.getPoliciesList)(o);e.policies&&(m(e.policies),c?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{h(!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:p,className:n,allowClear:!0,options:l(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>l])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ClockCircleOutlined",0,l],637235)},916940,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,placeholder:o="Select vector stores",disabled:d=!1})=>{let[c,u]=(0,a.useState)([]),[m,p]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,r.vectorStoreListCall)(n);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",placeholder:o,onChange:e,value:l,loading:m,className:i,allowClear:!0,options:c.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:d})})}])},689020,e=>{"use strict";var t=e.i(764205);let a=async e=>{try{let a=await (0,t.modelHubCall)(e);if(console.log("model_info:",a),a?.data.length>0){let e=a.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,a])},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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 r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["RobotOutlined",0,l],983561)},244451,e=>{"use strict";let t;e.i(247167);var a=e.i(271645),s=e.i(343794),r=e.i(242064),l=e.i(763731),i=e.i(174428);let n=80*Math.PI,o=e=>{let{dotClassName:t,style:r,hasCircleCls:l}=e;return a.createElement("circle",{className:(0,s.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]=a.useState(!1);(0,i.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let p={strokeDashoffset:`${n/4}`,strokeDasharray:`${n*m/100} ${n*(100-m)/100}`};return a.createElement("span",{className:(0,s.default)(l,`${r}-progress`,m<=0&&d)},a.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},a.createElement(o,{dotClassName:r,hasCircleCls:!0}),a.createElement(o,{dotClassName:r,style:p})))};function c(e){let{prefixCls:t,percent:r=0}=e,l=`${t}-dot`,i=`${l}-holder`,n=`${i}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:(0,s.default)(i,r>0&&n)},a.createElement("span",{className:(0,s.default)(l,`${t}-dot-spin`)},[1,2,3,4].map(e=>a.createElement("i",{className:`${t}-dot-item`,key:e})))),a.createElement(d,{prefixCls:t,percent:r}))}function u(e){var t;let{prefixCls:r,indicator:i,percent:n}=e,o=`${r}-dot`;return i&&a.isValidElement(i)?(0,l.cloneElement)(i,{className:(0,s.default)(null==(t=i.props)?void 0:t.className,o),percent:n}):a.createElement(c,{prefixCls:r,percent:n})}e.i(296059);var m=e.i(694758),p=e.i(183293),h=e.i(246422),g=e.i(838378);let x=new m.Keyframes("antSpinMove",{to:{opacity:1}}),f=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),y=(0,h.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:a}=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:a(a(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:a(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:a(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:a(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:a(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(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:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),height:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:x,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:f,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:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal(),height:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,g.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:a}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:a}}),b=[[30,.05],[70,.03],[96,.01]];var v=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let j=e=>{var l;let{prefixCls:i,spinning:n=!0,delay:o=0,className:d,rootClassName:c,size:m="default",tip:p,wrapperClassName:h,style:g,children:x,fullscreen:f=!1,indicator:j,percent:_}=e,w=v(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:k,direction:N,className:S,style:C,indicator:T}=(0,r.useComponentConfig)("spin"),$=k("spin",i),[I,O,E]=y($),[M,A]=a.useState(()=>n&&(!n||!o||!!Number.isNaN(Number(o)))),F=function(e,t){let[s,r]=a.useState(0),l=a.useRef(null),i="auto"===t;return a.useEffect(()=>(i&&e&&(r(0),l.current=setInterval(()=>{r(e=>{let t=100-e;for(let a=0;a{l.current&&(clearInterval(l.current),l.current=null)}),[i,e]),i?s:t}(M,_);a.useEffect(()=>{if(n){let e=function(e,t,a){var s,r=a||{},l=r.noTrailing,i=void 0!==l&&l,n=r.noLeading,o=void 0!==n&&n,d=r.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function p(){s&&clearTimeout(s)}function h(){for(var a=arguments.length,r=Array(a),l=0;le?o?(m=Date.now(),i||(s=setTimeout(c?g:h,e))):h():!0!==i&&(s=setTimeout(c?g:h,void 0===c?e-d:e)))}return h.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},h}(o,()=>{A(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}A(!1)},[o,n]);let z=a.useMemo(()=>void 0!==x&&!f,[x,f]),D=(0,s.default)($,S,{[`${$}-sm`]:"small"===m,[`${$}-lg`]:"large"===m,[`${$}-spinning`]:M,[`${$}-show-text`]:!!p,[`${$}-rtl`]:"rtl"===N},d,!f&&c,O,E),L=(0,s.default)(`${$}-container`,{[`${$}-blur`]:M}),R=null!=(l=null!=j?j:T)?l:t,P=Object.assign(Object.assign({},C),g),B=a.createElement("div",Object.assign({},w,{style:P,className:D,"aria-live":"polite","aria-busy":M}),a.createElement(u,{prefixCls:$,indicator:R,percent:F}),p&&(z||f)?a.createElement("div",{className:`${$}-text`},p):null);return I(z?a.createElement("div",Object.assign({},w,{className:(0,s.default)(`${$}-nested-loading`,h,O,E)}),M&&a.createElement("div",{key:"loading"},B),a.createElement("div",{className:L,key:"container"},x)):f?a.createElement("div",{className:(0,s.default)(`${$}-fullscreen`,{[`${$}-fullscreen-show`]:M},c,O,E)},B):B)};j.setDefaultIndicator=e=>{t=e},e.s(["default",0,j],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},91874,e=>{"use strict";var t=e.i(931067),a=e.i(209428),s=e.i(211577),r=e.i(392221),l=e.i(703923),i=e.i(343794),n=e.i(914949),o=e.i(271645),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],c=(0,o.forwardRef)(function(e,c){var u=e.prefixCls,m=void 0===u?"rc-checkbox":u,p=e.className,h=e.style,g=e.checked,x=e.disabled,f=e.defaultChecked,y=e.type,b=void 0===y?"checkbox":y,v=e.title,j=e.onChange,_=(0,l.default)(e,d),w=(0,o.useRef)(null),k=(0,o.useRef)(null),N=(0,n.default)(void 0!==f&&f,{value:g}),S=(0,r.default)(N,2),C=S[0],T=S[1];(0,o.useImperativeHandle)(c,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:k.current}});var $=(0,i.default)(m,p,(0,s.default)((0,s.default)({},"".concat(m,"-checked"),C),"".concat(m,"-disabled"),x));return o.createElement("span",{className:$,title:v,style:h,ref:k},o.createElement("input",(0,t.default)({},_,{className:"".concat(m,"-input"),ref:w,onChange:function(t){x||("checked"in e||T(t.target.checked),null==j||j({target:(0,a.default)((0,a.default)({},e),{},{type:b,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:x,checked:!!C,type:b})),o.createElement("span",{className:"".concat(m,"-inner")}))});e.s(["default",0,c])},681216,e=>{"use strict";var t=e.i(271645),a=e.i(963188);function s(e){let s=t.default.useRef(null),r=()=>{a.default.cancel(s.current),s.current=null};return[()=>{r(),s.current=(0,a.default)(()=>{s.current=null})},t=>{s.current&&(t.stopPropagation(),r()),null==e||e(t)}]}e.s(["default",()=>s])},421512,236836,e=>{"use strict";let t=e.i(271645).default.createContext(null);e.s(["default",0,t],421512),e.i(296059);var a=e.i(915654),s=e.i(183293),r=e.i(246422),l=e.i(838378);function i(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,s.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,s.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,s.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,s.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}})},{[` ${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}`}}},[` diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0e6dadb6a51341b5.js b/litellm/proxy/_experimental/out/_next/static/chunks/0e6dadb6a51341b5.js deleted file mode 100644 index 3fc4e79aa8..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/0e6dadb6a51341b5.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},906579,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),r=e.i(361275),n=e.i(702779),o=e.i(763731),l=e.i(242064);e.i(296059);var i=e.i(915654),s=e.i(694758),c=e.i(183293),u=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%)"}}),v=new s.Keyframes("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),h=new s.Keyframes("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),b=new s.Keyframes("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),p=new s.Keyframes("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),w=e=>{let{fontHeight:t,lineWidth:a,marginXS:r,colorBorderBg:n}=e,o=e.colorTextLightSolid,l=e.colorError,i=e.colorErrorHover;return(0,f.mergeToken)(e,{badgeFontHeight:t,badgeShadowSize:a,badgeTextColor:o,badgeColor:l,badgeColorHover:i,badgeShadowColor:n,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},y=e=>{let{fontSize:t,lineHeight:a,fontSizeSM:r,lineWidth:n}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*a)-2*n,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}},S=(0,d.genStyleHooks)("Badge",e=>(e=>{let{componentCls:t,iconCls:a,antCls:r,badgeShadowSize:n,textFontSize:o,textFontSizeSM:l,statusSize:s,dotSize:d,textFontWeight:f,indicatorHeight:w,indicatorHeightSM:y,marginXS:S,calc:O}=e,x=`${r}-scroll-number`,E=(0,u.genPresetColor)(e,(e,{darkColor:a})=>({[`&${t} ${t}-color-${e}`]:{background:a,[`&:not(${t}-count)`]:{color:a},"a:hover &":{background:a}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:w,height:w,color:e.badgeTextColor,fontWeight:f,fontSize:o,lineHeight:(0,i.unit)(w),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:O(w).div(2).equal(),boxShadow:`0 0 0 ${(0,i.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:y,height:y,fontSize:l,lineHeight:(0,i.unit)(y),borderRadius:O(y).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${(0,i.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,i.unit)(n)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${x}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:p,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:S,color:e.colorText,fontSize:e.fontSize}}}),E),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:b,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${x}-custom-component, ${t}-count`]:{transform:"none"},[`${x}-custom-component, ${x}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[x]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${x}-only`]:{position:"relative",display:"inline-block",height:w,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${x}-only-unit`]:{height:w,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${x}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${x}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}})(w(e)),y),O=(0,d.genStyleHooks)(["Badge","Ribbon"],e=>(e=>{let{antCls:t,badgeFontHeight:a,marginXS:r,badgeRibbonOffset:n,calc:o}=e,l=`${t}-ribbon`,s=`${t}-ribbon-wrapper`,d=(0,u.genPresetColor)(e,(e,{darkColor:t})=>({[`&${l}-color-${e}`]:{background:t,color:t}}));return{[s]:{position:"relative"},[l]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"absolute",top:r,padding:`0 ${(0,i.unit)(e.paddingXS)}`,color:e.colorPrimary,lineHeight:(0,i.unit)(a),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${l}-text`]:{color:e.badgeTextColor},[`${l}-corner`]:{position:"absolute",top:"100%",width:n,height:n,color:"currentcolor",border:`${(0,i.unit)(o(n).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),d),{[`&${l}-placement-end`]:{insetInlineEnd:o(n).mul(-1).equal(),borderEndEndRadius:0,[`${l}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${l}-placement-start`]:{insetInlineStart:o(n).mul(-1).equal(),borderEndStartRadius:0,[`${l}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}})(w(e)),y),x=e=>{let r,{prefixCls:n,value:o,current:l,offset:i=0}=e;return i&&(r={position:"absolute",top:`${i}00%`,left:0}),t.createElement("span",{style:r,className:(0,a.default)(`${n}-only-unit`,{current:l})},o)},E=e=>{let a,r,{prefixCls:n,count:o,value:l}=e,i=Number(l),s=Math.abs(o),[c,u]=t.useState(i),[d,f]=t.useState(s),m=()=>{u(i),f(s)};if(t.useEffect(()=>{let e=setTimeout(m,1e3);return()=>clearTimeout(e)},[i]),c===i||Number.isNaN(i)||Number.isNaN(c))a=[t.createElement(x,Object.assign({},e,{key:i,current:!0}))],r={transition:"none"};else{a=[];let n=i+10,o=[];for(let e=i;e<=n;e+=1)o.push(e);let l=de%10===c);a=(l<0?o.slice(0,u+1):o.slice(u)).map((a,r)=>t.createElement(x,Object.assign({},e,{key:a,value:a%10,offset:l<0?r-u:r,current:r===u}))),r={transform:`translateY(${-function(e,t,a){let r=e,n=0;for(;(r+10)%10!==t;)r+=a,n+=a;return n}(c,i,l)}00%)`}}return t.createElement("span",{className:`${n}-only`,style:r,onTransitionEnd:m},a)};var $=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let z=t.forwardRef((e,r)=>{let{prefixCls:n,count:i,className:s,motionClassName:c,style:u,title:d,show:f,component:m="sup",children:g}=e,v=$(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:h}=t.useContext(l.ConfigContext),b=h("scroll-number",n),p=Object.assign(Object.assign({},v),{"data-show":f,style:u,className:(0,a.default)(b,s,c),title:d}),w=i;if(i&&Number(i)%1==0){let e=String(i).split("");w=t.createElement("bdi",null,e.map((a,r)=>t.createElement(E,{prefixCls:b,count:Number(i),value:a,key:e.length-r})))}return((null==u?void 0:u.borderColor)&&(p.style=Object.assign(Object.assign({},u),{boxShadow:`0 0 0 1px ${u.borderColor} inset`})),g)?(0,o.cloneElement)(g,e=>({className:(0,a.default)(`${b}-custom-component`,null==e?void 0:e.className,c)})):t.createElement(m,Object.assign({},p,{ref:r}),w)});var _=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let C=t.forwardRef((e,i)=>{var s,c,u,d,f;let{prefixCls:m,scrollNumberPrefixCls:g,children:v,status:h,text:b,color:p,count:w=null,overflowCount:y=99,dot:O=!1,size:x="default",title:E,offset:$,style:C,className:j,rootClassName:k,classNames:L,styles:N,showZero:M=!1}=e,T=_(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:I,direction:R,badge:B}=t.useContext(l.ConfigContext),P=I("badge",m),[H,V,A]=S(P),D=w>y?`${y}+`:w,U="0"===D||0===D||"0"===b||0===b,F=null===w||U&&!M,W=(null!=h||null!=p)&&F,K=null!=h||!U,G=O&&!U,Z=G?"":D,q=(0,t.useMemo)(()=>((null==Z||""===Z)&&(null==b||""===b)||U&&!M)&&!G,[Z,U,M,G,b]),X=(0,t.useRef)(w);q||(X.current=w);let Y=X.current,J=(0,t.useRef)(Z);q||(J.current=Z);let Q=J.current,ee=(0,t.useRef)(G);q||(ee.current=G);let et=(0,t.useMemo)(()=>{if(!$)return Object.assign(Object.assign({},null==B?void 0:B.style),C);let e={marginTop:$[1]};return"rtl"===R?e.left=Number.parseInt($[0],10):e.right=-Number.parseInt($[0],10),Object.assign(Object.assign(Object.assign({},e),null==B?void 0:B.style),C)},[R,$,C,null==B?void 0:B.style]),ea=null!=E?E:"string"==typeof Y||"number"==typeof Y?Y:void 0,er=!q&&(0===b?M:!!b&&!0!==b),en=er?t.createElement("span",{className:`${P}-status-text`},b):null,eo=Y&&"object"==typeof Y?(0,o.cloneElement)(Y,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,el=(0,n.isPresetColor)(p,!1),ei=(0,a.default)(null==L?void 0:L.indicator,null==(s=null==B?void 0:B.classNames)?void 0:s.indicator,{[`${P}-status-dot`]:W,[`${P}-status-${h}`]:!!h,[`${P}-color-${p}`]:el}),es={};p&&!el&&(es.color=p,es.background=p);let ec=(0,a.default)(P,{[`${P}-status`]:W,[`${P}-not-a-wrapper`]:!v,[`${P}-rtl`]:"rtl"===R},j,k,null==B?void 0:B.className,null==(c=null==B?void 0:B.classNames)?void 0:c.root,null==L?void 0:L.root,V,A);if(!v&&W&&(b||K||!F)){let e=et.color;return H(t.createElement("span",Object.assign({},T,{className:ec,style:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.root),null==(u=null==B?void 0:B.styles)?void 0:u.root),et)}),t.createElement("span",{className:ei,style:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.indicator),null==(d=null==B?void 0:B.styles)?void 0:d.indicator),es)}),er&&t.createElement("span",{style:{color:e},className:`${P}-status-text`},b)))}return H(t.createElement("span",Object.assign({ref:i},T,{className:ec,style:Object.assign(Object.assign({},null==(f=null==B?void 0:B.styles)?void 0:f.root),null==N?void 0:N.root)}),v,t.createElement(r.default,{visible:!q,motionName:`${P}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:e})=>{var r,n;let o=I("scroll-number",g),l=ee.current,i=(0,a.default)(null==L?void 0:L.indicator,null==(r=null==B?void 0:B.classNames)?void 0:r.indicator,{[`${P}-dot`]:l,[`${P}-count`]:!l,[`${P}-count-sm`]:"small"===x,[`${P}-multiple-words`]:!l&&Q&&Q.toString().length>1,[`${P}-status-${h}`]:!!h,[`${P}-color-${p}`]:el}),s=Object.assign(Object.assign(Object.assign({},null==N?void 0:N.indicator),null==(n=null==B?void 0:B.styles)?void 0:n.indicator),et);return p&&!el&&((s=s||{}).background=p),t.createElement(z,{prefixCls:o,show:!q,motionClassName:e,className:i,count:Q,title:ea,style:s,key:"scrollNumber"},eo)}),en))});C.Ribbon=e=>{let{className:r,prefixCls:o,style:i,color:s,children:c,text:u,placement:d="end",rootClassName:f}=e,{getPrefixCls:m,direction:g}=t.useContext(l.ConfigContext),v=m("ribbon",o),h=`${v}-wrapper`,[b,p,w]=O(v,h),y=(0,n.isPresetColor)(s,!1),S=(0,a.default)(v,`${v}-placement-${d}`,{[`${v}-rtl`]:"rtl"===g,[`${v}-color-${s}`]:y},r),x={},E={};return s&&!y&&(x.background=s,E.color=s),b(t.createElement("div",{className:(0,a.default)(h,f,p,w)},c,t.createElement("div",{className:(0,a.default)(S,p),style:Object.assign(Object.assign({},x),i)},t.createElement("span",{className:`${v}-text`},u),t.createElement("div",{className:`${v}-corner`,style:E}))))},e.s(["Badge",0,C],906579)},44121,186515,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:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["MenuFoldOutlined",0,o],44121);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var i=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["MenuUnfoldOutlined",0,i],186515)},295320,283713,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:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["CloudServerOutlined",0,o],295320);var l=e.i(764205),i=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,i.useUIConfig)(),t=e?.is_control_plane??!1,r=e?.workers??[],[n,o]=(0,a.useState)(()=>localStorage.getItem(s));(0,a.useEffect)(()=>{if(!n||0===r.length)return;let e=r.find(e=>e.worker_id===n);e&&(0,l.switchToWorkerUrl)(e.url)},[n,r]);let c=r.find(e=>e.worker_id===n)??null,u=(0,a.useCallback)(e=>{let t=r.find(t=>t.worker_id===e);t&&(o(e),localStorage.setItem(s,e),(0,l.switchToWorkerUrl)(t.url))},[r]);return{isControlPlane:t,workers:r,selectedWorkerId:n,selectedWorker:c,selectWorker:u,disconnectFromWorker:(0,a.useCallback)(()=>{o(null),localStorage.removeItem(s),(0,l.switchToWorkerUrl)(null)},[])}}],283713)},755151,e=>{"use strict";var t=e.i(247153);e.s(["DownOutlined",()=>t.default])},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},818581,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useMergedRef",{enumerable:!0,get:function(){return n}});let r=e.r(271645);function n(e,t){let a=(0,r.useRef)(null),n=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=a.current;e&&(a.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(a.current=o(e,r)),t&&(n.current=o(t,r))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let a=e(t);return"function"==typeof a?a:()=>e(null)}}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},62478,e=>{"use strict";var t=e.i(764205);let a=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,a])},602073,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["SafetyOutlined",0,o],602073)},100486,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:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["CrownOutlined",0,o],100486)},275144,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(764205);let n=(0,a.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:o})=>{let[l,i]=(0,a.useState)(null),[s,c]=(0,a.useState)(null);return(0,a.useEffect)(()=>{(async()=>{try{let e=(0,r.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",a=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(a.ok){let e=await a.json();e.values?.logo_url&&i(e.values.logo_url),e.values?.favicon_url&&c(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,a.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:l,setLogoUrl:i,faviconUrl:s,setFaviconUrl:c},children:e})},"useTheme",0,()=>{let e=(0,a.useContext)(n);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},115571,e=>{"use strict";let t="local-storage-change";function a(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))}function r(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}}function n(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}function o(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}}e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",()=>a,"getLocalStorageItem",()=>r,"removeLocalStorageItem",()=>o,"setLocalStorageItem",()=>n])},371401,e=>{"use strict";var t=e.i(115571),a=e.i(271645);function r(e){let a=t=>{"disableUsageIndicator"===t.key&&e()},r=t=>{let{key:a}=t.detail;"disableUsageIndicator"===a&&e()};return window.addEventListener("storage",a),window.addEventListener(t.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",a),window.removeEventListener(t.LOCAL_STORAGE_EVENT,r)}}function n(){return"true"===(0,t.getLocalStorageItem)("disableUsageIndicator")}function o(){return(0,a.useSyncExternalStore)(r,n)}e.s(["useDisableUsageIndicator",()=>o])},19732,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:"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 n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["ExperimentOutlined",0,o],19732)},788191,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:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["PlayCircleOutlined",0,o],788191)},399219,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",()=>t])},299251,153702,777579,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:"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 n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["BankOutlined",0,o],299251);let l={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 i=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["BarChartOutlined",0,i],153702);let s={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 c=a.forwardRef(function(e,r){return a.createElement(n.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["LineChartOutlined",0,c],777579)},878894,664659,531278,e=>{"use strict";var t=e.i(582458);e.s(["AlertTriangle",()=>t.default],878894);var a=e.i(631171);e.s(["ChevronDown",()=>a.default],664659);let r=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>r],531278)},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",()=>t])},438957,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:"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 n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["KeyOutlined",0,o],438957)},366308,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:"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 n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["ToolOutlined",0,o],366308)},313603,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:"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 n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["SettingOutlined",0,o],313603)},872934,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["ExportOutlined",0,o],872934)},232164,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:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["TagsOutlined",0,o],232164)},210612,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:"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 n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["DatabaseOutlined",0,o],210612)},218129,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:"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 n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["ApiOutlined",0,o],218129)},844444,e=>{"use strict";var t=e.i(843476),a=e.i(906579),r=e.i(271645),n=e.i(115571);function o(e){let t=t=>{"disableShowNewBadge"===t.key&&e()},a=t=>{let{key:a}=t.detail;"disableShowNewBadge"===a&&e()};return window.addEventListener("storage",t),window.addEventListener(n.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",t),window.removeEventListener(n.LOCAL_STORAGE_EVENT,a)}}function l(){return"true"===(0,n.getLocalStorageItem)("disableShowNewBadge")}function i({children:e,dot:n=!1}){return(0,r.useSyncExternalStore)(o,l)?e?(0,t.jsx)(t.Fragment,{children:e}):null:e?(0,t.jsx)(a.Badge,{color:"blue",count:n?void 0:"New",dot:n,children:e}):(0,t.jsx)(a.Badge,{color:"blue",count:n?void 0:"New",dot:n})}e.s(["default",()=>i],844444)},477189,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:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};var n=e.i(9583),o=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["AppstoreOutlined",0,o],477189)},902739,e=>{"use strict";var t=e.i(843476),a=e.i(111672),r=e.i(764205),n=e.i(135214),o=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:l,sidebarCollapsed:i})=>{let{accessToken:s}=(0,n.default)(),[c,u]=(0,o.useState)(null),[d,f]=(0,o.useState)(!1),[m,g]=(0,o.useState)(!1),[v,h]=(0,o.useState)(!1),[b,p]=(0,o.useState)(!1),[w,y]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{(async()=>{if(!s)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,r.getUISettings)(s);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),u(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&f(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&h(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&p(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&y(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[s]),(0,t.jsx)(a.default,{setPage:e,defaultSelectedKey:l,collapsed:i,enabledPagesInternalUsers:c,enableProjectsUI:d,disableAgentsForInternalUsers:m,allowAgentsForTeamAdmins:v,disableVectorStoresForInternalUsers:b,allowVectorStoresForTeamAdmins:w})}])},216370,e=>{"use strict";var t=e.i(247167),a=e.i(843476),r=e.i(271645),n=e.i(402874),o=e.i(275144),l=e.i(902739),i=e.i(135214),s=e.i(618566),c=e.i(560445),u=e.i(521323);let d=()=>{let{data:e}=(0,u.useHealthReadiness)();return e?.is_detailed_debug?(0,a.jsx)(c.Alert,{message:"Performance Warning: Detailed Debug Mode Active",description:(0,a.jsxs)(a.Fragment,{children:["Detailed debug logging (",(0,a.jsx)("code",{children:"LITELLM_LOG=DEBUG"}),") is currently enabled. This mode logs extensive diagnostic information and will significantly degrade performance. It should only be used for troubleshooting and disabled in production environments."]}),type:"warning",showIcon:!0,banner:!0,style:{marginBottom:0,borderRadius:0}}):null},f=function(e){let t=(e??"").trim();if(!t)return"";let a=t.replace(/^\/+/,"").replace(/\/+$/,"");return a?`/${a}/`:"/"}(t.default.env.NEXT_PUBLIC_BASE_URL);function m(e){let t=e.startsWith("/")?e.slice(1):e,a=`${f}${t}`;return a.startsWith("/")?a:`/${a}`}let g={"api-reference":"api-reference"};function v({children:e}){let t=(0,s.useRouter)(),c=(0,s.useSearchParams)(),{accessToken:u,userRole:f,userId:v,userEmail:h,premiumUser:b}=(0,i.default)(),[p,w]=r.default.useState(!1),[y,S]=(0,r.useState)(()=>c.get("page")||"api-keys");return(0,r.useEffect)(()=>{S(c.get("page")||"api-keys")},[c]),(0,a.jsx)(o.ThemeProvider,{accessToken:"",children:(0,a.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,a.jsx)(n.default,{isPublicPage:!1,sidebarCollapsed:p,onToggleSidebar:()=>w(e=>!e),userID:v,userEmail:h,userRole:f,premiumUser:b,proxySettings:void 0,setProxySettings:()=>{},accessToken:u,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,a.jsx)(d,{}),(0,a.jsxs)("div",{className:"flex flex-1 overflow-auto",children:[(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(l.default,{setPage:e=>{let a=g[e];if(a){t.push(m(a)),S(e);return}t.push(m(`?page=${e}`)),S(e)},defaultSelectedKey:y,sidebarCollapsed:p})}),(0,a.jsx)("main",{className:"flex-1",children:e})]})]})})}function h({children:e}){return(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,a.jsx)(v,{children:e})})}e.s(["default",()=>h],216370)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/11429586d5e74f7f.js b/litellm/proxy/_experimental/out/_next/static/chunks/11429586d5e74f7f.js new file mode 100644 index 0000000000..e18d06ce7c --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/11429586d5e74f7f.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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)},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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))})})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214),r=e.i(708347);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,a.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&r.all_admin_roles.includes(s)})}])},392110,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/18a5548f64cd2f73.js b/litellm/proxy/_experimental/out/_next/static/chunks/171a03c36a999407.js similarity index 74% rename from litellm/proxy/_experimental/out/_next/static/chunks/18a5548f64cd2f73.js rename to litellm/proxy/_experimental/out/_next/static/chunks/171a03c36a999407.js index 55f2b835e6..22795c9bec 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/18a5548f64cd2f73.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/171a03c36a999407.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:P}=n.Select,T=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(P,{value:"BLOCK",children:"Block"}),(0,l.jsx)(P,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,P]=m.default.useState(""),[T,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void P(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}P(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),P("")}).finally(()=>{L(!1)})}else P(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),P(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),T?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:H,Text:q}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(q,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(q,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:P,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,H]=(0,m.useState)(!1),[q,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[X,Z]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>H(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(T,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:P,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:q,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!q)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===q);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:q,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:X,patternRegex:ee,patternAction:ea,onNameChange:Z,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{X&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:X,pattern:ee,action:ea}),H(!1),Z(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{H(!1),Z(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var X=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let Z={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),Z=t,t},et=()=>Object.keys(Z).length>0?Z:X,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge",Xecguard:"xecguard"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,XecGuard:`${en}xecguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",()=>em,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",()=>ec],180766);var eu=e.i(435451);let{Title:ep}=d.Typography,eg=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eu.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ex=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ep,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eg,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var eh=e.i(482725),ef=e.i(850627);let ey=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(eh.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ef.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var ej=e.i(592968),e_=e.i(750113);let eb=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(ej.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(ej.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(ej.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(ej.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(ej.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var ev=e.i(536916),ew=e.i(149192),eN=e.i(741585),eN=eN,eC=e.i(724154);e.i(247167);var eS=e.i(931067);let ek={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eI=e.i(9583),eA=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:ek}))});let{Text:eO}=d.Typography,{Option:eP}=n.Select,eT=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eA,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eO,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eP,{value:e.category,children:e.category},e.category))})]}),eL=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eO,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(ej.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(ew.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eN.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(eC.StopOutlined,{}),children:"Select All & Block"})]})]}),eB=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eO,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eO,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(ev.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eO,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eP,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eN.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(eC.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eF,Text:e$}=d.Typography,eE=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eF,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(e$,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eT,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eL,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(eB,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eM=e.i(304967),eR=e.i(599724),eG=e.i(312361),ez=e.i(21548),eD=e.i(827252);let eK={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eH=({value:e,onChange:t,disabled:a=!1})=>{let r={...eK,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(eR.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eG.Divider,{}),0===r.rules.length?(0,l.jsx)(ez.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eM.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(eR.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eG.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(eR.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(ej.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eq,Text:eJ,Link:eU}=d.Typography,{Option:eW}=n.Select,eV={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,P]=(0,m.useState)([]),[T,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[H,q]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,X]=(0,m.useState)(void 0),[Z,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,ep]=(0,m.useState)(!1),[eg,eh]=(0,m.useState)([]),[ef,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),e_=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),q(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},ew=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eN=(e,t)=>{C(a=>({...a,[e]:t}))},eC=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},eS=()=>{x.resetFields(),j(null),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),X(void 0),en("warn"),ec(""),ep(!1),k(0)},ek=()=>{eS(),t()},eI=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);if(void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=H&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),H&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ef.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ef.rules,r.litellm_params.default_action=ef.default_action,r.litellm_params.on_disallowed_action=ef.on_disallowed_action,ef.violation_message_template&&(r.litellm_params.violation_message_template=ef.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),Z&&"realtime"===W&&(r.litellm_params.on_violation=Z),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),eS(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eA=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:H,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{q(e),U(t)}}):null},eO=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:ek,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:ek,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit"},children:eO.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eW,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eW,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eW,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.pre_call})]})}),(0,l.jsx)(eW,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.during_call})]})}),(0,l.jsx)(eW,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.post_call})]})}),(0,l.jsx)(eW,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!e_&&!ei(y)&&!es(y)&&(0,l.jsx)(ey,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:ew,onActionSelect:eN,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eA("categories");if(es(y))return(0,l.jsx)(eb,{availableModels:eg,form:x});if(!y)return null;if(e_)return(0,l.jsx)(eH,{value:ef,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eA("patterns");return null;case 3:if(ei(y))return eA("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),ep(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>ep(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>X(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:Z===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:ek,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):s=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let n={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:s}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(n));let m=`/guardrails/${d}`,g=await fetch(m,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(n)});if(!g.ok){let e=await g.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tt.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(tr,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(tr,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tr,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(tr,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(tr,{value:"inherit",children:"Use global default"}),(0,l.jsx)(tr,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(tr,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:P}=n.Select,T=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(P,{value:"BLOCK",children:"Block"}),(0,l.jsx)(P,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,P]=m.default.useState(""),[T,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void P(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}P(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),P("")}).finally(()=>{L(!1)})}else P(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),P(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),T?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:q,Text:H}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(H,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(H,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:P,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,q]=(0,m.useState)(!1),[H,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[X,Z]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>q(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(T,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:P,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:H,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!H)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===H);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:H,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:X,patternRegex:ee,patternAction:ea,onNameChange:Z,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{X&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:X,pattern:ee,action:ea}),q(!1),Z(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{q(!1),Z(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var X=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let Z={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),Z=t,t},et=()=>Object.keys(Z).length>0?Z:X,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge",Xecguard:"xecguard",QostodianNexus:"qostodian_nexus"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,XecGuard:`${en}xecguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`,"Qostodian Nexus":`${en}qohash.jpg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",()=>em,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",()=>ec],180766);var eu=e.i(435451);let{Title:ep}=d.Typography,eg=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eu.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ex=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ep,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eg,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var eh=e.i(482725),ef=e.i(850627);let ey=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(eh.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ef.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var ej=e.i(592968),e_=e.i(750113);let eb=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(ej.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(ej.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(ej.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(ej.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(ej.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var ev=e.i(536916),ew=e.i(149192),eN=e.i(741585),eN=eN,eC=e.i(724154);e.i(247167);var eS=e.i(931067);let ek={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eI=e.i(9583),eA=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:ek}))});let{Text:eO}=d.Typography,{Option:eP}=n.Select,eT=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eA,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eO,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eP,{value:e.category,children:e.category},e.category))})]}),eL=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eO,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(ej.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(ew.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eN.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(eC.StopOutlined,{}),children:"Select All & Block"})]})]}),eB=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eO,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eO,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(ev.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eO,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eP,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eN.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(eC.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eF,Text:e$}=d.Typography,eE=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eF,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(e$,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eT,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eL,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(eB,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eM=e.i(304967),eR=e.i(599724),eG=e.i(312361),ez=e.i(21548),eD=e.i(827252);let eK={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eq=({value:e,onChange:t,disabled:a=!1})=>{let r={...eK,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(eR.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eG.Divider,{}),0===r.rules.length?(0,l.jsx)(ez.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eM.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(eR.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eG.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(eR.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(ej.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eH,Text:eJ,Link:eU}=d.Typography,{Option:eW}=n.Select,eV={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,P]=(0,m.useState)([]),[T,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[q,H]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,X]=(0,m.useState)(void 0),[Z,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,ep]=(0,m.useState)(!1),[eg,eh]=(0,m.useState)([]),[ef,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),e_=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),H(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},ew=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eN=(e,t)=>{C(a=>({...a,[e]:t}))},eC=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},eS=()=>{x.resetFields(),j(null),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),X(void 0),en("warn"),ec(""),ep(!1),k(0)},ek=()=>{eS(),t()},eI=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);if(void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=q&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),q&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ef.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ef.rules,r.litellm_params.default_action=ef.default_action,r.litellm_params.on_disallowed_action=ef.on_disallowed_action,ef.violation_message_template&&(r.litellm_params.violation_message_template=ef.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),Z&&"realtime"===W&&(r.litellm_params.on_violation=Z),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),eS(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eA=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:q,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{H(e),U(t)}}):null},eO=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:ek,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:ek,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit"},children:eO.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eW,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eW,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eW,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.pre_call})]})}),(0,l.jsx)(eW,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.during_call})]})}),(0,l.jsx)(eW,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.post_call})]})}),(0,l.jsx)(eW,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!e_&&!ei(y)&&!es(y)&&(0,l.jsx)(ey,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:ew,onActionSelect:eN,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eA("categories");if(es(y))return(0,l.jsx)(eb,{availableModels:eg,form:x});if(!y)return null;if(e_)return(0,l.jsx)(eq,{value:ef,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eA("patterns");return null;case 3:if(ei(y))return eA("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),ep(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>ep(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>X(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:Z===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:ek,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):s=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let n={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:s}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(n));let m=`/guardrails/${d}`,g=await fetch(m,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(n)});if(!g.ok){let e=await g.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tt.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(tr,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(tr,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tr,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(tr,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(tr,{value:"inherit",children:"Use global default"}),(0,l.jsx)(tr,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(tr,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ "api_key": "your_aporia_api_key", "project_name": "your_project_name" }`})});case"AimSecurity":return(0,l.jsx)(r.Form.Item,{label:"Aim Security Configuration",name:"config",tooltip:"JSON configuration for Aim Security",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ @@ -64,7 +64,7 @@ if response["body"].get("flagged"): return block(response["body"].get("reason", "Content flagged")) - return allow()`}},tM={"Return Values":[{name:"allow()",desc:"Let request/response through"},{name:"block(reason)",desc:"Reject with message"},{name:"modify(texts=[], images=[], tool_calls=[])",desc:"Transform content"}],"HTTP Requests (async)":[{name:"await http_request(url, method, headers, body)",desc:"Make async HTTP request"},{name:"await http_get(url, headers)",desc:"Async GET request"},{name:"await http_post(url, body, headers)",desc:"Async POST request"}],"Regex Functions":[{name:"regex_match(text, pattern)",desc:"Returns True if pattern found"},{name:"regex_replace(text, pattern, replacement)",desc:"Replace all matches"},{name:"regex_find_all(text, pattern)",desc:"Return list of matches"}],"JSON Functions":[{name:"json_parse(text)",desc:"Parse JSON string, returns None on error"},{name:"json_stringify(obj)",desc:"Convert to JSON string"},{name:"json_schema_valid(obj, schema)",desc:"Validate against JSON schema"}],"URL Functions":[{name:"extract_urls(text)",desc:"Extract all URLs from text"},{name:"is_valid_url(url)",desc:"Check if URL is valid"},{name:"all_urls_valid(text)",desc:"Check all URLs in text are valid"}],"Code Detection":[{name:"detect_code(text)",desc:"Returns True if code detected"},{name:"detect_code_languages(text)",desc:"Returns list of detected languages"},{name:'contains_code_language(text, ["sql"])',desc:"Check for specific languages"}],"Text Utilities":[{name:"contains(text, substring)",desc:"Check if substring exists"},{name:"contains_any(text, [substr1, substr2])",desc:"Check if any substring exists"},{name:"word_count(text)",desc:"Count words"},{name:"char_count(text)",desc:"Count characters"},{name:"lower(text) / upper(text) / trim(text)",desc:"String transforms"}]},tR=[{value:"pre_call",label:"pre_call (Request)"},{value:"post_call",label:"post_call (Response)"},{value:"during_call",label:"during_call (Parallel)"},{value:"logging_only",label:"logging_only"},{value:"pre_mcp_call",label:"pre_mcp_call (Before MCP Tool Call)"},{value:"post_mcp_call",label:"post_mcp_call (After MCP Tool Call)"},{value:"during_mcp_call",label:"during_mcp_call (During MCP Tool Call)"}],tG=({visible:e,onClose:t,onSuccess:a,accessToken:r,editData:i})=>{let o=!!i,[d,c]=(0,m.useState)(""),[g,x]=(0,m.useState)(["pre_call"]),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)("empty"),[_,b]=(0,m.useState)(tE.empty.code),[v,w]=(0,m.useState)(!1),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(!1),I={texts:["Hello, my SSN is 123-45-6789"],images:[],tools:[{type:"function",function:{name:"get_weather",description:"Get the current weather in a location",parameters:{type:"object",properties:{location:{type:"string",description:"City name"}},required:["location"]}}}],tool_calls:[],structured_messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"Hello, my SSN is 123-45-6789"}],model:"gpt-4"},A={texts:["The weather in San Francisco is 72°F and sunny."],images:[],tools:[],tool_calls:[{id:"call_abc123",type:"function",function:{name:"get_weather",arguments:'{"location": "San Francisco"}'}}],structured_messages:[],model:"gpt-4"},O={texts:['Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'],images:[],tools:[{type:"function",function:{name:"read_wiki_structure",description:"Read the structure of a GitHub repository (MCP tool passed as OpenAI tool)",parameters:{type:"object",properties:{repoName:{type:"string",description:"Repository name, e.g. BerriAI/litellm"}},required:["repoName"]}}}],tool_calls:[{id:"call_mcp_001",type:"function",function:{name:"read_wiki_structure",arguments:'{"repoName": "BerriAI/litellm"}'}}],structured_messages:[{role:"user",content:'Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'}],model:"mcp-tool-call"},[P,T]=(0,m.useState)(JSON.stringify(I,null,2)),[L,B]=(0,m.useState)(null),[F,E]=(0,m.useState)(null),M=(0,m.useRef)(null),R=e=>null==e?["pre_call"]:Array.isArray(e)?e.length?e:["pre_call"]:[e];(0,m.useEffect)(()=>{e&&(i?(c(i.guardrail_name||""),x(R(i.litellm_params?.mode)),f(i.litellm_params?.default_on||!1),b(i.litellm_params?.custom_code||tE.empty.code),j("")):(c(""),x(["pre_call"]),f(!1),j("empty"),b(tE.empty.code)),B(null),k(!1))},[e,i]);let G=async e=>{try{await navigator.clipboard.writeText(e),E(e),setTimeout(()=>E(null),2e3)}catch(e){console.error("Failed to copy:",e)}},z=async()=>{if(!d.trim())return void u.default.fromBackend("Please enter a guardrail name");if(!_.trim())return void u.default.fromBackend("Please enter custom code");if(!r)return void u.default.fromBackend("No access token available");w(!0);try{if(o&&i){let e={litellm_params:{custom_code:_}};d!==i.guardrail_name&&(e.guardrail_name=d);let t=R(i.litellm_params?.mode);(g.length!==t.length||g.some((e,a)=>e!==t[a]))&&(e.litellm_params.mode=g),h!==i.litellm_params?.default_on&&(e.litellm_params.default_on=h),await (0,p.updateGuardrailCall)(r,i.guardrail_id,e),u.default.success("Custom code guardrail updated successfully")}else await (0,p.createGuardrailCall)(r,{guardrail_name:d,litellm_params:{guardrail:"custom_code",mode:g,default_on:h,custom_code:_},guardrail_info:{}}),u.default.success("Custom code guardrail created successfully");a(),t()}catch(e){console.error("Failed to save guardrail:",e),u.default.fromBackend(`Failed to ${o?"update":"create"} guardrail: `+(e instanceof Error?e.message:String(e)))}finally{w(!1)}},K=async()=>{if(!r)return void B({error:"No access token available"});C(!0),B(null);try{let e;try{e=JSON.parse(P)}catch(e){B({error:"Invalid test input JSON"}),C(!1);return}e.texts||(e.texts=[]);let t=["pre_call","pre_mcp_call"],a=["post_call","post_mcp_call"],l=g.some(e=>t.includes(e))?"request":g.some(e=>a.includes(e))?"response":"request",i=await (0,p.testCustomCodeGuardrail)(r,{custom_code:_,test_input:e,input_type:l,request_data:{model:"test-model",metadata:{}}});i.success&&i.result?B(i.result):i.error?B({error:i.error,error_type:i.error_type}):B({error:"Unknown error occurred"})}catch(e){console.error("Failed to test custom code:",e),B({error:e instanceof Error?e.message:"Failed to test custom code"})}finally{C(!1)}},H=_.split("\n").length;return(0,l.jsxs)(s.Modal,{open:e,onCancel:t,footer:null,width:1400,className:"custom-code-modal",closable:!0,destroyOnClose:!0,children:[(0,l.jsxs)("div",{className:"flex flex-col h-[80vh]",children:[(0,l.jsxs)("div",{className:"pb-4 border-b border-gray-200",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:o?"Edit Custom Guardrail":"Create Custom Guardrail"}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Define custom logic using Python-like syntax"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-4 py-4 border-b border-gray-100",children:[(0,l.jsxs)("div",{className:"flex-1 max-w-[200px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Guardrail Name"}),(0,l.jsx)(tt.TextInput,{value:d,onValueChange:c,placeholder:"e.g., block-pii-custom"})]}),(0,l.jsxs)("div",{className:"w-[280px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Mode (can select multiple)"}),(0,l.jsx)(n.Select,{mode:"multiple",value:g,onChange:x,options:tR,className:"w-full",size:"middle",placeholder:"Select modes"})]}),(0,l.jsxs)("div",{className:"w-[180px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Template"}),(0,l.jsx)(n.Select,{value:y,onChange:e=>{j(e),b(tE[e].code)},className:"w-full",size:"middle",dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(eG.Divider,{style:{margin:"8px 0"}}),(0,l.jsxs)("div",{style:{padding:"8px 12px",cursor:"pointer",color:"#1890ff",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px"},onClick:e=>{e.preventDefault(),window.open("https://models.litellm.ai/guardrails","_blank")},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f0f0f0"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"},children:[(0,l.jsx)(tL,{}),(0,l.jsx)("span",{children:"Browse Community templates"}),(0,l.jsx)(tB.ExportOutlined,{style:{fontSize:"10px"}})]})]}),children:(0,l.jsx)(n.Select.OptGroup,{label:"STANDARD",children:Object.entries(tE).map(([e,t])=>(0,l.jsx)(n.Select.Option,{value:e,children:t.name},e))})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pt-5",children:[(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Default On"}),(0,l.jsx)(D.Switch,{checked:h,onChange:f})]})]}),(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden mt-4 gap-6",children:[(0,l.jsxs)("div",{className:"flex-[2] flex flex-col min-w-0 overflow-y-auto",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2 flex-shrink-0",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Python Logic"}),(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Restricted environment (no imports)"})]}),(0,l.jsxs)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e] flex-shrink-0",style:{minHeight:"300px",maxHeight:"400px"},children:[(0,l.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-12 bg-[#1e1e1e] border-r border-gray-700 text-right pr-3 pt-3 select-none overflow-hidden",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6"},children:Array.from({length:Math.max(H,20)},(e,t)=>(0,l.jsx)("div",{className:"text-gray-500 h-[22.4px]",children:t+1},t+1))}),(0,l.jsx)("textarea",{ref:M,value:_,onChange:e=>b(e.target.value),onKeyDown:e=>{if("Tab"===e.key){e.preventDefault();let t=e.currentTarget,a=t.selectionStart,l=t.selectionEnd;b(_.substring(0,a)+" "+_.substring(l)),setTimeout(()=>{t.selectionStart=t.selectionEnd=a+4},0)}},spellCheck:!1,className:"w-full h-full pl-14 pr-4 pt-3 pb-3 resize-none focus:outline-none bg-transparent text-gray-200",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6",tabSize:4}})]}),(0,l.jsx)($.Collapse,{activeKey:S?["test"]:[],onChange:e=>k(e.includes("test")),className:"mt-3 bg-white border border-gray-200 rounded-lg flex-shrink-0",expandIcon:({isActive:e})=>(0,l.jsx)(tO,{rotate:90*!!e}),children:(0,l.jsx)(tF,{header:(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,l.jsx)(tS.PlayCircleOutlined,{className:"text-blue-500"}),"Test Your Guardrail"]}),children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600",children:"Test Input (JSON)"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs text-gray-500",children:"Load example:"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(I,null,2)),className:"px-2 py-1 text-xs rounded border border-orange-200 bg-orange-50 text-orange-700 hover:bg-orange-100 transition-colors",children:"Pre-call"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(O,null,2)),className:"px-2 py-1 text-xs rounded border border-purple-200 bg-purple-50 text-purple-700 hover:bg-purple-100 transition-colors",children:"Pre MCP"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(A,null,2)),className:"px-2 py-1 text-xs rounded border border-green-200 bg-green-50 text-green-700 hover:bg-green-100 transition-colors",children:"Post-call"})]})]}),(0,l.jsx)("div",{className:"mb-2 p-2 bg-gray-50 rounded text-xs text-gray-600 border border-gray-200",children:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"texts"}),": Message content (always)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"images"}),": Base64 images (vision)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tools"}),": Tool definitions ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"}),", MCP as OpenAI tool ",(0,l.jsx)("span",{className:"text-purple-600",children:"(pre_mcp_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tool_calls"}),": LLM tool calls ",(0,l.jsx)("span",{className:"text-green-600",children:"(post_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"structured_messages"}),": Full messages ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"model"}),": Model name (always)"]})]})}),(0,l.jsx)(t$,{value:P,onChange:e=>T(e.target.value),rows:8,className:"font-mono text-xs",placeholder:'{"texts": ["test message"], ...}'})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{size:"xs",onClick:K,disabled:N,icon:tS.PlayCircleOutlined,children:N?"Running...":"Run Test"}),L&&(0,l.jsx)("div",{className:`flex items-center gap-2 text-sm ${L.error?"text-red-600":"allow"===L.action?"text-green-600":"block"===L.action?"text-orange-600":"text-blue-600"}`,children:L.error?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{}),(0,l.jsxs)("span",{children:[L.error_type&&(0,l.jsxs)("span",{className:"font-medium",children:["[",L.error_type,"] "]}),L.error]})]}):"allow"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Allowed"]}):"block"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{})," Blocked: ",L.reason]}):"modify"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Modified",L.texts&&L.texts.length>0&&(0,l.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:["→ ",L.texts[0].substring(0,50),L.texts[0].length>50?"...":""]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," ",L.action||"Unknown"]})})]})]})},"test")}),(0,l.jsxs)("div",{className:"mt-3 p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-lg flex items-center justify-between flex-shrink-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"bg-blue-100 rounded-full p-2",children:(0,l.jsx)(tL,{className:"text-blue-600 text-lg"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-gray-900",children:"Built a useful guardrail?"}),(0,l.jsx)("div",{className:"text-xs text-gray-600",children:"Share it with the community and help others build faster"})]})]}),(0,l.jsx)(e4.Button,{size:"xs",onClick:()=>window.open("https://github.com/BerriAI/litellm-guardrails","_blank"),icon:tB.ExportOutlined,className:"bg-blue-600 hover:bg-blue-700 text-white border-0",children:"Contribute Template"})]})]}),(0,l.jsxs)("div",{className:"w-[300px] flex-shrink-0 overflow-auto border-l border-gray-200 pl-6",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)("span",{className:"font-semibold text-gray-700",children:"Available Primitives"})]}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Click to copy functions to clipboard"}),(0,l.jsx)($.Collapse,{defaultActiveKey:["Return Values"],className:"primitives-collapse bg-transparent border-0",expandIconPosition:"end",children:Object.entries(tM).map(([e,t])=>(0,l.jsx)(tF,{header:(0,l.jsx)("span",{className:"text-sm font-medium text-gray-700",children:e}),className:"bg-white mb-2 rounded-lg border border-gray-200",children:(0,l.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,l.jsx)("button",{onClick:()=>G(e.name),className:`w-full text-left px-2 py-2 rounded transition-colors ${F===e.name?"bg-green-100":"bg-gray-50 hover:bg-blue-50"}`,children:F===e.name?(0,l.jsxs)("span",{className:"flex items-center gap-1 text-xs font-mono text-green-700",children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Copied!"]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"text-xs font-mono text-gray-800",children:e.name}),(0,l.jsx)("div",{className:"text-[10px] text-gray-500 mt-0.5",children:e.desc})]})},e.name))})},e))})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-gray-200",children:[(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Changes are auto-saved to local draft"}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:z,loading:v,disabled:v||!d.trim(),icon:tP.SaveOutlined,children:o?"Update Guardrail":"Save Guardrail"})]})]})]}),(0,l.jsx)("style",{children:` + return allow()`}},tM={"Return Values":[{name:"allow()",desc:"Let request/response through"},{name:"block(reason)",desc:"Reject with message"},{name:"modify(texts=[], images=[], tool_calls=[])",desc:"Transform content"}],"HTTP Requests (async)":[{name:"await http_request(url, method, headers, body)",desc:"Make async HTTP request"},{name:"await http_get(url, headers)",desc:"Async GET request"},{name:"await http_post(url, body, headers)",desc:"Async POST request"}],"Regex Functions":[{name:"regex_match(text, pattern)",desc:"Returns True if pattern found"},{name:"regex_replace(text, pattern, replacement)",desc:"Replace all matches"},{name:"regex_find_all(text, pattern)",desc:"Return list of matches"}],"JSON Functions":[{name:"json_parse(text)",desc:"Parse JSON string, returns None on error"},{name:"json_stringify(obj)",desc:"Convert to JSON string"},{name:"json_schema_valid(obj, schema)",desc:"Validate against JSON schema"}],"URL Functions":[{name:"extract_urls(text)",desc:"Extract all URLs from text"},{name:"is_valid_url(url)",desc:"Check if URL is valid"},{name:"all_urls_valid(text)",desc:"Check all URLs in text are valid"}],"Code Detection":[{name:"detect_code(text)",desc:"Returns True if code detected"},{name:"detect_code_languages(text)",desc:"Returns list of detected languages"},{name:'contains_code_language(text, ["sql"])',desc:"Check for specific languages"}],"Text Utilities":[{name:"contains(text, substring)",desc:"Check if substring exists"},{name:"contains_any(text, [substr1, substr2])",desc:"Check if any substring exists"},{name:"word_count(text)",desc:"Count words"},{name:"char_count(text)",desc:"Count characters"},{name:"lower(text) / upper(text) / trim(text)",desc:"String transforms"}]},tR=[{value:"pre_call",label:"pre_call (Request)"},{value:"post_call",label:"post_call (Response)"},{value:"during_call",label:"during_call (Parallel)"},{value:"logging_only",label:"logging_only"},{value:"pre_mcp_call",label:"pre_mcp_call (Before MCP Tool Call)"},{value:"post_mcp_call",label:"post_mcp_call (After MCP Tool Call)"},{value:"during_mcp_call",label:"during_mcp_call (During MCP Tool Call)"}],tG=({visible:e,onClose:t,onSuccess:a,accessToken:r,editData:i})=>{let o=!!i,[d,c]=(0,m.useState)(""),[g,x]=(0,m.useState)(["pre_call"]),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)("empty"),[_,b]=(0,m.useState)(tE.empty.code),[v,w]=(0,m.useState)(!1),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(!1),I={texts:["Hello, my SSN is 123-45-6789"],images:[],tools:[{type:"function",function:{name:"get_weather",description:"Get the current weather in a location",parameters:{type:"object",properties:{location:{type:"string",description:"City name"}},required:["location"]}}}],tool_calls:[],structured_messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"Hello, my SSN is 123-45-6789"}],model:"gpt-4"},A={texts:["The weather in San Francisco is 72°F and sunny."],images:[],tools:[],tool_calls:[{id:"call_abc123",type:"function",function:{name:"get_weather",arguments:'{"location": "San Francisco"}'}}],structured_messages:[],model:"gpt-4"},O={texts:['Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'],images:[],tools:[{type:"function",function:{name:"read_wiki_structure",description:"Read the structure of a GitHub repository (MCP tool passed as OpenAI tool)",parameters:{type:"object",properties:{repoName:{type:"string",description:"Repository name, e.g. BerriAI/litellm"}},required:["repoName"]}}}],tool_calls:[{id:"call_mcp_001",type:"function",function:{name:"read_wiki_structure",arguments:'{"repoName": "BerriAI/litellm"}'}}],structured_messages:[{role:"user",content:'Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'}],model:"mcp-tool-call"},[P,T]=(0,m.useState)(JSON.stringify(I,null,2)),[L,B]=(0,m.useState)(null),[F,E]=(0,m.useState)(null),M=(0,m.useRef)(null),R=e=>null==e?["pre_call"]:Array.isArray(e)?e.length?e:["pre_call"]:[e];(0,m.useEffect)(()=>{e&&(i?(c(i.guardrail_name||""),x(R(i.litellm_params?.mode)),f(i.litellm_params?.default_on||!1),b(i.litellm_params?.custom_code||tE.empty.code),j("")):(c(""),x(["pre_call"]),f(!1),j("empty"),b(tE.empty.code)),B(null),k(!1))},[e,i]);let G=async e=>{try{await navigator.clipboard.writeText(e),E(e),setTimeout(()=>E(null),2e3)}catch(e){console.error("Failed to copy:",e)}},z=async()=>{if(!d.trim())return void u.default.fromBackend("Please enter a guardrail name");if(!_.trim())return void u.default.fromBackend("Please enter custom code");if(!r)return void u.default.fromBackend("No access token available");w(!0);try{if(o&&i){let e={litellm_params:{custom_code:_}};d!==i.guardrail_name&&(e.guardrail_name=d);let t=R(i.litellm_params?.mode);(g.length!==t.length||g.some((e,a)=>e!==t[a]))&&(e.litellm_params.mode=g),h!==i.litellm_params?.default_on&&(e.litellm_params.default_on=h),await (0,p.updateGuardrailCall)(r,i.guardrail_id,e),u.default.success("Custom code guardrail updated successfully")}else await (0,p.createGuardrailCall)(r,{guardrail_name:d,litellm_params:{guardrail:"custom_code",mode:g,default_on:h,custom_code:_},guardrail_info:{}}),u.default.success("Custom code guardrail created successfully");a(),t()}catch(e){console.error("Failed to save guardrail:",e),u.default.fromBackend(`Failed to ${o?"update":"create"} guardrail: `+(e instanceof Error?e.message:String(e)))}finally{w(!1)}},K=async()=>{if(!r)return void B({error:"No access token available"});C(!0),B(null);try{let e;try{e=JSON.parse(P)}catch(e){B({error:"Invalid test input JSON"}),C(!1);return}e.texts||(e.texts=[]);let t=["pre_call","pre_mcp_call"],a=["post_call","post_mcp_call"],l=g.some(e=>t.includes(e))?"request":g.some(e=>a.includes(e))?"response":"request",i=await (0,p.testCustomCodeGuardrail)(r,{custom_code:_,test_input:e,input_type:l,request_data:{model:"test-model",metadata:{}}});i.success&&i.result?B(i.result):i.error?B({error:i.error,error_type:i.error_type}):B({error:"Unknown error occurred"})}catch(e){console.error("Failed to test custom code:",e),B({error:e instanceof Error?e.message:"Failed to test custom code"})}finally{C(!1)}},q=_.split("\n").length;return(0,l.jsxs)(s.Modal,{open:e,onCancel:t,footer:null,width:1400,className:"custom-code-modal",closable:!0,destroyOnClose:!0,children:[(0,l.jsxs)("div",{className:"flex flex-col h-[80vh]",children:[(0,l.jsxs)("div",{className:"pb-4 border-b border-gray-200",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:o?"Edit Custom Guardrail":"Create Custom Guardrail"}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Define custom logic using Python-like syntax"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-4 py-4 border-b border-gray-100",children:[(0,l.jsxs)("div",{className:"flex-1 max-w-[200px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Guardrail Name"}),(0,l.jsx)(tt.TextInput,{value:d,onValueChange:c,placeholder:"e.g., block-pii-custom"})]}),(0,l.jsxs)("div",{className:"w-[280px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Mode (can select multiple)"}),(0,l.jsx)(n.Select,{mode:"multiple",value:g,onChange:x,options:tR,className:"w-full",size:"middle",placeholder:"Select modes"})]}),(0,l.jsxs)("div",{className:"w-[180px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Template"}),(0,l.jsx)(n.Select,{value:y,onChange:e=>{j(e),b(tE[e].code)},className:"w-full",size:"middle",dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(eG.Divider,{style:{margin:"8px 0"}}),(0,l.jsxs)("div",{style:{padding:"8px 12px",cursor:"pointer",color:"#1890ff",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px"},onClick:e=>{e.preventDefault(),window.open("https://models.litellm.ai/guardrails","_blank")},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f0f0f0"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"},children:[(0,l.jsx)(tL,{}),(0,l.jsx)("span",{children:"Browse Community templates"}),(0,l.jsx)(tB.ExportOutlined,{style:{fontSize:"10px"}})]})]}),children:(0,l.jsx)(n.Select.OptGroup,{label:"STANDARD",children:Object.entries(tE).map(([e,t])=>(0,l.jsx)(n.Select.Option,{value:e,children:t.name},e))})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pt-5",children:[(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Default On"}),(0,l.jsx)(D.Switch,{checked:h,onChange:f})]})]}),(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden mt-4 gap-6",children:[(0,l.jsxs)("div",{className:"flex-[2] flex flex-col min-w-0 overflow-y-auto",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2 flex-shrink-0",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Python Logic"}),(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Restricted environment (no imports)"})]}),(0,l.jsxs)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e] flex-shrink-0",style:{minHeight:"300px",maxHeight:"400px"},children:[(0,l.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-12 bg-[#1e1e1e] border-r border-gray-700 text-right pr-3 pt-3 select-none overflow-hidden",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6"},children:Array.from({length:Math.max(q,20)},(e,t)=>(0,l.jsx)("div",{className:"text-gray-500 h-[22.4px]",children:t+1},t+1))}),(0,l.jsx)("textarea",{ref:M,value:_,onChange:e=>b(e.target.value),onKeyDown:e=>{if("Tab"===e.key){e.preventDefault();let t=e.currentTarget,a=t.selectionStart,l=t.selectionEnd;b(_.substring(0,a)+" "+_.substring(l)),setTimeout(()=>{t.selectionStart=t.selectionEnd=a+4},0)}},spellCheck:!1,className:"w-full h-full pl-14 pr-4 pt-3 pb-3 resize-none focus:outline-none bg-transparent text-gray-200",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6",tabSize:4}})]}),(0,l.jsx)($.Collapse,{activeKey:S?["test"]:[],onChange:e=>k(e.includes("test")),className:"mt-3 bg-white border border-gray-200 rounded-lg flex-shrink-0",expandIcon:({isActive:e})=>(0,l.jsx)(tO,{rotate:90*!!e}),children:(0,l.jsx)(tF,{header:(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,l.jsx)(tS.PlayCircleOutlined,{className:"text-blue-500"}),"Test Your Guardrail"]}),children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600",children:"Test Input (JSON)"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs text-gray-500",children:"Load example:"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(I,null,2)),className:"px-2 py-1 text-xs rounded border border-orange-200 bg-orange-50 text-orange-700 hover:bg-orange-100 transition-colors",children:"Pre-call"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(O,null,2)),className:"px-2 py-1 text-xs rounded border border-purple-200 bg-purple-50 text-purple-700 hover:bg-purple-100 transition-colors",children:"Pre MCP"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(A,null,2)),className:"px-2 py-1 text-xs rounded border border-green-200 bg-green-50 text-green-700 hover:bg-green-100 transition-colors",children:"Post-call"})]})]}),(0,l.jsx)("div",{className:"mb-2 p-2 bg-gray-50 rounded text-xs text-gray-600 border border-gray-200",children:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"texts"}),": Message content (always)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"images"}),": Base64 images (vision)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tools"}),": Tool definitions ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"}),", MCP as OpenAI tool ",(0,l.jsx)("span",{className:"text-purple-600",children:"(pre_mcp_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tool_calls"}),": LLM tool calls ",(0,l.jsx)("span",{className:"text-green-600",children:"(post_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"structured_messages"}),": Full messages ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"model"}),": Model name (always)"]})]})}),(0,l.jsx)(t$,{value:P,onChange:e=>T(e.target.value),rows:8,className:"font-mono text-xs",placeholder:'{"texts": ["test message"], ...}'})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{size:"xs",onClick:K,disabled:N,icon:tS.PlayCircleOutlined,children:N?"Running...":"Run Test"}),L&&(0,l.jsx)("div",{className:`flex items-center gap-2 text-sm ${L.error?"text-red-600":"allow"===L.action?"text-green-600":"block"===L.action?"text-orange-600":"text-blue-600"}`,children:L.error?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{}),(0,l.jsxs)("span",{children:[L.error_type&&(0,l.jsxs)("span",{className:"font-medium",children:["[",L.error_type,"] "]}),L.error]})]}):"allow"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Allowed"]}):"block"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{})," Blocked: ",L.reason]}):"modify"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Modified",L.texts&&L.texts.length>0&&(0,l.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:["→ ",L.texts[0].substring(0,50),L.texts[0].length>50?"...":""]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," ",L.action||"Unknown"]})})]})]})},"test")}),(0,l.jsxs)("div",{className:"mt-3 p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-lg flex items-center justify-between flex-shrink-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"bg-blue-100 rounded-full p-2",children:(0,l.jsx)(tL,{className:"text-blue-600 text-lg"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-gray-900",children:"Built a useful guardrail?"}),(0,l.jsx)("div",{className:"text-xs text-gray-600",children:"Share it with the community and help others build faster"})]})]}),(0,l.jsx)(e4.Button,{size:"xs",onClick:()=>window.open("https://github.com/BerriAI/litellm-guardrails","_blank"),icon:tB.ExportOutlined,className:"bg-blue-600 hover:bg-blue-700 text-white border-0",children:"Contribute Template"})]})]}),(0,l.jsxs)("div",{className:"w-[300px] flex-shrink-0 overflow-auto border-l border-gray-200 pl-6",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)("span",{className:"font-semibold text-gray-700",children:"Available Primitives"})]}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Click to copy functions to clipboard"}),(0,l.jsx)($.Collapse,{defaultActiveKey:["Return Values"],className:"primitives-collapse bg-transparent border-0",expandIconPosition:"end",children:Object.entries(tM).map(([e,t])=>(0,l.jsx)(tF,{header:(0,l.jsx)("span",{className:"text-sm font-medium text-gray-700",children:e}),className:"bg-white mb-2 rounded-lg border border-gray-200",children:(0,l.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,l.jsx)("button",{onClick:()=>G(e.name),className:`w-full text-left px-2 py-2 rounded transition-colors ${F===e.name?"bg-green-100":"bg-gray-50 hover:bg-blue-50"}`,children:F===e.name?(0,l.jsxs)("span",{className:"flex items-center gap-1 text-xs font-mono text-green-700",children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Copied!"]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"text-xs font-mono text-gray-800",children:e.name}),(0,l.jsx)("div",{className:"text-[10px] text-gray-500 mt-0.5",children:e.desc})]})},e.name))})},e))})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-gray-200",children:[(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Changes are auto-saved to local draft"}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:z,loading:v,disabled:v||!d.trim(),icon:tP.SaveOutlined,children:o?"Update Guardrail":"Save Guardrail"})]})]})]}),(0,l.jsx)("style",{children:` .custom-code-modal .ant-modal-content { padding: 24px; } @@ -81,4 +81,4 @@ .primitives-collapse .ant-collapse-content-box { padding: 8px 12px !important; } - `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let o,[d,g]=(0,m.useState)(null),[x,h]=(0,m.useState)(null),[f,y]=(0,m.useState)(!0),[j,_]=(0,m.useState)(!1),[b]=r.Form.useForm(),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(null),[I,A]=(0,m.useState)({}),[O,P]=(0,m.useState)(!1),T={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[L,B]=(0,m.useState)(T),[F,$]=(0,m.useState)(!1),[E,M]=(0,m.useState)(!1),R=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),G=(0,m.useCallback)((e,t,a,l,r)=>{R.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(y(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(g(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(w([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),w(t),C(a)}}else w([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{y(!1)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);h(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},K=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);k(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{D()},[a]),(0,m.useEffect)(()=>{z(),K()},[e,a]),(0,m.useEffect)(()=>{if(d&&b){let e={...d.litellm_params||{}};delete e.skip_system_message_in_guardrail,b.setFieldsValue({guardrail_name:d.guardrail_name,...e,skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}})}},[d,x,b]);let H=(0,m.useCallback)(()=>{d?.litellm_params?.guardrail==="tool_permission"?B({rules:d.litellm_params?.rules||[],default_action:(d.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:d.litellm_params?.violation_message_template||""}):B(T),$(!1)},[d]);(0,m.useEffect)(()=>{H()},[H]);let q=async t=>{try{if(!a)return;let o={litellm_params:{}};t.guardrail_name!==d.guardrail_name&&(o.guardrail_name=t.guardrail_name),t.default_on!==d.litellm_params?.default_on&&(o.litellm_params.default_on=t.default_on);let c=ec(d.litellm_params?.skip_system_message_in_guardrail),m=t.skip_system_message_choice;void 0!==m&&m!==c&&("inherit"===m?o.litellm_params.skip_system_message_in_guardrail=null:"yes"===m?o.litellm_params.skip_system_message_in_guardrail=!0:o.litellm_params.skip_system_message_in_guardrail=!1);let g=d.guardrail_info,h=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(g)!==JSON.stringify(h)&&(o.guardrail_info=h);let f=d.litellm_params?.pii_entities_config||{},y={};if(v.forEach(e=>{y[e]=N[e]||"MASK"}),JSON.stringify(f)!==JSON.stringify(y)&&(o.litellm_params.pii_entities_config=y),d.litellm_params?.guardrail==="litellm_content_filter"&&O){var l,r,i,s,n;let e,t=(l=R.current.patterns||[],r=R.current.blockedWords||[],i=R.current.categories||[],s=R.current.competitorIntentEnabled,n=R.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);o.litellm_params.patterns=t.patterns,o.litellm_params.blocked_words=t.blocked_words,o.litellm_params.categories=t.categories,o.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(d.litellm_params?.guardrail==="tool_permission"){let e=d.litellm_params?.rules||[],t=L.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(d.litellm_params?.default_action||"deny").toLowerCase(),r=(L.default_action||"deny").toLowerCase(),i=l!==r,s=(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(L.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=d.litellm_params?.violation_message_template||"",u=L.violation_message_template||"",p=m!==u;(F||a||i||c||p)&&(o.litellm_params.rules=t,o.litellm_params.default_action=r,o.litellm_params.on_disallowed_action=n,o.litellm_params.violation_message_template=u||null)}let j=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",j);let b=d.litellm_params?.guardrail==="tool_permission";if(x&&j&&!b){let e=x[ea[j]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=d.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?o.litellm_params[e]=a:null!=l&&""!==l&&(o.litellm_params[e]=null))})}if(0===Object.keys(o.litellm_params).length&&delete o.litellm_params,0===Object.keys(o).length){u.default.info("No changes detected"),_(!1);return}await (0,p.updateGuardrailCall)(a,e,o),u.default.success("Guardrail updated successfully"),P(!1),z(),_(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(f)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let J=e=>e?new Date(e).toLocaleString():"-",{logo:U,displayName:W}=ed(d.litellm_params?.guardrail||""),V=async(e,t)=>{await (0,tn.copyToClipboard)(e)&&(A(e=>({...e,[t]:!0})),setTimeout(()=>{A(e=>({...e,[t]:!1}))},2e3))},Y="config"===d.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(td.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(th.Title,{children:d.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eR.Text,{className:"text-gray-500 font-mono",children:d.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:I["guardrail-id"]?(0,l.jsx)(tf.CheckIcon,{size:12}):(0,l.jsx)(ty.CopyIcon,{size:12}),onClick:()=>V(d.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${I["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tu.TabGroup,{children:[(0,l.jsxs)(tp.TabList,{className:"mb-4",children:[(0,l.jsx)(tm.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(tm.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tx.TabPanels,{children:[(0,l.jsxs)(tg.TabPanel,{children:[(0,l.jsxs)(tc.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[U&&(0,l.jsx)("img",{src:U,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(th.Title,{children:W})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:d.litellm_params?.mode||"-"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:J(d.created_at)}),(0,l.jsxs)(eR.Text,{children:["Last Updated: ",J(d.updated_at)]})]})]})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsx)(eR.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(d.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eR.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(eN.default,{}):(0,l.jsx)(eC.StopOutlined,{}),String(t)]})})]},e))})]})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsx)(eH,{value:L,disabled:!0})}),d.litellm_params?.guardrail==="custom_code"&&d.litellm_params?.custom_code&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eR.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!Y&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:d.litellm_params.custom_code})})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(tg.TabPanel,{children:(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(th.Title,{children:"Guardrail Settings"}),Y&&(0,l.jsx)(ej.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})}),!j&&!Y&&(d.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>_(!0),children:"Edit Settings"}))]}),j?(0,l.jsxs)(r.Form,{form:b,onFinish:q,initialValues:{guardrail_name:d.guardrail_name,...(o={...d.litellm_params||{}},delete o.skip_system_message_in_guardrail,o),skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{label:"Skip system messages in guardrail",name:"skip_system_message_choice",tooltip:"Unified guardrails: omit role: system from guardrail input (LLM still gets full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),d.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:S&&(0,l.jsx)(eE,{entities:S.supported_entities,actions:S.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:S.pii_entity_categories})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!0,accessToken:a,onDataChange:G,onUnsavedChanges:P}),(d.litellm_params?.guardrail==="tool_permission"||x)&&(0,l.jsx)(eG.Divider,{orientation:"left",children:"Provider Settings"}),d.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eH,{value:L,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ey,{selectedProvider:Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail)||null,accessToken:a,providerParams:x,value:d.litellm_params}),x&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);if(!e)return null;let t=x[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:d.litellm_params}):null})()]}),(0,l.jsx)(eG.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{_(!1),P(!1),H()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:d.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:d.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Yes":"No"})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:J(d.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:J(d.updated_at)})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eH,{value:L,disabled:!0})]})]})})]})]}),(0,l.jsx)(tG,{visible:E,onClose:()=>M(!1),onSuccess:()=>{M(!1),z()},accessToken:a,editData:d?{guardrail_id:d.guardrail_id,guardrail_name:d.guardrail_name,litellm_params:d.litellm_params}:null})]})}],969641);var tz=e.i(573421),tD=e.i(19732),tK=e.i(928685),tH=e.i(166406),tq=e.i(637235),tJ=e.i(755151),tU=e.i(240647);let{Text:tW}=d.Typography,tV=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tk.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tY}=i.Input,{Text:tQ}=d.Typography,tX=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ej.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eD.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tY,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(e4.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tV,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[s,n]=(0,m.useState)(new Set),[o,c]=(0,m.useState)(""),[g,x]=(0,m.useState)([]),[f,y]=(0,m.useState)([]),[j,_]=(0,m.useState)(!1),b=e.filter(e=>e.guardrail_name?.toLowerCase().includes(o.toLowerCase())),v=async e=>{if(0===s.size||!a)return;_(!0),x([]),y([]);let t=[],l=[];await Promise.all(Array.from(s).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),x(t),y(l),_(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(h.Card,{className:"h-full",styles:{body:{padding:0,height:"100%"}},children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(i.Input,{prefix:(0,l.jsx)(tK.SearchOutlined,{}),placeholder:"Search guardrails...",value:o,onChange:e=>c(e.target.value)})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(eh.Spin,{})}):0===b.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(ez.Empty,{description:o?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(tz.List,{dataSource:b,renderItem:e=>(0,l.jsx)(tz.List.Item,{onClick:()=>{var t;let a;e.guardrail_name&&(t=e.guardrail_name,(a=new Set(s)).has(t)?a.delete(t):a.add(t),n(a))},style:{paddingLeft:24,paddingRight:16},className:`cursor-pointer hover:bg-gray-50 transition-colors ${s.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(tz.List.Item.Meta,{title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tD.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(d.Typography.Text,{className:"text-xs text-gray-600",children:[s.size," of ",b.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(d.Typography.Title,{level:2,className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===s.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tD.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tX,{guardrailNames:Array.from(s),onSubmit:v,results:g.length>0?g:null,errors:f.length>0?f:null,isLoading:j,onClose:()=>n(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tG],64352);let tZ="../ui/assets/logos/",t0=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tZ}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tZ}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tZ}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tZ}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tZ}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tZ}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tZ}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tZ}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tZ}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tZ}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tZ}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tZ}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tZ}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tZ}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tZ}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tZ}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tZ}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tZ}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tZ}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tZ}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tZ}akto.svg`,tags:["Security","Safety","Monitoring"]},{id:"promptguard",name:"PromptGuard",description:"AI security gateway with prompt injection detection, PII redaction, topic filtering, entity blocklists, and hallucination detection. Self-hostable with drop-in proxy integration.",category:"partner",logo:`${tZ}promptguard.svg`,tags:["Security","Prompt Injection","PII"],providerKey:"Promptguard",eval:{f1:94.9,precision:100,recall:90.4,testCases:5384,latency:"~150ms"}},{id:"xecguard",name:"XecGuard",description:"CyCraft XecGuard AI security gateway. Multi-policy scanning (prompt injection, harmful content, PII, system-prompt enforcement) plus RAG context grounding.",category:"partner",logo:`${tZ}xecguard.svg`,tags:["Security","Policy","Grounding","RAG"],providerKey:"Xecguard"}];e.s(["ALL_CARDS",0,t0],230312)},826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(464571),r=e.i(326373),i=e.i(653496),s=e.i(755151),n=e.i(646563),o=e.i(245094),d=e.i(764205),c=e.i(185357),m=e.i(782719),u=e.i(708347),p=e.i(969641),g=e.i(476993),x=e.i(727749),h=e.i(127952),f=e.i(180766);e.i(824296);var y=e.i(64352),j=e.i(311451),_=e.i(928685),b=e.i(266537),v=e.i(230312),w=e.i(826910);let N=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},C=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(N,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(w.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var S=e.i(447566);let k={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1},promptguard:{provider:"Promptguard",guardrailNameSuggestion:"PromptGuard",mode:"pre_call",defaultOn:!1},xecguard:{provider:"Xecguard",guardrailNameSuggestion:"XecGuard",mode:"pre_call",defaultOn:!1}},I=({card:e,onBack:r,accessToken:i,onGuardrailCreated:s})=>{let[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)("overview"),u=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],p=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],g=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:r,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(S.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(l.Button,{onClick:()=>o(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:g.map(e=>(0,t.jsx)("div",{onClick:()=>m(e.key),style:{padding:"12px 20px",fontSize:14,color:d===e.key?"#1a73e8":"#5f6368",borderBottom:d===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:d===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===d&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:u.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:p.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(c.default,{visible:n,onClose:()=>o(!1),accessToken:i,onSuccess:()=>{o(!1),s()},preset:k[e.id]})]})},A=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=v.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(I,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(j.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(_.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]})]})};var O=e.i(988846),P=e.i(837007),T=e.i(409797),L=e.i(54131),B=e.i(995926),F=e.i(678784),$=e.i(634831),E=e.i(438100),M=e.i(302202),R=e.i(328196),G=e.i(879664);e.s(["InfoIcon",()=>G.default],168118);var G=G,z=e.i(212931),D=e.i(808613),K=e.i(199133),H=e.i(663435),q=e.i(954616),J=e.i(912598),U=e.i(135214),W=e.i(243652);let V=async(e,t)=>{let a=(0,d.getProxyBaseUrl)(),l=`${a}/guardrails/register`,r=await fetch(l,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.json().catch(()=>({})),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return r.json()},Y=(0,W.createQueryKeys)("guardrails");function Q(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt: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),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let X={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{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"}},Z={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function ee({label:e,value:a,color:l}){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 ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function et({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function ea({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=X[e.status],c=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,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.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(M.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,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:o,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,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function el({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function er({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=X[e.status],y=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(B.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(el,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)($.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(el,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(E.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(G.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)($.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(F.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(B.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ei({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="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 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(F.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(R.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,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,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function es({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[c,m]=(0,a.useState)("all"),[u,p]=(0,a.useState)(null),[g,h]=(0,a.useState)(new Set),[f,y]=(0,a.useState)(null),[_,b]=(0,a.useState)(!0),[v,w]=(0,a.useState)(null),[N,C]=(0,a.useState)(""),[S,k]=(0,a.useState)(!1),[I]=D.Form.useForm(),A=(()=>{let{accessToken:e}=(0,U.default)(),t=(0,J.useQueryClient)();return(0,q.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return V(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:Y.all})}})})();(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let T=(0,a.useCallback)(async()=>{if(!e)return void b(!1);b(!0),w(null);try{let t="all"===c?void 0:"pending"===c?"pending_review":c,a=await (0,d.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(Q)),s(a.summary)}catch(e){w(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{b(!1)}},[e,c,N]);(0,a.useEffect)(()=>{T()},[T]);let L=l.find(e=>e.id===u)??null,B=i.total,F=i.pending_review,$=i.active,E=i.rejected;async function M(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),x.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{x.default.fromBackend("Failed to update forward API key")}}async function R(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),x.default.success("Static headers updated")}catch{x.default.fromBackend("Failed to update static headers")}}async function G(t,a){if(e)try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),x.default.success("Forward client headers updated")}catch{x.default.fromBackend("Failed to update forward client headers")}}async function W(t){if(e)try{await (0,d.approveGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail approved")}catch{x.default.fromBackend("Failed to approve guardrail")}}async function X(t){if(e)try{await (0,d.rejectGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail rejected")}catch{x.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${L?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ee,{label:"Total Submitted",value:B,color:"text-gray-900"}),(0,t.jsx)(ee,{label:"Pending Review",value:F,color:"text-yellow-600"}),(0,t.jsx)(ee,{label:"Active",value:$,color:"text-green-600"}),(0,t.jsx)(ee,{label:"Rejected",value:E,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)(O.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 guardrails...",value:n,onChange:e=>o(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-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:c,onChange:e=>m(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none 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",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>k(!0),className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)(P.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[_&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),v&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:v}),!_&&!v&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!_&&!v&&l.map(e=>(0,t.jsx)(ea,{guardrail:e,isSelected:u===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>p(u===e.id?null:e.id),onToggleForwardKey:()=>M(e.id),onToggleHeaders:()=>{var t;return t=e.id,void h(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>y({id:e.id,action:"approve"}),onReject:()=>y({id:e.id,action:"reject"})},e.id))]})]}),L&&(0,t.jsx)(er,{guardrail:L,onClose:()=>p(null),onApprove:()=>y({id:L.id,action:"approve"}),onReject:()=>y({id:L.id,action:"reject"}),onToggleForwardKey:()=>M(L.id),onUpdateCustomHeaders:e=>R(L.id,e),onUpdateExtraHeaders:e=>G(L.id,e)}),f&&(0,t.jsx)(ei,{action:f.action,guardrailName:l.find(e=>e.id===f.id)?.name??"",onConfirm:()=>"approve"===f.action?W(f.id):X(f.id),onCancel:()=>y(null)}),(0,t.jsxs)(z.Modal,{title:"Submit Guardrail for Review",open:S,onCancel:()=>{k(!1),I.resetFields()},onOk:()=>I.submit(),okText:"Submit for Review",children:[(0,t.jsx)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800 mb-4",children:"Your guardrail will be sent for admin review before it becomes active."}),(0,t.jsxs)(D.Form,{form:I,layout:"vertical",initialValues:{mode:"pre_call"},onFinish:async e=>{let t={...e.extra_litellm_params?JSON.parse(e.extra_litellm_params):{},guardrail:"generic_guardrail_api",mode:e.mode,api_base:e.api_base};try{await A.mutateAsync({team_id:e.team_id,guardrail_name:e.guardrail_name,litellm_params:t,guardrail_info:e.guardrail_info?JSON.parse(e.guardrail_info):void 0}),x.default.success("Guardrail submitted for review"),k(!1),I.resetFields(),T()}catch{}},children:[(0,t.jsx)(D.Form.Item,{label:"Team",name:"team_id",rules:[{required:!0,message:"Select a team"}],children:(0,t.jsx)(H.default,{})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Enter a guardrail name"}],children:(0,t.jsx)(j.Input,{placeholder:"e.g. pii-detection"})}),(0,t.jsx)(D.Form.Item,{label:"Mode",name:"mode",rules:[{required:!0,message:"Select a mode"}],children:(0,t.jsxs)(K.Select,{children:[(0,t.jsx)(K.Select.Option,{value:"pre_call",children:"Pre Call"}),(0,t.jsx)(K.Select.Option,{value:"post_call",children:"Post Call"}),(0,t.jsx)(K.Select.Option,{value:"during_call",children:"During Call"})]})}),(0,t.jsx)(D.Form.Item,{label:"API Base URL",name:"api_base",rules:[{required:!0,message:"Enter the API base URL"},{type:"url",message:"Must be a valid URL"}],children:(0,t.jsx)(j.Input,{placeholder:"https://your-guardrail-api.com/v1/check",className:"font-mono"})}),(0,t.jsx)(D.Form.Item,{label:"Additional litellm_params (optional)",name:"extra_litellm_params",tooltip:"JSON object merged into litellm_params. e.g. forward_api_key, headers, model, unreachable_fallback",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if("object"!=typeof e||Array.isArray(e))return Promise.reject("Must be a JSON object");return Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"forward_api_key": true, "headers": {"X-Custom": "value"}}'})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Info (optional)",name:"guardrail_info",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"description": "Detects PII in requests"}'})})]})]})]})}e.s(["default",0,({accessToken:e,userRole:j})=>{let[_,b]=(0,a.useState)([]),[v,w]=(0,a.useState)(!1),[N,C]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[I,O]=(0,a.useState)(!1),[P,T]=(0,a.useState)(null),[L,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),E=!!j&&(0,u.isAdminRole)(j),M=async()=>{if(e){k(!0);try{let t=await (0,d.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),b(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{k(!1)}}};(0,a.useEffect)(()=>{M()},[e]);let R=()=>{M()},G=async()=>{if(P&&e){O(!0);try{await (0,d.deleteGuardrailCall)(e,P.guardrail_id),x.default.success(`Guardrail "${P.guardrail_name}" deleted successfully`),await M()}catch(e){console.error("Error deleting guardrail:",e),x.default.fromBackend("Failed to delete guardrail")}finally{O(!1),B(!1),T(null)}}},z=P&&P.litellm_params?(0,f.getGuardrailLogoAndName)(P.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsx)(i.Tabs,{defaultActiveKey:"submitted",items:[...E?[{key:"garden",label:"Guardrail Garden",children:(0,t.jsx)(A,{accessToken:e,onGuardrailCreated:R})},{key:"guardrails",label:"Guardrails",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(r.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(n.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{F&&$(null),w(!0)}},{key:"custom_code",icon:(0,t.jsx)(o.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{F&&$(null),C(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(s.DownOutlined,{className:"ml-2"})]})})}),F?(0,t.jsx)(p.default,{guardrailId:F,onClose:()=>$(null),accessToken:e,isAdmin:E}):(0,t.jsx)(m.default,{guardrailsList:_,isLoading:S,onDeleteClick:(e,t)=>{T(_.find(t=>t.guardrail_id===e)||null),B(!0)},accessToken:e,onGuardrailUpdated:M,isAdmin:E,onGuardrailClick:e=>$(e)}),(0,t.jsx)(c.default,{visible:v,onClose:()=>{w(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(y.CustomCodeModal,{visible:N,onClose:()=>{C(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(h.default,{isOpen:L,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${P?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:P?.guardrail_name},{label:"ID",value:P?.guardrail_id,code:!0},{label:"Provider",value:z},{label:"Mode",value:P?.litellm_params.mode},{label:"Default On",value:P?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{B(!1),T(null)},onOk:G,confirmLoading:I})]})},{key:"playground",label:"Test Playground",disabled:!e,children:(0,t.jsx)(g.default,{guardrailsList:_,isLoading:S,accessToken:e,onClose:()=>{}})}]:[],{key:"submitted",label:"Submitted Guardrails",children:(0,t.jsx)(es,{accessToken:e})}]})})}],487304)}]); \ No newline at end of file + `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let o,[d,g]=(0,m.useState)(null),[x,h]=(0,m.useState)(null),[f,y]=(0,m.useState)(!0),[j,_]=(0,m.useState)(!1),[b]=r.Form.useForm(),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(null),[I,A]=(0,m.useState)({}),[O,P]=(0,m.useState)(!1),T={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[L,B]=(0,m.useState)(T),[F,$]=(0,m.useState)(!1),[E,M]=(0,m.useState)(!1),R=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),G=(0,m.useCallback)((e,t,a,l,r)=>{R.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(y(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(g(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(w([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),w(t),C(a)}}else w([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{y(!1)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);h(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},K=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);k(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{D()},[a]),(0,m.useEffect)(()=>{z(),K()},[e,a]),(0,m.useEffect)(()=>{if(d&&b){let e={...d.litellm_params||{}};delete e.skip_system_message_in_guardrail,b.setFieldsValue({guardrail_name:d.guardrail_name,...e,skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}})}},[d,x,b]);let q=(0,m.useCallback)(()=>{d?.litellm_params?.guardrail==="tool_permission"?B({rules:d.litellm_params?.rules||[],default_action:(d.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:d.litellm_params?.violation_message_template||""}):B(T),$(!1)},[d]);(0,m.useEffect)(()=>{q()},[q]);let H=async t=>{try{if(!a)return;let o={litellm_params:{}};t.guardrail_name!==d.guardrail_name&&(o.guardrail_name=t.guardrail_name),t.default_on!==d.litellm_params?.default_on&&(o.litellm_params.default_on=t.default_on);let c=ec(d.litellm_params?.skip_system_message_in_guardrail),m=t.skip_system_message_choice;void 0!==m&&m!==c&&("inherit"===m?o.litellm_params.skip_system_message_in_guardrail=null:"yes"===m?o.litellm_params.skip_system_message_in_guardrail=!0:o.litellm_params.skip_system_message_in_guardrail=!1);let g=d.guardrail_info,h=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(g)!==JSON.stringify(h)&&(o.guardrail_info=h);let f=d.litellm_params?.pii_entities_config||{},y={};if(v.forEach(e=>{y[e]=N[e]||"MASK"}),JSON.stringify(f)!==JSON.stringify(y)&&(o.litellm_params.pii_entities_config=y),d.litellm_params?.guardrail==="litellm_content_filter"&&O){var l,r,i,s,n;let e,t=(l=R.current.patterns||[],r=R.current.blockedWords||[],i=R.current.categories||[],s=R.current.competitorIntentEnabled,n=R.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);o.litellm_params.patterns=t.patterns,o.litellm_params.blocked_words=t.blocked_words,o.litellm_params.categories=t.categories,o.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(d.litellm_params?.guardrail==="tool_permission"){let e=d.litellm_params?.rules||[],t=L.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(d.litellm_params?.default_action||"deny").toLowerCase(),r=(L.default_action||"deny").toLowerCase(),i=l!==r,s=(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(L.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=d.litellm_params?.violation_message_template||"",u=L.violation_message_template||"",p=m!==u;(F||a||i||c||p)&&(o.litellm_params.rules=t,o.litellm_params.default_action=r,o.litellm_params.on_disallowed_action=n,o.litellm_params.violation_message_template=u||null)}let j=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",j);let b=d.litellm_params?.guardrail==="tool_permission";if(x&&j&&!b){let e=x[ea[j]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=d.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?o.litellm_params[e]=a:null!=l&&""!==l&&(o.litellm_params[e]=null))})}if(0===Object.keys(o.litellm_params).length&&delete o.litellm_params,0===Object.keys(o).length){u.default.info("No changes detected"),_(!1);return}await (0,p.updateGuardrailCall)(a,e,o),u.default.success("Guardrail updated successfully"),P(!1),z(),_(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(f)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let J=e=>e?new Date(e).toLocaleString():"-",{logo:U,displayName:W}=ed(d.litellm_params?.guardrail||""),V=async(e,t)=>{await (0,tn.copyToClipboard)(e)&&(A(e=>({...e,[t]:!0})),setTimeout(()=>{A(e=>({...e,[t]:!1}))},2e3))},Y="config"===d.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(td.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(th.Title,{children:d.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eR.Text,{className:"text-gray-500 font-mono",children:d.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:I["guardrail-id"]?(0,l.jsx)(tf.CheckIcon,{size:12}):(0,l.jsx)(ty.CopyIcon,{size:12}),onClick:()=>V(d.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${I["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tu.TabGroup,{children:[(0,l.jsxs)(tp.TabList,{className:"mb-4",children:[(0,l.jsx)(tm.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(tm.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tx.TabPanels,{children:[(0,l.jsxs)(tg.TabPanel,{children:[(0,l.jsxs)(tc.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[U&&(0,l.jsx)("img",{src:U,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(th.Title,{children:W})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:d.litellm_params?.mode||"-"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:J(d.created_at)}),(0,l.jsxs)(eR.Text,{children:["Last Updated: ",J(d.updated_at)]})]})]})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsx)(eR.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(d.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eR.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(eN.default,{}):(0,l.jsx)(eC.StopOutlined,{}),String(t)]})})]},e))})]})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsx)(eq,{value:L,disabled:!0})}),d.litellm_params?.guardrail==="custom_code"&&d.litellm_params?.custom_code&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eR.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!Y&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:d.litellm_params.custom_code})})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(tg.TabPanel,{children:(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(th.Title,{children:"Guardrail Settings"}),Y&&(0,l.jsx)(ej.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})}),!j&&!Y&&(d.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>_(!0),children:"Edit Settings"}))]}),j?(0,l.jsxs)(r.Form,{form:b,onFinish:H,initialValues:{guardrail_name:d.guardrail_name,...(o={...d.litellm_params||{}},delete o.skip_system_message_in_guardrail,o),skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{label:"Skip system messages in guardrail",name:"skip_system_message_choice",tooltip:"Unified guardrails: omit role: system from guardrail input (LLM still gets full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),d.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:S&&(0,l.jsx)(eE,{entities:S.supported_entities,actions:S.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:S.pii_entity_categories})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!0,accessToken:a,onDataChange:G,onUnsavedChanges:P}),(d.litellm_params?.guardrail==="tool_permission"||x)&&(0,l.jsx)(eG.Divider,{orientation:"left",children:"Provider Settings"}),d.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eq,{value:L,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ey,{selectedProvider:Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail)||null,accessToken:a,providerParams:x,value:d.litellm_params}),x&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);if(!e)return null;let t=x[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:d.litellm_params}):null})()]}),(0,l.jsx)(eG.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{_(!1),P(!1),q()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:d.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:d.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Yes":"No"})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:J(d.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:J(d.updated_at)})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eq,{value:L,disabled:!0})]})]})})]})]}),(0,l.jsx)(tG,{visible:E,onClose:()=>M(!1),onSuccess:()=>{M(!1),z()},accessToken:a,editData:d?{guardrail_id:d.guardrail_id,guardrail_name:d.guardrail_name,litellm_params:d.litellm_params}:null})]})}],969641);var tz=e.i(573421),tD=e.i(19732),tK=e.i(928685),tq=e.i(166406),tH=e.i(637235),tJ=e.i(755151),tU=e.i(240647);let{Text:tW}=d.Typography,tV=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tk.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tH.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tq.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tH.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tY}=i.Input,{Text:tQ}=d.Typography,tX=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ej.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eD.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tq.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tY,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(e4.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tV,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[s,n]=(0,m.useState)(new Set),[o,c]=(0,m.useState)(""),[g,x]=(0,m.useState)([]),[f,y]=(0,m.useState)([]),[j,_]=(0,m.useState)(!1),b=e.filter(e=>e.guardrail_name?.toLowerCase().includes(o.toLowerCase())),v=async e=>{if(0===s.size||!a)return;_(!0),x([]),y([]);let t=[],l=[];await Promise.all(Array.from(s).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),x(t),y(l),_(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(h.Card,{className:"h-full",styles:{body:{padding:0,height:"100%"}},children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(i.Input,{prefix:(0,l.jsx)(tK.SearchOutlined,{}),placeholder:"Search guardrails...",value:o,onChange:e=>c(e.target.value)})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(eh.Spin,{})}):0===b.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(ez.Empty,{description:o?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(tz.List,{dataSource:b,renderItem:e=>(0,l.jsx)(tz.List.Item,{onClick:()=>{var t;let a;e.guardrail_name&&(t=e.guardrail_name,(a=new Set(s)).has(t)?a.delete(t):a.add(t),n(a))},style:{paddingLeft:24,paddingRight:16},className:`cursor-pointer hover:bg-gray-50 transition-colors ${s.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(tz.List.Item.Meta,{title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tD.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(d.Typography.Text,{className:"text-xs text-gray-600",children:[s.size," of ",b.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(d.Typography.Title,{level:2,className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===s.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tD.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tX,{guardrailNames:Array.from(s),onSubmit:v,results:g.length>0?g:null,errors:f.length>0?f:null,isLoading:j,onClose:()=>n(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tG],64352);let tZ="../ui/assets/logos/",t0=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tZ}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tZ}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tZ}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tZ}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tZ}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tZ}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tZ}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tZ}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tZ}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tZ}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tZ}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tZ}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tZ}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tZ}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tZ}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tZ}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tZ}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tZ}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tZ}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tZ}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tZ}akto.svg`,tags:["Security","Safety","Monitoring"]},{id:"promptguard",name:"PromptGuard",description:"AI security gateway with prompt injection detection, PII redaction, topic filtering, entity blocklists, and hallucination detection. Self-hostable with drop-in proxy integration.",category:"partner",logo:`${tZ}promptguard.svg`,tags:["Security","Prompt Injection","PII"],providerKey:"Promptguard",eval:{f1:94.9,precision:100,recall:90.4,testCases:5384,latency:"~150ms"}},{id:"xecguard",name:"XecGuard",description:"CyCraft XecGuard AI security gateway. Multi-policy scanning (prompt injection, harmful content, PII, system-prompt enforcement) plus RAG context grounding.",category:"partner",logo:`${tZ}xecguard.svg`,tags:["Security","Policy","Grounding","RAG"],providerKey:"Xecguard"}];e.s(["ALL_CARDS",0,t0],230312)},826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(464571),r=e.i(326373),i=e.i(653496),s=e.i(755151),n=e.i(646563),o=e.i(245094),d=e.i(764205),c=e.i(185357),m=e.i(782719),u=e.i(708347),p=e.i(969641),g=e.i(476993),x=e.i(727749),h=e.i(127952),f=e.i(180766);e.i(824296);var y=e.i(64352),j=e.i(311451),_=e.i(928685),b=e.i(266537),v=e.i(230312),w=e.i(826910);let N=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},C=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(N,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(w.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var S=e.i(447566);let k={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1},promptguard:{provider:"Promptguard",guardrailNameSuggestion:"PromptGuard",mode:"pre_call",defaultOn:!1},xecguard:{provider:"Xecguard",guardrailNameSuggestion:"XecGuard",mode:"pre_call",defaultOn:!1}},I=({card:e,onBack:r,accessToken:i,onGuardrailCreated:s})=>{let[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)("overview"),u=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],p=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],g=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:r,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(S.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(l.Button,{onClick:()=>o(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:g.map(e=>(0,t.jsx)("div",{onClick:()=>m(e.key),style:{padding:"12px 20px",fontSize:14,color:d===e.key?"#1a73e8":"#5f6368",borderBottom:d===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:d===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===d&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:u.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:p.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(c.default,{visible:n,onClose:()=>o(!1),accessToken:i,onSuccess:()=>{o(!1),s()},preset:k[e.id]})]})},A=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=v.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(I,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(j.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(_.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]})]})};var O=e.i(988846),P=e.i(837007),T=e.i(409797),L=e.i(54131),B=e.i(995926),F=e.i(678784),$=e.i(634831),E=e.i(438100),M=e.i(302202),R=e.i(328196),G=e.i(879664);e.s(["InfoIcon",()=>G.default],168118);var G=G,z=e.i(212931),D=e.i(808613),K=e.i(199133),q=e.i(663435),H=e.i(954616),J=e.i(912598),U=e.i(135214),W=e.i(243652);let V=async(e,t)=>{let a=(0,d.getProxyBaseUrl)(),l=`${a}/guardrails/register`,r=await fetch(l,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.json().catch(()=>({})),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return r.json()},Y=(0,W.createQueryKeys)("guardrails");function Q(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt: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),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let X={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{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"}},Z={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function ee({label:e,value:a,color:l}){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 ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function et({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function ea({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=X[e.status],c=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,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.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(M.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,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:o,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,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function el({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function er({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=X[e.status],y=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(B.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(el,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)($.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(el,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(E.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(G.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)($.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(F.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(B.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ei({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="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 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(F.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(R.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,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,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function es({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[c,m]=(0,a.useState)("all"),[u,p]=(0,a.useState)(null),[g,h]=(0,a.useState)(new Set),[f,y]=(0,a.useState)(null),[_,b]=(0,a.useState)(!0),[v,w]=(0,a.useState)(null),[N,C]=(0,a.useState)(""),[S,k]=(0,a.useState)(!1),[I]=D.Form.useForm(),A=(()=>{let{accessToken:e}=(0,U.default)(),t=(0,J.useQueryClient)();return(0,H.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return V(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:Y.all})}})})();(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let T=(0,a.useCallback)(async()=>{if(!e)return void b(!1);b(!0),w(null);try{let t="all"===c?void 0:"pending"===c?"pending_review":c,a=await (0,d.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(Q)),s(a.summary)}catch(e){w(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{b(!1)}},[e,c,N]);(0,a.useEffect)(()=>{T()},[T]);let L=l.find(e=>e.id===u)??null,B=i.total,F=i.pending_review,$=i.active,E=i.rejected;async function M(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),x.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{x.default.fromBackend("Failed to update forward API key")}}async function R(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),x.default.success("Static headers updated")}catch{x.default.fromBackend("Failed to update static headers")}}async function G(t,a){if(e)try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),x.default.success("Forward client headers updated")}catch{x.default.fromBackend("Failed to update forward client headers")}}async function W(t){if(e)try{await (0,d.approveGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail approved")}catch{x.default.fromBackend("Failed to approve guardrail")}}async function X(t){if(e)try{await (0,d.rejectGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail rejected")}catch{x.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${L?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ee,{label:"Total Submitted",value:B,color:"text-gray-900"}),(0,t.jsx)(ee,{label:"Pending Review",value:F,color:"text-yellow-600"}),(0,t.jsx)(ee,{label:"Active",value:$,color:"text-green-600"}),(0,t.jsx)(ee,{label:"Rejected",value:E,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)(O.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 guardrails...",value:n,onChange:e=>o(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-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:c,onChange:e=>m(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none 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",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>k(!0),className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)(P.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[_&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),v&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:v}),!_&&!v&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!_&&!v&&l.map(e=>(0,t.jsx)(ea,{guardrail:e,isSelected:u===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>p(u===e.id?null:e.id),onToggleForwardKey:()=>M(e.id),onToggleHeaders:()=>{var t;return t=e.id,void h(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>y({id:e.id,action:"approve"}),onReject:()=>y({id:e.id,action:"reject"})},e.id))]})]}),L&&(0,t.jsx)(er,{guardrail:L,onClose:()=>p(null),onApprove:()=>y({id:L.id,action:"approve"}),onReject:()=>y({id:L.id,action:"reject"}),onToggleForwardKey:()=>M(L.id),onUpdateCustomHeaders:e=>R(L.id,e),onUpdateExtraHeaders:e=>G(L.id,e)}),f&&(0,t.jsx)(ei,{action:f.action,guardrailName:l.find(e=>e.id===f.id)?.name??"",onConfirm:()=>"approve"===f.action?W(f.id):X(f.id),onCancel:()=>y(null)}),(0,t.jsxs)(z.Modal,{title:"Submit Guardrail for Review",open:S,onCancel:()=>{k(!1),I.resetFields()},onOk:()=>I.submit(),okText:"Submit for Review",children:[(0,t.jsx)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800 mb-4",children:"Your guardrail will be sent for admin review before it becomes active."}),(0,t.jsxs)(D.Form,{form:I,layout:"vertical",initialValues:{mode:"pre_call"},onFinish:async e=>{let t={...e.extra_litellm_params?JSON.parse(e.extra_litellm_params):{},guardrail:"generic_guardrail_api",mode:e.mode,api_base:e.api_base};try{await A.mutateAsync({team_id:e.team_id,guardrail_name:e.guardrail_name,litellm_params:t,guardrail_info:e.guardrail_info?JSON.parse(e.guardrail_info):void 0}),x.default.success("Guardrail submitted for review"),k(!1),I.resetFields(),T()}catch{}},children:[(0,t.jsx)(D.Form.Item,{label:"Team",name:"team_id",rules:[{required:!0,message:"Select a team"}],children:(0,t.jsx)(q.default,{})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Enter a guardrail name"}],children:(0,t.jsx)(j.Input,{placeholder:"e.g. pii-detection"})}),(0,t.jsx)(D.Form.Item,{label:"Mode",name:"mode",rules:[{required:!0,message:"Select a mode"}],children:(0,t.jsxs)(K.Select,{children:[(0,t.jsx)(K.Select.Option,{value:"pre_call",children:"Pre Call"}),(0,t.jsx)(K.Select.Option,{value:"post_call",children:"Post Call"}),(0,t.jsx)(K.Select.Option,{value:"during_call",children:"During Call"})]})}),(0,t.jsx)(D.Form.Item,{label:"API Base URL",name:"api_base",rules:[{required:!0,message:"Enter the API base URL"},{type:"url",message:"Must be a valid URL"}],children:(0,t.jsx)(j.Input,{placeholder:"https://your-guardrail-api.com/v1/check",className:"font-mono"})}),(0,t.jsx)(D.Form.Item,{label:"Additional litellm_params (optional)",name:"extra_litellm_params",tooltip:"JSON object merged into litellm_params. e.g. forward_api_key, headers, model, unreachable_fallback",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if("object"!=typeof e||Array.isArray(e))return Promise.reject("Must be a JSON object");return Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"forward_api_key": true, "headers": {"X-Custom": "value"}}'})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Info (optional)",name:"guardrail_info",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"description": "Detects PII in requests"}'})})]})]})]})}e.s(["default",0,({accessToken:e,userRole:j})=>{let[_,b]=(0,a.useState)([]),[v,w]=(0,a.useState)(!1),[N,C]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[I,O]=(0,a.useState)(!1),[P,T]=(0,a.useState)(null),[L,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),E=!!j&&(0,u.isAdminRole)(j),M=async()=>{if(e){k(!0);try{let t=await (0,d.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),b(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{k(!1)}}};(0,a.useEffect)(()=>{M()},[e]);let R=()=>{M()},G=async()=>{if(P&&e){O(!0);try{await (0,d.deleteGuardrailCall)(e,P.guardrail_id),x.default.success(`Guardrail "${P.guardrail_name}" deleted successfully`),await M()}catch(e){console.error("Error deleting guardrail:",e),x.default.fromBackend("Failed to delete guardrail")}finally{O(!1),B(!1),T(null)}}},z=P&&P.litellm_params?(0,f.getGuardrailLogoAndName)(P.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsx)(i.Tabs,{defaultActiveKey:"submitted",items:[...E?[{key:"garden",label:"Guardrail Garden",children:(0,t.jsx)(A,{accessToken:e,onGuardrailCreated:R})},{key:"guardrails",label:"Guardrails",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(r.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(n.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{F&&$(null),w(!0)}},{key:"custom_code",icon:(0,t.jsx)(o.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{F&&$(null),C(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(s.DownOutlined,{className:"ml-2"})]})})}),F?(0,t.jsx)(p.default,{guardrailId:F,onClose:()=>$(null),accessToken:e,isAdmin:E}):(0,t.jsx)(m.default,{guardrailsList:_,isLoading:S,onDeleteClick:(e,t)=>{T(_.find(t=>t.guardrail_id===e)||null),B(!0)},accessToken:e,onGuardrailUpdated:M,isAdmin:E,onGuardrailClick:e=>$(e)}),(0,t.jsx)(c.default,{visible:v,onClose:()=>{w(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(y.CustomCodeModal,{visible:N,onClose:()=>{C(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(h.default,{isOpen:L,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${P?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:P?.guardrail_name},{label:"ID",value:P?.guardrail_id,code:!0},{label:"Provider",value:z},{label:"Mode",value:P?.litellm_params.mode},{label:"Default On",value:P?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{B(!1),T(null)},onOk:G,confirmLoading:I})]})},{key:"playground",label:"Test Playground",disabled:!e,children:(0,t.jsx)(g.default,{guardrailsList:_,isLoading:S,accessToken:e,onClose:()=>{}})}]:[],{key:"submitted",label:"Submitted Guardrails",children:(0,t.jsx)(es,{accessToken:e})}]})})}],487304)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/656330759aeeb883.js b/litellm/proxy/_experimental/out/_next/static/chunks/17816faaae727f81.js similarity index 50% rename from litellm/proxy/_experimental/out/_next/static/chunks/656330759aeeb883.js rename to litellm/proxy/_experimental/out/_next/static/chunks/17816faaae727f81.js index 7ca4a61c78..4b48fc668b 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/656330759aeeb883.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/17816faaae727f81.js @@ -1,3 +1,3 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,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:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"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,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[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 ${a?"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 ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(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:l(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},i=(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}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,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 ${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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),x=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=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)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{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)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(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 a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{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 gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(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:[n(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:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{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)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`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)(d,{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)(o,{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 p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},m=(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}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(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:()=>n(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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({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 a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=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)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&m(`${i} blocked`,"red"),n>0&&m(`${n} masked`,"blue"),0===i&&0===n&&m("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&m(`${a.length} patterns`,"slate"),l.length>0&&m(`${l.length} keywords`,"slate"),r.length>0&&m(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",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.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{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)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",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.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:m(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(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"})]}),y=()=>(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"})]}),j=()=>(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"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(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:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(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:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded 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:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(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))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,x]=(0,s.useState)(!1),[m,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),x(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>x(!1))},[e,a]),(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)(b,{title:"EU AI Act",data:l,loading:o,error:m}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(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},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,C=()=>(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"})]}),T=({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"})]}),L=({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"})]}),M=()=>(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"})]}),A=()=>(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"})}),D=({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"})}),E=()=>(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"})}),I=({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 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,z=({response:e})=>{let[a,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(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(D,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},O=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);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:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(A,{}):"llm"===e.type?(0,t.jsx)(M,{}):e.isSuccess?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),m=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(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))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} 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:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),(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:m}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),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 text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(D,{expanded:n})]})]}),n&&(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)(I,{matchDetails:e.match_details}),c>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 text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(x,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(z,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm 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)(C,{}),(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:[r.length," guardrail",1!==r.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 ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(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,i," 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(r,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)(E,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,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)(O,{entries:r})}),(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:r.map((e,s)=>(0,t.jsx)(R,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},93648,245767,313793,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(560445),l=e.i(207082),r=e.i(135214),i=e.i(500330),n=e.i(871943),o=e.i(360820),d=e.i(94629),c=e.i(152990),x=e.i(682830),m=e.i(269200),u=e.i(942232),p=e.i(977572),h=e.i(427612),g=e.i(64848),f=e.i(496020),y=e.i(592968);function j({keys:e,totalCount:a,isLoading:l,isFetching:r,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,i.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,c.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),getPaginationRowModel:(0,x.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[l||r?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[l||r?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:l||r||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:l||r||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:l||r?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function b(){let{premiumUser:e}=(0,r.default)(),[i,n]=(0,s.useState)(0),[o]=(0,s.useState)(50),{data:d,isPending:c,isFetching:x}=(0,l.useDeletedKeys)(i+1,o);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(j,{keys:d?.keys||[],totalCount:d?.total_count||0,isLoading:c,isFetching:x,pageIndex:i,pageSize:o,onPageChange:n})]})}e.s(["default",()=>b],93648);var v=e.i(785242),_=e.i(389083),N=e.i(599724),w=e.i(355619);function S({teams:e,isLoading:a,isFetching:l}){let[r,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),b=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,i.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(_.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,w.getModelDisplayName)(e).slice(0,30)}...`:(0,w.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(_.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(N.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],v=(0,c.useReactTable)({data:e,columns:b,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:r},onSortingChange:j,getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||l?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:v.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:v.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${v.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:a||l?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?v.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function k(){let{premiumUser:e}=(0,r.default)(),{data:s,isPending:l,isFetching:i}=(0,v.useDeletedTeams)(1,100);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(S,{teams:s||[],isLoading:l,isFetching:i})]})}e.s(["default",()=>k],245767);var C=e.i(663435);e.s(["default",0,({value:e,onChange:s})=>(0,t.jsx)(C.default,{value:e,onChange:s})],313793);var T=e.i(625901),L=e.i(56456),M=e.i(152473),A=e.i(199133),D=e.i(770914);let{Text:E}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[x,m]=(0,M.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,T.useInfiniteModelInfo)(i,x||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(A.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),m(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(L.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(D.Space,{direction:"vertical",children:[(0,t.jsxs)(D.Space,{direction:"horizontal",children:[(0,t.jsx)(E,{strong:!0,children:"Model name:"}),(0,t.jsx)(E,{ellipsis:!0,children:s})]}),(0,t.jsxs)(E,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(E,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(L.LoadingOutlined,{spin:!0})})]})})}],291950)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),x=e.i(482725),m=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.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(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function D({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,D]=(0,s.useState)(""),[E,I]=(0,s.useState)(""),[z,O]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,E,z,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:E||void 0,action:z||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../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"}})]});let K=$.data?.audit_logs??[],W=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{D(e),_(1)},onChange:e=>{e.target.value||(D(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{O(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{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"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(m.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:W,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(x.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>D],942161)},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},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 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"}]])},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.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"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.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"})}),x=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),m=({count:e})=>(0,t.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,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.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,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.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,t.jsx)(x,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(m,{});let f=(0,t.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,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(x,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:e?()=>(0,t.jsx)(h,{label:"TTFT (s)",field:"ttft_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:e?()=>(0,t.jsx)(h,{label:"Model",field:"model",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({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 flex-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",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 border border-blue-200 text-xs font-mono overflow-auto",children:`general_settings: +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,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:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"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,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[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 ${a?"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 ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(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:l(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},i=(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}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,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 ${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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),x=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=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)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{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)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(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 a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{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 gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(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:[n(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:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{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)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`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)(d,{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)(o,{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 p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},m=(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}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(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:()=>n(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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({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 a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=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)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&m(`${i} blocked`,"red"),n>0&&m(`${n} masked`,"blue"),0===i&&0===n&&m("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&m(`${a.length} patterns`,"slate"),l.length>0&&m(`${l.length} keywords`,"slate"),r.length>0&&m(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",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.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{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)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",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.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:m(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(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"})]}),y=()=>(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"})]}),j=()=>(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"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(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:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(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:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded 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:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(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))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,x]=(0,s.useState)(!1),[m,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),x(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>x(!1))},[e,a]),(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)(b,{title:"EU AI Act",data:l,loading:o,error:m}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(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},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,T=()=>(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"})]}),C=({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"})]}),L=({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"})]}),E=()=>(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"})]}),M=()=>(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"})}),A=({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"})}),D=()=>(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"})}),R=({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 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,O=({response:e})=>{let[a,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(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(A,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},I=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);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:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(M,{}):"llm"===e.type?(0,t.jsx)(E,{}):e.isSuccess?(0,t.jsx)(C,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),m=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(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))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} 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:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(C,{}):(0,t.jsx)(L,{})}),(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:m}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),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 text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(A,{expanded:n})]})]}),n&&(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)(R,{matchDetails:e.match_details}),c>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 text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(x,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(O,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm 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)(T,{}),(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:[r.length," guardrail",1!==r.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 ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(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,i," 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(r,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)(D,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,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)(I,{entries:r})}),(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:r.map((e,s)=>(0,t.jsx)(z,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},93648,245767,313793,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(560445),l=e.i(207082),r=e.i(135214),i=e.i(500330),n=e.i(871943),o=e.i(360820),d=e.i(94629),c=e.i(152990),x=e.i(682830),m=e.i(269200),u=e.i(942232),p=e.i(977572),h=e.i(427612),g=e.i(64848),f=e.i(496020),y=e.i(592968);function j({keys:e,totalCount:a,isLoading:l,isFetching:r,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,i.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],T=(0,c.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),getPaginationRowModel:(0,x.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:C}=T.getState().pagination,L=C*b+1,E=Math.min((C+1)*b,a),M=`${L} - ${E}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[l||r?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",M," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[l||r?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",C+1," of ",T.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>T.previousPage(),disabled:l||r||!T.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>T.nextPage(),disabled:l||r||!T.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:T.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:T.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${T.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:l||r?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?T.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function b(){let{premiumUser:e}=(0,r.default)(),[i,n]=(0,s.useState)(0),[o]=(0,s.useState)(50),{data:d,isPending:c,isFetching:x}=(0,l.useDeletedKeys)(i+1,o);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(j,{keys:d?.keys||[],totalCount:d?.total_count||0,isLoading:c,isFetching:x,pageIndex:i,pageSize:o,onPageChange:n})]})}e.s(["default",()=>b],93648);var v=e.i(785242),_=e.i(389083),N=e.i(599724),w=e.i(355619);function S({teams:e,isLoading:a,isFetching:l}){let[r,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),b=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,i.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(_.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,w.getModelDisplayName)(e).slice(0,30)}...`:(0,w.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(_.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(N.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],v=(0,c.useReactTable)({data:e,columns:b,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:r},onSortingChange:j,getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||l?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:v.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:v.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${v.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:a||l?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?v.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function k(){let{premiumUser:e}=(0,r.default)(),{data:s,isPending:l,isFetching:i}=(0,v.useDeletedTeams)(1,100);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(S,{teams:s||[],isLoading:l,isFetching:i})]})}e.s(["default",()=>k],245767);var T=e.i(663435);e.s(["default",0,({value:e,onChange:s})=>(0,t.jsx)(T.default,{value:e,onChange:s})],313793);var C=e.i(625901),L=e.i(56456),E=e.i(152473),M=e.i(199133),A=e.i(770914);let{Text:D}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[x,m]=(0,E.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,C.useInfiniteModelInfo)(i,x||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(M.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),m(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(L.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(A.Space,{direction:"vertical",children:[(0,t.jsxs)(A.Space,{direction:"horizontal",children:[(0,t.jsx)(D,{strong:!0,children:"Model name:"}),(0,t.jsx)(D,{ellipsis:!0,children:s})]}),(0,t.jsxs)(D,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(D,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(L.LoadingOutlined,{spin:!0})})]})})}],291950)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),x=e.i(482725),m=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.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(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function T({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function C({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(T,{log:a})]})]})}let{Search:L}=n.Input,E={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},M={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function A({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[T,A]=(0,s.useState)(""),[D,R]=(0,s.useState)(""),[O,I]=(0,s.useState)(void 0),[z,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[H,q]=(0,s.useState)(!1),Y=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,T,D,O,z],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:T||void 0,object_team_id:D||void 0,action:O||void 0,table_name:z||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),K=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:M[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>E[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../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"}})]});let $=Y.data?.audit_logs??[],U=Y.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{R(e),_(1)},onChange:e=>{e.target.value||(R(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{A(e),_(1)},onChange:e=>{e.target.value||(A(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{I(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{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"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(m.ReloadOutlined,{spin:Y.isFetching}),onClick:()=>Y.refetch(),disabled:Y.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:U,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:K,dataSource:$,rowKey:"id",loading:{spinning:Y.isLoading,indicator:(0,t.jsx)(x.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),q(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(C,{open:H,onClose:()=>q(!1),log:B})]})}e.s(["default",()=>A],942161)},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},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 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"}]])},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.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"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.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"})}),x=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),m=({count:e})=>(0,t.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,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.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,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.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,t.jsx)(x,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(m,{});let f=(0,t.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,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(x,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:e?()=>(0,t.jsx)(h,{label:"TTFT (s)",field:"ttft_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:e?()=>(0,t.jsx)(h,{label:"Model",field:"model",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({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 flex-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",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 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])},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o,rawInputTokens:d,cacheReadTokens:c,cacheCreationTokens:x})=>{let m=o?.toLowerCase()==="true",u=void 0!==i||void 0!==n,p=e?.input_cost!==void 0||e?.output_cost!==void 0,h=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(p||u||h||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 g=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),f=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),y=m?0:e?.input_cost,j=m?0:e?.output_cost,b=m?0:e?.original_cost,v=m?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.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:[l(a),m&&" (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=m?0:(y??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:[l(s),null!=d&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",d.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:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_read_cost),(c??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(c??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:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_creation_cost),(x??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(x??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:[l(y),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.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:[l(j),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.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:l(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:l(s)})]},e))]}),!m&&(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:l(b)})]})}),(g||f)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[g&&(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 (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(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:["-",l(e.discount_amount)]})]})]}),f&&(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 (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((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:["+",l(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:[l(v),m&&" (Cached)"]})]})})]})}]})})}])},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",x="Model",m="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[x]:"",[m]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[D,E]=(0,t.useState)(null),I=(0,t.useRef)(0),z=(0,t.useRef)(M),O=(0,t.useRef)(!1),R=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[m]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[x]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&E({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),E({data:[],total:0,page:1,page_size:v,total_pages:0})}},[y,j,b,_,v,k,C]),P=(0,t.useMemo)(()=>(0,i.default)((e,t)=>R(e,t),300),[R]);(0,t.useEffect)(()=>()=>P.cancel(),[P]);let B=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[m]||M[u]||M[g]||M[f]||M[x]),[M]);(0,t.useEffect)(()=>{z.current=M,O.current=B},[M,B]),(0,t.useEffect)(()=>{O.current&&y&&(P.cancel(),R(z.current,T))},[k,C,T,j,b,_]);let F=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:v,total_pages:0};if(B)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[x]&&(t=t.filter(e=>e.model_id===M[x])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,B]),q=(0,t.useMemo)(()=>B?null!==D?D:{data:[],total:0,page:1,page_size:v,total_pages:0}:F,[B,D,F]),{data:H}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y}),$=(0,t.useCallback)((e=T)=>{B&&y&&(P.cancel(),R(M,e))},[B,y,M,T,R,P]);return{filters:M,filteredLogs:q,hasBackendFilters:B,allTeams:H,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),E(null),P(s,1)),s})},handleFilterReset:()=>{A(L),E(null),P.cancel(),N(1)},refetchWithFilters:$}}e.s(["useLogFilterLogic",()=>y],504809)},894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.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",()=>a],283086);let l=(0,s.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",()=>l],195116)},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,x=e.i(755151),m=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(x.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,m.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,m.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},869939,e=>{"use strict";var t=e.i(843476),s=e.i(175712),a=e.i(262218),l=e.i(291542),r=e.i(898586),i=e.i(770914),n=e.i(592968),o=e.i(245704),d=e.i(518617),c=e.i(19732);let{Text:x}=r.Typography;function m({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)(c.ExperimentOutlined,{style:{fontSize:16,color:"#6366f1"}}),(0,t.jsx)(x,{strong:!0,style:{fontSize:15},children:"LLM Judge Results"})]}),s.map((e,s)=>(0,t.jsx)(u,{entry:e},e.eval_id||s))]}):null}function u({entry:e}){let r=e.passed,c=r?"#52c41a":"#ff4d4f",m=(e.verdicts||[]).filter(e=>"overall"!==(e.criterion_name||"").toLowerCase()),u=[{title:"Criterion",dataIndex:"criterion_name",key:"criterion_name",width:160,render:e=>(0,t.jsx)(x,{strong:!0,style:{whiteSpace:"nowrap"},children:e})},{title:"Weight",dataIndex:"weight",key:"weight",width:65,render:e=>null!=e?(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:[e,"%"]}):null},{title:"Score",dataIndex:"score",key:"score",width:65,render:e=>(0,t.jsx)(x,{style:{color:e>=70?"#52c41a":e>=50?"#faad14":"#ff4d4f",fontWeight:600},children:e})},{title:(0,t.jsx)(n.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 a=s.score*s.weight/100;return(0,t.jsx)(x,{type:"secondary",style:{fontSize:12},children:a%1==0?a:a.toFixed(1)})}},{title:"Comment",dataIndex:"reasoning",key:"reasoning",ellipsis:{showTitle:!1},render:e=>(0,t.jsx)(n.Tooltip,{title:e,children:(0,t.jsx)("span",{style:{fontSize:12},children:e})})}];return(0,t.jsxs)(s.Card,{size:"small",className:"mb-3",style:{borderLeft:`3px solid ${c}`},title:(0,t.jsxs)(i.Space,{children:[r?(0,t.jsx)(o.CheckCircleOutlined,{style:{color:"#52c41a"}}):(0,t.jsx)(d.CloseCircleOutlined,{style:{color:"#ff4d4f"}}),(0,t.jsx)(x,{strong:!0,children:e.eval_name}),(0,t.jsx)(a.Tag,{color:r?"success":"error",children:r?"PASSED":"FAILED"}),(0,t.jsx)(n.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)(x,{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)(i.Space,{size:"small",children:[e.judge_model&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Judge: ",e.judge_model]}),null!=e.iteration&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Iter: ",e.iteration+1]})]}),children:[e.eval_error&&(0,t.jsxs)(x,{type:"warning",style:{display:"block",marginBottom:8,fontSize:12},children:["Judge error: ",e.eval_error]}),m.length>0?(0,t.jsx)(l.Table,{dataSource:m,columns:u,pagination:!1,size:"small",rowKey:"criterion_name",scroll:{x:!0},summary:()=>{if(!m.some(e=>null!=e.weight))return null;let e=m.reduce((e,t)=>e+(null!=t.weight?t.score*t.weight/100:0),0);return(0,t.jsxs)(l.Table.Summary.Row,{children:[(0,t.jsx)(l.Table.Summary.Cell,{index:0,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12},children:"Total"})}),(0,t.jsx)(l.Table.Summary.Cell,{index:1}),(0,t.jsx)(l.Table.Summary.Cell,{index:2}),(0,t.jsx)(l.Table.Summary.Cell,{index:3,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12,color:c},children:e%1==0?e:e.toFixed(1)})}),(0,t.jsx)(l.Table.Summary.Cell,{index:4})]})}}):(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Score: ",e.overall_score?.toFixed(1)," — no per-criterion breakdown available."]})]})}e.s(["default",()=>m])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),x=e.i(195116),m=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(869939),M=e.i(70635),A=e.i(70969),D=e.i(916925);function E({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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 i,n;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:a}=(0,D.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(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:r(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:r(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:(i=e.start_time,n=e.end_time,`${((n-i)*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,r)=>{let i=a[`${s}-${r}`]||!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}-${r}`,void l(t=>({...t,[e]:!t[e]}))},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)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+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)})]})]})]}),i&&(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",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>E],331052);var I=e.i(592968),z=e.i(207066);let{Text:O}=g.Typography;function R({value:e,maxWidth:s=z.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(I.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:z.FONT_FAMILY_MONO,fontSize:z.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:P}=g.Typography;function B({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(P,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let F=e=>!!e&&e instanceof Date,q=e=>"object"==typeof e&&null!==e,H=e=>!!e&&e instanceof Object&&"function"==typeof e;function $(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function Y(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:x,outerRef:m,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},$(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!m.current)return;let s=m.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=m.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:S,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)&&(x?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},$(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},$(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(U,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:x,beforeExpandChange:u,outerRef:m}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function K(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function W(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function V(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=F(l)?l.toISOString():H(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},$(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function U(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(W,Object.assign({},e)):!q(t)||F(t)||H(t)?(0,s.createElement)(V,Object.assign({},e)):(0,s.createElement)(K,Object.assign({},e))}let G={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},J=()=>!0,Q=e=>{let{data:t,style:a=G,shouldExpandNode:l=J,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&q(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(U,{key:t,field:t,value:n,style:{...G,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(U,{value:t,style:{...G,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>Q,"defaultStyles",()=>G],867612);let{Text:X}=g.Typography;function Z({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:z.JSON_MAX_HEIGHT,overflow:"auto",background:z.COLOR_BG_LIGHT,padding:z.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(Q,{data:e,style:G,clickToExpandNode:!0})})}):(0,t.jsx)(X,{type:"secondary",children:"No data"})}function ee(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function et(e){return Array.isArray(e)?e:e?[e]:[]}function es(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var ea=e.i(366308),el=e.i(755151),er=e.i(291542);let{Text:ei}=g.Typography;function en({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})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(ei,{code:!0,children:[e,s.required&&(0,t.jsx)(ei,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(ei,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(ei,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(ei,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(ei,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(er.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(ei,{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 eo({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:ed}=g.Typography;function ec({tool:e}){let[a,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)(ed,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(en,{tool:e}):(0,t.jsx)(eo,{tool:e})]})}let{Text:ex}=g.Typography;function em({tool:e}){let[a,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(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(ea.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ex,{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"}),a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ec,{tool:e})})]})}let{Text:eu}=g.Typography;function ep({log:e}){let s=function(e){let t,s=!(t=es(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 a=function(e){let t=es(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(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.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:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eu,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(eu,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let eh=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eg=e.i(888259),ef=e.i(264843),ey=e.i(624001);let{Text:ej}=g.Typography;function eb({type:e,tokens:s,cost:l,onCopy:r,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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(ef.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ej,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(I.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:ev}=g.Typography;function e_({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(ev,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(ev,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(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,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:eN}=g.Typography;function ew({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)(eN,{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)(eN,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(eN,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:eS}=g.Typography;function ek({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(eS,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(ew,{tool:e,compact:l},e.id||s))})]}):null}let{Text:eC}=g.Typography;function eT({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(eC,{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: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,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(ek,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eL({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=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)(eb,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eg.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(e_,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eT,{messages:c}),d&&(0,t.jsx)(ek,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eM}=g.Typography;function eA({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eg.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(ek,{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)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eM,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eD=e.i(782273),eE=e.i(313603),eI=e.i(793916);let{Text:ez}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(eR,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eP,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.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 eR({session:e,turnCount:a}){let[l,r]=(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:()=>r(!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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eE.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(ez,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(ez,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eD.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)(eI.AudioOutlined,{}):(0,t.jsx)(ef.MessageOutlined,{})," ",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)(eH,{label:"Model",value:e.model}),(0,t.jsx)(eH,{label:"Voice",value:e.voice}),(0,t.jsx)(eH,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eH,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eH,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eH,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eH,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eH,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(ez,{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 eP({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:l?.completion_tokens??n,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:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eB,{response:e,index:s},e.id||s))})})]})}function eB({response:e,index:s}){let a=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)(ez,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(I.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(ez,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eF,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eq,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eq,{label:"Output",details:l.output_token_details})]})}function eF({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)(ez,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eI.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(ef.MessageOutlined,{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:a})]},s):null})]}):null}function eq({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(ez,{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:a.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 eH({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(ez,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function e$({request:e,response:s,metrics:a}){let l,r,i;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)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&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})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:eh(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eL,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eA,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:eY}=g.Typography;function eK({logEntry:e,isLoadingDetails:s=!1,accessToken:a}){var l,r;let i=e.metadata||{},n="failure"===i.status,o=n?i.error_information:null,d=!!(l=e.messages)&&(Array.isArray(l)?l.length>0:"object"==typeof l&&Object.keys(l).length>0),c=!!(r=e.response)&&Object.keys(ee(r)).length>0,x=!d&&!c&&!n&&!s,m=i?.guardrail_information,u=et(m),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`,j=i?.eval_information,b=i.vector_store_request_metadata&&Array.isArray(i.vector_store_request_metadata)&&i.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${z.DRAWER_CONTENT_PADDING} ${z.DRAWER_CONTENT_PADDING} 0`},children:[n&&o&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eW,{errorInfo:o}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eV,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(R,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(R,{value:e.api_base,maxWidth:z.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),p&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eU,{label:g,maskedCount:h})})]})})}),(0,t.jsx)(eG,{logEntry:e,metadata:i}),(0,t.jsx)(M.CostBreakdownViewer,{costBreakdown:i?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit,rawInputTokens:i?.additional_usage_values?.prompt_tokens_details?.text_tokens,cacheReadTokens:i?.additional_usage_values?.cache_read_input_tokens,cacheCreationTokens:i?.additional_usage_values?.cache_creation_input_tokens}),(0,t.jsx)(ep,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(A.ConfigInfoMessage,{show:x})}),s?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eJ,{hasResponse:c,hasError:n,getRawRequest:()=>ee(e.proxy_server_request||e.messages),getFormattedResponse:()=>n&&o?{error:{message:o.error_message||"An error occurred",type:o.error_class||"error",code:o.error_code||"unknown",param:null}}:ee(e.response),logEntry:e}),p&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:m,accessToken:a??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),null!=j&&(0,t.jsx)(L.default,{data:j}),b&&(0,t.jsx)(E,{data:i.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eX,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:z.DRAWER_CONTENT_PADDING}})]})}function eW({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eV({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(eY,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:z.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eU({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:z.SPACING_MEDIUM,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"]})]})}function eG({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default",o=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),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Input Tokens",children:(0,C.formatNumberWithCommas)(o)}),(0,t.jsx)(f.Descriptions.Item,{label:"Output Tokens",children:(0,C.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(B,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.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)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.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)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eJ({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(z.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),x=i.spend??0,m=i.prompt_tokens||0,u=i.completion_tokens||0,p=m+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?x*m/p:0,y=g?h.output_cost??0:p>0?x*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(e$,{request:l(),response:r(),metrics:{prompt_tokens:m,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(eY,{copyable:{text:JSON.stringify(n===z.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===z.TAB_RESPONSE&&!e&&!a}),items:[{key:z.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:(0,t.jsx)(Z,{data:l(),mode:"formatted"})})},{key:z.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:e||a?(0,t.jsx)(Z,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eQ({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 eX({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eY,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:z.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:z.FONT_SIZE_SMALL,fontFamily:z.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eZ=e.i(764205),e0=e.i(266027),e1=e.i(135214);function e2({row:e,isSelected:s,onClick:a}){let l=m.MCP_CALL_TYPES.includes(e.call_type),r=m.AGENT_CALL_TYPES.includes(e.call_type),i=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:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(x.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(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:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.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]})]})}function e5({open:e,onClose:d,logEntry:c,sessionId:x,accessToken:u,allLogs:g=[],onSelectLog:f,startTime:y}){let j=!!x,[b,v]=(0,s.useState)(null),[_,N]=(0,s.useState)(!1),[w,S]=(0,s.useState)(!1),{data:k=[]}=(0,e0.useQuery)({queryKey:["sessionLogs",x],queryFn:async()=>{if(!x||!u)return[];let e=await (0,eZ.sessionSpendLogsCall)(u,x);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!m.MCP_CALL_TYPES.includes(e.call_type),a=+!!m.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&j&&x&&u)}),T=(0,s.useMemo)(()=>j?k.length?b?k.find(e=>e.request_id===b)||k[0]:c?.request_id&&k.find(e=>e.request_id===c.request_id)||k[0]:null:c,[j,c,b,k]);(0,s.useEffect)(()=>{j&&k.length&&(b&&k.some(e=>e.request_id===b)||v(c?.request_id&&k.some(e=>e.request_id===c.request_id)?c.request_id:k[0].request_id))},[j,c,b,k]),(0,s.useEffect)(()=>{e?N(!1):(j&&v(null),S(!1))},[e,j]);let{selectNextLog:L,selectPreviousLog:M}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:T,allLogs:j?k:g,onClose:d,onSelectLog:e=>{j&&v(e.request_id),f?.(e)}}),A=((e,t,s)=>{let{accessToken:a}=(0,e1.default)();return(0,e0.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eZ.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(T?.request_id,y,e&&!!T?.request_id),D=A.data,E=A.isLoading,I=(0,s.useMemo)(()=>T?{...T,messages:D?.messages||T.messages,response:D?.response||T.response,proxy_server_request:D?.proxy_server_request||T.proxy_server_request}:null,[T,D]),O=T?.metadata||{},R="failure"===O.status?"Failure":"Success",P="failure"===O.status?"error":"success",B=O?.user_api_key_team_alias||"default",F=k.reduce((e,t)=>e+(t.spend||0),0),q=k.length>0?new Date(Math.min(...k.map(e=>new Date(e.startTime).getTime()))):null,H=k.length>0?new Date(Math.max(...k.map(e=>new Date(e.endTime).getTime()))):null,$=q&&H?((H.getTime()-q.getTime())/1e3).toFixed(2):"0.00",Y=k.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,K=k.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,W=k.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length,V=j?k:T?[T]:[],U=j?x||"":T?.request_id||"",G=U.length>14?`${U.slice(0,11)}...`:U,J=async()=>{if(U)try{await navigator.clipboard.writeText(U),S(!0),setTimeout(()=>S(!1),1200)}catch{}};return T&&I?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:z.DRAWER_WIDTH,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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>N(!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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>N(!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:j?"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:G}),(0,t.jsx)("button",{type:"button",onClick:J,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:w?(0,t.jsx)(r.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:[V.length," req",[j?Y:V.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?K:V.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?W:V.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),j?(0,C.getSpendString)(F):(0,C.getSpendString)(T.spend||0),j&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),$,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[et(O?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eQ,{guardrailEntries:et(O?.guardrail_information)})}),j?(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"}),V.map((e,s)=>{let a=s===V.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"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e2,{row:e,isSelected:e.request_id===T.request_id,onClick:()=>{v(e.request_id),f?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:V.map(e=>(0,t.jsx)(e2,{row:e,isSelected:e.request_id===T.request_id,onClick:()=>f?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:T,onClose:d,onPrevious:M,onNext:L,statusLabel:R,statusColor:P,environment:B}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eK,{logEntry:I,isLoadingDetails:E,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e5],502626),e.s([],3565)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(772345),o=e.i(793130),d=e.i(197647),c=e.i(653824),x=e.i(881073),m=e.i(404206),u=e.i(723731),p=e.i(464571),h=e.i(708347),g=e.i(93648),f=e.i(245767),y=e.i(313793),j=e.i(50882),b=e.i(291950),v=e.i(969550),_=e.i(764205),N=e.i(20147),w=e.i(942161),S=e.i(245099);e.i(70969);var k=e.i(97859);e.i(70635),e.i(339086);var C=e.i(504809);e.i(3565);var T=e.i(502626);e.i(727749),e.i(867612);var L=e.i(149121);function M({accessToken:e,token:M,userRole:A,userID:D,premiumUser:E}){let[I,z]=(0,i.useState)(""),[O,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),$=(0,i.useRef)(null),Y=(0,i.useRef)(null),K=(0,i.useRef)(null),[W,V]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[U,G]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)(!1),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(""),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,ex]=(0,i.useState)(null),[em,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(""),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(A&&h.internalUserRoles.includes(A)),[eb,ev]=(0,i.useState)("request logs"),[e_,eN]=(0,i.useState)(null),[ew,eS]=(0,i.useState)(!1),[ek,eC]=(0,i.useState)(null),[eT,eL]=(0,i.useState)("startTime"),[eM,eA]=(0,i.useState)("desc"),[eD,eE]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eI,ez]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eI))},[eI]);let[eO,eR]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{em&&e&&ex({...(await (0,_.keyInfoV1Call)(e,em)).info,token:em,api_key:em})})()},[em,e]),(0,i.useEffect)(()=>{function e(e){$.current&&!$.current.contains(e.target)&&B(!1),Y.current&&!Y.current.contains(e.target)&&R(!1),K.current&&!K.current.contains(e.target)&&Z(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{A&&h.internalUserRoles.includes(A)&&ej(!0)},[A]);let eP=(0,a.useQuery)({queryKey:["logs","table",F,H,W,U,el,ei,ey?D:null,ep,eo,eT,eM],queryFn:async()=>{if(!e||!M||!A||!D)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(W).utc().format("YYYY-MM-DD HH:mm:ss"),s=J?(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,_.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:ei||void 0,team_id:el||void 0,user_id:ey?D??void 0:void 0,end_user:eg||void 0,status_filter:ep||void 0,model_id:eo||void 0,sort_by:eT,sort_order:eM}})},enabled:!!e&&!!M&&!!A&&!!D&&"request logs"===eb&&eD,refetchInterval:!!eI&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),eB=(0,i.useDeferredValue)(eP.isFetching),eF=eP.isFetching||eB,eq=eP.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eH,filteredLogs:e$,hasBackendFilters:eY,allTeams:eK,handleFilterChange:eW,handleFilterReset:eV,refetchWithFilters:eU}=(0,C.useLogFilterLogic)({logs:eq,accessToken:e,startTime:W,endTime:U,pageSize:H,isCustomDate:J,setCurrentPage:q,userID:D,userRole:A,sortBy:eT,sortOrder:eM,currentPage:F}),eG=(0,i.useCallback)(()=>{eV(),V((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),Q(!1),eR({value:24,unit:"hours"}),q(1)},[eV]);if((0,i.useEffect)(()=>{eE(!eY)},[eY]),(0,i.useEffect)(()=>{e&&(eH["Team ID"]?er(eH["Team ID"]):er(""),eh(eH.Status||""),ed(eH.Model||""),ef(eH["End User"]||""),en(eH["Key Hash"]||""))},[eH,e]),!e||!M||!A||!D)return null;let eJ=e$.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),eQ=eJ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),k.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:k.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),eX=new Map;for(let e of eJ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=k.MCP_CALL_TYPES.includes(e.call_type),s=eX.get(e.session_id);s&&(!s.isMcp||t)||eX.set(e.session_id,{requestId:e.request_id,isMcp:t})}let eZ=eJ.map(e=>{let t=e.session_id?eQ[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eu(e),onSessionClick:t=>{t&&(eC(t),eN(e),eS(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||eX.get(e.session_id)?.requestId===e.request_id)||[],e0=[{name:"Team ID",label:"Team ID",customComponent:y.default},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:b.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:j.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,_.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return k.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=k.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!k.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e1=k.QUICK_SELECT_OPTIONS.find(e=>e.value===eO.value&&e.unit===eO.unit),e2=J?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"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=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(J,W,U):e1?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(c.TabGroup,{defaultIndex:0,onIndexChange:e=>ev(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(d.Tab,{children:"Request Logs"}),(0,t.jsx)(d.Tab,{children:"Audit Logs"}),(0,t.jsx)(d.Tab,{children:"Deleted Keys"}),(0,t.jsx)(d.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(u.TabPanels,{children:[(0,t.jsxs)(m.TabPanel,{children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"})}),ec&&em&&ec.api_key===em?(0,t.jsx)(N.default,{keyId:em,keyData:ec,teams:eK??[],onClose:()=>eu(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{options:e0,onApplyFilters:eW,onResetFilters:eG}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>z(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:K,children:[(0,t.jsxs)("button",{onClick:()=>Z(!X),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",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:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e2]}),X&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[k.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e2===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),V((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eR({value:e.value,unit:e.unit}),Q(!1),Z(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${J?"bg-blue-50 text-blue-600":""}`,onClick:()=>Q(!J),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(o.Switch,{color:"green",checked:eI,defaultChecked:!0,onChange:ez})]}),{}),(0,t.jsx)(p.Button,{type:"default",icon:(0,t.jsx)(n.SyncOutlined,{spin:eF}),onClick:()=>{eY?eU():eP.refetch()},disabled:eF,title:"Fetch data",children:eF?"Fetching":"Fetch"})]}),J&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:W,onChange:e=>{V(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eP.isLoading?"...":e$?(F-1)*H+1:0," -"," ",eP.isLoading?"...":e$?Math.min(F*H,e$.total):0," ","of ",eP.isLoading?"...":e$?e$.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eP.isLoading?"...":F," of"," ",eP.isLoading?"...":e$?e$.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eP.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(e$.total_pages||1,e+1)),disabled:eP.isLoading||F===(e$.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eI&&1===F&&eD&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>ez(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(L.DataTable,{columns:(0,S.createColumns)({sortBy:eT,sortOrder:eM,onSortChange:(e,t)=>{eL(e),eA(t),q(1)}}),data:eZ,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eC(e.session_id),eN(e),eS(!0);return}eC(null),eN(e),eS(!0)},isLoading:eP.isLoading})]})]})]}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(w.default,{userID:D,userRole:A,token:M,accessToken:e,isActive:"audit logs"===eb,premiumUser:E})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(g.default,{})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(f.default,{})})]})]}),(0,t.jsx)(T.LogDetailsDrawer,{open:ew,onClose:()=>{eS(!1),eC(null)},logEntry:e_,sessionId:ek,accessToken:e,allLogs:eZ,onSelectLog:e=>{eN(e)},startTime:(0,r.default)(W).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>M],936190)}]); \ No newline at end of file + 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])},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o,rawInputTokens:d,cacheReadTokens:c,cacheCreationTokens:x})=>{let m=o?.toLowerCase()==="true",u=void 0!==i||void 0!==n,p=e?.input_cost!==void 0||e?.output_cost!==void 0,h=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(p||u||h||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 g=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),f=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),y=m?0:e?.input_cost,j=m?0:e?.output_cost,b=m?0:e?.original_cost,v=m?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.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:[l(a),m&&" (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=m?0:(y??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:[l(s),null!=d&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",d.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:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_read_cost),(c??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(c??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:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_creation_cost),(x??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(x??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:[l(y),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.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:[l(j),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.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:l(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:l(s)})]},e))]}),!m&&(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:l(b)})]})}),(g||f)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[g&&(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 (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(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:["-",l(e.discount_amount)]})]})]}),f&&(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 (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((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:["+",l(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:[l(v),m&&" (Cached)"]})]})})]})}]})})}])},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o={TEAM_ID:"Team ID",KEY_HASH:"Key Hash",REQUEST_ID:"Request ID",MODEL:"Model",PUBLIC_MODEL_OR_SEARCH_TOOL:"Public model / search tool",USER_ID:"User ID",END_USER:"End User",STATUS:"Status",KEY_ALIAS:"Key Alias",ERROR_CODE:"Error Code",ERROR_MESSAGE:"Error Message"};function d({logs:e,accessToken:d,startTime:c,endTime:x,pageSize:m=n.defaultPageSize,isCustomDate:u,setCurrentPage:p,userID:h,userRole:g,sortBy:f="startTime",sortOrder:y="desc",currentPage:j=1}){let b=(0,t.useMemo)(()=>({[o.TEAM_ID]:"",[o.KEY_HASH]:"",[o.REQUEST_ID]:"",[o.MODEL]:"",[o.PUBLIC_MODEL_OR_SEARCH_TOOL]:"",[o.USER_ID]:"",[o.END_USER]:"",[o.STATUS]:"",[o.KEY_ALIAS]:"",[o.ERROR_CODE]:"",[o.ERROR_MESSAGE]:""}),[]),[v,_]=(0,t.useState)(b),[N,w]=(0,t.useState)(null),S=(0,t.useRef)(0),k=(0,t.useRef)(v),T=(0,t.useRef)(!1),C=(0,t.useCallback)(async(e,t=1)=>{if(!d)return;console.log("Filters being sent to API:",e);let l=Date.now();S.current=l;let r=(0,s.default)(c).utc().format("YYYY-MM-DD HH:mm:ss"),i=u?(0,s.default)(x).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:d,start_date:r,end_date:i,page:t,page_size:m,params:{api_key:e[o.KEY_HASH]||void 0,team_id:e[o.TEAM_ID]||void 0,request_id:e[o.REQUEST_ID]||void 0,user_id:e[o.USER_ID]||void 0,end_user:e[o.END_USER]||void 0,status_filter:e[o.STATUS]||void 0,model_id:e[o.MODEL]||void 0,model:e[o.PUBLIC_MODEL_OR_SEARCH_TOOL]||void 0,key_alias:e[o.KEY_ALIAS]||void 0,error_code:e[o.ERROR_CODE]||void 0,error_message:e[o.ERROR_MESSAGE]||void 0,sort_by:f,sort_order:y}});l===S.current&&w({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),w({data:[],total:0,page:1,page_size:m,total_pages:0})}},[d,c,x,u,m,f,y]),L=(0,t.useMemo)(()=>(0,i.default)((e,t)=>C(e,t),300),[C]);(0,t.useEffect)(()=>()=>L.cancel(),[L]);let E=(0,t.useMemo)(()=>!!(v[o.KEY_ALIAS]||v[o.KEY_HASH]||v[o.REQUEST_ID]||v[o.USER_ID]||v[o.END_USER]||v[o.ERROR_CODE]||v[o.ERROR_MESSAGE]||v[o.MODEL]||v[o.PUBLIC_MODEL_OR_SEARCH_TOOL]),[v]);(0,t.useEffect)(()=>{k.current=v,T.current=E},[v,E]),(0,t.useEffect)(()=>{T.current&&d&&(L.cancel(),C(k.current,j))},[f,y,j,c,x,u]);let M=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:m,total_pages:0};if(E)return e;let t=[...e.data];if(v[o.TEAM_ID]&&(t=t.filter(e=>e.team_id===v[o.TEAM_ID])),v[o.STATUS]&&(t=t.filter(e=>"success"===v[o.STATUS]?!e.status||"success"===e.status:e.status===v[o.STATUS])),v[o.MODEL]&&(t=t.filter(e=>e.model_id===v[o.MODEL])),v[o.PUBLIC_MODEL_OR_SEARCH_TOOL]){let e=v[o.PUBLIC_MODEL_OR_SEARCH_TOOL];t=t.filter(t=>t.model===e)}return v[o.KEY_HASH]&&(t=t.filter(e=>e.api_key===v[o.KEY_HASH])),v[o.END_USER]&&(t=t.filter(e=>e.end_user===v[o.END_USER])),v[o.ERROR_CODE]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===v[o.ERROR_CODE]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,v,E]),A=(0,t.useMemo)(()=>E?null!==N?N:{data:[],total:0,page:1,page_size:m,total_pages:0}:M,[E,N,M]),{data:D}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",d],queryFn:async()=>d&&await (0,r.fetchAllTeams)(d)||[],enabled:!!d}),R=(0,t.useCallback)((e=j)=>{E&&d&&(L.cancel(),C(v,e))},[E,d,v,j,C,L]);return{filters:v,filteredLogs:A,hasBackendFilters:E,allTeams:D,handleFilterChange:e=>{_(t=>{let s={...t,...e};for(let e of Object.keys(b))e in s||(s[e]=b[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(p(1),w(null),L(s,1)),s})},handleFilterReset:()=>{_(b),w(null),L.cancel(),p(1)},refetchWithFilters:R}}e.s(["FILTER_KEYS",0,o,"useLogFilterLogic",()=>d],504809)},894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.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",()=>a],283086);let l=(0,s.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",()=>l],195116)},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,x=e.i(755151),m=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(x.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,m.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,m.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},869939,e=>{"use strict";var t=e.i(843476),s=e.i(175712),a=e.i(262218),l=e.i(291542),r=e.i(898586),i=e.i(770914),n=e.i(592968),o=e.i(245704),d=e.i(518617),c=e.i(19732);let{Text:x}=r.Typography;function m({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)(c.ExperimentOutlined,{style:{fontSize:16,color:"#6366f1"}}),(0,t.jsx)(x,{strong:!0,style:{fontSize:15},children:"LLM Judge Results"})]}),s.map((e,s)=>(0,t.jsx)(u,{entry:e},e.eval_id||s))]}):null}function u({entry:e}){let r=e.passed,c=r?"#52c41a":"#ff4d4f",m=(e.verdicts||[]).filter(e=>"overall"!==(e.criterion_name||"").toLowerCase()),u=[{title:"Criterion",dataIndex:"criterion_name",key:"criterion_name",width:160,render:e=>(0,t.jsx)(x,{strong:!0,style:{whiteSpace:"nowrap"},children:e})},{title:"Weight",dataIndex:"weight",key:"weight",width:65,render:e=>null!=e?(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:[e,"%"]}):null},{title:"Score",dataIndex:"score",key:"score",width:65,render:e=>(0,t.jsx)(x,{style:{color:e>=70?"#52c41a":e>=50?"#faad14":"#ff4d4f",fontWeight:600},children:e})},{title:(0,t.jsx)(n.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 a=s.score*s.weight/100;return(0,t.jsx)(x,{type:"secondary",style:{fontSize:12},children:a%1==0?a:a.toFixed(1)})}},{title:"Comment",dataIndex:"reasoning",key:"reasoning",ellipsis:{showTitle:!1},render:e=>(0,t.jsx)(n.Tooltip,{title:e,children:(0,t.jsx)("span",{style:{fontSize:12},children:e})})}];return(0,t.jsxs)(s.Card,{size:"small",className:"mb-3",style:{borderLeft:`3px solid ${c}`},title:(0,t.jsxs)(i.Space,{children:[r?(0,t.jsx)(o.CheckCircleOutlined,{style:{color:"#52c41a"}}):(0,t.jsx)(d.CloseCircleOutlined,{style:{color:"#ff4d4f"}}),(0,t.jsx)(x,{strong:!0,children:e.eval_name}),(0,t.jsx)(a.Tag,{color:r?"success":"error",children:r?"PASSED":"FAILED"}),(0,t.jsx)(n.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)(x,{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)(i.Space,{size:"small",children:[e.judge_model&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Judge: ",e.judge_model]}),null!=e.iteration&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Iter: ",e.iteration+1]})]}),children:[e.eval_error&&(0,t.jsxs)(x,{type:"warning",style:{display:"block",marginBottom:8,fontSize:12},children:["Judge error: ",e.eval_error]}),m.length>0?(0,t.jsx)(l.Table,{dataSource:m,columns:u,pagination:!1,size:"small",rowKey:"criterion_name",scroll:{x:!0},summary:()=>{if(!m.some(e=>null!=e.weight))return null;let e=m.reduce((e,t)=>e+(null!=t.weight?t.score*t.weight/100:0),0);return(0,t.jsxs)(l.Table.Summary.Row,{children:[(0,t.jsx)(l.Table.Summary.Cell,{index:0,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12},children:"Total"})}),(0,t.jsx)(l.Table.Summary.Cell,{index:1}),(0,t.jsx)(l.Table.Summary.Cell,{index:2}),(0,t.jsx)(l.Table.Summary.Cell,{index:3,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12,color:c},children:e%1==0?e:e.toFixed(1)})}),(0,t.jsx)(l.Table.Summary.Cell,{index:4})]})}}):(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Score: ",e.overall_score?.toFixed(1)," — no per-criterion breakdown available."]})]})}e.s(["default",()=>m])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),x=e.i(195116),m=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),T=e.i(500330),C=e.i(517442),L=e.i(869939),E=e.i(70635),M=e.i(70969),A=e.i(916925);function D({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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 i,n;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:a}=(0,A.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(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:r(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:r(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:(i=e.start_time,n=e.end_time,`${((n-i)*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,r)=>{let i=a[`${s}-${r}`]||!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}-${r}`,void l(t=>({...t,[e]:!t[e]}))},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)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+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)})]})]})]}),i&&(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",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>D],331052);var R=e.i(592968),O=e.i(207066);let{Text:I}=g.Typography;function z({value:e,maxWidth:s=O.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(R.Tooltip,{title:e,children:(0,t.jsx)(I,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:O.FONT_FAMILY_MONO,fontSize:O.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(I,{type:"secondary",children:"-"})}let{Text:P}=g.Typography;function B({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(P,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let F=e=>!!e&&e instanceof Date,H=e=>"object"==typeof e&&null!==e,q=e=>!!e&&e instanceof Object&&"function"==typeof e;function Y(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function K(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:x,outerRef:m,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},Y(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!m.current)return;let s=m.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=m.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:S,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)&&(x?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},Y(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},Y(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(V,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:x,beforeExpandChange:u,outerRef:m}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function $(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return K({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function U(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return K({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function W(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=F(l)?l.toISOString():q(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},Y(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function V(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(U,Object.assign({},e)):!H(t)||F(t)||q(t)?(0,s.createElement)(W,Object.assign({},e)):(0,s.createElement)($,Object.assign({},e))}let G={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},J=()=>!0,Q=e=>{let{data:t,style:a=G,shouldExpandNode:l=J,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&H(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(V,{key:t,field:t,value:n,style:{...G,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(V,{value:t,style:{...G,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>Q,"defaultStyles",()=>G],867612);let{Text:X}=g.Typography;function Z({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:O.JSON_MAX_HEIGHT,overflow:"auto",background:O.COLOR_BG_LIGHT,padding:O.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(Q,{data:e,style:G,clickToExpandNode:!0})})}):(0,t.jsx)(X,{type:"secondary",children:"No data"})}function ee(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function et(e){return Array.isArray(e)?e:e?[e]:[]}function es(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var ea=e.i(366308),el=e.i(755151),er=e.i(291542);let{Text:ei}=g.Typography;function en({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})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(ei,{code:!0,children:[e,s.required&&(0,t.jsx)(ei,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(ei,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(ei,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(ei,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(ei,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(er.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(ei,{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 eo({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:ed}=g.Typography;function ec({tool:e}){let[a,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)(ed,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(en,{tool:e}):(0,t.jsx)(eo,{tool:e})]})}let{Text:ex}=g.Typography;function em({tool:e}){let[a,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(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(ea.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ex,{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"}),a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ec,{tool:e})})]})}let{Text:eu}=g.Typography;function ep({log:e}){let s=function(e){let t,s=!(t=es(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 a=function(e){let t=es(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(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.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:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eu,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(eu,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let eh=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eg=e.i(888259),ef=e.i(264843),ey=e.i(624001);let{Text:ej}=g.Typography;function eb({type:e,tokens:s,cost:l,onCopy:r,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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(ef.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ej,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(R.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:ev}=g.Typography;function e_({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(ev,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(ev,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(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,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:eN}=g.Typography;function ew({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)(eN,{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)(eN,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(eN,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:eS}=g.Typography;function ek({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(eS,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(ew,{tool:e,compact:l},e.id||s))})]}):null}let{Text:eT}=g.Typography;function eC({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(eT,{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: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,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(ek,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eL({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=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)(eb,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eg.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(e_,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eC,{messages:c}),d&&(0,t.jsx)(ek,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eE}=g.Typography;function eM({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eg.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(ek,{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)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eE,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eA=e.i(782273),eD=e.i(313603),eR=e.i(793916);let{Text:eO}=g.Typography;function eI({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(ez,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eP,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.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 ez({session:e,turnCount:a}){let[l,r]=(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:()=>r(!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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eD.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(eO,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(eO,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eA.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)(eR.AudioOutlined,{}):(0,t.jsx)(ef.MessageOutlined,{})," ",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)(eq,{label:"Model",value:e.model}),(0,t.jsx)(eq,{label:"Voice",value:e.voice}),(0,t.jsx)(eq,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eq,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eq,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eq,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eq,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eq,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(eO,{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 eP({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:l?.completion_tokens??n,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:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eB,{response:e,index:s},e.id||s))})})]})}function eB({response:e,index:s}){let a=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)(eO,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(R.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(eO,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eF,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eH,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eH,{label:"Output",details:l.output_token_details})]})}function eF({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)(eO,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eR.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(ef.MessageOutlined,{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:a})]},s):null})]}):null}function eH({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(eO,{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:a.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 eq({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(eO,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function eY({request:e,response:s,metrics:a}){let l,r,i;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)(eI,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&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})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:eh(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eL,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eM,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:eK}=g.Typography;function e$({logEntry:e,isLoadingDetails:s=!1,accessToken:a}){var l,r;let i=e.metadata||{},n="failure"===i.status,o=n?i.error_information:null,d=!!(l=e.messages)&&(Array.isArray(l)?l.length>0:"object"==typeof l&&Object.keys(l).length>0),c=!!(r=e.response)&&Object.keys(ee(r)).length>0,x=!d&&!c&&!n&&!s,m=i?.guardrail_information,u=et(m),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`,j=i?.eval_information,b=i.vector_store_request_metadata&&Array.isArray(i.vector_store_request_metadata)&&i.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${O.DRAWER_CONTENT_PADDING} ${O.DRAWER_CONTENT_PADDING} 0`},children:[n&&o&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eU,{errorInfo:o}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eW,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(z,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(z,{value:e.api_base,maxWidth:O.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),p&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eV,{label:g,maskedCount:h})})]})})}),(0,t.jsx)(eG,{logEntry:e,metadata:i}),(0,t.jsx)(E.CostBreakdownViewer,{costBreakdown:i?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit,rawInputTokens:i?.additional_usage_values?.prompt_tokens_details?.text_tokens,cacheReadTokens:i?.additional_usage_values?.cache_read_input_tokens,cacheCreationTokens:i?.additional_usage_values?.cache_creation_input_tokens}),(0,t.jsx)(ep,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(M.ConfigInfoMessage,{show:x})}),s?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eJ,{hasResponse:c,hasError:n,getRawRequest:()=>ee(e.proxy_server_request||e.messages),getFormattedResponse:()=>n&&o?{error:{message:o.error_message||"An error occurred",type:o.error_class||"error",code:o.error_code||"unknown",param:null}}:ee(e.response),logEntry:e}),p&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(C.default,{data:m,accessToken:a??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),null!=j&&(0,t.jsx)(L.default,{data:j}),b&&(0,t.jsx)(D,{data:i.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eX,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:O.DRAWER_CONTENT_PADDING}})]})}function eU({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eK,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eK,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eW({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(eK,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:O.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eV({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:O.SPACING_MEDIUM,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"]})]})}function eG({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default",o=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),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Input Tokens",children:(0,T.formatNumberWithCommas)(o)}),(0,t.jsx)(f.Descriptions.Item,{label:"Output Tokens",children:(0,T.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(B,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,T.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.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)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,T.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,T.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.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)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eJ({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(O.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),x=i.spend??0,m=i.prompt_tokens||0,u=i.completion_tokens||0,p=m+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?x*m/p:0,y=g?h.output_cost??0:p>0?x*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(eY,{request:l(),response:r(),metrics:{prompt_tokens:m,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(eK,{copyable:{text:JSON.stringify(n===O.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===O.TAB_RESPONSE&&!e&&!a}),items:[{key:O.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:O.SPACING_XLARGE,paddingBottom:O.SPACING_XLARGE},children:(0,t.jsx)(Z,{data:l(),mode:"formatted"})})},{key:O.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:O.SPACING_XLARGE,paddingBottom:O.SPACING_XLARGE},children:e||a?(0,t.jsx)(Z,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eQ({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 eX({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eK,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:O.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:O.FONT_SIZE_SMALL,fontFamily:O.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eZ=e.i(764205),e0=e.i(266027),e1=e.i(135214);function e2({row:e,isSelected:s,onClick:a}){let l=m.MCP_CALL_TYPES.includes(e.call_type),r=m.AGENT_CALL_TYPES.includes(e.call_type),i=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:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(x.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(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:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,T.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]})]})}function e5({open:e,onClose:d,logEntry:c,sessionId:x,accessToken:u,allLogs:g=[],onSelectLog:f,startTime:y}){let j=!!x,[b,v]=(0,s.useState)(null),[_,N]=(0,s.useState)(!1),[w,S]=(0,s.useState)(!1),{data:k=[]}=(0,e0.useQuery)({queryKey:["sessionLogs",x],queryFn:async()=>{if(!x||!u)return[];let e=await (0,eZ.sessionSpendLogsCall)(u,x);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!m.MCP_CALL_TYPES.includes(e.call_type),a=+!!m.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&j&&x&&u)}),C=(0,s.useMemo)(()=>j?k.length?b?k.find(e=>e.request_id===b)||k[0]:c?.request_id&&k.find(e=>e.request_id===c.request_id)||k[0]:null:c,[j,c,b,k]);(0,s.useEffect)(()=>{j&&k.length&&(b&&k.some(e=>e.request_id===b)||v(c?.request_id&&k.some(e=>e.request_id===c.request_id)?c.request_id:k[0].request_id))},[j,c,b,k]),(0,s.useEffect)(()=>{e?N(!1):(j&&v(null),S(!1))},[e,j]);let{selectNextLog:L,selectPreviousLog:E}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:C,allLogs:j?k:g,onClose:d,onSelectLog:e=>{j&&v(e.request_id),f?.(e)}}),M=((e,t,s)=>{let{accessToken:a}=(0,e1.default)();return(0,e0.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eZ.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(C?.request_id,y,e&&!!C?.request_id),A=M.data,D=M.isLoading,R=(0,s.useMemo)(()=>C?{...C,messages:A?.messages||C.messages,response:A?.response||C.response,proxy_server_request:A?.proxy_server_request||C.proxy_server_request}:null,[C,A]),I=C?.metadata||{},z="failure"===I.status?"Failure":"Success",P="failure"===I.status?"error":"success",B=I?.user_api_key_team_alias||"default",F=k.reduce((e,t)=>e+(t.spend||0),0),H=k.length>0?new Date(Math.min(...k.map(e=>new Date(e.startTime).getTime()))):null,q=k.length>0?new Date(Math.max(...k.map(e=>new Date(e.endTime).getTime()))):null,Y=H&&q?((q.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=k.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,$=k.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,U=k.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length,W=j?k:C?[C]:[],V=j?x||"":C?.request_id||"",G=V.length>14?`${V.slice(0,11)}...`:V,J=async()=>{if(V)try{await navigator.clipboard.writeText(V),S(!0),setTimeout(()=>S(!1),1200)}catch{}};return C&&R?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:O.DRAWER_WIDTH,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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>N(!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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>N(!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:j?"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:G}),(0,t.jsx)("button",{type:"button",onClick:J,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:w?(0,t.jsx)(r.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:[W.length," req",[j?K:W.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?$:W.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?U:W.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),j?(0,T.getSpendString)(F):(0,T.getSpendString)(C.spend||0),j&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),Y,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[et(I?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eQ,{guardrailEntries:et(I?.guardrail_information)})}),j?(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"}),W.map((e,s)=>{let a=s===W.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"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e2,{row:e,isSelected:e.request_id===C.request_id,onClick:()=>{v(e.request_id),f?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:W.map(e=>(0,t.jsx)(e2,{row:e,isSelected:e.request_id===C.request_id,onClick:()=>f?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:C,onClose:d,onPrevious:E,onNext:L,statusLabel:z,statusColor:P,environment:B}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(e$,{logEntry:R,isLoadingDetails:D,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e5],502626),e.s([],3565)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(772345),o=e.i(793130),d=e.i(197647),c=e.i(653824),x=e.i(881073),m=e.i(404206),u=e.i(723731),p=e.i(464571),h=e.i(708347),g=e.i(93648),f=e.i(245767),y=e.i(313793),j=e.i(50882),b=e.i(291950),v=e.i(969550),_=e.i(764205),N=e.i(20147),w=e.i(942161),S=e.i(245099);e.i(70969);var k=e.i(97859);e.i(70635),e.i(339086);var T=e.i(504809);e.i(3565);var C=e.i(502626);e.i(727749),e.i(867612);var L=e.i(149121);function E({accessToken:e,token:E,userRole:M,userID:A,premiumUser:D}){let[R,O]=(0,i.useState)(""),[I,z]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,H]=(0,i.useState)(1),[q]=(0,i.useState)(50),Y=(0,i.useRef)(null),K=(0,i.useRef)(null),$=(0,i.useRef)(null),[U,W]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[V,G]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)(!1),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(""),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,ex]=(0,i.useState)(null),[em,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(""),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(M&&h.internalUserRoles.includes(M)),[eb,ev]=(0,i.useState)("request logs"),[e_,eN]=(0,i.useState)(null),[ew,eS]=(0,i.useState)(!1),[ek,eT]=(0,i.useState)(null),[eC,eL]=(0,i.useState)("startTime"),[eE,eM]=(0,i.useState)("desc"),[eA,eD]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eR,eO]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eR))},[eR]);let[eI,ez]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{em&&e&&ex({...(await (0,_.keyInfoV1Call)(e,em)).info,token:em,api_key:em})})()},[em,e]),(0,i.useEffect)(()=>{function e(e){Y.current&&!Y.current.contains(e.target)&&B(!1),K.current&&!K.current.contains(e.target)&&z(!1),$.current&&!$.current.contains(e.target)&&Z(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{M&&h.internalUserRoles.includes(M)&&ej(!0)},[M]);let eP=(0,a.useQuery)({queryKey:["logs","table",F,q,U,V,el,ei,ey?A:null,ep,eo,eC,eE],queryFn:async()=>{if(!e||!E||!M||!A)return{data:[],total:0,page:1,page_size:q,total_pages:0};let t=(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"),s=J?(0,r.default)(V).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,_.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:q,params:{api_key:ei||void 0,team_id:el||void 0,user_id:ey?A??void 0:void 0,end_user:eg||void 0,status_filter:ep||void 0,model_id:eo||void 0,sort_by:eC,sort_order:eE}})},enabled:!!e&&!!E&&!!M&&!!A&&"request logs"===eb&&eA,refetchInterval:!!eR&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),eB=(0,i.useDeferredValue)(eP.isFetching),eF=eP.isFetching||eB,eH=eP.data||{data:[],total:0,page:1,page_size:q||10,total_pages:1},{filters:eq,filteredLogs:eY,hasBackendFilters:eK,allTeams:e$,handleFilterChange:eU,handleFilterReset:eW,refetchWithFilters:eV}=(0,T.useLogFilterLogic)({logs:eH,accessToken:e,startTime:U,endTime:V,pageSize:q,isCustomDate:J,setCurrentPage:H,userID:A,userRole:M,sortBy:eC,sortOrder:eE,currentPage:F}),eG=(0,i.useCallback)(()=>{eW(),W((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),Q(!1),ez({value:24,unit:"hours"}),H(1)},[eW]);if((0,i.useEffect)(()=>{eD(!eK)},[eK]),(0,i.useEffect)(()=>{e&&(eq["Team ID"]?er(eq["Team ID"]):er(""),eh(eq.Status||""),ed(eq.Model||""),ef(eq["End User"]||""),en(eq["Key Hash"]||""))},[eq,e]),!e||!E||!M||!A)return null;let eJ=eY.data.filter(e=>!R||e.request_id.includes(R)||e.model.includes(R)||e.user&&e.user.includes(R)),eQ=eJ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),k.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:k.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),eX=new Map;for(let e of eJ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=k.MCP_CALL_TYPES.includes(e.call_type),s=eX.get(e.session_id);s&&(!s.isMcp||t)||eX.set(e.session_id,{requestId:e.request_id,isMcp:t})}let eZ=eJ.map(e=>{let t=e.session_id?eQ[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eu(e),onSessionClick:t=>{t&&(eT(t),eN(e),eS(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||eX.get(e.session_id)?.requestId===e.request_id)||[],e0=[{name:"Team ID",label:"Team ID",customComponent:y.default},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:b.PaginatedModelSelect},{name:T.FILTER_KEYS.PUBLIC_MODEL_OR_SEARCH_TOOL,label:"Public model / search tool",isSearchable:!1},{name:"Key Alias",label:"Key Alias",customComponent:j.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,_.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return k.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=k.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!k.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e1=k.QUICK_SELECT_OPTIONS.find(e=>e.value===eI.value&&e.unit===eI.unit),e2=J?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"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=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(J,U,V):e1?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(c.TabGroup,{defaultIndex:0,onIndexChange:e=>ev(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(d.Tab,{children:"Request Logs"}),(0,t.jsx)(d.Tab,{children:"Audit Logs"}),(0,t.jsx)(d.Tab,{children:"Deleted Keys"}),(0,t.jsx)(d.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(u.TabPanels,{children:[(0,t.jsxs)(m.TabPanel,{children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"})}),ec&&em&&ec.api_key===em?(0,t.jsx)(N.default,{keyId:em,keyData:ec,teams:e$??[],onClose:()=>eu(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{options:e0,onApplyFilters:eU,onResetFilters:eG}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:R,onChange:e=>O(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:$,children:[(0,t.jsxs)("button",{onClick:()=>Z(!X),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",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:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e2]}),X&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[k.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e2===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{H(1),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),W((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),ez({value:e.value,unit:e.unit}),Q(!1),Z(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${J?"bg-blue-50 text-blue-600":""}`,onClick:()=>Q(!J),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(o.Switch,{color:"green",checked:eR,defaultChecked:!0,onChange:eO})]}),{}),(0,t.jsx)(p.Button,{type:"default",icon:(0,t.jsx)(n.SyncOutlined,{spin:eF}),onClick:()=>{eK?eV():eP.refetch()},disabled:eF,title:"Fetch data",children:eF?"Fetching":"Fetch"})]}),J&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{W(e.target.value),H(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:V,onChange:e=>{G(e.target.value),H(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eP.isLoading?"...":eY?(F-1)*q+1:0," -"," ",eP.isLoading?"...":eY?Math.min(F*q,eY.total):0," ","of ",eP.isLoading?"...":eY?eY.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eP.isLoading?"...":F," of"," ",eP.isLoading?"...":eY?eY.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>H(e=>Math.max(1,e-1)),disabled:eP.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>H(e=>Math.min(eY.total_pages||1,e+1)),disabled:eP.isLoading||F===(eY.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eR&&1===F&&eA&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>eO(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(L.DataTable,{columns:(0,S.createColumns)({sortBy:eC,sortOrder:eE,onSortChange:(e,t)=>{eL(e),eM(t),H(1)}}),data:eZ,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eT(e.session_id),eN(e),eS(!0);return}eT(null),eN(e),eS(!0)},isLoading:eP.isLoading})]})]})]}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(w.default,{userID:A,userRole:M,token:E,accessToken:e,isActive:"audit logs"===eb,premiumUser:D})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(g.default,{})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(f.default,{})})]})]}),(0,t.jsx)(C.LogDetailsDrawer,{open:ew,onClose:()=>{eS(!1),eT(null)},logEntry:e_,sessionId:ek,accessToken:e,allLogs:eZ,onSelectLog:e=>{eN(e)},startTime:(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>E],936190)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1d0991370c308b4d.js b/litellm/proxy/_experimental/out/_next/static/chunks/1d0991370c308b4d.js deleted file mode 100644 index c0b3d35df7..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/1d0991370c308b4d.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56567,838932,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(764205),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),x=e.i(827252),p=e.i(564897),_=e.i(646563),b=e.i(987432),y=e.i(530212),j=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),I=e.i(464571),M=e.i(808613),z=e.i(311451),F=e.i(28651),O=e.i(199133),P=e.i(770914),D=e.i(790848),A=e.i(653496),L=e.i(262218),R=e.i(592968),B=e.i(888259),V=e.i(678784),U=e.i(118366),E=e.i(271645),$=e.i(9314),K=e.i(552130),G=e.i(127952);function W({className:e,value:l,onChange:a}){return(0,t.jsxs)(O.Select,{className:e,value:l,onChange:a,children:[(0,t.jsx)(O.Select.Option,{value:"24h",children:"Daily"}),(0,t.jsx)(O.Select.Option,{value:"7d",children:"Weekly"}),(0,t.jsx)(O.Select.Option,{value:"30d",children:"Monthly"})]})}var q=e.i(844565),H=e.i(355619);let J=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),Y=e.i(75921),X=e.i(390605),Z=e.i(162386),ee=e.i(727749),et=e.i(384767),el=e.i(435451),ea=e.i(916940),es=e.i(183588),ei=e.i(460285),er=e.i(276173),en=e.i(91979),eo=e.i(269200),ed=e.i(942232),em=e.i(977572),ec=e.i(427612),eu=e.i(64848),eg=e.i(496020),eh=e.i(536916),ex=e.i(21548);let ep={"/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","/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)"},e_=({teamId:e,accessToken:l,canEditTeam:a})=>{let[s,i]=(0,E.useState)([]),[n,o]=(0,E.useState)([]),[d,m]=(0,E.useState)(!0),[c,u]=(0,E.useState)(!1),[g,h]=(0,E.useState)(!1),x=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){ee.default.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{m(!1)}};(0,E.useEffect)(()=>{x()},[e,l]);let p=async()=>{try{if(!l)return;u(!0),await (0,r.teamPermissionsUpdateCall)(l,e,n),ee.default.success("Permissions updated successfully"),h(!1)}catch(e){ee.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 _=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)(I.Button,{icon:(0,t.jsx)(en.ReloadOutlined,{}),onClick:()=>{x()},children:"Reset"}),(0,t.jsx)(I.Button,{onClick:p,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."}),_?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(eo.Table,{className:" min-w-full",children:[(0,t.jsx)(ec.TableHead,{children:(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(eu.TableHeaderCell,{children:"Method"}),(0,t.jsx)(eu.TableHeaderCell,{children:"Endpoint"}),(0,t.jsx)(eu.TableHeaderCell,{children:"Description"}),(0,t.jsx)(eu.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)(ed.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=ep[e];if(!l){for(let[t,a]of Object.entries(ep))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)(eg.TableRow,{className:"hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(em.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)(em.TableCell,{children:(0,t.jsx)("span",{className:"font-mono text-sm text-gray-800",children:l.endpoint})}),(0,t.jsx)(em.TableCell,{className:"text-gray-700",children:l.description}),(0,t.jsx)(em.TableCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,t.jsx)(eh.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 eb=e.i(822315);function ey(e){if(!e)return null;let t=(0,eb.default)(e);return t.isValid()?t.format("MMM D, YYYY"):null}var ej=e.i(175712),ef=e.i(178654),ev=e.i(621192),eT=e.i(898586);let eS=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,r.deriveErrorMessage)(e))}return await s.json()},ew=(e,l)=>(0,t.jsxs)(P.Space,{size:4,children:[(0,t.jsx)(eT.Typography.Text,{type:"secondary",children:e}),(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(x.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),eN=(e,t=4)=>null==e?"0":(0,m.formatNumberWithCommas)(e,t),eC=e=>null==e?"Unlimited":(0,m.formatNumberWithCommas)(e,0);function ek({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:()=>eS(t,e),enabled:!!(t&&e)})})(e);if(s)return(0,t.jsx)(ej.Card,{children:(0,t.jsx)(eT.Typography.Text,{type:"secondary",children:"Loading your membership info…"})});if(i)return(0,t.jsx)(ej.Card,{children:(0,t.jsx)(eT.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)(ej.Card,{children:(0,t.jsx)(eT.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=ey(r?.budget_reset_at),h=r?.allowed_models??null;return(0,t.jsxs)(P.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(ej.Card,{children:(0,t.jsxs)(ev.Row,{gutter:[24,16],children:[(0,t.jsxs)(ef.Col,{xs:24,sm:12,md:8,children:[(0,t.jsx)(eT.Typography.Text,{type:"secondary",children:"User"}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(eT.Typography.Text,{strong:!0,children:a.user_email||a.user_id})}),(0,t.jsx)(eT.Typography.Text,{type:"secondary",style:{fontSize:12,fontFamily:"monospace"},children:a.user_id})]}),(0,t.jsxs)(ef.Col,{xs:24,sm:12,md:8,children:[(0,t.jsx)(eT.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)(ev.Row,{gutter:[16,16],children:[(0,t.jsx)(ef.Col,{xs:24,md:12,children:(0,t.jsxs)(ej.Card,{children:[ew("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)(eT.Typography.Title,{level:3,style:{margin:0},children:["$",eN(d,4)]}),(0,t.jsxs)(eT.Typography.Text,{type:"secondary",children:["of ",null===o?"Unlimited":`$${eN(o,4)}`]})]}),g&&(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsxs)(eT.Typography.Text,{type:"secondary",children:["Resets ",g]})})]})}),(0,t.jsx)(ef.Col,{xs:24,md:12,children:(0,t.jsxs)(ej.Card,{children:[ew("Rate Limits","Your per-member rate limits within this team."),(0,t.jsxs)("div",{style:{marginTop:8},children:[(0,t.jsxs)(eT.Typography.Text,{children:["TPM: ",eC(c)]}),(0,t.jsx)("br",{}),(0,t.jsxs)(eT.Typography.Text,{children:["RPM: ",eC(u)]})]})]})}),(0,t.jsx)(ef.Col,{xs:24,md:12,children:(0,t.jsxs)(ej.Card,{children:[ew("Total Spend (USD)","Cumulative spend across all budget cycles within this team."),(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsxs)(eT.Typography.Title,{level:4,style:{margin:0},children:["$",eN(m,4)]})})]})}),(0,t.jsx)(ef.Col,{xs:24,md:12,children:(0,t.jsxs)(ej.Card,{children:[ew("Model Scope","Models you can access within this team."),(0,t.jsx)("div",{style:{marginTop:8},children:h&&h.length>0?(0,t.jsx)(P.Space,{wrap:!0,children:h.map(e=>(0,t.jsx)(L.Tag,{children:e},e))}):(0,t.jsx)(eT.Typography.Text,{children:"All Team Models"})})]})})]})]})}let eI="overview",eM="my-user",ez="virtual-keys",eF="members",eO="member-permissions",eP="settings",eD={[eI]:"Overview",[eM]:"My User",[ez]:"Virtual Keys",[eF]:"Members",[eO]:"Member Permissions",[eP]:"Settings"};var eA=e.i(292639),eL=e.i(294612);function eR({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,eA.useUISettings)(),{userId:c,userRole:g}=(0,l.default)(),h=!!d?.values?.disable_team_admin_delete_team_user,p=(0,u.isUserTeamAdminForSingleTeam)(e.team_info.members_with_roles,c||""),_=(0,u.isProxyAdminRole)(g||""),b=[{title:(0,t.jsxs)(P.Space,{direction:"horizontal",children:["Model Scope",(0,t.jsx)(R.Tooltip,{title:"Models this member can access. Empty means they inherit all team models.",children:(0,t.jsx)(x.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)(eT.Typography.Text,{type:"secondary",children:"(all team models)"});let i=s.slice(0,2),r=s.length-i.length;return(0,t.jsxs)(P.Space,{wrap:!0,children:[i.map(e=>(0,t.jsx)(eT.Typography.Text,{code:!0,style:{fontSize:"12px"},children:e},e)),r>0&&(0,t.jsx)(R.Tooltip,{title:s.slice(2).join(", "),children:(0,t.jsxs)(eT.Typography.Text,{type:"secondary",children:["+",r," more"]})})]})}},{title:(0,t.jsxs)(P.Space,{direction:"horizontal",children:["Current Cycle Spend (USD)",(0,t.jsx)(R.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)(x.InfoCircleOutlined,{})})]}),key:"spend",render:(l,a)=>(0,t.jsxs)(eT.Typography.Text,{children:["$",(0,m.formatNumberWithCommas)((t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.spend??0})(a.user_id),4)]})},{title:(0,t.jsxs)(P.Space,{direction:"horizontal",children:["Total Spend (USD)",(0,t.jsx)(R.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)(x.InfoCircleOutlined,{})})]}),key:"total_spend",render:(l,a)=>(0,t.jsxs)(eT.Typography.Text,{children:["$",(0,m.formatNumberWithCommas)((t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.total_spend??0})(a.user_id),4)]})},{title:"Team Member Budget (USD)",key:"budget",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?.max_budget;return null==a?null:o(a)})(a.user_id);return(0,t.jsx)(eT.Typography.Text,{children:s?`$${(0,m.formatNumberWithCommas)(Number(s),4)}`:"No Limit"})}},{title:"Budget Reset",key:"budget_reset",render:(l,a)=>{let s=(t=>{if(!t)return null;let l=e.team_memberships.find(e=>e.user_id===t);return ey(l?.litellm_budget_table?.budget_reset_at)})(a.user_id);return s?(0,t.jsx)(eT.Typography.Text,{children:s}):(0,t.jsx)(eT.Typography.Text,{type:"secondary",children:"—"})}},{title:(0,t.jsxs)(P.Space,{direction:"horizontal",children:["Team Member Rate Limits",(0,t.jsx)(R.Tooltip,{title:"Rate limits for this member's usage within this team.",children:(0,t.jsx)(x.InfoCircleOutlined,{})})]}),key:"rate_limits",render:(l,a)=>(0,t.jsx)(eT.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)(eL.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,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:()=>_||a&&!p||p&&!h})}var eB=e.i(207082),eV=e.i(871943),eU=e.i(502547),eE=e.i(360820),e$=e.i(94629),eK=e.i(152990),eG=e.i(682830),eW=e.i(994388),eq=e.i(752978),eH=e.i(282786),eJ=e.i(981339),eQ=e.i(969550),eY=e.i(20147),eX=e.i(633627);function eZ({teamId:e,teamAlias:a,organization:s}){let{accessToken:i}=(0,l.default)(),[r,o]=(0,E.useState)(null),[d,c]=(0,E.useState)([{id:"created_at",desc:!0}]),[u,g]=(0,E.useState)({pageIndex:0,pageSize:50}),[h,p]=(0,E.useState)({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),_=d.length>0?d[0].id:"created_at",b=d.length>0?d[0].desc?"desc":"asc":"desc",y=u.pageIndex,j=u.pageSize,{data:f,isPending:v,isFetching:S,refetch:w}=(0,eB.useKeys)(y+1,j,{teamID:e,organizationID:h["Organization ID"]?.trim()||void 0,selectedKeyAlias:h["Key Alias"]?.trim()||void 0,userID:h["User ID"]?.trim()||void 0,sortBy:_||void 0,sortOrder:b||void 0,expand:"user"}),C=(0,E.useMemo)(()=>{let e=f?.keys||[],t=s?.organization_id;return t?e.map(e=>({...e,organization_id:(e.organization_id??e.org_id)||t})):e},[f?.keys,s?.organization_id]),k=f?.total_pages??0,[I,M]=(0,E.useState)({}),z=(0,E.useMemo)(()=>({team_id:e,team_alias:a||e,models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:s?.organization_id||"",created_at:"",keys:[],members_with_roles:[],spend:0}),[e,a,s]),F=(0,n.useQuery)({queryKey:["teamFilterOptions",e,i],queryFn:async()=>(0,eX.fetchTeamFilterOptions)(i,e),enabled:!!i&&!!e,staleTime:3e4}).data||{keyAliases:[],organizationIds:[],userIds:[]},O=(0,E.useCallback)(()=>{w?.()},[w]);(0,E.useEffect)(()=>(window.addEventListener("storage",O),()=>window.removeEventListener("storage",O)),[O]);let P=(0,E.useCallback)((e,t=!1)=>{p(t=>({...t,"Organization ID":e["Organization ID"]??t["Organization ID"],"Key Alias":e["Key Alias"]??t["Key Alias"],"User ID":e["User ID"]??t["User ID"],"Sort By":e["Sort By"]??t["Sort By"]??"created_at","Sort Order":e["Sort Order"]??t["Sort Order"]??"desc"})),t||g(e=>({...e,pageIndex:0}))},[]),D=(0,E.useCallback)(()=>{p({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),g(e=>({...e,pageIndex:0}))},[]),A=(0,E.useMemo)(()=>[{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>{let{organizationIds:t}=F;if(!t.length)return[];let l=e.toLowerCase();return(l?t.filter(e=>e.toLowerCase().includes(l)):t).map(e=>({label:e,value:e}))}},{name:"Key Alias",label:"Key Alias",isSearchable:!0,searchFn:async e=>{let{keyAliases:t}=F,l=e.toLowerCase();return(l?t.filter(e=>e.toLowerCase().includes(l)):t).map(e=>({label:e,value:e}))}},{name:"User ID",label:"User ID",isSearchable:!0,searchFn:async e=>{let{userIds:t}=F,l=e.toLowerCase();return(l?t.filter(e=>e.id.toLowerCase().includes(l)||e.email.toLowerCase().includes(l)):t).map(e=>({label:e.email?`${e.id} (${e.email})`:e.id,value:e.id}))}}],[F]),L=(0,E.useMemo)(()=>[{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(eW.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>o(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.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)(R.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)(R.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",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",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)(R.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:a??"-"})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(eH.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(x.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(R.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,m.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,m.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(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)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[l.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(eq.Icon,{icon:I[e.row.id]?eV.ChevronDownIcon:eU.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>M(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,H.getModelDisplayName)(e).slice(0,30)}...`:(0,H.getModelDisplayName)(e)})},l)),l.length>3&&!I[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"]})}),I[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,H.getModelDisplayName)(e).slice(0,30)}...`:(0,H.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"]})]})}}],[I]),B=(0,E.useCallback)(e=>{let t="function"==typeof e?e(d):e;if(c(t),t?.length>0){let e=t[0];P({"Sort By":e.id,"Sort Order":e.desc?"desc":"asc"},!0)}},[d,P]),V=(0,eK.useReactTable)({data:C,columns:L,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:d,pagination:u},onSortingChange:B,onPaginationChange:g,getCoreRowModel:(0,eG.getCoreRowModel)(),enableSorting:!0,manualSorting:!0,manualPagination:!0,pageCount:k});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:r?(0,t.jsx)(eY.default,{keyId:r.token,onClose:()=>o(null),keyData:r,teams:[z],onDelete:w}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(eQ.default,{options:A,onApplyFilters:P,initialValues:h,onResetFilters:D})}),(0,t.jsx)("div",{className:"flex items-center justify-end w-full mb-4",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[v||S?(0,t.jsx)(eJ.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",y+1," of ",V.getPageCount()]}),v||S?(0,t.jsx)(eJ.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>V.previousPage(),disabled:v||S||!V.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),v||S?(0,t.jsx)(eJ.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>V.nextPage(),disabled:v||S||!V.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(eo.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:V.getCenterTotalSize()},children:[(0,t.jsx)(ec.TableHead,{children:V.getHeaderGroups().map(e=>(0,t.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eu.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eK.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(eE.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(eV.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(e$.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${V.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(ed.TableBody,{children:v||S?(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(em.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading keys..."})})})}):C.length>0?V.getRowModel().rows.map(e=>(0,t.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(em.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,eK.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(em.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({teamId:e,onClose:n,accessToken:o,is_team_admin:en,is_proxy_admin:eo,is_org_admin:ed=!1,userModels:em,editTeam:ec,premiumUser:eu=!1,onUpdate:eg})=>{let eh,ex,ep,eb,ey,ej,[ef,ev]=(0,E.useState)(null),[eT,eS]=(0,E.useState)(!0),[ew,eN]=(0,E.useState)(!1),[eC]=M.Form.useForm(),[eA,eL]=(0,E.useState)(!1),[eB,eV]=(0,E.useState)(null),[eU,eE]=(0,E.useState)(!1),[e$,eK]=(0,E.useState)([]),[eG,eW]=(0,E.useState)(!1),[eq,eH]=(0,E.useState)({}),{data:eJ,isLoading:eQ}=d(),eY=eJ?.globalGuardrailNames??new Set,[eX,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)({}),[e2,e5]=(0,E.useState)(!1),[e3,e6]=(0,E.useState)(null),[e8,e7]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(!1),[tt,tl]=(0,E.useState)(!1),ta=E.default.useRef(null),[ts,ti]=(0,E.useState)(null),{userRole:tr,userId:tn}=(0,l.default)(),{data:to=[]}=(0,a.useOrganizations)(),td=(0,s.useQueryClient)(),tm=(0,E.useMemo)(()=>{let e=ef?.team_info?.organization_id;if(!e||!tn)return!1;let t=to.find(t=>t.organization_id===e);return t?.members?.some(e=>e.user_id===tn&&"org_admin"===e.user_role)??!1},[ef,to,tn]),tc=M.Form.useWatch("models",eC),tu=M.Form.useWatch("disable_global_guardrails",eC),tg=(0,E.useMemo)(()=>{let e=tc??ef?.team_info?.models??[];return e.includes("all-proxy-models")||e.includes("all-team-models")?em:(0,H.unfurlWildcardModelsInList)(e,em)},[tc,ef,em]),th=en||eo||ed||tm,tx=(0,E.useMemo)(()=>{let e;return e=[eI,eM,ez],th?[...e,eF,eO,eP]:e},[th]),tp=(0,E.useMemo)(()=>ec&&th?eP:eI,[ec,th]),t_=async()=>{try{if(eS(!0),!o)return;let t=await (0,r.teamInfoCall)(o,e);ev(t)}catch(e){ee.default.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{eS(!1)}};(0,E.useEffect)(()=>{t_()},[e,o]),(0,E.useEffect)(()=>{(async()=>{if(!o||!ef?.team_info?.organization_id)return ti(null);try{let e=await (0,r.organizationInfoCall)(o,ef.team_info.organization_id);ti(e)}catch(e){console.error("Error fetching organization info:",e),ti(null)}})()},[o,ef?.team_info?.organization_id]),(0,E.useMemo)(()=>{let e;return e=[],e=ts?ts.models.includes("all-proxy-models")?em:ts.models.length>0?ts.models:em:em,(0,H.unfurlWildcardModelsInList)(e,em)},[ts,em]),(0,E.useEffect)(()=>{(async()=>{try{if(!o)return;let e=(await (0,r.getPoliciesList)(o)).policies.map(e=>e.policy_name);e0(e)}catch(e){console.error("Failed to fetch policies:",e)}})()},[o]),(0,E.useEffect)(()=>{(async()=>{if(!o||!ef?.team_info?.policies||0===ef.team_info.policies.length)return;e5(!0);let e={};try{await Promise.all(ef.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]=[]}})),e4(e)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{e5(!1)}})()},[o,ef?.team_info?.policies]);let tb=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),ee.default.success("Team member added successfully"),eN(!1),eC.resetFields();let a=await (0,r.teamInfoCall)(o,e);ev(a),eg(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),ee.default.fromBackend(e),console.error("Error adding team member:",t)}},ty=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,allowed_models:t.allowed_models};B.default.destroy(),await (0,r.teamMemberUpdateCall)(o,e,l),ee.default.success("Team member updated successfully"),eL(!1);let a=await (0,r.teamInfoCall)(o,e);ev(a),eg(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),eL(!1),B.default.destroy(),ee.default.fromBackend(e),console.error("Error updating team member:",t)}},tj=async()=>{if(e3&&o){te(!0);try{await (0,r.teamMemberDeleteCall)(o,e,e3),ee.default.success("Team member removed successfully");let t=await (0,r.teamInfoCall)(o,e);ev(t),eg(t)}catch(e){ee.default.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}finally{te(!1),e7(!1),e6(null)}}},tf=async t=>{try{let l;if(!o)return;tl(!0);let s={};try{let{soft_budget_alerting_emails:e,...l}=t.metadata?JSON.parse(t.metadata):{};s=l}catch(e){ee.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){ee.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(eY):Array.from(eY).filter(e=>!(t.guardrails||[]).includes(e)),g={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,guardrails:(t.guardrails||[]).filter(e=>!eY.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!==tv.organization_id?{organization_id:t.organization_id??null}:{}};g.max_budget=(0,c.mapEmptyStringToNull)(g.max_budget),g.team_member_budget_duration=t.team_member_budget_duration,void 0!==t.team_member_budget&&(g.team_member_budget=Number(t.team_member_budget)),void 0!==t.team_member_key_duration&&(g.team_member_key_duration=t.team_member_key_duration),(void 0!==t.team_member_tpm_limit||void 0!==t.team_member_rpm_limit)&&(g.team_member_tpm_limit=i(t.team_member_tpm_limit),g.team_member_rpm_limit=i(t.team_member_rpm_limit));let{servers:h,accessGroups:x,toolsets:p}=t.mcp_servers_and_groups||{servers:[],accessGroups:[],toolsets:[]},_=new Set(h||[]),b=Object.fromEntries(Object.entries(t.mcp_tool_permissions||{}).filter(([e])=>_.has(e)));g.object_permission={},h&&(g.object_permission.mcp_servers=h),x&&(g.object_permission.mcp_access_groups=x),b&&(g.object_permission.mcp_tool_permissions=b),p&&(g.object_permission.mcp_toolsets=p),delete t.mcp_servers_and_groups,delete t.mcp_tool_permissions;let{agents:y,accessGroups:j}=t.agents_and_groups||{agents:[],accessGroups:[]};y&&y.length>0&&(g.object_permission.agents=y),j&&j.length>0&&(g.object_permission.agent_access_groups=j),delete t.agents_and_groups,t.vector_stores&&t.vector_stores.length>0&&(g.object_permission.vector_stores=t.vector_stores),void 0!==t.access_group_ids&&(g.access_group_ids=t.access_group_ids),void 0!==t.default_team_member_models&&(g.default_team_member_models=t.default_team_member_models);let f=ta.current?.getValue();if(f?.router_settings){let e=e=>null!=e&&""!==e&&!1!==e&&!(Array.isArray(e)&&0===e.length),t=Object.values(f.router_settings).some(e),l=tv.router_settings&&Object.values(tv.router_settings).some(e);(t||l)&&(g.router_settings=f.router_settings)}await (0,r.teamUpdateCall)(o,g),td.invalidateQueries({queryKey:a.organizationKeys.all}),ee.default.success("Team settings updated successfully"),eE(!1),t_()}catch(e){console.error("Error updating team:",e)}finally{tl(!1)}};if(eT)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!ef?.team_info)return(0,t.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:tv}=ef,tT=tv.metadata?.disable_global_guardrails===!0,tS=new Set(tv.metadata?.opted_out_global_guardrails||[]),tw=(tv.metadata?.guardrails||[]).filter(e=>!eY.has(e)),tN=tT?tw:[...Array.from(eY).filter(e=>!tS.has(e)),...tw],tC=e=>{e.preventDefault(),e.stopPropagation()},tk=async(e,t)=>{await (0,m.copyToClipboard)(e)&&(eH(e=>({...e,[t]:!0})),setTimeout(()=>{eH(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)(I.Button,{type:"text",icon:(0,t.jsx)(y.ArrowLeftIcon,{className:"h-4 w-4"}),onClick:n,className:"mb-4",children:"Back to Teams"}),(0,t.jsx)(k.Title,{children:tv.team_alias}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(N.Text,{className:"text-gray-500 font-mono",children:tv.team_id}),(0,t.jsx)(I.Button,{type:"text",size:"small",icon:eq["team-id"]?(0,t.jsx)(V.CheckIcon,{size:12}):(0,t.jsx)(U.CopyIcon,{size:12}),onClick:()=>tk(tv.team_id,"team-id"),className:`left-2 z-10 transition-all duration-200 ${eq["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)(A.Tabs,{defaultActiveKey:tp,className:"mb-4",items:[{key:eI,label:eD[eI],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)(tv.spend,4)]}),(0,t.jsxs)(N.Text,{children:["of ",null===tv.max_budget?"Unlimited":`$${(0,m.formatNumberWithCommas)(tv.max_budget,4)}`]}),tv.budget_duration&&(0,t.jsxs)(N.Text,{className:"text-gray-500",children:["Reset: ",tv.budget_duration]}),(0,t.jsx)("br",{}),tv.team_member_budget_table&&(0,t.jsxs)(N.Text,{className:"text-gray-500",children:["Team Member Budget: $",(0,m.formatNumberWithCommas)(tv.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: ",tv.tpm_limit||"Unlimited"]}),(0,t.jsxs)(N.Text,{children:["RPM: ",tv.rpm_limit||"Unlimited"]}),tv.max_parallel_requests&&(0,t.jsxs)(N.Text,{children:["Max Parallel Requests: ",tv.max_parallel_requests]}),(eh=tv.metadata?.model_tpm_limit??{},ex=tv.metadata?.model_rpm_limit??{},0===(ep=Array.from(new Set([...Object.keys(eh),...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:"}),ep.map(e=>(0,t.jsxs)(N.Text,{className:"text-xs",children:[e,": TPM ",eh[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===tv.models.length||tv.models.includes("all-proxy-models")?(0,t.jsx)(T.Badge,{color:"red",children:"All proxy models"}):(0,t.jsxs)(t.Fragment,{children:[tv.models.map((e,l)=>(0,t.jsx)(T.Badge,{color:"blue",children:e},`direct-${l}`)),(tv.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: ",ef.keys.filter(e=>e.user_id).length]}),(0,t.jsxs)(N.Text,{children:["Service Account Keys: ",ef.keys.filter(e=>!e.user_id).length]}),(0,t.jsxs)(N.Text,{className:"text-gray-500",children:["Total: ",ef.keys.length]})]})]}),(0,t.jsx)(et.default,{objectPermission:tv.object_permission,variant:"card",accessToken:o}),(0,t.jsx)(S.Card,{children:(0,t.jsx)(J,{globalGuardrailNames:eY,teamGuardrails:tv.metadata?.guardrails||[],optedOutGlobalGuardrails:tv.metadata?.opted_out_global_guardrails||[],killSwitchOn:tT,variant:"inline"})}),(0,t.jsxs)(S.Card,{children:[(0,t.jsx)(N.Text,{className:"font-semibold text-gray-900 mb-3",children:"Policies"}),tv.policies&&tv.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:tv.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}),e2&&(0,t.jsx)(N.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!e2&&e1[e]&&e1[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:e1[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:tv.metadata?.logging||[],disabledCallbacks:[],variant:"card"})]})},{key:eM,label:eD[eM],children:(0,t.jsx)(ek,{teamId:e})},{key:ez,label:eD[ez],children:(0,t.jsx)(eZ,{teamId:e,teamAlias:tv.team_alias,organization:ts})},{key:eF,label:eD[eF],children:(0,t.jsx)(eR,{teamData:ef,canEditTeam:th,handleMemberDelete:e=>{e6(e),e7(!0)},setSelectedEditMember:eV,setIsEditMemberModalVisible:eL,setIsAddMemberModalVisible:eN})},{key:eO,label:eD[eO],children:(0,t.jsx)(e_,{teamId:e,accessToken:o,canEditTeam:th})},{key:eP,label:eD[eP],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"}),th&&!eU&&(0,t.jsx)(I.Button,{icon:(0,t.jsx)(g.EditOutlined,{className:"h-4 w-4"}),onClick:()=>eE(!0),children:"Edit Settings"})]}),eU&&eQ?(0,t.jsx)("div",{className:"p-4",children:"Loading..."}):eU?(0,t.jsxs)(M.Form,{form:eC,onFinish:tf,onValuesChange:e=>{if("disable_global_guardrails"in e){let t=!0===e.disable_global_guardrails,l=(eC.getFieldValue("guardrails")||[]).filter(e=>!eY.has(e));eC.setFieldValue("guardrails",t?l:[...Array.from(eY),...l])}},initialValues:{...tv,team_alias:tv.team_alias,models:tv.models,tpm_limit:tv.tpm_limit,rpm_limit:tv.rpm_limit,modelLimits:Array.from(new Set([...Object.keys(tv.metadata?.model_tpm_limit??{}),...Object.keys(tv.metadata?.model_rpm_limit??{})])).map(e=>({model:e,tpm:tv.metadata?.model_tpm_limit?.[e],rpm:tv.metadata?.model_rpm_limit?.[e]})),max_budget:tv.max_budget,soft_budget:tv.soft_budget,budget_duration:tv.budget_duration,team_member_tpm_limit:tv.team_member_budget_table?.tpm_limit,team_member_rpm_limit:tv.team_member_budget_table?.rpm_limit,team_member_budget:tv.team_member_budget_table?.max_budget,team_member_budget_duration:tv.team_member_budget_table?.budget_duration,guardrails:tN,policies:tv.policies||[],disable_global_guardrails:tv.metadata?.disable_global_guardrails||!1,soft_budget_alerting_emails:Array.isArray(tv.metadata?.soft_budget_alerting_emails)?tv.metadata.soft_budget_alerting_emails.join(", "):"",metadata:tv.metadata?JSON.stringify((({logging:e,secret_manager_settings:t,soft_budget_alerting_emails:l,model_tpm_limit:a,model_rpm_limit:s,...i})=>i)(tv.metadata),null,2):"",logging_settings:tv.metadata?.logging||[],secret_manager_settings:tv.metadata?.secret_manager_settings?JSON.stringify(tv.metadata.secret_manager_settings,null,2):"",organization_id:tv.organization_id,vector_stores:tv.object_permission?.vector_stores||[],mcp_servers:tv.object_permission?.mcp_servers||[],mcp_access_groups:tv.object_permission?.mcp_access_groups||[],mcp_servers_and_groups:{servers:tv.object_permission?.mcp_servers||[],accessGroups:tv.object_permission?.mcp_access_groups||[],toolsets:tv.object_permission?.mcp_toolsets||[]},mcp_tool_permissions:tv.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:tv.object_permission?.agents||[],accessGroups:tv.object_permission?.agent_access_groups||[]},access_group_ids:tv.access_group_ids||[],default_team_member_models:tv.default_team_member_models||[]},layout:"vertical",children:[(0,t.jsx)(M.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(z.Input,{type:""})}),(0,t.jsx)(M.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Please select at least one model"}],children:(0,t.jsx)(Z.ModelSelect,{value:eC.getFieldValue("models")||[],onChange:e=>eC.setFieldValue("models",e),teamID:e,organizationID:ef?.team_info?.organization_id||void 0,options:{includeSpecialOptions:!0,includeUserModels:!ef?.team_info?.organization_id,showAllProxyModelsOverride:(0,u.isProxyAdminRole)(tr)&&!ef?.team_info?.organization_id},context:"team",dataTestId:"models-select"})}),(0,t.jsx)(M.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Soft Budget (USD)",name:"soft_budget",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.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)(z.Input,{placeholder:"example1@test.com, example2@test.com"})}),(0,t.jsxs)(j.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)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Default Model Access"," ",(0,t.jsx)(R.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)(x.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"default_team_member_models",children:(0,t.jsx)(M.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.models!==t.models,children:({getFieldValue:e})=>{let l=e("models")||tv.models||[];return(0,t.jsx)(O.Select,{mode:"multiple",placeholder:"Leave empty — all team models accessible to every member",value:eC.getFieldValue("default_team_member_models")||[],onChange:e=>eC.setFieldValue("default_team_member_models",e),options:l.map(e=>({label:e,value:e}))})}})}),(0,t.jsx)(M.Form.Item,{label:"Default Budget (USD)",name:"team_member_budget",tooltip:"Default spend budget for each member in this team.",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Default Budget Duration",name:"team_member_budget_duration",children:(0,t.jsx)(W,{onChange:e=>eC.setFieldValue("team_member_budget_duration",e),value:eC.getFieldValue("team_member_budget_duration")})}),(0,t.jsx)(M.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)(M.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)(el.default,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,t.jsx)(M.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)(el.default,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})})]})]}),(0,t.jsx)(M.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(O.Select,{placeholder:"n/a",children:[(0,t.jsx)(O.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(O.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(O.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(M.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(el.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(el.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Model-Specific Rate Limits",tooltip:"Set per-model TPM/RPM limits that apply across the whole team.",children:(0,t.jsx)(M.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)(P.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(M.Form.Item,{...s,name:[l,"model"],rules:[{required:!0,message:"Missing model"},{validator:(e,t)=>t&&(eC.getFieldValue("modelLimits")??[]).filter(e=>e?.model===t).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],style:{minWidth:240},children:(0,t.jsx)(O.Select,{showSearch:!0,placeholder:"Select model",allowClear:!0,options:tg.map(e=>({value:e,label:e}))})}),(0,t.jsx)(M.Form.Item,{...s,name:[l,"tpm"],rules:[{validator:async(e,t)=>{let a=(eC.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)(M.Form.Item,{...s,name:[l,"rpm"],children:(0,t.jsx)(F.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(p.MinusCircleOutlined,{onClick:()=>a(l),style:{color:"#ef4444"}})]},e)),(0,t.jsx)(M.Form.Item,{children:(0,t.jsx)(I.Button,{type:"dashed",onClick:()=>l(),block:!0,icon:(0,t.jsx)(_.PlusOutlined,{}),children:"Add Model Limit"})})]})})}),(0,t.jsx)(M.Form.Item,{label:"Router Settings",children:(0,t.jsx)(ei.default,{ref:ta,accessToken:o||"",value:tv.router_settings?{router_settings:tv.router_settings}:void 0})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(R.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)(x.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",children:(0,t.jsxs)(O.Select,{mode:"multiple",placeholder:"Select guardrails",optionLabelProp:"label",tagRender:({label:e,value:l,closable:a,onClose:s})=>{let i=eY.has(l);return(0,t.jsxs)(L.Tag,{color:"blue",closable:a,onClose:s,onMouseDown:tC,style:{marginInlineEnd:4},children:[i&&(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4},"aria-label":"Global guardrail"}),e]})},children:[(0,t.jsx)(O.Select.OptGroup,{label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4}}),"Global"]}),children:(eJ?.guardrails??[]).filter(e=>e.litellm_params?.default_on).map(e=>(0,t.jsx)(O.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,disabled:tu,children:e.guardrail_name},e.guardrail_name))}),(0,t.jsx)(O.Select.OptGroup,{label:"Other",children:(eJ?.guardrails??[]).filter(e=>!e.litellm_params?.default_on).map(e=>(0,t.jsx)(O.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,children:e.guardrail_name},e.guardrail_name))})]})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable all global guardrails"," ",(0,t.jsx)(R.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)(x.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)(D.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(R.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)(x.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",children:(0,t.jsx)(O.Select,{mode:"tags",placeholder:"Select or enter policies",options:eX.map(e=>({value:e,label:e}))})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(R.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)(x.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)($.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(M.Form.Item,{label:"Vector Stores",name:"vector_stores","aria-label":"Vector Stores",children:(0,t.jsx)(ea.default,{onChange:e=>eC.setFieldValue("vector_stores",e),value:eC.getFieldValue("vector_stores"),accessToken:o||"",placeholder:"Select vector stores"})}),(0,t.jsx)(M.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(q.default,{onChange:e=>eC.setFieldValue("allowed_passthrough_routes",e),value:eC.getFieldValue("allowed_passthrough_routes"),accessToken:o||"",placeholder:"Select pass through routes"})}),(0,t.jsx)(M.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(Y.default,{onChange:e=>eC.setFieldValue("mcp_servers_and_groups",e),value:eC.getFieldValue("mcp_servers_and_groups"),accessToken:o||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(M.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(z.Input,{type:"hidden"})}),(0,t.jsx)(M.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:eC.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:eC.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eC.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(M.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(K.default,{onChange:e=>eC.setFieldValue("agents_and_groups",e),value:eC.getFieldValue("agents_and_groups"),accessToken:o||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(M.Form.Item,{label:"Organization",name:"organization_id",children:(0,t.jsx)(O.Select,{allowClear:!0,placeholder:"Select an organization",showSearch:!0,optionFilterProp:"label",options:to.map(e=>({value:e.organization_id,label:e.organization_alias||e.organization_id}))})}),(0,t.jsx)(M.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(es.default,{value:eC.getFieldValue("logging_settings"),onChange:e=>eC.setFieldValue("logging_settings",e)})}),(0,t.jsx)(M.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:eu?"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)(z.Input.TextArea,{rows:6,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!eu})}),(0,t.jsx)(M.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(z.Input.TextArea,{rows:10})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 pr-0 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(I.Button,{onClick:()=>eE(!1),disabled:tt,children:"Cancel"}),(0,t.jsx)(I.Button,{icon:(0,t.jsx)(b.SaveOutlined,{className:"h-4 w-4"}),type:"primary",htmlType:"submit",loading:tt,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:tv.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:tv.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(tv.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:tv.models.map((e,l)=>(0,t.jsx)(T.Badge,{color:"red",children:e},l))})]}),tv.default_team_member_models&&tv.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:tv.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:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",tv.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",tv.rpm_limit||"Unlimited"]}),(eb=tv.metadata?.model_tpm_limit??{},ey=tv.metadata?.model_rpm_limit??{},0===(ej=Array.from(new Set([...Object.keys(eb),...Object.keys(ey)]))).length?null:(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(N.Text,{className:"text-gray-500",children:"Per-model limits:"}),ej.map(e=>(0,t.jsxs)("div",{className:"text-xs ml-2",children:[e,": TPM ",eb[e]??"—",", RPM ",ey[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!==tv.max_budget?`$${(0,m.formatNumberWithCommas)(tv.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Soft Budget:"," ",null!==tv.soft_budget&&void 0!==tv.soft_budget?`$${(0,m.formatNumberWithCommas)(tv.soft_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Reset: ",tv.budget_duration||"Never"]}),tv.metadata?.soft_budget_alerting_emails&&Array.isArray(tv.metadata.soft_budget_alerting_emails)&&tv.metadata.soft_budget_alerting_emails.length>0&&(0,t.jsxs)("div",{children:["Soft Budget Alerting Emails: ",tv.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)(R.Tooltip,{title:"These are limits on individual team members",children:(0,t.jsx)(x.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),(0,t.jsxs)("div",{children:["Max Budget: ",tv.team_member_budget_table?.max_budget||"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Duration: ",tv.team_member_budget_table?.budget_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["Key Duration: ",tv.metadata?.team_member_key_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["TPM Limit: ",tv.team_member_budget_table?.tpm_limit||"No Limit"]}),(0,t.jsxs)("div",{children:["RPM Limit: ",tv.team_member_budget_table?.rpm_limit||"No Limit"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Router Settings"}),tv.router_settings&&Object.values(tv.router_settings).some(e=>null!=e&&""!==e&&!(Array.isArray(e)&&0===e.length))?(0,t.jsxs)("div",{className:"mt-1 space-y-1",children:[tv.router_settings.routing_strategy&&(0,t.jsxs)("div",{children:["Routing Strategy:"," ",(0,t.jsx)(T.Badge,{color:"blue",children:tv.router_settings.routing_strategy})]}),null!=tv.router_settings.num_retries&&(0,t.jsxs)("div",{children:["Number of Retries: ",tv.router_settings.num_retries]}),null!=tv.router_settings.allowed_fails&&(0,t.jsxs)("div",{children:["Allowed Failures: ",tv.router_settings.allowed_fails]}),null!=tv.router_settings.cooldown_time&&(0,t.jsxs)("div",{children:["Cooldown Time: ",tv.router_settings.cooldown_time,"s"]}),null!=tv.router_settings.timeout&&(0,t.jsxs)("div",{children:["Timeout: ",tv.router_settings.timeout,"s"]}),null!=tv.router_settings.retry_after&&(0,t.jsxs)("div",{children:["Retry After: ",tv.router_settings.retry_after,"s"]}),tv.router_settings.fallbacks&&Array.isArray(tv.router_settings.fallbacks)&&tv.router_settings.fallbacks.length>0&&(0,t.jsxs)("div",{children:["Fallbacks: ",tv.router_settings.fallbacks.length," configured"]}),tv.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:tv.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Status"}),(0,t.jsx)(T.Badge,{color:tv.blocked?"red":"green",children:tv.blocked?"Blocked":"Active"})]}),(0,t.jsx)(et.default,{objectPermission:tv.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:o}),(0,t.jsx)(J,{globalGuardrailNames:eY,teamGuardrails:tv.metadata?.guardrails||[],optedOutGlobalGuardrails:tv.metadata?.opted_out_global_guardrails||[],killSwitchOn:tT,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsx)(Q.default,{loggingConfigs:tv.metadata?.logging||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"}),tv.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 text-xs overflow-x-auto",children:JSON.stringify(tv.metadata.secret_manager_settings,null,2)})]})]})]})}].filter(e=>tx.includes(e.key))}),(0,t.jsx)(er.default,{visible:eA,onCancel:()=>eL(!1),onSubmit:ty,initialData:eB,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)(R.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)(x.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:.01,min:0,placeholder:"Budget limit for this member within this team"},{name:"tpm_limit",label:(0,t.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,t.jsx)(R.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)(x.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)(R.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)(x.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)(R.Tooltip,{title:"Models this member can access within this team. Leave empty to inherit all team models.",children:(0,t.jsx)(x.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"multi-select",options:(tv.models||[]).map(e=>({label:e,value:e})),placeholder:"Leave empty to inherit all team models"}]}}),(0,t.jsx)(i.default,{isVisible:ew,onCancel:()=>eN(!1),onSubmit:tb,accessToken:o,teamId:e}),(0,t.jsx)(G.default,{isOpen:e8,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:e3?.user_id,code:!0},{label:"Email",value:e3?.user_email},{label:"Role",value:e3?.role}],onCancel:()=>{e7(!1),e6(null)},onOk:tj,confirmLoading:e9})]})}],56567)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2005c732f6d6cbb4.js b/litellm/proxy/_experimental/out/_next/static/chunks/2005c732f6d6cbb4.js deleted file mode 100644 index 0ea5e0655a..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/2005c732f6d6cbb4.js +++ /dev/null @@ -1,84 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:T}=n.Select,P=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(T,{value:"BLOCK",children:"Block"}),(0,l.jsx)(T,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,T]=m.default.useState(""),[P,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void T(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}T(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),T("")}).finally(()=>{L(!1)})}else T(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),T(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),P?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:H,Text:q}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(q,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(q,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:T,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,H]=(0,m.useState)(!1),[q,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[Z,X]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>H(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(P,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:T,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:q,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!q)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===q);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:q,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:Z,patternRegex:ee,patternAction:ea,onNameChange:X,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{Z&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:Z,pattern:ee,action:ea}),H(!1),X(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{H(!1),X(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var Z=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let X={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),X=t,t},et=()=>Object.keys(X).length>0?X:Z,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",()=>em,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",()=>ec],180766);var eu=e.i(435451);let{Title:ep}=d.Typography,eg=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eu.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ex=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ep,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eg,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var eh=e.i(482725),ef=e.i(850627);let ey=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(eh.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ef.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var ej=e.i(592968),e_=e.i(750113);let eb=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(ej.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(ej.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(ej.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(ej.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(ej.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var ev=e.i(536916),ew=e.i(149192),eN=e.i(741585),eN=eN,eC=e.i(724154);e.i(247167);var eS=e.i(931067);let ek={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eI=e.i(9583),eA=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:ek}))});let{Text:eO}=d.Typography,{Option:eT}=n.Select,eP=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eA,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eO,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eT,{value:e.category,children:e.category},e.category))})]}),eL=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eO,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(ej.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(ew.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eN.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(eC.StopOutlined,{}),children:"Select All & Block"})]})]}),eB=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eO,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eO,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(ev.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eO,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eT,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eN.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(eC.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eF,Text:e$}=d.Typography,eE=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eF,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(e$,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eP,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eL,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(eB,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eM=e.i(304967),eR=e.i(599724),eG=e.i(312361),ez=e.i(21548),eD=e.i(827252);let eK={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eH=({value:e,onChange:t,disabled:a=!1})=>{let r={...eK,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(eR.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eG.Divider,{}),0===r.rules.length?(0,l.jsx)(ez.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eM.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(eR.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eG.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(eR.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(ej.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eq,Text:eJ,Link:eU}=d.Typography,{Option:eW}=n.Select,eV={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,T]=(0,m.useState)([]),[P,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[H,q]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,Z]=(0,m.useState)(void 0),[X,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,ep]=(0,m.useState)(!1),[eg,eh]=(0,m.useState)([]),[ef,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),e_=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),q(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},ew=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eN=(e,t)=>{C(a=>({...a,[e]:t}))},eC=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},eS=()=>{x.resetFields(),j(null),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),Z(void 0),en("warn"),ec(""),ep(!1),k(0)},ek=()=>{eS(),t()},eI=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);if(void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=H&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),H&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ef.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ef.rules,r.litellm_params.default_action=ef.default_action,r.litellm_params.on_disallowed_action=ef.on_disallowed_action,ef.violation_message_template&&(r.litellm_params.violation_message_template=ef.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),X&&"realtime"===W&&(r.litellm_params.on_violation=X),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),eS(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eA=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:H,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{q(e),U(t)}}):null},eO=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:ek,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:ek,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit"},children:eO.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eW,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eW,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eW,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.pre_call})]})}),(0,l.jsx)(eW,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.during_call})]})}),(0,l.jsx)(eW,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.post_call})]})}),(0,l.jsx)(eW,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!e_&&!ei(y)&&!es(y)&&(0,l.jsx)(ey,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:ew,onActionSelect:eN,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eA("categories");if(es(y))return(0,l.jsx)(eb,{availableModels:eg,form:x});if(!y)return null;if(e_)return(0,l.jsx)(eH,{value:ef,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eA("patterns");return null;case 3:if(ei(y))return eA("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),ep(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>ep(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>Z(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:X===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:ek,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):s=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let n={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:s}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(n));let m=`/guardrails/${d}`,g=await fetch(m,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(n)});if(!g.ok){let e=await g.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tt.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(tr,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(tr,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tr,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(tr,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(tr,{value:"inherit",children:"Use global default"}),(0,l.jsx)(tr,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(tr,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "api_key": "your_aporia_api_key", - "project_name": "your_project_name" -}`})});case"AimSecurity":return(0,l.jsx)(r.Form.Item,{label:"Aim Security Configuration",name:"config",tooltip:"JSON configuration for Aim Security",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "api_key": "your_aim_api_key" -}`})});case"Bedrock":return(0,l.jsx)(r.Form.Item,{label:"Amazon Bedrock Configuration",name:"config",tooltip:"JSON configuration for Amazon Bedrock guardrails",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "guardrail_id": "your_guardrail_id", - "guardrail_version": "your_guardrail_version" -}`})});case"GuardrailsAI":return(0,l.jsx)(r.Form.Item,{label:"Guardrails.ai Configuration",name:"config",tooltip:"JSON configuration for Guardrails.ai",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "api_key": "your_guardrails_api_key", - "guardrail_id": "your_guardrail_id" -}`})});case"LakeraAI":return(0,l.jsx)(r.Form.Item,{label:"Lakera AI Configuration",name:"config",tooltip:"JSON configuration for Lakera AI",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "api_key": "your_lakera_api_key" -}`})});case"PromptInjection":return(0,l.jsx)(r.Form.Item,{label:"Prompt Injection Configuration",name:"config",tooltip:"JSON configuration for prompt injection detection",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "threshold": 0.8 -}`})});default:return(0,l.jsx)(r.Form.Item,{label:"Custom Configuration",name:"config",tooltip:"JSON configuration for your custom guardrail",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ - "key1": "value1", - "key2": "value2" -}`})})}})(),(0,l.jsxs)("div",{className:"flex justify-end space-x-2 mt-4",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:I,loading:h,children:"Update Guardrail"})]})]})})};var ts=((a={}).DB="db",a.CONFIG="config",a);e.s(["default",0,({guardrailsList:e,isLoading:t,onDeleteClick:a,accessToken:r,onGuardrailUpdated:i,isAdmin:s=!1,onGuardrailClick:n})=>{let[o,d]=(0,m.useState)([{id:"created_at",desc:!0}]),[c,u]=(0,m.useState)(!1),[p,g]=(0,m.useState)(null),x=e=>e?new Date(e).toLocaleString():"-",h=[{header:"Guardrail ID",accessorKey:"guardrail_id",cell:e=>(0,l.jsx)(ej.Tooltip,{title:String(e.getValue()||""),children:(0,l.jsx)(e4.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>e.getValue()&&n(e.getValue()),children:e.getValue()?`${String(e.getValue()).slice(0,7)}...`:""})})},{header:"Name",accessorKey:"guardrail_name",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.guardrail_name,children:(0,l.jsx)("span",{className:"text-xs font-medium",children:t.guardrail_name||"-"})})}},{header:"Provider",accessorKey:"litellm_params.guardrail",cell:({row:e})=>{let{logo:t,displayName:a}=ed(e.original.litellm_params.guardrail);return(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,l.jsx)("img",{src:t,alt:`${a} logo`,className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)("span",{className:"text-xs",children:a})]})}},{header:"Mode",accessorKey:"litellm_params.mode",cell:({row:e})=>{let t=e.original;return(0,l.jsx)("span",{className:"text-xs",children:t.litellm_params.mode})}},{header:"Default On",accessorKey:"litellm_params.default_on",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(e7.Badge,{color:t.litellm_params?.default_on?"green":"gray",className:"text-xs font-normal",size:"xs",children:t.litellm_params?.default_on?"Default On":"Default Off"})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.created_at,children:(0,l.jsx)("span",{className:"text-xs",children:x(t.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:({row:e})=>{let t=e.original;return(0,l.jsx)(ej.Tooltip,{title:t.updated_at,children:(0,l.jsx)("span",{className:"text-xs",children:x(t.updated_at)})})}},{id:"actions",header:"Actions",cell:({row:e})=>{let t=e.original,r=t.guardrail_definition_location===ts.CONFIG;return(0,l.jsx)("div",{className:"flex space-x-2",children:r?(0,l.jsx)(ej.Tooltip,{title:"Config guardrail cannot be deleted on the dashboard. Please delete it from the config file.",children:(0,l.jsx)(e2.Icon,{"data-testid":"config-delete-icon",icon:e5.TrashIcon,size:"sm",className:"cursor-not-allowed text-gray-400",title:"Config guardrail cannot be deleted on the dashboard. Please delete it from the config file.","aria-label":"Delete guardrail (config)"})}):(0,l.jsx)(ej.Tooltip,{title:"Delete guardrail",children:(0,l.jsx)(e2.Icon,{icon:e5.TrashIcon,size:"sm",onClick:()=>t.guardrail_id&&a(t.guardrail_id,t.guardrail_name||"Unnamed Guardrail"),className:"cursor-pointer hover:text-red-500"})})})}}],f=(0,e9.useReactTable)({data:e,columns:h,state:{sorting:o},onSortingChange:d,getCoreRowModel:(0,te.getCoreRowModel)(),getSortedRowModel:(0,te.getSortedRowModel)(),enableSorting:!0});return(0,l.jsxs)("div",{className:"rounded-lg custom-border relative",children:[(0,l.jsx)("div",{className:"overflow-x-auto",children:(0,l.jsxs)(eY.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,l.jsx)(eX.TableHead,{children:f.getHeaderGroups().map(e=>(0,l.jsx)(e1.TableRow,{children:e.headers.map(e=>(0,l.jsx)(e0.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,l.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,e9.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,l.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,l.jsx)(e8.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,l.jsx)(e3.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,l.jsx)(e6.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,l.jsx)(eQ.TableBody,{children:t?(0,l.jsx)(e1.TableRow,{children:(0,l.jsx)(eZ.TableCell,{colSpan:h.length,className:"h-8 text-center",children:(0,l.jsx)("div",{className:"text-center text-gray-500",children:(0,l.jsx)("p",{children:"Loading..."})})})}):e.length>0?f.getRowModel().rows.map(e=>(0,l.jsx)(e1.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,l.jsx)(eZ.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,e9.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,l.jsx)(e1.TableRow,{children:(0,l.jsx)(eZ.TableCell,{colSpan:h.length,className:"h-8 text-center",children:(0,l.jsx)("div",{className:"text-center text-gray-500",children:(0,l.jsx)("p",{children:"No guardrails found"})})})})})]})}),p&&(0,l.jsx)(ti,{visible:c,onClose:()=>u(!1),accessToken:r,onSuccess:()=>{u(!1),g(null),i()},guardrailId:p.guardrail_id||"",fullLitellmParams:p.litellm_params,initialValues:{guardrail_name:p.guardrail_name||"",provider:Object.keys(ea).find(e=>ea[e]===p?.litellm_params.guardrail)||"",mode:p.litellm_params.mode,default_on:p.litellm_params.default_on,pii_entities_config:p.litellm_params.pii_entities_config,skip_system_message_choice:ec(p.litellm_params?.skip_system_message_in_guardrail),...p.guardrail_info}})]})}],782719);var tn=e.i(500330),to=e.i(245094),eN=eN,td=e.i(530212),tc=e.i(350967),tm=e.i(197647),tu=e.i(653824),tp=e.i(881073),tg=e.i(404206),tx=e.i(723731),th=e.i(629569),tf=e.i(678784),ty=e.i(118366),tj=e.i(560445);let{Text:t_}=d.Typography,{Option:tb}=n.Select,tv=({categories:e,onActionChange:t,onSeverityChange:a,onRemove:r,readOnly:i=!1})=>{let s=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(e,t)=>(0,l.jsxs)("div",{children:[(0,l.jsx)(t_,{strong:!0,children:e}),e!==t.category&&(0,l.jsx)("div",{children:(0,l.jsx)(t_,{type:"secondary",style:{fontSize:12},children:t.category})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>i?(0,l.jsx)(o.Tag,{color:{high:"red",medium:"orange",low:"yellow"}[e],children:e.toUpperCase()}):(0,l.jsxs)(n.Select,{value:e,onChange:e=>a?.(t.id,e),style:{width:150},size:"small",children:[(0,l.jsx)(tb,{value:"high",children:"High"}),(0,l.jsx)(tb,{value:"medium",children:"Medium"}),(0,l.jsx)(tb,{value:"low",children:"Low"})]})},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>i?(0,l.jsx)(o.Tag,{color:"BLOCK"===e?"red":"blue",children:e}):(0,l.jsxs)(n.Select,{value:e,onChange:e=>t?.(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(tb,{value:"BLOCK",children:"Block"}),(0,l.jsx)(tb,{value:"MASK",children:"Mask"})]})}];return(i||s.push({title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r?.(t.id),children:"Delete"})}),0===e.length)?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No categories configured."}):(0,l.jsx)(I.Table,{dataSource:e,columns:s,rowKey:"id",pagination:!1,size:"small"})},tw=({patterns:e,blockedWords:t,categories:a=[],readOnly:r=!0,onPatternActionChange:i,onPatternRemove:s,onBlockedWordUpdate:n,onBlockedWordRemove:o,onCategoryActionChange:d,onCategorySeverityChange:c,onCategoryRemove:m})=>{if(0===e.length&&0===t.length&&0===a.length)return null;let u=()=>{};return(0,l.jsxs)(l.Fragment,{children:[a.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Content Categories"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[a.length," categories configured"]})]}),(0,l.jsx)(tv,{categories:a,onActionChange:r?void 0:d,onSeverityChange:r?void 0:c,onRemove:r?void 0:m,readOnly:r})]}),e.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Pattern Detection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[e.length," patterns configured"]})]}),(0,l.jsx)(P,{patterns:e,onActionChange:r?u:i||u,onRemove:r?u:s||u})]}),t.length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"Blocked Keywords"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[t.length," keywords configured"]})]}),(0,l.jsx)(F,{keywords:t,onActionChange:r?u:n||u,onRemove:r?u:o||u})]})]})},{Text:tN}=d.Typography,tC=({guardrailData:e,guardrailSettings:t,isEditing:a,accessToken:r,onDataChange:i,onUnsavedChanges:s})=>{let[n,o]=(0,m.useState)([]),[d,c]=(0,m.useState)([]),[u,p]=(0,m.useState)([]),[g,x]=(0,m.useState)([]),[h,f]=(0,m.useState)([]),[y,j]=(0,m.useState)([]),[_,b]=(0,m.useState)(!1),[v,w]=(0,m.useState)(null),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(null);(0,m.useEffect)(()=>{if(e?.litellm_params?.patterns){let t=e.litellm_params.patterns.map((e,t)=>({id:`pattern-${t}`,type:"prebuilt"===e.pattern_type?"prebuilt":"custom",name:e.pattern_name||e.name,display_name:e.display_name,pattern:e.pattern,action:e.action||"BLOCK"}));o(t),x(t)}else o([]),x([]);if(e?.litellm_params?.blocked_words){let t=e.litellm_params.blocked_words.map((e,t)=>({id:`word-${t}`,keyword:e.keyword,action:e.action||"BLOCK",description:e.description}));c(t),f(t)}else c([]),f([]);if(e?.litellm_params?.categories?.length>0){let a=t?.content_filter_settings?.content_categories?Object.fromEntries(t.content_filter_settings.content_categories.map(e=>[e.name,e])):{},l=e.litellm_params.categories.map((e,t)=>{let l=a[e.category];return{id:`category-${t}`,category:e.category,display_name:l?.display_name??e.category,action:e.action||"BLOCK",severity_threshold:e.severity_threshold||"medium"}});p(l),j(l)}else p([]),j([]);let a=e?.litellm_params?.competitor_intent_config;if(a&&"object"==typeof a){let e=!!(a.brand_self&&Array.isArray(a.brand_self)&&a.brand_self.length>0),t={competitor_intent_type:a.competitor_intent_type??"airline",brand_self:Array.isArray(a.brand_self)?a.brand_self:[],locations:Array.isArray(a.locations)?a.locations:[],competitors:Array.isArray(a.competitors)?a.competitors:[],policy:a.policy??{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:"number"==typeof a.threshold_high?a.threshold_high:.7,threshold_medium:"number"==typeof a.threshold_medium?a.threshold_medium:.45,threshold_low:"number"==typeof a.threshold_low?a.threshold_low:.3};b(e),w(t),C(e),k(t)}else b(!1),w(null),C(!1),k(null)},[e,t?.content_filter_settings?.content_categories]),(0,m.useEffect)(()=>{i&&i(n,d,u,_,v)},[n,d,u,_,v,i]);let I=m.default.useMemo(()=>{let e=JSON.stringify(n)!==JSON.stringify(g),t=JSON.stringify(d)!==JSON.stringify(h),a=JSON.stringify(u)!==JSON.stringify(y),l=_!==N||JSON.stringify(v)!==JSON.stringify(S);return e||t||a||l},[n,d,u,_,v,g,h,y,N,S]);return((0,m.useEffect)(()=>{a&&s&&s(I)},[I,a,s]),e?.litellm_params?.guardrail!=="litellm_content_filter")?null:a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"Content Filter Configuration"}),I&&(0,l.jsx)(tj.Alert,{type:"warning",showIcon:!0,className:"mb-4",message:(0,l.jsx)(tN,{children:'You have unsaved changes to patterns or keywords. Remember to click "Save Changes" at the bottom.'})}),(0,l.jsx)("div",{className:"mb-6",children:t&&t.content_filter_settings&&(0,l.jsx)(Q,{prebuiltPatterns:t.content_filter_settings.prebuilt_patterns||[],categories:t.content_filter_settings.pattern_categories||[],selectedPatterns:n,blockedWords:d,onPatternAdd:e=>o([...n,e]),onPatternRemove:e=>o(n.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>o(n.map(a=>a.id===e?{...a,action:t}:a)),onBlockedWordAdd:e=>c([...d,e]),onBlockedWordRemove:e=>c(d.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>c(d.map(l=>l.id===e?{...l,[t]:a}:l)),onFileUpload:e=>{console.log("File uploaded:",e)},accessToken:r,contentCategories:t.content_filter_settings.content_categories||[],selectedContentCategories:u,onContentCategoryAdd:e=>p([...u,e]),onContentCategoryRemove:e=>p(u.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>p(u.map(l=>l.id===e?{...l,[t]:a}:l)),competitorIntentEnabled:_,competitorIntentConfig:v,onCompetitorIntentChange:(e,t)=>{b(e),w(t)}})})]}):(0,l.jsx)(tw,{patterns:n,blockedWords:d,categories:u,readOnly:!0})};var tS=e.i(788191),tk=e.i(245704),tI=e.i(518617);let tA={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};var tO=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:tA}))}),tT=e.i(987432);let tP={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M892 772h-80v-80c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v80h-80c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h80v80c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-80h80c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM373.5 498.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.8-1.7-203.2 89.2-203.2 200 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.8-1.1 6.4-4.8 5.9-8.8zM824 472c0-109.4-87.9-198.3-196.9-200C516.3 270.3 424 361.2 424 472c0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C357 742.6 326 814.8 324 891.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.5C505.8 695.7 563 672 624 672c110.4 0 200-89.5 200-200zm-109.5 90.5C690.3 586.7 658.2 600 624 600s-66.3-13.3-90.5-37.5a127.26 127.26 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-.1 34.2-13.4 66.3-37.6 90.5z"}}]},name:"usergroup-add",theme:"outlined"};var tL=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:tP}))}),tB=e.i(872934);let{Panel:tF}=$.Collapse,{TextArea:t$}=i.Input,tE={empty:{name:"Empty Template",code:`async def apply_guardrail(inputs, request_data, input_type): - # inputs: {texts, images, tools, tool_calls, structured_messages, model} - # request_data: {model, user_id, team_id, end_user_id, metadata} - # input_type: "request" or "response" - return allow()`},blockSSN:{name:"Block SSN",code:`def apply_guardrail(inputs, request_data, input_type): - for text in inputs["texts"]: - if regex_match(text, r"\\d{3}-\\d{2}-\\d{4}"): - return block("SSN detected") - return allow()`},redactEmail:{name:"Redact Emails",code:`def apply_guardrail(inputs, request_data, input_type): - pattern = r"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}" - modified = [] - for text in inputs["texts"]: - modified.append(regex_replace(text, pattern, "[EMAIL REDACTED]")) - return modify(texts=modified)`},blockSQL:{name:"Block SQL Injection",code:`def apply_guardrail(inputs, request_data, input_type): - if input_type != "request": - return allow() - for text in inputs["texts"]: - if contains_code_language(text, ["sql"]): - return block("SQL code not allowed") - return allow()`},validateJSON:{name:"Validate JSON",code:`def apply_guardrail(inputs, request_data, input_type): - if input_type != "response": - return allow() - - schema = {"type": "object", "required": ["name", "value"]} - - for text in inputs["texts"]: - obj = json_parse(text) - if obj is None: - return block("Invalid JSON response") - if not json_schema_valid(obj, schema): - return block("Response missing required fields") - return allow()`},externalAPI:{name:"External API Check (async)",code:`async def apply_guardrail(inputs, request_data, input_type): - # Call an external moderation API (async for non-blocking) - for text in inputs["texts"]: - response = await http_post( - "https://api.example.com/moderate", - body={"text": text, "user_id": request_data["user_id"]}, - headers={"Authorization": "Bearer YOUR_API_KEY"}, - timeout=10 - ) - - if not response["success"]: - # API call failed, allow by default or block - return allow() - - if response["body"].get("flagged"): - return block(response["body"].get("reason", "Content flagged")) - - return allow()`}},tM={"Return Values":[{name:"allow()",desc:"Let request/response through"},{name:"block(reason)",desc:"Reject with message"},{name:"modify(texts=[], images=[], tool_calls=[])",desc:"Transform content"}],"HTTP Requests (async)":[{name:"await http_request(url, method, headers, body)",desc:"Make async HTTP request"},{name:"await http_get(url, headers)",desc:"Async GET request"},{name:"await http_post(url, body, headers)",desc:"Async POST request"}],"Regex Functions":[{name:"regex_match(text, pattern)",desc:"Returns True if pattern found"},{name:"regex_replace(text, pattern, replacement)",desc:"Replace all matches"},{name:"regex_find_all(text, pattern)",desc:"Return list of matches"}],"JSON Functions":[{name:"json_parse(text)",desc:"Parse JSON string, returns None on error"},{name:"json_stringify(obj)",desc:"Convert to JSON string"},{name:"json_schema_valid(obj, schema)",desc:"Validate against JSON schema"}],"URL Functions":[{name:"extract_urls(text)",desc:"Extract all URLs from text"},{name:"is_valid_url(url)",desc:"Check if URL is valid"},{name:"all_urls_valid(text)",desc:"Check all URLs in text are valid"}],"Code Detection":[{name:"detect_code(text)",desc:"Returns True if code detected"},{name:"detect_code_languages(text)",desc:"Returns list of detected languages"},{name:'contains_code_language(text, ["sql"])',desc:"Check for specific languages"}],"Text Utilities":[{name:"contains(text, substring)",desc:"Check if substring exists"},{name:"contains_any(text, [substr1, substr2])",desc:"Check if any substring exists"},{name:"word_count(text)",desc:"Count words"},{name:"char_count(text)",desc:"Count characters"},{name:"lower(text) / upper(text) / trim(text)",desc:"String transforms"}]},tR=[{value:"pre_call",label:"pre_call (Request)"},{value:"post_call",label:"post_call (Response)"},{value:"during_call",label:"during_call (Parallel)"},{value:"logging_only",label:"logging_only"},{value:"pre_mcp_call",label:"pre_mcp_call (Before MCP Tool Call)"},{value:"post_mcp_call",label:"post_mcp_call (After MCP Tool Call)"},{value:"during_mcp_call",label:"during_mcp_call (During MCP Tool Call)"}],tG=({visible:e,onClose:t,onSuccess:a,accessToken:r,editData:i})=>{let o=!!i,[d,c]=(0,m.useState)(""),[g,x]=(0,m.useState)(["pre_call"]),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)("empty"),[_,b]=(0,m.useState)(tE.empty.code),[v,w]=(0,m.useState)(!1),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(!1),I={texts:["Hello, my SSN is 123-45-6789"],images:[],tools:[{type:"function",function:{name:"get_weather",description:"Get the current weather in a location",parameters:{type:"object",properties:{location:{type:"string",description:"City name"}},required:["location"]}}}],tool_calls:[],structured_messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"Hello, my SSN is 123-45-6789"}],model:"gpt-4"},A={texts:["The weather in San Francisco is 72°F and sunny."],images:[],tools:[],tool_calls:[{id:"call_abc123",type:"function",function:{name:"get_weather",arguments:'{"location": "San Francisco"}'}}],structured_messages:[],model:"gpt-4"},O={texts:['Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'],images:[],tools:[{type:"function",function:{name:"read_wiki_structure",description:"Read the structure of a GitHub repository (MCP tool passed as OpenAI tool)",parameters:{type:"object",properties:{repoName:{type:"string",description:"Repository name, e.g. BerriAI/litellm"}},required:["repoName"]}}}],tool_calls:[{id:"call_mcp_001",type:"function",function:{name:"read_wiki_structure",arguments:'{"repoName": "BerriAI/litellm"}'}}],structured_messages:[{role:"user",content:'Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'}],model:"mcp-tool-call"},[T,P]=(0,m.useState)(JSON.stringify(I,null,2)),[L,B]=(0,m.useState)(null),[F,E]=(0,m.useState)(null),M=(0,m.useRef)(null),R=e=>null==e?["pre_call"]:Array.isArray(e)?e.length?e:["pre_call"]:[e];(0,m.useEffect)(()=>{e&&(i?(c(i.guardrail_name||""),x(R(i.litellm_params?.mode)),f(i.litellm_params?.default_on||!1),b(i.litellm_params?.custom_code||tE.empty.code),j("")):(c(""),x(["pre_call"]),f(!1),j("empty"),b(tE.empty.code)),B(null),k(!1))},[e,i]);let G=async e=>{try{await navigator.clipboard.writeText(e),E(e),setTimeout(()=>E(null),2e3)}catch(e){console.error("Failed to copy:",e)}},z=async()=>{if(!d.trim())return void u.default.fromBackend("Please enter a guardrail name");if(!_.trim())return void u.default.fromBackend("Please enter custom code");if(!r)return void u.default.fromBackend("No access token available");w(!0);try{if(o&&i){let e={litellm_params:{custom_code:_}};d!==i.guardrail_name&&(e.guardrail_name=d);let t=R(i.litellm_params?.mode);(g.length!==t.length||g.some((e,a)=>e!==t[a]))&&(e.litellm_params.mode=g),h!==i.litellm_params?.default_on&&(e.litellm_params.default_on=h),await (0,p.updateGuardrailCall)(r,i.guardrail_id,e),u.default.success("Custom code guardrail updated successfully")}else await (0,p.createGuardrailCall)(r,{guardrail_name:d,litellm_params:{guardrail:"custom_code",mode:g,default_on:h,custom_code:_},guardrail_info:{}}),u.default.success("Custom code guardrail created successfully");a(),t()}catch(e){console.error("Failed to save guardrail:",e),u.default.fromBackend(`Failed to ${o?"update":"create"} guardrail: `+(e instanceof Error?e.message:String(e)))}finally{w(!1)}},K=async()=>{if(!r)return void B({error:"No access token available"});C(!0),B(null);try{let e;try{e=JSON.parse(T)}catch(e){B({error:"Invalid test input JSON"}),C(!1);return}e.texts||(e.texts=[]);let t=["pre_call","pre_mcp_call"],a=["post_call","post_mcp_call"],l=g.some(e=>t.includes(e))?"request":g.some(e=>a.includes(e))?"response":"request",i=await (0,p.testCustomCodeGuardrail)(r,{custom_code:_,test_input:e,input_type:l,request_data:{model:"test-model",metadata:{}}});i.success&&i.result?B(i.result):i.error?B({error:i.error,error_type:i.error_type}):B({error:"Unknown error occurred"})}catch(e){console.error("Failed to test custom code:",e),B({error:e instanceof Error?e.message:"Failed to test custom code"})}finally{C(!1)}},H=_.split("\n").length;return(0,l.jsxs)(s.Modal,{open:e,onCancel:t,footer:null,width:1400,className:"custom-code-modal",closable:!0,destroyOnClose:!0,children:[(0,l.jsxs)("div",{className:"flex flex-col h-[80vh]",children:[(0,l.jsxs)("div",{className:"pb-4 border-b border-gray-200",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:o?"Edit Custom Guardrail":"Create Custom Guardrail"}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Define custom logic using Python-like syntax"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-4 py-4 border-b border-gray-100",children:[(0,l.jsxs)("div",{className:"flex-1 max-w-[200px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Guardrail Name"}),(0,l.jsx)(tt.TextInput,{value:d,onValueChange:c,placeholder:"e.g., block-pii-custom"})]}),(0,l.jsxs)("div",{className:"w-[280px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Mode (can select multiple)"}),(0,l.jsx)(n.Select,{mode:"multiple",value:g,onChange:x,options:tR,className:"w-full",size:"middle",placeholder:"Select modes"})]}),(0,l.jsxs)("div",{className:"w-[180px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Template"}),(0,l.jsx)(n.Select,{value:y,onChange:e=>{j(e),b(tE[e].code)},className:"w-full",size:"middle",dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(eG.Divider,{style:{margin:"8px 0"}}),(0,l.jsxs)("div",{style:{padding:"8px 12px",cursor:"pointer",color:"#1890ff",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px"},onClick:e=>{e.preventDefault(),window.open("https://models.litellm.ai/guardrails","_blank")},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f0f0f0"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"},children:[(0,l.jsx)(tL,{}),(0,l.jsx)("span",{children:"Browse Community templates"}),(0,l.jsx)(tB.ExportOutlined,{style:{fontSize:"10px"}})]})]}),children:(0,l.jsx)(n.Select.OptGroup,{label:"STANDARD",children:Object.entries(tE).map(([e,t])=>(0,l.jsx)(n.Select.Option,{value:e,children:t.name},e))})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pt-5",children:[(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Default On"}),(0,l.jsx)(D.Switch,{checked:h,onChange:f})]})]}),(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden mt-4 gap-6",children:[(0,l.jsxs)("div",{className:"flex-[2] flex flex-col min-w-0 overflow-y-auto",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2 flex-shrink-0",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Python Logic"}),(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Restricted environment (no imports)"})]}),(0,l.jsxs)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e] flex-shrink-0",style:{minHeight:"300px",maxHeight:"400px"},children:[(0,l.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-12 bg-[#1e1e1e] border-r border-gray-700 text-right pr-3 pt-3 select-none overflow-hidden",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6"},children:Array.from({length:Math.max(H,20)},(e,t)=>(0,l.jsx)("div",{className:"text-gray-500 h-[22.4px]",children:t+1},t+1))}),(0,l.jsx)("textarea",{ref:M,value:_,onChange:e=>b(e.target.value),onKeyDown:e=>{if("Tab"===e.key){e.preventDefault();let t=e.currentTarget,a=t.selectionStart,l=t.selectionEnd;b(_.substring(0,a)+" "+_.substring(l)),setTimeout(()=>{t.selectionStart=t.selectionEnd=a+4},0)}},spellCheck:!1,className:"w-full h-full pl-14 pr-4 pt-3 pb-3 resize-none focus:outline-none bg-transparent text-gray-200",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6",tabSize:4}})]}),(0,l.jsx)($.Collapse,{activeKey:S?["test"]:[],onChange:e=>k(e.includes("test")),className:"mt-3 bg-white border border-gray-200 rounded-lg flex-shrink-0",expandIcon:({isActive:e})=>(0,l.jsx)(tO,{rotate:90*!!e}),children:(0,l.jsx)(tF,{header:(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,l.jsx)(tS.PlayCircleOutlined,{className:"text-blue-500"}),"Test Your Guardrail"]}),children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600",children:"Test Input (JSON)"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs text-gray-500",children:"Load example:"}),(0,l.jsx)("button",{type:"button",onClick:()=>P(JSON.stringify(I,null,2)),className:"px-2 py-1 text-xs rounded border border-orange-200 bg-orange-50 text-orange-700 hover:bg-orange-100 transition-colors",children:"Pre-call"}),(0,l.jsx)("button",{type:"button",onClick:()=>P(JSON.stringify(O,null,2)),className:"px-2 py-1 text-xs rounded border border-purple-200 bg-purple-50 text-purple-700 hover:bg-purple-100 transition-colors",children:"Pre MCP"}),(0,l.jsx)("button",{type:"button",onClick:()=>P(JSON.stringify(A,null,2)),className:"px-2 py-1 text-xs rounded border border-green-200 bg-green-50 text-green-700 hover:bg-green-100 transition-colors",children:"Post-call"})]})]}),(0,l.jsx)("div",{className:"mb-2 p-2 bg-gray-50 rounded text-xs text-gray-600 border border-gray-200",children:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"texts"}),": Message content (always)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"images"}),": Base64 images (vision)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tools"}),": Tool definitions ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"}),", MCP as OpenAI tool ",(0,l.jsx)("span",{className:"text-purple-600",children:"(pre_mcp_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tool_calls"}),": LLM tool calls ",(0,l.jsx)("span",{className:"text-green-600",children:"(post_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"structured_messages"}),": Full messages ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"model"}),": Model name (always)"]})]})}),(0,l.jsx)(t$,{value:T,onChange:e=>P(e.target.value),rows:8,className:"font-mono text-xs",placeholder:'{"texts": ["test message"], ...}'})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{size:"xs",onClick:K,disabled:N,icon:tS.PlayCircleOutlined,children:N?"Running...":"Run Test"}),L&&(0,l.jsx)("div",{className:`flex items-center gap-2 text-sm ${L.error?"text-red-600":"allow"===L.action?"text-green-600":"block"===L.action?"text-orange-600":"text-blue-600"}`,children:L.error?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{}),(0,l.jsxs)("span",{children:[L.error_type&&(0,l.jsxs)("span",{className:"font-medium",children:["[",L.error_type,"] "]}),L.error]})]}):"allow"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Allowed"]}):"block"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{})," Blocked: ",L.reason]}):"modify"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Modified",L.texts&&L.texts.length>0&&(0,l.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:["→ ",L.texts[0].substring(0,50),L.texts[0].length>50?"...":""]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," ",L.action||"Unknown"]})})]})]})},"test")}),(0,l.jsxs)("div",{className:"mt-3 p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-lg flex items-center justify-between flex-shrink-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"bg-blue-100 rounded-full p-2",children:(0,l.jsx)(tL,{className:"text-blue-600 text-lg"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-gray-900",children:"Built a useful guardrail?"}),(0,l.jsx)("div",{className:"text-xs text-gray-600",children:"Share it with the community and help others build faster"})]})]}),(0,l.jsx)(e4.Button,{size:"xs",onClick:()=>window.open("https://github.com/BerriAI/litellm-guardrails","_blank"),icon:tB.ExportOutlined,className:"bg-blue-600 hover:bg-blue-700 text-white border-0",children:"Contribute Template"})]})]}),(0,l.jsxs)("div",{className:"w-[300px] flex-shrink-0 overflow-auto border-l border-gray-200 pl-6",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)("span",{className:"font-semibold text-gray-700",children:"Available Primitives"})]}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Click to copy functions to clipboard"}),(0,l.jsx)($.Collapse,{defaultActiveKey:["Return Values"],className:"primitives-collapse bg-transparent border-0",expandIconPosition:"end",children:Object.entries(tM).map(([e,t])=>(0,l.jsx)(tF,{header:(0,l.jsx)("span",{className:"text-sm font-medium text-gray-700",children:e}),className:"bg-white mb-2 rounded-lg border border-gray-200",children:(0,l.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,l.jsx)("button",{onClick:()=>G(e.name),className:`w-full text-left px-2 py-2 rounded transition-colors ${F===e.name?"bg-green-100":"bg-gray-50 hover:bg-blue-50"}`,children:F===e.name?(0,l.jsxs)("span",{className:"flex items-center gap-1 text-xs font-mono text-green-700",children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Copied!"]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"text-xs font-mono text-gray-800",children:e.name}),(0,l.jsx)("div",{className:"text-[10px] text-gray-500 mt-0.5",children:e.desc})]})},e.name))})},e))})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-gray-200",children:[(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Changes are auto-saved to local draft"}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:z,loading:v,disabled:v||!d.trim(),icon:tT.SaveOutlined,children:o?"Update Guardrail":"Save Guardrail"})]})]})]}),(0,l.jsx)("style",{children:` - .custom-code-modal .ant-modal-content { - padding: 24px; - } - .custom-code-modal .ant-modal-close { - top: 20px; - right: 20px; - } - .primitives-collapse .ant-collapse-item { - border: none !important; - } - .primitives-collapse .ant-collapse-header { - padding: 8px 12px !important; - } - .primitives-collapse .ant-collapse-content-box { - padding: 8px 12px !important; - } - `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let o,[d,g]=(0,m.useState)(null),[x,h]=(0,m.useState)(null),[f,y]=(0,m.useState)(!0),[j,_]=(0,m.useState)(!1),[b]=r.Form.useForm(),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(null),[I,A]=(0,m.useState)({}),[O,T]=(0,m.useState)(!1),P={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[L,B]=(0,m.useState)(P),[F,$]=(0,m.useState)(!1),[E,M]=(0,m.useState)(!1),R=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),G=(0,m.useCallback)((e,t,a,l,r)=>{R.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(y(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(g(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(w([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),w(t),C(a)}}else w([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{y(!1)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);h(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},K=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);k(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{D()},[a]),(0,m.useEffect)(()=>{z(),K()},[e,a]),(0,m.useEffect)(()=>{if(d&&b){let e={...d.litellm_params||{}};delete e.skip_system_message_in_guardrail,b.setFieldsValue({guardrail_name:d.guardrail_name,...e,skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}})}},[d,x,b]);let H=(0,m.useCallback)(()=>{d?.litellm_params?.guardrail==="tool_permission"?B({rules:d.litellm_params?.rules||[],default_action:(d.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:d.litellm_params?.violation_message_template||""}):B(P),$(!1)},[d]);(0,m.useEffect)(()=>{H()},[H]);let q=async t=>{try{if(!a)return;let o={litellm_params:{}};t.guardrail_name!==d.guardrail_name&&(o.guardrail_name=t.guardrail_name),t.default_on!==d.litellm_params?.default_on&&(o.litellm_params.default_on=t.default_on);let c=ec(d.litellm_params?.skip_system_message_in_guardrail),m=t.skip_system_message_choice;void 0!==m&&m!==c&&("inherit"===m?o.litellm_params.skip_system_message_in_guardrail=null:"yes"===m?o.litellm_params.skip_system_message_in_guardrail=!0:o.litellm_params.skip_system_message_in_guardrail=!1);let g=d.guardrail_info,h=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(g)!==JSON.stringify(h)&&(o.guardrail_info=h);let f=d.litellm_params?.pii_entities_config||{},y={};if(v.forEach(e=>{y[e]=N[e]||"MASK"}),JSON.stringify(f)!==JSON.stringify(y)&&(o.litellm_params.pii_entities_config=y),d.litellm_params?.guardrail==="litellm_content_filter"&&O){var l,r,i,s,n;let e,t=(l=R.current.patterns||[],r=R.current.blockedWords||[],i=R.current.categories||[],s=R.current.competitorIntentEnabled,n=R.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);o.litellm_params.patterns=t.patterns,o.litellm_params.blocked_words=t.blocked_words,o.litellm_params.categories=t.categories,o.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(d.litellm_params?.guardrail==="tool_permission"){let e=d.litellm_params?.rules||[],t=L.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(d.litellm_params?.default_action||"deny").toLowerCase(),r=(L.default_action||"deny").toLowerCase(),i=l!==r,s=(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(L.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=d.litellm_params?.violation_message_template||"",u=L.violation_message_template||"",p=m!==u;(F||a||i||c||p)&&(o.litellm_params.rules=t,o.litellm_params.default_action=r,o.litellm_params.on_disallowed_action=n,o.litellm_params.violation_message_template=u||null)}let j=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",j);let b=d.litellm_params?.guardrail==="tool_permission";if(x&&j&&!b){let e=x[ea[j]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=d.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?o.litellm_params[e]=a:null!=l&&""!==l&&(o.litellm_params[e]=null))})}if(0===Object.keys(o.litellm_params).length&&delete o.litellm_params,0===Object.keys(o).length){u.default.info("No changes detected"),_(!1);return}await (0,p.updateGuardrailCall)(a,e,o),u.default.success("Guardrail updated successfully"),T(!1),z(),_(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(f)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let J=e=>e?new Date(e).toLocaleString():"-",{logo:U,displayName:W}=ed(d.litellm_params?.guardrail||""),V=async(e,t)=>{await (0,tn.copyToClipboard)(e)&&(A(e=>({...e,[t]:!0})),setTimeout(()=>{A(e=>({...e,[t]:!1}))},2e3))},Y="config"===d.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(td.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(th.Title,{children:d.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eR.Text,{className:"text-gray-500 font-mono",children:d.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:I["guardrail-id"]?(0,l.jsx)(tf.CheckIcon,{size:12}):(0,l.jsx)(ty.CopyIcon,{size:12}),onClick:()=>V(d.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${I["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tu.TabGroup,{children:[(0,l.jsxs)(tp.TabList,{className:"mb-4",children:[(0,l.jsx)(tm.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(tm.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tx.TabPanels,{children:[(0,l.jsxs)(tg.TabPanel,{children:[(0,l.jsxs)(tc.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[U&&(0,l.jsx)("img",{src:U,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(th.Title,{children:W})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:d.litellm_params?.mode||"-"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:J(d.created_at)}),(0,l.jsxs)(eR.Text,{children:["Last Updated: ",J(d.updated_at)]})]})]})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsx)(eR.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(d.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eR.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(eN.default,{}):(0,l.jsx)(eC.StopOutlined,{}),String(t)]})})]},e))})]})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsx)(eH,{value:L,disabled:!0})}),d.litellm_params?.guardrail==="custom_code"&&d.litellm_params?.custom_code&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eR.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!Y&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:d.litellm_params.custom_code})})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(tg.TabPanel,{children:(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(th.Title,{children:"Guardrail Settings"}),Y&&(0,l.jsx)(ej.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})}),!j&&!Y&&(d.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>_(!0),children:"Edit Settings"}))]}),j?(0,l.jsxs)(r.Form,{form:b,onFinish:q,initialValues:{guardrail_name:d.guardrail_name,...(o={...d.litellm_params||{}},delete o.skip_system_message_in_guardrail,o),skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{label:"Skip system messages in guardrail",name:"skip_system_message_choice",tooltip:"Unified guardrails: omit role: system from guardrail input (LLM still gets full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),d.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:S&&(0,l.jsx)(eE,{entities:S.supported_entities,actions:S.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:S.pii_entity_categories})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!0,accessToken:a,onDataChange:G,onUnsavedChanges:T}),(d.litellm_params?.guardrail==="tool_permission"||x)&&(0,l.jsx)(eG.Divider,{orientation:"left",children:"Provider Settings"}),d.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eH,{value:L,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ey,{selectedProvider:Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail)||null,accessToken:a,providerParams:x,value:d.litellm_params}),x&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);if(!e)return null;let t=x[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:d.litellm_params}):null})()]}),(0,l.jsx)(eG.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{_(!1),T(!1),H()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:d.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:d.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Yes":"No"})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:J(d.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:J(d.updated_at)})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eH,{value:L,disabled:!0})]})]})})]})]}),(0,l.jsx)(tG,{visible:E,onClose:()=>M(!1),onSuccess:()=>{M(!1),z()},accessToken:a,editData:d?{guardrail_id:d.guardrail_id,guardrail_name:d.guardrail_name,litellm_params:d.litellm_params}:null})]})}],969641);var tz=e.i(573421),tD=e.i(19732),tK=e.i(928685),tH=e.i(166406),tq=e.i(637235),tJ=e.i(755151),tU=e.i(240647);let{Text:tW}=d.Typography,tV=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tk.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tY}=i.Input,{Text:tQ}=d.Typography,tZ=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ej.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eD.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tY,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(e4.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tV,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[s,n]=(0,m.useState)(new Set),[o,c]=(0,m.useState)(""),[g,x]=(0,m.useState)([]),[f,y]=(0,m.useState)([]),[j,_]=(0,m.useState)(!1),b=e.filter(e=>e.guardrail_name?.toLowerCase().includes(o.toLowerCase())),v=async e=>{if(0===s.size||!a)return;_(!0),x([]),y([]);let t=[],l=[];await Promise.all(Array.from(s).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),x(t),y(l),_(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(h.Card,{className:"h-full",styles:{body:{padding:0,height:"100%"}},children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(i.Input,{prefix:(0,l.jsx)(tK.SearchOutlined,{}),placeholder:"Search guardrails...",value:o,onChange:e=>c(e.target.value)})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(eh.Spin,{})}):0===b.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(ez.Empty,{description:o?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(tz.List,{dataSource:b,renderItem:e=>(0,l.jsx)(tz.List.Item,{onClick:()=>{var t;let a;e.guardrail_name&&(t=e.guardrail_name,(a=new Set(s)).has(t)?a.delete(t):a.add(t),n(a))},style:{paddingLeft:24,paddingRight:16},className:`cursor-pointer hover:bg-gray-50 transition-colors ${s.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(tz.List.Item.Meta,{title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tD.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(d.Typography.Text,{className:"text-xs text-gray-600",children:[s.size," of ",b.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(d.Typography.Title,{level:2,className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===s.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tD.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tZ,{guardrailNames:Array.from(s),onSubmit:v,results:g.length>0?g:null,errors:f.length>0?f:null,isLoading:j,onClose:()=>n(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tG],64352);let tX="../ui/assets/logos/",t0=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tX}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tX}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tX}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tX}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tX}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tX}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tX}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tX}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tX}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tX}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tX}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tX}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tX}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tX}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tX}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tX}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tX}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tX}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tX}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tX}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tX}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tX}akto.svg`,tags:["Security","Safety","Monitoring"]},{id:"promptguard",name:"PromptGuard",description:"AI security gateway with prompt injection detection, PII redaction, topic filtering, entity blocklists, and hallucination detection. Self-hostable with drop-in proxy integration.",category:"partner",logo:`${tX}promptguard.svg`,tags:["Security","Prompt Injection","PII"],providerKey:"Promptguard",eval:{f1:94.9,precision:100,recall:90.4,testCases:5384,latency:"~150ms"}}];e.s(["ALL_CARDS",0,t0],230312)},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(464571),r=e.i(326373),i=e.i(653496),s=e.i(755151),n=e.i(646563),o=e.i(245094),d=e.i(764205),c=e.i(185357),m=e.i(782719),u=e.i(708347),p=e.i(969641),g=e.i(476993),x=e.i(727749),h=e.i(127952),f=e.i(180766);e.i(824296);var y=e.i(64352),j=e.i(311451),_=e.i(928685),b=e.i(266537),v=e.i(230312),w=e.i(826910);let N=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},C=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(N,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(w.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var S=e.i(447566);let k={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1},promptguard:{provider:"Promptguard",guardrailNameSuggestion:"PromptGuard",mode:"pre_call",defaultOn:!1}},I=({card:e,onBack:r,accessToken:i,onGuardrailCreated:s})=>{let[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)("overview"),u=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],p=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],g=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:r,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(S.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(l.Button,{onClick:()=>o(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:g.map(e=>(0,t.jsx)("div",{onClick:()=>m(e.key),style:{padding:"12px 20px",fontSize:14,color:d===e.key?"#1a73e8":"#5f6368",borderBottom:d===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:d===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===d&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:u.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:p.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(c.default,{visible:n,onClose:()=>o(!1),accessToken:i,onSuccess:()=>{o(!1),s()},preset:k[e.id]})]})},A=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=v.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(I,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(j.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(_.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]})]})};var O=e.i(988846),T=e.i(837007),P=e.i(409797),L=e.i(54131),B=e.i(995926),F=e.i(678784),$=e.i(634831),E=e.i(438100),M=e.i(302202),R=e.i(328196),G=e.i(879664);e.s(["InfoIcon",()=>G.default],168118);var G=G,z=e.i(212931),D=e.i(808613),K=e.i(199133),H=e.i(663435),q=e.i(954616),J=e.i(912598),U=e.i(135214),W=e.i(243652);let V=async(e,t)=>{let a=(0,d.getProxyBaseUrl)(),l=`${a}/guardrails/register`,r=await fetch(l,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.json().catch(()=>({})),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return r.json()},Y=(0,W.createQueryKeys)("guardrails");function Q(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt: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),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let Z={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{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"}},X={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function ee({label:e,value:a,color:l}){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 ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function et({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function ea({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=Z[e.status],c=X[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,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.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(M.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,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:o,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,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(P.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function el({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function er({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=Z[e.status],y=X[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(B.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(el,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)($.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(el,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(E.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(P.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(G.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)($.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(F.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(B.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ei({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="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 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(F.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(R.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,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,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function es({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[c,m]=(0,a.useState)("all"),[u,p]=(0,a.useState)(null),[g,h]=(0,a.useState)(new Set),[f,y]=(0,a.useState)(null),[_,b]=(0,a.useState)(!0),[v,w]=(0,a.useState)(null),[N,C]=(0,a.useState)(""),[S,k]=(0,a.useState)(!1),[I]=D.Form.useForm(),A=(()=>{let{accessToken:e}=(0,U.default)(),t=(0,J.useQueryClient)();return(0,q.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return V(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:Y.all})}})})();(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let P=(0,a.useCallback)(async()=>{if(!e)return void b(!1);b(!0),w(null);try{let t="all"===c?void 0:"pending"===c?"pending_review":c,a=await (0,d.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(Q)),s(a.summary)}catch(e){w(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{b(!1)}},[e,c,N]);(0,a.useEffect)(()=>{P()},[P]);let L=l.find(e=>e.id===u)??null,B=i.total,F=i.pending_review,$=i.active,E=i.rejected;async function M(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),x.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{x.default.fromBackend("Failed to update forward API key")}}async function R(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),x.default.success("Static headers updated")}catch{x.default.fromBackend("Failed to update static headers")}}async function G(t,a){if(e)try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),x.default.success("Forward client headers updated")}catch{x.default.fromBackend("Failed to update forward client headers")}}async function W(t){if(e)try{await (0,d.approveGuardrailSubmission)(e,t),y(null),u===t&&p(null),await P(),x.default.success("Guardrail approved")}catch{x.default.fromBackend("Failed to approve guardrail")}}async function Z(t){if(e)try{await (0,d.rejectGuardrailSubmission)(e,t),y(null),u===t&&p(null),await P(),x.default.success("Guardrail rejected")}catch{x.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${L?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ee,{label:"Total Submitted",value:B,color:"text-gray-900"}),(0,t.jsx)(ee,{label:"Pending Review",value:F,color:"text-yellow-600"}),(0,t.jsx)(ee,{label:"Active",value:$,color:"text-green-600"}),(0,t.jsx)(ee,{label:"Rejected",value:E,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)(O.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 guardrails...",value:n,onChange:e=>o(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-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:c,onChange:e=>m(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none 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",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>k(!0),className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)(T.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[_&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),v&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:v}),!_&&!v&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!_&&!v&&l.map(e=>(0,t.jsx)(ea,{guardrail:e,isSelected:u===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>p(u===e.id?null:e.id),onToggleForwardKey:()=>M(e.id),onToggleHeaders:()=>{var t;return t=e.id,void h(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>y({id:e.id,action:"approve"}),onReject:()=>y({id:e.id,action:"reject"})},e.id))]})]}),L&&(0,t.jsx)(er,{guardrail:L,onClose:()=>p(null),onApprove:()=>y({id:L.id,action:"approve"}),onReject:()=>y({id:L.id,action:"reject"}),onToggleForwardKey:()=>M(L.id),onUpdateCustomHeaders:e=>R(L.id,e),onUpdateExtraHeaders:e=>G(L.id,e)}),f&&(0,t.jsx)(ei,{action:f.action,guardrailName:l.find(e=>e.id===f.id)?.name??"",onConfirm:()=>"approve"===f.action?W(f.id):Z(f.id),onCancel:()=>y(null)}),(0,t.jsxs)(z.Modal,{title:"Submit Guardrail for Review",open:S,onCancel:()=>{k(!1),I.resetFields()},onOk:()=>I.submit(),okText:"Submit for Review",children:[(0,t.jsx)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800 mb-4",children:"Your guardrail will be sent for admin review before it becomes active."}),(0,t.jsxs)(D.Form,{form:I,layout:"vertical",initialValues:{mode:"pre_call"},onFinish:async e=>{let t={...e.extra_litellm_params?JSON.parse(e.extra_litellm_params):{},guardrail:"generic_guardrail_api",mode:e.mode,api_base:e.api_base};try{await A.mutateAsync({team_id:e.team_id,guardrail_name:e.guardrail_name,litellm_params:t,guardrail_info:e.guardrail_info?JSON.parse(e.guardrail_info):void 0}),x.default.success("Guardrail submitted for review"),k(!1),I.resetFields(),P()}catch{}},children:[(0,t.jsx)(D.Form.Item,{label:"Team",name:"team_id",rules:[{required:!0,message:"Select a team"}],children:(0,t.jsx)(H.default,{})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Enter a guardrail name"}],children:(0,t.jsx)(j.Input,{placeholder:"e.g. pii-detection"})}),(0,t.jsx)(D.Form.Item,{label:"Mode",name:"mode",rules:[{required:!0,message:"Select a mode"}],children:(0,t.jsxs)(K.Select,{children:[(0,t.jsx)(K.Select.Option,{value:"pre_call",children:"Pre Call"}),(0,t.jsx)(K.Select.Option,{value:"post_call",children:"Post Call"}),(0,t.jsx)(K.Select.Option,{value:"during_call",children:"During Call"})]})}),(0,t.jsx)(D.Form.Item,{label:"API Base URL",name:"api_base",rules:[{required:!0,message:"Enter the API base URL"},{type:"url",message:"Must be a valid URL"}],children:(0,t.jsx)(j.Input,{placeholder:"https://your-guardrail-api.com/v1/check",className:"font-mono"})}),(0,t.jsx)(D.Form.Item,{label:"Additional litellm_params (optional)",name:"extra_litellm_params",tooltip:"JSON object merged into litellm_params. e.g. forward_api_key, headers, model, unreachable_fallback",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if("object"!=typeof e||Array.isArray(e))return Promise.reject("Must be a JSON object");return Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"forward_api_key": true, "headers": {"X-Custom": "value"}}'})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Info (optional)",name:"guardrail_info",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"description": "Detects PII in requests"}'})})]})]})]})}e.s(["default",0,({accessToken:e,userRole:j})=>{let[_,b]=(0,a.useState)([]),[v,w]=(0,a.useState)(!1),[N,C]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[I,O]=(0,a.useState)(!1),[T,P]=(0,a.useState)(null),[L,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),E=!!j&&(0,u.isAdminRole)(j),M=async()=>{if(e){k(!0);try{let t=await (0,d.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),b(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{k(!1)}}};(0,a.useEffect)(()=>{M()},[e]);let R=()=>{M()},G=async()=>{if(T&&e){O(!0);try{await (0,d.deleteGuardrailCall)(e,T.guardrail_id),x.default.success(`Guardrail "${T.guardrail_name}" deleted successfully`),await M()}catch(e){console.error("Error deleting guardrail:",e),x.default.fromBackend("Failed to delete guardrail")}finally{O(!1),B(!1),P(null)}}},z=T&&T.litellm_params?(0,f.getGuardrailLogoAndName)(T.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsx)(i.Tabs,{defaultActiveKey:"submitted",items:[...E?[{key:"garden",label:"Guardrail Garden",children:(0,t.jsx)(A,{accessToken:e,onGuardrailCreated:R})},{key:"guardrails",label:"Guardrails",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(r.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(n.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{F&&$(null),w(!0)}},{key:"custom_code",icon:(0,t.jsx)(o.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{F&&$(null),C(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(s.DownOutlined,{className:"ml-2"})]})})}),F?(0,t.jsx)(p.default,{guardrailId:F,onClose:()=>$(null),accessToken:e,isAdmin:E}):(0,t.jsx)(m.default,{guardrailsList:_,isLoading:S,onDeleteClick:(e,t)=>{P(_.find(t=>t.guardrail_id===e)||null),B(!0)},accessToken:e,onGuardrailUpdated:M,isAdmin:E,onGuardrailClick:e=>$(e)}),(0,t.jsx)(c.default,{visible:v,onClose:()=>{w(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(y.CustomCodeModal,{visible:N,onClose:()=>{C(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(h.default,{isOpen:L,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${T?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:T?.guardrail_name},{label:"ID",value:T?.guardrail_id,code:!0},{label:"Provider",value:z},{label:"Mode",value:T?.litellm_params.mode},{label:"Default On",value:T?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{B(!1),P(null)},onOk:G,confirmLoading:I})]})},{key:"playground",label:"Test Playground",disabled:!e,children:(0,t.jsx)(g.default,{guardrailsList:_,isLoading:S,accessToken:e,onClose:()=>{}})}]:[],{key:"submitted",label:"Submitted Guardrails",children:(0,t.jsx)(es,{accessToken:e})}]})})}],487304)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/276409aa6cbc14db.js b/litellm/proxy/_experimental/out/_next/static/chunks/276409aa6cbc14db.js new file mode 100644 index 0000000000..89d5e010e4 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/276409aa6cbc14db.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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)},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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))})})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214),r=e.i(708347);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,a.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&r.all_admin_roles.includes(s)})}])},392110,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/277cc236a763c2bc.js b/litellm/proxy/_experimental/out/_next/static/chunks/277cc236a763c2bc.js deleted file mode 100644 index 7b990db084..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/277cc236a763c2bc.js +++ /dev/null @@ -1,3 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,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:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"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,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[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 ${a?"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 ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(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:l(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},i=(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}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,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 ${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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),m=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=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)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{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)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(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 a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{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 gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(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:[n(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:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{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)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`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)(d,{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)(o,{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 p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},x=(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}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(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:()=>n(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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({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 a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=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)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&x(`${i} blocked`,"red"),n>0&&x(`${n} masked`,"blue"),0===i&&0===n&&x("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&x(`${a.length} patterns`,"slate"),l.length>0&&x(`${l.length} keywords`,"slate"),r.length>0&&x(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",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.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{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)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",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.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:x(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(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"})]}),y=()=>(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"})]}),j=()=>(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"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(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:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(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:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded 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:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(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))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(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||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),m(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>m(!1))},[e,a]),(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)(b,{title:"EU AI Act",data:l,loading:o,error:x}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(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},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,C=()=>(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"})]}),T=({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"})]}),L=({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"})]}),M=()=>(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"})]}),A=()=>(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"})}),E=({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"})}),D=()=>(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"})}),I=({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 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,z=({response:e})=>{let[a,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(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(E,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},O=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);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:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(A,{}):"llm"===e.type?(0,t.jsx)(M,{}):e.isSuccess?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),x=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(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))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} 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:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),(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:x}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),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 text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(E,{expanded:n})]})]}),n&&(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)(I,{matchDetails:e.match_details}),c>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 text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(m,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(z,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm 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)(C,{}),(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:[r.length," guardrail",1!==r.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 ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(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,i," 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(r,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)(D,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,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)(O,{entries:r})}),(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:r.map((e,s)=>(0,t.jsx)(R,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},93648,245767,313793,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(560445),l=e.i(207082),r=e.i(135214),i=e.i(500330),n=e.i(871943),o=e.i(360820),d=e.i(94629),c=e.i(152990),m=e.i(682830),x=e.i(269200),u=e.i(942232),p=e.i(977572),h=e.i(427612),g=e.i(64848),f=e.i(496020),y=e.i(592968);function j({keys:e,totalCount:a,isLoading:l,isFetching:r,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,i.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,c.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,m.getCoreRowModel)(),getSortedRowModel:(0,m.getSortedRowModel)(),getPaginationRowModel:(0,m.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[l||r?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[l||r?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:l||r||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:l||r||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(x.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:l||r?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function b(){let{premiumUser:e}=(0,r.default)(),[i,n]=(0,s.useState)(0),[o]=(0,s.useState)(50),{data:d,isPending:c,isFetching:m}=(0,l.useDeletedKeys)(i+1,o);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(j,{keys:d?.keys||[],totalCount:d?.total_count||0,isLoading:c,isFetching:m,pageIndex:i,pageSize:o,onPageChange:n})]})}e.s(["default",()=>b],93648);var v=e.i(785242),_=e.i(389083),N=e.i(599724),w=e.i(355619);function S({teams:e,isLoading:a,isFetching:l}){let[r,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),b=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,i.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(_.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,w.getModelDisplayName)(e).slice(0,30)}...`:(0,w.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(_.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(N.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],v=(0,c.useReactTable)({data:e,columns:b,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:r},onSortingChange:j,getCoreRowModel:(0,m.getCoreRowModel)(),getSortedRowModel:(0,m.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||l?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(x.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:v.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:v.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${v.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:a||l?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?v.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function k(){let{premiumUser:e}=(0,r.default)(),{data:s,isPending:l,isFetching:i}=(0,v.useDeletedTeams)(1,100);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(S,{teams:s||[],isLoading:l,isFetching:i})]})}e.s(["default",()=>k],245767);var C=e.i(663435);e.s(["default",0,({value:e,onChange:s})=>(0,t.jsx)(C.default,{value:e,onChange:s})],313793);var T=e.i(625901),L=e.i(56456),M=e.i(152473),A=e.i(199133),E=e.i(770914);let{Text:D}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[m,x]=(0,M.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,T.useInfiniteModelInfo)(i,m||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(A.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),x(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(L.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(E.Space,{direction:"vertical",children:[(0,t.jsxs)(E.Space,{direction:"horizontal",children:[(0,t.jsx)(D,{strong:!0,children:"Model name:"}),(0,t.jsx)(D,{ellipsis:!0,children:s})]}),(0,t.jsxs)(D,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(D,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(L.LoadingOutlined,{spin:!0})})]})})}],291950)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),m=e.i(482725),x=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.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(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function E({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,E]=(0,s.useState)(""),[D,I]=(0,s.useState)(""),[z,O]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,D,z,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:D||void 0,action:z||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../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"}})]});let K=$.data?.audit_logs??[],V=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{E(e),_(1)},onChange:e=>{e.target.value||(E(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{O(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{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"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(x.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:V,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(m.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>E],942161)},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},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 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"}]])},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.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"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.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"})}),m=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),x=({count:e})=>(0,t.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,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.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,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.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,t.jsx)(m,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(x,{});let f=(0,t.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,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(m,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:e?()=>(0,t.jsx)(h,{label:"TTFT (s)",field:"ttft_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:e?()=>(0,t.jsx)(h,{label:"Model",field:"model",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({show:e,onOpenSettings:s})=>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 flex-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",children:"proxy_config.yaml"})," file",s&&(0,t.jsxs)(t.Fragment,{children:[" or"," ",(0,t.jsx)("button",{onClick:s,className:"text-blue-600 hover:text-blue-800 underline font-medium",children:"open the settings"})," ","to configure this directly."]})]}),(0,t.jsx)("pre",{className:"mt-2 bg-white p-3 rounded 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])},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o,rawInputTokens:d,cacheReadTokens:c,cacheCreationTokens:m})=>{let x=o?.toLowerCase()==="true",u=void 0!==i||void 0!==n,p=e?.input_cost!==void 0||e?.output_cost!==void 0,h=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(p||u||h||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 g=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),f=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),y=x?0:e?.input_cost,j=x?0:e?.output_cost,b=x?0:e?.original_cost,v=x?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.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:[l(a),x&&" (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=x?0:(y??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:[l(s),null!=d&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",d.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:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(x?0:e?.cache_read_cost),(c??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(c??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:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(x?0:e?.cache_creation_cost),(m??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(m??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:[l(y),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.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:[l(j),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.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:l(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:l(s)})]},e))]}),!x&&(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:l(b)})]})}),(g||f)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[g&&(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 (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(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:["-",l(e.discount_amount)]})]})]}),f&&(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 (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((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:["+",l(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:[l(v),x&&" (Cached)"]})]})})]})}]})})}])},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",m="Model",x="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[m]:"",[x]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[E,D]=(0,t.useState)(null),I=(0,t.useRef)(0),z=(0,t.useRef)(M),O=(0,t.useRef)(!1),R=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[x]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[m]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&D({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),D({data:[],total:0,page:1,page_size:v,total_pages:0})}},[y,j,b,_,v,k,C]),P=(0,t.useMemo)(()=>(0,i.default)((e,t)=>R(e,t),300),[R]);(0,t.useEffect)(()=>()=>P.cancel(),[P]);let B=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[x]||M[u]||M[g]||M[f]||M[m]),[M]);(0,t.useEffect)(()=>{z.current=M,O.current=B},[M,B]),(0,t.useEffect)(()=>{O.current&&y&&(P.cancel(),R(z.current,T))},[k,C,T,j,b,_]);let F=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:v,total_pages:0};if(B)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[m]&&(t=t.filter(e=>e.model_id===M[m])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,B]),q=(0,t.useMemo)(()=>B?null!==E?E:{data:[],total:0,page:1,page_size:v,total_pages:0}:F,[B,E,F]),{data:H}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y}),$=(0,t.useCallback)((e=T)=>{B&&y&&(P.cancel(),R(M,e))},[B,y,M,T,R,P]);return{filters:M,filteredLogs:q,hasBackendFilters:B,allTeams:H,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),D(null),P(s,1)),s})},handleFilterReset:()=>{A(L),D(null),P.cancel(),N(1)},refetchWithFilters:$}}e.s(["useLogFilterLogic",()=>y],504809)},894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.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",()=>a],283086);let l=(0,s.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",()=>l],195116)},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,m=e.i(755151),x=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(m.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,x.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,x.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},869939,e=>{"use strict";var t=e.i(843476),s=e.i(175712),a=e.i(262218),l=e.i(291542),r=e.i(898586),i=e.i(770914),n=e.i(592968),o=e.i(245704),d=e.i(518617),c=e.i(19732);let{Text:m}=r.Typography;function x({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)(c.ExperimentOutlined,{style:{fontSize:16,color:"#6366f1"}}),(0,t.jsx)(m,{strong:!0,style:{fontSize:15},children:"LLM Judge Results"})]}),s.map((e,s)=>(0,t.jsx)(u,{entry:e},e.eval_id||s))]}):null}function u({entry:e}){let r=e.passed,c=r?"#52c41a":"#ff4d4f",x=(e.verdicts||[]).filter(e=>"overall"!==(e.criterion_name||"").toLowerCase()),u=[{title:"Criterion",dataIndex:"criterion_name",key:"criterion_name",width:160,render:e=>(0,t.jsx)(m,{strong:!0,style:{whiteSpace:"nowrap"},children:e})},{title:"Weight",dataIndex:"weight",key:"weight",width:65,render:e=>null!=e?(0,t.jsxs)(m,{type:"secondary",style:{fontSize:12},children:[e,"%"]}):null},{title:"Score",dataIndex:"score",key:"score",width:65,render:e=>(0,t.jsx)(m,{style:{color:e>=70?"#52c41a":e>=50?"#faad14":"#ff4d4f",fontWeight:600},children:e})},{title:(0,t.jsx)(n.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 a=s.score*s.weight/100;return(0,t.jsx)(m,{type:"secondary",style:{fontSize:12},children:a%1==0?a:a.toFixed(1)})}},{title:"Comment",dataIndex:"reasoning",key:"reasoning",ellipsis:{showTitle:!1},render:e=>(0,t.jsx)(n.Tooltip,{title:e,children:(0,t.jsx)("span",{style:{fontSize:12},children:e})})}];return(0,t.jsxs)(s.Card,{size:"small",className:"mb-3",style:{borderLeft:`3px solid ${c}`},title:(0,t.jsxs)(i.Space,{children:[r?(0,t.jsx)(o.CheckCircleOutlined,{style:{color:"#52c41a"}}):(0,t.jsx)(d.CloseCircleOutlined,{style:{color:"#ff4d4f"}}),(0,t.jsx)(m,{strong:!0,children:e.eval_name}),(0,t.jsx)(a.Tag,{color:r?"success":"error",children:r?"PASSED":"FAILED"}),(0,t.jsx)(n.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)(m,{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)(i.Space,{size:"small",children:[e.judge_model&&(0,t.jsxs)(m,{type:"secondary",style:{fontSize:12},children:["Judge: ",e.judge_model]}),null!=e.iteration&&(0,t.jsxs)(m,{type:"secondary",style:{fontSize:12},children:["Iter: ",e.iteration+1]})]}),children:[e.eval_error&&(0,t.jsxs)(m,{type:"warning",style:{display:"block",marginBottom:8,fontSize:12},children:["Judge error: ",e.eval_error]}),x.length>0?(0,t.jsx)(l.Table,{dataSource:x,columns:u,pagination:!1,size:"small",rowKey:"criterion_name",scroll:{x:!0},summary:()=>{if(!x.some(e=>null!=e.weight))return null;let e=x.reduce((e,t)=>e+(null!=t.weight?t.score*t.weight/100:0),0);return(0,t.jsxs)(l.Table.Summary.Row,{children:[(0,t.jsx)(l.Table.Summary.Cell,{index:0,children:(0,t.jsx)(m,{strong:!0,style:{fontSize:12},children:"Total"})}),(0,t.jsx)(l.Table.Summary.Cell,{index:1}),(0,t.jsx)(l.Table.Summary.Cell,{index:2}),(0,t.jsx)(l.Table.Summary.Cell,{index:3,children:(0,t.jsx)(m,{strong:!0,style:{fontSize:12,color:c},children:e%1==0?e:e.toFixed(1)})}),(0,t.jsx)(l.Table.Summary.Cell,{index:4})]})}}):(0,t.jsxs)(m,{type:"secondary",style:{fontSize:12},children:["Score: ",e.overall_score?.toFixed(1)," — no per-criterion breakdown available."]})]})}e.s(["default",()=>x])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),m=e.i(195116),x=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(869939),M=e.i(70635),A=e.i(70969),E=e.i(916925);function D({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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 i,n;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:a}=(0,E.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(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:r(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:r(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:(i=e.start_time,n=e.end_time,`${((n-i)*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,r)=>{let i=a[`${s}-${r}`]||!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}-${r}`,void l(t=>({...t,[e]:!t[e]}))},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)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+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)})]})]})]}),i&&(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",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>D],331052);var I=e.i(592968),z=e.i(207066);let{Text:O}=g.Typography;function R({value:e,maxWidth:s=z.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(I.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:z.FONT_FAMILY_MONO,fontSize:z.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:P}=g.Typography;function B({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(P,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let F=e=>!!e&&e instanceof Date,q=e=>"object"==typeof e&&null!==e,H=e=>!!e&&e instanceof Object&&"function"==typeof e;function $(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function Y(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,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,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},$(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("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]"),a=-1;for(let e=0;e{var e;N(!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:S,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:S,onKeyDown:w},$(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},$(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(U,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:m,beforeExpandChange:u,outerRef:x}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function K(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function V(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function W(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=F(l)?l.toISOString():H(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},$(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function U(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(V,Object.assign({},e)):!q(t)||F(t)||H(t)?(0,s.createElement)(W,Object.assign({},e)):(0,s.createElement)(K,Object.assign({},e))}let G={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},J=()=>!0,Q=e=>{let{data:t,style:a=G,shouldExpandNode:l=J,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&q(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(U,{key:t,field:t,value:n,style:{...G,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(U,{value:t,style:{...G,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>Q,"defaultStyles",()=>G],867612);let{Text:X}=g.Typography;function Z({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:z.JSON_MAX_HEIGHT,overflow:"auto",background:z.COLOR_BG_LIGHT,padding:z.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(Q,{data:e,style:G,clickToExpandNode:!0})})}):(0,t.jsx)(X,{type:"secondary",children:"No data"})}function ee(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function et(e){return Array.isArray(e)?e:e?[e]:[]}function es(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var ea=e.i(366308),el=e.i(755151),er=e.i(291542);let{Text:ei}=g.Typography;function en({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})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(ei,{code:!0,children:[e,s.required&&(0,t.jsx)(ei,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(ei,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(ei,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(ei,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(ei,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(er.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(ei,{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 eo({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:ed}=g.Typography;function ec({tool:e}){let[a,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)(ed,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(en,{tool:e}):(0,t.jsx)(eo,{tool:e})]})}let{Text:em}=g.Typography;function ex({tool:e}){let[a,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(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(ea.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(em,{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"}),a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ec,{tool:e})})]})}let{Text:eu}=g.Typography;function ep({log:e}){let s=function(e){let t,s=!(t=es(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 a=function(e){let t=es(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(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.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:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eu,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(eu,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(ex,{tool:e},e.name))})}]})})}let eh=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eg=e.i(888259),ef=e.i(264843),ey=e.i(624001);let{Text:ej}=g.Typography;function eb({type:e,tokens:s,cost:l,onCopy:r,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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(ef.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ej,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(I.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:ev}=g.Typography;function e_({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(ev,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(ev,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(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,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:eN}=g.Typography;function ew({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)(eN,{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)(eN,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(eN,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:eS}=g.Typography;function ek({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(eS,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(ew,{tool:e,compact:l},e.id||s))})]}):null}let{Text:eC}=g.Typography;function eT({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(eC,{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: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,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(ek,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eL({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=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)(eb,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eg.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(e_,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eT,{messages:c}),d&&(0,t.jsx)(ek,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eM}=g.Typography;function eA({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eg.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(ek,{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)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eM,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eE=e.i(782273),eD=e.i(313603),eI=e.i(793916);let{Text:ez}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(eR,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eP,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.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 eR({session:e,turnCount:a}){let[l,r]=(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:()=>r(!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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eD.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(ez,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(ez,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eE.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)(eI.AudioOutlined,{}):(0,t.jsx)(ef.MessageOutlined,{})," ",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)(eH,{label:"Model",value:e.model}),(0,t.jsx)(eH,{label:"Voice",value:e.voice}),(0,t.jsx)(eH,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eH,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eH,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eH,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eH,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eH,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(ez,{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 eP({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:l?.completion_tokens??n,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:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eB,{response:e,index:s},e.id||s))})})]})}function eB({response:e,index:s}){let a=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)(ez,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(I.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(ez,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eF,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eq,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eq,{label:"Output",details:l.output_token_details})]})}function eF({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)(ez,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eI.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(ef.MessageOutlined,{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:a})]},s):null})]}):null}function eq({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(ez,{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:a.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 eH({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(ez,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function e$({request:e,response:s,metrics:a}){let l,r,i;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)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&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})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:eh(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eL,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eA,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:eY}=g.Typography;function eK({logEntry:e,onOpenSettings:s,isLoadingDetails:a=!1,accessToken:l}){var r,i;let n=e.metadata||{},o="failure"===n.status,d=o?n.error_information:null,c=!!(r=e.messages)&&(Array.isArray(r)?r.length>0:"object"==typeof r&&Object.keys(r).length>0),m=!!(i=e.response)&&Object.keys(ee(i)).length>0,x=!c&&!m&&!o&&!a,u=n?.guardrail_information,p=et(u),h=p.length>0,g=p.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),j=0===p.length?"-":1===p.length?p[0]?.guardrail_name??"-":`${p.length} guardrails`,b=n?.eval_information,_=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:`${z.DRAWER_CONTENT_PADDING} ${z.DRAWER_CONTENT_PADDING} 0`},children:[o&&d&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eV,{errorInfo:d}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eW,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(R,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(R,{value:e.api_base,maxWidth:z.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),h&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eU,{label:j,maskedCount:g})})]})})}),(0,t.jsx)(eG,{logEntry:e,metadata:n}),(0,t.jsx)(M.CostBreakdownViewer,{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)(ep,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(A.ConfigInfoMessage,{show:x,onOpenSettings:s})}),a?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eJ,{hasResponse:m,hasError:o,getRawRequest:()=>ee(e.proxy_server_request||e.messages),getFormattedResponse:()=>o&&d?{error:{message:d.error_message||"An error occurred",type:d.error_class||"error",code:d.error_code||"unknown",param:null}}:ee(e.response),logEntry:e}),h&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:u,accessToken:l??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),null!=b&&(0,t.jsx)(L.default,{data:b}),_&&(0,t.jsx)(D,{data:n.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eX,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:z.DRAWER_CONTENT_PADDING}})]})}function eV({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eW({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(eY,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:z.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eU({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:z.SPACING_MEDIUM,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"]})]})}function eG({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default",o=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),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Input Tokens",children:(0,C.formatNumberWithCommas)(o)}),(0,t.jsx)(f.Descriptions.Item,{label:"Output Tokens",children:(0,C.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(B,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.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)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.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)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eJ({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(z.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),m=i.spend??0,x=i.prompt_tokens||0,u=i.completion_tokens||0,p=x+u,h=i.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 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)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(e$,{request:l(),response:r(),metrics:{prompt_tokens:x,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(eY,{copyable:{text:JSON.stringify(n===z.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===z.TAB_RESPONSE&&!e&&!a}),items:[{key:z.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:(0,t.jsx)(Z,{data:l(),mode:"formatted"})})},{key:z.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:e||a?(0,t.jsx)(Z,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eQ({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 eX({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eY,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:z.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:z.FONT_SIZE_SMALL,fontFamily:z.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eZ=e.i(764205),e0=e.i(266027),e1=e.i(135214);function e2({row:e,isSelected:s,onClick:a}){let l=x.MCP_CALL_TYPES.includes(e.call_type),r=x.AGENT_CALL_TYPES.includes(e.call_type),i=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:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(m.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(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:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.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]})]})}function e5({open:e,onClose:d,logEntry:c,sessionId:m,accessToken:u,onOpenSettings:g,allLogs:f=[],onSelectLog:y,startTime:j}){let b=!!m,[v,_]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),{data:T=[]}=(0,e0.useQuery)({queryKey:["sessionLogs",m],queryFn:async()=>{if(!m||!u)return[];let e=await (0,eZ.sessionSpendLogsCall)(u,m);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!x.MCP_CALL_TYPES.includes(e.call_type),a=+!!x.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&b&&m&&u)}),L=(0,s.useMemo)(()=>b?T.length?v?T.find(e=>e.request_id===v)||T[0]:c?.request_id&&T.find(e=>e.request_id===c.request_id)||T[0]:null:c,[b,c,v,T]);(0,s.useEffect)(()=>{b&&T.length&&(v&&T.some(e=>e.request_id===v)||_(c?.request_id&&T.some(e=>e.request_id===c.request_id)?c.request_id:T[0].request_id))},[b,c,v,T]),(0,s.useEffect)(()=>{e?w(!1):(b&&_(null),k(!1))},[e,b]);let{selectNextLog:M,selectPreviousLog:A}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:L,allLogs:b?T:f,onClose:d,onSelectLog:e=>{b&&_(e.request_id),y?.(e)}}),E=((e,t,s)=>{let{accessToken:a}=(0,e1.default)();return(0,e0.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eZ.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(L?.request_id,j,e&&!!L?.request_id),D=E.data,I=E.isLoading,O=(0,s.useMemo)(()=>L?{...L,messages:D?.messages||L.messages,response:D?.response||L.response,proxy_server_request:D?.proxy_server_request||L.proxy_server_request}:null,[L,D]),R=L?.metadata||{},P="failure"===R.status?"Failure":"Success",B="failure"===R.status?"error":"success",F=R?.user_api_key_team_alias||"default",q=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,$=T.length>0?new Date(Math.max(...T.map(e=>new Date(e.endTime).getTime()))):null,Y=H&&$?(($.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=T.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,V=T.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,W=T.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length,U=b?T:L?[L]:[],G=b?m||"":L?.request_id||"",J=G.length>14?`${G.slice(0,11)}...`:G,Q=async()=>{if(G)try{await navigator.clipboard.writeText(G),k(!0),setTimeout(()=>k(!1),1200)}catch{}};return L&&O?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:z.DRAWER_WIDTH,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:[N?(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.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"}),!N&&(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:b?"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:J}),(0,t.jsx)("button",{type:"button",onClick:Q,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:S?(0,t.jsx)(r.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:[U.length," req",[b?K:U.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?V:U.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?W:U.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),b?(0,C.getSpendString)(q):(0,C.getSpendString)(L.spend||0),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),Y,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[et(R?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eQ,{guardrailEntries:et(R?.guardrail_information)})}),b?(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"}),U.map((e,s)=>{let a=s===U.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"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e2,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>{_(e.request_id),y?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:U.map(e=>(0,t.jsx)(e2,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>y?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:L,onClose:d,onPrevious:A,onNext:M,statusLabel:P,statusColor:B,environment:F}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eK,{logEntry:O,onOpenSettings:g,isLoadingDetails:I,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e5],502626),e.s([],3565)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(313603),o=e.i(772345),d=e.i(793130),c=e.i(197647),m=e.i(653824),x=e.i(881073),u=e.i(404206),p=e.i(723731),h=e.i(464571),g=e.i(708347),f=e.i(93648),y=e.i(245767),j=e.i(313793),b=e.i(50882),v=e.i(291950),_=e.i(969550),N=e.i(764205),w=e.i(20147),S=e.i(942161),k=e.i(245099);e.i(70969);var C=e.i(97859);e.i(70635),e.i(339086);var T=e.i(504809);e.i(3565);var L=e.i(502626),M=e.i(727749);e.i(867612);var A=e.i(153472),E=e.i(954616),D=e.i(135214);let I=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=s?`${s}/config/update`:"/config/update",l=await fetch(a,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:t.store_prompts_in_spend_logs,...t.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:t.maximum_spend_logs_retention_period}}})});if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update spend logs settings")}return await l.json()};var z=e.i(190702),O=e.i(637235),R=e.i(808613),P=e.i(311451),B=e.i(212931),F=e.i(981339),q=e.i(770914),H=e.i(790848),$=e.i(898586);let Y=({isVisible:e,onCancel:s,onSuccess:a})=>{let[l]=R.Form.useForm(),{mutateAsync:r,isPending:n}=(()=>{let{accessToken:e}=(0,D.default)();return(0,E.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await I(e,t)}})})(),{mutateAsync:o,isPending:d}=(0,A.useDeleteProxyConfigField)(),{data:c,isLoading:m,refetch:x}=(0,A.useProxyConfig)(A.ConfigType.GENERAL_SETTINGS),u=R.Form.useWatch("store_prompts_in_spend_logs",l);(0,i.useEffect)(()=>{e&&x()},[e,x]);let p=(0,i.useMemo)(()=>{if(!c)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let e=c.find(e=>"store_prompts_in_spend_logs"===e.field_name),t=c.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:e?.field_value??!1,maximum_spend_logs_retention_period:t?.field_value??void 0}},[c]),g=async e=>{try{let t=e.maximum_spend_logs_retention_period;if(!t||"string"==typeof t&&""===t.trim())try{await o({config_type:A.ConfigType.GENERAL_SETTINGS,field_name:A.GeneralSettingsFieldName.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD})}catch(e){console.warn("Failed to delete retention period field (may not exist):",e)}let s={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...t&&"string"==typeof t&&""!==t.trim()&&{maximum_spend_logs_retention_period:t}};await r(s,{onSuccess:()=>{M.default.success("Spend logs settings updated successfully"),x(),a?.()},onError:e=>{M.default.fromBackend("Failed to save spend logs settings: "+(0,z.parseErrorMessage)(e))}})}catch(e){M.default.fromBackend("Failed to save spend logs settings: "+(0,z.parseErrorMessage)(e))}},f=()=>{l.resetFields(),s()};return(0,t.jsx)(B.Modal,{title:(0,t.jsx)($.Typography.Title,{level:5,children:"Spend Logs Settings"}),open:e,footer:(0,t.jsxs)(q.Space,{children:[(0,t.jsx)(h.Button,{onClick:f,disabled:n||d||m,children:"Cancel"}),(0,t.jsx)(h.Button,{type:"primary",loading:n||d,disabled:m,onClick:()=>l.submit(),children:n||d?"Saving...":"Save Settings"})]}),onCancel:f,children:(0,t.jsxs)(R.Form,{form:l,layout:"horizontal",onFinish:g,initialValues:p,children:[(0,t.jsx)(R.Form.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:c?.find(e=>"store_prompts_in_spend_logs"===e.field_name)?.field_description||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:(0,t.jsx)("div",{children:m?(0,t.jsx)(F.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(H.Switch,{checked:u??!1,onChange:e=>l.setFieldValue("store_prompts_in_spend_logs",e)})})}),(0,t.jsx)(R.Form.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:c?.find(e=>"maximum_spend_logs_retention_period"===e.field_name)?.field_description||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:m?(0,t.jsx)(F.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(P.Input,{placeholder:"e.g., 7d, 30d",prefix:(0,t.jsx)(O.ClockCircleOutlined,{})})})]},c?JSON.stringify(p):"loading")})};var K=e.i(149121);function V({accessToken:e,token:M,userRole:A,userID:E,premiumUser:D}){let[I,z]=(0,i.useState)(""),[O,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),$=(0,i.useRef)(null),V=(0,i.useRef)(null),W=(0,i.useRef)(null),[U,G]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(null),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(""),[eb,ev]=(0,i.useState)(A&&g.internalUserRoles.includes(A)),[e_,eN]=(0,i.useState)("request logs"),[ew,eS]=(0,i.useState)(null),[ek,eC]=(0,i.useState)(!1),[eT,eL]=(0,i.useState)(null),[eM,eA]=(0,i.useState)(!1),[eE,eD]=(0,i.useState)("startTime"),[eI,ez]=(0,i.useState)("desc"),[eO,eR]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eP,eB]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eP))},[eP]);let[eF,eq]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{ep&&e&&eu({...(await (0,N.keyInfoV1Call)(e,ep)).info,token:ep,api_key:ep})})()},[ep,e]),(0,i.useEffect)(()=>{function e(e){$.current&&!$.current.contains(e.target)&&B(!1),V.current&&!V.current.contains(e.target)&&R(!1),W.current&&!W.current.contains(e.target)&&et(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{A&&g.internalUserRoles.includes(A)&&ev(!0)},[A]);let eH=(0,a.useQuery)({queryKey:["logs","table",F,H,U,J,ei,eo,eb?E:null,eg,ec,eE,eI],queryFn:async()=>{if(!e||!M||!A||!E)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"),s=X?(0,r.default)(J).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,N.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:eo||void 0,team_id:ei||void 0,user_id:eb?E??void 0:void 0,end_user:ey||void 0,status_filter:eg||void 0,model_id:ec||void 0,sort_by:eE,sort_order:eI}})},enabled:!!e&&!!M&&!!A&&!!E&&"request logs"===e_&&eO,refetchInterval:!!eP&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),e$=(0,i.useDeferredValue)(eH.isFetching),eY=eH.isFetching||e$,eK=eH.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eV,filteredLogs:eW,hasBackendFilters:eU,allTeams:eG,handleFilterChange:eJ,handleFilterReset:eQ,refetchWithFilters:eX}=(0,T.useLogFilterLogic)({logs:eK,accessToken:e,startTime:U,endTime:J,pageSize:H,isCustomDate:X,setCurrentPage:q,userID:E,userRole:A,sortBy:eE,sortOrder:eI,currentPage:F}),eZ=(0,i.useCallback)(()=>{eQ(),G((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),Z(!1),eq({value:24,unit:"hours"}),q(1)},[eQ]);if((0,i.useEffect)(()=>{eR(!eU)},[eU]),(0,i.useEffect)(()=>{e&&(eV["Team ID"]?en(eV["Team ID"]):en(""),ef(eV.Status||""),em(eV.Model||""),ej(eV["End User"]||""),ed(eV["Key Hash"]||""))},[eV,e]),!e||!M||!A||!E)return null;let e0=eW.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),e1=e0.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),C.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:C.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),e2=new Map;for(let e of e0){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=C.MCP_CALL_TYPES.includes(e.call_type),s=e2.get(e.session_id);s&&(!s.isMcp||t)||e2.set(e.session_id,{requestId:e.request_id,isMcp:t})}let e5=e0.map(e=>{let t=e.session_id?e1[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eh(e),onSessionClick:t=>{t&&(eL(t),eS(e),eC(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||e2.get(e.session_id)?.requestId===e.request_id)||[],e4=[{name:"Team ID",label:"Team ID",customComponent:j.default},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:v.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:b.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,N.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return C.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=C.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!C.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e6=C.QUICK_SELECT_OPTIONS.find(e=>e.value===eF.value&&e.unit===eF.unit),e3=X?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"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=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(X,U,J):e6?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(m.TabGroup,{defaultIndex:0,onIndexChange:e=>eN(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(c.Tab,{children:"Request Logs"}),(0,t.jsx)(c.Tab,{children:"Audit Logs"}),(0,t.jsx)(c.Tab,{children:"Deleted Keys"}),(0,t.jsx)(c.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsxs)(u.TabPanel,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"}),(0,t.jsx)(h.Button,{icon:(0,t.jsx)(n.SettingOutlined,{}),onClick:()=>eA(!0),title:"Spend Logs Settings"})]}),ex&&ep&&ex.api_key===ep?(0,t.jsx)(w.default,{keyId:ep,keyData:ex,teams:eG??[],onClose:()=>eh(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.default,{options:e4,onApplyFilters:eJ,onResetFilters:eZ}),(0,t.jsx)(Y,{isVisible:eM,onCancel:()=>eA(!1),onSuccess:()=>eA(!1)}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>z(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:W,children:[(0,t.jsxs)("button",{onClick:()=>et(!ee),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",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:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e3]}),ee&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[C.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e3===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),G((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eq({value:e.value,unit:e.unit}),Z(!1),et(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${X?"bg-blue-50 text-blue-600":""}`,onClick:()=>Z(!X),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(d.Switch,{color:"green",checked:eP,defaultChecked:!0,onChange:eB})]}),{}),(0,t.jsx)(h.Button,{type:"default",icon:(0,t.jsx)(o.SyncOutlined,{spin:eY}),onClick:()=>{eU?eX():eH.refetch()},disabled:eY,title:"Fetch data",children:eY?"Fetching":"Fetch"})]}),X&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:J,onChange:e=>{Q(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eH.isLoading?"...":eW?(F-1)*H+1:0," -"," ",eH.isLoading?"...":eW?Math.min(F*H,eW.total):0," ","of ",eH.isLoading?"...":eW?eW.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eH.isLoading?"...":F," of"," ",eH.isLoading?"...":eW?eW.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eH.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(eW.total_pages||1,e+1)),disabled:eH.isLoading||F===(eW.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eP&&1===F&&eO&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>eB(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(K.DataTable,{columns:(0,k.createColumns)({sortBy:eE,sortOrder:eI,onSortChange:(e,t)=>{eD(e),ez(t),q(1)}}),data:e5,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eL(e.session_id),eS(e),eC(!0);return}eL(null),eS(e),eC(!0)},isLoading:eH.isLoading})]})]})]}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(S.default,{userID:E,userRole:A,token:M,accessToken:e,isActive:"audit logs"===e_,premiumUser:D})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(f.default,{})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(y.default,{})})]})]}),(0,t.jsx)(L.LogDetailsDrawer,{open:ek,onClose:()=>{eC(!1),eL(null)},logEntry:ew,sessionId:eT,accessToken:e,onOpenSettings:()=>eA(!0),allLogs:e5,onSelectLog:e=>{eS(e)},startTime:(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>V],936190)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2faf62c238d105eb.js b/litellm/proxy/_experimental/out/_next/static/chunks/2faf62c238d105eb.js deleted file mode 100644 index d0cd211955..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/2faf62c238d105eb.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,910119,e=>{"use strict";var s=e.i(843476),t=e.i(197647),l=e.i(653824),a=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),x=e.i(199133),h=e.i(28651),g=e.i(175712),p=e.i(770914),j=e.i(536916),f=e.i(764205),b=e.i(827252),y=e.i(994388),_=e.i(35983),v=e.i(779241),S=e.i(78085),N=e.i(808613),C=e.i(592968),w=e.i(708347),T=e.i(860585),k=e.i(355619),I=e.i(435451);function U({userData:e,onCancel:t,onSubmit:l,teams:a,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=N.Form.useForm(),[h,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let s=e.user_info?.max_budget,t=null==s;g(t),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:t?"":s,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,s.jsxs)(N.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(h||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),l(e)},layout:"vertical",children:[!u&&(0,s.jsx)(N.Form.Item,{label:"User ID",name:"user_id",children:(0,s.jsx)(v.TextInput,{disabled:!0})}),!u&&(0,s.jsx)(N.Form.Item,{label:"Email",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Alias",name:"user_alias",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Global Proxy Role"," ",(0,s.jsx)(C.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,s.jsx)(b.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,s.jsx)(x.Select,{children:c&&Object.entries(c).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Personal Models"," ",(0,s.jsx)(C.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,s.jsx)(b.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(x.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!w.all_admin_roles.includes(d||""),children:[(0,s.jsx)(x.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,s.jsx)(x.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,s.jsx)("span",{children:"Max Budget (USD)"}),(0,s.jsx)(j.Checkbox,{checked:h,onChange:e=>{let s=e.target.checked;g(s),s&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,s)=>h||""!==s&&null!=s?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,s.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:h})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(T.default,{})}),(0,s.jsx)(N.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,s.jsx)(y.Button,{variant:"secondary",type:"button",onClick:t,children:"Cancel"}),(0,s.jsx)(y.Button,{type:"submit",children:"Save Changes"})]})]})}var B=e.i(727749),A=e.i(888259);let{Text:D,Title:F}=c.Typography,R=({open:e,onCancel:t,selectedUsers:l,possibleUIRoles:a,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:b,allowAllUsers:y=!1})=>{let[_,v]=(0,n.useState)(!1),[S,N]=(0,n.useState)([]),[C,w]=(0,n.useState)(null),[T,k]=(0,n.useState)(!1),[I,R]=(0,n.useState)(!1),O=()=>{N([]),w(null),k(!1),R(!1),t()},E=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),P=async e=>{if(console.log("formValues",e),!r)return void B.default.fromBackend("Access token not found");v(!0);try{let s=l.map(e=>e.user_id),a={};e.user_role&&""!==e.user_role&&(a.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(a.max_budget=e.max_budget),e.models&&e.models.length>0&&(a.models=e.models),e.budget_duration&&""!==e.budget_duration&&(a.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(a.metadata=e.metadata);let n=Object.keys(a).length>0,d=T&&S.length>0;if(!n&&!d)return void B.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,f.userBulkUpdateUserCall)(r,a,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,f.userBulkUpdateUserCall)(r,a,s),o.push(`Updated ${s.length} user(s)`);if(d){let e=[];for(let s of S)try{let t=null;t=I?null:l.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let a=await (0,f.teamBulkMemberAddCall)(r,s,t||null,C||void 0,I);console.log("result",a),e.push({teamId:s,success:!0,successfulAdditions:a.successful_additions,failedAdditions:a.failed_additions})}catch(t){console.error(`Failed to add users to team ${s}:`,t),e.push({teamId:s,success:!1,error:t})}let s=e.filter(e=>e.success),t=e.filter(e=>!e.success);if(s.length>0){let e=s.reduce((e,s)=>e+s.successfulAdditions,0);o.push(`Added users to ${s.length} team(s) (${e} total additions)`)}t.length>0&&A.default.warning(`Failed to add users to ${t.length} team(s)`)}o.length>0&&B.default.success(o.join(". ")),N([]),w(null),k(!1),R(!1),i(),t()}catch(e){console.error("Bulk operation failed:",e),B.default.fromBackend("Failed to perform bulk operations")}finally{v(!1)}};return(0,s.jsxs)(o.Modal,{open:e,onCancel:O,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${l.length} User(s)`,width:800,children:[y&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(j.Checkbox,{checked:I,onChange:e=>R(e.target.checked),children:(0,s.jsx)(D,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,s.jsx)("div",{style:{marginTop:8},children:(0,s.jsx)(D,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)(F,{level:5,children:["Selected Users (",l.length,"):"]}),(0,s.jsx)(m.Table,{size:"small",bordered:!0,dataSource:l,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,s.jsx)(D,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:a?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,s.jsx)(u.Divider,{}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsxs)(D,{children:[(0,s.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,s.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,s.jsxs)(p.Space,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(j.Checkbox,{checked:T,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),T&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Select Teams:"}),(0,s.jsx)(x.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:N,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Team Budget (Optional):"}),(0,s.jsx)(h.InputNumber,{placeholder:"Max budget per user in team",value:C,onChange:e=>w(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,s.jsx)(U,{userData:E,onCancel:O,onSubmit:P,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:b,possibleUIRoles:a,isBulkEdit:!0}),_&&(0,s.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,s.jsxs)(D,{children:["Updating ",I?"all users":l.length," user(s)..."]})})]})};var O=e.i(371455);let E=({visible:e,possibleUIRoles:t,onCancel:l,user:a,onSubmit:r})=>{let[i,c]=(0,n.useState)(a),[u]=N.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[a]);let m=async()=>{u.resetFields(),l()},g=async e=>{r(e),u.resetFields(),l()};return a?(0,s.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+a.user_id,width:1e3,children:(0,s.jsx)(N.Form,{form:u,onFinish:g,initialValues:a,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Role",name:"user_role",children:(0,s.jsx)(x.Select,{children:t&&Object.entries(t).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,s.jsx)(h.InputNumber,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,s.jsx)(I.default,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(T.default,{})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var P=e.i(172372),L=e.i(500330),M=e.i(152473),z=e.i(266027),$=e.i(912598),K=e.i(127952),V=e.i(304967),G=e.i(629569),q=e.i(599724),W=e.i(114600),H=e.i(482725),J=e.i(790848),Q=e.i(646563),Y=e.i(955135);let X=({accessToken:e,possibleUIRoles:t,userID:l,userRole:a})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[p,j]=(0,n.useState)({}),[b,y]=(0,n.useState)(!1),[_,S]=(0,n.useState)([]),{Paragraph:N}=c.Typography,{Option:C}=x.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let s=await (0,f.getInternalUserSettings)(e);if(u(s),j(s.values||{}),e)try{let s=await (0,f.modelAvailableCall)(e,l,a);if(s&&s.data){let e=s.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),B.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let w=async()=>{if(e){y(!0);try{let s=Object.entries(p).reduce((e,[s,t])=>(e[s]=""===t?null:t,e),{}),t=await (0,f.updateInternalUserSettings)(e,s);u({...o,values:t.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),B.default.fromBackend("Failed to update settings: "+e)}finally{y(!1)}}},I=(e,s)=>{j(t=>({...t,[e]:s}))},U=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(H.Spin,{size:"large"})}):o?(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:()=>{g(!1),j(o.values||{})},disabled:b,children:"Cancel"}),(0,s.jsx)(d.Button,{type:"primary",onClick:w,loading:b,children:"Save Changes"})]}):(0,s.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,s.jsx)(N,{className:"mb-4",children:o.field_schema.description}),(0,s.jsx)(W.Divider,{}),(0,s.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:l}=o;return l&&l.properties?Object.entries(l.properties).map(([l,a])=>{let r=e[l],i=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,s.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,s.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,s.jsx)(N,{className:"text-sm text-gray-500 mt-1",children:a.description||"No description available"}),m?(0,s.jsx)("div",{className:"mt-2",children:((e,l,a)=>{let r=l.type;if("teams"===e){let t,l;return(0,s.jsx)("div",{className:"mt-2",children:(t=U(p[e]||[]),l=(e,s,l)=>{let a=[...t];a[e]={...a[e],[s]:l},I("teams",a)},(0,s.jsxs)("div",{className:"space-y-3",children:[t.map((e,a)=>(0,s.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)(q.Text,{className:"font-medium",children:["Team ",a+1]}),(0,s.jsx)(d.Button,{size:"small",danger:!0,icon:(0,s.jsx)(Y.DeleteOutlined,{}),onClick:()=>{I("teams",t.filter((e,s)=>s!==a))},children:"Remove"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,s.jsx)(v.TextInput,{value:e.team_id,onChange:e=>l(a,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,s.jsx)(h.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>l(a,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,s.jsxs)(x.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>l(a,"user_role",e),children:[(0,s.jsx)(C,{value:"user",children:"User"}),(0,s.jsx)(C,{value:"admin",children:"Admin"})]})]})]})]},a)),(0,s.jsx)(d.Button,{icon:(0,s.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...t,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&t)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:Object.entries(t).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(C,{value:e,children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{children:t}),(0,s.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:l})]})},e))});if("budget_duration"===e)return(0,s.jsx)(T.default,{value:p[e]||null,onChange:s=>I(e,s),className:"mt-2"});if("boolean"===r)return(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(J.Switch,{checked:!!p[e],onChange:s=>I(e,s)})});if("array"===r&&l.items?.enum)return(0,s.jsx)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:l.items.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else if("models"===e)return(0,s.jsxs)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:[(0,s.jsx)(C,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,s.jsx)(C,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),_.map(e=>(0,s.jsx)(C,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&l.enum)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:l.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else return(0,s.jsx)(v.TextInput,{value:void 0!==p[e]?String(p[e]):"",onChange:s=>I(e,s.target.value),placeholder:l.description||"",className:"mt-2"})})(l,a,0)}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,l)=>{if(null==l)return(0,s.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(l)){if(0===l.length)return(0,s.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=U(l);return(0,s.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,t)=>(0,s.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,s.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,s.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,L.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,s.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},t))})}if("user_role"===e&&t&&t[l]){let{ui_label:e,description:a}=t[l];return(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium",children:e}),a&&(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:a})]})}if("budget_duration"===e)return(0,s.jsx)("span",{children:(0,T.getBudgetDurationLabel)(l)});if("boolean"==typeof l)return(0,s.jsx)("span",{children:l?"Enabled":"Disabled"});if("models"===e&&Array.isArray(l))return 0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},t))});if("object"==typeof l)return Array.isArray(l)?0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},t))}):(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(l,null,2)});return(0,s.jsx)("span",{children:String(l)})})(l,r)})]},l)}):(0,s.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,s.jsx)(V.Card,{children:(0,s.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var Z=e.i(389083),ee=e.i(350967),es=e.i(752978),et=e.i(591935),el=e.i(68155),ea=e.i(502275),er=e.i(278587),ei=e.i(166406);let en=(e,t,l,a,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(C.Tooltip,{title:e.original.user_id,children:(0,s.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,s.jsx)(C.Tooltip,{title:"Copy User ID",children:(0,s.jsx)(ei.CopyOutlined,{onClick:s=>{s.stopPropagation(),(0,L.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:t})=>(0,s.jsx)("span",{className:"text-xs",children:e?.[t.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.spend?(0,L.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{children:"SSO ID"}),(0,s.jsx)(C.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,s.jsx)(ea.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,s.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,s.jsxs)(Z.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,s.jsx)(Z.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(C.Tooltip,{title:"Edit user details",children:(0,s.jsx)(es.Icon,{icon:et.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,s.jsx)(C.Tooltip,{title:"Delete user",children:(0,s.jsx)(es.Icon,{icon:el.TrashIcon,size:"sm",onClick:()=>l(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,s.jsx)(C.Tooltip,{title:"Reset Password",children:(0,s.jsx)(es.Icon,{icon:er.RefreshIcon,size:"sm",onClick:()=>a(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:t,isUserSelected:l,isAllSelected:a,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,s.jsx)(j.Checkbox,{indeterminate:r,checked:a,onChange:e=>t(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:t})=>(0,s.jsx)(j.Checkbox,{checked:l(t.original),onChange:s=>e(t.original,s.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var ed=e.i(152990),eo=e.i(682830),ec=e.i(269200),eu=e.i(427612),em=e.i(64848),ex=e.i(942232),eh=e.i(496020),eg=e.i(977572),ep=e.i(206929),ej=e.i(94629),ef=e.i(360820),eb=e.i(871943),ey=e.i(981339),e_=e.i(530212),ev=e.i(988297),eS=e.i(118366),eN=e.i(678784);function eC({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:h,possibleUIRoles:g,initialTab:p=0,startInEditMode:j=!1}){let[b,_]=(0,n.useState)(null),[v,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[A,D]=(0,n.useState)(!1),[F,R]=(0,n.useState)(!0),[O,E]=(0,n.useState)(j),[M,z]=(0,n.useState)([]),[$,W]=(0,n.useState)(!1),[H,J]=(0,n.useState)(null),[Q,Y]=(0,n.useState)(null),[X,Z]=(0,n.useState)(p),[es,et]=(0,n.useState)({}),[ea,ei]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ep]=(0,n.useState)(!1),[ej,ef]=(0,n.useState)(null),[eb,ey]=(0,n.useState)(!1),[eC,ew]=(0,n.useState)(!1),[eT,ek]=(0,n.useState)([]),[eI,eU]=(0,n.useState)(""),[eB,eA]=(0,n.useState)("user"),[eD,eF]=(0,n.useState)(!1);n.default.useEffect(()=>{Y((0,f.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0)try{let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),t=await Promise.all(e);S(t)}catch{S(s.teams.map(e=>({team_id:e,team_alias:null})))}let t=(await (0,f.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(t)}catch(e){console.error("Error fetching user data:",e),B.default.fromBackend("Failed to fetch user data")}finally{R(!1)}})()},[u,e,m]);let eR="proxy_admin"===m||"Admin"===m,eO=async()=>{if(u){eF(!0);try{let e=await (0,f.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eF(!1)}}},eE=async()=>{if(u&&eI){ey(!0);try{await (0,f.teamMemberAddCall)(u,eI,{role:eB,user_id:e}),B.default.success("User added to team successfully"),ed(!1);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),B.default.fromBackend(e?.message||"Failed to add user to team")}finally{ey(!1)}}},eP=async()=>{if(u&&ej){ew(!0);try{await (0,f.teamMemberDeleteCall)(u,ej.team_id,{role:"user",user_id:e}),B.default.success("User removed from team successfully"),ep(!1),ef(null);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),B.default.fromBackend(e?.message||"Failed to remove user from team")}finally{ew(!1)}}},eL=eT.filter(e=>!v.some(s=>s.team_id===e.team_id)),eM=async()=>{if(!u)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let s=await (0,f.invitationCreateCall)(u,e);J(s),W(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;D(!0),await (0,f.userDeleteCall)(u,[e]),B.default.success("User deleted successfully"),h&&h(),c()}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{I(!1),D(!1)}},e$=async e=>{try{if(!u||!b)return;await (0,f.userUpdateUserCall)(u,e,null),_({...b,user_email:e.user_email??b.user_email,user_alias:e.user_alias??b.user_alias,models:e.models??b.models,max_budget:e.max_budget??b.max_budget,budget_duration:e.budget_duration??b.budget_duration,metadata:e.metadata??b.metadata}),B.default.success("User updated successfully"),E(!1)}catch(e){console.error("Error updating user:",e),B.default.fromBackend("Failed to update user")}};if(F)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"Loading user data..."})]});if(!b)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"User not found"})]});let eK=async(e,s)=>{await (0,L.copyToClipboard)(e)&&(et(e=>({...e,[s]:!0})),setTimeout(()=>{et(e=>({...e,[s]:!1}))},2e3))},eV={user_id:b.user_id,user_info:{user_email:b.user_email,user_alias:b.user_alias,user_role:b.user_role,models:b.models,max_budget:b.max_budget,budget_duration:b.budget_duration,metadata:b.metadata}};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(y.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(G.Title,{children:b.user_email||"User"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"text-gray-500 font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eN.CheckIcon,{size:12}):(0,s.jsx)(eS.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&w.rolesWithWriteAccess.includes(m)&&(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(y.Button,{icon:er.RefreshIcon,variant:"secondary",onClick:eM,className:"flex items-center",children:"Reset Password"}),(0,s.jsx)(y.Button,{icon:el.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,s.jsx)(K.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:b.user_email},{label:"User ID",value:b.user_id,code:!0},{label:"Global Proxy Role",value:b.user_role&&g?.[b.user_role]?.ui_label||b.user_role||"-"},{label:"Total Spend (USD)",value:null!==b.spend&&void 0!==b.spend?b.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:A}),(0,s.jsxs)(l.TabGroup,{defaultIndex:X,onIndexChange:Z,children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Overview"}),(0,s.jsx)(t.Tab,{children:"Details"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Spend"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(G.Title,{children:["$",(0,L.formatNumberWithCommas)(b.spend||0,4)]}),(0,s.jsxs)(q.Text,{children:["of"," ",null!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"]})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,s.jsx)(q.Text,{children:"Teams"}),eR&&(0,s.jsx)(y.Button,{icon:ev.PlusIcon,variant:"light",size:"xs",onClick:()=>{eU(""),eA("user"),ed(!0),eO()},children:"Add Team"})]}),(0,s.jsxs)("div",{className:"mt-2",children:[v.length>0?(0,s.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,s.jsxs)(ec.Table,{children:[(0,s.jsx)(eu.TableHead,{children:(0,s.jsxs)(eh.TableRow,{children:[(0,s.jsx)(em.TableHeaderCell,{children:"Team Name"}),eR&&(0,s.jsx)(em.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,s.jsx)(ex.TableBody,{children:v.slice(0,ea?v.length:20).map(e=>(0,s.jsxs)(eh.TableRow,{children:[(0,s.jsx)(eg.TableCell,{children:e.team_alias||e.team_id}),eR&&(0,s.jsx)(eg.TableCell,{className:"text-right",children:(0,s.jsx)(y.Button,{icon:el.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{ef(e),ep(!0)}})})]},e.team_id))})]})}):(0,s.jsx)(q.Text,{children:"No teams"}),!ea&&v.length>20&&(0,s.jsxs)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>ei(!0),children:["+",v.length-20," more"]}),ea&&v.length>20&&(0,s.jsx)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>ei(!1),children:"Show Less"})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Personal Models"}),(0,s.jsx)("div",{className:"mt-2",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)(q.Text,{children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"User Settings"}),!O&&m&&w.rolesWithWriteAccess.includes(m)&&(0,s.jsx)(y.Button,{onClick:()=>E(!0),children:"Edit Settings"})]}),O&&b?(0,s.jsx)(U,{userData:eV,onCancel:()=>E(!1),onSubmit:e$,teams:v,accessToken:u,userID:e,userRole:m,userModels:M,possibleUIRoles:g}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eN.CheckIcon,{size:12}):(0,s.jsx)(eS.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,s.jsx)(q.Text,{children:b.user_email||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,s.jsx)(q.Text,{children:b.user_alias||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,s.jsx)(q.Text,{children:b.user_role||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,s.jsx)(q.Text,{children:b.created_at?new Date(b.created_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,s.jsx)(q.Text,{children:b.updated_at?new Date(b.updated_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,s.jsx)(q.Text,{children:null!==b.max_budget&&void 0!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,s.jsx)(q.Text,{children:(0,T.getBudgetDurationLabel)(b.budget_duration??null)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(b.metadata||{},null,2)})]})]})]})})]})]}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:$,setIsInvitationLinkModalVisible:W,baseUrl:Q||"",invitationLinkData:H,modalType:"resetPassword"}),(0,s.jsx)(K.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ej?.team_alias||ej?.team_id},{label:"User ID",value:b?.user_id,code:!0},{label:"Email",value:b?.user_email}],onCancel:()=>{ep(!1),ef(null)},onOk:eP,confirmLoading:eC}),(0,s.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!eb,children:(0,s.jsxs)(N.Form,{layout:"vertical",onFinish:eE,children:[(0,s.jsx)(N.Form.Item,{label:"Team",required:!0,children:(0,s.jsx)(x.Select,{showSearch:!0,value:eI||void 0,onChange:eU,placeholder:"Select a team",filterOption:(e,s)=>{let t=eL.find(e=>e.team_id===s?.value);return!!t&&t.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eD,children:eL.map(e=>(0,s.jsx)(x.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,s.jsx)(N.Form.Item,{label:"Member Role",children:(0,s.jsxs)(x.Select,{value:eB,onChange:eA,children:[(0,s.jsx)(x.Select.Option,{value:"user",children:(0,s.jsxs)(C.Tooltip,{title:"Can view team info, but not manage it",children:[(0,s.jsx)("span",{className:"font-medium",children:"user"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,s.jsx)(x.Select.Option,{value:"admin",children:(0,s.jsxs)(C.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,s.jsx)("span",{className:"font-medium",children:"admin"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,s.jsx)("div",{className:"text-right mt-4",children:(0,s.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:eb,disabled:!eI,children:eb?"Adding...":"Add to Team"})})]})})]})}var ew=e.i(655913),eT=e.i(38419),ek=e.i(78334),eI=e.i(555436),eU=e.i(284614);let eB=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eA({data:e=[],columns:t,isLoading:l=!1,onSortChange:a,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:x=[],onSelectionChange:h,enableSelection:g=!1,filters:p,updateFilters:j,initialFilters:f,teams:b,userListResponse:y,currentPage:v,handlePageChange:S}){let[N,C]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[w,T]=n.default.useState(null),[k,I]=n.default.useState(!1),[U,B]=n.default.useState(!1),A=(e,s=!1)=>{T(e),I(s)},D=(e,s)=>{h&&(s?h([...x,e]):h(x.filter(s=>s.user_id!==e.user_id)))},F=s=>{h&&(s?h(e):h([]))},R=e=>x.some(s=>s.user_id===e.user_id),O=e.length>0&&x.length===e.length,E=x.length>0&&x.lengtho?en(o,c,u,m,A,g?{selectedUsers:x,onSelectUser:D,onSelectAll:F,isUserSelected:R,isAllSelected:O,isIndeterminate:E}:void 0):t,[o,c,u,m,A,t,g,x,O,E]),L=(0,ed.useReactTable)({data:e,columns:P,state:{sorting:N},onSortingChange:e=>{let s="function"==typeof e?e(N):e;if(C(s),s&&Array.isArray(s)&&s.length>0&&s[0]){let e=s[0];if(e.id){let s=e.id,t=e.desc?"desc":"asc";a?.(s,t)}}else a?.("created_at","desc")},getCoreRowModel:(0,eo.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&C([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),w)?(0,s.jsx)(eC,{userId:w,onClose:()=>{T(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Search by email...",value:p.email,onChange:e=>j({email:e}),icon:eI.Search}),(0,s.jsx)(eT.FiltersButton,{onClick:()=>B(!U),active:U,hasActiveFilters:!!(p.user_id||p.user_role||p.team)}),(0,s.jsx)(ek.ResetFiltersButton,{onClick:()=>{j(f)}})]}),U&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by User ID",value:p.user_id,onChange:e=>j({user_id:e}),icon:eU.User}),(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by SSO ID",value:p.sso_user_id,onChange:e=>j({sso_user_id:e}),icon:eB}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ep.Select,{value:p.user_role,onValueChange:e=>j({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,t])=>(0,s.jsx)(_.SelectItem,{value:e,children:t.ui_label},e))})}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ep.Select,{value:p.team,onValueChange:e=>j({team:e}),placeholder:"Select Team",children:b?.map(e=>(0,s.jsx)(_.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[l?(0,s.jsx)(ey.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,s.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",y&&y.users&&y.users.length>0?(y.page-1)*y.page_size+1:0," ","-"," ",y&&y.users?Math.min(y.page*y.page_size,y.total):0," ","of ",y?y.total:0," results"]}),(0,s.jsx)("div",{className:"flex space-x-2",children:l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,s.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>S(v-1),disabled:1===v,className:`px-3 py-1 text-sm border rounded-md ${1===v?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,s.jsx)("button",{onClick:()=>S(v+1),disabled:!y||v>=y.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!y||v>=y.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,s.jsx)("div",{className:"overflow-auto",children:(0,s.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(ec.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,s.jsx)(eu.TableHead,{children:L.getHeaderGroups().map(e=>(0,s.jsx)(eh.TableRow,{children:e.headers.map(e=>(0,s.jsx)(em.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,ed.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,s.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,s.jsx)(ef.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,s.jsx)(eb.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,s.jsx)(ej.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,s.jsx)(ex.TableBody,{children:l?(0,s.jsx)(eh.TableRow,{children:(0,s.jsx)(eg.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?L.getRowModel().rows.map(e=>(0,s.jsx)(eh.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,s.jsx)(eg.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&A(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,ed.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,s.jsx)(eh.TableRow,{children:(0,s.jsx)(eg.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eD,Title:eF}=c.Typography,eR={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:x})=>{let h=!!c&&(0,w.isProxyAdminRole)(c),g=(0,$.useQueryClient)(),[p,j]=(0,n.useState)(1),[b,y]=(0,n.useState)(!1),[_,v]=(0,n.useState)(null),[S,N]=(0,n.useState)(!1),[C,T]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[U,A]=(0,n.useState)("users"),[D,F]=(0,n.useState)(eR),[V,G,q]=(0,M.useDebouncedState)(D,{wait:300}),[W,H]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Y,Z]=(0,n.useState)(null),[ee,es]=(0,n.useState)([]),[et,el]=(0,n.useState)(!1),[ea,er]=(0,n.useState)(!1),[ei,ed]=(0,n.useState)([]),eo=e=>{I(e),N(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{Z((0,f.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let s=(await (0,f.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",s),ed(s)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{F(s=>{let t={...s,...e};return G(t),t})},eu=(e,s)=>{ec({sort_by:e,sort_order:s})},em=async s=>{if(!e)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let t=await (0,f.invitationCreateCall)(e,s);Q(t),H(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ex=async()=>{if(k&&e)try{T(!0),await (0,f.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:s}}),B.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{N(!1),I(null),T(!1)}},eh=async()=>{v(null),y(!1)},eg=async s=>{if(console.log("inside handleEditSubmit:",s),e&&o&&c&&u){try{let t=await (0,f.userUpdateUserCall)(e,s,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.map(e=>e.user_id===t.data.user_id?(0,L.updateExistingKeys)(e,t.data):e);return{...e,users:s}}),B.default.success(`User ${s.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}v(null),y(!1)}},ep=async e=>{j(e)},ej=e=>{es(e)},ef=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:V,currentPage:p,orgAdminOrgIds:x}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.userListCall)(e,V.user_id?[V.user_id]:null,p,25,V.email||null,V.user_role||null,V.team||null,V.sso_user_id||null,V.sort_by,V.sort_order,x?x.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),eb=ef.data,e_=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,ev=en(e_,e=>{v(e),y(!0)},eo,em,()=>{});return(0,s.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,s.jsx)("div",{className:"flex space-x-3",children:ef.isLoading?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,s.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,s.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(O.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:e_}),h&&(0,s.jsx)(d.Button,{onClick:()=>{er(!ea),es([])},type:ea?"primary":"default",className:"flex items-center",children:ea?"Cancel Selection":"Select Users"}),h&&ea&&(0,s.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?B.default.fromBackend("Please select users to edit"):el(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),h?(0,s.jsxs)(l.TabGroup,{defaultIndex:0,onIndexChange:e=>A(0===e?"users":"settings"),children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Users"}),(0,s.jsx)(t.Tab,{children:"Default User Settings"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsx)(eA,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:e_,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:ea,selectedUsers:ee,onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eR,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep})}),(0,s.jsx)(r.TabPanel,{children:u&&c&&e?(0,s.jsx)(X,{accessToken:e,possibleUIRoles:e_,userID:u,userRole:c}):(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(ey.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,s.jsx)(eA,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:e_,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eR,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep}),(0,s.jsx)(E,{visible:b,possibleUIRoles:e_,onCancel:eh,user:_,onSubmit:eg}),(0,s.jsx)(K.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&e_?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{N(!1),I(null)},onOk:ex,confirmLoading:C}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:W,setIsInvitationLinkModalVisible:H,baseUrl:Y||"",invitationLinkData:J,modalType:"resetPassword"}),(0,s.jsx)(R,{open:et,onCancel:()=>el(!1),selectedUsers:ee,possibleUIRoles:e_,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),es([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,w.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/37e7834517e667e4.js b/litellm/proxy/_experimental/out/_next/static/chunks/37e7834517e667e4.js deleted file mode 100644 index 0d83a7b6c2..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/37e7834517e667e4.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,916925,e=>{"use strict";var r,a=((r={}).A2A_Agent="A2A Agent",r.AI21="Ai21",r.AI21_CHAT="Ai21 Chat",r.AIML="AI/ML API",r.AIOHTTP_OPENAI="Aiohttp Openai",r.Anthropic="Anthropic",r.ANTHROPIC_TEXT="Anthropic Text",r.AssemblyAI="AssemblyAI",r.AUTO_ROUTER="Auto Router",r.Bedrock="Amazon Bedrock",r.BedrockMantle="Amazon Bedrock Mantle",r.SageMaker="AWS SageMaker",r.Azure="Azure",r.Azure_AI_Studio="Azure AI Foundry (Studio)",r.AZURE_TEXT="Azure Text",r.BASETEN="Baseten",r.BYTEZ="Bytez",r.Cerebras="Cerebras",r.CLARIFAI="Clarifai",r.CLOUDFLARE="Cloudflare",r.CODESTRAL="Codestral",r.Cohere="Cohere",r.COHERE_CHAT="Cohere Chat",r.COMETAPI="Cometapi",r.COMPACTIFAI="Compactifai",r.Cursor="Cursor",r.Dashscope="Dashscope",r.Databricks="Databricks (Qwen API)",r.DATAROBOT="Datarobot",r.DeepInfra="DeepInfra",r.Deepgram="Deepgram",r.Deepseek="Deepseek",r.DOCKER_MODEL_RUNNER="Docker Model Runner",r.DOTPROMPT="Dotprompt",r.ElevenLabs="ElevenLabs",r.EMPOWER="Empower",r.FalAI="Fal AI",r.FEATHERLESS_AI="Featherless Ai",r.FireworksAI="Fireworks AI",r.FRIENDLIAI="Friendliai",r.GALADRIEL="Galadriel",r.GITHUB_COPILOT="Github Copilot",r.Google_AI_Studio="Google AI Studio",r.GradientAI="GradientAI",r.Groq="Groq",r.HEROKU="Heroku",r.Hosted_Vllm="vllm",r.HUGGINGFACE="Huggingface",r.HYPERBOLIC="Hyperbolic",r.Infinity="Infinity",r.JinaAI="Jina AI",r.LAMBDA_AI="Lambda Ai",r.LEMONADE="Lemonade",r.LLAMAFILE="Llamafile",r.LM_STUDIO="Lm Studio",r.LLAMA="Meta Llama",r.MARITALK="Maritalk",r.MiniMax="MiniMax",r.MistralAI="Mistral AI",r.MOONSHOT="Moonshot",r.MORPH="Morph",r.NEBIUS="Nebius",r.NLP_CLOUD="Nlp Cloud",r.NOVITA="Novita",r.NSCALE="Nscale",r.NVIDIA_NIM="Nvidia Nim",r.Ollama="Ollama",r.OLLAMA_CHAT="Ollama Chat",r.OOBABOOGA="Oobabooga",r.OpenAI="OpenAI",r.OPENAI_LIKE="Openai Like",r.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",r.OpenAI_Text="OpenAI Text Completion",r.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",r.Openrouter="Openrouter",r.Oracle="Oracle Cloud Infrastructure (OCI)",r.OVHCLOUD="Ovhcloud",r.Perplexity="Perplexity",r.PETALS="Petals",r.PG_VECTOR="Pg Vector",r.PREDIBASE="Predibase",r.RECRAFT="Recraft",r.REPLICATE="Replicate",r.RunwayML="RunwayML",r.SAGEMAKER_LEGACY="Sagemaker",r.Sambanova="Sambanova",r.SAP="SAP Generative AI Hub",r.Snowflake="Snowflake",r.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",r.TogetherAI="TogetherAI",r.TOPAZ="Topaz",r.Triton="Triton",r.V0="V0",r.VERCEL_AI_GATEWAY="Vercel Ai Gateway",r.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",r.VERTEX_AI_BETA="Vertex Ai Beta",r.VLLM="Vllm",r.VolcEngine="VolcEngine",r.Voyage="Voyage AI",r.WANDB="Wandb",r.WATSONX="Watsonx",r.WATSONX_TEXT="Watsonx Text",r.xAI="xAI",r.XINFERENCE="Xinference",r);let t={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",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"},o="../ui/assets/logos/",i={"A2A Agent":`${o}a2a_agent.png`,Ai21:`${o}ai21.svg`,"Ai21 Chat":`${o}ai21.svg`,"AI/ML API":`${o}aiml_api.svg`,"Aiohttp Openai":`${o}openai_small.svg`,Anthropic:`${o}anthropic.svg`,"Anthropic Text":`${o}anthropic.svg`,AssemblyAI:`${o}assemblyai_small.png`,Azure:`${o}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${o}microsoft_azure.svg`,"Azure Text":`${o}microsoft_azure.svg`,Baseten:`${o}baseten.svg`,"Amazon Bedrock":`${o}bedrock.svg`,"Amazon Bedrock Mantle":`${o}bedrock.svg`,"AWS SageMaker":`${o}bedrock.svg`,Cerebras:`${o}cerebras.svg`,Cloudflare:`${o}cloudflare.svg`,Codestral:`${o}mistral.svg`,Cohere:`${o}cohere.svg`,"Cohere Chat":`${o}cohere.svg`,Cometapi:`${o}cometapi.svg`,Cursor:`${o}cursor.svg`,"Databricks (Qwen API)":`${o}databricks.svg`,Dashscope:`${o}dashscope.svg`,Deepseek:`${o}deepseek.svg`,Deepgram:`${o}deepgram.png`,DeepInfra:`${o}deepinfra.png`,ElevenLabs:`${o}elevenlabs.png`,"Fal AI":`${o}fal_ai.jpg`,"Featherless Ai":`${o}featherless.svg`,"Fireworks AI":`${o}fireworks.svg`,Friendliai:`${o}friendli.svg`,"Github Copilot":`${o}github_copilot.svg`,"Google AI Studio":`${o}google.svg`,GradientAI:`${o}gradientai.svg`,Groq:`${o}groq.svg`,vllm:`${o}vllm.png`,Huggingface:`${o}huggingface.svg`,Hyperbolic:`${o}hyperbolic.svg`,Infinity:`${o}infinity.png`,"Jina AI":`${o}jina.png`,"Lambda Ai":`${o}lambda.svg`,"Lm Studio":`${o}lmstudio.svg`,"Meta Llama":`${o}meta_llama.svg`,MiniMax:`${o}minimax.svg`,"Mistral AI":`${o}mistral.svg`,Moonshot:`${o}moonshot.svg`,Morph:`${o}morph.svg`,Nebius:`${o}nebius.svg`,Novita:`${o}novita.svg`,"Nvidia Nim":`${o}nvidia_nim.svg`,Ollama:`${o}ollama.svg`,"Ollama Chat":`${o}ollama.svg`,Oobabooga:`${o}openai_small.svg`,OpenAI:`${o}openai_small.svg`,"Openai Like":`${o}openai_small.svg`,"OpenAI Text Completion":`${o}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${o}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${o}openai_small.svg`,Openrouter:`${o}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${o}oracle.svg`,Perplexity:`${o}perplexity-ai.svg`,Recraft:`${o}recraft.svg`,Replicate:`${o}replicate.svg`,RunwayML:`${o}runwayml.png`,Sagemaker:`${o}bedrock.svg`,Sambanova:`${o}sambanova.svg`,"SAP Generative AI Hub":`${o}sap.png`,Snowflake:`${o}snowflake.svg`,"Text-Completion-Codestral":`${o}mistral.svg`,TogetherAI:`${o}togetherai.svg`,Topaz:`${o}topaz.svg`,Triton:`${o}nvidia_triton.png`,V0:`${o}v0.svg`,"Vercel Ai Gateway":`${o}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${o}google.svg`,"Vertex Ai Beta":`${o}google.svg`,Vllm:`${o}vllm.png`,VolcEngine:`${o}volcengine.png`,"Voyage AI":`${o}voyage.webp`,Watsonx:`${o}watsonx.svg`,"Watsonx Text":`${o}watsonx.svg`,xAI:`${o}xai.svg`,Xinference:`${o}xinference.svg`};e.s(["Providers",()=>a,"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 return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let r=Object.keys(t).find(r=>t[r].toLowerCase()===e.toLowerCase());if(!r)return{logo:"",displayName:e};let o=a[r];return{logo:i[o],displayName:o}},"getProviderModels",0,(e,r)=>{console.log(`Provider key: ${e}`);let a=t[e];console.log(`Provider mapped to: ${a}`);let o=[];return e&&"object"==typeof r&&(Object.entries(r).forEach(([e,r])=>{if(null!==r&&"object"==typeof r&&"litellm_provider"in r){let t=r.litellm_provider;(t===a||"string"==typeof t&&t.includes(a))&&o.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(r).forEach(([e,r])=>{null!==r&&"object"==typeof r&&"litellm_provider"in r&&"cohere_chat"===r.litellm_provider&&o.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(r).forEach(([e,r])=>{null!==r&&"object"==typeof r&&"litellm_provider"in r&&"sagemaker_chat"===r.litellm_provider&&o.push(e)}))),o},"providerLogoMap",0,i,"provider_map",0,t])},240647,e=>{"use strict";var r=e.i(286612);e.s(["RightOutlined",()=>r.default])},362024,e=>{"use strict";var r=e.i(988122);e.s(["Collapse",()=>r.default])},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,r)=>(e[r.team_id]=r.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,r)=>{let a=r.find(r=>r.team_id===e);return a?a.team_alias:null}])},793130,e=>{"use strict";var r=e.i(290571),a=e.i(429427),t=e.i(371330),o=e.i(271645),i=e.i(394487),l=e.i(503269),n=e.i(214520),s=e.i(746725),u=e.i(914189),c=e.i(144279),d=e.i(294316),m=e.i(601893),g=e.i(140721),A=e.i(942803),p=e.i(233538),f=e.i(694421),v=e.i(700020),b=e.i(35889),I=e.i(998348),h=e.i(722678);let C=(0,o.createContext)(null);C.displayName="GroupContext";let E=o.Fragment,T=Object.assign((0,v.forwardRefWithAs)(function(e,r){var E;let T=(0,o.useId)(),_=(0,A.useProvidedId)(),O=(0,m.useDisabled)(),{id:k=_||`headlessui-switch-${T}`,disabled:L=O||!1,checked:x,defaultChecked:M,onChange:y,name:R,value:N,form:S,autoFocus:$=!1,...w}=e,P=(0,o.useContext)(C),[D,F]=(0,o.useState)(null),G=(0,o.useRef)(null),B=(0,d.useSyncRefs)(G,r,null===P?null:P.setSwitch,F),V=(0,n.useDefaultValue)(M),[H,z]=(0,l.useControllable)(x,y,null!=V&&V),U=(0,s.useDisposables)(),[j,W]=(0,o.useState)(!1),X=(0,u.useEvent)(()=>{W(!0),null==z||z(!H),U.nextFrame(()=>{W(!1)})}),K=(0,u.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),X()}),q=(0,u.useEvent)(e=>{e.key===I.Keys.Space?(e.preventDefault(),X()):e.key===I.Keys.Enter&&(0,f.attemptSubmit)(e.currentTarget)}),Y=(0,u.useEvent)(e=>e.preventDefault()),Z=(0,h.useLabelledBy)(),J=(0,b.useDescribedBy)(),{isFocusVisible:Q,focusProps:ee}=(0,a.useFocusRing)({autoFocus:$}),{isHovered:er,hoverProps:ea}=(0,t.useHover)({isDisabled:L}),{pressed:et,pressProps:eo}=(0,i.useActivePress)({disabled:L}),ei=(0,o.useMemo)(()=>({checked:H,disabled:L,hover:er,focus:Q,active:et,autofocus:$,changing:j}),[H,er,Q,et,L,j,$]),el=(0,v.mergeProps)({id:k,ref:B,role:"switch",type:(0,c.useResolveButtonType)(e,D),tabIndex:-1===e.tabIndex?0:null!=(E=e.tabIndex)?E:0,"aria-checked":H,"aria-labelledby":Z,"aria-describedby":J,disabled:L||void 0,autoFocus:$,onClick:K,onKeyUp:q,onKeyPress:Y},ee,ea,eo),en=(0,o.useCallback)(()=>{if(void 0!==V)return null==z?void 0:z(V)},[z,V]),es=(0,v.useRender)();return o.default.createElement(o.default.Fragment,null,null!=R&&o.default.createElement(g.FormFields,{disabled:L,data:{[R]:N||"on"},overrides:{type:"checkbox",checked:H},form:S,onReset:en}),es({ourProps:el,theirProps:w,slot:ei,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var r;let[a,t]=(0,o.useState)(null),[i,l]=(0,h.useLabels)(),[n,s]=(0,b.useDescriptions)(),u=(0,o.useMemo)(()=>({switch:a,setSwitch:t}),[a,t]),c=(0,v.useRender)();return o.default.createElement(s,{name:"Switch.Description",value:n},o.default.createElement(l,{name:"Switch.Label",value:i,props:{htmlFor:null==(r=u.switch)?void 0:r.id,onClick(e){a&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),a.click(),a.focus({preventScroll:!0}))}}},o.default.createElement(C.Provider,{value:u},c({ourProps:{},theirProps:e,slot:{},defaultTag:E,name:"Switch.Group"}))))},Label:h.Label,Description:b.Description});var _=e.i(888288),O=e.i(95779),k=e.i(444755),L=e.i(673706),x=e.i(829087);let M=(0,L.makeClassName)("Switch"),y=o.default.forwardRef((e,a)=>{let{checked:t,defaultChecked:i=!1,onChange:l,color:n,name:s,error:u,errorMessage:c,disabled:d,required:m,tooltip:g,id:A}=e,p=(0,r.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),f={bgColor:n?(0,L.getColorClassNames)(n,O.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:n?(0,L.getColorClassNames)(n,O.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[v,b]=(0,_.default)(i,t),[I,h]=(0,o.useState)(!1),{tooltipProps:C,getReferenceProps:E}=(0,x.useTooltip)(300);return o.default.createElement("div",{className:"flex flex-row items-center justify-start"},o.default.createElement(x.default,Object.assign({text:g},C)),o.default.createElement("div",Object.assign({ref:(0,L.mergeRefs)([a,C.refs.setReference]),className:(0,k.tremorTwMerge)(M("root"),"flex flex-row relative h-5")},p,E),o.default.createElement("input",{type:"checkbox",className:(0,k.tremorTwMerge)(M("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:s,required:m,checked:v,onChange:e=>{e.preventDefault()}}),o.default.createElement(T,{checked:v,onChange:e=>{b(e),null==l||l(e)},disabled:d,className:(0,k.tremorTwMerge)(M("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>h(!0),onBlur:()=>h(!1),id:A},o.default.createElement("span",{className:(0,k.tremorTwMerge)(M("sr-only"),"sr-only")},"Switch ",v?"on":"off"),o.default.createElement("span",{"aria-hidden":"true",className:(0,k.tremorTwMerge)(M("background"),v?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,k.tremorTwMerge)(M("round"),v?(0,k.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",I?(0,k.tremorTwMerge)("ring-2",f.ringColor):"")}))),u&&c?o.default.createElement("p",{className:(0,k.tremorTwMerge)(M("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});y.displayName="Switch",e.s(["Switch",()=>y],793130)},418371,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:o="w-4 h-4"})=>{let[i,l]=(0,a.useState)(!1),{logo:n}=(0,t.getProviderLogoAndName)(e);return i||!n?(0,r.jsx)("div",{className:`${o} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,r.jsx)("img",{src:n,alt:`${e} logo`,className:o,onError:()=>l(!0)})}])},571303,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(115504);function o({className:e="",...o}){var i,l;let n=(0,a.useId)();return i=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),r=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===n),a=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==n);r&&a&&(r.currentTime=a.currentTime)},l=[n],(0,a.useLayoutEffect)(i,l),(0,r.jsxs)("svg",{"data-spinner-id":n,className:(0,t.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...o,children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>o],571303)},366283,e=>{"use strict";var r=e.i(290571),a=e.i(271645),t=e.i(95779),o=e.i(444755),i=e.i(673706);let l=(0,i.makeClassName)("Callout"),n=a.default.forwardRef((e,n)=>{let{title:s,icon:u,color:c,className:d,children:m}=e,g=(0,r.__rest)(e,["title","icon","color","className","children"]);return a.default.createElement("div",Object.assign({ref:n,className:(0,o.tremorTwMerge)(l("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",c?(0,o.tremorTwMerge)((0,i.getColorClassNames)(c,t.colorPalette.background).bgColor,(0,i.getColorClassNames)(c,t.colorPalette.darkBorder).borderColor,(0,i.getColorClassNames)(c,t.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,o.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),d)},g),a.default.createElement("div",{className:(0,o.tremorTwMerge)(l("header"),"flex items-start")},u?a.default.createElement(u,{className:(0,o.tremorTwMerge)(l("icon"),"flex-none h-5 w-5 mr-1.5")}):null,a.default.createElement("h4",{className:(0,o.tremorTwMerge)(l("title"),"font-semibold")},s)),a.default.createElement("p",{className:(0,o.tremorTwMerge)(l("body"),"overflow-y-auto",m?"mt-2":"")},m))});n.displayName="Callout",e.s(["Callout",()=>n],366283)},986888,e=>{"use strict";var r=e.i(843476),a=e.i(797305),t=e.i(135214),o=e.i(214541);e.s(["default",0,()=>{let{accessToken:e,userRole:i,userId:l,premiumUser:n}=(0,t.default)(),{teams:s}=(0,o.default)();return(0,r.jsx)(a.default,{teams:s??[],organizations:[]})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/38db69571fd2ddd2.js b/litellm/proxy/_experimental/out/_next/static/chunks/38db69571fd2ddd2.js deleted file mode 100644 index 6f3c6b0aea..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/38db69571fd2ddd2.js +++ /dev/null @@ -1,231 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,952683,e=>{"use strict";var t=e.i(843476),s=e.i(902739),a=e.i(161059),l=e.i(213970),r=e.i(105278),i=e.i(271645),n=e.i(994388),o=e.i(304967),d=e.i(269200),c=e.i(942232),m=e.i(977572),u=e.i(427612),p=e.i(64848),x=e.i(496020),h=e.i(389083),g=e.i(599724),y=e.i(212931),j=e.i(560445),f=e.i(592968),b=e.i(981339),_=e.i(790848),v=e.i(245704),w=e.i(764205),k=e.i(808613),N=e.i(199133),S=e.i(311451),C=e.i(280898),T=e.i(91739),I=e.i(262218),F=e.i(312361),L=e.i(28651),A=e.i(888259),M=e.i(826910),P=e.i(438957),D=e.i(983561),z=e.i(477189),E=e.i(827252),O=e.i(364769),R=e.i(135214),B=e.i(355619),$=e.i(663435),q=e.i(362024),U=e.i(770914),V=e.i(464571),H=e.i(646563),G=e.i(564897);let K={basic:{key:"basic",title:"Basic Information",defaultExpanded:!0,fields:[{name:"name",label:"Display Name",type:"text",required:!0,placeholder:"e.g., Customer Support Agent"},{name:"description",label:"Description",type:"textarea",required:!0,placeholder:"Describe what this agent does...",rows:3},{name:"url",label:"URL",type:"url",required:!1,placeholder:"http://localhost:9999/",tooltip:"Base URL where the agent is hosted (optional)"},{name:"version",label:"Version",type:"text",placeholder:"1.0.0",defaultValue:"1.0.0"},{name:"protocolVersion",label:"Protocol Version",type:"text",placeholder:"1.0",defaultValue:"1.0"}]},skills:{key:"skills",title:"Skills",fields:[{name:"skills",label:"Skills",type:"list",defaultValue:[]}]},capabilities:{key:"capabilities",title:"Capabilities",fields:[{name:"streaming",label:"Streaming",type:"switch",defaultValue:!1},{name:"pushNotifications",label:"Push Notifications",type:"switch"},{name:"stateTransitionHistory",label:"State Transition History",type:"switch"}]},optional:{key:"optional",title:"Optional Settings",fields:[{name:"iconUrl",label:"Icon URL",type:"url",placeholder:"https://example.com/icon.png"},{name:"documentationUrl",label:"Documentation URL",type:"url",placeholder:"https://docs.example.com"},{name:"supportsAuthenticatedExtendedCard",label:"Supports Authenticated Extended Card",type:"switch"}]},litellm:{key:"litellm",title:"LiteLLM Parameters",fields:[{name:"model",label:"Model (Optional)",type:"text"},{name:"make_public",label:"Make Public",type:"switch"}]},cost:{key:"cost",title:"Cost Configuration",fields:[{name:"cost_per_query",label:"Cost Per Query ($)",type:"text",placeholder:"0.0",tooltip:"Fixed cost per query"},{name:"input_cost_per_token",label:"Input Cost Per Token ($)",type:"text",placeholder:"0.000001",tooltip:"Cost per input token"},{name:"output_cost_per_token",label:"Output Cost Per Token ($)",type:"text",placeholder:"0.000002",tooltip:"Cost per output token"}]},tracing:{key:"tracing",title:"Tracing",fields:[{name:"enable_tracing",label:"Enable Tracing",type:"switch",defaultValue:!1,tooltip:"Enable request tracing for this agent"}]}},W="Skill ID",Q=!0,Y="e.g., hello_world",J="Skill Name",X=!0,Z="e.g., Returns hello world",ee="Description",et=!0,es="What this skill does",ea=2,el="Tags (comma-separated)",er=!0,ei="e.g., hello world, greeting",en="Examples (comma-separated)",eo="e.g., hi, hello world",ed=(e,t)=>{let s={agent_name:e.agent_name,agent_card_params:{protocolVersion:e.protocolVersion||"1.0",name:e.name||e.agent_name,description:e.description||"",url:e.url||"",version:e.version||"1.0.0",defaultInputModes:t?.agent_card_params?.defaultInputModes||["text"],defaultOutputModes:t?.agent_card_params?.defaultOutputModes||["text"],capabilities:{streaming:!0===e.streaming,...void 0!==e.pushNotifications&&{pushNotifications:e.pushNotifications},...void 0!==e.stateTransitionHistory&&{stateTransitionHistory:e.stateTransitionHistory}},skills:e.skills||[],...e.iconUrl&&{iconUrl:e.iconUrl},...e.documentationUrl&&{documentationUrl:e.documentationUrl},...void 0!==e.supportsAuthenticatedExtendedCard&&{supportsAuthenticatedExtendedCard:e.supportsAuthenticatedExtendedCard}}},a={};if(e.model&&(a.model=e.model),void 0!==e.make_public&&(a.make_public=e.make_public),e.cost_per_query&&(a.cost_per_query=parseFloat(e.cost_per_query)),e.input_cost_per_token&&(a.input_cost_per_token=parseFloat(e.input_cost_per_token)),e.output_cost_per_token&&(a.output_cost_per_token=parseFloat(e.output_cost_per_token)),Object.keys(a).length>0&&(s.litellm_params=a),null!=e.tpm_limit&&(s.tpm_limit=e.tpm_limit),null!=e.rpm_limit&&(s.rpm_limit=e.rpm_limit),null!=e.session_tpm_limit&&(s.session_tpm_limit=e.session_tpm_limit),null!=e.session_rpm_limit&&(s.session_rpm_limit=e.session_rpm_limit),Array.isArray(e.static_headers)&&e.static_headers.length>0){let t={};e.static_headers.forEach(e=>{let s=e?.header?.trim();s&&(t[s]=e?.value??"")}),Object.keys(t).length>0&&(s.static_headers=t)}return Array.isArray(e.extra_headers)&&e.extra_headers.length>0&&(s.extra_headers=e.extra_headers),s},ec=e=>{let t=e.agent_card_params?.skills?.map(e=>({...e,tags:e.tags,examples:e.examples||[]}))||[];return{agent_name:e.agent_name,name:e.agent_card_params?.name,description:e.agent_card_params?.description,url:e.agent_card_params?.url,version:e.agent_card_params?.version,protocolVersion:e.agent_card_params?.protocolVersion,streaming:e.agent_card_params?.capabilities?.streaming,pushNotifications:e.agent_card_params?.capabilities?.pushNotifications,stateTransitionHistory:e.agent_card_params?.capabilities?.stateTransitionHistory,skills:t,iconUrl:e.agent_card_params?.iconUrl,documentationUrl:e.agent_card_params?.documentationUrl,supportsAuthenticatedExtendedCard:e.agent_card_params?.supportsAuthenticatedExtendedCard,model:e.litellm_params?.model,make_public:e.litellm_params?.make_public,cost_per_query:e.litellm_params?.cost_per_query,input_cost_per_token:e.litellm_params?.input_cost_per_token,output_cost_per_token:e.litellm_params?.output_cost_per_token,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,session_tpm_limit:e.session_tpm_limit,session_rpm_limit:e.session_rpm_limit,static_headers:e.static_headers?Object.entries(e.static_headers).map(([e,t])=>({header:e,value:t})):[],extra_headers:e.extra_headers??[]}},em=()=>(0,t.jsx)(t.Fragment,{children:K.cost.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,tooltip:e.tooltip,children:(0,t.jsx)(S.Input,{placeholder:e.placeholder,type:"number",step:"0.000001"})},e.name))}),{Panel:eu}=q.Collapse,ep=({showAgentName:e=!0,visiblePanels:s})=>{let a=e=>!s||s.includes(e);return(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)(k.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter a unique agent name"}],tooltip:"Unique identifier for the agent",children:(0,t.jsx)(S.Input,{placeholder:"e.g., customer-support-agent"})}),(0,t.jsxs)(q.Collapse,{defaultActiveKey:["basic"],style:{marginBottom:16},children:[a(K.basic.key)&&(0,t.jsx)(eu,{header:`${K.basic.title} (Required)`,children:K.basic.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,rules:e.required?[{required:!0,message:`Please enter ${e.label.toLowerCase()}`}]:void 0,tooltip:e.tooltip,children:"textarea"===e.type?(0,t.jsx)(S.Input.TextArea,{rows:e.rows,placeholder:e.placeholder}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.basic.key),a(K.skills.key)&&(0,t.jsx)(eu,{header:`${K.skills.title} (Required)`,children:(0,t.jsx)(k.Form.List,{name:"skills",children:(e,{add:s,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(e=>(0,t.jsxs)("div",{style:{marginBottom:16,padding:16,border:"1px solid #d9d9d9",borderRadius:4},children:[(0,t.jsx)(k.Form.Item,{...e,label:W,name:[e.name,"id"],rules:[{required:Q,message:"Required"}],children:(0,t.jsx)(S.Input,{placeholder:Y})}),(0,t.jsx)(k.Form.Item,{...e,label:J,name:[e.name,"name"],rules:[{required:X,message:"Required"}],children:(0,t.jsx)(S.Input,{placeholder:Z})}),(0,t.jsx)(k.Form.Item,{...e,label:ee,name:[e.name,"description"],rules:[{required:et,message:"Required"}],children:(0,t.jsx)(S.Input.TextArea,{rows:ea,placeholder:es})}),(0,t.jsx)(k.Form.Item,{...e,label:el,name:[e.name,"tags"],rules:[{required:er,message:"Required"}],getValueFromEvent:e=>e.target.value.split(",").map(e=>e.trim()),getValueProps:e=>({value:Array.isArray(e)?e.join(", "):e}),children:(0,t.jsx)(S.Input,{placeholder:ei})}),(0,t.jsx)(k.Form.Item,{...e,label:en,name:[e.name,"examples"],getValueFromEvent:e=>e.target.value.split(",").map(e=>e.trim()).filter(e=>e),getValueProps:e=>({value:Array.isArray(e)?e.join(", "):""}),children:(0,t.jsx)(S.Input,{placeholder:eo})}),(0,t.jsx)(V.Button,{type:"link",danger:!0,onClick:()=>a(e.name),icon:(0,t.jsx)(G.MinusCircleOutlined,{}),children:"Remove Skill"})]},e.key)),(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(H.PlusOutlined,{}),style:{width:"100%"},children:"Add Skill"})]})})},K.skills.key),a(K.capabilities.key)&&(0,t.jsx)(eu,{header:K.capabilities.title,children:K.capabilities.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,valuePropName:"checked",children:(0,t.jsx)(_.Switch,{})},e.name))},K.capabilities.key),a(K.optional.key)&&(0,t.jsx)(eu,{header:K.optional.title,children:K.optional.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,valuePropName:"switch"===e.type?"checked":void 0,children:"switch"===e.type?(0,t.jsx)(_.Switch,{}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.optional.key),a(K.cost.key)&&(0,t.jsx)(eu,{header:K.cost.title,children:(0,t.jsx)(em,{})},K.cost.key),a(K.litellm.key)&&(0,t.jsx)(eu,{header:K.litellm.title,children:K.litellm.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,valuePropName:"switch"===e.type?"checked":void 0,children:"switch"===e.type?(0,t.jsx)(_.Switch,{}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.litellm.key),a("auth_headers")&&(0,t.jsxs)(eu,{header:"Authentication Headers",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Static Headers"," ",(0,t.jsx)(f.Tooltip,{title:"Headers always sent to the backend agent, regardless of the client request. Admin-configured, static wins on conflict.",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(k.Form.List,{name:"static_headers",children:(e,{add:s,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(({key:e,name:s,...l})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(k.Form.Item,{...l,name:[s,"header"],rules:[{required:!0,message:"Header name required"}],children:(0,t.jsx)(S.Input,{placeholder:"Header name (e.g. Authorization)",style:{width:220}})}),(0,t.jsx)(k.Form.Item,{...l,name:[s,"value"],rules:[{required:!0,message:"Value required"}],children:(0,t.jsx)(S.Input,{placeholder:"Value (e.g. Bearer token123)",style:{width:260}})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>a(s),style:{color:"#ff4d4f"}})]},e)),(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(H.PlusOutlined,{}),style:{width:"100%"},children:"Add Static Header"})]})})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Forward Client Headers"," ",(0,t.jsx)(f.Tooltip,{title:"Header names to extract from the client's request and forward to the agent. Type a name and press Enter.",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),name:"extra_headers",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"e.g. x-api-key, Authorization",tokenSeparators:[","]})})]},"auth_headers")]})]})},{Panel:ex}=q.Collapse,eh=(e,t)=>{let s={...t.litellm_params_template||{}};for(let a of t.credential_fields){let t=e[a.key];t&&!1!==a.include_in_litellm_params&&(s[a.key]=t)}if(e.cost_per_query&&(s.cost_per_query=parseFloat(e.cost_per_query)),e.input_cost_per_token&&(s.input_cost_per_token=parseFloat(e.input_cost_per_token)),e.output_cost_per_token&&(s.output_cost_per_token=parseFloat(e.output_cost_per_token)),t.model_template){let a=t.model_template;for(let s of t.credential_fields){let t=`{${s.key}}`;a.includes(t)&&e[s.key]&&(a=a.replace(t,e[s.key]))}s.model=a}let a={agent_name:e.agent_name,agent_card_params:{protocolVersion:"1.0",name:e.display_name||e.agent_name,description:e.description||`${t.agent_type_display_name} agent`,url:e.api_base||"",version:"1.0.0",defaultInputModes:["text"],defaultOutputModes:["text"],capabilities:{streaming:!0},skills:[{id:"chat",name:"Chat",description:"General chat capability",tags:["chat","conversation"]}]},litellm_params:s};return null!=e.tpm_limit&&(a.tpm_limit=e.tpm_limit),null!=e.rpm_limit&&(a.rpm_limit=e.rpm_limit),null!=e.session_tpm_limit&&(a.session_tpm_limit=e.session_tpm_limit),null!=e.session_rpm_limit&&(a.session_rpm_limit=e.session_rpm_limit),a},eg=({agentTypeInfo:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter a unique agent name"}],tooltip:"Unique identifier for the agent",children:(0,t.jsx)(S.Input,{placeholder:"e.g., my-langgraph-agent"})}),(0,t.jsx)(k.Form.Item,{label:"Description",name:"description",tooltip:"Brief description of what this agent does",children:(0,t.jsx)(S.Input.TextArea,{rows:2,placeholder:"Describe what this agent does..."})}),e.credential_fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:`Please enter ${e.label}`}]:void 0,tooltip:e.tooltip,initialValue:e.default_value,children:"password"===e.field_type?(0,t.jsx)(S.Input.Password,{placeholder:e.placeholder||""}):"textarea"===e.field_type?(0,t.jsx)(S.Input.TextArea,{rows:3,placeholder:e.placeholder||""}):"select"===e.field_type&&e.options?(0,t.jsx)(N.Select,{placeholder:e.placeholder||"",children:e.options.map(e=>(0,t.jsx)(N.Select.Option,{value:e,children:e},e))}):(0,t.jsx)(S.Input,{placeholder:e.placeholder||""})},e.key)),(0,t.jsx)(q.Collapse,{style:{marginBottom:16},children:(0,t.jsx)(ex,{header:K.cost.title,children:(0,t.jsx)(em,{})},K.cost.key)})]});var ey=e.i(75921),ej=e.i(390605),ef=e.i(891547);let{Step:eb}=C.Steps,e_="custom",ev=({visible:e,onClose:s,accessToken:a,onSuccess:l,teams:r})=>{let o,d,{userId:c,userRole:m}=(0,R.default)(),[u]=k.Form.useForm(),[p,x]=(0,i.useState)(0),[h,g]=(0,i.useState)(!1),[j,f]=(0,i.useState)("a2a"),[b,v]=(0,i.useState)([]),[q,U]=(0,i.useState)(!1),[V,H]=(0,i.useState)("create_new"),[G,W]=(0,i.useState)(""),[Q,Y]=(0,i.useState)([]),[J,X]=(0,i.useState)([]),[Z,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)(!1),[ea,el]=(0,i.useState)([]),[er,ei]=(0,i.useState)(!1),[en,eo]=(0,i.useState)([]),[ec,em]=(0,i.useState)(!1),[eu,ex]=(0,i.useState)(""),[ev,ew]=(0,i.useState)(null),[ek,eN]=(0,i.useState)(null),[eS,eC]=(0,i.useState)(!1),[eT,eI]=(0,i.useState)(!1),[eF,eL]=(0,i.useState)(null),[eA,eM]=(0,i.useState)(null);(0,i.useEffect)(()=>{(async()=>{U(!0);try{let e=await (0,w.getAgentCreateMetadata)();v(e)}catch(e){console.error("Error fetching agent metadata:",e)}finally{U(!1)}})()},[]),(0,i.useEffect)(()=>{3===p&&a&&0===J.length&&(async()=>{es(!0);try{let e=await (0,w.keyListCall)(a,null,null,null,null,null,1,100);X(e?.keys||[])}catch(e){console.error("Error fetching keys:",e)}finally{es(!1)}})()},[p,a]),(0,i.useEffect)(()=>{if(1!==p&&3!==p||!a||!c||!m)return;let e=!1;return ei(!0),(0,w.modelAvailableCall)(a,c,m).then(t=>{e||el((t?.data??(Array.isArray(t)?t:[])).map(e=>e.id??e.model_name).filter(Boolean))}).catch(t=>{e||console.error("Error fetching models:",t)}).finally(()=>{e||ei(!1)}),()=>{e=!0}},[p,a,c,m]),(0,i.useEffect)(()=>{if(1!==p||!a)return;let e=!1;return em(!0),(0,w.getAgentsList)(a).then(t=>{e||eo((t?.agents??[]).map(e=>({agent_id:e.agent_id,agent_name:e.agent_name})))}).catch(t=>{e||console.error("Error fetching agents:",t)}).finally(()=>{e||em(!1)}),()=>{e=!0}},[p,a]);let eP=b.find(e=>e.agent_type===j),eD=async()=>{try{if(0===p){await u.validateFields(["agent_name"]);let e=u.getFieldValue("agent_name");e&&!G&&W(`${e}-key`)}x(e=>e+1)}catch{}},ez=async()=>{if(!a)return void A.default.error("No access token available");g(!0);try{await u.validateFields();let e={...u.getFieldsValue(!0)},t=(e=>{if(j===e_)return{agent_name:e.agent_name,agent_card_params:{protocolVersion:"1.0",name:e.agent_name,description:e.description||"",url:"",version:"1.0.0",defaultInputModes:["text"],defaultOutputModes:["text"],capabilities:{streaming:!1},skills:[]}};if("a2a"===j)return ed(e);if(eP?.use_a2a_form_fields){let t=ed(e);for(let s of(eP.litellm_params_template&&(t.litellm_params={...t.litellm_params,...eP.litellm_params_template}),eP.credential_fields)){let a=e[s.key];a&&!1!==s.include_in_litellm_params&&(t.litellm_params[s.key]=a)}return t}return eP?eh(e,eP):null})(e);if(!t){A.default.error("Failed to build agent data"),g(!1);return}let s=e.allowed_mcp_servers_and_groups,r=e.mcp_tool_permissions||{},i=e.entitlement_models||[],n=e.entitlement_agents||[];(s?.servers?.length>0||s?.accessGroups?.length>0||Object.keys(r).length>0||i.length>0||n.length>0)&&(t.object_permission={},s?.servers?.length>0&&(t.object_permission.mcp_servers=s.servers),s?.accessGroups?.length>0&&(t.object_permission.mcp_access_groups=s.accessGroups),Object.keys(r).length>0&&(t.object_permission.mcp_tool_permissions=r),i.length>0&&(t.object_permission.models=i),n.length>0&&(t.object_permission.agents=n)),(eS||eT)&&(t.litellm_params||(t.litellm_params={}),eS&&(t.litellm_params.require_trace_id_on_calls_to_agent=!0),eT&&(t.litellm_params.require_trace_id_on_calls_by_agent=!0,eF&&(t.litellm_params.max_iterations=eF),eA&&(t.litellm_params.max_budget_per_session=eA)));let o=e.guardrails||[];o.length>0&&(t.litellm_params||(t.litellm_params={}),t.litellm_params.guardrails=o);let d=e.team_id||null;d&&(t.team_id=d);let c=await (0,w.createAgentCall)(a,t),m=c.agent_id,p=c.agent_name||e.agent_name||m;if(ex(p),"create_new"===V&&G){let e=await (0,w.keyCreateForAgentCall)(a,m,G,Q,void 0,d);ew(e.key||null)}else if("existing_key"===V){if(!Z){A.default.error("Please select an existing key to assign"),g(!1);return}await (0,w.keyUpdateCall)(a,{key:Z,agent_id:m});let e=J.find(e=>e.token===Z);eN(e?.key_alias||Z.slice(0,12)+"…")}x(4),l()}catch(t){console.error("Error creating agent:",t);let e=t instanceof Error?t.message:String(t);A.default.error(e?`Failed to create agent: ${e}`:"Failed to create agent")}finally{g(!1)}},eE=()=>{u.resetFields(),f("a2a"),x(0),H("create_new"),W(""),Y([]),ee(null),ex(""),ew(null),eN(null),eC(!1),eI(!1),eL(null),eM(null),s()},eO=e=>{f(e),u.resetFields()},eR=j===e_?null:eP?.logo_url||b.find(e=>"a2a"===e.agent_type)?.logo_url;return(0,t.jsx)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[eR&&p<1&&(0,t.jsx)("img",{src:eR,alt:"Agent",className:"w-6 h-6 object-contain"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Agent"})]}),open:e,onCancel:eE,footer:null,width:900,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)(C.Steps,{current:p,size:"small",className:"mb-8",children:[(0,t.jsx)(eb,{title:"Configure"}),(0,t.jsx)(eb,{title:"Entitlements"}),(0,t.jsx)(eb,{title:"Governance"}),(0,t.jsx)(eb,{title:"Agent Management"}),(0,t.jsx)(eb,{title:"Ready"})]}),(0,t.jsxs)(k.Form,{form:u,layout:"vertical",initialValues:"a2a"===j?{...(o={defaultInputModes:["text"],defaultOutputModes:["text"]},Object.values(K).forEach(e=>{e.fields.forEach(e=>{void 0!==e.defaultValue&&(o[e.name]=e.defaultValue)})}),o),allowed_mcp_servers_and_groups:{servers:[],accessGroups:[]},mcp_tool_permissions:{},entitlement_models:[],entitlement_agents:[],guardrails:[]}:{allowed_mcp_servers_and_groups:{servers:[],accessGroups:[]},mcp_tool_permissions:{},entitlement_models:[],entitlement_agents:[],guardrails:[]},className:"space-y-4",children:[0===p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Agent Type"}),required:!0,tooltip:"Select the type of agent you want to create",children:(0,t.jsx)(N.Select,{value:j,onChange:eO,size:"large",style:{width:"100%"},optionLabelProp:"label",dropdownRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,(0,t.jsx)(F.Divider,{style:{margin:"4px 0"}}),(0,t.jsxs)("div",{className:"px-2 py-1",children:[(0,t.jsx)("div",{className:"text-xs text-gray-400 font-medium mb-1 uppercase tracking-wide px-2",children:"Not listed?"}),(0,t.jsxs)("div",{className:`flex items-center gap-3 px-2 py-2 rounded cursor-pointer transition-colors ${j===e_?"bg-amber-50":"hover:bg-amber-50"}`,onClick:()=>eO(e_),children:[(0,t.jsx)(z.AppstoreOutlined,{className:"text-amber-600 text-lg"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-amber-700",children:"Custom / Other"}),(0,t.jsx)(I.Tag,{color:"orange",style:{fontSize:10,padding:"0 4px"},children:"GENERIC"})]}),(0,t.jsx)("div",{className:"text-xs text-amber-600",children:"For agents that don't follow a standard protocol — just needs a virtual key"})]})]})]})]}),children:b.map(e=>(0,t.jsx)(N.Select.Option,{value:e.agent_type,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("img",{src:e.logo_url||"",alt:"",className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e.agent_type_display_name})]}),children:(0,t.jsxs)("div",{className:"flex items-center gap-3 py-1",children:[(0,t.jsx)("img",{src:e.logo_url||"",alt:e.agent_type_display_name,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium",children:e.agent_type_display_name}),e.description&&(0,t.jsx)("div",{className:"text-xs text-gray-500",children:e.description})]})]})},e.agent_type))})}),(0,t.jsx)("div",{className:"mt-4",children:j===e_?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(k.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter an agent name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. my-custom-agent"})}),(0,t.jsx)(k.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(S.Input.TextArea,{placeholder:"Describe what this agent does…",rows:3})})]}):"a2a"===j?(0,t.jsx)(ep,{showAgentName:!0}):eP?.use_a2a_form_fields?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ep,{showAgentName:!0}),eP.credential_fields.length>0&&(0,t.jsxs)("div",{className:"mt-4 p-4 border border-gray-200 rounded-lg",children:[(0,t.jsxs)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:[eP.agent_type_display_name," Settings"]}),eP.credential_fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:`Please enter ${e.label}`}]:void 0,tooltip:e.tooltip,initialValue:e.default_value,children:"password"===e.field_type?(0,t.jsx)(S.Input.Password,{placeholder:e.placeholder||""}):(0,t.jsx)(S.Input,{placeholder:e.placeholder||""})},e.key))]})]}):eP?(0,t.jsx)(eg,{agentTypeInfo:eP}):null})]}),1===p&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Configure which models, agents, and MCP tools this agent is allowed to use. Leave fields empty to allow all (subject to key/team permissions)."}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allowed Models"}),name:"entitlement_models",tooltip:"Restrict which models this agent can call. Leave empty to allow all.",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:er?"Loading models...":"Select models (leave empty for all)",tokenSeparators:[","],loading:er,showSearch:!0,options:ea.map(e=>({label:(0,B.getModelDisplayName)(e),value:e}))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allowed Agents (Sub-Agents)"}),name:"entitlement_agents",tooltip:"Restrict which other agents this agent can invoke as sub-agents. Leave empty to allow all.",children:(0,t.jsx)(N.Select,{mode:"multiple",style:{width:"100%"},placeholder:ec?"Loading agents...":"Select agents (leave empty for all)",loading:ec,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:en.map(e=>({label:e.agent_name,value:e.agent_id}))})}),(0,t.jsx)(F.Divider,{className:"my-2"}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(E.InfoCircleOutlined,{title:"Select which MCP servers or access groups this agent can access",style:{marginLeft:"4px"}})]}),name:"allowed_mcp_servers_and_groups",initialValue:{servers:[],accessGroups:[]},children:(0,t.jsx)(ey.default,{onChange:e=>u.setFieldValue("allowed_mcp_servers_and_groups",e),value:u.getFieldValue("allowed_mcp_servers_and_groups")||{servers:[],accessGroups:[]},accessToken:a??"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(S.Input,{type:"hidden"})}),(0,t.jsx)(k.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-4",children:(0,t.jsx)(ej.default,{accessToken:a??"",selectedServers:u.getFieldValue("allowed_mcp_servers_and_groups")?.servers??[],toolPermissions:u.getFieldValue("mcp_tool_permissions")??{},onChange:e=>u.setFieldsValue({mcp_tool_permissions:e})})})})]}),2===p&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Tracing"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Require x-litellm-trace-id on calls TO this agent"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Only accept this agent being invoked with a trace-id (e.g. when used as a sub-agent)."})]}),(0,t.jsx)(_.Switch,{checked:eS,onChange:eC})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Require x-litellm-trace-id on calls BY this agent"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Requires LLM/MCP calls made by this agent to include x-litellm-trace-id for session tracking."})]}),(0,t.jsx)(_.Switch,{checked:eT,onChange:e=>{eI(e),e||(eL(null),eM(null))}})]})]})]}),(0,t.jsx)(F.Divider,{className:"my-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Budgets & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4",children:[!eT&&(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg text-sm text-yellow-800",children:'Enable "Require x-litellm-trace-id on calls BY this agent" in Tracing to configure budgets and rate limits.'}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Session Budgets"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Max Iterations"}),(0,t.jsx)(L.InputNumber,{className:"w-full",min:1,placeholder:"e.g. 25",disabled:!eT,value:eF,onChange:e=>eL(e)}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Hard cap on LLM calls per session"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Max Budget Per Session ($)"}),(0,t.jsx)(L.InputNumber,{className:"w-full",min:.01,step:.5,placeholder:"e.g. 5.00",disabled:!eT,value:eA,onChange:e=>eM(e)}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Max spend per trace before returning 429"})]})]}),(0,t.jsx)(F.Divider,{className:"my-2"}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Agent Rate Limits"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Global rate limits applied across all callers of this agent."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"TPM Limit",name:"tpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 100000",disabled:!eT})}),(0,t.jsx)(k.Form.Item,{label:"RPM Limit",name:"rpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 100",disabled:!eT})})]}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700 mt-4",children:"Per-Session Rate Limits"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Rate limits per session (x-litellm-trace-id). Each session gets its own counters."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"Session TPM Limit",name:"session_tpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 10000",disabled:!eT})}),(0,t.jsx)(k.Form.Item,{label:"Session RPM Limit",name:"session_rpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 20",disabled:!eT})})]})]})]}),(0,t.jsx)(F.Divider,{className:"my-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Guardrails"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Apply guardrails to this agent. Selected guardrails will run on all calls made by this agent."}),(0,t.jsx)(k.Form.Item,{name:"guardrails",initialValue:[],children:(0,t.jsx)(ef.default,{accessToken:a??"",value:u.getFieldValue("guardrails")??[],onChange:e=>u.setFieldsValue({guardrails:e})})})]})]}),3===p&&(d=u.getFieldValue("agent_name")||"your-agent",(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-center mb-6",children:(0,t.jsx)(I.Tag,{icon:(0,t.jsx)(D.RobotOutlined,{}),color:"purple",className:"px-3 py-1 text-sm",children:d})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Assign to Team"}),name:"team_id",tooltip:"Optionally assign this agent to a team. The agent and its key will belong to the selected team.",children:(0,t.jsx)($.default,{})}),(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:`p-4 border-2 rounded-lg cursor-pointer transition-colors ${"create_new"===V?"border-indigo-600 bg-indigo-50":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>H("create_new"),children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 flex-1",children:[(0,t.jsx)(T.Radio,{value:"create_new",checked:"create_new"===V,onChange:()=>H("create_new")}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(P.KeyOutlined,{className:"text-indigo-600"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"Create a new key for this agent"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"A dedicated key scoped to this agent."}),"create_new"===V&&(0,t.jsx)("div",{className:"mt-3 space-y-3",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Key Name"}),(0,t.jsx)(S.Input,{value:G,onChange:e=>W(e.target.value),placeholder:"e.g. my-agent-key"})]})})]})]}),(0,t.jsx)(I.Tag,{color:"green",children:"Recommended"})]})}),(0,t.jsx)("div",{className:`p-4 border-2 rounded-lg cursor-pointer transition-colors ${"existing_key"===V?"border-indigo-600 bg-indigo-50":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>H("existing_key"),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(T.Radio,{value:"existing_key",checked:"existing_key"===V,onChange:()=>H("existing_key")}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(P.KeyOutlined,{className:"text-gray-500"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"Assign an existing key"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Re-assign a key you already have to this agent."}),"existing_key"===V&&(0,t.jsx)("div",{className:"mt-3",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(N.Select,{showSearch:!0,style:{width:"100%"},placeholder:"Search by key name…",loading:et,value:Z,onChange:e=>ee(e),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:J.map(e=>({label:e.key_alias||e.token?.slice(0,12)+"…",value:e.token}))})})]})]})})]}),(0,t.jsx)("div",{className:"text-center mt-4",children:(0,t.jsx)("button",{type:"button",className:"text-sm text-gray-500 underline hover:text-gray-700",onClick:()=>H("skip"),children:"Skip for now — I'll assign a key later"})})]})),4===p&&(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)(M.CheckCircleFilled,{className:"text-5xl text-green-500 mb-4",style:{fontSize:48}}),(0,t.jsx)("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Agent Created!"}),(0,t.jsx)("div",{className:"flex justify-center mb-4",children:(0,t.jsx)(I.Tag,{icon:(0,t.jsx)(D.RobotOutlined,{}),color:"purple",className:"px-3 py-1 text-sm",children:eu})}),ev&&(0,t.jsx)("div",{className:"mt-4 text-left max-w-md mx-auto",children:(0,t.jsx)(O.default,{apiKey:ev})}),ek&&(0,t.jsxs)("p",{className:"text-sm text-gray-600 mt-2",children:["Key ",(0,t.jsx)("span",{className:"font-medium",children:ek})," has been assigned to this agent."]}),!ev&&!ek&&"skip"===V&&(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"No key assigned. You can create one from the Virtual Keys page."})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-6 border-t border-gray-100 mt-6",children:[(0,t.jsx)("div",{children:p>0&&p<4&&(0,t.jsx)("button",{type:"button",onClick:()=>{x(e=>Math.max(0,e-1))},className:"text-sm text-gray-600 border border-gray-300 rounded px-4 py-2 hover:bg-gray-50",children:"← Back"})}),(0,t.jsxs)("div",{className:"flex gap-3",children:[p<4&&(0,t.jsx)(n.Button,{variant:"secondary",onClick:eE,children:"Cancel"}),0===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),1===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),2===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),3===p&&(0,t.jsx)(n.Button,{variant:"primary",loading:h,onClick:ez,children:h?"Creating...":"Create Agent →"}),4===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eE,children:"Done"})]})]})]})})};var ew=e.i(708347),ek=e.i(629569),eN=e.i(197647),eS=e.i(653824),eC=e.i(881073),eT=e.i(404206),eI=e.i(723731),eF=e.i(482725),eL=e.i(869216),eA=e.i(530212);let eM=({agent:e})=>{let s=e.litellm_params;return s?.cost_per_query===void 0&&s?.input_cost_per_token===void 0&&s?.output_cost_per_token===void 0?null:(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ek.Title,{children:"Cost Configuration"}),(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:[void 0!==s.cost_per_query&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Cost Per Query",children:["$",s.cost_per_query]}),void 0!==s.input_cost_per_token&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Input Cost Per Token",children:["$",s.input_cost_per_token]}),void 0!==s.output_cost_per_token&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Output Cost Per Token",children:["$",s.output_cost_per_token]})]})]})},eP=e=>{let t=e.litellm_params?.model||"",s=e.litellm_params?.custom_llm_provider;return"langgraph"===s?"langgraph":"azure_ai"===s?"azure_ai_foundry":"bedrock"===s?"bedrock_agentcore":t.startsWith("langgraph/")?"langgraph":t.startsWith("azure_ai/agents/")?"azure_ai_foundry":t.startsWith("bedrock/agentcore/")?"bedrock_agentcore":"a2a"},eD=(e,t)=>{let s={agent_name:e.agent_name,description:e.agent_card_params?.description||""};for(let a of t.credential_fields)if(!1!==a.include_in_litellm_params)s[a.key]=e.litellm_params?.[a.key]||a.default_value||"";else if(t.model_template&&e.litellm_params?.model){let l=e.litellm_params.model,r=t.model_template.split("/"),i=l.split("/");r.forEach((e,t)=>{e===`{${a.key}}`&&i[t]&&(s[a.key]=i[t])})}return s.cost_per_query=e.litellm_params?.cost_per_query,s.input_cost_per_token=e.litellm_params?.input_cost_per_token,s.output_cost_per_token=e.litellm_params?.output_cost_per_token,s},ez=({agentId:e,onClose:s,accessToken:a,isAdmin:l})=>{let[r,d]=(0,i.useState)(null),[c,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(!1),[y]=k.Form.useForm(),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)("a2a");(0,i.useEffect)(()=>{(async()=>{try{let e=await (0,w.getAgentCreateMetadata)();f(e)}catch(e){console.error("Error fetching agent metadata:",e)}})()},[]),(0,i.useEffect)(()=>{v()},[e,a]);let v=async()=>{if(a){m(!0);try{let t=await (0,w.getAgentInfo)(a,e);d(t);let s=eP(t);if(_(s),"a2a"===s)y.setFieldsValue(ec(t));else{let e=j.find(e=>e.agent_type===s);e?y.setFieldsValue(eD(t,e)):y.setFieldsValue(ec(t))}}catch(e){console.error("Error fetching agent info:",e),A.default.error("Failed to load agent information")}finally{m(!1)}}};(0,i.useEffect)(()=>{if(r&&j.length>0){let e=eP(r);if("a2a"!==e){let t=j.find(t=>t.agent_type===e);t&&y.setFieldsValue(eD(r,t))}}},[j,r]);let N=j.find(e=>e.agent_type===b),C=async t=>{if(a&&r){h(!0);try{let s;"a2a"===b?s=ed(t,r):N?(s=eh(t,N)).agent_name=t.agent_name:s=ed(t,r),await (0,w.patchAgentCall)(a,e,s),A.default.success("Agent updated successfully"),p(!1),v()}catch(e){console.error("Error updating agent:",e),A.default.error("Failed to update agent")}finally{h(!1)}}};if(c)return(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!r)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"text-center",children:"Agent not found"}),(0,t.jsx)(n.Button,{onClick:s,className:"mt-4",children:"Back to Agents List"})]});let T=e=>e?new Date(e).toLocaleString():"-";return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eA.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Agents"}),(0,t.jsx)(ek.Title,{children:r.agent_name||"Unnamed Agent"}),(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:r.agent_id})]}),(0,t.jsxs)(eS.TabGroup,{children:[(0,t.jsxs)(eC.TabList,{className:"mb-4",children:[(0,t.jsx)(eN.Tab,{children:"Overview"},"overview"),l?(0,t.jsx)(eN.Tab,{children:"Settings"},"settings"):(0,t.jsx)(t.Fragment,{})]}),(0,t.jsxs)(eI.TabPanels,{children:[(0,t.jsxs)(eT.TabPanel,{children:[(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Agent ID",children:r.agent_id}),(0,t.jsx)(eL.Descriptions.Item,{label:"Agent Name",children:r.agent_name}),(0,t.jsx)(eL.Descriptions.Item,{label:"Display Name",children:r.agent_card_params?.name||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:r.agent_card_params?.description||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"URL",children:r.agent_card_params?.url||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Version",children:r.agent_card_params?.version||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Protocol Version",children:r.agent_card_params?.protocolVersion||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Streaming",children:r.agent_card_params?.capabilities?.streaming?"Yes":"No"}),r.agent_card_params?.capabilities?.pushNotifications&&(0,t.jsx)(eL.Descriptions.Item,{label:"Push Notifications",children:"Yes"}),r.agent_card_params?.capabilities?.stateTransitionHistory&&(0,t.jsx)(eL.Descriptions.Item,{label:"State Transition History",children:"Yes"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Skills",children:[r.agent_card_params?.skills?.length||0," configured"]}),r.litellm_params?.model&&(0,t.jsx)(eL.Descriptions.Item,{label:"Model",children:r.litellm_params.model}),r.litellm_params?.make_public!==void 0&&(0,t.jsx)(eL.Descriptions.Item,{label:"Make Public",children:r.litellm_params.make_public?"Yes":"No"}),r.agent_card_params?.iconUrl&&(0,t.jsx)(eL.Descriptions.Item,{label:"Icon URL",children:r.agent_card_params.iconUrl}),r.agent_card_params?.documentationUrl&&(0,t.jsx)(eL.Descriptions.Item,{label:"Documentation URL",children:r.agent_card_params.documentationUrl}),(0,t.jsx)(eL.Descriptions.Item,{label:"TPM Limit",children:r.tpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"RPM Limit",children:r.rpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Session TPM Limit",children:r.session_tpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Session RPM Limit",children:r.session_rpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Created At",children:T(r.created_at)}),(0,t.jsx)(eL.Descriptions.Item,{label:"Updated At",children:T(r.updated_at)})]}),r.object_permission&&(r.object_permission.mcp_servers?.length||r.object_permission.mcp_access_groups?.length||r.object_permission.mcp_tool_permissions&&Object.keys(r.object_permission.mcp_tool_permissions).length>0)&&(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ek.Title,{children:"MCP Tool Permissions"}),(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:[r.object_permission.mcp_servers&&r.object_permission.mcp_servers.length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"MCP Servers",children:r.object_permission.mcp_servers.join(", ")}),r.object_permission.mcp_access_groups&&r.object_permission.mcp_access_groups.length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"MCP Access Groups",children:r.object_permission.mcp_access_groups.join(", ")}),r.object_permission.mcp_tool_permissions&&Object.keys(r.object_permission.mcp_tool_permissions).length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"Tool permissions per server",children:(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(r.object_permission.mcp_tool_permissions).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"font-medium",children:[e,":"]})," ",Array.isArray(s)?s.join(", "):String(s)]},e))})})]})]}),(0,t.jsx)(eM,{agent:r}),r.agent_card_params?.skills&&r.agent_card_params.skills.length>0&&(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ek.Title,{children:"Skills"}),(0,t.jsx)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:r.agent_card_params.skills.map((e,s)=>(0,t.jsx)(eL.Descriptions.Item,{label:e.name||`Skill ${s+1}`,children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"ID:"})," ",e.id]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Description:"})," ",e.description]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Tags:"})," ",Array.isArray(e.tags)?e.tags.join(", "):e.tags]}),e.examples&&e.examples.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Examples:"})," ",Array.isArray(e.examples)?e.examples.join(", "):e.examples]})]})},s))})]})]}),l&&(0,t.jsx)(eT.TabPanel,{children:(0,t.jsxs)(o.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(ek.Title,{children:"Agent Settings"}),!u&&(0,t.jsx)(n.Button,{onClick:()=>p(!0),children:"Edit Settings"})]}),u?(0,t.jsxs)(k.Form,{form:y,layout:"vertical",onFinish:C,children:[(0,t.jsx)(k.Form.Item,{label:"Agent ID",children:(0,t.jsx)(S.Input,{value:r.agent_id,disabled:!0})}),"a2a"===b?(0,t.jsx)(ep,{showAgentName:!0}):N?(0,t.jsx)(eg,{agentTypeInfo:N}):(0,t.jsx)(ep,{showAgentName:!0}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(ek.Title,{className:"mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})}),(0,t.jsx)(k.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"Session TPM Limit",name:"session_tpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})}),(0,t.jsx)(k.Form.Item,{label:"Session RPM Limit",name:"session_rpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,t.jsx)(V.Button,{onClick:()=>{p(!1),v()},children:"Cancel"}),(0,t.jsx)(n.Button,{loading:x,children:"Save Changes"})]})]}):(0,t.jsx)(g.Text,{children:'Click "Edit Settings" to modify agent configuration.'})]})})]})]})]})};var eE=e.i(727749),eO=e.i(500330),eR=e.i(902555);let eB=({accessToken:e,userRole:s,teams:a})=>{let[l,r]=(0,i.useState)([]),[k,N]=(0,i.useState)({}),[S,C]=(0,i.useState)(!1),[T,I]=(0,i.useState)(!1),[F,L]=(0,i.useState)(!1),[A,M]=(0,i.useState)(null),[P,D]=(0,i.useState)(null),[z,E]=(0,i.useState)(!1),O=!!s&&(0,ew.isAdminRole)(s),R=async t=>{if(e){I(!0);try{let s=await (0,w.getAgentsList)(e,t??z);r(s.agents||[])}catch(e){console.error("Error fetching agents:",e)}finally{I(!1)}}},B=async()=>{if(e)try{let{keys:t=[]}=await (0,w.keyListCall)(e,null,null,null,null,null,1,500),s={};for(let e of t){let t=e.agent_id;t&&!s[t]&&(s[t]={has_key:!0,key_alias:e.key_alias,token_prefix:e.token?`${e.token.slice(0,8)}…`:void 0})}N(s)}catch(e){console.error("Error fetching keys for agents:",e)}};(0,i.useEffect)(()=>{R()},[e]),(0,i.useEffect)(()=>{e&&l.length>0?B():0===l.length&&N({})},[e,l.length]);let $=async()=>{if(A&&e){L(!0);try{await (0,w.deleteAgentCall)(e,A.id),eE.default.success(`Agent "${A.name}" deleted successfully`),R()}catch(e){console.error("Error deleting agent:",e),eE.default.fromBackend("Failed to delete agent")}finally{L(!1),M(null)}}},q=[...l].sort((e,t)=>{let s=e.created_at?new Date(e.created_at).getTime():0;return(t.created_at?new Date(t.created_at).getTime():0)-s}),U=O?7:6;return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Agents"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"List of A2A-spec agents that are available to be used in your organization. Go to AI Hub, to make agents public."}),(0,t.jsx)(j.Alert,{message:"Why do agents need keys?",description:"Keys scope access to an agent and allow it to call MCP tools. Assign a key when creating an agent or from the Virtual Keys page.",type:"info",showIcon:!0,className:"mb-3"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-4",children:[O&&(0,t.jsx)(n.Button,{onClick:()=>{P&&D(null),C(!0)},disabled:!e,children:"+ Add New Agent"}),(0,t.jsx)(f.Tooltip,{title:"When enabled, only agents with reachable URLs are shown",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(v.CheckCircleOutlined,{className:z?"text-green-500":"text-gray-400"}),(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"Health Check"}),(0,t.jsx)(_.Switch,{size:"small",checked:z,onChange:e=>{E(e),R(e)},loading:T&&z})]})})]})]}),P?(0,t.jsx)(ez,{agentId:P,onClose:()=>D(null),accessToken:e,isAdmin:O}):(0,t.jsx)(o.Card,{children:T?(0,t.jsx)(b.Skeleton,{active:!0,paragraph:{rows:3}}):(0,t.jsxs)(d.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Agent Name"}),(0,t.jsx)(p.TableHeaderCell,{children:"Agent ID"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend (USD)"}),(0,t.jsx)(p.TableHeaderCell,{children:"Model"}),(0,t.jsx)(p.TableHeaderCell,{children:"Created"}),(0,t.jsx)(p.TableHeaderCell,{children:"Status"}),O&&(0,t.jsx)(p.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(c.TableBody,{children:0===q.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:U,children:(0,t.jsx)(g.Text,{className:"text-center",children:'No agents found. Click "+ Add New Agent" to create one.'})})}):q.map(e=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:e.agent_name})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(f.Tooltip,{title:e.agent_id,children:(0,t.jsxs)(n.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>D(e.agent_id),children:[e.agent_id.slice(0,7),"..."]})})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:(0,eO.formatNumberWithCommas)(e.spend,4)})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(h.Badge,{size:"xs",color:"blue",children:e.litellm_params?.model||"N/A"})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"})}),(0,t.jsx)(m.TableCell,{children:k[e.agent_id]?.has_key?(0,t.jsx)(h.Badge,{color:"green",children:"Active"}):(0,t.jsx)(h.Badge,{color:"yellow",children:"Needs Setup"})}),O&&(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(eR.default,{variant:"Delete",onClick:()=>{M({id:e.agent_id,name:e.agent_name})}})})]},e.agent_id))})]})}),(0,t.jsx)(ev,{visible:S,onClose:()=>{C(!1)},accessToken:e,onSuccess:()=>{R()},teams:a}),A&&(0,t.jsxs)(y.Modal,{title:"Delete Agent",open:null!==A,onOk:$,onCancel:()=>{M(null)},confirmLoading:F,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete agent: ",A.name,"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var e$=e.i(646050),eq=e.i(559061),eU=e.i(704308),eV=e.i(785242),eH=e.i(936578),eG=e.i(677667),eK=e.i(898667),eW=e.i(130643),eQ=e.i(779241),eY=e.i(752978),eJ=e.i(68155),eX=e.i(591935);let eZ=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))});var e0=e.i(836991);function e1({data:e,columns:s,isLoading:a=!1,loadingMessage:l="Loading...",emptyMessage:r="No data",getRowKey:i}){return(0,t.jsxs)(d.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsx)(x.TableRow,{children:s.map((e,s)=>(0,t.jsx)(p.TableHeaderCell,{style:{width:e.width},children:e.header},s))})}),(0,t.jsx)(c.TableBody,{children:a?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:s.length,className:"text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:l})})}):e.length>0?e.map((e,a)=>(0,t.jsx)(x.TableRow,{children:s.map((s,a)=>(0,t.jsx)(m.TableCell,{children:s.cell?s.cell(e):String(e[s.accessor]??"")},a))},i?i(e,a):a)):(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:s.length,className:"text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:r})})})})]})}var e2=e.i(916925);let e4=e=>{let t=Object.keys(e2.provider_map).find(t=>e2.provider_map[t]===e);if(t){let e=e2.Providers[t],s=e2.providerLogoMap[e];return{displayName:e,logo:s,enumKey:t}}return{displayName:e,logo:"",enumKey:null}},e5=e=>e2.provider_map[e]||null,e6=(e,t)=>{let s=e.target,a=s.parentElement;if(a){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=t.charAt(0),a.replaceChild(e,s)}},e3=({discountConfig:e,onDiscountChange:s,onRemoveProvider:a})=>{let[l,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(""),d=e=>{let t=parseFloat(n);!isNaN(t)&&t>=0&&t<=100&&s(e,(t/100).toString()),r(null),o("")},c=()=>{r(null),o("")},m=Object.entries(e).map(([e,t])=>({provider:e,discount:t})).sort((e,t)=>{let s=e4(e.provider).displayName,a=e4(t.provider).displayName;return s.localeCompare(a)});return(0,t.jsx)(e1,{data:m,columns:[{header:"Provider",cell:e=>{let{displayName:s,logo:a}=e4(e.provider);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,s)}),(0,t.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Discount Percentage",cell:e=>(0,t.jsx)("div",{className:"flex items-center gap-2",children:l===e.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eQ.TextInput,{value:n,onValueChange:o,onKeyDown:t=>{var s;return s=e.provider,void("Enter"===t.key?d(s):"Escape"===t.key&&c())},placeholder:"5",className:"w-20",autoFocus:!0}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"}),(0,t.jsx)(eY.Icon,{icon:eZ,size:"sm",onClick:()=>d(e.provider),className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,t.jsx)(eY.Icon,{icon:e0.XIcon,size:"sm",onClick:c,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(g.Text,{className:"font-medium",children:[(100*e.discount).toFixed(1),"%"]}),(0,t.jsx)(eY.Icon,{icon:eX.PencilAltIcon,size:"sm",onClick:()=>{var t,s;return t=e.provider,s=e.discount,void(r(t),o((100*s).toString()))},className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"250px"},{header:"Actions",cell:e=>{let{displayName:s}=e4(e.provider);return(0,t.jsx)(eY.Icon,{icon:eJ.TrashIcon,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider discounts configured"})},e8=({discountConfig:e,selectedProvider:s,newDiscount:a,onProviderChange:l,onDiscountChange:r,onAddProvider:i})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,t.jsx)(f.Tooltip,{title:"Select the LLM provider you want to configure a discount for",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Select provider",value:s,onChange:l,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),children:Object.entries(e2.Providers).map(([s,a])=>{let l=e2.provider_map[s];return l&&e[l]?null:(0,t.jsx)(N.Select.Option,{value:s,label:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:e2.providerLogoMap[a],alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,a)}),(0,t.jsx)("span",{children:a})]})},s)})})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Discount Percentage",(0,t.jsx)(f.Tooltip,{title:"Enter a percentage value (e.g., 5 for 5% discount)",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a discount percentage"}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{placeholder:"5",value:a,onValueChange:r,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,t.jsx)(n.Button,{variant:"primary",onClick:i,disabled:!s||!a,children:"Add Provider Discount"})})]}),e7=({marginConfig:e,onMarginChange:s,onRemoveProvider:a})=>{let[l,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(""),[d,c]=(0,i.useState)(""),m=()=>{r(null),o(""),c("")},u=Object.entries(e).map(([e,t])=>({provider:e,margin:t})).sort((e,t)=>{if("global"===e.provider)return -1;if("global"===t.provider)return 1;let s=e4(e.provider).displayName,a=e4(t.provider).displayName;return s.localeCompare(a)});return(0,t.jsx)(e1,{data:u,columns:[{header:"Provider",cell:e=>{if("global"===e.provider)return(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsx)("span",{className:"font-medium",children:"Global (All Providers)"})});let{displayName:s,logo:a}=e4(e.provider);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,s)}),(0,t.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Margin",cell:e=>(0,t.jsx)("div",{className:"flex items-center gap-2",children:l===e.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{value:n,onValueChange:o,placeholder:"10",className:"w-20",autoFocus:!0}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"}),(0,t.jsx)("span",{className:"text-gray-400",children:"+"}),(0,t.jsx)("span",{className:"text-gray-600",children:"$"}),(0,t.jsx)(eQ.TextInput,{value:d,onValueChange:c,placeholder:"0.001",className:"w-24"})]}),(0,t.jsx)(eY.Icon,{icon:eZ,size:"sm",onClick:()=>{var t;let a,l;return t=e.provider,a=n?parseFloat(n):void 0,l=d?parseFloat(d):void 0,void(void 0!==a&&!isNaN(a)&&a>=0&&a<=1e3?void 0!==l&&!isNaN(l)&&l>=0?s(t,{percentage:a/100,fixed_amount:l}):s(t,a/100):void 0!==l&&!isNaN(l)&&l>=0&&s(t,{fixed_amount:l}),r(null),o(""),c(""))},className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,t.jsx)(eY.Icon,{icon:e0.XIcon,size:"sm",onClick:m,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Text,{className:"font-medium",children:(e=>{if("number"==typeof e)return`${(100*e).toFixed(1)}%`;let t=[];return void 0!==e.percentage&&t.push(`${(100*e.percentage).toFixed(1)}%`),void 0!==e.fixed_amount&&t.push(`$${e.fixed_amount.toFixed(6)}`),t.join(" + ")||"0%"})(e.margin)}),(0,t.jsx)(eY.Icon,{icon:eX.PencilAltIcon,size:"sm",onClick:()=>{var t,s;return t=e.provider,s=e.margin,void(r(t),"number"==typeof s?(o((100*s).toString()),c("")):(o(s.percentage?(100*s.percentage).toString():""),c(s.fixed_amount?s.fixed_amount.toString():"")))},className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"350px"},{header:"Actions",cell:e=>{let s="global"===e.provider?"Global":e4(e.provider).displayName;return(0,t.jsx)(eY.Icon,{icon:eJ.TrashIcon,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider margins configured"})},e9=({marginConfig:e,selectedProvider:s,marginType:a,percentageValue:l,fixedAmountValue:r,onProviderChange:i,onMarginTypeChange:o,onPercentageChange:d,onFixedAmountChange:c,onAddProvider:m})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,t.jsx)(f.Tooltip,{title:"Select 'Global' to apply margin to all providers, or select a specific provider",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,t.jsxs)(N.Select,{showSearch:!0,placeholder:"Select provider or 'Global'",value:s,onChange:i,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),children:[(0,t.jsx)(N.Select.Option,{value:"global",label:"Global (All Providers)",children:(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsx)("span",{className:"font-medium",children:"Global (All Providers)"})})},"global"),Object.entries(e2.Providers).map(([s,a])=>{let l=e2.provider_map[s];return l&&e[l]?null:(0,t.jsx)(N.Select.Option,{value:s,label:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:e2.providerLogoMap[a],alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,a)}),(0,t.jsx)("span",{children:a})]})},s)})]})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Margin Type",(0,t.jsx)(f.Tooltip,{title:"Choose how to apply the margin: percentage-based or fixed amount",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a margin type"}],children:(0,t.jsxs)(T.Radio.Group,{value:a,onChange:e=>o(e.target.value),className:"w-full",children:[(0,t.jsx)(T.Radio,{value:"percentage",children:"Percentage-based"}),(0,t.jsx)(T.Radio,{value:"fixed",children:"Fixed Amount"})]})}),"percentage"===a&&(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Margin Percentage",(0,t.jsx)(f.Tooltip,{title:"Enter a percentage value (e.g., 10 for 10% margin)",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a margin percentage"},{validator:(e,t)=>{if(!t)return Promise.reject(Error("Please enter a margin percentage"));let s=parseFloat(t);return isNaN(s)||s<0||s>1e3?Promise.reject(Error("Percentage must be between 0 and 1000")):Promise.resolve()}}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{placeholder:"10",value:l,onValueChange:d,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"})]})}),"fixed"===a&&(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Fixed Margin Amount",(0,t.jsx)(f.Tooltip,{title:"Enter a fixed amount in USD (e.g., 0.001 for $0.001 per request)",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a fixed amount"},{validator:(e,t)=>{if(!t)return Promise.reject(Error("Please enter a fixed amount"));let s=parseFloat(t);return isNaN(s)||s<0?Promise.reject(Error("Fixed amount must be non-negative")):Promise.resolve()}}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"$"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.001",value:r,onValueChange:c,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,t.jsx)(n.Button,{variant:"primary",onClick:m,disabled:!s||"percentage"===a&&!l||"fixed"===a&&!r,children:"Add Provider Margin"})})]});var te=e.i(291542),tt=e.i(955135),ts=e.i(175712);e.i(247167),e.i(62664);var ta=e.i(697539),tl=e.i(963188),tr=e.i(763731),ti=e.i(343794),tn=e.i(244009),to=e.i(242064),td=e.i(185793);let tc=e=>{let t,{value:s,formatter:a,precision:l,decimalSeparator:r,groupSeparator:n="",prefixCls:o}=e;if("function"==typeof a)t=a(s);else{let e=String(s),a=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(a&&"-"!==e){let e=a[1],s=a[2]||"0",d=a[4]||"";s=s.replace(/\B(?=(\d{3})+(?!\d))/g,n),"number"==typeof l&&(d=d.padEnd(l,"0").slice(0,l>0?l:0)),d&&(d=`${r}${d}`),t=[i.createElement("span",{key:"int",className:`${o}-content-value-int`},e,s),d&&i.createElement("span",{key:"decimal",className:`${o}-content-value-decimal`},d)]}else t=e}return i.createElement("span",{className:`${o}-content-value`},t)};var tm=e.i(183293),tu=e.i(246422),tp=e.i(838378);let tx=(0,tu.genStyleHooks)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:s,padding:a,colorTextDescription:l,titleFontSize:r,colorTextHeading:i,contentFontSize:n,fontFamily:o}=e;return{[t]:Object.assign(Object.assign({},(0,tm.resetComponent)(e)),{[`${t}-title`]:{marginBottom:s,color:l,fontSize:r},[`${t}-skeleton`]:{paddingTop:a},[`${t}-content`]:{color:i,fontSize:n,fontFamily:o,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:s},[`${t}-content-suffix`]:{marginInlineStart:s}}})}})((0,tp.mergeToken)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:s}=e;return{titleFontSize:s,contentFontSize:t}});var th=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[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])&&(s[a[l]]=e[a[l]]);return s};let tg=i.forwardRef((e,t)=>{let{prefixCls:s,className:a,rootClassName:l,style:r,valueStyle:n,value:o=0,title:d,valueRender:c,prefix:m,suffix:u,loading:p=!1,formatter:x,precision:h,decimalSeparator:g=".",groupSeparator:y=",",onMouseEnter:j,onMouseLeave:f}=e,b=th(e,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:_,direction:v,className:w,style:k}=(0,to.useComponentConfig)("statistic"),N=_("statistic",s),[S,C,T]=tx(N),I=i.createElement(tc,{decimalSeparator:g,groupSeparator:y,prefixCls:N,formatter:x,precision:h,value:o}),F=(0,ti.default)(N,{[`${N}-rtl`]:"rtl"===v},w,a,l,C,T),L=i.useRef(null);i.useImperativeHandle(t,()=>({nativeElement:L.current}));let A=(0,tn.default)(b,{aria:!0,data:!0});return S(i.createElement("div",Object.assign({},A,{ref:L,className:F,style:Object.assign(Object.assign({},k),r),onMouseEnter:j,onMouseLeave:f}),d&&i.createElement("div",{className:`${N}-title`},d),i.createElement(td.default,{paragraph:!1,loading:p,className:`${N}-skeleton`,active:!0},i.createElement("div",{style:n,className:`${N}-content`},m&&i.createElement("span",{className:`${N}-content-prefix`},m),c?c(I):I,u&&i.createElement("span",{className:`${N}-content-suffix`},u)))))}),ty=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];var tj=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[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])&&(s[a[l]]=e[a[l]]);return s};let tf=e=>{let{value:t,format:s="HH:mm:ss",onChange:a,onFinish:l,type:r}=e,n=tj(e,["value","format","onChange","onFinish","type"]),o="countdown"===r,[d,c]=i.useState(null),m=(0,ta.useEvent)(()=>{let e=Date.now(),s=new Date(t).getTime();return c({}),null==a||a(o?s-e:e-s),!o||!(s{let e,t=()=>{e=(0,tl.default)(()=>{m()&&t()})};return t(),()=>tl.default.cancel(e)},[t,o]),i.useEffect(()=>{c({})},[]),i.createElement(tg,Object.assign({},n,{value:t,valueRender:e=>(0,tr.cloneElement)(e,{title:void 0}),formatter:(e,t)=>d?function(e,t,s){let a,l,r,i,n,o,{format:d=""}=t,c=new Date(e).getTime(),m=Date.now();return a=s?Math.max(c-m,0):Math.max(m-c,0),l=/\[[^\]]*]/g,r=(d.match(l)||[]).map(e=>e.slice(1,-1)),i=d.replace(l,"[]"),n=ty.reduce((e,[t,s])=>{if(e.includes(t)){let l=Math.floor(a/s);return a-=l*s,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return l.toString().padStart(t,"0")})}return e},i),o=0,n.replace(l,()=>{let e=r[o];return o+=1,e})}(e,Object.assign(Object.assign({},t),{format:s}),o):"-"}))},tb=i.memo(e=>i.createElement(tf,Object.assign({},e,{type:"countdown"})));tg.Timer=tf,tg.Countdown=tb;var t_=e.i(621192),tv=e.i(178654),tw=e.i(56456),tk=e.i(755151),tN=e.i(240647),tS=e.i(737434),tC=e.i(91500),tT=e.i(931067);let tI={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 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"}}]},name:"file-excel",theme:"outlined"};var tF=e.i(9583),tL=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:tI}))});let tA=e=>null==e?"-":0===e?"$0.00":e<.01?`$${e.toFixed(6)}`:e<1?`$${e.toFixed(4)}`:`$${(0,eO.formatNumberWithCommas)(e,2)}`,tM=e=>null==e?"-":(0,eO.formatNumberWithCommas)(e,0),tP=({multiResult:e})=>{let[s,a]=(0,i.useState)(!1),l=(0,i.useRef)(null),r=e.entries.some(e=>null!==e.result);return((0,i.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&a(!1)};return s&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[s]),r)?(0,t.jsxs)("div",{className:"relative inline-block",ref:l,children:[(0,t.jsx)(n.Button,{size:"xs",variant:"secondary",icon:tS.DownloadOutlined,onClick:()=>a(!s),children:"Export"}),s&&(0,t.jsxs)("div",{className:"absolute right-0 mt-1 w-44 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:[(0,t.jsxs)("button",{className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>{(e=>{let t=window.open("","_blank");if(!t)return alert("Please allow popups to export PDF");let s=e.entries.filter(e=>null!==e.result),a=s.length,l=` - - - - Multi-Model Cost Estimate Report - - - -

LLM Cost Estimate Report

-

${a} model${1!==a?"s":""} configured

- -
-

Combined Totals

-
-
-
Total Per Request
-
${tA(e.totals.cost_per_request)}
-
-
-
Total Daily
-
${tA(e.totals.daily_cost)}
-
-
-
Total Monthly
-
${tA(e.totals.monthly_cost)}
-
-
- ${e.totals.margin_per_request>0?` -
-
-
Margin/Request
-
${tA(e.totals.margin_per_request)}
-
-
-
Daily Margin
-
${tA(e.totals.daily_margin)}
-
-
-
Monthly Margin
-
${tA(e.totals.monthly_margin)}
-
-
- `:""} -
- -

Model Breakdown

- ${s.map(e=>{let t;return t=e.result,` -
-

${t.model} ${t.provider?`(${t.provider})`:""}

- -
-

Input Tokens per Request: ${tM(t.input_tokens)}

-

Output Tokens per Request: ${tM(t.output_tokens)}

- ${t.num_requests_per_day?`

Requests per Day: ${tM(t.num_requests_per_day)}

`:""} - ${t.num_requests_per_month?`

Requests per Month: ${tM(t.num_requests_per_month)}

`:""} -
- - - - - - ${null!==t.daily_cost?"":""} - ${null!==t.monthly_cost?"":""} - - - - - ${null!==t.daily_cost?``:""} - ${null!==t.monthly_cost?``:""} - - - - - ${null!==t.daily_cost?``:""} - ${null!==t.monthly_cost?``:""} - - - - - ${null!==t.daily_cost?``:""} - ${null!==t.monthly_cost?``:""} - - - - - ${null!==t.daily_cost?``:""} - ${null!==t.monthly_cost?``:""} - -
Cost TypePer RequestDailyMonthly
Input Cost${tA(t.input_cost_per_request)}${tA(t.daily_input_cost)}${tA(t.monthly_input_cost)}
Output Cost${tA(t.output_cost_per_request)}${tA(t.daily_output_cost)}${tA(t.monthly_output_cost)}
Margin/Fee${tA(t.margin_cost_per_request)}${tA(t.daily_margin_cost)}${tA(t.monthly_margin_cost)}
Total${tA(t.cost_per_request)}${tA(t.daily_cost)}${tA(t.monthly_cost)}
-
- `}).join("")} - - - - - `;t.document.write(l),t.document.close(),t.onload=()=>{t.print()}})(e),a(!1)},children:[(0,t.jsx)(tC.FilePdfOutlined,{className:"mr-3 text-red-500"}),"Export as PDF"]}),(0,t.jsxs)("button",{className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>{(e=>{let t=e.entries.filter(e=>null!==e.result),s=[["LLM Multi-Model Cost Estimate Report"],["Generated",new Date().toLocaleString()],[""]];for(let a of(s.push(["COMBINED TOTALS"],["Total Per Request",e.totals.cost_per_request.toString()],["Total Daily",e.totals.daily_cost?.toString()||"-"],["Total Monthly",e.totals.monthly_cost?.toString()||"-"],["Margin Per Request",e.totals.margin_per_request.toString()],["Daily Margin",e.totals.daily_margin?.toString()||"-"],["Monthly Margin",e.totals.monthly_margin?.toString()||"-"],[""]),s.push(["Model","Provider","Input Tokens","Output Tokens","Requests/Day","Requests/Month","Cost/Request","Daily Cost","Monthly Cost","Input Cost/Req","Output Cost/Req","Margin/Req"]),t)){let e=a.result;s.push([e.model,e.provider||"-",e.input_tokens.toString(),e.output_tokens.toString(),e.num_requests_per_day?.toString()||"-",e.num_requests_per_month?.toString()||"-",e.cost_per_request.toString(),e.daily_cost?.toString()||"-",e.monthly_cost?.toString()||"-",e.input_cost_per_request.toString(),e.output_cost_per_request.toString(),e.margin_cost_per_request.toString()])}let a=new Blob([s.map(e=>e.map(e=>`"${e}"`).join(",")).join("\n")],{type:"text/csv;charset=utf-8;"}),l=window.URL.createObjectURL(a),r=document.createElement("a");r.href=l,r.download=`cost_estimate_multi_model_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(l)})(e),a(!1)},children:[(0,t.jsx)(tL,{className:"mr-3 text-green-600"}),"Export as CSV"]})]})]}):null},tD=e=>null==e?"-":0===e?"$0":e<1e-4?`$${e.toExponential(2)}`:e<1?`$${e.toFixed(4)}`:`$${(0,eO.formatNumberWithCommas)(e,2,!0)}`,tz=({result:e,loading:s,timePeriod:a})=>{let l="day"===a?"Daily":"Monthly",r="day"===a?e.daily_cost:e.monthly_cost,i="day"===a?e.daily_input_cost:e.monthly_input_cost,n="day"===a?e.daily_output_cost:e.monthly_output_cost,o="day"===a?e.daily_margin_cost:e.monthly_margin_cost,d="day"===a?e.num_requests_per_day:e.num_requests_per_month;return(0,t.jsxs)("div",{className:"space-y-3 bg-gray-50 p-4 rounded-lg",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-500 text-sm",children:[(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}),(0,t.jsx)("span",{children:"Updating..."})]}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Total/Request"}),(0,t.jsx)(g.Text,{className:"text-base font-semibold text-blue-600",children:tD(e.cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Input Cost"}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(e.input_cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Output Cost"}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(e.output_cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Margin Fee"}),(0,t.jsx)(g.Text,{className:`text-sm ${e.margin_cost_per_request>0?"text-amber-600":""}`,children:tD(e.margin_cost_per_request)})]})]}),null!==r&&(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 pt-2 border-t border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Total (",null==d?"-":(0,eO.formatNumberWithCommas)(d,0,!0)," req)"]}),(0,t.jsx)(g.Text,{className:`text-base font-semibold ${"day"===a?"text-green-600":"text-purple-600"}`,children:tD(r)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Input"]}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(i)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Output"]}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(n)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Margin Fee"]}),(0,t.jsx)(g.Text,{className:`text-sm ${(o??0)>0?"text-amber-600":""}`,children:tD(o)})]})]}),(e.input_cost_per_token||e.output_cost_per_token)&&(0,t.jsxs)("div",{className:"text-xs text-gray-400 pt-2 border-t border-gray-200",children:["Token Pricing: "," ",e.input_cost_per_token&&(0,t.jsxs)("span",{children:["Input $",(0,eO.formatNumberWithCommas)(1e6*e.input_cost_per_token,2),"/1M"]}),e.input_cost_per_token&&e.output_cost_per_token&&" | ",e.output_cost_per_token&&(0,t.jsxs)("span",{children:["Output $",(0,eO.formatNumberWithCommas)(1e6*e.output_cost_per_token,2),"/1M"]})]})]})},tE=({multiResult:e,timePeriod:s})=>{let[a,l]=(0,i.useState)(new Set),r=e.entries.filter(e=>null!==e.result),o=e.entries.filter(e=>e.loading),d=e.entries.filter(e=>null!==e.error),c=r.length>0,m=o.length>0,u=d.length>0;if(!c&&!m&&!u)return(0,t.jsx)("div",{className:"py-6 text-center border border-dashed border-gray-300 rounded-lg bg-gray-50",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Select models above to see cost estimates"})});if(!c&&m&&!u)return(0,t.jsxs)("div",{className:"py-6 text-center",children:[(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0})}),(0,t.jsx)(g.Text,{className:"text-gray-500 block mt-2",children:"Calculating costs..."})]});if(!c&&u)return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-base font-semibold text-gray-900",children:"Cost Estimates"}),m&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})]}),d.map(e=>(0,t.jsxs)("div",{className:"text-sm text-red-600 bg-red-50 p-3 rounded-lg border border-red-200",children:[(0,t.jsxs)("span",{className:"font-medium",children:[e.entry.model||"Unknown model",": "]}),e.error]},e.entry.id))]});let p=e.totals.margin_per_request>0,x="day"===s?"Daily":"Monthly",h=[{title:"Model",dataIndex:"model",key:"model",render:(e,s)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e}),s.provider&&(0,t.jsx)(I.Tag,{color:"blue",className:"text-xs",children:s.provider}),s.loading&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})]}),s.error&&(0,t.jsxs)("div",{className:"text-xs text-red-600 bg-red-50 px-2 py-1 rounded",children:["⚠️ ",s.error]}),s.hasZeroCost&&!s.error&&(0,t.jsx)("div",{className:"text-xs text-amber-600 bg-amber-50 px-2 py-1 rounded",children:"⚠️ No pricing data found for this model. Set base_model in config."})]})},{title:"Per Request",dataIndex:"cost_per_request",key:"cost_per_request",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:"font-mono text-sm",children:tD(e)})},{title:"Margin Fee",dataIndex:"margin_cost_per_request",key:"margin_cost_per_request",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:`font-mono text-sm ${(e??0)>0?"text-amber-600":"text-gray-400"}`,children:tD(e)})},{title:x,dataIndex:"day"===s?"daily_cost":"monthly_cost",key:"period_cost",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:"font-mono text-sm",children:tD(e)})},{title:"",key:"expand",width:40,render:(e,s)=>s.error?null:(0,t.jsx)(n.Button,{size:"xs",variant:"light",onClick:()=>{var e;return e=s.id,void l(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},className:"text-gray-400 hover:text-gray-600",children:a.has(s.id)?(0,t.jsx)(tk.DownOutlined,{}):(0,t.jsx)(tN.RightOutlined,{})})}],y=e.entries.filter(e=>e.entry.model).map(e=>({key:e.entry.id,id:e.entry.id,model:e.result?.model||e.entry.model,provider:e.result?.provider,cost_per_request:e.result?.cost_per_request??null,margin_cost_per_request:e.result?.margin_cost_per_request??null,daily_cost:e.result?.daily_cost??null,monthly_cost:e.result?.monthly_cost??null,error:e.error,loading:e.loading,hasZeroCost:e.result&&0===e.result.cost_per_request}));return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-base font-semibold text-gray-900",children:"Cost Estimates"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[m&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}),(0,t.jsx)(tP,{multiResult:e})]})]}),(0,t.jsxs)(ts.Card,{size:"small",className:"bg-gradient-to-r from-slate-50 to-blue-50 border-slate-200",children:[(0,t.jsxs)(t_.Row,{gutter:[16,8],children:[(0,t.jsx)(tv.Col,{xs:24,sm:12,children:(0,t.jsx)(tg,{title:(0,t.jsx)("span",{className:"text-xs",children:"Total Per Request"}),value:tD(e.totals.cost_per_request),valueStyle:{color:"#1890ff",fontSize:"18px",fontFamily:"monospace"}})}),(0,t.jsx)(tv.Col,{xs:24,sm:12,children:(0,t.jsx)(tg,{title:(0,t.jsxs)("span",{className:"text-xs",children:["Total ",x]}),value:tD("day"===s?e.totals.daily_cost:e.totals.monthly_cost),valueStyle:{color:"day"===s?"#52c41a":"#722ed1",fontSize:"18px",fontFamily:"monospace"}})})]}),p&&(0,t.jsxs)(t_.Row,{gutter:[16,8],className:"mt-3 pt-3 border-t border-slate-200",children:[(0,t.jsxs)(tv.Col,{xs:24,sm:12,children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Margin Fee/Request"}),(0,t.jsx)("div",{className:"text-sm font-mono text-amber-600",children:tD(e.totals.margin_per_request)})]}),(0,t.jsxs)(tv.Col,{xs:24,sm:12,children:[(0,t.jsxs)("div",{className:"text-xs text-gray-500",children:[x," Margin Fee"]}),(0,t.jsx)("div",{className:"text-sm font-mono text-amber-600",children:tD("day"===s?e.totals.daily_margin:e.totals.monthly_margin)})]})]})]}),y.length>0&&(0,t.jsx)(te.Table,{columns:h,dataSource:y,pagination:!1,size:"small",className:"border border-gray-200 rounded-lg",expandable:{expandedRowKeys:Array.from(a),expandedRowRender:e=>{let a=r.find(t=>t.entry.id===e.id);return a?.result?(0,t.jsx)("div",{className:"py-2",children:(0,t.jsx)(tz,{result:a.result,loading:a.loading,timePeriod:s})}):null},showExpandColumn:!1}})]})},tO=()=>({id:`entry-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,model:"",input_tokens:1e3,output_tokens:500,num_requests_per_day:void 0,num_requests_per_month:void 0}),tR=({accessToken:e,models:s})=>{let[a,l]=(0,i.useState)([tO()]),[r,n]=(0,i.useState)("month"),{debouncedFetchForEntry:o,removeEntry:d,getMultiModelResult:c}=function(e){let[t,s]=(0,i.useState)(new Map),a=(0,i.useRef)(new Map),l=(0,i.useCallback)(async t=>{if(!e||!t.model)return void s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:null}),s});s(e=>{let s=new Map(e),a=s.get(t.id);return s.set(t.id,{entry:t,result:a?.result??null,loading:!0,error:null}),s});try{let a=(0,w.getProxyBaseUrl)(),l=a?`${a}/cost/estimate`:"/cost/estimate",r={model:t.model,input_tokens:t.input_tokens||0,output_tokens:t.output_tokens||0,num_requests_per_day:t.num_requests_per_day||null,num_requests_per_month:t.num_requests_per_month||null},i=await fetch(l,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(i.ok){let e=await i.json();s(s=>{let a=new Map(s);return a.set(t.id,{entry:t,result:e,loading:!1,error:null}),a})}else{let e=await i.json(),a=e.detail?.error||e.detail||"Failed to estimate cost";s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:a}),s})}}catch(e){console.error("Error estimating cost:",e),s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:"Network error"}),s})}},[e]),r=(0,i.useCallback)(e=>{let t=a.current.get(e.id);t&&clearTimeout(t);let s=setTimeout(()=>{l(e)},500);a.current.set(e.id,s)},[l]),n=(0,i.useCallback)(e=>{let t=a.current.get(e);t&&(clearTimeout(t),a.current.delete(e)),s(t=>{let s=new Map(t);return s.delete(e),s})},[]);return(0,i.useEffect)(()=>{let e=a.current;return()=>{e.forEach(e=>clearTimeout(e)),e.clear()}},[]),{debouncedFetchForEntry:r,removeEntry:n,getMultiModelResult:(0,i.useCallback)(e=>{let s=e.map(e=>{let s=t.get(e.id);return{entry:e,result:s?.result??null,loading:s?.loading??!1,error:s?.error??null}}),a=0,l=null,r=null,i=0,n=null,o=null;for(let e of s)e.result&&(a+=e.result.cost_per_request,i+=e.result.margin_cost_per_request,null!==e.result.daily_cost&&(l=(l??0)+e.result.daily_cost),null!==e.result.daily_margin_cost&&(n=(n??0)+e.result.daily_margin_cost),null!==e.result.monthly_cost&&(r=(r??0)+e.result.monthly_cost),null!==e.result.monthly_margin_cost&&(o=(o??0)+e.result.monthly_margin_cost));return{entries:s,totals:{cost_per_request:a,daily_cost:l,monthly_cost:r,margin_per_request:i,daily_margin:n,monthly_margin:o}}},[t])}}(e),m=(0,i.useCallback)((e,t,s)=>{l(a=>{let l=a.map(a=>a.id===e?{...a,[t]:s}:a),r=l.find(t=>t.id===e);return r&&r.model&&o(r),l})},[o]),u=(0,i.useCallback)(e=>{n(e),l(t=>t.map(t=>({...t,num_requests_per_day:"day"===e?t.num_requests_per_day:void 0,num_requests_per_month:"month"===e?t.num_requests_per_month:void 0})))},[]),p=(0,i.useCallback)(()=>{l(e=>[...e,tO()])},[]),x=(0,i.useCallback)(e=>{l(t=>t.filter(t=>t.id!==e)),d(e)},[d]),h=c(a),g=[{title:"Model",dataIndex:"model",key:"model",width:"35%",render:(e,a)=>(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Select a model",value:a.model||void 0,onChange:e=>m(a.id,"model",e),optionFilterProp:"label",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:s.map(e=>({value:e,label:e})),style:{width:"100%"},size:"small"})},{title:"Input Tokens",dataIndex:"input_tokens",key:"input_tokens",width:"18%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:s.input_tokens,onChange:e=>m(s.id,"input_tokens",e??0),style:{width:"100%"},size:"small",formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")})},{title:"Output Tokens",dataIndex:"output_tokens",key:"output_tokens",width:"18%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:s.output_tokens,onChange:e=>m(s.id,"output_tokens",e??0),style:{width:"100%"},size:"small",formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")})},{title:`Requests/${"day"===r?"Day":"Month"}`,dataIndex:"day"===r?"num_requests_per_day":"num_requests_per_month",key:"num_requests",width:"20%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:"day"===r?s.num_requests_per_day:s.num_requests_per_month,onChange:e=>m(s.id,"day"===r?"num_requests_per_day":"num_requests_per_month",e??void 0),style:{width:"100%"},size:"small",placeholder:"-",formatter:e=>e?`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,","):""})},{title:"",key:"actions",width:50,render:(e,s)=>(0,t.jsx)(V.Button,{type:"text",icon:(0,t.jsx)(tt.DeleteOutlined,{}),onClick:()=>x(s.id),disabled:1===a.length,danger:!0,size:"small"})}];return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-2",children:(0,t.jsxs)(T.Radio.Group,{value:r,onChange:e=>u(e.target.value),size:"small",optionType:"button",buttonStyle:"solid",children:[(0,t.jsx)(T.Radio.Button,{value:"day",children:"Per Day"}),(0,t.jsx)(T.Radio.Button,{value:"month",children:"Per Month"})]})}),(0,t.jsx)(te.Table,{columns:g,dataSource:a,rowKey:"id",pagination:!1,size:"small",footer:()=>(0,t.jsx)(V.Button,{type:"dashed",onClick:p,icon:(0,t.jsx)(H.PlusOutlined,{}),className:"w-full",children:"Add Another Model"})}),(0,t.jsx)(tE,{multiResult:h,timePeriod:r})]})};var tB=e.i(270377),t$=e.i(778917),tq=e.i(664659);let tU=({items:e,children:s="Docs",className:a=""})=>{let[l,r]=(0,i.useState)(!1),n=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=e=>{n.current&&!n.current.contains(e.target)&&r(!1)};return l&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l]),(0,t.jsxs)("div",{className:`relative inline-block ${a}`,ref:n,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>r(!l),className:"inline-flex items-center gap-1 text-gray-500 hover:text-gray-700 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded px-2 py-1","aria-expanded":l,"aria-haspopup":"true",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)(tq.ChevronDown,{className:`h-3 w-3 transition-transform ${l?"rotate-180":""}`,"aria-hidden":"true"})]}),l&&(0,t.jsx)("div",{className:"absolute right-0 mt-1 w-56 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:e.map((e,s)=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>r(!1),children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)(t$.ExternalLink,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 ml-2","aria-hidden":"true"})]},s))})]})};var tV=e.i(673709);let tH=()=>{let[e,s]=(0,i.useState)(""),[a,l]=(0,i.useState)(""),r=(0,i.useMemo)(()=>{let t=parseFloat(e),s=parseFloat(a);if(isNaN(t)||isNaN(s)||0===t||0===s)return null;let l=t+s,r=s/l*100;return{originalCost:l.toFixed(10),finalCost:t.toFixed(10),discountAmount:s.toFixed(10),discountPercentage:r.toFixed(2)}},[e,a]);return(0,t.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Cost Calculation"}),(0,t.jsxs)(g.Text,{className:"text-xs text-gray-600",children:["Discounts are applied to provider costs: ",(0,t.jsx)("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-xs",children:"final_cost = base_cost × (1 - discount%/100)"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Example"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"A 5% discount on a $10.00 request results in: $10.00 × (1 - 0.05) = $9.50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Valid Range"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Discount percentages must be between 0% and 100%"})]}),(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-2",children:"Validating Discounts"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mb-3",children:"Make a test request and check the response headers to verify discounts are applied:"}),(0,t.jsx)(tV.default,{language:"bash",code:`curl -X POST -i http://your-proxy:4000/chat/completions \\ - -H "Content-Type: application/json" \\ - -H "Authorization: Bearer sk-1234" \\ - -d '{ - "model": "gemini/gemini-2.5-pro", - "messages": [{"role": "user", "content": "Hello"}] - }'`}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mt-3 mb-2",children:"Look for these headers in the response:"}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Final cost after discount"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-original"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Original cost before discount"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-discount-amount"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Amount discounted"})]})]})]}),(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-3",children:"Discount Calculator"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mb-3",children:"Enter values from your response headers to verify the discount:"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Response Cost (x-litellm-response-cost)"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.0171938125",value:e,onValueChange:s,className:"text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Discount Amount (x-litellm-response-cost-discount-amount)"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.0009049375",value:a,onValueChange:l,className:"text-sm"})]})]}),r&&(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,t.jsx)(g.Text,{className:"text-sm font-medium text-blue-900 mb-2",children:"Calculated Results"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Original Cost:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.originalCost]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Final Cost:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.finalCost]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Discount Amount:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.discountAmount]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-blue-300",children:[(0,t.jsx)(g.Text,{className:"text-xs font-semibold text-blue-900",children:"Discount Applied:"}),(0,t.jsxs)(g.Text,{className:"text-sm font-bold text-blue-900",children:[r.discountPercentage,"%"]})]})]})]})]})]})};var tG=e.i(689020);let tK=[{label:"Custom pricing for models",href:"https://docs.litellm.ai/docs/proxy/custom_pricing"},{label:"Spend tracking",href:"https://docs.litellm.ai/docs/proxy/cost_tracking"}],tW=({userID:e,userRole:s,accessToken:a})=>{let[l,r]=(0,i.useState)(void 0),[o,d]=(0,i.useState)(""),[c,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(void 0),[b,_]=(0,i.useState)("percentage"),[v,N]=(0,i.useState)(""),[S,C]=(0,i.useState)(""),[T,I]=(0,i.useState)([]),[F]=k.Form.useForm(),[L]=k.Form.useForm(),[A,M]=y.Modal.useModal(),P="proxy_admin"===s||"Admin"===s,{discountConfig:D,fetchDiscountConfig:z,handleAddProvider:E,handleRemoveProvider:O,handleDiscountChange:R}=function({accessToken:e}){let[t,s]=(0,i.useState)({}),a=(0,i.useCallback)(async()=>{try{let t=(0,w.getProxyBaseUrl)(),a=t?`${t}/config/cost_discount_config`:"/config/cost_discount_config",l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();s(e.values||{})}else console.error("Failed to fetch discount config")}catch(e){console.error("Error fetching discount config:",e),eE.default.fromBackend("Failed to fetch discount configuration")}},[e]),l=(0,i.useCallback)(async t=>{try{let s=(0,w.getProxyBaseUrl)(),l=s?`${s}/config/cost_discount_config`:"/config/cost_discount_config",r=await fetch(l,{method:"PATCH",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok)eE.default.success("Discount configuration updated successfully"),await a();else{let e=await r.json(),t=e.detail?.error||e.detail||"Failed to update settings";eE.default.fromBackend(t)}}catch(e){console.error("Error updating discount config:",e),eE.default.fromBackend("Failed to update discount configuration")}},[e,a]),r=(0,i.useCallback)(async(e,a)=>{if(!e||!a)return eE.default.fromBackend("Please select a provider and enter discount percentage"),!1;let r=parseFloat(a);if(isNaN(r)||r<0||r>100)return eE.default.fromBackend("Discount must be between 0% and 100%"),!1;let i=e5(e);if(!i)return eE.default.fromBackend("Invalid provider selected"),!1;if(t[i])return eE.default.fromBackend(`Discount for ${e2.Providers[e]} already exists. Edit it in the table above.`),!1;let n={...t,[i]:r/100};return s(n),await l(n),!0},[t,l]),n=(0,i.useCallback)(async e=>{let a={...t};delete a[e],s(a),await l(a)},[t,l]),o=(0,i.useCallback)(async(e,a)=>{let r=parseFloat(a);if(!isNaN(r)&&r>=0&&r<=1){let a={...t,[e]:r};s(a),await l(a)}},[t,l]);return{discountConfig:t,setDiscountConfig:s,fetchDiscountConfig:a,saveDiscountConfig:l,handleAddProvider:r,handleRemoveProvider:n,handleDiscountChange:o}}({accessToken:a}),{marginConfig:B,fetchMarginConfig:$,handleAddMargin:q,handleRemoveMargin:U,handleMarginChange:V}=function({accessToken:e}){let[t,s]=(0,i.useState)({}),a=(0,i.useCallback)(async()=>{try{let t=(0,w.getProxyBaseUrl)(),a=t?`${t}/config/cost_margin_config`:"/config/cost_margin_config",l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();s(e.values||{})}else console.error("Failed to fetch margin config")}catch(e){console.error("Error fetching margin config:",e),eE.default.fromBackend("Failed to fetch margin configuration")}},[e]),l=(0,i.useCallback)(async t=>{try{let s=(0,w.getProxyBaseUrl)(),l=s?`${s}/config/cost_margin_config`:"/config/cost_margin_config",r=await fetch(l,{method:"PATCH",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok)eE.default.success("Margin configuration updated successfully"),await a();else{let e=await r.json(),t=e.detail?.error||e.detail||"Failed to update settings";eE.default.fromBackend(t)}}catch(e){console.error("Error updating margin config:",e),eE.default.fromBackend("Failed to update margin configuration")}},[e,a]),r=(0,i.useCallback)(async e=>{let a,r,{selectedProvider:i,marginType:n,percentageValue:o,fixedAmountValue:d}=e;if(!i)return eE.default.fromBackend("Please select a provider"),!1;if("global"===i)a="global";else{let e=e5(i);if(!e)return eE.default.fromBackend("Invalid provider selected"),!1;a=e}if(t[a]){let e="global"===a?"Global":e2.Providers[i];return eE.default.fromBackend(`Margin for ${e} already exists. Edit it in the table above.`),!1}if("percentage"===n){let e=parseFloat(o);if(isNaN(e)||e<0||e>1e3)return eE.default.fromBackend("Percentage must be between 0% and 1000%"),!1;r=e/100}else{let e=parseFloat(d);if(isNaN(e)||e<0)return eE.default.fromBackend("Fixed amount must be non-negative"),!1;r={fixed_amount:e}}let c={...t,[a]:r};return s(c),await l(c),!0},[t,l]),n=(0,i.useCallback)(async e=>{let a={...t};delete a[e],s(a),await l(a)},[t,l]),o=(0,i.useCallback)(async(e,a)=>{let r={...t,[e]:a};s(r),await l(r)},[t,l]);return{marginConfig:t,setMarginConfig:s,fetchMarginConfig:a,saveMarginConfig:l,handleAddMargin:r,handleRemoveMargin:n,handleMarginChange:o}}({accessToken:a});(0,i.useEffect)(()=>{a&&(Promise.all([z(),$()]).finally(()=>{m(!1)}),(async()=>{try{let e=await (0,tG.fetchAvailableModels)(a);I(e.map(e=>e.model_group))}catch(e){console.error("Error fetching models:",e)}})())},[a,z,$]);let H=async()=>{await E(l,o)&&(r(void 0),d(""),p(!1))},G=async(e,s)=>{A.confirm({title:"Remove Provider Discount",icon:(0,t.jsx)(tB.ExclamationCircleOutlined,{}),content:`Are you sure you want to remove the discount for ${s}?`,okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:()=>O(e)})},K=async()=>{await q({selectedProvider:j,marginType:b,percentageValue:v,fixedAmountValue:S})&&(f(void 0),N(""),C(""),_("percentage"),h(!1))},W=async(e,s)=>{A.confirm({title:"Remove Provider Margin",icon:(0,t.jsx)(tB.ExclamationCircleOutlined,{}),content:`Are you sure you want to remove the margin for ${s}?`,okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:()=>U(e)})};return a?(0,t.jsxs)("div",{className:"w-full p-8",children:[M,(0,t.jsx)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ek.Title,{children:"Cost Tracking Settings"}),(0,t.jsx)(tU,{items:tK})]}),(0,t.jsx)(g.Text,{className:"text-gray-500 mt-1",children:"Configure cost discounts and margins for different LLM providers. Changes are saved automatically."})]})}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full space-y-4",children:[P&&(0,t.jsxs)(eG.Accordion,{children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Provider Discounts"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Apply percentage-based discounts to reduce costs for specific providers"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsxs)(eS.TabGroup,{children:[(0,t.jsxs)(eC.TabList,{className:"px-6 pt-4",children:[(0,t.jsx)(eN.Tab,{children:"Discounts"}),(0,t.jsx)(eN.Tab,{children:"Test It"})]}),(0,t.jsxs)(eI.TabPanels,{children:[(0,t.jsx)(eT.TabPanel,{children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(n.Button,{onClick:()=>p(!0),children:"+ Add Provider Discount"})}),c?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(D).length>0?(0,t.jsx)(e3,{discountConfig:D,onDiscountChange:R,onRemoveProvider:G}):(0,t.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)(g.Text,{className:"text-gray-700 font-medium mb-2",children:"No provider discounts configured"}),(0,t.jsx)(g.Text,{className:"text-gray-500 text-sm",children:'Click "Add Provider Discount" to get started'})]})]})}),(0,t.jsx)(eT.TabPanel,{children:(0,t.jsx)("div",{className:"px-6 pb-4",children:(0,t.jsx)(tH,{})})})]})]})})]}),P&&(0,t.jsxs)(eG.Accordion,{children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Fee/Price Margin"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Add fees or margins to LLM costs for internal billing and cost recovery"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(n.Button,{onClick:()=>h(!0),children:"+ Add Provider Margin"})}),c?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(B).length>0?(0,t.jsx)(e7,{marginConfig:B,onMarginChange:V,onRemoveProvider:W}):(0,t.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)(g.Text,{className:"text-gray-700 font-medium mb-2",children:"No provider margins configured"}),(0,t.jsx)(g.Text,{className:"text-gray-500 text-sm",children:'Click "Add Provider Margin" to get started'})]})]})})]}),(0,t.jsxs)(eG.Accordion,{defaultOpen:!0,children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Pricing Calculator"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Estimate LLM costs based on expected token usage and request volume"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(tR,{accessToken:a,models:T})})})]})]}),(0,t.jsx)(y.Modal,{title:(0,t.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Discount"})}),open:u,width:1e3,onCancel:()=>{p(!1),F.resetFields(),r(void 0),d("")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(g.Text,{className:"text-sm text-gray-600 mb-6",children:"Select a provider and set its discount percentage. Enter a value between 0% and 100% (e.g., 5 for a 5% discount)."}),(0,t.jsx)(k.Form,{form:F,onFinish:()=>{H()},layout:"vertical",className:"space-y-6",children:(0,t.jsx)(e8,{discountConfig:D,selectedProvider:l,newDiscount:o,onProviderChange:r,onDiscountChange:d,onAddProvider:H})})]})}),(0,t.jsx)(y.Modal,{title:(0,t.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Margin"})}),open:x,width:1e3,onCancel:()=>{h(!1),L.resetFields(),f(void 0),N(""),C(""),_("percentage")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(g.Text,{className:"text-sm text-gray-600 mb-6",children:'Select a provider (or "Global" for all providers) and configure the margin. You can use percentage-based or fixed amount.'}),(0,t.jsx)(k.Form,{form:L,layout:"vertical",className:"space-y-6",children:(0,t.jsx)(e9,{marginConfig:B,selectedProvider:j,marginType:b,percentageValue:v,fixedAmountValue:S,onProviderChange:f,onMarginTypeChange:_,onPercentageChange:N,onFixedAmountChange:C,onAddProvider:K})})]})})]}):null};var tQ=e.i(226898),tY=e.i(973706),tJ=e.i(447566),tX=e.i(602073),tZ=e.i(313603),t0=e.i(285027),t1=e.i(266027),t2=e.i(653496),t4=e.i(149192),t5=e.i(788191);let t6=`Evaluate whether this guardrail's decision was correct. -Analyze the user input, the guardrail action taken, and determine if it was appropriate. - -Consider: -— Was the user's intent genuinely harmful or policy-violating? -— Was the guardrail's action (block / flag / pass) appropriate? -— Could this be a false positive or false negative? - -Return a structured verdict with confidence and justification.`,t3=`{ - "verdict": "correct" | "false_positive" | "false_negative", - "confidence": 0.0, - "justification": "string", - "risk_category": "string", - "suggested_action": "keep" | "adjust threshold" | "add allowlist" -} -`;function t8({open:e,onClose:s,guardrailName:a,accessToken:l,onRunEvaluation:r}){let[n,o]=(0,i.useState)(t6),[d,c]=(0,i.useState)(t3),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)([]),[h,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!e||!l)return void x([]);let t=!1;return g(!0),(0,tG.fetchAvailableModels)(l).then(e=>{t||x(e)}).catch(()=>{t||x([])}).finally(()=>{t||g(!1)}),()=>{t=!0}},[e,l]);let j=p.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)(y.Modal,{title:"Evaluation Settings",open:e,onCancel:s,width:640,footer:null,closeIcon:(0,t.jsx)(t4.CloseOutlined,{}),destroyOnClose:!0,children:[(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-4",children:a?`Configure AI evaluation for ${a}`:"Configure AI evaluation for re-running on logs"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Evaluation Prompt"}),(0,t.jsx)("button",{type:"button",onClick:()=>o(t6),className:"text-xs text-indigo-600 hover:text-indigo-700",children:"Reset to default"})]}),(0,t.jsx)(S.Input.TextArea,{value:n,onChange:e=>o(e.target.value),rows:6,className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"System prompt sent to the evaluation model. Output is structured via response_format."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Response Schema"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:"response_format: json_schema"}),(0,t.jsx)(S.Input.TextArea,{value:d,onChange:e=>c(e.target.value),rows:6,className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Model"}),(0,t.jsx)(N.Select,{placeholder:h?"Loading models…":"Select a model",value:m??void 0,onChange:u,options:j,style:{width:"100%"},showSearch:!0,optionFilterProp:"label",loading:h,notFoundContent:l?"No models available":"Sign in to see models"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsx)(V.Button,{onClick:s,children:"Cancel"}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(t5.PlayCircleOutlined,{}),onClick:()=>{m&&(r?.({prompt:n,schema:d,model:m}),s())},disabled:!m,children:"Run Evaluation"})]})]})}var t7=e.i(166540);e.i(3565);var t9=e.i(502626);let se={blocked:{icon:t4.CloseOutlined,color:"text-red-600",bg:"bg-red-50",border:"border-red-200",label:"Blocked"},passed:{icon:v.CheckCircleOutlined,color:"text-green-600",bg:"bg-green-50",border:"border-green-200",label:"Passed"},flagged:{icon:t0.WarningOutlined,color:"text-amber-600",bg:"bg-amber-50",border:"border-amber-200",label:"Flagged"}};function st({guardrailName:e,filterAction:s="all",logs:a=[],logsLoading:l=!1,totalLogs:r,accessToken:n=null,startDate:o="",endDate:d=""}){let[c,m]=(0,i.useState)(10),[u,p]=(0,i.useState)(s),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(!1),j=a.filter(e=>"all"===u||e.action===u).slice(0,c),f=r??a.length,b=o?(0,t7.default)(o).utc().format("YYYY-MM-DD HH:mm:ss"):(0,t7.default)().subtract(24,"hours").utc().format("YYYY-MM-DD HH:mm:ss"),_=d?(0,t7.default)(d).utc().endOf("day").format("YYYY-MM-DD HH:mm:ss"):(0,t7.default)().utc().format("YYYY-MM-DD HH:mm:ss"),{data:v}=(0,t1.useQuery)({queryKey:["spend-log-by-request",x,b,_],queryFn:async()=>n&&x?await (0,w.uiSpendLogsCall)({accessToken:n,start_date:b,end_date:_,page:1,page_size:10,params:{request_id:x}}):null,enabled:!!(n&&x&&g)}),k=v?.data?.[0]??null;return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:e?`Logs — ${e}`:"Request Logs"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:l?"Loading…":a.length>0?`Showing ${j.length} of ${f} entries`:"No logs for this period. Select a guardrail and date range."})]}),a.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-1",children:["all","blocked","flagged","passed"].map(e=>(0,t.jsx)(V.Button,{type:u===e?"primary":"default",size:"small",onClick:()=>p(e),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,t.jsx)("div",{className:"h-4 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Sample:"}),[10,50,100].map(e=>(0,t.jsx)(V.Button,{type:c===e?"primary":"default",size:"small",onClick:()=>m(e),children:e},e))]})]})]})}),l&&(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{})}),!l&&0===j.length&&(0,t.jsx)("div",{className:"py-12 text-center text-sm text-gray-500",children:"No logs to display. Adjust filters or date range."}),!l&&j.length>0&&(0,t.jsx)("div",{className:"divide-y divide-gray-100",children:j.map(e=>{let s=se[e.action],a=s.icon;return(0,t.jsxs)("button",{type:"button",onClick:()=>{h(e.id),y(!0)},className:"w-full text-left px-4 py-3 hover:bg-gray-50 transition-colors flex items-start gap-3",children:[(0,t.jsx)(a,{className:`w-4 h-4 mt-0.5 flex-shrink-0 ${s.color}`}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${s.bg} ${s.color} ${s.border}`,children:s.label}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:e.timestamp}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"·"}),e.model&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.model})]}),(0,t.jsx)("p",{className:"text-sm text-gray-800 truncate",children:e.input_snippet??e.input??"—"})]}),(0,t.jsx)(tk.DownOutlined,{className:"w-4 h-4 text-gray-400 flex-shrink-0 mt-1"})]},e.id)})}),(0,t.jsx)(t9.LogDetailsDrawer,{open:g,onClose:()=>{y(!1),h(null)},logEntry:k,accessToken:n,allLogs:k?[k]:[],startTime:b})]})}function ss({label:e,value:s,valueColor:a="text-gray-900",icon:l,subtitle:r}){return(0,t.jsxs)("div",{className:"h-full bg-white border border-gray-200 rounded-lg p-5 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-600",children:e}),l&&(0,t.jsx)("span",{className:"text-gray-400",children:l})]}),(0,t.jsx)("div",{className:`text-3xl font-semibold ${a} tracking-tight`,children:s}),r&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:r})]})}let sa={healthy:{bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},warning:{bg:"bg-amber-50",text:"text-amber-700",dot:"bg-amber-500"},critical:{bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}};function sl({guardrailId:e,onBack:s,accessToken:a=null,startDate:l,endDate:r}){let[n,o]=(0,i.useState)("overview"),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(1),{data:p,isLoading:x,error:h}=(0,t1.useQuery)({queryKey:["guardrails-usage-detail",e,l,r],queryFn:()=>(0,w.getGuardrailsUsageDetail)(a,e,l,r),enabled:!!a&&!!e}),{data:g,isLoading:y}=(0,t1.useQuery)({queryKey:["guardrails-usage-logs",e,m,50],queryFn:()=>(0,w.getGuardrailsUsageLogs)(a,{guardrailId:e,page:m,pageSize:50,startDate:l,endDate:r}),enabled:!!a&&!!e}),j=(0,i.useMemo)(()=>(g?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:e.action,score:e.score,model:e.model,input_snippet:e.input_snippet,output_snippet:e.output_snippet,reason:e.reason})),[g?.logs]),f=p?{name:p.guardrail_name,description:p.description??"",status:p.status,provider:p.provider,type:p.type,requestsEvaluated:p.requestsEvaluated,failRate:p.failRate,avgScore:p.avgScore,avgLatency:p.avgLatency}:{name:e,description:"",status:"healthy",provider:"—",type:"—",requestsEvaluated:0,failRate:0,avgScore:void 0,avgLatency:void 0},b=sa[f.status]??sa.healthy;return x&&!p?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})}):h&&!p?(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load guardrail details."})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:f.name}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 text-xs font-medium rounded-full ${b.bg} ${b.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${b.dot}`}),f.status.charAt(0).toUpperCase()+f.status.slice(1)]})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 ml-8",children:f.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:f.provider}),(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>c(!0),title:"Evaluation settings"})]})]})]}),(0,t.jsx)(t2.Tabs,{activeKey:n,onChange:o,items:[{key:"overview",label:"Overview"},{key:"logs",label:"Logs"}]}),"overview"===n&&(0,t.jsxs)("div",{className:"space-y-6 mt-4",children:[(0,t.jsxs)(t_.Row,{gutter:[16,16],children:[(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Requests Evaluated",value:f.requestsEvaluated.toLocaleString()})}),(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Fail Rate",value:`${f.failRate}%`,valueColor:f.failRate>15?"text-red-600":f.failRate>5?"text-amber-600":"text-green-600",subtitle:`${Math.round(f.requestsEvaluated*f.failRate/100).toLocaleString()} blocked`,icon:f.failRate>15?(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"}):void 0})}),(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Avg. latency added",value:null!=f.avgLatency?`${Math.round(f.avgLatency)}ms`:"—",valueColor:null!=f.avgLatency?f.avgLatency>150?"text-red-600":f.avgLatency>50?"text-amber-600":"text-green-600":"text-gray-500",subtitle:null!=f.avgLatency?"Per request (avg)":"No data"})})]}),(0,t.jsx)(st,{guardrailName:f.name,filterAction:"all",logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})]}),"logs"===n&&(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(st,{guardrailName:f.name,logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})}),(0,t.jsx)(t8,{open:d,onClose:()=>c(!1),guardrailName:f.name,accessToken:a})]})}let sr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z"}}]},name:"rise",theme:"outlined"};var si=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:sr}))}),sn=e.i(898586),so=e.i(584935);function sd({data:e}){let s=e&&e.length>0?e:[];return(0,t.jsxs)(o.Card,{className:"bg-white border border-gray-200",children:[(0,t.jsx)(ek.Title,{className:"text-base font-semibold text-gray-900 mb-4",children:"Request Outcomes Over Time"}),(0,t.jsx)("div",{className:"h-80 min-h-[280px]",children:s.length>0?(0,t.jsx)(so.BarChart,{data:s,index:"date",categories:["passed","blocked"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),yAxisWidth:48,showLegend:!0,stack:!0}):(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-gray-500",children:"No chart data for this period"})})]})}let sc={Bedrock:"bg-orange-100 text-orange-700 border-orange-200","Google Cloud":"bg-sky-100 text-sky-700 border-sky-200",LiteLLM:"bg-indigo-100 text-indigo-700 border-indigo-200",Custom:"bg-gray-100 text-gray-600 border-gray-200"};function sm({accessToken:e=null,startDate:s,endDate:a,onSelectGuardrail:l}){let[r,n]=(0,i.useState)("failRate"),[o,d]=(0,i.useState)("desc"),[c,m]=(0,i.useState)(!1),{data:u,isLoading:p,error:x}=(0,t1.useQuery)({queryKey:["guardrails-usage-overview",s,a],queryFn:()=>(0,w.getGuardrailsUsageOverview)(e,s,a),enabled:!!e}),h=u?.rows??[],g=(0,i.useMemo)(()=>{let e,t,s,a;return u?{totalRequests:u.totalRequests??0,totalBlocked:u.totalBlocked??0,passRate:String(u.passRate??0),avgLatency:h.length?Math.round(h.reduce((e,t)=>e+(t.avgLatency??0),0)/h.length):0,count:h.length}:(e=h.reduce((e,t)=>e+t.requestsEvaluated,0),t=h.reduce((e,t)=>e+Math.round(t.requestsEvaluated*t.failRate/100),0),s=e>0?((1-t/e)*100).toFixed(1):"0",{totalRequests:e,totalBlocked:t,passRate:s,avgLatency:(a=h.filter(e=>null!=e.avgLatency)).length>0?Math.round(a.reduce((e,t)=>e+(t.avgLatency??0),0)/a.length):0,count:h.length})},[u,h]),y=u?.chart,j=(0,i.useMemo)(()=>[...h].sort((e,t)=>{let s="desc"===o?-1:1,a=e[r]??0,l=t[r]??0;return(Number(a)-Number(l))*s}),[h,r,o]),f=[{title:"Guardrail",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsx)("button",{type:"button",className:"text-sm font-medium text-gray-900 hover:text-indigo-600 text-left",onClick:()=>l(s.id),children:e})},{title:"Provider",dataIndex:"provider",key:"provider",render:e=>(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${sc[e]??sc.Custom}`,children:e})},{title:"Requests",dataIndex:"requestsEvaluated",key:"requestsEvaluated",align:"right",sorter:!0,sortOrder:"requestsEvaluated"===r?"desc"===o?"descend":"ascend":null,render:e=>e.toLocaleString()},{title:"Fail Rate",dataIndex:"failRate",key:"failRate",align:"right",sorter:!0,sortOrder:"failRate"===r?"desc"===o?"descend":"ascend":null,render:(e,s)=>(0,t.jsxs)("span",{className:e>15?"text-red-600":e>5?"text-amber-600":"text-green-600",children:[e,"%","up"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-red-400",children:"↑"}),"down"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-green-400",children:"↓"})]})},{title:"Avg. latency added",dataIndex:"avgLatency",key:"avgLatency",align:"right",sorter:!0,sortOrder:"avgLatency"===r?"desc"===o?"descend":"ascend":null,render:e=>(0,t.jsx)("span",{className:null==e?"text-gray-400":e>150?"text-red-600":e>50?"text-amber-600":"text-green-600",children:null!=e?`${e}ms`:"—"})},{title:"Status",dataIndex:"status",key:"status",align:"center",render:e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${"healthy"===e?"bg-green-500":"warning"===e?"bg-amber-500":"bg-red-500"}`}),(0,t.jsx)("span",{className:"text-xs text-gray-600 capitalize",children:e})]})}],b=["failRate","requestsEvaluated","avgLatency"];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-lg text-indigo-500"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:"Guardrails Monitor"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Monitor guardrail performance across all requests"})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tS.DownloadOutlined,{}),title:"Coming soon",children:"Export Data"})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],className:"mb-6",children:[(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Total Evaluations",value:g.totalRequests.toLocaleString()})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Blocked Requests",value:g.totalBlocked.toLocaleString(),valueColor:"text-red-600",icon:(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"})})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Pass Rate",value:`${g.passRate}%`,valueColor:"text-green-600",icon:(0,t.jsx)(si,{className:"text-green-400"})})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Avg. latency added",value:`${g.avgLatency}ms`,valueColor:g.avgLatency>150?"text-red-600":g.avgLatency>50?"text-amber-600":"text-green-600"})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Active Guardrails",value:g.count})})]}),(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(sd,{data:y})}),(0,t.jsxs)(ts.Card,{className:"border border-gray-200 rounded-lg bg-white",styles:{body:{padding:0}},children:[(p||x)&&(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-center gap-2",children:[p&&(0,t.jsx)(eF.Spin,{size:"small"}),x&&(0,t.jsx)("span",{className:"text-sm text-red-600",children:"Failed to load data. Try again."})]}),(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(sn.Typography.Title,{level:5,className:"!mb-0 text-gray-900",children:"Guardrail Performance"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Click a guardrail to view details, logs, and configuration"})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>m(!0),title:"Evaluation settings"})})]}),(0,t.jsx)(te.Table,{columns:f,dataSource:j,rowKey:"id",pagination:!1,loading:p,onChange:(e,t,s)=>{s?.field&&b.includes(s.field)&&(n(s.field),d("ascend"===s.order?"asc":"desc"))},locale:0!==h.length||p?void 0:{emptyText:"No data for this period"},onRow:e=>({onClick:()=>l(e.id),style:{cursor:"pointer"}})})]}),(0,t.jsx)(t8,{open:c,onClose:()=>m(!1),accessToken:e})]})}let su=new Date,sp=new Date;function sx({accessToken:e=null}){let[s,a]=(0,i.useState)({type:"overview"}),l=(0,i.useMemo)(()=>new Date(sp),[]),r=(0,i.useMemo)(()=>new Date(su),[]),[n,o]=(0,i.useState)({from:l,to:r}),d=n.from?(0,w.formatDate)(n.from):"",c=n.to?(0,w.formatDate)(n.to):"",m=(0,i.useCallback)(e=>{o(e)},[]);return(0,t.jsxs)("div",{className:"p-6 w-full min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-4",children:(0,t.jsx)(tY.default,{value:n,onValueChange:m,label:"",showTimeRange:!1})}),"overview"===s.type?(0,t.jsx)(sm,{accessToken:e,startDate:d,endDate:c,onSelectGuardrail:e=>{a({type:"detail",guardrailId:e})}}):(0,t.jsx)(sl,{guardrailId:s.guardrailId,onBack:()=>{a({type:"overview"})},accessToken:e,startDate:d,endDate:c})]})}sp.setDate(sp.getDate()-7);var sh=e.i(487304),sg=e.i(760221);e.i(111790);var sy=e.i(280881),sj=e.i(934879),sf=e.i(402874),sb=e.i(797305),s_=e.i(109799),sv=e.i(747871),sw=e.i(56567),sk=e.i(468133),sN=e.i(645526),sS=e.i(91979),sC=e.i(525720),sT=e.i(372943),sI=e.i(95684),sF=e.i(497650),sL=e.i(368869),sA=e.i(998573),sM=e.i(438100),sP=e.i(475254);let sD=(0,sP.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"}]]);var sz=e.i(988846),sE=e.i(98740),sE=sE;function sO({size:e,fontSize:s}){let a=(0,t.jsx)(tw.LoadingOutlined,{style:s?{fontSize:s}:void 0,spin:!0});return(0,t.jsx)(eF.Spin,{indicator:a,size:e})}var sR=e.i(363256),sB=e.i(9314),s$=e.i(552130),sq=e.i(533882),sU=e.i(651904),sV=e.i(460285),sH=e.i(435451),sG=e.i(916940),sK=e.i(127952),sW=e.i(162386);let sQ=(e,t,s)=>"Admin"===e||!!s&&!!t&&s.some(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)),sY=(e,t,s)=>"Admin"===e?s||[]:s&&t?s.filter(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)):[],sJ=({teams:e,searchParams:s,accessToken:a,setTeams:l,userID:r,userRole:n,organizations:o,premiumUser:d=!1})=>{let c,m,u,p;console.log(`organizations: ${JSON.stringify(o)}`);let{data:x}=(0,s_.useOrganizations)(),[h,g]=(0,i.useState)(!0),[j,b]=(0,i.useState)(null),[v,C]=(0,i.useState)(1),[T,F]=(0,i.useState)(10),[L,A]=(0,i.useState)(0),[M,P]=(0,i.useState)(null),[D,z]=(0,i.useState)(null),[O,R]=(0,i.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),$=(0,i.useRef)(null),[q,G]=(0,i.useState)(!1),K=async(e={})=>{if(!a)return;let t=e.page??v,s=e.size??T,i=e.sortBy??O.sort_by,o=e.sortOrder??O.sort_order,d=e.organizationID??O.organization_id,c=e.teamAlias??O.team_alias;g(!0),b(null);try{let e=await (0,eV.teamListCall)(a,t,s,{organizationID:d||null,team_alias:c||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:i||null,sortOrder:o||null});l(e.teams??[]),A(e.total??0)}catch(e){b(e?.message||"Failed to fetch teams")}finally{g(!1)}};(0,i.useEffect)(()=>{K()},[a]);let[W]=k.Form.useForm(),[Q]=k.Form.useForm(),[Y,J]=(0,i.useState)(""),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(null),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),[ei,en]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(!1),[eu,ep]=(0,i.useState)([]),[ex,eh]=(0,i.useState)(!1),[eg,ef]=(0,i.useState)(null),[eb,e_]=(0,i.useState)([]),[ev,ek]=(0,i.useState)({}),[eN,eS]=(0,i.useState)(!1),[eC,eT]=(0,i.useState)([]),[eI,eF]=(0,i.useState)([]),[eL,eA]=(0,i.useState)([]),[eM,eP]=(0,i.useState)([]),[eD,ez]=(0,i.useState)(!1),[eB,e$]=(0,i.useState)({}),[eq,eU]=(0,i.useState)(null),[eH,eY]=(0,i.useState)(0);(0,i.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${D}`);let t=(e=[],D&&D.models.length>0?(console.log(`organization.models: ${D.models}`),e=D.models):e=eu,(0,B.unfurlWildcardModelsInList)(e,eu));console.log(`models: ${t}`),e_(t),W.setFieldValue("models",[])},[D,eu]),(0,i.useEffect)(()=>{if(ei){let e=sY(n,r,o);if(1===e.length){let t=e[0];W.setFieldValue("organization_id",t.organization_id),z(t)}else W.setFieldValue("organization_id",M?.organization_id||null),z(M)}},[ei,n,r,o,M]),(0,i.useEffect)(()=>{let e=async()=>{try{if(null==a)return;let e=(await (0,w.getPoliciesList)(a)).policies.map(e=>e.policy_name);eF(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==a)return;let e=(await (0,w.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);eT(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[a]);let eJ=async()=>{try{if(null==a)return;let e=await (0,w.fetchMCPAccessGroups)(a);eP(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,i.useEffect)(()=>{eJ()},[a]),(0,i.useEffect)(()=>{e&&ek(e.reduce((e,t)=>(e[t.team_id]={keys:t.keys||[],team_info:{members_with_roles:t.members_with_roles||[]}},e),{}))},[e]);let eX=async e=>{ef(e),eh(!0)},eZ=async()=>{if(null!=eg&&null!=e&&null!=a)try{eS(!0),await (0,w.teamDeleteCall)(a,eg.team_id),await K(),eE.default.success("Team deleted successfully")}catch(e){eE.default.fromBackend("Error deleting the team: "+e)}finally{eS(!1),eh(!1),ef(null)}};(0,i.useEffect)(()=>{(async()=>{try{if(null===r||null===n||null===a)return;let e=await (0,B.fetchAvailableModelsForTeamOrKey)(r,n,a);e&&ep(e)}catch(e){console.error("Error fetching user models:",e)}})()},[a,r,n,e]);let e0=async t=>{try{if(console.log(`formValues: ${JSON.stringify(t)}`),null!=a){let s=t?.team_alias,l=e?.map(e=>e.team_alias)??[],r=t?.organization_id||M?.organization_id;if(""===r||"string"!=typeof r?t.organization_id=null:t.organization_id=r.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(eE.default.info("Creating Team"),eL.length>0){let e={};if(t.metadata)try{e=JSON.parse(t.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}e={...e,logging:eL.filter(e=>e.callback_name)},t.metadata=JSON.stringify(e)}if(t.secret_manager_settings&&"string"==typeof t.secret_manager_settings)if(""===t.secret_manager_settings.trim())delete t.secret_manager_settings;else try{t.secret_manager_settings=JSON.parse(t.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}if(t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0||t.allowed_mcp_servers_and_groups&&(t.allowed_mcp_servers_and_groups.servers?.length>0||t.allowed_mcp_servers_and_groups.accessGroups?.length>0||t.allowed_mcp_servers_and_groups.toolPermissions)){if(t.object_permission={},t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0&&(t.object_permission.vector_stores=t.allowed_vector_store_ids,delete t.allowed_vector_store_ids),t.allowed_mcp_servers_and_groups){let{servers:e,accessGroups:s}=t.allowed_mcp_servers_and_groups;e&&e.length>0&&(t.object_permission.mcp_servers=e),s&&s.length>0&&(t.object_permission.mcp_access_groups=s),delete t.allowed_mcp_servers_and_groups}t.mcp_tool_permissions&&Object.keys(t.mcp_tool_permissions).length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_tool_permissions=t.mcp_tool_permissions,delete t.mcp_tool_permissions)}if(t.allowed_mcp_access_groups&&t.allowed_mcp_access_groups.length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_access_groups=t.allowed_mcp_access_groups,delete t.allowed_mcp_access_groups),t.allowed_agents_and_groups){let{agents:e,accessGroups:s}=t.allowed_agents_and_groups;t.object_permission||(t.object_permission={}),e&&e.length>0&&(t.object_permission.agents=e),s&&s.length>0&&(t.object_permission.agent_access_groups=s),delete t.allowed_agents_and_groups}Object.keys(eB).length>0&&(t.model_aliases=eB),eq?.router_settings&&Object.values(eq.router_settings).some(e=>null!=e&&""!==e)&&(t.router_settings=eq.router_settings),await (0,w.teamCreateCall)(a,t),eE.default.success("Team created"),await K({page:v,size:T}),W.resetFields(),eA([]),e$({}),eU(null),eY(e=>e+1),en(!1)}}catch(e){console.error("Error creating the team:",e),eE.default.fromBackend("Error creating the team: "+e)}},e1=async(e,t)=>{let s={...O,[e]:t};if(R(s),C(1),a)try{let e=await (0,eV.teamListCall)(a,1,T,{organizationID:s.organization_id||null,team_alias:s.team_alias||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:s.sort_by||null,sortOrder:s.sort_order||null});l(e.teams??[]),A(e.total??0)}catch(e){console.error("Error fetching teams:",e)}},{token:e2}=sL.theme.useToken(),{Title:e4,Text:e5}=sn.Typography,{Content:e6}=sT.Layout,e3=(0,i.useMemo)(()=>[{title:"Team ID",dataIndex:"team_id",key:"team_id",width:170,ellipsis:!0,render:(e,s)=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(e5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>ea(s.team_id),"data-testid":"team-id-cell",children:e})})},{title:"Team Alias",dataIndex:"team_alias",key:"team_alias",ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{style:{fontSize:14},children:e||(0,t.jsx)(e5,{type:"secondary",italic:!0,children:"—"})})},{title:"Organization",key:"organization",width:160,ellipsis:!0,render:(e,s)=>{let a=((e,t)=>{if(!e||!t)return e||"N/A";let s=t.find(t=>t.organization_id===e);return s?.organization_alias||e})(s.organization_id,x||o);return s.organization_id?(0,t.jsx)(e5,{ellipsis:!0,style:{fontSize:14},children:a}):(0,t.jsx)(e5,{type:"secondary",children:"—"})}},{title:"Resources",key:"resources",width:240,render:(e,s)=>{let a=ev?.[s.team_id]?.team_info?.members_with_roles?.length??0,l=s.models?.length??0,r=ev?.[s.team_id]?.keys?.length??0;return(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a} Members`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sE.default,{size:14}),a]})})}),(0,t.jsx)(f.Tooltip,{title:`${l} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),l]})})}),(0,t.jsx)(f.Tooltip,{title:`${r} Keys`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sM.KeyIcon,{size:14}),r]})})})]})}},{title:"Spend / Budget",key:"spend",width:200,sorter:!0,render:(e,s)=>{let a=s.spend??0,l=s.max_budget,r=`$${a.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`,i=null!=l?`$${l.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:"Unlimited",n=null!=l&&l>0?Math.min(a/l*100,100):null;return(0,t.jsxs)(sC.Flex,{vertical:!0,gap:2,children:[(0,t.jsxs)(e5,{style:{fontSize:13},children:[r,(0,t.jsxs)(e5,{type:"secondary",style:{fontSize:12},children:[" / ",i]})]}),null!=n&&(0,t.jsx)(sF.Progress,{percent:n,size:"small",showInfo:!1,strokeColor:n>=90?"#ff4d4f":n>=70?"#faad14":"#1677ff",style:{marginBottom:0}})]})}},{title:"Created",dataIndex:"created_at",key:"created_at",width:130,ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:e?new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"—"})},{title:"Actions",key:"actions",width:120,align:"right",render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(eR.default,{variant:"Copy",tooltipText:"Copy Team ID",onClick:()=>{navigator.clipboard.writeText(s.team_id).then(()=>sA.message.success("Team ID copied")).catch(()=>sA.message.error("Failed to copy"))}}),"Admin"===n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit team",dataTestId:"edit-team-button",onClick:()=>{ea(s.team_id),er(!0)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete team",dataTestId:"delete-team-button",onClick:()=>eX(s)})]})]})}],[n,ev,x,o]),e8=(0,i.useMemo)(()=>e??[],[e]),e7=[{key:"your-teams",label:"Your Teams",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sz.SearchIcon,{size:16}),suffix:q?(0,t.jsx)(sO,{size:"small"}):null,placeholder:"Search teams by name...",onChange:e=>{var t;return t=e.target.value,void($.current&&clearTimeout($.current),G(!0),$.current=setTimeout(async()=>{try{R(e=>({...e,team_alias:t})),C(1),await K({page:1,teamAlias:t})}finally{G(!1)}},300))},allowClear:!0,style:{maxWidth:400}}),(0,t.jsx)(sR.default,{organizations:o,value:O.organization_id||void 0,onChange:e=>e1("organization_id",e||""),loading:h})]}),(0,t.jsx)(sI.Pagination,{current:v,total:L,pageSize:T,onChange:(e,t)=>{C(e),F(t),K({page:e,size:t})},size:"small",showTotal:e=>`${e} teams`,showSizeChanger:!0,pageSizeOptions:["10","20","50"]})]}),h?(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{padding:"80px 0"},children:(0,t.jsx)(sO,{fontSize:48})}):j?(0,t.jsxs)(sC.Flex,{vertical:!0,align:"center",gap:16,style:{padding:"64px 0"},children:[(0,t.jsx)(e5,{type:"danger",style:{fontSize:15},children:"Failed to load teams"}),(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:j}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>{K()},children:"Retry"})]}):(0,t.jsx)(te.Table,{columns:e3,dataSource:e8,rowKey:"team_id",pagination:!1,onChange:(e,t,s)=>{let a=Array.isArray(s)?s[0]:s,l=a.order?a.columnKey:"created_at",r="ascend"===a.order?"asc":(a.order,"desc");R(e=>({...e,sort_by:l,sort_order:r})),K({sortBy:l,sortOrder:r})},locale:{emptyText:(0,t.jsxs)("div",{style:{padding:"64px 0",textAlign:"center"},children:[(0,t.jsx)(sN.TeamOutlined,{style:{fontSize:40,color:"#d9d9d9",marginBottom:12}}),(0,t.jsx)("div",{children:(0,t.jsx)(e5,{style:{fontSize:15,color:"#595959"},children:"No teams yet"})}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:"Create your first team to organize members and manage access to models."})}),sQ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),style:{marginTop:16},"data-testid":"create-team-button",children:"Create Team"})]})},scroll:{x:1e3},size:"middle"})]}),(0,t.jsx)(sK.default,{isOpen:ex,title:"Delete Team?",alertMessage:eg?.keys?.length===0?void 0:`Warning: This team has ${eg?.keys?.length} keys associated with it. Deleting the team will also delete all associated keys. This action is irreversible.`,message:"Are you sure you want to delete this team and all its keys? This action cannot be undone.",resourceInformationTitle:"Team Information",resourceInformation:[{label:"Team ID",value:eg?.team_id,code:!0},{label:"Team Name",value:eg?.team_alias},{label:"Keys",value:eg?.keys?.length},{label:"Members",value:eg?.members_with_roles?.length}],requiredConfirmation:eg?.team_alias,onCancel:()=>{eh(!1),ef(null)},onOk:eZ,confirmLoading:eN})]})},{key:"available-teams",label:"Available Teams",children:(0,t.jsx)(sv.default,{accessToken:a,userID:r})},...(0,ew.isProxyAdminRole)(n||"")?[{key:"default-settings",label:"Default Team Settings",children:(0,t.jsx)(sk.default,{accessToken:a,userID:r||"",userRole:n||""})}]:[]];return(0,t.jsxs)(e6,{style:{padding:e2.paddingLG,paddingInline:2*e2.paddingLG},children:[es?(0,t.jsx)(sw.default,{teamId:es,onUpdate:e=>{l(t=>null==t?t:t.map(t=>e.team_id===t.team_id?(0,eO.updateExistingKeys)(t,e):t)),K()},onClose:()=>{ea(null),er(!1)},accessToken:a,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let t=0;te.team_id===es)),is_proxy_admin:"Admin"==n,userModels:eu,editTeam:el,premiumUser:d}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsxs)(e4,{level:2,style:{margin:0},children:[(0,t.jsx)(sN.TeamOutlined,{style:{marginRight:8}}),"Teams"]}),(0,t.jsx)(e5,{type:"secondary",children:"Manage teams, members, and their access to models and budgets"})]}),sQ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),"data-testid":"create-team-button",children:"Create Team"})]}),(0,t.jsx)(t2.Tabs,{items:e7})]}),sQ(n,r,o)&&(0,t.jsx)(y.Modal,{title:"Create Team",open:ei,width:1e3,footer:null,onOk:()=>{en(!1),W.resetFields(),eA([]),e$({}),eU(null),eY(e=>e+1)},onCancel:()=>{en(!1),W.resetFields(),eA([]),e$({}),eU(null),eY(e=>e+1)},children:(0,t.jsxs)(k.Form,{form:W,onFinish:e0,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"","data-testid":"team-name-input"})}),(c=sY(n,r,o),m="Admin"!==n,u=1===c.length,p=0===c.length,(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(f.Tooltip,{title:(0,t.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:M?M.organization_id:null,className:"mt-8",rules:m?[{required:!0,message:"Please select an organization"}]:[],help:u?"You can only create teams within this organization":m?"required":"",children:(0,t.jsx)(N.Select,{showSearch:!0,allowClear:!m,disabled:u,placeholder:p?"No organizations available":"Search or select an Organization",onChange:e=>{W.setFieldValue("organization_id",e),z(c?.find(t=>t.organization_id===e)||null)},filterOption:(e,t)=>!!t&&(t.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:c?.map(e=>(0,t.jsxs)(N.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),m&&!u&&c.length>1&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(e5,{style:{color:"#1e40af",fontSize:14},children:"Please select an organization to create a team for. You can only create teams within organizations where you are an admin."})})]})),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(f.Tooltip,{title:"These are the models that your selected team has access to",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),rules:[{required:!0,message:"Please select at least one model"}],name:"models",children:(0,t.jsx)(sW.ModelSelect,{value:W.getFieldValue("models")||[],onChange:e=>W.setFieldValue("models",e),organizationID:W.getFieldValue("organization_id"),options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!W.getFieldValue("organization_id")},context:"team",dataTestId:"create-team-models-select"})}),(0,t.jsx)(k.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(sH.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(k.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(N.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(N.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(N.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(N.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(k.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(k.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsxs)(eG.Accordion,{className:"mt-20 mb-8",onClick:()=>{eD||(eJ(),ez(!0))},children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Additional Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(k.Form.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,t.jsx)(eQ.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,t.jsx)(k.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(sH.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(k.Form.Item,{label:"Team Member 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)(eQ.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(k.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(k.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(k.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,t.jsx)(S.Input.TextArea,{rows:4})}),(0,t.jsx)(k.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:d?"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)(S.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!d})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"Setup your first guardrail",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)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:eC.map(e=>({value:e,label:e}))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(_.Switch,{disabled:!d,checkedChildren:d?"Yes":"Premium feature - Upgrade to disable global guardrails by team",unCheckedChildren:d?"No":"Premium feature - Upgrade to disable global guardrails by team"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(f.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)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:eI.map(e=>({value:e,label:e}))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(f.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)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-8",help:"Select access groups to assign to this team",children:(0,t.jsx)(sB.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(f.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,t.jsx)(sG.default,{onChange:e=>W.setFieldValue("allowed_vector_store_ids",e),value:W.getFieldValue("allowed_vector_store_ids"),accessToken:a||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(f.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,t.jsx)(ey.default,{onChange:e=>W.setFieldValue("allowed_mcp_servers_and_groups",e),value:W.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:a||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(S.Input,{type:"hidden"})}),(0,t.jsx)(k.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)(ej.default,{accessToken:a||"",selectedServers:W.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:W.getFieldValue("mcp_tool_permissions")||{},onChange:e=>W.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(f.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,t.jsx)(s$.default,{onChange:e=>W.setFieldValue("allowed_agents_and_groups",e),value:W.getFieldValue("allowed_agents_and_groups"),accessToken:a||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(sU.default,{value:eL,onChange:eA,premiumUser:d})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(sV.default,{accessToken:a||"",value:eq||void 0,onChange:eU,modelData:eu.length>0?{data:eu.map(e=>({model_name:e}))}:void 0},eH)})})]},`router-settings-accordion-${eH}`),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(e5,{type:"secondary",style:{fontSize:14,marginBottom:16,display:"block"},children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(sq.default,{accessToken:a||"",initialModelAliases:eB,onAliasUpdate:e$,showExampleConfig:!1})]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(V.Button,{htmlType:"submit","data-testid":"create-team-submit",children:"Create Team"})})]})})]})};var sX=e.i(702597),sZ=e.i(846835),s0=e.i(147612),s1=e.i(191403),s2=e.i(976883),s4=e.i(657688),s5=e.i(437902);let{Text:s6}=sn.Typography,s3=({litellmParams:e,accessToken:s,onTestComplete:a})=>{let[l,r]=(0,i.useState)(!0),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{r(!0);try{let t=await (0,w.testSearchToolConnection)(s,e);o(t),"success"===t.status&&eE.default.success("Connection test successful!")}catch(e){o({status:"error",message:e instanceof Error?e.message:"Unknown error occurred",error_type:"NetworkError"})}finally{r(!1),a&&a()}})()},[s,e,a]);let m=n?.message?(e=>{if(!e)return"Unknown error";let t=e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error:\s*/,"").replace(/^AuthenticationError:\s*/,"");if(t.includes("")||t.includes("(.*?)<\/title>/);return e?e[1]:t.includes("401")||t.includes("Authorization Required")?"Authentication failed: Invalid API key or credentials":"Authentication error - please check your API key"}return t.length>200?t.substring(0,200)+"...":t})(n.message):"Unknown error";return l?(0,t.jsx)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,t.jsxs)(s6,{style:{fontSize:"16px"},children:["Testing connection to ",e.search_provider||"search provider","..."]}),(0,t.jsx)(s5.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]})}):n?(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:["success"===n.status?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.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.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,t.jsxs)("div",{style:{marginLeft:"12px"},children:[(0,t.jsxs)(s6,{type:"success",style:{fontSize:"18px",fontWeight:500,display:"block"},children:["Connection to ",e.search_provider," successful!"]}),n.test_query&&(0,t.jsxs)(s6,{style:{fontSize:"14px",color:"#666",marginTop:"8px",display:"block"},children:["Test query: ",(0,t.jsx)("code",{style:{backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"4px"},children:n.test_query})]}),void 0!==n.results_count&&(0,t.jsxs)(s6,{style:{fontSize:"14px",color:"#666",display:"block"},children:["Results retrieved: ",n.results_count]})]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(t0.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(s6,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",e.search_provider||"search provider"," failed"]})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,t.jsxs)(s6,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(s6,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:m}),n.error_type&&(0,t.jsx)("div",{style:{marginTop:"8px"},children:(0,t.jsxs)(s6,{style:{fontSize:"13px",color:"#666"},children:["Error type:"," ",(0,t.jsx)("code",{style:{backgroundColor:"#ffebee",padding:"2px 6px",borderRadius:"4px",color:"#d32f2f"},children:n.error_type})]})}),n.message&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),style:{paddingLeft:0,height:"auto"},children:d?"Hide Details":"Show Details"})})]}),d&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(s6,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Full Error Details"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:n.message})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fffbf0",border:"1px solid #ffe58f",borderLeft:"4px solid #faad14",borderRadius:"8px",padding:"16px"},children:[(0,t.jsx)(s6,{strong:!0,style:{display:"block",marginBottom:"8px",color:"#d48806"},children:"Troubleshooting tips:"}),(0,t.jsxs)("ul",{style:{margin:"8px 0",paddingLeft:"20px",color:"#ad6800"},children:[(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Verify your API key is correct and active"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Check if the search provider service is operational"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Ensure you have sufficient credits/quota with the provider"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Review the provider's documentation for any additional requirements"})]})]})]})}),(0,t.jsx)(F.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(V.Button,{type:"link",href:"https://docs.litellm.ai/docs/search",target:"_blank",icon:(0,t.jsx)(E.InfoCircleOutlined,{}),children:"View Search Documentation"})})]}):null},{TextArea:s8}=S.Input,s7=({providerName:e,displayName:s})=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)(s4.default,{src:`../ui/assets/logos/${e}.png`,alt:"",width:20,height:20,style:{marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,t.jsx)("span",{children:s})]}),s9=({userRole:e,accessToken:s,onCreateSuccess:a,isModalVisible:l,setModalVisible:r})=>{let[o]=k.Form.useForm(),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)({}),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),[j,b]=(0,i.useState)(""),{data:_,isLoading:v}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,w.fetchAvailableSearchProviders)(s)},enabled:!!s&&l}),S=_?.providers||[],C=async e=>{c(!0);try{let t={search_tool_name:e.search_tool_name,litellm_params:{search_provider:e.search_provider,api_key:e.api_key,api_base:e.api_base,timeout:e.timeout?parseFloat(e.timeout):void 0,max_retries:e.max_retries?parseInt(e.max_retries):void 0},search_tool_info:e.description?{description:e.description}:void 0};if(console.log("Creating search tool with payload:",t),null!=s){let e=await (0,w.createSearchTool)(s,t);eE.default.success("Search tool created successfully"),o.resetFields(),u({}),r(!1),a(e)}}catch(e){eE.default.error("Error creating search tool: "+e)}finally{c(!1)}},T=async()=>{try{await o.validateFields(["search_provider","api_key"]),g(!0),b(`test-${Date.now()}`),x(!0)}catch(e){eE.default.error("Please fill in Search Provider and API Key before testing")}};return(i.default.useEffect(()=>{l||u({})},[l]),(0,ew.isAdminRole)(e))?(0,t.jsxs)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)("span",{className:"text-2xl",children:"🔍"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Search Tool"})]}),open:l,width:800,onCancel:()=>{o.resetFields(),u({}),r(!1)},footer:null,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)(k.Form,{form:o,onFinish:C,onValuesChange:(e,t)=>u(t),layout:"vertical",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Tool Name",(0,t.jsx)(f.Tooltip,{title:"A unique name to identify this search tool configuration (e.g., 'perplexity-search', 'tavily-news-search').",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_tool_name",rules:[{required:!0,message:"Please enter a search tool name"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Name can only contain letters, numbers, hyphens, and underscores"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"e.g., perplexity-search, my-tavily-tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Provider",(0,t.jsx)(f.Tooltip,{title:"Select the search provider you want to use. Each provider has different capabilities and pricing.",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(N.Select,{placeholder:"Select a search provider",className:"rounded-lg",size:"large",loading:v,showSearch:!0,optionFilterProp:"children",optionLabelProp:"label",children:S.map(e=>(0,t.jsx)(N.Select.Option,{value:e.provider_name,label:(0,t.jsx)(s7,{providerName:e.provider_name,displayName:e.ui_friendly_name}),children:(0,t.jsx)(s7,{providerName:e.provider_name,displayName:e.ui_friendly_name})},e.provider_name))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["API Key",(0,t.jsx)(f.Tooltip,{title:"The API key for authenticating with the search provider. This will be securely stored.",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"api_key",rules:[{required:!1,message:"Please enter an API key"}],children:(0,t.jsx)(eQ.TextInput,{type:"password",placeholder:"Enter your API key",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description (Optional)"}),name:"description",children:(0,t.jsx)(s8,{rows:3,placeholder:"Brief description of this search tool's purpose",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center pt-6 border-t border-gray-100",children:[(0,t.jsx)(f.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(sn.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(n.Button,{onClick:T,loading:h,children:"Test Connection"}),(0,t.jsx)(n.Button,{loading:d,type:"submit",children:"Add Search Tool"})]})]})]})}),(0,t.jsx)(y.Modal,{title:"Connection Test Results",open:p,onCancel:()=>{x(!1),g(!1)},footer:[(0,t.jsx)(n.Button,{onClick:()=>{x(!1),g(!1)},children:"Close"},"close")],width:700,children:p&&s&&(0,t.jsx)(s3,{litellmParams:{search_provider:m.search_provider,api_key:m.api_key,api_base:m.api_base},accessToken:s,onTestComplete:()=>g(!1)},j)})]}):null};var ae=e.i(350967),at=e.i(678784),as=e.i(118366),aa=e.i(928685);let{Text:al}=sn.Typography,ar=({searchToolName:e,accessToken:s,className:a=""})=>{let[l,r]=(0,i.useState)(""),[n,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)([]),[u,p]=(0,i.useState)({}),[x,h]=(0,i.useState)(!1),g=async()=>{if(!l.trim())return void A.default.warning("Please enter a search query");d(!0);let t=performance.now();try{let a=await (0,w.searchToolQueryCall)(s,e,l),r=performance.now(),i=Math.round(r-t),n={query:l,response:a,timestamp:Date.now(),latency:i};m(e=>[n,...e])}catch(e){console.error("Error querying search tool:",e),eE.default.fromBackend("Failed to query search tool")}finally{d(!1)}},y=e=>new Date(e).toLocaleString(),j=(0,t.jsx)(tw.LoadingOutlined,{style:{fontSize:24},spin:!0}),f=c.length>0?c[0]:null;return(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(ek.Title,{children:"Test Search Tool"})}),(0,t.jsxs)("div",{className:"flex flex-col",style:{minHeight:"600px"},children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex items-stretch gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white rounded-lg px-4 transition-all duration-200",style:{border:x?"2px solid #3b82f6":"2px solid #e5e7eb",boxShadow:x?"0 0 0 3px rgba(59, 130, 246, 0.1)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",height:"48px"},children:[(0,t.jsx)(aa.SearchOutlined,{className:"text-gray-400 mr-3",style:{fontSize:"18px"}}),(0,t.jsx)(S.Input,{value:l,onChange:e=>r(e.target.value),onFocus:()=>h(!0),onBlur:()=>h(!1),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),g())},placeholder:"Enter your search query...",disabled:n,bordered:!1,style:{fontSize:"15px",padding:0,height:"100%",boxShadow:"none"}})]}),(0,t.jsx)(V.Button,{type:"primary",onClick:g,disabled:n||!l.trim(),icon:(0,t.jsx)(aa.SearchOutlined,{}),loading:n,style:{height:"48px",paddingLeft:"24px",paddingRight:"24px",borderRadius:"8px",fontWeight:500,fontSize:"15px",backgroundColor:n||!l.trim()?void 0:"#1890ff",borderColor:n||!l.trim()?void 0:"#1890ff",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:"Search"})]})}),(0,t.jsx)("div",{className:"flex-1",children:f||n?(0,t.jsxs)("div",{children:[n&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center py-16",children:[(0,t.jsx)(eF.Spin,{indicator:j}),(0,t.jsx)(al,{className:"mt-4 text-gray-600 font-medium",children:"Searching..."})]}),f&&!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(al,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Search Query"}),(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mt-1.5",children:f.query})]}),(0,t.jsxs)("div",{className:"text-right ml-4",children:[(0,t.jsx)(al,{className:"text-xs text-gray-500",children:y(f.timestamp)}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,t.jsxs)("div",{className:"text-sm font-semibold text-blue-600",children:[f.response?.results?.length||0," ",f.response?.results?.length===1?"result":"results"]}),void 0!==f.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("div",{className:"text-sm font-semibold text-green-600",children:[f.latency,"ms"]})]})]})]})]})}),f.response&&f.response.results&&f.response.results.length>0?(0,t.jsx)("div",{className:"space-y-3",children:f.response.results.map((e,s)=>{let a=u[`0-${s}`]||!1;return(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",e.currentTarget.style.borderColor="#e0e7ff"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)",e.currentTarget.style.borderColor="#e5e7eb"},children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-600 hover:text-blue-700 flex-1 leading-snug",style:{textDecoration:"none"},onMouseEnter:e=>e.currentTarget.style.textDecoration="underline",onMouseLeave:e=>e.currentTarget.style.textDecoration="none",children:e.title}),(0,t.jsx)(V.Button,{type:"text",size:"small",className:"flex-shrink-0",icon:(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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),onClick:()=>window.open(e.url,"_blank"),style:{color:"#6b7280"}})]}),(0,t.jsx)("div",{className:"text-sm text-green-700 mb-3 truncate font-medium",children:e.url}),(0,t.jsx)("div",{className:"text-sm text-gray-700 leading-relaxed",children:a?e.snippet:`${e.snippet.substring(0,200)}${e.snippet.length>200?"...":""}`}),e.snippet.length>200&&(0,t.jsx)(V.Button,{type:"link",size:"small",className:"mt-3 p-0 h-auto",onClick:()=>{let e;return e=`0-${s}`,void p(t=>({...t,[e]:!t[e]}))},style:{fontSize:"13px",fontWeight:500,color:"#3b82f6"},children:a?"Show less":"Show more"})]})},s)})}):(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 mx-auto mb-4",children:(0,t.jsx)(aa.SearchOutlined,{style:{fontSize:"24px",color:"#9ca3af"}})}),(0,t.jsx)(al,{className:"text-gray-600 font-medium",children:"No results found"}),(0,t.jsx)(al,{className:"text-sm text-gray-500 mt-1",children:"Try a different search query"})]})]}),c.length>1&&(0,t.jsxs)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)(al,{className:"text-sm font-semibold text-gray-700",children:"Previous Searches"}),(0,t.jsx)(V.Button,{onClick:()=>{m([]),p({}),eE.default.success("Search history cleared")},size:"small",type:"link",style:{fontSize:"13px",fontWeight:500},children:"Clear All"})]}),(0,t.jsx)("div",{className:"space-y-2",children:c.slice(1,6).map((e,s)=>(0,t.jsxs)("div",{className:"p-3 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:border-gray-300",onClick:()=>{r(e.query)},children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800 truncate",children:e.query}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-1.5 flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"font-medium text-blue-600",children:[e.response?.results?.length||0," ",e.response?.results?.length===1?"result":"results"]}),void 0!==e.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"•"}),(0,t.jsxs)("span",{className:"font-medium text-green-600",children:[e.latency,"ms"]})]}),(0,t.jsx)("span",{children:"•"}),(0,t.jsx)("span",{children:y(e.timestamp)})]})]},s+1))})]})]}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center p-8",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-24 h-24 rounded-full bg-gray-100 mb-6",children:(0,t.jsx)(aa.SearchOutlined,{style:{fontSize:"48px",color:"#9ca3af"}})}),(0,t.jsx)(al,{className:"text-lg text-gray-600 font-medium",children:"Test your search tool"}),(0,t.jsx)(al,{className:"text-sm text-gray-500 mt-2",children:"Enter a query above to see search results"})]})})]})]})},ai=({searchTool:e,onBack:s,isEditing:a,accessToken:l,availableProviders:r})=>{var d;let c,[m,u]=(0,i.useState)({}),p=async(e,t)=>{await (0,eO.copyToClipboard)(e)&&(u(e=>({...e,[t]:!0})),setTimeout(()=>{u(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eA.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Search Tools"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(ek.Title,{children:e.search_tool_name}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-name"]?(0,t.jsx)(at.CheckIcon,{size:12}):(0,t.jsx)(as.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_name,"search-tool-name"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:e.search_tool_id}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-id"]?(0,t.jsx)(at.CheckIcon,{size:12}):(0,t.jsx)(as.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_id,"search-tool-id"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsxs)(ae.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Provider"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(ek.Title,{children:(d=e.litellm_params.search_provider,c=r.find(e=>e.provider_name===d),c?.ui_friendly_name||d)})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"API Key"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.litellm_params.api_key?"****":"Not set"})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Created At"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleString():"Unknown"})})]})]}),e.search_tool_info?.description&&(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)(g.Text,{children:"Description"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.search_tool_info.description})})]}),(0,t.jsx)("div",{className:"mt-6",children:l&&(0,t.jsx)(ar,{searchToolName:e.search_tool_name,accessToken:l})})]})},an=({accessToken:e,userRole:s,userID:a})=>{let{data:l,isLoading:r,refetch:o}=(0,t1.useQuery)({queryKey:["searchTools"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,w.fetchSearchTools)(e).then(e=>e.search_tools||[])},enabled:!!e}),{data:d,isLoading:c}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,w.fetchAvailableSearchProviders)(e)},enabled:!!e}),m=d?.providers||[],[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(!1),[b,_]=(0,i.useState)(null),[v,C]=(0,i.useState)(!1),[T,F]=(0,i.useState)(!1),[L,A]=(0,i.useState)(!1),[M]=k.Form.useForm(),P=i.default.useMemo(()=>{let e,s,a;return e=e=>{_(e),C(!1)},s=e=>{let t=l?.find(t=>t.search_tool_id===e);t&&(M.setFieldsValue({search_tool_name:t.search_tool_name,search_provider:t.litellm_params.search_provider,api_key:t.litellm_params.api_key,api_base:t.litellm_params.api_base,timeout:t.litellm_params.timeout,max_retries:t.litellm_params.max_retries,description:t.search_tool_info?.description}),_(e),A(!0))},a=D,[{title:"Search Tool ID",dataIndex:"search_tool_id",key:"search_tool_id",render:(s,a)=>a.is_from_config?(0,t.jsx)("span",{className:"text-xs",children:"-"}):(0,t.jsx)("button",{onClick:()=>e(a.search_tool_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left cursor-pointer max-w-40",children:(0,t.jsx)("span",{className:"truncate block",children:a.search_tool_id})})},{title:"Name",dataIndex:"search_tool_name",key:"search_tool_name",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Provider",key:"provider",render:(e,s)=>{let a=s.litellm_params.search_provider,l=m.find(e=>e.provider_name===a),r=l?.ui_friendly_name||a;return(0,t.jsx)("span",{className:"text-sm",children:r})}},{title:"Created At",dataIndex:"created_at",key:"created_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.created_at?new Date(s.created_at).toLocaleDateString():"-"})},{title:"Updated At",dataIndex:"updated_at",key:"updated_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.updated_at?new Date(s.updated_at).toLocaleDateString():"-"})},{title:"Source",key:"source",render:(e,s)=>{let a=s.is_from_config??!1;return(0,t.jsx)(I.Tag,{color:a?"default":"blue",children:a?"Config":"DB"})}},{title:"Actions",key:"actions",render:(e,l)=>{let r=l.search_tool_id,i=l.is_from_config??!1;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit search tool",disabled:i,disabledTooltipText:"Config search tool cannot be edited on the dashboard. Please edit it from the config file.",onClick:()=>{r&&!i&&s(r)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete search tool",disabled:i,disabledTooltipText:"Config search tool cannot be deleted on the dashboard. Please delete it from the config file.",onClick:()=>{r&&!i&&a(r)}})]})}}]},[m,l,M]);function D(e){p(e),h(!0)}let z=async()=>{if(null!=u&&null!=e){f(!0);try{await (0,w.deleteSearchTool)(e,u),eE.default.success("Deleted search tool successfully"),h(!1),p(null),o()}catch(e){console.error("Error deleting the search tool:",e),eE.default.error("Failed to delete search tool")}finally{f(!1)}}},E=l?.find(e=>e.search_tool_id===u),O=E?m.find(e=>e.provider_name===E.litellm_params.search_provider):null,R=async()=>{if(e&&b)try{let t=await M.validateFields(),s={search_tool_name:t.search_tool_name,litellm_params:{search_provider:t.search_provider,api_key:t.api_key,api_base:t.api_base,timeout:t.timeout?parseFloat(t.timeout):void 0,max_retries:t.max_retries?parseInt(t.max_retries):void 0},search_tool_info:t.description?{description:t.description}:void 0};await (0,w.updateSearchTool)(e,b,s),eE.default.success("Search tool updated successfully"),A(!1),M.resetFields(),_(null),o()}catch(e){console.error("Failed to update search tool:",e),eE.default.error("Failed to update search tool")}};return e&&s&&a?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(sK.default,{isOpen:x,title:"Delete Search Tool",message:"Are you sure you want to delete this search tool? This action cannot be undone.",resourceInformationTitle:"Search Tool Information",resourceInformation:E?[{label:"Name",value:E.search_tool_name},{label:"ID",value:E.search_tool_id,code:!0},{label:"Provider",value:O?.ui_friendly_name||E.litellm_params.search_provider},{label:"Description",value:E.search_tool_info?.description||"-"}]:[],onCancel:()=>{h(!1),p(null)},onOk:z,confirmLoading:j}),(0,t.jsx)(s9,{userRole:s,accessToken:e,onCreateSuccess:e=>{F(!1),o()},isModalVisible:T,setModalVisible:F}),(0,t.jsx)(y.Modal,{title:"Edit Search Tool",open:L,onOk:R,onCancel:()=>{A(!1),M.resetFields(),_(null)},width:600,children:(0,t.jsxs)(k.Form,{form:M,layout:"vertical",children:[(0,t.jsx)(k.Form.Item,{name:"search_tool_name",label:"Search Tool Name",rules:[{required:!0,message:"Please enter a search tool name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g., my-perplexity-search"})}),(0,t.jsx)(k.Form.Item,{name:"search_provider",label:"Search Provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(N.Select,{placeholder:"Select a search provider",loading:c,children:m.map(e=>(0,t.jsx)(N.Select.Option,{value:e.provider_name,children:e.ui_friendly_name},e.provider_name))})}),(0,t.jsx)(k.Form.Item,{name:"api_key",label:"API Key",extra:"API key for the search provider",children:(0,t.jsx)(S.Input.Password,{placeholder:"Enter API key"})}),(0,t.jsx)(k.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(S.Input.TextArea,{rows:3,placeholder:"Description of this search tool"})})]})}),(0,t.jsx)(ek.Title,{children:"Search Tools"}),(0,t.jsx)(g.Text,{className:"text-tremor-content mt-2",children:"Configure and manage your search providers"}),(0,ew.isAdminRole)(s)&&(0,t.jsx)(n.Button,{className:"mt-4 mb-4",onClick:()=>F(!0),children:"+ Add New Search Tool"}),(0,t.jsx)(()=>b?(0,t.jsx)(ai,{searchTool:l?.find(e=>e.search_tool_id===b)||{search_tool_id:"",search_tool_name:"",litellm_params:{search_provider:""}},onBack:()=>{C(!1),_(null),o()},isEditing:v,accessToken:e,availableProviders:m}):(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(eF.Spin,{spinning:r,indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"large",children:(0,t.jsx)(te.Table,{bordered:!0,dataSource:l||[],columns:P,rowKey:e=>e.search_tool_id||e.search_tool_name,pagination:!1,locale:{emptyText:"No search tools configured"},size:"small"})})}),{})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:s,userID:a}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))};var ao=e.i(700904),ad=e.i(686311),ac=e.i(37727),am=e.i(643531),au=e.i(636772),ap=e.i(115571);function ax({onOpen:e,onDismiss:s,isVisible:a,title:l,description:r,buttonText:n,icon:o,accentColor:d,buttonStyle:c}){let m=(0,au.useDisableShowPrompts)(),[u,p]=(0,i.useState)(100),[x,h]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{if(!a){p(100),h(!1);return}let e=Date.now(),t=setInterval(()=>{let s=Math.max(0,100-(Date.now()-e)/15e3*100);p(s),s<=0&&clearInterval(t)},50);return()=>clearInterval(t)},[a]),(0,i.useEffect)(()=>{if(x){let e=setTimeout(()=>{h(!1),s()},5e3);return()=>clearTimeout(e)}},[x,s]),x)?(0,t.jsx)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center",children:(0,t.jsx)(am.Check,{className:"h-5 w-5 text-green-600"})}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)("p",{className:"text-sm text-gray-700 font-medium",children:"Got it, we will not ask again. Reactivate this at any time in the User Menu."})})]})})}):!a||m?null:(0,t.jsxs)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:[(0,t.jsx)("div",{className:"h-1 bg-gray-100 w-full",children:(0,t.jsx)("div",{className:"h-full transition-all duration-100 ease-linear",style:{width:`${u}%`,backgroundColor:d}})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",style:{color:d},children:[(0,t.jsx)(o,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm",children:l})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-0.5 rounded hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-3",children:r}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(V.Button,{type:"primary",block:!0,onClick:e,style:c,children:n}),(0,t.jsx)(V.Button,{variant:"outlined",danger:!0,block:!0,onClick:()=>{(0,ap.setLocalStorageItem)("disableShowPrompts","true"),(0,ap.emitLocalStorageChange)("disableShowPrompts"),h(!0)},className:"text-xs",children:"Don't ask me again"})]})]})]})}function ah({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ax,{onOpen:e,onDismiss:s,isVisible:a,title:"Quick feedback",description:"Help us improve LiteLLM! Share your experience in 5 quick questions.",buttonText:"Share feedback",icon:ad.MessageSquare,accentColor:"#3b82f6"})}var ag=e.i(972520),ay=e.i(180127),ay=ay,aj=e.i(536916);let af=[{id:"oss_adoption",label:"OSS Adoption",description:"Stars, contributors, forks, community support"},{id:"ai_integration",label:"AI Integration",description:"LiteLLM had the logging/guardrail integration we needed - Langfuse, OTEL, S3 logging, Azure Content Safety guardrails"},{id:"unified_api",label:"Unified API",description:"LiteLLM had the best OpenAI-compatible API across providers - OpenAI, Anthropic, Gemini, etc."},{id:"breadth_of_models",label:"Breadth of Models/Providers",description:"LiteLLM had the provider + endpoint combinations we needed - /ocr endpoint with Mistral OCR, /batches endppint with Bedrock API, etc."},{id:"other",label:"Other",description:"Something else not listed above"}];function ab({isOpen:e,onClose:s,onComplete:a}){let[l,r]=(0,i.useState)(1),[n,o]=(0,i.useState)({usingAtCompany:null,companyName:"",startDate:"",reasons:[],otherReason:"",email:""}),[d,c]=(0,i.useState)(!1),m=!0===n.usingAtCompany?5:4;if(!e)return null;let u=async()=>{c(!0);try{let e={oss_adoption:"OSS Adoption (stars, contributors, forks)",ai_integration:"AI Integration (Langfuse, OTEL, S3, Azure Content Safety)",unified_api:"Unified API (OpenAI-compatible)",breadth_of_models:"Breadth of Models/Providers (/ocr, /batches, Bedrock, Azure OCR)"},t=n.reasons.map(t=>"other"===t&&n.otherReason?`Other: ${n.otherReason}`:e[t]||t),s=new URLSearchParams({"entry.2015264290":n.usingAtCompany?"Yes":"No","entry.1876243786":n.companyName||"","entry.1282591459":n.startDate,"entry.393456108":t.join(", "),"entry.928142208":n.email||""});await fetch("https://feedback.litellm.ai/survey",{method:"POST",mode:"no-cors",body:s})}catch(e){console.error("Failed to submit survey:",e)}c(!1),a()},p=(e,t)=>{o(s=>({...s,[e]:t}))},x=e=>{o(t=>({...t,reasons:t.reasons.includes(e)?t.reasons.filter(t=>t!==e):[...t.reasons,e]}))},h=()=>{if(!1===n.usingAtCompany){if(1===l)return 1;if(3===l)return 2;if(4===l)return 3;if(5===l)return 4}return l},g=5===l;return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-lg bg-white rounded-xl shadow-2xl overflow-hidden flex flex-col max-h-[90vh] transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-blue-600",children:[(0,t.jsx)(ad.MessageSquare,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Quick Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-5 w-5"})})]}),(0,t.jsx)(sF.Progress,{percent:h()/m*100,showInfo:!1,strokeColor:"#2563eb",className:"m-0"}),(0,t.jsx)("div",{className:"p-8 flex-1 overflow-y-auto",children:1===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Are you using LiteLLM at your company?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Help us understand how our product is being used in professional environments."}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 pt-4",children:[(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!0),className:`p-6 rounded-lg border-2 text-left transition-all ${!0===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"Yes"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"We use it for work"})]}),(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!1),className:`p-6 rounded-lg border-2 text-left transition-all ${!1===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"No"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Personal project / Hobby"})]})]})]}):2===l&&!0===n.usingAtCompany?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"What company are you using LiteLLM at?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"This helps us understand our user base better."}),(0,t.jsx)(S.Input,{size:"large",placeholder:"Enter your company name",value:n.companyName,onChange:e=>p("companyName",e.target.value),autoFocus:!0})]}):3===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"When did you start using LiteLLM?"}),(0,t.jsx)(T.Radio.Group,{value:n.startDate,onChange:e=>p("startDate",e.target.value),className:"w-full",children:(0,t.jsx)(U.Space,{direction:"vertical",className:"w-full",children:["Less than a month ago","1-3 months ago","3-6 months ago","More than 6 months ago"].map(e=>(0,t.jsx)("label",{className:`flex items-center p-4 rounded-lg border cursor-pointer transition-all w-full ${n.startDate===e?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:(0,t.jsx)(T.Radio,{value:e,children:e})},e))})})]}):4===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Why did you pick LiteLLM over other AI Gateways?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Select all that apply."}),(0,t.jsx)("div",{className:"space-y-3",children:af.map(e=>{let s=n.reasons.includes(e.id);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>x(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),x(e.id))},className:`flex items-start p-4 rounded-lg border cursor-pointer transition-all ${s?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:[(0,t.jsx)(aj.Checkbox,{checked:s,className:"mt-0.5 pointer-events-none"}),(0,t.jsxs)("div",{className:"ml-3",children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900",children:e.label}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.description})]})]}),"other"===e.id&&s&&(0,t.jsx)(S.Input,{className:"mt-2 ml-7",placeholder:"Please specify...",value:n.otherReason,onChange:e=>p("otherReason",e.target.value),onClick:e=>e.stopPropagation(),autoFocus:!0})]},e.id)})})]}):5===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Want to share more?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Leave your email and we may reach out to learn more about your experience. This is completely optional."}),(0,t.jsx)(S.Input,{size:"large",type:"email",placeholder:"your@email.com (optional)",value:n.email,onChange:e=>p("email",e.target.value),autoFocus:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"We will only use this to follow up on your feedback. No spam, ever."})]}):null}),(0,t.jsxs)("div",{className:"px-6 py-4 bg-gray-50 border-t border-gray-200 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-sm text-gray-500 font-medium",children:["Step ",h()," of ",m]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[l>1&&(0,t.jsx)(V.Button,{onClick:()=>{3===l&&!1===n.usingAtCompany?r(1):r(l-1)},disabled:d,icon:(0,t.jsx)(ay.default,{className:"h-4 w-4"}),children:"Back"}),(0,t.jsxs)(V.Button,{type:"primary",onClick:()=>{1===l&&!1===n.usingAtCompany?r(3):l<5?r(l+1):u()},disabled:!(1===l?null!==n.usingAtCompany:2===l?n.companyName.trim().length>0:3===l?""!==n.startDate:4===l?n.reasons.includes("other")?n.reasons.length>0&&n.otherReason.trim().length>0:n.reasons.length>0:5===l)||d,loading:d,className:"min-w-[100px]",children:[g?"Submit":"Next",!g&&(0,t.jsx)(ag.ArrowRight,{className:"ml-2 h-4 w-4"})]})]})]})]})]})}var a_=e.i(758472);function av({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ax,{onOpen:e,onDismiss:s,isVisible:a,title:"Claude Code Feedback",description:"Help us improve your Claude Code experience with LiteLLM! Share your feedback in 4 quick questions.",buttonText:"Share feedback",icon:a_.Code,accentColor:"#7c3aed",buttonStyle:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"}})}function aw({isOpen:e,onClose:s,onComplete:a}){return e?(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-md bg-white rounded-xl shadow-2xl overflow-hidden transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-purple-600",children:[(0,t.jsx)(a_.Code,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Claude Code Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"p-8",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Help us improve your experience"}),(0,t.jsx)("p",{className:"text-gray-600 mb-6",children:"We'd love to hear about your experience using LiteLLM with Claude Code. Your feedback helps us improve the product for everyone."}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-6",children:"This brief survey takes about 2-3 minutes to complete."}),(0,t.jsx)(V.Button,{type:"primary",size:"large",block:!0,onClick:()=>{window.open("https://forms.gle/LZeJQ3XytBakckYa9","_blank","noopener,noreferrer"),a()},icon:(0,t.jsx)(t$.ExternalLink,{className:"h-4 w-4"}),style:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"},children:"Open Feedback Form"})]})]})]}):null}var ak=e.i(345244),aN=e.i(662316),aS=e.i(208075),aC=e.i(735042),aT=e.i(693569),aI=e.i(263147),aF=e.i(954616),aL=e.i(912598);let aA=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"DELETE",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}};var aM=e.i(152990),aP=e.i(682830),aD=e.i(657150),aD=aD,az=e.i(302202),aE=e.i(446891);let aO=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};var aR=e.i(21548),aB=e.i(573421),a$=e.i(516430),aD=aD,aq=e.i(823429),aq=aq,sE=sE,aU=e.i(304911),aV=e.i(289793),aH=e.i(500727),aD=aD,aG=e.i(168118);let{TextArea:aK}=S.Input;function aW({form:e,isNameDisabled:s=!1}){let{data:a}=(0,aV.useAgents)(),{data:l}=(0,aH.useMCPServers)(),r=a?.agents??[],i=[{key:"1",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aG.InfoIcon,{size:16}),"General Info"]}),children:(0,t.jsxs)("div",{style:{paddingTop:16},children:[(0,t.jsx)(k.Form.Item,{name:"name",label:"Group Name",rules:[{required:!0,message:"Please enter the access group name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. Engineering Team",disabled:s})}),(0,t.jsx)(k.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(aK,{rows:4,placeholder:"Describe the purpose of this access group..."})})]})},{key:"2",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(sD,{size:16}),"Models"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(k.Form.Item,{name:"modelIds",label:"Allowed Models",children:(0,t.jsx)(sW.ModelSelect,{context:"global",value:e.getFieldValue("modelIds")??[],onChange:t=>e.setFieldsValue({modelIds:t}),style:{width:"100%"}})})})},{key:"3",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(az.ServerIcon,{size:16}),"MCP Servers"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(k.Form.Item,{name:"mcpServerIds",label:"Allowed MCP Servers",children:(0,t.jsx)(N.Select,{mode:"multiple",placeholder:"Select MCP servers",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:(l??[]).map(e=>({label:e.server_name??e.server_id,value:e.server_id}))})})})},{key:"4",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aD.default,{size:16}),"Agents"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(k.Form.Item,{name:"agentIds",label:"Allowed Agents",children:(0,t.jsx)(N.Select,{mode:"multiple",placeholder:"Select agents",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:r.map(e=>({label:e.agent_name,value:e.agent_id}))})})})}];return(0,t.jsx)(k.Form,{form:e,layout:"vertical",name:"access_group_form",initialValues:{modelIds:[],mcpServerIds:[],agentIds:[]},children:(0,t.jsx)(t2.Tabs,{defaultActiveKey:"1",items:i})})}let aQ=async(e,t,s)=>{let a=(0,w.getProxyBaseUrl)(),l=`${a}/v1/access_group/${encodeURIComponent(t)}`,r=await fetch(l,{method:"PUT",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){let e=await r.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return r.json()};function aY({visible:e,accessGroup:s,onCancel:a,onSuccess:l}){let[r]=k.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async({accessGroupId:t,params:s})=>{if(!e)throw Error("Access token is required");return aQ(e,t,s)},onSuccess:(e,{accessGroupId:s})=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all}),t.invalidateQueries({queryKey:aI.accessGroupKeys.detail(s)})}})})();return(0,i.useEffect)(()=>{e&&s&&r.setFieldsValue({name:s.access_group_name,description:s.description??"",modelIds:s.access_model_names??[],mcpServerIds:s.access_mcp_server_ids??[],agentIds:s.access_agent_ids??[]})},[e,s,r]),(0,t.jsx)(y.Modal,{title:"Edit Access Group",open:e,onOk:()=>{r.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};n.mutate({accessGroupId:s.access_group_id,params:t},{onSuccess:()=>{A.default.success("Access group updated successfully"),l?.(),a()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:a,width:700,okText:"Save Changes",cancelText:"Cancel",confirmLoading:n.isPending,destroyOnHidden:!0,children:(0,t.jsx)(aW,{form:r})})}let{Title:aJ,Text:aX}=sn.Typography,{Content:aZ}=sT.Layout;function a0({accessGroupId:e,onBack:s}){let{data:a,isLoading:l}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aL.useQueryClient)();return(0,t1.useQuery)({queryKey:aI.accessGroupKeys.detail(e),queryFn:async()=>aO(t,e),enabled:!!(t&&e)&&ew.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(aI.accessGroupKeys.list({}));return t?.find(t=>t.access_group_id===e)}})})(e),{token:r}=sL.theme.useToken(),[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(!1);if(l)return(0,t.jsx)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!a)return(0,t.jsxs)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aR.Empty,{description:"Access group not found"})]});let p=a.access_model_names??[],x=a.access_mcp_server_ids??[],h=a.access_agent_ids??[],g=a.assigned_key_ids??[],y=a.assigned_team_ids??[],j=d?g:g.slice(0,5),f=m?y:y.slice(0,5),b=[{key:"models",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sD,{size:16}),"Models",(0,t.jsx)(I.Tag,{style:{marginInlineEnd:0},children:p?.length})]}),children:p?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:p,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No models assigned to this group"})},{key:"mcp",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(az.ServerIcon,{size:16}),"MCP Servers",(0,t.jsx)(I.Tag,{children:x?.length})]}),children:x?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:x,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No MCP servers assigned to this group"})},{key:"agents",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(aD.default,{size:16}),"Agents",(0,t.jsx)(I.Tag,{children:h?.length})]}),children:h?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:h,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No agents assigned to this group"})}];return(0,t.jsxs)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(aJ,{level:2,style:{margin:0},children:a.access_group_name}),(0,t.jsxs)(aX,{type:"secondary",children:["ID: ",(0,t.jsx)(aX,{copyable:!0,children:a.access_group_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(aq.default,{size:16}),onClick:()=>{o(!0)},children:"Edit Access Group"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Group Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:a.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(a.created_at).toLocaleString(),a.created_by&&(0,t.jsxs)(aX,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:a.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(a.updated_at).toLocaleString(),a.updated_by&&(0,t.jsxs)(aX,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:a.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sM.KeyIcon,{size:16}),"Attached Keys",(0,t.jsx)(I.Tag,{children:g?.length})]}),extra:g?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),children:d?"Show Less":`View All (${g?.length})`}):null,children:g?.length>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:8,children:j.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aX,{code:!0,style:{fontSize:12},children:e.length>20?`${e.slice(0,10)}...${e.slice(-6)}`:e})},e))}):(0,t.jsx)(aR.Empty,{description:"No keys attached",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sE.default,{size:16}),"Attached Teams",(0,t.jsx)(I.Tag,{children:y?.length})]}),extra:y?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>u(!m),children:m?"Show Less":`View All (${y?.length})`}):null,children:y?.length>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:8,children:f.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aX,{code:!0,style:{fontSize:12},children:e})},e))}):(0,t.jsx)(aR.Empty,{description:"No teams attached",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ts.Card,{children:(0,t.jsx)(t2.Tabs,{defaultActiveKey:"models",items:b})}),(0,t.jsx)(aY,{visible:n,accessGroup:a,onCancel:()=>o(!1)})]})}let a1=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group`,l=await fetch(a,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};function a2({visible:e,onCancel:s,onSuccess:a}){let[l]=k.Form.useForm(),r=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return a1(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all})}})})();return(0,t.jsx)(y.Modal,{title:"Create Access Group",open:e,onOk:()=>{l.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};r.mutate(t,{onSuccess:()=>{A.default.success("Access group created successfully"),l.resetFields(),a?.(),s()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:s,width:700,okText:"Create Group",cancelText:"Cancel",confirmLoading:r.isPending,destroyOnClose:!0,children:(0,t.jsx)(aW,{form:l})})}let{Title:a4,Text:a5}=sn.Typography,{Content:a6}=sT.Layout;function a3(e){return{id:e.access_group_id,name:e.access_group_name,description:e.description??"",modelIds:e.access_model_names,mcpServerIds:e.access_mcp_server_ids,agentIds:e.access_agent_ids,keyIds:e.assigned_key_ids,teamIds:e.assigned_team_ids,createdAt:e.created_at,createdBy:e.created_by??"",updatedAt:e.updated_at,updatedBy:e.updated_by??""}}function a8(){let{token:e}=sL.theme.useToken(),{data:s,isLoading:a}=(0,aI.useAccessGroups)(),l=(0,i.useMemo)(()=>(s??[]).map(a3),[s]),[r,n]=(0,i.useState)(null),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[u,p]=(0,i.useState)(1),[x,h]=(0,i.useState)([]),[g,y]=(0,i.useState)(null),j=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return aA(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all})}})})();(0,i.useEffect)(()=>{p(1)},[c]);let b=(0,i.useMemo)(()=>l.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())||e.id.toLowerCase().includes(c.toLowerCase())||e.description.toLowerCase().includes(c.toLowerCase())),[l,c]),_=(0,i.useMemo)(()=>[{id:"id",accessorKey:"id",header:()=>(0,t.jsx)("span",{children:"ID"}),enableSorting:!1,size:170,cell:({row:e})=>{let s=e.original;return(0,t.jsx)(f.Tooltip,{title:s.id,children:(0,t.jsx)(a5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>n(s.id),children:s.id})})}},{id:"name",accessorKey:"name",header:()=>(0,t.jsx)("span",{children:"Name"}),enableSorting:!0,cell:({getValue:e})=>e()},{id:"resources",header:()=>(0,t.jsx)("span",{children:"Resources"}),enableSorting:!1,cell:({row:e})=>{let s=e.original,a=s.modelIds??[],l=s.mcpServerIds??[],r=s.agentIds??[];return(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a?.length} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),a?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${l?.length} MCP Servers`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(az.ServerIcon,{size:14}),l?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${r?.length} Agents`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(aD.default,{size:14}),r?.length]})})})]})}},{id:"createdAt",accessorKey:"createdAt",header:()=>(0,t.jsx)("span",{children:"Created"}),enableSorting:!0,sortingFn:"datetime",cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["lg"]}},{id:"updatedAt",accessorKey:"updatedAt",header:()=>(0,t.jsx)("span",{children:"Updated"}),enableSorting:!1,cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["xl"]}},{id:"actions",header:()=>(0,t.jsx)("span",{children:"Actions"}),enableSorting:!1,cell:({row:e})=>(0,t.jsx)(U.Space,{children:(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete access group",onClick:()=>y(e.original)})})}],[]),v=(0,aM.useReactTable)({data:b,columns:_,state:{sorting:x},onSortingChange:h,getCoreRowModel:(0,aP.getCoreRowModel)(),getSortedRowModel:(0,aP.getSortedRowModel)(),getRowId:e=>e.id}),w=v.getRowModel().rows,k=w.slice((u-1)*10,10*u),N=(0,i.useMemo)(()=>new Map(k.map(e=>[e.original.id,e])),[k]),C=(v.getHeaderGroups()[0]?.headers??[]).map(e=>{let s=e.column.getCanSort(),a=e.column.getIsSorted(),l=e.column.columnDef.meta,r={title:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[e.isPlaceholder?null:(0,aM.flexRender)(e.column.columnDef.header,e.getContext()),s&&(0,t.jsx)(aE.TableHeaderSortDropdown,{sortState:!1!==a&&a,onSortChange:t=>{h(!1===t?[]:[{id:e.column.id,desc:"desc"===t}])},columnId:e.column.id})]}),key:e.id,width:e.column.columnDef.size,render:(t,s)=>{let a=N.get(s.id);if(!a)return null;let l=a.getVisibleCells().find(t=>t.column.id===e.id);return l?(0,aM.flexRender)(l.column.columnDef.cell,l.getContext()):null}};return l?.responsive&&(r.responsive=l.responsive),r}),T=k.map(e=>e.original);return r?(0,t.jsx)(a0,{accessGroupId:r,onBack:()=>n(null)}):(0,t.jsxs)(a6,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(a4,{level:2,style:{margin:0},children:"Access Groups"}),(0,t.jsx)(a5,{type:"secondary",children:"Manage resource permissions for your organization"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>d(!0),children:"Create Access Group"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sz.SearchIcon,{size:16}),placeholder:"Search groups by name, ID, or description...",style:{maxWidth:400},value:c,onChange:e=>m(e.target.value),allowClear:!0}),(0,t.jsx)(sI.Pagination,{current:u,total:w?.length,pageSize:10,onChange:e=>p(e),size:"small",showTotal:e=>`${e} groups`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:C,dataSource:T,rowKey:"id",loading:a,pagination:!1})]}),(0,t.jsx)(a2,{visible:o,onCancel:()=>d(!1)}),(0,t.jsx)(sK.default,{isOpen:!!g,title:"Delete Access Group",message:"Are you sure you want to delete this access group? This action cannot be undone.",resourceInformationTitle:"Access Group Information",resourceInformation:[{label:"ID",value:g?.id,code:!0},{label:"Name",value:g?.name},{label:"Description",value:g?.description||"—"}],onCancel:()=>y(null),onOk:()=>{g&&j.mutate(g.id,{onSuccess:()=>{y(null)}})},confirmLoading:j.isPending})]})}var a7=e.i(510674);let a9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder-add",theme:"outlined"};var le=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:a9}))});let lt=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/project/new`,l=await fetch(a,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};function ls({form:e}){let{accessToken:s,userId:a,userRole:l}=(0,R.default)(),{data:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)([]);(0,i.useEffect)(()=>{(async()=>{if(s)try{let e=(await (0,w.getGuardrailsList)(s)).guardrails.map(e=>e.guardrail_name);u(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[s]);let p=k.Form.useWatch("team_id",e);return(0,i.useEffect)(()=>{if(p&&r){let e=r.find(e=>e.team_id===p)??null;e&&e.team_id!==n?.team_id&&o(e)}},[p,r,n?.team_id]),(0,i.useEffect)(()=>{a&&l&&s&&n?(0,sX.fetchTeamModels)(a,l,s,n.team_id).then(e=>{c(Array.from(new Set([...n.models??[],...e])))}):c([])},[n,s,a,l]),(0,t.jsxs)(k.Form,{form:e,layout:"vertical",name:"project_form",initialValues:{isBlocked:!1},style:{marginTop:24},children:[(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:13,color:"#374151",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Basic Information"}),(0,t.jsx)(F.Divider,{style:{marginTop:8,marginBottom:16}}),(0,t.jsxs)(t_.Row,{gutter:24,children:[(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(k.Form.Item,{name:"project_alias",label:"Project Name",rules:[{required:!0,message:"Please enter a project name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. Customer Support Bot"})})}),(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(k.Form.Item,{name:"team_id",label:"Team",rules:[{required:!0,message:"Please select a team"}],children:(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Search or select a team",onChange:t=>{o(r?.find(e=>e.team_id===t)??null),e.setFieldValue("models",[])},allowClear:!0,optionLabelProp:"label",filterOption:(e,t)=>{let s=r?.find(e=>e.team_id===t?.value);if(!s)return!1;let a=e.toLowerCase().trim();return(s.team_alias||"").toLowerCase().includes(a)||s.team_id.toLowerCase().includes(a)},children:r?.map(e=>(0,t.jsxs)(N.Select.Option,{value:e.team_id,label:e.team_alias||e.team_id,children:[(0,t.jsx)("span",{style:{fontWeight:500},children:e.team_alias})," ",(0,t.jsxs)("span",{style:{color:"#9ca3af"},children:["(",e.team_id,")"]})]},e.team_id))})})})]}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(k.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(S.Input.TextArea,{placeholder:"Describe the purpose of this project",rows:3})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(k.Form.Item,{name:"models",label:"Allowed Models (scoped to selected team's models)",help:n?void 0:"Select a team first to see available models",children:(0,t.jsxs)(N.Select,{mode:"multiple",placeholder:n?"Select models":"Select a team first",disabled:!n,allowClear:!0,maxTagCount:"responsive",onChange:t=>{t.includes("all-team-models")&&e.setFieldsValue({models:["all-team-models"]})},children:[(0,t.jsx)(N.Select.Option,{value:"all-team-models",children:"All Team Models"},"all-team-models"),d.map(e=>(0,t.jsx)(N.Select.Option,{value:e,children:(0,B.getModelDisplayName)(e)},e))]})})})}),(0,t.jsx)(t_.Row,{gutter:24,children:(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(k.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,t.jsx)(L.InputNumber,{prefix:"$",style:{width:"100%"},placeholder:"0.00",min:0,precision:2})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(q.Collapse,{ghost:!0,style:{background:"#f9fafb",borderRadius:8,border:"1px solid #e5e7eb"},items:[{key:"1",label:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{color:"#374151"},children:"Advanced Settings"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sC.Flex,{align:"center",gap:12,children:[(0,t.jsx)(sn.Typography.Text,{strong:!0,children:"Block Project"}),(0,t.jsx)(k.Form.Item,{name:"isBlocked",valuePropName:"checked",noStyle:!0,children:(0,t.jsx)(_.Switch,{})})]}),(0,t.jsx)(k.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.isBlocked!==t.isBlocked,children:({getFieldValue:e})=>e("isBlocked")?(0,t.jsx)(j.Alert,{banner:!0,type:"warning",showIcon:!0,message:"All API requests using keys under this project will be rejected.",style:{marginTop:12}}):null}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(k.Form.Item,{label:"Guardrails",name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:m.map(e=>({value:e,label:e}))})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Model-Specific Limits"}),(0,t.jsx)(k.Form.List,{name:"modelLimits",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(k.Form.Item,{...r,name:[a,"model"],rules:[{required:!0,message:"Missing model"},{validator:(t,s)=>s&&(e.getFieldValue("modelLimits")??[]).filter(e=>e?.model===s).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],children:(0,t.jsx)(S.Input,{placeholder:"Model name (e.g. gpt-4)"})}),(0,t.jsx)(k.Form.Item,{...r,name:[a,"tpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(k.Form.Item,{...r,name:[a,"rpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(k.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Model Limit"})})]})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Metadata"}),(0,t.jsx)(k.Form.List,{name:"metadata",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(k.Form.Item,{...r,name:[a,"key"],rules:[{required:!0,message:"Missing key"},{validator:(t,s)=>s&&(e.getFieldValue("metadata")??[]).filter(e=>e?.key===s).length>1?Promise.reject(Error("Duplicate key")):Promise.resolve()}],children:(0,t.jsx)(S.Input,{placeholder:"Key"})}),(0,t.jsx)(k.Form.Item,{...r,name:[a,"value"],rules:[{required:!0,message:"Missing value"}],children:(0,t.jsx)(S.Input,{placeholder:"Value"})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(k.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Key-Value Pair"})})]})})]})}]})})})]})}function la(e){let t={},s={};for(let a of e.modelLimits??[])a.model&&(null!=a.rpm&&(t[a.model]=a.rpm),null!=a.tpm&&(s[a.model]=a.tpm));let a={};for(let t of e.metadata??[])t.key&&(a[t.key]=t.value);return{project_alias:e.project_alias,description:e.description,models:e.models??[],max_budget:e.max_budget,blocked:e.isBlocked??!1,...e.guardrails&&e.guardrails.length>0&&{guardrails:e.guardrails},...Object.keys(t).length>0&&{model_rpm_limit:t},...Object.keys(s).length>0&&{model_tpm_limit:s},...Object.keys(a).length>0&&{metadata:a}}}function ll({isOpen:e,onClose:s}){let[a]=k.Form.useForm(),l=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return lt(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:a7.projectKeys.all})}})})(),r=async()=>{try{let e=await a.validateFields(),t={...la(e),team_id:e.team_id};l.mutate(t,{onSuccess:()=>{A.default.success("Project created successfully"),a.resetFields(),s()},onError:e=>{A.default.error(e.message||"Failed to create project")}})}catch(e){console.error("Validation failed:",e)}},i=()=>{a.resetFields(),s()};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:18},children:"Create New Project"}),open:e,onCancel:i,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:i,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(le,{}),loading:l.isPending,onClick:r,children:"Create Project"},"submit")],children:(0,t.jsx)(ls,{form:a})})}let lr=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/project/info?project_id=${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()},li=(0,sP.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"}]]);var aq=aq,sE=sE,ln=e.i(987432);let lo=async(e,t,s)=>{let a=(0,w.getProxyBaseUrl)(),l=`${a}/project/update`,r=await fetch(l,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({project_id:t,...s})});if(!r.ok){let e=await r.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return r.json()};function ld({isOpen:e,project:s,onClose:a,onSuccess:l}){let[r]=k.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async({projectId:t,params:s})=>{if(!e)throw Error("Access token is required");return lo(e,t,s)},onSuccess:()=>{t.invalidateQueries({queryKey:a7.projectKeys.all})}})})();(0,i.useEffect)(()=>{if(e&&s){let e=s.metadata??{},t=e.model_rpm_limit??{},a=e.model_tpm_limit??{},l=Array.isArray(e.guardrails)?e.guardrails:[],i=[];for(let e of new Set([...Object.keys(t),...Object.keys(a)]))i.push({model:e,rpm:t[e],tpm:a[e]});let n=new Set(["model_rpm_limit","model_tpm_limit","guardrails"]),o=[];for(let[t,s]of Object.entries(e))n.has(t)||o.push({key:t,value:String(s)});r.setFieldsValue({project_alias:s.project_alias??"",team_id:s.team_id??"",description:s.description??"",models:s.models??[],max_budget:s.litellm_budget_table?.max_budget??void 0,isBlocked:s.blocked,guardrails:l.length>0?l:void 0,modelLimits:i.length>0?i:void 0,metadata:o.length>0?o:void 0})}},[e,s,r]);let o=async()=>{try{let e=await r.validateFields(),t={...la(e),team_id:e.team_id};n.mutate({projectId:s.project_id,params:t},{onSuccess:()=>{A.default.success("Project updated successfully"),l?.(),a()},onError:e=>{A.default.error(e.message||"Failed to update project")}})}catch(e){console.error("Validation failed:",e)}};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:18},children:"Edit Project"}),open:e,onCancel:a,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:a,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(ln.SaveOutlined,{}),loading:n.isPending,onClick:o,children:"Save Changes"},"submit")],children:(0,t.jsx)(ls,{form:r})})}let{Title:lc,Text:lm}=sn.Typography,{Content:lu}=sT.Layout;function lp({projectId:e,onBack:s}){let a,l,r,n,{data:o,isLoading:d}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aL.useQueryClient)();return(0,t1.useQuery)({queryKey:a7.projectKeys.detail(e),queryFn:async()=>lr(t,e),enabled:!!(t&&e)&&ew.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(a7.projectKeys.list({}));return t?.find(t=>t.project_id===e)}})})(e),{data:c}=(0,eV.useTeam)(o?.team_id??void 0),m=c?.team_info??c,{token:u}=sL.theme.useToken(),[p,x]=(0,i.useState)(!1),h=o?.spend??0,g=o?.litellm_budget_table?.max_budget??null,y=null!=g&&g>0,j=y?Math.min(h/g*100,100):0,f=(0,i.useMemo)(()=>Object.entries(o?.model_spend??{}).map(([e,t])=>({model:e,spend:t})).sort((e,t)=>t.spend-e.spend),[o?.model_spend]);return d?(0,t.jsx)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"large"})})}):o?(0,t.jsxs)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(lc,{level:2,style:{margin:0},children:o.project_alias??o.project_id}),(0,t.jsx)(I.Tag,{color:o.blocked?"red":"green",children:o.blocked?"Blocked":"Active"})]}),(0,t.jsxs)(lm,{type:"secondary",children:["ID: ",(0,t.jsx)(lm,{copyable:!0,children:o.project_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(aq.default,{size:16}),onClick:()=>x(!0),children:"Edit Project"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Project Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:o.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(o.created_at).toLocaleString(),o.created_by&&(0,t.jsxs)(lm,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:o.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(o.updated_at).toLocaleString(),o.updated_by&&(0,t.jsxs)(lm,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:o.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:8,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(li,{size:16}),"Budget"]}),style:{height:"100%"},children:(0,t.jsxs)(sC.Flex,{vertical:!0,gap:16,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(lm,{strong:!0,style:{fontSize:28,lineHeight:1},children:["$",h.toFixed(2)]}),(0,t.jsx)("br",{}),(0,t.jsx)(lm,{type:"secondary",children:y?`of $${g.toFixed(2)} budget`:"No budget limit"})]}),y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(sF.Progress,{percent:Math.round(10*j)/10,strokeColor:j>=90?"#f5222d":j>=70?"#faad14":"#52c41a",showInfo:!1}),(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[(Math.round(10*j)/10).toFixed(1),"% utilized"]})]})]})})}),(0,t.jsx)(tv.Col,{xs:24,lg:16,children:(0,t.jsx)(ts.Card,{title:"Spend by Model",style:{height:"100%"},children:f.length>0?(0,t.jsx)(so.BarChart,{data:f,index:"model",categories:["spend"],colors:["cyan"],layout:"vertical",valueFormatter:e=>`$${e.toFixed(4)}`,yAxisWidth:140,showLegend:!1,style:{height:Math.max(40*f.length,120)}}):(0,t.jsx)(aR.Empty,{description:"No model spend recorded yet",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sM.KeyIcon,{size:16}),"Keys"]}),style:{height:"100%"},children:(0,t.jsx)(aR.Empty,{description:"No keys to display",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sE.default,{size:16}),"Team"]}),style:{height:"100%"},children:m?(a=m.max_budget??null,l=m.spend??0,n=(r=null!=a&&a>0)?Math.min(l/a*100,100):0,(0,t.jsxs)(sC.Flex,{vertical:!0,gap:12,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lm,{strong:!0,style:{fontSize:16},children:m.team_alias||m.team_id}),(0,t.jsx)("br",{}),(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:["ID:"," ",(0,t.jsx)(lm,{copyable:!0,style:{fontSize:12},children:m.team_id})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"Models"}),(m.models?.length??0)>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:4,style:{maxHeight:60,overflow:"hidden"},children:m.models?.map(e=>(0,t.jsx)(I.Tag,{style:{margin:0},children:e},e))}):(0,t.jsx)(lm,{type:"secondary",children:"All models"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:2},children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12},children:"Spend"}),(0,t.jsxs)(lm,{style:{fontSize:12},children:["$",l.toFixed(2),r?(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[" ","/ $",a.toFixed(2)]}):(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[" ","(Unlimited)"]})]})]}),r&&(0,t.jsx)(sF.Progress,{percent:Math.round(10*n)/10,strokeColor:n>=90?"#f5222d":n>=70?"#faad14":"#52c41a",size:"small",showInfo:!1})]}),(0,t.jsxs)(sC.Flex,{justify:"space-between",children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12},children:"Members"}),(0,t.jsx)(lm,{style:{fontSize:12},children:m.members_with_roles?.length??0})]})]})):o.team_id?(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{padding:16},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})}):(0,t.jsx)(aR.Empty,{description:"No team assigned",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ld,{isOpen:p,project:o,onClose:()=>x(!1)})]}):(0,t.jsxs)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aR.Empty,{description:"Project not found"})]})}let{Title:lx,Text:lh}=sn.Typography,{Content:lg}=sT.Layout;function ly(){let{token:e}=sL.theme.useToken(),{data:s,isLoading:a}=(0,a7.useProjects)(),{data:l,isLoading:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(""),[p,x]=(0,i.useState)(1);(0,i.useEffect)(()=>{x(1)},[m]);let h=(0,i.useMemo)(()=>{let e=new Map;for(let t of l??[])e.set(t.team_id,t.team_alias??t.team_id);return e},[l]),g=(0,i.useMemo)(()=>{let e=s??[];if(!m)return e;let t=m.toLowerCase();return e.filter(e=>{let s=h.get(e.team_id??"")??"";return(e.project_alias??"").toLowerCase().includes(t)||e.project_id.toLowerCase().includes(t)||(e.description??"").toLowerCase().includes(t)||s.toLowerCase().includes(t)})},[s,m,h]),y=[{title:"ID",dataIndex:"project_id",key:"project_id",width:170,render:e=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(lh,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>o(e),children:e})})},{title:"Name",dataIndex:"project_alias",key:"project_alias",sorter:(e,t)=>(e.project_alias??"").localeCompare(t.project_alias??""),render:e=>e??"—"},{title:"Team",key:"team",sorter:(e,t)=>{let s=h.get(e.team_id??"")??"",a=h.get(t.team_id??"")??"";return s.localeCompare(a)},render:(e,s)=>{if(!s.team_id)return"—";let a=h.get(s.team_id);return a||(r?(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}):s.team_id)}},{title:"Models",key:"models",render:(e,s)=>{let a=s.models??[];return(0,t.jsx)(f.Tooltip,{title:a.length>0?a.join(", "):"No models",children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),a.length]})})})}},{title:"Status",dataIndex:"blocked",key:"status",render:e=>(0,t.jsx)(I.Tag,{color:e?"red":"green",children:e?"Blocked":"Active"})},{title:"Created",dataIndex:"created_at",key:"created_at",sorter:(e,t)=>new Date(e.created_at).getTime()-new Date(t.created_at).getTime(),responsive:["lg"],render:e=>new Date(e).toLocaleDateString()},{title:"Updated",dataIndex:"updated_at",key:"updated_at",responsive:["xl"],render:e=>new Date(e).toLocaleDateString()}];return n?(0,t.jsx)(lp,{projectId:n,onBack:()=>o(null)}):(0,t.jsxs)(lg,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(lx,{level:2,style:{margin:0},children:"Projects"}),(0,t.jsx)(lh,{type:"secondary",children:"Manage projects within your teams"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>c(!0),children:"Create Project"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sz.SearchIcon,{size:16}),placeholder:"Search projects by name, ID, description, or team...",style:{maxWidth:400},value:m,onChange:e=>u(e.target.value),allowClear:!0}),(0,t.jsx)(sI.Pagination,{current:p,total:g.length,pageSize:10,onChange:e=>x(e),size:"small",showTotal:e=>`${e} projects`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:y,dataSource:g.slice((p-1)*10,10*p),rowKey:"project_id",loading:a,pagination:!1})]}),(0,t.jsx)(ll,{isOpen:d,onClose:()=>c(!1)})]})}var lj=e.i(241902);let lf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"};var lb=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:lf}))}),l_=e.i(366308);let lv=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"},{value:"blocked",label:"blocked",color:"#991b1b",bg:"#fee2e2",border:"#fca5a5"}],lw=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"}],lk=({value:e,toolName:s,saving:a,onChange:l,policyType:r="input",size:i="small",minWidth:n=110,stopPropagation:o=!0})=>{let d="output"===r?lw:lv,c=lv.find(t=>t.value===e)??lv[0];return(0,t.jsx)(N.Select,{size:i,value:e,disabled:a,loading:a,onChange:e=>l(s,e),onClick:e=>o&&e.stopPropagation(),style:{minWidth:n,fontWeight:500,backgroundColor:c.bg,borderColor:c.border,color:c.color,borderRadius:999,fontSize:"small"===i?11:12},popupMatchSelectWidth:!1,options:d.map(e=>({value:e.value,label:(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,fontWeight:500,color:e.color},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:e.color,display:"inline-block",flexShrink:0}}),e.label]})}))})},lN="tool-detail";function lS({toolName:e,onBack:s,accessToken:a}){let l=(0,aL.useQueryClient)(),[r,n]=(0,i.useState)(!1),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)("team"),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(null),j=(0,i.useMemo)(()=>{let e,t,s;return e=new Date,(t=new Date).setDate(t.getDate()-90),{start:(s=e=>e.toISOString().slice(0,19).replace("T"," "))(t),end:s(e)}},[]),{data:f,isLoading:b,error:_}=(0,t1.useQuery)({queryKey:[lN,e],queryFn:()=>(0,w.fetchToolDetail)(a,e),enabled:!!a&&!!e}),{data:v}=(0,t1.useQuery)({queryKey:["tool-policy-options"],queryFn:()=>(0,w.fetchToolPolicyOptions)(a),enabled:!!a,staleTime:6e4}),{data:k}=(0,t1.useQuery)({queryKey:["teams-list-tool-detail"],queryFn:()=>(0,w.teamListCall)(a,null,null),enabled:!!a}),{data:S}=(0,t1.useQuery)({queryKey:["keys-list-tool-detail"],queryFn:()=>(0,w.keyListCall)(a,null,null,null,null,null,1,100),enabled:!!a}),{data:C,isLoading:T}=(0,t1.useQuery)({queryKey:["tool-usage-logs",e,j.start,j.end],queryFn:()=>(0,w.getToolUsageLogs)(a,e,{page:1,pageSize:50,startDate:j.start,endDate:j.end}),enabled:!!a&&!!e}),I=(0,i.useMemo)(()=>(C?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:"passed",model:e.model??void 0,input_snippet:e.input_snippet??void 0})),[C?.logs]);(0,i.useMemo)(()=>(Array.isArray(k)?k:k?.data??[]).map(e=>({team_id:e.team_id??e.id??"",team_alias:e.team_alias??e.team_id??"",models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:"",created_at:"",keys:[],members_with_roles:[],spend:0})),[k]);let F=(0,i.useMemo)(()=>(S?.keys??S?.data??[]).map(e=>({token:e.token??e.api_key??e.key_hash??"",key_alias:e.key_alias??(e.token??e.api_key??e.key_hash)?.toString?.()?.substring?.(0,8)})),[S]),L=(0,i.useCallback)(()=>{l.invalidateQueries({queryKey:[lN,e]})},[l,e]),A=(0,i.useCallback)(async(t,s)=>{if(a){d(!0);try{await (0,w.updateToolPolicy)(a,e,{input_policy:s}),L()}catch(e){alert(`Failed to update input policy: ${e instanceof Error?e.message:String(e)}`)}finally{d(!1)}}},[a,e,L]),M=(0,i.useCallback)(async(t,s)=>{if(a){m(!0);try{await (0,w.updateToolPolicy)(a,e,{output_policy:s}),L()}catch(e){alert(`Failed to update output policy: ${e instanceof Error?e.message:String(e)}`)}finally{m(!1)}}},[a,e,L]),P=(0,i.useCallback)(async()=>{if(!a||!e)return;let t="team"===u;if((!t||x)&&(t||g?.token)){n(!0);try{await (0,w.updateToolPolicy)(a,e,{input_policy:"blocked"},{team_id:t?x:void 0,key_hash:t?void 0:g.token,key_alias:t?void 0:g.key_alias}),L(),h(null),y(null)}catch(e){alert(`Failed to add override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,u,x,g,L]),D=(0,i.useCallback)(async t=>{if(a&&e){n(!0);try{await (0,w.deleteToolPolicyOverride)(a,e,{team_id:t.team_id??void 0,key_hash:t.key_hash??void 0}),L()}catch(e){alert(`Failed to remove override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,L]);if(b&&!f)return(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})});if(_&&!f)return(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load tool details."})]});if(!f)return null;let{tool:z,overrides:E}=f,O=v?.input_policies?.find(e=>e.value===z.input_policy)?.description,R=v?.output_policies?.find(e=>e.value===z.output_policy)?.description;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1 flex-wrap",children:[(0,t.jsx)(l_.ToolOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900 font-mono",children:z.tool_name}),(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-gray-100 text-gray-700 border border-gray-200",children:z.origin??"—"}),(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:[(z.call_count??0).toLocaleString()," calls"]})]}),(0,t.jsxs)("dl",{className:"mt-3 flex flex-wrap gap-x-6 gap-y-1 text-sm text-gray-600",children:[z.user_agent&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"User Agent:"}),(0,t.jsx)("dd",{className:"font-mono truncate max-w-[40ch]",title:z.user_agent,children:z.user_agent})]}),z.created_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"First Discovered:"}),(0,t.jsx)("dd",{children:new Date(z.created_at).toLocaleString()})]}),z.last_used_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"Last Used:"}),(0,t.jsx)("dd",{children:new Date(z.last_used_at).toLocaleString()})]})]})]})})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Input Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:O??"Controls what data this tool is allowed to accept."}),(0,t.jsx)(lk,{value:z.input_policy,toolName:z.tool_name,saving:o,onChange:A,policyType:"input",size:"middle",minWidth:140,stopPropagation:!1})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Output Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:R??"Controls how this tool's output is trusted by downstream tools."}),(0,t.jsx)(lk,{value:z.output_policy,toolName:z.tool_name,saving:c,onChange:M,policyType:"output",size:"middle",minWidth:140,stopPropagation:!1})]})]}),E.length>0&&(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Blocked for team or key"}),(0,t.jsx)("ul",{className:"border rounded-md divide-y divide-gray-100 bg-red-50/30",children:E.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between px-3 py-2.5 text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-700",children:[e.team_id?`Team: ${e.team_id}`:"",e.team_id&&e.key_hash?" · ":"",e.key_hash?`Key: ${e.key_alias||e.key_hash.substring(0,8)}`:"",e.team_id||e.key_hash?"":"—"]}),(0,t.jsx)(V.Button,{type:"link",danger:!0,size:"small",disabled:r,onClick:()=>D(e),children:"Remove"})]},e.override_id))})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Block for team or key"}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 max-w-md",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Scope"}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"team"===u,onChange:()=>p("team"),className:"align-middle"}),"Team"]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"key"===u,onChange:()=>p("key"),className:"align-middle"}),"Key"]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"team"===u?"Team":"Key"}),"team"===u?(0,t.jsx)($.default,{value:x??void 0,onChange:e=>h(e||null)}):(0,t.jsx)(N.Select,{placeholder:"Select key",allowClear:!0,showSearch:!0,optionFilterProp:"label",value:g?g.token:void 0,onChange:e=>{y(F.find(t=>t.token===e)??null)},options:F.map(e=>({value:e.token,label:e.key_alias||e.token?.substring?.(0,12)||e.token})),className:"w-full",style:{minWidth:200}})]}),(0,t.jsxs)(V.Button,{type:"primary",danger:!0,disabled:r||("team"===u?!x:!g?.token),loading:r,onClick:P,children:["Block for ",u]})]})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2",children:[(0,t.jsx)(lb,{}),"Recent logs"]}),(0,t.jsx)(st,{guardrailName:z.tool_name,filterAction:"passed",logs:I,logsLoading:T,totalLogs:C?.total??0,accessToken:a,startDate:j.start,endDate:j.end})]})]})]})}var lC=e.i(307582),lT=e.i(969550);function lI(e){return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`}function lF(e,t){if(!e)return!1;try{let s=new Date(e);return lI(s)===t}catch{return!1}}function lL(e,t){return e.filter(e=>lF(e.created_at,t)).length}let lA=({accessToken:e,onSelectTool:s})=>{let[a,l]=(0,i.useState)([]),[r,n]=(0,i.useState)(!0),[o,h]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[j,b]=(0,i.useState)(null),[v,k]=(0,i.useState)(null),[N,S]=(0,i.useState)(""),[C,T]=(0,i.useState)("created_at"),[I,F]=(0,i.useState)("desc"),[L,A]=(0,i.useState)(1),[M,P]=(0,i.useState)(!0),[D,z]=(0,i.useState)({}),E=(0,i.useDeferredValue)(o),O=o||E,R=(0,i.useCallback)(async()=>{if(e){h(!0),y(null);try{let t=await (0,w.fetchToolsList)(e);l(t)}catch(e){y(e.message??"Failed to load tools")}finally{h(!1),n(!1)}}},[e]);(0,i.useEffect)(()=>{R()},[R]),(0,i.useEffect)(()=>{if(!M)return;let e=setInterval(R,15e3);return()=>clearInterval(e)},[M,R]);let B=async(t,s)=>{if(e){b(t);try{await (0,w.updateToolPolicy)(e,t,{input_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,input_policy:s}:e))}catch(e){alert(`Failed to update input policy: ${e.message}`)}finally{b(null)}}},$=async(t,s)=>{if(e){k(t);try{await (0,w.updateToolPolicy)(e,t,{output_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,output_policy:s}:e))}catch(e){alert(`Failed to update output policy: ${e.message}`)}finally{k(null)}}},q=Array.from(new Set(a.map(e=>e.team_id).filter(Boolean))).map(e=>({label:e,value:e})),U=Array.from(new Set(a.map(e=>e.key_alias).filter(Boolean))).map(e=>({label:e,value:e})),V=[{name:"Input Policy",label:"Input Policy",options:lv.map(e=>({label:e.label,value:e.value}))},{name:"Output Policy",label:"Output Policy",options:lw.map(e=>({label:e.label,value:e.value}))},{name:"Team Name",label:"Team Name",options:q},{name:"Key Name",label:"Key Name",options:U}],{newToday:H,newYesterday:G,trendSubtitle:K,totalTools:W,blockedCount:Q,activeTeamsCount:Y,needsReviewTools:J}=(0,i.useMemo)(()=>{let e=new Date,t=lI(e),s=new Date(e);s.setUTCDate(s.getUTCDate()-1);let l=lI(s),r=lL(a,t),i=lL(a,l),n=function(e,t){let s=e-t;if(0!==s)return s>0?`+${s} since yesterday`:`${s} since yesterday`}(r,i),o=a.length,d=a.filter(e=>"blocked"===e.input_policy).length;return{newToday:r,newYesterday:i,trendSubtitle:n,totalTools:o,blockedCount:d,activeTeamsCount:new Set(a.map(e=>e.team_id).filter(Boolean)).size,needsReviewTools:a.filter(e=>lF(e.created_at,t)&&"untrusted"===e.input_policy)}},[a]),X=({label:e,field:s})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(aE.TableHeaderSortDropdown,{sortState:C===s&&I,onSortChange:e=>{!1===e?(T("created_at"),F("desc")):(T(s),F(e)),A(1)}})]}),Z=a.filter(e=>{if(N){let t=N.toLowerCase();if(!(e.tool_name.toLowerCase().includes(t)||(e.team_id??"").toLowerCase().includes(t)||(e.key_alias??"").toLowerCase().includes(t)||(e.key_hash??"").toLowerCase().includes(t)||e.input_policy.toLowerCase().includes(t)||e.output_policy.toLowerCase().includes(t)))return!1}return(!D["Input Policy"]||e.input_policy===D["Input Policy"])&&(!D["Output Policy"]||e.output_policy===D["Output Policy"])&&(!D["Team Name"]||e.team_id===D["Team Name"])&&(!D["Key Name"]||e.key_alias===D["Key Name"])}),ee=[...Z].sort((e,t)=>{let s=e[C]??"",a=t[C]??"";return sa?"desc"===I?-1:1:0}),et=Math.max(1,Math.ceil(ee.length/50)),es=ee.slice((L-1)*50,50*L);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Tool Policies"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ss,{label:"New Today",value:H,valueColor:"text-green-600",subtitle:K,icon:(0,t.jsx)("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})})}),(0,t.jsx)(ss,{label:"Total Tools Discovered",value:W}),(0,t.jsx)(ss,{label:"Blocked Tools",value:Q,valueColor:Q>0?"text-red-600":void 0}),(0,t.jsx)(ss,{label:"Active Teams",value:Y>0?Y:"—"})]}),J.length>0&&(0,t.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-6",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-amber-900 mb-1",children:"Needs Review"}),(0,t.jsxs)("p",{className:"text-sm text-amber-800 mb-3",children:[J.length," new tool",1!==J.length?"s":""," discovered that require policy decisions."]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:J.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-white border border-amber-200 rounded-md text-sm",children:[(0,t.jsx)("span",{className:"font-mono text-amber-900 truncate max-w-[200px]",title:e.tool_name,children:e.tool_name}),(0,t.jsx)("button",{type:"button",onClick:()=>(e=>{let t=ee.findIndex(t=>t.tool_id===e);if(t>=0){let s=Math.floor(t/50)+1;s!==L&&A(s),requestAnimationFrame(()=>{setTimeout(()=>{document.getElementById(`tool-row-${e}`)?.scrollIntoView({behavior:"smooth",block:"center"})},100)})}})(e.tool_id),className:"text-amber-700 hover:text-amber-900 font-medium text-xs whitespace-nowrap",children:"Review"})]},e.tool_id))})]}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("div",{className:"relative w-64",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Tool Name",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:N,onChange:e=>{S(e.target.value),A(1)}}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(_.Switch,{checked:M,onChange:P})]}),(0,t.jsxs)("button",{onClick:R,disabled:O,className:"flex items-center gap-1.5 px-3 py-2 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-60",children:[(0,t.jsx)("svg",{className:`w-4 h-4 ${O?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),O?"Fetching":"Fetch"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm text-gray-600 whitespace-nowrap",children:[(0,t.jsxs)("span",{children:["Showing ",0===Z.length?0:(L-1)*50+1," -"," ",Math.min(50*L,Z.length)," of ",Z.length," results"]}),(0,t.jsxs)("span",{children:["Page ",L," of ",et]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(lT.default,{options:V,onApplyFilters:e=>{z(e),A(1)},onResetFilters:()=>{z({}),A(1)},buttonLabel:"Filters"})})]}),M&&(0,t.jsxs)("div",{className:"bg-green-50 border-b border-green-100 px-6 py-2 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"}),(0,t.jsx)("button",{onClick:()=>P(!1),className:"text-xs text-green-600 underline",children:"Stop"})]}),g&&(0,t.jsx)("div",{className:"mx-6 mt-4 p-3 bg-red-50 border border-red-200 rounded text-sm text-red-700",children:g}),(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 w-full",children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Discovered",field:"created_at"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Tool Name",field:"tool_name"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Input Policy",field:"input_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Output Policy",field:"output_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"# Calls",field:"call_count"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Team Name",field:"team_id"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"Key Hash"}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Key Name",field:"key_alias"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"User Agent"})]})}),(0,t.jsx)(c.TableBody,{children:r?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"Loading tools…"})}):0===es.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"No tools discovered yet. Make a chat completion that returns tool_calls to start auto-discovery."})}):es.map(e=>(0,t.jsxs)(x.TableRow,{id:`tool-row-${e.tool_id}`,className:"h-8 hover:bg-gray-50",children:[(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(lC.TimeCell,{utcTime:e.created_at??""})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden",children:(0,t.jsx)("button",{type:"button",onClick:()=>s?.(e.tool_name),className:"text-left w-full font-mono text-xs max-w-[20ch] truncate block font-medium text-blue-600 hover:text-blue-800 hover:underline focus:outline-none focus:ring-0",children:(0,t.jsx)(f.Tooltip,{title:s?"Click to view details and block for team/key":e.tool_name,children:(0,t.jsx)("span",{children:e.tool_name})})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lk,{value:e.input_policy,toolName:e.tool_name,saving:j===e.tool_name,onChange:B,policyType:"input"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lk,{value:e.output_policy,toolName:e.tool_name,saving:v===e.tool_name,onChange:$,policyType:"output"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)("div",{className:"flex items-center justify-end h-8 tabular-nums text-sm font-mono text-gray-700",children:(e.call_count??0).toLocaleString()})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.team_id??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.team_id??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_hash??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block text-blue-600",children:e.key_hash??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_alias??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.key_alias??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.user_agent??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[20ch] truncate block text-xs text-gray-500",children:e.user_agent??"-"})})})]},e.tool_id))})]}),et>1&&(0,t.jsxs)("div",{className:"border-t px-6 py-3 flex items-center justify-between text-sm text-gray-600",children:[(0,t.jsxs)("span",{children:["Showing ",(L-1)*50+1," - ",Math.min(50*L,ee.length)," of"," ",ee.length]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]})]})};function lM({accessToken:e,userRole:s}){let[a,l]=(0,i.useState)({type:"overview"});return(0,t.jsx)("div",{className:"p-6 w-full min-w-0 flex-1",children:"detail"===a.type?(0,t.jsx)(lS,{toolName:a.toolName,onBack:()=>{l({type:"overview"})},accessToken:e}):(0,t.jsx)(lA,{accessToken:e,userRole:s,onSelectTool:e=>{l({type:"detail",toolName:e})}})})}var lP=e.i(608856),lD=e.i(751904),lz=e.i(123521);let{Text:lE}=sn.Typography,lO=({open:e,mode:s,initialRow:a,onClose:l,onSave:r})=>{let[n]=k.Form.useForm(),[o,d]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&("edit"===s&&a?n.setFieldsValue({key:a.key,value:a.value,metadata:null!=a.metadata?JSON.stringify(a.metadata,null,2):""}):n.resetFields())},[e,s,a,n]);let c=async()=>{let e=await n.validateFields();d(!0);let t=await r(e.key.trim(),e.value??"",e.metadata??"","create"===s);d(!1),t&&(n.resetFields(),l())};return(0,t.jsx)(y.Modal,{open:e,title:"create"===s?"Create memory":`Edit ${a?.key??""}`,onCancel:()=>{n.resetFields(),l()},onOk:c,okText:"create"===s?"Create":"Save",confirmLoading:o,width:640,destroyOnClose:!0,children:(0,t.jsxs)(k.Form,{form:n,layout:"vertical",children:[(0,t.jsx)(k.Form.Item,{label:"Key",name:"key",rules:[{required:!0,message:"Key is required"}],tooltip:"Globally unique — two memories cannot share a key. Namespace your own keys if you need per-user isolation (e.g. user:123:notes).",children:(0,t.jsx)(S.Input,{placeholder:"e.g. user_role",disabled:"edit"===s})}),(0,t.jsx)(k.Form.Item,{label:"Value",name:"value",rules:[{required:!0,message:"Value is required"}],tooltip:"Markdown/text injected into LLM context. Plain strings are fine.",children:(0,t.jsx)(S.Input.TextArea,{rows:8,placeholder:"What the agent should remember…"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata ",(0,t.jsx)(lE,{type:"secondary",children:"(optional JSON)"})]}),name:"metadata",tooltip:"Optional structured metadata — must be valid JSON if provided.",children:(0,t.jsx)(S.Input.TextArea,{rows:4,placeholder:'{"tags": ["example"]}',style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"}})})]})})},{Text:lR,Paragraph:lB,Title:l$}=sn.Typography;function lq(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}let lU=({accessToken:e})=>{let[s,a]=(0,i.useState)(""),[l,r]=(0,i.useState)(""),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(null),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(1);i.default.useEffect(()=>{g(1)},[l]);let y=(0,aL.useQueryClient)(),j="memoryList",{data:b,isLoading:_,isFetching:v}=(0,t1.useQuery)({queryKey:[j,l,h],queryFn:()=>{if(!e)throw Error("Access token required");return(0,w.fetchMemoryList)(e,{keyPrefix:l||void 0,page:h,pageSize:50})},enabled:!!e}),k=(0,i.useMemo)(()=>b?.memories??[],[b]),N=b?.total??0,C=()=>y.invalidateQueries({queryKey:[j]}),T=(0,aF.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");return(0,w.createMemory)(e,t)},onSuccess:e=>{sA.message.success(`Created ${e.key}`),C()},onError:e=>{sA.message.error(`Save failed: ${e.message}`)}}),I=(0,aF.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");let{key:s,...a}=t;return(0,w.updateMemory)(e,s,a)},onSuccess:e=>{sA.message.success(`Updated ${e.key}`),C()},onError:e=>{sA.message.error(`Save failed: ${e.message}`)}}),F=(0,aF.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");return(0,w.deleteMemory)(e,t).then(()=>t)},onSuccess:e=>{sA.message.success(`Deleted ${e}`),C()},onError:e=>{sA.message.error(`Delete failed: ${e.message}`)}}),L=async()=>{if(m)try{await F.mutateAsync(m.key),u(null)}catch{}},A=async(t,s,a,l)=>{let r;if(!e)return!1;if(a.trim())try{r=JSON.parse(a)}catch{return sA.message.error("Metadata must be valid JSON (or leave empty)."),!1}else r=l?void 0:null;try{return l?await T.mutateAsync({key:t,value:s,metadata:r}):await I.mutateAsync({key:t,value:s,metadata:r}),!0}catch{return!1}},M=(e,s)=>{if(!e)return(0,t.jsx)(lR,{type:"secondary",children:"-"});let a=e.length>10?`${e.slice(0,7)}...`:e,l="font-mono text-blue-600 bg-blue-50 text-xs font-medium px-2 py-0.5 rounded-md border border-blue-200 inline-block max-w-[15ch] truncate whitespace-nowrap";return(0,t.jsx)(f.Tooltip,{title:e,children:s?(0,t.jsx)("button",{onClick:s,className:`${l} hover:bg-blue-100 cursor-pointer transition-colors text-left`,children:a}):(0,t.jsx)("span",{className:l,children:a})})},P=[{title:"ID",dataIndex:"memory_id",key:"memory_id",width:140,render:(e,t)=>M(t.memory_id,()=>o(t))},{title:"Name",dataIndex:"key",key:"key",width:200,render:e=>(0,t.jsx)(lR,{code:!0,children:e})},{title:"Preview",dataIndex:"value",key:"value",render:e=>(0,t.jsx)(lR,{type:"secondary",style:{whiteSpace:"pre-wrap"},children:function(e,t=120){if(!e)return"";let s=e.trim();return s.length<=t?s:`${s.slice(0,t)}…`}(e)})},{title:"User ID",dataIndex:"user_id",key:"user_id",width:160,render:e=>M(e)},{title:"Team ID",dataIndex:"team_id",key:"team_id",width:160,render:e=>M(e)},{title:"Updated",dataIndex:"updated_at",key:"updated_at",width:180,render:e=>(0,t.jsx)(lR,{type:"secondary",children:lq(e)})},{title:"",key:"actions",width:140,render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(V.Button,{size:"small",type:"text",icon:(0,t.jsx)(lz.EyeOutlined,{}),onClick:()=>o(s),"aria-label":"View"}),(0,t.jsx)(V.Button,{size:"small",type:"text",icon:(0,t.jsx)(lD.EditOutlined,{}),onClick:()=>c(s),"aria-label":"Edit"}),(0,t.jsx)(V.Button,{size:"small",type:"text",danger:!0,icon:(0,t.jsx)(tt.DeleteOutlined,{}),onClick:()=>{u(s)},"aria-label":"Delete"})]})}];return(0,t.jsxs)("div",{className:"w-full",style:{padding:24},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l$,{level:3,style:{marginBottom:4},children:"Memory"}),(0,t.jsxs)(lB,{type:"secondary",style:{marginBottom:0},children:["Inspect what your agents have stored under ",(0,t.jsx)(lR,{code:!0,children:"/v1/memory"}),". Scoped to memories visible to your user / team (admins see all)."]})]}),(0,t.jsxs)(ts.Card,{children:[(0,t.jsxs)(U.Space,{style:{width:"100%",justifyContent:"space-between",marginBottom:16},wrap:!0,children:[(0,t.jsxs)(U.Space,{children:[(0,t.jsx)(S.Input,{allowClear:!0,placeholder:'Filter by key prefix, e.g. "user:"',prefix:(0,t.jsx)(aa.SearchOutlined,{}),value:s,onChange:e=>a(e.target.value),onPressEnter:()=>r(s.trim()),onClear:()=>{a(""),r("")},style:{width:280}}),(0,t.jsx)(V.Button,{type:"primary",ghost:!0,onClick:()=>r(s.trim()),children:"Search"}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>C(),loading:v&&!_,children:"Refresh"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>x(!0),children:"New memory"})]}),(0,t.jsx)(te.Table,{rowKey:"memory_id",loading:_,dataSource:k,columns:P,pagination:{current:h,pageSize:50,total:N,showSizeChanger:!1,showTotal:(e,t)=>`${t[0]}–${t[1]} of ${e}`,onChange:e=>g(e)},locale:{emptyText:(0,t.jsx)(aR.Empty,{description:l?`No memories with keys starting with "${l}"`:"No memories stored yet"})}})]})]}),(0,t.jsx)(lP.Drawer,{open:!!n,onClose:()=>o(null),title:n?(0,t.jsx)(U.Space,{children:(0,t.jsx)(lR,{code:!0,children:n.key})}):"Memory",width:720,destroyOnClose:!0,children:n&&(0,t.jsxs)(U.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(U.Space,{size:"large",wrap:!0,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,style:{display:"block"},children:"Memory ID"}),(0,t.jsx)(lR,{code:!0,style:{fontSize:12},children:n.memory_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,style:{display:"block"},children:"User ID"}),(0,t.jsx)(lR,{type:n.user_id?void 0:"secondary",children:n.user_id??"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,style:{display:"block"},children:"Team ID"}),(0,t.jsx)(lR,{type:n.team_id?void 0:"secondary",children:n.team_id??"-"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,children:"Value"}),(0,t.jsx)(lB,{style:{background:"#fafafa",padding:12,borderRadius:6,whiteSpace:"pre-wrap",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:13},children:n.value})]}),void 0!==n.metadata&&null!==n.metadata&&(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,children:"Metadata"}),(0,t.jsx)(lB,{style:{background:"#fafafa",padding:12,borderRadius:6,whiteSpace:"pre-wrap",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:12},children:JSON.stringify(n.metadata,null,2)})]}),(0,t.jsxs)(U.Space,{split:(0,t.jsx)(lR,{type:"secondary",children:"·"}),wrap:!0,size:"small",style:{color:"rgba(0,0,0,0.45)"},children:[(0,t.jsxs)(lR,{type:"secondary",children:["Created ",lq(n.created_at),n.created_by?` by ${n.created_by}`:""]}),(0,t.jsxs)(lR,{type:"secondary",children:["Updated ",lq(n.updated_at),n.updated_by?` by ${n.updated_by}`:""]})]})]})}),(0,t.jsx)(lO,{open:p||!!d,mode:d?"edit":"create",initialRow:d??void 0,onClose:()=>{x(!1),c(null)},onSave:A}),(0,t.jsx)(sK.default,{isOpen:!!m,title:"Delete memory",message:"This action cannot be undone.",resourceInformationTitle:"Memory",resourceInformation:m?[{label:"Key",value:m.key,code:!0},{label:"Memory ID",value:m.memory_id,code:!0},{label:"User ID",value:m.user_id??"-",code:!0},{label:"Team ID",value:m.team_id??"-",code:!0}]:[],onCancel:()=>{F.isPending||u(null)},onOk:L,confirmLoading:F.isPending,requiredConfirmation:m?.key})]})},{Text:lV}=sn.Typography,lH={pending:"#a1a1aa",running:"#3b82f6",paused:"#f59e0b",completed:"#22c55e",failed:"#ef4444"},lG={"step.started":{bar:"#f0fdf4",border:"#86efac",text:"#16a34a"},"step.failed":{bar:"#fef2f2",border:"#fca5a5",text:"#dc2626"},"hook.waiting":{bar:"#fffbeb",border:"#fcd34d",text:"#d97706"},"hook.received":{bar:"#eff6ff",border:"#93c5fd",text:"#2563eb"}};function lK(e){let t=Date.now()-new Date(e).getTime();if(isNaN(t))return e;let s=Math.floor(t/1e3);if(s<60)return`${s}s ago`;let a=Math.floor(s/60);if(a<60)return`${a}m ago`;let l=Math.floor(a/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function lW(e){return e<0?"":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function lQ(e){let t=e.metadata?.title;return t?String(t):e.workflow_type??e.run_id.slice(0,8)}function lY(e){return e.slice(0,8)}let lJ=({status:e,size:s=8})=>(0,t.jsx)("span",{style:{display:"inline-block",width:s,height:s,borderRadius:"50%",background:lH[e]??"#a1a1aa",flexShrink:0}}),lX=({value:e})=>{let[s,a]=(0,i.useState)(!1);return e.length<=120?(0,t.jsx)("span",{style:{color:"#27272a",wordBreak:"break-all"},children:e}):(0,t.jsxs)("span",{style:{color:"#27272a",wordBreak:"break-all"},children:[s?e:e.slice(0,120)+"…",(0,t.jsx)("button",{onClick:()=>a(e=>!e),style:{background:"none",border:"none",padding:"0 4px",cursor:"pointer",color:"#2563eb",fontSize:11,flexShrink:0},children:s?"less":"more"})]})},lZ=({run:e})=>{let s=e.metadata??{},a=[{key:"state",label:"state"},{key:"worktree_path",label:"worktree"},{key:"grill_session_id",label:"grill session"},{key:"session_id",label:"session"}],l=new Set(["title",...a.map(e=>e.key)]),r=Object.entries(s).filter(([e,t])=>!l.has(e)&&null!=t&&""!==t);return(0,t.jsxs)("div",{style:{borderRadius:8,border:"1px solid #e4e4e7",marginBottom:16,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{padding:"14px 20px",borderBottom:"1px solid #f4f4f5",display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(lJ,{status:e.status,size:10}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#18181b",flex:1},children:lQ(e)}),(0,t.jsx)("span",{style:{fontFamily:"monospace",fontSize:11,color:"#a1a1aa",background:"#f4f4f5",padding:"2px 8px",borderRadius:4},children:lY(e.run_id)}),(0,t.jsx)("span",{style:{fontSize:11,color:"#a1a1aa",background:"#f4f4f5",padding:"2px 8px",borderRadius:4},children:e.workflow_type})]}),(0,t.jsxs)("div",{style:{padding:"12px 20px",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:"8px 24px",fontFamily:"monospace",fontSize:12},children:[(0,t.jsx)(l0,{label:"status",children:(0,t.jsx)("span",{style:{textTransform:"capitalize",color:"#27272a"},children:e.status})}),(0,t.jsx)(l0,{label:"created",children:(0,t.jsx)("span",{style:{color:"#27272a"},children:lK(e.created_at)})}),s.pr_url&&(0,t.jsx)(l0,{label:"pr",children:(0,t.jsx)("a",{href:String(s.pr_url),target:"_blank",rel:"noopener noreferrer",style:{color:"#2563eb",textDecoration:"none",wordBreak:"break-all"},children:String(s.pr_url)})}),a.map(({key:e,label:a})=>{let l=s[e];if(null==l||""===l)return null;let r="object"==typeof l?JSON.stringify(l):String(l);return(0,t.jsx)(l0,{label:a,children:(0,t.jsx)(lX,{value:r})},e)}),r.map(([e,s])=>{let a="object"==typeof s?JSON.stringify(s):String(s);return(0,t.jsx)(l0,{label:e,children:(0,t.jsx)(lX,{value:a})},e)})]})]})},l0=({label:e,children:s})=>(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:1},children:[(0,t.jsx)("span",{style:{fontSize:10,color:"#a1a1aa",textTransform:"uppercase",letterSpacing:"0.06em"},children:e}),(0,t.jsx)("span",{style:{fontSize:12},children:s})]}),l1=({run:e,events:s})=>{if(0===s.length)return(0,t.jsx)("div",{style:{padding:"16px 0",color:"#a1a1aa",fontSize:12,fontFamily:"monospace"},children:"No events recorded"});let a=new Date(e.created_at).getTime(),l=Math.max(...s.map(e=>new Date(e.created_at).getTime())),r=Math.max(l-a,1),n=lW(l-a);return(0,t.jsxs)("div",{style:{fontFamily:"monospace",fontSize:12},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",gap:"0 12px",marginBottom:2},children:[(0,t.jsx)("div",{}),(0,t.jsx)("div",{style:{position:"relative",height:16},children:[0,100].map(e=>(0,t.jsx)("span",{style:{position:"absolute",left:`${e}%`,transform:100===e?"translateX(-100%)":void 0,fontSize:10,color:"#a1a1aa"},children:0===e?"0":n},e))})]}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",gap:"0 12px",marginBottom:4},children:[(0,t.jsx)("div",{style:{color:"#3f3f46",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingTop:2},children:lQ(e)}),(0,t.jsx)("div",{style:{height:24,background:"#f4f4f5",border:"1px solid #d4d4d8",borderRadius:4,display:"flex",alignItems:"center",paddingLeft:8},children:(0,t.jsx)("span",{style:{color:"#71717a",fontSize:11},children:n})})]}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",gap:"0 12px",rowGap:3},children:s.map(e=>{let n=new Date(e.created_at).getTime(),o=(n-a)/r*100,d=s.findIndex(t=>t.sequence_number>e.sequence_number),c=d>=0?new Date(s[d].created_at).getTime():l+Math.max(.12*r,500),m=Math.max(8,(c-n)/r*100),u=lG[e.event_type]??{bar:"#f4f4f5",border:"#d4d4d8",text:"#52525b"},p=lW(c-n);return(0,t.jsxs)(i.default.Fragment,{children:[(0,t.jsx)("div",{style:{color:u.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingTop:2,paddingLeft:12},children:e.step_name||e.event_type}),(0,t.jsx)("div",{style:{position:"relative",height:24},children:(0,t.jsx)(f.Tooltip,{title:(0,t.jsxs)("div",{style:{fontFamily:"monospace",fontSize:11,lineHeight:1.6},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"type: "}),(0,t.jsx)("span",{style:{color:u.text},children:e.event_type})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"step: "}),e.step_name]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"seq: "}),e.sequence_number]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"time: "}),lK(e.created_at)]}),e.data&&Object.keys(e.data).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"data: "}),JSON.stringify(e.data)]})]}),children:(0,t.jsxs)("div",{style:{position:"absolute",left:`${Math.min(o,92)}%`,width:`${Math.min(m,100-Math.min(o,92))}%`,height:"100%",background:u.bar,border:`1px solid ${u.border}`,borderRadius:4,display:"flex",alignItems:"center",paddingLeft:8,cursor:"default",overflow:"hidden",gap:6},children:[(0,t.jsx)("span",{style:{color:u.text,whiteSpace:"nowrap",fontSize:11},children:e.event_type}),p&&(0,t.jsx)("span",{style:{color:"#a1a1aa",whiteSpace:"nowrap",fontSize:11},children:p})]})})})]},e.event_id)})})]})},l2=({msg:e})=>{let s={user:"#2563eb",assistant:"#16a34a",system:"#7c3aed",tool_result:"#d97706"}[e.role]??"#52525b";return(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"80px 1fr",gap:"0 16px",padding:"10px 0",borderBottom:"1px solid #f4f4f5",fontFamily:"monospace",fontSize:12,alignItems:"start"},children:[(0,t.jsxs)("span",{style:{color:s,paddingTop:1},children:["[",e.role,"]"]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#27272a",lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word",display:"block"},children:e.content}),(0,t.jsx)("span",{style:{color:"#a1a1aa",fontSize:11,marginTop:2,display:"block"},children:lK(e.created_at)})]})]})},l4=({accessToken:e})=>{let[s,a]=(0,i.useState)([]),[l,r]=(0,i.useState)(!1),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)([]),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),y=(0,i.useCallback)(async()=>{if(e){r(!0);try{let t=await fetch(`${w.proxyBaseUrl??""}/v1/workflows/runs?limit=100`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`HTTP ${t.status}`);let s=await t.json();a(s.runs??[])}catch(e){console.error("workflow runs fetch failed:",e)}finally{r(!1)}}},[e]),j=(0,i.useCallback)(async t=>{if(e){o(t),g(!0),x(!0),c([]),u([]);try{let s=w.proxyBaseUrl??"",[a,l]=await Promise.all([fetch(`${s}/v1/workflows/runs/${t.run_id}/events`,{headers:{Authorization:`Bearer ${e}`}}),fetch(`${s}/v1/workflows/runs/${t.run_id}/messages`,{headers:{Authorization:`Bearer ${e}`}})]),r=a.ok?await a.json():{events:[]},i=l.ok?await l.json():{messages:[]};c([...r.events??[]].sort((e,t)=>e.sequence_number-t.sequence_number)),u([...i.messages??[]].sort((e,t)=>e.sequence_number-t.sequence_number))}catch(e){console.error("workflow run detail fetch failed:",e)}finally{x(!1)}}},[e]);(0,i.useEffect)(()=>{y()},[y]);let f=[{title:"Run",dataIndex:"run_id",key:"run",render:(e,s)=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(lJ,{status:s.status,size:7}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:13,color:"#18181b",fontWeight:500,lineHeight:1.4},children:lQ(s)}),(0,t.jsx)("div",{style:{fontFamily:"monospace",fontSize:11,color:"#a1a1aa"},children:lY(s.run_id)})]})]})},{title:"Type",dataIndex:"workflow_type",key:"workflow_type",render:e=>(0,t.jsx)("span",{style:{fontFamily:"monospace",fontSize:12,color:"#71717a"},children:e})},{title:"Status",dataIndex:"status",key:"status",render:(e,s)=>{let a=s.metadata?.state;return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,t.jsx)(lJ,{status:e,size:7}),(0,t.jsx)("span",{style:{fontSize:12,color:"#52525b",textTransform:"capitalize"},children:a??e})]})}},{title:"Created",dataIndex:"created_at",key:"created_at",render:e=>(0,t.jsx)("span",{style:{fontSize:12,color:"#a1a1aa"},children:lK(e)})}];return(0,t.jsxs)("div",{style:{padding:"24px 32px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',minHeight:"calc(100vh - 64px)",background:"#fff"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:18,fontWeight:600,color:"#18181b"},children:"Workflow Runs"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#71717a",marginTop:2},children:"Durable state tracking for agents and automated workflows"})]}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:y,loading:l,style:{color:"#71717a",borderColor:"#e4e4e7"},children:"Refresh"})]}),(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full",children:(0,t.jsx)(te.Table,{dataSource:s,columns:f,rowKey:"run_id",loading:l,size:"small",pagination:{pageSize:50,hideOnSinglePage:!0,size:"small"},onRow:e=>({onClick:()=>j(e),style:{cursor:"pointer"}}),locale:{emptyText:(0,t.jsx)(aR.Empty,{description:(0,t.jsx)("span",{style:{color:"#a1a1aa",fontSize:13},children:"No workflow runs yet"}),image:aR.Empty.PRESENTED_IMAGE_SIMPLE})},className:"[&_.ant-table-cell]:py-0.5 [&_.ant-table-thead_.ant-table-cell]:py-1",style:{border:"none"}})}),(0,t.jsx)(lP.Drawer,{open:h,onClose:()=>g(!1),width:680,title:null,closable:!1,bodyStyle:{padding:0},styles:{body:{padding:0}},children:n?p?(0,t.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:80},children:(0,t.jsx)(eF.Spin,{})}):(0,t.jsxs)("div",{style:{padding:"24px 28px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[(0,t.jsx)("button",{onClick:()=>g(!1),style:{background:"none",border:"none",cursor:"pointer",padding:"4px 0",fontSize:12,color:"#a1a1aa",display:"flex",alignItems:"center",gap:4},children:"← close"}),(0,t.jsx)(V.Button,{size:"small",icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>j(n),loading:p,style:{color:"#71717a",borderColor:"#e4e4e7"},children:"Refresh"})]}),(0,t.jsx)(lZ,{run:n}),(0,t.jsx)(q.Collapse,{defaultActiveKey:["timeline"],ghost:!1,style:{border:"1px solid #e4e4e7",borderRadius:8,overflow:"hidden"},items:[{key:"timeline",label:(0,t.jsxs)("span",{style:{fontSize:12,fontWeight:500,color:"#3f3f46"},children:["Timeline",(0,t.jsxs)("span",{style:{marginLeft:6,fontSize:11,color:"#a1a1aa",fontWeight:400},children:[d.length," ",1===d.length?"event":"events"]})]}),children:(0,t.jsx)("div",{style:{padding:"4px 4px 12px"},children:(0,t.jsx)(l1,{run:n,events:d})})},{key:"messages",label:(0,t.jsxs)("span",{style:{fontSize:12,fontWeight:500,color:"#3f3f46"},children:["Messages",(0,t.jsx)("span",{style:{marginLeft:6,fontSize:11,color:"#a1a1aa",fontWeight:400},children:m.length})]}),children:0===m.length?(0,t.jsx)("div",{style:{padding:"12px 4px",color:"#a1a1aa",fontSize:12,fontFamily:"monospace"},children:"No messages"}):(0,t.jsx)("div",{style:{paddingBottom:4},children:m.map(e=>(0,t.jsx)(l2,{msg:e},e.message_id))})}]})]}):null})]})};var l5=e.i(936190),l6=e.i(910119),l3=e.i(275144),l8=e.i(268004),l7=e.i(161281),l9=e.i(321836),re=e.i(947293),rt=e.i(618566),rs=e.i(592143);function ra(e,t="/"){document.cookie=`${e}=; Max-Age=0; Path=${t}`,"token"===e&&(0,l8.clearTokenCookies)()}let rl={api_ref:"api-reference","api-reference":"api-reference"};function rr(){let[e,n]=(0,i.useState)(""),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)([]),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)([]),[v,k]=(0,i.useState)({PROXY_BASE_URL:"",PROXY_LOGOUT_URL:""}),[N,S]=(0,i.useState)(!0),C=(0,rt.useRouter)(),T=(0,rt.useSearchParams)(),[I,F]=(0,i.useState)({data:[]}),[L,A]=(0,i.useState)(null),[M,P]=(0,i.useState)(!1),[D,z]=(0,i.useState)(!0),[E,O]=(0,i.useState)(null),[R,B]=(0,i.useState)(!0),[$,q]=(0,i.useState)(!1),[U,V]=(0,i.useState)(!1),[H,G]=(0,i.useState)(!1),[K,W]=(0,i.useState)(!1),[Q,Y]=(0,i.useState)(!1),J=T.get("invitation_id"),X="true"===T.get("create"),Z=(0,i.useMemo)(()=>{if(!X)return;let e=T.get("owned_by"),t=T.get("team_id"),s=T.get("key_alias"),a=T.get("models"),l=T.get("key_type");if(!e&&!t&&!s&&!a&&!l)return;let r=e&&["you","service_account","another_user"].includes(e)?e:void 0,i=l&&["default","llm_api","management"].includes(l)?l:void 0,n=s?s.trim().slice(0,256):void 0,o=a?a.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:i}},[T,X]),[ee,et]=(0,i.useState)(()=>T.get("page")||"api-keys"),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),ei=(0,i.useRef)(!1),en=e=>{y(t=>t?[...t,e]:[e]),P(()=>!M)},eo=!1===D&&null===L&&null===J;(0,i.useEffect)(()=>{let e=!1;return(async()=>{try{await (0,w.getUiConfig)()}catch{}if(e)return;let t=(0,l8.getCookie)("token"),s=t&&!(0,l7.isJwtExpired)(t)?t:null;t&&!s&&ra("token","/"),e||(A(s),z(!1))})(),()=>{e=!0}},[]),(0,i.useEffect)(()=>{if(eo){(0,l9.storeReturnUrl)();let e=(w.proxyBaseUrl||"")+"/ui/login",t=(0,l9.buildLoginUrlWithReturn)(e);window.location.replace(t)}},[eo]);let ed=ee in rl;return((0,i.useEffect)(()=>{if(!D&&ed){let e=(w.proxyBaseUrl||"")+"/ui";C.replace(`${e}/${rl[ee]}`)}},[D,ed,ee,C]),(0,i.useEffect)(()=>{if(D||!L||ei.current)return;ei.current=!0;let e=(0,l9.consumeReturnUrl)();if(e&&(0,l9.isValidReturnUrl)(e)){let t=new URL(e,window.location.origin);if(t.origin!==window.location.origin)return;let s=window.location.href;(0,l9.normalizeUrlForCompare)(e)!==(0,l9.normalizeUrlForCompare)(s)&&window.location.replace(t.href)}},[D,L]),(0,i.useEffect)(()=>{L||(ei.current=!1)},[L]),(0,i.useEffect)(()=>{if(!L)return;if((0,l7.isJwtExpired)(L)){ra("token","/"),A(null);return}let e=null;try{e=(0,re.jwtDecode)(L)}catch{ra("token","/"),A(null);return}if(e){if(ea(e.key),m(e.disabled_non_admin_personal_key_creation),e.user_role){let t=(0,ew.formatUserRole)(e.user_role);n(t),"Admin Viewer"==t&&et("usage")}e.user_email&&p(e.user_email),e.login_method&&S("username_password"==e.login_method),e.premium_user&&d(e.premium_user),e.auth_header_name&&(0,w.setGlobalLitellmHeaderName)(e.auth_header_name),e.user_id&&O(e.user_id)}},[L]),(0,i.useEffect)(()=>{es&&E&&e&&(0,sX.fetchUserModels)(E,e,es,_),es&&E&&e&&(0,eV.teamListCall)(es,1,100,{userID:"Admin"!==e&&"Admin Viewer"!==e?E:null}).then(e=>h(e.teams??[])).catch(console.error),es&&(0,sZ.fetchOrganizations)(es,f)},[es,E,e]),(0,i.useEffect)(()=>{es&&L&&(async()=>{try{let e=await (0,w.getInProductNudgesCall)(es),t=e?.is_claude_code_enabled||!1;V(t),t&&(G(!0),B(!1))}catch(e){console.error("Failed to fetch in-product nudges:",e)}})()},[es,L]),(0,i.useEffect)(()=>{if(R&&!$){let e=setTimeout(()=>{B(!1)},15e3);return()=>clearTimeout(e)}},[R,$]),(0,i.useEffect)(()=>{if(H&&!K){let e=setTimeout(()=>{G(!1)},15e3);return()=>clearTimeout(e)}},[H,K]),D||eo||ed)?(0,t.jsx)(eH.default,{}):(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(rs.ConfigProvider,{theme:{algorithm:Q?sL.theme.darkAlgorithm:sL.theme.defaultAlgorithm},children:(0,t.jsx)(l3.ThemeProvider,{accessToken:es,children:J?(0,t.jsx)(aT.default,{userID:E,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:M}):(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,t.jsx)(sf.default,{userID:E,userRole:e,premiumUser:o,userEmail:u,setProxySettings:k,proxySettings:v,accessToken:es,isPublicPage:!1,sidebarCollapsed:el,onToggleSidebar:()=>{er(!el)},isDarkMode:Q,toggleDarkMode:()=>{Y(!Q)}}),(0,t.jsxs)("div",{className:"flex flex-1",children:[(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(s.default,{setPage:e=>{let t=new URLSearchParams(T);t.set("page",e),window.history.pushState(null,"",`?${t.toString()}`),et(e)},defaultSelectedKey:ee,sidebarCollapsed:el})}),"api-keys"==ee?(0,t.jsx)(aT.default,{userID:E,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:M,autoOpenCreate:X,prefillData:Z}):"models"==ee?(0,t.jsx)(a.default,{token:L,keys:g,modelData:I,setModelData:F,premiumUser:o,teams:x}):"llm-playground"==ee?(0,t.jsx)(l.default,{}):"users"==ee?(0,t.jsx)(l6.default,{userID:E,userRole:e,token:L,keys:g,teams:x,accessToken:es,setKeys:y}):"teams"==ee?(0,t.jsx)(sJ,{teams:x,setTeams:h,accessToken:es,userID:E,userRole:e,organizations:j,premiumUser:o,searchParams:T}):"organizations"==ee?(0,t.jsx)(sZ.default,{organizations:j,setOrganizations:f,userModels:b,accessToken:es,userRole:e,premiumUser:o}):"admin-panel"==ee?(0,t.jsx)(r.default,{proxySettings:v}):"logging-and-alerts"==ee?(0,t.jsx)(ao.default,{userID:E,userRole:e,accessToken:es,premiumUser:o}):"budgets"==ee?(0,t.jsx)(e$.default,{accessToken:es}):"guardrails"==ee?(0,t.jsx)(sh.default,{accessToken:es,userRole:e}):"policies"==ee?(0,t.jsx)(sg.default,{accessToken:es,userRole:e}):"agents"==ee?(0,t.jsx)(eB,{accessToken:es,userRole:e,teams:x}):"prompts"==ee?(0,t.jsx)(s1.default,{accessToken:es,userRole:e}):"transform-request"==ee?(0,t.jsx)(aN.default,{accessToken:es}):"router-settings"==ee?(0,t.jsx)(tQ.default,{userID:E,userRole:e,accessToken:es,modelData:I}):"ui-theme"==ee?(0,t.jsx)(aS.default,{userID:E,userRole:e,accessToken:es}):"cost-tracking"==ee?(0,t.jsx)(tW,{userID:E,userRole:e,accessToken:es}):"model-hub-table"==ee?(0,ew.isAdminRole)(e)?(0,t.jsx)(sj.default,{accessToken:es,publicPage:!1,premiumUser:o,userRole:e}):(0,t.jsx)(s2.default,{accessToken:es,isEmbedded:!0}):"caching"==ee?(0,t.jsx)(eq.default,{userID:E,userRole:e,token:L,accessToken:es,premiumUser:o}):"pass-through-settings"==ee?(0,t.jsx)(s0.default,{userID:E,userRole:e,accessToken:es,modelData:I,premiumUser:o}):"logs"==ee?(0,t.jsx)(l5.default,{userID:E,userRole:e,token:L,accessToken:es,premiumUser:o}):"mcp-servers"==ee?(0,t.jsx)(sy.MCPServers,{accessToken:es,userRole:e,userID:E}):"search-tools"==ee?(0,t.jsx)(an,{accessToken:es,userRole:e,userID:E}):"tag-management"==ee?(0,t.jsx)(ak.default,{accessToken:es,userRole:e,userID:E}):"skills"==ee||"claude-code-plugins"==ee?(0,t.jsx)(eU.default,{accessToken:es,userRole:e}):"access-groups"==ee?(0,t.jsx)(a8,{}):"projects"==ee?(0,t.jsx)(ly,{}):"vector-stores"==ee?(0,t.jsx)(lj.default,{accessToken:es,userRole:e,userID:E}):"tool-policies"==ee?(0,t.jsx)(lM,{accessToken:es,userRole:e}):"workflows"==ee?(0,t.jsx)(l4,{accessToken:es}):"memory"==ee?(0,t.jsx)(lU,{accessToken:es,userID:E,userRole:e}):"guardrails-monitor"==ee?(0,t.jsx)(sx,{accessToken:es}):"new_usage"==ee?(0,t.jsx)(sb.default,{teams:x??[],organizations:j??[]}):(0,t.jsx)(aC.default,{userID:E,userRole:e,token:L,accessToken:es,keys:g,premiumUser:o})]}),(0,t.jsx)(ah,{isVisible:R,onOpen:()=>{B(!1),q(!0)},onDismiss:()=>{B(!1)}}),(0,t.jsx)(ab,{isOpen:$,onClose:()=>{q(!1),B(!0)},onComplete:()=>{q(!1)}}),(0,t.jsx)(av,{isVisible:H,onOpen:()=>{G(!1),W(!0)},onDismiss:()=>{G(!1)}}),(0,t.jsx)(aw,{isOpen:K,onClose:()=>{W(!1),G(!0)},onComplete:()=>{W(!1)}})]})})})})}function ri(){return(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(rr,{})})}e.s(["default",()=>ri],952683)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/b12bdf0901df004a.js b/litellm/proxy/_experimental/out/_next/static/chunks/3a35f4a4b0831887.js similarity index 75% rename from litellm/proxy/_experimental/out/_next/static/chunks/b12bdf0901df004a.js rename to litellm/proxy/_experimental/out/_next/static/chunks/3a35f4a4b0831887.js index 3557980faf..9af34db362 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/b12bdf0901df004a.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3a35f4a4b0831887.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,916925,e=>{"use strict";var a,t=((a={}).A2A_Agent="A2A Agent",a.AI21="Ai21",a.AI21_CHAT="Ai21 Chat",a.AIML="AI/ML API",a.AIOHTTP_OPENAI="Aiohttp Openai",a.Anthropic="Anthropic",a.ANTHROPIC_TEXT="Anthropic Text",a.AssemblyAI="AssemblyAI",a.AUTO_ROUTER="Auto Router",a.Bedrock="Amazon Bedrock",a.BedrockMantle="Amazon Bedrock Mantle",a.SageMaker="AWS SageMaker",a.Azure="Azure",a.Azure_AI_Studio="Azure AI Foundry (Studio)",a.AZURE_TEXT="Azure Text",a.BASETEN="Baseten",a.BYTEZ="Bytez",a.Cerebras="Cerebras",a.CLARIFAI="Clarifai",a.CLOUDFLARE="Cloudflare",a.CODESTRAL="Codestral",a.Cohere="Cohere",a.COHERE_CHAT="Cohere Chat",a.COMETAPI="Cometapi",a.COMPACTIFAI="Compactifai",a.Cursor="Cursor",a.Dashscope="Dashscope",a.Databricks="Databricks (Qwen API)",a.DATAROBOT="Datarobot",a.DeepInfra="DeepInfra",a.Deepgram="Deepgram",a.Deepseek="Deepseek",a.DOCKER_MODEL_RUNNER="Docker Model Runner",a.DOTPROMPT="Dotprompt",a.ElevenLabs="ElevenLabs",a.EMPOWER="Empower",a.FalAI="Fal AI",a.FEATHERLESS_AI="Featherless Ai",a.FireworksAI="Fireworks AI",a.FRIENDLIAI="Friendliai",a.GALADRIEL="Galadriel",a.GITHUB_COPILOT="Github Copilot",a.Google_AI_Studio="Google AI Studio",a.GradientAI="GradientAI",a.Groq="Groq",a.HEROKU="Heroku",a.Hosted_Vllm="vllm",a.HUGGINGFACE="Huggingface",a.HYPERBOLIC="Hyperbolic",a.Infinity="Infinity",a.JinaAI="Jina AI",a.LAMBDA_AI="Lambda Ai",a.LEMONADE="Lemonade",a.LLAMAFILE="Llamafile",a.LM_STUDIO="Lm Studio",a.LLAMA="Meta Llama",a.MARITALK="Maritalk",a.MiniMax="MiniMax",a.MistralAI="Mistral AI",a.MOONSHOT="Moonshot",a.MORPH="Morph",a.NEBIUS="Nebius",a.NLP_CLOUD="Nlp Cloud",a.NOVITA="Novita",a.NSCALE="Nscale",a.NVIDIA_NIM="Nvidia Nim",a.Ollama="Ollama",a.OLLAMA_CHAT="Ollama Chat",a.OOBABOOGA="Oobabooga",a.OpenAI="OpenAI",a.OPENAI_LIKE="Openai Like",a.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",a.OpenAI_Text="OpenAI Text Completion",a.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",a.Openrouter="Openrouter",a.Oracle="Oracle Cloud Infrastructure (OCI)",a.OVHCLOUD="Ovhcloud",a.Perplexity="Perplexity",a.PETALS="Petals",a.PG_VECTOR="Pg Vector",a.PREDIBASE="Predibase",a.RECRAFT="Recraft",a.REPLICATE="Replicate",a.RunwayML="RunwayML",a.SAGEMAKER_LEGACY="Sagemaker",a.Sambanova="Sambanova",a.SAP="SAP Generative AI Hub",a.Snowflake="Snowflake",a.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",a.TogetherAI="TogetherAI",a.TOPAZ="Topaz",a.Triton="Triton",a.V0="V0",a.VERCEL_AI_GATEWAY="Vercel Ai Gateway",a.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",a.VERTEX_AI_BETA="Vertex Ai Beta",a.VLLM="Vllm",a.VolcEngine="VolcEngine",a.Voyage="Voyage AI",a.WANDB="Wandb",a.WATSONX="Watsonx",a.WATSONX_TEXT="Watsonx Text",a.xAI="xAI",a.XINFERENCE="Xinference",a);let l={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",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"},r="../ui/assets/logos/",s={"A2A Agent":`${r}a2a_agent.png`,Ai21:`${r}ai21.svg`,"Ai21 Chat":`${r}ai21.svg`,"AI/ML API":`${r}aiml_api.svg`,"Aiohttp Openai":`${r}openai_small.svg`,Anthropic:`${r}anthropic.svg`,"Anthropic Text":`${r}anthropic.svg`,AssemblyAI:`${r}assemblyai_small.png`,Azure:`${r}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${r}microsoft_azure.svg`,"Azure Text":`${r}microsoft_azure.svg`,Baseten:`${r}baseten.svg`,"Amazon Bedrock":`${r}bedrock.svg`,"Amazon Bedrock Mantle":`${r}bedrock.svg`,"AWS SageMaker":`${r}bedrock.svg`,Cerebras:`${r}cerebras.svg`,Cloudflare:`${r}cloudflare.svg`,Codestral:`${r}mistral.svg`,Cohere:`${r}cohere.svg`,"Cohere Chat":`${r}cohere.svg`,Cometapi:`${r}cometapi.svg`,Cursor:`${r}cursor.svg`,"Databricks (Qwen API)":`${r}databricks.svg`,Dashscope:`${r}dashscope.svg`,Deepseek:`${r}deepseek.svg`,Deepgram:`${r}deepgram.png`,DeepInfra:`${r}deepinfra.png`,ElevenLabs:`${r}elevenlabs.png`,"Fal AI":`${r}fal_ai.jpg`,"Featherless Ai":`${r}featherless.svg`,"Fireworks AI":`${r}fireworks.svg`,Friendliai:`${r}friendli.svg`,"Github Copilot":`${r}github_copilot.svg`,"Google AI Studio":`${r}google.svg`,GradientAI:`${r}gradientai.svg`,Groq:`${r}groq.svg`,vllm:`${r}vllm.png`,Huggingface:`${r}huggingface.svg`,Hyperbolic:`${r}hyperbolic.svg`,Infinity:`${r}infinity.png`,"Jina AI":`${r}jina.png`,"Lambda Ai":`${r}lambda.svg`,"Lm Studio":`${r}lmstudio.svg`,"Meta Llama":`${r}meta_llama.svg`,MiniMax:`${r}minimax.svg`,"Mistral AI":`${r}mistral.svg`,Moonshot:`${r}moonshot.svg`,Morph:`${r}morph.svg`,Nebius:`${r}nebius.svg`,Novita:`${r}novita.svg`,"Nvidia Nim":`${r}nvidia_nim.svg`,Ollama:`${r}ollama.svg`,"Ollama Chat":`${r}ollama.svg`,Oobabooga:`${r}openai_small.svg`,OpenAI:`${r}openai_small.svg`,"Openai Like":`${r}openai_small.svg`,"OpenAI Text Completion":`${r}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${r}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${r}openai_small.svg`,Openrouter:`${r}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${r}oracle.svg`,Perplexity:`${r}perplexity-ai.svg`,Recraft:`${r}recraft.svg`,Replicate:`${r}replicate.svg`,RunwayML:`${r}runwayml.png`,Sagemaker:`${r}bedrock.svg`,Sambanova:`${r}sambanova.svg`,"SAP Generative AI Hub":`${r}sap.png`,Snowflake:`${r}snowflake.svg`,"Text-Completion-Codestral":`${r}mistral.svg`,TogetherAI:`${r}togetherai.svg`,Topaz:`${r}topaz.svg`,Triton:`${r}nvidia_triton.png`,V0:`${r}v0.svg`,"Vercel Ai Gateway":`${r}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${r}google.svg`,"Vertex Ai Beta":`${r}google.svg`,Vllm:`${r}vllm.png`,VolcEngine:`${r}volcengine.png`,"Voyage AI":`${r}voyage.webp`,Watsonx:`${r}watsonx.svg`,"Watsonx Text":`${r}watsonx.svg`,xAI:`${r}xai.svg`,Xinference:`${r}xinference.svg`};e.s(["Providers",()=>t,"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 return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:s[e],displayName:e}}let a=Object.keys(l).find(a=>l[a].toLowerCase()===e.toLowerCase());if(!a)return{logo:"",displayName:e};let r=t[a];return{logo:s[r],displayName:r}},"getProviderModels",0,(e,a)=>{console.log(`Provider key: ${e}`);let t=l[e];console.log(`Provider mapped to: ${t}`);let r=[];return e&&"object"==typeof a&&(Object.entries(a).forEach(([e,a])=>{if(null!==a&&"object"==typeof a&&"litellm_provider"in a){let l=a.litellm_provider;(l===t||"string"==typeof l&&l.includes(t))&&r.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(a).forEach(([e,a])=>{null!==a&&"object"==typeof a&&"litellm_provider"in a&&"cohere_chat"===a.litellm_provider&&r.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(a).forEach(([e,a])=>{null!==a&&"object"==typeof a&&"litellm_provider"in a&&"sagemaker_chat"===a.litellm_provider&&r.push(e)}))),r},"providerLogoMap",0,s,"provider_map",0,l])},888288,e=>{"use strict";var a=e.i(271645);let t=(e,t)=>{let l=void 0!==t,[r,s]=(0,a.useState)(e);return[l?t:r,e=>{l||s(e)}]};e.s(["default",()=>t])},653496,e=>{"use strict";var a=e.i(721369);e.s(["Tabs",()=>a.default])},689020,e=>{"use strict";var a=e.i(764205);let t=async e=>{try{let t=await (0,a.modelHubCall)(e);if(console.log("model_info:",t),t?.data.length>0){let e=t.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,a)=>e.model_group.localeCompare(a.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,t])},107233,37727,e=>{"use strict";var a=e.i(603908);e.s(["Plus",()=>a.default],107233);var t=e.i(841947);e.s(["X",()=>t.default],37727)},361653,e=>{"use strict";let a=(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",()=>a])},841947,e=>{"use strict";let a=(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",()=>a])},603908,e=>{"use strict";let a=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>a])},158392,419470,e=>{"use strict";var a=e.i(843476),t=e.i(311451);let l={ttl:3600,lowest_latency_buffer:0},r=({routingStrategyArgs:e})=>{let r={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,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"max-w-3xl",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,a.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,a.jsx)("div",{className:"space-y-2",children:(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:r[e]||""}),(0,a.jsx)(t.Input,{name:e,defaultValue:"object"==typeof l?JSON.stringify(l,null,2):l?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,a.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:l})=>(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"max-w-3xl",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,a])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,r])=>(0,a.jsx)("div",{className:"space-y-2",children:(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:l[e]?.ui_field_name||e}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l[e]?.field_description||""}),(0,a.jsx)(t.Input,{name:e,defaultValue:null==r||"null"===r?"":"object"==typeof r?JSON.stringify(r,null,2):r?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var i=e.i(199133);let o=({selectedStrategy:e,availableStrategies:t,routingStrategyDescriptions:l,routerFieldsMetadata:r,onStrategyChange:s})=>(0,a.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:r.routing_strategy?.field_description||""})]}),(0,a.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,a.jsx)(i.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:t.map(e=>(0,a.jsx)(i.Select.Option,{value:e,label:e,children:(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,a.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),l[e]&&(0,a.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:l[e]})]})},e))})})]});var n=e.i(790848);let d=({enabled:e,routerFieldsMetadata:t,onToggle:l})=>(0,a.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:t.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,a.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[t.enable_tag_filtering?.field_description||"",t.enable_tag_filtering?.link&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)("a",{href:t.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,a.jsx)(n.Switch,{checked:e,onChange:l,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:t,routerFieldsMetadata:l,availableRoutingStrategies:i,routingStrategyDescriptions:n})=>(0,a.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"max-w-3xl",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),i.length>0&&(0,a.jsx)(o,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:i,routingStrategyDescriptions:n,routerFieldsMetadata:l,onStrategyChange:a=>{t({...e,selectedStrategy:a})}}),(0,a.jsx)(d,{enabled:e.enableTagFiltering,routerFieldsMetadata:l,onToggle:a=>{t({...e,enableTagFiltering:a})}})]}),(0,a.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,a.jsx)(r,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,a.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:l})]})],158392);var c=e.i(994388),u=e.i(653496),m=e.i(107233),g=e.i(271645),p=e.i(888259),f=e.i(592968),h=e.i(361653),h=h;let x=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var b=e.i(37727);function y({group:e,onChange:t,availableModels:l,maxFallbacks:r}){let s=l.filter(a=>a!==e.primaryModel),o=e.fallbackModels.length{let l=[...e.fallbackModels];l.includes(a)&&(l=l.filter(e=>e!==a)),t({...e,primaryModel:a,fallbackModels:l})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,a)=>(a?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,a.jsx)(h.default,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,a.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,a.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-sm",children:[(0,a.jsx)(x,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,a.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,a.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,a.jsx)("span",{className:"text-red-500",children:"*"}),(0,a.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",r," fallbacks at a time)"]})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)(i.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:o?"Select fallback models to add...":`Maximum ${r} fallbacks reached`,value:e.fallbackModels,onChange:a=>{let l=a.slice(0,r);t({...e,fallbackModels:l})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(t,l)=>{let r=e.fallbackModels.includes(t.value),s=r?e.fallbackModels.indexOf(t.value)+1:null;return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[r&&null!==s&&(0,a.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,a.jsx)("span",{children:t.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,a.jsx)(f.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,a.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,a)=>(a?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:o?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${r} used)`:`Maximum ${r} fallbacks reached. Remove some to add more.`})]}),(0,a.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,a.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,a.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,a.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((l,r)=>(0,a.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-sm transition-all",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,a.jsx)("span",{className:"text-xs font-bold",children:r+1})}),(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"font-medium text-gray-800",children:l})})]}),(0,a.jsx)("button",{type:"button",onClick:()=>{let a;return a=e.fallbackModels.filter((e,a)=>a!==r),void t({...e,fallbackModels:a})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,a.jsx)(b.X,{className:"w-4 h-4"})})]},`${l}-${r}`))})]})]})]})}function v({groups:e,onGroupsChange:t,availableModels:l,maxFallbacks:r=10,maxGroups:s=5}){let[i,o]=(0,g.useState)(e.length>0?e[0].id:"1");(0,g.useEffect)(()=>{e.length>0?e.some(e=>e.id===i)||o(e[0].id):o("1")},[e]);let n=()=>{if(e.length>=s)return;let a=Date.now().toString();t([...e,{id:a,primaryModel:null,fallbackModels:[]}]),o(a)},d=a=>{t(e.map(e=>e.id===a.id?a:e))},f=e.map((t,s)=>{let i=t.primaryModel?t.primaryModel:`Group ${s+1}`;return{key:t.id,label:i,closable:e.length>1,children:(0,a.jsx)(y,{group:t,onChange:d,availableModels:l,maxFallbacks:r})}});return 0===e.length?(0,a.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,a.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,a.jsx)(c.Button,{variant:"primary",onClick:n,icon:()=>(0,a.jsx)(m.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,a.jsx)(u.Tabs,{type:"editable-card",activeKey:i,onChange:o,onEdit:(a,l)=>{"add"===l?n():"remove"===l&&e.length>1&&(a=>{if(1===e.length)return p.default.warning("At least one group is required");let l=e.filter(e=>e.id!==a);t(l),i===a&&l.length>0&&o(l[l.length-1].id)})(a)},items:f,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>v],419470)},793130,e=>{"use strict";var a=e.i(290571),t=e.i(429427),l=e.i(371330),r=e.i(271645),s=e.i(394487),i=e.i(503269),o=e.i(214520),n=e.i(746725),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(601893),g=e.i(140721),p=e.i(942803),f=e.i(233538),h=e.i(694421),x=e.i(700020),b=e.i(35889),y=e.i(998348),v=e.i(722678);let A=(0,r.createContext)(null);A.displayName="GroupContext";let _=r.Fragment,k=Object.assign((0,x.forwardRefWithAs)(function(e,a){var _;let k=(0,r.useId)(),j=(0,p.useProvidedId)(),C=(0,m.useDisabled)(),{id:T=j||`headlessui-switch-${k}`,disabled:N=C||!1,checked:I,defaultChecked:w,onChange:S,name:E,value:O,form:M,autoFocus:L=!1,...R}=e,$=(0,r.useContext)(A),[P,D]=(0,r.useState)(null),F=(0,r.useRef)(null),B=(0,u.useSyncRefs)(F,a,null===$?null:$.setSwitch,D),G=(0,o.useDefaultValue)(w),[H,V]=(0,i.useControllable)(I,S,null!=G&&G),z=(0,n.useDisposables)(),[U,W]=(0,r.useState)(!1),K=(0,d.useEvent)(()=>{W(!0),null==V||V(!H),z.nextFrame(()=>{W(!1)})}),X=(0,d.useEvent)(e=>{if((0,f.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),K()}),q=(0,d.useEvent)(e=>{e.key===y.Keys.Space?(e.preventDefault(),K()):e.key===y.Keys.Enter&&(0,h.attemptSubmit)(e.currentTarget)}),Y=(0,d.useEvent)(e=>e.preventDefault()),J=(0,v.useLabelledBy)(),Z=(0,b.useDescribedBy)(),{isFocusVisible:Q,focusProps:ee}=(0,t.useFocusRing)({autoFocus:L}),{isHovered:ea,hoverProps:et}=(0,l.useHover)({isDisabled:N}),{pressed:el,pressProps:er}=(0,s.useActivePress)({disabled:N}),es=(0,r.useMemo)(()=>({checked:H,disabled:N,hover:ea,focus:Q,active:el,autofocus:L,changing:U}),[H,ea,Q,el,N,U,L]),ei=(0,x.mergeProps)({id:T,ref:B,role:"switch",type:(0,c.useResolveButtonType)(e,P),tabIndex:-1===e.tabIndex?0:null!=(_=e.tabIndex)?_:0,"aria-checked":H,"aria-labelledby":J,"aria-describedby":Z,disabled:N||void 0,autoFocus:L,onClick:X,onKeyUp:q,onKeyPress:Y},ee,et,er),eo=(0,r.useCallback)(()=>{if(void 0!==G)return null==V?void 0:V(G)},[V,G]),en=(0,x.useRender)();return r.default.createElement(r.default.Fragment,null,null!=E&&r.default.createElement(g.FormFields,{disabled:N,data:{[E]:O||"on"},overrides:{type:"checkbox",checked:H},form:M,onReset:eo}),en({ourProps:ei,theirProps:R,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var a;let[t,l]=(0,r.useState)(null),[s,i]=(0,v.useLabels)(),[o,n]=(0,b.useDescriptions)(),d=(0,r.useMemo)(()=>({switch:t,setSwitch:l}),[t,l]),c=(0,x.useRender)();return r.default.createElement(n,{name:"Switch.Description",value:o},r.default.createElement(i,{name:"Switch.Label",value:s,props:{htmlFor:null==(a=d.switch)?void 0:a.id,onClick(e){t&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},r.default.createElement(A.Provider,{value:d},c({ourProps:{},theirProps:e,slot:{},defaultTag:_,name:"Switch.Group"}))))},Label:v.Label,Description:b.Description});var j=e.i(888288),C=e.i(95779),T=e.i(444755),N=e.i(673706),I=e.i(829087);let w=(0,N.makeClassName)("Switch"),S=r.default.forwardRef((e,t)=>{let{checked:l,defaultChecked:s=!1,onChange:i,color:o,name:n,error:d,errorMessage:c,disabled:u,required:m,tooltip:g,id:p}=e,f=(0,a.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),h={bgColor:o?(0,N.getColorClassNames)(o,C.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:o?(0,N.getColorClassNames)(o,C.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[x,b]=(0,j.default)(s,l),[y,v]=(0,r.useState)(!1),{tooltipProps:A,getReferenceProps:_}=(0,I.useTooltip)(300);return r.default.createElement("div",{className:"flex flex-row items-center justify-start"},r.default.createElement(I.default,Object.assign({text:g},A)),r.default.createElement("div",Object.assign({ref:(0,N.mergeRefs)([t,A.refs.setReference]),className:(0,T.tremorTwMerge)(w("root"),"flex flex-row relative h-5")},f,_),r.default.createElement("input",{type:"checkbox",className:(0,T.tremorTwMerge)(w("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:n,required:m,checked:x,onChange:e=>{e.preventDefault()}}),r.default.createElement(k,{checked:x,onChange:e=>{b(e),null==i||i(e)},disabled:u,className:(0,T.tremorTwMerge)(w("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:()=>v(!0),onBlur:()=>v(!1),id:p},r.default.createElement("span",{className:(0,T.tremorTwMerge)(w("sr-only"),"sr-only")},"Switch ",x?"on":"off"),r.default.createElement("span",{"aria-hidden":"true",className:(0,T.tremorTwMerge)(w("background"),x?h.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")}),r.default.createElement("span",{"aria-hidden":"true",className:(0,T.tremorTwMerge)(w("round"),x?(0,T.tremorTwMerge)(h.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",y?(0,T.tremorTwMerge)("ring-2",h.ringColor):"")}))),d&&c?r.default.createElement("p",{className:(0,T.tremorTwMerge)(w("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});S.displayName="Switch",e.s(["Switch",()=>S],793130)},418371,e=>{"use strict";var a=e.i(843476),t=e.i(271645),l=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:r="w-4 h-4"})=>{let[s,i]=(0,t.useState)(!1),{logo:o}=(0,l.getProviderLogoAndName)(e);return s||!o?(0,a.jsx)("div",{className:`${r} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,a.jsx)("img",{src:o,alt:`${e} logo`,className:r,onError:()=>i(!0)})}])},368670,e=>{"use strict";var a=e.i(764205),t=e.i(266027);let l=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,t.useQuery)({queryKey:l.list({}),queryFn:async()=>await (0,a.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},226898,972520,e=>{"use strict";var a=e.i(843476),t=e.i(271645),l=e.i(304967),r=e.i(269200),s=e.i(427612),i=e.i(496020),o=e.i(389083),n=e.i(64848),d=e.i(977572),c=e.i(942232),u=e.i(599724),m=e.i(994388),g=e.i(752978),p=e.i(793130),f=e.i(404206),h=e.i(723731),x=e.i(653824),b=e.i(881073),y=e.i(197647),v=e.i(764205),A=e.i(28651),_=e.i(68155),k=e.i(220508),j=e.i(464571),C=e.i(727749),T=e.i(158392);let N=({accessToken:e,userRole:l,userID:r,modelData:s})=>{let[i,o]=(0,t.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[n,d]=(0,t.useState)([]),[c,u]=(0,t.useState)({}),[m,g]=(0,t.useState)({});return((0,t.useEffect)(()=>{e&&l&&r&&((0,v.getCallbacksCall)(e,r,l).then(e=>{console.log("callbacks",e);let a=e.router_settings;"model_group_retry_policy"in a&&delete a.model_group_retry_policy;let t=a.routing_strategy||null;o(e=>({...e,routerSettings:a,selectedStrategy:t}))}),(0,v.getRouterSettingsCall)(e).then(e=>{if(console.log("router settings from API",e),e.fields){let a={};e.fields.forEach(e=>{a[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),u(a);let t=e.fields.find(e=>"routing_strategy"===e.field_name);t?.options&&d(t.options),e.routing_strategy_descriptions&&g(e.routing_strategy_descriptions);let l=e.fields.find(e=>"enable_tag_filtering"===e.field_name);l?.field_value!==null&&l?.field_value!==void 0&&o(e=>({...e,enableTagFiltering:l.field_value}))}}))},[e,l,r]),e)?(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsx)(T.default,{value:i,onChange:o,routerFieldsMetadata:c,availableRoutingStrategies:n,routingStrategyDescriptions:m}),(0,a.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,a.jsx)(j.Button,{onClick:()=>window.location.reload(),children:"Reset"}),(0,a.jsx)(j.Button,{type:"primary",onClick:()=>{if(!e)return;let a=i.routerSettings;console.log("router_settings",a);let t=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),l=new Set(["model_group_alias","retry_policy"]),r=Object.fromEntries(Object.entries({...a,enable_tag_filtering:i.enableTagFiltering}).map(([e,a])=>{if("routing_strategy_args"!==e&&"routing_strategy"!==e&&"enable_tag_filtering"!==e){let r=document.querySelector(`input[name="${e}"]`),s=((e,a,r)=>{if(void 0===a)return r;let s=a.trim();if("null"===s.toLowerCase())return null;if(t.has(e)){let e=Number(s);return Number.isNaN(e)?r:e}if(l.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,a);return[e,s]}if("routing_strategy"===e)return[e,i.selectedStrategy];if("enable_tag_filtering"===e)return[e,i.enableTagFiltering];if("routing_strategy_args"===e&&"latency-based-routing"===i.selectedStrategy){let e={},a=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]');return a?.value&&(e.lowest_latency_buffer=Number(a.value)),t?.value&&(e.ttl=Number(t.value)),console.log(`setRoutingStrategyArgs: ${e}`),["routing_strategy_args",e]}return null}).filter(e=>null!=e));console.log("updatedVariables",r);try{(0,v.setCallbacksCall)(e,{router_settings:r})}catch(e){C.default.fromBackend("Failed to update router settings: "+e)}C.default.success("router settings updated successfully")},children:"Save Changes"})]})]}):null};e.i(247167);var I=e.i(368670);let w=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:"M14 5l7 7m0 0l-7 7m7-7H3"}))});var S=e.i(122577),E=e.i(592968),O=e.i(898586),M=e.i(356449),L=e.i(127952),R=e.i(418371),$=e.i(888259),P=e.i(689020),D=e.i(212931);let F=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function B({open:e,onCancel:t,children:l}){return(0,a.jsx)(D.Modal,{title:(0,a.jsx)("div",{className:"pb-4 border-b border-gray-100",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-gray-800",children:[(0,a.jsx)("div",{className:"p-2 bg-indigo-50 rounded-lg",children:(0,a.jsx)(F,{className:"w-5 h-5 text-indigo-600"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-bold m-0",children:"Configure Model Fallbacks"}),(0,a.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:t,maskClosable:!1,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,a.jsx)("div",{className:"mt-6",children:l})})}e.s(["ArrowRight",()=>F],972520);var G=e.i(419470);function H({models:e,accessToken:l,value:r=[],onChange:s}){let[i,o]=(0,t.useState)(!1),[n,d]=(0,t.useState)([]),[c,u]=(0,t.useState)(0),[g,p]=(0,t.useState)(!1),[f,h]=(0,t.useState)([{id:"1",primaryModel:null,fallbackModels:[]}]);(0,t.useEffect)(()=>{i&&(h([{id:"1",primaryModel:null,fallbackModels:[]}]),u(e=>e+1))},[i]),(0,t.useEffect)(()=>{let e=async()=>{try{let e=await (0,P.fetchAvailableModels)(l);console.log("Fetched models for fallbacks:",e),d(e)}catch(e){console.error("Error fetching model info for fallbacks:",e)}};i&&e()},[l,i]);let x=Array.from(new Set(n.map(e=>e.model_group))).sort(),b=()=>{o(!1),h([{id:"1",primaryModel:null,fallbackModels:[]}])},y=async()=>{let e=f.filter(e=>!e.primaryModel||0===e.fallbackModels.length);if(e.length>0)return void $.default.error(`Please complete configuration for all groups. ${e.length} group(s) incomplete.`);let a=[...r||[],...f.map(e=>({[e.primaryModel]:e.fallbackModels}))];if(s){p(!0);try{await s(a),C.default.success(`${f.length} fallback configuration(s) added successfully!`),b()}catch(e){console.error("Error saving fallbacks:",e)}finally{p(!1)}}else C.default.fromBackend("onChange callback not provided")};return(0,a.jsxs)("div",{children:[(0,a.jsx)(m.Button,{className:"mx-auto",onClick:()=>o(!0),icon:()=>(0,a.jsx)("span",{className:"mr-1",children:"+"}),children:"Add Fallbacks"}),(0,a.jsxs)(B,{open:i,onCancel:b,children:[(0,a.jsx)(G.FallbackSelectionForm,{groups:f,onGroupsChange:h,availableModels:x,maxFallbacks:10,maxGroups:5},c),f.length>0&&(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 mt-6 border-t border-gray-100",children:[(0,a.jsx)(j.Button,{type:"default",onClick:b,disabled:g,children:"Cancel"}),(0,a.jsx)(j.Button,{type:"default",onClick:y,disabled:0===f.length||g,loading:g,children:g?"Saving Configuration...":"Save All Configurations"})]})]})]})}let V="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 z(e,t){console.log=function(){};let l=window.location.origin,r=new M.default.OpenAI({apiKey:t,baseURL:l,dangerouslyAllowBrowser:!0});try{C.default.info("Testing fallback model response...");let t=await r.chat.completions.create({model:e,messages:[{role:"user",content:"Hi, this is a test message"}],mock_testing_fallbacks:!0});C.default.success((0,a.jsxs)("span",{children:["Test model=",(0,a.jsx)("strong",{children:e}),", received model=",(0,a.jsx)("strong",{children:t.model}),". See"," ",(0,a.jsx)("a",{href:"#",onClick:()=>window.open("https://docs.litellm.ai/docs/proxy/reliability","_blank"),style:{textDecoration:"underline",color:"blue"},children:"curl"})]}))}catch(e){C.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`)}}let U=({accessToken:e,userRole:l,userID:o,modelData:u})=>{let[m,p]=(0,t.useState)({}),[f,h]=(0,t.useState)(!1),[x,b]=(0,t.useState)(null),[y,A]=(0,t.useState)(!1),{data:k}=(0,I.useModelCostMap)(),j=e=>null!=k&&"object"==typeof k&&e in k?k[e].litellm_provider??"":"";(0,t.useEffect)(()=>{e&&l&&o&&(0,v.getCallbacksCall)(e,o,l).then(e=>{console.log("callbacks",e);let a=e.router_settings;"model_group_retry_policy"in a&&delete a.model_group_retry_policy,p(a)})},[e,l,o]);let T=e=>{b(e),A(!0)},N=async()=>{if(!x||!e)return;let a=Object.keys(x)[0];if(!a)return;h(!0);let t=m.fallbacks.map(e=>{let t={...e};return a in t&&Array.isArray(t[a])&&delete t[a],t}).filter(e=>Object.keys(e).length>0),l={...m,fallbacks:t};try{await (0,v.setCallbacksCall)(e,{router_settings:l}),p(l),C.default.success("Router settings updated successfully")}catch(e){C.default.fromBackend("Failed to update router settings: "+e)}finally{h(!1),A(!1),b(null)}};if(!e)return null;let M=async a=>{if(!e)return;let t={...m,fallbacks:a};try{await (0,v.setCallbacksCall)(e,{router_settings:t}),p(t)}catch(a){throw C.default.fromBackend("Failed to update router settings: "+a),e&&l&&o&&(0,v.getCallbacksCall)(e,o,l).then(e=>{let a=e.router_settings;"model_group_retry_policy"in a&&delete a.model_group_retry_policy,p(a)}),a}},$=Array.isArray(m.fallbacks)&&m.fallbacks.length>0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(H,{models:u?.data?u.data.map(e=>e.model_name):[],accessToken:e||"",value:m.fallbacks||[],onChange:M}),$?(0,a.jsxs)(r.Table,{children:[(0,a.jsx)(s.TableHead,{children:(0,a.jsxs)(i.TableRow,{children:[(0,a.jsx)(n.TableHeaderCell,{children:"Model Name"}),(0,a.jsx)(n.TableHeaderCell,{children:"Fallbacks"}),(0,a.jsx)(n.TableHeaderCell,{children:"Actions"})]})}),(0,a.jsx)(c.TableBody,{children:m.fallbacks.map((l,r)=>Object.entries(l).map(([s,o])=>{let n;return(0,a.jsxs)(i.TableRow,{children:[(0,a.jsx)(d.TableCell,{className:"align-top",children:(n=j?.(s)??s,(0,a.jsxs)("span",{className:V,children:[(0,a.jsx)(R.ProviderLogo,{provider:n,className:"w-4 h-4 shrink-0"}),(0,a.jsx)("span",{children:s})]}))}),(0,a.jsx)(d.TableCell,{className:"align-top",children:function(e,l,r){let s=Array.isArray(l)?l:[];if(0===s.length)return null;let i=({modelName:e})=>{let t=r?.(e)??e;return(0,a.jsxs)("span",{className:V,children:[(0,a.jsx)(R.ProviderLogo,{provider:t,className:"w-4 h-4 shrink-0"}),(0,a.jsx)("span",{children:e})]})};return(0,a.jsxs)("span",{className:"grid grid-cols-[auto_1fr] items-start gap-x-2 w-full min-w-0",children:[(0,a.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,a.jsx)(w,{className:"w-5 h-5 stroke-[2.5]"})}),(0,a.jsx)("span",{className:"flex flex-wrap items-start gap-1 min-w-0",children:s.map((e,l)=>(0,a.jsxs)(t.default.Fragment,{children:[l>0&&(0,a.jsx)(g.Icon,{icon:w,size:"xs",className:"shrink-0 text-gray-400"}),(0,a.jsx)(i,{modelName:e})]},e))})]})}(0,Array.isArray(o)?o:[],j)}),(0,a.jsxs)(d.TableCell,{className:"align-top",children:[(0,a.jsx)(E.Tooltip,{title:"Test fallback",children:(0,a.jsx)(g.Icon,{icon:S.PlayIcon,size:"sm",onClick:()=>z(Object.keys(l)[0],e||""),className:"cursor-pointer hover:text-blue-600"})}),(0,a.jsx)(E.Tooltip,{title:"Delete fallback",children:(0,a.jsx)("span",{"data-testid":"delete-fallback-button",role:"button",tabIndex:0,onClick:()=>T(l),onKeyDown:e=>"Enter"===e.key&&T(l),className:"cursor-pointer inline-flex",children:(0,a.jsx)(g.Icon,{icon:_.TrashIcon,size:"sm",className:"hover:text-red-600"})})})]})]},r.toString()+s)}))})]}):(0,a.jsx)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 px-4 py-6 text-center",children:(0,a.jsx)(O.Typography.Text,{type:"secondary",children:"No fallbacks configured. Add fallbacks to automatically try another model when the primary fails."})}),(0,a.jsx)(L.default,{isOpen:y,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:()=>{A(!1),b(null)},onOk:N,confirmLoading:f})]})};e.s(["default",0,({accessToken:e,userRole:j,userID:C,modelData:T})=>{let[I,w]=(0,t.useState)([]);(0,t.useEffect)(()=>{e&&(0,v.getGeneralSettingsCall)(e).then(e=>{w(e)})},[e]);let S=(e,a)=>{w(I.map(t=>t.field_name===e?{...t,field_value:a}:t))};return e?(0,a.jsx)("div",{className:"w-full",children:(0,a.jsxs)(x.TabGroup,{className:"h-[75vh] w-full",children:[(0,a.jsxs)(b.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,a.jsx)(y.Tab,{value:"1",children:"Loadbalancing"}),(0,a.jsx)(y.Tab,{value:"2",children:"Fallbacks"}),(0,a.jsx)(y.Tab,{value:"3",children:"General"})]}),(0,a.jsxs)(h.TabPanels,{className:"px-8 py-6",children:[(0,a.jsx)(f.TabPanel,{children:(0,a.jsx)(N,{accessToken:e,userRole:j,userID:C,modelData:T})}),(0,a.jsx)(f.TabPanel,{children:(0,a.jsx)(U,{accessToken:e,userRole:j,userID:C,modelData:T})}),(0,a.jsx)(f.TabPanel,{children:(0,a.jsx)(l.Card,{children:(0,a.jsxs)(r.Table,{children:[(0,a.jsx)(s.TableHead,{children:(0,a.jsxs)(i.TableRow,{children:[(0,a.jsx)(n.TableHeaderCell,{children:"Setting"}),(0,a.jsx)(n.TableHeaderCell,{children:"Value"}),(0,a.jsx)(n.TableHeaderCell,{children:"Status"}),(0,a.jsx)(n.TableHeaderCell,{children:"Action"})]})}),(0,a.jsx)(c.TableBody,{children:I.filter(e=>"TypedDictionary"!==e.field_type).map((t,l)=>(0,a.jsxs)(i.TableRow,{children:[(0,a.jsxs)(d.TableCell,{children:[(0,a.jsx)(u.Text,{children:t.field_name}),(0,a.jsx)("p",{style:{fontSize:"0.65rem",color:"#808080",fontStyle:"italic"},className:"mt-1",children:t.field_description})]}),(0,a.jsx)(d.TableCell,{children:"Integer"==t.field_type?(0,a.jsx)(A.InputNumber,{step:1,value:t.field_value,onChange:e=>S(t.field_name,e)}):"Boolean"==t.field_type?(0,a.jsx)(p.Switch,{checked:!0===t.field_value||"true"===t.field_value,onChange:e=>S(t.field_name,e)}):null}),(0,a.jsx)(d.TableCell,{children:!0==t.stored_in_db?(0,a.jsx)(o.Badge,{icon:k.CheckCircleIcon,className:"text-white",children:"In DB"}):!1==t.stored_in_db?(0,a.jsx)(o.Badge,{className:"text-gray bg-white outline",children:"In Config"}):(0,a.jsx)(o.Badge,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,a.jsxs)(d.TableCell,{children:[(0,a.jsx)(m.Button,{onClick:()=>((a,t)=>{if(!e)return;let l=I[t].field_value;if(null!=l&&void 0!=l)try{(0,v.updateConfigFieldSetting)(e,a,l);let t=I.map(e=>e.field_name===a?{...e,stored_in_db:!0}:e);w(t)}catch(e){}})(t.field_name,l),children:"Update"}),(0,a.jsx)(g.Icon,{icon:_.TrashIcon,color:"red",onClick:()=>((a,t)=>{if(e)try{(0,v.deleteConfigFieldSetting)(e,a);let t=I.map(e=>e.field_name===a?{...e,stored_in_db:null,field_value:null}:e);w(t)}catch(e){}})(t.field_name,0),children:"Reset"})]})]},l))})]})})})]})]})}):null}],226898)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,916925,e=>{"use strict";var a,t=((a={}).A2A_Agent="A2A Agent",a.AI21="Ai21",a.AI21_CHAT="Ai21 Chat",a.AIML="AI/ML API",a.AIOHTTP_OPENAI="Aiohttp Openai",a.Anthropic="Anthropic",a.ANTHROPIC_TEXT="Anthropic Text",a.AssemblyAI="AssemblyAI",a.AUTO_ROUTER="Auto Router",a.Bedrock="Amazon Bedrock",a.BedrockMantle="Amazon Bedrock Mantle",a.SageMaker="AWS SageMaker",a.Azure="Azure",a.Azure_AI_Studio="Azure AI Foundry (Studio)",a.AZURE_TEXT="Azure Text",a.BASETEN="Baseten",a.BYTEZ="Bytez",a.Cerebras="Cerebras",a.CLARIFAI="Clarifai",a.CLOUDFLARE="Cloudflare",a.CODESTRAL="Codestral",a.Cohere="Cohere",a.COHERE_CHAT="Cohere Chat",a.COMETAPI="Cometapi",a.COMPACTIFAI="Compactifai",a.Cursor="Cursor",a.Dashscope="Dashscope",a.Databricks="Databricks (Qwen API)",a.DATAROBOT="Datarobot",a.DeepInfra="DeepInfra",a.Deepgram="Deepgram",a.Deepseek="Deepseek",a.DOCKER_MODEL_RUNNER="Docker Model Runner",a.DOTPROMPT="Dotprompt",a.ElevenLabs="ElevenLabs",a.EMPOWER="Empower",a.FalAI="Fal AI",a.FEATHERLESS_AI="Featherless Ai",a.FireworksAI="Fireworks AI",a.FRIENDLIAI="Friendliai",a.GALADRIEL="Galadriel",a.GITHUB_COPILOT="Github Copilot",a.Google_AI_Studio="Google AI Studio",a.GradientAI="GradientAI",a.Groq="Groq",a.HEROKU="Heroku",a.Hosted_Vllm="vllm",a.HUGGINGFACE="Huggingface",a.HYPERBOLIC="Hyperbolic",a.Infinity="Infinity",a.JinaAI="Jina AI",a.LAMBDA_AI="Lambda Ai",a.LEMONADE="Lemonade",a.LLAMAFILE="Llamafile",a.LM_STUDIO="Lm Studio",a.LLAMA="Meta Llama",a.MARITALK="Maritalk",a.MiniMax="MiniMax",a.MistralAI="Mistral AI",a.MOONSHOT="Moonshot",a.MORPH="Morph",a.NEBIUS="Nebius",a.NLP_CLOUD="Nlp Cloud",a.NOVITA="Novita",a.NSCALE="Nscale",a.NVIDIA_NIM="Nvidia Nim",a.Ollama="Ollama",a.OLLAMA_CHAT="Ollama Chat",a.OOBABOOGA="Oobabooga",a.OpenAI="OpenAI",a.OPENAI_LIKE="Openai Like",a.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",a.OpenAI_Text="OpenAI Text Completion",a.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",a.Openrouter="Openrouter",a.Oracle="Oracle Cloud Infrastructure (OCI)",a.OVHCLOUD="Ovhcloud",a.Perplexity="Perplexity",a.PETALS="Petals",a.PG_VECTOR="Pg Vector",a.PREDIBASE="Predibase",a.RECRAFT="Recraft",a.REPLICATE="Replicate",a.RunwayML="RunwayML",a.SAGEMAKER_LEGACY="Sagemaker",a.Sambanova="Sambanova",a.SAP="SAP Generative AI Hub",a.Snowflake="Snowflake",a.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",a.TogetherAI="TogetherAI",a.TOPAZ="Topaz",a.Triton="Triton",a.V0="V0",a.VERCEL_AI_GATEWAY="Vercel Ai Gateway",a.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",a.VERTEX_AI_BETA="Vertex Ai Beta",a.VLLM="Vllm",a.VolcEngine="VolcEngine",a.Voyage="Voyage AI",a.WANDB="Wandb",a.WATSONX="Watsonx",a.WATSONX_TEXT="Watsonx Text",a.xAI="xAI",a.XINFERENCE="Xinference",a);let l={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",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"},r="../ui/assets/logos/",s={"A2A Agent":`${r}a2a_agent.png`,Ai21:`${r}ai21.svg`,"Ai21 Chat":`${r}ai21.svg`,"AI/ML API":`${r}aiml_api.svg`,"Aiohttp Openai":`${r}openai_small.svg`,Anthropic:`${r}anthropic.svg`,"Anthropic Text":`${r}anthropic.svg`,AssemblyAI:`${r}assemblyai_small.png`,Azure:`${r}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${r}microsoft_azure.svg`,"Azure Text":`${r}microsoft_azure.svg`,Baseten:`${r}baseten.svg`,"Amazon Bedrock":`${r}bedrock.svg`,"Amazon Bedrock Mantle":`${r}bedrock.svg`,"AWS SageMaker":`${r}bedrock.svg`,Cerebras:`${r}cerebras.svg`,Cloudflare:`${r}cloudflare.svg`,Codestral:`${r}mistral.svg`,Cohere:`${r}cohere.svg`,"Cohere Chat":`${r}cohere.svg`,Cometapi:`${r}cometapi.svg`,Cursor:`${r}cursor.svg`,"Databricks (Qwen API)":`${r}databricks.svg`,Dashscope:`${r}dashscope.svg`,Deepseek:`${r}deepseek.svg`,Deepgram:`${r}deepgram.png`,DeepInfra:`${r}deepinfra.png`,ElevenLabs:`${r}elevenlabs.png`,"Fal AI":`${r}fal_ai.jpg`,"Featherless Ai":`${r}featherless.svg`,"Fireworks AI":`${r}fireworks.svg`,Friendliai:`${r}friendli.svg`,"Github Copilot":`${r}github_copilot.svg`,"Google AI Studio":`${r}google.svg`,GradientAI:`${r}gradientai.svg`,Groq:`${r}groq.svg`,vllm:`${r}vllm.png`,Huggingface:`${r}huggingface.svg`,Hyperbolic:`${r}hyperbolic.svg`,Infinity:`${r}infinity.png`,"Jina AI":`${r}jina.png`,"Lambda Ai":`${r}lambda.svg`,"Lm Studio":`${r}lmstudio.svg`,"Meta Llama":`${r}meta_llama.svg`,MiniMax:`${r}minimax.svg`,"Mistral AI":`${r}mistral.svg`,Moonshot:`${r}moonshot.svg`,Morph:`${r}morph.svg`,Nebius:`${r}nebius.svg`,Novita:`${r}novita.svg`,"Nvidia Nim":`${r}nvidia_nim.svg`,Ollama:`${r}ollama.svg`,"Ollama Chat":`${r}ollama.svg`,Oobabooga:`${r}openai_small.svg`,OpenAI:`${r}openai_small.svg`,"Openai Like":`${r}openai_small.svg`,"OpenAI Text Completion":`${r}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${r}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${r}openai_small.svg`,Openrouter:`${r}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${r}oracle.svg`,Perplexity:`${r}perplexity-ai.svg`,Recraft:`${r}recraft.svg`,Replicate:`${r}replicate.svg`,RunwayML:`${r}runwayml.png`,Sagemaker:`${r}bedrock.svg`,Sambanova:`${r}sambanova.svg`,"SAP Generative AI Hub":`${r}sap.png`,Snowflake:`${r}snowflake.svg`,"Text-Completion-Codestral":`${r}mistral.svg`,TogetherAI:`${r}togetherai.svg`,Topaz:`${r}topaz.svg`,Triton:`${r}nvidia_triton.png`,V0:`${r}v0.svg`,"Vercel Ai Gateway":`${r}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${r}google.svg`,"Vertex Ai Beta":`${r}google.svg`,Vllm:`${r}vllm.png`,VolcEngine:`${r}volcengine.png`,"Voyage AI":`${r}voyage.webp`,Watsonx:`${r}watsonx.svg`,"Watsonx Text":`${r}watsonx.svg`,xAI:`${r}xai.svg`,Xinference:`${r}xinference.svg`};e.s(["Providers",()=>t,"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 return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:s[e],displayName:e}}let a=Object.keys(l).find(a=>l[a].toLowerCase()===e.toLowerCase());if(!a)return{logo:"",displayName:e};let r=t[a];return{logo:s[r],displayName:r}},"getProviderModels",0,(e,a)=>{console.log(`Provider key: ${e}`);let t=l[e];console.log(`Provider mapped to: ${t}`);let r=[];return e&&"object"==typeof a&&(Object.entries(a).forEach(([e,a])=>{if(null!==a&&"object"==typeof a&&"litellm_provider"in a){let l=a.litellm_provider;(l===t||"string"==typeof l&&l.includes(t))&&r.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(a).forEach(([e,a])=>{null!==a&&"object"==typeof a&&"litellm_provider"in a&&"cohere_chat"===a.litellm_provider&&r.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(a).forEach(([e,a])=>{null!==a&&"object"==typeof a&&"litellm_provider"in a&&"sagemaker_chat"===a.litellm_provider&&r.push(e)}))),r},"providerLogoMap",0,s,"provider_map",0,l])},888288,e=>{"use strict";var a=e.i(271645);let t=(e,t)=>{let l=void 0!==t,[r,s]=(0,a.useState)(e);return[l?t:r,e=>{l||s(e)}]};e.s(["default",()=>t])},653496,e=>{"use strict";var a=e.i(721369);e.s(["Tabs",()=>a.default])},689020,e=>{"use strict";var a=e.i(764205);let t=async e=>{try{let t=await (0,a.modelHubCall)(e);if(console.log("model_info:",t),t?.data.length>0){let e=t.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,a)=>e.model_group.localeCompare(a.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,t])},107233,37727,e=>{"use strict";var a=e.i(603908);e.s(["Plus",()=>a.default],107233);var t=e.i(841947);e.s(["X",()=>t.default],37727)},361653,e=>{"use strict";let a=(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",()=>a])},841947,e=>{"use strict";let a=(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",()=>a])},603908,e=>{"use strict";let a=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>a])},158392,419470,e=>{"use strict";var a=e.i(843476),t=e.i(311451);let l={ttl:3600,lowest_latency_buffer:0},r=({routingStrategyArgs:e})=>{let r={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,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"max-w-3xl",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,a.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,a.jsx)("div",{className:"space-y-2",children:(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:r[e]||""}),(0,a.jsx)(t.Input,{name:e,defaultValue:"object"==typeof l?JSON.stringify(l,null,2):l?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,a.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:l})=>(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"max-w-3xl",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,a])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,r])=>(0,a.jsx)("div",{className:"space-y-2",children:(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:l[e]?.ui_field_name||e}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l[e]?.field_description||""}),(0,a.jsx)(t.Input,{name:e,defaultValue:null==r||"null"===r?"":"object"==typeof r?JSON.stringify(r,null,2):r?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var i=e.i(199133);let o=({selectedStrategy:e,availableStrategies:t,routingStrategyDescriptions:l,routerFieldsMetadata:r,onStrategyChange:s})=>(0,a.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:r.routing_strategy?.field_description||""})]}),(0,a.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,a.jsx)(i.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:t.map(e=>(0,a.jsx)(i.Select.Option,{value:e,label:e,children:(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,a.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),l[e]&&(0,a.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:l[e]})]})},e))})})]});var n=e.i(790848);let d=({enabled:e,routerFieldsMetadata:t,onToggle:l})=>(0,a.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:t.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,a.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[t.enable_tag_filtering?.field_description||"",t.enable_tag_filtering?.link&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)("a",{href:t.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,a.jsx)(n.Switch,{checked:e,onChange:l,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:t,routerFieldsMetadata:l,availableRoutingStrategies:i,routingStrategyDescriptions:n})=>(0,a.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"max-w-3xl",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),i.length>0&&(0,a.jsx)(o,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:i,routingStrategyDescriptions:n,routerFieldsMetadata:l,onStrategyChange:a=>{t({...e,selectedStrategy:a})}}),(0,a.jsx)(d,{enabled:e.enableTagFiltering,routerFieldsMetadata:l,onToggle:a=>{t({...e,enableTagFiltering:a})}})]}),(0,a.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,a.jsx)(r,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,a.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:l})]})],158392);var c=e.i(994388),u=e.i(653496),m=e.i(107233),g=e.i(271645),p=e.i(888259),f=e.i(592968),h=e.i(361653),h=h;let x=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var b=e.i(37727);function y({group:e,onChange:t,availableModels:l,maxFallbacks:r}){let s=l.filter(a=>a!==e.primaryModel),o=e.fallbackModels.length{let l=[...e.fallbackModels];l.includes(a)&&(l=l.filter(e=>e!==a)),t({...e,primaryModel:a,fallbackModels:l})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,a)=>(a?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,a.jsx)(h.default,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,a.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,a.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-sm",children:[(0,a.jsx)(x,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,a.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,a.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,a.jsx)("span",{className:"text-red-500",children:"*"}),(0,a.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",r," fallbacks at a time)"]})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)(i.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:o?"Select fallback models to add...":`Maximum ${r} fallbacks reached`,value:e.fallbackModels,onChange:a=>{let l=a.slice(0,r);t({...e,fallbackModels:l})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(t,l)=>{let r=e.fallbackModels.includes(t.value),s=r?e.fallbackModels.indexOf(t.value)+1:null;return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[r&&null!==s&&(0,a.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,a.jsx)("span",{children:t.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,a.jsx)(f.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,a.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,a)=>(a?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:o?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${r} used)`:`Maximum ${r} fallbacks reached. Remove some to add more.`})]}),(0,a.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,a.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,a.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,a.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((l,r)=>(0,a.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-sm transition-all",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,a.jsx)("span",{className:"text-xs font-bold",children:r+1})}),(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"font-medium text-gray-800",children:l})})]}),(0,a.jsx)("button",{type:"button",onClick:()=>{let a;return a=e.fallbackModels.filter((e,a)=>a!==r),void t({...e,fallbackModels:a})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,a.jsx)(b.X,{className:"w-4 h-4"})})]},`${l}-${r}`))})]})]})]})}function v({groups:e,onGroupsChange:t,availableModels:l,maxFallbacks:r=10,maxGroups:s=5}){let[i,o]=(0,g.useState)(e.length>0?e[0].id:"1");(0,g.useEffect)(()=>{e.length>0?e.some(e=>e.id===i)||o(e[0].id):o("1")},[e]);let n=()=>{if(e.length>=s)return;let a=Date.now().toString();t([...e,{id:a,primaryModel:null,fallbackModels:[]}]),o(a)},d=a=>{t(e.map(e=>e.id===a.id?a:e))},f=e.map((t,s)=>{let i=t.primaryModel?t.primaryModel:`Group ${s+1}`;return{key:t.id,label:i,closable:e.length>1,children:(0,a.jsx)(y,{group:t,onChange:d,availableModels:l,maxFallbacks:r})}});return 0===e.length?(0,a.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,a.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,a.jsx)(c.Button,{variant:"primary",onClick:n,icon:()=>(0,a.jsx)(m.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,a.jsx)(u.Tabs,{type:"editable-card",activeKey:i,onChange:o,onEdit:(a,l)=>{"add"===l?n():"remove"===l&&e.length>1&&(a=>{if(1===e.length)return p.default.warning("At least one group is required");let l=e.filter(e=>e.id!==a);t(l),i===a&&l.length>0&&o(l[l.length-1].id)})(a)},items:f,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>v],419470)},793130,e=>{"use strict";var a=e.i(290571),t=e.i(429427),l=e.i(371330),r=e.i(271645),s=e.i(394487),i=e.i(503269),o=e.i(214520),n=e.i(746725),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(601893),g=e.i(140721),p=e.i(942803),f=e.i(233538),h=e.i(694421),x=e.i(700020),b=e.i(35889),y=e.i(998348),v=e.i(722678);let A=(0,r.createContext)(null);A.displayName="GroupContext";let _=r.Fragment,k=Object.assign((0,x.forwardRefWithAs)(function(e,a){var _;let k=(0,r.useId)(),j=(0,p.useProvidedId)(),C=(0,m.useDisabled)(),{id:T=j||`headlessui-switch-${k}`,disabled:N=C||!1,checked:I,defaultChecked:w,onChange:S,name:E,value:O,form:M,autoFocus:L=!1,...R}=e,$=(0,r.useContext)(A),[P,D]=(0,r.useState)(null),F=(0,r.useRef)(null),B=(0,u.useSyncRefs)(F,a,null===$?null:$.setSwitch,D),G=(0,o.useDefaultValue)(w),[H,V]=(0,i.useControllable)(I,S,null!=G&&G),z=(0,n.useDisposables)(),[U,W]=(0,r.useState)(!1),K=(0,d.useEvent)(()=>{W(!0),null==V||V(!H),z.nextFrame(()=>{W(!1)})}),X=(0,d.useEvent)(e=>{if((0,f.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),K()}),q=(0,d.useEvent)(e=>{e.key===y.Keys.Space?(e.preventDefault(),K()):e.key===y.Keys.Enter&&(0,h.attemptSubmit)(e.currentTarget)}),Y=(0,d.useEvent)(e=>e.preventDefault()),J=(0,v.useLabelledBy)(),Z=(0,b.useDescribedBy)(),{isFocusVisible:Q,focusProps:ee}=(0,t.useFocusRing)({autoFocus:L}),{isHovered:ea,hoverProps:et}=(0,l.useHover)({isDisabled:N}),{pressed:el,pressProps:er}=(0,s.useActivePress)({disabled:N}),es=(0,r.useMemo)(()=>({checked:H,disabled:N,hover:ea,focus:Q,active:el,autofocus:L,changing:U}),[H,ea,Q,el,N,U,L]),ei=(0,x.mergeProps)({id:T,ref:B,role:"switch",type:(0,c.useResolveButtonType)(e,P),tabIndex:-1===e.tabIndex?0:null!=(_=e.tabIndex)?_:0,"aria-checked":H,"aria-labelledby":J,"aria-describedby":Z,disabled:N||void 0,autoFocus:L,onClick:X,onKeyUp:q,onKeyPress:Y},ee,et,er),eo=(0,r.useCallback)(()=>{if(void 0!==G)return null==V?void 0:V(G)},[V,G]),en=(0,x.useRender)();return r.default.createElement(r.default.Fragment,null,null!=E&&r.default.createElement(g.FormFields,{disabled:N,data:{[E]:O||"on"},overrides:{type:"checkbox",checked:H},form:M,onReset:eo}),en({ourProps:ei,theirProps:R,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var a;let[t,l]=(0,r.useState)(null),[s,i]=(0,v.useLabels)(),[o,n]=(0,b.useDescriptions)(),d=(0,r.useMemo)(()=>({switch:t,setSwitch:l}),[t,l]),c=(0,x.useRender)();return r.default.createElement(n,{name:"Switch.Description",value:o},r.default.createElement(i,{name:"Switch.Label",value:s,props:{htmlFor:null==(a=d.switch)?void 0:a.id,onClick(e){t&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},r.default.createElement(A.Provider,{value:d},c({ourProps:{},theirProps:e,slot:{},defaultTag:_,name:"Switch.Group"}))))},Label:v.Label,Description:b.Description});var j=e.i(888288),C=e.i(95779),T=e.i(444755),N=e.i(673706),I=e.i(829087);let w=(0,N.makeClassName)("Switch"),S=r.default.forwardRef((e,t)=>{let{checked:l,defaultChecked:s=!1,onChange:i,color:o,name:n,error:d,errorMessage:c,disabled:u,required:m,tooltip:g,id:p}=e,f=(0,a.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),h={bgColor:o?(0,N.getColorClassNames)(o,C.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:o?(0,N.getColorClassNames)(o,C.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[x,b]=(0,j.default)(s,l),[y,v]=(0,r.useState)(!1),{tooltipProps:A,getReferenceProps:_}=(0,I.useTooltip)(300);return r.default.createElement("div",{className:"flex flex-row items-center justify-start"},r.default.createElement(I.default,Object.assign({text:g},A)),r.default.createElement("div",Object.assign({ref:(0,N.mergeRefs)([t,A.refs.setReference]),className:(0,T.tremorTwMerge)(w("root"),"flex flex-row relative h-5")},f,_),r.default.createElement("input",{type:"checkbox",className:(0,T.tremorTwMerge)(w("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:n,required:m,checked:x,onChange:e=>{e.preventDefault()}}),r.default.createElement(k,{checked:x,onChange:e=>{b(e),null==i||i(e)},disabled:u,className:(0,T.tremorTwMerge)(w("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:()=>v(!0),onBlur:()=>v(!1),id:p},r.default.createElement("span",{className:(0,T.tremorTwMerge)(w("sr-only"),"sr-only")},"Switch ",x?"on":"off"),r.default.createElement("span",{"aria-hidden":"true",className:(0,T.tremorTwMerge)(w("background"),x?h.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")}),r.default.createElement("span",{"aria-hidden":"true",className:(0,T.tremorTwMerge)(w("round"),x?(0,T.tremorTwMerge)(h.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",y?(0,T.tremorTwMerge)("ring-2",h.ringColor):"")}))),d&&c?r.default.createElement("p",{className:(0,T.tremorTwMerge)(w("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});S.displayName="Switch",e.s(["Switch",()=>S],793130)},418371,e=>{"use strict";var a=e.i(843476),t=e.i(271645),l=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:r="w-4 h-4"})=>{let[s,i]=(0,t.useState)(!1),{logo:o}=(0,l.getProviderLogoAndName)(e);return s||!o?(0,a.jsx)("div",{className:`${r} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,a.jsx)("img",{src:o,alt:`${e} logo`,className:r,onError:()=>i(!0)})}])},368670,e=>{"use strict";var a=e.i(764205),t=e.i(266027);let l=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,t.useQuery)({queryKey:l.list({}),queryFn:async()=>await (0,a.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},226898,972520,e=>{"use strict";var a=e.i(843476),t=e.i(271645),l=e.i(304967),r=e.i(269200),s=e.i(427612),i=e.i(496020),o=e.i(389083),n=e.i(64848),d=e.i(977572),c=e.i(942232),u=e.i(599724),m=e.i(994388),g=e.i(752978),p=e.i(793130),f=e.i(404206),h=e.i(723731),x=e.i(653824),b=e.i(881073),y=e.i(197647),v=e.i(764205),A=e.i(28651),_=e.i(68155),k=e.i(220508),j=e.i(464571),C=e.i(727749),T=e.i(158392);let N=({accessToken:e,userRole:l,userID:r,modelData:s})=>{let[i,o]=(0,t.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[n,d]=(0,t.useState)([]),[c,u]=(0,t.useState)({}),[m,g]=(0,t.useState)({});return((0,t.useEffect)(()=>{e&&l&&r&&((0,v.getCallbacksCall)(e,r,l).then(e=>{console.log("callbacks",e);let a=e.router_settings;"model_group_retry_policy"in a&&delete a.model_group_retry_policy;let t=a.routing_strategy||null;o(e=>({...e,routerSettings:a,selectedStrategy:t}))}),(0,v.getRouterSettingsCall)(e).then(e=>{if(console.log("router settings from API",e),e.fields){let a={};e.fields.forEach(e=>{a[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),u(a);let t=e.fields.find(e=>"routing_strategy"===e.field_name);t?.options&&d(t.options),e.routing_strategy_descriptions&&g(e.routing_strategy_descriptions);let l=e.fields.find(e=>"enable_tag_filtering"===e.field_name);l?.field_value!==null&&l?.field_value!==void 0&&o(e=>({...e,enableTagFiltering:l.field_value}))}}))},[e,l,r]),e)?(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsx)(T.default,{value:i,onChange:o,routerFieldsMetadata:c,availableRoutingStrategies:n,routingStrategyDescriptions:m}),(0,a.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,a.jsx)(j.Button,{onClick:()=>window.location.reload(),children:"Reset"}),(0,a.jsx)(j.Button,{type:"primary",onClick:()=>{if(!e)return;let a=i.routerSettings;console.log("router_settings",a);let t=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),l=new Set(["model_group_alias","retry_policy"]),r=Object.fromEntries(Object.entries({...a,enable_tag_filtering:i.enableTagFiltering}).map(([e,a])=>{if("routing_strategy_args"!==e&&"routing_strategy"!==e&&"enable_tag_filtering"!==e){let r=document.querySelector(`input[name="${e}"]`),s=((e,a,r)=>{if(void 0===a)return r;let s=a.trim();if("null"===s.toLowerCase())return null;if(t.has(e)){let e=Number(s);return Number.isNaN(e)?r:e}if(l.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,a);return[e,s]}if("routing_strategy"===e)return[e,i.selectedStrategy];if("enable_tag_filtering"===e)return[e,i.enableTagFiltering];if("routing_strategy_args"===e&&"latency-based-routing"===i.selectedStrategy){let e={},a=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]');return a?.value&&(e.lowest_latency_buffer=Number(a.value)),t?.value&&(e.ttl=Number(t.value)),console.log(`setRoutingStrategyArgs: ${e}`),["routing_strategy_args",e]}return null}).filter(e=>null!=e));console.log("updatedVariables",r);try{(0,v.setCallbacksCall)(e,{router_settings:r})}catch(e){C.default.fromBackend("Failed to update router settings: "+e)}C.default.success("router settings updated successfully")},children:"Save Changes"})]})]}):null};e.i(247167);var I=e.i(368670);let w=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:"M14 5l7 7m0 0l-7 7m7-7H3"}))});var S=e.i(122577),E=e.i(592968),O=e.i(898586),M=e.i(356449),L=e.i(127952),R=e.i(418371),$=e.i(708347),P=e.i(888259),D=e.i(689020),F=e.i(212931);let B=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function G({open:e,onCancel:t,children:l}){return(0,a.jsx)(F.Modal,{title:(0,a.jsx)("div",{className:"pb-4 border-b border-gray-100",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-gray-800",children:[(0,a.jsx)("div",{className:"p-2 bg-indigo-50 rounded-lg",children:(0,a.jsx)(B,{className:"w-5 h-5 text-indigo-600"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-bold m-0",children:"Configure Model Fallbacks"}),(0,a.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:t,maskClosable:!1,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,a.jsx)("div",{className:"mt-6",children:l})})}e.s(["ArrowRight",()=>B],972520);var H=e.i(419470);function V({models:e,accessToken:l,value:r=[],onChange:s}){let[i,o]=(0,t.useState)(!1),[n,d]=(0,t.useState)([]),[c,u]=(0,t.useState)(0),[g,p]=(0,t.useState)(!1),[f,h]=(0,t.useState)([{id:"1",primaryModel:null,fallbackModels:[]}]);(0,t.useEffect)(()=>{i&&(h([{id:"1",primaryModel:null,fallbackModels:[]}]),u(e=>e+1))},[i]),(0,t.useEffect)(()=>{let e=async()=>{try{let e=await (0,D.fetchAvailableModels)(l);console.log("Fetched models for fallbacks:",e),d(e)}catch(e){console.error("Error fetching model info for fallbacks:",e)}};i&&e()},[l,i]);let x=Array.from(new Set(n.map(e=>e.model_group))).sort(),b=()=>{o(!1),h([{id:"1",primaryModel:null,fallbackModels:[]}])},y=async()=>{let e=f.filter(e=>!e.primaryModel||0===e.fallbackModels.length);if(e.length>0)return void P.default.error(`Please complete configuration for all groups. ${e.length} group(s) incomplete.`);let a=[...r||[],...f.map(e=>({[e.primaryModel]:e.fallbackModels}))];if(s){p(!0);try{await s(a),C.default.success(`${f.length} fallback configuration(s) added successfully!`),b()}catch(e){console.error("Error saving fallbacks:",e)}finally{p(!1)}}else C.default.fromBackend("onChange callback not provided")};return(0,a.jsxs)("div",{children:[(0,a.jsx)(m.Button,{className:"mx-auto",onClick:()=>o(!0),icon:()=>(0,a.jsx)("span",{className:"mr-1",children:"+"}),children:"Add Fallbacks"}),(0,a.jsxs)(G,{open:i,onCancel:b,children:[(0,a.jsx)(H.FallbackSelectionForm,{groups:f,onGroupsChange:h,availableModels:x,maxFallbacks:10,maxGroups:5},c),f.length>0&&(0,a.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 mt-6 border-t border-gray-100",children:[(0,a.jsx)(j.Button,{type:"default",onClick:b,disabled:g,children:"Cancel"}),(0,a.jsx)(j.Button,{type:"default",onClick:y,disabled:0===f.length||g,loading:g,children:g?"Saving Configuration...":"Save All Configurations"})]})]})]})}let z="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 U(e,t){console.log=function(){};let l=window.location.origin,r=new M.default.OpenAI({apiKey:t,baseURL:l,dangerouslyAllowBrowser:!0});try{C.default.info("Testing fallback model response...");let t=await r.chat.completions.create({model:e,messages:[{role:"user",content:"Hi, this is a test message"}],mock_testing_fallbacks:!0});C.default.success((0,a.jsxs)("span",{children:["Test model=",(0,a.jsx)("strong",{children:e}),", received model=",(0,a.jsx)("strong",{children:t.model}),". See"," ",(0,a.jsx)("a",{href:"#",onClick:()=>window.open("https://docs.litellm.ai/docs/proxy/reliability","_blank"),style:{textDecoration:"underline",color:"blue"},children:"curl"})]}))}catch(e){C.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`)}}let W=({accessToken:e,userRole:l,userID:o,modelData:u})=>{let[m,p]=(0,t.useState)({}),[f,h]=(0,t.useState)(!1),[x,b]=(0,t.useState)(null),[y,A]=(0,t.useState)(!1),{data:k}=(0,I.useModelCostMap)(),j=e=>null!=k&&"object"==typeof k&&e in k?k[e].litellm_provider??"":"";(0,t.useEffect)(()=>{e&&l&&o&&(0,v.getCallbacksCall)(e,o,l).then(e=>{console.log("callbacks",e);let a=e.router_settings;"model_group_retry_policy"in a&&delete a.model_group_retry_policy,p(a)})},[e,l,o]);let T=e=>{b(e),A(!0)},N=async()=>{if(!x||!e)return;let a=Object.keys(x)[0];if(!a)return;h(!0);let t=m.fallbacks.map(e=>{let t={...e};return a in t&&Array.isArray(t[a])&&delete t[a],t}).filter(e=>Object.keys(e).length>0),l={...m,fallbacks:t};try{await (0,v.setCallbacksCall)(e,{router_settings:l}),p(l),C.default.success("Router settings updated successfully")}catch(e){C.default.fromBackend("Failed to update router settings: "+e)}finally{h(!1),A(!1),b(null)}};if(!e)return null;let M=async a=>{if(!e)return;let t={...m,fallbacks:a};try{await (0,v.setCallbacksCall)(e,{router_settings:t}),p(t)}catch(a){throw C.default.fromBackend("Failed to update router settings: "+a),e&&l&&o&&(0,v.getCallbacksCall)(e,o,l).then(e=>{let a=e.router_settings;"model_group_retry_policy"in a&&delete a.model_group_retry_policy,p(a)}),a}},P=Array.isArray(m.fallbacks)&&m.fallbacks.length>0,D=(0,$.isProxyAdminRole)(l??"");return(0,a.jsxs)(a.Fragment,{children:[D&&(0,a.jsx)(V,{models:u?.data?u.data.map(e=>e.model_name):[],accessToken:e||"",value:m.fallbacks||[],onChange:M}),P?(0,a.jsxs)(r.Table,{children:[(0,a.jsx)(s.TableHead,{children:(0,a.jsxs)(i.TableRow,{children:[(0,a.jsx)(n.TableHeaderCell,{children:"Model Name"}),(0,a.jsx)(n.TableHeaderCell,{children:"Fallbacks"}),(0,a.jsx)(n.TableHeaderCell,{children:"Actions"})]})}),(0,a.jsx)(c.TableBody,{children:m.fallbacks.map((l,r)=>Object.entries(l).map(([s,o])=>{let n;return(0,a.jsxs)(i.TableRow,{children:[(0,a.jsx)(d.TableCell,{className:"align-top",children:(n=j?.(s)??s,(0,a.jsxs)("span",{className:z,children:[(0,a.jsx)(R.ProviderLogo,{provider:n,className:"w-4 h-4 shrink-0"}),(0,a.jsx)("span",{children:s})]}))}),(0,a.jsx)(d.TableCell,{className:"align-top",children:function(e,l,r){let s=Array.isArray(l)?l:[];if(0===s.length)return null;let i=({modelName:e})=>{let t=r?.(e)??e;return(0,a.jsxs)("span",{className:z,children:[(0,a.jsx)(R.ProviderLogo,{provider:t,className:"w-4 h-4 shrink-0"}),(0,a.jsx)("span",{children:e})]})};return(0,a.jsxs)("span",{className:"grid grid-cols-[auto_1fr] items-start gap-x-2 w-full min-w-0",children:[(0,a.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,a.jsx)(w,{className:"w-5 h-5 stroke-[2.5]"})}),(0,a.jsx)("span",{className:"flex flex-wrap items-start gap-1 min-w-0",children:s.map((e,l)=>(0,a.jsxs)(t.default.Fragment,{children:[l>0&&(0,a.jsx)(g.Icon,{icon:w,size:"xs",className:"shrink-0 text-gray-400"}),(0,a.jsx)(i,{modelName:e})]},e))})]})}(0,Array.isArray(o)?o:[],j)}),(0,a.jsx)(d.TableCell,{className:"align-top",children:D&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E.Tooltip,{title:"Test fallback",children:(0,a.jsx)(g.Icon,{icon:S.PlayIcon,size:"sm",onClick:()=>U(Object.keys(l)[0],e||""),className:"cursor-pointer hover:text-blue-600"})}),(0,a.jsx)(E.Tooltip,{title:"Delete fallback",children:(0,a.jsx)("span",{"data-testid":"delete-fallback-button",role:"button",tabIndex:0,onClick:()=>T(l),onKeyDown:e=>"Enter"===e.key&&T(l),className:"cursor-pointer inline-flex",children:(0,a.jsx)(g.Icon,{icon:_.TrashIcon,size:"sm",className:"hover:text-red-600"})})})]})})]},r.toString()+s)}))})]}):(0,a.jsx)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 px-4 py-6 text-center",children:(0,a.jsx)(O.Typography.Text,{type:"secondary",children:"No fallbacks configured. Add fallbacks to automatically try another model when the primary fails."})}),(0,a.jsx)(L.default,{isOpen:y,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:()=>{A(!1),b(null)},onOk:N,confirmLoading:f})]})};e.s(["default",0,({accessToken:e,userRole:j,userID:C,modelData:T})=>{let[I,w]=(0,t.useState)([]);(0,t.useEffect)(()=>{e&&(0,v.getGeneralSettingsCall)(e).then(e=>{w(e)})},[e]);let S=(e,a)=>{w(I.map(t=>t.field_name===e?{...t,field_value:a}:t))};return e?(0,a.jsx)("div",{className:"w-full",children:(0,a.jsxs)(x.TabGroup,{className:"h-[75vh] w-full",children:[(0,a.jsxs)(b.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,a.jsx)(y.Tab,{value:"1",children:"Loadbalancing"}),(0,a.jsx)(y.Tab,{value:"2",children:"Fallbacks"}),(0,a.jsx)(y.Tab,{value:"3",children:"General"})]}),(0,a.jsxs)(h.TabPanels,{className:"px-8 py-6",children:[(0,a.jsx)(f.TabPanel,{children:(0,a.jsx)(N,{accessToken:e,userRole:j,userID:C,modelData:T})}),(0,a.jsx)(f.TabPanel,{children:(0,a.jsx)(W,{accessToken:e,userRole:j,userID:C,modelData:T})}),(0,a.jsx)(f.TabPanel,{children:(0,a.jsx)(l.Card,{children:(0,a.jsxs)(r.Table,{children:[(0,a.jsx)(s.TableHead,{children:(0,a.jsxs)(i.TableRow,{children:[(0,a.jsx)(n.TableHeaderCell,{children:"Setting"}),(0,a.jsx)(n.TableHeaderCell,{children:"Value"}),(0,a.jsx)(n.TableHeaderCell,{children:"Status"}),(0,a.jsx)(n.TableHeaderCell,{children:"Action"})]})}),(0,a.jsx)(c.TableBody,{children:I.filter(e=>"TypedDictionary"!==e.field_type).map((t,l)=>(0,a.jsxs)(i.TableRow,{children:[(0,a.jsxs)(d.TableCell,{children:[(0,a.jsx)(u.Text,{children:t.field_name}),(0,a.jsx)("p",{style:{fontSize:"0.65rem",color:"#808080",fontStyle:"italic"},className:"mt-1",children:t.field_description})]}),(0,a.jsx)(d.TableCell,{children:"Integer"==t.field_type?(0,a.jsx)(A.InputNumber,{step:1,value:t.field_value,onChange:e=>S(t.field_name,e)}):"Boolean"==t.field_type?(0,a.jsx)(p.Switch,{checked:!0===t.field_value||"true"===t.field_value,onChange:e=>S(t.field_name,e)}):null}),(0,a.jsx)(d.TableCell,{children:!0==t.stored_in_db?(0,a.jsx)(o.Badge,{icon:k.CheckCircleIcon,className:"text-white",children:"In DB"}):!1==t.stored_in_db?(0,a.jsx)(o.Badge,{className:"text-gray bg-white outline",children:"In Config"}):(0,a.jsx)(o.Badge,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,a.jsxs)(d.TableCell,{children:[(0,a.jsx)(m.Button,{onClick:()=>((a,t)=>{if(!e)return;let l=I[t].field_value;if(null!=l&&void 0!=l)try{(0,v.updateConfigFieldSetting)(e,a,l);let t=I.map(e=>e.field_name===a?{...e,stored_in_db:!0}:e);w(t)}catch(e){}})(t.field_name,l),children:"Update"}),(0,a.jsx)(g.Icon,{icon:_.TrashIcon,color:"red",onClick:()=>((a,t)=>{if(e)try{(0,v.deleteConfigFieldSetting)(e,a);let t=I.map(e=>e.field_name===a?{...e,stored_in_db:null,field_value:null}:e);w(t)}catch(e){}})(t.field_name,0),children:"Reset"})]})]},l))})]})})})]})]})}):null}],226898)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3ac3a9a88413bb27.js b/litellm/proxy/_experimental/out/_next/static/chunks/3ac3a9a88413bb27.js deleted file mode 100644 index 31de866e0f..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/3ac3a9a88413bb27.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,954616,e=>{"use strict";var t=e.i(271645),s=e.i(114272),r=e.i(540143),a=e.i(915823),i=e.i(619273),l=class extends a.Subscribable{#e;#t=void 0;#s;#r;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,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#i()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#a(){let e=this.#s?.state??(0,s.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}}#i(e){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function c(e,s){let a=(0,n.useQueryClient)(s),[c]=t.useState(()=>new l(a,e));t.useEffect(()=>{c.setOptions(e)},[c,e]);let o=t.useSyncExternalStore(t.useCallback(e=>c.subscribe(r.notifyManager.batchCalls(e)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),u=t.useCallback((e,t)=>{c.mutate(e,t).catch(i.noop)},[c]);if(o.error&&(0,i.shouldThrowError)(c.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:u,mutateAsync:o.mutate}}e.s(["useMutation",()=>c],954616)},888288,e=>{"use strict";var t=e.i(271645);let s=(e,s)=>{let r=void 0!==s,[a,i]=(0,t.useState)(e);return[r?s:a,e=>{r||i(e)}]};e.s(["default",()=>s])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),s=e.i(271645);let r={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 a=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(a.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ArrowLeftOutlined",0,i],447566)},292639,e=>{"use strict";var t=e.i(764205),s=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,s.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},250980,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],250980)},502547,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,s],502547)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let s=e.i(264042).Row;e.s(["Row",0,s],621192)},214541,e=>{"use strict";var t=e.i(271645),s=e.i(135214),r=e.i(270345);e.s(["default",0,()=>{let[e,a]=(0,t.useState)([]),{accessToken:i,userId:l,userRole:n}=(0,s.default)();return(0,t.useEffect)(()=>{(async()=>{a(await (0,r.fetchTeams)(i,l,n,null))})()},[i,l,n]),{teams:e,setTeams:a}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function s(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function r(e,r){let a=t(e);return isNaN(r)?s(e,NaN):(r&&a.setDate(a.getDate()+r),a)}function a(e,r){let a=t(e);if(isNaN(r))return s(e,NaN);if(!r)return a;let i=a.getDate(),l=s(e,a.getTime());return(l.setMonth(a.getMonth()+r+1,0),i>=l.getDate())?l:(a.setFullYear(l.getFullYear(),l.getMonth(),i),a)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>s],96226),e.s(["addDays",()=>r],439189),e.s(["addMonths",()=>a],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),s=e.i(343794),r=e.i(529681),a=e.i(908286),i=e.i(242064),l=e.i(246422),n=e.i(838378);let c=["wrap","nowrap","wrap-reverse"],o=["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"],d=function(e,t){let r,a,i;return(0,s.default)(Object.assign(Object.assign(Object.assign({},(r=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${r}`]:r&&c.includes(r)})),(a={},u.forEach(s=>{a[`${e}-align-${s}`]=t.align===s}),a[`${e}-align-stretch`]=!t.align&&!!t.vertical,a)),(i={},o.forEach(s=>{i[`${e}-justify-${s}`]=t.justify===s}),i)))},p=(0,l.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:s,paddingLG:r}=e,a=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:s,flexGapLG:r});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(a),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(a),(e=>{let{componentCls:t}=e,s={};return c.forEach(e=>{s[`${t}-wrap-${e}`]={flexWrap:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return u.forEach(e=>{s[`${t}-align-${e}`]={alignItems:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return o.forEach(e=>{s[`${t}-justify-${e}`]={justifyContent:e}}),s})(a)]},()=>({}),{resetStyle:!1});var h=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(s[r[a]]=e[r[a]]);return s};let m=t.default.forwardRef((e,l)=>{let{prefixCls:n,rootClassName:c,className:o,style:u,flex:m,gap:g,vertical:x=!1,component:f="div",children:v}=e,y=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:b,direction:j,getPrefixCls:w}=t.default.useContext(i.ConfigContext),N=w("flex",n),[M,S,C]=p(N),O=null!=x?x:null==b?void 0:b.vertical,k=(0,s.default)(o,c,null==b?void 0:b.className,N,S,C,d(N,e),{[`${N}-rtl`]:"rtl"===j,[`${N}-gap-${g}`]:(0,a.isPresetSize)(g),[`${N}-vertical`]:O}),_=Object.assign(Object.assign({},null==b?void 0:b.style),u);return m&&(_.flex=m),g&&!(0,a.isPresetSize)(g)&&(_.gap=g),M(t.default.createElement(f,Object.assign({ref:l,className:k,style:_},(0,r.default)(y,["justify","wrap","align"])),v))});e.s(["Flex",0,m],525720)},891547,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:i,className:l,accessToken:n,disabled:c})=>{let[o,u]=(0,s.useState)([]),[d,p]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,a.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{p(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(r.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:i,loading:d,className:l,allowClear:!0,options:o.map(e=>(console.log("Mapping guardrail:",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),s=e.i(271645),r=e.i(199133),a=e.i(764205);function i(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let s=e.version_number??1,r=e.version_status??"draft";return{label:`${e.policy_name} — v${s} (${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:l,className:n,accessToken:c,disabled:o,onPoliciesLoaded:u})=>{let[d,p]=(0,s.useState)([]),[h,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(c){m(!0);try{let e=await (0,a.getPoliciesList)(c);e.policies&&(p(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[c,u]),(0,t.jsx)("div",{children:(0,t.jsx)(r.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:l,loading:h,className:n,allowClear:!0,options:i(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>i])},384767,e=>{"use strict";var t=e.i(843476),s=e.i(599724),r=e.i(271645),a=e.i(389083);let i=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 l=e.i(764205);let n=function({vectorStores:e,accessToken:n}){let[c,o]=(0,r.useState)([]);return(0,r.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,l.vectorStoreListCall)(n);e.data&&o(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)(i,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(s.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,s)=>{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=c.find(t=>t.vector_store_id===e))?`${r.vector_store_name||r.vector_store_id} (${r.vector_store_id})`:e},s)})}):(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)(i,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},c=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 o=e.i(871943),u=e.i(502547),d=e.i(592968);let p=function({mcpServers:e,mcpAccessGroups:i=[],mcpToolPermissions:n={},mcpToolsets:p=[],accessToken:h}){let[m,g]=(0,r.useState)([]),[x,f]=(0,r.useState)([]),[v,y]=(0,r.useState)(new Set),[b,j]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{(async()=>{if(h&&e.length>0)try{let e=await (0,l.fetchMCPServers)(h);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[h,e.length]),(0,r.useEffect)(()=>{(async()=>{if(h&&p.length>0)try{let e=await (0,l.fetchMCPToolsets)(h),t=Array.isArray(e)?e.filter(e=>p.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[h,p.length]);let w=[...e.map(e=>({type:"server",value:e})),...i.map(e=>({type:"accessGroup",value:e}))],N=w.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)(c,{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:"blue",size:"xs",children:N})]}),N>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[w.map((e,s)=>{let r="server"===e.type?n[e.value]:void 0,a=r&&r.length>0,i=v.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 s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s}))},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)(d.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=m.find(t=>t.server_id===e);if(t){let s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),a&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),i?(0,t.jsx)(o.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&i&&(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,s)=>(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},s))})})]},s)}),p.length>0&&p.map((e,s)=>{let r=x.find(t=>t.toolset_id===e),a=b.has(e),i=r?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>i>0&&void j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-purple-200 transition-all ${i>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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),i>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:i}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===i?"tool":"tools"}),a?(0,t.jsx)(o.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),i>0&&a&&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,s)=>(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]},s))})})]},`toolset-${s}`)})]}):(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)(c,{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"})]})]})},h=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"}))}),m=function({agents:e,agentAccessGroups:i=[],accessToken:n}){let[c,o]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,l.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&o(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let u=[...e.map(e=>({type:"agent",value:e})),...i.map(e=>({type:"accessGroup",value:e}))],p=u.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)(h,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(a.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:u.map((e,s)=>(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)(d.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=c.find(t=>t.agent_id===e);if(t){let s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})})})},s))}):(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)(h,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.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:a="",accessToken:i}){let l=e?.vector_stores||[],c=e?.mcp_servers||[],o=e?.mcp_access_groups||[],u=e?.mcp_tool_permissions||{},d=e?.mcp_toolsets||[],h=e?.agents||[],g=e?.agent_access_groups||[],x=(0,t.jsxs)("div",{className:"card"===r?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:l,accessToken:i}),(0,t.jsx)(p,{mcpServers:c,mcpAccessGroups:o,mcpToolPermissions:u,mcpToolsets:d,accessToken:i}),(0,t.jsx)(m,{agents:h,agentAccessGroups:g,accessToken:i})]});return"card"===r?(0,t.jsxs)("div",{className:`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)(s.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),x]}):(0,t.jsxs)("div",{className:`${a}`,children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={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),i=s.forwardRef(function(e,i){return s.createElement(a.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["GlobalOutlined",0,i],160818)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3daef8922b68e600.js b/litellm/proxy/_experimental/out/_next/static/chunks/3daef8922b68e600.js deleted file mode 100644 index d5645b7a28..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/3daef8922b68e600.js +++ /dev/null @@ -1,91 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,111790,758472,280881,e=>{"use strict";e.s([],111790);var t=e.i(843476),s=e.i(708347),r=e.i(750113),l=e.i(994388),a=e.i(197647),n=e.i(653824),i=e.i(881073),o=e.i(404206),c=e.i(723731),d=e.i(599724),m=e.i(629569),u=e.i(844444),x=e.i(869216),p=e.i(212931),h=e.i(199133),g=e.i(592968),f=e.i(898586),b=e.i(271645),j=e.i(500727),y=e.i(266027),v=e.i(912598),N=e.i(243652),_=e.i(764205),w=e.i(135214);let S=(0,N.createQueryKeys)("mcpServerHealth");var T=e.i(727749),C=e.i(988846),k=e.i(678784),A=e.i(995926),I=e.i(328196),P=e.i(302202),O=e.i(409797),M=e.i(54131),F=e.i(440987);let E=[{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}]}],L=E.flatMap(e=>e.fields),R="mcp_required_fields",z={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 U({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 B({action:e,serverName:s,isCurrentlyActive:r,onConfirm:l,onCancel:a}){let[n,i]=(0,b.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)(I.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 make it active and available for use.":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-none 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 q({requiredFields:e,onChange:s,onSave:r,isSaving:l}){let[a,n]=(0,b.useState)(!1),i=L.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)(F.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)(M.ChevronUpIcon,{className:"h-4 w-4 text-gray-400"}):(0,t.jsx)(O.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:E.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 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 V({server:e,onApprove:s,onReject:r,requiredFields:l}){let a=e.approval_status??"active",n=z[a]??z.active,i=L.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)(P.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-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 flex-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 flex-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 flex-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)(A.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 flex-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 flex-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)(A.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 $({accessToken:e}){let[s,r]=(0,b.useState)({total:0,pending_review:0,active:0,rejected:0,items:[]}),[l,a]=(0,b.useState)(""),[n,i]=(0,b.useState)("all"),[o,c]=(0,b.useState)(null),[d,m]=(0,b.useState)(!0),[u,x]=(0,b.useState)(null),[p,h]=(0,b.useState)([]),[g,f]=(0,b.useState)(!1),j=(0,b.useCallback)(async()=>{if(!e)return void m(!1);m(!0),x(null);try{let[t,s]=await Promise.all([(0,_.fetchMCPSubmissions)(e),(0,_.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===R);e&&Array.isArray(e.field_value)&&h(e.field_value)}}catch(e){x(e instanceof Error?e.message:"Failed to load submissions")}finally{m(!1)}},[e]);(0,b.useEffect)(()=>{j()},[j]);let y=async()=>{if(e){f(!0);try{await (0,_.updateConfigFieldSetting)(e,R,p),T.default.success("Submission rules saved")}catch{T.default.fromBackend("Failed to save submission rules")}finally{f(!1)}}},v=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 N(t,s){if(e)try{await (0,_.approveMCPServer)(e,t),await j(),T.default.success(`MCP server "${s}" approved`)}catch{T.default.fromBackend("Failed to approve MCP server")}finally{c(null)}}async function w(t,s,r){if(e)try{await (0,_.rejectMCPServer)(e,t,r),await j(),T.default.success(`MCP server "${s}" rejected`)}catch{T.default.fromBackend("Failed to reject MCP server")}finally{c(null)}}return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)(q,{requiredFields:p,onChange:h,onSave:y,isSaving:g}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(U,{label:"Total Submitted",value:s.total,color:"text-gray-900"}),(0,t.jsx)(U,{label:"Pending Review",value:s.pending_review,color:"text-yellow-600"}),(0,t.jsx)(U,{label:"Active",value:s.active,color:"text-green-600"}),(0,t.jsx)(U,{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)(C.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-none 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-none 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…"}),u&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:u}),!d&&!u&&0===v.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No MCP server submissions match your filters."}),!d&&!u&&v.map(e=>(0,t.jsx)(V,{server:e,requiredFields:p,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)(B,{action:o.action,serverName:o.serverName,isCurrentlyActive:o.isCurrentlyActive,onConfirm:e=>"approve"===o.action?N(o.serverId,o.serverName):w(o.serverId,o.serverName,e),onCancel:()=>c(null)})]})}var H=e.i(808613),D=e.i(311451),K=e.i(998573),W=e.i(482725),J=e.i(988297),Y=e.i(797672),G=e.i(68155),Q=e.i(699857),Z=e.i(149121);let{Text:X}=f.Typography;function ee({serverId:e,serverName:s,accessToken:r,selectedTools:l,onToggle:a}){let[n,i]=(0,b.useState)([]),[o,c]=(0,b.useState)(!1),[d,m]=(0,b.useState)(!1),u=new Set(l.filter(t=>t.server_id===e).map(e=>e.tool_name)),x=(0,b.useCallback)(async()=>{if(r&&!(n.length>0)){c(!0);try{let t=await (0,_.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||x(),m(!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 flex-shrink-0"}),s,u.size>0&&(0,t.jsxs)("span",{className:"ml-1 text-xs text-purple-600 font-semibold",children:[u.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)(W.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=u.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 flex-shrink-0 mt-0.5",children:"✓"})]},s.name)})})})]})}function et({open:e,onClose:s,onSave:r,accessToken:a,initialToolset:n}){let[i]=H.Form.useForm(),[o,c]=(0,b.useState)(n?.tools||[]),[m,u]=(0,b.useState)(!1),[x,h]=(0,b.useState)(""),{data:g=[]}=(0,j.useMCPServers)();b.default.useEffect(()=>{e&&(i.setFieldsValue({toolset_name:n?.toolset_name||"",description:n?.description||""}),c(n?.tools||[]),h(""))},[e,n]);let f=e=>{c(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])},y=async()=>{let e=await i.validateFields();u(!0);try{await r(e.toolset_name,e.description,o),s()}finally{u(!1)}},v=g.filter(e=>{let t=x.toLowerCase();return!t||(e.alias||"").toLowerCase().includes(t)||(e.server_name||"").toLowerCase().includes(t)});return(0,t.jsxs)(p.Modal,{open:e,onCancel:s,title:n?"Edit Toolset":"New Toolset",width:960,footer:null,forceRender:!0,children:[(0,t.jsx)(H.Form,{form:i,layout:"vertical",className:"mt-2",children:(0,t.jsxs)("div",{className:"flex gap-4 mb-4",children:[(0,t.jsx)(H.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)(D.Input,{placeholder:"e.g. github-linear-tools"})}),(0,t.jsx)(H.Form.Item,{label:"Description",name:"description",className:"flex-1 mb-0",children:(0,t.jsx)(D.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)(d.Text,{className:"text-sm font-semibold text-gray-700",children:"Available Tools"})}),(0,t.jsx)(D.Input,{placeholder:"Search MCP servers...",value:x,onChange:e=>h(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)(d.Text,{className:"text-gray-400 text-sm",children:0===g.length?"No MCP servers configured":"No servers match your search"}):v.map(e=>(0,t.jsx)(ee,{serverId:e.server_id,serverName:e.alias||e.server_name||e.server_id,accessToken:a,selectedTools:o,onToggle:f},e.server_id))})]}),(0,t.jsx)("div",{className:"w-px bg-gray-200 flex-shrink-0"}),(0,t.jsxs)("div",{className:"w-72 flex-shrink-0",children:[(0,t.jsxs)(d.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:["(",o.length," tools)"]})]}),(0,t.jsx)("div",{className:"space-y-1 overflow-y-auto",style:{maxHeight:340},children:0===o.length?(0,t.jsx)(d.Text,{className:"text-gray-400 text-sm",children:"No tools added yet"}):o.map((e,s)=>(0,t.jsxs)("button",{type:"button",onClick:()=>f(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: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 flex-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)(l.Button,{variant:"secondary",onClick:s,children:"Cancel"}),(0,t.jsx)(l.Button,{onClick:y,loading:m,children:n?"Save Changes":"Create Toolset"})]})]})}function es(){let[e,s]=(0,b.useState)(!1),r=(0,_.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 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 border bg-white hover:bg-gray-50 text-gray-400 hover:text-gray-600 border-gray-200 transition-colors",children:e?"✓":"copy"})]})]})}function er({accessToken:e,userRole:s}){let r=(0,v.useQueryClient)(),{data:a=[],isLoading:n}=(0,Q.useMCPToolsets)(),[i,o]=(0,b.useState)(!1),[c,u]=(0,b.useState)(null),[x,h]=(0,b.useState)(null),[g,f]=(0,b.useState)(!1),j="Admin"===s||"proxy_admin"===s,y=async(t,s,l)=>{e&&(await (0,_.createMCPToolset)(e,{toolset_name:t,description:s,tools:l}),K.message.success("Toolset created"),r.invalidateQueries({queryKey:["mcpToolsets"]}))},N=async(t,s,l)=>{e&&c&&(await (0,_.updateMCPToolset)(e,{toolset_id:c.toolset_id,toolset_name:t,description:s,tools:l}),K.message.success("Toolset updated"),r.invalidateQueries({queryKey:["mcpToolsets"]}),u(null))},w=async()=>{if(e&&x){f(!0);try{await (0,_.deleteMCPToolset)(e,x),K.message.success("Toolset deleted"),r.invalidateQueries({queryKey:["mcpToolsets"]}),h(null)}finally{f(!1)}}},S=(0,_.getProxyBaseUrl)(),T=[{header:"Toolset ID",accessorKey:"toolset_id",cell:({row:e})=>(0,t.jsxs)("span",{className:"font-mono text-xs bg-gray-100 px-2 py-0.5 rounded text-gray-600",children:[e.original.toolset_id.slice(0,8),"…"]})},{header:"Name",accessorKey:"toolset_name",cell:({row:e})=>{let s=`${S}/toolset/${e.original.toolset_name}/mcp`;return(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-purple-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:e.original.toolset_name})]}),(0,t.jsx)("button",{type:"button",className:"text-xs text-gray-400 hover:text-purple-600 font-mono truncate max-w-xs text-left transition-colors",onClick:()=>navigator.clipboard.writeText(s),title:"Click to copy endpoint URL",children:s})]})}},{header:"Description",accessorKey:"description",cell:({row:e})=>(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.original.description||"—"})},{header:"Tools",accessorKey:"tools",cell:({row:e})=>{let s=e.original.tools;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-xs",children:[s.slice(0,4).map((e,s)=>(0,t.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-purple-50 border border-purple-200 text-purple-700 text-xs",children:e.tool_name},s)),s.length>4&&(0,t.jsxs)("span",{className:"text-xs text-gray-400 self-center",children:["+",s.length-4," more"]})]})}},{header:"Created",accessorKey:"created_at",cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"—"})},...j?[{header:"",id:"actions",cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center gap-1 justify-end",children:[(0,t.jsx)("button",{type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 hover:text-gray-700 transition-colors",onClick:()=>u(e.original),children:(0,t.jsx)(Y.PencilIcon,{className:"h-4 w-4"})}),(0,t.jsx)("button",{type:"button",className:"p-1.5 rounded-lg hover:bg-red-50 text-gray-400 hover:text-red-500 transition-colors",onClick:()=>h(e.original.toolset_id),children:(0,t.jsx)(G.TrashIcon,{className:"h-4 w-4"})})]})}]:[]];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)(m.Title,{children:"MCP Toolsets"}),(0,t.jsx)(d.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."})]}),j&&(0,t.jsx)(l.Button,{icon:J.PlusIcon,onClick:()=>o(!0),children:"New Toolset"})]}),(0,t.jsx)(es,{}),(0,t.jsx)(Z.DataTable,{data:a,columns:T,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:n,noDataMessage:"No toolsets yet. Click 'New Toolset' to create one.",loadingMessage:"Loading toolsets...",enableSorting:!0}),(0,t.jsx)(et,{open:i,onClose:()=>o(!1),onSave:y,accessToken:e}),c&&(0,t.jsx)(et,{open:!!c,onClose:()=>u(null),onSave:N,accessToken:e,initialToolset:c}),(0,t.jsx)(p.Modal,{open:!!x,onCancel:()=>h(null),onOk:w,okText:"Delete",okButtonProps:{danger:!0,loading:g},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 el=e.i(790848),ea=e.i(362024),en=e.i(827252),ei=e.i(779241),eo=e.i(292335),ec=e.i(28651);let ed="rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",em=({label:e,tooltip:s})=>(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[e,(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),eu=({isM2M:e,isEditing:s=!1,oauthFlow:r,initialFlowType:a,docsUrl:n})=>{let i=s?" (leave blank to keep existing)":"";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)(em,{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",...a?{initialValue:a}:{},children:(0,t.jsxs)(h.Select,{className:"rounded-lg",size:"large",children:[(0,t.jsx)(h.Select.Option,{value:eo.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)(h.Select.Option,{value:eo.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)(H.Form.Item,{label:(0,t.jsx)(em,{label:"Client ID",tooltip:"OAuth2 client ID for the client_credentials grant."}),name:["credentials","client_id"],rules:[{required:!0,message:"Client ID is required for M2M OAuth"}],children:(0,t.jsx)(ei.TextInput,{type:"password",placeholder:`Enter OAuth client ID${i}`,className:ed})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)(em,{label:"Client Secret",tooltip:"OAuth2 client secret for the client_credentials grant."}),name:["credentials","client_secret"],rules:[{required:!0,message:"Client Secret is required for M2M OAuth"}],children:(0,t.jsx)(ei.TextInput,{type:"password",placeholder:`Enter OAuth client secret${i}`,className:ed})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)(em,{label:"Token URL",tooltip:"Token endpoint URL for the client_credentials grant."}),name:"token_url",rules:[{required:!0,message:"Token URL is required for M2M OAuth"}],children:(0,t.jsx)(ei.TextInput,{placeholder:"https://auth.example.com/oauth/token",className:ed})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)(em,{label:"Scopes (optional)",tooltip:"Optional scopes to request with the client_credentials grant."}),name:["credentials","scopes"],children:(0,t.jsx)(h.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)(em,{label:"Client ID (optional)",tooltip:"Provide only if your MCP server cannot handle dynamic client registration."}),n&&(0,t.jsx)("a",{href:n,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)(ei.TextInput,{type:"password",placeholder:`Enter client ID${i}`,className:ed})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)(em,{label:"Client Secret (optional)",tooltip:"Provide only if your MCP server cannot handle dynamic client registration."}),name:["credentials","client_secret"],children:(0,t.jsx)(ei.TextInput,{type:"password",placeholder:`Enter client secret${i}`,className:ed})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)(em,{label:"Scopes (optional)",tooltip:"Optional scopes requested during token exchange. Separate multiple scopes with enter or commas."}),name:["credentials","scopes"],children:(0,t.jsx)(h.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)(em,{label:"Authorization URL (optional)",tooltip:"Optional override for the authorization endpoint."}),name:"authorization_url",children:(0,t.jsx)(ei.TextInput,{placeholder:"https://example.com/oauth/authorize",className:ed})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)(em,{label:"Token URL (optional)",tooltip:"Optional override for the token endpoint."}),name:"token_url",children:(0,t.jsx)(ei.TextInput,{placeholder:"https://example.com/oauth/token",className:ed})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)(em,{label:"Registration URL (optional)",tooltip:"Optional override for the dynamic client registration endpoint."}),name:"registration_url",children:(0,t.jsx)(ei.TextInput,{placeholder:"https://example.com/oauth/register",className:ed})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsx)(em,{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)(D.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)(H.Form.Item,{label:(0,t.jsx)(em,{label:"Token Storage TTL (seconds, optional)",tooltip:"How long to cache each user's OAuth access token in Redis before evicting it (regardless of 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)(ec.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)(l.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 ex=e.i(906579),ep=e.i(458505),eh=e.i(366308),eg=e.i(304967);let ef=({value:e={},onChange:s,tools:r=[],disabled:l=!1})=>(0,t.jsx)(eg.Card,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)(ep.DollarOutlined,{className:"text-green-600"}),(0,t.jsx)(m.Title,{children:"Cost Configuration"}),(0,t.jsx)(g.Tooltip,{title:"Configure costs for this MCP server's tool calls. Set a default rate and per-tool overrides.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Default Cost per Query ($)",(0,t.jsx)(g.Tooltip,{title:"Default cost charged for each tool call to this server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)(ec.InputNumber,{min:0,step:1e-4,precision:4,placeholder:"0.0000",value:e.default_cost_per_query,onChange:t=>{let r={...e,default_cost_per_query:t};s?.(r)},disabled:l,style:{width:"200px"},addonBefore:"$"}),(0,t.jsx)(d.Text,{className:"block mt-1 text-gray-500 text-sm",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 text-gray-700",children:["Tool-Specific Costs ($)",(0,t.jsx)(g.Tooltip,{title:"Override the default cost for specific tools. Leave blank to use the default rate.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)(ea.Collapse,{items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(eh.ToolOutlined,{className:"mr-2 text-blue-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Available Tools"}),(0,t.jsx)(ex.Badge,{count:r.length,style:{backgroundColor:"#52c41a",marginLeft:"8px"}})]}),children:(0,t.jsx)("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:r.map((r,a)=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(d.Text,{className:"font-medium text-gray-900",children:r.name}),r.description&&(0,t.jsx)(d.Text,{className:"text-gray-500 text-sm block mt-1",children:r.description})]}),(0,t.jsx)("div",{className:"ml-4",children:(0,t.jsx)(ec.InputNumber,{min:0,step:1e-4,precision:4,placeholder:"Use default",value:e.tool_name_to_cost_per_query?.[r.name],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)},disabled:l,style:{width:"120px"},addonBefore:"$"})})]},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 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsx)(d.Text,{className:"text-blue-800 font-medium",children:"Cost Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[e.default_cost_per_query&&(0,t.jsxs)(d.Text,{className:"text-blue-700",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)(d.Text,{className:"text-blue-700",children:["• ",e,": $",s.toFixed(4)," per query"]},e))]})]})]})});var eb=e.i(464571),ej=e.i(560445),ey=e.i(245704),ev=e.i(270377),eN=e.i(91979);let e_=({formValues:e,tools:s,isLoadingTools:r,toolsError:l,toolsErrorStackTrace:a,canFetchTools:n,fetchTools:i})=>n||e.url||e.spec_path?(0,t.jsx)(eg.Card,{children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ey.CheckCircleOutlined,{className:"text-blue-600"}),(0,t.jsx)(m.Title,{children:"Connection Status"})]}),!n&&(e.url||e.spec_path)&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(eh.ToolOutlined,{className:"text-2xl mb-2"}),(0,t.jsx)(d.Text,{children:"Complete required fields to test connection"}),(0,t.jsx)("br",{}),(0,t.jsx)(d.Text,{className:"text-sm",children:"Fill in URL, Transport, and Authentication to test MCP server connection"})]}),n&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"text-gray-700 font-medium",children:r?"Testing connection to MCP server...":s.length>0?"Connection successful":l?"Connection failed":"Ready to test connection"}),(0,t.jsx)("br",{}),(0,t.jsxs)(d.Text,{className:"text-gray-500 text-sm",children:["Server: ",e.url||e.spec_path]})]}),r&&(0,t.jsxs)("div",{className:"flex items-center text-blue-600",children:[(0,t.jsx)(W.Spin,{size:"small",className:"mr-2"}),(0,t.jsx)(d.Text,{className:"text-blue-600",children:"Connecting..."})]}),!r&&!l&&s.length>0&&(0,t.jsxs)("div",{className:"flex items-center text-green-600",children:[(0,t.jsx)(ey.CheckCircleOutlined,{className:"mr-1"}),(0,t.jsx)(d.Text,{className:"text-green-600 font-medium",children:"Connected"})]}),l&&(0,t.jsxs)("div",{className:"flex items-center text-red-600",children:[(0,t.jsx)(ev.ExclamationCircleOutlined,{className:"mr-1"}),(0,t.jsx)(d.Text,{className:"text-red-600 font-medium",children:"Failed"})]})]}),r&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,t.jsx)(W.Spin,{size:"large"}),(0,t.jsx)(d.Text,{className:"ml-3",children:"Testing connection and loading tools..."})]}),l&&(0,t.jsx)(ej.Alert,{message:"Connection Failed",description:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{children:l}),a&&(0,t.jsx)(ea.Collapse,{items:[{key:"stack-trace",label:"Stack Trace",children:(0,t.jsx)("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"12px",fontFamily:"monospace",margin:0,padding:"8px",backgroundColor:"#f5f5f5",borderRadius:"4px",maxHeight:"400px",overflow:"auto"},children:a})}],style:{marginTop:"12px"}})]}),type:"error",showIcon:!0,action:(0,t.jsx)(eb.Button,{icon:(0,t.jsx)(eN.ReloadOutlined,{}),onClick:i,size:"small",children:"Retry"})}),!r&&0===s.length&&!l&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-500 border rounded-lg border-dashed",children:[(0,t.jsx)(ey.CheckCircleOutlined,{className:"text-2xl mb-2 text-green-500"}),(0,t.jsx)(d.Text,{className:"text-green-600 font-medium",children:"Connection successful!"}),(0,t.jsx)("br",{}),(0,t.jsx)(d.Text,{className:"text-gray-500",children:"No tools found for this MCP server"})]})]})]})}):null;var ew=e.i(928685),eS=e.i(751904),eT=e.i(536916),eC=e.i(91739);let ek=({accessToken:e,oauthAccessToken:t,formValues:s,enabled:r=!0})=>{let[l,a]=(0,b.useState)([]),[n,i]=(0,b.useState)(!1),[o,c]=(0,b.useState)(null),[d,m]=(0,b.useState)(null),[u,x]=(0,b.useState)(!1),p=s.auth_type===eo.AUTH_TYPE.OAUTH2&&s.oauth_flow_type===eo.OAUTH_FLOW.M2M,h=s.auth_type===eo.AUTH_TYPE.OAUTH2&&!p,g=s.transport===eo.TRANSPORT.OPENAPI,f=g?!!s.spec_path:!!s.url,j=g?!!(f&&e):!!(f&&s.transport&&s.auth_type&&e&&(!h||t)),y=JSON.stringify(s.static_headers??{}),v=JSON.stringify(s.credentials??{}),N=async()=>{if(e&&(s.url||s.spec_path)&&(!h||t||g)){i(!0),c(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===eo.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,_.testMCPToolsListRequest)(e,i,t);if(o.tools&&!o.error)a(o.tools),c(null),m(null),o.tools.length>0&&!u&&x(!0);else{let e=o.message||"Failed to retrieve tools list";c(e),m(o.stack_trace||null),a([]),x(!1)}}catch(e){console.error("Tools fetch error:",e),c(e instanceof Error?e.message:String(e)),m(null),a([]),x(!1)}finally{i(!1)}}},w=()=>{a([]),c(null),m(null),x(!1)};return(0,b.useEffect)(()=>{r&&(j?N():w())},[s.url,s.spec_path,s.transport,s.auth_type,e,r,t,j,y,v]),{tools:l,isLoadingTools:n,toolsError:o,toolsErrorStackTrace:d,hasShownSuccessMessage:u,canFetchTools:j,fetchTools:N,clearTools:w}};var eA=e.i(531516);let eI=({tool:e,isEnabled:s,isEditExpanded:r,toolNameToDisplayName:l,toolNameToDescription:a,onToggle:n,onToggleExpand:i,onDisplayNameChange:o,onDescriptionChange:c})=>(0,t.jsxs)("div",{className:`rounded-lg border transition-colors ${s?"bg-blue-50 border-blue-300 hover:border-blue-400":"bg-gray-50 border-gray-200 hover:border-gray-300"}`,children:[(0,t.jsx)("div",{className:"p-4 cursor-pointer",onClick:()=>n(e.name),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(eT.Checkbox,{checked:s,onChange:()=>n(e.name)}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Text,{className:"font-medium text-gray-900",children:l[e.name]||e.name}),(0,t.jsx)("span",{className:`px-2 py-0.5 text-xs rounded-full font-medium ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Enabled":"Disabled"}),l[e.name]&&(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs rounded-full font-medium bg-purple-100 text-purple-800",children:"Custom name"})]}),(a[e.name]||e.description)&&(0,t.jsx)(d.Text,{className:"text-gray-500 text-sm block mt-1",children:a[e.name]||e.description}),(0,t.jsx)(d.Text,{className:"text-gray-400 text-xs block mt-1",children:s?"✓ Users can call this tool":"✗ Users cannot call this tool"})]}),(0,t.jsx)("button",{type:"button",onClick:t=>i(e.name,t),className:`p-1.5 rounded-md transition-colors ${r?"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`,title:"Edit display name and description",children:(0,t.jsx)(eS.EditOutlined,{})})]})}),r&&(0,t.jsxs)("div",{className:"px-4 pb-4 pt-3 border-t border-gray-200 space-y-3 bg-gray-50 rounded-b-lg",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-600 mb-1 block",children:"Display Name"}),(0,t.jsx)(D.Input,{placeholder:e.name,value:l[e.name]||"",onChange:t=>o(e.name,t.target.value)}),(0,t.jsx)(d.Text,{className:"text-xs text-gray-400 mt-1 block",children:"Override how this tool's name appears to users. Leave blank to use original."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-600 mb-1 block",children:"Description"}),(0,t.jsx)(D.Input.TextArea,{placeholder:e.description||"No description",value:a[e.name]||"",onChange:t=>c(e.name,t.target.value),rows:2}),(0,t.jsx)(d.Text,{className:"text-xs text-gray-400 mt-1 block",children:"Override the tool description shown to users. Leave blank to use original."})]})]})]}),eP=({accessToken:e,oauthAccessToken:s,formValues:r,allowedTools:l,existingAllowedTools:a,onAllowedToolsChange:n,toolNameToDisplayName:i,toolNameToDescription:o,onToolNameToDisplayNameChange:c,onToolNameToDescriptionChange:u,keyTools:x,externalTools:p,externalIsLoading:h,externalError:g,externalCanFetch:f})=>{let j=(0,b.useRef)([]),[y,v]=(0,b.useState)(""),[N,_]=(0,b.useState)("crud"),w=(0,b.useRef)(!1),S=(0,b.useRef)(""),[T,C]=(0,b.useState)(new Set),k=void 0!==p,A=ek({accessToken:e,oauthAccessToken:s,formValues:r,enabled:!k}),I=k?p:A.tools,P=k?h??!1:A.isLoadingTools,O=k?g??null:A.toolsError,M=k?f??!1:A.canFetchTools,F=(0,b.useMemo)(()=>{if(!x||0===x.length||0===I.length)return[];let e=new Set,t=[];for(let s of x){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=I.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=I.find(s=>!e.has(s.name)&&l(s.name).includes(t))}a&&(t.push(a),e.add(a.name))}return t},[x,I]),E=(0,b.useMemo)(()=>new Set(F.map(e=>e.name)),[F]),L=(0,b.useMemo)(()=>I.filter(e=>{let t=y.toLowerCase();return e.name.toLowerCase().includes(t)||e.description&&e.description.toLowerCase().includes(t)}),[I,y]),R=(0,b.useMemo)(()=>L.filter(e=>E.has(e.name)),[L,E]),z=(0,b.useMemo)(()=>L.filter(e=>!E.has(e.name)),[L,E]);(0,b.useEffect)(()=>{let e=I.map(e=>e.name).sort().join(","),t=j.current.map(e=>e.name).sort().join(","),s=F.map(e=>e.name).sort().join(",");if(s!==S.current&&(S.current=s,""!==s&&(w.current=!1)),I.length>0&&e!==t){let e=I.map(e=>e.name);w.current?n(l.filter(t=>e.includes(t))):(w.current=!0,a&&a.length>0?n(a.filter(t=>e.includes(t))):F.length>0?n(F.map(e=>e.name).filter(t=>e.includes(t))):n(e))}j.current=I},[I,l,a,n,F]);let U=e=>{l.includes(e)?n(l.filter(t=>t!==e)):n([...l,e])},B=(e,t)=>{t.stopPropagation(),C(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},q=(e,t)=>{let s={...i};t?s[e]=t:delete s[e],c(s)},V=(e,t)=>{let s={...o};t?s[e]=t:delete s[e],u(s)};return M||r.url||r.spec_path?(0,t.jsx)(eg.Card,{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)(eh.ToolOutlined,{className:"text-blue-600"}),(0,t.jsx)(m.Title,{children:"Tool Configuration"}),I.length>0&&(0,t.jsx)(ex.Badge,{count:I.length,style:{backgroundColor:"#52c41a"}})]}),I.length>0&&(0,t.jsx)(eC.Radio.Group,{value:N,onChange:e=>_(e.target.value),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(d.Text,{className:"text-blue-800 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."]})}),P&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,t.jsx)(W.Spin,{size:"large"}),(0,t.jsx)(d.Text,{className:"ml-3",children:"Loading tools from spec..."})]}),O&&!P&&(0,t.jsxs)("div",{className:"text-center py-6 text-red-500 border rounded-lg border-dashed border-red-300 bg-red-50",children:[(0,t.jsx)(eh.ToolOutlined,{className:"text-2xl mb-2"}),(0,t.jsx)(d.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)("br",{}),(0,t.jsx)(d.Text,{className:"text-sm text-red-500",children:O})]}),!P&&!O&&0===I.length&&M&&(x&&x.length>0?(0,t.jsxs)("div",{className:"text-center py-4 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(eh.ToolOutlined,{className:"text-2xl mb-2"}),(0,t.jsx)(d.Text,{children:"No tools loaded from spec"}),(0,t.jsxs)(d.Text,{className:"text-sm block mt-1",children:["Expected tools: ",x.map(e=>e.name).join(", ")]})]}):(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(eh.ToolOutlined,{className:"text-2xl mb-2"}),(0,t.jsx)(d.Text,{children:"No tools available for configuration"}),(0,t.jsx)("br",{}),(0,t.jsx)(d.Text,{className:"text-sm",children:"Connect to an MCP server with tools to configure them"})]})),!M&&(r.url||r.spec_path)&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(eh.ToolOutlined,{className:"text-2xl mb-2"}),(0,t.jsx)(d.Text,{children:"Complete required fields to configure tools"}),(0,t.jsx)("br",{}),(0,t.jsx)(d.Text,{className:"text-sm",children:"Fill in URL, Transport, and Authentication to load available tools"})]}),!P&&!O&&I.length>0&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-green-50 rounded-lg border border-green-200",children:[(0,t.jsx)(ey.CheckCircleOutlined,{className:"text-green-600"}),(0,t.jsxs)(d.Text,{className:"text-green-700 font-medium",children:[l.length," of ",I.length," ",1===I.length?"tool":"tools"," enabled for user access"]})]}),(0,t.jsx)(D.Input,{placeholder:"Search tools by name or description...",prefix:(0,t.jsx)(ew.SearchOutlined,{className:"text-gray-400"}),value:y,onChange:e=>v(e.target.value),allowClear:!0,className:"rounded-lg",size:"large"}),"crud"===N&&(0,t.jsx)(eA.default,{tools:I,searchFilter:y,value:0===l.length?void 0:l,onChange:e=>n(e)}),"flat"===N&&(0,t.jsx)(t.Fragment,{children:0===L.length?(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(ew.SearchOutlined,{className:"text-2xl mb-2"}),(0,t.jsxs)(d.Text,{children:['No tools found matching "',y,'"']})]}):(0,t.jsxs)("div",{className:"space-y-2",children:[R.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 text-gray-500 uppercase tracking-wide",children:"Suggested tools"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let e=F.map(e=>e.name);n([...l.filter(e=>!E.has(e)),...e])},className:"text-xs text-blue-600 hover:text-blue-700",children:"Enable all"}),(0,t.jsx)("button",{type:"button",onClick:()=>{n(l.filter(e=>!E.has(e)))},className:"text-xs text-gray-500 hover:text-gray-700",children:"Disable all"})]})]}),R.map(e=>(0,t.jsx)(eI,{tool:e,isEnabled:l.includes(e.name),isEditExpanded:T.has(e.name),toolNameToDisplayName:i,toolNameToDescription:o,onToggle:U,onToggleExpand:B,onDisplayNameChange:q,onDescriptionChange:V},e.name))]}),z.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 text-gray-500 uppercase tracking-wide",children:R.length>0?"All tools":"Tools"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let e=I.filter(e=>!E.has(e.name)).map(e=>e.name),t=new Set(l);n([...l,...e.filter(e=>!t.has(e))])},className:"text-xs text-blue-600 hover:text-blue-700",children:"Enable all"}),(0,t.jsx)("button",{type:"button",onClick:()=>{n(l.filter(e=>E.has(e)))},className:"text-xs text-gray-500 hover:text-gray-700",children:"Disable all"})]})]}),z.map(e=>(0,t.jsx)(eI,{tool:e,isEnabled:l.includes(e.name),isEditExpanded:T.has(e.name),toolNameToDisplayName:i,toolNameToDescription:o,onToggle:U,onToggleExpand:B,onDisplayNameChange:q,onDescriptionChange:V},e.name))]})]})})]})]})}):null},eO=({isVisible:e,required:s=!0})=>e?(0,t.jsx)(H.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)(g.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)(en.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)(D.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 eM=e.i(770914),eF=e.i(564897),eE=e.i(646563);let{Panel:eL}=ea.Collapse,eR=({availableAccessGroups:e,mcpServer:s,searchValue:r,setSearchValue:l,getAccessGroupOptions:a})=>{let n=H.Form.useFormInstance();return(0,b.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)}"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)}else n.setFieldValue("allow_all_keys",!1),n.setFieldValue("available_on_public_internet",!0)},[s,n]),(0,t.jsx)(ea.Collapse,{className:"bg-gray-50 border border-gray-200 rounded-lg",expandIconPosition:"end",ghost:!1,children:(0,t.jsx)(eL,{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)(g.Tooltip,{title:"When enabled, every API key can access this MCP server.",children:(0,t.jsx)(en.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)(H.Form.Item,{name:"allow_all_keys",valuePropName:"checked",initialValue:s?.allow_all_keys??!1,className:"mb-0",children:(0,t.jsx)(el.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)(g.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)(en.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)(H.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)(el.Switch,{})})]}),(0,t.jsx)(H.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)(g.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)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"mcp_access_groups",className:"mb-4",children:(0,t.jsx)(h.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)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Extra Headers",(0,t.jsx)(g.Tooltip,{title:"Forward custom headers from incoming requests to this MCP server (e.g., Authorization, X-Custom-Header, User-Agent)",children:(0,t.jsx)(en.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)(h.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)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Static Headers",(0,t.jsx)(g.Tooltip,{title:"Send these key-value headers with every request to this MCP server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),required:!1,children:(0,t.jsx)(H.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)(eM.Space,{className:"flex w-full",align:"baseline",size:"middle",children:[(0,t.jsx)(H.Form.Item,{...l,name:[s,"header"],className:"flex-1",rules:[{required:!0,message:"Header name is required"}],children:(0,t.jsx)(D.Input,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header name (e.g., X-API-Key)"})}),(0,t.jsx)(H.Form.Item,{...l,name:[s,"value"],className:"flex-1",rules:[{required:!0,message:"Header value is required"}],children:(0,t.jsx)(D.Input,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header value"})}),(0,t.jsx)(eF.MinusCircleOutlined,{onClick:()=>r(s),className:"text-gray-500 hover:text-red-500 cursor-pointer"})]},e)),(0,t.jsx)(eb.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(eE.PlusOutlined,{}),block:!0,children:"Add Static Header"})]})})})]})},"permissions")})},ez=({accessToken:e,selectedName:s,onSelect:r})=>{let[l,a]=(0,b.useState)([]),[n,i]=(0,b.useState)(!1),[o,c]=(0,b.useState)(new Set);return((0,b.useEffect)(()=>{e&&(i(!0),(0,_.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 text-gray-700",children:"Popular APIs"}),(0,t.jsx)("div",{className:"flex justify-center py-6",children:(0,t.jsx)(W.Spin,{size:"small"})})]}):0===l.length?null:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",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:`flex flex-col items-center gap-1.5 p-3 rounded-lg border transition-all cursor-pointer - ${l?"border-blue-500 bg-blue-50 shadow-sm":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[a?(0,t.jsx)("span",{className:"w-7 h-7 rounded-full bg-gray-200 flex items-center justify-center text-sm font-bold text-gray-600",children:e.title.charAt(0)}):(0,t.jsx)("img",{src:e.icon_url,alt:e.title,className:"w-7 h-7 object-contain",onError:()=>{var t;return t=e.name,void c(e=>new Set(e).add(t))}}),(0,t.jsx)("span",{className:"text-xs text-gray-600 text-center leading-tight font-medium",children:e.title})]},e.name)})}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-2",children:"Select an API to pre-fill the spec URL and OAuth 2.0 settings, or enter your own spec URL below."})]})},eU=({form:e,accessToken:s,onValuesChange:r,onKeyToolsChange:l,onLogoUrlChange:a,onOAuthDocsUrlChange:n})=>{let[i,o]=(0,b.useState)(null);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ez,{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=eo.AUTH_TYPE.OAUTH2,s.oauth_flow_type=eo.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)(H.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)(g.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)(en.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)(D.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 eB=e.i(596239);let eq="/ui/assets/logos/",eV=[{name:"GitHub",url:`${eq}github.svg`},{name:"Slack",url:`${eq}slack.svg`},{name:"Notion",url:`${eq}notion.svg`},{name:"Linear",url:`${eq}linear.svg`},{name:"Jira",url:`${eq}jira.svg`},{name:"Figma",url:`${eq}figma.svg`},{name:"Gmail",url:`${eq}gmail.svg`},{name:"Google Drive",url:`${eq}google_drive.svg`},{name:"Stripe",url:`${eq}stripe.svg`},{name:"Shopify",url:`${eq}shopify.svg`},{name:"Salesforce",url:`${eq}salesforce.svg`},{name:"HubSpot",url:`${eq}hubspot.svg`},{name:"Twilio",url:`${eq}twilio.svg`},{name:"Cloudflare",url:`${eq}cloudflare.svg`},{name:"Sentry",url:`${eq}sentry.svg`},{name:"PostgreSQL",url:`${eq}postgresql.svg`},{name:"Snowflake",url:`${eq}snowflake.svg`},{name:"Zapier",url:`${eq}zapier.svg`},{name:"Google",url:`${eq}google.svg`},{name:"GitLab",url:`${eq}gitlab.svg`}],e$=({value:e,onChange:s})=>{let[r,l]=(0,b.useState)(new Set);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Logo"}),(0,t.jsx)(g.Tooltip,{title:"Select a well-known logo or paste a URL to any image. The logo is shown on the admin and chat pages.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-blue-400 hover:text-blue-600 cursor-help"})})]}),e&&(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsx)("img",{src:e,alt:"Selected logo",className:"w-10 h-10 object-contain rounded",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e})}),(0,t.jsx)("button",{type:"button",onClick:()=>s?.(void 0),className:"text-xs text-gray-400 hover:text-red-500 cursor-pointer bg-transparent border-none",children:"✕"})]}),(0,t.jsx)("div",{className:"grid grid-cols-10 gap-1.5 mb-3",children:eV.map(a=>{let n=e===a.url;return r.has(a.url)?null:(0,t.jsx)(g.Tooltip,{title:a.name,children:(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=a.url,void s?.(e===t?void 0:t)},className:`flex items-center justify-center p-2 rounded-lg border transition-all cursor-pointer - ${n?"border-blue-500 bg-blue-50 shadow-sm":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,style:{width:40,height:40},children:(0,t.jsx)("img",{src:a.url,alt:a.name,className:"w-5 h-5 object-contain",onError:()=>{var e;return e=a.url,void l(t=>new Set(t).add(e))}})})},a.name)})}),(0,t.jsx)(D.Input,{prefix:(0,t.jsx)(eB.LinkOutlined,{className:"text-gray-400"}),placeholder:"Or paste a custom logo URL...",value:e&&!eV.some(t=>t.url===e)?e:"",onChange:e=>{let t=e.target.value.trim();s?.(t||void 0)},className:"rounded-lg",size:"small"})]})},eH=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}}},eD=e=>{let{token:t}=eH(e);return{maskedUrl:(e=>{let{token:t,baseUrl:s}=eH(e);return t?s+"...":e})(e),hasToken:!!t}},eK=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(),eW=e=>e&&(e.includes("-")||e.includes(" "))?Promise.reject("Cannot contain '-' (hyphen) or spaces. Please use '_' (underscore) instead."):Promise.resolve();var eJ=e.i(122520),eY=e.i(165615),eG=e.i(434166);let eQ=({accessToken:e,getCredentials:t,getTemporaryPayload:s,onTokenReceived:r,onBeforeRedirect:l})=>{let[a,n]=(0,b.useState)("idle"),[i,o]=(0,b.useState)(null),[c,d]=(0,b.useState)(null),m=(0,b.useRef)(!1),u="litellm-mcp-oauth-flow-state",x="litellm-mcp-oauth-result",p="litellm-mcp-oauth-return-url",h=(e,t)=>{(0,eG.setSecureItem)(e,t)},g=e=>{try{return(0,eG.getSecureItem)(e)}catch(t){return console.warn(`Failed to get storage item ${e}`,t),null}},f=()=>{try{window.sessionStorage.removeItem(u),window.sessionStorage.removeItem(x),window.sessionStorage.removeItem(p),window.localStorage.removeItem(u),window.localStorage.removeItem(x),window.localStorage.removeItem(p)}catch(e){console.warn("Failed to clear OAuth storage",e)}},j=()=>{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`},y=(0,b.useCallback)(async()=>{let r=t()||{};if(!e){o("Missing admin token"),T.default.error("Access token missing. Please re-authenticate and try again.");return}let a=s();if(!a||!a.url||!a.transport){let e="Please complete server URL and transport before starting OAuth.";o(e),T.default.error(e);return}try{n("authorizing"),o(null);let t=await (0,_.cacheTemporaryMcpServer)(e,a),s=t?.server_id?.trim();if(!s)throw Error("Temporary MCP server identifier missing. Please retry.");let i={};if(!(a.credentials?.client_id&&a.credentials?.client_secret)){let t=await (0,_.registerMcpOAuthClient)(e,s,{client_name:a.alias||a.server_name||s,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:a.credentials&&a.credentials.client_secret?"client_secret_post":"none"});i={clientId:t?.client_id,clientSecret:t?.client_secret}}let c=(0,eY.generateCodeVerifier)(),d=await (0,eY.generateCodeChallenge)(c),m=crypto.randomUUID(),x=i.clientId||r.client_id,g=Array.isArray(r.scopes)?r.scopes.filter(e=>e&&e.trim().length>0).join(" "):void 0,f=(0,_.buildMcpOAuthAuthorizeUrl)({serverId:s,clientId:x,redirectUri:j(),state:m,codeChallenge:d,scope:g}),b={state:m,codeVerifier:c,clientId:x,clientSecret:i.clientSecret||r.client_secret,serverId:s,redirectUri:j()};if(l)try{l()}catch(e){console.error("Failed to prepare for OAuth redirect",e)}try{h(u,JSON.stringify(b)),h(p,window.location.href)}catch(e){throw Error("Unable to access browser storage for OAuth. Please enable storage and retry.")}window.location.href=f}catch(t){console.error("Failed to start OAuth flow",t),n("error");let e=(0,eJ.extractErrorMessage)(t);o(e),T.default.error(e)}},[e,t,s,l]),v=(0,b.useCallback)(async()=>{if(m.current)return;let e=null,t=null;try{let s=g(x);if(!s)return;m.current=!0,e=JSON.parse(s);let r=g(u);t=r?JSON.parse(r):null}catch(e){f(),m.current=!1,o("Failed to resume OAuth flow. Please retry."),n("error"),T.default.error("Failed to resume OAuth flow. Please retry.");return}if(!e){m.current=!1;return}try{window.sessionStorage.removeItem(x),window.localStorage.removeItem(x)}catch(e){}try{if(!t||!t.state||!t.codeVerifier||!t.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(!e.state||e.state!==t.state)throw Error("OAuth state mismatch. Please retry.");if(e.error)throw Error(e.error_description||e.error);if(!e.code)throw Error("Authorization code missing in callback.");n("exchanging");let s=await (0,_.exchangeMcpOAuthToken)({serverId:t.serverId,code:e.code,clientId:t.clientId,clientSecret:t.clientSecret,codeVerifier:t.codeVerifier,redirectUri:t.redirectUri});r(s),d(s),n("success"),o(null),T.default.success("OAuth token retrieved successfully")}catch(t){let e=(0,eJ.extractErrorMessage)(t);o(e),n("error"),T.default.error(e)}finally{f(),setTimeout(()=>{m.current=!1},1e3)}},[r]);return(0,b.useEffect)(()=>{v()},[v]),{startOAuthFlow:y,status:a,error:i,tokenResponse:c}},eZ="../ui/assets/logos/mcp_logo.png",eX=[eo.AUTH_TYPE.API_KEY,eo.AUTH_TYPE.BEARER_TOKEN,eo.AUTH_TYPE.TOKEN,eo.AUTH_TYPE.BASIC],e0=[...eX,eo.AUTH_TYPE.OAUTH2,eo.AUTH_TYPE.AWS_SIGV4],e2="litellm-mcp-oauth-create-state",e1=e=>Array.isArray(e)?e.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value??""),e},{}):{},e5=({userRole:e,accessToken:r,onCreateSuccess:a,isModalVisible:n,setModalVisible:i,availableAccessGroups:o,prefillData:c,onBackToDiscovery:d})=>{let[m]=H.Form.useForm(),[u,x]=(0,b.useState)(!1),[f,j]=(0,b.useState)({}),[y,v]=(0,b.useState)({}),[N,w]=(0,b.useState)(null),[S,C]=(0,b.useState)(!1),[k,A]=(0,b.useState)([]),[I,P]=(0,b.useState)({}),[O,M]=(0,b.useState)({}),[F,E]=(0,b.useState)(""),[L,R]=(0,b.useState)([]),[z,U]=(0,b.useState)(""),[B,q]=(0,b.useState)(null),[V,$]=(0,b.useState)(void 0),[K,W]=(0,b.useState)(null),{tools:J,isLoadingTools:Y,toolsError:G,toolsErrorStackTrace:Q,canFetchTools:Z,fetchTools:X,clearTools:ee}=ek({accessToken:r,oauthAccessToken:B,formValues:y,enabled:!0}),et=y.auth_type,es=!!et&&eX.includes(et),er=et===eo.AUTH_TYPE.OAUTH2,ec=et===eo.AUTH_TYPE.AWS_SIGV4,ed=er&&y.oauth_flow_type===eo.OAUTH_FLOW.M2M,{startOAuthFlow:em,status:ex,error:ep,tokenResponse:eh}=eQ({accessToken:r,getCredentials:()=>m.getFieldValue("credentials"),getTemporaryPayload:()=>{let e=m.getFieldsValue(!0),t=e.transport||F,s=e.url||(t===eo.TRANSPORT.OPENAPI?e.spec_path:void 0);if(!s||!t)return null;let r=e1(e.static_headers);return{server_id:void 0,server_name:e.server_name,alias:e.alias,description:e.description,url:s,transport:t===eo.TRANSPORT.OPENAPI?"http":t,auth_type:eo.AUTH_TYPE.OAUTH2,credentials:e.credentials,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=>{if(q(e?.access_token??null),e?.access_token){let t={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}};m.setFieldsValue({credentials:t}),T.default.success("OAuth authorization successful! Please click 'Create MCP Server' to save the configuration.")}},onBeforeRedirect:()=>{try{let e=m.getFieldsValue(!0);(0,eG.setSecureItem)(e2,JSON.stringify({modalVisible:n,formValues:e,transportType:F,costConfig:f,allowedTools:k,searchValue:z,aliasManuallyEdited:S,logoUrl:V}))}catch(e){console.warn("Failed to persist MCP create state",e)}}});b.default.useEffect(()=>{let e=(0,eG.getSecureItem)(e2);if(e)try{let t=JSON.parse(e);t.modalVisible&&i(!0);let s=t.formValues?.transport||t.transportType||"";s&&E(s),t.formValues&&w({values:t.formValues,transport:s}),t.costConfig&&j(t.costConfig),t.allowedTools&&A(t.allowedTools),t.searchValue&&U(t.searchValue),"boolean"==typeof t.aliasManuallyEdited&&C(t.aliasManuallyEdited),t.logoUrl&&$(t.logoUrl)}catch(e){console.error("Failed to restore MCP create state",e)}finally{window.sessionStorage.removeItem(e2)}},[m,i]),b.default.useEffect(()=>{N&&(F||N.transport,(!N.transport||F)&&(m.setFieldsValue(N.values),v(N.values),w(null)))},[N,m,F]),b.default.useEffect(()=>{if(!n||!c)return;let e=(c.name||"").replace(/[^a-zA-Z0-9_]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,""),t=c.transport||"";E(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);m.setFieldsValue(s),v(s),C(!1)},[n,c,m]);let eg=async e=>{x(!0);try{let{static_headers:t,stdio_config:s,credentials:l,allow_all_keys:n,available_on_public_internet:o,token_validation_json:c,...d}=e,u=d.mcp_access_groups,p=e1(t),h=l&&"object"==typeof l?Object.entries(l).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,g={};if(s&&"stdio"===F)try{let e=JSON.parse(s),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],d.server_name||(d.server_name=r.replace(/-/g,"_"))}}g={command:t.command,args:t.args,env:t.env},console.log("Parsed stdio config:",g)}catch(e){T.default.fromBackend("Invalid JSON in stdio configuration");return}d.transport===eo.TRANSPORT.OPENAPI&&(d.transport="http");let b=null;if(c&&""!==c.trim())try{b=JSON.parse(c)}catch{T.default.fromBackend("Invalid JSON in Token Validation Rules"),x(!1);return}let y={...d,...g,stdio_config:void 0,mcp_info:{server_name:d.server_name||d.url,description:d.description,logo_url:V||void 0,mcp_server_cost_info:Object.keys(f).length>0?f:null},mcp_access_groups:u,alias:d.alias,allowed_tools:k.length>0?k:null,tool_name_to_display_name:Object.keys(I).length>0?I:null,tool_name_to_description:Object.keys(O).length>0?O:null,allow_all_keys:!!n,available_on_public_internet:!!o,static_headers:p,...null!==b&&{token_validation:b}};if(y.static_headers=p,d.auth_type&&e0.includes(d.auth_type)&&h&&Object.keys(h).length>0&&(y.credentials=h),console.log(`Payload: ${JSON.stringify(y)}`),null!=r){let e=ej?await (0,_.createMCPServer)(r,y):await (0,_.registerMCPServer)(r,y);T.default.success(ej?"MCP Server created successfully":"MCP Server submitted for admin review"),m.resetFields(),j({}),ee(),A([]),C(!1),$(void 0),i(!1),a(e)}}catch(t){let e=t instanceof Error?t.message:String(t);T.default.fromBackend(ej?`Error creating MCP Server: ${e}`:`Error submitting MCP Server: ${e}`)}finally{x(!1)}},eb=()=>{m.resetFields(),j({}),ee(),A([]),C(!1),$(void 0),i(!1)};b.default.useEffect(()=>{if(!S&&y.server_name){let e=y.server_name.replace(/\s+/g,"_");m.setFieldsValue({alias:e}),v(t=>({...t,alias:e}))}},[y.server_name]),b.default.useEffect(()=>{n||v({})},[n]);let ej=(0,s.isAdminRole)(e);return(0,t.jsx)(p.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:eZ,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:ej?"Add New MCP Server":"Submit MCP Server for Review"})]}),open:n,width:1e3,onCancel:eb,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)(H.Form,{form:m,onFinish:eg,onValuesChange:(e,t)=>v(t),layout:"vertical",className:"space-y-6",children:[!ej&&(0,t.jsxs)("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 before it becomes active."," ","Note: 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)(H.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)(g.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)(en.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)=>eW(t)}],children:(0,t.jsx)(ei.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)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Alias",(0,t.jsx)(g.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)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"alias",rules:[{required:!1},{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(ei.TextInput,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",onChange:()=>C(!0)})}),(0,t.jsx)(H.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)(ei.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)(e$,{value:V,onChange:$}),(0,t.jsx)(H.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)(ei.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)(H.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)(h.Select,{placeholder:"Select transport",className:"rounded-lg",size:"large",onChange:e=>{E(e),"stdio"===e?m.setFieldsValue({url:void 0,spec_path:void 0,auth_type:void 0,credentials:void 0}):e===eo.TRANSPORT.OPENAPI?m.setFieldsValue({url:void 0,command:void 0,args:void 0,env:void 0}):m.setFieldsValue({spec_path:void 0,command:void 0,args:void 0,env:void 0})},value:F,children:[(0,t.jsx)(h.Select.Option,{value:"http",children:"Streamable HTTP (Recommended)"}),(0,t.jsx)(h.Select.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(h.Select.Option,{value:"stdio",children:"Standard Input/Output (stdio)"}),(0,t.jsx)(h.Select.Option,{value:eo.TRANSPORT.OPENAPI,children:"OpenAPI Spec"})]})}),("http"===F||"sse"===F)&&(0,t.jsx)(H.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)=>eK(t)}],children:(0,t.jsx)(D.Input,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),F===eo.TRANSPORT.OPENAPI&&(0,t.jsx)(eU,{form:m,accessToken:n?r:null,onValuesChange:e=>v(t=>({...t,...e})),onKeyToolsChange:R,onLogoUrlChange:$,onOAuthDocsUrlChange:W}),F===eo.TRANSPORT.OPENAPI&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.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)(g.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)(en.InfoCircleOutlined,{className:"text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"is_byok",valuePropName:"checked",children:(0,t.jsx)(el.Switch,{})}),(0,t.jsx)(H.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)(en.InfoCircleOutlined,{className:"mt-0.5 flex-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",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)(en.InfoCircleOutlined,{className:"mt-0.5 flex-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)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Access Description",(0,t.jsx)(g.Tooltip,{title:"List of permissions shown to users in the connection modal (e.g. 'Create and manage Jira issues')",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"byok_description",children:(0,t.jsx)(h.Select,{mode:"tags",placeholder:"Add access description items (press Enter after each)",className:"w-full",tokenSeparators:[","]})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["API Key Help URL",(0,t.jsx)(g.Tooltip,{title:"Optional link shown to users to help them find their API key",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"byok_api_key_help_url",children:(0,t.jsx)(D.Input,{placeholder:"https://docs.example.com/api-keys"})})]}):null})]}),"stdio"!==F&&""!==F&&(0,t.jsx)(ea.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)(H.Form.Item,{name:"auth_type",rules:[{required:!0,message:"Please select an auth type"}],children:(0,t.jsxs)(h.Select,{placeholder:"Select auth type",className:"rounded-lg",size:"large",children:[(0,t.jsx)(h.Select.Option,{value:"none",children:"None"}),(0,t.jsx)(h.Select.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(h.Select.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(h.Select.Option,{value:"token",children:"Token"}),(0,t.jsx)(h.Select.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(h.Select.Option,{value:"oauth2",children:"OAuth"}),(0,t.jsx)(h.Select.Option,{value:"aws_sigv4",children:"AWS SigV4 (Bedrock AgentCore MCPs)"})]})}),es&&(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(g.Tooltip,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(en.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)(ei.TextInput,{type:"password",placeholder:"Enter token or secret",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),er&&(0,t.jsx)(eu,{isM2M:ed,initialFlowType:eo.OAUTH_FLOW.INTERACTIVE,docsUrl:K,oauthFlow:{startOAuthFlow:em,status:ex,error:ep,tokenResponse:eh}})]})}]}),"stdio"!==F&&""!==F&&ec&&(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)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Region",(0,t.jsx)(g.Tooltip,{title:"AWS region for SigV4 signing (e.g., us-east-1)",children:(0,t.jsx)(en.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)(D.Input,{placeholder:"us-east-1",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.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)(g.Tooltip,{title:"AWS service name for SigV4 signing. Defaults to 'bedrock-agentcore'.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_service_name"],children:(0,t.jsx)(D.Input,{placeholder:"bedrock-agentcore",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.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)(g.Tooltip,{title:"Optional. If not provided, falls back to the boto3 credential chain (IAM role, env vars, etc.).",children:(0,t.jsx)(en.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)(D.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)(H.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)(g.Tooltip,{title:"Optional. Required if AWS Access Key ID is provided.",children:(0,t.jsx)(en.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)(D.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)(H.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)(g.Tooltip,{title:"Optional. Only needed for temporary STS credentials.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_token"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter session token (optional)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.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)(g.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)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_role_name"],children:(0,t.jsx)(D.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)(H.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)(g.Tooltip,{title:"Optional. Session name for the AssumeRole call — appears in CloudTrail logs. Auto-generated if omitted.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_name"],children:(0,t.jsx)(D.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)(eO,{isVisible:"stdio"===F})]}),(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)(eR,{availableAccessGroups:o,mcpServer:null,searchValue:z,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 z&&!o.some(e=>e.toLowerCase().includes(z.toLowerCase()))&&e.push({value:z,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:z}),(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)(e_,{formValues:y,tools:J,isLoadingTools:Y,toolsError:G,toolsErrorStackTrace:Q,canFetchTools:Z,fetchTools:X})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(eP,{accessToken:r,oauthAccessToken:B,formValues:y,allowedTools:k,existingAllowedTools:null,onAllowedToolsChange:A,toolNameToDisplayName:I,toolNameToDescription:O,onToolNameToDisplayNameChange:P,onToolNameToDescriptionChange:M,keyTools:L,externalTools:J,externalIsLoading:Y,externalError:G,externalCanFetch:Z})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(ef,{value:f,onChange:j,tools:J.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)(l.Button,{variant:"secondary",onClick:eb,children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"primary",loading:u,children:u?"Creating...":"Add MCP Server"})]})]})})})};var e4=e.i(175712),e6=e.i(118366),e3=e.i(475254);let e7=(0,e3.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",()=>e7],758472);let e8=(0,e3.default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),e9=(0,e3.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 te=e.i(634831),tt=e.i(438100);let ts=(0,e3.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"}]]);var tr=e.i(500330);let{Title:tl,Text:ta}=f.Typography,{Panel:tn}=ea.Collapse,ti=({icon:e,title:s,description:r,children:l,serverName:a,accessGroups:n=["dev-group"]})=>{let[i,o]=(0,b.useState)(!1);return(0,t.jsxs)(e4.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)(tl,{level:5,className:"mb-0",children:s}),(0,t.jsx)(ta,{className:"text-gray-600",children:r})]})]}),a&&("Implementation Example"===s||"Configuration"===s)&&(0,t.jsxs)(H.Form.Item,{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(el.Switch,{size:"small",checked:i,onChange:o}),(0,t.jsxs)(ta,{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)(ej.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"'})]})]})})]}),b.default.Children.map(l,e=>{if(b.default.isValidElement(e)&&e.props.hasOwnProperty("code")&&e.props.hasOwnProperty("copyKey")){let t=e.props.code;if(t&&t.includes('"headers":'))return b.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})]})},to=({currentServerAccessGroups:e=[]})=>{let s=(0,_.getProxyBaseUrl)(),[r,l]=(0,b.useState)({}),[u,x]=(0,b.useState)({openai:[],litellm:[],cursor:[],http:[]}),[p]=(0,b.useState)("Zapier_MCP"),h=async(e,t)=>{await (0,tr.copyToClipboard)(e)&&(l(e=>({...e,[t]:!0})),setTimeout(()=>{l(e=>({...e,[t]:!1}))},2e3))},g=({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)(e7,{size:16,className:"text-blue-600"}),(0,t.jsx)(ta,{strong:!0,className:"text-gray-700",children:l})]}),(0,t.jsxs)(e4.Card,{className:`bg-gray-50 border border-gray-200 relative ${a}`,children:[(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:r[s]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(e6.CopyIcon,{size:12}),onClick:()=>h(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})]})]}),f=({step:e,title:s,children:r})=>(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:"flex-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)(ta,{strong:!0,className:"text-gray-800 block mb-2",children:s}),r]})]});return(0,t.jsx)("div",{children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Title,{className:"text-3xl font-bold text-gray-900 mb-3",children:"Connect to your MCP client"}),(0,t.jsx)(d.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)(n.TabGroup,{className:"w-full",children:[(0,t.jsx)(i.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)(a.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)(e7,{size:18}),"OpenAI API"]})}),(0,t.jsx)(a.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)(ts,{size:18}),"LiteLLM Proxy"]})}),(0,t.jsx)(a.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)(e8,{size:18}),"Cursor"]})}),(0,t.jsx)(a.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)(e9,{size:18}),"Streamable HTTP"]})})]})}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-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)(e7,{className:"text-blue-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-blue-900",children:"OpenAI Responses API Integration"})]}),(0,t.jsx)(ta,{className:"text-blue-700",children:"Connect OpenAI Responses API to your LiteLLM MCP server for seamless tool integration"})]}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(ti,{icon:(0,t.jsx)(tt.KeyIcon,{className:"text-blue-600",size:16}),title:"API Key Setup",description:"Configure your OpenAI API key for authentication",children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsxs)(ta,{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)(te.ExternalLinkIcon,{size:12})]})]})}),(0,t.jsx)(g,{title:"Environment Variable",code:'export OPENAI_API_KEY="sk-..."',copyKey:"openai-env"})]})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(P.ServerIcon,{className:"text-blue-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"openai-server-url"})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e7,{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)(g,{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)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-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)(ts,{className:"text-emerald-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-emerald-900",children:"LiteLLM Proxy API Integration"})]}),(0,t.jsx)(ta,{className:"text-emerald-700",children:"Connect to LiteLLM Proxy Responses API for seamless tool integration with multiple model providers"})]}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(ti,{icon:(0,t.jsx)(tt.KeyIcon,{className:"text-emerald-600",size:16}),title:"Virtual Key Setup",description:"Configure your LiteLLM Proxy Virtual Key for authentication",children:(0,t.jsxs)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(ta,{children:"Get your Virtual Key from your LiteLLM Proxy dashboard or contact your administrator"})}),(0,t.jsx)(g,{title:"Environment Variable",code:'export LITELLM_API_KEY="sk-..."',copyKey:"litellm-env"})]})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(P.ServerIcon,{className:"text-emerald-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"litellm-server-url"})}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e7,{className:"text-emerald-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the LiteLLM Proxy Responses API",serverName:p,accessGroups:["dev-group"],children:(0,t.jsx)(g,{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)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-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)(e8,{className:"text-purple-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-purple-900",children:"Cursor IDE Integration"})]}),(0,t.jsx)(ta,{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)(e4.Card,{className:"border border-gray-200",children:[(0,t.jsx)(tl,{level:5,className:"mb-4 text-gray-800",children:"Setup Instructions"}),(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(f,{step:1,title:"Open Cursor Settings",children:(0,t.jsxs)(ta,{className:"text-gray-600",children:["Use the keyboard shortcut ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"⇧+⌘+J"})," (Mac) or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+Shift+J"})," (Windows/Linux)"]})}),(0,t.jsx)(f,{step:2,title:"Navigate to MCP Tools",children:(0,t.jsx)(ta,{className:"text-gray-600",children:'Go to the "MCP Tools" tab and click "New MCP Server"'})}),(0,t.jsxs)(f,{step:3,title:"Add Configuration",children:[(0,t.jsxs)(ta,{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",children:"Cmd+S"})," or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+S"})]}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e7,{className:"text-purple-600",size:16}),title:"Configuration",description:"Cursor MCP configuration",serverName:"Zapier Gmail",accessGroups:["dev-group"],children:(0,t.jsx)(g,{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)(o.TabPanel,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(eM.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-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)(e9,{className:"text-green-600",size:24}),(0,t.jsx)(tl,{level:4,className:"mb-0 text-green-900",children:"Streamable HTTP Transport"})]}),(0,t.jsx)(ta,{className:"text-green-700",children:"Connect to LiteLLM MCP using HTTP transport. Compatible with any MCP client that supports HTTP streaming."})]}),(0,t.jsx)(ti,{icon:(0,t.jsx)(e9,{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)(eM.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(ta,{children:"Each MCP client supports different transports. Refer to your client documentation to determine the appropriate transport method."})}),(0,t.jsx)(g,{title:"Server URL",code:`${s}/mcp`,copyKey:"http-server-url"}),(0,t.jsx)(g,{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)(eb.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)(te.ExternalLinkIcon,{size:14}),children:"Learn more about MCP transports"})})]})})]}),{})})]})]})]})})};var tc=e.i(752978),td=e.i(591935),tm=e.i(492030);let tu=({server:e,isLoadingHealth:s,isRechecking:r,onRecheck:l})=>{let[a,n]=(0,b.useState)(!1),i=e.status||"unknown",o=e.last_health_check,c=e.health_check_error;if(s||r)return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-400 px-2 py-0.5 rounded-full bg-gray-50 border border-gray-100",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-gray-300 animate-pulse"}),"Checking"]});let d=!!l,m=(0,t.jsxs)("div",{className:"max-w-xs",children:[(0,t.jsxs)("div",{className:"font-semibold mb-1",children:["Health Status: ",i]}),o&&(0,t.jsxs)("div",{className:"text-xs mb-1",children:["Last Check: ",new Date(o).toLocaleString()]}),c&&(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"font-medium text-red-400 mb-1",children:"Error:"}),(0,t.jsx)("div",{className:"break-words",children:c})]}),!o&&!c&&(0,t.jsx)("div",{className:"text-xs text-gray-400",children:"No health check data available"}),d&&(0,t.jsx)("div",{className:"text-xs text-gray-400 mt-1",children:"Click to recheck"})]});return(0,t.jsx)(g.Tooltip,{title:m,placement:"top",children:(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full ${(e=>{switch(e){case"healthy":return"text-green-700 bg-green-50 border border-green-200";case"unhealthy":return"text-red-700 bg-red-50 border border-red-200";default:return"text-gray-600 bg-gray-50 border border-gray-200"}})(i)} ${d?"cursor-pointer hover:opacity-80":"cursor-default"}`,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onClick:d?()=>l(e.server_id):void 0,children:[(0,t.jsx)("span",{children:a&&d?"↻":(e=>{switch(e){case"healthy":return"✓";case"unhealthy":return"✗";default:return"?"}})(i)}),a&&d?"Recheck":i.charAt(0).toUpperCase()+i.slice(1)]})})};var tx=e.i(530212),tp=e.i(848725);let th=b.forwardRef(function(e,t){return b.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),b.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}))});var tg=e.i(350967),tf=e.i(954616);function tb(e){if(!e)return[];if(Array.isArray(e))return e.map(e=>tj(e)).filter(e=>void 0!==e);let t=tj(e);return void 0===t?[]:[t]}function tj(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]=tj(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=tb(t);return e.length?e:s}return Array.isArray(t)?s.map((e,s)=>tj(t[s]??t[t.length-1],e)):s.map(e=>tj(t,e))}return void 0!==s?s:tb(e.items)}if(void 0!==s)return s;switch(e.type){case"integer":case"number":return 0;case"boolean":return!1;default:return""}}let ty=e=>{let t=tj(e);if("object"===e.type||"array"===e.type){let s="array"===e.type?[]:{};return JSON.stringify(t??s,null,2)}return t};function tv({tool:e,onSubmit:s,isLoading:r,result:a,error:n,onClose:i}){let[o]=H.Form.useForm(),[c,d]=b.default.useState("formatted"),[m,u]=b.default.useState(null),[x,p]=b.default.useState(null),f=b.default.useMemo(()=>"string"==typeof e.inputSchema?{type:"object",properties:{input:{type:"string",description:"Input for this tool"}},required:["input"]}:e.inputSchema,[e.inputSchema]),j=b.default.useMemo(()=>f.properties&&f.properties.params&&"object"===f.properties.params.type&&f.properties.params.properties?{type:"object",properties:f.properties.params.properties,required:f.properties.params.required||[]}:f,[f]);b.default.useEffect(()=>{if(o.resetFields(),!j.properties)return;let e={};Object.entries(j.properties).forEach(([t,s])=>{e[t]=ty(s)}),o.setFieldsValue(e)},[o,j,e]),b.default.useEffect(()=>{m&&(a||n)&&p(Date.now()-m)},[a,n,m]);let y=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}},v=async()=>{await y(JSON.stringify(a,null,2))?T.default.success("Result copied to clipboard"):T.default.fromBackend("Failed to copy result")},N=async()=>{await y(e.name)?T.default.success("Tool name copied to clipboard"):T.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: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:N,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)(l.Button,{onClick:i,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)(g.Tooltip,{title:"Configure the input parameters for this tool call",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)(H.Form,{form:o,onFinish:e=>{u(Date.now()),p(null);let t={};Object.entries(e).forEach(([e,s])=>{let r=j.properties?.[e];if(r&&null!=s&&""!==s)switch(r.type){case"boolean":t[e]="true"===s||!0===s;break;case"number":case"integer":{let l=Number(s);t[e]=Number.isNaN(l)?s:"integer"===r.type?Math.trunc(l):l;break}case"object":case"array":try{let l="string"==typeof s?JSON.parse(s):s,a="object"===r.type&&null!==l&&"object"==typeof l&&!Array.isArray(l),n="array"===r.type&&Array.isArray(l);"object"===r.type&&a||"array"===r.type&&n?t[e]=l:t[e]=s}catch(r){t[e]=s}break;case"string":t[e]=String(s);break;default:t[e]=s}else null!=s&&""!==s&&(t[e]=s)}),s(f.properties&&f.properties.params&&"object"===f.properties.params.type&&f.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)(H.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)(ei.TextInput,{placeholder:"Enter input for this tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})}):void 0===j.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(j.properties).map(([s,r])=>{let l=ty(r),a=`${e.name}-${s}`;return(0,t.jsxs)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[s," ",j.required?.includes(s)&&(0,t.jsx)("span",{className:"text-red-500",children:"*"}),r.description&&(0,t.jsx)(g.Tooltip,{title:r.description,children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:s,initialValue:l,rules:[{required:j.required?.includes(s),message:`Please enter ${s}`},..."object"===r.type||"array"===r.type?[{validator:(e,t)=>{if((null==t||""===t)&&!j.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-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors",defaultValue:l??"",children:[!j.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)(ei.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-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors"}),"boolean"===r.type&&(0,t.jsxs)(h.Select,{placeholder:`Select ${s}`,allowClear:!j.required?.includes(s),className:"w-full",children:[(0,t.jsx)(h.Select.Option,{value:!0,children:"True"}),(0,t.jsx)(h.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-sm focus:outline-none 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)(l.Button,{onClick:()=>o.submit(),disabled:r,variant:"primary",className:"w-full",loading:r,children:r?"Calling Tool...":a||n?"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:a||n||r?(0,t.jsxs)("div",{className:"space-y-3",children:[a&&!r&&!n&&(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!==x&&(0,t.jsxs)("span",{className:"text-xs text-green-600 ml-1",children:["• ",(x/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 border border-green-300 p-0.5",children:[(0,t.jsx)("button",{onClick:()=>d("formatted"),className:`px-2 py-1 text-xs font-medium rounded transition-colors ${"formatted"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"}`,children:"Formatted"}),(0,t.jsx)("button",{onClick:()=>d("json"),className:`px-2 py-1 text-xs font-medium rounded transition-colors ${"json"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"}`,children:"JSON"})]}),(0,t.jsx)("button",{onClick:v,className:"p-1 hover:bg-green-100 rounded 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"})]}),n&&(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:"flex-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!==x&&(0,t.jsxs)("span",{className:"text-xs text-red-600",children:["• ",(x/1e3).toFixed(2),"s"]})]}),(0,t.jsx)("div",{className:"bg-white border border-red-200 rounded 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:n.message})})]})]})}),a&&!r&&!n&&(0,t.jsx)("div",{className:"space-y-3",children:"formatted"===c?a.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 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 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 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 p-3 border border-gray-200",children:(0,t.jsx)("img",{src:e.url,alt:"Tool result",className:"max-w-full h-auto rounded shadow-sm"})})})]}),"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",children:[(0,t.jsx)("div",{className:"flex-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 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(a,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.'})]})})})]})]})]})}var tN=e.i(983561),t_=e.i(438957);let tw=({serverId:e,accessToken:s,auth_type:r,userRole:l,userID:a,serverAlias:n,extraHeaders:i})=>{let[o,c]=(0,b.useState)(null),[u,x]=(0,b.useState)(null),[p,h]=(0,b.useState)(null),[g,f]=(0,b.useState)(""),[j,v]=(0,b.useState)({}),[N,w]=(0,b.useState)(!1),S=i&&i.length>0,T=()=>{if(!n||!S)return;let e={};return Object.entries(j).forEach(([t,s])=>{s&&s.trim()&&(e[`x-mcp-${n}-${t.toLowerCase()}`]=s)}),Object.keys(e).length>0?e:void 0},{data:C,isLoading:k,error:A,refetch:I}=(0,y.useQuery)({queryKey:["mcpTools",e,j],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,_.listMCPTools)(s,e,T())},enabled:!!s,staleTime:3e4}),{mutate:P,isPending:O}=(0,tf.useMutation)({mutationFn:async t=>{if(!s)throw Error("Access Token required");try{return await (0,_.callMCPTool)(s,e,t.tool.name,t.arguments,{customHeaders:T()})}catch(e){throw e}},onSuccess:e=>{x(e.content),h(null)},onError:e=>{h(e),x(null)}}),M=C?.tools||[],F=M.filter(e=>{let t=g.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 h-screen p-4 bg-white",children:(0,t.jsx)(eg.Card,{className:"w-full rounded-xl shadow-md overflow-hidden",children:(0,t.jsxs)("div",{className:"flex h-auto w-full gap-4",children:[(0,t.jsxs)("div",{className:"w-1/4 p-4 bg-gray-50 flex flex-col",children:[(0,t.jsx)(m.Title,{className:"text-xl font-semibold mb-6 mt-2",children:"MCP Tools"}),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[S&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(t_.KeyOutlined,{className:"text-blue-600 mr-2"}),(0,t.jsx)(d.Text,{className:"text-sm font-medium text-blue-800",children:"Additional Headers"})]}),(0,t.jsx)(eb.Button,{size:"small",type:"link",onClick:()=>w(!N),className:"text-blue-700 p-0 h-auto",children:N?"Hide":"Configure"})]}),!N&&0===Object.keys(j).length&&(0,t.jsx)(d.Text,{className:"text-xs text-blue-700",children:'This server requires additional headers. Click "Configure" to provide values.'}),N&&(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[i?.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:e}),(0,t.jsx)(D.Input,{size:"small",placeholder:`Enter ${e}`,value:j[e]||"",onChange:t=>{v({...j,[e]:t.target.value})},prefix:(0,t.jsx)(t_.KeyOutlined,{className:"text-gray-400"}),className:"rounded"})]},e)),(0,t.jsx)(eb.Button,{size:"small",type:"primary",onClick:()=>{I(),w(!1)},disabled:Object.values(j).every(e=>!e||!e.trim()),className:"w-full mt-2",children:"Load Tools"})]}),!N&&Object.keys(j).length>0&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)(d.Text,{className:"text-xs text-green-700 flex items-center",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 bg-green-500 rounded-full mr-2"}),Object.keys(j).length," header(s) configured"]})})]}),(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)(d.Text,{className:"font-medium block mb-3 text-gray-700 flex items-center",children:[(0,t.jsx)(eh.ToolOutlined,{className:"mr-2"})," Available Tools",M.length>0&&(0,t.jsx)("span",{className:"ml-2 bg-blue-100 text-blue-800 text-xs font-medium px-2 py-0.5 rounded-full",children:M.length})]}),M.length>0&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(D.Input,{placeholder:"Search tools...",prefix:(0,t.jsx)(ew.SearchOutlined,{className:"text-gray-400"}),value:g,onChange:e=>f(e.target.value),allowClear:!0,className:"rounded-lg",size:"middle"})}),k&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 bg-white border border-gray-200 rounded-lg",children:[(0,t.jsxs)("div",{className:"relative mb-3",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700",children:"Loading tools..."})]}),C?.error&&!k&&!M.length&&(0,t.jsx)("div",{className:"p-3 text-xs text-red-800 rounded-lg bg-red-50 border border-red-200",children:(0,t.jsxs)("p",{className:"font-medium",children:["Error: ",C.message]})}),!k&&!C?.error&&(!M||0===M.length)&&(0,t.jsxs)("div",{className:"p-4 text-center bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"mx-auto w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center mb-2",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-gray-400",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:"text-xs font-medium text-gray-700 mb-1",children:"No tools available"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"No tools found for this server"})]}),!k&&!C?.error&&M.length>0&&(0,t.jsx)(t.Fragment,{children:0===F.length?(0,t.jsxs)("div",{className:"p-4 text-center bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)(ew.SearchOutlined,{className:"text-2xl text-gray-400 mb-2"}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 mb-1",children:"No tools found"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:['No tools match "',g,'"']})]}):(0,t.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto min-h-0 mcp-tools-scrollable",style:{maxHeight:"400px",scrollbarWidth:"auto",scrollbarColor:"#cbd5e0 #f7fafc"},children:F.map(e=>(0,t.jsxs)("div",{className:`border rounded-lg p-3 cursor-pointer transition-all hover:shadow-sm ${o?.name===e.name?"border-blue-500 bg-blue-50 ring-1 ring-blue-200":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>{c(e),x(null),h(null)},children:[(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[e.mcp_info.logo_url&&(0,t.jsx)("img",{src:e.mcp_info.logo_url,alt:`${e.mcp_info.server_name} logo`,className:"w-4 h-4 object-contain flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"font-mono text-xs font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 truncate",children:e.mcp_info.server_name}),(0,t.jsx)("p",{className:"text-xs text-gray-600 mt-1 line-clamp-2 leading-relaxed",children:e.description})]})]}),o?.name===e.name&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-blue-200",children:(0,t.jsxs)("div",{className:"flex items-center text-xs font-medium text-blue-700",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:"w-3/4 flex flex-col bg-white",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,t.jsx)(m.Title,{className:"text-xl font-semibold mb-0",children:"Tool Testing Playground"})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto p-4",children:o?(0,t.jsx)("div",{className:"h-full",children:(0,t.jsx)(tv,{tool:o,onSubmit:e=>{P({tool:o,arguments:e})},result:u,error:p,isLoading:O,onClose:()=>c(null)})}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(tN.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)(d.Text,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select a Tool to Test"}),(0,t.jsx)(d.Text,{className:"text-center text-gray-500 max-w-md",children:"Choose a tool from the left sidebar to start testing its functionality with custom inputs."})]})})]})]})})})},tS=[eo.AUTH_TYPE.API_KEY,eo.AUTH_TYPE.BEARER_TOKEN,eo.AUTH_TYPE.TOKEN,eo.AUTH_TYPE.BASIC],tT=[...tS,eo.AUTH_TYPE.OAUTH2,eo.AUTH_TYPE.AWS_SIGV4],tC="litellm-mcp-oauth-edit-state",tk=({mcpServer:e,accessToken:s,onCancel:r,onSuccess:d,availableAccessGroups:m})=>{let[u]=H.Form.useForm(),[x,p]=(0,b.useState)({}),[f,j]=(0,b.useState)([]),[y,v]=(0,b.useState)(!1),[N,w]=(0,b.useState)(""),[S,C]=(0,b.useState)(!1),[k,A]=(0,b.useState)([]),[I,P]=(0,b.useState)({}),[O,M]=(0,b.useState)({}),[F,E]=(0,b.useState)(null),[L,R]=(0,b.useState)(e.mcp_info?.logo_url||void 0),z=H.Form.useWatch("auth_type",u),U=H.Form.useWatch("transport",u),B="stdio"===U,q=U===eo.TRANSPORT.OPENAPI,V=!!z&&tS.includes(z),$=z===eo.AUTH_TYPE.OAUTH2,K=z===eo.AUTH_TYPE.AWS_SIGV4,W=H.Form.useWatch("oauth_flow_type",u),J=$&&W===eo.OAUTH_FLOW.M2M,[Y,G]=(0,b.useState)(null),Q=H.Form.useWatch("url",u),Z=H.Form.useWatch("spec_path",u),X=H.Form.useWatch("server_name",u),ee=H.Form.useWatch("auth_type",u),et=H.Form.useWatch("static_headers",u),es=H.Form.useWatch("credentials",u),er=H.Form.useWatch("authorization_url",u),el=H.Form.useWatch("token_url",u),ea=H.Form.useWatch("registration_url",u),{startOAuthFlow:ei,status:ed,error:em,tokenResponse:eu}=eQ({accessToken:s,getCredentials:()=>u.getFieldValue("credentials"),getTemporaryPayload:()=>{let t=u.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??""),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:eo.AUTH_TYPE.OAUTH2,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:e=>{if(G(e?.access_token??null),e?.access_token){let t={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.setFieldsValue({credentials:t}),T.default.success("OAuth authorization successful! Please click 'Update MCP Server' to save the credentials.")}},onBeforeRedirect:()=>{try{let t=u.getFieldsValue(!0);(0,eG.setSecureItem)(tC,JSON.stringify({serverId:e.server_id,formValues:t,costConfig:x,allowedTools:k,searchValue:N,aliasManuallyEdited:S}))}catch(e){console.warn("Failed to persist MCP edit state",e)}}}),ex=b.default.useMemo(()=>e.static_headers?Object.entries(e.static_headers).map(([e,t])=>({header:e,value:null!=t?String(t):""})):[],[e.static_headers]),ep=b.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]),eh=b.default.useMemo(()=>e.spec_path&&"stdio"!==e.transport?eo.TRANSPORT.OPENAPI:e.transport,[e]),eg=b.default.useMemo(()=>({...e,transport:eh,static_headers:ex,extra_headers:e.extra_headers||[],oauth_flow_type:e.token_url?eo.OAUTH_FLOW.M2M:eo.OAUTH_FLOW.INTERACTIVE,token_validation_json:e.token_validation?JSON.stringify(e.token_validation,null,2):void 0}),[e,eh,ex,ep]);(0,b.useEffect)(()=>{e.mcp_info?.mcp_server_cost_info&&p(e.mcp_info.mcp_server_cost_info)},[e]),(0,b.useEffect)(()=>{e.allowed_tools&&A(e.allowed_tools),P(e.tool_name_to_display_name??{}),M(e.tool_name_to_description??{})},[e]),(0,b.useEffect)(()=>{let t=(0,eG.getSecureItem)(tC);if(t)try{let s=JSON.parse(t);if(!s||s.serverId!==e.server_id)return;s.formValues&&E({...e,...s.formValues}),s.costConfig&&p(s.costConfig),s.allowedTools&&A(s.allowedTools),s.searchValue&&w(s.searchValue),"boolean"==typeof s.aliasManuallyEdited&&C(s.aliasManuallyEdited)}catch(e){console.error("Failed to restore MCP edit state",e)}finally{window.sessionStorage.removeItem(tC)}},[u,e]),(0,b.useEffect)(()=>{if(!F)return;let t=F.transport||e.transport;t&&t!==u.getFieldValue("transport")?u.setFieldsValue({transport:t}):(u.setFieldsValue(F),E(null))},[F,u,e.transport]),(0,b.useEffect)(()=>{if(e.mcp_access_groups){let t=e.mcp_access_groups.map(e=>"string"==typeof e?e:e.name||String(e));u.setFieldValue("mcp_access_groups",t)}},[e]),(0,b.useEffect)(()=>{e.server_id&&""!==e.server_id.trim()&&ej()},[e,s,Y]);let ej=async()=>{if(!s||"stdio"!==e.transport&&!e.url&&!e.spec_path)return;let t=e.auth_type===eo.AUTH_TYPE.OAUTH2&&!!e.token_url;if(e.auth_type!==eo.AUTH_TYPE.OAUTH2||t||Y){v(!0);try{let t={server_id:e.server_id,server_name:e.server_name,url:e.url,transport:e.transport,auth_type:e.auth_type,mcp_info:e.mcp_info,authorization_url:e.authorization_url,token_url:e.token_url,registration_url:e.registration_url,command:e.command,args:e.args,env:e.env},r=await (0,_.testMCPToolsListRequest)(s,t,Y);r.tools&&!r.error?j(r.tools):(console.error("Failed to fetch tools:",r.message),j([]))}catch(e){console.error("Tools fetch error:",e),j([])}finally{v(!1)}}},ey=async t=>{if(s)try{let{static_headers:r,credentials:l,stdio_config:a,env_json:n,command:i,args:o,allow_all_keys:c,available_on_public_internet:m,token_validation_json:u,...p}=t,h=(p.mcp_access_groups||[]).map(e=>"string"==typeof e?e:e.name||String(e)),g=Array.isArray(r)?r.reduce((e,t)=>{let s=t?.header?.trim();return s&&(e[s]=t?.value??""),e},{}):{},f=l&&"object"==typeof l?Object.entries(l).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,b={};if("stdio"===p.transport)if(a)try{let e=JSON.parse(a),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(!(b={command:t?.command?String(t.command):void 0,args:s,env:r}).command)return void T.default.fromBackend("Stdio configuration must include a command")}catch{T.default.fromBackend("Invalid JSON in stdio configuration");return}else{let e={};if(n)try{let t=JSON.parse(n);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{T.default.fromBackend("Invalid JSON in stdio env configuration");return}let t=Array.isArray(o)?o.map(e=>String(e)).filter(e=>""!==e.trim()):[],s=i?String(i).trim():"";if(!s)return void T.default.fromBackend("Stdio transport requires a command");b={command:s,args:t,env:e}}p.transport===eo.TRANSPORT.OPENAPI&&(p.transport="http");let j=null;if(u&&""!==u.trim())try{j=JSON.parse(u)}catch{T.default.fromBackend("Invalid JSON in Token Validation Rules");return}let y=p.server_name||p.url||e.server_name||e.url||p.alias||e.alias||"unknown",v={...p,...b,stdio_config:void 0,env_json:void 0,server_id:e.server_id,mcp_info:{server_name:y,description:p.description,logo_url:L||void 0,mcp_server_cost_info:Object.keys(x).length>0?x:null},mcp_access_groups:h,alias:p.alias,extra_headers:p.extra_headers||[],allowed_tools:k.length>0?k:null,tool_name_to_display_name:Object.keys(I).length>0?I:null,tool_name_to_description:Object.keys(O).length>0?O:null,disallowed_tools:p.disallowed_tools||[],static_headers:g,allow_all_keys:!!(c??e.allow_all_keys),available_on_public_internet:!!(m??e.available_on_public_internet),...null!==j||e.token_validation?{token_validation:j}:{}};p.auth_type&&tT.includes(p.auth_type)&&f&&Object.keys(f).length>0&&(v.credentials=f);let N=await (0,_.updateMCPServer)(s,v);T.default.success("MCP Server updated successfully"),d(N)}catch(e){T.default.fromBackend("Failed to update MCP Server"+(e?.message?`: ${e.message}`:""))}};return(0,t.jsxs)(n.TabGroup,{children:[(0,t.jsxs)(i.TabList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(a.Tab,{children:"Server Configuration"}),(0,t.jsx)(a.Tab,{children:"Cost Configuration"})]}),(0,t.jsxs)(c.TabPanels,{className:"mt-6",children:[(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)(H.Form,{form:u,onFinish:ey,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(H.Form.Item,{label:"MCP Server Name",name:"server_name",rules:[{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(D.Input,{className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:"Alias",name:"alias",rules:[{validator:(e,t)=>eW(t)}],children:(0,t.jsx)(D.Input,{onChange:()=>C(!0),className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(D.Input,{className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(e$,{value:L,onChange:R}),(0,t.jsx)(H.Form.Item,{label:"Transport Type",name:"transport",rules:[{required:!0}],children:(0,t.jsxs)(h.Select,{onChange:e=>{"stdio"===e?u.setFieldsValue({url:void 0,spec_path:void 0,auth_type:void 0,credentials:void 0,authorization_url:void 0,token_url:void 0,registration_url:void 0}):e===eo.TRANSPORT.OPENAPI?u.setFieldsValue({url:void 0,command:void 0,args:void 0,env_json:void 0,stdio_config:void 0}):u.setFieldsValue({spec_path:void 0,command:void 0,args:void 0,env_json:void 0,stdio_config:void 0})},children:[(0,t.jsx)(h.Select.Option,{value:"http",children:"Streamable HTTP (Recommended)"}),(0,t.jsx)(h.Select.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(h.Select.Option,{value:"stdio",children:"Standard Input/Output (stdio)"}),(0,t.jsx)(h.Select.Option,{value:eo.TRANSPORT.OPENAPI,children:"OpenAPI Spec"})]})}),!B&&!q&&(0,t.jsx)(H.Form.Item,{label:"MCP Server URL",name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,t)=>eK(t)}],children:(0,t.jsx)(D.Input,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),q&&(0,t.jsx)(H.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)(g.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)(en.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)(D.Input,{placeholder:"https://petstore3.swagger.io/api/v3/openapi.json",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!B&&(0,t.jsx)(H.Form.Item,{label:"Authentication",name:"auth_type",rules:[{required:!0}],children:(0,t.jsxs)(h.Select,{children:[(0,t.jsx)(h.Select.Option,{value:"none",children:"None"}),(0,t.jsx)(h.Select.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(h.Select.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(h.Select.Option,{value:"token",children:"Token"}),(0,t.jsx)(h.Select.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(h.Select.Option,{value:"oauth2",children:"OAuth"}),(0,t.jsx)(h.Select.Option,{value:"aws_sigv4",children:"AWS SigV4 (Bedrock AgentCore MCPs)"})]})}),B&&(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)(H.Form.Item,{label:"Command",name:"command",rules:[{required:!0,message:"Please enter a command for stdio transport"}],children:(0,t.jsx)(D.Input,{placeholder:"e.g., npx",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:"Args",name:"args",children:(0,t.jsx)(h.Select,{mode:"tags",size:"large",tokenSeparators:[","],placeholder:"Add args (press enter or comma)",className:"rounded-lg"})}),(0,t.jsx)(H.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)(D.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)(eO,{isVisible:!0,required:!1})]}),!B&&V&&(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(g.Tooltip,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(en.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)(D.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"})}),!B&&$&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client ID (optional)",(0,t.jsx)(g.Tooltip,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_id"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter OAuth client ID (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client Secret (optional)",(0,t.jsx)(g.Tooltip,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_secret"],children:(0,t.jsx)(D.Input.Password,{placeholder:"Enter OAuth client secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Scopes (optional)",(0,t.jsx)(g.Tooltip,{title:"Add scopes to override the default scope list used for this MCP server.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","scopes"],children:(0,t.jsx)(h.Select,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authorization URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the authorization endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"authorization_url",children:(0,t.jsx)(D.Input,{placeholder:"https://example.com/oauth/authorize",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the token endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_url",children:(0,t.jsx)(D.Input,{placeholder:"https://example.com/oauth/token",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Registration URL Override (optional)",(0,t.jsx)(g.Tooltip,{title:"Optional override for the dynamic client registration endpoint.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"registration_url",children:(0,t.jsx)(D.Input,{placeholder:"https://example.com/oauth/register",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),!J&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token Validation Rules (optional)",(0,t.jsx)(g.Tooltip,{title:'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.',children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),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)(D.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)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token Storage TTL (seconds, optional)",(0,t.jsx)(g.Tooltip,{title:"How long to cache each user's OAuth access token in Redis before evicting it (regardless of 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.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_storage_ttl_seconds",children:(0,t.jsx)(ec.InputNumber,{min:1,placeholder:"e.g. 3600",style:{width:"100%"},className:"rounded-lg"})})]}),(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)(l.Button,{variant:"secondary",onClick:ei,disabled:"authorizing"===ed||"exchanging"===ed,children:"authorizing"===ed?"Waiting for authorization...":"exchanging"===ed?"Exchanging authorization code...":"Authorize & Fetch Token"}),em&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:em}),"success"===ed&&eu?.access_token&&(0,t.jsxs)("p",{className:"text-sm text-green-600",children:["Token fetched. Expires in ",eu.expires_in??"?"," seconds."]})]})]}),!B&&K&&(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)(H.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["AWS Region",(0,t.jsx)(g.Tooltip,{title:"AWS region for SigV4 signing (e.g., us-east-1)",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_region_name"],rules:[],children:(0,t.jsx)(D.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)(H.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)(g.Tooltip,{title:"AWS service name for SigV4 signing. Defaults to 'bedrock-agentcore'.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_service_name"],children:(0,t.jsx)(D.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)(H.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)(g.Tooltip,{title:"Optional. If not provided, falls back to the boto3 credential chain (IAM role, env vars, etc.).",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_access_key_id"],rules:[],children:(0,t.jsx)(D.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)(H.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)(g.Tooltip,{title:"Optional. Required if AWS Access Key ID is provided.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_secret_access_key"],rules:[],children:(0,t.jsx)(D.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)(H.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)(g.Tooltip,{title:"Optional. Only needed for temporary STS credentials.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_token"],children:(0,t.jsx)(D.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)(H.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)(g.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)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_role_name"],children:(0,t.jsx)(D.Input,{placeholder:"Leave blank to keep existing",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(H.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)(g.Tooltip,{title:"Optional. Session name for the AssumeRole call — appears in CloudTrail logs. Auto-generated if omitted.",children:(0,t.jsx)(en.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","aws_session_name"],children:(0,t.jsx)(D.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)(eR,{availableAccessGroups:m,mcpServer:e,searchValue:N,setSearchValue:w,getAccessGroupOptions:()=>{let e=m.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 N&&!m.some(e=>e.toLowerCase().includes(N.toLowerCase()))&&e.push({value:N,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:N}),(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)(eP,{accessToken:s,oauthAccessToken:Y,formValues:{server_id:e.server_id,server_name:X??e.server_name,url:Q??e.url,spec_path:Z??e.spec_path,transport:U??e.transport,auth_type:ee??e.auth_type,mcp_info:e.mcp_info,oauth_flow_type:el??e.token_url?eo.OAUTH_FLOW.M2M:eo.OAUTH_FLOW.INTERACTIVE,static_headers:et??e.static_headers,credentials:es,authorization_url:er??e.authorization_url,token_url:el??e.token_url,registration_url:ea??e.registration_url},allowedTools:k,existingAllowedTools:e.allowed_tools||null,onAllowedToolsChange:A,toolNameToDisplayName:I,toolNameToDescription:O,onToolNameToDisplayNameChange:P,onToolNameToDescriptionChange:M})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(eb.Button,{onClick:r,children:"Cancel"}),(0,t.jsx)(l.Button,{type:"submit",children:"Save Changes"})]})]})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(ef,{value:x,onChange:p,tools:f,disabled:y}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(eb.Button,{onClick:r,children:"Cancel"}),(0,t.jsx)(l.Button,{onClick:()=>u.submit(),children:"Save Changes"})]})]})})]})]})},tA=({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 pt-6 border-t border-gray-200",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)(d.Text,{className:"font-medium",children:"Default Cost per Query"}),(0,t.jsxs)("div",{className:"text-green-600 font-mono",children:["$",e.default_cost_per_query.toFixed(4)]})]}),r&&e?.tool_name_to_cost_per_query&&(0,t.jsxs)("div",{children:[(0,t.jsx)(d.Text,{className:"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 justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,t.jsx)(d.Text,{className:"font-medium",children:e}),(0,t.jsxs)(d.Text,{className:"text-green-600 font-mono",children:["$",s.toFixed(4)," per query"]})]},e))})]}),(0,t.jsxs)("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsx)(d.Text,{className:"text-blue-800 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)(d.Text,{className:"text-blue-700",children:["• Default cost: $",e.default_cost_per_query.toFixed(4)," per query"]}),r&&e?.tool_name_to_cost_per_query&&(0,t.jsxs)(d.Text,{className:"text-blue-700",children:["• ",Object.keys(e.tool_name_to_cost_per_query).length," tool(s) with custom pricing"]})]})]})]})}):(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200",children:(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsx)("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded-lg",children:(0,t.jsx)(d.Text,{className:"text-gray-600",children:"No cost configuration set for this server. Tool calls will be charged at $0.00 per tool call."})})})})},tI=({mcpServer:e,onBack:s,isEditing:r,isProxyAdmin:u,accessToken:x,userRole:p,userID:h,availableAccessGroups:g})=>{let[f,j]=(0,b.useState)(r),[y,v]=(0,b.useState)(!1),[N,_]=(0,b.useState)({}),[w,S]=(0,b.useState)(0),T=e.url??"",{maskedUrl:C,hasToken:A}=T?eD(T):{maskedUrl:"—",hasToken:!1},I=(e,t)=>e?A?t?e:C:e:"—",P=async(e,t)=>{await (0,tr.copyToClipboard)(e)&&(_(e=>({...e,[t]:!0})),setTimeout(()=>{_(e=>({...e,[t]:!1}))},2e3))},O=e=>{let s=e.toUpperCase();return(0,t.jsx)("span",{className:"inline-flex items-center text-sm font-medium px-2.5 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:s})},M=e=>(0,t.jsx)("span",{className:"inline-flex items-center text-sm font-medium px-2.5 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:e});return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(l.Button,{icon:tx.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Servers"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(m.Title,{className:"text-2xl",children:e.server_name||e.alias||"Unnamed Server"}),(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:N["mcp-server_name"]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(e6.CopyIcon,{size:12}),onClick:()=>P(e.server_name||e.alias,"mcp-server_name"),className:`transition-all duration-200 ${N["mcp-server_name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`}),e.alias&&e.server_name&&e.alias!==e.server_name&&(0,t.jsx)("span",{className:"ml-2 inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-gray-100 text-gray-600 border border-gray-200 font-mono",children:e.alias})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[(0,t.jsx)(d.Text,{className:"text-gray-400 font-mono text-xs",children:e.server_id}),(0,t.jsx)(eb.Button,{type:"text",size:"small",icon:N["mcp-server-id"]?(0,t.jsx)(k.CheckIcon,{size:10}):(0,t.jsx)(e6.CopyIcon,{size:10}),onClick:()=>P(e.server_id,"mcp-server-id"),className:`transition-all duration-200 ${N["mcp-server-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-300 hover:text-gray-500 hover:bg-gray-50"}`})]}),e.description&&(0,t.jsx)(d.Text,{className:"text-gray-500 mt-2",children:e.description})]}),(0,t.jsxs)(n.TabGroup,{index:w,onIndexChange:S,children:[(0,t.jsx)(i.TabList,{className:"mb-4",children:[(0,t.jsx)(a.Tab,{children:"Overview"},"overview"),(0,t.jsx)(a.Tab,{children:"MCP Tools"},"tools"),...u?[(0,t.jsx)(a.Tab,{children:"Settings"},"settings")]:[]]}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsxs)(o.TabPanel,{children:[(0,t.jsxs)(tg.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-4",children:[(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Transport"}),(0,t.jsx)("div",{className:"mt-3",children:O((0,eo.handleTransport)(e.transport??void 0,e.spec_path??void 0))})]}),(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Authentication"}),(0,t.jsx)("div",{className:"mt-3",children:M((0,eo.handleAuth)(e.auth_type??void 0))})]}),(0,t.jsxs)(eg.Card,{className:"p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Host URL"}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(d.Text,{className:"break-all overflow-wrap-anywhere font-mono text-sm",children:I(e.url,y)}),A&&(0,t.jsx)("button",{onClick:()=>v(!y),className:"p-1 hover:bg-gray-100 rounded flex-shrink-0",children:(0,t.jsx)(tc.Icon,{icon:y?th:tp.EyeIcon,size:"sm",className:"text-gray-500"})})]})]})]}),(0,t.jsxs)(eg.Card,{className:"mt-4 p-4",children:[(0,t.jsx)(d.Text,{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Cost Configuration"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(tA,{costConfig:e.mcp_info?.mcp_server_cost_info})})]})]}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tw,{serverId:e.server_id,accessToken:x,auth_type:e.auth_type,userRole:p,userID:h,serverAlias:e.alias,extraHeaders:e.extra_headers})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsxs)(eg.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(m.Title,{children:"MCP Server Settings"}),f?null:(0,t.jsx)(l.Button,{variant:"light",onClick:()=>j(!0),children:"Edit Settings"})]}),f?(0,t.jsx)(tk,{mcpServer:e,accessToken:x,onCancel:()=>j(!1),onSuccess:e=>{j(!1),s()},availableAccessGroups:g}):(0,t.jsxs)("div",{className:"divide-y divide-gray-100",children:[(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Server Name"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.server_name||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Alias"}),(0,t.jsx)("div",{className:"col-span-2 text-sm font-mono text-gray-900",children:e.alias||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Description"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.description||(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"URL"}),(0,t.jsxs)("div",{className:"col-span-2 text-sm font-mono text-gray-900 break-all flex items-center gap-2",children:[I(e.url,y),A&&(0,t.jsx)("button",{onClick:()=>v(!y),className:"p-1 hover:bg-gray-100 rounded flex-shrink-0",children:(0,t.jsx)(tc.Icon,{icon:y?th:tp.EyeIcon,size:"sm",className:"text-gray-500"})})]})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Transport"}),(0,t.jsx)("div",{className:"col-span-2",children:O((0,eo.handleTransport)(e.transport,e.spec_path))})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Authentication"}),(0,t.jsx)("div",{className:"col-span-2",children:M((0,eo.handleAuth)(e.auth_type))})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Extra Headers"}),(0,t.jsx)("div",{className:"col-span-2 text-sm text-gray-900",children:e.extra_headers&&e.extra_headers.length>0?e.extra_headers.join(", "):(0,t.jsx)("span",{className:"text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Allow All Keys"}),(0,t.jsx)("div",{className:"col-span-2",children:e.allow_all_keys?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Enabled"]}):(0,t.jsx)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-gray-50 text-gray-600 rounded-full border border-gray-200 text-xs font-medium",children:"Disabled"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Network Access"}),(0,t.jsx)("div",{className:"col-span-2",children:e.available_on_public_internet?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Public"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-orange-50 text-orange-700 rounded-full border border-orange-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-orange-500"}),"Internal only"]})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",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)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-gray-100 text-gray-700 border border-gray-200",children:"string"==typeof e?e:e?.name??""},s))}):(0,t.jsx)("span",{className:"text-sm text-gray-400",children:"—"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",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)("span",{className:"inline-flex items-center text-xs font-mono font-medium px-2 py-0.5 rounded bg-blue-50 text-blue-700 border border-blue-200",children:e},s))}):(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded bg-green-50 text-green-700 border border-green-200",children:"All tools enabled"})})]}),(0,t.jsxs)("div",{className:"py-3 grid grid-cols-3 gap-4",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-500",children:"Cost"}),(0,t.jsx)("div",{className:"col-span-2",children:(0,t.jsx)(tA,{costConfig:e.mcp_info?.mcp_server_cost_info})})]})]})]})})]})]})]})},tP=(0,N.createQueryKeys)("mcpSemanticFilterSettings"),tO=(0,N.createQueryKeys)("mcpSemanticFilterSettings");var tM=e.i(178654),tF=e.i(621192),tE=e.i(981339),tL=e.i(850627),tR=e.i(987432),tz=e.i(689020),tU=e.i(245094),tB=e.i(788191),tq=e.i(653496),tV=e.i(992619);function t$({accessToken:e,testQuery:s,setTestQuery:r,testModel:l,setTestModel:a,isTesting:n,onTest:i,filterEnabled:o,testResult:c,curlCommand:d}){return(0,t.jsx)(e4.Card,{title:"Test Configuration",style:{marginBottom:16},children:(0,t.jsx)(tq.Tabs,{defaultActiveKey:"test",items:[{key:"test",label:"Test",children:(0,t.jsxs)(eM.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:[(0,t.jsx)(tB.PlayCircleOutlined,{})," Test Query"]}),(0,t.jsx)(D.Input.TextArea,{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)(tV.default,{accessToken:e||"",value:l,onChange:a,disabled:n,showLabel:!0,labelText:"Select Model"})}),(0,t.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tB.PlayCircleOutlined,{}),onClick:i,loading:n,disabled:!s||!l||!o,block:!0,children:"Test Filter"}),!o&&(0,t.jsx)(ej.Alert,{type:"warning",message:"Semantic filtering is disabled",description:"Enable semantic filtering and save settings to test the filter.",showIcon:!0}),c&&(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Typography.Title,{level:5,children:"Results"}),(0,t.jsx)(ej.Alert,{type:"success",message:`${c.selectedTools} tools selected`,description:`Filtered from ${c.totalTools} available tools`,showIcon:!0,style:{marginBottom:16}}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:"Selected Tools:"}),(0,t.jsx)("ul",{style:{paddingLeft:20,margin:0},children:c.tools.map((e,s)=>(0,t.jsx)("li",{style:{marginBottom:4},children:(0,t.jsx)(f.Typography.Text,{children:e})},s))})]})]})]})},{key:"api",label:"API Usage",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(eM.Space,{style:{marginBottom:8},children:[(0,t.jsx)(tU.CodeOutlined,{}),(0,t.jsx)(f.Typography.Text,{strong:!0,children:"API Usage"})]}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block",marginBottom:8},children:"Use this curl command to test the semantic filter with your current configuration."}),(0,t.jsx)(f.Typography.Text,{strong:!0,style:{display:"block",marginBottom:8},children:"Response headers to check:"}),(0,t.jsxs)("ul",{style:{paddingLeft:20,margin:"0 0 12px 0"},children:[(0,t.jsxs)("li",{children:[(0,t.jsx)(f.Typography.Text,{children:"x-litellm-semantic-filter: shows total tools → selected tools"}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block"},children:"Example: 10→3"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)(f.Typography.Text,{children:"x-litellm-semantic-filter-tools: CSV of selected tool names"}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block"},children:"Example: wikipedia-fetch,github-search,slack-post"})]})]}),(0,t.jsx)("pre",{style:{background:"#f5f5f5",padding:12,borderRadius:4,overflow:"auto",fontSize:12,margin:0},children:d})]})}]})})}let tH=async({accessToken:e,testModel:t,testQuery:s,setIsTesting:r,setTestResult:l})=>{if(!s||!t||!e)return void T.default.error("Please enter a query and select a model");r(!0),l(null);try{let{headers:r}=await (0,_.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 T.default.warning("Semantic filter is not enabled or no tools were filtered");l(a),T.default.success("Semantic filter test completed successfully")}catch(e){console.error("Test failed:",e),T.default.error("Failed to test semantic filter")}finally{r(!1)}};function tD({accessToken:e}){var s;let l,{data:a,isLoading:n,isError:i,error:o}=(()=>{let{accessToken:e}=(0,w.default)();return(0,y.useQuery)({queryKey:tP.list({}),queryFn:async()=>await (0,_.getMCPSemanticFilterSettings)(e),enabled:!!e,staleTime:36e5,gcTime:36e5})})(),{mutate:c,isPending:d,error:m}=(s=e||"",l=(0,v.useQueryClient)(),(0,tf.useMutation)({mutationFn:async e=>{if(!s)throw Error("Access token is required");return(0,_.updateMCPSemanticFilterSettings)(s,e)},onSuccess:()=>{l.invalidateQueries({queryKey:tO.all})}})),[u]=H.Form.useForm(),[x,p]=(0,b.useState)(!1),[j,N]=(0,b.useState)(!1),[S,C]=(0,b.useState)([]),[k,A]=(0,b.useState)(!0),[I,P]=(0,b.useState)(""),[O,M]=(0,b.useState)("gpt-4o"),[F,E]=(0,b.useState)(null),[L,R]=(0,b.useState)(!1),z=a?.field_schema,U=a?.values??{};(0,b.useEffect)(()=>{(async()=>{if(e)try{A(!0);let t=(await (0,tz.fetchAvailableModels)(e)).filter(e=>"embedding"===e.mode);C(t)}catch(e){console.error("Error fetching embedding models:",e)}finally{A(!1)}})()},[e]),(0,b.useEffect)(()=>{U&&(u.setFieldsValue({enabled:U.enabled??!1,embedding_model:U.embedding_model??"text-embedding-3-small",top_k:U.top_k??10,similarity_threshold:U.similarity_threshold??.3}),N(!1))},[U,u]);let B=async()=>{try{let e=await u.validateFields();c(e,{onSuccess:()=>{N(!1),p(!0),setTimeout(()=>p(!1),3e3),T.default.success("Settings updated successfully. Changes will be applied across all pods within 10 seconds.")},onError:e=>{T.default.fromBackend(e)}})}catch(e){console.error("Form validation failed:",e)}},q=async()=>{e&&await tH({accessToken:e,testModel:O,testQuery:I,setIsTesting:R,setTestResult:E})};return e?(0,t.jsx)("div",{style:{width:"100%"},children:n?(0,t.jsx)(tE.Skeleton,{active:!0}):i?(0,t.jsx)(ej.Alert,{type:"error",message:"Could not load MCP Semantic Filter settings",description:o instanceof Error?o.message:void 0,style:{marginBottom:24}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ej.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}}),x&&(0,t.jsx)(ej.Alert,{type:"success",message:"Settings saved successfully",icon:(0,t.jsx)(ey.CheckCircleOutlined,{}),showIcon:!0,closable:!0,style:{marginBottom:16}}),m&&(0,t.jsx)(ej.Alert,{type:"error",message:"Could not update settings",description:m instanceof Error?m.message:void 0,style:{marginBottom:16}}),(0,t.jsxs)(tF.Row,{gutter:24,children:[(0,t.jsx)(tM.Col,{xs:24,lg:12,children:(0,t.jsxs)(H.Form,{form:u,layout:"vertical",disabled:d,onValuesChange:()=>{N(!0)},children:[(0,t.jsxs)(e4.Card,{style:{marginBottom:16},children:[(0,t.jsx)(H.Form.Item,{name:"enabled",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Enable Semantic Filtering"}),(0,t.jsx)(g.Tooltip,{title:"When enabled, only the most relevant MCP tools will be included in requests based on semantic similarity",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),valuePropName:"checked",children:(0,t.jsx)(el.Switch,{disabled:d})}),(0,t.jsx)(f.Typography.Text,{type:"secondary",style:{display:"block",marginTop:-16,marginBottom:16},children:z?.properties?.enabled?.description})]}),(0,t.jsxs)(e4.Card,{title:"Configuration",style:{marginBottom:16},children:[(0,t.jsx)(H.Form.Item,{name:"embedding_model",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Embedding Model"}),(0,t.jsx)(g.Tooltip,{title:"The model used to generate embeddings for semantic matching",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(h.Select,{options:S.map(e=>({label:e.model_group,value:e.model_group})),placeholder:k?"Loading models...":"Select embedding model",showSearch:!0,disabled:d||k,loading:k,notFoundContent:k?"Loading...":"No embedding models available"})}),(0,t.jsx)(H.Form.Item,{name:"top_k",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Top K Results"}),(0,t.jsx)(g.Tooltip,{title:"Maximum number of tools to return after filtering",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(ec.InputNumber,{min:1,max:100,style:{width:"100%"},disabled:d})}),(0,t.jsx)(H.Form.Item,{name:"similarity_threshold",label:(0,t.jsxs)(eM.Space,{children:[(0,t.jsx)(f.Typography.Text,{strong:!0,children:"Similarity Threshold"}),(0,t.jsx)(g.Tooltip,{title:"Minimum similarity score (0-1) for a tool to be included",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(tL.Slider,{min:0,max:1,step:.05,marks:{0:"0.0",.3:"0.3",.5:"0.5",.7:"0.7",1:"1.0"},disabled:d})})]}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,t.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tR.SaveOutlined,{}),onClick:B,loading:d,disabled:!j,children:"Save Settings"})})]})}),(0,t.jsx)(tM.Col,{xs:24,lg:12,children:(0,t.jsx)(t$,{accessToken:e,testQuery:I,setTestQuery:P,testModel:O,setTestModel:M,isTesting:L,onTest:q,filterEnabled:!!U.enabled,testResult:F,curlCommand:`curl --location 'http://localhost:4000/v1/responses' \\ ---header 'Content-Type: application/json' \\ ---header 'Authorization: Bearer sk-1234' \\ ---data '{ - "model": "${O}", - "input": [ - { - "role": "user", - "content": "${I||"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 tK=e.i(262218);let{Text:tW}=f.Typography,tJ=({accessToken:e})=>{let s,[r,l]=(0,b.useState)(!0),[a,n]=(0,b.useState)(!1),[i,o]=(0,b.useState)([]),[c,d]=(0,b.useState)(null);(0,b.useEffect)(()=>{m(),u()},[e]);let m=async()=>{if(e){l(!0);try{for(let t of(await (0,_.getGeneralSettingsCall)(e)))"mcp_internal_ip_ranges"===t.field_name&&t.field_value&&o(t.field_value)}catch(e){console.error("Failed to load MCP network settings:",e)}finally{l(!1)}}},u=async()=>{if(!e)return;let t=await (0,_.fetchMCPClientIp)(e);t&&d(t)},x=async()=>{if(e){n(!0);try{i.length>0?await (0,_.updateConfigFieldSetting)(e,"mcp_internal_ip_ranges",i):await (0,_.deleteConfigFieldSetting)(e,"mcp_internal_ip_ranges")}catch(e){console.error("Failed to save MCP network settings:",e)}finally{n(!1)}}};if(r)return(0,t.jsx)("div",{className:"flex justify-center py-12",children:(0,t.jsx)(W.Spin,{})});let p=c?4!==(s=c.split(".")).length?c+"/32":`${s[0]}.${s[1]}.${s[2]}.0/24`:null;return(0,t.jsxs)("div",{className:"space-y-6 p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(tW,{className:"text-lg font-semibold",children:"Private IP Ranges"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",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)(e4.Card,{children:[c&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg",children:[(0,t.jsxs)(tW,{className:"text-sm text-blue-700",children:["Your current IP: ",(0,t.jsx)("span",{className:"font-mono font-medium",children:c})]}),p&&!i.includes(p)&&(0,t.jsxs)("div",{className:"mt-1",children:[(0,t.jsx)(tW,{className:"text-sm text-blue-600",children:"Suggested range: "}),(0,t.jsx)(tK.Tag,{className:"cursor-pointer font-mono",color:"blue",icon:(0,t.jsx)(eE.PlusOutlined,{}),onClick:()=>{!i.includes(p)&&o([...i,p])},children:p})]})]}),(0,t.jsx)("div",{className:"flex items-center mb-2",children:(0,t.jsx)(tW,{className:"font-medium",children:"Your Private Network Ranges"})}),(0,t.jsx)(h.Select,{mode:"tags",value:i,onChange:o,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",tokenSeparators:[","],className:"w-full",size:"large",allowClear:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-2",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.jsx)(eb.Button,{type:"primary",icon:(0,t.jsx)(tR.SaveOutlined,{}),onClick:x,loading:a,children:"Save"})})]})},{Search:tY}=D.Input,{Text:tG}=f.Typography,tQ=["#3B82F6","#10B981","#F59E0B","#EF4444","#8B5CF6","#EC4899","#06B6D4","#84CC16"],tZ=({isVisible:e,onClose:s,onSelectServer:r,onCustomServer:l,accessToken:a})=>{let[n,i]=(0,b.useState)([]),[o,c]=(0,b.useState)([]),[d,m]=(0,b.useState)(!1),[u,x]=(0,b.useState)(null),[h,g]=(0,b.useState)(""),[f,j]=(0,b.useState)("All");(0,b.useEffect)(()=>{e&&a&&(m(!0),x(null),(0,_.fetchDiscoverableMCPServers)(a).then(e=>{i(e.servers||[]),c(e.categories||[])}).catch(e=>{x(e.message||"Failed to load MCP servers")}).finally(()=>{m(!1)}))},[e,a]),(0,b.useEffect)(()=>{e&&(g(""),j("All"))},[e]);let y=(0,b.useMemo)(()=>{let e=n;if("All"!==f&&(e=e.filter(e=>e.category===f)),h.trim()){let t=h.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.title.toLowerCase().includes(t)||e.description.toLowerCase().includes(t))}return e},[n,f,h]),v=(0,b.useMemo)(()=>{let e={};for(let t of y){let s=t.category||"Other";e[s]||(e[s]=[]),e[s].push(t)}return e},[y]);return(0,t.jsxs)(p.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center justify-between pb-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("img",{src:eZ,alt:"MCP Logo",className:"w-8 h-8 object-contain",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"}}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add MCP Server"})]}),(0,t.jsx)("button",{onClick:l,className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer bg-transparent border-none font-medium",children:"+ Custom Server"})]}),open:e,onCancel:s,footer:null,width:1e3,className:"top-8",styles:{body:{padding:"24px",maxHeight:"70vh",overflowY:"auto"},header:{padding:"24px 24px 0 24px",border:"none"}},children:[(0,t.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:12},children:["All",...o].map(e=>{let s=f===e;return(0,t.jsx)("button",{onClick:()=>j(e),style:{padding:"4px 12px",borderRadius:4,border:s?"1px solid #111827":"1px solid #e5e7eb",background:s?"#111827":"#fff",color:s?"#fff":"#4b5563",cursor:"pointer",fontSize:12,fontWeight:s?500:400,lineHeight:"20px"},children:e},e)})}),(0,t.jsx)(tY,{placeholder:"Search servers...",value:h,onChange:e=>g(e.target.value),style:{marginBottom:16},allowClear:!0}),d&&(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:Array.from({length:8}).map((e,s)=>(0,t.jsx)("div",{style:{height:36,borderRadius:6,background:"#f9fafb"}},s))}),u&&(0,t.jsx)("div",{style:{textAlign:"center",padding:"32px 0",color:"#9ca3af"},children:(0,t.jsxs)(tG,{children:["Failed to load servers: ",u]})}),!d&&!u&&0===y.length&&(0,t.jsx)("div",{style:{textAlign:"center",padding:"32px 0",color:"#9ca3af"},children:(0,t.jsxs)(tG,{children:["No servers found."," ",(0,t.jsx)("a",{onClick:l,style:{color:"#2563eb",cursor:"pointer"},children:"Add a custom server"})]})}),!d&&!u&&Object.entries(v).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:500,color:"#9ca3af",textTransform:"uppercase",letterSpacing:"0.05em",padding:"6px 0",borderBottom:"1px solid #f3f4f6",marginBottom:4},children:e}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0 16px"},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)%tQ.length,{initial:l,backgroundColor:tQ[a]});return(0,t.jsxs)("div",{onClick:()=>r(e),style:{display:"flex",alignItems:"center",padding:"8px 10px",borderRadius:6,cursor:"pointer",transition:"background 0.1s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f9fafb"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:[e.icon_url?(0,t.jsx)("img",{src:e.icon_url,alt:e.title,style:{width:20,height:20,objectFit:"contain",flexShrink:0,marginRight:12},onError:e=>{let t=e.currentTarget;t.style.display="none";let s=t.nextElementSibling;s&&(s.style.display="flex")}}):null,(0,t.jsx)("div",{style:{width:20,height:20,borderRadius:4,backgroundColor:n.backgroundColor,color:"#fff",display:e.icon_url?"none":"flex",alignItems:"center",justifyContent:"center",fontWeight:600,fontSize:11,flexShrink:0,marginRight:12},children:n.initial}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:400,color:"#111827",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title||e.name}),(0,t.jsx)("span",{style:{color:"#d1d5db",fontSize:14,flexShrink:0,marginLeft:8},children:"›"})]},e.name)})})]},e))]})};var tX=e.i(611052);let{Text:t0,Title:t2}=f.Typography,{Option:t1}=h.Select;e.s(["MCPServers",0,({accessToken:e,userRole:f,userID:N})=>{let{data:C,isLoading:k,refetch:A}=(0,j.useMCPServers)(),{data:I,isLoading:P,recheckServerHealth:O,recheckingServerIds:M}=(()=>{let{accessToken:e}=(0,w.default)(),t=(0,v.useQueryClient)(),[s,r]=(0,b.useState)(new Set),l=(0,y.useQuery)({queryKey:S.lists(),queryFn:async()=>await (0,_.fetchMCPServerHealth)(e),enabled:!!e,refetchInterval:3e4}),a=(0,b.useCallback)(async s=>{if(e){r(e=>new Set(e).add(s));try{let r=await (0,_.fetchMCPServerHealth)(e,[s]);t.setQueriesData({queryKey:S.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}})(),F=(0,b.useMemo)(()=>{if(!C)return[];if(!I)return C;let e=new Map(I.map(e=>[e.server_id,e.status]));return C.map(t=>{let s=e.get(t.server_id);return{...t,status:s||t.status}})},[C,I]),[E,L]=(0,b.useState)(null),[R,z]=(0,b.useState)(!1),[U,B]=(0,b.useState)(null),[q,V]=(0,b.useState)(!1),[H,D]=(0,b.useState)("all"),[K,W]=(0,b.useState)("all"),[J,Y]=(0,b.useState)([]),[Q,X]=(0,b.useState)(!1),[ee,et]=(0,b.useState)(!1),[es,el]=(0,b.useState)(null),[ea,en]=(0,b.useState)(!1),[ei,eo]=(0,b.useState)(null),ec="Internal User"===f;(0,b.useEffect)(()=>{try{let e=(0,eG.getSecureItem)("litellm-mcp-oauth-edit-state");if(!e)return;let t=JSON.parse(e);t?.serverId&&(B(t.serverId),V(!0))}catch(e){console.error("Failed to restore MCP edit view state",e)}},[]);let ed=b.default.useMemo(()=>{if(!F)return[];let e=new Set,t=[];return F.forEach(s=>{s.teams&&s.teams.forEach(s=>{let r=s.team_id;e.has(r)||(e.add(r),t.push(s))})}),t},[F]),em=b.default.useMemo(()=>F?Array.from(new Set(F.flatMap(e=>e.mcp_access_groups).filter(e=>null!=e))):[],[F]),eu=(0,b.useCallback)((e,t)=>{if(!F)return Y([]);let s=F;"personal"===e?Y([]):("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))),Y([...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)))},[F]);(0,b.useEffect)(()=>{eu(H,K)},[F,H,K,eu]);let ex=b.default.useMemo(()=>{let e,s,r,l;return e=e=>{B(e),V(!1)},s=e=>{B(e),V(!0)},r=ep,l=e=>eo(e),[{accessorKey:"server_id",header:"Server ID",enableSorting:!0,cell:({row:s})=>(0,t.jsxs)("button",{onClick:()=>e(s.original.server_id),className:"font-mono text-blue-600 bg-blue-50 hover:bg-blue-100 text-xs font-medium px-2 py-0.5 rounded-md border border-blue-200 text-left truncate whitespace-nowrap cursor-pointer max-w-[15ch] transition-colors",children:[s.original.server_id.slice(0,7),"..."]})},{accessorKey:"server_name",header:"Name",enableSorting:!0,cell:({row:e})=>{let s=e.original.mcp_info?.logo_url,r=e.original.server_name;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s?(0,t.jsx)("img",{src:s,alt:`${r??"MCP"} logo`,className:"h-5 w-5 rounded object-contain flex-shrink-0",onError:e=>{e.target.style.display="none"}}):null,(0,t.jsx)("span",{children:r})]})}},{accessorKey:"alias",header:"Alias",enableSorting:!0},{id:"url",header:"URL",cell:({row:e})=>{let s=e.original.url;if(!s)return(0,t.jsx)("span",{className:"text-gray-400",children:"—"});let{maskedUrl:r}=eD(s);return(0,t.jsx)("span",{className:"font-mono text-sm",children:r})}},{accessorKey:"transport",header:"Transport",enableSorting:!0,cell:({row:e})=>{let s=e.original.transport||"http",r=(e.original.spec_path&&"stdio"!==s?"OPENAPI":s).toUpperCase();return(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:r})}},{accessorKey:"auth_type",header:"Auth Type",enableSorting:!0,cell:({getValue:e})=>{let s=e()||"none";return(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded border bg-gray-50 text-gray-700 border-gray-200",children:s})}},{id:"health_status",header:"Health Status",cell:({row:e})=>(0,t.jsx)(tu,{server:e.original,isLoadingHealth:P,isRechecking:M?.has(e.original.server_id),onRecheck:O})},{id:"mcp_access_groups",header:"Access Groups",cell:({row:e})=>{let s=e.original.mcp_access_groups;if(Array.isArray(s)&&s.length>0&&"string"==typeof s[0]){let e=s.join(", ");return(0,t.jsx)(g.Tooltip,{title:e,children:(0,t.jsxs)("div",{className:"flex items-center gap-1 max-w-[200px]",children:[(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-1.5 py-0.5 rounded bg-gray-100 text-gray-700 border border-gray-200 truncate max-w-[140px]",children:s[0]}),s.length>1&&(0,t.jsxs)("span",{className:"text-xs text-gray-400 font-medium",children:["+",s.length-1]})]})})}return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"})}},{id:"available_on_public_internet",header:"Network Access",cell:({row:e})=>e.original.available_on_public_internet?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-50 text-green-700 rounded-full border border-green-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500"}),"Public"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-orange-50 text-orange-700 rounded-full border border-orange-200 text-xs font-medium",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-orange-500"}),"Internal"]})},{header:"Created",accessorKey:"created_at",enableSorting:!0,sortingFn:"datetime",cell:({row:e})=>{let s=e.original;if(!s.created_at)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"});let r=new Date(s.created_at);return(0,t.jsx)(g.Tooltip,{title:r.toLocaleString(),children:(0,t.jsx)("span",{className:"text-xs text-gray-600",children:r.toLocaleDateString()})})}},{header:"Updated",accessorKey:"updated_at",enableSorting:!0,sortingFn:"datetime",cell:({row:e})=>{let s=e.original;if(!s.updated_at)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"—"});let r=new Date(s.updated_at);return(0,t.jsx)(g.Tooltip,{title:r.toLocaleString(),children:(0,t.jsx)("span",{className:"text-xs text-gray-600",children:r.toLocaleDateString()})})}},{id:"byok_credential",header:"Credential",cell:({row:e})=>{let s=e.original;return s.is_byok?s.has_user_credential?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full bg-green-50 text-green-700 border border-green-200",children:[(0,t.jsx)(tm.CheckOutlined,{style:{fontSize:10}})," Connected"]}),l&&(0,t.jsx)("button",{className:"text-xs text-gray-400 hover:text-blue-600 transition-colors",onClick:()=>l(s),children:"Update"})]}):l?(0,t.jsx)("button",{className:"text-xs bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded-md font-medium transition-colors shadow-sm",onClick:()=>l(s),children:"Connect"}):null:(0,t.jsx)("span",{className:"text-gray-300 text-xs",children:"—"})}},{id:"actions",header:"Actions",cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(g.Tooltip,{title:"Edit",children:(0,t.jsx)("button",{onClick:()=>s(e.original.server_id),className:"p-1.5 rounded-md text-gray-400 hover:text-blue-600 hover:bg-blue-50 transition-colors",children:(0,t.jsx)(tc.Icon,{icon:td.PencilAltIcon,size:"sm"})})}),(0,t.jsx)(g.Tooltip,{title:"Delete",children:(0,t.jsx)("button",{onClick:()=>r(e.original.server_id),className:"p-1.5 rounded-md text-gray-400 hover:text-red-600 hover:bg-red-50 transition-colors",children:(0,t.jsx)(tc.Icon,{icon:G.TrashIcon,size:"sm"})})})]})}]},[f,P,O,M]);function ep(e){L(e),z(!0)}let eh=async()=>{if(null!=E&&null!=e)try{en(!0),await (0,_.deleteMCPServer)(e,E),T.default.success("Deleted MCP Server successfully"),A()}catch(e){console.error("Error deleting the mcp server:",e)}finally{en(!1),z(!1),L(null)}},eg=E?(C||[]).find(e=>e.server_id===E):null,ef=b.default.useMemo(()=>J.find(e=>e.server_id===U)||{server_id:"",server_name:"",alias:"",url:"",transport:"",auth_type:"",created_at:"",created_by:"",updated_at:"",updated_by:""},[J,U]),eb=b.default.useCallback(()=>{V(!1),B(null),A()},[A]);return e&&f&&N?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(p.Modal,{open:R,title:"Delete MCP Server?",onOk:eh,okText:ea?"Deleting...":"Delete",onCancel:()=>{z(!1),L(null)},cancelText:"Cancel",cancelButtonProps:{disabled:ea},okButtonProps:{danger:!0},confirmLoading:ea,children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(t0,{className:"text-gray-600",children:"This action is permanent and cannot be undone. All associated configurations will be removed."}),eg&&(0,t.jsx)("div",{className:"mt-3 p-4 bg-gray-50 rounded-lg border border-gray-200",children:(0,t.jsxs)(x.Descriptions,{column:1,size:"small",colon:!1,children:[eg.server_name&&(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"Name"}),children:(0,t.jsx)(t0,{strong:!0,className:"text-sm",children:eg.server_name})}),(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"ID"}),children:(0,t.jsx)(t0,{code:!0,className:"text-xs",children:eg.server_id})}),eg.url&&(0,t.jsx)(x.Descriptions.Item,{label:(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"URL"}),children:(0,t.jsx)(t0,{code:!0,className:"text-xs break-all",children:eg.url})})]})})]})}),(0,t.jsx)(e5,{userRole:f,accessToken:e,onCreateSuccess:e=>{Y(t=>[...t,e]),X(!1),A()},isModalVisible:Q,setModalVisible:X,availableAccessGroups:em,prefillData:es,onBackToDiscovery:()=>{X(!1),el(null),et(!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)(m.Title,{children:"MCP Servers"}),J.length>0&&(0,t.jsx)("span",{className:"inline-flex items-center text-xs font-medium px-2 py-0.5 rounded-full bg-gray-100 text-gray-600 border border-gray-200",children:J.length})]}),(0,t.jsx)(d.Text,{className:"text-tremor-content mt-1",children:"Configure and manage your MCP servers"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.isAdminRole)(f)&&(0,t.jsx)(l.Button,{className:"flex-shrink-0",onClick:()=>et(!0),children:"+ Add New MCP Server"}),!(0,s.isAdminRole)(f)&&(0,t.jsx)(l.Button,{className:"flex-shrink-0",onClick:()=>{el(null),X(!0)},variant:"secondary",children:"+ Submit MCP Server"})]})]}),(0,t.jsx)(tZ,{isVisible:ee,onClose:()=>et(!1),onSelectServer:e=>{el(e),et(!1),X(!0)},onCustomServer:()=>{el(null),et(!1),X(!0)},accessToken:e}),(0,t.jsxs)(n.TabGroup,{className:"w-full h-full",children:[(0,t.jsx)(i.TabList,{className:"flex justify-between mt-2 w-full items-center",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(a.Tab,{children:"All Servers"}),(0,t.jsx)(a.Tab,{children:"Toolsets"}),(0,t.jsx)(a.Tab,{children:"Connect"}),(0,t.jsx)(a.Tab,{children:"Semantic Filter"}),(0,t.jsx)(a.Tab,{children:"Network Settings"}),(0,s.isAdminRole)(f)&&(0,t.jsx)(a.Tab,{children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:["Submitted MCPs ",(0,t.jsx)(u.default,{})]})})]})}),(0,t.jsxs)(c.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{children:U?(0,t.jsx)(tI,{mcpServer:ef,onBack:eb,isProxyAdmin:(0,s.isAdminRole)(f),isEditing:q,accessToken:e,userID:N,userRole:f,availableAccessGroups:em},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 bg-white rounded-lg px-4 py-3 border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Text,{className:"text-sm font-medium text-gray-600 whitespace-nowrap",children:"Team"}),(0,t.jsxs)(h.Select,{value:H,onChange:e=>{D(e),eu(e,K)},style:{width:220},size:"middle",children:[(0,t.jsx)(t1,{value:"all",children:(0,t.jsx)("span",{className:"font-medium",children:ec?"All Available Servers":"All Servers"})}),(0,t.jsx)(t1,{value:"personal",children:(0,t.jsx)("span",{className:"font-medium",children:"Personal"})}),ed.map(e=>(0,t.jsx)(t1,{value:e.team_id,children:(0,t.jsx)("span",{className:"font-medium",children:e.team_alias||e.team_id})},e.team_id))]})]}),(0,t.jsx)("div",{className:"h-6 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(d.Text,{className:"text-sm font-medium text-gray-600 whitespace-nowrap",children:["Access Group",(0,t.jsx)(g.Tooltip,{title:"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.",children:(0,t.jsx)(r.QuestionCircleOutlined,{style:{marginLeft:4,color:"#9ca3af"}})})]}),(0,t.jsxs)(h.Select,{value:K,onChange:e=>{W(e),eu(H,e)},style:{width:220},size:"middle",children:[(0,t.jsx)(t1,{value:"all",children:(0,t.jsx)("span",{className:"font-medium",children:"All Access Groups"})}),em.map(e=>(0,t.jsx)(t1,{value:e,children:(0,t.jsx)("span",{className:"font-medium",children:e})},e))]})]})]})})}),(0,t.jsx)("div",{className:"w-full mt-6",children:(0,t.jsx)(Z.DataTable,{data:J,columns:ex,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:k,noDataMessage:"No MCP servers configured. Click '+ Add New MCP Server' to get started.",loadingMessage:"Loading MCP servers...",enableSorting:!0})})]})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(er,{accessToken:e,userRole:f})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(to,{})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tD,{accessToken:e})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(tJ,{accessToken:e})}),(0,s.isAdminRole)(f)&&(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)($,{accessToken:e})})]})]}),ei&&(0,t.jsx)(tX.ByokCredentialModal,{server:ei,open:!!ei,onClose:()=>eo(null),onSuccess:e=>{A(),eo(null)},accessToken:e||""})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:f,userID:N}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))}],280881)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ccda7c12f9795cba.js b/litellm/proxy/_experimental/out/_next/static/chunks/3e917c79aadd945b.js similarity index 74% rename from litellm/proxy/_experimental/out/_next/static/chunks/ccda7c12f9795cba.js rename to litellm/proxy/_experimental/out/_next/static/chunks/3e917c79aadd945b.js index ecfa8dda1b..ff821671b1 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/ccda7c12f9795cba.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3e917c79aadd945b.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:P}=n.Select,T=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(P,{value:"BLOCK",children:"Block"}),(0,l.jsx)(P,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,P]=m.default.useState(""),[T,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void P(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}P(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),P("")}).finally(()=>{L(!1)})}else P(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),P(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),T?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:H,Text:q}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(q,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(H,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(q,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:P,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,H]=(0,m.useState)(!1),[q,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[X,Z]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>H(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(T,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:P,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:q,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!q)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===q);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:q,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:X,patternRegex:ee,patternAction:ea,onNameChange:Z,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{X&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:X,pattern:ee,action:ea}),H(!1),Z(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{H(!1),Z(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var X=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let Z={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),Z=t,t},et=()=>Object.keys(Z).length>0?Z:X,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge",Xecguard:"xecguard"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,XecGuard:`${en}xecguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",()=>em,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",()=>ec],180766);var eu=e.i(435451);let{Title:ep}=d.Typography,eg=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eu.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ex=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ep,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eg,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var eh=e.i(482725),ef=e.i(850627);let ey=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(eh.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ef.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var ej=e.i(592968),e_=e.i(750113);let eb=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(ej.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(ej.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(ej.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(ej.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(ej.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var ev=e.i(536916),ew=e.i(149192),eN=e.i(741585),eN=eN,eC=e.i(724154);e.i(247167);var eS=e.i(931067);let ek={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eI=e.i(9583),eA=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:ek}))});let{Text:eO}=d.Typography,{Option:eP}=n.Select,eT=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eA,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eO,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eP,{value:e.category,children:e.category},e.category))})]}),eL=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eO,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(ej.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(ew.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eN.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(eC.StopOutlined,{}),children:"Select All & Block"})]})]}),eB=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eO,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eO,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(ev.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eO,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eP,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eN.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(eC.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eF,Text:e$}=d.Typography,eE=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eF,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(e$,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eT,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eL,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(eB,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eM=e.i(304967),eR=e.i(599724),eG=e.i(312361),ez=e.i(21548),eD=e.i(827252);let eK={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eH=({value:e,onChange:t,disabled:a=!1})=>{let r={...eK,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(eR.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eG.Divider,{}),0===r.rules.length?(0,l.jsx)(ez.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eM.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(eR.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eG.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(eR.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(ej.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eq,Text:eJ,Link:eU}=d.Typography,{Option:eW}=n.Select,eV={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,P]=(0,m.useState)([]),[T,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[H,q]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,X]=(0,m.useState)(void 0),[Z,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,ep]=(0,m.useState)(!1),[eg,eh]=(0,m.useState)([]),[ef,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),e_=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),q(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},ew=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eN=(e,t)=>{C(a=>({...a,[e]:t}))},eC=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},eS=()=>{x.resetFields(),j(null),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),X(void 0),en("warn"),ec(""),ep(!1),k(0)},ek=()=>{eS(),t()},eI=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);if(void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=H&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),H&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ef.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ef.rules,r.litellm_params.default_action=ef.default_action,r.litellm_params.on_disallowed_action=ef.on_disallowed_action,ef.violation_message_template&&(r.litellm_params.violation_message_template=ef.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),Z&&"realtime"===W&&(r.litellm_params.on_violation=Z),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),eS(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eA=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:H,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{q(e),U(t)}}):null},eO=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:ek,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:ek,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit"},children:eO.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eW,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eW,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eW,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.pre_call})]})}),(0,l.jsx)(eW,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.during_call})]})}),(0,l.jsx)(eW,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.post_call})]})}),(0,l.jsx)(eW,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!e_&&!ei(y)&&!es(y)&&(0,l.jsx)(ey,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:ew,onActionSelect:eN,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eA("categories");if(es(y))return(0,l.jsx)(eb,{availableModels:eg,form:x});if(!y)return null;if(e_)return(0,l.jsx)(eH,{value:ef,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eA("patterns");return null;case 3:if(ei(y))return eA("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),ep(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>ep(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>X(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:Z===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:ek,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):s=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let n={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:s}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(n));let m=`/guardrails/${d}`,g=await fetch(m,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(n)});if(!g.ok){let e=await g.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tt.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(tr,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(tr,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tr,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(tr,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(tr,{value:"inherit",children:"Use global default"}),(0,l.jsx)(tr,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(tr,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:P}=n.Select,T=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(P,{value:"BLOCK",children:"Block"}),(0,l.jsx)(P,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,P]=m.default.useState(""),[T,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void P(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}P(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),P("")}).finally(()=>{L(!1)})}else P(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),P(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),T?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:q,Text:H}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(H,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(H,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:P,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,q]=(0,m.useState)(!1),[H,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[X,Z]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>q(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(T,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:P,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:H,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!H)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===H);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:H,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:X,patternRegex:ee,patternAction:ea,onNameChange:Z,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{X&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:X,pattern:ee,action:ea}),q(!1),Z(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{q(!1),Z(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var X=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let Z={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),Z=t,t},et=()=>Object.keys(Z).length>0?Z:X,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge",Xecguard:"xecguard",QostodianNexus:"qostodian_nexus"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,XecGuard:`${en}xecguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`,"Qostodian Nexus":`${en}qohash.jpg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",()=>em,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",()=>ec],180766);var eu=e.i(435451);let{Title:ep}=d.Typography,eg=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eu.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ex=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ep,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eg,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var eh=e.i(482725),ef=e.i(850627);let ey=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(eh.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ef.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eu.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var ej=e.i(592968),e_=e.i(750113);let eb=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(ej.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(ej.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(ej.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(ej.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(ej.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(e_.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var ev=e.i(536916),ew=e.i(149192),eN=e.i(741585),eN=eN,eC=e.i(724154);e.i(247167);var eS=e.i(931067);let ek={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eI=e.i(9583),eA=m.forwardRef(function(e,t){return m.createElement(eI.default,(0,eS.default)({},e,{ref:t,icon:ek}))});let{Text:eO}=d.Typography,{Option:eP}=n.Select,eT=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eA,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eO,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eP,{value:e.category,children:e.category},e.category))})]}),eL=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eO,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(ej.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(ew.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eN.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(eC.StopOutlined,{}),children:"Select All & Block"})]})]}),eB=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eO,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eO,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(ev.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eO,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eP,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eN.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(eC.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eF,Text:e$}=d.Typography,eE=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eF,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(e$,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eT,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eL,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(eB,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eM=e.i(304967),eR=e.i(599724),eG=e.i(312361),ez=e.i(21548),eD=e.i(827252);let eK={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eq=({value:e,onChange:t,disabled:a=!1})=>{let r={...eK,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(eR.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eG.Divider,{}),0===r.rules.length?(0,l.jsx)(ez.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eM.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(eR.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(eR.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eG.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(eR.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(ej.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(eR.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eH,Text:eJ,Link:eU}=d.Typography,{Option:eW}=n.Select,eV={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,P]=(0,m.useState)([]),[T,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[q,H]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,X]=(0,m.useState)(void 0),[Z,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,ep]=(0,m.useState)(!1),[eg,eh]=(0,m.useState)([]),[ef,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),e_=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),H(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},ew=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eN=(e,t)=>{C(a=>({...a,[e]:t}))},eC=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},eS=()=>{x.resetFields(),j(null),w([]),C({}),P([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),X(void 0),en("warn"),ec(""),ep(!1),k(0)},ek=()=>{eS(),t()},eI=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);if(void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=q&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),q&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ef.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ef.rules,r.litellm_params.default_action=ef.default_action,r.litellm_params.on_disallowed_action=ef.on_disallowed_action,ef.violation_message_template&&(r.litellm_params.violation_message_template=ef.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),Z&&"realtime"===W&&(r.litellm_params.on_violation=Z),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),eS(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eA=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:q,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{H(e),U(t)}}):null},eO=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:ek,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:ek,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit"},children:eO.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eW,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eW,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eW,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.pre_call})]})}),(0,l.jsx)(eW,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.during_call})]})}),(0,l.jsx)(eW,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.post_call})]})}),(0,l.jsx)(eW,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eV.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!e_&&!ei(y)&&!es(y)&&(0,l.jsx)(ey,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:ew,onActionSelect:eN,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eA("categories");if(es(y))return(0,l.jsx)(eb,{availableModels:eg,form:x});if(!y)return null;if(e_)return(0,l.jsx)(eq,{value:ef,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eA("patterns");return null;case 3:if(ei(y))return eA("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),ep(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>ep(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>X(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:Z===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:ek,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):s=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let n={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:s}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(n));let m=`/guardrails/${d}`,g=await fetch(m,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(n)});if(!g.ok){let e=await g.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tt.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(tr,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(tr,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tr,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(tr,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(tr,{value:"inherit",children:"Use global default"}),(0,l.jsx)(tr,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(tr,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eE,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ "api_key": "your_aporia_api_key", "project_name": "your_project_name" }`})});case"AimSecurity":return(0,l.jsx)(r.Form.Item,{label:"Aim Security Configuration",name:"config",tooltip:"JSON configuration for Aim Security",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ @@ -64,7 +64,7 @@ if response["body"].get("flagged"): return block(response["body"].get("reason", "Content flagged")) - return allow()`}},tM={"Return Values":[{name:"allow()",desc:"Let request/response through"},{name:"block(reason)",desc:"Reject with message"},{name:"modify(texts=[], images=[], tool_calls=[])",desc:"Transform content"}],"HTTP Requests (async)":[{name:"await http_request(url, method, headers, body)",desc:"Make async HTTP request"},{name:"await http_get(url, headers)",desc:"Async GET request"},{name:"await http_post(url, body, headers)",desc:"Async POST request"}],"Regex Functions":[{name:"regex_match(text, pattern)",desc:"Returns True if pattern found"},{name:"regex_replace(text, pattern, replacement)",desc:"Replace all matches"},{name:"regex_find_all(text, pattern)",desc:"Return list of matches"}],"JSON Functions":[{name:"json_parse(text)",desc:"Parse JSON string, returns None on error"},{name:"json_stringify(obj)",desc:"Convert to JSON string"},{name:"json_schema_valid(obj, schema)",desc:"Validate against JSON schema"}],"URL Functions":[{name:"extract_urls(text)",desc:"Extract all URLs from text"},{name:"is_valid_url(url)",desc:"Check if URL is valid"},{name:"all_urls_valid(text)",desc:"Check all URLs in text are valid"}],"Code Detection":[{name:"detect_code(text)",desc:"Returns True if code detected"},{name:"detect_code_languages(text)",desc:"Returns list of detected languages"},{name:'contains_code_language(text, ["sql"])',desc:"Check for specific languages"}],"Text Utilities":[{name:"contains(text, substring)",desc:"Check if substring exists"},{name:"contains_any(text, [substr1, substr2])",desc:"Check if any substring exists"},{name:"word_count(text)",desc:"Count words"},{name:"char_count(text)",desc:"Count characters"},{name:"lower(text) / upper(text) / trim(text)",desc:"String transforms"}]},tR=[{value:"pre_call",label:"pre_call (Request)"},{value:"post_call",label:"post_call (Response)"},{value:"during_call",label:"during_call (Parallel)"},{value:"logging_only",label:"logging_only"},{value:"pre_mcp_call",label:"pre_mcp_call (Before MCP Tool Call)"},{value:"post_mcp_call",label:"post_mcp_call (After MCP Tool Call)"},{value:"during_mcp_call",label:"during_mcp_call (During MCP Tool Call)"}],tG=({visible:e,onClose:t,onSuccess:a,accessToken:r,editData:i})=>{let o=!!i,[d,c]=(0,m.useState)(""),[g,x]=(0,m.useState)(["pre_call"]),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)("empty"),[_,b]=(0,m.useState)(tE.empty.code),[v,w]=(0,m.useState)(!1),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(!1),I={texts:["Hello, my SSN is 123-45-6789"],images:[],tools:[{type:"function",function:{name:"get_weather",description:"Get the current weather in a location",parameters:{type:"object",properties:{location:{type:"string",description:"City name"}},required:["location"]}}}],tool_calls:[],structured_messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"Hello, my SSN is 123-45-6789"}],model:"gpt-4"},A={texts:["The weather in San Francisco is 72°F and sunny."],images:[],tools:[],tool_calls:[{id:"call_abc123",type:"function",function:{name:"get_weather",arguments:'{"location": "San Francisco"}'}}],structured_messages:[],model:"gpt-4"},O={texts:['Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'],images:[],tools:[{type:"function",function:{name:"read_wiki_structure",description:"Read the structure of a GitHub repository (MCP tool passed as OpenAI tool)",parameters:{type:"object",properties:{repoName:{type:"string",description:"Repository name, e.g. BerriAI/litellm"}},required:["repoName"]}}}],tool_calls:[{id:"call_mcp_001",type:"function",function:{name:"read_wiki_structure",arguments:'{"repoName": "BerriAI/litellm"}'}}],structured_messages:[{role:"user",content:'Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'}],model:"mcp-tool-call"},[P,T]=(0,m.useState)(JSON.stringify(I,null,2)),[L,B]=(0,m.useState)(null),[F,E]=(0,m.useState)(null),M=(0,m.useRef)(null),R=e=>null==e?["pre_call"]:Array.isArray(e)?e.length?e:["pre_call"]:[e];(0,m.useEffect)(()=>{e&&(i?(c(i.guardrail_name||""),x(R(i.litellm_params?.mode)),f(i.litellm_params?.default_on||!1),b(i.litellm_params?.custom_code||tE.empty.code),j("")):(c(""),x(["pre_call"]),f(!1),j("empty"),b(tE.empty.code)),B(null),k(!1))},[e,i]);let G=async e=>{try{await navigator.clipboard.writeText(e),E(e),setTimeout(()=>E(null),2e3)}catch(e){console.error("Failed to copy:",e)}},z=async()=>{if(!d.trim())return void u.default.fromBackend("Please enter a guardrail name");if(!_.trim())return void u.default.fromBackend("Please enter custom code");if(!r)return void u.default.fromBackend("No access token available");w(!0);try{if(o&&i){let e={litellm_params:{custom_code:_}};d!==i.guardrail_name&&(e.guardrail_name=d);let t=R(i.litellm_params?.mode);(g.length!==t.length||g.some((e,a)=>e!==t[a]))&&(e.litellm_params.mode=g),h!==i.litellm_params?.default_on&&(e.litellm_params.default_on=h),await (0,p.updateGuardrailCall)(r,i.guardrail_id,e),u.default.success("Custom code guardrail updated successfully")}else await (0,p.createGuardrailCall)(r,{guardrail_name:d,litellm_params:{guardrail:"custom_code",mode:g,default_on:h,custom_code:_},guardrail_info:{}}),u.default.success("Custom code guardrail created successfully");a(),t()}catch(e){console.error("Failed to save guardrail:",e),u.default.fromBackend(`Failed to ${o?"update":"create"} guardrail: `+(e instanceof Error?e.message:String(e)))}finally{w(!1)}},K=async()=>{if(!r)return void B({error:"No access token available"});C(!0),B(null);try{let e;try{e=JSON.parse(P)}catch(e){B({error:"Invalid test input JSON"}),C(!1);return}e.texts||(e.texts=[]);let t=["pre_call","pre_mcp_call"],a=["post_call","post_mcp_call"],l=g.some(e=>t.includes(e))?"request":g.some(e=>a.includes(e))?"response":"request",i=await (0,p.testCustomCodeGuardrail)(r,{custom_code:_,test_input:e,input_type:l,request_data:{model:"test-model",metadata:{}}});i.success&&i.result?B(i.result):i.error?B({error:i.error,error_type:i.error_type}):B({error:"Unknown error occurred"})}catch(e){console.error("Failed to test custom code:",e),B({error:e instanceof Error?e.message:"Failed to test custom code"})}finally{C(!1)}},H=_.split("\n").length;return(0,l.jsxs)(s.Modal,{open:e,onCancel:t,footer:null,width:1400,className:"custom-code-modal",closable:!0,destroyOnClose:!0,children:[(0,l.jsxs)("div",{className:"flex flex-col h-[80vh]",children:[(0,l.jsxs)("div",{className:"pb-4 border-b border-gray-200",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:o?"Edit Custom Guardrail":"Create Custom Guardrail"}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Define custom logic using Python-like syntax"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-4 py-4 border-b border-gray-100",children:[(0,l.jsxs)("div",{className:"flex-1 max-w-[200px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Guardrail Name"}),(0,l.jsx)(tt.TextInput,{value:d,onValueChange:c,placeholder:"e.g., block-pii-custom"})]}),(0,l.jsxs)("div",{className:"w-[280px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Mode (can select multiple)"}),(0,l.jsx)(n.Select,{mode:"multiple",value:g,onChange:x,options:tR,className:"w-full",size:"middle",placeholder:"Select modes"})]}),(0,l.jsxs)("div",{className:"w-[180px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Template"}),(0,l.jsx)(n.Select,{value:y,onChange:e=>{j(e),b(tE[e].code)},className:"w-full",size:"middle",dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(eG.Divider,{style:{margin:"8px 0"}}),(0,l.jsxs)("div",{style:{padding:"8px 12px",cursor:"pointer",color:"#1890ff",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px"},onClick:e=>{e.preventDefault(),window.open("https://models.litellm.ai/guardrails","_blank")},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f0f0f0"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"},children:[(0,l.jsx)(tL,{}),(0,l.jsx)("span",{children:"Browse Community templates"}),(0,l.jsx)(tB.ExportOutlined,{style:{fontSize:"10px"}})]})]}),children:(0,l.jsx)(n.Select.OptGroup,{label:"STANDARD",children:Object.entries(tE).map(([e,t])=>(0,l.jsx)(n.Select.Option,{value:e,children:t.name},e))})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pt-5",children:[(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Default On"}),(0,l.jsx)(D.Switch,{checked:h,onChange:f})]})]}),(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden mt-4 gap-6",children:[(0,l.jsxs)("div",{className:"flex-[2] flex flex-col min-w-0 overflow-y-auto",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2 flex-shrink-0",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Python Logic"}),(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Restricted environment (no imports)"})]}),(0,l.jsxs)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e] flex-shrink-0",style:{minHeight:"300px",maxHeight:"400px"},children:[(0,l.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-12 bg-[#1e1e1e] border-r border-gray-700 text-right pr-3 pt-3 select-none overflow-hidden",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6"},children:Array.from({length:Math.max(H,20)},(e,t)=>(0,l.jsx)("div",{className:"text-gray-500 h-[22.4px]",children:t+1},t+1))}),(0,l.jsx)("textarea",{ref:M,value:_,onChange:e=>b(e.target.value),onKeyDown:e=>{if("Tab"===e.key){e.preventDefault();let t=e.currentTarget,a=t.selectionStart,l=t.selectionEnd;b(_.substring(0,a)+" "+_.substring(l)),setTimeout(()=>{t.selectionStart=t.selectionEnd=a+4},0)}},spellCheck:!1,className:"w-full h-full pl-14 pr-4 pt-3 pb-3 resize-none focus:outline-none bg-transparent text-gray-200",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6",tabSize:4}})]}),(0,l.jsx)($.Collapse,{activeKey:S?["test"]:[],onChange:e=>k(e.includes("test")),className:"mt-3 bg-white border border-gray-200 rounded-lg flex-shrink-0",expandIcon:({isActive:e})=>(0,l.jsx)(tO,{rotate:90*!!e}),children:(0,l.jsx)(tF,{header:(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,l.jsx)(tS.PlayCircleOutlined,{className:"text-blue-500"}),"Test Your Guardrail"]}),children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600",children:"Test Input (JSON)"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs text-gray-500",children:"Load example:"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(I,null,2)),className:"px-2 py-1 text-xs rounded border border-orange-200 bg-orange-50 text-orange-700 hover:bg-orange-100 transition-colors",children:"Pre-call"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(O,null,2)),className:"px-2 py-1 text-xs rounded border border-purple-200 bg-purple-50 text-purple-700 hover:bg-purple-100 transition-colors",children:"Pre MCP"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(A,null,2)),className:"px-2 py-1 text-xs rounded border border-green-200 bg-green-50 text-green-700 hover:bg-green-100 transition-colors",children:"Post-call"})]})]}),(0,l.jsx)("div",{className:"mb-2 p-2 bg-gray-50 rounded text-xs text-gray-600 border border-gray-200",children:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"texts"}),": Message content (always)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"images"}),": Base64 images (vision)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tools"}),": Tool definitions ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"}),", MCP as OpenAI tool ",(0,l.jsx)("span",{className:"text-purple-600",children:"(pre_mcp_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tool_calls"}),": LLM tool calls ",(0,l.jsx)("span",{className:"text-green-600",children:"(post_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"structured_messages"}),": Full messages ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"model"}),": Model name (always)"]})]})}),(0,l.jsx)(t$,{value:P,onChange:e=>T(e.target.value),rows:8,className:"font-mono text-xs",placeholder:'{"texts": ["test message"], ...}'})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{size:"xs",onClick:K,disabled:N,icon:tS.PlayCircleOutlined,children:N?"Running...":"Run Test"}),L&&(0,l.jsx)("div",{className:`flex items-center gap-2 text-sm ${L.error?"text-red-600":"allow"===L.action?"text-green-600":"block"===L.action?"text-orange-600":"text-blue-600"}`,children:L.error?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{}),(0,l.jsxs)("span",{children:[L.error_type&&(0,l.jsxs)("span",{className:"font-medium",children:["[",L.error_type,"] "]}),L.error]})]}):"allow"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Allowed"]}):"block"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{})," Blocked: ",L.reason]}):"modify"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Modified",L.texts&&L.texts.length>0&&(0,l.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:["→ ",L.texts[0].substring(0,50),L.texts[0].length>50?"...":""]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," ",L.action||"Unknown"]})})]})]})},"test")}),(0,l.jsxs)("div",{className:"mt-3 p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-lg flex items-center justify-between flex-shrink-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"bg-blue-100 rounded-full p-2",children:(0,l.jsx)(tL,{className:"text-blue-600 text-lg"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-gray-900",children:"Built a useful guardrail?"}),(0,l.jsx)("div",{className:"text-xs text-gray-600",children:"Share it with the community and help others build faster"})]})]}),(0,l.jsx)(e4.Button,{size:"xs",onClick:()=>window.open("https://github.com/BerriAI/litellm-guardrails","_blank"),icon:tB.ExportOutlined,className:"bg-blue-600 hover:bg-blue-700 text-white border-0",children:"Contribute Template"})]})]}),(0,l.jsxs)("div",{className:"w-[300px] flex-shrink-0 overflow-auto border-l border-gray-200 pl-6",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)("span",{className:"font-semibold text-gray-700",children:"Available Primitives"})]}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Click to copy functions to clipboard"}),(0,l.jsx)($.Collapse,{defaultActiveKey:["Return Values"],className:"primitives-collapse bg-transparent border-0",expandIconPosition:"end",children:Object.entries(tM).map(([e,t])=>(0,l.jsx)(tF,{header:(0,l.jsx)("span",{className:"text-sm font-medium text-gray-700",children:e}),className:"bg-white mb-2 rounded-lg border border-gray-200",children:(0,l.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,l.jsx)("button",{onClick:()=>G(e.name),className:`w-full text-left px-2 py-2 rounded transition-colors ${F===e.name?"bg-green-100":"bg-gray-50 hover:bg-blue-50"}`,children:F===e.name?(0,l.jsxs)("span",{className:"flex items-center gap-1 text-xs font-mono text-green-700",children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Copied!"]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"text-xs font-mono text-gray-800",children:e.name}),(0,l.jsx)("div",{className:"text-[10px] text-gray-500 mt-0.5",children:e.desc})]})},e.name))})},e))})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-gray-200",children:[(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Changes are auto-saved to local draft"}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:z,loading:v,disabled:v||!d.trim(),icon:tP.SaveOutlined,children:o?"Update Guardrail":"Save Guardrail"})]})]})]}),(0,l.jsx)("style",{children:` + return allow()`}},tM={"Return Values":[{name:"allow()",desc:"Let request/response through"},{name:"block(reason)",desc:"Reject with message"},{name:"modify(texts=[], images=[], tool_calls=[])",desc:"Transform content"}],"HTTP Requests (async)":[{name:"await http_request(url, method, headers, body)",desc:"Make async HTTP request"},{name:"await http_get(url, headers)",desc:"Async GET request"},{name:"await http_post(url, body, headers)",desc:"Async POST request"}],"Regex Functions":[{name:"regex_match(text, pattern)",desc:"Returns True if pattern found"},{name:"regex_replace(text, pattern, replacement)",desc:"Replace all matches"},{name:"regex_find_all(text, pattern)",desc:"Return list of matches"}],"JSON Functions":[{name:"json_parse(text)",desc:"Parse JSON string, returns None on error"},{name:"json_stringify(obj)",desc:"Convert to JSON string"},{name:"json_schema_valid(obj, schema)",desc:"Validate against JSON schema"}],"URL Functions":[{name:"extract_urls(text)",desc:"Extract all URLs from text"},{name:"is_valid_url(url)",desc:"Check if URL is valid"},{name:"all_urls_valid(text)",desc:"Check all URLs in text are valid"}],"Code Detection":[{name:"detect_code(text)",desc:"Returns True if code detected"},{name:"detect_code_languages(text)",desc:"Returns list of detected languages"},{name:'contains_code_language(text, ["sql"])',desc:"Check for specific languages"}],"Text Utilities":[{name:"contains(text, substring)",desc:"Check if substring exists"},{name:"contains_any(text, [substr1, substr2])",desc:"Check if any substring exists"},{name:"word_count(text)",desc:"Count words"},{name:"char_count(text)",desc:"Count characters"},{name:"lower(text) / upper(text) / trim(text)",desc:"String transforms"}]},tR=[{value:"pre_call",label:"pre_call (Request)"},{value:"post_call",label:"post_call (Response)"},{value:"during_call",label:"during_call (Parallel)"},{value:"logging_only",label:"logging_only"},{value:"pre_mcp_call",label:"pre_mcp_call (Before MCP Tool Call)"},{value:"post_mcp_call",label:"post_mcp_call (After MCP Tool Call)"},{value:"during_mcp_call",label:"during_mcp_call (During MCP Tool Call)"}],tG=({visible:e,onClose:t,onSuccess:a,accessToken:r,editData:i})=>{let o=!!i,[d,c]=(0,m.useState)(""),[g,x]=(0,m.useState)(["pre_call"]),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)("empty"),[_,b]=(0,m.useState)(tE.empty.code),[v,w]=(0,m.useState)(!1),[N,C]=(0,m.useState)(!1),[S,k]=(0,m.useState)(!1),I={texts:["Hello, my SSN is 123-45-6789"],images:[],tools:[{type:"function",function:{name:"get_weather",description:"Get the current weather in a location",parameters:{type:"object",properties:{location:{type:"string",description:"City name"}},required:["location"]}}}],tool_calls:[],structured_messages:[{role:"system",content:"You are a helpful assistant."},{role:"user",content:"Hello, my SSN is 123-45-6789"}],model:"gpt-4"},A={texts:["The weather in San Francisco is 72°F and sunny."],images:[],tools:[],tool_calls:[{id:"call_abc123",type:"function",function:{name:"get_weather",arguments:'{"location": "San Francisco"}'}}],structured_messages:[],model:"gpt-4"},O={texts:['Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'],images:[],tools:[{type:"function",function:{name:"read_wiki_structure",description:"Read the structure of a GitHub repository (MCP tool passed as OpenAI tool)",parameters:{type:"object",properties:{repoName:{type:"string",description:"Repository name, e.g. BerriAI/litellm"}},required:["repoName"]}}}],tool_calls:[{id:"call_mcp_001",type:"function",function:{name:"read_wiki_structure",arguments:'{"repoName": "BerriAI/litellm"}'}}],structured_messages:[{role:"user",content:'Tool: read_wiki_structure\nArguments: {"repoName": "BerriAI/litellm"}'}],model:"mcp-tool-call"},[P,T]=(0,m.useState)(JSON.stringify(I,null,2)),[L,B]=(0,m.useState)(null),[F,E]=(0,m.useState)(null),M=(0,m.useRef)(null),R=e=>null==e?["pre_call"]:Array.isArray(e)?e.length?e:["pre_call"]:[e];(0,m.useEffect)(()=>{e&&(i?(c(i.guardrail_name||""),x(R(i.litellm_params?.mode)),f(i.litellm_params?.default_on||!1),b(i.litellm_params?.custom_code||tE.empty.code),j("")):(c(""),x(["pre_call"]),f(!1),j("empty"),b(tE.empty.code)),B(null),k(!1))},[e,i]);let G=async e=>{try{await navigator.clipboard.writeText(e),E(e),setTimeout(()=>E(null),2e3)}catch(e){console.error("Failed to copy:",e)}},z=async()=>{if(!d.trim())return void u.default.fromBackend("Please enter a guardrail name");if(!_.trim())return void u.default.fromBackend("Please enter custom code");if(!r)return void u.default.fromBackend("No access token available");w(!0);try{if(o&&i){let e={litellm_params:{custom_code:_}};d!==i.guardrail_name&&(e.guardrail_name=d);let t=R(i.litellm_params?.mode);(g.length!==t.length||g.some((e,a)=>e!==t[a]))&&(e.litellm_params.mode=g),h!==i.litellm_params?.default_on&&(e.litellm_params.default_on=h),await (0,p.updateGuardrailCall)(r,i.guardrail_id,e),u.default.success("Custom code guardrail updated successfully")}else await (0,p.createGuardrailCall)(r,{guardrail_name:d,litellm_params:{guardrail:"custom_code",mode:g,default_on:h,custom_code:_},guardrail_info:{}}),u.default.success("Custom code guardrail created successfully");a(),t()}catch(e){console.error("Failed to save guardrail:",e),u.default.fromBackend(`Failed to ${o?"update":"create"} guardrail: `+(e instanceof Error?e.message:String(e)))}finally{w(!1)}},K=async()=>{if(!r)return void B({error:"No access token available"});C(!0),B(null);try{let e;try{e=JSON.parse(P)}catch(e){B({error:"Invalid test input JSON"}),C(!1);return}e.texts||(e.texts=[]);let t=["pre_call","pre_mcp_call"],a=["post_call","post_mcp_call"],l=g.some(e=>t.includes(e))?"request":g.some(e=>a.includes(e))?"response":"request",i=await (0,p.testCustomCodeGuardrail)(r,{custom_code:_,test_input:e,input_type:l,request_data:{model:"test-model",metadata:{}}});i.success&&i.result?B(i.result):i.error?B({error:i.error,error_type:i.error_type}):B({error:"Unknown error occurred"})}catch(e){console.error("Failed to test custom code:",e),B({error:e instanceof Error?e.message:"Failed to test custom code"})}finally{C(!1)}},q=_.split("\n").length;return(0,l.jsxs)(s.Modal,{open:e,onCancel:t,footer:null,width:1400,className:"custom-code-modal",closable:!0,destroyOnClose:!0,children:[(0,l.jsxs)("div",{className:"flex flex-col h-[80vh]",children:[(0,l.jsxs)("div",{className:"pb-4 border-b border-gray-200",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:o?"Edit Custom Guardrail":"Create Custom Guardrail"}),(0,l.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Define custom logic using Python-like syntax"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-4 py-4 border-b border-gray-100",children:[(0,l.jsxs)("div",{className:"flex-1 max-w-[200px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Guardrail Name"}),(0,l.jsx)(tt.TextInput,{value:d,onValueChange:c,placeholder:"e.g., block-pii-custom"})]}),(0,l.jsxs)("div",{className:"w-[280px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Mode (can select multiple)"}),(0,l.jsx)(n.Select,{mode:"multiple",value:g,onChange:x,options:tR,className:"w-full",size:"middle",placeholder:"Select modes"})]}),(0,l.jsxs)("div",{className:"w-[180px]",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Template"}),(0,l.jsx)(n.Select,{value:y,onChange:e=>{j(e),b(tE[e].code)},className:"w-full",size:"middle",dropdownRender:e=>(0,l.jsxs)(l.Fragment,{children:[e,(0,l.jsx)(eG.Divider,{style:{margin:"8px 0"}}),(0,l.jsxs)("div",{style:{padding:"8px 12px",cursor:"pointer",color:"#1890ff",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px"},onClick:e=>{e.preventDefault(),window.open("https://models.litellm.ai/guardrails","_blank")},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f0f0f0"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"},children:[(0,l.jsx)(tL,{}),(0,l.jsx)("span",{children:"Browse Community templates"}),(0,l.jsx)(tB.ExportOutlined,{style:{fontSize:"10px"}})]})]}),children:(0,l.jsx)(n.Select.OptGroup,{label:"STANDARD",children:Object.entries(tE).map(([e,t])=>(0,l.jsx)(n.Select.Option,{value:e,children:t.name},e))})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pt-5",children:[(0,l.jsx)("span",{className:"text-sm text-gray-600",children:"Default On"}),(0,l.jsx)(D.Switch,{checked:h,onChange:f})]})]}),(0,l.jsxs)("div",{className:"flex flex-1 overflow-hidden mt-4 gap-6",children:[(0,l.jsxs)("div",{className:"flex-[2] flex flex-col min-w-0 overflow-y-auto",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2 flex-shrink-0",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Python Logic"}),(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Restricted environment (no imports)"})]}),(0,l.jsxs)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e] flex-shrink-0",style:{minHeight:"300px",maxHeight:"400px"},children:[(0,l.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-12 bg-[#1e1e1e] border-r border-gray-700 text-right pr-3 pt-3 select-none overflow-hidden",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6"},children:Array.from({length:Math.max(q,20)},(e,t)=>(0,l.jsx)("div",{className:"text-gray-500 h-[22.4px]",children:t+1},t+1))}),(0,l.jsx)("textarea",{ref:M,value:_,onChange:e=>b(e.target.value),onKeyDown:e=>{if("Tab"===e.key){e.preventDefault();let t=e.currentTarget,a=t.selectionStart,l=t.selectionEnd;b(_.substring(0,a)+" "+_.substring(l)),setTimeout(()=>{t.selectionStart=t.selectionEnd=a+4},0)}},spellCheck:!1,className:"w-full h-full pl-14 pr-4 pt-3 pb-3 resize-none focus:outline-none bg-transparent text-gray-200",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace",fontSize:"14px",lineHeight:"1.6",tabSize:4}})]}),(0,l.jsx)($.Collapse,{activeKey:S?["test"]:[],onChange:e=>k(e.includes("test")),className:"mt-3 bg-white border border-gray-200 rounded-lg flex-shrink-0",expandIcon:({isActive:e})=>(0,l.jsx)(tO,{rotate:90*!!e}),children:(0,l.jsx)(tF,{header:(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,l.jsx)(tS.PlayCircleOutlined,{className:"text-blue-500"}),"Test Your Guardrail"]}),children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("label",{className:"block text-xs font-medium text-gray-600",children:"Test Input (JSON)"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs text-gray-500",children:"Load example:"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(I,null,2)),className:"px-2 py-1 text-xs rounded border border-orange-200 bg-orange-50 text-orange-700 hover:bg-orange-100 transition-colors",children:"Pre-call"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(O,null,2)),className:"px-2 py-1 text-xs rounded border border-purple-200 bg-purple-50 text-purple-700 hover:bg-purple-100 transition-colors",children:"Pre MCP"}),(0,l.jsx)("button",{type:"button",onClick:()=>T(JSON.stringify(A,null,2)),className:"px-2 py-1 text-xs rounded border border-green-200 bg-green-50 text-green-700 hover:bg-green-100 transition-colors",children:"Post-call"})]})]}),(0,l.jsx)("div",{className:"mb-2 p-2 bg-gray-50 rounded text-xs text-gray-600 border border-gray-200",children:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"texts"}),": Message content (always)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"images"}),": Base64 images (vision)"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tools"}),": Tool definitions ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"}),", MCP as OpenAI tool ",(0,l.jsx)("span",{className:"text-purple-600",children:"(pre_mcp_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"tool_calls"}),": LLM tool calls ",(0,l.jsx)("span",{className:"text-green-600",children:"(post_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"structured_messages"}),": Full messages ",(0,l.jsx)("span",{className:"text-orange-600",children:"(pre_call)"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"model"}),": Model name (always)"]})]})}),(0,l.jsx)(t$,{value:P,onChange:e=>T(e.target.value),rows:8,className:"font-mono text-xs",placeholder:'{"texts": ["test message"], ...}'})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{size:"xs",onClick:K,disabled:N,icon:tS.PlayCircleOutlined,children:N?"Running...":"Run Test"}),L&&(0,l.jsx)("div",{className:`flex items-center gap-2 text-sm ${L.error?"text-red-600":"allow"===L.action?"text-green-600":"block"===L.action?"text-orange-600":"text-blue-600"}`,children:L.error?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{}),(0,l.jsxs)("span",{children:[L.error_type&&(0,l.jsxs)("span",{className:"font-medium",children:["[",L.error_type,"] "]}),L.error]})]}):"allow"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Allowed"]}):"block"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tI.CloseCircleOutlined,{})," Blocked: ",L.reason]}):"modify"===L.action?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Modified",L.texts&&L.texts.length>0&&(0,l.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:["→ ",L.texts[0].substring(0,50),L.texts[0].length>50?"...":""]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," ",L.action||"Unknown"]})})]})]})},"test")}),(0,l.jsxs)("div",{className:"mt-3 p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-lg flex items-center justify-between flex-shrink-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"bg-blue-100 rounded-full p-2",children:(0,l.jsx)(tL,{className:"text-blue-600 text-lg"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-gray-900",children:"Built a useful guardrail?"}),(0,l.jsx)("div",{className:"text-xs text-gray-600",children:"Share it with the community and help others build faster"})]})]}),(0,l.jsx)(e4.Button,{size:"xs",onClick:()=>window.open("https://github.com/BerriAI/litellm-guardrails","_blank"),icon:tB.ExportOutlined,className:"bg-blue-600 hover:bg-blue-700 text-white border-0",children:"Contribute Template"})]})]}),(0,l.jsxs)("div",{className:"w-[300px] flex-shrink-0 overflow-auto border-l border-gray-200 pl-6",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)("span",{className:"font-semibold text-gray-700",children:"Available Primitives"})]}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Click to copy functions to clipboard"}),(0,l.jsx)($.Collapse,{defaultActiveKey:["Return Values"],className:"primitives-collapse bg-transparent border-0",expandIconPosition:"end",children:Object.entries(tM).map(([e,t])=>(0,l.jsx)(tF,{header:(0,l.jsx)("span",{className:"text-sm font-medium text-gray-700",children:e}),className:"bg-white mb-2 rounded-lg border border-gray-200",children:(0,l.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,l.jsx)("button",{onClick:()=>G(e.name),className:`w-full text-left px-2 py-2 rounded transition-colors ${F===e.name?"bg-green-100":"bg-gray-50 hover:bg-blue-50"}`,children:F===e.name?(0,l.jsxs)("span",{className:"flex items-center gap-1 text-xs font-mono text-green-700",children:[(0,l.jsx)(tk.CheckCircleOutlined,{})," Copied!"]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"text-xs font-mono text-gray-800",children:e.name}),(0,l.jsx)("div",{className:"text-[10px] text-gray-500 mt-0.5",children:e.desc})]})},e.name))})},e))})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-gray-200",children:[(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Changes are auto-saved to local draft"}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(e4.Button,{variant:"secondary",onClick:t,children:"Cancel"}),(0,l.jsx)(e4.Button,{onClick:z,loading:v,disabled:v||!d.trim(),icon:tP.SaveOutlined,children:o?"Update Guardrail":"Save Guardrail"})]})]})]}),(0,l.jsx)("style",{children:` .custom-code-modal .ant-modal-content { padding: 24px; } @@ -81,4 +81,4 @@ .primitives-collapse .ant-collapse-content-box { padding: 8px 12px !important; } - `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let o,[d,g]=(0,m.useState)(null),[x,h]=(0,m.useState)(null),[f,y]=(0,m.useState)(!0),[j,_]=(0,m.useState)(!1),[b]=r.Form.useForm(),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(null),[I,A]=(0,m.useState)({}),[O,P]=(0,m.useState)(!1),T={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[L,B]=(0,m.useState)(T),[F,$]=(0,m.useState)(!1),[E,M]=(0,m.useState)(!1),R=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),G=(0,m.useCallback)((e,t,a,l,r)=>{R.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(y(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(g(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(w([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),w(t),C(a)}}else w([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{y(!1)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);h(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},K=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);k(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{D()},[a]),(0,m.useEffect)(()=>{z(),K()},[e,a]),(0,m.useEffect)(()=>{if(d&&b){let e={...d.litellm_params||{}};delete e.skip_system_message_in_guardrail,b.setFieldsValue({guardrail_name:d.guardrail_name,...e,skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}})}},[d,x,b]);let H=(0,m.useCallback)(()=>{d?.litellm_params?.guardrail==="tool_permission"?B({rules:d.litellm_params?.rules||[],default_action:(d.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:d.litellm_params?.violation_message_template||""}):B(T),$(!1)},[d]);(0,m.useEffect)(()=>{H()},[H]);let q=async t=>{try{if(!a)return;let o={litellm_params:{}};t.guardrail_name!==d.guardrail_name&&(o.guardrail_name=t.guardrail_name),t.default_on!==d.litellm_params?.default_on&&(o.litellm_params.default_on=t.default_on);let c=ec(d.litellm_params?.skip_system_message_in_guardrail),m=t.skip_system_message_choice;void 0!==m&&m!==c&&("inherit"===m?o.litellm_params.skip_system_message_in_guardrail=null:"yes"===m?o.litellm_params.skip_system_message_in_guardrail=!0:o.litellm_params.skip_system_message_in_guardrail=!1);let g=d.guardrail_info,h=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(g)!==JSON.stringify(h)&&(o.guardrail_info=h);let f=d.litellm_params?.pii_entities_config||{},y={};if(v.forEach(e=>{y[e]=N[e]||"MASK"}),JSON.stringify(f)!==JSON.stringify(y)&&(o.litellm_params.pii_entities_config=y),d.litellm_params?.guardrail==="litellm_content_filter"&&O){var l,r,i,s,n;let e,t=(l=R.current.patterns||[],r=R.current.blockedWords||[],i=R.current.categories||[],s=R.current.competitorIntentEnabled,n=R.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);o.litellm_params.patterns=t.patterns,o.litellm_params.blocked_words=t.blocked_words,o.litellm_params.categories=t.categories,o.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(d.litellm_params?.guardrail==="tool_permission"){let e=d.litellm_params?.rules||[],t=L.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(d.litellm_params?.default_action||"deny").toLowerCase(),r=(L.default_action||"deny").toLowerCase(),i=l!==r,s=(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(L.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=d.litellm_params?.violation_message_template||"",u=L.violation_message_template||"",p=m!==u;(F||a||i||c||p)&&(o.litellm_params.rules=t,o.litellm_params.default_action=r,o.litellm_params.on_disallowed_action=n,o.litellm_params.violation_message_template=u||null)}let j=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",j);let b=d.litellm_params?.guardrail==="tool_permission";if(x&&j&&!b){let e=x[ea[j]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=d.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?o.litellm_params[e]=a:null!=l&&""!==l&&(o.litellm_params[e]=null))})}if(0===Object.keys(o.litellm_params).length&&delete o.litellm_params,0===Object.keys(o).length){u.default.info("No changes detected"),_(!1);return}await (0,p.updateGuardrailCall)(a,e,o),u.default.success("Guardrail updated successfully"),P(!1),z(),_(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(f)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let J=e=>e?new Date(e).toLocaleString():"-",{logo:U,displayName:W}=ed(d.litellm_params?.guardrail||""),V=async(e,t)=>{await (0,tn.copyToClipboard)(e)&&(A(e=>({...e,[t]:!0})),setTimeout(()=>{A(e=>({...e,[t]:!1}))},2e3))},Y="config"===d.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(td.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(th.Title,{children:d.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eR.Text,{className:"text-gray-500 font-mono",children:d.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:I["guardrail-id"]?(0,l.jsx)(tf.CheckIcon,{size:12}):(0,l.jsx)(ty.CopyIcon,{size:12}),onClick:()=>V(d.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${I["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tu.TabGroup,{children:[(0,l.jsxs)(tp.TabList,{className:"mb-4",children:[(0,l.jsx)(tm.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(tm.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tx.TabPanels,{children:[(0,l.jsxs)(tg.TabPanel,{children:[(0,l.jsxs)(tc.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[U&&(0,l.jsx)("img",{src:U,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(th.Title,{children:W})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:d.litellm_params?.mode||"-"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:J(d.created_at)}),(0,l.jsxs)(eR.Text,{children:["Last Updated: ",J(d.updated_at)]})]})]})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsx)(eR.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(d.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eR.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(eN.default,{}):(0,l.jsx)(eC.StopOutlined,{}),String(t)]})})]},e))})]})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsx)(eH,{value:L,disabled:!0})}),d.litellm_params?.guardrail==="custom_code"&&d.litellm_params?.custom_code&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eR.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!Y&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:d.litellm_params.custom_code})})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(tg.TabPanel,{children:(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(th.Title,{children:"Guardrail Settings"}),Y&&(0,l.jsx)(ej.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})}),!j&&!Y&&(d.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>_(!0),children:"Edit Settings"}))]}),j?(0,l.jsxs)(r.Form,{form:b,onFinish:q,initialValues:{guardrail_name:d.guardrail_name,...(o={...d.litellm_params||{}},delete o.skip_system_message_in_guardrail,o),skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{label:"Skip system messages in guardrail",name:"skip_system_message_choice",tooltip:"Unified guardrails: omit role: system from guardrail input (LLM still gets full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),d.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:S&&(0,l.jsx)(eE,{entities:S.supported_entities,actions:S.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:S.pii_entity_categories})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!0,accessToken:a,onDataChange:G,onUnsavedChanges:P}),(d.litellm_params?.guardrail==="tool_permission"||x)&&(0,l.jsx)(eG.Divider,{orientation:"left",children:"Provider Settings"}),d.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eH,{value:L,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ey,{selectedProvider:Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail)||null,accessToken:a,providerParams:x,value:d.litellm_params}),x&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);if(!e)return null;let t=x[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:d.litellm_params}):null})()]}),(0,l.jsx)(eG.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{_(!1),P(!1),H()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:d.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:d.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Yes":"No"})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:J(d.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:J(d.updated_at)})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eH,{value:L,disabled:!0})]})]})})]})]}),(0,l.jsx)(tG,{visible:E,onClose:()=>M(!1),onSuccess:()=>{M(!1),z()},accessToken:a,editData:d?{guardrail_id:d.guardrail_id,guardrail_name:d.guardrail_name,litellm_params:d.litellm_params}:null})]})}],969641);var tz=e.i(573421),tD=e.i(19732),tK=e.i(928685),tH=e.i(166406),tq=e.i(637235),tJ=e.i(755151),tU=e.i(240647);let{Text:tW}=d.Typography,tV=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tk.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tq.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tY}=i.Input,{Text:tQ}=d.Typography,tX=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ej.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eD.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tH.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tY,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(e4.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tV,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[s,n]=(0,m.useState)(new Set),[o,c]=(0,m.useState)(""),[g,x]=(0,m.useState)([]),[f,y]=(0,m.useState)([]),[j,_]=(0,m.useState)(!1),b=e.filter(e=>e.guardrail_name?.toLowerCase().includes(o.toLowerCase())),v=async e=>{if(0===s.size||!a)return;_(!0),x([]),y([]);let t=[],l=[];await Promise.all(Array.from(s).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),x(t),y(l),_(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(h.Card,{className:"h-full",styles:{body:{padding:0,height:"100%"}},children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(i.Input,{prefix:(0,l.jsx)(tK.SearchOutlined,{}),placeholder:"Search guardrails...",value:o,onChange:e=>c(e.target.value)})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(eh.Spin,{})}):0===b.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(ez.Empty,{description:o?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(tz.List,{dataSource:b,renderItem:e=>(0,l.jsx)(tz.List.Item,{onClick:()=>{var t;let a;e.guardrail_name&&(t=e.guardrail_name,(a=new Set(s)).has(t)?a.delete(t):a.add(t),n(a))},style:{paddingLeft:24,paddingRight:16},className:`cursor-pointer hover:bg-gray-50 transition-colors ${s.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(tz.List.Item.Meta,{title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tD.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(d.Typography.Text,{className:"text-xs text-gray-600",children:[s.size," of ",b.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(d.Typography.Title,{level:2,className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===s.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tD.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tX,{guardrailNames:Array.from(s),onSubmit:v,results:g.length>0?g:null,errors:f.length>0?f:null,isLoading:j,onClose:()=>n(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tG],64352);let tZ="../ui/assets/logos/",t0=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tZ}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tZ}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tZ}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tZ}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tZ}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tZ}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tZ}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tZ}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tZ}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tZ}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tZ}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tZ}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tZ}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tZ}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tZ}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tZ}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tZ}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tZ}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tZ}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tZ}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tZ}akto.svg`,tags:["Security","Safety","Monitoring"]},{id:"promptguard",name:"PromptGuard",description:"AI security gateway with prompt injection detection, PII redaction, topic filtering, entity blocklists, and hallucination detection. Self-hostable with drop-in proxy integration.",category:"partner",logo:`${tZ}promptguard.svg`,tags:["Security","Prompt Injection","PII"],providerKey:"Promptguard",eval:{f1:94.9,precision:100,recall:90.4,testCases:5384,latency:"~150ms"}},{id:"xecguard",name:"XecGuard",description:"CyCraft XecGuard AI security gateway. Multi-policy scanning (prompt injection, harmful content, PII, system-prompt enforcement) plus RAG context grounding.",category:"partner",logo:`${tZ}xecguard.svg`,tags:["Security","Policy","Grounding","RAG"],providerKey:"Xecguard"}];e.s(["ALL_CARDS",0,t0],230312)},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(464571),r=e.i(326373),i=e.i(653496),s=e.i(755151),n=e.i(646563),o=e.i(245094),d=e.i(764205),c=e.i(185357),m=e.i(782719),u=e.i(708347),p=e.i(969641),g=e.i(476993),x=e.i(727749),h=e.i(127952),f=e.i(180766);e.i(824296);var y=e.i(64352),j=e.i(311451),_=e.i(928685),b=e.i(266537),v=e.i(230312),w=e.i(826910);let N=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},C=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(N,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(w.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var S=e.i(447566);let k={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1},promptguard:{provider:"Promptguard",guardrailNameSuggestion:"PromptGuard",mode:"pre_call",defaultOn:!1},xecguard:{provider:"Xecguard",guardrailNameSuggestion:"XecGuard",mode:"pre_call",defaultOn:!1}},I=({card:e,onBack:r,accessToken:i,onGuardrailCreated:s})=>{let[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)("overview"),u=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],p=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],g=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:r,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(S.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(l.Button,{onClick:()=>o(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:g.map(e=>(0,t.jsx)("div",{onClick:()=>m(e.key),style:{padding:"12px 20px",fontSize:14,color:d===e.key?"#1a73e8":"#5f6368",borderBottom:d===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:d===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===d&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:u.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:p.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(c.default,{visible:n,onClose:()=>o(!1),accessToken:i,onSuccess:()=>{o(!1),s()},preset:k[e.id]})]})},A=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=v.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(I,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(j.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(_.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]})]})};var O=e.i(988846),P=e.i(837007),T=e.i(409797),L=e.i(54131),B=e.i(995926),F=e.i(678784),$=e.i(634831),E=e.i(438100),M=e.i(302202),R=e.i(328196),G=e.i(879664);e.s(["InfoIcon",()=>G.default],168118);var G=G,z=e.i(212931),D=e.i(808613),K=e.i(199133),H=e.i(663435),q=e.i(954616),J=e.i(912598),U=e.i(135214),W=e.i(243652);let V=async(e,t)=>{let a=(0,d.getProxyBaseUrl)(),l=`${a}/guardrails/register`,r=await fetch(l,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.json().catch(()=>({})),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return r.json()},Y=(0,W.createQueryKeys)("guardrails");function Q(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt: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),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let X={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{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"}},Z={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function ee({label:e,value:a,color:l}){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 ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function et({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function ea({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=X[e.status],c=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,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.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(M.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,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:o,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,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function el({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function er({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=X[e.status],y=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(B.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(el,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)($.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(el,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(E.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(G.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)($.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(F.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(B.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ei({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="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 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(F.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(R.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,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,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function es({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[c,m]=(0,a.useState)("all"),[u,p]=(0,a.useState)(null),[g,h]=(0,a.useState)(new Set),[f,y]=(0,a.useState)(null),[_,b]=(0,a.useState)(!0),[v,w]=(0,a.useState)(null),[N,C]=(0,a.useState)(""),[S,k]=(0,a.useState)(!1),[I]=D.Form.useForm(),A=(()=>{let{accessToken:e}=(0,U.default)(),t=(0,J.useQueryClient)();return(0,q.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return V(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:Y.all})}})})();(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let T=(0,a.useCallback)(async()=>{if(!e)return void b(!1);b(!0),w(null);try{let t="all"===c?void 0:"pending"===c?"pending_review":c,a=await (0,d.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(Q)),s(a.summary)}catch(e){w(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{b(!1)}},[e,c,N]);(0,a.useEffect)(()=>{T()},[T]);let L=l.find(e=>e.id===u)??null,B=i.total,F=i.pending_review,$=i.active,E=i.rejected;async function M(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),x.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{x.default.fromBackend("Failed to update forward API key")}}async function R(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),x.default.success("Static headers updated")}catch{x.default.fromBackend("Failed to update static headers")}}async function G(t,a){if(e)try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),x.default.success("Forward client headers updated")}catch{x.default.fromBackend("Failed to update forward client headers")}}async function W(t){if(e)try{await (0,d.approveGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail approved")}catch{x.default.fromBackend("Failed to approve guardrail")}}async function X(t){if(e)try{await (0,d.rejectGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail rejected")}catch{x.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${L?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ee,{label:"Total Submitted",value:B,color:"text-gray-900"}),(0,t.jsx)(ee,{label:"Pending Review",value:F,color:"text-yellow-600"}),(0,t.jsx)(ee,{label:"Active",value:$,color:"text-green-600"}),(0,t.jsx)(ee,{label:"Rejected",value:E,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)(O.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 guardrails...",value:n,onChange:e=>o(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-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:c,onChange:e=>m(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none 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",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>k(!0),className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)(P.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[_&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),v&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:v}),!_&&!v&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!_&&!v&&l.map(e=>(0,t.jsx)(ea,{guardrail:e,isSelected:u===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>p(u===e.id?null:e.id),onToggleForwardKey:()=>M(e.id),onToggleHeaders:()=>{var t;return t=e.id,void h(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>y({id:e.id,action:"approve"}),onReject:()=>y({id:e.id,action:"reject"})},e.id))]})]}),L&&(0,t.jsx)(er,{guardrail:L,onClose:()=>p(null),onApprove:()=>y({id:L.id,action:"approve"}),onReject:()=>y({id:L.id,action:"reject"}),onToggleForwardKey:()=>M(L.id),onUpdateCustomHeaders:e=>R(L.id,e),onUpdateExtraHeaders:e=>G(L.id,e)}),f&&(0,t.jsx)(ei,{action:f.action,guardrailName:l.find(e=>e.id===f.id)?.name??"",onConfirm:()=>"approve"===f.action?W(f.id):X(f.id),onCancel:()=>y(null)}),(0,t.jsxs)(z.Modal,{title:"Submit Guardrail for Review",open:S,onCancel:()=>{k(!1),I.resetFields()},onOk:()=>I.submit(),okText:"Submit for Review",children:[(0,t.jsx)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800 mb-4",children:"Your guardrail will be sent for admin review before it becomes active."}),(0,t.jsxs)(D.Form,{form:I,layout:"vertical",initialValues:{mode:"pre_call"},onFinish:async e=>{let t={...e.extra_litellm_params?JSON.parse(e.extra_litellm_params):{},guardrail:"generic_guardrail_api",mode:e.mode,api_base:e.api_base};try{await A.mutateAsync({team_id:e.team_id,guardrail_name:e.guardrail_name,litellm_params:t,guardrail_info:e.guardrail_info?JSON.parse(e.guardrail_info):void 0}),x.default.success("Guardrail submitted for review"),k(!1),I.resetFields(),T()}catch{}},children:[(0,t.jsx)(D.Form.Item,{label:"Team",name:"team_id",rules:[{required:!0,message:"Select a team"}],children:(0,t.jsx)(H.default,{})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Enter a guardrail name"}],children:(0,t.jsx)(j.Input,{placeholder:"e.g. pii-detection"})}),(0,t.jsx)(D.Form.Item,{label:"Mode",name:"mode",rules:[{required:!0,message:"Select a mode"}],children:(0,t.jsxs)(K.Select,{children:[(0,t.jsx)(K.Select.Option,{value:"pre_call",children:"Pre Call"}),(0,t.jsx)(K.Select.Option,{value:"post_call",children:"Post Call"}),(0,t.jsx)(K.Select.Option,{value:"during_call",children:"During Call"})]})}),(0,t.jsx)(D.Form.Item,{label:"API Base URL",name:"api_base",rules:[{required:!0,message:"Enter the API base URL"},{type:"url",message:"Must be a valid URL"}],children:(0,t.jsx)(j.Input,{placeholder:"https://your-guardrail-api.com/v1/check",className:"font-mono"})}),(0,t.jsx)(D.Form.Item,{label:"Additional litellm_params (optional)",name:"extra_litellm_params",tooltip:"JSON object merged into litellm_params. e.g. forward_api_key, headers, model, unreachable_fallback",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if("object"!=typeof e||Array.isArray(e))return Promise.reject("Must be a JSON object");return Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"forward_api_key": true, "headers": {"X-Custom": "value"}}'})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Info (optional)",name:"guardrail_info",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"description": "Detects PII in requests"}'})})]})]})]})}e.s(["default",0,({accessToken:e,userRole:j})=>{let[_,b]=(0,a.useState)([]),[v,w]=(0,a.useState)(!1),[N,C]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[I,O]=(0,a.useState)(!1),[P,T]=(0,a.useState)(null),[L,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),E=!!j&&(0,u.isAdminRole)(j),M=async()=>{if(e){k(!0);try{let t=await (0,d.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),b(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{k(!1)}}};(0,a.useEffect)(()=>{M()},[e]);let R=()=>{M()},G=async()=>{if(P&&e){O(!0);try{await (0,d.deleteGuardrailCall)(e,P.guardrail_id),x.default.success(`Guardrail "${P.guardrail_name}" deleted successfully`),await M()}catch(e){console.error("Error deleting guardrail:",e),x.default.fromBackend("Failed to delete guardrail")}finally{O(!1),B(!1),T(null)}}},z=P&&P.litellm_params?(0,f.getGuardrailLogoAndName)(P.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsx)(i.Tabs,{defaultActiveKey:"submitted",items:[...E?[{key:"garden",label:"Guardrail Garden",children:(0,t.jsx)(A,{accessToken:e,onGuardrailCreated:R})},{key:"guardrails",label:"Guardrails",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(r.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(n.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{F&&$(null),w(!0)}},{key:"custom_code",icon:(0,t.jsx)(o.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{F&&$(null),C(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(s.DownOutlined,{className:"ml-2"})]})})}),F?(0,t.jsx)(p.default,{guardrailId:F,onClose:()=>$(null),accessToken:e,isAdmin:E}):(0,t.jsx)(m.default,{guardrailsList:_,isLoading:S,onDeleteClick:(e,t)=>{T(_.find(t=>t.guardrail_id===e)||null),B(!0)},accessToken:e,onGuardrailUpdated:M,isAdmin:E,onGuardrailClick:e=>$(e)}),(0,t.jsx)(c.default,{visible:v,onClose:()=>{w(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(y.CustomCodeModal,{visible:N,onClose:()=>{C(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(h.default,{isOpen:L,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${P?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:P?.guardrail_name},{label:"ID",value:P?.guardrail_id,code:!0},{label:"Provider",value:z},{label:"Mode",value:P?.litellm_params.mode},{label:"Default On",value:P?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{B(!1),T(null)},onOk:G,confirmLoading:I})]})},{key:"playground",label:"Test Playground",disabled:!e,children:(0,t.jsx)(g.default,{guardrailsList:_,isLoading:S,accessToken:e,onClose:()=>{}})}]:[],{key:"submitted",label:"Submitted Guardrails",children:(0,t.jsx)(es,{accessToken:e})}]})})}],487304)}]); \ No newline at end of file + `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let o,[d,g]=(0,m.useState)(null),[x,h]=(0,m.useState)(null),[f,y]=(0,m.useState)(!0),[j,_]=(0,m.useState)(!1),[b]=r.Form.useForm(),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(null),[I,A]=(0,m.useState)({}),[O,P]=(0,m.useState)(!1),T={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[L,B]=(0,m.useState)(T),[F,$]=(0,m.useState)(!1),[E,M]=(0,m.useState)(!1),R=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),G=(0,m.useCallback)((e,t,a,l,r)=>{R.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(y(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(g(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(w([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),w(t),C(a)}}else w([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{y(!1)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);h(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},K=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);k(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{D()},[a]),(0,m.useEffect)(()=>{z(),K()},[e,a]),(0,m.useEffect)(()=>{if(d&&b){let e={...d.litellm_params||{}};delete e.skip_system_message_in_guardrail,b.setFieldsValue({guardrail_name:d.guardrail_name,...e,skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}})}},[d,x,b]);let q=(0,m.useCallback)(()=>{d?.litellm_params?.guardrail==="tool_permission"?B({rules:d.litellm_params?.rules||[],default_action:(d.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:d.litellm_params?.violation_message_template||""}):B(T),$(!1)},[d]);(0,m.useEffect)(()=>{q()},[q]);let H=async t=>{try{if(!a)return;let o={litellm_params:{}};t.guardrail_name!==d.guardrail_name&&(o.guardrail_name=t.guardrail_name),t.default_on!==d.litellm_params?.default_on&&(o.litellm_params.default_on=t.default_on);let c=ec(d.litellm_params?.skip_system_message_in_guardrail),m=t.skip_system_message_choice;void 0!==m&&m!==c&&("inherit"===m?o.litellm_params.skip_system_message_in_guardrail=null:"yes"===m?o.litellm_params.skip_system_message_in_guardrail=!0:o.litellm_params.skip_system_message_in_guardrail=!1);let g=d.guardrail_info,h=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(g)!==JSON.stringify(h)&&(o.guardrail_info=h);let f=d.litellm_params?.pii_entities_config||{},y={};if(v.forEach(e=>{y[e]=N[e]||"MASK"}),JSON.stringify(f)!==JSON.stringify(y)&&(o.litellm_params.pii_entities_config=y),d.litellm_params?.guardrail==="litellm_content_filter"&&O){var l,r,i,s,n;let e,t=(l=R.current.patterns||[],r=R.current.blockedWords||[],i=R.current.categories||[],s=R.current.competitorIntentEnabled,n=R.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);o.litellm_params.patterns=t.patterns,o.litellm_params.blocked_words=t.blocked_words,o.litellm_params.categories=t.categories,o.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(d.litellm_params?.guardrail==="tool_permission"){let e=d.litellm_params?.rules||[],t=L.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(d.litellm_params?.default_action||"deny").toLowerCase(),r=(L.default_action||"deny").toLowerCase(),i=l!==r,s=(d.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(L.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=d.litellm_params?.violation_message_template||"",u=L.violation_message_template||"",p=m!==u;(F||a||i||c||p)&&(o.litellm_params.rules=t,o.litellm_params.default_action=r,o.litellm_params.on_disallowed_action=n,o.litellm_params.violation_message_template=u||null)}let j=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",j);let b=d.litellm_params?.guardrail==="tool_permission";if(x&&j&&!b){let e=x[ea[j]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=d.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?o.litellm_params[e]=a:null!=l&&""!==l&&(o.litellm_params[e]=null))})}if(0===Object.keys(o.litellm_params).length&&delete o.litellm_params,0===Object.keys(o).length){u.default.info("No changes detected"),_(!1);return}await (0,p.updateGuardrailCall)(a,e,o),u.default.success("Guardrail updated successfully"),P(!1),z(),_(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(f)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let J=e=>e?new Date(e).toLocaleString():"-",{logo:U,displayName:W}=ed(d.litellm_params?.guardrail||""),V=async(e,t)=>{await (0,tn.copyToClipboard)(e)&&(A(e=>({...e,[t]:!0})),setTimeout(()=>{A(e=>({...e,[t]:!1}))},2e3))},Y="config"===d.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(td.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(th.Title,{children:d.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eR.Text,{className:"text-gray-500 font-mono",children:d.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:I["guardrail-id"]?(0,l.jsx)(tf.CheckIcon,{size:12}):(0,l.jsx)(ty.CopyIcon,{size:12}),onClick:()=>V(d.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${I["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tu.TabGroup,{children:[(0,l.jsxs)(tp.TabList,{className:"mb-4",children:[(0,l.jsx)(tm.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(tm.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tx.TabPanels,{children:[(0,l.jsxs)(tg.TabPanel,{children:[(0,l.jsxs)(tc.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[U&&(0,l.jsx)("img",{src:U,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(th.Title,{children:W})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:d.litellm_params?.mode||"-"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eM.Card,{children:[(0,l.jsx)(eR.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(th.Title,{children:J(d.created_at)}),(0,l.jsxs)(eR.Text,{children:["Last Updated: ",J(d.updated_at)]})]})]})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsx)(eR.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eR.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(d.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eR.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eR.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(eN.default,{}):(0,l.jsx)(eC.StopOutlined,{}),String(t)]})})]},e))})]})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eM.Card,{className:"mt-6",children:(0,l.jsx)(eq,{value:L,disabled:!0})}),d.litellm_params?.guardrail==="custom_code"&&d.litellm_params?.custom_code&&(0,l.jsxs)(eM.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(to.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eR.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!Y&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:d.litellm_params.custom_code})})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(tg.TabPanel,{children:(0,l.jsxs)(eM.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(th.Title,{children:"Guardrail Settings"}),Y&&(0,l.jsx)(ej.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eD.InfoCircleOutlined,{})}),!j&&!Y&&(d.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(to.CodeOutlined,{}),onClick:()=>M(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>_(!0),children:"Edit Settings"}))]}),j?(0,l.jsxs)(r.Form,{form:b,onFinish:H,initialValues:{guardrail_name:d.guardrail_name,...(o={...d.litellm_params||{}},delete o.skip_system_message_in_guardrail,o),skip_system_message_choice:ec(d.litellm_params?.skip_system_message_in_guardrail),guardrail_info:d.guardrail_info?JSON.stringify(d.guardrail_info,null,2):"",...d.litellm_params?.optional_params&&{optional_params:d.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),(0,l.jsx)(r.Form.Item,{label:"Skip system messages in guardrail",name:"skip_system_message_choice",tooltip:"Unified guardrails: omit role: system from guardrail input (LLM still gets full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),d.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eG.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:S&&(0,l.jsx)(eE,{entities:S.supported_entities,actions:S.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:S.pii_entity_categories})})]}),(0,l.jsx)(tC,{guardrailData:d,guardrailSettings:S,isEditing:!0,accessToken:a,onDataChange:G,onUnsavedChanges:P}),(d.litellm_params?.guardrail==="tool_permission"||x)&&(0,l.jsx)(eG.Divider,{orientation:"left",children:"Provider Settings"}),d.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eq,{value:L,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ey,{selectedProvider:Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail)||null,accessToken:a,providerParams:x,value:d.litellm_params}),x&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===d.litellm_params?.guardrail);if(!e)return null;let t=x[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(ex,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:d.litellm_params}):null})()]}),(0,l.jsx)(eG.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{_(!1),P(!1),q()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:d.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:d.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e7.Badge,{color:d.litellm_params?.default_on?"green":"gray",children:d.litellm_params?.default_on?"Yes":"No"})]}),d.litellm_params?.pii_entities_config&&Object.keys(d.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e7.Badge,{color:"blue",children:[Object.keys(d.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:J(d.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eR.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:J(d.updated_at)})]}),d.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eq,{value:L,disabled:!0})]})]})})]})]}),(0,l.jsx)(tG,{visible:E,onClose:()=>M(!1),onSuccess:()=>{M(!1),z()},accessToken:a,editData:d?{guardrail_id:d.guardrail_id,guardrail_name:d.guardrail_name,litellm_params:d.litellm_params}:null})]})}],969641);var tz=e.i(573421),tD=e.i(19732),tK=e.i(928685),tq=e.i(166406),tH=e.i(637235),tJ=e.i(755151),tU=e.i(240647);let{Text:tW}=d.Typography,tV=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tk.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tH.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tq.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eM.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tU.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tJ.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tH.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tY}=i.Input,{Text:tQ}=d.Typography,tX=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=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 a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ej.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eD.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(e4.Button,{size:"xs",variant:"secondary",icon:tq.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tY,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tQ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(e4.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tV,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[s,n]=(0,m.useState)(new Set),[o,c]=(0,m.useState)(""),[g,x]=(0,m.useState)([]),[f,y]=(0,m.useState)([]),[j,_]=(0,m.useState)(!1),b=e.filter(e=>e.guardrail_name?.toLowerCase().includes(o.toLowerCase())),v=async e=>{if(0===s.size||!a)return;_(!0),x([]),y([]);let t=[],l=[];await Promise.all(Array.from(s).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),x(t),y(l),_(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(h.Card,{className:"h-full",styles:{body:{padding:0,height:"100%"}},children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(i.Input,{prefix:(0,l.jsx)(tK.SearchOutlined,{}),placeholder:"Search guardrails...",value:o,onChange:e=>c(e.target.value)})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(eh.Spin,{})}):0===b.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(ez.Empty,{description:o?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(tz.List,{dataSource:b,renderItem:e=>(0,l.jsx)(tz.List.Item,{onClick:()=>{var t;let a;e.guardrail_name&&(t=e.guardrail_name,(a=new Set(s)).has(t)?a.delete(t):a.add(t),n(a))},style:{paddingLeft:24,paddingRight:16},className:`cursor-pointer hover:bg-gray-50 transition-colors ${s.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(tz.List.Item.Meta,{title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tD.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(d.Typography.Text,{className:"text-xs text-gray-600",children:[s.size," of ",b.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(d.Typography.Title,{level:2,className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===s.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tD.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(d.Typography.Paragraph,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tX,{guardrailNames:Array.from(s),onSubmit:v,results:g.length>0?g:null,errors:f.length>0?f:null,isLoading:j,onClose:()=>n(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tG],64352);let tZ="../ui/assets/logos/",t0=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tZ}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tZ}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tZ}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tZ}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tZ}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tZ}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tZ}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tZ}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tZ}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tZ}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tZ}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tZ}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tZ}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tZ}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tZ}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tZ}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tZ}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tZ}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tZ}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tZ}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tZ}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tZ}akto.svg`,tags:["Security","Safety","Monitoring"]},{id:"promptguard",name:"PromptGuard",description:"AI security gateway with prompt injection detection, PII redaction, topic filtering, entity blocklists, and hallucination detection. Self-hostable with drop-in proxy integration.",category:"partner",logo:`${tZ}promptguard.svg`,tags:["Security","Prompt Injection","PII"],providerKey:"Promptguard",eval:{f1:94.9,precision:100,recall:90.4,testCases:5384,latency:"~150ms"}},{id:"xecguard",name:"XecGuard",description:"CyCraft XecGuard AI security gateway. Multi-policy scanning (prompt injection, harmful content, PII, system-prompt enforcement) plus RAG context grounding.",category:"partner",logo:`${tZ}xecguard.svg`,tags:["Security","Policy","Grounding","RAG"],providerKey:"Xecguard"}];e.s(["ALL_CARDS",0,t0],230312)},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(464571),r=e.i(326373),i=e.i(653496),s=e.i(755151),n=e.i(646563),o=e.i(245094),d=e.i(764205),c=e.i(185357),m=e.i(782719),u=e.i(708347),p=e.i(969641),g=e.i(476993),x=e.i(727749),h=e.i(127952),f=e.i(180766);e.i(824296);var y=e.i(64352),j=e.i(311451),_=e.i(928685),b=e.i(266537),v=e.i(230312),w=e.i(826910);let N=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},C=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(N,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(w.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var S=e.i(447566);let k={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1},promptguard:{provider:"Promptguard",guardrailNameSuggestion:"PromptGuard",mode:"pre_call",defaultOn:!1},xecguard:{provider:"Xecguard",guardrailNameSuggestion:"XecGuard",mode:"pre_call",defaultOn:!1}},I=({card:e,onBack:r,accessToken:i,onGuardrailCreated:s})=>{let[n,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)("overview"),u=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],p=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],g=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:r,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(S.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(l.Button,{onClick:()=>o(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:g.map(e=>(0,t.jsx)("div",{onClick:()=>m(e.key),style:{padding:"12px 20px",fontSize:14,color:d===e.key?"#1a73e8":"#5f6368",borderBottom:d===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:d===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===d&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:u.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===d&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:p.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(c.default,{visible:n,onClose:()=>o(!1),accessToken:i,onSuccess:()=>{o(!1),s()},preset:k[e.id]})]})},A=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=v.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(I,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(j.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(_.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(C,{card:e,onClick:()=>n(e)},e.id))})]})]})};var O=e.i(988846),P=e.i(837007),T=e.i(409797),L=e.i(54131),B=e.i(995926),F=e.i(678784),$=e.i(634831),E=e.i(438100),M=e.i(302202),R=e.i(328196),G=e.i(879664);e.s(["InfoIcon",()=>G.default],168118);var G=G,z=e.i(212931),D=e.i(808613),K=e.i(199133),q=e.i(663435),H=e.i(954616),J=e.i(912598),U=e.i(135214),W=e.i(243652);let V=async(e,t)=>{let a=(0,d.getProxyBaseUrl)(),l=`${a}/guardrails/register`,r=await fetch(l,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){let e=await r.json().catch(()=>({})),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return r.json()},Y=(0,W.createQueryKeys)("guardrails");function Q(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt: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),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let X={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{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"}},Z={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function ee({label:e,value:a,color:l}){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 ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function et({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function ea({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=X[e.status],c=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,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.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(M.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,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:o,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,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function el({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function er({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=X[e.status],y=Z[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(B.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(el,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)($.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(el,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(E.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(et,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(B.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(L.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(T.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(G.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)($.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(F.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(B.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ei({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="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 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(F.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(R.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,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,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function es({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[c,m]=(0,a.useState)("all"),[u,p]=(0,a.useState)(null),[g,h]=(0,a.useState)(new Set),[f,y]=(0,a.useState)(null),[_,b]=(0,a.useState)(!0),[v,w]=(0,a.useState)(null),[N,C]=(0,a.useState)(""),[S,k]=(0,a.useState)(!1),[I]=D.Form.useForm(),A=(()=>{let{accessToken:e}=(0,U.default)(),t=(0,J.useQueryClient)();return(0,H.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return V(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:Y.all})}})})();(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let T=(0,a.useCallback)(async()=>{if(!e)return void b(!1);b(!0),w(null);try{let t="all"===c?void 0:"pending"===c?"pending_review":c,a=await (0,d.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(Q)),s(a.summary)}catch(e){w(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{b(!1)}},[e,c,N]);(0,a.useEffect)(()=>{T()},[T]);let L=l.find(e=>e.id===u)??null,B=i.total,F=i.pending_review,$=i.active,E=i.rejected;async function M(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),x.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{x.default.fromBackend("Failed to update forward API key")}}async function R(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),x.default.success("Static headers updated")}catch{x.default.fromBackend("Failed to update static headers")}}async function G(t,a){if(e)try{await (0,d.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),x.default.success("Forward client headers updated")}catch{x.default.fromBackend("Failed to update forward client headers")}}async function W(t){if(e)try{await (0,d.approveGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail approved")}catch{x.default.fromBackend("Failed to approve guardrail")}}async function X(t){if(e)try{await (0,d.rejectGuardrailSubmission)(e,t),y(null),u===t&&p(null),await T(),x.default.success("Guardrail rejected")}catch{x.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${L?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ee,{label:"Total Submitted",value:B,color:"text-gray-900"}),(0,t.jsx)(ee,{label:"Pending Review",value:F,color:"text-yellow-600"}),(0,t.jsx)(ee,{label:"Active",value:$,color:"text-green-600"}),(0,t.jsx)(ee,{label:"Rejected",value:E,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)(O.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 guardrails...",value:n,onChange:e=>o(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-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:c,onChange:e=>m(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none 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",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>k(!0),className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)(P.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[_&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),v&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:v}),!_&&!v&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!_&&!v&&l.map(e=>(0,t.jsx)(ea,{guardrail:e,isSelected:u===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>p(u===e.id?null:e.id),onToggleForwardKey:()=>M(e.id),onToggleHeaders:()=>{var t;return t=e.id,void h(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>y({id:e.id,action:"approve"}),onReject:()=>y({id:e.id,action:"reject"})},e.id))]})]}),L&&(0,t.jsx)(er,{guardrail:L,onClose:()=>p(null),onApprove:()=>y({id:L.id,action:"approve"}),onReject:()=>y({id:L.id,action:"reject"}),onToggleForwardKey:()=>M(L.id),onUpdateCustomHeaders:e=>R(L.id,e),onUpdateExtraHeaders:e=>G(L.id,e)}),f&&(0,t.jsx)(ei,{action:f.action,guardrailName:l.find(e=>e.id===f.id)?.name??"",onConfirm:()=>"approve"===f.action?W(f.id):X(f.id),onCancel:()=>y(null)}),(0,t.jsxs)(z.Modal,{title:"Submit Guardrail for Review",open:S,onCancel:()=>{k(!1),I.resetFields()},onOk:()=>I.submit(),okText:"Submit for Review",children:[(0,t.jsx)("div",{className:"rounded-md bg-blue-50 border border-blue-200 px-4 py-3 text-sm text-blue-800 mb-4",children:"Your guardrail will be sent for admin review before it becomes active."}),(0,t.jsxs)(D.Form,{form:I,layout:"vertical",initialValues:{mode:"pre_call"},onFinish:async e=>{let t={...e.extra_litellm_params?JSON.parse(e.extra_litellm_params):{},guardrail:"generic_guardrail_api",mode:e.mode,api_base:e.api_base};try{await A.mutateAsync({team_id:e.team_id,guardrail_name:e.guardrail_name,litellm_params:t,guardrail_info:e.guardrail_info?JSON.parse(e.guardrail_info):void 0}),x.default.success("Guardrail submitted for review"),k(!1),I.resetFields(),T()}catch{}},children:[(0,t.jsx)(D.Form.Item,{label:"Team",name:"team_id",rules:[{required:!0,message:"Select a team"}],children:(0,t.jsx)(q.default,{})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Enter a guardrail name"}],children:(0,t.jsx)(j.Input,{placeholder:"e.g. pii-detection"})}),(0,t.jsx)(D.Form.Item,{label:"Mode",name:"mode",rules:[{required:!0,message:"Select a mode"}],children:(0,t.jsxs)(K.Select,{children:[(0,t.jsx)(K.Select.Option,{value:"pre_call",children:"Pre Call"}),(0,t.jsx)(K.Select.Option,{value:"post_call",children:"Post Call"}),(0,t.jsx)(K.Select.Option,{value:"during_call",children:"During Call"})]})}),(0,t.jsx)(D.Form.Item,{label:"API Base URL",name:"api_base",rules:[{required:!0,message:"Enter the API base URL"},{type:"url",message:"Must be a valid URL"}],children:(0,t.jsx)(j.Input,{placeholder:"https://your-guardrail-api.com/v1/check",className:"font-mono"})}),(0,t.jsx)(D.Form.Item,{label:"Additional litellm_params (optional)",name:"extra_litellm_params",tooltip:"JSON object merged into litellm_params. e.g. forward_api_key, headers, model, unreachable_fallback",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{let e=JSON.parse(t);if("object"!=typeof e||Array.isArray(e))return Promise.reject("Must be a JSON object");return Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"forward_api_key": true, "headers": {"X-Custom": "value"}}'})}),(0,t.jsx)(D.Form.Item,{label:"Guardrail Info (optional)",name:"guardrail_info",rules:[{validator:(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch{return Promise.reject("Invalid JSON")}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:3,className:"font-mono text-xs",placeholder:'{"description": "Detects PII in requests"}'})})]})]})]})}e.s(["default",0,({accessToken:e,userRole:j})=>{let[_,b]=(0,a.useState)([]),[v,w]=(0,a.useState)(!1),[N,C]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[I,O]=(0,a.useState)(!1),[P,T]=(0,a.useState)(null),[L,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),E=!!j&&(0,u.isAdminRole)(j),M=async()=>{if(e){k(!0);try{let t=await (0,d.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),b(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{k(!1)}}};(0,a.useEffect)(()=>{M()},[e]);let R=()=>{M()},G=async()=>{if(P&&e){O(!0);try{await (0,d.deleteGuardrailCall)(e,P.guardrail_id),x.default.success(`Guardrail "${P.guardrail_name}" deleted successfully`),await M()}catch(e){console.error("Error deleting guardrail:",e),x.default.fromBackend("Failed to delete guardrail")}finally{O(!1),B(!1),T(null)}}},z=P&&P.litellm_params?(0,f.getGuardrailLogoAndName)(P.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsx)(i.Tabs,{defaultActiveKey:"submitted",items:[...E?[{key:"garden",label:"Guardrail Garden",children:(0,t.jsx)(A,{accessToken:e,onGuardrailCreated:R})},{key:"guardrails",label:"Guardrails",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(r.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(n.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{F&&$(null),w(!0)}},{key:"custom_code",icon:(0,t.jsx)(o.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{F&&$(null),C(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(s.DownOutlined,{className:"ml-2"})]})})}),F?(0,t.jsx)(p.default,{guardrailId:F,onClose:()=>$(null),accessToken:e,isAdmin:E}):(0,t.jsx)(m.default,{guardrailsList:_,isLoading:S,onDeleteClick:(e,t)=>{T(_.find(t=>t.guardrail_id===e)||null),B(!0)},accessToken:e,onGuardrailUpdated:M,isAdmin:E,onGuardrailClick:e=>$(e)}),(0,t.jsx)(c.default,{visible:v,onClose:()=>{w(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(y.CustomCodeModal,{visible:N,onClose:()=>{C(!1)},accessToken:e,onSuccess:R}),(0,t.jsx)(h.default,{isOpen:L,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${P?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:P?.guardrail_name},{label:"ID",value:P?.guardrail_id,code:!0},{label:"Provider",value:z},{label:"Mode",value:P?.litellm_params.mode},{label:"Default On",value:P?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{B(!1),T(null)},onOk:G,confirmLoading:I})]})},{key:"playground",label:"Test Playground",disabled:!e,children:(0,t.jsx)(g.default,{guardrailsList:_,isLoading:S,accessToken:e,onClose:()=>{}})}]:[],{key:"submitted",label:"Submitted Guardrails",children:(0,t.jsx)(es,{accessToken:e})}]})})}],487304)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3f8f8f2ea9713f7b.js b/litellm/proxy/_experimental/out/_next/static/chunks/3f8f8f2ea9713f7b.js deleted file mode 100644 index eec95de086..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/3f8f8f2ea9713f7b.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,910119,e=>{"use strict";var s=e.i(843476),t=e.i(197647),l=e.i(653824),a=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),x=e.i(199133),h=e.i(28651),g=e.i(175712),p=e.i(770914),j=e.i(536916),f=e.i(764205),b=e.i(827252),y=e.i(994388),_=e.i(35983),v=e.i(779241),S=e.i(78085),N=e.i(808613),C=e.i(592968),T=e.i(708347),w=e.i(860585),k=e.i(355619),I=e.i(435451);function U({userData:e,onCancel:t,onSubmit:l,teams:a,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=N.Form.useForm(),[h,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let s=e.user_info?.max_budget,t=null==s;g(t),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:t?"":s,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,s.jsxs)(N.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(h||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),l(e)},layout:"vertical",children:[!u&&(0,s.jsx)(N.Form.Item,{label:"User ID",name:"user_id",children:(0,s.jsx)(v.TextInput,{disabled:!0})}),!u&&(0,s.jsx)(N.Form.Item,{label:"Email",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Alias",name:"user_alias",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Global Proxy Role"," ",(0,s.jsx)(C.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,s.jsx)(b.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,s.jsx)(x.Select,{children:c&&Object.entries(c).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Personal Models"," ",(0,s.jsx)(C.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,s.jsx)(b.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(x.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!T.all_admin_roles.includes(d||""),children:[(0,s.jsx)(x.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,s.jsx)(x.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,s.jsx)("span",{children:"Max Budget (USD)"}),(0,s.jsx)(j.Checkbox,{checked:h,onChange:e=>{let s=e.target.checked;g(s),s&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,s)=>h||""!==s&&null!=s?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,s.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:h})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(w.default,{})}),(0,s.jsx)(N.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,s.jsx)(y.Button,{variant:"secondary",type:"button",onClick:t,children:"Cancel"}),(0,s.jsx)(y.Button,{type:"submit",children:"Save Changes"})]})]})}var B=e.i(727749),A=e.i(888259);let{Text:D,Title:F}=c.Typography,R=({open:e,onCancel:t,selectedUsers:l,possibleUIRoles:a,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:b,allowAllUsers:y=!1})=>{let[_,v]=(0,n.useState)(!1),[S,N]=(0,n.useState)([]),[C,T]=(0,n.useState)(null),[w,k]=(0,n.useState)(!1),[I,R]=(0,n.useState)(!1),O=()=>{N([]),T(null),k(!1),R(!1),t()},E=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),P=async e=>{if(console.log("formValues",e),!r)return void B.default.fromBackend("Access token not found");v(!0);try{let s=l.map(e=>e.user_id),a={};e.user_role&&""!==e.user_role&&(a.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(a.max_budget=e.max_budget),e.models&&e.models.length>0&&(a.models=e.models),e.budget_duration&&""!==e.budget_duration&&(a.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(a.metadata=e.metadata);let n=Object.keys(a).length>0,d=w&&S.length>0;if(!n&&!d)return void B.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,f.userBulkUpdateUserCall)(r,a,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,f.userBulkUpdateUserCall)(r,a,s),o.push(`Updated ${s.length} user(s)`);if(d){let e=[];for(let s of S)try{let t=null;t=I?null:l.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let a=await (0,f.teamBulkMemberAddCall)(r,s,t||null,C||void 0,I);console.log("result",a),e.push({teamId:s,success:!0,successfulAdditions:a.successful_additions,failedAdditions:a.failed_additions})}catch(t){console.error(`Failed to add users to team ${s}:`,t),e.push({teamId:s,success:!1,error:t})}let s=e.filter(e=>e.success),t=e.filter(e=>!e.success);if(s.length>0){let e=s.reduce((e,s)=>e+s.successfulAdditions,0);o.push(`Added users to ${s.length} team(s) (${e} total additions)`)}t.length>0&&A.default.warning(`Failed to add users to ${t.length} team(s)`)}o.length>0&&B.default.success(o.join(". ")),N([]),T(null),k(!1),R(!1),i(),t()}catch(e){console.error("Bulk operation failed:",e),B.default.fromBackend("Failed to perform bulk operations")}finally{v(!1)}};return(0,s.jsxs)(o.Modal,{open:e,onCancel:O,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${l.length} User(s)`,width:800,children:[y&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(j.Checkbox,{checked:I,onChange:e=>R(e.target.checked),children:(0,s.jsx)(D,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,s.jsx)("div",{style:{marginTop:8},children:(0,s.jsx)(D,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)(F,{level:5,children:["Selected Users (",l.length,"):"]}),(0,s.jsx)(m.Table,{size:"small",bordered:!0,dataSource:l,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,s.jsx)(D,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:a?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,s.jsx)(u.Divider,{}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsxs)(D,{children:[(0,s.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,s.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,s.jsxs)(p.Space,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(j.Checkbox,{checked:w,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Select Teams:"}),(0,s.jsx)(x.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:N,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Team Budget (Optional):"}),(0,s.jsx)(h.InputNumber,{placeholder:"Max budget per user in team",value:C,onChange:e=>T(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,s.jsx)(U,{userData:E,onCancel:O,onSubmit:P,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:b,possibleUIRoles:a,isBulkEdit:!0}),_&&(0,s.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,s.jsxs)(D,{children:["Updating ",I?"all users":l.length," user(s)..."]})})]})};var O=e.i(371455);let E=({visible:e,possibleUIRoles:t,onCancel:l,user:a,onSubmit:r})=>{let[i,c]=(0,n.useState)(a),[u]=N.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[a]);let m=async()=>{u.resetFields(),l()},g=async e=>{r(e),u.resetFields(),l()};return a?(0,s.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+a.user_id,width:1e3,children:(0,s.jsx)(N.Form,{form:u,onFinish:g,initialValues:a,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Role",name:"user_role",children:(0,s.jsx)(x.Select,{children:t&&Object.entries(t).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,s.jsx)(h.InputNumber,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,s.jsx)(I.default,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(w.default,{})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var P=e.i(172372),L=e.i(500330),M=e.i(152473),z=e.i(266027),$=e.i(912598),K=e.i(127952),V=e.i(304967),G=e.i(629569),q=e.i(599724),W=e.i(114600),H=e.i(482725),J=e.i(790848),Q=e.i(646563),Y=e.i(955135);let X=({accessToken:e,possibleUIRoles:t,userID:l,userRole:a})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[p,j]=(0,n.useState)({}),[b,y]=(0,n.useState)(!1),[_,S]=(0,n.useState)([]),{Paragraph:N}=c.Typography,{Option:C}=x.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let s=await (0,f.getInternalUserSettings)(e);if(u(s),j(s.values||{}),e)try{let s=await (0,f.modelAvailableCall)(e,l,a);if(s&&s.data){let e=s.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),B.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let T=async()=>{if(e){y(!0);try{let s=Object.entries(p).reduce((e,[s,t])=>(e[s]=""===t?null:t,e),{}),t=await (0,f.updateInternalUserSettings)(e,s);u({...o,values:t.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),B.default.fromBackend("Failed to update settings: "+e)}finally{y(!1)}}},I=(e,s)=>{j(t=>({...t,[e]:s}))},U=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(H.Spin,{size:"large"})}):o?(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:()=>{g(!1),j(o.values||{})},disabled:b,children:"Cancel"}),(0,s.jsx)(d.Button,{type:"primary",onClick:T,loading:b,children:"Save Changes"})]}):(0,s.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,s.jsx)(N,{className:"mb-4",children:o.field_schema.description}),(0,s.jsx)(W.Divider,{}),(0,s.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:l}=o;return l&&l.properties?Object.entries(l.properties).map(([l,a])=>{let r=e[l],i=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,s.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,s.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,s.jsx)(N,{className:"text-sm text-gray-500 mt-1",children:a.description||"No description available"}),m?(0,s.jsx)("div",{className:"mt-2",children:((e,l,a)=>{let r=l.type;if("teams"===e){let t,l;return(0,s.jsx)("div",{className:"mt-2",children:(t=U(p[e]||[]),l=(e,s,l)=>{let a=[...t];a[e]={...a[e],[s]:l},I("teams",a)},(0,s.jsxs)("div",{className:"space-y-3",children:[t.map((e,a)=>(0,s.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)(q.Text,{className:"font-medium",children:["Team ",a+1]}),(0,s.jsx)(d.Button,{size:"small",danger:!0,icon:(0,s.jsx)(Y.DeleteOutlined,{}),onClick:()=>{I("teams",t.filter((e,s)=>s!==a))},children:"Remove"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,s.jsx)(v.TextInput,{value:e.team_id,onChange:e=>l(a,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,s.jsx)(h.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>l(a,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,s.jsxs)(x.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>l(a,"user_role",e),children:[(0,s.jsx)(C,{value:"user",children:"User"}),(0,s.jsx)(C,{value:"admin",children:"Admin"})]})]})]})]},a)),(0,s.jsx)(d.Button,{icon:(0,s.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...t,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&t)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:Object.entries(t).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(C,{value:e,children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{children:t}),(0,s.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:l})]})},e))});if("budget_duration"===e)return(0,s.jsx)(w.default,{value:p[e]||null,onChange:s=>I(e,s),className:"mt-2"});if("boolean"===r)return(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(J.Switch,{checked:!!p[e],onChange:s=>I(e,s)})});if("array"===r&&l.items?.enum)return(0,s.jsx)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:l.items.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else if("models"===e)return(0,s.jsxs)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:[(0,s.jsx)(C,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,s.jsx)(C,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),_.map(e=>(0,s.jsx)(C,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&l.enum)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:l.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else return(0,s.jsx)(v.TextInput,{value:void 0!==p[e]?String(p[e]):"",onChange:s=>I(e,s.target.value),placeholder:l.description||"",className:"mt-2"})})(l,a,0)}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,l)=>{if(null==l)return(0,s.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(l)){if(0===l.length)return(0,s.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=U(l);return(0,s.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,t)=>(0,s.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,s.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,s.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,L.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,s.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},t))})}if("user_role"===e&&t&&t[l]){let{ui_label:e,description:a}=t[l];return(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium",children:e}),a&&(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:a})]})}if("budget_duration"===e)return(0,s.jsx)("span",{children:(0,w.getBudgetDurationLabel)(l)});if("boolean"==typeof l)return(0,s.jsx)("span",{children:l?"Enabled":"Disabled"});if("models"===e&&Array.isArray(l))return 0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},t))});if("object"==typeof l)return Array.isArray(l)?0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},t))}):(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(l,null,2)});return(0,s.jsx)("span",{children:String(l)})})(l,r)})]},l)}):(0,s.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,s.jsx)(V.Card,{children:(0,s.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var Z=e.i(389083),ee=e.i(350967),es=e.i(752978),et=e.i(262218),el=e.i(591935),ea=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,t,l,a,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(C.Tooltip,{title:e.original.user_id,children:(0,s.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,s.jsx)(C.Tooltip,{title:"Copy User ID",children:(0,s.jsx)(en.CopyOutlined,{onClick:s=>{s.stopPropagation(),(0,L.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>{let t;return(t=e.original.metadata)&&"object"==typeof t&&!1===t.scim_active?(0,s.jsx)(C.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,s.jsx)(et.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,s.jsx)(et.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})}},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:t})=>(0,s.jsx)("span",{className:"text-xs",children:e?.[t.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.spend?(0,L.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{children:"SSO ID"}),(0,s.jsx)(C.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,s.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,s.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,s.jsxs)(Z.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,s.jsx)(Z.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(C.Tooltip,{title:"Edit user details",children:(0,s.jsx)(es.Icon,{icon:el.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,s.jsx)(C.Tooltip,{title:"Delete user",children:(0,s.jsx)(es.Icon,{icon:ea.TrashIcon,size:"sm",onClick:()=>l(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,s.jsx)(C.Tooltip,{title:"Reset Password",children:(0,s.jsx)(es.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>a(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:t,isUserSelected:l,isAllSelected:a,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,s.jsx)(j.Checkbox,{indeterminate:r,checked:a,onChange:e=>t(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:t})=>(0,s.jsx)(j.Checkbox,{checked:l(t.original),onChange:s=>e(t.original,s.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),ex=e.i(64848),eh=e.i(942232),eg=e.i(496020),ep=e.i(977572),ej=e.i(206929),ef=e.i(94629),eb=e.i(360820),ey=e.i(871943),e_=e.i(981339),ev=e.i(530212),eS=e.i(988297),eN=e.i(118366),eC=e.i(678784);function eT({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:h,possibleUIRoles:g,initialTab:p=0,startInEditMode:j=!1}){let[b,_]=(0,n.useState)(null),[v,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[A,D]=(0,n.useState)(!1),[F,R]=(0,n.useState)(!0),[O,E]=(0,n.useState)(j),[M,z]=(0,n.useState)([]),[$,W]=(0,n.useState)(!1),[H,J]=(0,n.useState)(null),[Q,Y]=(0,n.useState)(null),[X,Z]=(0,n.useState)(p),[es,et]=(0,n.useState)({}),[el,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ej,ef]=(0,n.useState)(null),[eb,ey]=(0,n.useState)(!1),[e_,eT]=(0,n.useState)(!1),[ew,ek]=(0,n.useState)([]),[eI,eU]=(0,n.useState)(""),[eB,eA]=(0,n.useState)("user"),[eD,eF]=(0,n.useState)(!1);n.default.useEffect(()=>{Y((0,f.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0)try{let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),t=await Promise.all(e);S(t)}catch{S(s.teams.map(e=>({team_id:e,team_alias:null})))}let t=(await (0,f.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(t)}catch(e){console.error("Error fetching user data:",e),B.default.fromBackend("Failed to fetch user data")}finally{R(!1)}})()},[u,e,m]);let eR="proxy_admin"===m||"Admin"===m,eO=async()=>{if(u){eF(!0);try{let e=await (0,f.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eF(!1)}}},eE=async()=>{if(u&&eI){ey(!0);try{await (0,f.teamMemberAddCall)(u,eI,{role:eB,user_id:e}),B.default.success("User added to team successfully"),ed(!1);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),B.default.fromBackend(e?.message||"Failed to add user to team")}finally{ey(!1)}}},eP=async()=>{if(u&&ej){eT(!0);try{await (0,f.teamMemberDeleteCall)(u,ej.team_id,{role:"user",user_id:e}),B.default.success("User removed from team successfully"),ec(!1),ef(null);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),B.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eT(!1)}}},eL=ew.filter(e=>!v.some(s=>s.team_id===e.team_id)),eM=async()=>{if(!u)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let s=await (0,f.invitationCreateCall)(u,e);J(s),W(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;D(!0),await (0,f.userDeleteCall)(u,[e]),B.default.success("User deleted successfully"),h&&h(),c()}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{I(!1),D(!1)}},e$=async e=>{try{if(!u||!b)return;await (0,f.userUpdateUserCall)(u,e,null),_({...b,user_email:e.user_email??b.user_email,user_alias:e.user_alias??b.user_alias,models:e.models??b.models,max_budget:e.max_budget??b.max_budget,budget_duration:e.budget_duration??b.budget_duration,metadata:e.metadata??b.metadata}),B.default.success("User updated successfully"),E(!1)}catch(e){console.error("Error updating user:",e),B.default.fromBackend("Failed to update user")}};if(F)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"Loading user data..."})]});if(!b)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"User not found"})]});let eK=async(e,s)=>{await (0,L.copyToClipboard)(e)&&(et(e=>({...e,[s]:!0})),setTimeout(()=>{et(e=>({...e,[s]:!1}))},2e3))},eV={user_id:b.user_id,user_info:{user_email:b.user_email,user_alias:b.user_alias,user_role:b.user_role,models:b.models,max_budget:b.max_budget,budget_duration:b.budget_duration,metadata:b.metadata}};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(G.Title,{children:b.user_email||"User"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"text-gray-500 font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eC.CheckIcon,{size:12}):(0,s.jsx)(eN.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&T.rolesWithWriteAccess.includes(m)&&(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(y.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:eM,className:"flex items-center",children:"Reset Password"}),(0,s.jsx)(y.Button,{icon:ea.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,s.jsx)(K.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:b.user_email},{label:"User ID",value:b.user_id,code:!0},{label:"Global Proxy Role",value:b.user_role&&g?.[b.user_role]?.ui_label||b.user_role||"-"},{label:"Total Spend (USD)",value:null!==b.spend&&void 0!==b.spend?b.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:A}),(0,s.jsxs)(l.TabGroup,{defaultIndex:X,onIndexChange:Z,children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Overview"}),(0,s.jsx)(t.Tab,{children:"Details"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Spend"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(G.Title,{children:["$",(0,L.formatNumberWithCommas)(b.spend||0,4)]}),(0,s.jsxs)(q.Text,{children:["of"," ",null!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"]})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,s.jsx)(q.Text,{children:"Teams"}),eR&&(0,s.jsx)(y.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eU(""),eA("user"),ed(!0),eO()},children:"Add Team"})]}),(0,s.jsxs)("div",{className:"mt-2",children:[v.length>0?(0,s.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,s.jsxs)(eu.Table,{children:[(0,s.jsx)(em.TableHead,{children:(0,s.jsxs)(eg.TableRow,{children:[(0,s.jsx)(ex.TableHeaderCell,{children:"Team Name"}),eR&&(0,s.jsx)(ex.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,s.jsx)(eh.TableBody,{children:v.slice(0,el?v.length:20).map(e=>(0,s.jsxs)(eg.TableRow,{children:[(0,s.jsx)(ep.TableCell,{children:e.team_alias||e.team_id}),eR&&(0,s.jsx)(ep.TableCell,{className:"text-right",children:(0,s.jsx)(y.Button,{icon:ea.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{ef(e),ec(!0)}})})]},e.team_id))})]})}):(0,s.jsx)(q.Text,{children:"No teams"}),!el&&v.length>20&&(0,s.jsxs)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",v.length-20," more"]}),el&&v.length>20&&(0,s.jsx)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Personal Models"}),(0,s.jsx)("div",{className:"mt-2",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)(q.Text,{children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"User Settings"}),!O&&m&&T.rolesWithWriteAccess.includes(m)&&(0,s.jsx)(y.Button,{onClick:()=>E(!0),children:"Edit Settings"})]}),O&&b?(0,s.jsx)(U,{userData:eV,onCancel:()=>E(!1),onSubmit:e$,teams:v,accessToken:u,userID:e,userRole:m,userModels:M,possibleUIRoles:g}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eC.CheckIcon,{size:12}):(0,s.jsx)(eN.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,s.jsx)(q.Text,{children:b.user_email||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,s.jsx)(q.Text,{children:b.user_alias||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,s.jsx)(q.Text,{children:b.user_role||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,s.jsx)(q.Text,{children:b.created_at?new Date(b.created_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,s.jsx)(q.Text,{children:b.updated_at?new Date(b.updated_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,s.jsx)(q.Text,{children:null!==b.max_budget&&void 0!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,s.jsx)(q.Text,{children:(0,w.getBudgetDurationLabel)(b.budget_duration??null)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(b.metadata||{},null,2)})]})]})]})})]})]}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:$,setIsInvitationLinkModalVisible:W,baseUrl:Q||"",invitationLinkData:H,modalType:"resetPassword"}),(0,s.jsx)(K.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ej?.team_alias||ej?.team_id},{label:"User ID",value:b?.user_id,code:!0},{label:"Email",value:b?.user_email}],onCancel:()=>{ec(!1),ef(null)},onOk:eP,confirmLoading:e_}),(0,s.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!eb,children:(0,s.jsxs)(N.Form,{layout:"vertical",onFinish:eE,children:[(0,s.jsx)(N.Form.Item,{label:"Team",required:!0,children:(0,s.jsx)(x.Select,{showSearch:!0,value:eI||void 0,onChange:eU,placeholder:"Select a team",filterOption:(e,s)=>{let t=eL.find(e=>e.team_id===s?.value);return!!t&&t.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eD,children:eL.map(e=>(0,s.jsx)(x.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,s.jsx)(N.Form.Item,{label:"Member Role",children:(0,s.jsxs)(x.Select,{value:eB,onChange:eA,children:[(0,s.jsx)(x.Select.Option,{value:"user",children:(0,s.jsxs)(C.Tooltip,{title:"Can view team info, but not manage it",children:[(0,s.jsx)("span",{className:"font-medium",children:"user"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,s.jsx)(x.Select.Option,{value:"admin",children:(0,s.jsxs)(C.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,s.jsx)("span",{className:"font-medium",children:"admin"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,s.jsx)("div",{className:"text-right mt-4",children:(0,s.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:eb,disabled:!eI,children:eb?"Adding...":"Add to Team"})})]})})]})}var ew=e.i(655913),ek=e.i(38419),eI=e.i(78334),eU=e.i(555436),eB=e.i(284614);let eA=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eD({data:e=[],columns:t,isLoading:l=!1,onSortChange:a,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:x=[],onSelectionChange:h,enableSelection:g=!1,filters:p,updateFilters:j,initialFilters:f,teams:b,userListResponse:y,currentPage:v,handlePageChange:S}){let[N,C]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[T,w]=n.default.useState(null),[k,I]=n.default.useState(!1),[U,B]=n.default.useState(!1),A=(e,s=!1)=>{w(e),I(s)},D=(e,s)=>{h&&(s?h([...x,e]):h(x.filter(s=>s.user_id!==e.user_id)))},F=s=>{h&&(s?h(e):h([]))},R=e=>x.some(s=>s.user_id===e.user_id),O=e.length>0&&x.length===e.length,E=x.length>0&&x.lengtho?ed(o,c,u,m,A,g?{selectedUsers:x,onSelectUser:D,onSelectAll:F,isUserSelected:R,isAllSelected:O,isIndeterminate:E}:void 0):t,[o,c,u,m,A,t,g,x,O,E]),L=(0,eo.useReactTable)({data:e,columns:P,state:{sorting:N},onSortingChange:e=>{let s="function"==typeof e?e(N):e;if(C(s),s&&Array.isArray(s)&&s.length>0&&s[0]){let e=s[0];if(e.id){let s=e.id,t=e.desc?"desc":"asc";a?.(s,t)}}else a?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&C([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),T)?(0,s.jsx)(eT,{userId:T,onClose:()=>{w(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Search by email...",value:p.email,onChange:e=>j({email:e}),icon:eU.Search}),(0,s.jsx)(ek.FiltersButton,{onClick:()=>B(!U),active:U,hasActiveFilters:!!(p.user_id||p.user_role||p.team)}),(0,s.jsx)(eI.ResetFiltersButton,{onClick:()=>{j(f)}})]}),U&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by User ID",value:p.user_id,onChange:e=>j({user_id:e}),icon:eB.User}),(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by SSO ID",value:p.sso_user_id,onChange:e=>j({sso_user_id:e}),icon:eA}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ej.Select,{value:p.user_role,onValueChange:e=>j({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,t])=>(0,s.jsx)(_.SelectItem,{value:e,children:t.ui_label},e))})}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ej.Select,{value:p.team,onValueChange:e=>j({team:e}),placeholder:"Select Team",children:b?.map(e=>(0,s.jsx)(_.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[l?(0,s.jsx)(e_.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,s.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",y&&y.users&&y.users.length>0?(y.page-1)*y.page_size+1:0," ","-"," ",y&&y.users?Math.min(y.page*y.page_size,y.total):0," ","of ",y?y.total:0," results"]}),(0,s.jsx)("div",{className:"flex space-x-2",children:l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>S(v-1),disabled:1===v,className:`px-3 py-1 text-sm border rounded-md ${1===v?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,s.jsx)("button",{onClick:()=>S(v+1),disabled:!y||v>=y.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!y||v>=y.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,s.jsx)("div",{className:"overflow-auto",children:(0,s.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,s.jsx)(em.TableHead,{children:L.getHeaderGroups().map(e=>(0,s.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,s.jsx)(ex.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,s.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,s.jsx)(eb.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,s.jsx)(ey.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,s.jsx)(ef.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,s.jsx)(eh.TableBody,{children:l?(0,s.jsx)(eg.TableRow,{children:(0,s.jsx)(ep.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?L.getRowModel().rows.map(e=>(0,s.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,s.jsx)(ep.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&A(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,s.jsx)(eg.TableRow,{children:(0,s.jsx)(ep.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eF,Title:eR}=c.Typography,eO={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:x})=>{let h=!!c&&(0,T.isProxyAdminRole)(c),g=(0,$.useQueryClient)(),[p,j]=(0,n.useState)(1),[b,y]=(0,n.useState)(!1),[_,v]=(0,n.useState)(null),[S,N]=(0,n.useState)(!1),[C,w]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[U,A]=(0,n.useState)("users"),[D,F]=(0,n.useState)(eO),[V,G,q]=(0,M.useDebouncedState)(D,{wait:300}),[W,H]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Y,Z]=(0,n.useState)(null),[ee,es]=(0,n.useState)([]),[et,el]=(0,n.useState)(!1),[ea,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),N(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{Z((0,f.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let s=(await (0,f.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",s),en(s)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{F(s=>{let t={...s,...e};return G(t),t})},eu=(e,s)=>{ec({sort_by:e,sort_order:s})},em=async s=>{if(!e)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let t=await (0,f.invitationCreateCall)(e,s);Q(t),H(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ex=async()=>{if(k&&e)try{w(!0),await (0,f.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:s}}),B.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{N(!1),I(null),w(!1)}},eh=async()=>{v(null),y(!1)},eg=async s=>{if(console.log("inside handleEditSubmit:",s),e&&o&&c&&u){try{let t=await (0,f.userUpdateUserCall)(e,s,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.map(e=>e.user_id===t.data.user_id?(0,L.updateExistingKeys)(e,t.data):e);return{...e,users:s}}),B.default.success(`User ${s.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}v(null),y(!1)}},ep=async e=>{j(e)},ej=e=>{es(e)},ef=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:V,currentPage:p,orgAdminOrgIds:x}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.userListCall)(e,V.user_id?[V.user_id]:null,p,25,V.email||null,V.user_role||null,V.team||null,V.sso_user_id||null,V.sort_by,V.sort_order,x?x.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),eb=ef.data,ey=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,ev=ed(ey,e=>{v(e),y(!0)},eo,em,()=>{});return(0,s.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,s.jsx)("div",{className:"flex space-x-3",children:ef.isLoading?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(O.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ey}),h&&(0,s.jsx)(d.Button,{onClick:()=>{er(!ea),es([])},type:ea?"primary":"default",className:"flex items-center",children:ea?"Cancel Selection":"Select Users"}),h&&ea&&(0,s.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?B.default.fromBackend("Please select users to edit"):el(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),h?(0,s.jsxs)(l.TabGroup,{defaultIndex:0,onIndexChange:e=>A(0===e?"users":"settings"),children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Users"}),(0,s.jsx)(t.Tab,{children:"Default User Settings"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsx)(eD,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ey,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:ea,selectedUsers:ee,onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eO,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep})}),(0,s.jsx)(r.TabPanel,{children:u&&c&&e?(0,s.jsx)(X,{accessToken:e,possibleUIRoles:ey,userID:u,userRole:c}):(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(e_.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,s.jsx)(eD,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ey,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eO,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep}),(0,s.jsx)(E,{visible:b,possibleUIRoles:ey,onCancel:eh,user:_,onSubmit:eg}),(0,s.jsx)(K.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ey?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{N(!1),I(null)},onOk:ex,confirmLoading:C}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:W,setIsInvitationLinkModalVisible:H,baseUrl:Y||"",invitationLinkData:J,modalType:"resetPassword"}),(0,s.jsx)(R,{open:et,onCancel:()=>el(!1),selectedUsers:ee,possibleUIRoles:ey,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),es([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,T.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a230559fcabaea23.js b/litellm/proxy/_experimental/out/_next/static/chunks/406bbb9c89fee7ee.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/a230559fcabaea23.js rename to litellm/proxy/_experimental/out/_next/static/chunks/406bbb9c89fee7ee.js index b1b0797563..60a711ff22 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/a230559fcabaea23.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/406bbb9c89fee7ee.js @@ -4,7 +4,7 @@ ${t}`)}return n})(tN);class tE extends tw{list(e={},t){let{betas:s,...r}=e??{};r Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);let a=this._client._options.timeout;if(!r.stream&&null==a){let e=t$[r.model]??void 0;a=this._client.calculateNonstreamingTimeout(r.max_tokens,e)}return this._client.post("/v1/messages?beta=true",{body:r,timeout:a??6e5,...t,headers:t_([{...s?.toString()!=null?{"anthropic-beta":s?.toString()}:void 0},t?.headers]),stream:e.stream??!1})}stream(e,t){return tM.createMessage(this,e,t)}countTokens(e,t){let{betas:s,...r}=e;return this._client.post("/v1/messages/count_tokens?beta=true",{body:r,...t,headers:t_([{"anthropic-beta":[...s??[],"token-counting-2024-11-01"].toString()},t?.headers])})}}tD.Batches=tA;class tB extends tw{constructor(){super(...arguments),this.models=new tC(this._client),this.messages=new tD(this._client),this.files=new tE(this._client)}}tB.Models=tC,tB.Messages=tD,tB.Files=tE;class tq extends tw{create(e,t){let{betas:s,...r}=e;return this._client.post("/v1/complete",{body:r,timeout:this._client._options.timeout??6e5,...t,headers:t_([{...s?.toString()!=null?{"anthropic-beta":s?.toString()}:void 0},t?.headers]),stream:e.stream??!1})}}let tW="__json_buf";function tz(e){return"tool_use"===e.type||"server_tool_use"===e.type}class tH{constructor(){P.add(this),this.messages=[],this.receivedMessages=[],O.set(this,void 0),this.controller=new AbortController,R.set(this,void 0),I.set(this,()=>{}),M.set(this,()=>{}),L.set(this,void 0),$.set(this,()=>{}),U.set(this,()=>{}),D.set(this,{}),B.set(this,!1),q.set(this,!1),W.set(this,!1),z.set(this,!1),H.set(this,void 0),F.set(this,void 0),V.set(this,e=>{if(e_(this,q,!0,"f"),eE(e)&&(e=new eP),e instanceof eP)return e_(this,W,!0,"f"),this._emit("abort",e);if(e instanceof eT)return this._emit("error",e);if(e instanceof Error){let t=new eT(e.message);return t.cause=e,this._emit("error",t)}return this._emit("error",new eT(String(e)))}),e_(this,R,new Promise((e,t)=>{e_(this,I,e,"f"),e_(this,M,t,"f")}),"f"),e_(this,L,new Promise((e,t)=>{e_(this,$,e,"f"),e_(this,U,t,"f")}),"f"),eN(this,R,"f").catch(()=>{}),eN(this,L,"f").catch(()=>{})}get response(){return eN(this,H,"f")}get request_id(){return eN(this,F,"f")}async withResponse(){let e=await eN(this,R,"f");if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let t=new tH;return t._run(()=>t._fromReadableStream(e)),t}static createMessage(e,t,s){let r=new tH;for(let e of t.messages)r._addMessageParam(e);return r._run(()=>r._createMessage(e,{...t,stream:!0},{...s,headers:{...s?.headers,"X-Stainless-Helper-Method":"stream"}})),r}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},eN(this,V,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,t=!0){this.receivedMessages.push(e),t&&this._emit("message",e)}async _createMessage(e,t,s){let r=s?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener("abort",()=>this.controller.abort())),eN(this,P,"m",K).call(this);let{response:a,data:n}=await e.create({...t,stream:!0},{...s,signal:this.controller.signal}).withResponse();for await(let e of(this._connected(a),n))eN(this,P,"m",X).call(this,e);if(n.controller.signal?.aborted)throw new eP;eN(this,P,"m",Y).call(this)}_connected(e){this.ended||(e_(this,H,e,"f"),e_(this,F,e?.headers.get("request-id"),"f"),eN(this,I,"f").call(this,e),this._emit("connect"))}get ended(){return eN(this,B,"f")}get errored(){return eN(this,q,"f")}get aborted(){return eN(this,W,"f")}abort(){this.controller.abort()}on(e,t){return(eN(this,D,"f")[e]||(eN(this,D,"f")[e]=[])).push({listener:t}),this}off(e,t){let s=eN(this,D,"f")[e];if(!s)return this;let r=s.findIndex(e=>e.listener===t);return r>=0&&s.splice(r,1),this}once(e,t){return(eN(this,D,"f")[e]||(eN(this,D,"f")[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,s)=>{e_(this,z,!0,"f"),"error"!==e&&this.once("error",s),this.once(e,t)})}async done(){e_(this,z,!0,"f"),await eN(this,L,"f")}get currentMessage(){return eN(this,O,"f")}async finalMessage(){return await this.done(),eN(this,P,"m",J).call(this)}async finalText(){return await this.done(),eN(this,P,"m",G).call(this)}_emit(e,...t){if(eN(this,B,"f"))return;"end"===e&&(e_(this,B,!0,"f"),eN(this,$,"f").call(this));let s=eN(this,D,"f")[e];if(s&&(eN(this,D,"f")[e]=s.filter(e=>!e.once),s.forEach(({listener:e})=>e(...t))),"abort"===e){let e=t[0];eN(this,z,"f")||s?.length||Promise.reject(e),eN(this,M,"f").call(this,e),eN(this,U,"f").call(this,e),this._emit("end");return}if("error"===e){let e=t[0];eN(this,z,"f")||s?.length||Promise.reject(e),eN(this,M,"f").call(this,e),eN(this,U,"f").call(this,e),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",eN(this,P,"m",J).call(this))}async _fromReadableStream(e,t){let s=t?.signal;s&&(s.aborted&&this.controller.abort(),s.addEventListener("abort",()=>this.controller.abort())),eN(this,P,"m",K).call(this),this._connected(null);let r=te.fromReadableStream(e,this.controller);for await(let e of r)eN(this,P,"m",X).call(this,e);if(r.controller.signal?.aborted)throw new eP;eN(this,P,"m",Y).call(this)}[(O=new WeakMap,R=new WeakMap,I=new WeakMap,M=new WeakMap,L=new WeakMap,$=new WeakMap,U=new WeakMap,D=new WeakMap,B=new WeakMap,q=new WeakMap,W=new WeakMap,z=new WeakMap,H=new WeakMap,F=new WeakMap,V=new WeakMap,P=new WeakSet,J=function(){if(0===this.receivedMessages.length)throw new eT("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},G=function(){if(0===this.receivedMessages.length)throw new eT("stream ended without producing a Message with role=assistant");let e=this.receivedMessages.at(-1).content.filter(e=>"text"===e.type).map(e=>e.text);if(0===e.length)throw new eT("stream ended without producing a content block with type=text");return e.join(" ")},K=function(){this.ended||e_(this,O,void 0,"f")},X=function(e){if(this.ended)return;let t=eN(this,P,"m",Q).call(this,e);switch(this._emit("streamEvent",e,t),e.type){case"content_block_delta":{let s=t.content.at(-1);switch(e.delta.type){case"text_delta":"text"===s.type&&this._emit("text",e.delta.text,s.text||"");break;case"citations_delta":"text"===s.type&&this._emit("citation",e.delta.citation,s.citations??[]);break;case"input_json_delta":tz(s)&&s.input&&this._emit("inputJson",e.delta.partial_json,s.input);break;case"thinking_delta":"thinking"===s.type&&this._emit("thinking",e.delta.thinking,s.thinking);break;case"signature_delta":"thinking"===s.type&&this._emit("signature",s.signature);break;default:tF(e.delta)}break}case"message_stop":this._addMessageParam(t),this._addMessage(t,!0);break;case"content_block_stop":this._emit("contentBlock",t.content.at(-1));break;case"message_start":e_(this,O,t,"f")}},Y=function(){if(this.ended)throw new eT("stream has ended, this shouldn't happen");let e=eN(this,O,"f");if(!e)throw new eT("request ended without sending any chunks");return e_(this,O,void 0,"f"),e},Q=function(e){let t=eN(this,O,"f");if("message_start"===e.type){if(t)throw new eT(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!t)throw new eT(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":case"content_block_stop":return t;case"message_delta":return t.stop_reason=e.delta.stop_reason,t.stop_sequence=e.delta.stop_sequence,t.usage.output_tokens=e.usage.output_tokens,null!=e.usage.input_tokens&&(t.usage.input_tokens=e.usage.input_tokens),null!=e.usage.cache_creation_input_tokens&&(t.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),null!=e.usage.cache_read_input_tokens&&(t.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),null!=e.usage.server_tool_use&&(t.usage.server_tool_use=e.usage.server_tool_use),t;case"content_block_start":return t.content.push(e.content_block),t;case"content_block_delta":{let s=t.content.at(e.index);switch(e.delta.type){case"text_delta":s?.type==="text"&&(s.text+=e.delta.text);break;case"citations_delta":s?.type==="text"&&(s.citations??(s.citations=[]),s.citations.push(e.delta.citation));break;case"input_json_delta":if(s&&tz(s)){let t=s[tW]||"";Object.defineProperty(s,tW,{value:t+=e.delta.partial_json,enumerable:!1,writable:!0}),t&&(s.input=tO(t))}break;case"thinking_delta":s?.type==="thinking"&&(s.thinking+=e.delta.thinking);break;case"signature_delta":s?.type==="thinking"&&(s.signature=e.delta.signature);break;default:tF(e.delta)}return t}}},Symbol.asyncIterator)](){let e=[],t=[],s=!1;return this.on("streamEvent",s=>{let r=t.shift();r?r.resolve(s):e.push(s)}),this.on("end",()=>{for(let e of(s=!0,t))e.resolve(void 0);t.length=0}),this.on("abort",e=>{for(let r of(s=!0,t))r.reject(e);t.length=0}),this.on("error",e=>{for(let r of(s=!0,t))r.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:s?{value:void 0,done:!0}:new Promise((e,s)=>t.push({resolve:e,reject:s})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new te(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}function tF(e){}class tJ extends tw{create(e,t){return this._client.post("/v1/messages/batches",{body:e,...t})}retrieve(e,t){return this._client.get(tk`/v1/messages/batches/${e}`,t)}list(e={},t){return this._client.getAPIList("/v1/messages/batches",tc,{query:e,...t})}delete(e,t){return this._client.delete(tk`/v1/messages/batches/${e}`,t)}cancel(e,t){return this._client.post(tk`/v1/messages/batches/${e}/cancel`,t)}async results(e,t){let s=await this.retrieve(e);if(!s.results_url)throw new eT(`No batch \`results_url\`; Has it finished processing? ${s.processing_status} - ${s.id}`);return this._client.get(s.results_url,{...t,headers:t_([{Accept:"application/binary"},t?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((e,t)=>tT.fromResponse(t.response,t.controller))}}class tG extends tw{constructor(){super(...arguments),this.batches=new tJ(this._client)}create(e,t){e.model in tV&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${tV[e.model]} Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);let s=this._client._options.timeout;if(!e.stream&&null==s){let t=t$[e.model]??void 0;s=this._client.calculateNonstreamingTimeout(e.max_tokens,t)}return this._client.post("/v1/messages",{body:e,timeout:s??6e5,...t,stream:e.stream??!1})}stream(e,t){return tH.createMessage(this,e,t)}countTokens(e,t){return this._client.post("/v1/messages/count_tokens",{body:e,...t})}}let tV={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025"};tG.Batches=tJ;class tK extends tw{retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tk`/v1/models/${e}`,{...s,headers:t_([{...r?.toString()!=null?{"anthropic-beta":r?.toString()}:void 0},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/models",tc,{query:r,...t,headers:t_([{...s?.toString()!=null?{"anthropic-beta":s?.toString()}:void 0},t?.headers])})}}let tX=e=>void 0!==globalThis.process?globalThis.process.env?.[e]?.trim()??void 0:void 0!==globalThis.Deno?globalThis.Deno.env?.get?.(e)?.trim():void 0;class tY{constructor({baseURL:e=tX("ANTHROPIC_BASE_URL"),apiKey:t=tX("ANTHROPIC_API_KEY")??null,authToken:s=tX("ANTHROPIC_AUTH_TOKEN")??null,...r}={}){Z.set(this,void 0);const a={apiKey:t,authToken:s,...r,baseURL:e||"https://api.anthropic.com"};if(!a.dangerouslyAllowBrowser&&"u">typeof window&&void 0!==window.document&&"u">typeof navigator)throw new eT("It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew Anthropic({ apiKey, dangerouslyAllowBrowser: true });\n");this.baseURL=a.baseURL,this.timeout=a.timeout??tQ.DEFAULT_TIMEOUT,this.logger=a.logger??console;const n="warn";this.logLevel=n,this.logLevel=eJ(a.logLevel,"ClientOptions.logLevel",this)??eJ(tX("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??n,this.fetchOptions=a.fetchOptions,this.maxRetries=a.maxRetries??2,this.fetch=a.fetch??function(){if("u">typeof fetch)return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}(),e_(this,Z,e6,"f"),this._options=a,this.apiKey=t,this.authToken=s}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:t}){if(!(this.apiKey&&e.get("x-api-key")||t.has("x-api-key")||this.authToken&&e.get("authorization"))&&!t.has("authorization"))throw Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}authHeaders(e){return t_([this.apiKeyAuth(e),this.bearerAuth(e)])}apiKeyAuth(e){if(null!=this.apiKey)return t_([{"X-Api-Key":this.apiKey}])}bearerAuth(e){if(null!=this.authToken)return t_([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return Object.entries(e).filter(([e,t])=>void 0!==t).map(([e,t])=>{if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)return`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(null===t)return`${encodeURIComponent(e)}=`;throw new eT(`Cannot stringify type ${typeof t}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}getUserAgent(){return`${this.constructor.name}/JS ${eZ}`}defaultIdempotencyKey(){return`stainless-node-retry-${ek()}`}makeStatusError(e,t,s,r){return eA.generate(e,t,s,r)}buildURL(e,t){let s=new URL(eW.test(e)?e:this.baseURL+(this.baseURL.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),r=this.defaultQuery();return!function(e){if(!e)return!0;for(let t in e)return!1;return!0}(r)&&(t={...r,...t}),"object"==typeof t&&t&&!Array.isArray(t)&&(s.search=this.stringifyQuery(t)),s.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new eT("Streaming is strongly recommended for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 6e5}async prepareOptions(e){}async prepareRequest(e,{url:t,options:s}){}get(e,t){return this.methodRequest("get",e,t)}post(e,t){return this.methodRequest("post",e,t)}patch(e,t){return this.methodRequest("patch",e,t)}put(e,t){return this.methodRequest("put",e,t)}delete(e,t){return this.methodRequest("delete",e,t)}methodRequest(e,t,s){return this.request(Promise.resolve(s).then(s=>({method:e,path:t,...s})))}request(e,t=null){return new ti(this,this.makeRequest(e,t,void 0))}async makeRequest(e,t,s){let r=await e,a=r.maxRetries??this.maxRetries;null==t&&(t=a),await this.prepareOptions(r);let{req:n,url:i,timeout:o}=this.buildRequest(r,{retryCount:a-t});await this.prepareRequest(n,{url:i,options:r});let l="log_"+(0x1000000*Math.random()|0).toString(16).padStart(6,"0"),c=void 0===s?"":`, retryOf: ${s}`,d=Date.now();if(eY(this).debug(`[${l}] sending request`,eQ({retryOfRequestLogID:s,method:r.method,url:i,options:r,headers:n.headers})),r.signal?.aborted)throw new eP;let u=new AbortController,h=await this.fetchWithTimeout(i,n,o,u).catch(eC),m=Date.now();if(h instanceof Error){let e=`retrying, ${t} attempts remaining`;if(r.signal?.aborted)throw new eP;let a=eE(h)||/timed? ?out/i.test(String(h)+("cause"in h?String(h.cause):""));if(t)return eY(this).info(`[${l}] connection ${a?"timed out":"failed"} - ${e}`),eY(this).debug(`[${l}] connection ${a?"timed out":"failed"} (${e})`,eQ({retryOfRequestLogID:s,url:i,durationMs:m-d,message:h.message})),this.retryRequest(r,t,s??l);if(eY(this).info(`[${l}] connection ${a?"timed out":"failed"} - error; no more retries left`),eY(this).debug(`[${l}] connection ${a?"timed out":"failed"} (error; no more retries left)`,eQ({retryOfRequestLogID:s,url:i,durationMs:m-d,message:h.message})),a)throw new eR;throw new eO({cause:h})}let p=[...h.headers.entries()].filter(([e])=>"request-id"===e).map(([e,t])=>", "+e+": "+JSON.stringify(t)).join(""),f=`[${l}${c}${p}] ${n.method} ${i} ${h.ok?"succeeded":"failed"} with status ${h.status} in ${m-d}ms`;if(!h.ok){let e=this.shouldRetry(h);if(t&&e){let e=`retrying, ${t} attempts remaining`;return await e5(h.body),eY(this).info(`${f} - ${e}`),eY(this).debug(`[${l}] response error (${e})`,eQ({retryOfRequestLogID:s,url:h.url,status:h.status,headers:h.headers,durationMs:m-d})),this.retryRequest(r,t,s??l,h.headers)}let a=e?"error; no more retries left":"error; not retryable";eY(this).info(`${f} - ${a}`);let n=await h.text().catch(e=>eC(e).message),i=eH(n),o=i?void 0:n;throw eY(this).debug(`[${l}] response error (${a})`,eQ({retryOfRequestLogID:s,url:h.url,status:h.status,headers:h.headers,message:o,durationMs:Date.now()-d})),this.makeStatusError(h.status,i,o,h.headers)}return eY(this).info(f),eY(this).debug(`[${l}] response start`,eQ({retryOfRequestLogID:s,url:h.url,status:h.status,headers:h.headers,durationMs:m-d})),{response:h,options:r,controller:u,requestLogID:l,retryOfRequestLogID:s,startTime:d}}getAPIList(e,t,s){return this.requestAPIList(t,{method:"get",path:e,...s})}requestAPIList(e,t){return new tl(this,this.makeRequest(t,null,void 0),e)}async fetchWithTimeout(e,t,s,r){let{signal:a,method:n,...i}=t||{};a&&a.addEventListener("abort",()=>r.abort());let o=setTimeout(()=>r.abort(),s),l=globalThis.ReadableStream&&i.body instanceof globalThis.ReadableStream||"object"==typeof i.body&&null!==i.body&&Symbol.asyncIterator in i.body,c={signal:r.signal,...l?{duplex:"half"}:{},method:"GET",...i};n&&(c.method=n.toUpperCase());try{return await this.fetch.call(void 0,e,c)}finally{clearTimeout(o)}}shouldRetry(e){let t=e.headers.get("x-should-retry");return"true"===t||"false"!==t&&(408===e.status||409===e.status||429===e.status||!!(e.status>=500))}async retryRequest(e,t,s,r){let a,n,i=r?.get("retry-after-ms");if(i){let e=parseFloat(i);Number.isNaN(e)||(a=e)}let o=r?.get("retry-after");if(o&&!a){let e=parseFloat(o);a=Number.isNaN(e)?Date.parse(o)-Date.now():1e3*e}if(!(a&&0<=a&&a<6e4)){let s=e.maxRetries??this.maxRetries;a=this.calculateDefaultRetryTimeoutMillis(t,s)}return await (n=a,new Promise(e=>setTimeout(e,n))),this.makeRequest(e,t-1,s)}calculateDefaultRetryTimeoutMillis(e,t){return Math.min(.5*Math.pow(2,t-e),8)*(1-.25*Math.random())*1e3}calculateNonstreamingTimeout(e,t){if(36e5*e/128e3>6e5||null!=t&&e>t)throw new eT("Streaming is strongly recommended for operations that may token longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 6e5}buildRequest(e,{retryCount:t=0}={}){let s={...e},{method:r,path:a,query:n}=s,i=this.buildURL(a,n);"timeout"in s&&((e,t)=>{if("number"!=typeof t||!Number.isInteger(t))throw new eT(`${e} must be an integer`);if(t<0)throw new eT(`${e} must be a positive integer`)})("timeout",s.timeout),s.timeout=s.timeout??this.timeout;let{bodyHeaders:o,body:l}=this.buildBody({options:s}),c=this.buildHeaders({options:e,method:r,bodyHeaders:o,retryCount:t});return{req:{method:r,headers:c,...s.signal&&{signal:s.signal},...globalThis.ReadableStream&&l instanceof globalThis.ReadableStream&&{duplex:"half"},...l&&{body:l},...this.fetchOptions??{},...s.fetchOptions??{}},url:i,timeout:s.timeout}}buildHeaders({options:e,method:t,bodyHeaders:r,retryCount:a}){let n={};this.idempotencyHeader&&"get"!==t&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),n[this.idempotencyHeader]=e.idempotencyKey);let i=t_([n,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(a),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...s??(s=(()=>{let e="u">typeof Deno&&null!=Deno.build?"deno":"u">typeof EdgeRuntime?"edge":"[object process]"===Object.prototype.toString.call(void 0!==globalThis.process?globalThis.process:0)?"node":"unknown";if("deno"===e)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":eZ,"X-Stainless-OS":e1(Deno.build.os),"X-Stainless-Arch":e0(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":"string"==typeof Deno.version?Deno.version:Deno.version?.deno??"unknown"};if("u">typeof EdgeRuntime)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":eZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if("node"===e)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":eZ,"X-Stainless-OS":e1(globalThis.process.platform??"unknown"),"X-Stainless-Arch":e0(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let t=function(){if("u"0&&(g["x-litellm-tags"]=a.join(","));let y=new tQ({apiKey:r,baseURL:f,dangerouslyAllowBrowser:!0,defaultHeaders:g});try{let r=Date.now(),a=!1,m={model:s,messages:e.map(e=>({role:e.role,content:e.content})),stream:!0,max_tokens:1024,litellm_trace_id:c};for await(let e of(d&&(m.vector_store_ids=d),u&&(m.guardrails=u),h&&(m.policies=h),y.messages.stream(m,{signal:n}))){if(console.log("Stream event:",e),"content_block_delta"===e.type){let n=e.delta;if(!a){a=!0;let e=Date.now()-r;console.log("First token received! Time:",e,"ms"),o&&o(e)}"text_delta"===n.type?t("assistant",n.text,s):"reasoning_delta"===n.type&&i&&i(n.text)}if("message_delta"===e.type&&e.usage&&l){let t=e.usage;console.log("Usage data found:",t);let s={completionTokens:t.output_tokens,promptTokens:t.input_tokens,totalTokens:t.input_tokens+t.output_tokens};l(s)}}}catch(e){throw n?.aborted?console.log("Anthropic messages request was cancelled"):t1.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`),e}}e.s(["makeAnthropicMessagesRequest",()=>t2],434788);var t4=e.i(356449);async function t3(e,t,s,r,a,n,i,o,l,c){console.log=function(){},console.log("isLocal:",!1);let d=c||(0,ev.getProxyBaseUrl)(),u=new t4.default.OpenAI({apiKey:a,baseURL:d,dangerouslyAllowBrowser:!0,defaultHeaders:n&&n.length>0?{"x-litellm-tags":n.join(",")}:void 0});try{let a=await u.audio.speech.create({model:r,input:e,voice:t,...o?{response_format:o}:{},...l?{speed:l}:{}},{signal:i}),n=await a.blob(),c=URL.createObjectURL(n);s(c,r)}catch(e){throw i?.aborted?console.log("Audio speech request was cancelled"):t1.default.fromBackend(`Error occurred while generating speech. Please try again. Error: ${e}`),e}}async function t5(e,t,s,r,a,n,i,o,l,c,d){console.log=function(){},console.log("isLocal:",!1);let u=d||(0,ev.getProxyBaseUrl)(),h=new t4.default.OpenAI({apiKey:r,baseURL:u,dangerouslyAllowBrowser:!0,defaultHeaders:a&&a.length>0?{"x-litellm-tags":a.join(",")}:void 0});try{console.log("Processing audio file for transcription:",e.name);let r=await h.audio.transcriptions.create({model:s,file:e,...i?{language:i}:{},...o?{prompt:o}:{},...l?{response_format:l}:{},...void 0!==c?{temperature:c}:{}},{signal:n});if(console.log("Transcription response:",r),r&&r.text)t(r.text,s),t1.default.success("Audio transcribed successfully");else throw Error("No transcription text in response")}catch(e){if(console.error("Error making audio transcription request:",e),n?.aborted)console.log("Audio transcription request was cancelled");else{let t="Failed to transcribe audio";e?.error?.message?t=e.error.message:e?.message&&(t=e.message),t1.default.fromBackend(`Audio transcription failed: ${t}`)}throw e}}async function t6(e,t,s,r,a,n){if(!r)throw Error("Virtual Key is required");console.log=function(){};let i=n||(0,ev.getProxyBaseUrl)(),o={};a&&a.length>0&&(o["x-litellm-tags"]=a.join(","));try{let a=i.endsWith("/")?i.slice(0,-1):i,n=`${a}/embeddings`,l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[(0,ev.getGlobalLitellmHeaderName)()]:`Bearer ${r}`,...o},body:JSON.stringify({model:s,input:e})});if(!l.ok){let e=await l.text();throw Error(e||`Request failed with status ${l.status}`)}let c=await l.json(),d=c?.data?.[0]?.embedding;if(!d)throw Error("No embedding returned from server");t(JSON.stringify(d),c?.model??s)}catch(e){throw t1.default.fromBackend(`Error occurred while making embeddings request. Please try again. Error: ${e}`),e}}e.s(["makeOpenAIAudioSpeechRequest",()=>t3],512882),e.s(["makeOpenAIAudioTranscriptionRequest",()=>t5],584976),e.s(["makeOpenAIEmbeddingsRequest",()=>t6],720762)},921687,e=>{"use strict";var t=e.i(764205);let s=async(e,s)=>{try{let r=s||(0,t.getProxyBaseUrl)(),a=r?`${r}/v1/agents`:"/v1/agents",n=await fetch(a,{method:"GET",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to fetch agents")}let i=await n.json();return console.log("Fetched agents:",i),i.sort((e,t)=>{let s=e.agent_name||e.agent_id,r=t.agent_name||t.agent_id;return s.localeCompare(r)}),i}catch(e){throw console.error("Error fetching agents:",e),e}},r=async(e,s,r,a)=>{try{let a=await (0,t.modelInfoCall)(e,s,r,1,200),n=a?.data??[],i=(Array.isArray(n)?n:[]).filter(e=>"string"==typeof e?.litellm_params?.model&&e.litellm_params.model.startsWith("litellm_agent/")).map(e=>({model_name:e.model_name??e.model_group??"",litellm_params:{...e.litellm_params,model:e.litellm_params.model,litellm_system_prompt:e.litellm_params?.litellm_system_prompt,tools:Array.isArray(e.litellm_params?.tools)?e.litellm_params.tools:void 0},model_info:e.model_info??null}));return i.sort((e,t)=>e.model_name.localeCompare(t.model_name)),i}catch(e){throw console.error("Error fetching agent models:",e),e}};e.s(["fetchAvailableAgentModels",0,r,"fetchAvailableAgents",0,s])},488143,(e,t,s)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:s,blurHeight:r,blurDataURL:a,objectFit:n}){let i=s?40*s:e,o=r?40*r:t,l=i&&o?`viewBox='0 0 ${i} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${l}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${l?"none":"contain"===n?"xMidYMid":"cover"===n?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},987690,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return n},imageConfigDefault:function(){return i}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=["default","imgix","cloudinary","akamai","custom"],i={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},908927,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"getImgProps",{enumerable:!0,get:function(){return c}}),e.r(233525);let r=e.r(543369),a=e.r(488143),n=e.r(987690),i=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:s=!1,priority:c=!1,preload:d=!1,loading:u,className:h,quality:m,width:p,height:f,fill:g=!1,style:y,overrideSrc:x,onLoad:b,onLoadingComplete:v,placeholder:w="empty",blurDataURL:j,fetchPriority:S,decoding:_="async",layout:N,objectFit:k,objectPosition:E,lazyBoundary:C,lazyRoot:T,...A},P){var O;let R,I,M,{imgConf:L,showAltText:$,blurComplete:U,defaultLoader:D}=P,B=L||n.imageConfigDefault;if("allSizes"in B)R=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),s=B.qualities?.sort((e,t)=>e-t);R={...B,allSizes:e,deviceSizes:t,qualities:s}}if(void 0===D)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let q=A.loader||D;delete A.loader,delete A.srcSet;let W="__next_img_default"in q;if(W){if("custom"===R.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop. Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=q;q=t=>{let{config:s,...r}=t;return e(r)}}if(N){"fill"===N&&(g=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[N];e&&(y={...y,...e});let s={responsive:"100vw",fill:"100vw"}[N];s&&!t&&(t=s)}let z="",H=l(p),F=l(f);if((O=e)&&"object"==typeof O&&(o(O)||void 0!==O.src)){let t=o(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(I=t.blurWidth,M=t.blurHeight,j=j||t.blurDataURL,z=t.src,!g)if(H||F){if(H&&!F){let e=H/t.width;F=Math.round(t.height*e)}else if(!H&&F){let e=F/t.height;H=Math.round(t.width*e)}}else H=t.width,F=t.height}let J=!c&&!d&&("lazy"===u||void 0===u);(!(e="string"==typeof e?e:z)||e.startsWith("data:")||e.startsWith("blob:"))&&(s=!0,J=!1),R.unoptimized&&(s=!0),W&&!R.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(s=!0);let G=l(m),V=Object.assign(g?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:k,objectPosition:E}:{},$?{}:{color:"transparent"},y),K=U||"empty"===w?null:"blur"===w?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:H,heightInt:F,blurWidth:I,blurHeight:M,blurDataURL:j||"",objectFit:V.objectFit})}")`:`url("${w}")`,X=i.includes(V.objectFit)?"fill"===V.objectFit?"100% 100%":"cover":V.objectFit,Y=K?{backgroundSize:X,backgroundPosition:V.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:K}:{},Q=function({config:e,src:t,unoptimized:s,width:a,quality:n,sizes:i,loader:o}){if(s){let e=(0,r.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let s=t.includes("?")?"&":"?";t=`${t}${s}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:l,kind:c}=function({deviceSizes:e,allSizes:t},s,r){if(r){let s=/(^|\s)(1?\d?\d)vw/g,a=[];for(let e;e=s.exec(r);)a.push(parseInt(e[2]));if(a.length){let s=.01*Math.min(...a);return{widths:t.filter(t=>t>=e[0]*s),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof s?{widths:e,kind:"w"}:{widths:[...new Set([s,2*s].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,a,i),d=l.length-1;return{sizes:i||"w"!==c?i:"100vw",srcSet:l.map((s,r)=>`${o({config:e,src:t,quality:n,width:s})} ${"w"===c?s:r+1}${c}`).join(", "),src:o({config:e,src:t,quality:n,width:l[d]})}}({config:R,src:e,unoptimized:s,width:H,quality:G,sizes:t,loader:q}),Z=J?"lazy":u;return{props:{...A,loading:Z,fetchPriority:S,width:H,height:F,decoding:_,className:h,style:{...V,...Y},sizes:Q.sizes,srcSet:Q.srcSet,src:x||Q.src},meta:{unoptimized:s,preload:d||c,placeholder:w,fill:g}}}},898879,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return o}});let r=e.r(271645),a="u"{}:r.useLayoutEffect,i=a?()=>{}:r.useEffect;function o(e){let{headManager:t,reduceComponentsToState:s}=e;function o(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(s(e))}}return a&&(t?.mountedInstances?.add(e.children),o()),n(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),n(()=>(t&&(t._pendingUpdate=o),()=>{t&&(t._pendingUpdate=o)})),i(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},325633,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return f},defaultHead:function(){return u}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=e.r(563141),i=e.r(151836),o=e.r(843476),l=i._(e.r(271645)),c=n._(e.r(898879)),d=e.r(742732);function u(){return[(0,o.jsx)("meta",{charSet:"utf-8"},"charset"),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function h(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(233525);let m=["name","httpEquiv","charSet","itemProp"];function p(e){let t,s,r,a;return e.reduce(h,[]).reverse().concat(u().reverse()).filter((t=new Set,s=new Set,r=new Set,a={},e=>{let n=!0,i=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){i=!0;let s=e.key.slice(e.key.indexOf("$")+1);t.has(s)?n=!1:t.add(s)}switch(e.type){case"title":case"base":s.has(e.type)?n=!1:s.add(e.type);break;case"meta":for(let t=0,s=m.length;t{let s=e.key||t;return l.default.cloneElement(e,{key:s})})}let f=function({children:e}){let t=(0,l.useContext)(d.HeadManagerContext);return(0,o.jsx)(c.default,{reduceComponentsToState:p,headManager:t,children:e})};("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},918556,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"ImageConfigContext",{enumerable:!0,get:function(){return n}});let r=e.r(563141)._(e.r(271645)),a=e.r(987690),n=r.default.createContext(a.imageConfigDefault)},65856,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"RouterContext",{enumerable:!0,get:function(){return r}});let r=e.r(563141)._(e.r(271645)).default.createContext(null)},670965,(e,t,s)=>{"use strict";function r(e,t){let s=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return i}});let r=e.r(670965),a=e.r(543369);function n({config:e,src:t,width:s,quality:n}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns. -Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let i=(0,r.findClosestQuality)(n,e),o=(0,a.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${s}&q=${i}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}n.__next_img_default=!0;let i=n},605500,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"Image",{enumerable:!0,get:function(){return v}});let r=e.r(563141),a=e.r(151836),n=e.r(843476),i=a._(e.r(271645)),o=r._(e.r(174080)),l=r._(e.r(325633)),c=e.r(908927),d=e.r(987690),u=e.r(918556);e.r(233525);let h=e.r(65856),m=r._(e.r(1948)),p=e.r(818581),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,s,r,a,n,i){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),s?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,a=!1;s.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function y(e){return i.use?{fetchPriority:e}:{fetchpriority:e}}"u"{let E=(0,i.useCallback)(e=>{e&&(_&&(e.src=e.src),e.complete&&g(e,u,x,b,v,m,j))},[e,u,x,b,v,_,m,j]),C=(0,p.useMergedRef)(k,E);return(0,n.jsx)("img",{...N,...y(d),loading:h,width:a,height:r,decoding:o,"data-nimg":f?"fill":"1",className:l,style:c,sizes:s,srcSet:t,src:e,ref:C,onLoad:e=>{g(e.currentTarget,u,x,b,v,m,j)},onError:e=>{w(!0),"empty"!==u&&v(!0),_&&_(e)}})});function b({isAppRouter:e,imgAttributes:t}){let s={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...y(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,s),null):(0,n.jsx)(l.default,{children:(0,n.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...s},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,i.forwardRef)((e,t)=>{let s=(0,i.useContext)(h.RouterContext),r=(0,i.useContext)(u.ImageConfigContext),a=(0,i.useMemo)(()=>{let e=f||r||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),s=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:s,qualities:a,localPatterns:"u"{p.current=o},[o]);let g=(0,i.useRef)(l);(0,i.useEffect)(()=>{g.current=l},[l]);let[y,v]=(0,i.useState)(!1),[w,j]=(0,i.useState)(!1),{props:S,meta:_}=(0,c.getImgProps)(e,{defaultLoader:m.default,imgConf:a,blurComplete:y,showAltText:w});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x,{...S,unoptimized:_.unoptimized,placeholder:_.placeholder,fill:_.fill,onLoadRef:p,onLoadingCompleteRef:g,setBlurComplete:v,setShowAltText:j,sizesInput:e.sizes,ref:t}),_.preload?(0,n.jsx)(b,{isAppRouter:!s,imgAttributes:S}):null]})});("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},794909,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return d},getImageProps:function(){return c}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=e.r(563141),i=e.r(908927),o=e.r(605500),l=n._(e.r(1948));function c(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,s]of Object.entries(t))void 0===s&&delete t[e];return{props:t}}let d=o.Image},657688,(e,t,s)=>{t.exports=e.r(794909)},220486,761793,964421,91500,843153,152401,e=>{"use strict";var t=e.i(843476),s=e.i(218129),r=e.i(132104),a=e.i(447593),n=e.i(245094),i=e.i(210612),o=e.i(955135),l=e.i(827252),c=e.i(438957),d=e.i(596239),u=e.i(56456),h=e.i(124608),m=e.i(983561),p=e.i(602073),f=e.i(313603),g=e.i(782273),y=e.i(232164),x=e.i(366308),b=e.i(304967),v=e.i(599724),w=e.i(779241),j=e.i(629569),S=e.i(994388),_=e.i(464571),N=e.i(311451),k=e.i(212931),E=e.i(282786),C=e.i(199133),T=e.i(482725),A=e.i(592968),P=e.i(898586),O=e.i(515831),R=e.i(271645),I=e.i(650056),M=e.i(219470),L=e.i(422233),$=e.i(891547),U=e.i(921511),D=e.i(235267),B=e.i(611052),q=e.i(727749),W=e.i(764205),z=e.i(318059),H=e.i(916940),F=e.i(953860),J=e.i(434788),G=e.i(512882),V=e.i(584976),K=e.i(254530),X=e.i(720762),Y=e.i(921687),Q=e.i(689020);e.i(247167);var Z=e.i(356449);async function ee(e,t,s,r,a,n,i,o){console.log=function(){},console.log("isLocal:",!1);let l=o||(0,W.getProxyBaseUrl)(),c=new Z.default.OpenAI({apiKey:a,baseURL:l,dangerouslyAllowBrowser:!0,defaultHeaders:n&&n.length>0?{"x-litellm-tags":n.join(",")}:void 0});try{let a=Array.isArray(e)?e:[e],n=[];for(let e=0;e1&&q.default.success(`Successfully processed ${n.length} images`)}catch(e){if(console.error("Error making image edit request:",e),i?.aborted)console.log("Image edits request was cancelled");else{let t="Failed to edit image(s)";e?.error?.message?t=e.error.message:e?.message&&(t=e.message),q.default.fromBackend(`Image edit failed: ${t}`)}throw e}}async function et(e,t,s,r,a,n,i){console.log=function(){},console.log("isLocal:",!1);let o=i||(0,W.getProxyBaseUrl)(),l=new Z.default.OpenAI({apiKey:r,baseURL:o,dangerouslyAllowBrowser:!0,defaultHeaders:a&&a.length>0?{"x-litellm-tags":a.join(",")}:void 0});try{let r=await l.images.generate({model:s,prompt:e},{signal:n});if(console.log(r.data),r.data&&r.data[0])if(r.data[0].url)t(r.data[0].url,s);else if(r.data[0].b64_json){let e=r.data[0].b64_json;t(`data:image/png;base64,${e}`,s)}else throw Error("No image data found in response");else throw Error("Invalid response format")}catch(e){throw n?.aborted?console.log("Image generation request was cancelled"):q.default.fromBackend(`Error occurred while generating image. Please try again. Error: ${e}`),e}}var es=e.i(452598),er=e.i(536916),ea=e.i(28651),en=e.i(850627);let ei=({temperature:e=1,maxTokens:s=2048,useAdvancedParams:r,onTemperatureChange:a,onMaxTokensChange:n,onUseAdvancedParamsChange:i,mockTestFallbacks:o,onMockTestFallbacksChange:c})=>{let[d,u]=(0,R.useState)(!1),h=void 0!==r?r:d,[m,p]=(0,R.useState)(e),[f,g]=(0,R.useState)(s);(0,R.useEffect)(()=>{p(e)},[e]),(0,R.useEffect)(()=>{g(s)},[s]);let y=e=>{let t=e??1;p(t),a?.(t)},x=e=>{let t=e??1e3;g(t),n?.(t)},b=h?"text-gray-700":"text-gray-400";return(0,t.jsxs)("div",{className:"space-y-4 p-4 w-80",children:[(0,t.jsx)(er.Checkbox,{checked:h,onChange:e=>{var t;return t=e.target.checked,void(i?i(t):u(t))},children:(0,t.jsx)("span",{className:"font-medium",children:"Use Advanced Parameters"})}),c&&(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(er.Checkbox,{checked:o??!1,onChange:e=>c(e.target.checked),children:(0,t.jsx)("span",{className:"font-medium",children:"Simulate failure to test fallbacks"})}),(0,t.jsx)(E.Popover,{trigger:"hover",placement:"right",content:(0,t.jsxs)("div",{style:{maxWidth:340},children:[(0,t.jsx)(P.Typography.Paragraph,{className:"text-sm",style:{marginBottom:8},children:"Causes the first request to fail so the router tries fallbacks (if configured). Use this to verify your fallback setup."}),(0,t.jsxs)(P.Typography.Paragraph,{className:"text-sm",style:{marginBottom:0},children:["Behavior can differ when keys, teams, or router settings are configured."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/keys_teams_router_settings",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800",children:"Learn more"})]})]}),children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-xs text-gray-400 cursor-pointer shrink-0 hover:text-gray-600","aria-label":"Help: Simulate failure to test fallbacks"})})]}),(0,t.jsxs)("div",{className:"space-y-4 transition-opacity duration-200",style:{opacity:h?1:.4},children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.Text,{className:`text-sm ${b}`,children:"Temperature"}),(0,t.jsx)(A.Tooltip,{title:"Controls randomness. Lower values make output more deterministic, higher values more creative.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:`text-xs ${b} cursor-help`})})]}),(0,t.jsx)(ea.InputNumber,{min:0,max:2,step:.1,value:m,onChange:y,disabled:!h,precision:1,className:"w-20"})]}),(0,t.jsx)(en.Slider,{min:0,max:2,step:.1,value:m,onChange:y,disabled:!h,marks:{0:"0",1:"1.0",2:"2.0"}})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.Text,{className:`text-sm ${b}`,children:"Max Tokens"}),(0,t.jsx)(A.Tooltip,{title:"Maximum number of tokens to generate in the response.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:`text-xs ${b} cursor-help`})})]}),(0,t.jsx)(ea.InputNumber,{min:1,max:32768,step:1,value:f,onChange:x,disabled:!h})]}),(0,t.jsx)(en.Slider,{min:1,max:32768,step:1,value:f,onChange:x,disabled:!h,marks:{1:"1",32768:"32768"}})]})]})]})};var eo=e.i(785913);let el={ALLOY:"Alloy - Professional and confident",ASH:"Ash - Casual and relaxed",BALAD:"Ballad - Smooth and melodic",CORAL:"Coral - Warm and engaging",ECHO:"Echo - Friendly and conversational",FABLE:"Fable - Wise and measured",NOVA:"Nova - Friendly and conversational",ONYX:"Onyx - Deep and authoritative",SAGE:"Sage - Wise and measured",SHIMMER:"Shimmer - Bright and cheerful"},ec=Object.entries({ALLOY:"alloy",ASH:"ash",BALAD:"ballad",CORAL:"coral",ECHO:"echo",FABLE:"fable",NOVA:"nova",ONYX:"onyx",SAGE:"sage",SHIMMER:"shimmer"}).map(([e,t])=>({value:t,label:el[e]})),ed=[{value:eo.EndpointType.CHAT,label:"/v1/chat/completions"},{value:eo.EndpointType.RESPONSES,label:"/v1/responses"},{value:eo.EndpointType.ANTHROPIC_MESSAGES,label:"/v1/messages"},{value:eo.EndpointType.IMAGE,label:"/v1/images/generations"},{value:eo.EndpointType.IMAGE_EDITS,label:"/v1/images/edits"},{value:eo.EndpointType.EMBEDDINGS,label:"/v1/embeddings"},{value:eo.EndpointType.SPEECH,label:"/v1/audio/speech"},{value:eo.EndpointType.TRANSCRIPTION,label:"/v1/audio/transcriptions"},{value:eo.EndpointType.A2A_AGENTS,label:"/v1/a2a/message/send"},{value:eo.EndpointType.MCP,label:"/mcp-rest/tools/call"},{value:eo.EndpointType.REALTIME,label:"/v1/realtime"}];var eu=e.i(955719),eu=eu;let{Dragger:eh}=O.Upload,em=({chatUploadedImage:e,chatImagePreviewUrl:s,onImageUpload:r,onRemoveImage:a})=>(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(eh,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,t.jsx)(A.Tooltip,{title:"Attach image or PDF",children:(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,t.jsx)(eu.default,{style:{fontSize:"16px"}})})})})});e.s(["default",0,em],761793);let ep=async(e,t)=>({role:"user",content:[{type:"text",text:e},{type:"image_url",image_url:{url:await new Promise((e,s)=>{let r=new FileReader;r.onload=()=>{e(r.result)},r.onerror=s,r.readAsDataURL(t)})}}]}),ef=(e,t,s,r)=>{let a="";t&&r&&(a=r.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let n={role:"user",content:t?`${e} ${a}`:e};return t&&s&&(n.imagePreviewUrl=s),n},eg=e=>"user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&!!e.imagePreviewUrl;e.s(["createChatDisplayMessage",0,ef,"createChatMultimodalMessage",0,ep,"shouldShowChatAttachedImage",0,eg],964421);var ey=e.i(790848),ex=e.i(888259),eb=e.i(270377);let ev=({enabled:e,onEnabledChange:s,selectedModel:r,disabled:a=!1})=>{let i=(e=>{if(!e)return!1;let t=e.toLowerCase();return t.startsWith("openai/")||t.startsWith("gpt-")||t.startsWith("o1")||t.startsWith("o3")||t.includes("openai")})(r);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-3 bg-gradient-to-r from-blue-50 to-purple-50",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)(n.CodeOutlined,{className:"text-blue-500"}),(0,t.jsx)(v.Text,{className:"font-medium text-gray-700",children:"Code Interpreter"}),(0,t.jsx)(A.Tooltip,{title:"Run Python code to generate files, charts, and analyze data. Container is created automatically.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400 text-xs"})})]}),(0,t.jsx)(ey.Switch,{checked:e&&i,onChange:e=>{e&&!i?ex.default.warning("Code Interpreter is only available for OpenAI models"):s(e)},disabled:a||!i,size:"small",className:e&&i?"bg-blue-500":""})]}),!i&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(eb.ExclamationCircleOutlined,{className:"text-amber-500 mt-0.5"}),(0,t.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,t.jsx)("span",{children:"Code Interpreter is currently only supported for OpenAI models. "}),(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new?template=feature_request.yml",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Request support for other providers"})]})]})})]})};var ew=e.i(190272);let ej=({endpointType:e,onEndpointChange:s,className:r})=>(0,t.jsx)("div",{className:r,children:(0,t.jsx)(C.Select,{showSearch:!0,value:e,style:{width:"100%"},onChange:s,options:ed,className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())||(t?.value??"").toLowerCase().includes(e.toLowerCase())})});var eS=e.i(931067);let e_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-pdf",theme:"outlined"};var eN=e.i(9583),ek=R.forwardRef(function(e,t){return R.createElement(eN.default,(0,eS.default)({},e,{ref:t,icon:e_}))});e.s(["FilePdfOutlined",0,ek],91500);let eE=function({file:e,previewUrl:s,onRemove:r}){let a=e.name.toLowerCase().endsWith(".pdf");return(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsx)("div",{className:"relative inline-block",children:a?(0,t.jsx)("div",{className:"w-10 h-10 rounded-md bg-red-500 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"16px",color:"white"}})}):(0,t.jsx)("img",{src:s||"",alt:"Upload preview",className:"w-10 h-10 rounded-md border border-gray-200 object-cover"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:a?"PDF":"Image"})]}),(0,t.jsx)("button",{className:"flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-600 hover:bg-gray-200 rounded-full transition-colors",onClick:r,children:(0,t.jsx)(o.DeleteOutlined,{style:{fontSize:"12px"}})})]})})};var eC=e.i(771674),eT=e.i(918789),eA=e.i(245704),eP=e.i(637235),eO=e.i(166406),eR=e.i(755151),eI=e.i(240647),eM=e.i(993914);let eL=(e,t=8)=>e?e.length>t?`${e.substring(0,t)}…`:e:null,e$=e=>{navigator.clipboard.writeText(e)},eU=({a2aMetadata:e,timeToFirstToken:s,totalLatency:r})=>{let[a,n]=(0,R.useState)(!1);if(!e&&!s&&!r)return null;let{taskId:i,contextId:o,status:l,metadata:c}=e||{},h=(e=>{if(!e)return null;try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return e}})(l?.timestamp);return(0,t.jsxs)("div",{className:"a2a-metrics mt-3 pt-2 border-t border-gray-200 text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-gray-600",children:[(0,t.jsx)(m.RobotOutlined,{className:"mr-1.5 text-blue-500"}),(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"A2A Metadata"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-gray-500 ml-4",children:[l?.state&&(0,t.jsxs)("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${(e=>{switch(e){case"completed":return"bg-green-100 text-green-700";case"working":case"submitted":return"bg-blue-100 text-blue-700";case"failed":case"canceled":return"bg-red-100 text-red-700";default:return"bg-gray-100 text-gray-700"}})(l.state)}`,children:[(e=>{switch(e){case"completed":return(0,t.jsx)(eA.CheckCircleOutlined,{className:"text-green-500"});case"working":case"submitted":return(0,t.jsx)(u.LoadingOutlined,{className:"text-blue-500"});case"failed":case"canceled":return(0,t.jsx)(eb.ExclamationCircleOutlined,{className:"text-red-500"});default:return(0,t.jsx)(eP.ClockCircleOutlined,{className:"text-gray-500"})}})(l.state),(0,t.jsx)("span",{className:"ml-1 capitalize",children:l.state})]}),h&&(0,t.jsx)(A.Tooltip,{title:l?.timestamp,children:(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)(eP.ClockCircleOutlined,{className:"mr-1"}),h]})}),void 0!==r&&(0,t.jsx)(A.Tooltip,{title:"Total latency",children:(0,t.jsxs)("span",{className:"flex items-center text-blue-600",children:[(0,t.jsx)(eP.ClockCircleOutlined,{className:"mr-1"}),(r/1e3).toFixed(2),"s"]})}),void 0!==s&&(0,t.jsx)(A.Tooltip,{title:"Time to first token",children:(0,t.jsxs)("span",{className:"flex items-center text-green-600",children:["TTFT: ",(s/1e3).toFixed(2),"s"]})})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-gray-500 ml-4 mt-1.5",children:[i&&(0,t.jsx)(A.Tooltip,{title:`Click to copy: ${i}`,children:(0,t.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>e$(i),children:[(0,t.jsx)(eM.FileTextOutlined,{className:"mr-1"}),"Task: ",eL(i),(0,t.jsx)(eO.CopyOutlined,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),o&&(0,t.jsx)(A.Tooltip,{title:`Click to copy: ${o}`,children:(0,t.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>e$(o),children:[(0,t.jsx)(d.LinkOutlined,{className:"mr-1"}),"Session: ",eL(o),(0,t.jsx)(eO.CopyOutlined,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),(c||l?.message)&&(0,t.jsxs)(_.Button,{type:"text",size:"small",className:"text-xs text-blue-500 hover:text-blue-700 p-0 h-auto",onClick:()=>n(!a),children:[a?(0,t.jsx)(eR.DownOutlined,{}):(0,t.jsx)(eI.RightOutlined,{}),(0,t.jsx)("span",{className:"ml-1",children:"Details"})]})]}),a&&(0,t.jsxs)("div",{className:"mt-2 ml-4 p-3 bg-gray-50 rounded-md text-gray-600 border border-gray-200",children:[l?.message&&(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"Status Message:"}),(0,t.jsx)("span",{className:"ml-2",children:l.message})]}),i&&(0,t.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Task ID:"}),(0,t.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:i}),(0,t.jsx)(eO.CopyOutlined,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>e$(i)})]}),o&&(0,t.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Session ID:"}),(0,t.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:o}),(0,t.jsx)(eO.CopyOutlined,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>e$(o)})]}),c&&Object.keys(c).length>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"Custom Metadata:"}),(0,t.jsx)("pre",{className:"mt-1.5 p-2 bg-white border border-gray-200 rounded text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:JSON.stringify(c,null,2)})]})]})]})},eD=({message:e})=>e.isAudio&&"string"==typeof e.content?(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)("audio",{controls:!0,src:e.content,className:"max-w-full",style:{maxWidth:"500px"},children:"Your browser does not support the audio element."})}):null;var eB=e.i(657688);let eq=({message:e})=>{if(!eg(e))return null;let s="string"==typeof e.content&&e.content.includes("[PDF attached]");return(0,t.jsx)("div",{className:"mb-2",children:s?(0,t.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,t.jsx)(eB.default,{src:e.imagePreviewUrl||"",alt:"User uploaded image",width:256,height:200,className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px",width:"auto",height:"auto"}})})};e.s(["default",0,eq],843153);var eW=e.i(362024),ez=e.i(737434);let eH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"};var eF=R.forwardRef(function(e,t){return R.createElement(eN.default,(0,eS.default)({},e,{ref:t,icon:eH}))});let eJ=({code:e,containerId:s,annotations:r=[],accessToken:a})=>{let[i,o]=(0,R.useState)({}),[l,c]=(0,R.useState)({}),d=(0,W.getProxyBaseUrl)();(0,R.useEffect)(()=>{let e=async()=>{for(let e of r)if((e.filename?.toLowerCase().endsWith(".png")||e.filename?.toLowerCase().endsWith(".jpg")||e.filename?.toLowerCase().endsWith(".jpeg")||e.filename?.toLowerCase().endsWith(".gif"))&&e.container_id&&e.file_id){c(t=>({...t,[e.file_id]:!0}));try{let t=await fetch(`${d}/v1/containers/${e.container_id}/files/${e.file_id}/content`,{headers:{[(0,W.getGlobalLitellmHeaderName)()]:`Bearer ${a}`}});if(t.ok){let s=await t.blob(),r=URL.createObjectURL(s);o(t=>({...t,[e.file_id]:r}))}}catch(e){console.error("Error fetching image:",e)}finally{c(t=>({...t,[e.file_id]:!1}))}}};return r.length>0&&a&&e(),()=>{Object.values(i).forEach(e=>URL.revokeObjectURL(e))}},[r,a,d]);let h=async e=>{try{let t=await fetch(`${d}/v1/containers/${e.container_id}/files/${e.file_id}/content`,{headers:{[(0,W.getGlobalLitellmHeaderName)()]:`Bearer ${a}`}});if(t.ok){let s=await t.blob(),r=URL.createObjectURL(s),a=document.createElement("a");a.href=r,a.download=e.filename||`file_${e.file_id}`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}}catch(e){console.error("Error downloading file:",e)}},m=r.filter(e=>e.filename?.toLowerCase().endsWith(".png")||e.filename?.toLowerCase().endsWith(".jpg")||e.filename?.toLowerCase().endsWith(".jpeg")||e.filename?.toLowerCase().endsWith(".gif")),p=r.filter(e=>!e.filename?.toLowerCase().endsWith(".png")&&!e.filename?.toLowerCase().endsWith(".jpg")&&!e.filename?.toLowerCase().endsWith(".jpeg")&&!e.filename?.toLowerCase().endsWith(".gif"));return e||0!==r.length?(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[e&&(0,t.jsx)(eW.Collapse,{size:"small",items:[{key:"code",label:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm text-gray-600",children:[(0,t.jsx)(n.CodeOutlined,{})," Python Code Executed"]}),children:(0,t.jsx)(I.Prism,{language:"python",style:M.coy,customStyle:{margin:0,borderRadius:"6px",fontSize:"12px",maxHeight:"300px",overflow:"auto"},children:e})}]}),m.map(e=>(0,t.jsx)("div",{className:"rounded-lg border border-gray-200 overflow-hidden",children:l[e.file_id]?(0,t.jsxs)("div",{className:"flex items-center justify-center p-8 bg-gray-50",children:[(0,t.jsx)(T.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0})}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:"Loading image..."})]}):i[e.file_id]?(0,t.jsxs)("div",{children:[(0,t.jsx)("img",{src:i[e.file_id],alt:e.filename||"Generated chart",className:"max-w-full",style:{maxHeight:"400px"}}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-50 border-t border-gray-200",children:[(0,t.jsxs)("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[(0,t.jsx)(eF,{})," ",e.filename]}),(0,t.jsxs)("button",{onClick:()=>h(e),className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1",children:[(0,t.jsx)(ez.DownloadOutlined,{})," Download"]})]})]}):(0,t.jsx)("div",{className:"flex items-center justify-center p-4 bg-gray-50",children:(0,t.jsx)("span",{className:"text-sm text-gray-400",children:"Image not available"})})},e.file_id)),p.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:p.map(e=>(0,t.jsxs)("button",{onClick:()=>h(e),className:"flex items-center gap-2 px-3 py-2 bg-gray-50 border border-gray-200 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,t.jsx)(eM.FileTextOutlined,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"text-sm",children:e.filename}),(0,t.jsx)(ez.DownloadOutlined,{className:"text-gray-400"})]},e.file_id))})]}):null};var eG=e.i(355343),eV=e.i(966988),eK=e.i(989022);let eX=async(e,t)=>{let s=await new Promise((e,s)=>{let r=new FileReader;r.onload=()=>{e(r.result.split(",")[1])},r.onerror=s,r.readAsDataURL(t)}),r=t.type||(t.name.toLowerCase().endsWith(".pdf")?"application/pdf":"image/jpeg");return{role:"user",content:[{type:"input_text",text:e},{type:"input_image",image_url:`data:${r};base64,${s}`}]}},eY=(e,t,s,r)=>{let a="";t&&r&&(a=r.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let n={role:"user",content:t?`${e} ${a}`:e};return t&&s&&(n.imagePreviewUrl=s),n},eQ=({message:e})=>{if(!("user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&e.imagePreviewUrl))return null;let s="string"==typeof e.content&&e.content.includes("[PDF attached]");return(0,t.jsx)("div",{className:"mb-2",children:s?(0,t.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,t.jsx)("img",{src:e.imagePreviewUrl,alt:"User uploaded image",className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px"}})})};function eZ({searchResults:e}){let[s,r]=(0,R.useState)(!0),[a,n]=(0,R.useState)({});if(!e||0===e.length)return null;let o=e.reduce((e,t)=>e+t.data.length,0);return(0,t.jsxs)("div",{className:"search-results-content mt-1 mb-2",children:[(0,t.jsxs)(_.Button,{type:"text",className:"flex items-center text-xs text-gray-500 hover:text-gray-700",onClick:()=>r(!s),icon:(0,t.jsx)(i.DatabaseOutlined,{}),children:[s?"Hide sources":`Show sources (${o})`,s?(0,t.jsx)(eR.DownOutlined,{className:"ml-1"}):(0,t.jsx)(eI.RightOutlined,{className:"ml-1"})]}),s&&(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md text-sm",children:(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-xs text-gray-600 mb-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:"Query:"}),(0,t.jsxs)("span",{className:"italic",children:['"',e.search_query,'"']}),(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("span",{className:"text-gray-500",children:[e.data.length," result",1!==e.data.length?"s":""]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-md overflow-hidden bg-white",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-2 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>{let e;return e=`${s}-${r}`,void n(t=>({...t,[e]:!t[e]}))},children:(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform flex-shrink-0 ${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.jsx)(eM.FileTextOutlined,{className:"text-gray-400 flex-shrink-0",style:{fontSize:"12px"}}),(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 truncate",children:e.filename||e.file_id||`Result ${r+1}`}),(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-blue-100 text-blue-700 font-mono flex-shrink-0",children:e.score.toFixed(3)})]})}),i&&(0,t.jsx)("div",{className:"border-t border-gray-200 bg-white",children:(0,t.jsxs)("div",{className:"p-3 space-y-2",children:[e.content.map((e,s)=>(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"text-xs font-mono bg-gray-50 p-2 rounded text-gray-800 whitespace-pre-wrap break-words",children:e.text})},s)),e.attributes&&Object.keys(e.attributes).length>0&&(0,t.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-100",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1 font-medium",children:"Metadata:"}),(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(e.attributes).map(([e,s])=>(0,t.jsxs)("div",{className:"text-xs flex gap-2",children:[(0,t.jsxs)("span",{className:"text-gray-500 font-medium",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-700 font-mono break-all",children:String(s)})]},e))})]})]})})]},r)})})]},s))})})]})}e.s(["SearchResultsDisplay",()=>eZ],152401);let e0=function({message:e,isLastMessage:s,endpointType:r,mcpEvents:a,codeInterpreterResult:n,accessToken:i}){let o="user"===e.role;return(0,t.jsx)("div",{className:`mb-4 ${o?"text-right":"text-left"}`,children:(0,t.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:o?"#f0f8ff":"#ffffff",border:o?"1px solid #e6f0fa":"1px solid #f0f0f0",textAlign:"left"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:o?"#e6f0fa":"#f5f5f5"},children:o?(0,t.jsx)(eC.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(m.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),e.reasoningContent&&(0,t.jsx)(eV.default,{reasoningContent:e.reasoningContent}),"assistant"===e.role&&s&&a.length>0&&(r===eo.EndpointType.RESPONSES||r===eo.EndpointType.CHAT)&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(eG.default,{events:a})}),"assistant"===e.role&&e.searchResults&&(0,t.jsx)(eZ,{searchResults:e.searchResults}),"assistant"===e.role&&s&&n&&r===eo.EndpointType.RESPONSES&&(0,t.jsx)(eJ,{code:n.code,containerId:n.containerId,annotations:n.annotations,accessToken:i}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:[e.isImage?(0,t.jsx)("img",{src:"string"==typeof e.content?e.content:"",alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}}):e.isAudio?(0,t.jsx)(eD,{message:e}):(0,t.jsxs)(t.Fragment,{children:[r===eo.EndpointType.RESPONSES&&(0,t.jsx)(eQ,{message:e}),r===eo.EndpointType.CHAT&&(0,t.jsx)(eq,{message:e}),(0,t.jsx)(eT.default,{components:{code({node:e,inline:s,className:r,children:a,...n}){let i=/language-(\w+)/.exec(r||"");return!s&&i?(0,t.jsx)(I.Prism,{style:M.coy,language:i[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...n,children:String(a).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${r} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...n,children:a})},pre:({node:e,...s})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})},children:"string"==typeof e.content?e.content:""}),e.image&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("img",{src:e.image.url,alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}})})]}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&!e.a2aMetadata&&(0,t.jsx)(eK.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage,toolName:e.toolName}),"assistant"===e.role&&e.a2aMetadata&&(0,t.jsx)(eU,{a2aMetadata:e.a2aMetadata,timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency})]})]})})};var eu=eu;let{Dragger:e1}=O.Upload,e2=({responsesUploadedImage:e,responsesImagePreviewUrl:s,onImageUpload:r,onRemoveImage:a})=>(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(e1,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,t.jsx)(A.Tooltip,{title:"Attach image or PDF",children:(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,t.jsx)(eu.default,{style:{fontSize:"16px"}})})})})}),e4=({endpointType:e,responsesSessionId:s,useApiSessionManagement:r,onToggleSessionManagement:a})=>e!==eo.EndpointType.RESPONSES?null:(0,t.jsxs)("div",{className:"mb-4",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)("span",{className:"text-sm font-medium text-gray-700",children:"Session Management"}),(0,t.jsx)(A.Tooltip,{title:"Choose between LiteLLM API session management (using previous_response_id) or UI-based session management (using chat history)",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400",style:{fontSize:"12px"}})})]}),(0,t.jsx)(ey.Switch,{checked:r,onChange:a,checkedChildren:"API",unCheckedChildren:"UI",size:"small"})]}),(0,t.jsxs)("div",{className:`text-xs p-2 rounded-md ${s?"bg-green-50 text-green-700 border border-green-200":"bg-blue-50 text-blue-700 border border-blue-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(l.InfoCircleOutlined,{style:{fontSize:"12px"}}),(()=>{if(!s)return r?"API Session: Ready":"UI Session: Ready";let e=r?"Response ID":"UI Session",t=s.slice(0,10);return`${e}: ${t}...`})()]}),s&&(0,t.jsx)(A.Tooltip,{title:(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"mb-1",children:"Copy response ID to continue session:"}),(0,t.jsx)("div",{className:"bg-gray-800 text-gray-100 p-2 rounded font-mono text-xs whitespace-pre-wrap",children:`curl -X POST "your-proxy-url/v1/responses" \\ +Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let i=(0,r.findClosestQuality)(n,e),o=(0,a.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${s}&q=${i}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}n.__next_img_default=!0;let i=n},605500,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"Image",{enumerable:!0,get:function(){return v}});let r=e.r(563141),a=e.r(151836),n=e.r(843476),i=a._(e.r(271645)),o=r._(e.r(174080)),l=r._(e.r(325633)),c=e.r(908927),d=e.r(987690),u=e.r(918556);e.r(233525);let h=e.r(65856),m=r._(e.r(1948)),p=e.r(818581),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function g(e,t,s,r,a,n,i){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),s?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,a=!1;s.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function y(e){return i.use?{fetchPriority:e}:{fetchpriority:e}}"u"{let E=(0,i.useCallback)(e=>{e&&(_&&(e.src=e.src),e.complete&&g(e,u,x,b,v,m,j))},[e,u,x,b,v,_,m,j]),C=(0,p.useMergedRef)(k,E);return(0,n.jsx)("img",{...N,...y(d),loading:h,width:a,height:r,decoding:o,"data-nimg":f?"fill":"1",className:l,style:c,sizes:s,srcSet:t,src:e,ref:C,onLoad:e=>{g(e.currentTarget,u,x,b,v,m,j)},onError:e=>{w(!0),"empty"!==u&&v(!0),_&&_(e)}})});function b({isAppRouter:e,imgAttributes:t}){let s={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...y(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,s),null):(0,n.jsx)(l.default,{children:(0,n.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...s},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,i.forwardRef)((e,t)=>{let s=(0,i.useContext)(h.RouterContext),r=(0,i.useContext)(u.ImageConfigContext),a=(0,i.useMemo)(()=>{let e=f||r||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),s=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:s,qualities:a,localPatterns:"u"{p.current=o},[o]);let g=(0,i.useRef)(l);(0,i.useEffect)(()=>{g.current=l},[l]);let[y,v]=(0,i.useState)(!1),[w,j]=(0,i.useState)(!1),{props:S,meta:_}=(0,c.getImgProps)(e,{defaultLoader:m.default,imgConf:a,blurComplete:y,showAltText:w});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x,{...S,unoptimized:_.unoptimized,placeholder:_.placeholder,fill:_.fill,onLoadRef:p,onLoadingCompleteRef:g,setBlurComplete:v,setShowAltText:j,sizesInput:e.sizes,ref:t}),_.preload?(0,n.jsx)(b,{isAppRouter:!s,imgAttributes:S}):null]})});("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},794909,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return d},getImageProps:function(){return c}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=e.r(563141),i=e.r(908927),o=e.r(605500),l=n._(e.r(1948));function c(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,s]of Object.entries(t))void 0===s&&delete t[e];return{props:t}}let d=o.Image},657688,(e,t,s)=>{t.exports=e.r(794909)},220486,761793,964421,91500,843153,152401,e=>{"use strict";var t=e.i(843476),s=e.i(218129),r=e.i(132104),a=e.i(447593),n=e.i(245094),i=e.i(210612),o=e.i(955135),l=e.i(827252),c=e.i(438957),d=e.i(596239),u=e.i(56456),h=e.i(124608),m=e.i(983561),p=e.i(602073),f=e.i(313603),g=e.i(782273),y=e.i(232164),x=e.i(366308),b=e.i(304967),v=e.i(599724),w=e.i(779241),j=e.i(629569),S=e.i(994388),_=e.i(464571),N=e.i(311451),k=e.i(212931),E=e.i(282786),C=e.i(199133),T=e.i(482725),A=e.i(592968),P=e.i(898586),O=e.i(515831),R=e.i(271645),I=e.i(650056),M=e.i(219470),L=e.i(422233),$=e.i(891547),U=e.i(921511),D=e.i(235267),B=e.i(611052),q=e.i(727749),W=e.i(764205),z=e.i(318059),H=e.i(916940),F=e.i(953860),J=e.i(434788),G=e.i(512882),V=e.i(584976),K=e.i(254530),X=e.i(720762),Y=e.i(921687),Q=e.i(689020);e.i(247167);var Z=e.i(356449);async function ee(e,t,s,r,a,n,i,o){console.log=function(){},console.log("isLocal:",!1);let l=o||(0,W.getProxyBaseUrl)(),c=new Z.default.OpenAI({apiKey:a,baseURL:l,dangerouslyAllowBrowser:!0,defaultHeaders:n&&n.length>0?{"x-litellm-tags":n.join(",")}:void 0});try{let a=Array.isArray(e)?e:[e],n=[];for(let e=0;e1&&q.default.success(`Successfully processed ${n.length} images`)}catch(e){if(console.error("Error making image edit request:",e),i?.aborted)console.log("Image edits request was cancelled");else{let t="Failed to edit image(s)";e?.error?.message?t=e.error.message:e?.message&&(t=e.message),q.default.fromBackend(`Image edit failed: ${t}`)}throw e}}async function et(e,t,s,r,a,n,i){console.log=function(){},console.log("isLocal:",!1);let o=i||(0,W.getProxyBaseUrl)(),l=new Z.default.OpenAI({apiKey:r,baseURL:o,dangerouslyAllowBrowser:!0,defaultHeaders:a&&a.length>0?{"x-litellm-tags":a.join(",")}:void 0});try{let r=await l.images.generate({model:s,prompt:e},{signal:n});if(console.log(r.data),r.data&&r.data[0])if(r.data[0].url)t(r.data[0].url,s);else if(r.data[0].b64_json){let e=r.data[0].b64_json;t(`data:image/png;base64,${e}`,s)}else throw Error("No image data found in response");else throw Error("Invalid response format")}catch(e){throw n?.aborted?console.log("Image generation request was cancelled"):q.default.fromBackend(`Error occurred while generating image. Please try again. Error: ${e}`),e}}var es=e.i(452598),er=e.i(536916),ea=e.i(28651),en=e.i(850627);let ei=({temperature:e=1,maxTokens:s=2048,useAdvancedParams:r,onTemperatureChange:a,onMaxTokensChange:n,onUseAdvancedParamsChange:i,mockTestFallbacks:o,onMockTestFallbacksChange:c})=>{let[d,u]=(0,R.useState)(!1),h=void 0!==r?r:d,[m,p]=(0,R.useState)(e),[f,g]=(0,R.useState)(s);(0,R.useEffect)(()=>{p(e)},[e]),(0,R.useEffect)(()=>{g(s)},[s]);let y=e=>{let t=e??1;p(t),a?.(t)},x=e=>{let t=e??1e3;g(t),n?.(t)},b=h?"text-gray-700":"text-gray-400";return(0,t.jsxs)("div",{className:"space-y-4 p-4 w-80",children:[(0,t.jsx)(er.Checkbox,{checked:h,onChange:e=>{var t;return t=e.target.checked,void(i?i(t):u(t))},children:(0,t.jsx)("span",{className:"font-medium",children:"Use Advanced Parameters"})}),c&&(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(er.Checkbox,{checked:o??!1,onChange:e=>c(e.target.checked),children:(0,t.jsx)("span",{className:"font-medium",children:"Simulate failure to test fallbacks"})}),(0,t.jsx)(E.Popover,{trigger:"hover",placement:"right",content:(0,t.jsxs)("div",{style:{maxWidth:340},children:[(0,t.jsx)(P.Typography.Paragraph,{className:"text-sm",style:{marginBottom:8},children:"Causes the first request to fail so the router tries fallbacks (if configured). Use this to verify your fallback setup."}),(0,t.jsxs)(P.Typography.Paragraph,{className:"text-sm",style:{marginBottom:0},children:["Behavior can differ when keys, teams, or router settings are configured."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/keys_teams_router_settings",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800",children:"Learn more"})]})]}),children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-xs text-gray-400 cursor-pointer shrink-0 hover:text-gray-600","aria-label":"Help: Simulate failure to test fallbacks"})})]}),(0,t.jsxs)("div",{className:"space-y-4 transition-opacity duration-200",style:{opacity:h?1:.4},children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.Text,{className:`text-sm ${b}`,children:"Temperature"}),(0,t.jsx)(A.Tooltip,{title:"Controls randomness. Lower values make output more deterministic, higher values more creative.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:`text-xs ${b} cursor-help`})})]}),(0,t.jsx)(ea.InputNumber,{min:0,max:2,step:.1,value:m,onChange:y,disabled:!h,precision:1,className:"w-20"})]}),(0,t.jsx)(en.Slider,{min:0,max:2,step:.1,value:m,onChange:y,disabled:!h,marks:{0:"0",1:"1.0",2:"2.0"}})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.Text,{className:`text-sm ${b}`,children:"Max Tokens"}),(0,t.jsx)(A.Tooltip,{title:"Maximum number of tokens to generate in the response.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:`text-xs ${b} cursor-help`})})]}),(0,t.jsx)(ea.InputNumber,{min:1,max:32768,step:1,value:f,onChange:x,disabled:!h})]}),(0,t.jsx)(en.Slider,{min:1,max:32768,step:1,value:f,onChange:x,disabled:!h,marks:{1:"1",32768:"32768"}})]})]})]})};var eo=e.i(785913);let el={ALLOY:"Alloy - Professional and confident",ASH:"Ash - Casual and relaxed",BALAD:"Ballad - Smooth and melodic",CORAL:"Coral - Warm and engaging",ECHO:"Echo - Friendly and conversational",FABLE:"Fable - Wise and measured",NOVA:"Nova - Friendly and conversational",ONYX:"Onyx - Deep and authoritative",SAGE:"Sage - Wise and measured",SHIMMER:"Shimmer - Bright and cheerful"},ec=Object.entries({ALLOY:"alloy",ASH:"ash",BALAD:"ballad",CORAL:"coral",ECHO:"echo",FABLE:"fable",NOVA:"nova",ONYX:"onyx",SAGE:"sage",SHIMMER:"shimmer"}).map(([e,t])=>({value:t,label:el[e]})),ed=[{value:eo.EndpointType.CHAT,label:"/v1/chat/completions"},{value:eo.EndpointType.RESPONSES,label:"/v1/responses"},{value:eo.EndpointType.ANTHROPIC_MESSAGES,label:"/v1/messages"},{value:eo.EndpointType.IMAGE,label:"/v1/images/generations"},{value:eo.EndpointType.IMAGE_EDITS,label:"/v1/images/edits"},{value:eo.EndpointType.EMBEDDINGS,label:"/v1/embeddings"},{value:eo.EndpointType.SPEECH,label:"/v1/audio/speech"},{value:eo.EndpointType.TRANSCRIPTION,label:"/v1/audio/transcriptions"},{value:eo.EndpointType.A2A_AGENTS,label:"/v1/a2a/message/send"},{value:eo.EndpointType.MCP,label:"/mcp-rest/tools/call"},{value:eo.EndpointType.REALTIME,label:"/v1/realtime"}];var eu=e.i(955719),eu=eu;let{Dragger:eh}=O.Upload,em=({chatUploadedImage:e,chatImagePreviewUrl:s,onImageUpload:r,onRemoveImage:a})=>(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(eh,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,t.jsx)(A.Tooltip,{title:"Attach image or PDF",children:(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,t.jsx)(eu.default,{style:{fontSize:"16px"}})})})})});e.s(["default",0,em],761793);let ep=async(e,t)=>({role:"user",content:[{type:"text",text:e},{type:"image_url",image_url:{url:await new Promise((e,s)=>{let r=new FileReader;r.onload=()=>{e(r.result)},r.onerror=s,r.readAsDataURL(t)})}}]}),ef=(e,t,s,r)=>{let a="";t&&r&&(a=r.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let n={role:"user",content:t?`${e} ${a}`:e};return t&&s&&(n.imagePreviewUrl=s),n},eg=e=>"user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&!!e.imagePreviewUrl;e.s(["createChatDisplayMessage",0,ef,"createChatMultimodalMessage",0,ep,"shouldShowChatAttachedImage",0,eg],964421);var ey=e.i(790848),ex=e.i(888259),eb=e.i(270377);let ev=({enabled:e,onEnabledChange:s,selectedModel:r,disabled:a=!1})=>{let i=(e=>{if(!e)return!1;let t=e.toLowerCase();return t.startsWith("openai/")||t.startsWith("gpt-")||t.startsWith("o1")||t.startsWith("o3")||t.includes("openai")})(r);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-3 bg-gradient-to-r from-blue-50 to-purple-50",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)(n.CodeOutlined,{className:"text-blue-500"}),(0,t.jsx)(v.Text,{className:"font-medium text-gray-700",children:"Code Interpreter"}),(0,t.jsx)(A.Tooltip,{title:"Run Python code to generate files, charts, and analyze data. Container is created automatically.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400 text-xs"})})]}),(0,t.jsx)(ey.Switch,{checked:e&&i,onChange:e=>{e&&!i?ex.default.warning("Code Interpreter is only available for OpenAI models"):s(e)},disabled:a||!i,size:"small",className:e&&i?"bg-blue-500":""})]}),!i&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(eb.ExclamationCircleOutlined,{className:"text-amber-500 mt-0.5"}),(0,t.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,t.jsx)("span",{children:"Code Interpreter is currently only supported for OpenAI models. "}),(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new?template=feature_request.yml",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Request support for other providers"})]})]})})]})};var ew=e.i(190272);let ej=({endpointType:e,onEndpointChange:s,className:r})=>(0,t.jsx)("div",{className:r,children:(0,t.jsx)(C.Select,{showSearch:!0,value:e,style:{width:"100%"},onChange:s,options:ed,className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())||(t?.value??"").toLowerCase().includes(e.toLowerCase())})});var eS=e.i(931067);let e_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-pdf",theme:"outlined"};var eN=e.i(9583),ek=R.forwardRef(function(e,t){return R.createElement(eN.default,(0,eS.default)({},e,{ref:t,icon:e_}))});e.s(["FilePdfOutlined",0,ek],91500);let eE=function({file:e,previewUrl:s,onRemove:r}){let a=e.name.toLowerCase().endsWith(".pdf");return(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsx)("div",{className:"relative inline-block",children:a?(0,t.jsx)("div",{className:"w-10 h-10 rounded-md bg-red-500 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"16px",color:"white"}})}):(0,t.jsx)("img",{src:s||"",alt:"Upload preview",className:"w-10 h-10 rounded-md border border-gray-200 object-cover"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:a?"PDF":"Image"})]}),(0,t.jsx)("button",{className:"flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-600 hover:bg-gray-200 rounded-full transition-colors",onClick:r,children:(0,t.jsx)(o.DeleteOutlined,{style:{fontSize:"12px"}})})]})})};var eC=e.i(771674),eT=e.i(918789),eA=e.i(245704),eP=e.i(637235),eO=e.i(166406),eR=e.i(755151),eI=e.i(240647),eM=e.i(993914);let eL=(e,t=8)=>e?e.length>t?`${e.substring(0,t)}…`:e:null,e$=e=>{navigator.clipboard.writeText(e)},eU=({a2aMetadata:e,timeToFirstToken:s,totalLatency:r})=>{let[a,n]=(0,R.useState)(!1);if(!e&&!s&&!r)return null;let{taskId:i,contextId:o,status:l,metadata:c}=e||{},h=(e=>{if(!e)return null;try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return e}})(l?.timestamp);return(0,t.jsxs)("div",{className:"a2a-metrics mt-3 pt-2 border-t border-gray-200 text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-gray-600",children:[(0,t.jsx)(m.RobotOutlined,{className:"mr-1.5 text-blue-500"}),(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"A2A Metadata"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-gray-500 ml-4",children:[l?.state&&(0,t.jsxs)("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${(e=>{switch(e){case"completed":return"bg-green-100 text-green-700";case"working":case"submitted":return"bg-blue-100 text-blue-700";case"failed":case"canceled":return"bg-red-100 text-red-700";default:return"bg-gray-100 text-gray-700"}})(l.state)}`,children:[(e=>{switch(e){case"completed":return(0,t.jsx)(eA.CheckCircleOutlined,{className:"text-green-500"});case"working":case"submitted":return(0,t.jsx)(u.LoadingOutlined,{className:"text-blue-500"});case"failed":case"canceled":return(0,t.jsx)(eb.ExclamationCircleOutlined,{className:"text-red-500"});default:return(0,t.jsx)(eP.ClockCircleOutlined,{className:"text-gray-500"})}})(l.state),(0,t.jsx)("span",{className:"ml-1 capitalize",children:l.state})]}),h&&(0,t.jsx)(A.Tooltip,{title:l?.timestamp,children:(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)(eP.ClockCircleOutlined,{className:"mr-1"}),h]})}),void 0!==r&&(0,t.jsx)(A.Tooltip,{title:"Total latency",children:(0,t.jsxs)("span",{className:"flex items-center text-blue-600",children:[(0,t.jsx)(eP.ClockCircleOutlined,{className:"mr-1"}),(r/1e3).toFixed(2),"s"]})}),void 0!==s&&(0,t.jsx)(A.Tooltip,{title:"Time to first token",children:(0,t.jsxs)("span",{className:"flex items-center text-green-600",children:["TTFT: ",(s/1e3).toFixed(2),"s"]})})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-gray-500 ml-4 mt-1.5",children:[i&&(0,t.jsx)(A.Tooltip,{title:`Click to copy: ${i}`,children:(0,t.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>e$(i),children:[(0,t.jsx)(eM.FileTextOutlined,{className:"mr-1"}),"Task: ",eL(i),(0,t.jsx)(eO.CopyOutlined,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),o&&(0,t.jsx)(A.Tooltip,{title:`Click to copy: ${o}`,children:(0,t.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>e$(o),children:[(0,t.jsx)(d.LinkOutlined,{className:"mr-1"}),"Session: ",eL(o),(0,t.jsx)(eO.CopyOutlined,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),(c||l?.message)&&(0,t.jsxs)(_.Button,{type:"text",size:"small",className:"text-xs text-blue-500 hover:text-blue-700 p-0 h-auto",onClick:()=>n(!a),children:[a?(0,t.jsx)(eR.DownOutlined,{}):(0,t.jsx)(eI.RightOutlined,{}),(0,t.jsx)("span",{className:"ml-1",children:"Details"})]})]}),a&&(0,t.jsxs)("div",{className:"mt-2 ml-4 p-3 bg-gray-50 rounded-md text-gray-600 border border-gray-200",children:[l?.message&&(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"Status Message:"}),(0,t.jsx)("span",{className:"ml-2",children:l.message})]}),i&&(0,t.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Task ID:"}),(0,t.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:i}),(0,t.jsx)(eO.CopyOutlined,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>e$(i)})]}),o&&(0,t.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Session ID:"}),(0,t.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:o}),(0,t.jsx)(eO.CopyOutlined,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>e$(o)})]}),c&&Object.keys(c).length>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"Custom Metadata:"}),(0,t.jsx)("pre",{className:"mt-1.5 p-2 bg-white border border-gray-200 rounded text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:JSON.stringify(c,null,2)})]})]})]})},eD=({message:e})=>e.isAudio&&"string"==typeof e.content?(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)("audio",{controls:!0,src:e.content,className:"max-w-full",style:{maxWidth:"500px"},children:"Your browser does not support the audio element."})}):null;var eB=e.i(657688);let eq=({message:e})=>{if(!eg(e))return null;let s="string"==typeof e.content&&e.content.includes("[PDF attached]");return(0,t.jsx)("div",{className:"mb-2",children:s?(0,t.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,t.jsx)(eB.default,{src:e.imagePreviewUrl||"",alt:"User uploaded image",width:256,height:200,className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px",width:"auto",height:"auto"}})})};e.s(["default",0,eq],843153);var eW=e.i(362024),ez=e.i(737434);let eH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"};var eF=R.forwardRef(function(e,t){return R.createElement(eN.default,(0,eS.default)({},e,{ref:t,icon:eH}))});let eJ=({code:e,containerId:s,annotations:r=[],accessToken:a})=>{let[i,o]=(0,R.useState)({}),[l,c]=(0,R.useState)({}),d=(0,W.getProxyBaseUrl)();(0,R.useEffect)(()=>{let e=async()=>{for(let e of r)if((e.filename?.toLowerCase().endsWith(".png")||e.filename?.toLowerCase().endsWith(".jpg")||e.filename?.toLowerCase().endsWith(".jpeg")||e.filename?.toLowerCase().endsWith(".gif"))&&e.container_id&&e.file_id){c(t=>({...t,[e.file_id]:!0}));try{let t=await fetch(`${d}/v1/containers/${e.container_id}/files/${e.file_id}/content`,{headers:{[(0,W.getGlobalLitellmHeaderName)()]:`Bearer ${a}`}});if(t.ok){let s=await t.blob(),r=URL.createObjectURL(s);o(t=>({...t,[e.file_id]:r}))}}catch(e){console.error("Error fetching image:",e)}finally{c(t=>({...t,[e.file_id]:!1}))}}};return r.length>0&&a&&e(),()=>{Object.values(i).forEach(e=>URL.revokeObjectURL(e))}},[r,a,d]);let h=async e=>{try{let t=await fetch(`${d}/v1/containers/${e.container_id}/files/${e.file_id}/content`,{headers:{[(0,W.getGlobalLitellmHeaderName)()]:`Bearer ${a}`}});if(t.ok){let s=await t.blob(),r=URL.createObjectURL(s),a=document.createElement("a");a.href=r,a.download=e.filename||`file_${e.file_id}`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}}catch(e){console.error("Error downloading file:",e)}},m=r.filter(e=>e.filename?.toLowerCase().endsWith(".png")||e.filename?.toLowerCase().endsWith(".jpg")||e.filename?.toLowerCase().endsWith(".jpeg")||e.filename?.toLowerCase().endsWith(".gif")),p=r.filter(e=>!e.filename?.toLowerCase().endsWith(".png")&&!e.filename?.toLowerCase().endsWith(".jpg")&&!e.filename?.toLowerCase().endsWith(".jpeg")&&!e.filename?.toLowerCase().endsWith(".gif"));return e||0!==r.length?(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[e&&(0,t.jsx)(eW.Collapse,{size:"small",items:[{key:"code",label:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm text-gray-600",children:[(0,t.jsx)(n.CodeOutlined,{})," Python Code Executed"]}),children:(0,t.jsx)(I.Prism,{language:"python",style:M.coy,customStyle:{margin:0,borderRadius:"6px",fontSize:"12px",maxHeight:"300px",overflow:"auto"},children:e})}]}),m.map(e=>(0,t.jsx)("div",{className:"rounded-lg border border-gray-200 overflow-hidden",children:l[e.file_id]?(0,t.jsxs)("div",{className:"flex items-center justify-center p-8 bg-gray-50",children:[(0,t.jsx)(T.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0})}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:"Loading image..."})]}):i[e.file_id]?(0,t.jsxs)("div",{children:[(0,t.jsx)("img",{src:i[e.file_id],alt:e.filename||"Generated chart",className:"max-w-full",style:{maxHeight:"400px"}}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-50 border-t border-gray-200",children:[(0,t.jsxs)("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[(0,t.jsx)(eF,{})," ",e.filename]}),(0,t.jsxs)("button",{onClick:()=>h(e),className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1",children:[(0,t.jsx)(ez.DownloadOutlined,{})," Download"]})]})]}):(0,t.jsx)("div",{className:"flex items-center justify-center p-4 bg-gray-50",children:(0,t.jsx)("span",{className:"text-sm text-gray-400",children:"Image not available"})})},e.file_id)),p.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:p.map(e=>(0,t.jsxs)("button",{onClick:()=>h(e),className:"flex items-center gap-2 px-3 py-2 bg-gray-50 border border-gray-200 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,t.jsx)(eM.FileTextOutlined,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"text-sm",children:e.filename}),(0,t.jsx)(ez.DownloadOutlined,{className:"text-gray-400"})]},e.file_id))})]}):null};var eG=e.i(355343),eV=e.i(966988),eK=e.i(989022);let eX=async(e,t)=>{let s=await new Promise((e,s)=>{let r=new FileReader;r.onload=()=>{e(r.result.split(",")[1])},r.onerror=s,r.readAsDataURL(t)}),r=t.type||(t.name.toLowerCase().endsWith(".pdf")?"application/pdf":"image/jpeg");return{role:"user",content:[{type:"input_text",text:e},{type:"input_image",image_url:`data:${r};base64,${s}`}]}},eY=(e,t,s,r)=>{let a="";t&&r&&(a=r.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let n={role:"user",content:t?`${e} ${a}`:e};return t&&s&&(n.imagePreviewUrl=s),n},eQ=({message:e})=>{if(!("user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&e.imagePreviewUrl))return null;let s="string"==typeof e.content&&e.content.includes("[PDF attached]");return(0,t.jsx)("div",{className:"mb-2",children:s?(0,t.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,t.jsx)(ek,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,t.jsx)("img",{src:e.imagePreviewUrl,alt:"User uploaded image",className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px"}})})};function eZ({searchResults:e}){let[s,r]=(0,R.useState)(!0),[a,n]=(0,R.useState)({});if(!e||0===e.length)return null;let o=e.reduce((e,t)=>e+t.data.length,0);return(0,t.jsxs)("div",{className:"search-results-content mt-1 mb-2",children:[(0,t.jsxs)(_.Button,{type:"text",className:"flex items-center text-xs text-gray-500 hover:text-gray-700",onClick:()=>r(!s),icon:(0,t.jsx)(i.DatabaseOutlined,{}),children:[s?"Hide sources":`Show sources (${o})`,s?(0,t.jsx)(eR.DownOutlined,{className:"ml-1"}):(0,t.jsx)(eI.RightOutlined,{className:"ml-1"})]}),s&&(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md text-sm",children:(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-xs text-gray-600 mb-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:"Query:"}),(0,t.jsxs)("span",{className:"italic",children:['"',e.search_query,'"']}),(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("span",{className:"text-gray-500",children:[e.data.length," result",1!==e.data.length?"s":""]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-md overflow-hidden bg-white",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-2 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>{let e;return e=`${s}-${r}`,void n(t=>({...t,[e]:!t[e]}))},children:(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform flex-shrink-0 ${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.jsx)(eM.FileTextOutlined,{className:"text-gray-400 flex-shrink-0",style:{fontSize:"12px"}}),(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 truncate",children:e.filename||e.file_id||`Result ${r+1}`}),(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-blue-100 text-blue-700 font-mono flex-shrink-0",children:e.score.toFixed(3)})]})}),i&&(0,t.jsx)("div",{className:"border-t border-gray-200 bg-white",children:(0,t.jsxs)("div",{className:"p-3 space-y-2",children:[e.content.map((e,s)=>(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"text-xs font-mono bg-gray-50 p-2 rounded text-gray-800 whitespace-pre-wrap break-words",children:e.text})},s)),e.attributes&&Object.keys(e.attributes).length>0&&(0,t.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-100",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1 font-medium",children:"Metadata:"}),(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(e.attributes).map(([e,s])=>(0,t.jsxs)("div",{className:"text-xs flex gap-2",children:[(0,t.jsxs)("span",{className:"text-gray-500 font-medium",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-700 font-mono break-all",children:String(s)})]},e))})]})]})})]},r)})})]},s))})})]})}e.s(["SearchResultsDisplay",()=>eZ],152401);let e0=function({message:e,isLastMessage:s,endpointType:r,mcpEvents:a,codeInterpreterResult:n,accessToken:i}){let o="user"===e.role;return(0,t.jsx)("div",{className:`mb-4 ${o?"text-right":"text-left"}`,children:(0,t.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:o?"#f0f8ff":"#ffffff",border:o?"1px solid #e6f0fa":"1px solid #f0f0f0",textAlign:"left"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:o?"#e6f0fa":"#f5f5f5"},children:o?(0,t.jsx)(eC.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(m.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),e.reasoningContent&&(0,t.jsx)(eV.default,{reasoningContent:e.reasoningContent}),"assistant"===e.role&&s&&a.length>0&&(r===eo.EndpointType.RESPONSES||r===eo.EndpointType.CHAT)&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(eG.default,{events:a})}),"assistant"===e.role&&e.searchResults&&(0,t.jsx)(eZ,{searchResults:e.searchResults}),"assistant"===e.role&&s&&n&&r===eo.EndpointType.RESPONSES&&(0,t.jsx)(eJ,{code:n.code,containerId:n.containerId,annotations:n.annotations,accessToken:i}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:[e.isImage?(0,t.jsx)("img",{src:"string"==typeof e.content?e.content:"",alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}}):e.isAudio?(0,t.jsx)(eD,{message:e}):(0,t.jsxs)(t.Fragment,{children:[r===eo.EndpointType.RESPONSES&&(0,t.jsx)(eQ,{message:e}),r===eo.EndpointType.CHAT&&(0,t.jsx)(eq,{message:e}),(0,t.jsx)(eT.default,{components:{code({node:e,inline:s,className:r,children:a,...n}){let i=/language-(\w+)/.exec(r||"");return!s&&i?(0,t.jsx)(I.Prism,{style:M.coy,language:i[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...n,children:String(a).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${r} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...n,children:a})},pre:({node:e,...s})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})},children:"string"==typeof e.content?e.content:""}),e.image&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("img",{src:e.image.url,alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}})})]}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&!e.a2aMetadata&&(0,t.jsx)(eK.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage,toolName:e.toolName}),"assistant"===e.role&&e.a2aMetadata&&(0,t.jsx)(eU,{a2aMetadata:e.a2aMetadata,timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency})]})]})})};var eu=eu;let{Dragger:e1}=O.Upload,e2=({responsesUploadedImage:e,responsesImagePreviewUrl:s,onImageUpload:r,onRemoveImage:a})=>(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(e1,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,t.jsx)(A.Tooltip,{title:"Attach image or PDF",children:(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,t.jsx)(eu.default,{style:{fontSize:"16px"}})})})})}),e4=({endpointType:e,responsesSessionId:s,useApiSessionManagement:r,onToggleSessionManagement:a})=>e!==eo.EndpointType.RESPONSES?null:(0,t.jsxs)("div",{className:"mb-4",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)("span",{className:"text-sm font-medium text-gray-700",children:"Session Management"}),(0,t.jsx)(A.Tooltip,{title:"Choose between LiteLLM API session management (using previous_response_id) or UI-based session management (using chat history)",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400",style:{fontSize:"12px"}})})]}),(0,t.jsx)(ey.Switch,{checked:r,onChange:a,checkedChildren:"API",unCheckedChildren:"UI",size:"small"})]}),(0,t.jsxs)("div",{className:`text-xs p-2 rounded-md ${s?"bg-green-50 text-green-700 border border-green-200":"bg-blue-50 text-blue-700 border border-blue-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(l.InfoCircleOutlined,{style:{fontSize:"12px"}}),(()=>{if(!s)return r?"API Session: Ready":"UI Session: Ready";let e=r?"Response ID":"UI Session",t=s.slice(0,10);return`${e}: ${t}...`})()]}),s&&(0,t.jsx)(A.Tooltip,{title:(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"mb-1",children:"Copy response ID to continue session:"}),(0,t.jsx)("div",{className:"bg-gray-800 text-gray-100 p-2 rounded font-mono text-xs whitespace-pre-wrap",children:`curl -X POST "your-proxy-url/v1/responses" \\ -H "Authorization: Bearer your-api-key" \\ -H "Content-Type: application/json" \\ -d '{ diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/40ec1228b231a0d1.js b/litellm/proxy/_experimental/out/_next/static/chunks/40ec1228b231a0d1.js deleted file mode 100644 index b17fa6f0f7..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/40ec1228b231a0d1.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,844444,e=>{"use strict";var t=e.i(843476),a=e.i(906579),l=e.i(271645),s=e.i(115571);function r(e){let t=t=>{"disableShowNewBadge"===t.key&&e()},a=t=>{let{key:a}=t.detail;"disableShowNewBadge"===a&&e()};return window.addEventListener("storage",t),window.addEventListener(s.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",t),window.removeEventListener(s.LOCAL_STORAGE_EVENT,a)}}function i(){return"true"===(0,s.getLocalStorageItem)("disableShowNewBadge")}function n({children:e,dot:s=!1}){return(0,l.useSyncExternalStore)(r,i)?e?(0,t.jsx)(t.Fragment,{children:e}):null:e?(0,t.jsx)(a.Badge,{color:"blue",count:s?void 0:"New",dot:s,children:e}):(0,t.jsx)(a.Badge,{color:"blue",count:s?void 0:"New",dot:s})}e.s(["default",()=>n],844444)},477189,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["AppstoreOutlined",0,r],477189)},19732,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={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 s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["ExperimentOutlined",0,r],19732)},788191,e=>{"use strict";e.i(247167);var t=e.i(931067),a=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:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["PlayCircleOutlined",0,r],788191)},399219,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",()=>t])},299251,153702,777579,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={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 s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["BankOutlined",0,r],299251);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"};var n=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:i}))});e.s(["BarChartOutlined",0,n],153702);let o={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 c=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["LineChartOutlined",0,c],777579)},457202,439061,182399,234779,374615,330995,592143,372943,899268,87316,655900,299023,25652,882293,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-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-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["AuditOutlined",0,r],457202);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"};var n=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:i}))});e.s(["BgColorsOutlined",0,n],439061);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"};var c=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["BlockOutlined",0,c],182399);let d={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-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};var u=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:d}))});e.s(["BookOutlined",0,u],234779);let m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var g=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:m}))});e.s(["CreditCardOutlined",0,g],374615);var h=e.i(366845);e.s(["FolderOutlined",()=>h.default],330995);var x=e.i(609587);e.s(["ConfigProvider",()=>x.default],592143);var p=e.i(8211),f=e.i(343794),y=e.i(529681),b=e.i(242064),v=e.i(704914),j=e.i(876556),N=e.i(290224),w=e.i(251224),k=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,l=Object.getOwnPropertySymbols(e);st.indexOf(l[s])&&Object.prototype.propertyIsEnumerable.call(e,l[s])&&(a[l[s]]=e[l[s]]);return a};function O({suffixCls:e,tagName:t,displayName:l}){return l=>a.forwardRef((s,r)=>a.createElement(l,Object.assign({ref:r,suffixCls:e,tagName:t},s)))}let L=a.forwardRef((e,t)=>{let{prefixCls:l,suffixCls:s,className:r,tagName:i}=e,n=k(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:o}=a.useContext(b.ConfigContext),c=o("layout",l),[d,u,m]=(0,w.default)(c),g=s?`${c}-${s}`:c;return d(a.createElement(i,Object.assign({className:(0,f.default)(l||g,r,u,m),ref:t},n)))}),_=a.forwardRef((e,t)=>{let{direction:l}=a.useContext(b.ConfigContext),[s,r]=a.useState([]),{prefixCls:i,className:n,rootClassName:o,children:c,hasSider:d,tagName:u,style:m}=e,g=k(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),h=(0,y.default)(g,["suffixCls"]),{getPrefixCls:x,className:O,style:L}=(0,b.useComponentConfig)("layout"),_=x("layout",i),z="boolean"==typeof d?d:!!s.length||(0,j.default)(c).some(e=>e.type===N.default),[C,S,M]=(0,w.default)(_),E=(0,f.default)(_,{[`${_}-has-sider`]:z,[`${_}-rtl`]:"rtl"===l},O,n,o,S,M),H=a.useMemo(()=>({siderHook:{addSider:e=>{r(t=>[].concat((0,p.default)(t),[e]))},removeSider:e=>{r(t=>t.filter(t=>t!==e))}}}),[]);return C(a.createElement(v.LayoutContext.Provider,{value:H},a.createElement(u,Object.assign({ref:t,className:E,style:Object.assign(Object.assign({},L),m)},h),c)))}),z=O({tagName:"div",displayName:"Layout"})(_),C=O({suffixCls:"header",tagName:"header",displayName:"Header"})(L),S=O({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(L),M=O({suffixCls:"content",tagName:"main",displayName:"Content"})(L);z.Header=C,z.Footer=S,z.Content=M,z.Sider=N.default,z._InternalSiderContext=N.SiderContext,e.s(["Layout",0,z],372943);var E=e.i(60699);e.s(["Menu",()=>E.default],899268);var H=e.i(475254);let V=(0,H.default)("calendar",[["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"}]]);e.s(["Calendar",()=>V],87316);var B=e.i(399219);e.s(["ChevronUp",()=>B.default],655900);let P=(0,H.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>P],299023);let T=(0,H.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>T],25652);let R=(0,H.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["UserCheck",()=>R],882293)},761911,98740,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>t],98740),e.s(["Users",()=>t],761911)},111672,e=>{"use strict";var t=e.i(247167),a=e.i(843476),l=e.i(109799),s=e.i(785242),r=e.i(135214),i=e.i(218129),n=e.i(477189),o=e.i(457202),c=e.i(299251),d=e.i(153702),u=e.i(439061),m=e.i(182399),g=e.i(234779),h=e.i(374615),x=e.i(210612),p=e.i(19732),f=e.i(872934),y=e.i(993914),b=e.i(330995),v=e.i(438957),j=e.i(777579),N=e.i(788191),w=e.i(983561),k=e.i(602073),O=e.i(928685),L=e.i(313603),_=e.i(232164),z=e.i(645526),C=e.i(366308),S=e.i(771674),M=e.i(592143),E=e.i(372943),H=e.i(899268),V=e.i(271645),B=e.i(708347),P=e.i(844444),T=e.i(371401);e.i(389083);var R=e.i(878894),A=e.i(87316);e.i(664659),e.i(655900);var U=e.i(531278),$=e.i(299023),I=e.i(25652),D=e.i(882293),K=e.i(761911),F=e.i(764205);let W=(...e)=>e.filter(Boolean).join(" ");function G({accessToken:e,width:t=220}){let l=(0,T.useDisableUsageIndicator)(),[s,r]=(0,V.useState)(!1),[i,n]=(0,V.useState)(!1),[o,c]=(0,V.useState)(null),[d,u]=(0,V.useState)(null),[m,g]=(0,V.useState)(!1),[h,x]=(0,V.useState)(null);(0,V.useEffect)(()=>{(async()=>{if(e){g(!0),x(null);try{let[t,a]=await Promise.all([(0,F.getRemainingUsers)(e),(0,F.getLicenseInfo)(e).catch(()=>null)]);c(t),u(a)}catch(e){console.error("Failed to fetch usage data:",e),x("Failed to load usage data")}finally{g(!1)}}})()},[e]);let p=d?.expiration_date?(e=>{if(!e)return null;let t=new Date(e+"T00:00:00Z"),a=new Date;return a.setHours(0,0,0,0),Math.ceil((t.getTime()-a.getTime())/864e5)})(d.expiration_date):null,f=null!==p&&p<0,y=null!==p&&p>=0&&p<30,{isOverLimit:b,isNearLimit:v,usagePercentage:j,userMetrics:N,teamMetrics:w}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let t=e.total_users?e.total_users_used/e.total_users*100:0,a=t>100,l=t>=80&&t<=100,s=e.total_teams?e.total_teams_used/e.total_teams*100:0,r=s>100,i=s>=80&&s<=100,n=a||r;return{isOverLimit:n,isNearLimit:(l||i)&&!n,usagePercentage:Math.max(t,s),userMetrics:{isOverLimit:a,isNearLimit:l,usagePercentage:t},teamMetrics:{isOverLimit:r,isNearLimit:i,usagePercentage:s}}})(o),k=b||v||f||y,O=b||f,L=(v||y)&&!O;return l||!e||o?.total_users===null&&o?.total_teams===null?null:(0,a.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:`${Math.min(t,220)}px`},children:(0,a.jsx)(()=>i?(0,a.jsx)("button",{onClick:()=>n(!1),className:W("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(K.Users,{className:"h-4 w-4 flex-shrink-0"}),k&&(0,a.jsx)("span",{className:"flex-shrink-0",children:O?(0,a.jsx)(R.AlertTriangle,{className:"h-3 w-3"}):L?(0,a.jsx)(I.TrendingUp,{className:"h-3 w-3"}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[o&&null!==o.total_users&&(0,a.jsxs)("span",{className:W("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",o.total_users_used,"/",o.total_users]}),o&&null!==o.total_teams&&(0,a.jsxs)("span",{className:W("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",w.isOverLimit&&"bg-red-50 text-red-700 border-red-200",w.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!w.isOverLimit&&!w.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",o.total_teams_used,"/",o.total_teams]}),d?.expiration_date&&null!==p&&(0,a.jsx)("span",{className:W("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-700 border-gray-200"),children:p<0?"Exp!":`${p}d`}),!o||null===o.total_users&&null===o.total_teams&&!d&&(0,a.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):m?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,a.jsx)(U.Loader2,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):h||!o?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:h||"No data"})}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)($.Minus,{className:"h-3 w-3 text-gray-400"})})]})}):(0,a.jsxs)("div",{className:W("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,a.jsx)(K.Users,{className:"h-4 w-4 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)($.Minus,{className:"h-3 w-3 text-gray-400"})})]}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[d?.has_license&&d.expiration_date&&(0,a.jsxs)("div",{className:W("space-y-1 border rounded-md p-2",f&&"border-red-200 bg-red-50",y&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(A.Calendar,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"License"}),(0,a.jsx)("span",{className:W("ml-1 px-1.5 py-0.5 rounded border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-600 border-gray-200"),children:f?"Expired":y?"Expiring soon":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Status:"}),(0,a.jsx)("span",{className:W("font-medium text-right",f&&"text-red-600",y&&"text-yellow-600"),children:(e=>{if(null===e)return"No expiration";if(e<0)return"Expired";if(0===e)return"Expires today";if(1===e)return"1 day remaining";if(e<30)return`${e} days remaining`;if(e<60)return"1 month remaining";let t=Math.floor(e/30);return`${t} months remaining`})(p)})]}),d.license_type&&(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Type:"}),(0,a.jsx)("span",{className:"font-medium text-right capitalize",children:d.license_type})]})]}),null!==o.total_users&&(0,a.jsxs)("div",{className:W("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(K.Users,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Users"}),(0,a.jsx)("span",{className:W("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_users_used,"/",o.total_users]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:W("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:o.total_users_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:W("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(N.usagePercentage,100)}%`}})})]}),null!==o.total_teams&&(0,a.jsxs)("div",{className:W("space-y-1 border rounded-md p-2",w.isOverLimit&&"border-red-200 bg-red-50",w.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(D.UserCheck,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Teams"}),(0,a.jsx)("span",{className:W("ml-1 px-1.5 py-0.5 rounded border",w.isOverLimit&&"bg-red-50 text-red-700 border-red-200",w.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!w.isOverLimit&&!w.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:w.isOverLimit?"Over limit":w.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_teams_used,"/",o.total_teams]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:W("font-medium text-right",w.isOverLimit&&"text-red-600",w.isNearLimit&&"text-yellow-600"),children:o.total_teams_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(w.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:W("h-2 rounded-full transition-all duration-300",w.isOverLimit&&"bg-red-500",w.isNearLimit&&"bg-yellow-500",!w.isOverLimit&&!w.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(w.usagePercentage,100)}%`}})})]})]})]}),{})})}let{Sider:q}=E.Layout,Y={"api-reference":"api-reference"},X=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,a.jsx)(v.KeyOutlined,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,a.jsx)(N.PlayCircleOutlined,{}),roles:B.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,a.jsx)(m.BlockOutlined,{}),roles:B.rolesWithWriteAccess},{key:"agents",page:"agents",label:"Agents",icon:(0,a.jsx)(w.RobotOutlined,{}),roles:B.rolesWithWriteAccess},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,a.jsx)(C.ToolOutlined,{})},{key:"skills",page:"skills",label:"Skills",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:B.all_admin_roles},{key:"memory",page:"memory",label:"Memory",icon:(0,a.jsx)(g.BookOutlined,{})},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,a.jsx)(k.SafetyOutlined,{})},{key:"policies",page:"policies",label:(0,a.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,a.jsx)(o.AuditOutlined,{}),roles:B.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,a.jsx)(C.ToolOutlined,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,a.jsx)(O.SearchOutlined,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,a.jsx)(x.DatabaseOutlined,{})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,a.jsx)(k.SafetyOutlined,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,a.jsx)(d.BarChartOutlined,{}),roles:[...B.all_admin_roles,...B.internalUserRoles],label:"Usage"},{key:"logs",page:"logs",label:"Logs",icon:(0,a.jsx)(j.LineChartOutlined,{})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,a.jsx)(k.SafetyOutlined,{}),roles:[...B.all_admin_roles,...B.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,a.jsx)(z.TeamOutlined,{})},{key:"projects",page:"projects",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,a.jsx)(P.default,{})]}),icon:(0,a.jsx)(b.FolderOutlined,{}),roles:B.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,a.jsx)(S.UserOutlined,{}),roles:B.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,a.jsx)(c.BankOutlined,{}),roles:B.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,a.jsx)(m.BlockOutlined,{}),roles:B.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,a.jsx)(h.CreditCardOutlined,{}),roles:B.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api-reference",page:"api-reference",label:"API Reference",icon:(0,a.jsx)(i.ApiOutlined,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,a.jsx)(n.AppstoreOutlined,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,a.jsx)(g.BookOutlined,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,a.jsx)(p.ExperimentOutlined,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,a.jsx)(x.DatabaseOutlined,{}),roles:B.all_admin_roles},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,a.jsx)(y.FileTextOutlined,{}),roles:B.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:[...B.all_admin_roles,...B.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,a.jsx)(_.TagsOutlined,{}),roles:B.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,a.jsx)(d.BarChartOutlined,{})}]}]},{groupLabel:"SETTINGS",roles:B.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,a.jsx)(P.default,{})]}),icon:(0,a.jsx)(L.SettingOutlined,{}),roles:B.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,a.jsx)(L.SettingOutlined,{}),roles:B.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,a.jsx)(L.SettingOutlined,{}),roles:B.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings ",(0,a.jsx)(P.default,{dot:!0,children:(0,a.jsx)("span",{})})]}),icon:(0,a.jsx)(L.SettingOutlined,{}),roles:B.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,a.jsx)(d.BarChartOutlined,{}),roles:B.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,a.jsx)(u.BgColorsOutlined,{}),roles:B.all_admin_roles}]}]}];e.s(["default",0,({setPage:e,defaultSelectedKey:i,collapsed:n=!1,enabledPagesInternalUsers:o,enableProjectsUI:c,disableAgentsForInternalUsers:d,allowAgentsForTeamAdmins:u,disableVectorStoresForInternalUsers:m,allowVectorStoresForTeamAdmins:g})=>{let h,{userId:x,accessToken:p,userRole:y}=(0,r.default)(),{data:b}=(0,l.useOrganizations)(),{data:v}=(0,s.useTeams)(),j=(0,V.useMemo)(()=>!!x&&!!b&&b.some(e=>e.members?.some(e=>e.user_id===x&&"org_admin"===e.user_role)),[x,b]),N=(0,V.useMemo)(()=>(0,B.isUserTeamAdminForAnyTeam)(v??null,x??""),[v,x]),w=t=>{if(Y[t])return void e(t);let a=new URLSearchParams(window.location.search);a.set("page",t),window.history.pushState(null,"",`?${a.toString()}`),e(t)},k=(e,l,s)=>{let r;if(s)return(0,a.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{color:"inherit",textDecoration:"none"},children:[e," ",(0,a.jsx)(f.ExportOutlined,{style:{fontSize:10,marginLeft:4}})]});let i=Y[l],n=i?function(e){let a=(t.default.env.NEXT_PUBLIC_BASE_URL??"").replace(/^\/+|\/+$/g,""),l=a?`/${a}/`:"/";if(F.serverRootPath&&"/"!==F.serverRootPath){let e=F.serverRootPath.replace(/\/+$/,""),t=l.replace(/^\/+/,"");l=`${e}/${t}`}return`${l}${e}`}(i):((r=new URLSearchParams(window.location.search)).set("page",l),`?${r.toString()}`);return(0,a.jsx)("a",{href:n,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button?e.stopPropagation():e.preventDefault()},style:{color:"inherit",textDecoration:"none"},children:e})},O=e=>{let t=(0,B.isAdminRole)(y);return null!=o&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:y,isAdmin:t,enabledPagesInternalUsers:o}),e.map(e=>({...e,children:e.children?O(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key){if(!(!e.roles||e.roles.includes(y)||j))return!1;if(!t&&null!=o){let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0}if("projects"===e.key&&!c||!t&&"agents"===e.key&&d&&!(u&&N)||!t&&"vector-stores"===e.key&&m&&!(g&&N)||e.roles&&!e.roles.includes(y))return!1;if(!t&&null!=o){if(e.children&&e.children.length>0&&e.children.some(e=>o.includes(e.page)))return console.log(`[LeftNav] Parent "${e.page}" (${e.key}): VISIBLE (has visible children)`),!0;let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0})},L=(e=>{for(let t of X)for(let a of t.items){if(a.page===e)return a.key;if(a.children){let t=a.children.find(t=>t.page===e);if(t)return t.key}}return"api-keys"})(i);return(0,a.jsx)(E.Layout,{children:(0,a.jsxs)(q,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,a.jsx)(M.ConfigProvider,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,a.jsx)(H.Menu,{mode:"inline",selectedKeys:[L],defaultOpenKeys:[],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(h=[],X.forEach(e=>{if(e.roles&&!e.roles.includes(y))return;let t=O(e.items);0!==t.length&&h.push({type:"group",label:n?null:(0,a.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:e.groupLabel}),children:t.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),children:e.children?.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):w(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):w(e.page)}}))})}),h)})}),(0,B.isAdminRole)(y)&&!n&&(0,a.jsx)(G,{accessToken:p,width:220})]})})},"menuGroups",()=>X],111672)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/cc5fe661d375c3b5.js b/litellm/proxy/_experimental/out/_next/static/chunks/4142aa9f47c16185.js similarity index 62% rename from litellm/proxy/_experimental/out/_next/static/chunks/cc5fe661d375c3b5.js rename to litellm/proxy/_experimental/out/_next/static/chunks/4142aa9f47c16185.js index f00c4131fc..429cadf6a3 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/cc5fe661d375c3b5.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/4142aa9f47c16185.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,738014,e=>{"use strict";var l=e.i(135214),t=e.i(764205),a=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:n}=(0,l.default)();return(0,a.useQuery)({queryKey:r.detail(n),queryFn:async()=>await (0,t.userGetInfoV2)(e),enabled:!!(e&&n)})}])},625901,e=>{"use strict";var l=e.i(266027),t=e.i(621482),a=e.i(243652),r=e.i(764205),n=e.i(135214);let i=(0,a.createQueryKeys)("models"),s=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let d=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:t,userRole:a}=(0,n.default)();return(0,l.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,r.modelAvailableCall)(e,t,a,!0,null,!0,!1,"expand"),enabled:!!(e&&t&&a)})},"useInfiniteModelInfo",0,(e=50,l)=>{let{accessToken:a,userId:i,userRole:s}=(0,n.default)();return(0,t.useInfiniteQuery)({queryKey:d.list({filters:{...i&&{userId:i},...s&&{userRole:s},size:e,...l&&{search:l}}}),queryFn:async({pageParam:t})=>await (0,r.modelInfoCall)(a,i,s,t,e,l),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,n.default)();return(0,l.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,r.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,t=50,a,s,o,d,c)=>{let{accessToken:u,userId:m,userRole:p}=(0,n.default)();return(0,l.useQuery)({queryKey:i.list({filters:{...m&&{userId:m},...p&&{userRole:p},page:e,size:t,...a&&{search:a},...s&&{modelId:s},...o&&{teamId:o},...d&&{sortBy:d},...c&&{sortOrder:c}}}),queryFn:async()=>await (0,r.modelInfoCall)(u,m,p,e,t,a,s,o,d,c),enabled:!!(u&&m&&p)})}])},907308,e=>{"use strict";var l=e.i(843476),t=e.i(271645),a=e.i(212931),r=e.i(808613),n=e.i(464571),i=e.i(199133),s=e.i(592968),o=e.i(213205),d=e.i(374009),c=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:u,onSubmit:m,accessToken:p,title:h="Add Team Member",roles:f=[{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:g="user",teamId:y})=>{let[x]=r.Form.useForm(),[b,v]=(0,t.useState)([]),[j,w]=(0,t.useState)(!1),[C,O]=(0,t.useState)("user_email"),[S,_]=(0,t.useState)(!1),k=async(e,l)=>{if(!e)return void v([]);w(!0);try{let t=new URLSearchParams;if(t.append(l,e),y&&t.append("team_id",y),null==p)return;let a=(await (0,c.userFilterUICall)(p,t)).map(e=>({label:"user_email"===l?`${e.user_email}`:`${e.user_id}`,value:"user_email"===l?e.user_email:e.user_id,user:e}));v(a)}catch(e){console.error("Error fetching users:",e)}finally{w(!1)}},I=(0,t.useCallback)((0,d.default)((e,l)=>k(e,l),300),[]),N=(e,l)=>{O(l),I(e,l)},E=(e,l)=>{let t=l.user;x.setFieldsValue({user_email:t.user_email,user_id:t.user_id,role:x.getFieldValue("role")})},M=async e=>{_(!0);try{await m(e)}finally{_(!1)}};return(0,l.jsx)(a.Modal,{title:h,open:e,onCancel:()=>{x.resetFields(),v([]),u()},footer:null,width:800,maskClosable:!S,children:(0,l.jsxs)(r.Form,{form:x,onFinish:M,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:g},children:[(0,l.jsx)(r.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,l.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>N(e,"user_email"),onSelect:(e,l)=>E(e,l),options:"user_email"===C?b:[],loading:j,allowClear:!0,"data-testid":"member-email-search"})}),(0,l.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,l.jsx)(r.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,l.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>N(e,"user_id"),onSelect:(e,l)=>E(e,l),options:"user_id"===C?b:[],loading:j,allowClear:!0})}),(0,l.jsx)(r.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,l.jsx)(i.Select,{defaultValue:g,children:f.map(e=>(0,l.jsx)(i.Select.Option,{value:e.value,children:(0,l.jsxs)(s.Tooltip,{title:e.description,children:[(0,l.jsx)("span",{className:"font-medium",children:e.label}),(0,l.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,l.jsx)("div",{className:"text-right mt-4",children:(0,l.jsx)(n.Button,{type:"primary",htmlType:"submit",icon:(0,l.jsx)(o.UserAddOutlined,{}),loading:S,children:S?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var l=e.i(843476),t=e.i(625901),a=e.i(109799),r=e.i(785242),n=e.i(738014),i=e.i(199133),s=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:l,options:t})=>l&&t?.includeUserModels?l:[],team:({allProxyModels:e,selectedOrganization:l,userModels:t})=>l?l.models.includes(d.value)||0===l.models.length?e:e.filter(e=>l.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:p,organizationID:h,options:f,context:g,dataTestId:y,value:x=[],onChange:b,style:v}=e,{includeUserModels:j,showAllTeamModelsOption:w,showAllProxyModelsOverride:C,includeSpecialOptions:O}=f||{},{data:S,isLoading:_}=(0,t.useAllProxyModels)(),{data:k,isLoading:I}=(0,r.useTeam)(p),{data:N,isLoading:E}=(0,a.useOrganization)(h),{data:M,isLoading:A}=(0,n.useCurrentUser)(),F=e=>u.some(l=>l.value===e),P=x.some(F),T=N?.models.includes(d.value)||N?.models.length===0;if(_||I||E||A)return(0,l.jsx)(s.Skeleton.Input,{active:!0,block:!0});let{wildcard:$,regular:z}=(e=>{let l=[],t=[];for(let a of e)a.endsWith("/*")?l.push(a):t.push(a);return{wildcard:l,regular:t}})(((e,l,t)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(l.options?.showAllProxyModelsOverride)return a;let r=m[l.context];return r?r({allProxyModels:a,...t,options:l.options}):[]})(S?.data??[],e,{selectedTeam:k,selectedOrganization:N,userModels:M?.models}));return(0,l.jsx)(i.Select,{"data-testid":y,value:x,onChange:e=>{let l=e.filter(F);b(l.length>0?[l[l.length-1]]:e)},style:v,options:[O?{label:(0,l.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...C||T&&O||"global"===g?[{label:(0,l.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:x.length>0&&x.some(e=>F(e)&&e!==d.value),key:d.value}]:[],{label:(0,l.jsx)("span",{children:"No Default Models"}),value:c.value,disabled:x.length>0&&x.some(e=>F(e)&&e!==c.value),key:c.value}]}:[],...$.length>0?[{label:(0,l.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:$.map(e=>{let t=e.replace("/*",""),a=t.charAt(0).toUpperCase()+t.slice(1);return{label:(0,l.jsx)("span",{children:`All ${a} models`}),value:e,disabled:P}})}]:[],{label:(0,l.jsx)("span",{children:"Models"}),title:"Models",options:z.map(e=>({label:(0,l.jsx)("span",{children:e}),value:e,disabled:P}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,l.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,l.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},276173,e=>{"use strict";var l=e.i(843476),t=e.i(599724),a=e.i(779241),r=e.i(464571),n=e.i(808613),i=e.i(212931),s=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:c,onSubmit:u,initialData:m,mode:p,config:h})=>{let f,[g]=n.Form.useForm(),[y,x]=(0,o.useState)(!1);console.log("Initial Data:",m),(0,o.useEffect)(()=>{if(e)if("edit"===p&&m){let e={...m,role:m.role||h.defaultRole,max_budget_in_team:m.max_budget_in_team||null,tpm_limit:m.tpm_limit||null,rpm_limit:m.rpm_limit||null,allowed_models:m.allowed_models||[]};console.log("Setting form values:",e),g.setFieldsValue(e)}else g.resetFields(),g.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,m,p,g,h.defaultRole,h.roleOptions]);let b=async e=>{try{x(!0);let l=Object.entries(e).reduce((e,[l,t])=>{if("string"==typeof t){let a=t.trim();return""===a&&("max_budget_in_team"===l||"tpm_limit"===l||"rpm_limit"===l)?{...e,[l]:null}:{...e,[l]:a}}return{...e,[l]:t}},{});console.log("Submitting form data:",l),await Promise.resolve(u(l)),g.resetFields()}catch(e){console.error("Form submission error:",e)}finally{x(!1)}};return(0,l.jsx)(i.Modal,{title:h.title||("add"===p?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:c,children:(0,l.jsxs)(n.Form,{form:g,onFinish:b,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.showEmail&&(0,l.jsx)(n.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,l.jsx)(a.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,l.jsx)("div",{className:"text-center mb-4",children:(0,l.jsx)(t.Text,{children:"OR"})}),h.showUserId&&(0,l.jsx)(n.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,l.jsx)(a.TextInput,{placeholder:"user_123"})}),(0,l.jsx)(n.Form.Item,{label:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{children:"Role"}),"edit"===p&&m&&(0,l.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(f=m.role,h.roleOptions.find(e=>e.value===f)?.label||f),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,l.jsx)(s.Select,{children:"edit"===p&&m?[...h.roleOptions.filter(e=>e.value===m.role),...h.roleOptions.filter(e=>e.value!==m.role)].map(e=>(0,l.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,l.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value))})}),h.additionalFields?.map(e=>(0,l.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,l.jsx)(a.TextInput,{placeholder:e.placeholder});case"numerical":return(0,l.jsx)(d.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,l.jsx)(s.Select,{children:e.options?.map(e=>(0,l.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value))});case"multi-select":return(0,l.jsx)(s.Select,{mode:"multiple",placeholder:e.placeholder||"Select options",options:e.options,allowClear:!0});default:return null}})(e)},e.name)),(0,l.jsxs)("div",{className:"text-right mt-6",children:[(0,l.jsx)(r.Button,{onClick:c,className:"mr-2",disabled:y,children:"Cancel"}),(0,l.jsx)(r.Button,{type:"default",htmlType:"submit",loading:y,children:"add"===p?y?"Adding...":"Add Member":y?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var l=e.i(843476),t=e.i(100486),a=e.i(827252),r=e.i(213205),n=e.i(771674),i=e.i(464571),s=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:p}=u.Typography;function h({members:e,canEdit:u,onEdit:h,onDelete:f,onAddMember:g,roleColumnTitle:y="Role",roleTooltip:x,extraColumns:b=[],showDeleteForMember:v,emptyText:j}){let w=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,l.jsx)(p,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,l.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,l.jsx)(p,{children:e||"-"})},{title:x?(0,l.jsxs)(s.Space,{direction:"horizontal",children:[y,(0,l.jsx)(c.Tooltip,{title:x,children:(0,l.jsx)(a.InfoCircleOutlined,{})})]}):y,dataIndex:"role",key:"role",render:e=>(0,l.jsxs)(s.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,l.jsx)(t.CrownOutlined,{}):(0,l.jsx)(n.UserOutlined,{}),(0,l.jsx)(p,{style:{textTransform:"capitalize"},children:e||"-"})]})},...b,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,t)=>u?(0,l.jsxs)(s.Space,{children:[(0,l.jsx)(m.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(t)}),(!v||v(t))&&(0,l.jsx)(m.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>f(t)})]}):null}];return(0,l.jsxs)(s.Space,{direction:"vertical",style:{width:"100%"},children:[(0,l.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,l.jsx)(o.Table,{columns:w,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:j?{emptyText:j}:void 0}),g&&u&&(0,l.jsx)(i.Button,{icon:(0,l.jsx)(r.UserAddOutlined,{}),type:"primary",onClick:g,children:"Add Member"})]})}e.s(["default",()=>h])},91979,e=>{"use strict";e.i(247167);var l=e.i(931067),t=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 r=e.i(9583),n=t.forwardRef(function(e,n){return t.createElement(r.default,(0,l.default)({},e,{ref:n,icon:a}))});e.s(["ReloadOutlined",0,n],91979)},969550,e=>{"use strict";var l=e.i(843476),t=e.i(271645);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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var r=e.i(464571),n=e.i(311451),i=e.i(199133),s=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:d,initialValues:c={},buttonLabel:u="Filters"})=>{let[m,p]=(0,t.useState)(!1),[h,f]=(0,t.useState)(c),[g,y]=(0,t.useState)({}),[x,b]=(0,t.useState)({}),[v,j]=(0,t.useState)({}),[w,C]=(0,t.useState)({}),O=(0,t.useCallback)((0,s.default)(async(e,l)=>{if(l.isSearchable&&l.searchFn){b(e=>({...e,[l.name]:!0}));try{let t=await l.searchFn(e);y(e=>({...e,[l.name]:t}))}catch(e){console.error("Error searching:",e),y(e=>({...e,[l.name]:[]}))}finally{b(e=>({...e,[l.name]:!1}))}}},300),[]),S=(0,t.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!w[e.name]){b(l=>({...l,[e.name]:!0})),C(l=>({...l,[e.name]:!0}));try{let l=await e.searchFn("");y(t=>({...t,[e.name]:l}))}catch(l){console.error("Error loading initial options:",l),y(l=>({...l,[e.name]:[]}))}finally{b(l=>({...l,[e.name]:!1}))}}},[w]);(0,t.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!w[e.name]&&S(e)})},[m,e,S,w]);let _=(e,l)=>{let t={...h,[e]:l};f(t),o(t)};return(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,l.jsx)(r.Button,{icon:(0,l.jsx)(a,{className:"h-4 w-4"}),onClick:()=>p(!m),className:"flex items-center gap-2",children:u}),(0,l.jsx)(r.Button,{onClick:()=>{let l={};e.forEach(e=>{l[e.name]=""}),f(l),d()},children:"Reset Filters"})]}),m&&(0,l.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(t=>{let a,r=e.find(e=>e.label===t||e.name===t);return r?(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)("label",{className:"text-sm text-gray-600",children:r.label||r.name}),r.isSearchable?(0,l.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${r.label||r.name}...`,value:h[r.name]||void 0,onChange:e=>_(r.name,e),onOpenChange:e=>{e&&r.isSearchable&&!w[r.name]&&S(r)},onSearch:e=>{j(l=>({...l,[r.name]:e})),r.searchFn&&O(e,r)},filterOption:!1,loading:x[r.name],options:g[r.name]||[],allowClear:!0,notFoundContent:x[r.name]?"Loading...":"No results found"}):r.options?(0,l.jsx)(i.Select,{className:"w-full",placeholder:`Select ${r.label||r.name}...`,value:h[r.name]||void 0,onChange:e=>_(r.name,e),allowClear:!0,children:r.options.map(e=>(0,l.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):r.customComponent?(a=r.customComponent,(0,l.jsx)(a,{value:h[r.name]||void 0,onChange:e=>_(r.name,e??""),placeholder:`Select ${r.label||r.name}...`,allFilters:h})):(0,l.jsx)(n.Input,{className:"w-full",placeholder:`Enter ${r.label||r.name}...`,value:h[r.name]||"",onChange:e=>_(r.name,e.target.value),allowClear:!0})]},r.name):null})})]})}],969550)},633627,e=>{"use strict";var l=e.i(764205);let t=(e,l,t,a)=>{for(let r of e){let e=r?.key_alias;e&&"string"==typeof e&&l.add(e.trim());let n=r?.organization_id??r?.org_id;n&&"string"==typeof n&&t.add(n.trim());let i=r?.user_id;if(i&&"string"==typeof i){let e=r?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let r=new Set,n=new Set,i=new Map,s=await (0,l.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=s?.keys||[],d=s?.total_pages??1;t(o,r,n,i);let c=Math.min(d,10)-1;if(c>0){let s=Array.from({length:c},(t,r)=>(0,l.keyListCall)(e,null,a,null,null,null,r+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(s)))"fulfilled"===e.status&&t(e.value?.keys||[],r,n,i)}return{keyAliases:Array.from(r).sort(),organizationIds:Array.from(n).sort(),userIds:Array.from(i.entries()).map(([e,l])=>({id:e,email:l}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},r=async(e,t)=>{if(!e)return[];try{let a=[],r=1,n=!0;for(;n;){let i=await (0,l.teamListCall)(e,t||null,null);a=[...a,...i],r{if(!e)return[];try{let t=[],a=1,r=!0;for(;r;){let n=await (0,l.organizationListCall)(e);t=[...t,...n],a{"use strict";var l=e.i(271645);let t=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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,t],94629)},991124,e=>{"use strict";let l=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>l])},678784,678745,e=>{"use strict";let l=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>l],678745),e.s(["CheckIcon",()=>l],678784)},118366,e=>{"use strict";var l=e.i(991124);e.s(["CopyIcon",()=>l.default])},829672,836938,310730,e=>{"use strict";e.i(247167);var l=e.i(271645),t=e.i(343794),a=e.i(914949),r=e.i(404948);let n=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,n],836938);var i=e.i(613541),s=e.i(763731),o=e.i(242064),d=e.i(491816);e.i(793154);var c=e.i(880476),u=e.i(183293),m=e.i(717356),p=e.i(320560),h=e.i(307358),f=e.i(246422),g=e.i(838378),y=e.i(617933);let x=(0,f.genStyleHooks)("Popover",e=>{let{colorBgElevated:l,colorText:t}=e,a=(0,g.mergeToken)(e,{popoverBg:l,popoverColor:t});return[(e=>{let{componentCls:l,popoverColor:t,titleMinWidth:a,fontWeightStrong:r,innerPadding:n,boxShadowSecondary:i,colorTextHeading:s,borderRadiusLG:o,zIndexPopup:d,titleMarginBottom:c,colorBgElevated:m,popoverBg:h,titleBorderBottom:f,innerContentPadding:g,titlePadding:y}=e;return[{[l]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${l}-content`]:{position:"relative"},[`${l}-inner`]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:o,boxShadow:i,padding:n},[`${l}-title`]:{minWidth:a,marginBottom:c,color:s,fontWeight:r,borderBottom:f,padding:y},[`${l}-inner-content`]:{color:t,padding:g}})},(0,p.default)(e,"var(--antd-arrow-background-color)"),{[`${l}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${l}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:l}=e;return{[l]:y.PresetColors.map(t=>{let a=e[`${t}6`];return{[`&${l}-${t}`]:{"--antd-arrow-background-color":a,[`${l}-inner`]:{backgroundColor:a},[`${l}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:l,controlHeight:t,fontHeight:a,padding:r,wireframe:n,zIndexPopupBase:i,borderRadiusLG:s,marginXS:o,lineType:d,colorSplit:c,paddingSM:u}=e,m=t-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:i+30},(0,h.getArrowToken)(e)),(0,p.getArrowOffsetToken)({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:12*!n,titleMarginBottom:n?0:o,titlePadding:n?`${m/2}px ${r}px ${m/2-l}px`:0,titleBorderBottom:n?`${l}px ${d} ${c}`:"none",innerContentPadding:n?`${u}px ${r}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var b=function(e,l){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>l.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rl.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]]);return t};let v=({title:e,content:t,prefixCls:a})=>e||t?l.createElement(l.Fragment,null,e&&l.createElement("div",{className:`${a}-title`},e),t&&l.createElement("div",{className:`${a}-inner-content`},t)):null,j=e=>{let{hashId:a,prefixCls:r,className:i,style:s,placement:o="top",title:d,content:u,children:m}=e,p=n(d),h=n(u),f=(0,t.default)(a,r,`${r}-pure`,`${r}-placement-${o}`,i);return l.createElement("div",{className:f,style:s},l.createElement("div",{className:`${r}-arrow`}),l.createElement(c.Popup,Object.assign({},e,{className:a,prefixCls:r}),m||l.createElement(v,{prefixCls:r,title:p,content:h})))},w=e=>{let{prefixCls:a,className:r}=e,n=b(e,["prefixCls","className"]),{getPrefixCls:i}=l.useContext(o.ConfigContext),s=i("popover",a),[d,c,u]=x(s);return d(l.createElement(j,Object.assign({},n,{prefixCls:s,hashId:c,className:(0,t.default)(r,u)})))};e.s(["Overlay",0,v,"default",0,w],310730);var C=function(e,l){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>l.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rl.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]]);return t};let O=l.forwardRef((e,c)=>{var u,m;let{prefixCls:p,title:h,content:f,overlayClassName:g,placement:y="top",trigger:b="hover",children:j,mouseEnterDelay:w=.1,mouseLeaveDelay:O=.1,onOpenChange:S,overlayStyle:_={},styles:k,classNames:I}=e,N=C(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:M,style:A,classNames:F,styles:P}=(0,o.useComponentConfig)("popover"),T=E("popover",p),[$,z,R]=x(T),U=E(),D=(0,t.default)(g,z,R,M,F.root,null==I?void 0:I.root),L=(0,t.default)(F.body,null==I?void 0:I.body),[B,K]=(0,a.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),V=(e,l)=>{K(e,!0),null==S||S(e,l)},W=n(h),q=n(f);return $(l.createElement(d.default,Object.assign({placement:y,trigger:b,mouseEnterDelay:w,mouseLeaveDelay:O},N,{prefixCls:T,classNames:{root:D,body:L},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},P.root),A),_),null==k?void 0:k.root),body:Object.assign(Object.assign({},P.body),null==k?void 0:k.body)},ref:c,open:B,onOpenChange:e=>{V(e)},overlay:W||q?l.createElement(v,{prefixCls:T,title:W,content:q}):null,transitionName:(0,i.getTransitionName)(U,"zoom-big",N.transitionName),"data-popover-inject":!0}),(0,s.cloneElement)(j,{onKeyDown:e=>{var t,a;(0,l.isValidElement)(j)&&(null==(a=null==j?void 0:(t=j.props).onKeyDown)||a.call(t,e)),e.keyCode===r.default.ESC&&V(!1,e)}})))});O._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,O],829672)},282786,e=>{"use strict";var l=e.i(829672);e.s(["Popover",()=>l.default])},751904,e=>{"use strict";var l=e.i(401361);e.s(["EditOutlined",()=>l.default])}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,738014,e=>{"use strict";var l=e.i(135214),t=e.i(764205),a=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:n}=(0,l.default)();return(0,a.useQuery)({queryKey:r.detail(n),queryFn:async()=>await (0,t.userGetInfoV2)(e),enabled:!!(e&&n)})}])},625901,e=>{"use strict";var l=e.i(266027),t=e.i(621482),a=e.i(243652),r=e.i(764205),n=e.i(135214);let i=(0,a.createQueryKeys)("models"),s=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let d=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:t,userRole:a}=(0,n.default)();return(0,l.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,r.modelAvailableCall)(e,t,a,!0,null,!0,!1,"expand"),enabled:!!(e&&t&&a)})},"useInfiniteModelInfo",0,(e=50,l)=>{let{accessToken:a,userId:i,userRole:s}=(0,n.default)();return(0,t.useInfiniteQuery)({queryKey:d.list({filters:{...i&&{userId:i},...s&&{userRole:s},size:e,...l&&{search:l}}}),queryFn:async({pageParam:t})=>await (0,r.modelInfoCall)(a,i,s,t,e,l),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,n.default)();return(0,l.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,r.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,t=50,a,s,o,d,c)=>{let{accessToken:u,userId:m,userRole:p}=(0,n.default)();return(0,l.useQuery)({queryKey:i.list({filters:{...m&&{userId:m},...p&&{userRole:p},page:e,size:t,...a&&{search:a},...s&&{modelId:s},...o&&{teamId:o},...d&&{sortBy:d},...c&&{sortOrder:c}}}),queryFn:async()=>await (0,r.modelInfoCall)(u,m,p,e,t,a,s,o,d,c),enabled:!!(u&&m&&p)})}])},907308,e=>{"use strict";var l=e.i(843476),t=e.i(271645),a=e.i(212931),r=e.i(808613),n=e.i(464571),i=e.i(199133),s=e.i(592968),o=e.i(213205),d=e.i(374009),c=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:u,onSubmit:m,accessToken:p,title:h="Add Team Member",roles:f=[{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:g="user",teamId:y})=>{let[x]=r.Form.useForm(),[b,v]=(0,t.useState)([]),[j,w]=(0,t.useState)(!1),[C,O]=(0,t.useState)("user_email"),[S,_]=(0,t.useState)(!1),k=async(e,l)=>{if(!e)return void v([]);w(!0);try{let t=new URLSearchParams;if(t.append(l,e),y&&t.append("team_id",y),null==p)return;let a=(await (0,c.userFilterUICall)(p,t)).map(e=>({label:"user_email"===l?`${e.user_email}`:`${e.user_id}`,value:"user_email"===l?e.user_email:e.user_id,user:e}));v(a)}catch(e){console.error("Error fetching users:",e)}finally{w(!1)}},I=(0,t.useCallback)((0,d.default)((e,l)=>k(e,l),300),[]),N=(e,l)=>{O(l),I(e,l)},E=(e,l)=>{let t=l.user;x.setFieldsValue({user_email:t.user_email,user_id:t.user_id,role:x.getFieldValue("role")})},M=async e=>{_(!0);try{await m(e)}finally{_(!1)}};return(0,l.jsx)(a.Modal,{title:h,open:e,onCancel:()=>{x.resetFields(),v([]),u()},footer:null,width:800,maskClosable:!S,children:(0,l.jsxs)(r.Form,{form:x,onFinish:M,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:g},children:[(0,l.jsx)(r.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,l.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>N(e,"user_email"),onSelect:(e,l)=>E(e,l),options:"user_email"===C?b:[],loading:j,allowClear:!0,"data-testid":"member-email-search"})}),(0,l.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,l.jsx)(r.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,l.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>N(e,"user_id"),onSelect:(e,l)=>E(e,l),options:"user_id"===C?b:[],loading:j,allowClear:!0})}),(0,l.jsx)(r.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,l.jsx)(i.Select,{defaultValue:g,children:f.map(e=>(0,l.jsx)(i.Select.Option,{value:e.value,children:(0,l.jsxs)(s.Tooltip,{title:e.description,children:[(0,l.jsx)("span",{className:"font-medium",children:e.label}),(0,l.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,l.jsx)("div",{className:"text-right mt-4",children:(0,l.jsx)(n.Button,{type:"primary",htmlType:"submit",icon:(0,l.jsx)(o.UserAddOutlined,{}),loading:S,children:S?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var l=e.i(843476),t=e.i(625901),a=e.i(109799),r=e.i(785242),n=e.i(738014),i=e.i(199133),s=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:l,options:t})=>l&&t?.includeUserModels?l:[],team:({allProxyModels:e,selectedOrganization:l,userModels:t})=>l?l.models.includes(d.value)||0===l.models.length?e:e.filter(e=>l.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:p,organizationID:h,options:f,context:g,dataTestId:y,value:x=[],onChange:b,style:v}=e,{includeUserModels:j,showAllTeamModelsOption:w,showAllProxyModelsOverride:C,includeSpecialOptions:O}=f||{},{data:S,isLoading:_}=(0,t.useAllProxyModels)(),{data:k,isLoading:I}=(0,r.useTeam)(p),{data:N,isLoading:E}=(0,a.useOrganization)(h),{data:M,isLoading:A}=(0,n.useCurrentUser)(),F=e=>u.some(l=>l.value===e),P=x.some(F),T=N?.models.includes(d.value)||N?.models.length===0;if(_||I||E||A)return(0,l.jsx)(s.Skeleton.Input,{active:!0,block:!0});let{wildcard:$,regular:z}=(e=>{let l=[],t=[];for(let a of e)a.endsWith("/*")?l.push(a):t.push(a);return{wildcard:l,regular:t}})(((e,l,t)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(l.options?.showAllProxyModelsOverride)return a;let r=m[l.context];return r?r({allProxyModels:a,...t,options:l.options}):[]})(S?.data??[],e,{selectedTeam:k,selectedOrganization:N,userModels:M?.models}));return(0,l.jsx)(i.Select,{"data-testid":y,value:x,onChange:e=>{let l=e.filter(F);b(l.length>0?[l[l.length-1]]:e)},style:v,options:[O?{label:(0,l.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...C||T&&O||"global"===g?[{label:(0,l.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:x.length>0&&x.some(e=>F(e)&&e!==d.value),key:d.value}]:[],{label:(0,l.jsx)("span",{children:"No Default Models"}),value:c.value,disabled:x.length>0&&x.some(e=>F(e)&&e!==c.value),key:c.value}]}:[],...$.length>0?[{label:(0,l.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:$.map(e=>{let t=e.replace("/*",""),a=t.charAt(0).toUpperCase()+t.slice(1);return{label:(0,l.jsx)("span",{children:`All ${a} models`}),value:e,disabled:P}})}]:[],{label:(0,l.jsx)("span",{children:"Models"}),title:"Models",options:z.map(e=>({label:(0,l.jsx)("span",{children:e}),value:e,disabled:P}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,l.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,l.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},276173,e=>{"use strict";var l=e.i(843476),t=e.i(599724),a=e.i(779241),r=e.i(464571),n=e.i(808613),i=e.i(212931),s=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:c,onSubmit:u,initialData:m,mode:p,config:h})=>{let f,[g]=n.Form.useForm(),[y,x]=(0,o.useState)(!1);console.log("Initial Data:",m),(0,o.useEffect)(()=>{if(e)if("edit"===p&&m){let e={...m,role:m.role||h.defaultRole,max_budget_in_team:m.max_budget_in_team||null,tpm_limit:m.tpm_limit||null,rpm_limit:m.rpm_limit||null,allowed_models:m.allowed_models||[]};console.log("Setting form values:",e),g.setFieldsValue(e)}else g.resetFields(),g.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,m,p,g,h.defaultRole,h.roleOptions]);let b=async e=>{try{x(!0);let l=Object.entries(e).reduce((e,[l,t])=>{if("string"==typeof t){let a=t.trim();return""===a&&("max_budget_in_team"===l||"tpm_limit"===l||"rpm_limit"===l)?{...e,[l]:null}:{...e,[l]:a}}return{...e,[l]:t}},{});console.log("Submitting form data:",l),await Promise.resolve(u(l)),g.resetFields()}catch(e){console.error("Form submission error:",e)}finally{x(!1)}};return(0,l.jsx)(i.Modal,{title:h.title||("add"===p?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:c,children:(0,l.jsxs)(n.Form,{form:g,onFinish:b,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.showEmail&&(0,l.jsx)(n.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,l.jsx)(a.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,l.jsx)("div",{className:"text-center mb-4",children:(0,l.jsx)(t.Text,{children:"OR"})}),h.showUserId&&(0,l.jsx)(n.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,l.jsx)(a.TextInput,{placeholder:"user_123"})}),(0,l.jsx)(n.Form.Item,{label:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{children:"Role"}),"edit"===p&&m&&(0,l.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(f=m.role,h.roleOptions.find(e=>e.value===f)?.label||f),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,l.jsx)(s.Select,{children:"edit"===p&&m?[...h.roleOptions.filter(e=>e.value===m.role),...h.roleOptions.filter(e=>e.value!==m.role)].map(e=>(0,l.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,l.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value))})}),h.additionalFields?.map(e=>(0,l.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,l.jsx)(a.TextInput,{placeholder:e.placeholder});case"numerical":return(0,l.jsx)(d.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,l.jsx)(s.Select,{children:e.options?.map(e=>(0,l.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value))});case"multi-select":return(0,l.jsx)(s.Select,{mode:"multiple",placeholder:e.placeholder||"Select options",options:e.options,allowClear:!0});default:return null}})(e)},e.name)),(0,l.jsxs)("div",{className:"text-right mt-6",children:[(0,l.jsx)(r.Button,{onClick:c,className:"mr-2",disabled:y,children:"Cancel"}),(0,l.jsx)(r.Button,{type:"default",htmlType:"submit",loading:y,children:"add"===p?y?"Adding...":"Add Member":y?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var l=e.i(843476),t=e.i(100486),a=e.i(827252),r=e.i(213205),n=e.i(771674),i=e.i(464571),s=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:p}=u.Typography;function h({members:e,canEdit:u,onEdit:h,onDelete:f,onAddMember:g,roleColumnTitle:y="Role",roleTooltip:x,extraColumns:b=[],showDeleteForMember:v,emptyText:j}){let w=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,l.jsx)(p,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,l.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,l.jsx)(p,{children:e||"-"})},{title:x?(0,l.jsxs)(s.Space,{direction:"horizontal",children:[y,(0,l.jsx)(c.Tooltip,{title:x,children:(0,l.jsx)(a.InfoCircleOutlined,{})})]}):y,dataIndex:"role",key:"role",render:e=>(0,l.jsxs)(s.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,l.jsx)(t.CrownOutlined,{}):(0,l.jsx)(n.UserOutlined,{}),(0,l.jsx)(p,{style:{textTransform:"capitalize"},children:e||"-"})]})},...b,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,t)=>u?(0,l.jsxs)(s.Space,{children:[(0,l.jsx)(m.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(t)}),(!v||v(t))&&(0,l.jsx)(m.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>f(t)})]}):null}];return(0,l.jsxs)(s.Space,{direction:"vertical",style:{width:"100%"},children:[(0,l.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,l.jsx)(o.Table,{columns:w,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:j?{emptyText:j}:void 0}),g&&u&&(0,l.jsx)(i.Button,{icon:(0,l.jsx)(r.UserAddOutlined,{}),type:"primary",onClick:g,children:"Add Member"})]})}e.s(["default",()=>h])},91979,e=>{"use strict";e.i(247167);var l=e.i(931067),t=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 r=e.i(9583),n=t.forwardRef(function(e,n){return t.createElement(r.default,(0,l.default)({},e,{ref:n,icon:a}))});e.s(["ReloadOutlined",0,n],91979)},969550,e=>{"use strict";var l=e.i(843476),t=e.i(271645);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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var r=e.i(464571),n=e.i(311451),i=e.i(199133),s=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:d,initialValues:c={},buttonLabel:u="Filters"})=>{let[m,p]=(0,t.useState)(!1),[h,f]=(0,t.useState)(c),[g,y]=(0,t.useState)({}),[x,b]=(0,t.useState)({}),[v,j]=(0,t.useState)({}),[w,C]=(0,t.useState)({}),O=(0,t.useCallback)((0,s.default)(async(e,l)=>{if(l.isSearchable&&l.searchFn){b(e=>({...e,[l.name]:!0}));try{let t=await l.searchFn(e);y(e=>({...e,[l.name]:t}))}catch(e){console.error("Error searching:",e),y(e=>({...e,[l.name]:[]}))}finally{b(e=>({...e,[l.name]:!1}))}}},300),[]),S=(0,t.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!w[e.name]){b(l=>({...l,[e.name]:!0})),C(l=>({...l,[e.name]:!0}));try{let l=await e.searchFn("");y(t=>({...t,[e.name]:l}))}catch(l){console.error("Error loading initial options:",l),y(l=>({...l,[e.name]:[]}))}finally{b(l=>({...l,[e.name]:!1}))}}},[w]);(0,t.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!w[e.name]&&S(e)})},[m,e,S,w]);let _=(e,l)=>{let t={...h,[e]:l};f(t),o(t)};return(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,l.jsx)(r.Button,{icon:(0,l.jsx)(a,{className:"h-4 w-4"}),onClick:()=>p(!m),className:"flex items-center gap-2",children:u}),(0,l.jsx)(r.Button,{onClick:()=>{let l={};e.forEach(e=>{l[e.name]=""}),f(l),d()},children:"Reset Filters"})]}),m&&(0,l.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model","Public model / search tool"].map(t=>{let a,r=e.find(e=>e.label===t||e.name===t);return r?(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)("label",{className:"text-sm text-gray-600",children:r.label||r.name}),r.isSearchable?(0,l.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${r.label||r.name}...`,value:h[r.name]||void 0,onChange:e=>_(r.name,e),onOpenChange:e=>{e&&r.isSearchable&&!w[r.name]&&S(r)},onSearch:e=>{j(l=>({...l,[r.name]:e})),r.searchFn&&O(e,r)},filterOption:!1,loading:x[r.name],options:g[r.name]||[],allowClear:!0,notFoundContent:x[r.name]?"Loading...":"No results found"}):r.options?(0,l.jsx)(i.Select,{className:"w-full",placeholder:`Select ${r.label||r.name}...`,value:h[r.name]||void 0,onChange:e=>_(r.name,e),allowClear:!0,children:r.options.map(e=>(0,l.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):r.customComponent?(a=r.customComponent,(0,l.jsx)(a,{value:h[r.name]||void 0,onChange:e=>_(r.name,e??""),placeholder:`Select ${r.label||r.name}...`,allFilters:h})):(0,l.jsx)(n.Input,{className:"w-full",placeholder:`Enter ${r.label||r.name}...`,value:h[r.name]||"",onChange:e=>_(r.name,e.target.value),allowClear:!0})]},r.name):null})})]})}],969550)},633627,e=>{"use strict";var l=e.i(764205);let t=(e,l,t,a)=>{for(let r of e){let e=r?.key_alias;e&&"string"==typeof e&&l.add(e.trim());let n=r?.organization_id??r?.org_id;n&&"string"==typeof n&&t.add(n.trim());let i=r?.user_id;if(i&&"string"==typeof i){let e=r?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let r=new Set,n=new Set,i=new Map,s=await (0,l.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=s?.keys||[],d=s?.total_pages??1;t(o,r,n,i);let c=Math.min(d,10)-1;if(c>0){let s=Array.from({length:c},(t,r)=>(0,l.keyListCall)(e,null,a,null,null,null,r+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(s)))"fulfilled"===e.status&&t(e.value?.keys||[],r,n,i)}return{keyAliases:Array.from(r).sort(),organizationIds:Array.from(n).sort(),userIds:Array.from(i.entries()).map(([e,l])=>({id:e,email:l}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},r=async(e,t)=>{if(!e)return[];try{let a=[],r=1,n=!0;for(;n;){let i=await (0,l.teamListCall)(e,t||null,null);a=[...a,...i],r{if(!e)return[];try{let t=[],a=1,r=!0;for(;r;){let n=await (0,l.organizationListCall)(e);t=[...t,...n],a{"use strict";var l=e.i(271645);let t=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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,t],94629)},991124,e=>{"use strict";let l=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>l])},678784,678745,e=>{"use strict";let l=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>l],678745),e.s(["CheckIcon",()=>l],678784)},118366,e=>{"use strict";var l=e.i(991124);e.s(["CopyIcon",()=>l.default])},829672,836938,310730,e=>{"use strict";e.i(247167);var l=e.i(271645),t=e.i(343794),a=e.i(914949),r=e.i(404948);let n=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,n],836938);var i=e.i(613541),s=e.i(763731),o=e.i(242064),d=e.i(491816);e.i(793154);var c=e.i(880476),u=e.i(183293),m=e.i(717356),p=e.i(320560),h=e.i(307358),f=e.i(246422),g=e.i(838378),y=e.i(617933);let x=(0,f.genStyleHooks)("Popover",e=>{let{colorBgElevated:l,colorText:t}=e,a=(0,g.mergeToken)(e,{popoverBg:l,popoverColor:t});return[(e=>{let{componentCls:l,popoverColor:t,titleMinWidth:a,fontWeightStrong:r,innerPadding:n,boxShadowSecondary:i,colorTextHeading:s,borderRadiusLG:o,zIndexPopup:d,titleMarginBottom:c,colorBgElevated:m,popoverBg:h,titleBorderBottom:f,innerContentPadding:g,titlePadding:y}=e;return[{[l]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${l}-content`]:{position:"relative"},[`${l}-inner`]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:o,boxShadow:i,padding:n},[`${l}-title`]:{minWidth:a,marginBottom:c,color:s,fontWeight:r,borderBottom:f,padding:y},[`${l}-inner-content`]:{color:t,padding:g}})},(0,p.default)(e,"var(--antd-arrow-background-color)"),{[`${l}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${l}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:l}=e;return{[l]:y.PresetColors.map(t=>{let a=e[`${t}6`];return{[`&${l}-${t}`]:{"--antd-arrow-background-color":a,[`${l}-inner`]:{backgroundColor:a},[`${l}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:l,controlHeight:t,fontHeight:a,padding:r,wireframe:n,zIndexPopupBase:i,borderRadiusLG:s,marginXS:o,lineType:d,colorSplit:c,paddingSM:u}=e,m=t-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:i+30},(0,h.getArrowToken)(e)),(0,p.getArrowOffsetToken)({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:12*!n,titleMarginBottom:n?0:o,titlePadding:n?`${m/2}px ${r}px ${m/2-l}px`:0,titleBorderBottom:n?`${l}px ${d} ${c}`:"none",innerContentPadding:n?`${u}px ${r}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var b=function(e,l){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>l.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rl.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]]);return t};let v=({title:e,content:t,prefixCls:a})=>e||t?l.createElement(l.Fragment,null,e&&l.createElement("div",{className:`${a}-title`},e),t&&l.createElement("div",{className:`${a}-inner-content`},t)):null,j=e=>{let{hashId:a,prefixCls:r,className:i,style:s,placement:o="top",title:d,content:u,children:m}=e,p=n(d),h=n(u),f=(0,t.default)(a,r,`${r}-pure`,`${r}-placement-${o}`,i);return l.createElement("div",{className:f,style:s},l.createElement("div",{className:`${r}-arrow`}),l.createElement(c.Popup,Object.assign({},e,{className:a,prefixCls:r}),m||l.createElement(v,{prefixCls:r,title:p,content:h})))},w=e=>{let{prefixCls:a,className:r}=e,n=b(e,["prefixCls","className"]),{getPrefixCls:i}=l.useContext(o.ConfigContext),s=i("popover",a),[d,c,u]=x(s);return d(l.createElement(j,Object.assign({},n,{prefixCls:s,hashId:c,className:(0,t.default)(r,u)})))};e.s(["Overlay",0,v,"default",0,w],310730);var C=function(e,l){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>l.indexOf(a)&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(e);rl.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]]);return t};let O=l.forwardRef((e,c)=>{var u,m;let{prefixCls:p,title:h,content:f,overlayClassName:g,placement:y="top",trigger:b="hover",children:j,mouseEnterDelay:w=.1,mouseLeaveDelay:O=.1,onOpenChange:S,overlayStyle:_={},styles:k,classNames:I}=e,N=C(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:M,style:A,classNames:F,styles:P}=(0,o.useComponentConfig)("popover"),T=E("popover",p),[$,z,R]=x(T),U=E(),D=(0,t.default)(g,z,R,M,F.root,null==I?void 0:I.root),L=(0,t.default)(F.body,null==I?void 0:I.body),[B,K]=(0,a.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),V=(e,l)=>{K(e,!0),null==S||S(e,l)},W=n(h),q=n(f);return $(l.createElement(d.default,Object.assign({placement:y,trigger:b,mouseEnterDelay:w,mouseLeaveDelay:O},N,{prefixCls:T,classNames:{root:D,body:L},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},P.root),A),_),null==k?void 0:k.root),body:Object.assign(Object.assign({},P.body),null==k?void 0:k.body)},ref:c,open:B,onOpenChange:e=>{V(e)},overlay:W||q?l.createElement(v,{prefixCls:T,title:W,content:q}):null,transitionName:(0,i.getTransitionName)(U,"zoom-big",N.transitionName),"data-popover-inject":!0}),(0,s.cloneElement)(j,{onKeyDown:e=>{var t,a;(0,l.isValidElement)(j)&&(null==(a=null==j?void 0:(t=j.props).onKeyDown)||a.call(t,e)),e.keyCode===r.default.ESC&&V(!1,e)}})))});O._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,O],829672)},282786,e=>{"use strict";var l=e.i(829672);e.s(["Popover",()=>l.default])},751904,e=>{"use strict";var l=e.i(401361);e.s(["EditOutlined",()=>l.default])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/8908525d8a1d1a33.js b/litellm/proxy/_experimental/out/_next/static/chunks/426f2755d11d3697.js similarity index 77% rename from litellm/proxy/_experimental/out/_next/static/chunks/8908525d8a1d1a33.js rename to litellm/proxy/_experimental/out/_next/static/chunks/426f2755d11d3697.js index a3f28bfea4..6f55b3267c 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/8908525d8a1d1a33.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/426f2755d11d3697.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},551332,e=>{"use strict";var r=e.i(271645);let t=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:"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"}))});e.s(["ClipboardCopyIcon",0,t],551332)},434626,e=>{"use strict";var r=e.i(271645);let t=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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,t],434626)},902555,e=>{"use strict";var r=e.i(843476),t=e.i(591935),a=e.i(122577),l=e.i(278587),o=e.i(68155),i=e.i(360820),n=e.i(871943),s=e.i(434626),d=e.i(551332),c=e.i(592968),u=e.i(115504),m=e.i(752978);function g({icon:e,onClick:t,className:a,disabled:l,dataTestId:o}){return l?(0,r.jsx)(m.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":o}):(0,r.jsx)(m.Icon,{icon:e,size:"sm",onClick:t,className:(0,u.cx)("cursor-pointer",a),"data-testid":o})}let h={Edit:{icon:t.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:o.TrashIcon,className:"hover:text-red-600"},Test:{icon:a.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:l.RefreshIcon,className:"hover:text-green-600"},Up:{icon:i.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:n.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:s.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function b({onClick:e,tooltipText:t,disabled:a=!1,disabledTooltipText:l,dataTestId:o,variant:i}){let{icon:n,className:s}=h[i];return(0,r.jsx)(c.Tooltip,{title:a?l:t,children:(0,r.jsx)("span",{children:(0,r.jsx)(g,{icon:n,onClick:e,className:s,disabled:a,dataTestId:o})})})}e.s(["default",()=>b],902555)},122577,e=>{"use strict";var r=e.i(271645);let t=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:"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"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,t],122577)},207670,e=>{"use strict";function r(){for(var e,r,t=0,a="",l=arguments.length;tr,"default",0,r])},728889,e=>{"use strict";var r=e.i(290571),t=e.i(271645),a=e.i(829087),l=e.i(480731),o=e.i(444755),i=e.i(673706),n=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"}},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=t.default.forwardRef((e,m)=>{let{icon:g,variant:h="simple",tooltip:b,size:p=l.Sizes.SM,color:x,className:f}=e,C=(0,r.__rest)(e,["icon","variant","tooltip","size","color","className"]),j=((e,r)=>{switch(e){case"simple":return{textColor:r?(0,i.getColorClassNames)(r,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:r?(0,i.getColorClassNames)(r,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,o.tremorTwMerge)((0,i.getColorClassNames)(r,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:r?(0,i.getColorClassNames)(r,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,o.tremorTwMerge)((0,i.getColorClassNames)(r,n.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:r?(0,i.getColorClassNames)(r,n.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,o.tremorTwMerge)((0,i.getColorClassNames)(r,n.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:r?(0,i.getColorClassNames)(r,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,o.tremorTwMerge)((0,i.getColorClassNames)(r,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:r?(0,i.getColorClassNames)(r,n.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:r?(0,o.tremorTwMerge)((0,i.getColorClassNames)(r,n.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,x),{tooltipProps:y,getReferenceProps:v}=(0,a.useTooltip)();return t.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([m,y.refs.setReference]),className:(0,o.tremorTwMerge)(u("root"),"inline-flex shrink-0 items-center justify-center",j.bgColor,j.textColor,j.borderColor,j.ringColor,c[h].rounded,c[h].border,c[h].shadow,c[h].ring,s[p].paddingX,s[p].paddingY,f)},v,C),t.default.createElement(a.default,Object.assign({text:b},y)),t.default.createElement(g,{className:(0,o.tremorTwMerge)(u("icon"),"shrink-0",d[p].height,d[p].width)}))});m.displayName="Icon",e.s(["default",()=>m],728889)},752978,e=>{"use strict";var r=e.i(728889);e.s(["Icon",()=>r.default])},591935,e=>{"use strict";var r=e.i(271645);let t=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:"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,t],591935)},646050,e=>{"use strict";var r=e.i(843476),t=e.i(994388),a=e.i(304967),l=e.i(197647),o=e.i(653824),i=e.i(269200),n=e.i(942232),s=e.i(977572),d=e.i(427612),c=e.i(64848),u=e.i(496020),m=e.i(881073),g=e.i(404206),h=e.i(723731),b=e.i(599724),p=e.i(271645),x=e.i(650056),f=e.i(127952),C=e.i(902555),j=e.i(727749),y=e.i(266027),v=e.i(954616),k=e.i(912598),w=e.i(243652),T=e.i(764205),I=e.i(135214);let N=(0,w.createQueryKeys)("budgets");var _=e.i(779241),A=e.i(677667),B=e.i(898667),P=e.i(130643),E=e.i(464571),M=e.i(212931),O=e.i(808613),F=e.i(28651),S=e.i(199133);let D=({isModalVisible:e,setIsModalVisible:t})=>{let[a]=O.Form.useForm(),l=(()=>{let{accessToken:e}=(0,I.default)(),r=(0,k.useQueryClient)();return(0,v.useMutation)({mutationFn:async r=>{if(!e)throw Error("Access token is required");return(0,T.budgetCreateCall)(e,r)},onSuccess:()=>{r.invalidateQueries({queryKey:N.all})}})})(),o=async e=>{try{j.default.info("Making API Call"),await l.mutateAsync(e),j.default.success("Budget Created"),a.resetFields(),t(!1)}catch(e){console.error("Error creating the budget:",e),j.default.fromBackend(`Error creating the budget: ${e}`)}};return(0,r.jsx)(M.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{t(!1),a.resetFields()},onCancel:()=>{t(!1),a.resetFields()},children:(0,r.jsxs)(O.Form,{form:a,onFinish:o,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,r.jsx)(_.TextInput,{placeholder:""})}),(0,r.jsx)(O.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,r.jsx)(F.InputNumber,{step:1,precision:2,width:200})}),(0,r.jsx)(O.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,r.jsx)(F.InputNumber,{step:1,precision:2,width:200})}),(0,r.jsxs)(A.Accordion,{className:"mt-20 mb-8",children:[(0,r.jsx)(B.AccordionHeader,{children:(0,r.jsx)("b",{children:"Optional Settings"})}),(0,r.jsxs)(P.AccordionBody,{children:[(0,r.jsx)(O.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(F.InputNumber,{step:.01,precision:2,width:200})}),(0,r.jsx)(O.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(S.Select,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(S.Select.Option,{value:"24h",children:"daily"}),(0,r.jsx)(S.Select.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(S.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(E.Button,{htmlType:"submit",children:"Create Budget"})})]})})},H=({isModalVisible:e,setIsModalVisible:t,existingBudget:a})=>{let[l]=O.Form.useForm(),o=(()=>{let{accessToken:e}=(0,I.default)(),r=(0,k.useQueryClient)();return(0,v.useMutation)({mutationFn:async r=>{if(!e)throw Error("Access token is required");return(0,T.budgetUpdateCall)(e,r)},onSuccess:()=>{r.invalidateQueries({queryKey:N.all})}})})();(0,p.useEffect)(()=>{l.setFieldsValue(a)},[a,l]);let i=async e=>{try{j.default.info("Making API Call"),await o.mutateAsync(e),j.default.success("Budget Updated"),l.resetFields(),t(!1)}catch(e){console.error("Error updating the budget:",e),j.default.fromBackend(`Error updating the budget: ${e}`)}};return(0,r.jsx)(M.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{t(!1),l.resetFields()},onCancel:()=>{t(!1),l.resetFields()},children:(0,r.jsxs)(O.Form,{form:l,onFinish:i,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:a,children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.Form.Item,{label:"Budget ID",name:"budget_id",help:"Budget ID cannot be changed after creation",children:(0,r.jsx)(_.TextInput,{placeholder:"",disabled:!0})}),(0,r.jsx)(O.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,r.jsx)(F.InputNumber,{step:1,precision:2,width:200})}),(0,r.jsx)(O.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,r.jsx)(F.InputNumber,{step:1,precision:2,width:200})}),(0,r.jsxs)(A.Accordion,{className:"mt-20 mb-8",children:[(0,r.jsx)(B.AccordionHeader,{children:(0,r.jsx)("b",{children:"Optional Settings"})}),(0,r.jsxs)(P.AccordionBody,{children:[(0,r.jsx)(O.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(F.InputNumber,{step:.01,precision:2,width:200})}),(0,r.jsx)(O.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(S.Select,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(S.Select.Option,{value:"24h",children:"daily"}),(0,r.jsx)(S.Select.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(S.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(E.Button,{htmlType:"submit",children:"Save"})})]})})},R=` +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},551332,e=>{"use strict";var r=e.i(271645);let t=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:"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"}))});e.s(["ClipboardCopyIcon",0,t],551332)},434626,e=>{"use strict";var r=e.i(271645);let t=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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,t],434626)},902555,e=>{"use strict";var r=e.i(843476),t=e.i(591935),a=e.i(122577),l=e.i(278587),o=e.i(68155),i=e.i(360820),n=e.i(871943),s=e.i(434626),d=e.i(551332),c=e.i(592968),u=e.i(115504),m=e.i(752978);function g({icon:e,onClick:t,className:a,disabled:l,dataTestId:o}){return l?(0,r.jsx)(m.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":o}):(0,r.jsx)(m.Icon,{icon:e,size:"sm",onClick:t,className:(0,u.cx)("cursor-pointer",a),"data-testid":o})}let h={Edit:{icon:t.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:o.TrashIcon,className:"hover:text-red-600"},Test:{icon:a.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:l.RefreshIcon,className:"hover:text-green-600"},Up:{icon:i.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:n.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:s.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function b({onClick:e,tooltipText:t,disabled:a=!1,disabledTooltipText:l,dataTestId:o,variant:i}){let{icon:n,className:s}=h[i];return(0,r.jsx)(c.Tooltip,{title:a?l:t,children:(0,r.jsx)("span",{children:(0,r.jsx)(g,{icon:n,onClick:e,className:s,disabled:a,dataTestId:o})})})}e.s(["default",()=>b],902555)},122577,e=>{"use strict";var r=e.i(271645);let t=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:"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"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,t],122577)},207670,e=>{"use strict";function r(){for(var e,r,t=0,a="",l=arguments.length;tr,"default",0,r])},728889,e=>{"use strict";var r=e.i(290571),t=e.i(271645),a=e.i(829087),l=e.i(480731),o=e.i(444755),i=e.i(673706),n=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"}},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=t.default.forwardRef((e,m)=>{let{icon:g,variant:h="simple",tooltip:b,size:p=l.Sizes.SM,color:x,className:f}=e,C=(0,r.__rest)(e,["icon","variant","tooltip","size","color","className"]),j=((e,r)=>{switch(e){case"simple":return{textColor:r?(0,i.getColorClassNames)(r,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:r?(0,i.getColorClassNames)(r,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,o.tremorTwMerge)((0,i.getColorClassNames)(r,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:r?(0,i.getColorClassNames)(r,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,o.tremorTwMerge)((0,i.getColorClassNames)(r,n.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:r?(0,i.getColorClassNames)(r,n.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,o.tremorTwMerge)((0,i.getColorClassNames)(r,n.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:r?(0,i.getColorClassNames)(r,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,o.tremorTwMerge)((0,i.getColorClassNames)(r,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:r?(0,i.getColorClassNames)(r,n.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:r?(0,o.tremorTwMerge)((0,i.getColorClassNames)(r,n.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,x),{tooltipProps:y,getReferenceProps:v}=(0,a.useTooltip)();return t.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([m,y.refs.setReference]),className:(0,o.tremorTwMerge)(u("root"),"inline-flex shrink-0 items-center justify-center",j.bgColor,j.textColor,j.borderColor,j.ringColor,c[h].rounded,c[h].border,c[h].shadow,c[h].ring,s[p].paddingX,s[p].paddingY,f)},v,C),t.default.createElement(a.default,Object.assign({text:b},y)),t.default.createElement(g,{className:(0,o.tremorTwMerge)(u("icon"),"shrink-0",d[p].height,d[p].width)}))});m.displayName="Icon",e.s(["default",()=>m],728889)},752978,e=>{"use strict";var r=e.i(728889);e.s(["Icon",()=>r.default])},591935,e=>{"use strict";var r=e.i(271645);let t=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:"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,t],591935)},646050,e=>{"use strict";var r=e.i(843476),t=e.i(994388),a=e.i(304967),l=e.i(197647),o=e.i(653824),i=e.i(269200),n=e.i(942232),s=e.i(977572),d=e.i(427612),c=e.i(64848),u=e.i(496020),m=e.i(881073),g=e.i(404206),h=e.i(723731),b=e.i(599724),p=e.i(271645),x=e.i(650056),f=e.i(127952),C=e.i(902555),j=e.i(727749),y=e.i(266027),v=e.i(954616),k=e.i(912598),w=e.i(243652),T=e.i(764205),I=e.i(135214);let N=(0,w.createQueryKeys)("budgets");var A=e.i(779241),_=e.i(677667),B=e.i(898667),P=e.i(130643),E=e.i(464571),M=e.i(212931),O=e.i(808613),F=e.i(28651),S=e.i(199133);let D=({isModalVisible:e,setIsModalVisible:t})=>{let[a]=O.Form.useForm(),l=(()=>{let{accessToken:e}=(0,I.default)(),r=(0,k.useQueryClient)();return(0,v.useMutation)({mutationFn:async r=>{if(!e)throw Error("Access token is required");return(0,T.budgetCreateCall)(e,r)},onSuccess:()=>{r.invalidateQueries({queryKey:N.all})}})})(),o=async e=>{try{j.default.info("Making API Call"),await l.mutateAsync(e),j.default.success("Budget Created"),a.resetFields(),t(!1)}catch(e){console.error("Error creating the budget:",e),j.default.fromBackend(`Error creating the budget: ${e}`)}};return(0,r.jsx)(M.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{t(!1),a.resetFields()},onCancel:()=>{t(!1),a.resetFields()},children:(0,r.jsxs)(O.Form,{form:a,onFinish:o,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,r.jsx)(A.TextInput,{placeholder:""})}),(0,r.jsx)(O.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,r.jsx)(F.InputNumber,{step:1,precision:2,width:200})}),(0,r.jsx)(O.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,r.jsx)(F.InputNumber,{step:1,precision:2,width:200})}),(0,r.jsxs)(_.Accordion,{className:"mt-20 mb-8",children:[(0,r.jsx)(B.AccordionHeader,{children:(0,r.jsx)("b",{children:"Optional Settings"})}),(0,r.jsxs)(P.AccordionBody,{children:[(0,r.jsx)(O.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(F.InputNumber,{step:.01,precision:2,width:200})}),(0,r.jsx)(O.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(S.Select,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(S.Select.Option,{value:"24h",children:"daily"}),(0,r.jsx)(S.Select.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(S.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(E.Button,{htmlType:"submit",children:"Create Budget"})})]})})},H=({isModalVisible:e,setIsModalVisible:t,existingBudget:a})=>{let[l]=O.Form.useForm(),o=(()=>{let{accessToken:e}=(0,I.default)(),r=(0,k.useQueryClient)();return(0,v.useMutation)({mutationFn:async r=>{if(!e)throw Error("Access token is required");return(0,T.budgetUpdateCall)(e,r)},onSuccess:()=>{r.invalidateQueries({queryKey:N.all})}})})();(0,p.useEffect)(()=>{l.setFieldsValue(a)},[a,l]);let i=async e=>{try{j.default.info("Making API Call"),await o.mutateAsync(e),j.default.success("Budget Updated"),l.resetFields(),t(!1)}catch(e){console.error("Error updating the budget:",e),j.default.fromBackend(`Error updating the budget: ${e}`)}};return(0,r.jsx)(M.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{t(!1),l.resetFields()},onCancel:()=>{t(!1),l.resetFields()},children:(0,r.jsxs)(O.Form,{form:l,onFinish:i,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:a,children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.Form.Item,{label:"Budget ID",name:"budget_id",help:"Budget ID cannot be changed after creation",children:(0,r.jsx)(A.TextInput,{placeholder:"",disabled:!0})}),(0,r.jsx)(O.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,r.jsx)(F.InputNumber,{step:1,precision:2,width:200})}),(0,r.jsx)(O.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,r.jsx)(F.InputNumber,{step:1,precision:2,width:200})}),(0,r.jsxs)(_.Accordion,{className:"mt-20 mb-8",children:[(0,r.jsx)(B.AccordionHeader,{children:(0,r.jsx)("b",{children:"Optional Settings"})}),(0,r.jsxs)(P.AccordionBody,{children:[(0,r.jsx)(O.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(F.InputNumber,{step:.01,precision:2,width:200})}),(0,r.jsx)(O.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(S.Select,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(S.Select.Option,{value:"24h",children:"daily"}),(0,r.jsx)(S.Select.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(S.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(E.Button,{htmlType:"submit",children:"Save"})})]})})},R=` curl -X POST --location '/end_user/new' \\ -H 'Authorization: Bearer ' \\ @@ -35,4 +35,4 @@ completion = client.chat.completions.create( user="my-customer-id" ) -print(completion.choices[0].message)`;e.s(["default",0,({accessToken:e})=>{let[w,_]=(0,p.useState)(!1),[A,B]=(0,p.useState)(!1),[P,E]=(0,p.useState)(null),[M,O]=(0,p.useState)(!1),{data:F=[]}=(()=>{let{accessToken:e}=(0,I.default)();return(0,y.useQuery)({queryKey:N.list({}),queryFn:async()=>(await (0,T.getBudgetList)(e)??[]).filter(e=>null!=e),enabled:!!e})})(),S=(()=>{let{accessToken:e}=(0,I.default)(),r=(0,k.useQueryClient)();return(0,v.useMutation)({mutationFn:async r=>{if(!e)throw Error("Access token is required");return(0,T.budgetDeleteCall)(e,r)},onSuccess:()=>{r.invalidateQueries({queryKey:N.all})}})})(),U=async r=>{null!=e&&(E(r),B(!0))},z=async()=>{if(P&&null!=e)try{await S.mutateAsync(P.budget_id),j.default.success("Budget deleted.")}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{O(!1),E(null)}};return(0,r.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,r.jsx)(t.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>_(!0),children:"+ Create Budget"}),(0,r.jsxs)(o.TabGroup,{children:[(0,r.jsxs)(m.TabList,{children:[(0,r.jsx)(l.Tab,{children:"Budgets"}),(0,r.jsx)(l.Tab,{children:"Examples"})]}),(0,r.jsxs)(h.TabPanels,{children:[(0,r.jsx)(g.TabPanel,{children:(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)(D,{isModalVisible:w,setIsModalVisible:_}),P&&(0,r.jsx)(H,{isModalVisible:A,setIsModalVisible:B,existingBudget:P}),(0,r.jsxs)(a.Card,{children:[(0,r.jsx)(b.Text,{children:"Create a budget to assign to customers."}),(0,r.jsxs)(i.Table,{children:[(0,r.jsx)(d.TableHead,{children:(0,r.jsxs)(u.TableRow,{children:[(0,r.jsx)(c.TableHeaderCell,{children:"Budget ID"}),(0,r.jsx)(c.TableHeaderCell,{children:"Max Budget"}),(0,r.jsx)(c.TableHeaderCell,{children:"TPM"}),(0,r.jsx)(c.TableHeaderCell,{children:"RPM"})]})}),(0,r.jsx)(n.TableBody,{children:F.slice().sort((e,r)=>new Date(r.updated_at).getTime()-new Date(e.updated_at).getTime()).map(e=>(0,r.jsxs)(u.TableRow,{children:[(0,r.jsx)(s.TableCell,{children:e.budget_id}),(0,r.jsx)(s.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,r.jsx)(s.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,r.jsx)(s.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,r.jsx)(C.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>U(e),dataTestId:"edit-budget-button"}),(0,r.jsx)(C.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{E(e),O(!0)},dataTestId:"delete-budget-button"})]},e.budget_id))})]})]}),(0,r.jsx)(f.default,{isOpen:M,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:P?.budget_id,code:!0},{label:"Max Budget",value:P?.max_budget},{label:"TPM",value:P?.tpm_limit},{label:"RPM",value:P?.rpm_limit}],onCancel:()=>{O(!1)},onOk:z,confirmLoading:S.isPending})]})}),(0,r.jsx)(g.TabPanel,{children:(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)(b.Text,{className:"text-base",children:"How to use budget id"}),(0,r.jsxs)(o.TabGroup,{children:[(0,r.jsxs)(m.TabList,{children:[(0,r.jsx)(l.Tab,{children:"Assign Budget to Customer"}),(0,r.jsx)(l.Tab,{children:"Test it (Curl)"}),(0,r.jsx)(l.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,r.jsxs)(h.TabPanels,{children:[(0,r.jsx)(g.TabPanel,{children:(0,r.jsx)(x.Prism,{language:"bash",children:R})}),(0,r.jsx)(g.TabPanel,{children:(0,r.jsx)(x.Prism,{language:"bash",children:L})}),(0,r.jsx)(g.TabPanel,{children:(0,r.jsx)(x.Prism,{language:"python",children:q})})]})]})]})})]})]})]})}],646050)},267167,e=>{"use strict";var r=e.i(843476),t=e.i(646050),a=e.i(135214);e.s(["default",0,()=>{let{accessToken:e}=(0,a.default)();return(0,r.jsx)(t.default,{accessToken:e})}])}]); \ No newline at end of file +print(completion.choices[0].message)`;var U=e.i(708347);e.s(["default",0,({accessToken:e})=>{let[w,A]=(0,p.useState)(!1),[_,B]=(0,p.useState)(!1),[P,E]=(0,p.useState)(null),[M,O]=(0,p.useState)(!1),{userRole:F}=(0,I.default)(),S=(0,U.isProxyAdminRole)(F??""),{data:z=[]}=(()=>{let{accessToken:e}=(0,I.default)();return(0,y.useQuery)({queryKey:N.list({}),queryFn:async()=>(await (0,T.getBudgetList)(e)??[]).filter(e=>null!=e),enabled:!!e})})(),Y=(()=>{let{accessToken:e}=(0,I.default)(),r=(0,k.useQueryClient)();return(0,v.useMutation)({mutationFn:async r=>{if(!e)throw Error("Access token is required");return(0,T.budgetDeleteCall)(e,r)},onSuccess:()=>{r.invalidateQueries({queryKey:N.all})}})})(),K=async r=>{null!=e&&(E(r),B(!0))},Q=async()=>{if(P&&null!=e)try{await Y.mutateAsync(P.budget_id),j.default.success("Budget deleted.")}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{O(!1),E(null)}};return(0,r.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[S&&(0,r.jsx)(t.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>A(!0),children:"+ Create Budget"}),(0,r.jsxs)(o.TabGroup,{children:[(0,r.jsxs)(m.TabList,{children:[(0,r.jsx)(l.Tab,{children:"Budgets"}),(0,r.jsx)(l.Tab,{children:"Examples"})]}),(0,r.jsxs)(h.TabPanels,{children:[(0,r.jsx)(g.TabPanel,{children:(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)(D,{isModalVisible:w,setIsModalVisible:A}),P&&(0,r.jsx)(H,{isModalVisible:_,setIsModalVisible:B,existingBudget:P}),(0,r.jsxs)(a.Card,{children:[(0,r.jsx)(b.Text,{children:"Create a budget to assign to customers."}),(0,r.jsxs)(i.Table,{children:[(0,r.jsx)(d.TableHead,{children:(0,r.jsxs)(u.TableRow,{children:[(0,r.jsx)(c.TableHeaderCell,{children:"Budget ID"}),(0,r.jsx)(c.TableHeaderCell,{children:"Max Budget"}),(0,r.jsx)(c.TableHeaderCell,{children:"TPM"}),(0,r.jsx)(c.TableHeaderCell,{children:"RPM"})]})}),(0,r.jsx)(n.TableBody,{children:z.slice().sort((e,r)=>new Date(r.updated_at).getTime()-new Date(e.updated_at).getTime()).map(e=>(0,r.jsxs)(u.TableRow,{children:[(0,r.jsx)(s.TableCell,{children:e.budget_id}),(0,r.jsx)(s.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,r.jsx)(s.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,r.jsx)(s.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),S&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>K(e),dataTestId:"edit-budget-button"}),(0,r.jsx)(C.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{E(e),O(!0)},dataTestId:"delete-budget-button"})]})]},e.budget_id))})]})]}),(0,r.jsx)(f.default,{isOpen:M,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:P?.budget_id,code:!0},{label:"Max Budget",value:P?.max_budget},{label:"TPM",value:P?.tpm_limit},{label:"RPM",value:P?.rpm_limit}],onCancel:()=>{O(!1)},onOk:Q,confirmLoading:Y.isPending})]})}),(0,r.jsx)(g.TabPanel,{children:(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)(b.Text,{className:"text-base",children:"How to use budget id"}),(0,r.jsxs)(o.TabGroup,{children:[(0,r.jsxs)(m.TabList,{children:[(0,r.jsx)(l.Tab,{children:"Assign Budget to Customer"}),(0,r.jsx)(l.Tab,{children:"Test it (Curl)"}),(0,r.jsx)(l.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,r.jsxs)(h.TabPanels,{children:[(0,r.jsx)(g.TabPanel,{children:(0,r.jsx)(x.Prism,{language:"bash",children:R})}),(0,r.jsx)(g.TabPanel,{children:(0,r.jsx)(x.Prism,{language:"bash",children:L})}),(0,r.jsx)(g.TabPanel,{children:(0,r.jsx)(x.Prism,{language:"python",children:q})})]})]})]})})]})]})]})}],646050)},267167,e=>{"use strict";var r=e.i(843476),t=e.i(646050),a=e.i(135214);e.s(["default",0,()=>{let{accessToken:e}=(0,a.default)();return(0,r.jsx)(t.default,{accessToken:e})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/432e162c2ee31f73.js b/litellm/proxy/_experimental/out/_next/static/chunks/432e162c2ee31f73.js deleted file mode 100644 index 7c52eca1b9..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/432e162c2ee31f73.js +++ /dev/null @@ -1,72 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),Object.defineProperty(l,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},269200,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("Table"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement("div",{className:(0,a.tremorTwMerge)(r("root"),"overflow-auto",i)},l.default.createElement("table",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},o),n))});s.displayName="Table",e.s(["Table",()=>s],269200)},427612,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHead"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("thead",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},o),n))});s.displayName="TableHead",e.s(["TableHead",()=>s],427612)},64848,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHeaderCell"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("th",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},o),n))});s.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>s],64848)},942232,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableBody"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("tbody",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},o),n))});s.displayName="TableBody",e.s(["TableBody",()=>s],942232)},496020,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableRow"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("tr",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("row"),i)},o),n))});s.displayName="TableRow",e.s(["TableRow",()=>s],496020)},977572,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableCell"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("td",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"align-middle whitespace-nowrap text-left p-4",i)},o),n))});s.displayName="TableCell",e.s(["TableCell",()=>s],977572)},389083,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(829087),r=e.i(480731),s=e.i(95779),n=e.i(444755),i=e.i(673706);let o={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"}},c={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"}},d=(0,i.makeClassName)("Badge"),u=l.default.forwardRef((e,u)=>{let{color:m,icon:h,size:g=r.Sizes.SM,tooltip:p,className:x,children:f}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),y=h||null,{tooltipProps:j,getReferenceProps:v}=(0,a.useTooltip)();return l.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([u,j.refs.setReference]),className:(0,n.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,n.tremorTwMerge)((0,i.getColorClassNames)(m,s.colorPalette.background).bgColor,(0,i.getColorClassNames)(m,s.colorPalette.iconText).textColor,(0,i.getColorClassNames)(m,s.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,n.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"),o[g].paddingX,o[g].paddingY,o[g].fontSize,x)},v,b),l.default.createElement(a.default,Object.assign({text:p},j)),y?l.default.createElement(y,{className:(0,n.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[g].height,c[g].width)}):null,l.default.createElement("span",{className:(0,n.tremorTwMerge)(d("text"),"whitespace-nowrap")},f))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},68155,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:"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,l],68155)},360820,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:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,l],360820)},871943,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:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,l],871943)},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,l],94629)},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},848725,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:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});e.s(["EyeIcon",0,l],848725)},292335,122520,165615,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",AWS_SIGV4:"aws_sigv4"},l={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};function a(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(["AUTH_TYPE",0,t,"OAUTH_FLOW",0,{INTERACTIVE:"interactive",M2M:"m2m"},"TRANSPORT",0,l,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?l.SSE:t&&e!==l.STDIO?l.OPENAPI:e],292335),e.s(["extractErrorMessage",()=>a],122520);let r=e=>{let t=new Uint8Array(e),l="";return t.forEach(e=>l+=String.fromCharCode(e)),btoa(l).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},s=async e=>{let t=new TextEncoder().encode(e);return r(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,s,"generateCodeVerifier",0,()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),r(e.buffer)}],165615)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["StopOutlined",0,s],724154)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var l=e.i(546467);e.s(["ExternalLinkIcon",()=>l.default],634831);let a=(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(["KeyIcon",()=>a],438100)},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},264843,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["MessageOutlined",0,s],264843)},446891,836991,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(326373),r=e.i(94629),s=e.i(360820),n=e.i(871943),i=e.i(271645);let o=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,o],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:i})=>{let c=[{key:"asc",label:"Ascending",icon:(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,t.jsx)(o,{className:"h-4 w-4"})}];return(0,t.jsx)(a.Dropdown,{menu:{items:c,onClick:({key:e})=>{"asc"===e?i("asc"):"desc"===e?i("desc"):"reset"===e&&i(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,t.jsx)(l.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"}):(0,t.jsx)(r.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891)},149121,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(152990),r=e.i(682830),s=e.i(269200),n=e.i(427612),i=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572);function u({data:e=[],columns:u,onRowClick:m,renderSubComponent:h,renderChildRows:g,getRowCanExpand:p,isLoading:x=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:b="No logs found",enableSorting:y=!1}){let j=!!(h||g)&&!!p,[v,w]=(0,l.useState)([]),k=(0,a.useReactTable)({data:e,columns:u,...y&&{state:{sorting:v},onSortingChange:w,enableSortingRemoval:!1},...j&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,r.getCoreRowModel)(),...y&&{getSortedRowModel:(0,r.getSortedRowModel)()},...j&&{getExpandedRowModel:(0,r.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(n.TableHead,{children:k.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let l=y&&e.column.getCanSort(),r=e.column.getIsSorted();return(0,t.jsx)(i.TableHeaderCell,{className:`py-1 h-8 ${l?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:l?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),l&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===r?"↑":"desc"===r?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:x?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):k.getRowModel().rows.length>0?k.getRowModel().rows.map(e=>(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),j&&e.getIsExpanded()&&g&&g({row:e}),j&&e.getIsExpanded()&&h&&!g&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:h({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})})})]})})}e.s(["DataTable",()=>u])},37091,e=>{"use strict";var t=e.i(290571),l=e.i(95779),a=e.i(444755),r=e.i(673706),s=e.i(271645);let n=s.default.forwardRef((e,n)=>{let{color:i,children:o,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return s.default.createElement("p",Object.assign({ref:n,className:(0,a.tremorTwMerge)(i?(0,r.getColorClassNames)(i,l.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},d),o)});n.displayName="Subtitle",e.s(["Subtitle",()=>n],37091)},888288,e=>{"use strict";var t=e.i(271645);let l=(e,l)=>{let a=void 0!==l,[r,s]=(0,t.useState)(e);return[a?l:r,e=>{a||s(e)}]};e.s(["default",()=>l])},793130,e=>{"use strict";var t=e.i(290571),l=e.i(429427),a=e.i(371330),r=e.i(271645),s=e.i(394487),n=e.i(503269),i=e.i(214520),o=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(601893),h=e.i(140721),g=e.i(942803),p=e.i(233538),x=e.i(694421),f=e.i(700020),b=e.i(35889),y=e.i(998348),j=e.i(722678);let v=(0,r.createContext)(null);v.displayName="GroupContext";let w=r.Fragment,k=Object.assign((0,f.forwardRefWithAs)(function(e,t){var w;let k=(0,r.useId)(),_=(0,g.useProvidedId)(),C=(0,m.useDisabled)(),{id:N=_||`headlessui-switch-${k}`,disabled:S=C||!1,checked:T,defaultChecked:M,onChange:E,name:I,value:O,form:A,autoFocus:D=!1,...B}=e,R=(0,r.useContext)(v),[F,P]=(0,r.useState)(null),$=(0,r.useRef)(null),L=(0,u.useSyncRefs)($,t,null===R?null:R.setSwitch,P),H=(0,i.useDefaultValue)(M),[z,V]=(0,n.useControllable)(T,E,null!=H&&H),U=(0,o.useDisposables)(),[q,W]=(0,r.useState)(!1),G=(0,c.useEvent)(()=>{W(!0),null==V||V(!z),U.nextFrame(()=>{W(!1)})}),K=(0,c.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),G()}),Y=(0,c.useEvent)(e=>{e.key===y.Keys.Space?(e.preventDefault(),G()):e.key===y.Keys.Enter&&(0,x.attemptSubmit)(e.currentTarget)}),J=(0,c.useEvent)(e=>e.preventDefault()),Q=(0,j.useLabelledBy)(),X=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,l.useFocusRing)({autoFocus:D}),{isHovered:et,hoverProps:el}=(0,a.useHover)({isDisabled:S}),{pressed:ea,pressProps:er}=(0,s.useActivePress)({disabled:S}),es=(0,r.useMemo)(()=>({checked:z,disabled:S,hover:et,focus:Z,active:ea,autofocus:D,changing:q}),[z,et,Z,ea,S,q,D]),en=(0,f.mergeProps)({id:N,ref:L,role:"switch",type:(0,d.useResolveButtonType)(e,F),tabIndex:-1===e.tabIndex?0:null!=(w=e.tabIndex)?w:0,"aria-checked":z,"aria-labelledby":Q,"aria-describedby":X,disabled:S||void 0,autoFocus:D,onClick:K,onKeyUp:Y,onKeyPress:J},ee,el,er),ei=(0,r.useCallback)(()=>{if(void 0!==H)return null==V?void 0:V(H)},[V,H]),eo=(0,f.useRender)();return r.default.createElement(r.default.Fragment,null,null!=I&&r.default.createElement(h.FormFields,{disabled:S,data:{[I]:O||"on"},overrides:{type:"checkbox",checked:z},form:A,onReset:ei}),eo({ourProps:en,theirProps:B,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[l,a]=(0,r.useState)(null),[s,n]=(0,j.useLabels)(),[i,o]=(0,b.useDescriptions)(),c=(0,r.useMemo)(()=>({switch:l,setSwitch:a}),[l,a]),d=(0,f.useRender)();return r.default.createElement(o,{name:"Switch.Description",value:i},r.default.createElement(n,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){l&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),l.click(),l.focus({preventScroll:!0}))}}},r.default.createElement(v.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:w,name:"Switch.Group"}))))},Label:j.Label,Description:b.Description});var _=e.i(888288),C=e.i(95779),N=e.i(444755),S=e.i(673706),T=e.i(829087);let M=(0,S.makeClassName)("Switch"),E=r.default.forwardRef((e,l)=>{let{checked:a,defaultChecked:s=!1,onChange:n,color:i,name:o,error:c,errorMessage:d,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"]),x={bgColor:i?(0,S.getColorClassNames)(i,C.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,S.getColorClassNames)(i,C.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[f,b]=(0,_.default)(s,a),[y,j]=(0,r.useState)(!1),{tooltipProps:v,getReferenceProps:w}=(0,T.useTooltip)(300);return r.default.createElement("div",{className:"flex flex-row items-center justify-start"},r.default.createElement(T.default,Object.assign({text:h},v)),r.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([l,v.refs.setReference]),className:(0,N.tremorTwMerge)(M("root"),"flex flex-row relative h-5")},p,w),r.default.createElement("input",{type:"checkbox",className:(0,N.tremorTwMerge)(M("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:m,checked:f,onChange:e=>{e.preventDefault()}}),r.default.createElement(k,{checked:f,onChange:e=>{b(e),null==n||n(e)},disabled:u,className:(0,N.tremorTwMerge)(M("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:()=>j(!0),onBlur:()=>j(!1),id:g},r.default.createElement("span",{className:(0,N.tremorTwMerge)(M("sr-only"),"sr-only")},"Switch ",f?"on":"off"),r.default.createElement("span",{"aria-hidden":"true",className:(0,N.tremorTwMerge)(M("background"),f?x.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")}),r.default.createElement("span",{"aria-hidden":"true",className:(0,N.tremorTwMerge)(M("round"),f?(0,N.tremorTwMerge)(x.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",y?(0,N.tremorTwMerge)("ring-2",x.ringColor):"")}))),c&&d?r.default.createElement("p",{className:(0,N.tremorTwMerge)(M("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});E.displayName="Switch",e.s(["Switch",()=>E],793130)},418371,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:r="w-4 h-4"})=>{let[s,n]=(0,l.useState)(!1),{logo:i}=(0,a.getProviderLogoAndName)(e);return s||!i?(0,t.jsx)("div",{className:`${r} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:i,alt:`${e} logo`,className:r,onError:()=>n(!0)})}])},704308,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(994388),r=e.i(212931),s=e.i(764205),n=e.i(808613),i=e.i(311451),o=e.i(199133),c=e.i(888259),d=e.i(209261);let{TextArea:u}=i.Input,{Option:m}=o.Select,h=["Development","Productivity","Learning","Security","Data & Analytics","Integration","Testing","Documentation"],g=({visible:e,onClose:g,accessToken:p,onSuccess:x})=>{let[f]=n.Form.useForm(),[b,y]=(0,l.useState)(!1),[j,v]=(0,l.useState)(null),w=async e=>{if(!p)return void c.default.error("No access token available");if(!j)return void c.default.error("Please enter a valid GitHub URL");if(!(0,d.validatePluginName)(e.name))return void c.default.error("Skill name must be kebab-case (lowercase letters, numbers, and hyphens only)");if(e.version&&!(0,d.isValidSemanticVersion)(e.version))return void c.default.error("Version must be in semantic versioning format (e.g., 1.0.0)");if(e.authorEmail&&!(0,d.isValidEmail)(e.authorEmail))return void c.default.error("Invalid email format");if(e.homepage&&!(0,d.isValidUrl)(e.homepage))return void c.default.error("Invalid homepage URL format");y(!0);try{let t={name:e.name.trim(),source:j.parsed};e.version&&(t.version=e.version.trim()),e.description&&(t.description=e.description.trim()),(e.authorName||e.authorEmail)&&(t.author={},e.authorName&&(t.author.name=e.authorName.trim()),e.authorEmail&&(t.author.email=e.authorEmail.trim())),e.homepage&&(t.homepage=e.homepage.trim()),e.category&&(t.category=e.category),e.keywords&&(t.keywords=(0,d.parseKeywords)(e.keywords)),e.domain&&(t.domain=e.domain.trim()),e.namespace&&(t.namespace=e.namespace.trim()),await (0,s.registerClaudeCodePlugin)(p,t),c.default.success("Skill registered successfully"),f.resetFields(),v(null),x(),g()}catch(e){console.error("Error registering skill:",e),c.default.error("Failed to register skill")}finally{y(!1)}},k=()=>{f.resetFields(),v(null),g()};return(0,t.jsx)(r.Modal,{title:"Add New Skill",open:e,onCancel:k,footer:null,width:700,className:"top-8",children:(0,t.jsxs)(n.Form,{form:f,layout:"vertical",onFinish:w,className:"mt-4",children:[(0,t.jsx)(n.Form.Item,{label:"GitHub URL",name:"skillUrl",rules:[{required:!0,message:"Please enter a GitHub URL"}],tooltip:"Paste a GitHub URL — repo, folder, or file link. E.g. github.com/org/repo or github.com/org/repo/tree/main/my-skill",children:(0,t.jsx)(i.Input,{placeholder:"https://github.com/org/repo/tree/main/my-skill",className:"rounded-lg",onChange:e=>{let t=function(e){let t=e.trim().replace(/^https?:\/\//,"").replace(/\/+$/,"");if(!t.startsWith("github.com/"))return null;let l=t.slice(11).split("/");if(l.length<2)return null;let a=l[0],r=l[1].replace(/\.git$/,"");if(2===l.length||2===l.length&&r)return{parsed:{source:"github",repo:`${a}/${r}`},label:`GitHub repo — ${a}/${r}`,suggestedName:r};if(l.length>=5&&("tree"===l[2]||"blob"===l[2])){let e=l.slice(4),t=e[e.length-1];if(t&&t.includes(".")&&e.pop(),0===e.length)return{parsed:{source:"github",repo:`${a}/${r}`},label:`GitHub repo — ${a}/${r}`,suggestedName:r};let s=e.join("/");return{parsed:{source:"git-subdir",url:`https://github.com/${a}/${r}`,path:s},label:`GitHub subdir — ${a}/${r} @ ${s}`,suggestedName:e[e.length-1]}}return null}(e.target.value);v(t),t&&(f.getFieldValue("name")||f.setFieldsValue({name:t.suggestedName}))}})}),j&&(0,t.jsxs)("div",{className:"mb-4 px-3 py-2 bg-blue-50 border border-blue-200 rounded-lg text-sm text-blue-700",children:["Detected: ",j.label]}),(0,t.jsx)(n.Form.Item,{label:"Skill Name",name:"name",rules:[{required:!0,message:"Please enter skill name"},{pattern:/^[a-z0-9-]+$/,message:"Name must be kebab-case (lowercase, numbers, hyphens only)"}],tooltip:"Unique identifier in kebab-case format (e.g., my-skill)",children:(0,t.jsx)(i.Input,{placeholder:"my-skill",className:"rounded-lg"})}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)(n.Form.Item,{label:"Domain (Optional)",name:"domain",tooltip:"Top-level grouping in the Skill Hub (e.g., Productivity)",className:"flex-1",children:(0,t.jsx)(i.Input,{placeholder:"Productivity",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Namespace (Optional)",name:"namespace",tooltip:"Sub-grouping within domain (e.g., workflows)",className:"flex-1",children:(0,t.jsx)(i.Input,{placeholder:"workflows",className:"rounded-lg"})})]}),(0,t.jsx)(n.Form.Item,{label:"Description (Optional)",name:"description",tooltip:"Brief description of what the skill does",children:(0,t.jsx)(u,{rows:3,placeholder:"A skill that helps with...",maxLength:500,className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Category (Optional)",name:"category",tooltip:"Select a category or enter a custom one",children:(0,t.jsx)(o.Select,{placeholder:"Select or type a category",allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"rounded-lg",children:h.map(e=>(0,t.jsx)(m,{value:e,children:e},e))})}),(0,t.jsx)(n.Form.Item,{label:"Keywords (Optional)",name:"keywords",tooltip:"Comma-separated list of keywords for search",children:(0,t.jsx)(i.Input,{placeholder:"search, web, api",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Version (Optional)",name:"version",tooltip:"Semantic version (e.g., 1.0.0)",children:(0,t.jsx)(i.Input,{placeholder:"1.0.0",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Author Name (Optional)",name:"authorName",tooltip:"Name of the skill author or organization",children:(0,t.jsx)(i.Input,{placeholder:"Your Name or Organization",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Author Email (Optional)",name:"authorEmail",rules:[{type:"email",message:"Please enter a valid email"}],tooltip:"Contact email for the skill author",children:(0,t.jsx)(i.Input,{type:"email",placeholder:"author@example.com",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{className:"mb-0 mt-6",children:(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(a.Button,{variant:"secondary",onClick:k,disabled:b,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"submit",loading:b,children:b?"Adding...":"Add Skill"})]})})]})})};var p=e.i(166406),x=e.i(871943),f=e.i(360820),b=e.i(94629),y=e.i(68155),j=e.i(152990),v=e.i(682830),w=e.i(389083),k=e.i(269200),_=e.i(942232),C=e.i(977572),N=e.i(427612),S=e.i(64848),T=e.i(496020),M=e.i(592968),E=e.i(727749);let I=({pluginsList:e,isLoading:r,onDeleteClick:s,accessToken:n,isAdmin:i,onPluginClick:o})=>{let[c,u]=(0,l.useState)([{id:"created_at",desc:!0}]),m=[{header:"Skill Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,r=l.name||"";return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.Tooltip,{title:r,children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[150px] justify-start",onClick:()=>o(l.id),children:r})}),(0,t.jsx)(M.Tooltip,{title:"Copy Plugin ID",children:(0,t.jsx)(p.CopyOutlined,{onClick:e=>{var t;e.stopPropagation(),t=l.id,navigator.clipboard.writeText(t),E.default.success("Copied to clipboard!")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Version",accessorKey:"version",cell:({row:e})=>{let l=e.original.version||"N/A";return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:l})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original.description||"No description";return(0,t.jsx)(M.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"text-xs text-gray-600 block max-w-[300px] truncate",children:l})})}},{header:"Category",accessorKey:"category",cell:({row:e})=>{let l=e.original.category;if(!l)return(0,t.jsx)(w.Badge,{color:"gray",className:"text-xs font-normal",size:"xs",children:"Uncategorized"});let a=(0,d.getCategoryBadgeColor)(l);return(0,t.jsx)(w.Badge,{color:a,className:"text-xs font-normal",size:"xs",children:l})}},{header:"Public",accessorKey:"enabled",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(w.Badge,{color:l.enabled?"green":"gray",className:"text-xs font-normal",size:"xs",children:l.enabled?"Yes":"No"})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{var l;let a=e.original;return(0,t.jsx)(M.Tooltip,{title:a.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:(l=a.created_at)?new Date(l).toLocaleString():"-"})})}},...i?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(M.Tooltip,{title:"Delete skill",children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),s(l.name,l.name)},icon:y.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],h=(0,j.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:u,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(k.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(N.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(T.TableRow,{children:e.headers.map(e=>(0,t.jsx)(S.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(f.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(x.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(b.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(_.TableBody,{children:r?(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(C.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e&&e.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(T.TableRow,{className:"h-8 cursor-pointer hover:bg-gray-50",onClick:()=>o(e.original.id),children:e.getVisibleCells().map(e=>(0,t.jsx)(C.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(C.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No skills found. Add one to get started."})})})})})]})})})};var O=e.i(652272),A=e.i(708347);e.s(["default",0,({accessToken:e,userRole:n})=>{let[i,o]=(0,l.useState)([]),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),[h,p]=(0,l.useState)(!1),[x,f]=(0,l.useState)(null),[b,y]=(0,l.useState)(null),j=!!n&&(0,A.isAdminRole)(n),v=async()=>{if(e){m(!0);try{let t=await (0,s.getClaudeCodePluginsList)(e,!1);o(t.plugins)}catch(e){console.error("Error fetching skills:",e)}finally{m(!1)}}};(0,l.useEffect)(()=>{v()},[e]);let w=async()=>{if(x&&e){p(!0);try{await (0,s.deleteClaudeCodePlugin)(e,x.name),E.default.success(`Skill "${x.displayName}" deleted successfully`),v()}catch(e){console.error("Error deleting skill:",e),E.default.error("Failed to delete skill")}finally{p(!1),f(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[b?(0,t.jsx)(O.default,{skill:b,onBack:()=>y(null),isAdmin:j,accessToken:e,onPublishClick:v}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Skills"}),(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["Register Claude Code skills. Published skills appear in the Skill Hub for all users and are served via"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"/claude-code/marketplace.json"}),"."]}),(0,t.jsx)("div",{className:"mt-2 flex gap-2",children:(0,t.jsx)(a.Button,{onClick:()=>d(!0),disabled:!e||!j,children:"+ Add Skill"})})]}),(0,t.jsx)(I,{pluginsList:i,isLoading:u,onDeleteClick:(e,t)=>{f({name:e,displayName:t})},accessToken:e,isAdmin:j,onPluginClick:e=>{let t=i.find(t=>t.id===e);t&&y(t)}})]}),(0,t.jsx)(g,{visible:c,onClose:()=>d(!1),accessToken:e,onSuccess:v}),x&&(0,t.jsxs)(r.Modal,{title:"Delete Skill",open:null!==x,onOk:w,onCancel:()=>f(null),confirmLoading:h,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete skill:"," ",(0,t.jsx)("strong",{children:x.displayName}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],704308)},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(562901),a=e.i(343794),r=e.i(914949),s=e.i(529681),n=e.i(242064),i=e.i(829672),o=e.i(285781),c=e.i(836938),d=e.i(920228),u=e.i(62405),m=e.i(408850),h=e.i(87414),g=e.i(310730);let p=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:l,antCls:a,zIndexPopup:r,colorText:s,colorWarning:n,marginXXS:i,marginXS:o,fontSize:c,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:r,[`&${a}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:o,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${l}`]:{color:n,fontSize:c,lineHeight:1,marginInlineEnd:o},[`${t}-title`]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:i,color:s}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:o}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var x=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let f=e=>{let{prefixCls:a,okButtonProps:r,cancelButtonProps:s,title:i,description:g,cancelText:p,okText:x,okType:f="primary",icon:b=t.createElement(l.default,null),showCancel:y=!0,close:j,onConfirm:v,onCancel:w,onPopupClick:k}=e,{getPrefixCls:_}=t.useContext(n.ConfigContext),[C]=(0,m.useLocale)("Popconfirm",h.default.Popconfirm),N=(0,c.getRenderPropValue)(i),S=(0,c.getRenderPropValue)(g);return t.createElement("div",{className:`${a}-inner-content`,onClick:k},t.createElement("div",{className:`${a}-message`},b&&t.createElement("span",{className:`${a}-message-icon`},b),t.createElement("div",{className:`${a}-message-text`},N&&t.createElement("div",{className:`${a}-title`},N),S&&t.createElement("div",{className:`${a}-description`},S))),t.createElement("div",{className:`${a}-buttons`},y&&t.createElement(d.default,Object.assign({onClick:w,size:"small"},s),p||(null==C?void 0:C.cancelText)),t.createElement(o.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,u.convertLegacyProps)(f)),r),actionFn:v,close:j,prefixCls:_("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},x||(null==C?void 0:C.okText))))};var b=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let y=t.forwardRef((e,o)=>{var c,d;let{prefixCls:u,placement:m="top",trigger:h="click",okType:g="primary",icon:x=t.createElement(l.default,null),children:y,overlayClassName:j,onOpenChange:v,onVisibleChange:w,overlayStyle:k,styles:_,classNames:C}=e,N=b(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:S,className:T,style:M,classNames:E,styles:I}=(0,n.useComponentConfig)("popconfirm"),[O,A]=(0,r.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(d=e.defaultOpen)?d:e.defaultVisible}),D=(e,t)=>{A(e,!0),null==w||w(e),null==v||v(e,t)},B=S("popconfirm",u),R=(0,a.default)(B,T,j,E.root,null==C?void 0:C.root),F=(0,a.default)(E.body,null==C?void 0:C.body),[P]=p(B);return P(t.createElement(i.default,Object.assign({},(0,s.default)(N,["title"]),{trigger:h,placement:m,onOpenChange:(t,l)=>{let{disabled:a=!1}=e;a||D(t,l)},open:O,ref:o,classNames:{root:R,body:F},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},I.root),M),k),null==_?void 0:_.root),body:Object.assign(Object.assign({},I.body),null==_?void 0:_.body)},content:t.createElement(f,Object.assign({okType:g,icon:x},e,{prefixCls:B,close:e=>{D(!1,e)},onConfirm:t=>{var l;return null==(l=e.onConfirm)?void 0:l.call(void 0,t)},onCancel:t=>{var l;D(!1,t),null==(l=e.onCancel)||l.call(void 0,t)}})),"data-popover-inject":!0}),y))});y._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:l,placement:r,className:s,style:i}=e,o=x(e,["prefixCls","placement","className","style"]),{getPrefixCls:c}=t.useContext(n.ConfigContext),d=c("popconfirm",l),[u]=p(d);return u(t.createElement(g.default,{placement:r,className:(0,a.default)(d,s),style:i,content:t.createElement(f,Object.assign({prefixCls:d},o))}))},e.s(["Popconfirm",0,y],883552)},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(914949),r=e.i(404948);let s=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,s],836938);var n=e.i(613541),i=e.i(763731),o=e.i(242064),c=e.i(491816);e.i(793154);var d=e.i(880476),u=e.i(183293),m=e.i(717356),h=e.i(320560),g=e.i(307358),p=e.i(246422),x=e.i(838378),f=e.i(617933);let b=(0,p.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:l}=e,a=(0,x.mergeToken)(e,{popoverBg:t,popoverColor:l});return[(e=>{let{componentCls:t,popoverColor:l,titleMinWidth:a,fontWeightStrong:r,innerPadding:s,boxShadowSecondary:n,colorTextHeading:i,borderRadiusLG:o,zIndexPopup:c,titleMarginBottom:d,colorBgElevated:m,popoverBg:g,titleBorderBottom:p,innerContentPadding:x,titlePadding:f}=e;return[{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:o,boxShadow:n,padding:s},[`${t}-title`]:{minWidth:a,marginBottom:d,color:i,fontWeight:r,borderBottom:p,padding:f},[`${t}-inner-content`]:{color:l,padding:x}})},(0,h.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:f.PresetColors.map(l=>{let a=e[`${l}6`];return{[`&${t}-${l}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:l,fontHeight:a,padding:r,wireframe:s,zIndexPopupBase:n,borderRadiusLG:i,marginXS:o,lineType:c,colorSplit:d,paddingSM:u}=e,m=l-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:n+30},(0,g.getArrowToken)(e)),(0,h.getArrowOffsetToken)({contentRadius:i,limitVerticalRadius:!0})),{innerPadding:12*!s,titleMarginBottom:s?0:o,titlePadding:s?`${m/2}px ${r}px ${m/2-t}px`:0,titleBorderBottom:s?`${t}px ${c} ${d}`:"none",innerContentPadding:s?`${u}px ${r}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var y=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let j=({title:e,content:l,prefixCls:a})=>e||l?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),l&&t.createElement("div",{className:`${a}-inner-content`},l)):null,v=e=>{let{hashId:a,prefixCls:r,className:n,style:i,placement:o="top",title:c,content:u,children:m}=e,h=s(c),g=s(u),p=(0,l.default)(a,r,`${r}-pure`,`${r}-placement-${o}`,n);return t.createElement("div",{className:p,style:i},t.createElement("div",{className:`${r}-arrow`}),t.createElement(d.Popup,Object.assign({},e,{className:a,prefixCls:r}),m||t.createElement(j,{prefixCls:r,title:h,content:g})))},w=e=>{let{prefixCls:a,className:r}=e,s=y(e,["prefixCls","className"]),{getPrefixCls:n}=t.useContext(o.ConfigContext),i=n("popover",a),[c,d,u]=b(i);return c(t.createElement(v,Object.assign({},s,{prefixCls:i,hashId:d,className:(0,l.default)(r,u)})))};e.s(["Overlay",0,j,"default",0,w],310730);var k=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let _=t.forwardRef((e,d)=>{var u,m;let{prefixCls:h,title:g,content:p,overlayClassName:x,placement:f="top",trigger:y="hover",children:v,mouseEnterDelay:w=.1,mouseLeaveDelay:_=.1,onOpenChange:C,overlayStyle:N={},styles:S,classNames:T}=e,M=k(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:I,style:O,classNames:A,styles:D}=(0,o.useComponentConfig)("popover"),B=E("popover",h),[R,F,P]=b(B),$=E(),L=(0,l.default)(x,F,P,I,A.root,null==T?void 0:T.root),H=(0,l.default)(A.body,null==T?void 0:T.body),[z,V]=(0,a.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),U=(e,t)=>{V(e,!0),null==C||C(e,t)},q=s(g),W=s(p);return R(t.createElement(c.default,Object.assign({placement:f,trigger:y,mouseEnterDelay:w,mouseLeaveDelay:_},M,{prefixCls:B,classNames:{root:L,body:H},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},D.root),O),N),null==S?void 0:S.root),body:Object.assign(Object.assign({},D.body),null==S?void 0:S.body)},ref:d,open:z,onOpenChange:e=>{U(e)},overlay:q||W?t.createElement(j,{prefixCls:B,title:q,content:W}):null,transitionName:(0,n.getTransitionName)($,"zoom-big",M.transitionName),"data-popover-inject":!0}),(0,i.cloneElement)(v,{onKeyDown:e=>{var l,a;(0,t.isValidElement)(v)&&(null==(a=null==v?void 0:(l=v.props).onKeyDown)||a.call(l,e)),e.keyCode===r.default.ESC&&U(!1,e)}})))});_._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,_],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},822315,(e,t,l)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",l="minute",a="hour",r="week",s="month",n="quarter",i="year",o="date",c="Invalid Date",d=/^(\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,l){var a=String(e);return!a||a.length>=t?e:""+Array(t+1-a.length).join(l)+e},h="en",g={};g[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"],l=e%100;return"["+e+(t[(l-20)%10]||t[l]||t[0])+"]"}};var p="$isDayjsObject",x=function(e){return e instanceof j||!(!e||!e[p])},f=function e(t,l,a){var r;if(!t)return h;if("string"==typeof t){var s=t.toLowerCase();g[s]&&(r=s),l&&(g[s]=l,r=s);var n=t.split("-");if(!r&&n.length>1)return e(n[0])}else{var i=t.name;g[i]=t,r=i}return!a&&r&&(h=r),r||!a&&h},b=function(e,t){if(x(e))return e.clone();var l="object"==typeof t?t:{};return l.date=e,l.args=arguments,new j(l)},y={s:m,z:function(e){var t=-e.utcOffset(),l=Math.abs(t);return(t<=0?"+":"-")+m(Math.floor(l/60),2,"0")+":"+m(l%60,2,"0")},m:function e(t,l){if(t.date(){"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(115504);function r({className:e="",...r}){var s,n;let i=(0,l.useId)();return s=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===i),l=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==i);t&&l&&(t.currentTime=l.currentTime)},n=[i],(0,l.useLayoutEffect)(s,n),(0,t.jsxs)("svg",{"data-spinner-id":i,className:(0,a.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...r,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>r],571303)},936578,e=>{"use strict";var t=e.i(843476),l=e.i(115504),a=e.i(571303);function r(){return(0,t.jsxs)("div",{className:(0,l.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(a.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>r])},902739,e=>{"use strict";var t=e.i(843476),l=e.i(111672),a=e.i(764205),r=e.i(135214),s=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:n,sidebarCollapsed:i})=>{let{accessToken:o}=(0,r.default)(),[c,d]=(0,s.useState)(null),[u,m]=(0,s.useState)(!1),[h,g]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,b]=(0,s.useState)(!1),[y,j]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(!o)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,a.getUISettings)(o);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),d(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&m(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&x(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&b(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&j(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[o]),(0,t.jsx)(l.default,{setPage:e,defaultSelectedKey:n,collapsed:i,enabledPagesInternalUsers:c,enableProjectsUI:u,disableAgentsForInternalUsers:h,allowAgentsForTeamAdmins:p,disableVectorStoresForInternalUsers:f,allowVectorStoresForTeamAdmins:y})}])},208075,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),r=e.i(629569),s=e.i(599724),n=e.i(779241),i=e.i(994388),o=e.i(275144),c=e.i(764205),d=e.i(727749);e.s(["default",0,({userID:e,userRole:u,accessToken:m})=>{let{logoUrl:h,setLogoUrl:g,faviconUrl:p,setFaviconUrl:x}=(0,o.useTheme)(),[f,b]=(0,l.useState)(""),[y,j]=(0,l.useState)(""),[v,w]=(0,l.useState)(!1);(0,l.useEffect)(()=>{m&&k()},[m]);let k=async()=>{try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",l=await fetch(t,{method:"GET",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();b(e.values?.logo_url||""),j(e.values?.favicon_url||""),g(e.values?.logo_url||null),x(e.values?.favicon_url||null)}}catch(e){console.error("Error fetching theme settings:",e)}},_=async()=>{w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:f||null,favicon_url:y||null})})).ok)d.default.success("Theme settings updated successfully!"),g(f||null),x(y||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating theme settings:",e),d.default.fromBackend("Failed to update theme settings")}finally{w(!1)}},C=async()=>{b(""),j(""),g(null),x(null),w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:null,favicon_url:null})})).ok)d.default.success("Theme settings reset to default!");else throw Error("Failed to reset")}catch(e){console.error("Error resetting theme settings:",e),d.default.fromBackend("Failed to reset theme settings")}finally{w(!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)(r.Title,{className:"text-2xl font-bold mb-2",children:"UI Theme Customization"}),(0,t.jsx)(s.Text,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo and favicon."})]}),(0,t.jsx)(a.Card,{className:"shadow-sm p-6",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,t.jsx)(n.TextInput,{placeholder:"https://example.com/logo.png",value:f,onValueChange:e=>{b(e),g(e||null)},className:"w-full"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty for default"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Favicon URL"}),(0,t.jsx)(n.TextInput,{placeholder:"https://example.com/favicon.ico",value:y,onValueChange:e=>{j(e),x(e||null)},className:"w-full"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 mt-1",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.jsx)(i.Button,{onClick:_,loading:v,disabled:v,color:"indigo",children:"Save Changes"}),(0,t.jsx)(i.Button,{onClick:C,loading:v,disabled:v,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}])},662316,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(464571),r=e.i(166406),s=e.i(629569),n=e.i(764205),i=e.i(727749);e.s(["default",0,({accessToken:e})=>{let[o,c]=(0,l.useState)(`{ - "model": "openai/gpt-4o", - "messages": [ - { - "role": "system", - "content": "You are a helpful assistant." - }, - { - "role": "user", - "content": "Explain quantum computing in simple terms" - } - ], - "temperature": 0.7, - "max_tokens": 500, - "stream": true -}`),[d,u]=(0,l.useState)(""),[m,h]=(0,l.useState)(!1),g=async()=>{h(!0);try{let r;try{r=JSON.parse(o)}catch(e){i.default.fromBackend("Invalid JSON in request body"),h(!1);return}let s={call_type:"completion",request_body:r};if(!e){i.default.fromBackend("No access token found"),h(!1);return}let c=await (0,n.transformRequestCall)(e,s);if(c.raw_request_api_base&&c.raw_request_body){var t,l,a;let e,r,s=(t=c.raw_request_api_base,l=c.raw_request_body,a=c.raw_request_headers||{},e=JSON.stringify(l,null,2).split("\n").map(e=>` ${e}`).join("\n"),r=Object.entries(a).map(([e,t])=>`-H '${e}: ${t}'`).join(" \\\n "),`curl -X POST \\ - ${t} \\ - ${r?`${r} \\ - `:""}-H 'Content-Type: application/json' \\ - -d '{ -${e} - }'`);u(s),i.default.success("Request transformed successfully")}else{let e="string"==typeof c?c:JSON.stringify(c);u(e),i.default.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),i.default.fromBackend("Failed to transform request")}finally{h(!1)}};return(0,t.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,t.jsx)(s.Title,{children:"Playground"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"See how LiteLLM transforms your request for the specified provider."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"16px",width:"100%",minWidth:0,overflow:"hidden"},className:"mt-4",children:[(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"600px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Original Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"The request you would send to LiteLLM /chat/completions endpoint."})]}),(0,t.jsx)("textarea",{style:{flex:"1 1 auto",width:"100%",minHeight:"240px",padding:"16px",border:"1px solid #e8e8e8",borderRadius:"6px",fontFamily:"monospace",fontSize:"14px",resize:"none",marginBottom:"24px",overflow:"auto"},value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),g())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,t.jsxs)(a.Button,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:g,loading:m,children:[(0,t.jsx)("span",{children:"Transform"}),(0,t.jsx)("span",{children:"→"})]})})]}),(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"800px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Transformed Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"How LiteLLM transforms your request for the specified provider."}),(0,t.jsx)("br",{}),(0,t.jsx)("p",{style:{color:"#666",margin:0},className:"text-xs",children:"Note: Sensitive headers are not shown."})]}),(0,t.jsxs)("div",{style:{position:"relative",backgroundColor:"#f5f5f5",borderRadius:"6px",flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsx)("pre",{style:{padding:"16px",fontFamily:"monospace",fontSize:"14px",margin:0,overflow:"auto",flex:"1 1 auto"},children:d||`curl -X POST \\ - https://api.openai.com/v1/chat/completions \\ - -H 'Authorization: Bearer sk-xxx' \\ - -H 'Content-Type: application/json' \\ - -d '{ - "model": "gpt-4", - "messages": [ - { - "role": "system", - "content": "You are a helpful assistant." - } - ], - "temperature": 0.7 - }'`}),(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(r.CopyOutlined,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(d||""),i.default.success("Copied to clipboard")}})]})]})]}),(0,t.jsx)("div",{className:"mt-4 text-right w-full",children:(0,t.jsxs)("p",{className:"text-sm text-gray-500",children:["Found an error? File an issue"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})]})}])},673709,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(678784);let r=(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 s=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:i})=>{let[o,c]=(0,l.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:o?(0,t.jsx)(a.CheckIcon,{size:16}):(0,t.jsx)(r,{size:16})}),(0,t.jsx)(s.Prism,{language:i,style:n,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],673709)},778917,e=>{"use strict";var t=e.i(546467);e.s(["ExternalLink",()=>t.default])},646050,e=>{"use strict";var t=e.i(843476),l=e.i(994388),a=e.i(304967),r=e.i(197647),s=e.i(653824),n=e.i(269200),i=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),m=e.i(881073),h=e.i(404206),g=e.i(723731),p=e.i(599724),x=e.i(271645),f=e.i(650056),b=e.i(127952),y=e.i(902555),j=e.i(727749),v=e.i(266027),w=e.i(954616),k=e.i(912598),_=e.i(243652),C=e.i(764205),N=e.i(135214);let S=(0,_.createQueryKeys)("budgets");var T=e.i(779241),M=e.i(677667),E=e.i(898667),I=e.i(130643),O=e.i(464571),A=e.i(212931),D=e.i(808613),B=e.i(28651),R=e.i(199133);let F=({isModalVisible:e,setIsModalVisible:l})=>{let[a]=D.Form.useForm(),r=(()=>{let{accessToken:e}=(0,N.default)(),t=(0,k.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,C.budgetCreateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),s=async e=>{try{j.default.info("Making API Call"),await r.mutateAsync(e),j.default.success("Budget Created"),a.resetFields(),l(!1)}catch(e){console.error("Error creating the budget:",e),j.default.fromBackend(`Error creating the budget: ${e}`)}};return(0,t.jsx)(A.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),a.resetFields()},onCancel:()=>{l(!1),a.resetFields()},children:(0,t.jsxs)(D.Form,{form:a,onFinish:s,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,t.jsx)(T.TextInput,{placeholder:""})}),(0,t.jsx)(D.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(M.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(I.AccordionBody,{children:[(0,t.jsx)(D.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(B.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(R.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(R.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(R.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(R.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(O.Button,{htmlType:"submit",children:"Create Budget"})})]})})},P=({isModalVisible:e,setIsModalVisible:l,existingBudget:a})=>{let[r]=D.Form.useForm(),s=(()=>{let{accessToken:e}=(0,N.default)(),t=(0,k.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,C.budgetUpdateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})();(0,x.useEffect)(()=>{r.setFieldsValue(a)},[a,r]);let n=async e=>{try{j.default.info("Making API Call"),await s.mutateAsync(e),j.default.success("Budget Updated"),r.resetFields(),l(!1)}catch(e){console.error("Error updating the budget:",e),j.default.fromBackend(`Error updating the budget: ${e}`)}};return(0,t.jsx)(A.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),r.resetFields()},onCancel:()=>{l(!1),r.resetFields()},children:(0,t.jsxs)(D.Form,{form:r,onFinish:n,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:a,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Form.Item,{label:"Budget ID",name:"budget_id",help:"Budget ID cannot be changed after creation",children:(0,t.jsx)(T.TextInput,{placeholder:"",disabled:!0})}),(0,t.jsx)(D.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(M.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(I.AccordionBody,{children:[(0,t.jsx)(D.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(B.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(R.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(R.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(R.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(R.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(O.Button,{htmlType:"submit",children:"Save"})})]})})},$=` -curl -X POST --location '/end_user/new' \\ - --H 'Authorization: Bearer ' \\ - --H 'Content-Type: application/json' \\ - --d '{"user_id": "my-customer-id', "budget_id": ""}' # 👈 KEY CHANGE - -`,L=` -curl -X POST --location '/chat/completions' \\ - --H 'Authorization: Bearer ' \\ - --H 'Content-Type: application/json' \\ - --d '{ - "model": "gpt-3.5-turbo', - "messages":[{"role": "user", "content": "Hey, how's it going?"}], - "user": "my-customer-id" -}' # 👈 KEY CHANGE - -`,H=`from openai import OpenAI -client = OpenAI( - base_url="", - api_key="" -) - -completion = client.chat.completions.create( - model="gpt-3.5-turbo", - messages=[ - {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Hello!"} - ], - user="my-customer-id" -) - -print(completion.choices[0].message)`;e.s(["default",0,({accessToken:e})=>{let[_,T]=(0,x.useState)(!1),[M,E]=(0,x.useState)(!1),[I,O]=(0,x.useState)(null),[A,D]=(0,x.useState)(!1),{data:B=[]}=(()=>{let{accessToken:e}=(0,N.default)();return(0,v.useQuery)({queryKey:S.list({}),queryFn:async()=>(await (0,C.getBudgetList)(e)??[]).filter(e=>null!=e),enabled:!!e})})(),R=(()=>{let{accessToken:e}=(0,N.default)(),t=(0,k.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,C.budgetDeleteCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),z=async t=>{null!=e&&(O(t),E(!0))},V=async()=>{if(I&&null!=e)try{await R.mutateAsync(I.budget_id),j.default.success("Budget deleted.")}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{D(!1),O(null)}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(l.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>T(!0),children:"+ Create Budget"}),(0,t.jsxs)(s.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Budgets"}),(0,t.jsx)(r.Tab,{children:"Examples"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(F,{isModalVisible:_,setIsModalVisible:T}),I&&(0,t.jsx)(P,{isModalVisible:M,setIsModalVisible:E,existingBudget:I}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(p.Text,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(n.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"Budget ID"}),(0,t.jsx)(d.TableHeaderCell,{children:"Max Budget"}),(0,t.jsx)(d.TableHeaderCell,{children:"TPM"}),(0,t.jsx)(d.TableHeaderCell,{children:"RPM"})]})}),(0,t.jsx)(i.TableBody,{children:B.slice().sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()).map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e.budget_id}),(0,t.jsx)(o.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(y.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>z(e),dataTestId:"edit-budget-button"}),(0,t.jsx)(y.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{O(e),D(!0)},dataTestId:"delete-budget-button"})]},e.budget_id))})]})]}),(0,t.jsx)(b.default,{isOpen:A,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:I?.budget_id,code:!0},{label:"Max Budget",value:I?.max_budget},{label:"TPM",value:I?.tpm_limit},{label:"RPM",value:I?.rpm_limit}],onCancel:()=>{D(!1)},onOk:V,confirmLoading:R.isPending})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(p.Text,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(s.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Assign Budget to Customer"}),(0,t.jsx)(r.Tab,{children:"Test it (Curl)"}),(0,t.jsx)(r.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:$})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:L})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"python",children:H})})]})]})]})})]})]})]})}],646050)},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,t)=>(e[t.team_id]=t.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,t)=>{let l=t.find(t=>t.team_id===e);return l?l.team_alias:null}])},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["GlobalOutlined",0,s],160818)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["MinusCircleOutlined",0,s],564897)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["SaveOutlined",0,s],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,r,s)=>{let n;n="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,r?.organization_id||null,l):await (0,t.teamListCall)(e,r?.organization_id||null),console.log(`givenTeams: ${n}`),s(n)};e.s(["fetchTeams",0,l])},747871,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(269200),r=e.i(942232),s=e.i(977572),n=e.i(427612),i=e.i(64848),o=e.i(496020),c=e.i(304967),d=e.i(994388),u=e.i(599724),m=e.i(389083),h=e.i(764205),g=e.i(727749);e.s(["default",0,({accessToken:e,userID:p})=>{let[x,f]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{if(e&&p)try{let t=await (0,h.availableTeamListCall)(e);f(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,p]);let b=async t=>{if(e&&p)try{await (0,h.teamMemberAddCall)(e,t,{user_id:p,role:"user"}),g.default.success("Successfully joined team"),f(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),g.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(n.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(i.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(i.TableHeaderCell,{children:"Description"}),(0,t.jsx)(i.TableHeaderCell,{children:"Members"}),(0,t.jsx)(i.TableHeaderCell,{children:"Models"}),(0,t.jsx)(i.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(r.TableBody,{children:[x.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Text,{children:e.team_alias})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Text,{children:e.description||"No description available"})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsxs)(u.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,l)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(u.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},l)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(u.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Button,{size:"xs",variant:"secondary",onClick:()=>b(e.team_id),children:"Join Team"})})]},e.team_id)),0===x.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(s.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(u.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])},468133,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(175712),r=e.i(464571),s=e.i(28651),n=e.i(898586),i=e.i(482725),o=e.i(199133),c=e.i(262218),d=e.i(621192),u=e.i(178654),m=e.i(751904),h=e.i(987432),g=e.i(764205),p=e.i(860585),x=e.i(355619),f=e.i(727749),b=e.i(162386);let{Title:y,Text:j}=n.Typography,v=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],w=({label:e,description:l,isEditing:a,viewContent:r,editContent:s})=>(0,t.jsxs)(d.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(u.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:l})]}),(0,t.jsx)(u.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:a?s:r})})]}),k=()=>(0,t.jsx)(j,{className:"text-gray-400 italic",children:"Not set"}),_=(e,l)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:l?l(e):e},e))}):(0,t.jsx)(k,{}),C={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[n,d]=(0,l.useState)(!0),[u,N]=(0,l.useState)(C),[S,T]=(0,l.useState)(!1),[M,E]=(0,l.useState)(C),[I,O]=(0,l.useState)(!1),[A,D]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(!e)return d(!1);try{let t=await (0,g.getDefaultTeamSettings)(e),l={...C,...t.values||{}};N(l),E(l)}catch(e){console.error("Error fetching team SSO settings:",e),D(!0),f.default.fromBackend("Failed to fetch team settings")}finally{d(!1)}})()},[e]);let B=async()=>{if(e){O(!0);try{let t=await (0,g.updateDefaultTeamSettings)(e,M),l={...C,...t.settings||{}};N(l),E(l),T(!1),f.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),f.default.fromBackend("Failed to update team settings")}finally{O(!1)}}},R=(e,t)=>{E(l=>({...l,[e]:t}))};return n?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(i.Spin,{size:"large"})}):A?(0,t.jsx)(a.Card,{children:(0,t.jsx)(j,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(a.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(y,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(j,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:S?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(r.Button,{onClick:()=>{T(!1),E(u)},disabled:I,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"primary",onClick:B,loading:I,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(r.Button,{onClick:()=>T(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:S,viewContent:null!=u.max_budget?(0,t.jsxs)(j,{children:["$",Number(u.max_budget).toLocaleString()]}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.max_budget,onChange:e=>R("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(w,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:S,viewContent:u.budget_duration?(0,t.jsx)(j,{children:(0,p.getBudgetDurationLabel)(u.budget_duration)}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(p.default,{value:M.budget_duration||null,onChange:e=>R("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(w,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:S,viewContent:null!=u.tpm_limit?(0,t.jsx)(j,{children:u.tpm_limit.toLocaleString()}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.tpm_limit,onChange:e=>R("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(w,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:S,viewContent:null!=u.rpm_limit?(0,t.jsx)(j,{children:u.rpm_limit.toLocaleString()}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.rpm_limit,onChange:e=>R("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Models",description:"Default list of models that new teams can access.",isEditing:S,viewContent:_(u.models,x.getModelDisplayName),editContent:(0,t.jsx)(b.ModelSelect,{value:M.models||[],onChange:e=>R("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(w,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:S,viewContent:_(u.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:M.team_member_permissions||[],onChange:e=>R("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:l,onClose:a})=>(0,t.jsx)(c.Tag,{color:"blue",closable:l,onClose:a,className:"mr-1 mt-1 mb-1",children:e}),children:v.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},735042,e=>{"use strict";e.i(247167);var t=e.i(843476),l=e.i(584935),a=e.i(290571),r=e.i(271645),s=e.i(95779),n=e.i(444755),i=e.i(673706);let o=(0,i.makeClassName)("BarList");function c(e,t){let{data:l=[],color:c,valueFormatter:d=i.defaultValueFormatter,showAnimation:u=!1,onValueChange:m,sortOrder:h="descending",className:g}=e,p=(0,a.__rest)(e,["data","color","valueFormatter","showAnimation","onValueChange","sortOrder","className"]),x=m?"button":"div",f=r.default.useMemo(()=>"none"===h?l:[...l].sort((e,t)=>"ascending"===h?e.value-t.value:t.value-e.value),[l,h]),b=r.default.useMemo(()=>{let e=Math.max(...f.map(e=>e.value),0);return f.map(t=>0===t.value?0:Math.max(t.value/e*100,2))},[f]);return r.default.createElement("div",Object.assign({ref:t,className:(0,n.tremorTwMerge)(o("root"),"flex justify-between space-x-6",g),"aria-sort":h},p),r.default.createElement("div",{className:(0,n.tremorTwMerge)(o("bars"),"relative w-full space-y-1.5")},f.map((e,t)=>{var l,a,d;let h=e.icon;return r.default.createElement(x,{key:null!=(l=e.key)?l:t,onClick:()=>{null==m||m(e)},className:(0,n.tremorTwMerge)(o("bar"),"group w-full flex items-center rounded-tremor-small",m?["cursor-pointer","hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-subtle/40"]:"")},r.default.createElement("div",{className:(0,n.tremorTwMerge)("flex items-center rounded transition-all bg-opacity-40","h-8",e.color||c?[(0,i.getColorClassNames)(null!=(a=e.color)?a:c,s.colorPalette.background).bgColor,m?"group-hover:bg-opacity-30":""]:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle/60",!m||e.color||c?"":"group-hover:bg-tremor-brand-subtle/30 group-hover:dark:bg-dark-tremor-brand-subtle/70",t===f.length-1?"mb-0":"",u?"duration-500":""),style:{width:`${b[t]}%`,transition:u?"all 1s":""}},r.default.createElement("div",{className:(0,n.tremorTwMerge)("absolute left-2 pr-4 flex max-w-full")},h?r.default.createElement(h,{className:(0,n.tremorTwMerge)(o("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?r.default.createElement("a",{href:e.href,target:null!=(d=e.target)?d:"_blank",rel:"noreferrer",className:(0,n.tremorTwMerge)(o("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default",m?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:e=>e.stopPropagation()},e.name):r.default.createElement("p",{className:(0,n.tremorTwMerge)(o("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name))))})),r.default.createElement("div",{className:o("labels")},f.map((e,t)=>{var l;return r.default.createElement("div",{key:null!=(l=e.key)?l:t,className:(0,n.tremorTwMerge)(o("labelWrapper"),"flex justify-end items-center","h-8",t===f.length-1?"mb-0":"mb-1.5")},r.default.createElement("p",{className:(0,n.tremorTwMerge)(o("labelText"),"whitespace-nowrap leading-none truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},d(e.value)))})))}c.displayName="BarList";let d=r.default.forwardRef(c);var u=e.i(304967),m=e.i(629569),h=e.i(269200),g=e.i(427612),p=e.i(64848),x=e.i(496020),f=e.i(977572),b=e.i(942232),y=e.i(37091),j=e.i(617802),v=e.i(144267),w=e.i(350967),k=e.i(309426),_=e.i(599724),C=e.i(404206),N=e.i(723731),S=e.i(653824),T=e.i(881073),M=e.i(197647),E=e.i(206929),I=e.i(35983),O=e.i(413990),A=e.i(476961),D=e.i(994388),B=e.i(621642),R=e.i(25080),F=e.i(764205),P=e.i(1023),$=e.i(500330);console.log("process.env.NODE_ENV","production");let L=e=>null!==e&&("Admin"===e||"Admin Viewer"===e);e.s(["default",0,({accessToken:e,token:a,userRole:s,userID:n,keys:i,premiumUser:o})=>{let c=new Date,[H,z]=(0,r.useState)([]),[V,U]=(0,r.useState)([]),[q,W]=(0,r.useState)([]),[G,K]=(0,r.useState)([]),[Y,J]=(0,r.useState)([]),[Q,X]=(0,r.useState)([]),[Z,ee]=(0,r.useState)([]),[et,el]=(0,r.useState)([]),[ea,er]=(0,r.useState)([]),[es,en]=(0,r.useState)([]),[ei,eo]=(0,r.useState)({}),[ec,ed]=(0,r.useState)([]),[eu,em]=(0,r.useState)(""),[eh,eg]=(0,r.useState)(["all-tags"]),[ep,ex]=(0,r.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[ef,eb]=(0,r.useState)(null),[ey,ej]=(0,r.useState)(0),ev=new Date(c.getFullYear(),c.getMonth(),1),ew=new Date(c.getFullYear(),c.getMonth()+1,0),ek=eM(ev),e_=eM(ew);function eC(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}console.log("keys in usage",i),console.log("premium user in usage",o);let eN=async()=>{if(e)try{let t=await (0,F.getProxyUISettings)(e);return console.log("usage tab: proxy_settings",t),t}catch(e){console.error("Error fetching proxy settings:",e)}};(0,r.useEffect)(()=>{eT(ep.from,ep.to)},[ep,eh]);let eS=async(t,l,a)=>{if(!t||!l||!e)return;console.log("uiSelectedKey",a);let r=await (0,F.adminTopEndUsersCall)(e,a,t.toISOString(),l.toISOString());console.log("End user data updated successfully",r),K(r)},eT=async(t,l)=>{if(!t||!l||!e)return;let a=await eN();a?.DISABLE_EXPENSIVE_DB_QUERIES||(X((await (0,F.tagsSpendLogsCall)(e,t.toISOString(),l.toISOString(),0===eh.length?void 0:eh)).spend_per_tag),console.log("Tag spend data updated successfully"))};function eM(e){let t=e.getFullYear(),l=e.getMonth()+1,a=e.getDate();return`${t}-${l<10?"0"+l:l}-${a<10?"0"+a:a}`}console.log(`Start date is ${ek}`),console.log(`End date is ${e_}`);let eE=async(e,t,l)=>{try{let l=await e();t(l)}catch(e){console.error(l,e)}},eI=(e,t,l,a)=>{let r=[],s=new Date(t),n=new Map(e.map(e=>{let t=(e=>{if(e.includes("-"))return e;{let[t,l]=e.split(" ");return new Date(new Date().getFullYear(),new Date(`${t} 01 2024`).getMonth(),parseInt(l)).toISOString().split("T")[0]}})(e.date);return[t,{...e,date:t}]}));for(;s<=l;){let e=s.toISOString().split("T")[0];if(n.has(e))r.push(n.get(e));else{let t={date:e,api_requests:0,total_tokens:0};a.forEach(e=>{t[e]||(t[e]=0)}),r.push(t)}s.setDate(s.getDate()+1)}return r},eO=async()=>{if(e)try{let t=await (0,F.adminSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=eI(t,a,r,[]),n=Number(s.reduce((e,t)=>e+(t.spend||0),0).toFixed(2));ej(n),z(s)}catch(e){console.error("Error fetching overall spend:",e)}},eA=async()=>{e&&await eE(async()=>(await (0,F.adminTopKeysCall)(e)).map(e=>({key:e.api_key.substring(0,10),api_key:e.api_key,key_alias:e.key_alias,spend:Number(e.total_spend.toFixed(2))})),U,"Error fetching top keys")},eD=async()=>{e&&await eE(async()=>(await (0,F.adminTopModelsCall)(e)).map(e=>({key:e.model,spend:(0,$.formatNumberWithCommas)(e.total_spend,2)})),W,"Error fetching top models")},eB=async()=>{e&&await eE(async()=>{let t=await (0,F.teamSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0);return J(eI(t.daily_spend,a,r,t.teams)),el(t.teams),t.total_spend_per_team.map(e=>({name:e.team_id||"",value:(0,$.formatNumberWithCommas)(e.total_spend||0,2)}))},er,"Error fetching team spend")},eR=async()=>{if(e)try{let t=await (0,F.adminGlobalActivity)(e,ek,e_),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=eI(t.daily_data||[],a,r,["api_requests","total_tokens"]);eo({...t,daily_data:s})}catch(e){console.error("Error fetching global activity:",e)}},eF=async()=>{if(e)try{let t=await (0,F.adminGlobalActivityPerModel)(e,ek,e_),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=t.map(e=>({...e,daily_data:eI(e.daily_data||[],a,r,["api_requests","total_tokens"])}));ed(s)}catch(e){console.error("Error fetching global activity per model:",e)}};return((0,r.useEffect)(()=>{(async()=>{if(e&&a&&s&&n){let t=await eN();!(t&&(eb(t),t?.DISABLE_EXPENSIVE_DB_QUERIES))&&(console.log("fetching data - valiue of proxySettings",ef),eO(),eE(()=>e&&a?(0,F.adminspendByProvider)(e,a,ek,e_):Promise.reject("No access token or token"),en,"Error fetching provider spend"),eA(),eD(),eR(),eF(),L(s)&&(eB(),e&&eE(async()=>(await (0,F.allTagNamesCall)(e)).tag_names,ee,"Error fetching tag names"),e&&eE(()=>(0,F.tagsSpendLogsCall)(e,ep.from?.toISOString(),ep.to?.toISOString(),void 0),e=>X(e.spend_per_tag),"Error fetching top tags"),e&&eE(()=>(0,F.adminTopEndUsersCall)(e,null,void 0,void 0),K,"Error fetching top end users")))}})()},[e,a,s,n,ek,e_]),ef?.DISABLE_EXPENSIVE_DB_QUERIES)?(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Database Query Limit Reached"}),(0,t.jsxs)(_.Text,{className:"mt-4",children:["SpendLogs in DB has ",ef.NUM_SPEND_LOGS_ROWS," rows.",(0,t.jsx)("br",{}),"Please follow our guide to view usage when SpendLogs has more than 1M rows."]}),(0,t.jsx)(D.Button,{className:"mt-4",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/spending_monitoring",target:"_blank",children:"View Usage Guide"})})]})}):(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{className:"mt-2",children:[(0,t.jsx)(M.Tab,{children:"All Up"}),L(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Tab,{children:"Team Based Usage"}),(0,t.jsx)(M.Tab,{children:"Customer Usage"}),(0,t.jsx)(M.Tab,{children:"Tag Based Usage"})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{})})]}),(0,t.jsxs)(N.TabPanels,{children:[(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(M.Tab,{children:"Cost"}),(0,t.jsx)(M.Tab,{children:"Activity"})]}),(0,t.jsxs)(N.TabPanels,{children:[(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[100vh] w-full",children:[(0,t.jsxs)(k.Col,{numColSpan:2,children:[(0,t.jsxs)(_.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content mb-2 mt-2 text-lg",children:["Project Spend ",new Date().toLocaleString("default",{month:"long"})," 1 -"," ",new Date(new Date().getFullYear(),new Date().getMonth()+1,0).getDate()]}),(0,t.jsx)(j.default,{userSpend:ey,selectedTeam:null,userMaxBudget:null})]}),(0,t.jsx)(k.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Monthly Spend"}),(0,t.jsx)(l.BarChart,{data:H,index:"date",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$ ${(0,$.formatNumberWithCommas)(e,2)}`,yAxisWidth:100,tickGap:5})]})}),(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(P.default,{topKeys:V,teams:null,topKeysLimit:5,setTopKeysLimit:()=>{}})]})}),(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Models"}),(0,t.jsx)(l.BarChart,{className:"mt-4 h-40",data:q,index:"key",categories:["spend"],colors:["cyan"],yAxisWidth:200,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>`$${(0,$.formatNumberWithCommas)(e,2)}`})]})}),(0,t.jsx)(k.Col,{numColSpan:1}),(0,t.jsx)(k.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Spend by Provider"}),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsx)(O.DonutChart,{className:"mt-4 h-40",variant:"pie",data:es,index:"provider",category:"spend",colors:["cyan"],valueFormatter:e=>`$${(0,$.formatNumberWithCommas)(e,2)}`})}),(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend"})]})}),(0,t.jsx)(b.TableBody,{children:es.map(e=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.provider}),(0,t.jsx)(f.TableCell,{children:1e-5>parseFloat(e.spend.toFixed(2))?"less than 0.00":(0,$.formatNumberWithCommas)(e.spend,2)})]},e.provider))})]})})]})})]})})]})}),(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:1,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"All Up"}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",eC(ei.sum_api_requests)]}),(0,t.jsx)(A.AreaChart,{className:"h-40",data:ei.daily_data,valueFormatter:eC,index:"date",colors:["cyan"],categories:["api_requests"],onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",eC(ei.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:ei.daily_data,valueFormatter:eC,index:"date",colors:["cyan"],categories:["total_tokens"],onValueChange:e=>console.log(e)})]})]})]}),(0,t.jsx)(t.Fragment,{children:ec.map((e,a)=>(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:e.model}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",eC(e.sum_api_requests)]}),(0,t.jsx)(A.AreaChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["api_requests"],valueFormatter:eC,onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",eC(e.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["total_tokens"],valueFormatter:eC,onValueChange:e=>console.log(e)})]})]})]},a))})]})})]})]})}),(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(k.Col,{numColSpan:2,children:[(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Total Spend Per Team"}),(0,t.jsx)(d,{data:ea})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Daily Spend Per Team"}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Y,showLegend:!0,index:"date",categories:et,yAxisWidth:80,stack:!0})]})]}),(0,t.jsx)(k.Col,{numColSpan:2})]})}),(0,t.jsxs)(C.TabPanel,{children:[(0,t.jsxs)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:["Customers of your LLM API calls. Tracked when a `user` param is passed in your LLM calls"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/users",target:"_blank",children:"docs here"})]}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(k.Col,{children:(0,t.jsx)(v.default,{value:ep,onValueChange:e=>{ex(e),eS(e.from,e.to,null)}})}),(0,t.jsxs)(k.Col,{children:[(0,t.jsx)(_.Text,{children:"Select Key"}),(0,t.jsxs)(E.Select,{defaultValue:"all-keys",children:[(0,t.jsx)(I.SelectItem,{value:"all-keys",onClick:()=>{eS(ep.from,ep.to,null)},children:"All Keys"},"all-keys"),i?.map((e,l)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,t.jsx)(I.SelectItem,{value:String(l),onClick:()=>{eS(ep.from,ep.to,e.token)},children:e.key_alias},l):null)]})]})]}),(0,t.jsx)(u.Card,{className:"mt-4",children:(0,t.jsxs)(h.Table,{className:"max-h-[70vh] min-h-[500px]",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Customer"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(p.TableHeaderCell,{children:"Total Events"})]})}),(0,t.jsx)(b.TableBody,{children:G?.map((e,l)=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.end_user}),(0,t.jsx)(f.TableCell,{children:(0,$.formatNumberWithCommas)(e.total_spend,2)}),(0,t.jsx)(f.TableCell,{children:e.total_count})]},l))})]})})]}),(0,t.jsxs)(C.TabPanel,{children:[(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsx)(v.default,{className:"mb-4",value:ep,onValueChange:e=>{ex(e),eT(e.from,e.to)}})}),(0,t.jsx)(k.Col,{children:o?(0,t.jsx)("div",{children:(0,t.jsxs)(B.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(R.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsx)(R.MultiSelectItem,{value:String(e),children:e},e))]})}):(0,t.jsx)("div",{children:(0,t.jsxs)(B.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(R.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsxs)(I.SelectItem,{value:String(e),disabled:!0,children:["✨ ",e," (Enterprise only Feature)"]},e))]})})})]}),(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full mb-4",children:[(0,t.jsx)(k.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Spend Per Tag"}),(0,t.jsxs)(_.Text,{children:["Get Started by Tracking cost per tag"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/cost_tracking",target:"_blank",children:"here"})]}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Q,index:"name",categories:["spend"],colors:["cyan"]})]})}),(0,t.jsx)(k.Col,{numColSpan:2})]})]})]})]})})}],735042)},345244,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(752978),r=e.i(994388),s=e.i(309426),n=e.i(599724),i=e.i(350967),o=e.i(278587),c=e.i(304967),d=e.i(629569),u=e.i(389083),m=e.i(677667),h=e.i(898667),g=e.i(130643),p=e.i(808613),x=e.i(311451),f=e.i(199133),b=e.i(592968),y=e.i(827252),j=e.i(702597),v=e.i(355619),w=e.i(764205),k=e.i(727749),_=e.i(435451),C=e.i(860585),N=e.i(500330),S=e.i(678784),T=e.i(118366),M=e.i(464571);let E=({tagId:e,onClose:a,accessToken:s,is_admin:i,editTag:o})=>{let[E]=p.Form.useForm(),[I,O]=(0,l.useState)(null),[A,D]=(0,l.useState)(o),[B,R]=(0,l.useState)([]),[F,P]=(0,l.useState)({}),$=async(e,t)=>{await (0,N.copyToClipboard)(e)&&(P(e=>({...e,[t]:!0})),setTimeout(()=>{P(e=>({...e,[t]:!1}))},2e3))},L=async()=>{if(s)try{let t=(await (0,w.tagInfoCall)(s,[e]))[e];t&&(O(t),o&&E.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),k.default.fromBackend("Error fetching tag details: "+e)}};(0,l.useEffect)(()=>{L()},[e,s]),(0,l.useEffect)(()=>{s&&(0,j.fetchUserModels)("dummy-user","Admin",s,R)},[s]);let H=async e=>{if(s)try{await (0,w.tagUpdateCall)(s,{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}),k.default.success("Tag updated successfully"),D(!1),L()}catch(e){console.error("Error updating tag:",e),k.default.fromBackend("Error updating tag: "+e)}};return I?(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)(r.Button,{onClick:a,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 text-sm border border-gray-200",children:I.name}),(0,t.jsx)(M.Button,{type:"text",size:"small",icon:F["tag-name"]?(0,t.jsx)(S.CheckIcon,{size:12}):(0,t.jsx)(T.CopyIcon,{size:12}),onClick:()=>$(I.name,"tag-name"),className:`transition-all duration-200 ${F["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:I.description||"No description"})]}),i&&!A&&(0,t.jsx)(r.Button,{onClick:()=>D(!0),children:"Edit Tag"})]}),A?(0,t.jsx)(c.Card,{children:(0,t.jsxs)(p.Form,{form:E,onFinish:H,layout:"vertical",initialValues:I,children:[(0,t.jsx)(p.Form.Item,{label:"Tag Name",name:"name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(x.Input,{className:"rounded-md border-gray-300"})}),(0,t.jsx)(p.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(x.Input.TextArea,{rows:4})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process this type of data",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:B.map(e=>(0,t.jsx)(f.Select.Option,{value:e,children:(0,v.getModelDisplayName)(e)},e))})}),(0,t.jsxs)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(_.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(C.default,{onChange:e=>E.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)(r.Button,{onClick:()=>D(!1),children:"Cancel"}),(0,t.jsx)(r.Button,{type:"submit",children:"Save Changes"})]})]})}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.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:I.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Description"}),(0,t.jsx)(n.Text,{children:I.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:I.models&&0!==I.models.length?I.models.map(e=>(0,t.jsx)(u.Badge,{color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:I.model_info?.[e]||e})},e)):(0,t.jsx)(u.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:I.created_at?new Date(I.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:I.updated_at?new Date(I.updated_at).toLocaleString():"-"})]})]})]}),I.litellm_budget_table&&(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.Title,{children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[void 0!==I.litellm_budget_table.max_budget&&null!==I.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:["$",I.litellm_budget_table.max_budget]})]}),I.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:I.litellm_budget_table.budget_duration})]}),void 0!==I.litellm_budget_table.tpm_limit&&null!==I.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:I.litellm_budget_table.tpm_limit.toLocaleString()})]}),void 0!==I.litellm_budget_table.rpm_limit&&null!==I.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:I.litellm_budget_table.rpm_limit.toLocaleString()})]})]})]})]})]}):(0,t.jsx)("div",{children:"Loading..."})};var I=e.i(871943),O=e.i(360820),A=e.i(591935),D=e.i(94629),B=e.i(68155),R=e.i(152990),F=e.i(682830),P=e.i(269200),$=e.i(942232),L=e.i(977572),H=e.i(427612),z=e.i(64848),V=e.i(496020);let U="This is just a spend tag that was passed dynamically in a request. It does not control any LLM models.",q=({data:e,onEdit:s,onDelete:i,onSelectTag:o})=>{let[c,d]=l.default.useState([{id:"created_at",desc:!0}]),m=[{header:"Tag Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,a=l.description===U;return(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(b.Tooltip,{title:a?"You cannot view the information of a dynamically generated spend tag":l.name,children:(0,t.jsx)(r.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5",onClick:()=>o(l.name),disabled:a,children:l.name})})})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(b.Tooltip,{title:l.description,children:(0,t.jsx)("span",{className:"text-xs",children:l.description||"-"})})}},{header:"Allowed Models",accessorKey:"models",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:l?.models?.length===0?(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"red",children:"All Models"}):l?.models?.map(e=>(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:(0,t.jsx)(n.Text,{children:l.model_info?.[e]||e})})},e))})}},{header:"Created",accessorKey:"created_at",sortingFn:"datetime",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("span",{className:"text-xs",children:new Date(l.created_at).toLocaleDateString()})}},{id:"actions",header:"Actions",cell:({row:e})=>{let l=e.original,r=l.description===U;return(0,t.jsxs)("div",{className:"flex space-x-2",children:[r?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be edited",children:(0,t.jsx)(a.Icon,{icon:A.PencilAltIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Edit tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Edit tag",children:(0,t.jsx)(a.Icon,{icon:A.PencilAltIcon,size:"sm",onClick:()=>s(l),className:"cursor-pointer hover:text-blue-500"})}),r?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be deleted",children:(0,t.jsx)(a.Icon,{icon:B.TrashIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Delete tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Delete tag",children:(0,t.jsx)(a.Icon,{icon:B.TrashIcon,size:"sm",onClick:()=>i(l.name),className:"cursor-pointer hover:text-red-500"})})]})}}],h=(0,R.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:d,getCoreRowModel:(0,F.getCoreRowModel)(),getSortedRowModel:(0,F.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(P.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(H.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(V.TableRow,{children:e.headers.map(e=>(0,t.jsx)(z.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,R.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(O.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(I.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(D.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)($.TableBody,{children:h.getRowModel().rows.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(V.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(L.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,R.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(V.TableRow,{children:(0,t.jsx)(L.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No tags found"})})})})})]})})})};var W=e.i(779241),G=e.i(212931);let K=({visible:e,onCancel:l,onSubmit:a,availableModels:s})=>{let[n]=p.Form.useForm();return(0,t.jsx)(G.Modal,{title:"Create New Tag",open:e,width:800,footer:null,onCancel:()=>{n.resetFields(),l()},children:(0,t.jsxs)(p.Form,{form:n,onFinish:e=>{a(e),n.resetFields()},labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(p.Form.Item,{label:"Tag Name",name:"tag_name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(W.TextInput,{})}),(0,t.jsx)(p.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(x.Input.TextArea,{rows:4})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process requests from this tag",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_llms",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:s.map(e=>(0,t.jsx)(f.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)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits (Optional)"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(p.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend. When reached, requests with this tag will be blocked",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(_.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(p.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(C.default,{onChange:e=>n.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)(r.Button,{type:"submit",children:"Create Tag"})})]})})};e.s(["default",0,({accessToken:e,userID:c,userRole:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1),[p,x]=(0,l.useState)(null),[f,b]=(0,l.useState)(!1),[y,j]=(0,l.useState)(!1),[v,_]=(0,l.useState)(null),[C,N]=(0,l.useState)(""),[S,T]=(0,l.useState)([]),M=async()=>{if(e)try{let t=await (0,w.tagListCall)(e);console.log("List tags response:",t),m(Object.values(t))}catch(e){console.error("Error fetching tags:",e),k.default.fromBackend("Error fetching tags: "+e)}},I=async t=>{if(e)try{await (0,w.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}),k.default.success("Tag created successfully"),g(!1),M()}catch(e){console.error("Error creating tag:",e),k.default.fromBackend("Error creating tag: "+e)}},O=async e=>{_(e),j(!0)},A=async()=>{if(e&&v){try{await (0,w.tagDeleteCall)(e,v),k.default.success("Tag deleted successfully"),M()}catch(e){console.error("Error deleting tag:",e),k.default.fromBackend("Error deleting tag: "+e)}j(!1),_(null)}};return(0,l.useEffect)(()=>{c&&d&&e&&(async()=>{try{let t=await (0,w.modelInfoCall)(e,c,d);t&&t.data&&T(t.data)}catch(e){console.error("Error fetching models:",e),k.default.fromBackend("Error fetching models: "+e)}})()},[e,c,d]),(0,l.useEffect)(()=>{M()},[e]),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:p?(0,t.jsx)(E,{tagId:p,onClose:()=>{x(null),b(!1)},accessToken:e,is_admin:"Admin"===d,editTag:f}):(0,t.jsxs)("div",{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between mt-2 w-full items-center mb-4",children:[(0,t.jsx)("h1",{children:"Tag Management"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[C&&(0,t.jsxs)(n.Text,{children:["Last Refreshed: ",C]}),(0,t.jsx)(a.Icon,{icon:o.RefreshIcon,variant:"shadow",size:"xs",className:"self-center cursor-pointer",onClick:()=>{M(),N(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(n.Text,{className:"mb-4",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)(r.Button,{className:"mb-4",onClick:()=>g(!0),children:"+ Create New Tag"}),(0,t.jsx)(i.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,t.jsx)(s.Col,{numColSpan:1,children:(0,t.jsx)(q,{data:u,onEdit:e=>{x(e.name),b(!0)},onDelete:O,onSelectTag:x})})}),(0,t.jsx)(K,{visible:h,onCancel:()=>g(!1),onSubmit:I,availableModels:S}),y&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Tag"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this tag?"})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(r.Button,{onClick:A,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(r.Button,{onClick:()=>{j(!1),_(null)},children:"Cancel"})]})]})]})})]})})}],345244)},368670,e=>{"use strict";var t=e.i(764205),l=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,l.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},226898,972520,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(389083),o=e.i(64848),c=e.i(977572),d=e.i(942232),u=e.i(599724),m=e.i(994388),h=e.i(752978),g=e.i(793130),p=e.i(404206),x=e.i(723731),f=e.i(653824),b=e.i(881073),y=e.i(197647),j=e.i(764205),v=e.i(28651),w=e.i(68155),k=e.i(220508),_=e.i(464571),C=e.i(727749),N=e.i(158392);let S=({accessToken:e,userRole:a,userID:r,modelData:s})=>{let[n,i]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)({}),[m,h]=(0,l.useState)({});return((0,l.useEffect)(()=>{e&&a&&r&&((0,j.getCallbacksCall)(e,r,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy;let l=t.routing_strategy||null;i(e=>({...e,routerSettings:t,selectedStrategy:l}))}),(0,j.getRouterSettingsCall)(e).then(e=>{if(console.log("router settings from API",e),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}}),u(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&c(l.options),e.routing_strategy_descriptions&&h(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&&i(e=>({...e,enableTagFiltering:a.field_value}))}}))},[e,a,r]),e)?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(N.default,{value:n,onChange:i,routerFieldsMetadata:d,availableRoutingStrategies:o,routingStrategyDescriptions:m}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(_.Button,{onClick:()=>window.location.reload(),children:"Reset"}),(0,t.jsx)(_.Button,{type:"primary",onClick:()=>{if(!e)return;let t=n.routerSettings;console.log("router_settings",t);let l=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),a=new Set(["model_group_alias","retry_policy"]),r=Object.fromEntries(Object.entries({...t,enable_tag_filtering:n.enableTagFiltering}).map(([e,t])=>{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,n.selectedStrategy];if("enable_tag_filtering"===e)return[e,n.enableTagFiltering];if("routing_strategy_args"===e&&"latency-based-routing"===n.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)),console.log(`setRoutingStrategyArgs: ${e}`),["routing_strategy_args",e]}return null}).filter(e=>null!=e));console.log("updatedVariables",r);try{(0,j.setCallbacksCall)(e,{router_settings:r})}catch(e){C.default.fromBackend("Failed to update router settings: "+e)}C.default.success("router settings updated successfully")},children:"Save Changes"})]})]}):null};e.i(247167);var T=e.i(368670);let M=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 E=e.i(122577),I=e.i(592968),O=e.i(898586),A=e.i(356449),D=e.i(127952),B=e.i(418371),R=e.i(888259),F=e.i(689020),P=e.i(212931);let $=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function L({open:e,onCancel:l,children:a}){return(0,t.jsx)(P.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)($,{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})})}e.s(["ArrowRight",()=>$],972520);var H=e.i(419470);function z({models:e,accessToken:a,value:r=[],onChange:s}){let[n,i]=(0,l.useState)(!1),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)(0),[h,g]=(0,l.useState)(!1),[p,x]=(0,l.useState)([{id:"1",primaryModel:null,fallbackModels:[]}]);(0,l.useEffect)(()=>{n&&(x([{id:"1",primaryModel:null,fallbackModels:[]}]),u(e=>e+1))},[n]),(0,l.useEffect)(()=>{let e=async()=>{try{let e=await (0,F.fetchAvailableModels)(a);console.log("Fetched models for fallbacks:",e),c(e)}catch(e){console.error("Error fetching model info for fallbacks:",e)}};n&&e()},[a,n]);let f=Array.from(new Set(o.map(e=>e.model_group))).sort(),b=()=>{i(!1),x([{id:"1",primaryModel:null,fallbackModels:[]}])},y=async()=>{let e=p.filter(e=>!e.primaryModel||0===e.fallbackModels.length);if(e.length>0)return void R.default.error(`Please complete configuration for all groups. ${e.length} group(s) incomplete.`);let t=[...r||[],...p.map(e=>({[e.primaryModel]:e.fallbackModels}))];if(s){g(!0);try{await s(t),C.default.success(`${p.length} fallback configuration(s) added successfully!`),b()}catch(e){console.error("Error saving fallbacks:",e)}finally{g(!1)}}else C.default.fromBackend("onChange callback not provided")};return(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Button,{className:"mx-auto",onClick:()=>i(!0),icon:()=>(0,t.jsx)("span",{className:"mr-1",children:"+"}),children:"Add Fallbacks"}),(0,t.jsxs)(L,{open:n,onCancel:b,children:[(0,t.jsx)(H.FallbackSelectionForm,{groups:p,onGroupsChange:x,availableModels:f,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)(_.Button,{type:"default",onClick:b,disabled:h,children:"Cancel"}),(0,t.jsx)(_.Button,{type:"default",onClick:y,disabled:0===p.length||h,loading:h,children:h?"Saving Configuration...":"Save All Configurations"})]})]})]})}let V="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 U(e,l){console.log=function(){};let a=window.location.origin,r=new A.default.OpenAI({apiKey:l,baseURL:a,dangerouslyAllowBrowser:!0});try{C.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});C.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){C.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`)}}let q=({accessToken:e,userRole:a,userID:i,modelData:u})=>{let[m,g]=(0,l.useState)({}),[p,x]=(0,l.useState)(!1),[f,b]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),{data:k}=(0,T.useModelCostMap)(),_=e=>null!=k&&"object"==typeof k&&e in k?k[e].litellm_provider??"":"";(0,l.useEffect)(()=>{e&&a&&i&&(0,j.getCallbacksCall)(e,i,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)})},[e,a,i]);let N=e=>{b(e),v(!0)},S=async()=>{if(!f||!e)return;let t=Object.keys(f)[0];if(!t)return;x(!0);let l=m.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={...m,fallbacks:l};try{await (0,j.setCallbacksCall)(e,{router_settings:a}),g(a),C.default.success("Router settings updated successfully")}catch(e){C.default.fromBackend("Failed to update router settings: "+e)}finally{x(!1),v(!1),b(null)}};if(!e)return null;let A=async t=>{if(!e)return;let l={...m,fallbacks:t};try{await (0,j.setCallbacksCall)(e,{router_settings:l}),g(l)}catch(t){throw C.default.fromBackend("Failed to update router settings: "+t),e&&a&&i&&(0,j.getCallbacksCall)(e,i,a).then(e=>{let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)}),t}},R=Array.isArray(m.fallbacks)&&m.fallbacks.length>0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z,{models:u?.data?u.data.map(e=>e.model_name):[],accessToken:e||"",value:m.fallbacks||[],onChange:A}),R?(0,t.jsxs)(r.Table,{children:[(0,t.jsx)(s.TableHead,{children:(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(o.TableHeaderCell,{children:"Model Name"}),(0,t.jsx)(o.TableHeaderCell,{children:"Fallbacks"}),(0,t.jsx)(o.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(d.TableBody,{children:m.fallbacks.map((a,r)=>Object.entries(a).map(([s,i])=>{let o;return(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(c.TableCell,{className:"align-top",children:(o=_?.(s)??s,(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(B.ProviderLogo,{provider:o,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:s})]}))}),(0,t.jsx)(c.TableCell,{className:"align-top",children:function(e,a,r){let s=Array.isArray(a)?a:[];if(0===s.length)return null;let n=({modelName:e})=>{let l=r?.(e)??e;return(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(B.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)(M,{className:"w-5 h-5 stroke-[2.5]"})}),(0,t.jsx)("span",{className:"flex flex-wrap items-start gap-1 min-w-0",children:s.map((e,a)=>(0,t.jsxs)(l.default.Fragment,{children:[a>0&&(0,t.jsx)(h.Icon,{icon:M,size:"xs",className:"shrink-0 text-gray-400"}),(0,t.jsx)(n,{modelName:e})]},e))})]})}(0,Array.isArray(i)?i:[],_)}),(0,t.jsxs)(c.TableCell,{className:"align-top",children:[(0,t.jsx)(I.Tooltip,{title:"Test fallback",children:(0,t.jsx)(h.Icon,{icon:E.PlayIcon,size:"sm",onClick:()=>U(Object.keys(a)[0],e||""),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(I.Tooltip,{title:"Delete fallback",children:(0,t.jsx)("span",{"data-testid":"delete-fallback-button",role:"button",tabIndex:0,onClick:()=>N(a),onKeyDown:e=>"Enter"===e.key&&N(a),className:"cursor-pointer inline-flex",children:(0,t.jsx)(h.Icon,{icon:w.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)(O.Typography.Text,{type:"secondary",children:"No fallbacks configured. Add fallbacks to automatically try another model when the primary fails."})}),(0,t.jsx)(D.default,{isOpen:y,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:f?Object.keys(f)[0]:"",code:!0}],onCancel:()=>{v(!1),b(null)},onOk:S,confirmLoading:p})]})};e.s(["default",0,({accessToken:e,userRole:_,userID:C,modelData:N})=>{let[T,M]=(0,l.useState)([]);(0,l.useEffect)(()=>{e&&(0,j.getGeneralSettingsCall)(e).then(e=>{M(e)})},[e]);let E=(e,t)=>{M(T.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.TabGroup,{className:"h-[75vh] w-full",children:[(0,t.jsxs)(b.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(y.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(y.Tab,{value:"2",children:"Fallbacks"}),(0,t.jsx)(y.Tab,{value:"3",children:"General"})]}),(0,t.jsxs)(x.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(S,{accessToken:e,userRole:_,userID:C,modelData:N})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:_,userID:C,modelData:N})}),(0,t.jsx)(p.TabPanel,{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)(o.TableHeaderCell,{children:"Setting"}),(0,t.jsx)(o.TableHeaderCell,{children:"Value"}),(0,t.jsx)(o.TableHeaderCell,{children:"Status"}),(0,t.jsx)(o.TableHeaderCell,{children:"Action"})]})}),(0,t.jsx)(d.TableBody,{children:T.filter(e=>"TypedDictionary"!==e.field_type).map((l,a)=>(0,t.jsxs)(n.TableRow,{children:[(0,t.jsxs)(c.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)(c.TableCell,{children:"Integer"==l.field_type?(0,t.jsx)(v.InputNumber,{step:1,value:l.field_value,onChange:e=>E(l.field_name,e)}):"Boolean"==l.field_type?(0,t.jsx)(g.Switch,{checked:!0===l.field_value||"true"===l.field_value,onChange:e=>E(l.field_name,e)}):null}),(0,t.jsx)(c.TableCell,{children:!0==l.stored_in_db?(0,t.jsx)(i.Badge,{icon:k.CheckCircleIcon,className:"text-white",children:"In DB"}):!1==l.stored_in_db?(0,t.jsx)(i.Badge,{className:"text-gray bg-white outline",children:"In Config"}):(0,t.jsx)(i.Badge,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,t.jsxs)(c.TableCell,{children:[(0,t.jsx)(m.Button,{onClick:()=>((t,l)=>{if(!e)return;let a=T[l].field_value;if(null!=a&&void 0!=a)try{(0,j.updateConfigFieldSetting)(e,t,a);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:!0}:e);M(l)}catch(e){}})(l.field_name,a),children:"Update"}),(0,t.jsx)(h.Icon,{icon:w.TrashIcon,color:"red",onClick:()=>((t,l)=>{if(e)try{(0,j.deleteConfigFieldSetting)(e,t);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:null,field_value:null}:e);M(l)}catch(e){}})(l.field_name,0),children:"Reset"})]})]},a))})]})})})]})]})}):null}],226898)},559061,e=>{"use strict";var t=e.i(843476),l=e.i(584935),a=e.i(304967),r=e.i(309426),s=e.i(350967),n=e.i(752978),i=e.i(621642),o=e.i(25080),c=e.i(37091),d=e.i(197647),u=e.i(653824),m=e.i(881073),h=e.i(404206),g=e.i(723731),p=e.i(599724),x=e.i(271645),f=e.i(727749),b=e.i(144267),y=e.i(278587),j=e.i(764205),v=e.i(994388),w=e.i(220508),k=e.i(964306),_=e.i(551332);let C=({responseTimeMs:e})=>null==e?null:(0,t.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-500 font-mono",children:[(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 6V12L16 14M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,t.jsxs)("span",{children:[e.toFixed(0),"ms"]})]}),N=e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{}return t},S=({label:e,value:l})=>{let[a,r]=x.default.useState(!1),[s,n]=x.default.useState(!1),i=l?.toString()||"N/A",o=i.length>50?i.substring(0,50)+"...":i;return(0,t.jsx)("tr",{className:"hover:bg-gray-50",children:(0,t.jsx)("td",{className:"px-4 py-2 align-top",colSpan:2,children:(0,t.jsxs)("div",{className:"flex items-center justify-between group",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[(0,t.jsx)("button",{onClick:()=>r(!a),className:"text-gray-400 hover:text-gray-600 mr-2",children:a?"▼":"▶"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm text-gray-600",children:e}),(0,t.jsx)("pre",{className:"mt-1 text-sm font-mono text-gray-800 whitespace-pre-wrap",children:a?i:o})]})]}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(i),n(!0),setTimeout(()=>n(!1),2e3)},className:"opacity-0 group-hover:opacity-100 text-gray-400 hover:text-gray-600",children:(0,t.jsx)(_.ClipboardCopyIcon,{className:"h-4 w-4"})})]})})})},T=({response:e})=>{let l=null,a={},r={};try{if(e?.error)try{let t="string"==typeof e.error.message?JSON.parse(e.error.message):e.error.message;l={message:t?.message||"Unknown error",traceback:t?.traceback||"No traceback available",litellm_params:t?.litellm_cache_params||{},health_check_cache_params:t?.health_check_cache_params||{}},a=N(l.litellm_params)||{},r=N(l.health_check_cache_params)||{}}catch(t){console.warn("Error parsing error details:",t),l={message:String(e.error.message||"Unknown error"),traceback:"Error parsing details",litellm_params:{},health_check_cache_params:{}}}else a=N(e?.litellm_cache_params)||{},r=N(e?.health_check_cache_params)||{}}catch(e){console.warn("Error in response parsing:",e),a={},r={}}let s={redis_host:r?.redis_client?.connection_pool?.connection_kwargs?.host||r?.redis_async_client?.connection_pool?.connection_kwargs?.host||r?.connection_kwargs?.host||r?.host||"N/A",redis_port:r?.redis_client?.connection_pool?.connection_kwargs?.port||r?.redis_async_client?.connection_pool?.connection_kwargs?.port||r?.connection_kwargs?.port||r?.port||"N/A",redis_version:r?.redis_version||"N/A",startup_nodes:(()=>{try{if(r?.redis_kwargs?.startup_nodes)return JSON.stringify(r.redis_kwargs.startup_nodes);let e=r?.redis_client?.connection_pool?.connection_kwargs?.host||r?.redis_async_client?.connection_pool?.connection_kwargs?.host,t=r?.redis_client?.connection_pool?.connection_kwargs?.port||r?.redis_async_client?.connection_pool?.connection_kwargs?.port;return e&&t?JSON.stringify([{host:e,port:t}]):"N/A"}catch(e){return"N/A"}})(),namespace:r?.namespace||"N/A"};return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,t.jsxs)(u.TabGroup,{children:[(0,t.jsxs)(m.TabList,{className:"border-b border-gray-200 px-4",children:[(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Summary"}),(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Raw Response"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-6",children:[e?.status==="healthy"?(0,t.jsx)(w.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}):(0,t.jsx)(k.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsxs)(p.Text,{className:`text-sm font-medium ${e?.status==="healthy"?"text-green-500":"text-red-500"}`,children:["Cache Status: ",e?.status||"unhealthy"]})]}),(0,t.jsx)("table",{className:"w-full border-collapse",children:(0,t.jsxs)("tbody",{children:[l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold text-red-600",children:"Error Details"})}),(0,t.jsx)(S,{label:"Error Message",value:l.message}),(0,t.jsx)(S,{label:"Traceback",value:l.traceback})]}),(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Cache Details"})}),(0,t.jsx)(S,{label:"Cache Configuration",value:String(a?.type)}),(0,t.jsx)(S,{label:"Ping Response",value:String(e.ping_response)}),(0,t.jsx)(S,{label:"Set Cache Response",value:e.set_cache_response||"N/A"}),(0,t.jsx)(S,{label:"litellm_settings.cache_params",value:JSON.stringify(a,null,2)}),a?.type==="redis"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Redis Details"})}),(0,t.jsx)(S,{label:"Redis Host",value:s.redis_host||"N/A"}),(0,t.jsx)(S,{label:"Redis Port",value:s.redis_port||"N/A"}),(0,t.jsx)(S,{label:"Redis Version",value:s.redis_version||"N/A"}),(0,t.jsx)(S,{label:"Startup Nodes",value:s.startup_nodes||"N/A"}),(0,t.jsx)(S,{label:"Namespace",value:s.namespace||"N/A"})]})]})})]})}),(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded-md p-4 font-mono text-sm",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words overflow-auto max-h-[500px]",children:(()=>{try{let t={...e,litellm_cache_params:a,health_check_cache_params:r},l=JSON.parse(JSON.stringify(t,(e,t)=>{if("string"==typeof t)try{return JSON.parse(t)}catch{}return t}));return JSON.stringify(l,null,2)}catch(e){return"Error formatting JSON: "+e.message}})()})})})]})]})})},M=({accessToken:e,healthCheckResponse:l,runCachingHealthCheck:a,responseTimeMs:r})=>{let[s,n]=x.default.useState(null),[i,o]=x.default.useState(!1),c=async()=>{o(!0);let e=performance.now();await a(),n(performance.now()-e),o(!1)};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(v.Button,{onClick:c,disabled:i,className:"bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 text-white text-sm px-4 py-2 rounded-md",children:i?"Running Health Check...":"Run Health Check"}),(0,t.jsx)(C,{responseTimeMs:s})]}),l&&(0,t.jsx)(T,{response:l})]})};var E=e.i(677667),I=e.i(898667),O=e.i(130643),A=e.i(206929),D=e.i(35983);let B=({redisType:e,redisTypeDescriptions:l,onTypeChange:a})=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Redis Type"}),(0,t.jsxs)(A.Select,{value:e,onValueChange:a,children:[(0,t.jsx)(D.SelectItem,{value:"node",children:"Node (Single Instance)"}),(0,t.jsx)(D.SelectItem,{value:"cluster",children:"Cluster"}),(0,t.jsx)(D.SelectItem,{value:"sentinel",children:"Sentinel"}),(0,t.jsx)(D.SelectItem,{value:"semantic",children:"Semantic"})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:l[e]||"Select the type of Redis deployment you're using"})]});var R=e.i(135214),F=e.i(620250),P=e.i(779241),$=e.i(199133),L=e.i(689020),H=e.i(435451);let z=({field:e,currentValue:l})=>{let[a,r]=(0,x.useState)([]),[s,n]=(0,x.useState)(l||""),{accessToken:i}=(0,R.default)();if((0,x.useEffect)(()=>{i&&(async()=>{try{let e=await (0,L.fetchAvailableModels)(i);console.log("Fetched models for selector:",e),e.length>0&&r(e)}catch(e){console.error("Error fetching model info:",e)}})()},[i]),"Boolean"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",name:e.field_name,defaultChecked:!0===l||"true"===l,className:"h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:e.field_description})]})]});if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(H.default,{name:e.field_name,type:"number",defaultValue:l,placeholder:e.field_description}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("List"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)("textarea",{name:e.field_name,defaultValue:"object"==typeof l?JSON.stringify(l,null,2):l,placeholder:e.field_description,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500",rows:4}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("Models_Select"===e.field_type){let l=a.filter(e=>"embedding"===e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)($.Select,{value:s,onChange:n,showSearch:!0,placeholder:"Search and select a model...",options:l,style:{width:"100%"},className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("input",{type:"hidden",name:e.field_name,value:s}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})}if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(F.NumberInput,{name:e.field_name,defaultValue:l,placeholder:e.field_description,step:"Float"===e.field_type?.01:1}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});let o="password"===e.field_name||e.field_name.includes("password")?"password":"text";return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(P.TextInput,{name:e.field_name,type:o,defaultValue:l,placeholder:e.field_description}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})},V=(e,t)=>e.find(e=>e.field_name===t),U=(e,t)=>{let l={type:"redis"};return e.forEach(e=>{if("redis_type"===e.field_name||null!==e.redis_type&&void 0!==e.redis_type&&e.redis_type!==t)return;let a=e.field_name,r=null;if("Boolean"===e.field_type){let e=document.querySelector(`input[name="${a}"]`);e?.checked!==void 0&&(r=e.checked)}else if("List"===e.field_type){let e=document.querySelector(`textarea[name="${a}"]`);if(e?.value)try{r=JSON.parse(e.value)}catch(e){console.error(`Invalid JSON for ${a}:`,e)}}else{let t=document.querySelector(`input[name="${a}"]`);if(t?.value){let l=t.value.trim();if(""!==l)if("Integer"===e.field_type){let e=Number(l);isNaN(e)||(r=e)}else if("Float"===e.field_type){let e=Number(l);isNaN(e)||(r=e)}else r=l}}null!=r&&(l[a]=r)}),l},q=({accessToken:e,userRole:l,userID:a})=>{let r,s,n,i,o,[c,d]=(0,x.useState)({}),[u,m]=(0,x.useState)([]),[h,g]=(0,x.useState)({}),[p,b]=(0,x.useState)("node"),[y,w]=(0,x.useState)(!1),[k,_]=(0,x.useState)(!1),C=(0,x.useCallback)(async()=>{try{let t=await (0,j.getCacheSettingsCall)(e);console.log("cache settings from API",t),t.fields&&m(t.fields),t.current_values&&(d(t.current_values),t.current_values.redis_type&&b(t.current_values.redis_type)),t.redis_type_descriptions&&g(t.redis_type_descriptions)}catch(e){console.error("Failed to load cache settings:",e),f.default.fromBackend("Failed to load cache settings")}},[e]);(0,x.useEffect)(()=>{e&&C()},[e,C]);let N=async()=>{if(e){w(!0);try{let t=U(u,p),l=await (0,j.testCacheConnectionCall)(e,t);"success"===l.status?f.default.success("Cache connection test successful!"):f.default.fromBackend(`Connection test failed: ${l.message||l.error}`)}catch(e){console.error("Test connection error:",e),f.default.fromBackend(`Connection test failed: ${e.message||"Unknown error"}`)}finally{w(!1)}}},S=async()=>{if(e){_(!0);try{let t=U(u,p);"semantic"===p&&(t.type="redis-semantic"),await (0,j.updateCacheSettingsCall)(e,t),f.default.success("Cache settings updated successfully"),await C()}catch(e){console.error("Failed to save cache settings:",e),f.default.fromBackend("Failed to update cache settings")}finally{_(!1)}}};if(!e)return null;let{basicFields:T,sslFields:M,cacheManagementFields:A,gcpFields:D,clusterFields:R,sentinelFields:F,semanticFields:P}=(r=["host","port","password","username"].map(e=>V(u,e)).filter(Boolean),s=["ssl","ssl_cert_reqs","ssl_check_hostname"].map(e=>V(u,e)).filter(Boolean),n=["namespace","ttl","max_connections"].map(e=>V(u,e)).filter(Boolean),i=["gcp_service_account","gcp_ssl_ca_certs"].map(e=>V(u,e)).filter(Boolean),o=u.filter(e=>"cluster"===e.redis_type),{basicFields:r,sslFields:s,cacheManagementFields:n,gcpFields:i,clusterFields:o,sentinelFields:u.filter(e=>"sentinel"===e.redis_type),semanticFields:u.filter(e=>"semantic"===e.redis_type)});return(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:"Cache Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure Redis cache for LiteLLM"})]}),(0,t.jsx)(B,{redisType:p,redisTypeDescriptions:h,onTypeChange:b}),(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Connection Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:T.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),"cluster"===p&&R.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Cluster Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6",children:R.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),"sentinel"===p&&F.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Sentinel Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:F.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),"semantic"===p&&P.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Semantic Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:P.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),(0,t.jsxs)(E.Accordion,{className:"mt-4",children:[(0,t.jsx)(I.AccordionHeader,{children:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Advanced Settings"})}),(0,t.jsx)(O.AccordionBody,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[M.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"SSL Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:M.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),A.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"Cache Management"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:A.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),D.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"GCP Authentication"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:D.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]})]})})]})]}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(v.Button,{variant:"secondary",size:"sm",onClick:N,disabled:y,className:"text-sm",children:y?"Testing...":"Test Connection"}),(0,t.jsx)(v.Button,{size:"sm",onClick:S,disabled:k,className:"text-sm font-medium",children:k?"Saving...":"Save Changes"})]})]})},W=e=>{if(e)return e.toISOString().split("T")[0]};function G(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}e.s(["default",0,({accessToken:e,token:v,userRole:w,userID:k,premiumUser:_})=>{let[C,N]=(0,x.useState)([]),[S,T]=(0,x.useState)([]),[E,I]=(0,x.useState)([]),[O,A]=(0,x.useState)([]),[D,B]=(0,x.useState)("0"),[R,F]=(0,x.useState)("0"),[P,$]=(0,x.useState)("0"),[L,H]=(0,x.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[z,V]=(0,x.useState)(""),[U,K]=(0,x.useState)("");(0,x.useEffect)(()=>{e&&L&&((async()=>{A(await (0,j.adminGlobalCacheActivity)(e,W(L.from),W(L.to)))})(),V(new Date().toLocaleString()))},[e]);let Y=Array.from(new Set(O.map(e=>e?.api_key??""))),J=Array.from(new Set(O.map(e=>e?.model??"")));Array.from(new Set(O.map(e=>e?.call_type??"")));let Q=async(t,l)=>{t&&l&&e&&A(await (0,j.adminGlobalCacheActivity)(e,W(t),W(l)))};(0,x.useEffect)(()=>{console.log("DATA IN CACHE DASHBOARD",O);let e=O;S.length>0&&(e=e.filter(e=>S.includes(e.api_key))),E.length>0&&(e=e.filter(e=>E.includes(e.model))),console.log("before processed data in cache dashboard",e);let t=0,l=0,a=0,r=e.reduce((e,r)=>{console.log("Processing item:",r),r.call_type||(console.log("Item has no call_type:",r),r.call_type="Unknown"),t+=(r.total_rows||0)-(r.cache_hit_true_rows||0),l+=r.cache_hit_true_rows||0,a+=r.cached_completion_tokens||0;let s=e.find(e=>e.name===r.call_type);return s?(s["LLM API requests"]+=(r.total_rows||0)-(r.cache_hit_true_rows||0),s["Cache hit"]+=r.cache_hit_true_rows||0,s["Cached Completion Tokens"]+=r.cached_completion_tokens||0,s["Generated Completion Tokens"]+=r.generated_completion_tokens||0):e.push({name:r.call_type,"LLM API requests":(r.total_rows||0)-(r.cache_hit_true_rows||0),"Cache hit":r.cache_hit_true_rows||0,"Cached Completion Tokens":r.cached_completion_tokens||0,"Generated Completion Tokens":r.generated_completion_tokens||0}),e},[]);B(G(l)),F(G(a));let s=l+t;s>0?$((l/s*100).toFixed(2)):$("0"),N(r),console.log("PROCESSED DATA IN CACHE DASHBOARD",r)},[S,E,L,O]);let X=async()=>{try{f.default.info("Running cache health check..."),K("");let t=await (0,j.cachingHealthCheckCall)(null!==e?e:"");console.log("CACHING HEALTH CHECK RESPONSE",t),K(t)}catch(t){let e;if(console.error("Error running health check:",t),t&&t.message)try{let l=JSON.parse(t.message);l.error&&(l=l.error),e=l}catch(l){e={message:t.message}}else e={message:"Unknown error occurred"};K({error:e})}};return(0,t.jsxs)(u.TabGroup,{className:"gap-2 p-8 h-full w-full mt-2 mb-8",children:[(0,t.jsxs)(m.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(d.Tab,{children:"Cache Analytics"}),(0,t.jsx)(d.Tab,{children:"Cache Health"}),(0,t.jsx)(d.Tab,{children:"Cache Settings"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[z&&(0,t.jsxs)(p.Text,{children:["Last Refreshed: ",z]}),(0,t.jsx)(n.Icon,{icon:y.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:()=>{V(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(a.Card,{children:[(0,t.jsxs)(s.Grid,{numItems:3,className:"gap-4 mt-4",children:[(0,t.jsx)(r.Col,{children:(0,t.jsx)(i.MultiSelect,{placeholder:"Select Virtual Keys",value:S,onValueChange:T,children:Y.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(r.Col,{children:(0,t.jsx)(i.MultiSelect,{placeholder:"Select Models",value:E,onValueChange:I,children:J.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(r.Col,{children:(0,t.jsx)(b.default,{value:L,onValueChange:e=>{H(e),Q(e.from,e.to)}})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mt-4",children:[(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hit Ratio"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsxs)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:[P,"%"]})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hits"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:D})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cached Tokens"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:R})})]})]}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cache Hits vs API Requests"}),(0,t.jsx)(l.BarChart,{title:"Cache Hits vs API Requests",data:C,stack:!0,index:"name",valueFormatter:G,categories:["LLM API requests","Cache hit"],colors:["sky","teal"],yAxisWidth:48}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cached Completion Tokens vs Generated Completion Tokens"}),(0,t.jsx)(l.BarChart,{className:"mt-6",data:C,stack:!0,index:"name",valueFormatter:G,categories:["Generated Completion Tokens","Cached Completion Tokens"],colors:["sky","teal"],yAxisWidth:48})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(M,{accessToken:e,healthCheckResponse:U,runCachingHealthCheck:X})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:w,userID:k})})]})]})}],559061)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/44fd25e5d70e1a25.js b/litellm/proxy/_experimental/out/_next/static/chunks/44fd25e5d70e1a25.js deleted file mode 100644 index 968b4e1df8..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/44fd25e5d70e1a25.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,91979,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:"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:l}))});e.s(["ReloadOutlined",0,n],91979)},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var a=e.i(464571),n=e.i(311451),s=e.i(199133),i=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:u,initialValues:c={},buttonLabel:d="Filters"})=>{let[m,f]=(0,r.useState)(!1),[h,p]=(0,r.useState)(c),[y,g]=(0,r.useState)({}),[v,x]=(0,r.useState)({}),[b,w]=(0,r.useState)({}),[j,$]=(0,r.useState)({}),S=(0,r.useCallback)((0,i.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){x(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);g(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),g(e=>({...e,[t.name]:[]}))}finally{x(e=>({...e,[t.name]:!1}))}}},300),[]),O=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!j[e.name]){x(t=>({...t,[e.name]:!0})),$(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");g(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),g(t=>({...t,[e.name]:[]}))}finally{x(t=>({...t,[e.name]:!1}))}}},[j]);(0,r.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!j[e.name]&&O(e)})},[m,e,O,j]);let C=(e,t)=>{let r={...h,[e]:t};p(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(a.Button,{icon:(0,t.jsx)(l,{className:"h-4 w-4"}),onClick:()=>f(!m),className:"flex items-center gap-2",children:d}),(0,t.jsx)(a.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),u()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let l,a=e.find(e=>e.label===r||e.name===r);return a?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:a.label||a.name}),a.isSearchable?(0,t.jsx)(s.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${a.label||a.name}...`,value:h[a.name]||void 0,onChange:e=>C(a.name,e),onOpenChange:e=>{e&&a.isSearchable&&!j[a.name]&&O(a)},onSearch:e=>{w(t=>({...t,[a.name]:e})),a.searchFn&&S(e,a)},filterOption:!1,loading:v[a.name],options:y[a.name]||[],allowClear:!0,notFoundContent:v[a.name]?"Loading...":"No results found"}):a.options?(0,t.jsx)(s.Select,{className:"w-full",placeholder:`Select ${a.label||a.name}...`,value:h[a.name]||void 0,onChange:e=>C(a.name,e),allowClear:!0,children:a.options.map(e=>(0,t.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value))}):a.customComponent?(l=a.customComponent,(0,t.jsx)(l,{value:h[a.name]||void 0,onChange:e=>C(a.name,e??""),placeholder:`Select ${a.label||a.name}...`,allFilters:h})):(0,t.jsx)(n.Input,{className:"w-full",placeholder:`Enter ${a.label||a.name}...`,value:h[a.name]||"",onChange:e=>C(a.name,e.target.value),allowClear:!0})]},a.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,l)=>{for(let a of e){let e=a?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let n=a?.organization_id??a?.org_id;n&&"string"==typeof n&&r.add(n.trim());let s=a?.user_id;if(s&&"string"==typeof s){let e=a?.user?.user_email||s;l.set(s,e)}}},l=async(e,l)=>{if(!e||!l)return{keyAliases:[],organizationIds:[],userIds:[]};try{let a=new Set,n=new Set,s=new Map,i=await (0,t.keyListCall)(e,null,l,null,null,null,1,100,null,null,"user",null),o=i?.keys||[],u=i?.total_pages??1;r(o,a,n,s);let c=Math.min(u,10)-1;if(c>0){let i=Array.from({length:c},(r,a)=>(0,t.keyListCall)(e,null,l,null,null,null,a+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(i)))"fulfilled"===e.status&&r(e.value?.keys||[],a,n,s)}return{keyAliases:Array.from(a).sort(),organizationIds:Array.from(n).sort(),userIds:Array.from(s.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},a=async(e,r)=>{if(!e)return[];try{let l=[],a=1,n=!0;for(;n;){let s=await (0,t.teamListCall)(e,r||null,null);l=[...l,...s],a{if(!e)return[];try{let r=[],l=1,a=!0;for(;a;){let n=await (0,t.organizationListCall)(e);r=[...r,...n],l{"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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},678784,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",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),l=e.i(914949),a=e.i(404948);let n=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,n],836938);var s=e.i(613541),i=e.i(763731),o=e.i(242064),u=e.i(491816);e.i(793154);var c=e.i(880476),d=e.i(183293),m=e.i(717356),f=e.i(320560),h=e.i(307358),p=e.i(246422),y=e.i(838378),g=e.i(617933);let v=(0,p.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,l=(0,y.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:l,fontWeightStrong:a,innerPadding:n,boxShadowSecondary:s,colorTextHeading:i,borderRadiusLG:o,zIndexPopup:u,titleMarginBottom:c,colorBgElevated:m,popoverBg:h,titleBorderBottom:p,innerContentPadding:y,titlePadding:g}=e;return[{[t]:Object.assign(Object.assign({},(0,d.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:o,boxShadow:s,padding:n},[`${t}-title`]:{minWidth:l,marginBottom:c,color:i,fontWeight:a,borderBottom:p,padding:g},[`${t}-inner-content`]:{color:r,padding:y}})},(0,f.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(l),(e=>{let{componentCls:t}=e;return{[t]:g.PresetColors.map(r=>{let l=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":l,[`${t}-inner`]:{backgroundColor:l},[`${t}-arrow`]:{background:"transparent"}}}})}})(l),(0,m.initZoomMotion)(l,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:l,padding:a,wireframe:n,zIndexPopupBase:s,borderRadiusLG:i,marginXS:o,lineType:u,colorSplit:c,paddingSM:d}=e,m=r-l;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:s+30},(0,h.getArrowToken)(e)),(0,f.getArrowOffsetToken)({contentRadius:i,limitVerticalRadius:!0})),{innerPadding:12*!n,titleMarginBottom:n?0:o,titlePadding:n?`${m/2}px ${a}px ${m/2-t}px`:0,titleBorderBottom:n?`${t}px ${u} ${c}`:"none",innerContentPadding:n?`${d}px ${a}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});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 b=({title:e,content:r,prefixCls:l})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${l}-title`},e),r&&t.createElement("div",{className:`${l}-inner-content`},r)):null,w=e=>{let{hashId:l,prefixCls:a,className:s,style:i,placement:o="top",title:u,content:d,children:m}=e,f=n(u),h=n(d),p=(0,r.default)(l,a,`${a}-pure`,`${a}-placement-${o}`,s);return t.createElement("div",{className:p,style:i},t.createElement("div",{className:`${a}-arrow`}),t.createElement(c.Popup,Object.assign({},e,{className:l,prefixCls:a}),m||t.createElement(b,{prefixCls:a,title:f,content:h})))},j=e=>{let{prefixCls:l,className:a}=e,n=x(e,["prefixCls","className"]),{getPrefixCls:s}=t.useContext(o.ConfigContext),i=s("popover",l),[u,c,d]=v(i);return u(t.createElement(w,Object.assign({},n,{prefixCls:i,hashId:c,className:(0,r.default)(a,d)})))};e.s(["Overlay",0,b,"default",0,j],310730);var $=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=t.forwardRef((e,c)=>{var d,m;let{prefixCls:f,title:h,content:p,overlayClassName:y,placement:g="top",trigger:x="hover",children:w,mouseEnterDelay:j=.1,mouseLeaveDelay:S=.1,onOpenChange:O,overlayStyle:C={},styles:M,classNames:_}=e,k=$(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:D,className:I,style:N,classNames:A,styles:E}=(0,o.useComponentConfig)("popover"),T=D("popover",f),[F,z,P]=v(T),L=D(),U=(0,r.default)(y,z,P,I,A.root,null==_?void 0:_.root),V=(0,r.default)(A.body,null==_?void 0:_.body),[W,H]=(0,l.default)(!1,{value:null!=(d=e.open)?d:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),R=(e,t)=>{H(e,!0),null==O||O(e,t)},B=n(h),K=n(p);return F(t.createElement(u.default,Object.assign({placement:g,trigger:x,mouseEnterDelay:j,mouseLeaveDelay:S},k,{prefixCls:T,classNames:{root:U,body:V},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},E.root),N),C),null==M?void 0:M.root),body:Object.assign(Object.assign({},E.body),null==M?void 0:M.body)},ref:c,open:W,onOpenChange:e=>{R(e)},overlay:B||K?t.createElement(b,{prefixCls:T,title:B,content:K}):null,transitionName:(0,s.getTransitionName)(L,"zoom-big",k.transitionName),"data-popover-inject":!0}),(0,i.cloneElement)(w,{onKeyDown:e=>{var r,l;(0,t.isValidElement)(w)&&(null==(l=null==w?void 0:(r=w.props).onKeyDown)||l.call(r,e)),e.keyCode===a.default.ESC&&R(!1,e)}})))});S._InternalPanelDoNotUseOrYouWillBeFired=j,e.s(["default",0,S],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},738014,e=>{"use strict";var t=e.i(135214),r=e.i(764205),l=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,l.useQuery)({queryKey:a.detail(n),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&n)})}])},625901,e=>{"use strict";var t=e.i(266027),r=e.i(621482),l=e.i(243652),a=e.i(764205),n=e.i(135214);let s=(0,l.createQueryKeys)("models"),i=(0,l.createQueryKeys)("modelHub"),o=(0,l.createQueryKeys)("allProxyModels");(0,l.createQueryKeys)("selectedTeamModels");let u=(0,l.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:r,userRole:l}=(0,n.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,a.modelAvailableCall)(e,r,l,!0,null,!0,!1,"expand"),enabled:!!(e&&r&&l)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:l,userId:s,userRole:i}=(0,n.default)();return(0,r.useInfiniteQuery)({queryKey:u.list({filters:{...s&&{userId:s},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:r})=>await (0,a.modelInfoCall)(l,s,i,r,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,n.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,r=50,l,i,o,u,c)=>{let{accessToken:d,userId:m,userRole:f}=(0,n.default)();return(0,t.useQuery)({queryKey:s.list({filters:{...m&&{userId:m},...f&&{userRole:f},page:e,size:r,...l&&{search:l},...i&&{modelId:i},...o&&{teamId:o},...u&&{sortBy:u},...c&&{sortOrder:c}}}),queryFn:async()=>await (0,a.modelInfoCall)(d,m,f,e,r,l,i,o,u,c),enabled:!!(d&&m&&f)})}])},907308,e=>{"use strict";var t=e.i(843476),r=e.i(271645),l=e.i(212931),a=e.i(808613),n=e.i(464571),s=e.i(199133),i=e.i(592968),o=e.i(213205),u=e.i(374009),c=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:d,onSubmit:m,accessToken:f,title:h="Add Team Member",roles:p=[{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:y="user",teamId:g})=>{let[v]=a.Form.useForm(),[x,b]=(0,r.useState)([]),[w,j]=(0,r.useState)(!1),[$,S]=(0,r.useState)("user_email"),[O,C]=(0,r.useState)(!1),M=async(e,t)=>{if(!e)return void b([]);j(!0);try{let r=new URLSearchParams;if(r.append(t,e),g&&r.append("team_id",g),null==f)return;let l=(await (0,c.userFilterUICall)(f,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}));b(l)}catch(e){console.error("Error fetching users:",e)}finally{j(!1)}},_=(0,r.useCallback)((0,u.default)((e,t)=>M(e,t),300),[]),k=(e,t)=>{S(t),_(e,t)},D=(e,t)=>{let r=t.user;v.setFieldsValue({user_email:r.user_email,user_id:r.user_id,role:v.getFieldValue("role")})},I=async e=>{C(!0);try{await m(e)}finally{C(!1)}};return(0,t.jsx)(l.Modal,{title:h,open:e,onCancel:()=>{v.resetFields(),b([]),d()},footer:null,width:800,maskClosable:!O,children:(0,t.jsxs)(a.Form,{form:v,onFinish:I,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:y},children:[(0,t.jsx)(a.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,t.jsx)(s.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>k(e,"user_email"),onSelect:(e,t)=>D(e,t),options:"user_email"===$?x:[],loading:w,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)(s.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>k(e,"user_id"),onSelect:(e,t)=>D(e,t),options:"user_id"===$?x:[],loading:w,allowClear:!0})}),(0,t.jsx)(a.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(s.Select,{defaultValue:y,children:p.map(e=>(0,t.jsx)(s.Select.Option,{value:e.value,children:(0,t.jsxs)(i.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)(o.UserAddOutlined,{}),loading:O,children:O?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var t=e.i(843476),r=e.i(625901),l=e.i(109799),a=e.i(785242),n=e.i(738014),s=e.i(199133),i=e.i(981339),o=e.i(592968);let u={label:"All Proxy Models",value:"all-proxy-models"},c={label:"No Default Models",value:"no-default-models"},d=[u,c],m={user:({allProxyModels:e,userModels:t,options:r})=>t&&r?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:r})=>t?t.models.includes(u.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:f,organizationID:h,options:p,context:y,dataTestId:g,value:v=[],onChange:x,style:b}=e,{includeUserModels:w,showAllTeamModelsOption:j,showAllProxyModelsOverride:$,includeSpecialOptions:S}=p||{},{data:O,isLoading:C}=(0,r.useAllProxyModels)(),{data:M,isLoading:_}=(0,a.useTeam)(f),{data:k,isLoading:D}=(0,l.useOrganization)(h),{data:I,isLoading:N}=(0,n.useCurrentUser)(),A=e=>d.some(t=>t.value===e),E=v.some(A),T=k?.models.includes(u.value)||k?.models.length===0;if(C||_||D||N)return(0,t.jsx)(i.Skeleton.Input,{active:!0,block:!0});let{wildcard:F,regular:z}=(e=>{let t=[],r=[];for(let l of e)l.endsWith("/*")?t.push(l):r.push(l);return{wildcard:t,regular:r}})(((e,t,r)=>{let l=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return l;let a=m[t.context];return a?a({allProxyModels:l,...r,options:t.options}):[]})(O?.data??[],e,{selectedTeam:M,selectedOrganization:k,userModels:I?.models}));return(0,t.jsx)(s.Select,{"data-testid":g,value:v,onChange:e=>{let t=e.filter(A);x(t.length>0?[t[t.length-1]]:e)},style:b,options:[S?{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...$||T&&S||"global"===y?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:u.value,disabled:v.length>0&&v.some(e=>A(e)&&e!==u.value),key:u.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:c.value,disabled:v.length>0&&v.some(e=>A(e)&&e!==c.value),key:c.value}]}:[],...F.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:F.map(e=>{let r=e.replace("/*",""),l=r.charAt(0).toUpperCase()+r.slice(1);return{label:(0,t.jsx)("span",{children:`All ${l} models`}),value:e,disabled:E}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:z.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:E}))}],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)},276173,e=>{"use strict";var t=e.i(843476),r=e.i(599724),l=e.i(779241),a=e.i(464571),n=e.i(808613),s=e.i(212931),i=e.i(199133),o=e.i(271645),u=e.i(435451);e.s(["default",0,({visible:e,onCancel:c,onSubmit:d,initialData:m,mode:f,config:h})=>{let p,[y]=n.Form.useForm(),[g,v]=(0,o.useState)(!1);console.log("Initial Data:",m),(0,o.useEffect)(()=>{if(e)if("edit"===f&&m){let e={...m,role:m.role||h.defaultRole,max_budget_in_team:m.max_budget_in_team||null,tpm_limit:m.tpm_limit||null,rpm_limit:m.rpm_limit||null,allowed_models:m.allowed_models||[]};console.log("Setting form values:",e),y.setFieldsValue(e)}else y.resetFields(),y.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,m,f,y,h.defaultRole,h.roleOptions]);let x=async e=>{try{v(!0);let t=Object.entries(e).reduce((e,[t,r])=>{if("string"==typeof r){let l=r.trim();return""===l&&("max_budget_in_team"===t||"tpm_limit"===t||"rpm_limit"===t)?{...e,[t]:null}:{...e,[t]:l}}return{...e,[t]:r}},{});console.log("Submitting form data:",t),await Promise.resolve(d(t)),y.resetFields()}catch(e){console.error("Form submission error:",e)}finally{v(!1)}};return(0,t.jsx)(s.Modal,{title:h.title||("add"===f?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:c,children:(0,t.jsxs)(n.Form,{form:y,onFinish:x,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.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)(l.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(r.Text,{children:"OR"})}),h.showUserId&&(0,t.jsx)(n.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(l.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"===f&&m&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(p=m.role,h.roleOptions.find(e=>e.value===p)?.label||p),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(i.Select,{children:"edit"===f&&m?[...h.roleOptions.filter(e=>e.value===m.role),...h.roleOptions.filter(e=>e.value!==m.role)].map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))})}),h.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)(l.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(u.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});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(a.Button,{onClick:c,className:"mr-2",disabled:g,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"default",htmlType:"submit",loading:g,children:"add"===f?g?"Adding...":"Add Member":g?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var t=e.i(843476),r=e.i(100486),l=e.i(827252),a=e.i(213205),n=e.i(771674),s=e.i(464571),i=e.i(770914),o=e.i(291542),u=e.i(262218),c=e.i(592968),d=e.i(898586),m=e.i(902555);let{Text:f}=d.Typography;function h({members:e,canEdit:d,onEdit:h,onDelete:p,onAddMember:y,roleColumnTitle:g="Role",roleTooltip:v,extraColumns:x=[],showDeleteForMember:b,emptyText:w}){let j=[{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)(u.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(f,{children:e||"-"})},{title:v?(0,t.jsxs)(i.Space,{direction:"horizontal",children:[g,(0,t.jsx)(c.Tooltip,{title:v,children:(0,t.jsx)(l.InfoCircleOutlined,{})})]}):g,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(i.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(r.CrownOutlined,{}):(0,t.jsx)(n.UserOutlined,{}),(0,t.jsx)(f,{style:{textTransform:"capitalize"},children:e||"-"})]})},...x,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,r)=>d?(0,t.jsxs)(i.Space,{children:[(0,t.jsx)(m.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(r)}),(!b||b(r))&&(0,t.jsx)(m.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>p(r)})]}):null}];return(0,t.jsxs)(i.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}),y&&d&&(0,t.jsx)(s.Button,{icon:(0,t.jsx)(a.UserAddOutlined,{}),type:"primary",onClick:y,children:"Add Member"})]})}e.s(["default",()=>h])},160818,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:"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:l}))});e.s(["GlobalOutlined",0,n],160818)},822315,(e,t,r)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",r="minute",l="hour",a="week",n="month",s="quarter",i="year",o="date",u="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|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 l=String(e);return!l||l.length>=t?e:""+Array(t+1-l.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",y=function(e){return e instanceof b||!(!e||!e[p])},g=function e(t,r,l){var a;if(!t)return f;if("string"==typeof t){var n=t.toLowerCase();h[n]&&(a=n),r&&(h[n]=r,a=n);var s=t.split("-");if(!a&&s.length>1)return e(s[0])}else{var i=t.name;h[i]=t,a=i}return!l&&a&&(f=a),a||!l&&f},v=function(e,t){if(y(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new b(r)},x={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(290571),r=e.i(271645),i=e.i(829087),a=e.i(480731),n=e.i(444755),o=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"}},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,o.makeClassName)("Icon"),m=r.default.forwardRef((e,m)=>{let{icon:g,variant:h="simple",tooltip:f,size:p=a.Sizes.SM,color:b,className:v}=e,x=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),y=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,o.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,o.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,o.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,o.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,o.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,o.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,n.tremorTwMerge)((0,o.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,o.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,o.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,o.getColorClassNames)(t,l.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,n.tremorTwMerge)((0,o.getColorClassNames)(t,l.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,b),{tooltipProps:C,getReferenceProps:k}=(0,i.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([m,C.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[h].rounded,c[h].border,c[h].shadow,c[h].ring,s[p].paddingX,s[p].paddingY,v)},k,x),r.default.createElement(i.default,Object.assign({text:f},C)),r.default.createElement(g,{className:(0,n.tremorTwMerge)(u("icon"),"shrink-0",d[p].height,d[p].width)}))});m.displayName="Icon",e.s(["default",()=>m],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),r=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:"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 a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["ClockCircleOutlined",0,n],637235)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),i=e.i(673706),a=e.i(271645);let n=a.default.forwardRef((e,n)=>{let{color:o,className:l,children:s}=e;return a.default.createElement("p",{ref:n,className:(0,r.tremorTwMerge)("text-tremor-default",o?(0,i.getColorClassNames)(o,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),l)},s)});n.displayName="Text",e.s(["default",()=>n],936325),e.s(["Text",()=>n],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),i=e.i(480731),a=e.i(95779),n=e.i(444755),o=e.i(673706);let l=(0,o.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:d="",decorationColor:c,children:u,className:m}=e,g=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,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",c?(0,o.getColorClassNames)(c,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case i.HorizontalPositions.Left:return"border-l-4";case i.VerticalPositions.Top:return"border-t-4";case i.HorizontalPositions.Right:return"border-r-4";case i.VerticalPositions.Bottom:return"border-b-4";default:return""}})(d),m)},g),u)});s.displayName="Card",e.s(["Card",()=>s],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),i=e.i(444755),a=e.i(673706),n=e.i(271645);let o=n.default.forwardRef((e,o)=>{let{color:l,children:s,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return n.default.createElement("p",Object.assign({ref:o,className:(0,i.tremorTwMerge)("font-medium text-tremor-title",l?(0,a.getColorClassNames)(l,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},c),s)});o.displayName="Title",e.s(["Title",()=>o],629569)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>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 i={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 a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["ArrowLeftOutlined",0,n],447566)},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),i=e.i(540143),a=e.i(915823),n=e.i(619273),o=class extends a.Subscribable{#e;#t=void 0;#r;#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,n.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,n.hashKey)(t.mutationKey)!==(0,n.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.#a(),this.#n(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#n()}mutate(e,t){return this.#i=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#a(){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}}#n(e){i.notifyManager.batch(()=>{if(this.#i&&this.hasListeners()){let t=this.#t.variables,r=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,r,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(e.data,null,t,r,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#i.onError?.(e.error,t,r,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(void 0,e.error,t,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},l=e.i(912598);function s(e,r){let a=(0,l.useQueryClient)(r),[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(n.noop)},[s]);if(d.error&&(0,n.shouldThrowError)(s.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>s],954616)},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},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",()=>t])},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",()=>t])},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",()=>t])},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),r=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 a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["UploadOutlined",0,n],519756)},530212,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 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,r],530212)},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,i]of Object.entries(t))e in r&&(r[e]=i);return r}let i=(e,t=0,r=!1,i=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!i)return"-";let a={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",a);let n=e<0?"-":"",o=Math.abs(e),l=o,s="";return o>=1e6?(l=o/1e6,s="M"):o>=1e3&&(l=o/1e3,s="K"),`${n}${l.toLocaleString("en-US",a)}${s}`},a=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return n(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),n(e,r)}},n=(e,r)=>{try{let i=document.createElement("textarea");i.value=e,i.style.position="fixed",i.style.left="-999999px",i.style.top="-999999px",i.setAttribute("readonly",""),document.body.appendChild(i),i.focus(),i.select();let a=document.execCommand("copy");if(document.body.removeChild(i),a)return t.default.success(r),!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,a,"formatNumberWithCommas",0,i,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=i(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},435451,620250,e=>{"use strict";var t=e.i(843476),r=e.i(290571),i=e.i(271645);let a=e=>{var t=(0,r.__rest)(e,[]);return i.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"}),i.default.createElement("path",{d:"M12 4v16m8-8H4"}))},n=e=>{var t=(0,r.__rest)(e,[]);return i.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"}),i.default.createElement("path",{d:"M20 12H4"}))};var o=e.i(444755),l=e.i(673706),s=e.i(677955);let d="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",c="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",u=i.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:g,onValueChange:h,onChange:f}=e,p=(0,r.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),b=(0,i.useRef)(null),[v,x]=i.default.useState(!1),y=i.default.useCallback(()=>{x(!0)},[]),C=i.default.useCallback(()=>{x(!1)},[]),[k,$]=i.default.useState(!1),w=i.default.useCallback(()=>{$(!0)},[]),S=i.default.useCallback(()=>{$(!1)},[]);return i.default.createElement(s.default,Object.assign({type:"number",ref:(0,l.mergeRefs)([b,t]),disabled:g,makeInputClassName:(0,l.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=b.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&&S()},onChange:e=>{g||(null==h||h(parseFloat(e.target.value)),null==f||f(e))},stepper:m?i.default.createElement("div",{className:(0,o.tremorTwMerge)("flex justify-center align-middle")},i.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;g||(null==(e=b.current)||e.stepDown(),null==(t=b.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,o.tremorTwMerge)(!g&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},i.default.createElement(n,{"data-testid":"step-down",className:(v?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),i.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;g||(null==(e=b.current)||e.stepUp(),null==(t=b.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,o.tremorTwMerge)(!g&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},i.default.createElement(a,{"data-testid":"step-up",className:(k?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},p))});u.displayName="NumberInput",e.s(["NumberInput",()=>u],620250),e.s(["default",0,({step:e=.01,style:r={width:"100%"},placeholder:i="Enter a numerical value",min:a,max:n,onChange:o,...l})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:r,placeholder:i,min:a,max:n,onChange:o,...l})],435451)},663435,152473,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(199133),a=e.i(898586),n=e.i(56456);let o={enabled:!0,leading:!1,trailing:!0,wait:0,onExecute:()=>{}};class l{constructor(e,t){this.fn=e,this._canLeadingExecute=!0,this._isPending=!1,this._executionCount=0,this._options={...o,...t}}setOptions(e){return this._options={...this._options,...e},this._options.enabled||(this._isPending=!1),this._options}getOptions(){return this._options}maybeExecute(...e){this._options.leading&&this._canLeadingExecute&&(this.executeFunction(...e),this._canLeadingExecute=!1),(this._options.leading||this._options.trailing)&&(this._isPending=!0),this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=setTimeout(()=>{this._canLeadingExecute=!0,this._isPending=!1,this._options.trailing&&this.executeFunction(...e)},this._options.wait)}executeFunction(...e){this._options.enabled&&(this.fn(...e),this._executionCount++,this._options.onExecute(this))}cancel(){this._timeoutId&&(clearTimeout(this._timeoutId),this._canLeadingExecute=!0,this._isPending=!1)}getExecutionCount(){return this._executionCount}getIsPending(){return this._options.enabled&&this._isPending}}function s(e,t){let[i,a]=(0,r.useState)(e),n=function(e,t){let[i]=(0,r.useState)(()=>{var r;return Object.getOwnPropertyNames(Object.getPrototypeOf(r=new l(e,t))).filter(e=>"function"==typeof r[e]).reduce((e,t)=>{let i=r[t];return"function"==typeof i&&(e[t]=i.bind(r)),e},{})});return i.setOptions(t),i}(a,t);return[i,n.maybeExecute,n]}e.s(["useDebouncedState",()=>s],152473);var d=e.i(785242);let{Text:c}=a.Typography;e.s(["default",0,({value:e,onChange:a,onTeamSelect:o,disabled:l,organizationId:u,pageSize:m=20})=>{let[g,h]=(0,r.useState)(""),[f,p]=s("",{wait:300}),{data:b,fetchNextPage:v,hasNextPage:x,isFetchingNextPage:y,isLoading:C}=(0,d.useInfiniteTeams)(m,f||void 0,u),k=(0,r.useMemo)(()=>{if(!b?.pages)return[];let e=new Set,t=[];for(let r of b.pages)for(let i of r.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=>{a?.(e??""),o&&o(e?k.find(t=>t.team_id===e)??null:null)},disabled:l,allowClear:!0,filterOption:!1,onSearch:e=>{h(e),p(e)},searchValue:g,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&x&&!y&&v()},loading:C,notFoundContent:C?(0,t.jsx)(n.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)(n.LoadingOutlined,{spin:!0})})]}),children:k.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))})}],663435)},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},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",()=>t])},149192,e=>{"use strict";var t=e.i(864517);e.s(["CloseOutlined",()=>t.default])},245094,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["CodeOutlined",0,n],245094)},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])},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["CheckCircleOutlined",0,n],245704)},518617,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={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 a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["CloseCircleOutlined",0,n],518617)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),r=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-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 a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["StopOutlined",0,n],724154)},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},678784,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",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},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",()=>t])},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var a=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(a.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["SaveOutlined",0,n],987432)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var r=e.i(546467);e.s(["ExternalLinkIcon",()=>r.default],634831);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(["KeyIcon",()=>i],438100)},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},573421,e=>{"use strict";e.i(247167);var t=e.i(8211),r=e.i(271645),i=e.i(343794),a=e.i(887719),n=e.i(908206),o=e.i(242064),l=e.i(721132),s=e.i(517455),d=e.i(264042),c=e.i(150073),u=e.i(165370),m=e.i(244451);let g=r.default.createContext({});g.Consumer;var h=e.i(763731),f=e.i(211576),p=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[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])&&(r[i[a]]=e[i[a]]);return r};let b=r.default.forwardRef((e,t)=>{let a,{prefixCls:n,children:l,actions:s,extra:d,styles:c,className:u,classNames:m,colStyle:b}=e,v=p(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:x,itemLayout:y}=(0,r.useContext)(g),{getPrefixCls:C,list:k}=(0,r.useContext)(o.ConfigContext),$=e=>{var t,r;return(0,i.default)(null==(r=null==(t=null==k?void 0:k.item)?void 0:t.classNames)?void 0:r[e],null==m?void 0:m[e])},w=e=>{var t,r;return Object.assign(Object.assign({},null==(r=null==(t=null==k?void 0:k.item)?void 0:t.styles)?void 0:r[e]),null==c?void 0:c[e])},S=C("list",n),E=s&&s.length>0&&r.default.createElement("ul",{className:(0,i.default)(`${S}-item-action`,$("actions")),key:"actions",style:w("actions")},s.map((e,t)=>r.default.createElement("li",{key:`${S}-item-action-${t}`},e,t!==s.length-1&&r.default.createElement("em",{className:`${S}-item-action-split`})))),O=r.default.createElement(x?"div":"li",Object.assign({},v,x?{}:{ref:t},{className:(0,i.default)(`${S}-item`,{[`${S}-item-no-flex`]:!("vertical"===y?!!d:(a=!1,r.Children.forEach(l,e=>{"string"==typeof e&&(a=!0)}),!(a&&r.Children.count(l)>1)))},u)}),"vertical"===y&&d?[r.default.createElement("div",{className:`${S}-item-main`,key:"content"},l,E),r.default.createElement("div",{className:(0,i.default)(`${S}-item-extra`,$("extra")),key:"extra",style:w("extra")},d)]:[l,E,(0,h.cloneElement)(d,{key:"extra"})]);return x?r.default.createElement(f.Col,{ref:t,flex:1,style:b},O):O});b.Meta=e=>{var{prefixCls:t,className:a,avatar:n,title:l,description:s}=e,d=p(e,["prefixCls","className","avatar","title","description"]);let{getPrefixCls:c}=(0,r.useContext)(o.ConfigContext),u=c("list",t),m=(0,i.default)(`${u}-item-meta`,a),g=r.default.createElement("div",{className:`${u}-item-meta-content`},l&&r.default.createElement("h4",{className:`${u}-item-meta-title`},l),s&&r.default.createElement("div",{className:`${u}-item-meta-description`},s));return r.default.createElement("div",Object.assign({},d,{className:m}),n&&r.default.createElement("div",{className:`${u}-item-meta-avatar`},n),(l||s)&&g)},e.i(296059);var v=e.i(915654),x=e.i(183293),y=e.i(246422),C=e.i(838378);let k=(0,y.genStyleHooks)("List",e=>{let t=(0,C.mergeToken)(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[(e=>{let{componentCls:t,antCls:r,controlHeight:i,minHeight:a,paddingSM:n,marginLG:o,padding:l,itemPadding:s,colorPrimary:d,itemPaddingSM:c,itemPaddingLG:u,paddingXS:m,margin:g,colorText:h,colorTextDescription:f,motionDurationSlow:p,lineWidth:b,headerBg:y,footerBg:C,emptyTextPadding:k,metaMarginBottom:$,avatarMarginRight:w,titleMarginBottom:S,descriptionFontSize:E}=e;return{[t]:Object.assign(Object.assign({},(0,x.resetComponent)(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:y},[`${t}-footer`]:{background:C},[`${t}-header, ${t}-footer`]:{paddingBlock:n},[`${t}-pagination`]:{marginBlockStart:o,[`${r}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:a,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:s,color:h,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:w},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:h},[`${t}-item-meta-title`]:{margin:`0 0 ${(0,v.unit)(e.marginXXS)} 0`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:h,transition:`all ${p}`,"&:hover":{color:d}}},[`${t}-item-meta-description`]:{color:f,fontSize:E,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${(0,v.unit)(m)}`,color:f,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:b,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${(0,v.unit)(l)} 0`,color:f,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:k,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${r}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:g,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:o},[`${t}-item-meta`]:{marginBlockEnd:$,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:S,color:h,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:l,marginInlineStart:"auto","> li":{padding:`0 ${(0,v.unit)(l)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:i},[`${t}-split${t}-something-after-last-item ${r}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:u},[`${t}-sm ${t}-item`]:{padding:c},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}})(t),(e=>{let{listBorderedCls:t,componentCls:r,paddingLG:i,margin:a,itemPaddingSM:n,itemPaddingLG:o,marginLG:l,borderRadiusLG:s}=e,d=(0,v.unit)(e.calc(s).sub(e.lineWidth).equal());return{[t]:{border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:s,[`${r}-header`]:{borderRadius:`${d} ${d} 0 0`},[`${r}-footer`]:{borderRadius:`0 0 ${d} ${d}`},[`${r}-header,${r}-footer,${r}-item`]:{paddingInline:i},[`${r}-pagination`]:{margin:`${(0,v.unit)(a)} ${(0,v.unit)(l)}`}},[`${t}${r}-sm`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:n}},[`${t}${r}-lg`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:o}}}})(t),(e=>{let{componentCls:t,screenSM:r,screenMD:i,marginLG:a,marginSM:n,margin:o}=e;return{[`@media screen and (max-width:${i}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:a}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:a}}}},[`@media screen and (max-width: ${r}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:n}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${(0,v.unit)(o)}`}}}}}})(t)]},e=>({contentWidth:220,itemPadding:`${(0,v.unit)(e.paddingContentVertical)} 0`,itemPaddingSM:`${(0,v.unit)(e.paddingContentVerticalSM)} ${(0,v.unit)(e.paddingContentHorizontal)}`,itemPaddingLG:`${(0,v.unit)(e.paddingContentVerticalLG)} ${(0,v.unit)(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}));var $=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[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])&&(r[i[a]]=e[i[a]]);return r};let w=r.forwardRef(function(e,h){let{pagination:f=!1,prefixCls:p,bordered:b=!1,split:v=!0,className:x,rootClassName:y,style:C,children:w,itemLayout:S,loadMore:E,grid:O,dataSource:M=[],size:N,header:j,footer:z,loading:P=!1,rowKey:_,renderItem:T,locale:I}=e,L=$(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),R=f&&"object"==typeof f?f:{},[B,H]=r.useState(R.defaultCurrent||1),[V,A]=r.useState(R.defaultPageSize||10),{getPrefixCls:W,direction:K,className:D,style:F}=(0,o.useComponentConfig)("list"),{renderEmpty:U}=r.useContext(o.ConfigContext),X=e=>(t,r)=>{var i;H(t),A(r),f&&(null==(i=null==f?void 0:f[e])||i.call(f,t,r))},q=X("onChange"),Y=X("onShowSizeChange"),G=!!(E||f||z),J=W("list",p),[Q,Z,ee]=k(J),et=P;"boolean"==typeof et&&(et={spinning:et});let er=!!(null==et?void 0:et.spinning),ei=(0,s.default)(N),ea="";switch(ei){case"large":ea="lg";break;case"small":ea="sm"}let en=(0,i.default)(J,{[`${J}-vertical`]:"vertical"===S,[`${J}-${ea}`]:ea,[`${J}-split`]:v,[`${J}-bordered`]:b,[`${J}-loading`]:er,[`${J}-grid`]:!!O,[`${J}-something-after-last-item`]:G,[`${J}-rtl`]:"rtl"===K},D,x,y,Z,ee),eo=(0,a.default)({current:1,total:0,position:"bottom"},{total:M.length,current:B,pageSize:V},f||{}),el=Math.ceil(eo.total/eo.pageSize);eo.current=Math.min(eo.current,el);let es=f&&r.createElement("div",{className:(0,i.default)(`${J}-pagination`)},r.createElement(u.default,Object.assign({align:"end"},eo,{onChange:q,onShowSizeChange:Y}))),ed=(0,t.default)(M);f&&M.length>(eo.current-1)*eo.pageSize&&(ed=(0,t.default)(M).splice((eo.current-1)*eo.pageSize,eo.pageSize));let ec=Object.keys(O||{}).some(e=>["xs","sm","md","lg","xl","xxl"].includes(e)),eu=(0,c.default)(ec),em=r.useMemo(()=>{for(let e=0;e{if(!O)return;let e=em&&O[em]?O[em]:O.column;if(e)return{width:`${100/e}%`,maxWidth:`${100/e}%`}},[JSON.stringify(O),em]),eh=er&&r.createElement("div",{style:{minHeight:53}});if(ed.length>0){let e=ed.map((e,t)=>{let i;return T?((i="function"==typeof _?_(e):_?e[_]:e.key)||(i=`list-item-${t}`),r.createElement(r.Fragment,{key:i},T(e,t))):null});eh=O?r.createElement(d.Row,{gutter:O.gutter},r.Children.map(e,e=>r.createElement("div",{key:null==e?void 0:e.key,style:eg},e))):r.createElement("ul",{className:`${J}-items`},e)}else w||er||(eh=r.createElement("div",{className:`${J}-empty-text`},(null==I?void 0:I.emptyText)||(null==U?void 0:U("List"))||r.createElement(l.default,{componentName:"List"})));let ef=eo.position,ep=r.useMemo(()=>({grid:O,itemLayout:S}),[JSON.stringify(O),S]);return Q(r.createElement(g.Provider,{value:ep},r.createElement("div",Object.assign({ref:h,style:Object.assign(Object.assign({},F),C),className:en},L),("top"===ef||"both"===ef)&&es,j&&r.createElement("div",{className:`${J}-header`},j),r.createElement(m.default,Object.assign({},et),eh,w),z&&r.createElement("div",{className:`${J}-footer`},z),E||("bottom"===ef||"both"===ef)&&es)))});w.Item=b,e.s(["List",0,w],573421)},837007,e=>{"use strict";var t=e.i(603908);e.s(["PlusIcon",()=>t.default])},509345,e=>{"use strict";var t=e.i(843476),r=e.i(487304),i=e.i(135214);e.s(["default",0,()=>{let{accessToken:e}=(0,i.default)();return(0,t.jsx)(r.default,{accessToken:e})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/466ba0a8a546c4fd.js b/litellm/proxy/_experimental/out/_next/static/chunks/466ba0a8a546c4fd.js deleted file mode 100644 index a20a1607bd..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/466ba0a8a546c4fd.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,801312,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:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var i=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["default",0,a],801312)},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(529681),i=e.i(702779),a=e.i(563113),l=e.i(763731),o=e.i(121872),s=e.i(242064);e.i(296059);var c=e.i(915654);e.i(262370);var d=e.i(135551),u=e.i(183293),m=e.i(246422),g=e.i(838378);let p=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return(0,g.mergeToken)(e,{tagFontSize:i,tagLineHeight:(0,c.unit)(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},f=e=>({defaultBg:new d.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),h=(0,m.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,l=a(r).sub(n).equal(),o=a(t).sub(n).equal();return{[i]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:l}}),[`${i}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(p(e)),f);var b=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 $=t.forwardRef((e,r)=>{let{prefixCls:i,style:a,className:l,checked:o,children:c,icon:d,onChange:u,onClick:m}=e,g=b(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:f}=t.useContext(s.ConfigContext),$=p("tag",i),[y,w,C]=h($),k=(0,n.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==f?void 0:f.className,l,w,C);return y(t.createElement("span",Object.assign({},g,{ref:r,style:Object.assign(Object.assign({},a),null==f?void 0:f.style),className:k,onClick:e=>{null==u||u(!o),null==m||m(e)}}),d,t.createElement("span",null,c)))});var y=e.i(403541);let w=(0,m.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=p(e),(0,y.genPresetColor)(t,(e,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:a,borderColor:a},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},f),C=(e,t,n)=>{let r="string"!=typeof n?n:n.charAt(0).toUpperCase()+n.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},k=(0,m.genSubStyleComponent)(["Tag","status"],e=>{let t=p(e);return[C(t,"success","Success"),C(t,"processing","Info"),C(t,"error","Error"),C(t,"warning","Warning")]},f);var v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 S=t.forwardRef((e,c)=>{let{prefixCls:d,className:u,rootClassName:m,style:g,children:p,icon:f,color:b,onClose:$,bordered:y=!0,visible:C}=e,S=v(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:x,direction:I,tag:O}=t.useContext(s.ConfigContext),[E,j]=t.useState(!0),z=(0,r.default)(S,["closeIcon","closable"]);t.useEffect(()=>{void 0!==C&&j(C)},[C]);let B=(0,i.isPresetColor)(b),R=(0,i.isPresetStatusColor)(b),N=B||R,T=Object.assign(Object.assign({backgroundColor:b&&!N?b:void 0},null==O?void 0:O.style),g),M=x("tag",d),[P,_,A]=h(M),U=(0,n.default)(M,null==O?void 0:O.className,{[`${M}-${b}`]:N,[`${M}-has-color`]:b&&!N,[`${M}-hidden`]:!E,[`${M}-rtl`]:"rtl"===I,[`${M}-borderless`]:!y},u,m,_,A),L=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||j(!1)},[,H]=(0,a.useClosable)((0,a.pickClosable)(e),(0,a.pickClosable)(O),{closable:!1,closeIconRender:e=>{let r=t.createElement("span",{className:`${M}-close-icon`,onClick:L},e);return(0,l.replaceElement)(e,r,e=>({onClick:t=>{var n;null==(n=null==e?void 0:e.onClick)||n.call(e,t),L(t)},className:(0,n.default)(null==e?void 0:e.className,`${M}-close-icon`)}))}}),W="function"==typeof S.onClick||p&&"a"===p.type,G=f||null,q=G?t.createElement(t.Fragment,null,G,p&&t.createElement("span",null,p)):p,D=t.createElement("span",Object.assign({},z,{ref:c,className:U,style:T}),q,H,B&&t.createElement(w,{key:"preset",prefixCls:M}),R&&t.createElement(k,{key:"status",prefixCls:M}));return P(W?t.createElement(o.default,{component:"Tag"},D):D)});S.CheckableTag=$,e.s(["Tag",0,S],262218)},190144,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:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};var i=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["default",0,a],190144)},735049,e=>{"use strict";var t=e.i(654310),n=function(e){if((0,t.default)()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],r=window.document.documentElement;return n.some(function(e){return e in r.style})}return!1},r=function(e,t){if(!n(e))return!1;var r=document.createElement("div"),i=r.style[e];return r.style[e]=t,r.style[e]!==i};function i(e,t){return Array.isArray(e)||void 0===t?n(e):r(e,t)}e.s(["isStyleSupport",()=>i])},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},618566,(e,t,n)=>{t.exports=e.r(976562)},321836,e=>{"use strict";let t="litellm_return_url",n="redirect_to";function r(){return window.location.href}function i(){let e=r();e&&function(e,t,n=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function o(){return new URLSearchParams(window.location.search).get(n)}function s(e,t){let i=t||r();if(!i||i.includes("/login"))return e;let a=e.includes("?")?"&":"?";return`${e}${a}${n}=${encodeURIComponent(i)}`}function c(){let e=o();if(e)return e;let t=a();return t||null}function d(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function u(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),n=window.location.hostname;if(t.hostname!==n)return!1;if(d())return!0;return t.origin===window.location.origin}catch{return!1}}function m(e){try{let t=new URL(e,window.location.origin),n=t.pathname;n.length>1&&n.endsWith("/")&&(n=n.slice(0,-1));let r=new URLSearchParams(t.search),i=new URLSearchParams;Array.from(r.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{i.append(e,t)});let a=i.toString(),l=t.hash||"";return`${t.origin}${n}${a?`?${a}`:""}${l}`}catch{return e}}function g(){let e=o();if(e){if(u(e))return l(),e;d()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=a();if(t){if(u(t))return l(),t;d()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>s,"clearStoredReturnUrl",()=>l,"consumeReturnUrl",()=>g,"getReturnUrl",()=>c,"isValidReturnUrl",()=>u,"normalizeUrlForCompare",()=>m,"storeReturnUrl",()=>i])},161281,e=>{"use strict";var t=e.i(947293);function n(e){try{let n=(0,t.jwtDecode)(e);if(n&&"number"==typeof n.exp)return 1e3*n.exp<=Date.now();return!1}catch{return!0}}function r(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function i(e){return!!e&&null!==r(e)&&!n(e)}e.s(["checkTokenValidity",()=>i,"decodeToken",()=>r,"isJwtExpired",()=>n])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],n=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>n(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,n,"rolesWithWriteAccess",0,["Internal User","Admin","proxy_admin"]])},135214,e=>{"use strict";var t=e.i(764205),n=e.i(268004),r=e.i(161281),i=e.i(321836),a=e.i(618566),l=e.i(271645),o=e.i(708347),s=e.i(612256);e.s(["default",0,()=>{let e=(0,a.useRouter)(),{data:c,isLoading:d}=(0,s.useUIConfig)(),u="u">typeof document?(0,n.getCookie)("token"):null,m=(0,l.useMemo)(()=>(0,r.decodeToken)(u),[u]),g=(0,l.useMemo)(()=>(0,r.checkTokenValidity)(u),[u])&&!c?.admin_ui_disabled,p=(0,l.useCallback)(()=>{(0,i.storeReturnUrl)();let n=`${(0,t.getProxyBaseUrl)()}/ui/login`,r=(0,i.buildLoginUrlWithReturn)(n);e.replace(r)},[e]);return(0,l.useEffect)(()=>{!d&&(g||(u&&(0,n.clearTokenCookies)(),p()))},[d,g,u,p]),{isLoading:d,isAuthorized:g,token:g?u:null,accessToken:m?.key??null,userId:m?.user_id??null,userEmail:m?.user_email??null,userRole:(0,o.formatUserRole)(m?.user_role),premiumUser:m?.premium_user??null,disabledPersonalKeyCreation:m?.disabled_non_admin_personal_key_creation??null,showSSOBanner:m?.login_method==="username_password"}}])},95779,e=>{"use strict";var t=e.i(480731);let n={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},r=[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",()=>n,"themeColorRange",()=>r])},563113,887719,e=>{"use strict";var t=e.i(271645),n=e.i(864517),r=e.i(244009),i=e.i(408850),a=e.i(87414);let l=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{void 0!==e[n]&&(t[n]=e[n])})}),t};function o(e){if(!e)return;let{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function s(e){let{closable:n,closeIcon:r}=e||{};return t.default.useMemo(()=>{if(!n&&(!1===n||!1===r||null===r))return!1;if(void 0===n&&void 0===r)return null;let e={closeIcon:"boolean"!=typeof r&&null!==r?r:void 0};return n&&"object"==typeof n&&(e=Object.assign(Object.assign({},e),n)),e},[n,r])}e.s(["default",0,l],887719);let c={};e.s(["pickClosable",()=>o,"useClosable",0,(e,o,d=c)=>{let u=s(e),m=s(o),[g]=(0,i.useLocale)("global",a.default.global),p="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),f=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(n.default,null)},d),[d]),h=t.default.useMemo(()=>!1!==u&&(u?l(f,m,u):!1!==m&&(m?l(f,m):!!f.closable&&f)),[u,m,f]);return t.default.useMemo(()=>{var e,n;if(!1===h)return[!1,null,p,{}];let{closeIconRender:i}=f,{closeIcon:a}=h,l=a,o=(0,r.default)(h,!0);return null!=l&&(i&&(l=i(a)),l=t.default.isValidElement(l)?t.default.cloneElement(l,Object.assign(Object.assign(Object.assign({},l.props),{"aria-label":null!=(n=null==(e=l.props)?void 0:e["aria-label"])?n:g.close}),o)):t.default.createElement("span",Object.assign({"aria-label":g.close},o),l)),[!0,l,p,o]},[p,g.close,h,f])}],563113)},389083,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(829087),i=e.i(480731),a=e.i(95779),l=e.i(444755),o=e.i(673706);let s={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"}},c={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"}},d=(0,o.makeClassName)("Badge"),u=n.default.forwardRef((e,u)=>{let{color:m,icon:g,size:p=i.Sizes.SM,tooltip:f,className:h,children:b}=e,$=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),y=g||null,{tooltipProps:w,getReferenceProps:C}=(0,r.useTooltip)();return n.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,w.refs.setReference]),className:(0,l.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,l.tremorTwMerge)((0,o.getColorClassNames)(m,a.colorPalette.background).bgColor,(0,o.getColorClassNames)(m,a.colorPalette.iconText).textColor,(0,o.getColorClassNames)(m,a.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,l.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"),s[p].paddingX,s[p].paddingY,s[p].fontSize,h)},C,$),n.default.createElement(r.default,Object.assign({text:f},w)),y?n.default.createElement(y,{className:(0,l.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[p].height,c[p].width)}):null,n.default.createElement("span",{className:(0,l.tremorTwMerge)(d("text"),"whitespace-nowrap")},b))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(242064),i=e.i(517455);e.i(296059);var a=e.i(915654),l=e.i(183293),o=e.i(246422),s=e.i(838378);let c=(0,o.genStyleHooks)("Divider",e=>{let t=(0,s.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:s,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,l.resetComponent)(e)),{borderBlockStart:`${(0,a.unit)(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,a.unit)(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,a.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,a.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,a.unit)(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${s} * 100%)`},"&::after":{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${s} * 100%)`},"&::after":{width:`calc(${s} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var d=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 u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:a,direction:l,className:o,style:s}=(0,r.useComponentConfig)("divider"),{prefixCls:m,type:g="horizontal",orientation:p="center",orientationMargin:f,className:h,rootClassName:b,children:$,dashed:y,variant:w="solid",plain:C,style:k,size:v}=e,S=d(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),x=a("divider",m),[I,O,E]=c(x),j=u[(0,i.default)(v)],z=!!$,B=t.useMemo(()=>"left"===p?"rtl"===l?"end":"start":"right"===p?"rtl"===l?"start":"end":p,[l,p]),R="start"===B&&null!=f,N="end"===B&&null!=f,T=(0,n.default)(x,o,O,E,`${x}-${g}`,{[`${x}-with-text`]:z,[`${x}-with-text-${B}`]:z,[`${x}-dashed`]:!!y,[`${x}-${w}`]:"solid"!==w,[`${x}-plain`]:!!C,[`${x}-rtl`]:"rtl"===l,[`${x}-no-default-orientation-margin-start`]:R,[`${x}-no-default-orientation-margin-end`]:N,[`${x}-${j}`]:!!j},h,b),M=t.useMemo(()=>"number"==typeof f?f:/^\d+$/.test(f)?Number(f):f,[f]);return I(t.createElement("div",Object.assign({className:T,style:Object.assign(Object.assign({},s),k)},S,{role:"separator"}),$&&"vertical"!==g&&t.createElement("span",{className:`${x}-inner-text`,style:{marginInlineStart:R?M:void 0,marginInlineEnd:N?M:void 0}},$)))}],312361)},475254,e=>{"use strict";var t=e.i(271645);let n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},r=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:s,iconNode:c,...d},u)=>(0,t.createElement)("svg",{ref:u,...i,width:n,height:n,stroke:e,strokeWidth:l?24*Number(a)/Number(n):a,className:r("lucide",o),...!s&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(s)?s:[s]])),l=(e,i)=>{let l=(0,t.forwardRef)(({className:l,...o},s)=>(0,t.createElement)(a,{ref:s,iconNode:i,className:r(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=n(e),l};e.s(["default",()=>l],475254)},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(739295),r=e.i(343794),i=e.i(931067),a=e.i(211577),l=e.i(392221),o=e.i(703923),s=e.i(914949),c=e.i(404948),d=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,n){var u,m=e.prefixCls,g=void 0===m?"rc-switch":m,p=e.className,f=e.checked,h=e.defaultChecked,b=e.disabled,$=e.loadingIcon,y=e.checkedChildren,w=e.unCheckedChildren,C=e.onClick,k=e.onChange,v=e.onKeyDown,S=(0,o.default)(e,d),x=(0,s.default)(!1,{value:f,defaultValue:h}),I=(0,l.default)(x,2),O=I[0],E=I[1];function j(e,t){var n=O;return b||(E(n=e),null==k||k(n,t)),n}var z=(0,r.default)(g,p,(u={},(0,a.default)(u,"".concat(g,"-checked"),O),(0,a.default)(u,"".concat(g,"-disabled"),b),u));return t.createElement("button",(0,i.default)({},S,{type:"button",role:"switch","aria-checked":O,disabled:b,className:z,ref:n,onKeyDown:function(e){e.which===c.default.LEFT?j(!1,e):e.which===c.default.RIGHT&&j(!0,e),null==v||v(e)},onClick:function(e){var t=j(!O,e);null==C||C(t,e)}}),$,t.createElement("span",{className:"".concat(g,"-inner")},t.createElement("span",{className:"".concat(g,"-inner-checked")},y),t.createElement("span",{className:"".concat(g,"-inner-unchecked")},w)))});u.displayName="Switch";var m=e.i(121872),g=e.i(242064),p=e.i(937328),f=e.i(517455);e.i(296059);var h=e.i(915654);e.i(262370);var b=e.i(135551),$=e.i(183293),y=e.i(246422),w=e.i(838378);let C=(0,y.genStyleHooks)("Switch",e=>{let t=(0,w.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:(0,h.unit)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:l,calc:o}=e,s=`${t}-inner`,c=(0,h.unit)(o(l).add(o(r).mul(2)).equal()),d=(0,h.unit)(o(a).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${d})`,marginInlineEnd:`calc(100% - ${c} + ${d})`},[`${s}-unchecked`]:{marginTop:o(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${d})`,marginInlineEnd:`calc(-100% + ${c} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:o(r).mul(2).equal(),marginInlineEnd:o(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:o(r).mul(-1).mul(2).equal(),marginInlineEnd:o(r).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:l(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,h.unit)(l(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:l,handleSizeSM:o,calc:s}=e,c=`${t}-inner`,d=(0,h.unit)(s(o).add(s(r).mul(2)).equal()),u=(0,h.unit)(s(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:(0,h.unit)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:a,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${c}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:s(s(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,h.unit)(s(o).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,l=r/2,o=a-4,s=l-4;return{trackHeight:a,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*s+4,trackPadding:2,handleBg:i,handleSize:o,handleSizeSM:s,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:s/2,innerMaxMarginSM:s+2+4}});var k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 v=t.forwardRef((e,i)=>{let{prefixCls:a,size:l,disabled:o,loading:c,className:d,rootClassName:h,style:b,checked:$,value:y,defaultChecked:w,defaultValue:v,onChange:S}=e,x=k(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[I,O]=(0,s.default)(!1,{value:null!=$?$:y,defaultValue:null!=w?w:v}),{getPrefixCls:E,direction:j,switch:z}=t.useContext(g.ConfigContext),B=t.useContext(p.default),R=(null!=o?o:B)||c,N=E("switch",a),T=t.createElement("div",{className:`${N}-handle`},c&&t.createElement(n.default,{className:`${N}-loading-icon`})),[M,P,_]=C(N),A=(0,f.default)(l),U=(0,r.default)(null==z?void 0:z.className,{[`${N}-small`]:"small"===A,[`${N}-loading`]:c,[`${N}-rtl`]:"rtl"===j},d,h,P,_),L=Object.assign(Object.assign({},null==z?void 0:z.style),b);return M(t.createElement(m.default,{component:"Switch",disabled:R},t.createElement(u,Object.assign({},x,{checked:I,onChange:(...e)=>{O(e[0]),null==S||S.apply(void 0,e)},prefixCls:N,className:U,style:L,disabled:R,ref:i,loadingIcon:T}))))});v.__ANT_SWITCH=!0,e.s(["Switch",0,v],790848)},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(876556);function i(e){return["small","middle","large"].includes(e)}function a(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>i,"isValidGapNumber",()=>a],908286);var l=e.i(242064),o=e.i(249616),s=e.i(372409),c=e.i(246422);let d=(0,c.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:l,fontSizeSM:o,borderRadiusLG:c,borderRadiusSM:d,colorBgContainerDisabled:u,lineWidth:m}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,background:u,borderWidth:m,borderStyle:"solid",borderColor:i,borderRadius:n,"&-large":{fontSize:l,borderRadius:c},"&-small":{paddingInline:a,borderRadius:d,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,s.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 m=t.default.forwardRef((e,r)=>{let{className:i,children:a,style:s,prefixCls:c}=e,m=u(e,["className","children","style","prefixCls"]),{getPrefixCls:g,direction:p}=t.default.useContext(l.ConfigContext),f=g("space-addon",c),[h,b,$]=d(f),{compactItemClassnames:y,compactSize:w}=(0,o.useCompactItemContext)(f,p),C=(0,n.default)(f,b,y,$,{[`${f}-${w}`]:w},i);return h(t.default.createElement("div",Object.assign({ref:r,className:C,style:s},m),a))}),g=t.default.createContext({latestIndex:0}),p=g.Provider,f=({className:e,index:n,children:r,split:i,style:a})=>{let{latestIndex:l}=t.useContext(g);return null==r?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:a},r),n{let t=(0,h.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var $=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 y=t.forwardRef((e,o)=>{var s;let{getPrefixCls:c,direction:d,size:u,className:m,style:g,classNames:h,styles:y}=(0,l.useComponentConfig)("space"),{size:w=null!=u?u:"small",align:C,className:k,rootClassName:v,children:S,direction:x="horizontal",prefixCls:I,split:O,style:E,wrap:j=!1,classNames:z,styles:B}=e,R=$(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[N,T]=Array.isArray(w)?w:[w,w],M=i(T),P=i(N),_=a(T),A=a(N),U=(0,r.default)(S,{keepEmpty:!0}),L=void 0===C&&"horizontal"===x?"center":C,H=c("space",I),[W,G,q]=b(H),D=(0,n.default)(H,m,G,`${H}-${x}`,{[`${H}-rtl`]:"rtl"===d,[`${H}-align-${L}`]:L,[`${H}-gap-row-${T}`]:M,[`${H}-gap-col-${N}`]:P},k,v,q),V=(0,n.default)(`${H}-item`,null!=(s=null==z?void 0:z.item)?s:h.item),X=Object.assign(Object.assign({},y.item),null==B?void 0:B.item),F=U.map((e,n)=>{let r=(null==e?void 0:e.key)||`${V}-${n}`;return t.createElement(f,{className:V,key:r,index:n,split:O,style:X},e)}),Y=t.useMemo(()=>({latestIndex:U.reduce((e,t,n)=>null!=t?n:e,0)}),[U]);if(0===U.length)return null;let K={};return j&&(K.flexWrap="wrap"),!P&&A&&(K.columnGap=N),!M&&_&&(K.rowGap=T),W(t.createElement("div",Object.assign({ref:o,className:D,style:Object.assign(Object.assign(Object.assign({},K),g),E)},R),t.createElement(p,{value:Y},F)))});y.Compact=o.default,y.Addon=m,e.s(["default",0,y],38243)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/47a838c67cdd745e.js b/litellm/proxy/_experimental/out/_next/static/chunks/47a838c67cdd745e.js deleted file mode 100644 index 9cc1c207b2..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/47a838c67cdd745e.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,618566,(e,t,n)=>{t.exports=e.r(976562)},161281,e=>{"use strict";var t=e.i(947293);function n(e){try{let n=(0,t.jwtDecode)(e);if(n&&"number"==typeof n.exp)return 1e3*n.exp<=Date.now();return!1}catch{return!0}}function r(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function o(e){return!!e&&null!==r(e)&&!n(e)}e.s(["checkTokenValidity",()=>o,"decodeToken",()=>r,"isJwtExpired",()=>n])},321836,e=>{"use strict";let t="litellm_return_url",n="redirect_to";function r(){return window.location.href}function o(){let e=r();e&&function(e,t,n=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function u(){return new URLSearchParams(window.location.search).get(n)}function a(e,t){let o=t||r();if(!o||o.includes("/login"))return e;let i=e.includes("?")?"&":"?";return`${e}${i}${n}=${encodeURIComponent(o)}`}function s(){let e=u();if(e)return e;let t=i();return t||null}function c(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function f(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),n=window.location.hostname;if(t.hostname!==n)return!1;if(c())return!0;return t.origin===window.location.origin}catch{return!1}}function d(e){try{let t=new URL(e,window.location.origin),n=t.pathname;n.length>1&&n.endsWith("/")&&(n=n.slice(0,-1));let r=new URLSearchParams(t.search),o=new URLSearchParams;Array.from(r.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{o.append(e,t)});let i=o.toString(),l=t.hash||"";return`${t.origin}${n}${i?`?${i}`:""}${l}`}catch{return e}}function m(){let e=u();if(e){if(f(e))return l(),e;c()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=i();if(t){if(f(t))return l(),t;c()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>a,"clearStoredReturnUrl",()=>l,"consumeReturnUrl",()=>m,"getReturnUrl",()=>s,"isValidReturnUrl",()=>f,"normalizeUrlForCompare",()=>d,"storeReturnUrl",()=>o])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],n=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>n(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,n,"rolesWithWriteAccess",0,["Internal User","Admin","proxy_admin"]])},135214,e=>{"use strict";var t=e.i(764205),n=e.i(268004),r=e.i(161281),o=e.i(321836),i=e.i(618566),l=e.i(271645),u=e.i(708347),a=e.i(612256);e.s(["default",0,()=>{let e=(0,i.useRouter)(),{data:s,isLoading:c}=(0,a.useUIConfig)(),f="u">typeof document?(0,n.getCookie)("token"):null,d=(0,l.useMemo)(()=>(0,r.decodeToken)(f),[f]),m=(0,l.useMemo)(()=>(0,r.checkTokenValidity)(f),[f])&&!s?.admin_ui_disabled,p=(0,l.useCallback)(()=>{(0,o.storeReturnUrl)();let n=`${(0,t.getProxyBaseUrl)()}/ui/login`,r=(0,o.buildLoginUrlWithReturn)(n);e.replace(r)},[e]);return(0,l.useEffect)(()=>{!c&&(m||(f&&(0,n.clearTokenCookies)(),p()))},[c,m,f,p]),{isLoading:c,isAuthorized:m,token:m?f:null,accessToken:d?.key??null,userId:d?.user_id??null,userEmail:d?.user_email??null,userRole:(0,u.formatUserRole)(d?.user_role),premiumUser:d?.premium_user??null,disabledPersonalKeyCreation:d?.disabled_non_admin_personal_key_creation??null,showSSOBanner:d?.login_method==="username_password"}}])},95779,e=>{"use strict";var t=e.i(480731);let n={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},r=[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",()=>n,"themeColorRange",()=>r])},829087,397126,229315,343084,953760,e=>{"use strict";e.i(247167);var t=e.i(271645);new WeakMap,new WeakMap;var n='input:not([inert]):not([inert] *),select:not([inert]):not([inert] *),textarea:not([inert]):not([inert] *),a[href]:not([inert]):not([inert] *),button:not([inert]):not([inert] *),[tabindex]:not(slot):not([inert]):not([inert] *),audio[controls]:not([inert]):not([inert] *),video[controls]:not([inert]):not([inert] *),[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *),details>summary:first-of-type:not([inert]):not([inert] *),details:not([inert]):not([inert] *)',r="u"typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=h(t,e.form);return!o||o===e},v=function(e){return p(e)&&"radio"===e.type&&!g(e)},y=function(e){var t,n,r,o,l,u,a,s=e&&i(e),c=null==(t=s)?void 0:t.host,f=!1;if(s&&s!==e)for(f=!!(null!=(n=c)&&null!=(r=n.ownerDocument)&&r.contains(c)||null!=e&&null!=(o=e.ownerDocument)&&o.contains(e));!f&&c;)f=!!(null!=(u=c=null==(l=s=i(c))?void 0:l.host)&&null!=(a=u.ownerDocument)&&a.contains(c));return f},w=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},b=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var l=o.call(e,"details>summary:first-of-type")?e.parentElement:e;if(o.call(l,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return w(e)}else{if("function"==typeof r){for(var u=e;e;){var a=e.parentElement,s=i(e);if(a&&!a.shadowRoot&&!0===r(a))return w(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=u}if(y(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},x=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;nf(t))&&!!R(e,t)},C=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},T=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,l=d(i,o),u=o?T(e.candidates):i;0===l?o?t.push.apply(t,u):t.push(i):n.push({documentOrder:r,tabIndex:l,item:e,isScope:o,content:u})}),n.sort(m).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},S=function(e,t){return T((t=t||{}).getShadowRoot?s([e],t.includeContainer,{filter:E.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:C}):a(e,t.includeContainer,E.bind(null,t)))},A=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==o.call(e,n)&&E(t,e)};e.s(["isTabbable",()=>A,"tabbable",()=>S],397126);var L=e.i(174080);function k(){return"u">typeof window}function P(e){return _(e)?(e.nodeName||"").toLowerCase():"#document"}function O(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function B(e){var t;return null==(t=(_(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function _(e){return!!k()&&(e instanceof Node||e instanceof O(e).Node)}function D(e){return!!k()&&(e instanceof Element||e instanceof O(e).Element)}function U(e){return!!k()&&(e instanceof HTMLElement||e instanceof O(e).HTMLElement)}function M(e){return!(!k()||"u"{try{return e.matches(t)}catch(e){return!1}})}let H=["transform","translate","scale","rotate","perspective"],j=["transform","translate","scale","rotate","perspective","filter"],z=["paint","layout","strict","content"];function K(e){let t=Y(),n=D(e)?J(e):e;return H.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||j.some(e=>(n.willChange||"").includes(e))||z.some(e=>(n.contain||"").includes(e))}function X(e){let t=Q(e);for(;U(t)&&!G(t);){if(K(t))return t;if($(t))break;t=Q(t)}return null}function Y(){return!("u"J,"getContainingBlock",()=>X,"getDocumentElement",()=>B,"getFrameElement",()=>et,"getNodeName",()=>P,"getNodeScroll",()=>Z,"getOverflowAncestors",()=>ee,"getParentNode",()=>Q,"getWindow",()=>O,"isContainingBlock",()=>K,"isElement",()=>D,"isHTMLElement",()=>U,"isLastTraversableNode",()=>G,"isOverflowElement",()=>N,"isShadowRoot",()=>M,"isTableElement",()=>W,"isTopLayer",()=>$,"isWebKit",()=>Y],229315);let en=["top","right","bottom","left"],er=en.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),eo=Math.min,ei=Math.max,el=Math.round,eu=Math.floor,ea=e=>({x:e,y:e}),es={left:"right",right:"left",bottom:"top",top:"bottom"},ec={start:"end",end:"start"};function ef(e,t,n){return ei(e,eo(t,n))}function ed(e,t){return"function"==typeof e?e(t):e}function em(e){return e.split("-")[0]}function ep(e){return e.split("-")[1]}function eh(e){return"x"===e?"y":"x"}function eg(e){return"y"===e?"height":"width"}let ev=new Set(["top","bottom"]);function ey(e){return ev.has(em(e))?"y":"x"}function ew(e){return eh(ey(e))}function eb(e,t,n){void 0===n&&(n=!1);let r=ep(e),o=ew(e),i=eg(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=eL(l)),[l,eL(l)]}function ex(e){let t=eL(e);return[eR(e),t,eR(t)]}function eR(e){return e.replace(/start|end/g,e=>ec[e])}let eE=["left","right"],eC=["right","left"],eT=["top","bottom"],eS=["bottom","top"];function eA(e,t,n,r){let o=ep(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?eC:eE;return t?eE:eC;case"left":case"right":return t?eT:eS;default:return[]}}(em(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(eR)))),i}function eL(e){return e.replace(/left|right|bottom|top/g,e=>es[e])}function ek(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function eP(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function eO(e,t,n){let r,{reference:o,floating:i}=e,l=ey(t),u=ew(t),a=eg(u),s=em(t),c="y"===l,f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,m=o[a]/2-i[a]/2;switch(s){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:d};break;case"left":r={x:o.x-i.width,y:d};break;default:r={x:o.x,y:o.y}}switch(ep(t)){case"start":r[u]-=m*(n&&c?-1:1);break;case"end":r[u]+=m*(n&&c?-1:1)}return r}async function eB(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:u,strategy:a}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:m=0}=ed(t,e),p=ek(m),h=u[d?"floating"===f?"reference":"floating":f],g=eP(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(u.floating)),boundary:s,rootBoundary:c,strategy:a})),v="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await (null==i.getOffsetParent?void 0:i.getOffsetParent(u.floating)),w=await (null==i.isElement?void 0:i.isElement(y))&&await (null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=eP(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:v,offsetParent:y,strategy:a}):v);return{top:(g.top-b.top+p.top)/w.y,bottom:(b.bottom-g.bottom+p.bottom)/w.y,left:(g.left-b.left+p.left)/w.x,right:(b.right-g.right+p.right)/w.x}}e.s(["clamp",()=>ef,"createCoords",()=>ea,"evaluate",()=>ed,"floor",()=>eu,"getAlignment",()=>ep,"getAlignmentAxis",()=>ew,"getAlignmentSides",()=>eb,"getAxisLength",()=>eg,"getExpandedPlacements",()=>ex,"getOppositeAlignmentPlacement",()=>eR,"getOppositeAxis",()=>eh,"getOppositeAxisPlacements",()=>eA,"getOppositePlacement",()=>eL,"getPaddingObject",()=>ek,"getSide",()=>em,"getSideAxis",()=>ey,"max",()=>ei,"min",()=>eo,"placements",()=>er,"rectToClientRect",()=>eP,"round",()=>el,"sides",()=>en],343084);let e_=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),a=await (null==l.isRTL?void 0:l.isRTL(t)),s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=eO(s,r,a),d=r,m={},p=0;for(let n=0;ne[t]>=0)}function eM(e){let t=eo(...e.map(e=>e.left)),n=eo(...e.map(e=>e.top));return{x:t,y:n,width:ei(...e.map(e=>e.right))-t,height:ei(...e.map(e=>e.bottom))-n}}let eI=new Set(["left","top"]);async function eN(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=em(n),u=ep(n),a="y"===ey(n),s=eI.has(l)?-1:1,c=i&&a?-1:1,f=ed(t,e),{mainAxis:d,crossAxis:m,alignmentAxis:p}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&"number"==typeof p&&(m="end"===u?-1*p:p),a?{x:m*c,y:d*s}:{x:d*s,y:m*c}}function eF(e){let t=J(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=U(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=el(n)!==i||el(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function eW(e){return D(e)?e:e.contextElement}function eV(e){let t=eW(e);if(!U(t))return ea(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=eF(t),l=(i?el(n.width):n.width)/r,u=(i?el(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}let e$=ea(0);function eH(e){let t=O(e);return Y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:e$}function ej(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=eW(e),u=ea(1);t&&(r?D(r)&&(u=eV(r)):u=eV(e));let a=(void 0===(o=n)&&(o=!1),r&&(!o||r===O(l))&&o)?eH(l):ea(0),s=(i.left+a.x)/u.x,c=(i.top+a.y)/u.y,f=i.width/u.x,d=i.height/u.y;if(l){let e=O(l),t=r&&D(r)?O(r):r,n=e,o=et(n);for(;o&&r&&t!==n;){let e=eV(o),t=o.getBoundingClientRect(),r=J(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,f*=e.x,d*=e.y,s+=i,c+=l,o=et(n=O(o))}}return eP({width:f,height:d,x:s,y:c})}function ez(e,t){let n=Z(e).scrollLeft;return t?t.left+n:ej(B(e)).left+n}function eK(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ez(e,n),y:n.top+t.scrollTop}}let eX=new Set(["absolute","fixed"]);function eY(e,t,n){var r;let o;if("viewport"===t)o=function(e,t){let n=O(e),r=B(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,u=0,a=0;if(o){i=o.width,l=o.height;let e=Y();(!e||e&&"fixed"===t)&&(u=o.offsetLeft,a=o.offsetTop)}let s=ez(r);if(s<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else s<=25&&(i+=s);return{width:i,height:l,x:u,y:a}}(e,n);else if("document"===t){let t,n,i,l,u,a,s;r=B(e),t=B(r),n=Z(r),i=r.ownerDocument.body,l=ei(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),u=ei(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-n.scrollLeft+ez(r),s=-n.scrollTop,"rtl"===J(i).direction&&(a+=ei(t.clientWidth,i.clientWidth)-l),o={width:l,height:u,x:a,y:s}}else if(D(t)){let e,r,i,l,u,a;r=(e=ej(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,l=U(t)?eV(t):ea(1),u=t.clientWidth*l.x,a=t.clientHeight*l.y,o={width:u,height:a,x:i*l.x,y:r*l.y}}else{let n=eH(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return eP(o)}function eq(e){return"static"===J(e).position}function eG(e,t){if(!U(e)||"fixed"===J(e).position)return null;if(t)return t(e);let n=e.offsetParent;return B(e)===n&&(n=n.ownerDocument.body),n}function eJ(e,t){let n=O(e);if($(e))return n;if(!U(e)){let t=Q(e);for(;t&&!G(t);){if(D(t)&&!eq(t))return t;t=Q(t)}return n}let r=eG(e,t);for(;r&&W(r)&&eq(r);)r=eG(r,t);return r&&G(r)&&eq(r)&&!K(r)?n:r||X(e)||n}let eZ=async function(e){let t=this.getOffsetParent||eJ,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=U(t),o=B(t),i="fixed"===n,l=ej(e,!0,i,t),u={scrollLeft:0,scrollTop:0},a=ea(0);if(r||!r&&!i)if(("body"!==P(t)||N(o))&&(u=Z(t)),r){let e=ej(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=ez(o));i&&!r&&o&&(a.x=ez(o));let s=!o||r||i?ea(0):eK(o,u);return{x:l.left+u.scrollLeft-a.x-s.x,y:l.top+u.scrollTop-a.y-s.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eQ={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=B(r),u=!!t&&$(t.floating);if(r===l||u&&i)return n;let a={scrollLeft:0,scrollTop:0},s=ea(1),c=ea(0),f=U(r);if((f||!f&&!i)&&(("body"!==P(r)||N(l))&&(a=Z(r)),U(r))){let e=ej(r);s=eV(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let d=!l||f||i?ea(0):eK(l,a);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-a.scrollLeft*s.x+c.x+d.x,y:n.y*s.y-a.scrollTop*s.y+c.y+d.y}},getDocumentElement:B,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?$(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=ee(e,[],!1).filter(e=>D(e)&&"body"!==P(e)),o=null,i="fixed"===J(e).position,l=i?Q(e):e;for(;D(l)&&!G(l);){let t=J(l),n=K(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&eX.has(o.position)||N(l)&&!n&&function e(t,n){let r=Q(t);return!(r===n||!D(r)||G(r))&&("fixed"===J(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):o=t,l=Q(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],u=i.reduce((e,n)=>{let r=eY(t,n,o);return e.top=ei(r.top,e.top),e.right=eo(r.right,e.right),e.bottom=eo(r.bottom,e.bottom),e.left=ei(r.left,e.left),e},eY(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:eJ,getElementRects:eZ,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=eF(e);return{width:t,height:n}},getScale:eV,isElement:D,isRTL:function(e){return"rtl"===J(e).direction}};function e0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function e1(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=eW(e),f=i||l?[...c?ee(c):[],...ee(t)]:[];f.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let d=c&&a?function(e,t){let n,r=null,o=B(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(u,a){void 0===u&&(u=!1),void 0===a&&(a=1),i();let s=e.getBoundingClientRect(),{left:c,top:f,width:d,height:m}=s;if(u||t(),!d||!m)return;let p={rootMargin:-eu(f)+"px "+-eu(o.clientWidth-(c+d))+"px "+-eu(o.clientHeight-(f+m))+"px "+-eu(c)+"px",threshold:ei(0,eo(1,a))||1},h=!0;function g(t){let r=t[0].intersectionRatio;if(r!==a){if(!h)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||e0(s,e.getBoundingClientRect())||l(),h=!1}try{r=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),i}(c,n):null,m=-1,p=null;u&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!s&&p.observe(c),p.observe(t));let h=s?ej(e):null;return s&&function t(){let r=ej(e);h&&!e0(h,r)&&n(),h=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(o)}}let e2=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:u}=t,a=await eN(t,e);return l===(null==(n=u.offset)?void 0:n.placement)&&null!=(r=u.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},e7=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o,i;let{rects:l,middlewareData:u,placement:a,platform:s,elements:c}=t,{crossAxis:f=!1,alignment:d,allowedPlacements:m=er,autoAlignment:p=!0,...h}=ed(e,t),g=void 0!==d||m===er?((i=d||null)?[...m.filter(e=>ep(e)===i),...m.filter(e=>ep(e)!==i)]:m.filter(e=>em(e)===e)).filter(e=>!i||ep(e)===i||!!p&&eR(e)!==e):m,v=await s.detectOverflow(t,h),y=(null==(n=u.autoPlacement)?void 0:n.index)||0,w=g[y];if(null==w)return{};let b=eb(w,l,await (null==s.isRTL?void 0:s.isRTL(c.floating)));if(a!==w)return{reset:{placement:g[0]}};let x=[v[em(w)],v[b[0]],v[b[1]]],R=[...(null==(r=u.autoPlacement)?void 0:r.overflows)||[],{placement:w,overflows:x}],E=g[y+1];if(E)return{data:{index:y+1,overflows:R},reset:{placement:E}};let C=R.map(e=>{let t=ep(e.placement);return[e.placement,t&&f?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),T=(null==(o=C.filter(e=>e[2].slice(0,ep(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||C[0][0];return T!==a?{data:{index:y+1,overflows:R},reset:{placement:T}}:{}}}},e5=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o,platform:i}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=ed(e,t),c={x:n,y:r},f=await i.detectOverflow(t,s),d=ey(em(o)),m=eh(d),p=c[m],h=c[d];if(l){let e="y"===m?"top":"left",t="y"===m?"bottom":"right",n=p+f[e],r=p-f[t];p=ef(n,p,r)}if(u){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=h+f[e],r=h-f[t];h=ef(n,h,r)}let g=a.fn({...t,[m]:p,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:l,[d]:u}}}}}},e3=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let{placement:u,middlewareData:a,rects:s,initialPlacement:c,platform:f,elements:d}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...w}=ed(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};let b=em(u),x=ey(c),R=em(c)===c,E=await (null==f.isRTL?void 0:f.isRTL(d.floating)),C=h||(R||!y?[eL(c)]:ex(c)),T="none"!==v;!h&&T&&C.push(...eA(c,y,v,E));let S=[c,...C],A=await f.detectOverflow(t,w),L=[],k=(null==(r=a.flip)?void 0:r.overflows)||[];if(m&&L.push(A[b]),p){let e=eb(u,s,E);L.push(A[e[0]],A[e[1]])}if(k=[...k,{placement:u,overflows:L}],!L.every(e=>e<=0)){let e=((null==(o=a.flip)?void 0:o.index)||0)+1,t=S[e];if(t&&("alignment"!==p||x===ey(t)||k.every(e=>ey(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:k},reset:{placement:t}};let n=null==(i=k.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(g){case"bestFit":{let e=null==(l=k.filter(e=>{if(T){let t=ey(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=c}if(u!==n)return{reset:{placement:n}}}return{}}}},e6=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let o,i,{placement:l,rects:u,platform:a,elements:s}=t,{apply:c=()=>{},...f}=ed(e,t),d=await a.detectOverflow(t,f),m=em(l),p=ep(l),h="y"===ey(l),{width:g,height:v}=u.floating;"top"===m||"bottom"===m?(o=m,i=p===(await (null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(i=m,o="end"===p?"top":"bottom");let y=v-d.top-d.bottom,w=g-d.left-d.right,b=eo(v-d[o],y),x=eo(g-d[i],w),R=!t.middlewareData.shift,E=b,C=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),R&&!p){let e=ei(d.left,0),t=ei(d.right,0),n=ei(d.top,0),r=ei(d.bottom,0);h?C=g-2*(0!==e||0!==t?e+t:ei(d.left,d.right)):E=v-2*(0!==n||0!==r?n+r:ei(d.top,d.bottom))}await c({...t,availableWidth:C,availableHeight:E});let T=await a.getDimensions(s.floating);return g!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}},e4=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=ed(e,t);switch(o){case"referenceHidden":{let e=eD(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:eU(e)}}}case"escaped":{let e=eD(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:eU(e)}}}default:return{}}}}},e8=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:l,elements:u,middlewareData:a}=t,{element:s,padding:c=0}=ed(e,t)||{};if(null==s)return{};let f=ek(c),d={x:n,y:r},m=ew(o),p=eg(m),h=await l.getDimensions(s),g="y"===m,v=g?"clientHeight":"clientWidth",y=i.reference[p]+i.reference[m]-d[m]-i.floating[p],w=d[m]-i.reference[m],b=await (null==l.getOffsetParent?void 0:l.getOffsetParent(s)),x=b?b[v]:0;x&&await (null==l.isElement?void 0:l.isElement(b))||(x=u.floating[v]||i.floating[p]);let R=x/2-h[p]/2-1,E=eo(f[g?"top":"left"],R),C=eo(f[g?"bottom":"right"],R),T=x-h[p]-C,S=x/2-h[p]/2+(y/2-w/2),A=ef(E,S,T),L=!a.arrow&&null!=ep(o)&&S!==A&&i.reference[p]/2-(Se.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(e=>eP(eM(e)))}(c),d=eP(eM(c)),m=ek(u),p=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&f[0].left>f[1].right&&null!=a&&null!=s)return f.find(e=>a>e.left-m.left&&ae.top-m.top&&s=2){if("y"===ey(n)){let e=f[0],t=f[f.length-1],r="top"===em(n),o=e.top,i=t.bottom,l=r?e.left:t.left,u=r?e.right:t.right;return{top:o,bottom:i,left:l,right:u,width:u-l,height:i-o,x:l,y:o}}let e="left"===em(n),t=ei(...f.map(e=>e.right)),r=eo(...f.map(e=>e.left)),o=f.filter(n=>e?n.left===r:n.right===t),i=o[0].top,l=o[o.length-1].bottom;return{top:i,bottom:l,left:r,right:t,width:t-r,height:l-i,x:r,y:i}}return d}},floating:r.floating,strategy:l});return o.reference.x!==p.reference.x||o.reference.y!==p.reference.y||o.reference.width!==p.reference.width||o.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}},te=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:u=0,mainAxis:a=!0,crossAxis:s=!0}=ed(e,t),c={x:n,y:r},f=ey(o),d=eh(f),m=c[d],p=c[f],h=ed(u,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){let e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;mn&&(m=n)}if(s){var v,y;let e="y"===d?"width":"height",t=eI.has(em(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(v=l.offset)?void 0:v[f])||0)+(t?0:g.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(y=l.offset)?void 0:y[f])||0)-(t?g.crossAxis:0);pr&&(p=r)}return{[d]:m,[f]:p}}}},tt=(e,t,n)=>{let r=new Map,o={platform:eQ,...n},i={...o.platform,_c:r};return e_(e,t,{...o,platform:i})};e.s(["arrow",()=>e8,"autoPlacement",()=>e7,"autoUpdate",()=>e1,"computePosition",()=>tt,"detectOverflow",()=>eB,"flip",()=>e3,"hide",()=>e4,"inline",()=>e9,"limitShift",()=>te,"offset",()=>e2,"shift",()=>e5,"size",()=>e6],953760);var tn="u">typeof document?t.useLayoutEffect:t.useEffect;function tr(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!tr(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!tr(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function to(e){let n=t.useRef(e);return tn(()=>{n.current=e}),n}var ti="u">typeof document?t.useLayoutEffect:t.useEffect;let tl=!1,tu=0,ta=()=>"floating-ui-"+tu++,ts=t["useId".toString()]||function(){let[e,n]=t.useState(()=>tl?ta():void 0);return ti(()=>{null==e&&n(ta())},[]),t.useEffect(()=>{tl||(tl=!0)},[]),e},tc=t.createContext(null),tf=t.createContext(null),td=()=>{var e;return(null==(e=t.useContext(tc))?void 0:e.id)||null};function tm(e){return(null==e?void 0:e.ownerDocument)||document}function tp(e){return tm(e).defaultView||window}function th(e){return!!e&&e instanceof tp(e).Element}function tg(e){return!!e&&e instanceof tp(e).HTMLElement}function tv(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ty(e){let n=(0,t.useRef)(e);return ti(()=>{n.current=e}),n}let tw="data-floating-ui-safe-polygon";function tb(e,t,n){return n&&!tv(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let tx=function(e,n){let{enabled:r=!0,delay:o=0,handleClose:i=null,mouseOnly:l=!1,restMs:u=0,move:a=!0}=void 0===n?{}:n,{open:s,onOpenChange:c,dataRef:f,events:d,elements:{domReference:m,floating:p},refs:h}=e,g=t.useContext(tf),v=td(),y=ty(i),w=ty(o),b=t.useRef(),x=t.useRef(),R=t.useRef(),E=t.useRef(),C=t.useRef(!0),T=t.useRef(!1),S=t.useRef(()=>{}),A=t.useCallback(()=>{var e;let t=null==(e=f.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[f]);t.useEffect(()=>{if(r)return d.on("dismiss",e),()=>{d.off("dismiss",e)};function e(){clearTimeout(x.current),clearTimeout(E.current),C.current=!0}},[r,d]),t.useEffect(()=>{if(!r||!y.current||!s)return;function e(){A()&&c(!1)}let t=tm(p).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[p,s,c,r,y,f,A]);let L=t.useCallback(function(e){void 0===e&&(e=!0);let t=tb(w.current,"close",b.current);t&&!R.current?(clearTimeout(x.current),x.current=setTimeout(()=>c(!1),t)):e&&(clearTimeout(x.current),c(!1))},[w,c]),k=t.useCallback(()=>{S.current(),R.current=void 0},[]),P=t.useCallback(()=>{if(T.current){let e=tm(h.floating.current).body;e.style.pointerEvents="",e.removeAttribute(tw),T.current=!1}},[h]);return t.useEffect(()=>{if(r&&th(m))return s&&m.addEventListener("mouseleave",i),null==p||p.addEventListener("mouseleave",i),a&&m.addEventListener("mousemove",n,{once:!0}),m.addEventListener("mouseenter",n),m.addEventListener("mouseleave",o),()=>{s&&m.removeEventListener("mouseleave",i),null==p||p.removeEventListener("mouseleave",i),a&&m.removeEventListener("mousemove",n),m.removeEventListener("mouseenter",n),m.removeEventListener("mouseleave",o)};function t(){return!!f.current.openEvent&&["click","mousedown"].includes(f.current.openEvent.type)}function n(e){if(clearTimeout(x.current),C.current=!1,l&&!tv(b.current)||u>0&&0===tb(w.current,"open"))return;f.current.openEvent=e;let t=tb(w.current,"open",b.current);t?x.current=setTimeout(()=>{c(!0)},t):c(!0)}function o(n){if(t())return;S.current();let r=tm(p);if(clearTimeout(E.current),y.current){s||clearTimeout(x.current),R.current=y.current({...e,tree:g,x:n.clientX,y:n.clientY,onClose(){P(),k(),L()}});let t=R.current;r.addEventListener("mousemove",t),S.current=()=>{r.removeEventListener("mousemove",t)};return}L()}function i(n){t()||null==y.current||y.current({...e,tree:g,x:n.clientX,y:n.clientY,onClose(){P(),k(),L()}})(n)}},[m,p,r,e,l,u,a,L,k,P,c,s,g,w,y,f]),ti(()=>{var e,t,n;if(r&&s&&null!=(e=y.current)&&e.__options.blockPointerEvents&&A()){let e=tm(p).body;if(e.setAttribute(tw,""),e.style.pointerEvents="none",T.current=!0,th(m)&&p){let e=null==g||null==(t=g.nodesRef.current.find(e=>e.id===v))||null==(n=t.context)?void 0:n.elements.floating;return e&&(e.style.pointerEvents=""),m.style.pointerEvents="auto",p.style.pointerEvents="auto",()=>{m.style.pointerEvents="",p.style.pointerEvents=""}}}},[r,s,v,p,m,g,y,f,A]),ti(()=>{s||(b.current=void 0,k(),P())},[s,k,P]),t.useEffect(()=>()=>{k(),clearTimeout(x.current),clearTimeout(E.current),P()},[r,k,P]),t.useMemo(()=>{if(!r)return{};function e(e){b.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(){s||0===u||(clearTimeout(E.current),E.current=setTimeout(()=>{C.current||c(!0)},u))}},floating:{onMouseEnter(){clearTimeout(x.current)},onMouseLeave(){d.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),L(!1)}}}},[d,r,u,s,c,L])};function tR(e,t){if(!e||!t)return!1;let n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&function(e){if("u"{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})||[],r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})})||[],n=n.concat(r);return n}let tC=t["useInsertionEffect".toString()]||(e=>e());function tT(e){let n=t.useRef(()=>{});return tC(()=>{n.current=e}),t.useCallback(function(){for(var e=arguments.length,t=Array(e),r=0;r!1),R="function"==typeof m?x:m,E=t.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:T}=tk(y);return t.useEffect(()=>{if(!r||!f)return;function e(e){if("Escape"===e.key){let e=w?tE(w.nodesRef.current,l):[];if(e.length>0){let t=!0;if(e.forEach(e=>{var n;if(null!=(n=e.context)&&n.open&&!e.context.dataRef.current.__escapeKeyBubbles){t=!1;return}}),!t)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),o(!1)}}function t(e){var t;let n=E.current;if(E.current=!1,n||"function"==typeof R&&!R(e))return;let r="composedPath"in e?e.composedPath()[0]:e.target;if(tg(r)&&s){let t=s.ownerDocument.defaultView||window,n=r.scrollWidth>r.clientWidth,o=r.scrollHeight>r.clientHeight,i=o&&e.offsetX>r.clientWidth;if(o&&"rtl"===t.getComputedStyle(r).direction&&(i=e.offsetX<=r.offsetWidth-r.clientWidth),i||n&&e.offsetY>r.clientHeight)return}let u=w&&tE(w.nodesRef.current,l).some(t=>{var n;return tS(e,null==(n=t.context)?void 0:n.elements.floating)});if(tS(e,s)||tS(e,a)||u)return;let c=w?tE(w.nodesRef.current,l):[];if(c.length>0){let e=!0;if(c.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:function(e){let t,n;if(0===e.mozInputSource&&e.isTrusted)return!0;let r=/Android/i;return(r.test(null!=(n=navigator.userAgentData)&&n.platform?n.platform:navigator.platform)||r.test((t=navigator.userAgentData)&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent))&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType}(e)||0===(t=e).width&&0===t.height||1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"!==t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail}}),o(!1)}function n(){o(!1)}c.current.__escapeKeyBubbles=C,c.current.__outsidePressBubbles=T;let m=tm(s);d&&m.addEventListener("keydown",e),R&&m.addEventListener(p,t);let h=[];return v&&(th(a)&&(h=ee(a)),th(s)&&(h=h.concat(ee(s))),!th(u)&&u&&u.contextElement&&(h=h.concat(ee(u.contextElement)))),(h=h.filter(e=>{var t;return e!==(null==(t=m.defaultView)?void 0:t.visualViewport)})).forEach(e=>{e.addEventListener("scroll",n,{passive:!0})}),()=>{d&&m.removeEventListener("keydown",e),R&&m.removeEventListener(p,t),h.forEach(e=>{e.removeEventListener("scroll",n)})}},[c,s,a,u,d,R,p,i,w,l,r,o,v,f,C,T,b]),t.useEffect(()=>{E.current=!1},[R,p]),t.useMemo(()=>f?{reference:{[tA[g]]:()=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),o(!1))}},floating:{[tL[p]]:()=>{E.current=!0}}}:{},[f,i,h,p,g,o])},tO=function(e,n){let{open:r,onOpenChange:o,dataRef:i,events:l,refs:u,elements:{floating:a,domReference:s}}=e,{enabled:c=!0,keyboardOnly:f=!0}=void 0===n?{}:n,d=t.useRef(""),m=t.useRef(!1),p=t.useRef();return t.useEffect(()=>{if(!c)return;let e=tm(a).defaultView||window;function t(){!r&&tg(s)&&s===function(e){let t=e.activeElement;for(;(null==(n=t)||null==(r=n.shadowRoot)?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}(tm(s))&&(m.current=!0)}return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}},[a,s,r,c]),t.useEffect(()=>{if(c)return l.on("dismiss",e),()=>{l.off("dismiss",e)};function e(e){("referencePress"===e.type||"escapeKey"===e.type)&&(m.current=!0)}},[l,c]),t.useEffect(()=>()=>{clearTimeout(p.current)},[]),t.useMemo(()=>c?{reference:{onPointerDown(e){let{pointerType:t}=e;d.current=t,m.current=!!(t&&f)},onMouseLeave(){m.current=!1},onFocus(e){var t;m.current||"focus"===e.type&&(null==(t=i.current.openEvent)?void 0:t.type)==="mousedown"&&i.current.openEvent&&tS(i.current.openEvent,s)||(i.current.openEvent=e.nativeEvent,o(!0))},onBlur(e){m.current=!1;let t=e.relatedTarget,n=th(t)&&t.hasAttribute("data-floating-ui-focus-guard")&&"outside"===t.getAttribute("data-type");p.current=setTimeout(()=>{tR(u.floating.current,t)||tR(s,t)||n||o(!1)})}}}:{},[c,f,s,u,i,o])},tB=function(e,n){let{open:r}=e,{enabled:o=!0,role:i="dialog"}=void 0===n?{}:n,l=ts(),u=ts();return t.useMemo(()=>{let e={id:l,role:i};return o?"tooltip"===i?{reference:{"aria-describedby":r?l:void 0},floating:e}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===i?"dialog":i,"aria-controls":r?l:void 0,..."listbox"===i&&{role:"combobox"},..."menu"===i&&{id:u}},floating:{...e,..."menu"===i&&{"aria-labelledby":u}}}:{}},[o,i,r,l,u])};function t_(e,t,n){let r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map(e=>e?e[n]:null).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,o]=t;if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof o){var i;null==(i=r.get(n))||i.push(o),e[n]=function(){for(var e,t=arguments.length,o=Array(t),i=0;ie(...o))}}}else e[n]=o}),e),{})}}let tD=function(e){void 0===e&&(e=[]);let n=e,r=t.useCallback(t=>t_(t,e,"reference"),n),o=t.useCallback(t=>t_(t,e,"floating"),n),i=t.useCallback(t=>t_(t,e,"item"),e.map(e=>null==e?void 0:e.item));return t.useMemo(()=>({getReferenceProps:r,getFloatingProps:o,getItemProps:i}),[r,o,i])};var tU=e.i(444755);let tM=e=>{let[n,r]=(0,t.useState)(!1),[o,i]=(0,t.useState)(),{x:l,y:u,refs:a,strategy:s,context:c}=function(e){void 0===e&&(e={});let{open:n=!1,onOpenChange:r,nodeId:o}=e,i=function(e){void 0===e&&(e={});let{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,whileElementsMounted:l,open:u}=e,[a,s]=t.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[c,f]=t.useState(o);tr(c,o)||f(o);let d=t.useRef(null),m=t.useRef(null),p=t.useRef(a),h=to(l),g=to(i),[v,y]=t.useState(null),[w,b]=t.useState(null),x=t.useCallback(e=>{d.current!==e&&(d.current=e,y(e))},[]),R=t.useCallback(e=>{m.current!==e&&(m.current=e,b(e))},[]),E=t.useCallback(()=>{if(!d.current||!m.current)return;let e={placement:n,strategy:r,middleware:c};g.current&&(e.platform=g.current),tt(d.current,m.current,e).then(e=>{let t={...e,isPositioned:!0};C.current&&!tr(p.current,t)&&(p.current=t,L.flushSync(()=>{s(t)}))})},[c,n,r,g]);tn(()=>{!1===u&&p.current.isPositioned&&(p.current.isPositioned=!1,s(e=>({...e,isPositioned:!1})))},[u]);let C=t.useRef(!1);tn(()=>(C.current=!0,()=>{C.current=!1}),[]),tn(()=>{if(v&&w)if(h.current)return h.current(v,w,E);else E()},[v,w,E,h]);let T=t.useMemo(()=>({reference:d,floating:m,setReference:x,setFloating:R}),[x,R]),S=t.useMemo(()=>({reference:v,floating:w}),[v,w]);return t.useMemo(()=>({...a,update:E,refs:T,elements:S,reference:x,floating:R}),[a,E,T,S,x,R])}(e),l=t.useContext(tf),u=t.useRef(null),a=t.useRef({}),s=t.useState(()=>{let e;return e=new Map,{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(e=>e!==n))}}})[0],[c,f]=t.useState(null),d=t.useCallback(e=>{let t=th(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;i.refs.setReference(t)},[i.refs]),m=t.useCallback(e=>{(th(e)||null===e)&&(u.current=e,f(e)),(th(i.refs.reference.current)||null===i.refs.reference.current||null!==e&&!th(e))&&i.refs.setReference(e)},[i.refs]),p=t.useMemo(()=>({...i.refs,setReference:m,setPositionReference:d,domReference:u}),[i.refs,m,d]),h=t.useMemo(()=>({...i.elements,domReference:c}),[i.elements,c]),g=tT(r),v=t.useMemo(()=>({...i,refs:p,elements:h,dataRef:a,nodeId:o,events:s,open:n,onOpenChange:g}),[i,o,s,n,g,p,h]);return ti(()=>{let e=null==l?void 0:l.nodesRef.current.find(e=>e.id===o);e&&(e.context=v)}),t.useMemo(()=>({...i,context:v,refs:p,reference:m,positionReference:d}),[i,p,v,m,d])}({open:n,onOpenChange:t=>{t&&e?i(setTimeout(()=>{r(t)},e)):(clearTimeout(o),r(t))},placement:"top",whileElementsMounted:e1,middleware:[e2(5),e3({fallbackAxisSideDirection:"start"}),e5()]}),{getReferenceProps:f,getFloatingProps:d}=tD([tx(c,{move:!1}),tO(c),tP(c),tB(c,{role:"tooltip"})]);return{tooltipProps:{open:n,x:l,y:u,refs:a,strategy:s,getFloatingProps:d},getReferenceProps:f}},tI=({text:e,open:n,x:r,y:o,refs:i,strategy:l,getFloatingProps:u})=>n&&e?t.default.createElement("div",Object.assign({className:(0,tU.tremorTwMerge)("max-w-xs text-sm z-20 rounded-tremor-default opacity-100 px-2.5 py-1","text-white bg-tremor-background-emphasis","dark:text-tremor-content-emphasis dark:bg-white"),ref:i.setFloating,style:{position:l,top:null!=o?o:0,left:null!=r?r:0}},u()),e):null;tI.displayName="Tooltip",e.s(["default",()=>tI,"useTooltip",()=>tM],829087)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/47be83d4515c6599.js b/litellm/proxy/_experimental/out/_next/static/chunks/47be83d4515c6599.js deleted file mode 100644 index 2fa9aaa773..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/47be83d4515c6599.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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)},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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))})})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(708347),r=e.i(135214);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&a.all_admin_roles.includes(s||"")})}])},392110,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4a97ab1044d56ea9.js b/litellm/proxy/_experimental/out/_next/static/chunks/4a97ab1044d56ea9.js deleted file mode 100644 index 532dcf9591..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/4a97ab1044d56ea9.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,160818,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:"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 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(["GlobalOutlined",0,o],160818)},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};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(["default",0,o],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(529681);let o=e=>{let{prefixCls:a,className:l,style:o,size:i,shape:n}=e,s=(0,r.default)({[`${a}-lg`]:"large"===i,[`${a}-sm`]:"small"===i}),d=(0,r.default)({[`${a}-circle`]:"circle"===n,[`${a}-square`]:"square"===n,[`${a}-round`]:"round"===n}),c=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(a,s,d,l),style:Object.assign(Object.assign({},c),o)})};e.i(296059);var i=e.i(694758),n=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,n.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),f=e=>Object.assign({width:e},u(e)),h=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),p=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:l,skeletonButtonCls:o,skeletonInputCls:i,skeletonImageCls:n,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:p,padding:v,marginSM:C,borderRadius:w,titleHeight:k,blockRadius:x,paragraphLiHeight:$,controlHeightXS:y,paragraphMarginTop:j}=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:p},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:k,background:p,borderRadius:x,[`+ ${l}`]:{marginBlockStart:u}},[l]:{padding:0,"> li":{width:"100%",height:$,listStyle:"none",background:p,borderRadius:x,"+ li":{marginBlockStart:y}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${l} > li`]:{borderRadius:w}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:C,[`+ ${l}`]:{marginBlockStart:j}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:l,controlHeightSM:o,gradientFromColor:i,calc:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:n(a).mul(2).equal(),minWidth:n(a).mul(2).equal()},b(a,n))},h(e,a,r)),{[`${r}-lg`]:Object.assign({},b(l,n))}),h(e,l,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(o,n))}),h(e,o,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:l,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(l)),[`${t}${t}-sm`]:Object.assign({},m(o))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:l,controlHeightSM:o,gradientFromColor:i,calc:n}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},g(t,n)),[`${a}-lg`]:Object.assign({},g(l,n)),[`${a}-sm`]:Object.assign({},g(o,n))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:l,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:l},f(o(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(r)),{maxWidth:o(r).mul(4).equal(),maxHeight:o(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${a}, - ${l} > li, - ${r}, - ${o}, - ${i}, - ${n} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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:a,className:l,style:o,rows:i=0}=e,n=Array.from({length:i}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:o},n)},C=({prefixCls:e,className:a,width:l,style:o})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},o)});function w(e){return e&&"object"==typeof e?e:{}}let k=e=>{let{prefixCls:l,loading:i,className:n,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:h}=e,{getPrefixCls:b,direction:k,className:x,style:$}=(0,a.useComponentConfig)("skeleton"),y=b("skeleton",l),[j,N,E]=p(y);if(i||!("loading"in e)){let e,a,l=!!u,i=!!m,c=!!g;if(l){let r=Object.assign(Object.assign({prefixCls:`${y}-avatar`},i&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),w(u));e=t.createElement("div",{className:`${y}-header`},t.createElement(o,Object.assign({},r)))}if(i||c){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${y}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),w(m));e=t.createElement(C,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},(e={},l&&i||(e.width="61%"),!l&&i?e.rows=3:e.rows=2,e)),w(g));r=t.createElement(v,Object.assign({},a))}a=t.createElement("div",{className:`${y}-content`},e,r)}let b=(0,r.default)(y,{[`${y}-with-avatar`]:l,[`${y}-active`]:f,[`${y}-rtl`]:"rtl"===k,[`${y}-round`]:h},x,n,s,N,E);return j(t.createElement("div",{className:b,style:Object.assign(Object.assign({},$),d)},e,a))}return null!=c?c:null};k.Button=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-button`,size:u},v))))},k.Avatar=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls","className"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},v))))},k.Input=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-input`,size:u},v))))},k.Image=e=>{let{prefixCls:l,className:o,rootClassName:i,style:n,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[u,m,g]=p(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},o,i,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,o),style:n},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`})))))},k.Node=e=>{let{prefixCls:l,className:o,rootClassName:i,style:n,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",l),[m,g,f]=p(u),h=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,o,i,f);return m(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${u}-image`,o),style:n},d)))},e.s(["default",0,k],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],o=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,n=(e,t,r,a,l)=>{clearTimeout(a.current);let i=o(e);t(i),r.current=i,l&&l({current:i})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let u=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 g={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"}},f=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},h=(0,c.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:l,needMargin:o,transitionStatus:i})=>{let n=o?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(u,{className:(0,d.tremorTwMerge)(h("icon"),"animate-spin shrink-0",n,m.default,m[i]),style:{transition:"width 150ms"}}):a.default.createElement(l,{className:(0,d.tremorTwMerge)(h("icon"),"shrink-0",t,n)})},p=a.default.forwardRef((e,l)=>{let{icon:u,iconPosition:m=s.HorizontalPositions.Left,size:p=s.Sizes.SM,color:v,variant:C="primary",disabled:w,loading:k=!1,loadingText:x,children:$,tooltip:y,className:j}=e,N=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),E=k||w,O=void 0!==u||k,T=k&&x,z=!(!$&&!T),M=(0,d.tremorTwMerge)(g[p].height,g[p].width),R="light"!==C?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",B=f(C,v),S=("light"!==C?{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"}})[p],{tooltipProps:q,getReferenceProps:H}=(0,r.useTooltip)(300),[P,L]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:l,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[g,f]=(0,a.useState)(()=>o(d?2:i(c))),h=(0,a.useRef)(g),b=(0,a.useRef)(0),[p,v]="object"==typeof s?[s.enter,s.exit]:[s,s],C=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(h.current._s,u);e&&n(e,f,h,b,m)},[m,u]);return[g,(0,a.useCallback)(a=>{let o=e=>{switch(n(e,f,h,b,m),e){case 1:p>=0&&(b.current=((...e)=>setTimeout(...e))(C,p));break;case 4:v>=0&&(b.current=((...e)=>setTimeout(...e))(C,v));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||o(e+1)},0)}},s=h.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||o(e?+!r:2):s&&o(t?l?3:4:i(u))},[C,m,e,t,r,l,p,v,u]),C]})({timeout:50});return(0,a.useEffect)(()=>{L(k)},[k]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([l,q.refs.setReference]),className:(0,d.tremorTwMerge)(h("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",R,S.paddingX,S.paddingY,S.fontSize,B.textColor,B.bgColor,B.borderColor,B.hoverBorderColor,E?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(f(C,v).hoverTextColor,f(C,v).hoverBgColor,f(C,v).hoverBorderColor),j),disabled:E},H,N),a.default.createElement(r.default,Object.assign({text:y},q)),O&&m!==s.HorizontalPositions.Right?a.default.createElement(b,{loading:k,iconSize:M,iconPosition:m,Icon:u,transitionStatus:P.status,needMargin:z}):null,T||$?a.default.createElement("span",{className:(0,d.tremorTwMerge)(h("text"),"text-tremor-default whitespace-nowrap")},T?x:$):null,O&&m===s.HorizontalPositions.Right?a.default.createElement(b,{loading:k,iconSize:M,iconPosition:m,Icon:u,transitionStatus:P.status,needMargin:z}):null)});p.displayName="Button",e.s(["Button",()=>p],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",n)},r.default.createElement("table",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});o.displayName="Table",e.s(["Table",()=>o],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",n)},s),i))});o.displayName="TableHead",e.s(["TableHead",()=>o],427612)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("row"),n)},s),i))});o.displayName="TableRow",e.s(["TableRow",()=>o],496020)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:o,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",n)},s),i))});o.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>o],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",n)},s),i))});o.displayName="TableBody",e.s(["TableBody",()=>o],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",n)},s),i))});o.displayName="TableCell",e.s(["TableCell",()=>o],977572)},68155,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 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,r],68155)},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)},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)},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)},207670,e=>{"use strict";function t(){for(var e,t,r=0,a="",l=arguments.length;rt,"default",0,t])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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 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(["ArrowLeftOutlined",0,o],447566)},292639,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},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)},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)},738014,e=>{"use strict";var t=e.i(135214),r=e.i(764205),a=e.i(266027);let l=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:o}=(0,t.default)();return(0,a.useQuery)({queryKey:l.detail(o),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&o)})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4b8dcb3ad5dfb8de.js b/litellm/proxy/_experimental/out/_next/static/chunks/4e06277331e725da.js similarity index 78% rename from litellm/proxy/_experimental/out/_next/static/chunks/4b8dcb3ad5dfb8de.js rename to litellm/proxy/_experimental/out/_next/static/chunks/4e06277331e725da.js index 7ff9074d89..e5481a9a48 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/4b8dcb3ad5dfb8de.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/4e06277331e725da.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,608856,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(209428),n=e.i(392221),l=e.i(951160),s=e.i(174428),o=t.createContext(null),i=t.createContext({}),c=e.i(211577),d=e.i(931067),m=e.i(361275),p=e.i(404948),u=e.i(244009),x=e.i(703923),h=e.i(611935),g=["prefixCls","className","containerRef"];let f=function(e){var a=e.prefixCls,n=e.className,l=e.containerRef,s=(0,x.default)(e,g),o=t.useContext(i).panel,c=(0,h.useComposeRef)(o,l);return t.createElement("div",(0,d.default)({className:(0,r.default)("".concat(a,"-content"),n),role:"dialog",ref:c},(0,u.default)(e,{aria:!0}),{"aria-modal":"true"},s))};var v=e.i(883110);function b(e){return"string"==typeof e&&String(Number(e))===e?((0,v.default)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}e.i(654310);var y={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"},j=t.forwardRef(function(e,l){var s,i,x,h=e.prefixCls,g=e.open,v=e.placement,j=e.inline,N=e.push,w=e.forceRender,$=e.autoFocus,C=e.keyboard,k=e.classNames,S=e.rootClassName,_=e.rootStyle,T=e.zIndex,E=e.className,O=e.id,P=e.style,I=e.motion,B=e.width,z=e.height,D=e.children,M=e.mask,R=e.maskClosable,A=e.maskMotion,L=e.maskClassName,H=e.maskStyle,F=e.afterOpenChange,W=e.onClose,U=e.onMouseEnter,V=e.onMouseOver,J=e.onMouseLeave,K=e.onClick,q=e.onKeyDown,X=e.onKeyUp,G=e.styles,Y=e.drawerRender,Z=t.useRef(),Q=t.useRef(),ee=t.useRef();t.useImperativeHandle(l,function(){return Z.current}),t.useEffect(function(){if(g&&$){var e;null==(e=Z.current)||e.focus({preventScroll:!0})}},[g]);var et=t.useState(!1),er=(0,n.default)(et,2),ea=er[0],en=er[1],el=t.useContext(o),es=null!=(s=null!=(i=null==(x="boolean"==typeof N?N?{}:{distance:0}:N||{})?void 0:x.distance)?i:null==el?void 0:el.pushDistance)?s:180,eo=t.useMemo(function(){return{pushDistance:es,push:function(){en(!0)},pull:function(){en(!1)}}},[es]);t.useEffect(function(){var e,t;g?null==el||null==(e=el.push)||e.call(el):null==el||null==(t=el.pull)||t.call(el)},[g]),t.useEffect(function(){return function(){var e;null==el||null==(e=el.pull)||e.call(el)}},[]);var ei=t.createElement(m.default,(0,d.default)({key:"mask"},A,{visible:M&&g}),function(e,n){var l=e.className,s=e.style;return t.createElement("div",{className:(0,r.default)("".concat(h,"-mask"),l,null==k?void 0:k.mask,L),style:(0,a.default)((0,a.default)((0,a.default)({},s),H),null==G?void 0:G.mask),onClick:R&&g?W:void 0,ref:n})}),ec="function"==typeof I?I(v):I,ed={};if(ea&&es)switch(v){case"top":ed.transform="translateY(".concat(es,"px)");break;case"bottom":ed.transform="translateY(".concat(-es,"px)");break;case"left":ed.transform="translateX(".concat(es,"px)");break;default:ed.transform="translateX(".concat(-es,"px)")}"left"===v||"right"===v?ed.width=b(B):ed.height=b(z);var em={onMouseEnter:U,onMouseOver:V,onMouseLeave:J,onClick:K,onKeyDown:q,onKeyUp:X},ep=t.createElement(m.default,(0,d.default)({key:"panel"},ec,{visible:g,forceRender:w,onVisibleChanged:function(e){null==F||F(e)},removeOnLeave:!1,leavedClassName:"".concat(h,"-content-wrapper-hidden")}),function(n,l){var s=n.className,o=n.style,i=t.createElement(f,(0,d.default)({id:O,containerRef:l,prefixCls:h,className:(0,r.default)(E,null==k?void 0:k.content),style:(0,a.default)((0,a.default)({},P),null==G?void 0:G.content)},(0,u.default)(e,{aria:!0}),em),D);return t.createElement("div",(0,d.default)({className:(0,r.default)("".concat(h,"-content-wrapper"),null==k?void 0:k.wrapper,s),style:(0,a.default)((0,a.default)((0,a.default)({},ed),o),null==G?void 0:G.wrapper)},(0,u.default)(e,{data:!0})),Y?Y(i):i)}),eu=(0,a.default)({},_);return T&&(eu.zIndex=T),t.createElement(o.Provider,{value:eo},t.createElement("div",{className:(0,r.default)(h,"".concat(h,"-").concat(v),S,(0,c.default)((0,c.default)({},"".concat(h,"-open"),g),"".concat(h,"-inline"),j)),style:eu,tabIndex:-1,ref:Z,onKeyDown:function(e){var t,r,a=e.keyCode,n=e.shiftKey;switch(a){case p.default.TAB:a===p.default.TAB&&(n||document.activeElement!==ee.current?n&&document.activeElement===Q.current&&(null==(r=ee.current)||r.focus({preventScroll:!0})):null==(t=Q.current)||t.focus({preventScroll:!0}));break;case p.default.ESC:W&&C&&(e.stopPropagation(),W(e))}}},ei,t.createElement("div",{tabIndex:0,ref:Q,style:y,"aria-hidden":"true","data-sentinel":"start"}),ep,t.createElement("div",{tabIndex:0,ref:ee,style:y,"aria-hidden":"true","data-sentinel":"end"})))});let N=function(e){var r=e.open,o=e.prefixCls,c=e.placement,d=e.autoFocus,m=e.keyboard,p=e.width,u=e.mask,x=void 0===u||u,h=e.maskClosable,g=e.getContainer,f=e.forceRender,v=e.afterOpenChange,b=e.destroyOnClose,y=e.onMouseEnter,N=e.onMouseOver,w=e.onMouseLeave,$=e.onClick,C=e.onKeyDown,k=e.onKeyUp,S=e.panelRef,_=t.useState(!1),T=(0,n.default)(_,2),E=T[0],O=T[1],P=t.useState(!1),I=(0,n.default)(P,2),B=I[0],z=I[1];(0,s.default)(function(){z(!0)},[]);var D=!!B&&void 0!==r&&r,M=t.useRef(),R=t.useRef();(0,s.default)(function(){D&&(R.current=document.activeElement)},[D]);var A=t.useMemo(function(){return{panel:S}},[S]);if(!f&&!E&&!D&&b)return null;var L=(0,a.default)((0,a.default)({},e),{},{open:D,prefixCls:void 0===o?"rc-drawer":o,placement:void 0===c?"right":c,autoFocus:void 0===d||d,keyboard:void 0===m||m,width:void 0===p?378:p,mask:x,maskClosable:void 0===h||h,inline:!1===g,afterOpenChange:function(e){var t,r;O(e),null==v||v(e),e||!R.current||null!=(t=M.current)&&t.contains(R.current)||null==(r=R.current)||r.focus({preventScroll:!0})},ref:M},{onMouseEnter:y,onMouseOver:N,onMouseLeave:w,onClick:$,onKeyDown:C,onKeyUp:k});return t.createElement(i.Provider,{value:A},t.createElement(l.default,{open:D||f||E,autoDestroy:!1,getContainer:g,autoLock:x&&(D||E)},t.createElement(j,L)))};var w=e.i(981444),$=e.i(617206),C=e.i(122767),k=e.i(613541),S=e.i(340010),_=e.i(242064),T=e.i(922611),E=e.i(563113),O=e.i(185793);let P=e=>{var a,n,l,s;let o,{prefixCls:i,ariaId:c,title:d,footer:m,extra:p,closable:u,loading:x,onClose:h,headerStyle:g,bodyStyle:f,footerStyle:v,children:b,classNames:y,styles:j}=e,N=(0,_.useComponentConfig)("drawer");o=!1===u?void 0:void 0===u||!0===u?"start":(null==u?void 0:u.placement)==="end"?"end":"start";let w=t.useCallback(e=>t.createElement("button",{type:"button",onClick:h,className:(0,r.default)(`${i}-close`,{[`${i}-close-${o}`]:"end"===o})},e),[h,i,o]),[$,C]=(0,E.useClosable)((0,E.pickClosable)(e),(0,E.pickClosable)(N),{closable:!0,closeIconRender:w});return t.createElement(t.Fragment,null,d||$?t.createElement("div",{style:Object.assign(Object.assign(Object.assign({},null==(l=N.styles)?void 0:l.header),g),null==j?void 0:j.header),className:(0,r.default)(`${i}-header`,{[`${i}-header-close-only`]:$&&!d&&!p},null==(s=N.classNames)?void 0:s.header,null==y?void 0:y.header)},t.createElement("div",{className:`${i}-header-title`},"start"===o&&C,d&&t.createElement("div",{className:`${i}-title`,id:c},d)),p&&t.createElement("div",{className:`${i}-extra`},p),"end"===o&&C):null,t.createElement("div",{className:(0,r.default)(`${i}-body`,null==y?void 0:y.body,null==(a=N.classNames)?void 0:a.body),style:Object.assign(Object.assign(Object.assign({},null==(n=N.styles)?void 0:n.body),f),null==j?void 0:j.body)},x?t.createElement(O.default,{active:!0,title:!1,paragraph:{rows:5},className:`${i}-body-skeleton`}):b),(()=>{var e,a;if(!m)return null;let n=`${i}-footer`;return t.createElement("div",{className:(0,r.default)(n,null==(e=N.classNames)?void 0:e.footer,null==y?void 0:y.footer),style:Object.assign(Object.assign(Object.assign({},null==(a=N.styles)?void 0:a.footer),v),null==j?void 0:j.footer)},m)})())};e.i(296059);var I=e.i(915654),B=e.i(183293),z=e.i(246422),D=e.i(838378);let M=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),R=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},M({opacity:e},{opacity:1})),A=(0,z.genStyleHooks)("Drawer",e=>{let t=(0,D.mergeToken)(e,{});return[(e=>{let{borderRadiusSM:t,componentCls:r,zIndexPopup:a,colorBgMask:n,colorBgElevated:l,motionDurationSlow:s,motionDurationMid:o,paddingXS:i,padding:c,paddingLG:d,fontSizeLG:m,lineHeightLG:p,lineWidth:u,lineType:x,colorSplit:h,marginXS:g,colorIcon:f,colorIconHover:v,colorBgTextHover:b,colorBgTextActive:y,colorText:j,fontWeightStrong:N,footerPaddingBlock:w,footerPaddingInline:$,calc:C}=e,k=`${r}-content-wrapper`;return{[r]:{position:"fixed",inset:0,zIndex:a,pointerEvents:"none",color:j,"&-pure":{position:"relative",background:l,display:"flex",flexDirection:"column",[`&${r}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${r}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${r}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${r}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${r}-mask`]:{position:"absolute",inset:0,zIndex:a,background:n,pointerEvents:"auto"},[k]:{position:"absolute",zIndex:a,maxWidth:"100vw",transition:`all ${s}`,"&-hidden":{display:"none"}},[`&-left > ${k}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${k}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${k}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${k}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${r}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:l,pointerEvents:"auto"},[`${r}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${(0,I.unit)(c)} ${(0,I.unit)(d)}`,fontSize:m,lineHeight:p,borderBottom:`${(0,I.unit)(u)} ${x} ${h}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${r}-extra`]:{flex:"none"},[`${r}-close`]:Object.assign({display:"inline-flex",width:C(m).add(i).equal(),height:C(m).add(i).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:f,fontWeight:N,fontSize:m,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${o}`,textRendering:"auto",[`&${r}-close-end`]:{marginInlineStart:g},[`&:not(${r}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:b,textDecoration:"none"},"&:active":{backgroundColor:y}},(0,B.genFocusStyle)(e)),[`${r}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:m,lineHeight:p},[`${r}-body`]:{flex:1,minWidth:0,minHeight:0,padding:d,overflow:"auto",[`${r}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${r}-footer`]:{flexShrink:0,padding:`${(0,I.unit)(w)} ${(0,I.unit)($)}`,borderTop:`${(0,I.unit)(u)} ${x} ${h}`},"&-rtl":{direction:"rtl"}}}})(t),(e=>{let{componentCls:t,motionDurationSlow:r}=e;return{[t]:{[`${t}-mask-motion`]:R(0,r),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((e,t)=>{let a;return Object.assign(Object.assign({},e),{[`&-${t}`]:[R(.7,r),M({transform:(a="100%",({left:`translateX(-${a})`,right:`translateX(${a})`,top:`translateY(-${a})`,bottom:`translateY(${a})`})[t])},{transform:"none"})]})},{})}}})(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}));var L=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};let H={distance:180},F=e=>{let{rootClassName:a,width:n,height:l,size:s="default",mask:o=!0,push:i=H,open:c,afterOpenChange:d,onClose:m,prefixCls:p,getContainer:u,panelRef:x=null,style:g,className:f,"aria-labelledby":v,visible:b,afterVisibleChange:y,maskStyle:j,drawerStyle:E,contentWrapperStyle:O,destroyOnClose:I,destroyOnHidden:B}=e,z=L(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),D=(0,w.default)(),M=z.title?D:void 0,{getPopupContainer:R,getPrefixCls:F,direction:W,className:U,style:V,classNames:J,styles:K}=(0,_.useComponentConfig)("drawer"),q=F("drawer",p),[X,G,Y]=A(q),Z=void 0===u&&R?()=>R(document.body):u,Q=(0,r.default)({"no-mask":!o,[`${q}-rtl`]:"rtl"===W},a,G,Y),ee=t.useMemo(()=>null!=n?n:"large"===s?736:378,[n,s]),et=t.useMemo(()=>null!=l?l:"large"===s?736:378,[l,s]),er={motionName:(0,k.getTransitionName)(q,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},ea=(0,T.usePanelRef)(),en=(0,h.composeRef)(x,ea),[el,es]=(0,C.useZIndex)("Drawer",z.zIndex),{classNames:eo={},styles:ei={}}=z;return X(t.createElement($.default,{form:!0,space:!0},t.createElement(S.default.Provider,{value:es},t.createElement(N,Object.assign({prefixCls:q,onClose:m,maskMotion:er,motion:e=>({motionName:(0,k.getTransitionName)(q,`panel-motion-${e}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},z,{classNames:{mask:(0,r.default)(eo.mask,J.mask),content:(0,r.default)(eo.content,J.content),wrapper:(0,r.default)(eo.wrapper,J.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},ei.mask),j),K.mask),content:Object.assign(Object.assign(Object.assign({},ei.content),E),K.content),wrapper:Object.assign(Object.assign(Object.assign({},ei.wrapper),O),K.wrapper)},open:null!=c?c:b,mask:o,push:i,width:ee,height:et,style:Object.assign(Object.assign({},V),g),className:(0,r.default)(U,f),rootClassName:Q,getContainer:Z,afterOpenChange:null!=d?d:y,panelRef:en,zIndex:el,"aria-labelledby":null!=v?v:M,destroyOnClose:null!=B?B:I}),t.createElement(P,Object.assign({prefixCls:q},z,{ariaId:M,onClose:m}))))))};F._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:a,style:n,className:l,placement:s="right"}=e,o=L(e,["prefixCls","style","className","placement"]),{getPrefixCls:i}=t.useContext(_.ConfigContext),c=i("drawer",a),[d,m,p]=A(c),u=(0,r.default)(c,`${c}-pure`,`${c}-${s}`,m,p,l);return d(t.createElement("div",{className:u,style:n},t.createElement(P,Object.assign({prefixCls:c},o))))},e.s(["Drawer",0,F],608856)},573421,e=>{"use strict";e.i(247167);var t=e.i(8211),r=e.i(271645),a=e.i(343794),n=e.i(887719),l=e.i(908206),s=e.i(242064),o=e.i(721132),i=e.i(517455),c=e.i(264042),d=e.i(150073),m=e.i(165370),p=e.i(244451);let u=r.default.createContext({});u.Consumer;var x=e.i(763731),h=e.i(211576),g=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};let f=r.default.forwardRef((e,t)=>{let n,{prefixCls:l,children:o,actions:i,extra:c,styles:d,className:m,classNames:p,colStyle:f}=e,v=g(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:b,itemLayout:y}=(0,r.useContext)(u),{getPrefixCls:j,list:N}=(0,r.useContext)(s.ConfigContext),w=e=>{var t,r;return(0,a.default)(null==(r=null==(t=null==N?void 0:N.item)?void 0:t.classNames)?void 0:r[e],null==p?void 0:p[e])},$=e=>{var t,r;return Object.assign(Object.assign({},null==(r=null==(t=null==N?void 0:N.item)?void 0:t.styles)?void 0:r[e]),null==d?void 0:d[e])},C=j("list",l),k=i&&i.length>0&&r.default.createElement("ul",{className:(0,a.default)(`${C}-item-action`,w("actions")),key:"actions",style:$("actions")},i.map((e,t)=>r.default.createElement("li",{key:`${C}-item-action-${t}`},e,t!==i.length-1&&r.default.createElement("em",{className:`${C}-item-action-split`})))),S=r.default.createElement(b?"div":"li",Object.assign({},v,b?{}:{ref:t},{className:(0,a.default)(`${C}-item`,{[`${C}-item-no-flex`]:!("vertical"===y?!!c:(n=!1,r.Children.forEach(o,e=>{"string"==typeof e&&(n=!0)}),!(n&&r.Children.count(o)>1)))},m)}),"vertical"===y&&c?[r.default.createElement("div",{className:`${C}-item-main`,key:"content"},o,k),r.default.createElement("div",{className:(0,a.default)(`${C}-item-extra`,w("extra")),key:"extra",style:$("extra")},c)]:[o,k,(0,x.cloneElement)(c,{key:"extra"})]);return b?r.default.createElement(h.Col,{ref:t,flex:1,style:f},S):S});f.Meta=e=>{var{prefixCls:t,className:n,avatar:l,title:o,description:i}=e,c=g(e,["prefixCls","className","avatar","title","description"]);let{getPrefixCls:d}=(0,r.useContext)(s.ConfigContext),m=d("list",t),p=(0,a.default)(`${m}-item-meta`,n),u=r.default.createElement("div",{className:`${m}-item-meta-content`},o&&r.default.createElement("h4",{className:`${m}-item-meta-title`},o),i&&r.default.createElement("div",{className:`${m}-item-meta-description`},i));return r.default.createElement("div",Object.assign({},c,{className:p}),l&&r.default.createElement("div",{className:`${m}-item-meta-avatar`},l),(o||i)&&u)},e.i(296059);var v=e.i(915654),b=e.i(183293),y=e.i(246422),j=e.i(838378);let N=(0,y.genStyleHooks)("List",e=>{let t=(0,j.mergeToken)(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[(e=>{let{componentCls:t,antCls:r,controlHeight:a,minHeight:n,paddingSM:l,marginLG:s,padding:o,itemPadding:i,colorPrimary:c,itemPaddingSM:d,itemPaddingLG:m,paddingXS:p,margin:u,colorText:x,colorTextDescription:h,motionDurationSlow:g,lineWidth:f,headerBg:y,footerBg:j,emptyTextPadding:N,metaMarginBottom:w,avatarMarginRight:$,titleMarginBottom:C,descriptionFontSize:k}=e;return{[t]:Object.assign(Object.assign({},(0,b.resetComponent)(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:y},[`${t}-footer`]:{background:j},[`${t}-header, ${t}-footer`]:{paddingBlock:l},[`${t}-pagination`]:{marginBlockStart:s,[`${r}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:n,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:i,color:x,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:$},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:x},[`${t}-item-meta-title`]:{margin:`0 0 ${(0,v.unit)(e.marginXXS)} 0`,color:x,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:x,transition:`all ${g}`,"&:hover":{color:c}}},[`${t}-item-meta-description`]:{color:h,fontSize:k,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${(0,v.unit)(p)}`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:f,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${(0,v.unit)(o)} 0`,color:h,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:N,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${r}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:u,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:s},[`${t}-item-meta`]:{marginBlockEnd:w,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:C,color:x,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:o,marginInlineStart:"auto","> li":{padding:`0 ${(0,v.unit)(o)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:a},[`${t}-split${t}-something-after-last-item ${r}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:m},[`${t}-sm ${t}-item`]:{padding:d},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}})(t),(e=>{let{listBorderedCls:t,componentCls:r,paddingLG:a,margin:n,itemPaddingSM:l,itemPaddingLG:s,marginLG:o,borderRadiusLG:i}=e,c=(0,v.unit)(e.calc(i).sub(e.lineWidth).equal());return{[t]:{border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:i,[`${r}-header`]:{borderRadius:`${c} ${c} 0 0`},[`${r}-footer`]:{borderRadius:`0 0 ${c} ${c}`},[`${r}-header,${r}-footer,${r}-item`]:{paddingInline:a},[`${r}-pagination`]:{margin:`${(0,v.unit)(n)} ${(0,v.unit)(o)}`}},[`${t}${r}-sm`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:l}},[`${t}${r}-lg`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:s}}}})(t),(e=>{let{componentCls:t,screenSM:r,screenMD:a,marginLG:n,marginSM:l,margin:s}=e;return{[`@media screen and (max-width:${a}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:n}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:n}}}},[`@media screen and (max-width: ${r}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:l}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${(0,v.unit)(s)}`}}}}}})(t)]},e=>({contentWidth:220,itemPadding:`${(0,v.unit)(e.paddingContentVertical)} 0`,itemPaddingSM:`${(0,v.unit)(e.paddingContentVerticalSM)} ${(0,v.unit)(e.paddingContentHorizontal)}`,itemPaddingLG:`${(0,v.unit)(e.paddingContentVerticalLG)} ${(0,v.unit)(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}));var 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 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};let $=r.forwardRef(function(e,x){let{pagination:h=!1,prefixCls:g,bordered:f=!1,split:v=!0,className:b,rootClassName:y,style:j,children:$,itemLayout:C,loadMore:k,grid:S,dataSource:_=[],size:T,header:E,footer:O,loading:P=!1,rowKey:I,renderItem:B,locale:z}=e,D=w(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),M=h&&"object"==typeof h?h:{},[R,A]=r.useState(M.defaultCurrent||1),[L,H]=r.useState(M.defaultPageSize||10),{getPrefixCls:F,direction:W,className:U,style:V}=(0,s.useComponentConfig)("list"),{renderEmpty:J}=r.useContext(s.ConfigContext),K=e=>(t,r)=>{var a;A(t),H(r),h&&(null==(a=null==h?void 0:h[e])||a.call(h,t,r))},q=K("onChange"),X=K("onShowSizeChange"),G=!!(k||h||O),Y=F("list",g),[Z,Q,ee]=N(Y),et=P;"boolean"==typeof et&&(et={spinning:et});let er=!!(null==et?void 0:et.spinning),ea=(0,i.default)(T),en="";switch(ea){case"large":en="lg";break;case"small":en="sm"}let el=(0,a.default)(Y,{[`${Y}-vertical`]:"vertical"===C,[`${Y}-${en}`]:en,[`${Y}-split`]:v,[`${Y}-bordered`]:f,[`${Y}-loading`]:er,[`${Y}-grid`]:!!S,[`${Y}-something-after-last-item`]:G,[`${Y}-rtl`]:"rtl"===W},U,b,y,Q,ee),es=(0,n.default)({current:1,total:0,position:"bottom"},{total:_.length,current:R,pageSize:L},h||{}),eo=Math.ceil(es.total/es.pageSize);es.current=Math.min(es.current,eo);let ei=h&&r.createElement("div",{className:(0,a.default)(`${Y}-pagination`)},r.createElement(m.default,Object.assign({align:"end"},es,{onChange:q,onShowSizeChange:X}))),ec=(0,t.default)(_);h&&_.length>(es.current-1)*es.pageSize&&(ec=(0,t.default)(_).splice((es.current-1)*es.pageSize,es.pageSize));let ed=Object.keys(S||{}).some(e=>["xs","sm","md","lg","xl","xxl"].includes(e)),em=(0,d.default)(ed),ep=r.useMemo(()=>{for(let e=0;e{if(!S)return;let e=ep&&S[ep]?S[ep]:S.column;if(e)return{width:`${100/e}%`,maxWidth:`${100/e}%`}},[JSON.stringify(S),ep]),ex=er&&r.createElement("div",{style:{minHeight:53}});if(ec.length>0){let e=ec.map((e,t)=>{let a;return B?((a="function"==typeof I?I(e):I?e[I]:e.key)||(a=`list-item-${t}`),r.createElement(r.Fragment,{key:a},B(e,t))):null});ex=S?r.createElement(c.Row,{gutter:S.gutter},r.Children.map(e,e=>r.createElement("div",{key:null==e?void 0:e.key,style:eu},e))):r.createElement("ul",{className:`${Y}-items`},e)}else $||er||(ex=r.createElement("div",{className:`${Y}-empty-text`},(null==z?void 0:z.emptyText)||(null==J?void 0:J("List"))||r.createElement(o.default,{componentName:"List"})));let eh=es.position,eg=r.useMemo(()=>({grid:S,itemLayout:C}),[JSON.stringify(S),C]);return Z(r.createElement(u.Provider,{value:eg},r.createElement("div",Object.assign({ref:x,style:Object.assign(Object.assign({},V),j),className:el},D),("top"===eh||"both"===eh)&&ei,E&&r.createElement("div",{className:`${Y}-header`},E),r.createElement(p.default,Object.assign({},et),ex,$),O&&r.createElement("div",{className:`${Y}-footer`},O),k||("bottom"===eh||"both"===eh)&&ei)))});$.Item=f,e.s(["List",0,$],573421)},837007,e=>{"use strict";var t=e.i(603908);e.s(["PlusIcon",()=>t.default])},440987,e=>{"use strict";var t=e.i(903446);e.s(["SettingsIcon",()=>t.default])},191403,180127,516430,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(994388),n=e.i(212931),l=e.i(199133),s=e.i(764205),o=e.i(269200),i=e.i(942232),c=e.i(977572),d=e.i(427612),m=e.i(64848),p=e.i(496020),u=e.i(94629),x=e.i(360820),h=e.i(871943),g=e.i(68155),f=e.i(592968),v=e.i(166406),b=e.i(152990),y=e.i(682830),j=e.i(916925);let N=e=>{let t=new Set,r=/\{\{(\w+)\}\}/g;if(e.messages.forEach(e=>{let a;for(;null!==(a=r.exec(e.content));)t.add(a[1])}),e.developerMessage){let a;for(;null!==(a=r.exec(e.developerMessage));)t.add(a[1])}return Array.from(t)},w=e=>{let t=N(e),r=`--- +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,608856,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(209428),a=e.i(392221),l=e.i(951160),s=e.i(174428),o=t.createContext(null),i=t.createContext({}),c=e.i(211577),d=e.i(931067),m=e.i(361275),p=e.i(404948),u=e.i(244009),x=e.i(703923),h=e.i(611935),g=["prefixCls","className","containerRef"];let f=function(e){var n=e.prefixCls,a=e.className,l=e.containerRef,s=(0,x.default)(e,g),o=t.useContext(i).panel,c=(0,h.useComposeRef)(o,l);return t.createElement("div",(0,d.default)({className:(0,r.default)("".concat(n,"-content"),a),role:"dialog",ref:c},(0,u.default)(e,{aria:!0}),{"aria-modal":"true"},s))};var v=e.i(883110);function b(e){return"string"==typeof e&&String(Number(e))===e?((0,v.default)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}e.i(654310);var y={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"},j=t.forwardRef(function(e,l){var s,i,x,h=e.prefixCls,g=e.open,v=e.placement,j=e.inline,N=e.push,w=e.forceRender,$=e.autoFocus,C=e.keyboard,k=e.classNames,S=e.rootClassName,_=e.rootStyle,T=e.zIndex,E=e.className,O=e.id,P=e.style,I=e.motion,B=e.width,z=e.height,D=e.children,M=e.mask,R=e.maskClosable,A=e.maskMotion,L=e.maskClassName,H=e.maskStyle,F=e.afterOpenChange,W=e.onClose,U=e.onMouseEnter,V=e.onMouseOver,J=e.onMouseLeave,K=e.onClick,q=e.onKeyDown,X=e.onKeyUp,G=e.styles,Y=e.drawerRender,Z=t.useRef(),Q=t.useRef(),ee=t.useRef();t.useImperativeHandle(l,function(){return Z.current}),t.useEffect(function(){if(g&&$){var e;null==(e=Z.current)||e.focus({preventScroll:!0})}},[g]);var et=t.useState(!1),er=(0,a.default)(et,2),en=er[0],ea=er[1],el=t.useContext(o),es=null!=(s=null!=(i=null==(x="boolean"==typeof N?N?{}:{distance:0}:N||{})?void 0:x.distance)?i:null==el?void 0:el.pushDistance)?s:180,eo=t.useMemo(function(){return{pushDistance:es,push:function(){ea(!0)},pull:function(){ea(!1)}}},[es]);t.useEffect(function(){var e,t;g?null==el||null==(e=el.push)||e.call(el):null==el||null==(t=el.pull)||t.call(el)},[g]),t.useEffect(function(){return function(){var e;null==el||null==(e=el.pull)||e.call(el)}},[]);var ei=t.createElement(m.default,(0,d.default)({key:"mask"},A,{visible:M&&g}),function(e,a){var l=e.className,s=e.style;return t.createElement("div",{className:(0,r.default)("".concat(h,"-mask"),l,null==k?void 0:k.mask,L),style:(0,n.default)((0,n.default)((0,n.default)({},s),H),null==G?void 0:G.mask),onClick:R&&g?W:void 0,ref:a})}),ec="function"==typeof I?I(v):I,ed={};if(en&&es)switch(v){case"top":ed.transform="translateY(".concat(es,"px)");break;case"bottom":ed.transform="translateY(".concat(-es,"px)");break;case"left":ed.transform="translateX(".concat(es,"px)");break;default:ed.transform="translateX(".concat(-es,"px)")}"left"===v||"right"===v?ed.width=b(B):ed.height=b(z);var em={onMouseEnter:U,onMouseOver:V,onMouseLeave:J,onClick:K,onKeyDown:q,onKeyUp:X},ep=t.createElement(m.default,(0,d.default)({key:"panel"},ec,{visible:g,forceRender:w,onVisibleChanged:function(e){null==F||F(e)},removeOnLeave:!1,leavedClassName:"".concat(h,"-content-wrapper-hidden")}),function(a,l){var s=a.className,o=a.style,i=t.createElement(f,(0,d.default)({id:O,containerRef:l,prefixCls:h,className:(0,r.default)(E,null==k?void 0:k.content),style:(0,n.default)((0,n.default)({},P),null==G?void 0:G.content)},(0,u.default)(e,{aria:!0}),em),D);return t.createElement("div",(0,d.default)({className:(0,r.default)("".concat(h,"-content-wrapper"),null==k?void 0:k.wrapper,s),style:(0,n.default)((0,n.default)((0,n.default)({},ed),o),null==G?void 0:G.wrapper)},(0,u.default)(e,{data:!0})),Y?Y(i):i)}),eu=(0,n.default)({},_);return T&&(eu.zIndex=T),t.createElement(o.Provider,{value:eo},t.createElement("div",{className:(0,r.default)(h,"".concat(h,"-").concat(v),S,(0,c.default)((0,c.default)({},"".concat(h,"-open"),g),"".concat(h,"-inline"),j)),style:eu,tabIndex:-1,ref:Z,onKeyDown:function(e){var t,r,n=e.keyCode,a=e.shiftKey;switch(n){case p.default.TAB:n===p.default.TAB&&(a||document.activeElement!==ee.current?a&&document.activeElement===Q.current&&(null==(r=ee.current)||r.focus({preventScroll:!0})):null==(t=Q.current)||t.focus({preventScroll:!0}));break;case p.default.ESC:W&&C&&(e.stopPropagation(),W(e))}}},ei,t.createElement("div",{tabIndex:0,ref:Q,style:y,"aria-hidden":"true","data-sentinel":"start"}),ep,t.createElement("div",{tabIndex:0,ref:ee,style:y,"aria-hidden":"true","data-sentinel":"end"})))});let N=function(e){var r=e.open,o=e.prefixCls,c=e.placement,d=e.autoFocus,m=e.keyboard,p=e.width,u=e.mask,x=void 0===u||u,h=e.maskClosable,g=e.getContainer,f=e.forceRender,v=e.afterOpenChange,b=e.destroyOnClose,y=e.onMouseEnter,N=e.onMouseOver,w=e.onMouseLeave,$=e.onClick,C=e.onKeyDown,k=e.onKeyUp,S=e.panelRef,_=t.useState(!1),T=(0,a.default)(_,2),E=T[0],O=T[1],P=t.useState(!1),I=(0,a.default)(P,2),B=I[0],z=I[1];(0,s.default)(function(){z(!0)},[]);var D=!!B&&void 0!==r&&r,M=t.useRef(),R=t.useRef();(0,s.default)(function(){D&&(R.current=document.activeElement)},[D]);var A=t.useMemo(function(){return{panel:S}},[S]);if(!f&&!E&&!D&&b)return null;var L=(0,n.default)((0,n.default)({},e),{},{open:D,prefixCls:void 0===o?"rc-drawer":o,placement:void 0===c?"right":c,autoFocus:void 0===d||d,keyboard:void 0===m||m,width:void 0===p?378:p,mask:x,maskClosable:void 0===h||h,inline:!1===g,afterOpenChange:function(e){var t,r;O(e),null==v||v(e),e||!R.current||null!=(t=M.current)&&t.contains(R.current)||null==(r=R.current)||r.focus({preventScroll:!0})},ref:M},{onMouseEnter:y,onMouseOver:N,onMouseLeave:w,onClick:$,onKeyDown:C,onKeyUp:k});return t.createElement(i.Provider,{value:A},t.createElement(l.default,{open:D||f||E,autoDestroy:!1,getContainer:g,autoLock:x&&(D||E)},t.createElement(j,L)))};var w=e.i(981444),$=e.i(617206),C=e.i(122767),k=e.i(613541),S=e.i(340010),_=e.i(242064),T=e.i(922611),E=e.i(563113),O=e.i(185793);let P=e=>{var n,a,l,s;let o,{prefixCls:i,ariaId:c,title:d,footer:m,extra:p,closable:u,loading:x,onClose:h,headerStyle:g,bodyStyle:f,footerStyle:v,children:b,classNames:y,styles:j}=e,N=(0,_.useComponentConfig)("drawer");o=!1===u?void 0:void 0===u||!0===u?"start":(null==u?void 0:u.placement)==="end"?"end":"start";let w=t.useCallback(e=>t.createElement("button",{type:"button",onClick:h,className:(0,r.default)(`${i}-close`,{[`${i}-close-${o}`]:"end"===o})},e),[h,i,o]),[$,C]=(0,E.useClosable)((0,E.pickClosable)(e),(0,E.pickClosable)(N),{closable:!0,closeIconRender:w});return t.createElement(t.Fragment,null,d||$?t.createElement("div",{style:Object.assign(Object.assign(Object.assign({},null==(l=N.styles)?void 0:l.header),g),null==j?void 0:j.header),className:(0,r.default)(`${i}-header`,{[`${i}-header-close-only`]:$&&!d&&!p},null==(s=N.classNames)?void 0:s.header,null==y?void 0:y.header)},t.createElement("div",{className:`${i}-header-title`},"start"===o&&C,d&&t.createElement("div",{className:`${i}-title`,id:c},d)),p&&t.createElement("div",{className:`${i}-extra`},p),"end"===o&&C):null,t.createElement("div",{className:(0,r.default)(`${i}-body`,null==y?void 0:y.body,null==(n=N.classNames)?void 0:n.body),style:Object.assign(Object.assign(Object.assign({},null==(a=N.styles)?void 0:a.body),f),null==j?void 0:j.body)},x?t.createElement(O.default,{active:!0,title:!1,paragraph:{rows:5},className:`${i}-body-skeleton`}):b),(()=>{var e,n;if(!m)return null;let a=`${i}-footer`;return t.createElement("div",{className:(0,r.default)(a,null==(e=N.classNames)?void 0:e.footer,null==y?void 0:y.footer),style:Object.assign(Object.assign(Object.assign({},null==(n=N.styles)?void 0:n.footer),v),null==j?void 0:j.footer)},m)})())};e.i(296059);var I=e.i(915654),B=e.i(183293),z=e.i(246422),D=e.i(838378);let M=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),R=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},M({opacity:e},{opacity:1})),A=(0,z.genStyleHooks)("Drawer",e=>{let t=(0,D.mergeToken)(e,{});return[(e=>{let{borderRadiusSM:t,componentCls:r,zIndexPopup:n,colorBgMask:a,colorBgElevated:l,motionDurationSlow:s,motionDurationMid:o,paddingXS:i,padding:c,paddingLG:d,fontSizeLG:m,lineHeightLG:p,lineWidth:u,lineType:x,colorSplit:h,marginXS:g,colorIcon:f,colorIconHover:v,colorBgTextHover:b,colorBgTextActive:y,colorText:j,fontWeightStrong:N,footerPaddingBlock:w,footerPaddingInline:$,calc:C}=e,k=`${r}-content-wrapper`;return{[r]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none",color:j,"&-pure":{position:"relative",background:l,display:"flex",flexDirection:"column",[`&${r}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${r}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${r}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${r}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${r}-mask`]:{position:"absolute",inset:0,zIndex:n,background:a,pointerEvents:"auto"},[k]:{position:"absolute",zIndex:n,maxWidth:"100vw",transition:`all ${s}`,"&-hidden":{display:"none"}},[`&-left > ${k}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${k}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${k}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${k}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${r}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:l,pointerEvents:"auto"},[`${r}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${(0,I.unit)(c)} ${(0,I.unit)(d)}`,fontSize:m,lineHeight:p,borderBottom:`${(0,I.unit)(u)} ${x} ${h}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${r}-extra`]:{flex:"none"},[`${r}-close`]:Object.assign({display:"inline-flex",width:C(m).add(i).equal(),height:C(m).add(i).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:f,fontWeight:N,fontSize:m,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${o}`,textRendering:"auto",[`&${r}-close-end`]:{marginInlineStart:g},[`&:not(${r}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:b,textDecoration:"none"},"&:active":{backgroundColor:y}},(0,B.genFocusStyle)(e)),[`${r}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:m,lineHeight:p},[`${r}-body`]:{flex:1,minWidth:0,minHeight:0,padding:d,overflow:"auto",[`${r}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${r}-footer`]:{flexShrink:0,padding:`${(0,I.unit)(w)} ${(0,I.unit)($)}`,borderTop:`${(0,I.unit)(u)} ${x} ${h}`},"&-rtl":{direction:"rtl"}}}})(t),(e=>{let{componentCls:t,motionDurationSlow:r}=e;return{[t]:{[`${t}-mask-motion`]:R(0,r),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((e,t)=>{let n;return Object.assign(Object.assign({},e),{[`&-${t}`]:[R(.7,r),M({transform:(n="100%",({left:`translateX(-${n})`,right:`translateX(${n})`,top:`translateY(-${n})`,bottom:`translateY(${n})`})[t])},{transform:"none"})]})},{})}}})(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}));var L=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let H={distance:180},F=e=>{let{rootClassName:n,width:a,height:l,size:s="default",mask:o=!0,push:i=H,open:c,afterOpenChange:d,onClose:m,prefixCls:p,getContainer:u,panelRef:x=null,style:g,className:f,"aria-labelledby":v,visible:b,afterVisibleChange:y,maskStyle:j,drawerStyle:E,contentWrapperStyle:O,destroyOnClose:I,destroyOnHidden:B}=e,z=L(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),D=(0,w.default)(),M=z.title?D:void 0,{getPopupContainer:R,getPrefixCls:F,direction:W,className:U,style:V,classNames:J,styles:K}=(0,_.useComponentConfig)("drawer"),q=F("drawer",p),[X,G,Y]=A(q),Z=void 0===u&&R?()=>R(document.body):u,Q=(0,r.default)({"no-mask":!o,[`${q}-rtl`]:"rtl"===W},n,G,Y),ee=t.useMemo(()=>null!=a?a:"large"===s?736:378,[a,s]),et=t.useMemo(()=>null!=l?l:"large"===s?736:378,[l,s]),er={motionName:(0,k.getTransitionName)(q,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},en=(0,T.usePanelRef)(),ea=(0,h.composeRef)(x,en),[el,es]=(0,C.useZIndex)("Drawer",z.zIndex),{classNames:eo={},styles:ei={}}=z;return X(t.createElement($.default,{form:!0,space:!0},t.createElement(S.default.Provider,{value:es},t.createElement(N,Object.assign({prefixCls:q,onClose:m,maskMotion:er,motion:e=>({motionName:(0,k.getTransitionName)(q,`panel-motion-${e}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},z,{classNames:{mask:(0,r.default)(eo.mask,J.mask),content:(0,r.default)(eo.content,J.content),wrapper:(0,r.default)(eo.wrapper,J.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},ei.mask),j),K.mask),content:Object.assign(Object.assign(Object.assign({},ei.content),E),K.content),wrapper:Object.assign(Object.assign(Object.assign({},ei.wrapper),O),K.wrapper)},open:null!=c?c:b,mask:o,push:i,width:ee,height:et,style:Object.assign(Object.assign({},V),g),className:(0,r.default)(U,f),rootClassName:Q,getContainer:Z,afterOpenChange:null!=d?d:y,panelRef:ea,zIndex:el,"aria-labelledby":null!=v?v:M,destroyOnClose:null!=B?B:I}),t.createElement(P,Object.assign({prefixCls:q},z,{ariaId:M,onClose:m}))))))};F._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:n,style:a,className:l,placement:s="right"}=e,o=L(e,["prefixCls","style","className","placement"]),{getPrefixCls:i}=t.useContext(_.ConfigContext),c=i("drawer",n),[d,m,p]=A(c),u=(0,r.default)(c,`${c}-pure`,`${c}-${s}`,m,p,l);return d(t.createElement("div",{className:u,style:a},t.createElement(P,Object.assign({prefixCls:c},o))))},e.s(["Drawer",0,F],608856)},573421,e=>{"use strict";e.i(247167);var t=e.i(8211),r=e.i(271645),n=e.i(343794),a=e.i(887719),l=e.i(908206),s=e.i(242064),o=e.i(721132),i=e.i(517455),c=e.i(264042),d=e.i(150073),m=e.i(165370),p=e.i(244451);let u=r.default.createContext({});u.Consumer;var x=e.i(763731),h=e.i(211576),g=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let f=r.default.forwardRef((e,t)=>{let a,{prefixCls:l,children:o,actions:i,extra:c,styles:d,className:m,classNames:p,colStyle:f}=e,v=g(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:b,itemLayout:y}=(0,r.useContext)(u),{getPrefixCls:j,list:N}=(0,r.useContext)(s.ConfigContext),w=e=>{var t,r;return(0,n.default)(null==(r=null==(t=null==N?void 0:N.item)?void 0:t.classNames)?void 0:r[e],null==p?void 0:p[e])},$=e=>{var t,r;return Object.assign(Object.assign({},null==(r=null==(t=null==N?void 0:N.item)?void 0:t.styles)?void 0:r[e]),null==d?void 0:d[e])},C=j("list",l),k=i&&i.length>0&&r.default.createElement("ul",{className:(0,n.default)(`${C}-item-action`,w("actions")),key:"actions",style:$("actions")},i.map((e,t)=>r.default.createElement("li",{key:`${C}-item-action-${t}`},e,t!==i.length-1&&r.default.createElement("em",{className:`${C}-item-action-split`})))),S=r.default.createElement(b?"div":"li",Object.assign({},v,b?{}:{ref:t},{className:(0,n.default)(`${C}-item`,{[`${C}-item-no-flex`]:!("vertical"===y?!!c:(a=!1,r.Children.forEach(o,e=>{"string"==typeof e&&(a=!0)}),!(a&&r.Children.count(o)>1)))},m)}),"vertical"===y&&c?[r.default.createElement("div",{className:`${C}-item-main`,key:"content"},o,k),r.default.createElement("div",{className:(0,n.default)(`${C}-item-extra`,w("extra")),key:"extra",style:$("extra")},c)]:[o,k,(0,x.cloneElement)(c,{key:"extra"})]);return b?r.default.createElement(h.Col,{ref:t,flex:1,style:f},S):S});f.Meta=e=>{var{prefixCls:t,className:a,avatar:l,title:o,description:i}=e,c=g(e,["prefixCls","className","avatar","title","description"]);let{getPrefixCls:d}=(0,r.useContext)(s.ConfigContext),m=d("list",t),p=(0,n.default)(`${m}-item-meta`,a),u=r.default.createElement("div",{className:`${m}-item-meta-content`},o&&r.default.createElement("h4",{className:`${m}-item-meta-title`},o),i&&r.default.createElement("div",{className:`${m}-item-meta-description`},i));return r.default.createElement("div",Object.assign({},c,{className:p}),l&&r.default.createElement("div",{className:`${m}-item-meta-avatar`},l),(o||i)&&u)},e.i(296059);var v=e.i(915654),b=e.i(183293),y=e.i(246422),j=e.i(838378);let N=(0,y.genStyleHooks)("List",e=>{let t=(0,j.mergeToken)(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[(e=>{let{componentCls:t,antCls:r,controlHeight:n,minHeight:a,paddingSM:l,marginLG:s,padding:o,itemPadding:i,colorPrimary:c,itemPaddingSM:d,itemPaddingLG:m,paddingXS:p,margin:u,colorText:x,colorTextDescription:h,motionDurationSlow:g,lineWidth:f,headerBg:y,footerBg:j,emptyTextPadding:N,metaMarginBottom:w,avatarMarginRight:$,titleMarginBottom:C,descriptionFontSize:k}=e;return{[t]:Object.assign(Object.assign({},(0,b.resetComponent)(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:y},[`${t}-footer`]:{background:j},[`${t}-header, ${t}-footer`]:{paddingBlock:l},[`${t}-pagination`]:{marginBlockStart:s,[`${r}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:a,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:i,color:x,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:$},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:x},[`${t}-item-meta-title`]:{margin:`0 0 ${(0,v.unit)(e.marginXXS)} 0`,color:x,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:x,transition:`all ${g}`,"&:hover":{color:c}}},[`${t}-item-meta-description`]:{color:h,fontSize:k,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${(0,v.unit)(p)}`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:f,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${(0,v.unit)(o)} 0`,color:h,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:N,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${r}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:u,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:s},[`${t}-item-meta`]:{marginBlockEnd:w,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:C,color:x,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:o,marginInlineStart:"auto","> li":{padding:`0 ${(0,v.unit)(o)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:n},[`${t}-split${t}-something-after-last-item ${r}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:m},[`${t}-sm ${t}-item`]:{padding:d},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}})(t),(e=>{let{listBorderedCls:t,componentCls:r,paddingLG:n,margin:a,itemPaddingSM:l,itemPaddingLG:s,marginLG:o,borderRadiusLG:i}=e,c=(0,v.unit)(e.calc(i).sub(e.lineWidth).equal());return{[t]:{border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:i,[`${r}-header`]:{borderRadius:`${c} ${c} 0 0`},[`${r}-footer`]:{borderRadius:`0 0 ${c} ${c}`},[`${r}-header,${r}-footer,${r}-item`]:{paddingInline:n},[`${r}-pagination`]:{margin:`${(0,v.unit)(a)} ${(0,v.unit)(o)}`}},[`${t}${r}-sm`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:l}},[`${t}${r}-lg`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:s}}}})(t),(e=>{let{componentCls:t,screenSM:r,screenMD:n,marginLG:a,marginSM:l,margin:s}=e;return{[`@media screen and (max-width:${n}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:a}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:a}}}},[`@media screen and (max-width: ${r}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:l}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${(0,v.unit)(s)}`}}}}}})(t)]},e=>({contentWidth:220,itemPadding:`${(0,v.unit)(e.paddingContentVertical)} 0`,itemPaddingSM:`${(0,v.unit)(e.paddingContentVerticalSM)} ${(0,v.unit)(e.paddingContentHorizontal)}`,itemPaddingLG:`${(0,v.unit)(e.paddingContentVerticalLG)} ${(0,v.unit)(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}));var w=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let $=r.forwardRef(function(e,x){let{pagination:h=!1,prefixCls:g,bordered:f=!1,split:v=!0,className:b,rootClassName:y,style:j,children:$,itemLayout:C,loadMore:k,grid:S,dataSource:_=[],size:T,header:E,footer:O,loading:P=!1,rowKey:I,renderItem:B,locale:z}=e,D=w(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),M=h&&"object"==typeof h?h:{},[R,A]=r.useState(M.defaultCurrent||1),[L,H]=r.useState(M.defaultPageSize||10),{getPrefixCls:F,direction:W,className:U,style:V}=(0,s.useComponentConfig)("list"),{renderEmpty:J}=r.useContext(s.ConfigContext),K=e=>(t,r)=>{var n;A(t),H(r),h&&(null==(n=null==h?void 0:h[e])||n.call(h,t,r))},q=K("onChange"),X=K("onShowSizeChange"),G=!!(k||h||O),Y=F("list",g),[Z,Q,ee]=N(Y),et=P;"boolean"==typeof et&&(et={spinning:et});let er=!!(null==et?void 0:et.spinning),en=(0,i.default)(T),ea="";switch(en){case"large":ea="lg";break;case"small":ea="sm"}let el=(0,n.default)(Y,{[`${Y}-vertical`]:"vertical"===C,[`${Y}-${ea}`]:ea,[`${Y}-split`]:v,[`${Y}-bordered`]:f,[`${Y}-loading`]:er,[`${Y}-grid`]:!!S,[`${Y}-something-after-last-item`]:G,[`${Y}-rtl`]:"rtl"===W},U,b,y,Q,ee),es=(0,a.default)({current:1,total:0,position:"bottom"},{total:_.length,current:R,pageSize:L},h||{}),eo=Math.ceil(es.total/es.pageSize);es.current=Math.min(es.current,eo);let ei=h&&r.createElement("div",{className:(0,n.default)(`${Y}-pagination`)},r.createElement(m.default,Object.assign({align:"end"},es,{onChange:q,onShowSizeChange:X}))),ec=(0,t.default)(_);h&&_.length>(es.current-1)*es.pageSize&&(ec=(0,t.default)(_).splice((es.current-1)*es.pageSize,es.pageSize));let ed=Object.keys(S||{}).some(e=>["xs","sm","md","lg","xl","xxl"].includes(e)),em=(0,d.default)(ed),ep=r.useMemo(()=>{for(let e=0;e{if(!S)return;let e=ep&&S[ep]?S[ep]:S.column;if(e)return{width:`${100/e}%`,maxWidth:`${100/e}%`}},[JSON.stringify(S),ep]),ex=er&&r.createElement("div",{style:{minHeight:53}});if(ec.length>0){let e=ec.map((e,t)=>{let n;return B?((n="function"==typeof I?I(e):I?e[I]:e.key)||(n=`list-item-${t}`),r.createElement(r.Fragment,{key:n},B(e,t))):null});ex=S?r.createElement(c.Row,{gutter:S.gutter},r.Children.map(e,e=>r.createElement("div",{key:null==e?void 0:e.key,style:eu},e))):r.createElement("ul",{className:`${Y}-items`},e)}else $||er||(ex=r.createElement("div",{className:`${Y}-empty-text`},(null==z?void 0:z.emptyText)||(null==J?void 0:J("List"))||r.createElement(o.default,{componentName:"List"})));let eh=es.position,eg=r.useMemo(()=>({grid:S,itemLayout:C}),[JSON.stringify(S),C]);return Z(r.createElement(u.Provider,{value:eg},r.createElement("div",Object.assign({ref:x,style:Object.assign(Object.assign({},V),j),className:el},D),("top"===eh||"both"===eh)&&ei,E&&r.createElement("div",{className:`${Y}-header`},E),r.createElement(p.default,Object.assign({},et),ex,$),O&&r.createElement("div",{className:`${Y}-footer`},O),k||("bottom"===eh||"both"===eh)&&ei)))});$.Item=f,e.s(["List",0,$],573421)},837007,e=>{"use strict";var t=e.i(603908);e.s(["PlusIcon",()=>t.default])},440987,e=>{"use strict";var t=e.i(903446);e.s(["SettingsIcon",()=>t.default])},191403,180127,516430,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(994388),a=e.i(212931),l=e.i(199133),s=e.i(764205),o=e.i(269200),i=e.i(942232),c=e.i(977572),d=e.i(427612),m=e.i(64848),p=e.i(496020),u=e.i(94629),x=e.i(360820),h=e.i(871943),g=e.i(68155),f=e.i(592968),v=e.i(166406),b=e.i(152990),y=e.i(682830),j=e.i(916925);let N=e=>{let t=new Set,r=/\{\{(\w+)\}\}/g;if(e.messages.forEach(e=>{let n;for(;null!==(n=r.exec(e.content));)t.add(n[1])}),e.developerMessage){let n;for(;null!==(n=r.exec(e.developerMessage));)t.add(n[1])}return Array.from(t)},w=e=>{let t=N(e),r=`--- model: ${e.model} `;return void 0!==e.config.temperature&&(r+=`temperature: ${e.config.temperature} `),void 0!==e.config.max_tokens&&(r+=`max_tokens: ${e.config.max_tokens} @@ -16,9 +16,9 @@ model: ${e.model} `),e.messages.forEach(e=>{let t=e.role.charAt(0).toUpperCase()+e.role.slice(1);r+=`${t}: ${e.content} -`}),r.trim()},$=e=>{let t=Number(e);return Number.isFinite(t)?t:void 0},C=e=>{let t=e?.prompt_spec?.litellm_params?.dotprompt_content||"";if(!t)throw Error("No dotprompt_content found in API response");let r=t.split("---");if(r.length<3)throw Error("Invalid dotprompt format");let a=r[1],n=r.slice(2).join("---").trim(),l=(e=>{let t={config:{},tools:[]},r=e.split("\n");for(let e of(t.tools=(e=>{let t=[],r=!1;for(let a of e){let e=a.trim();if(!r){("tools:"===e||e.startsWith("tools:"))&&(r=!0);continue}if(a.length>0&&!/^\s/.test(a)&&"-"!==e&&!e.startsWith("-"))break;let n=e.match(/^-+\s*(.+)$/);if(!n)continue;let l=n[1].trim();if(l)try{let e=JSON.parse(l);t.push({name:e?.function?.name||"Unnamed Tool",description:e?.function?.description||"",json:JSON.stringify(e,null,2)})}catch{}}return t})(r),r)){let r=e.trim();if(!r||r.startsWith("input:")||r.startsWith("output:")||r.startsWith("schema:")||r.startsWith("format:")||r.startsWith("tools:")||r.startsWith("-"))continue;let a=r.indexOf(":");if(a<=0)continue;let n=r.substring(0,a).trim(),l=r.substring(a+1).trim();if("model"===n){t.model=l;continue}"temperature"===n&&(t.config.temperature=$(l)),"max_tokens"===n&&(t.config.max_tokens=$(l)),"top_p"===n&&(t.config.top_p=$(l))}return t})(a),s=(e=>{let t=/^(System|Developer|User|Assistant):(?:\s(.*)|\s*)$/,r=[],a="",n=null,l=[],s=()=>{if(!n)return;let e=l.join("\n").trim();"developer"===n?e&&(a=a?`${a} +`}),r.trim()},$=e=>{let t=Number(e);return Number.isFinite(t)?t:void 0},C=e=>{let t=e?.prompt_spec?.litellm_params?.dotprompt_content||"";if(!t)throw Error("No dotprompt_content found in API response");let r=t.split("---");if(r.length<3)throw Error("Invalid dotprompt format");let n=r[1],a=r.slice(2).join("---").trim(),l=(e=>{let t={config:{},tools:[]},r=e.split("\n");for(let e of(t.tools=(e=>{let t=[],r=!1;for(let n of e){let e=n.trim();if(!r){("tools:"===e||e.startsWith("tools:"))&&(r=!0);continue}if(n.length>0&&!/^\s/.test(n)&&"-"!==e&&!e.startsWith("-"))break;let a=e.match(/^-+\s*(.+)$/);if(!a)continue;let l=a[1].trim();if(l)try{let e=JSON.parse(l);t.push({name:e?.function?.name||"Unnamed Tool",description:e?.function?.description||"",json:JSON.stringify(e,null,2)})}catch{}}return t})(r),r)){let r=e.trim();if(!r||r.startsWith("input:")||r.startsWith("output:")||r.startsWith("schema:")||r.startsWith("format:")||r.startsWith("tools:")||r.startsWith("-"))continue;let n=r.indexOf(":");if(n<=0)continue;let a=r.substring(0,n).trim(),l=r.substring(n+1).trim();if("model"===a){t.model=l;continue}"temperature"===a&&(t.config.temperature=$(l)),"max_tokens"===a&&(t.config.max_tokens=$(l)),"top_p"===a&&(t.config.top_p=$(l))}return t})(n),s=(e=>{let t=/^(System|Developer|User|Assistant):(?:\s(.*)|\s*)$/,r=[],n="",a=null,l=[],s=()=>{if(!a)return;let e=l.join("\n").trim();"developer"===a?e&&(n=n?`${n} -${e}`:e):e?r.push({role:n,content:e}):r.push({role:n,content:""})};for(let r of e.split("\n")){let e=r.match(t);if(e){s(),n=e[1].toLowerCase(),l=[e[2]??""];continue}n&&l.push(r)}return s(),{developerMessage:a,messages:r}})(n),o=e?.prompt_spec?.prompt_id||"Unnamed Prompt";return{name:k(o)||o,model:l.model||"gpt-4o",config:l.config,tools:l.tools,developerMessage:s.developerMessage,messages:s.messages.length>0?s.messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}],environment:e?.prompt_spec?.environment||e?.prompt_spec?.prompt_info?.environment||"development"}},k=e=>e?e.replace(/[._-]v\d+$/,""):"",S=e=>e?.prompt_id||"",_=e=>{try{let t=e.litellm_params;if(t?.dotprompt_content){let e=t.dotprompt_content.match(/model:\s*([^\n]+)/);if(e)return e[1].trim()}if(t?.prompt_data?.model)return t.prompt_data.model;if(t?.model)return t.model;return null}catch(e){return console.error("Error extracting model:",e),null}},T=({promptsList:e,isLoading:n,onPromptClick:l,onDeleteClick:N,accessToken:w,isAdmin:$})=>{let[C,k]=(0,r.useState)([{id:"created_at",desc:!0}]),[S,T]=(0,r.useState)(new Map);(0,r.useEffect)(()=>{(async()=>{if(w)try{let e=await (0,s.modelHubCall)(w);if(e?.data){let t=new Map;e.data.forEach(e=>{t.set(e.model_group,e)}),T(t)}}catch(e){console.error("Error fetching model hub data:",e)}})()},[w]);let E=e=>e?new Date(e).toLocaleString():"-",O=[{header:"Prompt ID",accessorKey:"prompt_id",cell:e=>{let r=String(e.getValue()||""),n=r.length>25?`${r.slice(0,25)}...`:r;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f.Tooltip,{title:r,children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[220px] justify-start",onClick:()=>e.getValue()&&l?.(e.getValue()),children:n})}),(0,t.jsx)(f.Tooltip,{title:"Copy prompt ID",children:(0,t.jsx)(v.CopyOutlined,{onClick:e=>{e.stopPropagation(),navigator.clipboard.writeText(r)},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Model",accessorKey:"model",cell:({row:e})=>{let r=_(e.original);if(!r)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"-"});let a=((e,t)=>{if(!e)return null;let r=t.get(e);return r&&r.providers&&r.providers.length>0?r.providers[0]:null})(r,S),{logo:n}=(0,j.getProviderLogoAndName)(a||"");return(0,t.jsx)(f.Tooltip,{title:r,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:a&&n?(0,t.jsx)("img",{src:n,alt:`${a} logo`,className:"w-4 h-4",onError:e=>{let t=e.currentTarget,r=t.parentElement;if(r&&r.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=a?.charAt(0)||"-",r.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}):(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:r})]})})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{let r=e.original;return(0,t.jsx)(f.Tooltip,{title:r.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:E(r.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:({row:e})=>{let r=e.original;return(0,t.jsx)(f.Tooltip,{title:r.updated_at,children:(0,t.jsx)("span",{className:"text-xs",children:E(r.updated_at)})})}},{header:"Environment",accessorKey:"environment",cell:({row:e})=>{let r=e.original.environment||"development";return(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${{production:"text-red-600 bg-red-50",staging:"text-yellow-600 bg-yellow-50",development:"text-green-600 bg-green-50"}[r]||"text-gray-600 bg-gray-50"}`,children:r})}},{header:"Created By",accessorKey:"created_by",cell:({row:e})=>{let r=e.original;return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:r.created_by||"-"})}},{header:"Type",accessorKey:"prompt_info.prompt_type",cell:({row:e})=>{let r=e.original;return(0,t.jsx)(f.Tooltip,{title:r.prompt_info.prompt_type,children:(0,t.jsx)("span",{className:"text-xs",children:r.prompt_info.prompt_type})})}},...$?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let r=e.original,n=r.prompt_id||"Unknown Prompt";return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(f.Tooltip,{title:"Delete prompt",children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),N?.(r.prompt_id,n)},icon:g.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],P=(0,b.useReactTable)({data:e,columns:O,state:{sorting:C},onSortingChange:k,getCoreRowModel:(0,y.getCoreRowModel)(),getSortedRowModel:(0,y.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(o.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(d.TableHead,{children:P.getHeaderGroups().map(e=>(0,t.jsx)(p.TableRow,{children:e.headers.map(e=>(0,t.jsx)(m.TableHeaderCell,{className:"py-1 h-8",onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,b.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(x.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(h.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(u.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(i.TableBody,{children:n?(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:O.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e.length>0?P.getRowModel().rows.map(e=>(0,t.jsx)(p.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,b.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:O.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No prompts found"})})})})})]})})})};var E=e.i(304967),O=e.i(629569),P=e.i(599724),I=e.i(350967),B=e.i(389083),z=e.i(197647),D=e.i(653824),M=e.i(881073),R=e.i(404206),A=e.i(723731),L=e.i(464571),H=e.i(530212),F=e.i(797672),W=e.i(500330),U=e.i(678784),V=e.i(118366),J=e.i(727749),K=e.i(653496),q=e.i(245094),X=e.i(650056),G=e.i(219470);let Y=({promptId:e,model:s,promptVariables:o={},accessToken:i,version:c="1",proxySettings:d})=>{let[m,p]=(0,r.useState)(!1),[u,x]=(0,r.useState)("curl"),[h,g]=(0,r.useState)("basic"),[f,v]=(0,r.useState)(""),b=window.location.origin,y=d?.LITELLM_UI_API_DOC_BASE_URL;y&&y.trim()?b=y:d?.PROXY_BASE_URL&&(b=d.PROXY_BASE_URL);let j=i||"sk-1234";return r.default.useEffect(()=>{m&&v((()=>{let t=Object.keys(o).length>0;if("curl"===u)if("basic"===h)return`curl -X POST '${b}/chat/completions' \\ +${e}`:e):e?r.push({role:a,content:e}):r.push({role:a,content:""})};for(let r of e.split("\n")){let e=r.match(t);if(e){s(),a=e[1].toLowerCase(),l=[e[2]??""];continue}a&&l.push(r)}return s(),{developerMessage:n,messages:r}})(a),o=e?.prompt_spec?.prompt_id||"Unnamed Prompt";return{name:k(o)||o,model:l.model||"gpt-4o",config:l.config,tools:l.tools,developerMessage:s.developerMessage,messages:s.messages.length>0?s.messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}],environment:e?.prompt_spec?.environment||e?.prompt_spec?.prompt_info?.environment||"development"}},k=e=>e?e.replace(/[._-]v\d+$/,""):"",S=e=>e?.prompt_id||"",_=e=>{try{let t=e.litellm_params;if(t?.dotprompt_content){let e=t.dotprompt_content.match(/model:\s*([^\n]+)/);if(e)return e[1].trim()}if(t?.prompt_data?.model)return t.prompt_data.model;if(t?.model)return t.model;return null}catch(e){return console.error("Error extracting model:",e),null}},T=({promptsList:e,isLoading:a,onPromptClick:l,onDeleteClick:N,accessToken:w,isAdmin:$})=>{let[C,k]=(0,r.useState)([{id:"created_at",desc:!0}]),[S,T]=(0,r.useState)(new Map);(0,r.useEffect)(()=>{(async()=>{if(w)try{let e=await (0,s.modelHubCall)(w);if(e?.data){let t=new Map;e.data.forEach(e=>{t.set(e.model_group,e)}),T(t)}}catch(e){console.error("Error fetching model hub data:",e)}})()},[w]);let E=e=>e?new Date(e).toLocaleString():"-",O=[{header:"Prompt ID",accessorKey:"prompt_id",cell:e=>{let r=String(e.getValue()||""),a=r.length>25?`${r.slice(0,25)}...`:r;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f.Tooltip,{title:r,children:(0,t.jsx)(n.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[220px] justify-start",onClick:()=>e.getValue()&&l?.(e.getValue()),children:a})}),(0,t.jsx)(f.Tooltip,{title:"Copy prompt ID",children:(0,t.jsx)(v.CopyOutlined,{onClick:e=>{e.stopPropagation(),navigator.clipboard.writeText(r)},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Model",accessorKey:"model",cell:({row:e})=>{let r=_(e.original);if(!r)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"-"});let n=((e,t)=>{if(!e)return null;let r=t.get(e);return r&&r.providers&&r.providers.length>0?r.providers[0]:null})(r,S),{logo:a}=(0,j.getProviderLogoAndName)(n||"");return(0,t.jsx)(f.Tooltip,{title:r,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:n&&a?(0,t.jsx)("img",{src:a,alt:`${n} logo`,className:"w-4 h-4",onError:e=>{let t=e.currentTarget,r=t.parentElement;if(r&&r.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=n?.charAt(0)||"-",r.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}):(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:r})]})})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{let r=e.original;return(0,t.jsx)(f.Tooltip,{title:r.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:E(r.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:({row:e})=>{let r=e.original;return(0,t.jsx)(f.Tooltip,{title:r.updated_at,children:(0,t.jsx)("span",{className:"text-xs",children:E(r.updated_at)})})}},{header:"Environment",accessorKey:"environment",cell:({row:e})=>{let r=e.original.environment||"development";return(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${{production:"text-red-600 bg-red-50",staging:"text-yellow-600 bg-yellow-50",development:"text-green-600 bg-green-50"}[r]||"text-gray-600 bg-gray-50"}`,children:r})}},{header:"Created By",accessorKey:"created_by",cell:({row:e})=>{let r=e.original;return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:r.created_by||"-"})}},{header:"Type",accessorKey:"prompt_info.prompt_type",cell:({row:e})=>{let r=e.original;return(0,t.jsx)(f.Tooltip,{title:r.prompt_info.prompt_type,children:(0,t.jsx)("span",{className:"text-xs",children:r.prompt_info.prompt_type})})}},...$?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let r=e.original,a=r.prompt_id||"Unknown Prompt";return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(f.Tooltip,{title:"Delete prompt",children:(0,t.jsx)(n.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),N?.(r.prompt_id,a)},icon:g.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],P=(0,b.useReactTable)({data:e,columns:O,state:{sorting:C},onSortingChange:k,getCoreRowModel:(0,y.getCoreRowModel)(),getSortedRowModel:(0,y.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(o.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(d.TableHead,{children:P.getHeaderGroups().map(e=>(0,t.jsx)(p.TableRow,{children:e.headers.map(e=>(0,t.jsx)(m.TableHeaderCell,{className:"py-1 h-8",onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,b.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(x.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(h.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(u.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(i.TableBody,{children:a?(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:O.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e.length>0?P.getRowModel().rows.map(e=>(0,t.jsx)(p.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,b.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:O.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No prompts found"})})})})})]})})})};var E=e.i(304967),O=e.i(629569),P=e.i(599724),I=e.i(350967),B=e.i(389083),z=e.i(197647),D=e.i(653824),M=e.i(881073),R=e.i(404206),A=e.i(723731),L=e.i(464571),H=e.i(530212),F=e.i(797672),W=e.i(500330),U=e.i(678784),V=e.i(118366),J=e.i(727749),K=e.i(653496),q=e.i(245094),X=e.i(650056),G=e.i(219470);let Y=({promptId:e,model:s,promptVariables:o={},accessToken:i,version:c="1",proxySettings:d})=>{let[m,p]=(0,r.useState)(!1),[u,x]=(0,r.useState)("curl"),[h,g]=(0,r.useState)("basic"),[f,v]=(0,r.useState)(""),b=window.location.origin,y=d?.LITELLM_UI_API_DOC_BASE_URL;y&&y.trim()?b=y:d?.PROXY_BASE_URL&&(b=d.PROXY_BASE_URL);let j=i||"sk-1234";return r.default.useEffect(()=>{m&&v((()=>{let t=Object.keys(o).length>0;if("curl"===u)if("basic"===h)return`curl -X POST '${b}/chat/completions' \\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer ${j}' \\ -d '{ @@ -135,7 +135,7 @@ async function main() { console.log(response); } -main();`}})())},[m,u,h,e,s,o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Button,{variant:"secondary",icon:q.CodeOutlined,onClick:()=>{p(!0)},children:"Get Code"}),(0,t.jsxs)(n.Modal,{title:"Generated Code",open:m,onCancel:()=>{p(!1)},footer:null,width:800,children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium block mb-1 text-gray-700",children:"Language"}),(0,t.jsx)(l.Select,{value:u,onChange:e=>x(e),style:{width:180},options:[{value:"curl",label:"cURL"},{value:"python",label:"Python (OpenAI SDK)"},{value:"javascript",label:"JavaScript (OpenAI SDK)"}]})]}),(0,t.jsx)(L.Button,{onClick:()=>{navigator.clipboard.writeText(f),J.default.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,t.jsx)(K.Tabs,{activeKey:h,onChange:g,items:[{label:"Basic",key:"basic"},{label:"With Messages",key:"messages"},{label:"With Version",key:"version"}]}),(0,t.jsx)(X.Prism,{language:"curl"===u?"bash":"python"===u?"python":"javascript",style:G.coy,wrapLines:!0,wrapLongLines:!0,className:"rounded-md mt-0",customStyle:{maxHeight:"60vh",overflowY:"auto",marginTop:0,borderTopLeftRadius:0,borderTopRightRadius:0},children:f})]})]})},Z=({promptId:e,onClose:l,accessToken:u,isAdmin:x,onDelete:h,onEdit:f})=>{let[v,b]=(0,r.useState)(null),[y,j]=(0,r.useState)(null),[N,w]=(0,r.useState)(null),[$,C]=(0,r.useState)(!0),[k,T]=(0,r.useState)({}),[K,q]=(0,r.useState)(!1),[X,G]=(0,r.useState)(!1),[Z,Q]=(0,r.useState)([]),[ee,et]=(0,r.useState)(null),[er,ea]=(0,r.useState)([]),[en,el]=(0,r.useState)(null),[es,eo]=(0,r.useState)(!1),ei=async t=>{try{if(C(!0),!u)return;let r=await (0,s.getPromptInfo)(u,e,t);b(r.prompt_spec),j(r.raw_prompt_template),w(r),r.environments&&r.environments.length>0&&(Q(r.environments),ee||et(r.prompt_spec.environment||r.environments[0])),el(r.prompt_spec.version||null)}catch(e){J.default.fromBackend("Failed to load prompt information"),console.error("Error fetching prompt info:",e)}finally{C(!1)}},ec=async t=>{if(u){eo(!0);try{let r=await (0,s.getPromptVersions)(u,e,t);ea(r.prompts||[])}catch{ea([])}finally{eo(!1)}}},ed=(0,r.useRef)(!0);if((0,r.useEffect)(()=>{et(null),Q([]),ea([]),ei()},[e,u]),(0,r.useEffect)(()=>{if(ed.current){ed.current=!1,ee&&u&&ec(ee);return}ee&&u&&(ei(ee),ec(ee))},[ee]),$&&!v)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!v)return(0,t.jsx)("div",{className:"p-4",children:"Prompt not found"});let em=e=>e?new Date(e).toLocaleString():"-",ep=async(e,t)=>{await (0,W.copyToClipboard)(e)&&(T(e=>({...e,[t]:!0})),setTimeout(()=>{T(e=>({...e,[t]:!1}))},2e3))},eu=async()=>{if(u&&v){G(!0);try{await (0,s.deletePromptCall)(u,eg),J.default.success(`Prompt "${eg}" deleted successfully`),h?.(),l()}catch(e){console.error("Error deleting prompt:",e),J.default.fromBackend("Failed to delete prompt")}finally{G(!1),q(!1)}}},ex=async t=>{if(!u||!ee)return;let r=t.version||1;el(r);try{let t=`${e}.v${r}`,a=await (0,s.getPromptInfo)(u,t,ee);b(a.prompt_spec),j(a.raw_prompt_template),w(a)}catch{J.default.fromBackend(`Failed to load version v${r}`)}},eh=v&&_(v)||"gpt-4o",eg=S(v),ef=(e=>{let t;if(e?.version)return String(e.version);var r=(t=S(e),e?.litellm_params?.prompt_id||t);if(!r)return"1";let a=r.match(/[._-]v(\d+)$/);return a?a[1]:"1"})(v),ev=er.length>0?Math.max(...er.map(e=>e.version||1)):null,eb=null!==ev&&null!==en&&enep(eg,"prompt-id"),className:`left-2 z-10 transition-all duration-200 ${k["prompt-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Y,{promptId:eg,model:eh,promptVariables:(e=>{let t;if(!e)return{};let r={},a=/\{\{(\w+)\}\}/g;for(;null!==(t=a.exec(e));){let e=t[1];r[e]||(r[e]=`example_${e}`)}return r})(y?.content),accessToken:u,version:ef}),(0,t.jsx)(a.Button,{icon:F.PencilIcon,variant:"primary",onClick:()=>f?.(N),className:"flex items-center",children:"Prompt Studio"}),x&&(0,t.jsx)(a.Button,{icon:g.TrashIcon,variant:"secondary",onClick:()=>{q(!0)},className:"flex items-center",children:"Delete Prompt"})]})]})]}),Z.length>0&&(0,t.jsx)("div",{className:"flex gap-2 mb-4",children:[...Z].sort((e,t)=>{let r={development:0,staging:1,production:2};return(r[e]??99)-(r[t]??99)}).map(e=>(0,t.jsxs)("button",{onClick:()=>{et(e),el(null)},className:`px-4 py-2 rounded-lg text-sm font-medium transition-all ${ee===e?"production"===e?"bg-red-100 text-red-800 border-2 border-red-300":"staging"===e?"bg-yellow-100 text-yellow-800 border-2 border-yellow-300":"bg-green-100 text-green-800 border-2 border-green-300":"bg-gray-100 text-gray-600 border-2 border-transparent hover:bg-gray-200"}`,children:[e,er.length>0&&ee===e&&(0,t.jsxs)("span",{className:"ml-1 text-xs opacity-75",children:["(v",ev,")"]})]},e))}),eb&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-amber-50 border border-amber-200 rounded-lg flex items-center justify-between",children:[(0,t.jsxs)(P.Text,{className:"text-amber-800",children:["Viewing v",en," — not the latest version (v",ev,")"]}),(0,t.jsx)(a.Button,{variant:"light",size:"xs",onClick:()=>{let e=er.find(e=>e.version===ev);e&&ex(e)},children:"Go to latest"})]}),(0,t.jsxs)(D.TabGroup,{children:[(0,t.jsxs)(M.TabList,{className:"mb-4",children:[(0,t.jsx)(z.Tab,{children:"Overview"},"overview"),y?(0,t.jsx)(z.Tab,{children:"Prompt Template"},"prompt-template"):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(z.Tab,{children:"Raw JSON"},"raw-json")]}),(0,t.jsxs)(A.TabPanels,{children:[(0,t.jsxs)(R.TabPanel,{children:[(0,t.jsxs)(I.Grid,{numItems:1,numItemsSm:2,numItemsLg:4,className:"gap-4",children:[(0,t.jsxs)(E.Card,{children:[(0,t.jsx)(P.Text,{children:"Version"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(O.Title,{children:ef}),(0,t.jsxs)(B.Badge,{color:"blue",className:"mt-1",children:["v",ef]})]})]}),(0,t.jsxs)(E.Card,{children:[(0,t.jsx)(P.Text,{children:"Prompt Type"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(O.Title,{children:v.prompt_info?.prompt_type||"-"})})]}),(0,t.jsxs)(E.Card,{children:[(0,t.jsx)(P.Text,{children:"Created By"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(O.Title,{className:"text-sm",children:v.created_by||"-"})})]}),(0,t.jsxs)(E.Card,{children:[(0,t.jsx)(P.Text,{children:"Created At"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(O.Title,{className:"text-sm",children:em(v.created_at)}),(0,t.jsxs)(P.Text,{className:"text-xs",children:["Updated: ",em(v.updated_at)]})]})]})]}),(0,t.jsxs)(E.Card,{className:"mt-6",children:[(0,t.jsxs)(O.Title,{className:"mb-3",children:["Version History — ",ee]}),es?(0,t.jsx)(P.Text,{children:"Loading versions..."}):er.length>0?(0,t.jsxs)(o.Table,{children:[(0,t.jsx)(d.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(m.TableHeaderCell,{children:"Version"}),(0,t.jsx)(m.TableHeaderCell,{children:"Created By"}),(0,t.jsx)(m.TableHeaderCell,{children:"Date"}),(0,t.jsx)(m.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(i.TableBody,{children:er.map(e=>{let r=e.version||1,n=r===en,l=r===ev;return(0,t.jsxs)(p.TableRow,{className:`cursor-pointer hover:bg-blue-50 transition-colors ${n?"bg-blue-50":""}`,onClick:()=>ex(e),children:[(0,t.jsxs)(c.TableCell,{children:[(0,t.jsxs)("span",{className:n?"font-bold":"",children:["v",r]}),l&&(0,t.jsx)(B.Badge,{color:"blue",className:"ml-2",size:"xs",children:"latest"})]}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)("span",{className:"text-sm",children:e.created_by||"-"})}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)("span",{className:"text-sm",children:em(e.created_at)})}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)(a.Button,{icon:F.PencilIcon,variant:"light",size:"xs",onClick:t=>{t.stopPropagation();let r={prompt_spec:{...e,prompt_id:eg,environment:ee},raw_prompt_template:n?y:null};f?.(r)},children:"Edit"})})]},r)})})]}):(0,t.jsxs)(P.Text,{className:"text-gray-400",children:["No versions found in ",ee]})]})]}),y&&(0,t.jsx)(R.TabPanel,{children:(0,t.jsxs)(E.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(O.Title,{children:"Prompt Template"}),(0,t.jsx)(L.Button,{type:"text",size:"small",icon:k["prompt-content"]?(0,t.jsx)(U.CheckIcon,{size:16}):(0,t.jsx)(V.CopyIcon,{size:16}),onClick:()=>ep(y.content,"prompt-content"),className:`transition-all duration-200 ${k["prompt-content"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:k["prompt-content"]?"Copied!":"Copy Content"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium",children:"Template ID"}),(0,t.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:y.litellm_prompt_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium",children:"Content"}),(0,t.jsx)("div",{className:"mt-2 p-4 bg-gray-50 rounded-md border overflow-auto max-h-96",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:y.content})})]}),y.metadata&&Object.keys(y.metadata).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium",children:"Template Metadata"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-64",children:JSON.stringify(y.metadata,null,2)})})]})]})]})}),(0,t.jsx)(R.TabPanel,{children:(0,t.jsxs)(E.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(O.Title,{children:"Raw API Response"}),(0,t.jsx)(L.Button,{type:"text",size:"small",icon:k["raw-json"]?(0,t.jsx)(U.CheckIcon,{size:16}):(0,t.jsx)(V.CopyIcon,{size:16}),onClick:()=>ep(JSON.stringify(N,null,2),"raw-json"),className:`transition-all duration-200 ${k["raw-json"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:k["raw-json"]?"Copied!":"Copy JSON"})]}),(0,t.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border overflow-auto",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(N,null,2)})})]})})]})]}),(0,t.jsxs)(n.Modal,{title:"Delete Prompt",open:K,onOk:eu,onCancel:()=>{q(!1)},confirmLoading:X,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",(0,t.jsx)("strong",{children:eg}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var Q=e.i(808613),ee=e.i(515831),et=e.i(312361),er=e.i(779241),ea=e.i(519756);let{Option:en}=l.Select,el=({visible:e,onClose:a,accessToken:o,onSuccess:i})=>{let[c]=Q.Form.useForm(),[d,m]=(0,r.useState)(!1),[p,u]=(0,r.useState)([]),[x,h]=(0,r.useState)("dotprompt"),g=()=>{c.resetFields(),u([]),h("dotprompt"),a()},f=async()=>{try{let e=await c.validateFields();if(console.log("values: ",e),!o)return void J.default.fromBackend("Access token is required");if("dotprompt"===x&&0===p.length)return void J.default.fromBackend("Please upload a .prompt file");m(!0);let t={};if("dotprompt"===x&&p.length>0){let r=p[0].originFileObj;try{let a=await (0,s.convertPromptFileToJson)(o,r);console.log("Conversion result:",a),t={prompt_id:e.prompt_id,litellm_params:{prompt_integration:"dotprompt",prompt_id:a.prompt_id,prompt_data:a.json_data},prompt_info:{prompt_type:"db"}}}catch(e){console.error("Error converting prompt file:",e),J.default.fromBackend("Failed to convert prompt file to JSON"),m(!1);return}}try{await (0,s.createPromptCall)(o,t),J.default.success("Prompt created successfully!"),g(),i()}catch(e){console.error("Error creating prompt:",e),J.default.fromBackend("Failed to create prompt")}}catch(e){console.error("Form validation error:",e)}finally{m(!1)}};return(0,t.jsx)(n.Modal,{title:"Add New Prompt",open:e,onCancel:g,footer:[(0,t.jsx)(L.Button,{onClick:g,children:"Cancel"},"cancel"),(0,t.jsx)(L.Button,{loading:d,onClick:f,children:"Create Prompt"},"submit")],width:600,children:(0,t.jsxs)(Q.Form,{form:c,layout:"vertical",requiredMark:!1,children:[(0,t.jsx)(Q.Form.Item,{label:"Prompt ID",name:"prompt_id",rules:[{required:!0,message:"Please enter a prompt ID"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Prompt ID can only contain letters, numbers, underscores, and hyphens"}],children:(0,t.jsx)(er.TextInput,{placeholder:"Enter unique prompt ID (e.g., my_prompt_id)"})}),(0,t.jsx)(Q.Form.Item,{label:"Prompt Integration",name:"prompt_integration",initialValue:"dotprompt",children:(0,t.jsx)(l.Select,{value:x,onChange:h,children:(0,t.jsx)(en,{value:"dotprompt",children:"dotprompt"})})}),"dotprompt"===x&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Divider,{}),(0,t.jsxs)(Q.Form.Item,{label:"Prompt File",extra:"Upload a .prompt file that follows the Dotprompt specification",children:[(0,t.jsx)(ee.Upload,{...{beforeUpload:e=>(e.name.endsWith(".prompt")||J.default.fromBackend("Please upload a .prompt file"),!1),fileList:p,onChange:({fileList:e})=>{u(e.slice(-1))},onRemove:()=>{u([])}},children:(0,t.jsx)(L.Button,{icon:(0,t.jsx)(ea.UploadOutlined,{}),children:"Select .prompt File"})}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 text-sm text-gray-600",children:["Selected: ",p[0].name]})]})]})]})})},es=`{ +main();`}})())},[m,u,h,e,s,o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Button,{variant:"secondary",icon:q.CodeOutlined,onClick:()=>{p(!0)},children:"Get Code"}),(0,t.jsxs)(a.Modal,{title:"Generated Code",open:m,onCancel:()=>{p(!1)},footer:null,width:800,children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium block mb-1 text-gray-700",children:"Language"}),(0,t.jsx)(l.Select,{value:u,onChange:e=>x(e),style:{width:180},options:[{value:"curl",label:"cURL"},{value:"python",label:"Python (OpenAI SDK)"},{value:"javascript",label:"JavaScript (OpenAI SDK)"}]})]}),(0,t.jsx)(L.Button,{onClick:()=>{navigator.clipboard.writeText(f),J.default.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,t.jsx)(K.Tabs,{activeKey:h,onChange:g,items:[{label:"Basic",key:"basic"},{label:"With Messages",key:"messages"},{label:"With Version",key:"version"}]}),(0,t.jsx)(X.Prism,{language:"curl"===u?"bash":"python"===u?"python":"javascript",style:G.coy,wrapLines:!0,wrapLongLines:!0,className:"rounded-md mt-0",customStyle:{maxHeight:"60vh",overflowY:"auto",marginTop:0,borderTopLeftRadius:0,borderTopRightRadius:0},children:f})]})]})},Z=({promptId:e,onClose:l,accessToken:u,isAdmin:x,onDelete:h,onEdit:f})=>{let[v,b]=(0,r.useState)(null),[y,j]=(0,r.useState)(null),[N,w]=(0,r.useState)(null),[$,C]=(0,r.useState)(!0),[k,T]=(0,r.useState)({}),[K,q]=(0,r.useState)(!1),[X,G]=(0,r.useState)(!1),[Z,Q]=(0,r.useState)([]),[ee,et]=(0,r.useState)(null),[er,en]=(0,r.useState)([]),[ea,el]=(0,r.useState)(null),[es,eo]=(0,r.useState)(!1),ei=async t=>{try{if(C(!0),!u)return;let r=await (0,s.getPromptInfo)(u,e,t);b(r.prompt_spec),j(r.raw_prompt_template),w(r),r.environments&&r.environments.length>0&&(Q(r.environments),ee||et(r.prompt_spec.environment||r.environments[0])),el(r.prompt_spec.version||null)}catch(e){J.default.fromBackend("Failed to load prompt information"),console.error("Error fetching prompt info:",e)}finally{C(!1)}},ec=async t=>{if(u){eo(!0);try{let r=await (0,s.getPromptVersions)(u,e,t);en(r.prompts||[])}catch{en([])}finally{eo(!1)}}},ed=(0,r.useRef)(!0);if((0,r.useEffect)(()=>{et(null),Q([]),en([]),ei()},[e,u]),(0,r.useEffect)(()=>{if(ed.current){ed.current=!1,ee&&u&&ec(ee);return}ee&&u&&(ei(ee),ec(ee))},[ee]),$&&!v)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!v)return(0,t.jsx)("div",{className:"p-4",children:"Prompt not found"});let em=e=>e?new Date(e).toLocaleString():"-",ep=async(e,t)=>{await (0,W.copyToClipboard)(e)&&(T(e=>({...e,[t]:!0})),setTimeout(()=>{T(e=>({...e,[t]:!1}))},2e3))},eu=async()=>{if(u&&v){G(!0);try{await (0,s.deletePromptCall)(u,eg),J.default.success(`Prompt "${eg}" deleted successfully`),h?.(),l()}catch(e){console.error("Error deleting prompt:",e),J.default.fromBackend("Failed to delete prompt")}finally{G(!1),q(!1)}}},ex=async t=>{if(!u||!ee)return;let r=t.version||1;el(r);try{let t=`${e}.v${r}`,n=await (0,s.getPromptInfo)(u,t,ee);b(n.prompt_spec),j(n.raw_prompt_template),w(n)}catch{J.default.fromBackend(`Failed to load version v${r}`)}},eh=v&&_(v)||"gpt-4o",eg=S(v),ef=(e=>{let t;if(e?.version)return String(e.version);var r=(t=S(e),e?.litellm_params?.prompt_id||t);if(!r)return"1";let n=r.match(/[._-]v(\d+)$/);return n?n[1]:"1"})(v),ev=er.length>0?Math.max(...er.map(e=>e.version||1)):null,eb=null!==ev&&null!==ea&&eaep(eg,"prompt-id"),className:`left-2 z-10 transition-all duration-200 ${k["prompt-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Y,{promptId:eg,model:eh,promptVariables:(e=>{let t;if(!e)return{};let r={},n=/\{\{(\w+)\}\}/g;for(;null!==(t=n.exec(e));){let e=t[1];r[e]||(r[e]=`example_${e}`)}return r})(y?.content),accessToken:u,version:ef}),(0,t.jsx)(n.Button,{icon:F.PencilIcon,variant:"primary",onClick:()=>f?.(N),className:"flex items-center",children:"Prompt Studio"}),x&&(0,t.jsx)(n.Button,{icon:g.TrashIcon,variant:"secondary",onClick:()=>{q(!0)},className:"flex items-center",children:"Delete Prompt"})]})]})]}),Z.length>0&&(0,t.jsx)("div",{className:"flex gap-2 mb-4",children:[...Z].sort((e,t)=>{let r={development:0,staging:1,production:2};return(r[e]??99)-(r[t]??99)}).map(e=>(0,t.jsxs)("button",{onClick:()=>{et(e),el(null)},className:`px-4 py-2 rounded-lg text-sm font-medium transition-all ${ee===e?"production"===e?"bg-red-100 text-red-800 border-2 border-red-300":"staging"===e?"bg-yellow-100 text-yellow-800 border-2 border-yellow-300":"bg-green-100 text-green-800 border-2 border-green-300":"bg-gray-100 text-gray-600 border-2 border-transparent hover:bg-gray-200"}`,children:[e,er.length>0&&ee===e&&(0,t.jsxs)("span",{className:"ml-1 text-xs opacity-75",children:["(v",ev,")"]})]},e))}),eb&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-amber-50 border border-amber-200 rounded-lg flex items-center justify-between",children:[(0,t.jsxs)(P.Text,{className:"text-amber-800",children:["Viewing v",ea," — not the latest version (v",ev,")"]}),(0,t.jsx)(n.Button,{variant:"light",size:"xs",onClick:()=>{let e=er.find(e=>e.version===ev);e&&ex(e)},children:"Go to latest"})]}),(0,t.jsxs)(D.TabGroup,{children:[(0,t.jsxs)(M.TabList,{className:"mb-4",children:[(0,t.jsx)(z.Tab,{children:"Overview"},"overview"),y?(0,t.jsx)(z.Tab,{children:"Prompt Template"},"prompt-template"):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(z.Tab,{children:"Raw JSON"},"raw-json")]}),(0,t.jsxs)(A.TabPanels,{children:[(0,t.jsxs)(R.TabPanel,{children:[(0,t.jsxs)(I.Grid,{numItems:1,numItemsSm:2,numItemsLg:4,className:"gap-4",children:[(0,t.jsxs)(E.Card,{children:[(0,t.jsx)(P.Text,{children:"Version"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(O.Title,{children:ef}),(0,t.jsxs)(B.Badge,{color:"blue",className:"mt-1",children:["v",ef]})]})]}),(0,t.jsxs)(E.Card,{children:[(0,t.jsx)(P.Text,{children:"Prompt Type"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(O.Title,{children:v.prompt_info?.prompt_type||"-"})})]}),(0,t.jsxs)(E.Card,{children:[(0,t.jsx)(P.Text,{children:"Created By"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(O.Title,{className:"text-sm",children:v.created_by||"-"})})]}),(0,t.jsxs)(E.Card,{children:[(0,t.jsx)(P.Text,{children:"Created At"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(O.Title,{className:"text-sm",children:em(v.created_at)}),(0,t.jsxs)(P.Text,{className:"text-xs",children:["Updated: ",em(v.updated_at)]})]})]})]}),(0,t.jsxs)(E.Card,{className:"mt-6",children:[(0,t.jsxs)(O.Title,{className:"mb-3",children:["Version History — ",ee]}),es?(0,t.jsx)(P.Text,{children:"Loading versions..."}):er.length>0?(0,t.jsxs)(o.Table,{children:[(0,t.jsx)(d.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(m.TableHeaderCell,{children:"Version"}),(0,t.jsx)(m.TableHeaderCell,{children:"Created By"}),(0,t.jsx)(m.TableHeaderCell,{children:"Date"}),(0,t.jsx)(m.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(i.TableBody,{children:er.map(e=>{let r=e.version||1,a=r===ea,l=r===ev;return(0,t.jsxs)(p.TableRow,{className:`cursor-pointer hover:bg-blue-50 transition-colors ${a?"bg-blue-50":""}`,onClick:()=>ex(e),children:[(0,t.jsxs)(c.TableCell,{children:[(0,t.jsxs)("span",{className:a?"font-bold":"",children:["v",r]}),l&&(0,t.jsx)(B.Badge,{color:"blue",className:"ml-2",size:"xs",children:"latest"})]}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)("span",{className:"text-sm",children:e.created_by||"-"})}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)("span",{className:"text-sm",children:em(e.created_at)})}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)(n.Button,{icon:F.PencilIcon,variant:"light",size:"xs",onClick:t=>{t.stopPropagation();let r={prompt_spec:{...e,prompt_id:eg,environment:ee},raw_prompt_template:a?y:null};f?.(r)},children:"Edit"})})]},r)})})]}):(0,t.jsxs)(P.Text,{className:"text-gray-400",children:["No versions found in ",ee]})]})]}),y&&(0,t.jsx)(R.TabPanel,{children:(0,t.jsxs)(E.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(O.Title,{children:"Prompt Template"}),(0,t.jsx)(L.Button,{type:"text",size:"small",icon:k["prompt-content"]?(0,t.jsx)(U.CheckIcon,{size:16}):(0,t.jsx)(V.CopyIcon,{size:16}),onClick:()=>ep(y.content,"prompt-content"),className:`transition-all duration-200 ${k["prompt-content"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:k["prompt-content"]?"Copied!":"Copy Content"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium",children:"Template ID"}),(0,t.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:y.litellm_prompt_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium",children:"Content"}),(0,t.jsx)("div",{className:"mt-2 p-4 bg-gray-50 rounded-md border overflow-auto max-h-96",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:y.content})})]}),y.metadata&&Object.keys(y.metadata).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium",children:"Template Metadata"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-64",children:JSON.stringify(y.metadata,null,2)})})]})]})]})}),(0,t.jsx)(R.TabPanel,{children:(0,t.jsxs)(E.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(O.Title,{children:"Raw API Response"}),(0,t.jsx)(L.Button,{type:"text",size:"small",icon:k["raw-json"]?(0,t.jsx)(U.CheckIcon,{size:16}):(0,t.jsx)(V.CopyIcon,{size:16}),onClick:()=>ep(JSON.stringify(N,null,2),"raw-json"),className:`transition-all duration-200 ${k["raw-json"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:k["raw-json"]?"Copied!":"Copy JSON"})]}),(0,t.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border overflow-auto",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(N,null,2)})})]})})]})]}),(0,t.jsxs)(a.Modal,{title:"Delete Prompt",open:K,onOk:eu,onCancel:()=>{q(!1)},confirmLoading:X,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",(0,t.jsx)("strong",{children:eg}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var Q=e.i(808613),ee=e.i(515831),et=e.i(312361),er=e.i(779241),en=e.i(519756);let{Option:ea}=l.Select,el=({visible:e,onClose:n,accessToken:o,onSuccess:i})=>{let[c]=Q.Form.useForm(),[d,m]=(0,r.useState)(!1),[p,u]=(0,r.useState)([]),[x,h]=(0,r.useState)("dotprompt"),g=()=>{c.resetFields(),u([]),h("dotprompt"),n()},f=async()=>{try{let e=await c.validateFields();if(console.log("values: ",e),!o)return void J.default.fromBackend("Access token is required");if("dotprompt"===x&&0===p.length)return void J.default.fromBackend("Please upload a .prompt file");m(!0);let t={};if("dotprompt"===x&&p.length>0){let r=p[0].originFileObj;try{let n=await (0,s.convertPromptFileToJson)(o,r);console.log("Conversion result:",n),t={prompt_id:e.prompt_id,litellm_params:{prompt_integration:"dotprompt",prompt_id:n.prompt_id,prompt_data:n.json_data},prompt_info:{prompt_type:"db"}}}catch(e){console.error("Error converting prompt file:",e),J.default.fromBackend("Failed to convert prompt file to JSON"),m(!1);return}}try{await (0,s.createPromptCall)(o,t),J.default.success("Prompt created successfully!"),g(),i()}catch(e){console.error("Error creating prompt:",e),J.default.fromBackend("Failed to create prompt")}}catch(e){console.error("Form validation error:",e)}finally{m(!1)}};return(0,t.jsx)(a.Modal,{title:"Add New Prompt",open:e,onCancel:g,footer:[(0,t.jsx)(L.Button,{onClick:g,children:"Cancel"},"cancel"),(0,t.jsx)(L.Button,{loading:d,onClick:f,children:"Create Prompt"},"submit")],width:600,children:(0,t.jsxs)(Q.Form,{form:c,layout:"vertical",requiredMark:!1,children:[(0,t.jsx)(Q.Form.Item,{label:"Prompt ID",name:"prompt_id",rules:[{required:!0,message:"Please enter a prompt ID"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Prompt ID can only contain letters, numbers, underscores, and hyphens"}],children:(0,t.jsx)(er.TextInput,{placeholder:"Enter unique prompt ID (e.g., my_prompt_id)"})}),(0,t.jsx)(Q.Form.Item,{label:"Prompt Integration",name:"prompt_integration",initialValue:"dotprompt",children:(0,t.jsx)(l.Select,{value:x,onChange:h,children:(0,t.jsx)(ea,{value:"dotprompt",children:"dotprompt"})})}),"dotprompt"===x&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Divider,{}),(0,t.jsxs)(Q.Form.Item,{label:"Prompt File",extra:"Upload a .prompt file that follows the Dotprompt specification",children:[(0,t.jsx)(ee.Upload,{...{beforeUpload:e=>(e.name.endsWith(".prompt")||J.default.fromBackend("Please upload a .prompt file"),!1),fileList:p,onChange:({fileList:e})=>{u(e.slice(-1))},onRemove:()=>{u([])}},children:(0,t.jsx)(L.Button,{icon:(0,t.jsx)(en.UploadOutlined,{}),children:"Select .prompt File"})}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 text-sm text-gray-600",children:["Selected: ",p[0].name]})]})]})]})})},es=`{ "type": "function", "function": { "name": "get_current_weather", @@ -155,7 +155,7 @@ main();`}})())},[m,u,h,e,s,o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Butt "required": ["location"] } } -}`,eo=({visible:e,initialJson:a,onSave:l,onClose:s})=>{let[o,i]=(0,r.useState)(a||es),[c,d]=(0,r.useState)(null),m=()=>{d(null),s()};return(0,t.jsx)(n.Modal,{title:(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsx)("span",{className:"text-lg font-medium",children:"Add Tool"})}),open:e,onCancel:m,width:800,footer:[(0,t.jsx)(L.Button,{onClick:m,children:"Cancel"},"cancel"),(0,t.jsx)(L.Button,{type:"primary",onClick:()=>{try{JSON.parse(o),d(null),l(o)}catch(e){d("Invalid JSON format. Please check your syntax.")}},children:"Add"},"save")],children:(0,t.jsxs)("div",{className:"space-y-3",children:[c&&(0,t.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-red-600 text-sm",children:c}),(0,t.jsx)("textarea",{value:o,onChange:e=>i(e.target.value),className:"w-full min-h-[400px] px-4 py-3 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none",placeholder:"Paste your tool JSON here..."})]})})};var ei=e.i(311451),ec=e.i(475254);let ed=(0,ec.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",()=>ed],180127),e.s(["ArrowLeftIcon",()=>ed],516430);let em=(0,ec.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"}]]),ep=(0,ec.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),eu=({promptName:e,onNameChange:r,onBack:n,onSave:s,isSaving:o,editMode:i=!1,onShowHistory:c,version:d,promptModel:m="gpt-4o",promptVariables:p={},accessToken:u,proxySettings:x,environment:h,onEnvironmentChange:g})=>(0,t.jsxs)("div",{className:"bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(a.Button,{icon:ed,variant:"light",onClick:n,size:"xs",children:"Back"}),(0,t.jsx)(ei.Input,{value:e,onChange:e=>r(e.target.value),className:"text-base font-medium border-none shadow-none",style:{width:"200px"}}),d&&(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded font-medium",children:d}),(0,t.jsx)(l.Select,{value:h,onChange:g,style:{width:140},size:"small",options:[{label:"Development",value:"development"},{label:"Staging",value:"staging"},{label:"Production",value:"production"}]}),(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded",children:"Draft"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Unsaved changes"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(Y,{promptId:e,model:m,promptVariables:p,accessToken:u,version:d?.replace("v","")||"1",proxySettings:x}),i&&c&&(0,t.jsx)(a.Button,{icon:ep,variant:"secondary",onClick:c,children:"History"}),(0,t.jsx)(a.Button,{icon:em,onClick:s,loading:o,disabled:o,children:i?"Update":"Save"})]})]});var ex=e.i(440987),eh=e.i(992619);let eg=({model:e,temperature:a=1,maxTokens:n=1e3,accessToken:l,onModelChange:s,onTemperatureChange:o,onMaxTokensChange:i})=>{let[c,d]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-[300px]",children:(0,t.jsx)(eh.default,{accessToken:l||"",value:e,onChange:s,showLabel:!1})}),(0,t.jsxs)("button",{onClick:()=>d(!c),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(ex.SettingsIcon,{size:16}),(0,t.jsx)("span",{children:"Parameters"})]}),c&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl p-6 w-96",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold",children:"Model Parameters"}),(0,t.jsx)("button",{onClick:()=>d(!1),className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm text-gray-700",children:"Temperature"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:0,max:2,step:.1,value:a,onChange:e=>o(parseFloat(e.target.value)||0),className:"w-20"})]})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm text-gray-700",children:"Max Tokens"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:1,max:32768,value:n,onChange:e=>i(parseInt(e.target.value)||1e3),className:"w-24"})]})})]})]})})]})};var ef=e.i(837007);let ev=(0,ec.default)("trash",[["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"}]]),eb=({tools:e,onAddTool:r,onEditTool:a,onRemoveTool:n})=>(0,t.jsxs)(E.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm font-medium",children:"Tools"}),(0,t.jsxs)("button",{onClick:r,className:"text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add"]})]}),0===e.length?(0,t.jsx)(P.Text,{className:"text-gray-500 text-xs",children:"No tools added"}):(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 border border-gray-200 rounded",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"font-medium text-xs truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1 ml-2",children:[(0,t.jsx)("button",{onClick:()=>a(r),className:"text-xs text-blue-600 hover:text-blue-700",children:"Edit"}),(0,t.jsx)("button",{onClick:()=>n(r),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})})]})]},r))})]});var ey=e.i(282786),ej=e.i(262218),eN=e.i(751904);let{TextArea:ew}=ei.Input,e$=({value:e,onChange:a,placeholder:n,rows:l=4,className:s})=>{let[o,i]=(0,r.useState)(null),[c,d]=(0,r.useState)(""),m=()=>{c.trim()&&o&&(a(e.substring(0,o.start)+`{{${c}}}`+e.substring(o.end)),i(null),d(""))},p=(()=>{let t,r=/\{\{(\w+)\}\}/g,a=[];for(;null!==(t=r.exec(e));)a.push({name:t[1],start:t.index,end:t.index+t[0].length});return a})();return(0,t.jsxs)("div",{className:`variable-textarea-container ${s}`,children:[(0,t.jsx)("style",{children:` +}`,eo=({visible:e,initialJson:n,onSave:l,onClose:s})=>{let[o,i]=(0,r.useState)(n||es),[c,d]=(0,r.useState)(null),m=()=>{d(null),s()};return(0,t.jsx)(a.Modal,{title:(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsx)("span",{className:"text-lg font-medium",children:"Add Tool"})}),open:e,onCancel:m,width:800,footer:[(0,t.jsx)(L.Button,{onClick:m,children:"Cancel"},"cancel"),(0,t.jsx)(L.Button,{type:"primary",onClick:()=>{try{JSON.parse(o),d(null),l(o)}catch(e){d("Invalid JSON format. Please check your syntax.")}},children:"Add"},"save")],children:(0,t.jsxs)("div",{className:"space-y-3",children:[c&&(0,t.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-red-600 text-sm",children:c}),(0,t.jsx)("textarea",{value:o,onChange:e=>i(e.target.value),className:"w-full min-h-[400px] px-4 py-3 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none",placeholder:"Paste your tool JSON here..."})]})})};var ei=e.i(311451),ec=e.i(475254);let ed=(0,ec.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",()=>ed],180127),e.s(["ArrowLeftIcon",()=>ed],516430);let em=(0,ec.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"}]]),ep=(0,ec.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),eu=({promptName:e,onNameChange:r,onBack:a,onSave:s,isSaving:o,editMode:i=!1,onShowHistory:c,version:d,promptModel:m="gpt-4o",promptVariables:p={},accessToken:u,proxySettings:x,environment:h,onEnvironmentChange:g})=>(0,t.jsxs)("div",{className:"bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(n.Button,{icon:ed,variant:"light",onClick:a,size:"xs",children:"Back"}),(0,t.jsx)(ei.Input,{value:e,onChange:e=>r(e.target.value),className:"text-base font-medium border-none shadow-none",style:{width:"200px"}}),d&&(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded font-medium",children:d}),(0,t.jsx)(l.Select,{value:h,onChange:g,style:{width:140},size:"small",options:[{label:"Development",value:"development"},{label:"Staging",value:"staging"},{label:"Production",value:"production"}]}),(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded",children:"Draft"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Unsaved changes"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(Y,{promptId:e,model:m,promptVariables:p,accessToken:u,version:d?.replace("v","")||"1",proxySettings:x}),i&&c&&(0,t.jsx)(n.Button,{icon:ep,variant:"secondary",onClick:c,children:"History"}),(0,t.jsx)(n.Button,{icon:em,onClick:s,loading:o,disabled:o,children:i?"Update":"Save"})]})]});var ex=e.i(440987),eh=e.i(992619);let eg=({model:e,temperature:n=1,maxTokens:a=1e3,accessToken:l,onModelChange:s,onTemperatureChange:o,onMaxTokensChange:i})=>{let[c,d]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-[300px]",children:(0,t.jsx)(eh.default,{accessToken:l||"",value:e,onChange:s,showLabel:!1})}),(0,t.jsxs)("button",{onClick:()=>d(!c),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(ex.SettingsIcon,{size:16}),(0,t.jsx)("span",{children:"Parameters"})]}),c&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl p-6 w-96",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold",children:"Model Parameters"}),(0,t.jsx)("button",{onClick:()=>d(!1),className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm text-gray-700",children:"Temperature"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:0,max:2,step:.1,value:n,onChange:e=>o(parseFloat(e.target.value)||0),className:"w-20"})]})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm text-gray-700",children:"Max Tokens"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:1,max:32768,value:a,onChange:e=>i(parseInt(e.target.value)||1e3),className:"w-24"})]})})]})]})})]})};var ef=e.i(837007);let ev=(0,ec.default)("trash",[["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"}]]),eb=({tools:e,onAddTool:r,onEditTool:n,onRemoveTool:a})=>(0,t.jsxs)(E.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm font-medium",children:"Tools"}),(0,t.jsxs)("button",{onClick:r,className:"text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add"]})]}),0===e.length?(0,t.jsx)(P.Text,{className:"text-gray-500 text-xs",children:"No tools added"}):(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 border border-gray-200 rounded",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"font-medium text-xs truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1 ml-2",children:[(0,t.jsx)("button",{onClick:()=>n(r),className:"text-xs text-blue-600 hover:text-blue-700",children:"Edit"}),(0,t.jsx)("button",{onClick:()=>a(r),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})})]})]},r))})]});var ey=e.i(282786),ej=e.i(262218),eN=e.i(751904);let{TextArea:ew}=ei.Input,e$=({value:e,onChange:n,placeholder:a,rows:l=4,className:s})=>{let[o,i]=(0,r.useState)(null),[c,d]=(0,r.useState)(""),m=()=>{c.trim()&&o&&(n(e.substring(0,o.start)+`{{${c}}}`+e.substring(o.end)),i(null),d(""))},p=(()=>{let t,r=/\{\{(\w+)\}\}/g,n=[];for(;null!==(t=r.exec(e));)n.push({name:t[1],start:t.index,end:t.index+t[0].length});return n})();return(0,t.jsxs)("div",{className:`variable-textarea-container ${s}`,children:[(0,t.jsx)("style",{children:` .variable-highlight-text { color: #f97316; background-color: #fff7ed; @@ -164,4 +164,4 @@ main();`}})())},[m,u,h,e,s,o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Butt border: 1px solid #fed7aa; font-family: monospace; } - `}),(0,t.jsx)(ew,{value:e,onChange:e=>a(e.target.value),placeholder:n,rows:l,className:"font-sans"}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 items-center",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Detected variables:"}),p.map((e,r)=>(0,t.jsx)(ey.Popover,{content:(0,t.jsxs)("div",{className:"p-2",style:{minWidth:"200px"},children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"Edit variable name"}),(0,t.jsx)(ei.Input,{size:"small",value:c,onChange:e=>d(e.target.value),onPressEnter:m,placeholder:"Variable name",autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,t.jsx)("button",{onClick:m,className:"text-xs px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save"}),(0,t.jsx)("button",{onClick:()=>{i(null),d("")},className:"text-xs px-2 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:"Cancel"})]})]}),open:o?.start===e.start,onOpenChange:e=>{e||(i(null),d(""))},trigger:"click",children:(0,t.jsx)(ej.Tag,{color:"orange",className:"cursor-pointer hover:opacity-80 transition-all m-0",icon:(0,t.jsx)(eN.EditOutlined,{}),onClick:()=>{i({oldName:e.name,start:e.start,end:e.end}),d(e.name)},children:e.name})},`${e.start}-${r}`))]})]})},eC=({value:e,onChange:r})=>(0,t.jsxs)(E.Card,{className:"p-3",children:[(0,t.jsx)(P.Text,{className:"block mb-2 text-sm font-medium",children:"Developer message"}),(0,t.jsx)(P.Text,{className:"text-gray-500 text-xs mb-2",children:"Optional system instructions for the model"}),(0,t.jsx)(e$,{value:e,onChange:r,rows:3,placeholder:"e.g., You are a helpful assistant..."})]}),ek=(0,ec.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),{Option:eS}=l.Select,e_=({messages:e,onAddMessage:a,onUpdateMessage:n,onRemoveMessage:s,onMoveMessage:o})=>{let[i,c]=(0,r.useState)(null),[d,m]=(0,r.useState)(null),p=()=>{c(null),m(null)};return(0,t.jsxs)(E.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm font-medium",children:"Prompt messages"}),(0,t.jsxs)(P.Text,{className:"text-gray-500 text-xs mt-1",children:["Use ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"{{variable}}"})," syntax for template variables"]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.map((r,a)=>(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{c(a)},onDragOver:e=>{e.preventDefault(),m(a)},onDrop:e=>{e.preventDefault(),null!==i&&i!==a&&o(i,a),c(null),m(null)},onDragEnd:p,className:`border border-gray-300 rounded overflow-hidden bg-white transition-all ${i===a?"opacity-50":""} ${d===a&&i!==a?"border-blue-500 border-2":""}`,children:[(0,t.jsxs)("div",{className:"bg-gray-50 px-2 py-1.5 border-b border-gray-300 flex items-center justify-between",children:[(0,t.jsxs)(l.Select,{value:r.role,onChange:e=>n(a,"role",e),style:{width:100},size:"small",bordered:!1,children:[(0,t.jsx)(eS,{value:"user",children:"User"}),(0,t.jsx)(eS,{value:"assistant",children:"Assistant"}),(0,t.jsx)(eS,{value:"system",children:"System"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[e.length>1&&(0,t.jsx)("button",{onClick:()=>s(a),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})}),(0,t.jsx)("div",{className:"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600",children:(0,t.jsx)(ek,{size:16})})]})]}),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)(e$,{value:r.content,onChange:e=>n(a,"content",e),rows:3,placeholder:"Enter prompt content..."})})]},a))}),(0,t.jsxs)("button",{onClick:a,className:"mt-2 text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add message"]})]})};var eT=e.i(447593);let eE=({extractedVariables:e,variables:r,onVariableChange:a})=>0===e.length?null:(0,t.jsxs)("div",{className:"p-4 border-b border-gray-200 bg-blue-50",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Fill in template variables to start testing"}),(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs text-gray-600 mb-1 font-medium",children:["{{",e,"}}"]}),(0,t.jsx)(ei.Input,{value:r[e]||"",onChange:t=>a(e,t.target.value),placeholder:`Enter value for ${e}`,size:"small"})]},e))})]});var eO=e.i(56456),eP=e.i(482725),eI=e.i(983561);let eB=({hasVariables:e})=>(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(eI.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)("span",{className:"text-base",children:e?"Fill in the variables above, then type a message to start testing":"Type a message below to start testing your prompt"})]});var ez=e.i(771674),eD=e.i(918789),eM=e.i(989022);let eR=({message:e})=>(0,t.jsx)("div",{className:`mb-4 flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,t.jsxs)("div",{className:"max-w-[85%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===e.role?"#f0f8ff":"#ffffff",border:"user"===e.role?"1px solid #e6f0fa":"1px solid #f0f0f0"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===e.role?"#e6f0fa":"#f5f5f5"},children:"user"===e.role?(0,t.jsx)(ez.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(eI.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:["assistant"===e.role?(0,t.jsx)(eD.default,{components:{code({node:e,inline:r,className:a,children:n,...l}){let s=/language-(\w+)/.exec(a||"");return!r&&s?(0,t.jsx)(X.Prism,{style:G.coy,language:s[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...l,children:String(n).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${a} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...l,children:n})},pre:({node:e,...r})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...r})},children:e.content}):(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:e.content}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&(0,t.jsx)(eM.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage})]})]})}),eA=({messages:e,isLoading:r,hasVariables:a,messagesEndRef:n})=>{let l=(0,t.jsx)(eO.LoadingOutlined,{style:{fontSize:24},spin:!0});return(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 pb-0",children:[0===e.length&&(0,t.jsx)(eB,{hasVariables:a}),e.map((e,r)=>(0,t.jsx)(eR,{message:e},r)),r&&(0,t.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,t.jsx)(eP.Spin,{indicator:l})}),(0,t.jsx)("div",{ref:n,style:{height:"1px"}})]})},eL=({extractedVariables:e,variables:r})=>{let a=e.filter(e=>!r[e]||""===r[e].trim());return 0===a.length?null:(0,t.jsx)("div",{className:"mb-3 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:"text-yellow-600 text-sm",children:"⚠️"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm text-yellow-800 font-medium mb-1",children:"Please fill in all template variables above"}),(0,t.jsxs)("p",{className:"text-xs text-yellow-700",children:["Missing: ",a.map(e=>`{{${e}}}`).join(", ")]})]})]})})};var eH=e.i(132104);let{TextArea:eF}=ei.Input,eW=({inputMessage:e,isLoading:r,isDisabled:n,onInputChange:l,onSend:s,onKeyDown:o,onCancel:i})=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,t.jsx)(eF,{value:e,onChange:e=>l(e.target.value),onKeyDown:o,placeholder:"Type your message... (Shift+Enter for new line)",disabled:r,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,t.jsx)(a.Button,{onClick:s,disabled:n,className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,t.jsx)(eH.ArrowUpOutlined,{style:{fontSize:"14px"}})})]}),r&&(0,t.jsx)(a.Button,{onClick:i,className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",children:"Cancel"})]}),eU=({prompt:e,accessToken:n})=>{let{isLoading:l,messages:o,inputMessage:i,variables:c,variablesFilled:d,extractedVariables:m,allVariablesFilled:p,messagesEndRef:u,setInputMessage:x,handleSendMessage:h,handleCancelRequest:g,handleClearConversation:f,handleKeyDown:v,handleVariableChange:b}=((e,t)=>{let[a,n]=(0,r.useState)(!1),[l,o]=(0,r.useState)([]),[i,c]=(0,r.useState)(""),[d,m]=(0,r.useState)({}),[p,u]=(0,r.useState)(!1),[x,h]=(0,r.useState)(null),g=(0,r.useRef)(null),f=N(e),v=f.every(e=>d[e]&&""!==d[e].trim());(0,r.useEffect)(()=>{g.current&&setTimeout(()=>{g.current?.scrollIntoView({behavior:"smooth",block:"end"})},100)},[l]);let b=async()=>{let r;if(!t)return void J.default.fromBackend("Access token is required");if(f.length>0&&!v)return void J.default.fromBackend("Please fill in all template variables");if(!i.trim())return;!p&&f.length>0&&u(!0);let a={role:"user",content:i};o(e=>[...e,a]),c("");let m=new AbortController;h(m),n(!0);let x=Date.now();try{let a,n,c=w(e),p=(0,s.getProxyBaseUrl)(),u={dotprompt_content:c};0===l.length?u.prompt_variables=d:u.conversation_history=[...l.map(e=>({role:e.role,content:e.content})),{role:"user",content:i}];let h=await fetch(`${p}/prompts/test`,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(u),signal:m.signal});if(!h.ok){let e=await h.text();throw Error(`HTTP error! status: ${h.status}, ${e}`)}if(!h.body)throw Error("No response body");let g=h.body.getReader(),f=new TextDecoder,v="";for(o(e=>[...e,{role:"assistant",content:""}]);;){let{done:e,value:t}=await g.read();if(e)break;for(let e of f.decode(t).split("\n"))if(e.startsWith("data: ")){let t=e.slice(6);if("[DONE]"===t)continue;try{let e=JSON.parse(t);!a&&e.model&&(a=e.model),e.usage&&(n=e.usage);let l=e.choices?.[0]?.delta?.content;l&&(r||(r=Date.now()-x),v+=l,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",content:v,model:a,timeToFirstToken:r},t}))}catch(e){console.error("Error parsing chunk:",e)}}}let b=Date.now()-x;o(e=>{let t=[...e];return t[t.length-1]={...t[t.length-1],totalLatency:b,usage:n},t})}catch(e){"AbortError"===e.name?console.log("Request was cancelled"):(console.error("Error testing prompt:",e),o(t=>{let r=t[t.length-1];return r&&"assistant"===r.role&&""===r.content?[...t.slice(0,-1),{role:"assistant",content:`Error: ${e.message}`}]:[...t,{role:"assistant",content:`Error: ${e.message}`}]}))}finally{n(!1),h(null)}};return{isLoading:a,messages:l,inputMessage:i,variables:d,variablesFilled:p,extractedVariables:f,allVariablesFilled:v,messagesEndRef:g,setInputMessage:c,handleSendMessage:b,handleCancelRequest:()=>{x&&(x.abort(),h(null),n(!1),J.default.info("Request cancelled"))},handleClearConversation:()=>{o([]),u(!1),J.default.success("Chat history cleared.")},handleKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),b())},handleVariableChange:(e,t)=>{m({...d,[e]:t})}}})(e,n);return(0,t.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[!d&&(0,t.jsx)(eE,{extractedVariables:m,variables:c,onVariableChange:b}),o.length>0&&(0,t.jsx)("div",{className:"p-3 border-b border-gray-200 bg-white flex justify-end",children:(0,t.jsx)(a.Button,{onClick:f,className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:eT.ClearOutlined,children:"Clear Chat"})}),(0,t.jsx)(eA,{messages:o,isLoading:l,hasVariables:m.length>0,messagesEndRef:u}),(0,t.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[(0,t.jsx)(eL,{extractedVariables:m,variables:c}),(0,t.jsx)(eW,{inputMessage:i,isLoading:l,isDisabled:l||!i.trim()||m.length>0&&!p,onInputChange:x,onSend:h,onKeyDown:v,onCancel:g})]})]})},eV=({visible:e,promptName:r,isSaving:l,onNameChange:s,onPublish:o,onCancel:i})=>(0,t.jsx)(n.Modal,{title:"Publish Prompt",open:e,onCancel:i,footer:[(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(a.Button,{variant:"secondary",onClick:i,children:"Cancel"}),(0,t.jsx)(a.Button,{onClick:o,loading:l,children:"Publish"})]},"footer")],children:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)(P.Text,{className:"mb-2",children:"Name"}),(0,t.jsx)(ei.Input,{value:r,onChange:e=>s(e.target.value),placeholder:"Enter prompt name",onPressEnter:o,autoFocus:!0}),(0,t.jsx)(P.Text,{className:"text-gray-500 text-xs mt-2",children:"Published prompts can be used in API calls and are versioned for easy tracking."})]})}),eJ=({prompt:e})=>{let r=w(e);return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Generated .prompt file"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This is the dotprompt format that will be saved to the database"})]}),(0,t.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-900 font-mono whitespace-pre-wrap",children:r})})]})};var eK=e.i(608856),eq=e.i(573421),eX=e.i(981339);let{Text:eG}=e.i(898586).Typography,eY=({isOpen:e,onClose:a,accessToken:n,promptId:l,activeVersionId:o,onSelectVersion:i})=>{let[c,d]=(0,r.useState)([]),[m,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e&&n&&l&&u()},[e,n,l]);let u=async()=>{p(!0);try{let e=l.includes(".v")?l.split(".v")[0]:l,t=await (0,s.getPromptVersions)(n,e);d(t.prompts)}catch(e){console.error("Error fetching prompt versions:",e)}finally{p(!1)}},x=e=>{if(e.version)return`v${e.version}`;let t=e.litellm_params?.prompt_id||e.prompt_id;return t.includes(".v")?`v${t.split(".v")[1]}`:t.includes("_v")?`v${t.split("_v")[1]}`:"v1"};return(0,t.jsx)(eK.Drawer,{title:"Version History",placement:"right",onClose:a,open:e,width:400,mask:!1,maskClosable:!1,children:m?(0,t.jsx)(eX.Skeleton,{active:!0,paragraph:{rows:4}}):0===c.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No version history available."}):(0,t.jsx)(eq.List,{dataSource:c,renderItem:(e,r)=>{var a;let n=e.version||parseInt(x(e).replace("v","")),l=null;o&&(o.includes(".v")?l=parseInt(o.split(".v")[1]):o.includes("_v")&&(l=parseInt(o.split("_v")[1])));let s=l?n===l:0===r;return(0,t.jsxs)("div",{className:`mb-4 p-4 rounded-lg border cursor-pointer transition-all hover:shadow-md ${s?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,onClick:()=>i?.(e),children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ej.Tag,{className:"m-0",children:x(e)}),0===r&&(0,t.jsx)(ej.Tag,{color:"blue",className:"m-0",children:"Latest"})]}),s&&(0,t.jsx)(ej.Tag,{color:"green",className:"m-0",children:"Active"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(eG,{className:"text-sm text-gray-600 font-medium",children:(a=e.created_at)?new Date(a).toLocaleString():"-"}),(0,t.jsx)(eG,{type:"secondary",className:"text-xs",children:e.prompt_info?.prompt_type==="db"?"Saved to Database":"Config Prompt"})]})]},`${e.prompt_id}-v${e.version||n}`)}})})},eZ=({onClose:e,onSuccess:a,accessToken:n,initialPromptData:l})=>{let[o,i]=(0,r.useState)((()=>{if(l)try{return C(l)}catch(e){console.error("Error parsing existing prompt:",e),J.default.fromBackend("Failed to parse prompt data")}return{name:"New prompt",model:"gpt-4o",config:{temperature:1,max_tokens:1e3},tools:[],developerMessage:"",messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}],environment:"development"}})()),[c,d]=(0,r.useState)(!!l),[m,p]=(0,r.useState)(!1),[u,x]=(0,r.useState)((()=>{if(!l?.prompt_spec)return;let e=l.prompt_spec.prompt_id,t=l.prompt_spec.version||l.prompt_spec.litellm_params?.prompt_id;return"number"==typeof t?`${e}.v${t}`:"string"==typeof t&&(t.includes(".v")||t.includes("_v"))?t:e})()),[h,g]=(0,r.useState)(!1),[f,v]=(0,r.useState)(!1),[b,y]=(0,r.useState)(null),[j,N]=(0,r.useState)(!1),[$,k]=(0,r.useState)("pretty"),S=e=>{void 0!==e?y(e):y(null),g(!0)},_=async()=>{if(!n)return void J.default.fromBackend("Access token is required");if(!o.name||""===o.name.trim())return void J.default.fromBackend("Please enter a valid prompt name");N(!0);try{let t=o.name.replace(/[^a-zA-Z0-9_-]/g,"_").toLowerCase(),r=w(o),i={prompt_id:t,litellm_params:{prompt_integration:"dotprompt",prompt_id:t,dotprompt_content:r},prompt_info:{prompt_type:"db",environment:o.environment}};c&&l?.prompt_spec?.prompt_id?(await (0,s.updatePromptCall)(n,l.prompt_spec.prompt_id,i),J.default.success("Prompt updated successfully!")):(await (0,s.createPromptCall)(n,i),J.default.success("Prompt created successfully!")),a(),e()}catch(e){console.error("Error saving prompt:",e),J.default.fromBackend(c?"Failed to update prompt":"Failed to save prompt")}finally{N(!1),v(!1)}},T=u&&u.includes(".v")?`v${u.split(".v")[1]}`:null;return(0,t.jsxs)("div",{className:"flex h-full bg-white",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,t.jsx)(eu,{promptName:o.name,onNameChange:e=>i({...o,name:e}),onBack:e,onSave:()=>{o.name&&""!==o.name.trim()&&"New prompt"!==o.name?_():v(!0)},isSaving:j,editMode:c,onShowHistory:()=>p(!0),version:T,promptModel:o.model,promptVariables:(()=>{let e,t={},r=[o.developerMessage,...o.messages.map(e=>e.content)].join(" "),a=/\{\{(\w+)\}\}/g;for(;null!==(e=a.exec(r));){let r=e[1];t[r]||(t[r]=`example_${r}`)}return t})(),accessToken:n,environment:o.environment,onEnvironmentChange:async e=>{if(i({...o,environment:e}),c&&n&&l?.prompt_spec?.prompt_id)try{let t=await (0,s.getPromptInfo)(n,l.prompt_spec.prompt_id,e);if(t?.prompt_spec){let r=C(t);i({...r,environment:e});let a=t.prompt_spec.version||1;x(`${t.prompt_spec.prompt_id}.v${a}`)}}catch{}}}),(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsxs)("div",{className:"w-1/2 overflow-y-auto bg-white border-r border-gray-200 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"border-b border-gray-200 bg-white px-6 py-4 flex items-center gap-3",children:[(0,t.jsx)(eg,{model:o.model,temperature:o.config.temperature,maxTokens:o.config.max_tokens,accessToken:n,onModelChange:e=>i({...o,model:e}),onTemperatureChange:e=>i({...o,config:{...o.config,temperature:e}}),onMaxTokensChange:e=>i({...o,config:{...o.config,max_tokens:e}})}),(0,t.jsxs)("div",{className:"ml-auto inline-flex items-center bg-gray-200 rounded-full p-0.5",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"pretty"===$?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("pretty"),children:"PRETTY"}),(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"dotprompt"===$?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("dotprompt"),children:"DOTPROMPT"})]})]}),"pretty"===$?(0,t.jsxs)("div",{className:"p-6 space-y-4 pb-20",children:[(0,t.jsx)(eb,{tools:o.tools,onAddTool:()=>S(),onEditTool:S,onRemoveTool:e=>{i({...o,tools:o.tools.filter((t,r)=>r!==e)})}}),(0,t.jsx)(eC,{value:o.developerMessage,onChange:e=>i({...o,developerMessage:e})}),(0,t.jsx)(e_,{messages:o.messages,onAddMessage:()=>{i({...o,messages:[...o.messages,{role:"user",content:""}]})},onUpdateMessage:(e,t,r)=>{let a=[...o.messages];a[e][t]=r,i({...o,messages:a})},onRemoveMessage:e=>{o.messages.length>1&&i({...o,messages:o.messages.filter((t,r)=>r!==e)})},onMoveMessage:(e,t)=>{let r=[...o.messages],[a]=r.splice(e,1);r.splice(t,0,a),i({...o,messages:r})}})]}):(0,t.jsx)(eJ,{prompt:o})]}),(0,t.jsx)("div",{className:"w-1/2 flex-shrink-0",children:(0,t.jsx)(eU,{prompt:o,accessToken:n})})]})]}),(0,t.jsx)(eV,{visible:f,promptName:o.name,isSaving:j,onNameChange:e=>i({...o,name:e}),onPublish:_,onCancel:()=>v(!1)}),h&&(0,t.jsx)(eo,{visible:h,initialJson:null!==b?o.tools[b].json:"",onSave:e=>{try{let t=JSON.parse(e),r={name:t.function?.name||"Unnamed Tool",description:t.function?.description||"",json:e};if(null!==b){let e=[...o.tools];e[b]=r,i({...o,tools:e})}else i({...o,tools:[...o.tools,r]});g(!1),y(null)}catch(e){J.default.fromBackend("Invalid JSON format")}},onClose:()=>{g(!1),y(null)}}),(0,t.jsx)(eY,{isOpen:m,onClose:()=>p(!1),accessToken:n,promptId:l?.prompt_spec?.prompt_id||o.name,activeVersionId:u,onSelectVersion:e=>{try{let t=C({prompt_spec:e});i(t);let r=e.version||1;x(`${e.prompt_id}.v${r}`)}catch(e){console.error("Error loading version:",e),J.default.fromBackend("Failed to load prompt version")}}})]})};var eQ=e.i(708347);e.s(["default",0,({accessToken:e,userRole:o})=>{let[i,c]=(0,r.useState)([]),[d,m]=(0,r.useState)(!1),[p,u]=(0,r.useState)(void 0),[x,h]=(0,r.useState)(null),[g,f]=(0,r.useState)(!1),[v,b]=(0,r.useState)(!1),[y,j]=(0,r.useState)(null),[N,w]=(0,r.useState)(!1),[$,C]=(0,r.useState)(null),k=!!o&&(0,eQ.isAdminRole)(o),S=async()=>{if(e){m(!0);try{let t=await (0,s.getPromptsList)(e,p);console.log(`prompts: ${JSON.stringify(t)}`),c(t.prompts)}catch(e){console.error("Error fetching prompts:",e)}finally{m(!1)}}};(0,r.useEffect)(()=>{S()},[e,p]);let _=()=>{S(),b(!1),j(null),h(null)},E=async()=>{if($&&e){w(!0);try{await (0,s.deletePromptCall)(e,$.id),J.default.success(`Prompt "${$.name}" deleted successfully`),S()}catch(e){console.error("Error deleting prompt:",e),J.default.fromBackend("Failed to delete prompt")}finally{w(!1),C(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[v?(0,t.jsx)(eZ,{onClose:()=>{b(!1),j(null)},onSuccess:_,accessToken:e,initialPromptData:y}):x?(0,t.jsx)(Z,{promptId:x,onClose:()=>h(null),accessToken:e,isAdmin:k,onDelete:S,onEdit:e=>{j(e),b(!0)}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(a.Button,{onClick:()=>{x&&h(null),j(null),b(!0)},disabled:!e,children:"+ Add New Prompt"}),(0,t.jsx)(a.Button,{onClick:()=>{x&&h(null),f(!0)},disabled:!e,variant:"secondary",children:"Upload .prompt File"})]}),(0,t.jsx)(l.Select,{placeholder:"All Environments",allowClear:!0,value:p,onChange:e=>u(e),style:{width:180},options:[{label:"Development",value:"development"},{label:"Staging",value:"staging"},{label:"Production",value:"production"}]})]}),(0,t.jsx)(T,{promptsList:i,isLoading:d,onPromptClick:e=>{h(e)},onDeleteClick:(e,t)=>{C({id:e,name:t})},accessToken:e,isAdmin:k})]}),(0,t.jsx)(el,{visible:g,onClose:()=>{f(!1)},accessToken:e,onSuccess:_}),$&&(0,t.jsxs)(n.Modal,{title:"Delete Prompt",open:null!==$,onOk:E,onCancel:()=>{C(null)},confirmLoading:N,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",$.name," ?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],191403)}]); \ No newline at end of file + `}),(0,t.jsx)(ew,{value:e,onChange:e=>n(e.target.value),placeholder:a,rows:l,className:"font-sans"}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 items-center",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Detected variables:"}),p.map((e,r)=>(0,t.jsx)(ey.Popover,{content:(0,t.jsxs)("div",{className:"p-2",style:{minWidth:"200px"},children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"Edit variable name"}),(0,t.jsx)(ei.Input,{size:"small",value:c,onChange:e=>d(e.target.value),onPressEnter:m,placeholder:"Variable name",autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,t.jsx)("button",{onClick:m,className:"text-xs px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save"}),(0,t.jsx)("button",{onClick:()=>{i(null),d("")},className:"text-xs px-2 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:"Cancel"})]})]}),open:o?.start===e.start,onOpenChange:e=>{e||(i(null),d(""))},trigger:"click",children:(0,t.jsx)(ej.Tag,{color:"orange",className:"cursor-pointer hover:opacity-80 transition-all m-0",icon:(0,t.jsx)(eN.EditOutlined,{}),onClick:()=>{i({oldName:e.name,start:e.start,end:e.end}),d(e.name)},children:e.name})},`${e.start}-${r}`))]})]})},eC=({value:e,onChange:r})=>(0,t.jsxs)(E.Card,{className:"p-3",children:[(0,t.jsx)(P.Text,{className:"block mb-2 text-sm font-medium",children:"Developer message"}),(0,t.jsx)(P.Text,{className:"text-gray-500 text-xs mb-2",children:"Optional system instructions for the model"}),(0,t.jsx)(e$,{value:e,onChange:r,rows:3,placeholder:"e.g., You are a helpful assistant..."})]}),ek=(0,ec.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),{Option:eS}=l.Select,e_=({messages:e,onAddMessage:n,onUpdateMessage:a,onRemoveMessage:s,onMoveMessage:o})=>{let[i,c]=(0,r.useState)(null),[d,m]=(0,r.useState)(null),p=()=>{c(null),m(null)};return(0,t.jsxs)(E.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm font-medium",children:"Prompt messages"}),(0,t.jsxs)(P.Text,{className:"text-gray-500 text-xs mt-1",children:["Use ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"{{variable}}"})," syntax for template variables"]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.map((r,n)=>(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{c(n)},onDragOver:e=>{e.preventDefault(),m(n)},onDrop:e=>{e.preventDefault(),null!==i&&i!==n&&o(i,n),c(null),m(null)},onDragEnd:p,className:`border border-gray-300 rounded overflow-hidden bg-white transition-all ${i===n?"opacity-50":""} ${d===n&&i!==n?"border-blue-500 border-2":""}`,children:[(0,t.jsxs)("div",{className:"bg-gray-50 px-2 py-1.5 border-b border-gray-300 flex items-center justify-between",children:[(0,t.jsxs)(l.Select,{value:r.role,onChange:e=>a(n,"role",e),style:{width:100},size:"small",bordered:!1,children:[(0,t.jsx)(eS,{value:"user",children:"User"}),(0,t.jsx)(eS,{value:"assistant",children:"Assistant"}),(0,t.jsx)(eS,{value:"system",children:"System"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[e.length>1&&(0,t.jsx)("button",{onClick:()=>s(n),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})}),(0,t.jsx)("div",{className:"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600",children:(0,t.jsx)(ek,{size:16})})]})]}),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)(e$,{value:r.content,onChange:e=>a(n,"content",e),rows:3,placeholder:"Enter prompt content..."})})]},n))}),(0,t.jsxs)("button",{onClick:n,className:"mt-2 text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add message"]})]})};var eT=e.i(447593);let eE=({extractedVariables:e,variables:r,onVariableChange:n})=>0===e.length?null:(0,t.jsxs)("div",{className:"p-4 border-b border-gray-200 bg-blue-50",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Fill in template variables to start testing"}),(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs text-gray-600 mb-1 font-medium",children:["{{",e,"}}"]}),(0,t.jsx)(ei.Input,{value:r[e]||"",onChange:t=>n(e,t.target.value),placeholder:`Enter value for ${e}`,size:"small"})]},e))})]});var eO=e.i(56456),eP=e.i(482725),eI=e.i(983561);let eB=({hasVariables:e})=>(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(eI.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)("span",{className:"text-base",children:e?"Fill in the variables above, then type a message to start testing":"Type a message below to start testing your prompt"})]});var ez=e.i(771674),eD=e.i(918789),eM=e.i(989022);let eR=({message:e})=>(0,t.jsx)("div",{className:`mb-4 flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,t.jsxs)("div",{className:"max-w-[85%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===e.role?"#f0f8ff":"#ffffff",border:"user"===e.role?"1px solid #e6f0fa":"1px solid #f0f0f0"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===e.role?"#e6f0fa":"#f5f5f5"},children:"user"===e.role?(0,t.jsx)(ez.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(eI.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:["assistant"===e.role?(0,t.jsx)(eD.default,{components:{code({node:e,inline:r,className:n,children:a,...l}){let s=/language-(\w+)/.exec(n||"");return!r&&s?(0,t.jsx)(X.Prism,{style:G.coy,language:s[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...l,children:String(a).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${n} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...l,children:a})},pre:({node:e,...r})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...r})},children:e.content}):(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:e.content}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&(0,t.jsx)(eM.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage})]})]})}),eA=({messages:e,isLoading:r,hasVariables:n,messagesEndRef:a})=>{let l=(0,t.jsx)(eO.LoadingOutlined,{style:{fontSize:24},spin:!0});return(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 pb-0",children:[0===e.length&&(0,t.jsx)(eB,{hasVariables:n}),e.map((e,r)=>(0,t.jsx)(eR,{message:e},r)),r&&(0,t.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,t.jsx)(eP.Spin,{indicator:l})}),(0,t.jsx)("div",{ref:a,style:{height:"1px"}})]})},eL=({extractedVariables:e,variables:r})=>{let n=e.filter(e=>!r[e]||""===r[e].trim());return 0===n.length?null:(0,t.jsx)("div",{className:"mb-3 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:"text-yellow-600 text-sm",children:"⚠️"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm text-yellow-800 font-medium mb-1",children:"Please fill in all template variables above"}),(0,t.jsxs)("p",{className:"text-xs text-yellow-700",children:["Missing: ",n.map(e=>`{{${e}}}`).join(", ")]})]})]})})};var eH=e.i(132104);let{TextArea:eF}=ei.Input,eW=({inputMessage:e,isLoading:r,isDisabled:a,onInputChange:l,onSend:s,onKeyDown:o,onCancel:i})=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,t.jsx)(eF,{value:e,onChange:e=>l(e.target.value),onKeyDown:o,placeholder:"Type your message... (Shift+Enter for new line)",disabled:r,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,t.jsx)(n.Button,{onClick:s,disabled:a,className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,t.jsx)(eH.ArrowUpOutlined,{style:{fontSize:"14px"}})})]}),r&&(0,t.jsx)(n.Button,{onClick:i,className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",children:"Cancel"})]}),eU=({prompt:e,accessToken:a})=>{let{isLoading:l,messages:o,inputMessage:i,variables:c,variablesFilled:d,extractedVariables:m,allVariablesFilled:p,messagesEndRef:u,setInputMessage:x,handleSendMessage:h,handleCancelRequest:g,handleClearConversation:f,handleKeyDown:v,handleVariableChange:b}=((e,t)=>{let[n,a]=(0,r.useState)(!1),[l,o]=(0,r.useState)([]),[i,c]=(0,r.useState)(""),[d,m]=(0,r.useState)({}),[p,u]=(0,r.useState)(!1),[x,h]=(0,r.useState)(null),g=(0,r.useRef)(null),f=N(e),v=f.every(e=>d[e]&&""!==d[e].trim());(0,r.useEffect)(()=>{g.current&&setTimeout(()=>{g.current?.scrollIntoView({behavior:"smooth",block:"end"})},100)},[l]);let b=async()=>{let r;if(!t)return void J.default.fromBackend("Access token is required");if(f.length>0&&!v)return void J.default.fromBackend("Please fill in all template variables");if(!i.trim())return;!p&&f.length>0&&u(!0);let n={role:"user",content:i};o(e=>[...e,n]),c("");let m=new AbortController;h(m),a(!0);let x=Date.now();try{let n,a,c=w(e),p=(0,s.getProxyBaseUrl)(),u={dotprompt_content:c};0===l.length?u.prompt_variables=d:u.conversation_history=[...l.map(e=>({role:e.role,content:e.content})),{role:"user",content:i}];let h=await fetch(`${p}/prompts/test`,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(u),signal:m.signal});if(!h.ok){let e=await h.text();throw Error(`HTTP error! status: ${h.status}, ${e}`)}if(!h.body)throw Error("No response body");let g=h.body.getReader(),f=new TextDecoder,v="";for(o(e=>[...e,{role:"assistant",content:""}]);;){let{done:e,value:t}=await g.read();if(e)break;for(let e of f.decode(t).split("\n"))if(e.startsWith("data: ")){let t=e.slice(6);if("[DONE]"===t)continue;try{let e=JSON.parse(t);!n&&e.model&&(n=e.model),e.usage&&(a=e.usage);let l=e.choices?.[0]?.delta?.content;l&&(r||(r=Date.now()-x),v+=l,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",content:v,model:n,timeToFirstToken:r},t}))}catch(e){console.error("Error parsing chunk:",e)}}}let b=Date.now()-x;o(e=>{let t=[...e];return t[t.length-1]={...t[t.length-1],totalLatency:b,usage:a},t})}catch(e){"AbortError"===e.name?console.log("Request was cancelled"):(console.error("Error testing prompt:",e),o(t=>{let r=t[t.length-1];return r&&"assistant"===r.role&&""===r.content?[...t.slice(0,-1),{role:"assistant",content:`Error: ${e.message}`}]:[...t,{role:"assistant",content:`Error: ${e.message}`}]}))}finally{a(!1),h(null)}};return{isLoading:n,messages:l,inputMessage:i,variables:d,variablesFilled:p,extractedVariables:f,allVariablesFilled:v,messagesEndRef:g,setInputMessage:c,handleSendMessage:b,handleCancelRequest:()=>{x&&(x.abort(),h(null),a(!1),J.default.info("Request cancelled"))},handleClearConversation:()=>{o([]),u(!1),J.default.success("Chat history cleared.")},handleKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),b())},handleVariableChange:(e,t)=>{m({...d,[e]:t})}}})(e,a);return(0,t.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[!d&&(0,t.jsx)(eE,{extractedVariables:m,variables:c,onVariableChange:b}),o.length>0&&(0,t.jsx)("div",{className:"p-3 border-b border-gray-200 bg-white flex justify-end",children:(0,t.jsx)(n.Button,{onClick:f,className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:eT.ClearOutlined,children:"Clear Chat"})}),(0,t.jsx)(eA,{messages:o,isLoading:l,hasVariables:m.length>0,messagesEndRef:u}),(0,t.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[(0,t.jsx)(eL,{extractedVariables:m,variables:c}),(0,t.jsx)(eW,{inputMessage:i,isLoading:l,isDisabled:l||!i.trim()||m.length>0&&!p,onInputChange:x,onSend:h,onKeyDown:v,onCancel:g})]})]})},eV=({visible:e,promptName:r,isSaving:l,onNameChange:s,onPublish:o,onCancel:i})=>(0,t.jsx)(a.Modal,{title:"Publish Prompt",open:e,onCancel:i,footer:[(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(n.Button,{variant:"secondary",onClick:i,children:"Cancel"}),(0,t.jsx)(n.Button,{onClick:o,loading:l,children:"Publish"})]},"footer")],children:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)(P.Text,{className:"mb-2",children:"Name"}),(0,t.jsx)(ei.Input,{value:r,onChange:e=>s(e.target.value),placeholder:"Enter prompt name",onPressEnter:o,autoFocus:!0}),(0,t.jsx)(P.Text,{className:"text-gray-500 text-xs mt-2",children:"Published prompts can be used in API calls and are versioned for easy tracking."})]})}),eJ=({prompt:e})=>{let r=w(e);return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Generated .prompt file"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This is the dotprompt format that will be saved to the database"})]}),(0,t.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-900 font-mono whitespace-pre-wrap",children:r})})]})};var eK=e.i(608856),eq=e.i(573421),eX=e.i(981339);let{Text:eG}=e.i(898586).Typography,eY=({isOpen:e,onClose:n,accessToken:a,promptId:l,activeVersionId:o,onSelectVersion:i})=>{let[c,d]=(0,r.useState)([]),[m,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e&&a&&l&&u()},[e,a,l]);let u=async()=>{p(!0);try{let e=l.includes(".v")?l.split(".v")[0]:l,t=await (0,s.getPromptVersions)(a,e);d(t.prompts)}catch(e){console.error("Error fetching prompt versions:",e)}finally{p(!1)}},x=e=>{if(e.version)return`v${e.version}`;let t=e.litellm_params?.prompt_id||e.prompt_id;return t.includes(".v")?`v${t.split(".v")[1]}`:t.includes("_v")?`v${t.split("_v")[1]}`:"v1"};return(0,t.jsx)(eK.Drawer,{title:"Version History",placement:"right",onClose:n,open:e,width:400,mask:!1,maskClosable:!1,children:m?(0,t.jsx)(eX.Skeleton,{active:!0,paragraph:{rows:4}}):0===c.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No version history available."}):(0,t.jsx)(eq.List,{dataSource:c,renderItem:(e,r)=>{var n;let a=e.version||parseInt(x(e).replace("v","")),l=null;o&&(o.includes(".v")?l=parseInt(o.split(".v")[1]):o.includes("_v")&&(l=parseInt(o.split("_v")[1])));let s=l?a===l:0===r;return(0,t.jsxs)("div",{className:`mb-4 p-4 rounded-lg border cursor-pointer transition-all hover:shadow-md ${s?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,onClick:()=>i?.(e),children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ej.Tag,{className:"m-0",children:x(e)}),0===r&&(0,t.jsx)(ej.Tag,{color:"blue",className:"m-0",children:"Latest"})]}),s&&(0,t.jsx)(ej.Tag,{color:"green",className:"m-0",children:"Active"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(eG,{className:"text-sm text-gray-600 font-medium",children:(n=e.created_at)?new Date(n).toLocaleString():"-"}),(0,t.jsx)(eG,{type:"secondary",className:"text-xs",children:e.prompt_info?.prompt_type==="db"?"Saved to Database":"Config Prompt"})]})]},`${e.prompt_id}-v${e.version||a}`)}})})},eZ=({onClose:e,onSuccess:n,accessToken:a,initialPromptData:l})=>{let[o,i]=(0,r.useState)((()=>{if(l)try{return C(l)}catch(e){console.error("Error parsing existing prompt:",e),J.default.fromBackend("Failed to parse prompt data")}return{name:"New prompt",model:"gpt-4o",config:{temperature:1,max_tokens:1e3},tools:[],developerMessage:"",messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}],environment:"development"}})()),[c,d]=(0,r.useState)(!!l),[m,p]=(0,r.useState)(!1),[u,x]=(0,r.useState)((()=>{if(!l?.prompt_spec)return;let e=l.prompt_spec.prompt_id,t=l.prompt_spec.version||l.prompt_spec.litellm_params?.prompt_id;return"number"==typeof t?`${e}.v${t}`:"string"==typeof t&&(t.includes(".v")||t.includes("_v"))?t:e})()),[h,g]=(0,r.useState)(!1),[f,v]=(0,r.useState)(!1),[b,y]=(0,r.useState)(null),[j,N]=(0,r.useState)(!1),[$,k]=(0,r.useState)("pretty"),S=e=>{void 0!==e?y(e):y(null),g(!0)},_=async()=>{if(!a)return void J.default.fromBackend("Access token is required");if(!o.name||""===o.name.trim())return void J.default.fromBackend("Please enter a valid prompt name");N(!0);try{let t=o.name.replace(/[^a-zA-Z0-9_-]/g,"_").toLowerCase(),r=w(o),i={prompt_id:t,litellm_params:{prompt_integration:"dotprompt",prompt_id:t,dotprompt_content:r},prompt_info:{prompt_type:"db",environment:o.environment}};c&&l?.prompt_spec?.prompt_id?(await (0,s.updatePromptCall)(a,l.prompt_spec.prompt_id,i),J.default.success("Prompt updated successfully!")):(await (0,s.createPromptCall)(a,i),J.default.success("Prompt created successfully!")),n(),e()}catch(e){console.error("Error saving prompt:",e),J.default.fromBackend(c?"Failed to update prompt":"Failed to save prompt")}finally{N(!1),v(!1)}},T=u&&u.includes(".v")?`v${u.split(".v")[1]}`:null;return(0,t.jsxs)("div",{className:"flex h-full bg-white",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,t.jsx)(eu,{promptName:o.name,onNameChange:e=>i({...o,name:e}),onBack:e,onSave:()=>{o.name&&""!==o.name.trim()&&"New prompt"!==o.name?_():v(!0)},isSaving:j,editMode:c,onShowHistory:()=>p(!0),version:T,promptModel:o.model,promptVariables:(()=>{let e,t={},r=[o.developerMessage,...o.messages.map(e=>e.content)].join(" "),n=/\{\{(\w+)\}\}/g;for(;null!==(e=n.exec(r));){let r=e[1];t[r]||(t[r]=`example_${r}`)}return t})(),accessToken:a,environment:o.environment,onEnvironmentChange:async e=>{if(i({...o,environment:e}),c&&a&&l?.prompt_spec?.prompt_id)try{let t=await (0,s.getPromptInfo)(a,l.prompt_spec.prompt_id,e);if(t?.prompt_spec){let r=C(t);i({...r,environment:e});let n=t.prompt_spec.version||1;x(`${t.prompt_spec.prompt_id}.v${n}`)}}catch{}}}),(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsxs)("div",{className:"w-1/2 overflow-y-auto bg-white border-r border-gray-200 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"border-b border-gray-200 bg-white px-6 py-4 flex items-center gap-3",children:[(0,t.jsx)(eg,{model:o.model,temperature:o.config.temperature,maxTokens:o.config.max_tokens,accessToken:a,onModelChange:e=>i({...o,model:e}),onTemperatureChange:e=>i({...o,config:{...o.config,temperature:e}}),onMaxTokensChange:e=>i({...o,config:{...o.config,max_tokens:e}})}),(0,t.jsxs)("div",{className:"ml-auto inline-flex items-center bg-gray-200 rounded-full p-0.5",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"pretty"===$?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("pretty"),children:"PRETTY"}),(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"dotprompt"===$?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("dotprompt"),children:"DOTPROMPT"})]})]}),"pretty"===$?(0,t.jsxs)("div",{className:"p-6 space-y-4 pb-20",children:[(0,t.jsx)(eb,{tools:o.tools,onAddTool:()=>S(),onEditTool:S,onRemoveTool:e=>{i({...o,tools:o.tools.filter((t,r)=>r!==e)})}}),(0,t.jsx)(eC,{value:o.developerMessage,onChange:e=>i({...o,developerMessage:e})}),(0,t.jsx)(e_,{messages:o.messages,onAddMessage:()=>{i({...o,messages:[...o.messages,{role:"user",content:""}]})},onUpdateMessage:(e,t,r)=>{let n=[...o.messages];n[e][t]=r,i({...o,messages:n})},onRemoveMessage:e=>{o.messages.length>1&&i({...o,messages:o.messages.filter((t,r)=>r!==e)})},onMoveMessage:(e,t)=>{let r=[...o.messages],[n]=r.splice(e,1);r.splice(t,0,n),i({...o,messages:r})}})]}):(0,t.jsx)(eJ,{prompt:o})]}),(0,t.jsx)("div",{className:"w-1/2 flex-shrink-0",children:(0,t.jsx)(eU,{prompt:o,accessToken:a})})]})]}),(0,t.jsx)(eV,{visible:f,promptName:o.name,isSaving:j,onNameChange:e=>i({...o,name:e}),onPublish:_,onCancel:()=>v(!1)}),h&&(0,t.jsx)(eo,{visible:h,initialJson:null!==b?o.tools[b].json:"",onSave:e=>{try{let t=JSON.parse(e),r={name:t.function?.name||"Unnamed Tool",description:t.function?.description||"",json:e};if(null!==b){let e=[...o.tools];e[b]=r,i({...o,tools:e})}else i({...o,tools:[...o.tools,r]});g(!1),y(null)}catch(e){J.default.fromBackend("Invalid JSON format")}},onClose:()=>{g(!1),y(null)}}),(0,t.jsx)(eY,{isOpen:m,onClose:()=>p(!1),accessToken:a,promptId:l?.prompt_spec?.prompt_id||o.name,activeVersionId:u,onSelectVersion:e=>{try{let t=C({prompt_spec:e});i(t);let r=e.version||1;x(`${e.prompt_id}.v${r}`)}catch(e){console.error("Error loading version:",e),J.default.fromBackend("Failed to load prompt version")}}})]})};var eQ=e.i(708347);e.s(["default",0,({accessToken:e,userRole:o})=>{let[i,c]=(0,r.useState)([]),[d,m]=(0,r.useState)(!1),[p,u]=(0,r.useState)(void 0),[x,h]=(0,r.useState)(null),[g,f]=(0,r.useState)(!1),[v,b]=(0,r.useState)(!1),[y,j]=(0,r.useState)(null),[N,w]=(0,r.useState)(!1),[$,C]=(0,r.useState)(null);o&&(0,eQ.isAdminRole)(o);let k=!!o&&(0,eQ.isProxyAdminRole)(o),S=async()=>{if(e){m(!0);try{let t=await (0,s.getPromptsList)(e,p);console.log(`prompts: ${JSON.stringify(t)}`),c(t.prompts)}catch(e){console.error("Error fetching prompts:",e)}finally{m(!1)}}};(0,r.useEffect)(()=>{S()},[e,p]);let _=()=>{S(),b(!1),j(null),h(null)},E=async()=>{if($&&e){w(!0);try{await (0,s.deletePromptCall)(e,$.id),J.default.success(`Prompt "${$.name}" deleted successfully`),S()}catch(e){console.error("Error deleting prompt:",e),J.default.fromBackend("Failed to delete prompt")}finally{w(!1),C(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[v?(0,t.jsx)(eZ,{onClose:()=>{b(!1),j(null)},onSuccess:_,accessToken:e,initialPromptData:y}):x?(0,t.jsx)(Z,{promptId:x,onClose:()=>h(null),accessToken:e,isAdmin:k,onDelete:S,onEdit:e=>{j(e),b(!0)}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)("div",{className:"flex gap-2",children:k&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Button,{onClick:()=>{x&&h(null),j(null),b(!0)},disabled:!e,children:"+ Add New Prompt"}),(0,t.jsx)(n.Button,{onClick:()=>{x&&h(null),f(!0)},disabled:!e,variant:"secondary",children:"Upload .prompt File"})]})}),(0,t.jsx)(l.Select,{placeholder:"All Environments",allowClear:!0,value:p,onChange:e=>u(e),style:{width:180},options:[{label:"Development",value:"development"},{label:"Staging",value:"staging"},{label:"Production",value:"production"}]})]}),(0,t.jsx)(T,{promptsList:i,isLoading:d,onPromptClick:e=>{h(e)},onDeleteClick:(e,t)=>{C({id:e,name:t})},accessToken:e,isAdmin:k})]}),(0,t.jsx)(el,{visible:g,onClose:()=>{f(!1)},accessToken:e,onSuccess:_}),$&&(0,t.jsxs)(a.Modal,{title:"Delete Prompt",open:null!==$,onOk:E,onCancel:()=>{C(null)},confirmLoading:N,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",$.name," ?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],191403)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/50d8a95e62930b35.js b/litellm/proxy/_experimental/out/_next/static/chunks/50d8a95e62930b35.js deleted file mode 100644 index f4d813955f..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/50d8a95e62930b35.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,91979,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ReloadOutlined",0,s],91979)},969550,e=>{"use strict";var t=e.i(843476),l=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var r=e.i(464571),s=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:d,initialValues:m={},buttonLabel:c="Filters"})=>{let[u,g]=(0,l.useState)(!1),[h,p]=(0,l.useState)(m),[x,b]=(0,l.useState)({}),[_,f]=(0,l.useState)({}),[y,j]=(0,l.useState)({}),[v,w]=(0,l.useState)({}),C=(0,l.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){f(e=>({...e,[t.name]:!0}));try{let l=await t.searchFn(e);b(e=>({...e,[t.name]:l}))}catch(e){console.error("Error searching:",e),b(e=>({...e,[t.name]:[]}))}finally{f(e=>({...e,[t.name]:!1}))}}},300),[]),S=(0,l.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!v[e.name]){f(t=>({...t,[e.name]:!0})),w(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");b(l=>({...l,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),b(t=>({...t,[e.name]:[]}))}finally{f(t=>({...t,[e.name]:!1}))}}},[v]);(0,l.useEffect)(()=>{u&&e.forEach(e=>{e.isSearchable&&!v[e.name]&&S(e)})},[u,e,S,v]);let T=(e,t)=>{let l={...h,[e]:t};p(l),o(l)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(r.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>g(!u),className:"flex items-center gap-2",children:c}),(0,t.jsx)(r.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),d()},children:"Reset Filters"})]}),u&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(l=>{let a,r=e.find(e=>e.label===l||e.name===l);return r?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:r.label||r.name}),r.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${r.label||r.name}...`,value:h[r.name]||void 0,onChange:e=>T(r.name,e),onOpenChange:e=>{e&&r.isSearchable&&!v[r.name]&&S(r)},onSearch:e=>{j(t=>({...t,[r.name]:e})),r.searchFn&&C(e,r)},filterOption:!1,loading:_[r.name],options:x[r.name]||[],allowClear:!0,notFoundContent:_[r.name]?"Loading...":"No results found"}):r.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${r.label||r.name}...`,value:h[r.name]||void 0,onChange:e=>T(r.name,e),allowClear:!0,children:r.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):r.customComponent?(a=r.customComponent,(0,t.jsx)(a,{value:h[r.name]||void 0,onChange:e=>T(r.name,e??""),placeholder:`Select ${r.label||r.name}...`,allFilters:h})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${r.label||r.name}...`,value:h[r.name]||"",onChange:e=>T(r.name,e.target.value),allowClear:!0})]},r.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let l=(e,t,l,a)=>{for(let r of e){let e=r?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=r?.organization_id??r?.org_id;s&&"string"==typeof s&&l.add(s.trim());let i=r?.user_id;if(i&&"string"==typeof i){let e=r?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let r=new Set,s=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],d=n?.total_pages??1;l(o,r,s,i);let m=Math.min(d,10)-1;if(m>0){let n=Array.from({length:m},(l,r)=>(0,t.keyListCall)(e,null,a,null,null,null,r+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&l(e.value?.keys||[],r,s,i)}return{keyAliases:Array.from(r).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},r=async(e,l)=>{if(!e)return[];try{let a=[],r=1,s=!0;for(;s;){let i=await (0,t.teamListCall)(e,l||null,null);a=[...a,...i],r{if(!e)return[];try{let l=[],a=1,r=!0;for(;r;){let s=await (0,t.organizationListCall)(e);l=[...l,...s],a{"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:"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"}))});e.s(["ClipboardCopyIcon",0,l],551332)},122577,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:"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,l],122577)},902555,e=>{"use strict";var t=e.i(843476),l=e.i(591935),a=e.i(122577),r=e.i(278587),s=e.i(68155),i=e.i(360820),n=e.i(871943),o=e.i(434626),d=e.i(551332),m=e.i(592968),c=e.i(115504),u=e.i(752978);function g({icon:e,onClick:l,className:a,disabled:r,dataTestId:s}){return r?(0,t.jsx)(u.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":s}):(0,t.jsx)(u.Icon,{icon:e,size:"sm",onClick:l,className:(0,c.cx)("cursor-pointer",a),"data-testid":s})}let h={Edit:{icon:l.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:r.RefreshIcon,className:"hover:text-green-600"},Up:{icon:i.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:n.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function p({onClick:e,tooltipText:l,disabled:a=!1,disabledTooltipText:r,dataTestId:s,variant:i}){let{icon:n,className:o}=h[i];return(0,t.jsx)(m.Tooltip,{title:a?r:l,children:(0,t.jsx)("span",{children:(0,t.jsx)(g,{icon:n,onClick:e,className:o,disabled:a,dataTestId:s})})})}e.s(["default",()=>p],902555)},434626,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 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,l],434626)},278587,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:"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,l],278587)},207670,e=>{"use strict";function t(){for(var e,t,l=0,a="",r=arguments.length;lt,"default",0,t])},728889,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(829087),r=e.i(480731),s=e.i(444755),i=e.i(673706),n=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"}},m={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"),u=l.default.forwardRef((e,u)=>{let{icon:g,variant:h="simple",tooltip:p,size:x=r.Sizes.SM,color:b,className:_}=e,f=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),y=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.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,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.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,n.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.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,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.getColorClassNames)(t,n.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,b),{tooltipProps:j,getReferenceProps:v}=(0,a.useTooltip)();return l.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([u,j.refs.setReference]),className:(0,s.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",y.bgColor,y.textColor,y.borderColor,y.ringColor,m[h].rounded,m[h].border,m[h].shadow,m[h].ring,o[x].paddingX,o[x].paddingY,_)},v,f),l.default.createElement(a.default,Object.assign({text:p},j)),l.default.createElement(g,{className:(0,s.tremorTwMerge)(c("icon"),"shrink-0",d[x].height,d[x].width)}))});u.displayName="Icon",e.s(["default",()=>u],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 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:"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,l],591935)},738014,e=>{"use strict";var t=e.i(135214),l=e.i(764205),a=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:s}=(0,t.default)();return(0,a.useQuery)({queryKey:r.detail(s),queryFn:async()=>await (0,l.userGetInfoV2)(e),enabled:!!(e&&s)})}])},625901,e=>{"use strict";var t=e.i(266027),l=e.i(621482),a=e.i(243652),r=e.i(764205),s=e.i(135214);let i=(0,a.createQueryKeys)("models"),n=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let d=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:l,userRole:a}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,r.modelAvailableCall)(e,l,a,!0,null,!0,!1,"expand"),enabled:!!(e&&l&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:i,userRole:n}=(0,s.default)();return(0,l.useInfiniteQuery)({queryKey:d.list({filters:{...i&&{userId:i},...n&&{userRole:n},size:e,...t&&{search:t}}}),queryFn:async({pageParam:l})=>await (0,r.modelInfoCall)(a,i,n,l,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,r.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,l=50,a,n,o,d,m)=>{let{accessToken:c,userId:u,userRole:g}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({filters:{...u&&{userId:u},...g&&{userRole:g},page:e,size:l,...a&&{search:a},...n&&{modelId:n},...o&&{teamId:o},...d&&{sortBy:d},...m&&{sortOrder:m}}}),queryFn:async()=>await (0,r.modelInfoCall)(c,u,g,e,l,a,n,o,d,m),enabled:!!(c&&u&&g)})}])},907308,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(212931),r=e.i(808613),s=e.i(464571),i=e.i(199133),n=e.i(592968),o=e.i(213205),d=e.i(374009),m=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:c,onSubmit:u,accessToken:g,title:h="Add Team Member",roles:p=[{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[_]=r.Form.useForm(),[f,y]=(0,l.useState)([]),[j,v]=(0,l.useState)(!1),[w,C]=(0,l.useState)("user_email"),[S,T]=(0,l.useState)(!1),N=async(e,t)=>{if(!e)return void y([]);v(!0);try{let l=new URLSearchParams;if(l.append(t,e),b&&l.append("team_id",b),null==g)return;let a=(await (0,m.userFilterUICall)(g,l)).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{v(!1)}},k=(0,l.useCallback)((0,d.default)((e,t)=>N(e,t),300),[]),I=(e,t)=>{C(t),k(e,t)},M=(e,t)=>{let l=t.user;_.setFieldsValue({user_email:l.user_email,user_id:l.user_id,role:_.getFieldValue("role")})},F=async e=>{T(!0);try{await u(e)}finally{T(!1)}};return(0,t.jsx)(a.Modal,{title:h,open:e,onCancel:()=>{_.resetFields(),y([]),c()},footer:null,width:800,maskClosable:!S,children:(0,t.jsxs)(r.Form,{form:_,onFinish:F,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:x},children:[(0,t.jsx)(r.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=>I(e,"user_email"),onSelect:(e,t)=>M(e,t),options:"user_email"===w?f:[],loading:j,allowClear:!0,"data-testid":"member-email-search"})}),(0,t.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,t.jsx)(r.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=>I(e,"user_id"),onSelect:(e,t)=>M(e,t),options:"user_id"===w?f:[],loading:j,allowClear:!0})}),(0,t.jsx)(r.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(i.Select,{defaultValue:x,children:p.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:(0,t.jsxs)(n.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:S,children:S?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var t=e.i(843476),l=e.i(625901),a=e.i(109799),r=e.i(785242),s=e.i(738014),i=e.i(199133),n=e.i(981339),o=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},m={label:"No Default Models",value:"no-default-models"},c=[d,m],u={user:({allProxyModels:e,userModels:t,options:l})=>t&&l?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:l})=>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(["ModelSelect",0,e=>{let{teamID:g,organizationID:h,options:p,context:x,dataTestId:b,value:_=[],onChange:f,style:y}=e,{includeUserModels:j,showAllTeamModelsOption:v,showAllProxyModelsOverride:w,includeSpecialOptions:C}=p||{},{data:S,isLoading:T}=(0,l.useAllProxyModels)(),{data:N,isLoading:k}=(0,r.useTeam)(g),{data:I,isLoading:M}=(0,a.useOrganization)(h),{data:F,isLoading:O}=(0,s.useCurrentUser)(),z=e=>c.some(t=>t.value===e),A=_.some(z),P=I?.models.includes(d.value)||I?.models.length===0;if(T||k||M||O)return(0,t.jsx)(n.Skeleton.Input,{active:!0,block:!0});let{wildcard:L,regular:D}=(e=>{let t=[],l=[];for(let a of e)a.endsWith("/*")?t.push(a):l.push(a);return{wildcard:t,regular:l}})(((e,t,l)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return a;let r=u[t.context];return r?r({allProxyModels:a,...l,options:t.options}):[]})(S?.data??[],e,{selectedTeam:N,selectedOrganization:I,userModels:F?.models}));return(0,t.jsx)(i.Select,{"data-testid":b,value:_,onChange:e=>{let t=e.filter(z);f(t.length>0?[t[t.length-1]]:e)},style:y,options:[C?{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...w||P&&C||"global"===x?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:_.length>0&&_.some(e=>z(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:m.value,disabled:_.length>0&&_.some(e=>z(e)&&e!==m.value),key:m.value}]}:[],...L.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:L.map(e=>{let l=e.replace("/*",""),a=l.charAt(0).toUpperCase()+l.slice(1);return{label:(0,t.jsx)("span",{children:`All ${a} models`}),value:e,disabled:A}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:D.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:A}))}],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)},276173,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(779241),r=e.i(464571),s=e.i(808613),i=e.i(212931),n=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:m,onSubmit:c,initialData:u,mode:g,config:h})=>{let p,[x]=s.Form.useForm(),[b,_]=(0,o.useState)(!1);console.log("Initial Data:",u),(0,o.useEffect)(()=>{if(e)if("edit"===g&&u){let e={...u,role:u.role||h.defaultRole,max_budget_in_team:u.max_budget_in_team||null,tpm_limit:u.tpm_limit||null,rpm_limit:u.rpm_limit||null,allowed_models:u.allowed_models||[]};console.log("Setting form values:",e),x.setFieldsValue(e)}else x.resetFields(),x.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,u,g,x,h.defaultRole,h.roleOptions]);let f=async e=>{try{_(!0);let t=Object.entries(e).reduce((e,[t,l])=>{if("string"==typeof l){let a=l.trim();return""===a&&("max_budget_in_team"===t||"tpm_limit"===t||"rpm_limit"===t)?{...e,[t]:null}:{...e,[t]:a}}return{...e,[t]:l}},{});console.log("Submitting form data:",t),await Promise.resolve(c(t)),x.resetFields()}catch(e){console.error("Form submission error:",e)}finally{_(!1)}};return(0,t.jsx)(i.Modal,{title:h.title||("add"===g?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:m,children:(0,t.jsxs)(s.Form,{form:x,onFinish:f,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.showEmail&&(0,t.jsx)(s.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,t.jsx)(a.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(l.Text,{children:"OR"})}),h.showUserId&&(0,t.jsx)(s.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(a.TextInput,{placeholder:"user_123"})}),(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Role"}),"edit"===g&&u&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(p=u.role,h.roleOptions.find(e=>e.value===p)?.label||p),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(n.Select,{children:"edit"===g&&u?[...h.roleOptions.filter(e=>e.value===u.role),...h.roleOptions.filter(e=>e.value!==u.role)].map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))})}),h.additionalFields?.map(e=>(0,t.jsx)(s.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)(a.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(d.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)(n.Select,{children:e.options?.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))});case"multi-select":return(0,t.jsx)(n.Select,{mode:"multiple",placeholder:e.placeholder||"Select options",options:e.options,allowClear:!0});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(r.Button,{onClick:m,className:"mr-2",disabled:b,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"default",htmlType:"submit",loading:b,children:"add"===g?b?"Adding...":"Add Member":b?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var t=e.i(843476),l=e.i(100486),a=e.i(827252),r=e.i(213205),s=e.i(771674),i=e.i(464571),n=e.i(770914),o=e.i(291542),d=e.i(262218),m=e.i(592968),c=e.i(898586),u=e.i(902555);let{Text:g}=c.Typography;function h({members:e,canEdit:c,onEdit:h,onDelete:p,onAddMember:x,roleColumnTitle:b="Role",roleTooltip:_,extraColumns:f=[],showDeleteForMember:y,emptyText:j}){let v=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,t.jsx)(g,{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)(g,{children:e||"-"})},{title:_?(0,t.jsxs)(n.Space,{direction:"horizontal",children:[b,(0,t.jsx)(m.Tooltip,{title:_,children:(0,t.jsx)(a.InfoCircleOutlined,{})})]}):b,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(n.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(l.CrownOutlined,{}):(0,t.jsx)(s.UserOutlined,{}),(0,t.jsx)(g,{style:{textTransform:"capitalize"},children:e||"-"})]})},...f,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,l)=>c?(0,t.jsxs)(n.Space,{children:[(0,t.jsx)(u.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(l)}),(!y||y(l))&&(0,t.jsx)(u.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>p(l)})]}):null}];return(0,t.jsxs)(n.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:v,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:j?{emptyText:j}:void 0}),x&&c&&(0,t.jsx)(i.Button,{icon:(0,t.jsx)(r.UserAddOutlined,{}),type:"primary",onClick:x,children:"Add Member"})]})}e.s(["default",()=>h])},56567,838932,e=>{"use strict";var t=e.i(843476),l=e.i(135214),a=e.i(109799),r=e.i(912598),s=e.i(907308),i=e.i(764205),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,i.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),x=e.i(564897),b=e.i(646563),_=e.i(987432),f=e.i(530212),y=e.i(677667),j=e.i(130643),v=e.i(898667),w=e.i(389083),C=e.i(304967),S=e.i(350967),T=e.i(599724),N=e.i(779241),k=e.i(629569),I=e.i(464571),M=e.i(808613),F=e.i(311451),O=e.i(28651),z=e.i(199133),A=e.i(770914),P=e.i(790848),L=e.i(653496),D=e.i(262218),R=e.i(592968),E=e.i(888259),B=e.i(678784),U=e.i(118366),V=e.i(271645),K=e.i(9314),$=e.i(552130),G=e.i(127952);function W({className:e,value:l,onChange:a}){return(0,t.jsxs)(z.Select,{className:e,value:l,onChange:a,children:[(0,t.jsx)(z.Select.Option,{value:"24h",children:"Daily"}),(0,t.jsx)(z.Select.Option,{value:"7d",children:"Weekly"}),(0,t.jsx)(z.Select.Option,{value:"30d",children:"Monthly"})]})}var q=e.i(844565),H=e.i(355619);let Q=function({globalGuardrailNames:e,teamGuardrails:l=[],optedOutGlobalGuardrails:a=[],killSwitchOn:r=!1,variant:s="card",className:i=""}){let n=new Set(a),o=Array.from(e).filter(e=>!n.has(e)),d=l.filter(t=>!e.has(t)),m=r||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"]}),r?(0,t.jsx)(D.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)(D.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)(D.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"===s?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${i}`,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:`${i}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Guardrails Settings"}),m]})};var Y=e.i(643449),J=e.i(75921),X=e.i(390605),Z=e.i(162386),ee=e.i(727749),et=e.i(384767),el=e.i(435451),ea=e.i(916940),er=e.i(183588),es=e.i(460285),ei=e.i(276173),en=e.i(91979),eo=e.i(269200),ed=e.i(942232),em=e.i(977572),ec=e.i(427612),eu=e.i(64848),eg=e.i(496020),eh=e.i(536916),ep=e.i(21548);let ex={"/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","/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)"},eb=({teamId:e,accessToken:l,canEditTeam:a})=>{let[r,s]=(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,i.getTeamPermissionsCall)(l,e),a=t.all_available_permissions||[];s(a);let r=t.team_member_permissions||[];o(r),h(!1)}catch(e){ee.default.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{m(!1)}};(0,V.useEffect)(()=>{p()},[e,l]);let x=async()=>{try{if(!l)return;u(!0),await (0,i.teamPermissionsUpdateCall)(l,e,n),ee.default.success("Permissions updated successfully"),h(!1)}catch(e){ee.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 b=r.length>0;return(0,t.jsxs)(C.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)(I.Button,{icon:(0,t.jsx)(en.ReloadOutlined,{}),onClick:()=>{p()},children:"Reset"}),(0,t.jsx)(I.Button,{onClick:x,loading:c,type:"primary",icon:(0,t.jsx)(_.SaveOutlined,{}),children:"Save Changes"})]})]}),(0,t.jsx)(T.Text,{className:"mb-6 text-gray-600",children:"Control what team members can do when they are not team admins."}),b?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(eo.Table,{className:" min-w-full",children:[(0,t.jsx)(ec.TableHead,{children:(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(eu.TableHeaderCell,{children:"Method"}),(0,t.jsx)(eu.TableHeaderCell,{children:"Endpoint"}),(0,t.jsx)(eu.TableHeaderCell,{children:"Description"}),(0,t.jsx)(eu.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)(ed.TableBody,{children:r.map(e=>{let l=(e=>{let t=e.includes("/info")||e.includes("/list")||e.includes("/activity")||"/spend/logs"===e?"GET":"POST",l=ex[e];if(!l){for(let[t,a]of Object.entries(ex))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)(eg.TableRow,{className:"hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(em.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)(em.TableCell,{children:(0,t.jsx)("span",{className:"font-mono text-sm text-gray-800",children:l.endpoint})}),(0,t.jsx)(em.TableCell,{className:"text-gray-700",children:l.description}),(0,t.jsx)(em.TableCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,t.jsx)(eh.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)(ep.Empty,{description:"No permissions available"})})]})};var e_=e.i(822315);function ef(e){if(!e)return null;let t=(0,e_.default)(e);return t.isValid()?t.format("MMM D, YYYY"):null}var ey=e.i(175712),ej=e.i(178654),ev=e.i(621192),ew=e.i(898586);let eC=async(e,t)=>{let l=(0,i.getProxyBaseUrl)(),a=l?`${l}/team/${encodeURIComponent(t)}/members/me`:`/team/${encodeURIComponent(t)}/members/me`,r=await fetch(a,{method:"GET",headers:{[(0,i.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(404===r.status)return null;if(!r.ok){let e=await r.json().catch(()=>({}));throw Error((0,i.deriveErrorMessage)(e))}return await r.json()},eS=(e,l)=>(0,t.jsxs)(A.Space,{size:4,children:[(0,t.jsx)(ew.Typography.Text,{type:"secondary",children:e}),(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(p.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),eT=(e,t=4)=>null==e?"0":(0,m.formatNumberWithCommas)(e,t),eN=e=>null==e?"Unlimited":(0,m.formatNumberWithCommas)(e,0);function ek({teamId:e}){let{data:a,isLoading:r,error:s}=(e=>{let{accessToken:t}=(0,l.default)();return(0,n.useQuery)({queryKey:["team",e,"members","me"],queryFn:()=>eC(t,e),enabled:!!(t&&e)})})(e);if(r)return(0,t.jsx)(ey.Card,{children:(0,t.jsx)(ew.Typography.Text,{type:"secondary",children:"Loading your membership info…"})});if(s)return(0,t.jsx)(ey.Card,{children:(0,t.jsx)(ew.Typography.Text,{type:"danger",children:s instanceof Error?s.message:"Failed to load your membership info for this team."})});if(!a)return(0,t.jsx)(ey.Card,{children:(0,t.jsx)(ew.Typography.Text,{type:"secondary",children:"No membership info available for the current user in this team."})});let i=a.litellm_budget_table??null,o=i?.max_budget??null,d=a.spend??0,m=a.total_spend??0,c=i?.tpm_limit??null,u=i?.rpm_limit??null,g=ef(i?.budget_reset_at),h=i?.allowed_models??null;return(0,t.jsxs)(A.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(ey.Card,{children:(0,t.jsxs)(ev.Row,{gutter:[24,16],children:[(0,t.jsxs)(ej.Col,{xs:24,sm:12,md:8,children:[(0,t.jsx)(ew.Typography.Text,{type:"secondary",children:"User"}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(ew.Typography.Text,{strong:!0,children:a.user_email||a.user_id})}),(0,t.jsx)(ew.Typography.Text,{type:"secondary",style:{fontSize:12,fontFamily:"monospace"},children:a.user_id})]}),(0,t.jsxs)(ej.Col,{xs:24,sm:12,md:8,children:[(0,t.jsx)(ew.Typography.Text,{type:"secondary",children:"Team Role"}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(D.Tag,{color:"admin"===a.role?"blue":"default",children:a.role||"user"})})]})]})}),(0,t.jsxs)(ev.Row,{gutter:[16,16],children:[(0,t.jsx)(ej.Col,{xs:24,md:12,children:(0,t.jsxs)(ey.Card,{children:[eS("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)(ew.Typography.Title,{level:3,style:{margin:0},children:["$",eT(d,4)]}),(0,t.jsxs)(ew.Typography.Text,{type:"secondary",children:["of ",null===o?"Unlimited":`$${eT(o,4)}`]})]}),g&&(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsxs)(ew.Typography.Text,{type:"secondary",children:["Resets ",g]})})]})}),(0,t.jsx)(ej.Col,{xs:24,md:12,children:(0,t.jsxs)(ey.Card,{children:[eS("Rate Limits","Your per-member rate limits within this team."),(0,t.jsxs)("div",{style:{marginTop:8},children:[(0,t.jsxs)(ew.Typography.Text,{children:["TPM: ",eN(c)]}),(0,t.jsx)("br",{}),(0,t.jsxs)(ew.Typography.Text,{children:["RPM: ",eN(u)]})]})]})}),(0,t.jsx)(ej.Col,{xs:24,md:12,children:(0,t.jsxs)(ey.Card,{children:[eS("Total Spend (USD)","Cumulative spend across all budget cycles within this team."),(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsxs)(ew.Typography.Title,{level:4,style:{margin:0},children:["$",eT(m,4)]})})]})}),(0,t.jsx)(ej.Col,{xs:24,md:12,children:(0,t.jsxs)(ey.Card,{children:[eS("Model Scope","Models you can access within this team."),(0,t.jsx)("div",{style:{marginTop:8},children:h&&h.length>0?(0,t.jsx)(A.Space,{wrap:!0,children:h.map(e=>(0,t.jsx)(D.Tag,{children:e},e))}):(0,t.jsx)(ew.Typography.Text,{children:"All Team Models"})})]})})]})]})}let eI="overview",eM="my-user",eF="virtual-keys",eO="members",ez="member-permissions",eA="settings",eP={[eI]:"Overview",[eM]:"My User",[eF]:"Virtual Keys",[eO]:"Members",[ez]:"Member Permissions",[eA]:"Settings"};var eL=e.i(292639),eD=e.i(294612);function eR({teamData:e,canEditTeam:a,handleMemberDelete:r,setSelectedEditMember:s,setIsEditMemberModalVisible:i,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,eL.useUISettings)(),{userId:c,userRole:g}=(0,l.default)(),h=!!d?.values?.disable_team_admin_delete_team_user,x=(0,u.isUserTeamAdminForSingleTeam)(e.team_info.members_with_roles,c||""),b=(0,u.isProxyAdminRole)(g||""),_=[{title:(0,t.jsxs)(A.Space,{direction:"horizontal",children:["Model Scope",(0,t.jsx)(R.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 r=(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(!r)return(0,t.jsx)(ew.Typography.Text,{type:"secondary",children:"(all team models)"});let s=r.slice(0,2),i=r.length-s.length;return(0,t.jsxs)(A.Space,{wrap:!0,children:[s.map(e=>(0,t.jsx)(ew.Typography.Text,{code:!0,style:{fontSize:"12px"},children:e},e)),i>0&&(0,t.jsx)(R.Tooltip,{title:r.slice(2).join(", "),children:(0,t.jsxs)(ew.Typography.Text,{type:"secondary",children:["+",i," more"]})})]})}},{title:(0,t.jsxs)(A.Space,{direction:"horizontal",children:["Current Cycle Spend (USD)",(0,t.jsx)(R.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.jsxs)(ew.Typography.Text,{children:["$",(0,m.formatNumberWithCommas)((t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.spend??0})(a.user_id),4)]})},{title:(0,t.jsxs)(A.Space,{direction:"horizontal",children:["Total Spend (USD)",(0,t.jsx)(R.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.jsxs)(ew.Typography.Text,{children:["$",(0,m.formatNumberWithCommas)((t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.total_spend??0})(a.user_id),4)]})},{title:"Team Member Budget (USD)",key:"budget",render:(l,a)=>{let r=(t=>{if(!t)return null;let l=e.team_memberships.find(e=>e.user_id===t),a=l?.litellm_budget_table?.max_budget;return null==a?null:o(a)})(a.user_id);return(0,t.jsx)(ew.Typography.Text,{children:r?`$${(0,m.formatNumberWithCommas)(Number(r),4)}`:"No Limit"})}},{title:"Budget Reset",key:"budget_reset",render:(l,a)=>{let r=(t=>{if(!t)return null;let l=e.team_memberships.find(e=>e.user_id===t);return ef(l?.litellm_budget_table?.budget_reset_at)})(a.user_id);return r?(0,t.jsx)(ew.Typography.Text,{children:r}):(0,t.jsx)(ew.Typography.Text,{type:"secondary",children:"—"})}},{title:(0,t.jsxs)(A.Space,{direction:"horizontal",children:["Team Member Rate Limits",(0,t.jsx)(R.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)(ew.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,r=l?.litellm_budget_table?.tpm_limit,s=[a?`${o(a)} RPM`:null,r?`${o(r)} TPM`:null].filter(Boolean);return s.length>0?s.join(" / "):"No Limits"})(a.user_id)})}];return(0,t.jsx)(eD.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);s({...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,allowed_models:l?.litellm_budget_table?.allowed_models||[]}),i(!0)},onDelete:r,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:_,showDeleteForMember:()=>b||a&&!x||x&&!h})}var eE=e.i(207082),eB=e.i(871943),eU=e.i(502547),eV=e.i(360820),eK=e.i(94629),e$=e.i(152990),eG=e.i(682830),eW=e.i(994388),eq=e.i(752978),eH=e.i(282786),eQ=e.i(981339),eY=e.i(969550),eJ=e.i(20147),eX=e.i(633627);function eZ({teamId:e,teamAlias:a,organization:r}){let{accessToken:s}=(0,l.default)(),[i,o]=(0,V.useState)(null),[d,c]=(0,V.useState)([{id:"created_at",desc:!0}]),[u,g]=(0,V.useState)({pageIndex:0,pageSize:50}),[h,x]=(0,V.useState)({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),b=d.length>0?d[0].id:"created_at",_=d.length>0?d[0].desc?"desc":"asc":"desc",f=u.pageIndex,y=u.pageSize,{data:j,isPending:v,isFetching:C,refetch:S}=(0,eE.useKeys)(f+1,y,{teamID:e,organizationID:h["Organization ID"]?.trim()||void 0,selectedKeyAlias:h["Key Alias"]?.trim()||void 0,userID:h["User ID"]?.trim()||void 0,sortBy:b||void 0,sortOrder:_||void 0,expand:"user"}),N=(0,V.useMemo)(()=>{let e=j?.keys||[],t=r?.organization_id;return t?e.map(e=>({...e,organization_id:(e.organization_id??e.org_id)||t})):e},[j?.keys,r?.organization_id]),k=j?.total_pages??0,[I,M]=(0,V.useState)({}),F=(0,V.useMemo)(()=>({team_id:e,team_alias:a||e,models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:r?.organization_id||"",created_at:"",keys:[],members_with_roles:[],spend:0}),[e,a,r]),O=(0,n.useQuery)({queryKey:["teamFilterOptions",e,s],queryFn:async()=>(0,eX.fetchTeamFilterOptions)(s,e),enabled:!!s&&!!e,staleTime:3e4}).data||{keyAliases:[],organizationIds:[],userIds:[]},z=(0,V.useCallback)(()=>{S?.()},[S]);(0,V.useEffect)(()=>(window.addEventListener("storage",z),()=>window.removeEventListener("storage",z)),[z]);let A=(0,V.useCallback)((e,t=!1)=>{x(t=>({...t,"Organization ID":e["Organization ID"]??t["Organization ID"],"Key Alias":e["Key Alias"]??t["Key Alias"],"User ID":e["User ID"]??t["User ID"],"Sort By":e["Sort By"]??t["Sort By"]??"created_at","Sort Order":e["Sort Order"]??t["Sort Order"]??"desc"})),t||g(e=>({...e,pageIndex:0}))},[]),P=(0,V.useCallback)(()=>{x({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),g(e=>({...e,pageIndex:0}))},[]),L=(0,V.useMemo)(()=>[{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>{let{organizationIds:t}=O;if(!t.length)return[];let l=e.toLowerCase();return(l?t.filter(e=>e.toLowerCase().includes(l)):t).map(e=>({label:e,value:e}))}},{name:"Key Alias",label:"Key Alias",isSearchable:!0,searchFn:async e=>{let{keyAliases:t}=O,l=e.toLowerCase();return(l?t.filter(e=>e.toLowerCase().includes(l)):t).map(e=>({label:e,value:e}))}},{name:"User ID",label:"User ID",isSearchable:!0,searchFn:async e=>{let{userIds:t}=O,l=e.toLowerCase();return(l?t.filter(e=>e.id.toLowerCase().includes(l)||e.email.toLowerCase().includes(l)):t).map(e=>({label:e.email?`${e.id} (${e.email})`:e.id,value:e.id}))}}],[O]),D=(0,V.useMemo)(()=>[{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(eW.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>o(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.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,r=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,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,r=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:a??"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:70,enableSorting:!1,cell:e=>{let l=e.getValue(),a="default_user_id"===l?"Default Proxy Admin":l,r=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:a??"-"})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(eH.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(p.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(R.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,m.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,m.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(w.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})}):(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)(eq.Icon,{icon:I[e.row.id]?eB.ChevronDownIcon:eU.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>M(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)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,H.getModelDisplayName)(e).slice(0,30)}...`:(0,H.getModelDisplayName)(e)})},l)),l.length>3&&!I[e.row.id]&&(0,t.jsx)(w.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(T.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),I[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)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,H.getModelDisplayName)(e).slice(0,30)}...`:(0,H.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"]})]})}}],[I]),E=(0,V.useCallback)(e=>{let t="function"==typeof e?e(d):e;if(c(t),t?.length>0){let e=t[0];A({"Sort By":e.id,"Sort Order":e.desc?"desc":"asc"},!0)}},[d,A]),B=(0,e$.useReactTable)({data:N,columns:D,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:d,pagination:u},onSortingChange:E,onPaginationChange:g,getCoreRowModel:(0,eG.getCoreRowModel)(),enableSorting:!0,manualSorting:!0,manualPagination:!0,pageCount:k});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:i?(0,t.jsx)(eJ.default,{keyId:i.token,onClose:()=>o(null),keyData:i,teams:[F],onDelete:S}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(eY.default,{options:L,onApplyFilters:A,initialValues:h,onResetFilters:P})}),(0,t.jsx)("div",{className:"flex items-center justify-end w-full mb-4",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[v||C?(0,t.jsx)(eQ.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",f+1," of ",B.getPageCount()]}),v||C?(0,t.jsx)(eQ.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>B.previousPage(),disabled:v||C||!B.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),v||C?(0,t.jsx)(eQ.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>B.nextPage(),disabled:v||C||!B.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(eo.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:B.getCenterTotalSize()},children:[(0,t.jsx)(ec.TableHead,{children:B.getHeaderGroups().map(e=>(0,t.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eu.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,e$.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(eV.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(eB.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eK.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${B.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(ed.TableBody,{children:v||C?(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(em.TableCell,{colSpan:D.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading keys..."})})})}):N.length>0?B.getRowModel().rows.map(e=>(0,t.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(em.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,e$.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(em.TableCell,{colSpan:D.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({teamId:e,onClose:n,accessToken:o,is_team_admin:en,is_proxy_admin:eo,is_org_admin:ed=!1,userModels:em,editTeam:ec,premiumUser:eu=!1,onUpdate:eg})=>{let eh,ep,ex,e_,ef,ey,[ej,ev]=(0,V.useState)(null),[ew,eC]=(0,V.useState)(!0),[eS,eT]=(0,V.useState)(!1),[eN]=M.Form.useForm(),[eL,eD]=(0,V.useState)(!1),[eE,eB]=(0,V.useState)(null),[eU,eV]=(0,V.useState)(!1),[eK,e$]=(0,V.useState)([]),[eG,eW]=(0,V.useState)(!1),[eq,eH]=(0,V.useState)({}),{data:eQ,isLoading:eY}=d(),eJ=eQ?.globalGuardrailNames??new Set,[eX,e0]=(0,V.useState)([]),[e1,e2]=(0,V.useState)({}),[e4,e5]=(0,V.useState)(!1),[e3,e7]=(0,V.useState)(null),[e6,e9]=(0,V.useState)(!1),[e8,te]=(0,V.useState)(!1),[tt,tl]=(0,V.useState)(!1),ta=V.default.useRef(null),[tr,ts]=(0,V.useState)(null),{userRole:ti,userId:tn}=(0,l.default)(),{data:to=[]}=(0,a.useOrganizations)(),td=(0,r.useQueryClient)(),tm=(0,V.useMemo)(()=>{let e=ej?.team_info?.organization_id;if(!e||!tn)return!1;let t=to.find(t=>t.organization_id===e);return t?.members?.some(e=>e.user_id===tn&&"org_admin"===e.user_role)??!1},[ej,to,tn]),tc=M.Form.useWatch("models",eN),tu=M.Form.useWatch("disable_global_guardrails",eN),tg=(0,V.useMemo)(()=>{let e=tc??ej?.team_info?.models??[];return e.includes("all-proxy-models")||e.includes("all-team-models")?em:(0,H.unfurlWildcardModelsInList)(e,em)},[tc,ej,em]),th=en||eo||ed||tm,tp=(0,V.useMemo)(()=>{let e;return e=[eI,eM,eF],th?[...e,eO,ez,eA]:e},[th]),tx=(0,V.useMemo)(()=>ec&&th?eA:eI,[ec,th]),tb=async()=>{try{if(eC(!0),!o)return;let t=await (0,i.teamInfoCall)(o,e);ev(t)}catch(e){ee.default.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{eC(!1)}};(0,V.useEffect)(()=>{tb()},[e,o]),(0,V.useEffect)(()=>{(async()=>{if(!o||!ej?.team_info?.organization_id)return ts(null);try{let e=await (0,i.organizationInfoCall)(o,ej.team_info.organization_id);ts(e)}catch(e){console.error("Error fetching organization info:",e),ts(null)}})()},[o,ej?.team_info?.organization_id]),(0,V.useMemo)(()=>{let e;return e=[],e=tr?tr.models.includes("all-proxy-models")?em:tr.models.length>0?tr.models:em:em,(0,H.unfurlWildcardModelsInList)(e,em)},[tr,em]),(0,V.useEffect)(()=>{(async()=>{try{if(!o)return;let e=(await (0,i.getPoliciesList)(o)).policies.map(e=>e.policy_name);e0(e)}catch(e){console.error("Failed to fetch policies:",e)}})()},[o]),(0,V.useEffect)(()=>{(async()=>{if(!o||!ej?.team_info?.policies||0===ej.team_info.policies.length)return;e5(!0);let e={};try{await Promise.all(ej.team_info.policies.map(async t=>{try{let l=await (0,i.getPolicyInfoWithGuardrails)(o,t);e[t]=l.resolved_guardrails||[]}catch(l){console.error(`Failed to fetch guardrails for policy ${t}:`,l),e[t]=[]}})),e2(e)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{e5(!1)}})()},[o,ej?.team_info?.policies]);let t_=async t=>{try{if(null==o)return;let l={user_email:t.user_email,user_id:t.user_id,role:t.role};await (0,i.teamMemberAddCall)(o,e,l),ee.default.success("Team member added successfully"),eT(!1),eN.resetFields();let a=await (0,i.teamInfoCall)(o,e);ev(a),eg(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),ee.default.fromBackend(e),console.error("Error adding team member:",t)}},tf=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,allowed_models:t.allowed_models};E.default.destroy(),await (0,i.teamMemberUpdateCall)(o,e,l),ee.default.success("Team member updated successfully"),eD(!1);let a=await (0,i.teamInfoCall)(o,e);ev(a),eg(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),eD(!1),E.default.destroy(),ee.default.fromBackend(e),console.error("Error updating team member:",t)}},ty=async()=>{if(e3&&o){te(!0);try{await (0,i.teamMemberDeleteCall)(o,e,e3),ee.default.success("Team member removed successfully");let t=await (0,i.teamInfoCall)(o,e);ev(t),eg(t)}catch(e){ee.default.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}finally{te(!1),e9(!1),e7(null)}}},tj=async t=>{try{let l;if(!o)return;tl(!0);let r={};try{let{soft_budget_alerting_emails:e,...l}=t.metadata?JSON.parse(t.metadata):{};r=l}catch(e){ee.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){ee.default.fromBackend("Invalid JSON in secret manager settings");return}let s=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(eJ):Array.from(eJ).filter(e=>!(t.guardrails||[]).includes(e)),g={team_id:e,team_alias:t.team_alias,models:t.models,tpm_limit:s(t.tpm_limit),rpm_limit:s(t.rpm_limit),model_tpm_limit:n,model_rpm_limit:d,max_budget:t.max_budget,soft_budget:s(t.soft_budget),budget_duration:t.budget_duration,metadata:{...r,guardrails:(t.guardrails||[]).filter(e=>!eJ.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!==tv.organization_id?{organization_id:t.organization_id??null}:{}};g.max_budget=(0,c.mapEmptyStringToNull)(g.max_budget),g.team_member_budget_duration=t.team_member_budget_duration,void 0!==t.team_member_budget&&(g.team_member_budget=Number(t.team_member_budget)),void 0!==t.team_member_key_duration&&(g.team_member_key_duration=t.team_member_key_duration),(void 0!==t.team_member_tpm_limit||void 0!==t.team_member_rpm_limit)&&(g.team_member_tpm_limit=s(t.team_member_tpm_limit),g.team_member_rpm_limit=s(t.team_member_rpm_limit));let{servers:h,accessGroups:p,toolsets:x}=t.mcp_servers_and_groups||{servers:[],accessGroups:[],toolsets:[]},b=new Set(h||[]),_=Object.fromEntries(Object.entries(t.mcp_tool_permissions||{}).filter(([e])=>b.has(e)));g.object_permission={},h&&(g.object_permission.mcp_servers=h),p&&(g.object_permission.mcp_access_groups=p),_&&(g.object_permission.mcp_tool_permissions=_),x&&(g.object_permission.mcp_toolsets=x),delete t.mcp_servers_and_groups,delete t.mcp_tool_permissions;let{agents:f,accessGroups:y}=t.agents_and_groups||{agents:[],accessGroups:[]};f&&f.length>0&&(g.object_permission.agents=f),y&&y.length>0&&(g.object_permission.agent_access_groups=y),delete t.agents_and_groups,t.vector_stores&&t.vector_stores.length>0&&(g.object_permission.vector_stores=t.vector_stores),void 0!==t.access_group_ids&&(g.access_group_ids=t.access_group_ids),void 0!==t.default_team_member_models&&(g.default_team_member_models=t.default_team_member_models);let j=ta.current?.getValue();if(j?.router_settings){let e=e=>null!=e&&""!==e&&!1!==e&&!(Array.isArray(e)&&0===e.length),t=Object.values(j.router_settings).some(e),l=tv.router_settings&&Object.values(tv.router_settings).some(e);(t||l)&&(g.router_settings=j.router_settings)}await (0,i.teamUpdateCall)(o,g),td.invalidateQueries({queryKey:a.organizationKeys.all}),ee.default.success("Team settings updated successfully"),eV(!1),tb()}catch(e){console.error("Error updating team:",e)}finally{tl(!1)}};if(ew)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!ej?.team_info)return(0,t.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:tv}=ej,tw=tv.metadata?.disable_global_guardrails===!0,tC=new Set(tv.metadata?.opted_out_global_guardrails||[]),tS=(tv.metadata?.guardrails||[]).filter(e=>!eJ.has(e)),tT=tw?tS:[...Array.from(eJ).filter(e=>!tC.has(e)),...tS],tN=e=>{e.preventDefault(),e.stopPropagation()},tk=async(e,t)=>{await (0,m.copyToClipboard)(e)&&(eH(e=>({...e,[t]:!0})),setTimeout(()=>{eH(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)(I.Button,{type:"text",icon:(0,t.jsx)(f.ArrowLeftIcon,{className:"h-4 w-4"}),onClick:n,className:"mb-4",children:"Back to Teams"}),(0,t.jsx)(k.Title,{children:tv.team_alias}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(T.Text,{className:"text-gray-500 font-mono",children:tv.team_id}),(0,t.jsx)(I.Button,{type:"text",size:"small",icon:eq["team-id"]?(0,t.jsx)(B.CheckIcon,{size:12}):(0,t.jsx)(U.CopyIcon,{size:12}),onClick:()=>tk(tv.team_id,"team-id"),className:`left-2 z-10 transition-all duration-200 ${eq["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)(L.Tabs,{defaultActiveKey:tx,className:"mb-4",items:[{key:eI,label:eP[eI],children:(0,t.jsxs)(S.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(T.Text,{children:"Budget Status"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(k.Title,{children:["$",(0,m.formatNumberWithCommas)(tv.spend,4)]}),(0,t.jsxs)(T.Text,{children:["of ",null===tv.max_budget?"Unlimited":`$${(0,m.formatNumberWithCommas)(tv.max_budget,4)}`]}),tv.budget_duration&&(0,t.jsxs)(T.Text,{className:"text-gray-500",children:["Reset: ",tv.budget_duration]}),(0,t.jsx)("br",{}),tv.team_member_budget_table&&(0,t.jsxs)(T.Text,{className:"text-gray-500",children:["Team Member Budget: $",(0,m.formatNumberWithCommas)(tv.team_member_budget_table.max_budget,4)]})]})]}),(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(T.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(T.Text,{children:["TPM: ",tv.tpm_limit||"Unlimited"]}),(0,t.jsxs)(T.Text,{children:["RPM: ",tv.rpm_limit||"Unlimited"]}),tv.max_parallel_requests&&(0,t.jsxs)(T.Text,{children:["Max Parallel Requests: ",tv.max_parallel_requests]}),(eh=tv.metadata?.model_tpm_limit??{},ep=tv.metadata?.model_rpm_limit??{},0===(ex=Array.from(new Set([...Object.keys(eh),...Object.keys(ep)]))).length?null:(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)(T.Text,{className:"text-gray-500",children:"Per-model limits:"}),ex.map(e=>(0,t.jsxs)(T.Text,{className:"text-xs",children:[e,": TPM ",eh[e]??"—",", RPM ",ep[e]??"—"]},e))]}))]})]}),(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(T.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===tv.models.length||tv.models.includes("all-proxy-models")?(0,t.jsx)(w.Badge,{color:"red",children:"All proxy models"}):(0,t.jsxs)(t.Fragment,{children:[tv.models.map((e,l)=>(0,t.jsx)(w.Badge,{color:"blue",children:e},`direct-${l}`)),(tv.access_group_models||[]).map((e,l)=>(0,t.jsx)(w.Badge,{color:"green",title:"From access group",children:e},`ag-${l}`))]})})]}),(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Virtual Keys"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(T.Text,{children:["User Keys: ",ej.keys.filter(e=>e.user_id).length]}),(0,t.jsxs)(T.Text,{children:["Service Account Keys: ",ej.keys.filter(e=>!e.user_id).length]}),(0,t.jsxs)(T.Text,{className:"text-gray-500",children:["Total: ",ej.keys.length]})]})]}),(0,t.jsx)(et.default,{objectPermission:tv.object_permission,variant:"card",accessToken:o}),(0,t.jsx)(C.Card,{children:(0,t.jsx)(Q,{globalGuardrailNames:eJ,teamGuardrails:tv.metadata?.guardrails||[],optedOutGlobalGuardrails:tv.metadata?.opted_out_global_guardrails||[],killSwitchOn:tw,variant:"inline"})}),(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900 mb-3",children:"Policies"}),tv.policies&&tv.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:tv.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)(w.Badge,{color:"purple",children:e}),e4&&(0,t.jsx)(T.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!e4&&e1[e]&&e1[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(T.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e1[e].map((e,l)=>(0,t.jsx)(w.Badge,{color:"blue",size:"xs",children:e},l))})]})]},l))}):(0,t.jsx)(T.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(Y.default,{loggingConfigs:tv.metadata?.logging||[],disabledCallbacks:[],variant:"card"})]})},{key:eM,label:eP[eM],children:(0,t.jsx)(ek,{teamId:e})},{key:eF,label:eP[eF],children:(0,t.jsx)(eZ,{teamId:e,teamAlias:tv.team_alias,organization:tr})},{key:eO,label:eP[eO],children:(0,t.jsx)(eR,{teamData:ej,canEditTeam:th,handleMemberDelete:e=>{e7(e),e9(!0)},setSelectedEditMember:eB,setIsEditMemberModalVisible:eD,setIsAddMemberModalVisible:eT})},{key:ez,label:eP[ez],children:(0,t.jsx)(eb,{teamId:e,accessToken:o,canEditTeam:th})},{key:eA,label:eP[eA],children:(0,t.jsxs)(C.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"}),th&&!eU&&(0,t.jsx)(I.Button,{icon:(0,t.jsx)(g.EditOutlined,{className:"h-4 w-4"}),onClick:()=>eV(!0),children:"Edit Settings"})]}),eU&&eY?(0,t.jsx)("div",{className:"p-4",children:"Loading..."}):eU?(0,t.jsxs)(M.Form,{form:eN,onFinish:tj,onValuesChange:e=>{if("disable_global_guardrails"in e){let t=!0===e.disable_global_guardrails,l=(eN.getFieldValue("guardrails")||[]).filter(e=>!eJ.has(e));eN.setFieldValue("guardrails",t?l:[...Array.from(eJ),...l])}},initialValues:{...tv,team_alias:tv.team_alias,models:tv.models,tpm_limit:tv.tpm_limit,rpm_limit:tv.rpm_limit,modelLimits:Array.from(new Set([...Object.keys(tv.metadata?.model_tpm_limit??{}),...Object.keys(tv.metadata?.model_rpm_limit??{})])).map(e=>({model:e,tpm:tv.metadata?.model_tpm_limit?.[e],rpm:tv.metadata?.model_rpm_limit?.[e]})),max_budget:tv.max_budget,soft_budget:tv.soft_budget,budget_duration:tv.budget_duration,team_member_tpm_limit:tv.team_member_budget_table?.tpm_limit,team_member_rpm_limit:tv.team_member_budget_table?.rpm_limit,team_member_budget:tv.team_member_budget_table?.max_budget,team_member_budget_duration:tv.team_member_budget_table?.budget_duration,guardrails:tT,policies:tv.policies||[],disable_global_guardrails:tv.metadata?.disable_global_guardrails||!1,soft_budget_alerting_emails:Array.isArray(tv.metadata?.soft_budget_alerting_emails)?tv.metadata.soft_budget_alerting_emails.join(", "):"",metadata:tv.metadata?JSON.stringify((({logging:e,secret_manager_settings:t,soft_budget_alerting_emails:l,model_tpm_limit:a,model_rpm_limit:r,...s})=>s)(tv.metadata),null,2):"",logging_settings:tv.metadata?.logging||[],secret_manager_settings:tv.metadata?.secret_manager_settings?JSON.stringify(tv.metadata.secret_manager_settings,null,2):"",organization_id:tv.organization_id,vector_stores:tv.object_permission?.vector_stores||[],mcp_servers:tv.object_permission?.mcp_servers||[],mcp_access_groups:tv.object_permission?.mcp_access_groups||[],mcp_servers_and_groups:{servers:tv.object_permission?.mcp_servers||[],accessGroups:tv.object_permission?.mcp_access_groups||[],toolsets:tv.object_permission?.mcp_toolsets||[]},mcp_tool_permissions:tv.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:tv.object_permission?.agents||[],accessGroups:tv.object_permission?.agent_access_groups||[]},access_group_ids:tv.access_group_ids||[],default_team_member_models:tv.default_team_member_models||[]},layout:"vertical",children:[(0,t.jsx)(M.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(F.Input,{type:""})}),(0,t.jsx)(M.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Please select at least one model"}],children:(0,t.jsx)(Z.ModelSelect,{value:eN.getFieldValue("models")||[],onChange:e=>eN.setFieldValue("models",e),teamID:e,organizationID:ej?.team_info?.organization_id||void 0,options:{includeSpecialOptions:!0,includeUserModels:!ej?.team_info?.organization_id,showAllProxyModelsOverride:(0,u.isProxyAdminRole)(ti)&&!ej?.team_info?.organization_id},context:"team",dataTestId:"models-select"})}),(0,t.jsx)(M.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Soft Budget (USD)",name:"soft_budget",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.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)(F.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)(j.AccordionBody,{children:[(0,t.jsx)(T.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)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Default Model Access"," ",(0,t.jsx)(R.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)(M.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.models!==t.models,children:({getFieldValue:e})=>{let l=e("models")||tv.models||[];return(0,t.jsx)(z.Select,{mode:"multiple",placeholder:"Leave empty — all team models accessible to every member",value:eN.getFieldValue("default_team_member_models")||[],onChange:e=>eN.setFieldValue("default_team_member_models",e),options:l.map(e=>({label:e,value:e}))})}})}),(0,t.jsx)(M.Form.Item,{label:"Default Budget (USD)",name:"team_member_budget",tooltip:"Default spend budget for each member in this team.",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Default Budget Duration",name:"team_member_budget_duration",children:(0,t.jsx)(W,{onChange:e=>eN.setFieldValue("team_member_budget_duration",e),value:eN.getFieldValue("team_member_budget_duration")})}),(0,t.jsx)(M.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)(N.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(M.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)(el.default,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,t.jsx)(M.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)(el.default,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})})]})]}),(0,t.jsx)(M.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(z.Select,{placeholder:"n/a",children:[(0,t.jsx)(z.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(z.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(z.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(M.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(el.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(el.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Model-Specific Rate Limits",tooltip:"Set per-model TPM/RPM limits that apply across the whole team.",children:(0,t.jsx)(M.Form.List,{name:"modelLimits",children:(e,{add:l,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(({key:e,name:l,...r})=>(0,t.jsxs)(A.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(M.Form.Item,{...r,name:[l,"model"],rules:[{required:!0,message:"Missing model"},{validator:(e,t)=>t&&(eN.getFieldValue("modelLimits")??[]).filter(e=>e?.model===t).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],style:{minWidth:240},children:(0,t.jsx)(z.Select,{showSearch:!0,placeholder:"Select model",allowClear:!0,options:tg.map(e=>({value:e,label:e}))})}),(0,t.jsx)(M.Form.Item,{...r,name:[l,"tpm"],rules:[{validator:async(e,t)=>{let a=(eN.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)(O.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(M.Form.Item,{...r,name:[l,"rpm"],children:(0,t.jsx)(O.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(x.MinusCircleOutlined,{onClick:()=>a(l),style:{color:"#ef4444"}})]},e)),(0,t.jsx)(M.Form.Item,{children:(0,t.jsx)(I.Button,{type:"dashed",onClick:()=>l(),block:!0,icon:(0,t.jsx)(b.PlusOutlined,{}),children:"Add Model Limit"})})]})})}),(0,t.jsx)(M.Form.Item,{label:"Router Settings",children:(0,t.jsx)(es.default,{ref:ta,accessToken:o||"",value:tv.router_settings?{router_settings:tv.router_settings}:void 0})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(R.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.jsxs)(z.Select,{mode:"multiple",placeholder:"Select guardrails",optionLabelProp:"label",tagRender:({label:e,value:l,closable:a,onClose:r})=>{let s=eJ.has(l);return(0,t.jsxs)(D.Tag,{color:"blue",closable:a,onClose:r,onMouseDown:tN,style:{marginInlineEnd:4},children:[s&&(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4},"aria-label":"Global guardrail"}),e]})},children:[(0,t.jsx)(z.Select.OptGroup,{label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4}}),"Global"]}),children:(eQ?.guardrails??[]).filter(e=>e.litellm_params?.default_on).map(e=>(0,t.jsx)(z.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,disabled:tu,children:e.guardrail_name},e.guardrail_name))}),(0,t.jsx)(z.Select.OptGroup,{label:"Other",children:(eQ?.guardrails??[]).filter(e=>!e.litellm_params?.default_on).map(e=>(0,t.jsx)(z.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,children:e.guardrail_name},e.guardrail_name))})]})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable all global guardrails"," ",(0,t.jsx)(R.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)(P.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(R.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)(z.Select,{mode:"tags",placeholder:"Select or enter policies",options:eX.map(e=>({value:e,label:e}))})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(R.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)(K.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(M.Form.Item,{label:"Vector Stores",name:"vector_stores","aria-label":"Vector Stores",children:(0,t.jsx)(ea.default,{onChange:e=>eN.setFieldValue("vector_stores",e),value:eN.getFieldValue("vector_stores"),accessToken:o||"",placeholder:"Select vector stores"})}),(0,t.jsx)(M.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(q.default,{onChange:e=>eN.setFieldValue("allowed_passthrough_routes",e),value:eN.getFieldValue("allowed_passthrough_routes"),accessToken:o||"",placeholder:"Select pass through routes"})}),(0,t.jsx)(M.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(J.default,{onChange:e=>eN.setFieldValue("mcp_servers_and_groups",e),value:eN.getFieldValue("mcp_servers_and_groups"),accessToken:o||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(M.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(F.Input,{type:"hidden"})}),(0,t.jsx)(M.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:eN.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:eN.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eN.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(M.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)($.default,{onChange:e=>eN.setFieldValue("agents_and_groups",e),value:eN.getFieldValue("agents_and_groups"),accessToken:o||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(M.Form.Item,{label:"Organization",name:"organization_id",children:(0,t.jsx)(z.Select,{allowClear:!0,placeholder:"Select an organization",showSearch:!0,optionFilterProp:"label",options:to.map(e=>({value:e.organization_id,label:e.organization_alias||e.organization_id}))})}),(0,t.jsx)(M.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(er.default,{value:eN.getFieldValue("logging_settings"),onChange:e=>eN.setFieldValue("logging_settings",e)})}),(0,t.jsx)(M.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:eu?"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)(F.Input.TextArea,{rows:6,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!eu})}),(0,t.jsx)(M.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(F.Input.TextArea,{rows:10})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 pr-0 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(I.Button,{onClick:()=>eV(!1),disabled:tt,children:"Cancel"}),(0,t.jsx)(I.Button,{icon:(0,t.jsx)(_.SaveOutlined,{className:"h-4 w-4"}),type:"primary",htmlType:"submit",loading:tt,children:"Save Changes"})]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Team Name"}),(0,t.jsx)("div",{children:tv.team_alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"font-mono",children:tv.team_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Created At"}),(0,t.jsx)("div",{children:new Date(tv.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:tv.models.map((e,l)=>(0,t.jsx)(w.Badge,{color:"red",children:e},l))})]}),tv.default_team_member_models&&tv.default_team_member_models.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Default Member Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:tv.default_team_member_models.map((e,l)=>(0,t.jsx)(w.Badge,{color:"blue",children:e},l))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",tv.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",tv.rpm_limit||"Unlimited"]}),(e_=tv.metadata?.model_tpm_limit??{},ef=tv.metadata?.model_rpm_limit??{},0===(ey=Array.from(new Set([...Object.keys(e_),...Object.keys(ef)]))).length?null:(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(T.Text,{className:"text-gray-500",children:"Per-model limits:"}),ey.map(e=>(0,t.jsxs)("div",{className:"text-xs ml-2",children:[e,": TPM ",e_[e]??"—",", RPM ",ef[e]??"—"]},e))]}))]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Team Budget"}),(0,t.jsxs)("div",{children:["Max Budget:"," ",null!==tv.max_budget?`$${(0,m.formatNumberWithCommas)(tv.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Soft Budget:"," ",null!==tv.soft_budget&&void 0!==tv.soft_budget?`$${(0,m.formatNumberWithCommas)(tv.soft_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Reset: ",tv.budget_duration||"Never"]}),tv.metadata?.soft_budget_alerting_emails&&Array.isArray(tv.metadata.soft_budget_alerting_emails)&&tv.metadata.soft_budget_alerting_emails.length>0&&(0,t.jsxs)("div",{children:["Soft Budget Alerting Emails: ",tv.metadata.soft_budget_alerting_emails.join(", ")]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(T.Text,{className:"font-medium",children:["Team Member Settings"," ",(0,t.jsx)(R.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: ",tv.team_member_budget_table?.max_budget||"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Duration: ",tv.team_member_budget_table?.budget_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["Key Duration: ",tv.metadata?.team_member_key_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["TPM Limit: ",tv.team_member_budget_table?.tpm_limit||"No Limit"]}),(0,t.jsxs)("div",{children:["RPM Limit: ",tv.team_member_budget_table?.rpm_limit||"No Limit"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Router Settings"}),tv.router_settings&&Object.values(tv.router_settings).some(e=>null!=e&&""!==e&&!(Array.isArray(e)&&0===e.length))?(0,t.jsxs)("div",{className:"mt-1 space-y-1",children:[tv.router_settings.routing_strategy&&(0,t.jsxs)("div",{children:["Routing Strategy:"," ",(0,t.jsx)(w.Badge,{color:"blue",children:tv.router_settings.routing_strategy})]}),null!=tv.router_settings.num_retries&&(0,t.jsxs)("div",{children:["Number of Retries: ",tv.router_settings.num_retries]}),null!=tv.router_settings.allowed_fails&&(0,t.jsxs)("div",{children:["Allowed Failures: ",tv.router_settings.allowed_fails]}),null!=tv.router_settings.cooldown_time&&(0,t.jsxs)("div",{children:["Cooldown Time: ",tv.router_settings.cooldown_time,"s"]}),null!=tv.router_settings.timeout&&(0,t.jsxs)("div",{children:["Timeout: ",tv.router_settings.timeout,"s"]}),null!=tv.router_settings.retry_after&&(0,t.jsxs)("div",{children:["Retry After: ",tv.router_settings.retry_after,"s"]}),tv.router_settings.fallbacks&&Array.isArray(tv.router_settings.fallbacks)&&tv.router_settings.fallbacks.length>0&&(0,t.jsxs)("div",{children:["Fallbacks: ",tv.router_settings.fallbacks.length," configured"]}),tv.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)(T.Text,{className:"font-medium",children:"Organization ID"}),(0,t.jsx)("div",{children:tv.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Status"}),(0,t.jsx)(w.Badge,{color:tv.blocked?"red":"green",children:tv.blocked?"Blocked":"Active"})]}),(0,t.jsx)(et.default,{objectPermission:tv.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:o}),(0,t.jsx)(Q,{globalGuardrailNames:eJ,teamGuardrails:tv.metadata?.guardrails||[],optedOutGlobalGuardrails:tv.metadata?.opted_out_global_guardrails||[],killSwitchOn:tw,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsx)(Y.default,{loggingConfigs:tv.metadata?.logging||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"}),tv.metadata?.secret_manager_settings&&(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Secret Manager Settings"}),(0,t.jsx)("pre",{className:"mt-2 bg-gray-50 p-3 rounded text-xs overflow-x-auto",children:JSON.stringify(tv.metadata.secret_manager_settings,null,2)})]})]})]})}].filter(e=>tp.includes(e.key))}),(0,t.jsx)(ei.default,{visible:eL,onCancel:()=>eD(!1),onSubmit:tf,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)(R.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:"tpm_limit",label:(0,t.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,t.jsx)(R.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)(R.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)(R.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:(tv.models||[]).map(e=>({label:e,value:e})),placeholder:"Leave empty to inherit all team models"}]}}),(0,t.jsx)(s.default,{isVisible:eS,onCancel:()=>eT(!1),onSubmit:t_,accessToken:o,teamId:e}),(0,t.jsx)(G.default,{isOpen:e6,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:e3?.user_id,code:!0},{label:"Email",value:e3?.user_email},{label:"Role",value:e3?.role}],onCancel:()=>{e9(!1),e7(null)},onOk:ty,confirmLoading:e8})]})}],56567)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/54563d12ee8915f4.js b/litellm/proxy/_experimental/out/_next/static/chunks/54563d12ee8915f4.js new file mode 100644 index 0000000000..28ee2d97f6 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/54563d12ee8915f4.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,596115,e=>{"use strict";var s=e.i(843476),l=e.i(271645),a=e.i(912598),t=e.i(109799),r=e.i(764205),i=e.i(584578),o=e.i(808613),n=e.i(56567),c=e.i(468133),d=e.i(708347),m=e.i(304967),h=e.i(994388),u=e.i(309426),x=e.i(599724),p=e.i(350967),g=e.i(404206),_=e.i(747871),j=e.i(500330),f=e.i(752978),b=e.i(197647),y=e.i(653824),v=e.i(881073),w=e.i(723731),T=e.i(278587);let C=({lastRefreshed:e,onRefresh:l,userRole:a,children:t})=>(0,s.jsxs)(y.TabGroup,{className:"gap-2 h-[75vh] w-full",children:[(0,s.jsxs)(v.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)(b.Tab,{children:"Your Teams"}),(0,s.jsx)(b.Tab,{children:"Available Teams"}),(0,d.isAdminRole)(a||"")&&(0,s.jsx)(b.Tab,{children:"Default Team Settings"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[e&&(0,s.jsxs)(x.Text,{children:["Last Refreshed: ",e]}),(0,s.jsx)(f.Icon,{icon:T.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:l})]})]}),(0,s.jsx)(w.TabPanels,{children:t})]});var S=e.i(206929),N=e.i(35983);let k=({filters:e,organizations:l,showFilters:a,onToggleFilters:t,onChange:r,onReset:i})=>(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Search by Team Name...",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:e.team_alias,onChange:e=>r("team_alias",e.target.value)}),(0,s.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,s.jsxs)("button",{className:`px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ${a?"bg-gray-100":""}`,onClick:()=>t(!a),children:[(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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filters",(e.team_id||e.team_alias||e.organization_id)&&(0,s.jsx)("span",{"data-testid":"active-filter-indicator",className:"w-2 h-2 rounded-full bg-blue-500"})]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:i,children:[(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 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"})}),"Reset Filters"]})]}),a&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Enter Team ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:e.team_id,onChange:e=>r("team_id",e.target.value)}),(0,s.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(S.Select,{value:e.organization_id||"",onValueChange:e=>r("organization_id",e),placeholder:"Select Organization",children:l?.map(e=>(0,s.jsx)(N.SelectItem,{value:e.organization_id||"",children:e.organization_alias||e.organization_id},e.organization_id))})})]})]});var I=e.i(135214),F=e.i(269200),A=e.i(942232),z=e.i(977572),O=e.i(427612),M=e.i(64848),L=e.i(496020),D=e.i(592968),P=e.i(591935),B=e.i(68155),E=e.i(389083),R=e.i(871943),V=e.i(502547),H=e.i(355619);let U=({team:e})=>{let[a,t]=(0,l.useState)(!1),r=!e.models||0===e.models.length||e.models.includes("all-proxy-models"),i=(0,l.useMemo)(()=>{if(r)return[];let s=e.models.map(e=>({name:e,source:"direct"}));for(let l of e.access_group_models||[])s.push({name:l,source:"access_group"});return s},[e.models,e.access_group_models,r]),o=(e,l)=>{if("all-proxy-models"===e.name)return(0,s.jsx)(E.Badge,{size:"xs",color:"red",children:(0,s.jsx)(x.Text,{children:"All Proxy Models"})},l);let a=(0,H.getModelDisplayName)(e.name),t=a.length>30?`${a.slice(0,30)}...`:a;return(0,s.jsx)(E.Badge,{size:"xs",color:"access_group"===e.source?"green":"blue",title:"access_group"===e.source?"From access group":"Direct assignment",children:(0,s.jsx)(x.Text,{children:t})},l)};return(0,s.jsx)(z.TableCell,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:i.length>3?"px-0":"",children:(0,s.jsx)("div",{className:"flex flex-col",children:0===i.length?(0,s.jsx)(E.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,s.jsx)(x.Text,{children:"All Proxy Models"})}):(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("div",{className:"flex items-start",children:[i.length>3&&(0,s.jsx)("div",{children:(0,s.jsx)(f.Icon,{icon:a?R.ChevronDownIcon:V.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{t(e=>!e)}})}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[i.slice(0,3).map((e,s)=>o(e,s)),i.length>3&&!a&&(0,s.jsx)(E.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,s.jsxs)(x.Text,{children:["+",i.length-3," ",i.length-3==1?"more model":"more models"]})}),a&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:i.slice(3).map((e,s)=>o(e,s+3))})]})]})})})})};var W=e.i(918549),W=W,G=e.i(846753),G=G;let K=({team:e,userId:l})=>{var a;let t,r=(a=((e,s)=>{if(!s)return null;let l=e.members_with_roles?.find(e=>e.user_id===s);return l?.role??null})(e,l),t="inline-flex items-center px-2.5 py-0.5 rounded-md text-xs font-medium border","admin"===a?(0,s.jsxs)("span",{className:t,style:{backgroundColor:"#EEF2FF",color:"#3730A3",borderColor:"#C7D2FE"},children:[(0,s.jsx)(W.default,{className:"h-3 w-3 mr-1"}),"Admin"]}):(0,s.jsxs)("span",{className:t,style:{backgroundColor:"#F3F4F6",color:"#4B5563",borderColor:"#E5E7EB"},children:[(0,s.jsx)(G.default,{className:"h-3 w-3 mr-1"}),"Member"]}));return(0,s.jsx)(z.TableCell,{children:r})},J=({teams:e,currentOrg:l,setSelectedTeamId:a,perTeamInfo:t,userRole:r,userId:i,setEditTeam:o,onDeleteTeam:n})=>(0,s.jsxs)(F.Table,{children:[(0,s.jsx)(O.TableHead,{children:(0,s.jsxs)(L.TableRow,{children:[(0,s.jsx)(M.TableHeaderCell,{children:"Team Name"}),(0,s.jsx)(M.TableHeaderCell,{children:"Team ID"}),(0,s.jsx)(M.TableHeaderCell,{children:"Created"}),(0,s.jsx)(M.TableHeaderCell,{children:"Spend (USD)"}),(0,s.jsx)(M.TableHeaderCell,{children:"Budget (USD)"}),(0,s.jsx)(M.TableHeaderCell,{children:"Models"}),(0,s.jsx)(M.TableHeaderCell,{children:"Organization"}),(0,s.jsx)(M.TableHeaderCell,{children:"Your Role"}),(0,s.jsx)(M.TableHeaderCell,{children:"Info"})]})}),(0,s.jsx)(A.TableBody,{children:e&&e.length>0?e.filter(e=>!l||e.organization_id===l.organization_id).sort((e,s)=>new Date(s.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,s.jsxs)(L.TableRow,{children:[(0,s.jsx)(z.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.team_alias}),(0,s.jsx)(z.TableCell,{children:(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(D.Tooltip,{title:e.team_id,children:(0,s.jsxs)(h.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]","data-testid":"team-id-cell",onClick:()=>{a(e.team_id)},children:[e.team_id.slice(0,7),"..."]})})})}),(0,s.jsx)(z.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,s.jsx)(z.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:(0,j.formatNumberWithCommas)(e.spend,4)}),(0,s.jsx)(z.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:null!==e.max_budget&&void 0!==e.max_budget?e.max_budget:"No limit"}),(0,s.jsx)(U,{team:e}),(0,s.jsx)(z.TableCell,{children:e.organization_id}),(0,s.jsx)(K,{team:e,userId:i}),(0,s.jsxs)(z.TableCell,{children:[(0,s.jsxs)(x.Text,{children:[t&&e.team_id&&t[e.team_id]&&t[e.team_id].keys&&t[e.team_id].keys.length," ","Keys"]}),(0,s.jsxs)(x.Text,{children:[t&&e.team_id&&t[e.team_id]&&t[e.team_id].team_info&&t[e.team_id].team_info.members_with_roles&&t[e.team_id].team_info.members_with_roles.length," ","Members"]})]}),(0,s.jsx)(z.TableCell,{children:"Admin"==r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Icon,{icon:P.PencilAltIcon,size:"sm",onClick:()=>{a(e.team_id),o(!0)}}),(0,s.jsx)(f.Icon,{onClick:()=>n(e.team_id),icon:B.TrashIcon,size:"sm"})]}):null})]},e.team_id)):null})]});var $=e.i(582458),$=$,q=e.i(995926);let Q=({teams:e,teamToDelete:a,onCancel:t,onConfirm:r})=>{let[i,o]=(0,l.useState)(""),n=e?.find(e=>e.team_id===a),c=n?.team_alias||"",d=n?.keys?.length||0,m=i===c;return(0,s.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl min-h-[380px] py-6 overflow-hidden transform transition-all flex flex-col justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Delete Team"}),(0,s.jsx)("button",{"aria-label":"Close",onClick:()=>{t(),o("")},className:"text-gray-400 hover:text-gray-500 focus:outline-none",children:(0,s.jsx)(q.XIcon,{size:20})})]}),(0,s.jsxs)("div",{className:"px-6 py-4",children:[d>0&&(0,s.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-red-50 border border-red-100 rounded-md mb-5",children:[(0,s.jsx)("div",{className:"text-red-500 mt-0.5",children:(0,s.jsx)($.default,{size:20})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-base font-medium text-red-600",children:["Warning: This team has ",d," associated key",d>1?"s":"","."]}),(0,s.jsx)("p",{className:"text-base text-red-600 mt-2",children:"Deleting the team will also delete all associated keys. This action is irreversible."})]})]}),(0,s.jsx)("p",{className:"text-base text-gray-600 mb-5",children:"Are you sure you want to force delete this team and all its keys?"}),(0,s.jsxs)("div",{className:"mb-5",children:[(0,s.jsxs)("label",{className:"block text-base font-medium text-gray-700 mb-2",children:["Type ",(0,s.jsx)("span",{className:"underline",children:c})," to confirm deletion:"]}),(0,s.jsx)("input",{type:"text",value:i,onChange:e=>o(e.target.value),placeholder:"Enter team name exactly",className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]})]})]}),(0,s.jsxs)("div",{className:"px-6 py-4 bg-gray-50 flex justify-end gap-4",children:[(0,s.jsx)("button",{onClick:()=>{t(),o("")},className:"px-5 py-3 bg-white border border-gray-300 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Cancel"}),(0,s.jsx)("button",{onClick:r,disabled:!m,className:`px-5 py-3 rounded-md text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 ${m?"bg-red-600 hover:bg-red-700":"bg-red-300 cursor-not-allowed"}`,children:"Force Delete"})]})]})})};var Y=e.i(464571),X=e.i(311451),Z=e.i(212931),ee=e.i(199133),es=e.i(790848),el=e.i(677667),ea=e.i(130643),et=e.i(898667),er=e.i(779241),ei=e.i(827252),eo=e.i(435451),en=e.i(916940),ec=e.i(75921),ed=e.i(552130),em=e.i(651904),eh=e.i(533882),eu=e.i(727749),ex=e.i(390605),ep=e.i(471145);let eg=({isTeamModalVisible:e,handleOk:i,handleCancel:n,currentOrg:c,organizations:d,teams:m,setTeams:h,modelAliases:u,setModelAliases:p,loggingSettings:g,setLoggingSettings:_,setIsTeamModalVisible:j})=>{let{userId:f,userRole:b,accessToken:y,premiumUser:v}=(0,I.default)(),w=(0,a.useQueryClient)(),[T]=o.Form.useForm(),[C,S]=(0,l.useState)([]),[N,k]=(0,l.useState)(null),[F,A]=(0,l.useState)([]),[z,O]=(0,l.useState)([]),[M,L]=(0,l.useState)([]),[P,B]=(0,l.useState)([]),[E,R]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{try{if(null===f||null===b||null===y)return;let e=await (0,H.fetchAvailableModelsForTeamOrKey)(f,b,y);e&&S(e)}catch(e){console.error("Error fetching user models:",e)}})()},[y,f,b,m]),(0,l.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${N}`);let s=(e=[],N&&N.models.length>0?(console.log(`organization.models: ${N.models}`),e=N.models):e=C,(0,H.unfurlWildcardModelsInList)(e,C));console.log(`models: ${s}`),A(s),T.setFieldValue("models",[])},[N,C,T]);let V=async()=>{try{if(null==y)return;let e=await (0,r.fetchMCPAccessGroups)(y);B(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,l.useEffect)(()=>{V()},[y,V]),(0,l.useEffect)(()=>{let e=async()=>{try{if(null==y)return;let e=(await (0,r.getPoliciesList)(y)).policies.map(e=>e.policy_name);L(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==y)return;let e=(await (0,r.getGuardrailsList)(y)).guardrails.map(e=>e.guardrail_name);O(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[y]);let U=async e=>{try{if(console.log(`formValues: ${JSON.stringify(e)}`),null!=y){let s=e?.team_alias,l=m?.map(e=>e.team_alias)??[],a=e?.organization_id||c?.organization_id;if(""===a||"string"!=typeof a?e.organization_id=null:e.organization_id=a.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(eu.default.info("Creating Team"),g.length>0){let s={};if(e.metadata)try{s=JSON.parse(e.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}s={...s,logging:g.filter(e=>e.callback_name)},e.metadata=JSON.stringify(s)}if(e.secret_manager_settings&&"string"==typeof e.secret_manager_settings)if(""===e.secret_manager_settings.trim())delete e.secret_manager_settings;else try{e.secret_manager_settings=JSON.parse(e.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}let i=e.allowed_agents_and_groups&&((e.allowed_agents_and_groups.agents?.length??0)>0||(e.allowed_agents_and_groups.accessGroups?.length??0)>0),o=Array.isArray(e.object_permission_search_tools)&&e.object_permission_search_tools.length>0;if(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||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.toolPermissions)||i||o){if(e.object_permission||(e.object_permission={}),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){let{servers:s,accessGroups:l}=e.allowed_mcp_servers_and_groups;s&&s.length>0&&(e.object_permission.mcp_servers=s),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),delete e.allowed_mcp_servers_and_groups}if(e.mcp_tool_permissions&&Object.keys(e.mcp_tool_permissions).length>0&&(e.object_permission.mcp_tool_permissions=e.mcp_tool_permissions,delete e.mcp_tool_permissions),e.allowed_agents_and_groups){let{agents:s,accessGroups:l}=e.allowed_agents_and_groups;s&&s.length>0&&(e.object_permission.agents=s),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}o&&(e.object_permission.search_tools=e.object_permission_search_tools,delete e.object_permission_search_tools)}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),Object.keys(u).length>0&&(e.model_aliases=u);let n=await (0,r.teamCreateCall)(y,e);w.invalidateQueries({queryKey:t.organizationKeys.all}),null!==m?h([...m,n]):h([n]),console.log(`response for team create call: ${n}`),eu.default.success("Team created"),T.resetFields(),_([]),p({}),j(!1)}}catch(e){console.error("Error creating the team:",e),eu.default.fromBackend("Error creating the team: "+e)}};return(0,s.jsx)(Z.Modal,{title:"Create Team",open:e,width:1e3,footer:null,onOk:i,onCancel:n,children:(0,s.jsxs)(o.Form,{form:T,onFinish:U,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,s.jsx)(er.TextInput,{placeholder:"","data-testid":"team-name-input"})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Organization"," ",(0,s.jsx)(D.Tooltip,{title:(0,s.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:c?c.organization_id:null,className:"mt-8",children:(0,s.jsx)(ee.Select,{showSearch:!0,allowClear:!0,placeholder:"Search or select an Organization",onChange:e=>{T.setFieldValue("organization_id",e),k(d?.find(s=>s.organization_id===e)||null)},filterOption:(e,s)=>!!s&&(s.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:d?.map(e=>(0,s.jsxs)(ee.Select.Option,{value:e.organization_id,children:[(0,s.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,s.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Models"," ",(0,s.jsx)(D.Tooltip,{title:"These are the models that your selected team has access to",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(ee.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},"data-testid":"team-models-select",children:[(0,s.jsx)(ee.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),F.map(e=>(0,s.jsx)(ee.Select.Option,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Team Member Settings"})}),(0,s.jsxs)(ea.AccordionBody,{children:[(0,s.jsx)(x.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,s.jsx)(o.Form.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.models!==s.models,children:({getFieldValue:e})=>{let l=e("models")||[],a=l.length>0?l:F;return(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Default Model Access"," ",(0,s.jsx)(D.Tooltip,{title:"Optional. If set, new members can only access these models by default. Must be a subset of the team's models. Leave empty to give all members access to all team models.",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"default_team_member_models",children:(0,s.jsx)(ee.Select,{mode:"multiple",placeholder:"Leave empty — all team models accessible to every member",style:{width:"100%"},children:a.map(e=>(0,s.jsx)(ee.Select.Option,{value:e,children:(0,H.getModelDisplayName)(e)},e))})})}}),(0,s.jsx)(o.Form.Item,{label:"Default Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"Default spend budget for each member in this team.",children:(0,s.jsx)(eo.default,{step:.01,precision:2,width:200})}),(0,s.jsx)(o.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,s.jsx)(er.TextInput,{placeholder:"e.g., 30d"})}),(0,s.jsx)(o.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,s.jsx)(eo.default,{step:1,width:400})}),(0,s.jsx)(o.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,s.jsx)(eo.default,{step:1,width:400})})]})]}),(0,s.jsx)(o.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,s.jsx)(eo.default,{step:.01,precision:2,width:200})}),(0,s.jsx)(o.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,s.jsxs)(ee.Select,{defaultValue:null,placeholder:"n/a",children:[(0,s.jsx)(ee.Select.Option,{value:"24h",children:"daily"}),(0,s.jsx)(ee.Select.Option,{value:"7d",children:"weekly"}),(0,s.jsx)(ee.Select.Option,{value:"30d",children:"monthly"})]})}),(0,s.jsx)(o.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,s.jsx)(eo.default,{step:1,width:400})}),(0,s.jsx)(o.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,s.jsx)(eo.default,{step:1,width:400})}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",onClick:()=>{E||(V(),R(!0))},children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Additional Settings"})}),(0,s.jsxs)(ea.AccordionBody,{children:[(0,s.jsx)(o.Form.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,s.jsx)(er.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,s.jsx)(o.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,s.jsx)(X.Input.TextArea,{rows:4})}),(0,s.jsx)(o.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:v?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,s)=>{if(!s)return Promise.resolve();try{return JSON.parse(s),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,s.jsx)(X.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!v})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(D.Tooltip,{title:"Setup your first guardrail",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,s.jsx)(ee.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:z.map(e=>({value:e,label:e}))})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,s.jsx)(D.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,s.jsx)(es.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Policies"," ",(0,s.jsx)(D.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,s.jsx)(ee.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:M.map(e=>({value:e,label:e}))})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,s.jsx)(D.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,s.jsx)(en.default,{onChange:e=>T.setFieldValue("allowed_vector_store_ids",e),value:T.getFieldValue("allowed_vector_store_ids"),accessToken:y||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"MCP Settings"})}),(0,s.jsxs)(ea.AccordionBody,{children:[(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,s.jsx)(D.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,s.jsx)(ec.default,{onChange:e=>T.setFieldValue("allowed_mcp_servers_and_groups",e),value:T.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:y||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,s.jsx)(o.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,s.jsx)(X.Input,{type:"hidden"})}),(0,s.jsx)(o.Form.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_mcp_servers_and_groups!==s.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==s.mcp_tool_permissions,children:()=>(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(ex.default,{accessToken:y||"",selectedServers:T.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:T.getFieldValue("mcp_tool_permissions")||{},onChange:e=>T.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Agent Settings"})}),(0,s.jsx)(ea.AccordionBody,{children:(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Agents"," ",(0,s.jsx)(D.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,s.jsx)(ed.default,{onChange:e=>T.setFieldValue("allowed_agents_and_groups",e),value:T.getFieldValue("allowed_agents_and_groups"),accessToken:y||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Search Tool Settings"})}),(0,s.jsx)(ea.AccordionBody,{children:(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Search Tools"," ",(0,s.jsx)(D.Tooltip,{title:"Select which search tools this team can access. Leave empty to allow all search tools.",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"object_permission_search_tools",className:"mt-4",help:"Restrict which configured search tools keys on this team may call.",children:(0,s.jsx)(ep.default,{onChange:e=>T.setFieldValue("object_permission_search_tools",e),value:T.getFieldValue("object_permission_search_tools"),accessToken:y||"",placeholder:"Select search tools (optional, empty = all allowed)"})})})]}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Logging Settings"})}),(0,s.jsx)(ea.AccordionBody,{children:(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(em.default,{value:g,onChange:_,premiumUser:v})})})]}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Model Aliases"})}),(0,s.jsx)(ea.AccordionBody,{children:(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)(x.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,s.jsx)(eh.default,{accessToken:y||"",initialModelAliases:u,onAliasUpdate:p,showExampleConfig:!1})]})})]})]}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(Y.Button,{htmlType:"submit","data-testid":"create-team-submit",children:"Create Team"})})]})})},e_=({teams:e,accessToken:f,setTeams:b,userID:y,userRole:v,organizations:w,premiumUser:T=!1})=>{let S=(0,a.useQueryClient)(),[N,F]=(0,l.useState)(null),[A,z]=(0,l.useState)(!1),[O,M]=(0,l.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),[L]=o.Form.useForm(),[D]=o.Form.useForm(),[P,B]=(0,l.useState)(null),[E,R]=(0,l.useState)(!1),[V,H]=(0,l.useState)(!1),[U,W]=(0,l.useState)(!1),[G,K]=(0,l.useState)(!1),[$,q]=(0,l.useState)([]),[Y,X]=(0,l.useState)(!1),[Z,ee]=(0,l.useState)(null),[es,el]=(0,l.useState)({}),[ea,et]=(0,l.useState)([]),[er,ei]=(0,l.useState)({}),{lastRefreshed:eo,onRefreshClick:en}=(({currentOrg:e,setTeams:s})=>{let[a,t]=(0,l.useState)(""),{accessToken:r,userId:o,userRole:n}=(0,I.default)(),c=(0,l.useCallback)(()=>{t(new Date().toLocaleString())},[]);return(0,l.useEffect)(()=>{r&&(0,i.fetchTeams)(r,o,n,e,s).then(),c()},[r,e,a,c,s,o,n]),{lastRefreshed:a,setLastRefreshed:t,onRefreshClick:c}})({currentOrg:N,setTeams:b});(0,l.useEffect)(()=>{e&&el(e.reduce((e,s)=>(e[s.team_id]={keys:s.keys||[],team_info:{members_with_roles:s.members_with_roles||[]}},e),{}))},[e]);let ec=async e=>{ee(e),X(!0)},ed=async()=>{if(null!=Z&&null!=e&&null!=f){try{await (0,r.teamDeleteCall)(f,Z),S.invalidateQueries({queryKey:t.organizationKeys.all}),(0,i.fetchTeams)(f,y,v,N,b)}catch(e){console.error("Error deleting the team:",e)}X(!1),ee(null)}};return(0,s.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,s.jsx)(p.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,s.jsxs)(u.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[("Admin"==v||"Org Admin"==v)&&(0,s.jsx)(h.Button,{className:"w-fit",onClick:()=>H(!0),children:"+ Create New Team"}),P?(0,s.jsx)(n.default,{teamId:P,onUpdate:e=>{b(s=>{if(null==s)return s;let l=s.map(s=>e.team_id===s.team_id?(0,j.updateExistingKeys)(s,e):s);return f&&(0,i.fetchTeams)(f,y,v,N,b),l})},onClose:()=>{B(null),R(!1)},accessToken:f,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let s=0;se.team_id===P)),is_proxy_admin:"Admin"==v,is_org_admin:(()=>{let s=e?.find(e=>e.team_id===P);if(!s?.organization_id||!w||!y)return!1;let l=w.find(e=>e.organization_id===s.organization_id);return l?.members?.some(e=>e.user_id===y&&"org_admin"===e.user_role)??!1})(),userModels:$,editTeam:E,premiumUser:T}):(0,s.jsxs)(C,{lastRefreshed:eo,onRefresh:en,userRole:v,children:[(0,s.jsxs)(g.TabPanel,{children:[(0,s.jsxs)(x.Text,{children:["Click on “Team ID” to view team details ",(0,s.jsx)("b",{children:"and"})," manage team members."]}),(0,s.jsx)(p.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,s.jsx)(u.Col,{numColSpan:1,children:(0,s.jsxs)(m.Card,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsx)("div",{className:"flex flex-col space-y-4",children:(0,s.jsx)(k,{filters:O,organizations:w,showFilters:A,onToggleFilters:z,onChange:(e,s)=>{let l={...O,[e]:s};M(l),f&&(0,r.v2TeamListCall)(f,l.organization_id||null,null,l.team_id||null,l.team_alias||null).then(e=>{e&&e.teams&&b(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})},onReset:()=>{M({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),f&&(0,r.v2TeamListCall)(f,null,y||null,null,null).then(e=>{e&&e.teams&&b(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})}})})}),(0,s.jsx)(J,{teams:e,currentOrg:N,perTeamInfo:es,userRole:v,userId:y,setSelectedTeamId:B,setEditTeam:R,onDeleteTeam:ec}),Y&&(0,s.jsx)(Q,{teams:e,teamToDelete:Z,onCancel:()=>{X(!1),ee(null)},onConfirm:ed})]})})})]}),(0,s.jsx)(g.TabPanel,{children:(0,s.jsx)(_.default,{accessToken:f,userID:y})}),(0,d.isAdminRole)(v||"")&&(0,s.jsx)(g.TabPanel,{children:(0,s.jsx)(c.default,{accessToken:f,userID:y||"",userRole:v||""})})]}),("Admin"==v||"Org Admin"==v)&&(0,s.jsx)(eg,{isTeamModalVisible:V,handleOk:()=>{H(!1),L.resetFields(),et([]),ei({})},handleCancel:()=>{H(!1),L.resetFields(),et([]),ei({})},currentOrg:N,organizations:w,teams:e,setTeams:b,modelAliases:er,setModelAliases:ei,loggingSettings:ea,setLoggingSettings:et,setIsTeamModalVisible:H})]})})})};var ej=e.i(214541),ef=e.i(846835);e.s(["default",0,()=>{let{accessToken:e,userId:a,userRole:t}=(0,I.default)(),{teams:r,setTeams:i}=(0,ej.default)(),[o,n]=(0,l.useState)([]);return(0,l.useEffect)(()=>{(0,ef.fetchOrganizations)(e,n).then(()=>{})},[e]),(0,s.jsx)(e_,{teams:r,accessToken:e,setTeams:i,userID:a,userRole:t,organizations:o})}],596115)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/570d770996d98e0f.js b/litellm/proxy/_experimental/out/_next/static/chunks/570d770996d98e0f.js new file mode 100644 index 0000000000..44121e4e58 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/570d770996d98e0f.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207670,e=>{"use strict";function t(){for(var e,t,r=0,n="",i=arguments.length;rt,"default",0,t])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(914949),i=e.i(404948);let l=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,l],836938);var o=e.i(613541),s=e.i(763731),a=e.i(242064),c=e.i(491816);e.i(793154);var d=e.i(880476),u=e.i(183293),m=e.i(717356),p=e.i(320560),g=e.i(307358),f=e.i(246422),h=e.i(838378),x=e.i(617933);let y=(0,f.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,n=(0,h.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:n,fontWeightStrong:i,innerPadding:l,boxShadowSecondary:o,colorTextHeading:s,borderRadiusLG:a,zIndexPopup:c,titleMarginBottom:d,colorBgElevated:m,popoverBg:g,titleBorderBottom:f,innerContentPadding:h,titlePadding:x}=e;return[{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:a,boxShadow:o,padding:l},[`${t}-title`]:{minWidth:n,marginBottom:d,color:s,fontWeight:i,borderBottom:f,padding:x},[`${t}-inner-content`]:{color:r,padding:h}})},(0,p.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(n),(e=>{let{componentCls:t}=e;return{[t]:x.PresetColors.map(r=>{let n=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":n,[`${t}-inner`]:{backgroundColor:n},[`${t}-arrow`]:{background:"transparent"}}}})}})(n),(0,m.initZoomMotion)(n,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:n,padding:i,wireframe:l,zIndexPopupBase:o,borderRadiusLG:s,marginXS:a,lineType:c,colorSplit:d,paddingSM:u}=e,m=r-n;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:o+30},(0,g.getArrowToken)(e)),(0,p.getArrowOffsetToken)({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:12*!l,titleMarginBottom:l?0:a,titlePadding:l?`${m/2}px ${i}px ${m/2-t}px`:0,titleBorderBottom:l?`${t}px ${c} ${d}`:"none",innerContentPadding:l?`${u}px ${i}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});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 i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let b=({title:e,content:r,prefixCls:n})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${n}-title`},e),r&&t.createElement("div",{className:`${n}-inner-content`},r)):null,w=e=>{let{hashId:n,prefixCls:i,className:o,style:s,placement:a="top",title:c,content:u,children:m}=e,p=l(c),g=l(u),f=(0,r.default)(n,i,`${i}-pure`,`${i}-placement-${a}`,o);return t.createElement("div",{className:f,style:s},t.createElement("div",{className:`${i}-arrow`}),t.createElement(d.Popup,Object.assign({},e,{className:n,prefixCls:i}),m||t.createElement(b,{prefixCls:i,title:p,content:g})))},j=e=>{let{prefixCls:n,className:i}=e,l=v(e,["prefixCls","className"]),{getPrefixCls:o}=t.useContext(a.ConfigContext),s=o("popover",n),[c,d,u]=y(s);return c(t.createElement(w,Object.assign({},l,{prefixCls:s,hashId:d,className:(0,r.default)(i,u)})))};e.s(["Overlay",0,b,"default",0,j],310730);var C=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 i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let S=t.forwardRef((e,d)=>{var u,m;let{prefixCls:p,title:g,content:f,overlayClassName:h,placement:x="top",trigger:v="hover",children:w,mouseEnterDelay:j=.1,mouseLeaveDelay:S=.1,onOpenChange:k,overlayStyle:O={},styles:_,classNames:N}=e,I=C(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:L,className:E,style:P,classNames:U,styles:$}=(0,a.useComponentConfig)("popover"),T=L("popover",p),[A,z,W]=y(T),R=L(),B=(0,r.default)(h,z,W,E,U.root,null==N?void 0:N.root),M=(0,r.default)(U.body,null==N?void 0:N.body),[F,D]=(0,n.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),V=(e,t)=>{D(e,!0),null==k||k(e,t)},K=l(g),H=l(f);return A(t.createElement(c.default,Object.assign({placement:x,trigger:v,mouseEnterDelay:j,mouseLeaveDelay:S},I,{prefixCls:T,classNames:{root:B,body:M},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},$.root),P),O),null==_?void 0:_.root),body:Object.assign(Object.assign({},$.body),null==_?void 0:_.body)},ref:d,open:F,onOpenChange:e=>{V(e)},overlay:K||H?t.createElement(b,{prefixCls:T,title:K,content:H}):null,transitionName:(0,o.getTransitionName)(R,"zoom-big",I.transitionName),"data-popover-inject":!0}),(0,s.cloneElement)(w,{onKeyDown:e=>{var r,n;(0,t.isValidElement)(w)&&(null==(n=null==w?void 0:(r=w.props).onKeyDown)||n.call(r,e)),e.keyCode===i.default.ESC&&V(!1,e)}})))});S._InternalPanelDoNotUseOrYouWillBeFired=j,e.s(["default",0,S],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},295320,283713,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var i=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:n}))});e.s(["CloudServerOutlined",0,l],295320);var o=e.i(764205),s=e.i(612256);let a="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,s.useUIConfig)(),t=e?.is_control_plane??!1,n=e?.workers??[],[i,l]=(0,r.useState)(()=>localStorage.getItem(a));(0,r.useEffect)(()=>{if(!i||0===n.length)return;let e=n.find(e=>e.worker_id===i);e&&(0,o.switchToWorkerUrl)(e.url)},[i,n]);let c=n.find(e=>e.worker_id===i)??null,d=(0,r.useCallback)(e=>{let t=n.find(t=>t.worker_id===e);t&&(l(e),localStorage.setItem(a,e),(0,o.switchToWorkerUrl)(t.url))},[n]);return{isControlPlane:t,workers:n,selectedWorkerId:i,selectedWorker:c,selectWorker:d,disconnectFromWorker:(0,r.useCallback)(()=>{l(null),localStorage.removeItem(a),(0,o.switchToWorkerUrl)(null)},[])}}],283713)},571303,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(115504);function i({className:e="",...i}){var l,o;let s=(0,r.useId)();return l=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===s),r=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==s);t&&r&&(t.currentTime=r.currentTime)},o=[s],(0,r.useLayoutEffect)(l,o),(0,t.jsxs)("svg",{"data-spinner-id":s,className:(0,n.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...i,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>i],571303)},936578,e=>{"use strict";var t=e.i(843476),r=e.i(115504),n=e.i(571303);function i(){return(0,t.jsxs)("div",{className:(0,r.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(n.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>i])},594542,e=>{"use strict";var t=e.i(843476),r=e.i(954616),n=e.i(764205),i=e.i(612256),l=e.i(936578),o=e.i(268004),s=e.i(161281),a=e.i(321836),c=e.i(827252),d=e.i(295320),u=e.i(560445),m=e.i(464571),p=e.i(175712),g=e.i(808613),f=e.i(311451),h=e.i(282786),x=e.i(199133),y=e.i(770914),v=e.i(898586),b=e.i(618566),w=e.i(271645),j=e.i(283713);function C(){let[e,C]=(0,w.useState)(""),[S,k]=(0,w.useState)(""),[O,_]=(0,w.useState)(!0),{data:N,isLoading:I}=(0,i.useUIConfig)(),L=(0,r.useMutation)({mutationFn:async({username:e,password:t,useV3:r})=>await (0,n.loginCall)(e,t,r)}),E=(0,b.useRouter)(),{workers:P,selectWorker:U}=(0,j.useWorker)(),[$,T]=(0,w.useState)(null);(0,w.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("worker");e&&T(e)},[]),(0,w.useEffect)(()=>{if(I)return;if(N&&N.admin_ui_disabled)return void _(!1);let e=new URLSearchParams(window.location.search),t=e.get("code"),r=t&&/^[a-zA-Z0-9._~+/=-]+$/.test(t)?t:null;if(r){let t=localStorage.getItem("litellm_worker_url"),i=t&&/^https?:\/\/.+/.test(t)?t:null;(0,n.exchangeLoginCode)(r,i).then(()=>{e.delete("code");let t=e.toString();window.history.replaceState(null,"",window.location.pathname+(t?`?${t}`:"")),E.replace("/ui/?login=success")});return}if(e.has("worker")&&N?.is_control_plane){(0,o.clearTokenCookies)(),_(!1);return}let i=(0,o.getCookie)("token");if(i&&!(0,s.isJwtExpired)(i)){let e=(0,a.consumeReturnUrl)();e?E.replace(e):E.replace("/ui");return}if(N&&N.auto_redirect_to_sso){let e=(0,a.getReturnUrl)(),t=`${(0,n.getProxyBaseUrl)()}/sso/key/generate`;e&&(0,a.isValidReturnUrl)(e)&&(t+=`?redirect_to=${encodeURIComponent(e)}`),E.push(t);return}_(!1)},[I,E,N]);let A=L.error instanceof Error?L.error.message:null,z=L.isPending,{Title:W,Text:R,Paragraph:B}=v.Typography;return I||O?(0,t.jsx)(l.default,{}):N&&N.admin_ui_disabled?(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:(0,t.jsx)(p.Card,{className:"w-full max-w-lg shadow-md",children:(0,t.jsxs)(y.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)(W,{level:2,children:"🚅 LiteLLM"})}),(0,t.jsx)(u.Alert,{message:"Admin UI Disabled",description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B,{className:"text-sm",children:"The Admin UI has been disabled by the administrator. To re-enable it, please update the following environment variable:"}),(0,t.jsx)(B,{className:"text-sm",children:(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"DISABLE_ADMIN_UI=False"})})]}),type:"warning",showIcon:!0})]})})}):(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:(0,t.jsxs)(p.Card,{className:"w-full max-w-lg shadow-md",children:[(0,t.jsxs)(y.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)(W,{level:2,children:"🚅 LiteLLM"})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(W,{level:3,children:"Login"}),(0,t.jsx)(R,{type:"secondary",children:"Access your LiteLLM Admin UI."})]}),(0,t.jsx)(u.Alert,{message:"Default Credentials",description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(B,{className:"text-sm",children:["By default, Username is ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"admin"})," and Password is your set LiteLLM Proxy",(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"MASTER_KEY"}),"."]}),(0,t.jsxs)(B,{className:"text-sm",children:["Need to set UI credentials or SSO?"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/ui",target:"_blank",rel:"noopener noreferrer",children:"Check the documentation"}),"."]})]}),type:"info",icon:(0,t.jsx)(c.InfoCircleOutlined,{}),showIcon:!0}),A&&(0,t.jsx)(u.Alert,{message:A,type:"error",showIcon:!0}),(0,t.jsxs)(g.Form,{onFinish:()=>{let t=P.find(e=>e.worker_id===$);t&&(0,n.switchToWorkerUrl)(t.url),L.mutate({username:e,password:S,useV3:!!t},{onSuccess:e=>{if(t)U(t.worker_id),E.push("/ui/?login=success");else{let t=(0,a.consumeReturnUrl)();t?E.push(t):E.push(e.redirect_url)}},onError:()=>{t&&(0,n.switchToWorkerUrl)(null)}})},layout:"vertical",requiredMark:!1,children:[N?.is_control_plane&&P.length>0&&(0,t.jsx)(g.Form.Item,{label:"Worker",style:{marginBottom:16},children:(0,t.jsx)(x.Select,{value:$||void 0,onChange:e=>T(e),placeholder:"Choose a worker to connect to",size:"large",suffixIcon:(0,t.jsx)(d.CloudServerOutlined,{}),options:P.map(e=>({label:e.name,value:e.worker_id}))})}),(0,t.jsx)(g.Form.Item,{label:"Username",name:"username",rules:[{required:!0,message:"Please enter your username"}],children:(0,t.jsx)(f.Input,{placeholder:"Enter your username",autoComplete:"username",value:e,onChange:e=>C(e.target.value),disabled:z,size:"large",className:"rounded-md border-gray-300"})}),(0,t.jsx)(g.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"Please enter your password"}],children:(0,t.jsx)(f.Input.Password,{placeholder:"Enter your password",autoComplete:"current-password",value:S,onChange:e=>k(e.target.value),disabled:z,size:"large"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:z,disabled:z,block:!0,size:"large",children:z?"Logging in...":"Login"})}),(0,t.jsx)(g.Form.Item,{children:N?.sso_configured?(0,t.jsx)(m.Button,{disabled:z||!!$&&0===P.length,onClick:()=>{let e=P.find(e=>e.worker_id===$);e&&(localStorage.setItem("litellm_selected_worker_id",$),(0,n.switchToWorkerUrl)(e.url));let t=e?.url??(0,n.getProxyBaseUrl)(),r=encodeURIComponent(window.location.origin+"/ui/login");E.push(`${t}/sso/key/generate?return_to=${r}`)},block:!0,size:"large",children:"Login with SSO"}):(0,t.jsx)(h.Popover,{content:"Please configure SSO to log in with SSO.",trigger:"hover",children:(0,t.jsx)(m.Button,{disabled:!0,block:!0,size:"large",children:"Login with SSO"})})})]})]}),N?.sso_configured&&(0,t.jsx)(u.Alert,{type:"info",showIcon:!0,closable:!0,message:(0,t.jsxs)(R,{children:["Single Sign-On (SSO) is enabled. LiteLLM no longer automatically redirects to the SSO login flow upon loading this page. To re-enable auto-redirect-to-SSO, set ",(0,t.jsx)(R,{code:!0,children:"AUTO_REDIRECT_UI_LOGIN_TO_SSO=true"})," in your environment configuration."]})})]})})}e.s(["default",0,function(){return(0,t.jsx)(C,{})}],594542)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4d3700bffc110569.js b/litellm/proxy/_experimental/out/_next/static/chunks/57d42681e5c19818.js similarity index 91% rename from litellm/proxy/_experimental/out/_next/static/chunks/4d3700bffc110569.js rename to litellm/proxy/_experimental/out/_next/static/chunks/57d42681e5c19818.js index e4cee22475..e0e6a24d16 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/4d3700bffc110569.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/57d42681e5c19818.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function s(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function r(e,r){let a=t(e);return isNaN(r)?s(e,NaN):(r&&a.setDate(a.getDate()+r),a)}function a(e,r){let a=t(e);if(isNaN(r))return s(e,NaN);if(!r)return a;let i=a.getDate(),l=s(e,a.getTime());return(l.setMonth(a.getMonth()+r+1,0),i>=l.getDate())?l:(a.setFullYear(l.getFullYear(),l.getMonth(),i),a)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>s],96226),e.s(["addDays",()=>r],439189),e.s(["addMonths",()=>a],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),s=e.i(343794),r=e.i(529681),a=e.i(908286),i=e.i(242064),l=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["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"],d=function(e,t){let r,a,i;return(0,s.default)(Object.assign(Object.assign(Object.assign({},(r=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${r}`]:r&&o.includes(r)})),(a={},u.forEach(s=>{a[`${e}-align-${s}`]=t.align===s}),a[`${e}-align-stretch`]=!t.align&&!!t.vertical,a)),(i={},c.forEach(s=>{i[`${e}-justify-${s}`]=t.justify===s}),i)))},p=(0,l.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:s,paddingLG:r}=e,a=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:s,flexGapLG:r});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(a),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(a),(e=>{let{componentCls:t}=e,s={};return o.forEach(e=>{s[`${t}-wrap-${e}`]={flexWrap:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return u.forEach(e=>{s[`${t}-align-${e}`]={alignItems:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return c.forEach(e=>{s[`${t}-justify-${e}`]={justifyContent:e}}),s})(a)]},()=>({}),{resetStyle:!1});var h=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(s[r[a]]=e[r[a]]);return s};let m=t.default.forwardRef((e,l)=>{let{prefixCls:n,rootClassName:o,className:c,style:u,flex:m,gap:g,vertical:x=!1,component:f="div",children:v}=e,y=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:b,direction:j,getPrefixCls:w}=t.default.useContext(i.ConfigContext),N=w("flex",n),[S,M,k]=p(N),C=null!=x?x:null==b?void 0:b.vertical,O=(0,s.default)(c,o,null==b?void 0:b.className,N,M,k,d(N,e),{[`${N}-rtl`]:"rtl"===j,[`${N}-gap-${g}`]:(0,a.isPresetSize)(g),[`${N}-vertical`]:C}),_=Object.assign(Object.assign({},null==b?void 0:b.style),u);return m&&(_.flex=m),g&&!(0,a.isPresetSize)(g)&&(_.gap=g),S(t.default.createElement(f,Object.assign({ref:l,className:O,style:_},(0,r.default)(y,["justify","wrap","align"])),v))});e.s(["Flex",0,m],525720)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let s=e.i(264042).Row;e.s(["Row",0,s],621192)},214541,e=>{"use strict";var t=e.i(271645),s=e.i(135214),r=e.i(270345);e.s(["default",0,()=>{let[e,a]=(0,t.useState)([]),{accessToken:i,userId:l,userRole:n}=(0,s.default)();return(0,t.useEffect)(()=>{(async()=>{a(await (0,r.fetchTeams)(i,l,n,null))})()},[i,l,n]),{teams:e,setTeams:a}}])},891547,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:i,className:l,accessToken:n,disabled:o})=>{let[c,u]=(0,s.useState)([]),[d,p]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,a.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{p(!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=>{console.log("Selected guardrails:",t),e(t)},value:i,loading:d,className:l,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),s=e.i(271645),r=e.i(199133),a=e.i(764205);function i(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let s=e.version_number??1,r=e.version_status??"draft";return{label:`${e.policy_name} — v${s} (${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:l,className:n,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,p]=(0,s.useState)([]),[h,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,a.getPoliciesList)(o);e.policies&&(p(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[o,u]),(0,t.jsx)("div",{children:(0,t.jsx)(r.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:h,className:n,allowClear:!0,options:i(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>i])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),s=e.i(271645);let r={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 a=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(a.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ArrowLeftOutlined",0,i],447566)},292639,e=>{"use strict";var t=e.i(764205),s=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,s.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},250980,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],250980)},502547,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,s],502547)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),s=e.i(114272),r=e.i(540143),a=e.i(915823),i=e.i(619273),l=class extends a.Subscribable{#e;#t=void 0;#s;#r;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,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#i()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#a(){let e=this.#s?.state??(0,s.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}}#i(e){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,s){let a=(0,n.useQueryClient)(s),[o]=t.useState(()=>new l(a,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(r.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(i.noop)},[o]);if(c.error&&(0,i.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={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 a=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(a.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ClockCircleOutlined",0,i],637235)},384767,e=>{"use strict";var t=e.i(843476),s=e.i(599724),r=e.i(271645),a=e.i(389083);let i=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 l=e.i(764205);let n=function({vectorStores:e,accessToken:n}){let[o,c]=(0,r.useState)([]);return(0,r.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,l.vectorStoreListCall)(n);e.data&&c(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)(i,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(s.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,s)=>{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},s)})}):(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)(i,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=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 c=e.i(871943),u=e.i(502547),d=e.i(592968);let p=function({mcpServers:e,mcpAccessGroups:i=[],mcpToolPermissions:n={},mcpToolsets:p=[],accessToken:h}){let[m,g]=(0,r.useState)([]),[x,f]=(0,r.useState)([]),[v,y]=(0,r.useState)(new Set),[b,j]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{(async()=>{if(h&&e.length>0)try{let e=await (0,l.fetchMCPServers)(h);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[h,e.length]),(0,r.useEffect)(()=>{(async()=>{if(h&&p.length>0)try{let e=await (0,l.fetchMCPToolsets)(h),t=Array.isArray(e)?e.filter(e=>p.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[h,p.length]);let w=[...e.map(e=>({type:"server",value:e})),...i.map(e=>({type:"accessGroup",value:e}))],N=w.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)(o,{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:"blue",size:"xs",children:N})]}),N>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[w.map((e,s)=>{let r="server"===e.type?n[e.value]:void 0,a=r&&r.length>0,i=v.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 s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s}))},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)(d.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=m.find(t=>t.server_id===e);if(t){let s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),a&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),i?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&i&&(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,s)=>(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},s))})})]},s)}),p.length>0&&p.map((e,s)=>{let r=x.find(t=>t.toolset_id===e),a=b.has(e),i=r?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>i>0&&void j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-purple-200 transition-all ${i>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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),i>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:i}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===i?"tool":"tools"}),a?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),i>0&&a&&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,s)=>(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]},s))})})]},`toolset-${s}`)})]}):(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)(o,{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"})]})]})},h=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"}))}),m=function({agents:e,agentAccessGroups:i=[],accessToken:n}){let[o,c]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,l.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&c(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let u=[...e.map(e=>({type:"agent",value:e})),...i.map(e=>({type:"accessGroup",value:e}))],p=u.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)(h,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(a.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:u.map((e,s)=>(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)(d.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 flex-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 s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})})})},s))}):(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)(h,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.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:a="",accessToken:i}){let l=e?.vector_stores||[],o=e?.mcp_servers||[],c=e?.mcp_access_groups||[],u=e?.mcp_tool_permissions||{},d=e?.mcp_toolsets||[],h=e?.agents||[],g=e?.agent_access_groups||[],x=(0,t.jsxs)("div",{className:"card"===r?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:l,accessToken:i}),(0,t.jsx)(p,{mcpServers:o,mcpAccessGroups:c,mcpToolPermissions:u,mcpToolsets:d,accessToken:i}),(0,t.jsx)(m,{agents:h,agentAccessGroups:g,accessToken:i})]});return"card"===r?(0,t.jsxs)("div",{className:`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)(s.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),x]}):(0,t.jsxs)("div",{className:`${a}`,children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function s(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function r(e,r){let a=t(e);return isNaN(r)?s(e,NaN):(r&&a.setDate(a.getDate()+r),a)}function a(e,r){let a=t(e);if(isNaN(r))return s(e,NaN);if(!r)return a;let i=a.getDate(),l=s(e,a.getTime());return(l.setMonth(a.getMonth()+r+1,0),i>=l.getDate())?l:(a.setFullYear(l.getFullYear(),l.getMonth(),i),a)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>s],96226),e.s(["addDays",()=>r],439189),e.s(["addMonths",()=>a],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),s=e.i(343794),r=e.i(529681),a=e.i(908286),i=e.i(242064),l=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["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"],d=function(e,t){let r,a,i;return(0,s.default)(Object.assign(Object.assign(Object.assign({},(r=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${r}`]:r&&o.includes(r)})),(a={},u.forEach(s=>{a[`${e}-align-${s}`]=t.align===s}),a[`${e}-align-stretch`]=!t.align&&!!t.vertical,a)),(i={},c.forEach(s=>{i[`${e}-justify-${s}`]=t.justify===s}),i)))},p=(0,l.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:s,paddingLG:r}=e,a=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:s,flexGapLG:r});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(a),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(a),(e=>{let{componentCls:t}=e,s={};return o.forEach(e=>{s[`${t}-wrap-${e}`]={flexWrap:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return u.forEach(e=>{s[`${t}-align-${e}`]={alignItems:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return c.forEach(e=>{s[`${t}-justify-${e}`]={justifyContent:e}}),s})(a)]},()=>({}),{resetStyle:!1});var h=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(s[r[a]]=e[r[a]]);return s};let m=t.default.forwardRef((e,l)=>{let{prefixCls:n,rootClassName:o,className:c,style:u,flex:m,gap:x,vertical:g=!1,component:f="div",children:v}=e,y=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:b,direction:j,getPrefixCls:w}=t.default.useContext(i.ConfigContext),N=w("flex",n),[S,k,M]=p(N),C=null!=g?g:null==b?void 0:b.vertical,O=(0,s.default)(c,o,null==b?void 0:b.className,N,k,M,d(N,e),{[`${N}-rtl`]:"rtl"===j,[`${N}-gap-${x}`]:(0,a.isPresetSize)(x),[`${N}-vertical`]:C}),_=Object.assign(Object.assign({},null==b?void 0:b.style),u);return m&&(_.flex=m),x&&!(0,a.isPresetSize)(x)&&(_.gap=x),S(t.default.createElement(f,Object.assign({ref:l,className:O,style:_},(0,r.default)(y,["justify","wrap","align"])),v))});e.s(["Flex",0,m],525720)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let s=e.i(264042).Row;e.s(["Row",0,s],621192)},214541,e=>{"use strict";var t=e.i(271645),s=e.i(135214),r=e.i(270345);e.s(["default",0,()=>{let[e,a]=(0,t.useState)([]),{accessToken:i,userId:l,userRole:n}=(0,s.default)();return(0,t.useEffect)(()=>{(async()=>{a(await (0,r.fetchTeams)(i,l,n,null))})()},[i,l,n]),{teams:e,setTeams:a}}])},891547,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:i,className:l,accessToken:n,disabled:o})=>{let[c,u]=(0,s.useState)([]),[d,p]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,a.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{p(!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=>{console.log("Selected guardrails:",t),e(t)},value:i,loading:d,className:l,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),s=e.i(271645),r=e.i(199133),a=e.i(764205);function i(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let s=e.version_number??1,r=e.version_status??"draft";return{label:`${e.policy_name} — v${s} (${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:l,className:n,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,p]=(0,s.useState)([]),[h,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,a.getPoliciesList)(o);e.policies&&(p(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[o,u]),(0,t.jsx)("div",{children:(0,t.jsx)(r.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:h,className:n,allowClear:!0,options:i(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>i])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),s=e.i(271645);let r={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 a=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(a.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ArrowLeftOutlined",0,i],447566)},292639,e=>{"use strict";var t=e.i(764205),s=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,s.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},250980,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],250980)},502547,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,s],502547)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),s=e.i(114272),r=e.i(540143),a=e.i(915823),i=e.i(619273),l=class extends a.Subscribable{#e;#t=void 0;#s;#r;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,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#i()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#a(){let e=this.#s?.state??(0,s.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}}#i(e){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,s){let a=(0,n.useQueryClient)(s),[o]=t.useState(()=>new l(a,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(r.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(i.noop)},[o]);if(c.error&&(0,i.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={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 a=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(a.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ClockCircleOutlined",0,i],637235)},384767,e=>{"use strict";var t=e.i(843476),s=e.i(599724),r=e.i(271645),a=e.i(389083);let i=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 l=e.i(764205);let n=function({vectorStores:e,accessToken:n}){let[o,c]=(0,r.useState)([]);return(0,r.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,l.vectorStoreListCall)(n);e.data&&c(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)(i,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(s.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,s)=>{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},s)})}):(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)(i,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=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 c=e.i(871943),u=e.i(502547),d=e.i(592968);let p=function({mcpServers:e,mcpAccessGroups:i=[],mcpToolPermissions:n={},mcpToolsets:p=[],accessToken:h}){let[m,x]=(0,r.useState)([]),[g,f]=(0,r.useState)([]),[v,y]=(0,r.useState)(new Set),[b,j]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{(async()=>{if(h&&e.length>0)try{let e=await (0,l.fetchMCPServers)(h);e&&Array.isArray(e)?x(e):e.data&&Array.isArray(e.data)&&x(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[h,e.length]),(0,r.useEffect)(()=>{(async()=>{if(h&&p.length>0)try{let e=await (0,l.fetchMCPToolsets)(h),t=Array.isArray(e)?e.filter(e=>p.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[h,p.length]);let w=[...e.map(e=>({type:"server",value:e})),...i.map(e=>({type:"accessGroup",value:e}))],N=w.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)(o,{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:"blue",size:"xs",children:N})]}),N>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[w.map((e,s)=>{let r="server"===e.type?n[e.value]:void 0,a=r&&r.length>0,i=v.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 s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s}))},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)(d.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=m.find(t=>t.server_id===e);if(t){let s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),a&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),i?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&i&&(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,s)=>(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},s))})})]},s)}),p.length>0&&p.map((e,s)=>{let r=g.find(t=>t.toolset_id===e),a=b.has(e),i=r?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>i>0&&void j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-purple-200 transition-all ${i>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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),i>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:i}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===i?"tool":"tools"}),a?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),i>0&&a&&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,s)=>(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]},s))})})]},`toolset-${s}`)})]}):(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)(o,{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"})]})]})},h=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"}))}),m=function({agents:e,agentAccessGroups:i=[],accessToken:n}){let[o,c]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,l.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&c(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let u=[...e.map(e=>({type:"agent",value:e})),...i.map(e=>({type:"accessGroup",value:e}))],p=u.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)(h,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(a.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:u.map((e,s)=>(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)(d.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 flex-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 s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})})})},s))}):(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)(h,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.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:a="",accessToken:i}){let l=e?.vector_stores||[],o=e?.mcp_servers||[],c=e?.mcp_access_groups||[],u=e?.mcp_tool_permissions||{},d=e?.mcp_toolsets||[],h=e?.agents||[],x=e?.agent_access_groups||[],g=e?.search_tools||[],f=(0,t.jsxs)("div",{className:"card"===r?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:l,accessToken:i}),(0,t.jsx)(p,{mcpServers:o,mcpAccessGroups:c,mcpToolPermissions:u,mcpToolsets:d,accessToken:i}),(0,t.jsx)(m,{agents:h,agentAccessGroups:x,accessToken:i}),(0,t.jsxs)("div",{className:"rounded-md border border-gray-100 p-4",children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-800",children:"Search tools"}),0===g.length?(0,t.jsx)(s.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)(s.Text,{className:"mt-1 block text-xs text-gray-700",children:g.join(", ")})]})]});return"card"===r?(0,t.jsxs)("div",{className:`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)(s.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),f]}):(0,t.jsxs)("div",{className:`${a}`,children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),f]})}],384767)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5a6ef256a98646ae.js b/litellm/proxy/_experimental/out/_next/static/chunks/5a6ef256a98646ae.js deleted file mode 100644 index cb93bddc87..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/5a6ef256a98646ae.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},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",()=>t])},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",()=>t])},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",()=>t])},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),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])},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(199133),o=e.i(764205);e.s(["default",0,({onChange:e,value:n,className:a,accessToken:s,placeholder:l="Select vector stores",disabled:c=!1})=>{let[d,h]=(0,r.useState)([]),[u,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(s){p(!0);try{let e=await (0,o.vectorStoreListCall)(s);e.data&&h(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[s]),(0,t.jsx)("div",{children:(0,t.jsx)(i.Select,{mode:"multiple",placeholder:l,onChange:e,value:n,loading:u,className:a,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})})}])},59935,(e,t,r)=>{var i;let o;e.e,i=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},i=!r.document&&!!r.postMessage,o=r.IS_PAPA_WORKER||!1,n={},a=0,s={};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=v(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new p(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var i=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,o)r.postMessage({results:n,workerId:s.WORKER_ID,finished:i});else if(_(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=n=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!i||!_(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),i||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):o&&this._config.error&&r.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=s.RemoteChunkSize),l.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,r,o=this._config.downloadRequestHeaders;for(r in o)t.setRequestHeader(r,o[r])}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 d(e){(e=e||{}).chunkSize||(e.chunkSize=s.LocalChunkSize),l.call(this,e);var t,r,i="u">typeof FileReader;this.stream=function(e){this._input=e,r=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 h(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function u(e){l.call(this,e=e||{});var t=[],r=!0,i=!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(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=y(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!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 p(e){var t,r,i,o,n=/^\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)))$/,l=this,c=0,d=0,h=!1,u=!1,p=[],m={data:[],errors:[],meta:{}};function k(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function b(){if(m&&i&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines&&(m.data=m.data.filter(function(e){return!k(e)})),y()){if(m)if(Array.isArray(m.data[0])){for(var t,r=0;y()&&r(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(n.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):a.test(r)?new Date(r):""===r?null:r):r)(s=e.header?o>=p.length?"__parsed_extra":p[o]:s,l=e.transform?e.transform(l,s):l);"__parsed_extra"===s?(i[s]=i[s]||[],i[s].push(l)):i[s]=l}return e.header&&(o>p.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+o,d+r):oe.preview?r.abort():(m.data=m.data[0],o(m,l))))}),this.parse=function(o,n,a){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(o,l)),i=!1,e.delimiter?_(e.delimiter)&&(e.delimiter=e.delimiter(o),m.meta.delimiter=e.delimiter):((l=((t,r,i,o,n)=>{var a,l,c,d;n=n||[","," ","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var h=0;h=r.length/2?"\r\n":"\r"}}function f(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t=(e=e||{}).delimiter,r=e.newline,i=e.comments,o=e.step,n=e.preview,a=e.fastMode,l=null,c=!1,d=null==e.quoteChar?'"':e.quoteChar,h=d;if(void 0!==e.escapeChar&&(h=e.escapeChar),("string"!=typeof t||-1=n)return D(!0);break}C.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:x.length,index:u}),M++}}else if(i&&0===E.length&&s.substring(u,u+y)===i){if(-1===j)return D();u=j+v,j=s.indexOf(r,u),T=s.indexOf(t,u)}else if(-1!==T&&(T=n)return D(!0)}return F();function I(e){x.push(e),S=u}function L(e){return -1!==e&&(e=s.substring(M+1,e))&&""===e.trim()?e.length:0}function F(e){return m||(void 0===e&&(e=s.substring(u)),E.push(e),u=k,I(E),w&&N()),D()}function H(e){u=e,I(E),E=[],j=s.indexOf(r,u)}function D(i){if(e.header&&!g&&x.length&&!c){var o=x[0],n=Object.create(null),a=new Set(o);let t=!1;for(let r=0;r{if("object"==typeof t){if("string"!=typeof t.delimiter||s.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(n=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");d=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),t.escapeFormulae instanceof RegExp?h=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(h=/^[=+\-@\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 p(null,e,c);if("object"==typeof e[0])return p(d||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||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])),p(e.fields||[],e.data||[],c);throw Error("Unable to serialize unrecognized input");function p(e,t,r){var a="",s=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var r=0;r{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),r=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:"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 o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["ClockCircleOutlined",0,n],637235)},921511,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(199133),o=e.i(764205);function n(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let r=e.version_number??1,i=e.version_status??"draft";return{label:`${e.policy_name} — v${r} (${i})${e.description?` — ${e.description}`:""}`,value:"production"===i?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:a,className:s,accessToken:l,disabled:c,onPoliciesLoaded:d})=>{let[h,u]=(0,r.useState)([]),[p,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(l){f(!0);try{let e=await (0,o.getPoliciesList)(l);e.policies&&(u(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{f(!1)}}})()},[l,d]),(0,t.jsx)("div",{children:(0,t.jsx)(i.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:a,loading:p,className:s,allowClear:!0,options:n(h),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>n])},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(199133),o=e.i(764205);e.s(["default",0,({onChange:e,value:n,className:a,accessToken:s,disabled:l})=>{let[c,d]=(0,r.useState)([]),[h,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(s){u(!0);try{let e=await (0,o.getGuardrailsList)(s);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{u(!1)}}})()},[s]),(0,t.jsx)("div",{children:(0,t.jsx)(i.Select,{mode:"multiple",disabled:l,placeholder:l?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:n,loading:h,className:a,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},367240,555436,e=>{"use strict";let t=(0,e.i(475254).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>t],367240);var r=e.i(54943);e.s(["Search",()=>r.default],555436)},678784,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",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},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",()=>t])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["SaveOutlined",0,n],987432)},431343,569074,e=>{"use strict";var t=e.i(475254);let r=(0,t.default)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["Play",()=>r],431343);let i=(0,t.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",()=>i],569074)},531245,657150,e=>{"use strict";let t=(0,e.i(475254).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["default",()=>t],657150),e.s(["Bot",()=>t],531245)},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},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",()=>t],727612)},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},673709,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=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 a={'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)(i.CheckIcon,{size:16}):(0,t.jsx)(o,{size:16})}),(0,t.jsx)(n.Prism,{language:s,style:a,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],673709)},903446,e=>{"use strict";let t=(0,e.i(475254).default)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",()=>t])},132104,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};var o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["ArrowUpOutlined",0,n],132104)},447593,989022,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["ClearOutlined",0,n],447593);var a=e.i(843476),s=e.i(592968),l=e.i(637235);let c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 394c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H400V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v236H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h228v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h164c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V394h164zM628 630H400V394h228v236z"}}]},name:"number",theme:"outlined"};var d=r.forwardRef(function(e,i){return r.createElement(o.default,(0,t.default)({},e,{ref:i,icon:c}))});let h={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"};var u=r.forwardRef(function(e,i){return r.createElement(o.default,(0,t.default)({},e,{ref:i,icon:h}))}),p=e.i(872934),f=e.i(812618),g=e.i(366308),m=e.i(458505);e.s(["default",0,({timeToFirstToken:e,totalLatency:t,usage:r,toolName:i})=>e||t||r?(0,a.jsxs)("div",{className:"response-metrics mt-2 pt-2 border-t border-gray-100 text-xs text-gray-500 flex flex-wrap gap-3",children:[void 0!==e&&(0,a.jsx)(s.Tooltip,{title:"Time to first token",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(l.ClockCircleOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["TTFT: ",(e/1e3).toFixed(2),"s"]})]})}),void 0!==t&&(0,a.jsx)(s.Tooltip,{title:"Total latency",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(l.ClockCircleOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Total Latency: ",(t/1e3).toFixed(2),"s"]})]})}),r?.promptTokens!==void 0&&(0,a.jsx)(s.Tooltip,{title:"Prompt tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(u,{className:"mr-1"}),(0,a.jsxs)("span",{children:["In: ",r.promptTokens]})]})}),r?.completionTokens!==void 0&&(0,a.jsx)(s.Tooltip,{title:"Completion tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(p.ExportOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Out: ",r.completionTokens]})]})}),r?.reasoningTokens!==void 0&&(0,a.jsx)(s.Tooltip,{title:"Reasoning tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(f.BulbOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Reasoning: ",r.reasoningTokens]})]})}),r?.totalTokens!==void 0&&(0,a.jsx)(s.Tooltip,{title:"Total tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(d,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Total: ",r.totalTokens]})]})}),r?.cost!==void 0&&(0,a.jsx)(s.Tooltip,{title:"Cost",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(m.DollarOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["$",r.cost.toFixed(6)]})]})}),i&&(0,a.jsx)(s.Tooltip,{title:"Tool used",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(g.ToolOutlined,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Tool: ",i]})]})})]}):null],989022)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5b23ca2957db2e3d.js b/litellm/proxy/_experimental/out/_next/static/chunks/5b23ca2957db2e3d.js deleted file mode 100644 index 13807db7e0..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/5b23ca2957db2e3d.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var s=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(s.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),s=e.i(529681);let l=e=>{let{prefixCls:a,className:s,style:l,size:n,shape:i}=e,o=(0,r.default)({[`${a}-lg`]:"large"===n,[`${a}-sm`]:"small"===n}),d=(0,r.default)({[`${a}-circle`]:"circle"===i,[`${a}-square`]:"square"===i,[`${a}-round`]:"round"===i}),c=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(a,o,d,s),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var n=e.i(694758),i=e.i(915654),o=e.i(246422),d=e.i(838378);let c=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),m=e=>({height:e,lineHeight:(0,i.unit)(e)}),g=e=>Object.assign({width:e},m(e)),u=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},m(e)),h=e=>Object.assign({width:e},m(e)),p=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},x=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},m(e)),f=(0,o.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:s,skeletonButtonCls:l,skeletonInputCls:n,skeletonImageCls:i,controlHeight:o,controlHeightLG:d,controlHeightSM:m,gradientFromColor:f,padding:b,marginSM:v,borderRadius:w,titleHeight:j,blockRadius:k,paragraphLiHeight:C,controlHeightXS:N,paragraphMarginTop:y}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:b,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:f},g(o)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},g(d)),[`${r}-sm`]:Object.assign({},g(m))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:j,background:f,borderRadius:k,[`+ ${s}`]:{marginBlockStart:m}},[s]:{padding:0,"> li":{width:"100%",height:C,listStyle:"none",background:f,borderRadius:k,"+ li":{marginBlockStart:N}}},[`${s}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${s} > li`]:{borderRadius:w}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:v,[`+ ${s}`]:{marginBlockStart:y}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:s,controlHeightSM:l,gradientFromColor:n,calc:i}=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:i(a).mul(2).equal(),minWidth:i(a).mul(2).equal()},x(a,i))},p(e,a,r)),{[`${r}-lg`]:Object.assign({},x(s,i))}),p(e,s,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},x(l,i))}),p(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:s,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},g(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},g(s)),[`${t}${t}-sm`]:Object.assign({},g(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:s,controlHeightSM:l,gradientFromColor:n,calc:i}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},u(t,i)),[`${a}-lg`]:Object.assign({},u(s,i)),[`${a}-sm`]:Object.assign({},u(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:s,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:s},h(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},h(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${a}, - ${s} > li, - ${r}, - ${l}, - ${n}, - ${i} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),b=e=>{let{prefixCls:a,className:s,style:l,rows:n=0}=e,i=Array.from({length:n}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,s),style:l},i)},v=({prefixCls:e,className:a,width:s,style:l})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:s},l)});function w(e){return e&&"object"==typeof e?e:{}}let j=e=>{let{prefixCls:s,loading:n,className:i,rootClassName:o,style:d,children:c,avatar:m=!1,title:g=!0,paragraph:u=!0,active:h,round:p}=e,{getPrefixCls:x,direction:j,className:k,style:C}=(0,a.useComponentConfig)("skeleton"),N=x("skeleton",s),[y,$,T]=f(N);if(n||!("loading"in e)){let e,a,s=!!m,n=!!g,c=!!u;if(s){let r=Object.assign(Object.assign({prefixCls:`${N}-avatar`},n&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),w(m));e=t.createElement("div",{className:`${N}-header`},t.createElement(l,Object.assign({},r)))}if(n||c){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${N}-title`},!s&&c?{width:"38%"}:s&&c?{width:"50%"}:{}),w(g));e=t.createElement(v,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${N}-paragraph`},(e={},s&&n||(e.width="61%"),!s&&n?e.rows=3:e.rows=2,e)),w(u));r=t.createElement(b,Object.assign({},a))}a=t.createElement("div",{className:`${N}-content`},e,r)}let x=(0,r.default)(N,{[`${N}-with-avatar`]:s,[`${N}-active`]:h,[`${N}-rtl`]:"rtl"===j,[`${N}-round`]:p},k,i,o,$,T);return y(t.createElement("div",{className:x,style:Object.assign(Object.assign({},C),d)},e,a))}return null!=c?c:null};j.Button=e=>{let{prefixCls:n,className:i,rootClassName:o,active:d,block:c=!1,size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[h,p,x]=f(u),b=(0,s.default)(e,["prefixCls"]),v=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},i,o,p,x);return h(t.createElement("div",{className:v},t.createElement(l,Object.assign({prefixCls:`${u}-button`,size:m},b))))},j.Avatar=e=>{let{prefixCls:n,className:i,rootClassName:o,active:d,shape:c="circle",size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[h,p,x]=f(u),b=(0,s.default)(e,["prefixCls","className"]),v=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d},i,o,p,x);return h(t.createElement("div",{className:v},t.createElement(l,Object.assign({prefixCls:`${u}-avatar`,shape:c,size:m},b))))},j.Input=e=>{let{prefixCls:n,className:i,rootClassName:o,active:d,block:c,size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[h,p,x]=f(u),b=(0,s.default)(e,["prefixCls"]),v=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},i,o,p,x);return h(t.createElement("div",{className:v},t.createElement(l,Object.assign({prefixCls:`${u}-input`,size:m},b))))},j.Image=e=>{let{prefixCls:s,className:l,rootClassName:n,style:i,active:o}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",s),[m,g,u]=f(c),h=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:o},l,n,g,u);return m(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${c}-image`,l),style:i},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`})))))},j.Node=e=>{let{prefixCls:s,className:l,rootClassName:n,style:i,active:o,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),m=c("skeleton",s),[g,u,h]=f(m),p=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:o},u,l,n,h);return g(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${m}-image`,l),style:i},d)))},e.s(["default",0,j],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let s=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],l=e=>({_s:e,status:s[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),n=e=>e?6:5,i=(e,t,r,a,s)=>{clearTimeout(a.current);let n=l(e);t(n),r.current=n,s&&s({current:n})};var o=e.i(480731),d=e.i(444755),c=e.i(673706);let m=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 g=e.i(95779);let u={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"}},h=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,g.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,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,c.makeClassName)("Button"),x=({loading:e,iconSize:t,iconPosition:r,Icon:s,needMargin:l,transitionStatus:n})=>{let i=l?r===o.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),g={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(m,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",i,g.default,g[n]),style:{transition:"width 150ms"}}):a.default.createElement(s,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,i)})},f=a.default.forwardRef((e,s)=>{let{icon:m,iconPosition:g=o.HorizontalPositions.Left,size:f=o.Sizes.SM,color:b,variant:v="primary",disabled:w,loading:j=!1,loadingText:k,children:C,tooltip:N,className:y}=e,$=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),T=j||w,E=void 0!==m||j,O=j&&k,M=!(!C&&!O),S=(0,d.tremorTwMerge)(u[f].height,u[f].width),_="light"!==v?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",R=h(v,b),B=("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"}})[f],{tooltipProps:z,getReferenceProps:P}=(0,r.useTooltip)(300),[q,A]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:s,timeout:o,initialEntered:d,mountOnEnter:c,unmountOnExit:m,onStateChange:g}={})=>{let[u,h]=(0,a.useState)(()=>l(d?2:n(c))),p=(0,a.useRef)(u),x=(0,a.useRef)(0),[f,b]="object"==typeof o?[o.enter,o.exit]:[o,o],v=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return n(t)}})(p.current._s,m);e&&i(e,h,p,x,g)},[g,m]);return[u,(0,a.useCallback)(a=>{let l=e=>{switch(i(e,h,p,x,g),e){case 1:f>=0&&(x.current=((...e)=>setTimeout(...e))(v,f));break;case 4:b>=0&&(x.current=((...e)=>setTimeout(...e))(v,b));break;case 0:case 3:x.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},o=p.current.isEnter;"boolean"!=typeof a&&(a=!o),a?o||l(e?+!r:2):o&&l(t?s?3:4:n(m))},[v,g,e,t,r,s,f,b,m]),v]})({timeout:50});return(0,a.useEffect)(()=>{A(j)},[j]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([s,z.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",_,B.paddingX,B.paddingY,B.fontSize,R.textColor,R.bgColor,R.borderColor,R.hoverBorderColor,T?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(h(v,b).hoverTextColor,h(v,b).hoverBgColor,h(v,b).hoverBorderColor),y),disabled:T},P,$),a.default.createElement(r.default,Object.assign({text:N},z)),E&&g!==o.HorizontalPositions.Right?a.default.createElement(x,{loading:j,iconSize:S,iconPosition:g,Icon:m,transitionStatus:q.status,needMargin:M}):null,O||C?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},O?k:C):null,E&&g===o.HorizontalPositions.Right?a.default.createElement(x,{loading:j,iconSize:S,iconPosition:g,Icon:m,transitionStatus:q.status,needMargin:M}):null)});f.displayName="Button",e.s(["Button",()=>f],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let s=(0,e.i(673706).makeClassName)("Table"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(s("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:l,className:(0,a.tremorTwMerge)(s("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},o),n))});l.displayName="Table",e.s(["Table",()=>l],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let s=(0,e.i(673706).makeClassName)("TableBody"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:l,className:(0,a.tremorTwMerge)(s("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},o),n))});l.displayName="TableBody",e.s(["TableBody",()=>l],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let s=(0,e.i(673706).makeClassName)("TableCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:l,className:(0,a.tremorTwMerge)(s("root"),"align-middle whitespace-nowrap text-left p-4",i)},o),n))});l.displayName="TableCell",e.s(["TableCell",()=>l],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let s=(0,e.i(673706).makeClassName)("TableHead"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:l,className:(0,a.tremorTwMerge)(s("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},o),n))});l.displayName="TableHead",e.s(["TableHead",()=>l],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let s=(0,e.i(673706).makeClassName)("TableHeaderCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:l,className:(0,a.tremorTwMerge)(s("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},o),n))});l.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>l],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let s=(0,e.i(673706).makeClassName)("TableRow"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:l,className:(0,a.tremorTwMerge)(s("row"),i)},o),n))});l.displayName="TableRow",e.s(["TableRow",()=>l],496020)},68155,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 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,r],68155)},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)},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)},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)},292639,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},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)},384767,e=>{"use strict";var t=e.i(843476),r=e.i(599724),a=e.i(271645),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:"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 n=e.i(764205);let i=function({vectorStores:e,accessToken:i}){let[o,d]=(0,a.useState)([]);return(0,a.useEffect)(()=>{(async()=>{if(i&&0!==e.length)try{let e=await (0,n.vectorStoreListCall)(i);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)}})()},[i,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)(r.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,r)=>{let a;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:(a=o.find(t=>t.vector_store_id===e))?`${a.vector_store_name||a.vector_store_id} (${a.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)(l,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=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 d=e.i(871943),c=e.i(502547),m=e.i(592968);let g=function({mcpServers:e,mcpAccessGroups:l=[],mcpToolPermissions:i={},mcpToolsets:g=[],accessToken:u}){let[h,p]=(0,a.useState)([]),[x,f]=(0,a.useState)([]),[b,v]=(0,a.useState)(new Set),[w,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{(async()=>{if(u&&e.length>0)try{let e=await (0,n.fetchMCPServers)(u);e&&Array.isArray(e)?p(e):e.data&&Array.isArray(e.data)&&p(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[u,e.length]),(0,a.useEffect)(()=>{(async()=>{if(u&&g.length>0)try{let e=await (0,n.fetchMCPToolsets)(u),t=Array.isArray(e)?e.filter(e=>g.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[u,g.length]);let k=[...e.map(e=>({type:"server",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],C=k.length+g.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)(o,{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:"blue",size:"xs",children:C})]}),C>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[k.map((e,r)=>{let a="server"===e.type?i[e.value]:void 0,s=a&&a.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 v(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 ${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)(m.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=h.find(t=>t.server_id===e);if(t){let r=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),s&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:a.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===a.length?"tool":"tools"}),l?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.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:a.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)}),g.length>0&&g.map((e,r)=>{let a=x.find(t=>t.toolset_id===e),s=w.has(e),l=a?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>l>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 ${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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:a?.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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),l>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l>0&&s&&a&&(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:a.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)(o,{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"})]})]})},u=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:"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"}))}),h=function({agents:e,agentAccessGroups:l=[],accessToken:i}){let[o,d]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(i&&e.length>0)try{let e=await (0,n.getAgentsList)(i);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[i,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],g=c.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)(u,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(s.Badge,{color:"purple",size:"xs",children:g})]}),g>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.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)(m.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 flex-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 flex-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 uppercase tracking-wide flex-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)(u,{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:a="card",className:s="",accessToken:l}){let n=e?.vector_stores||[],o=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},m=e?.mcp_toolsets||[],u=e?.agents||[],p=e?.agent_access_groups||[],x=(0,t.jsxs)("div",{className:"card"===a?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(i,{vectorStores:n,accessToken:l}),(0,t.jsx)(g,{mcpServers:o,mcpAccessGroups:d,mcpToolPermissions:c,mcpToolsets:m,accessToken:l}),(0,t.jsx)(h,{agents:u,agentAccessGroups:p,accessToken:l})]});return"card"===a?(0,t.jsxs)("div",{className:`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)(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"})]})}),x]}):(0,t.jsxs)("div",{className:`${s}`,children:[(0,t.jsx)(r.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4f6e5b838f18b8e6.js b/litellm/proxy/_experimental/out/_next/static/chunks/5ca32057c3affe38.js similarity index 51% rename from litellm/proxy/_experimental/out/_next/static/chunks/4f6e5b838f18b8e6.js rename to litellm/proxy/_experimental/out/_next/static/chunks/5ca32057c3affe38.js index d32437269c..4898d7471c 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/4f6e5b838f18b8e6.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/5ca32057c3affe38.js @@ -1,10 +1,10 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,161059,147612,e=>{"use strict";var t=e.i(843476),l=e.i(764205),s=e.i(266027),a=e.i(243652),r=e.i(135214);let i=(0,a.createQueryKeys)("credentials"),o=()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.credentialListCall)(e),enabled:!!e})};var n=e.i(368670),d=e.i(625901),c=e.i(292639),m=e.i(785242),u=e.i(152990),h=e.i(682830),x=e.i(271645),p=e.i(269200),g=e.i(427612),f=e.i(64848),j=e.i(942232),_=e.i(496020),y=e.i(977572),b=e.i(446891);function v({data:e=[],columns:l,isLoading:s=!1,sorting:a=[],onSortingChange:r,pagination:i,onPaginationChange:o,enablePagination:n=!1,onRowClick:d}){let[c]=x.default.useState("onChange"),[m,v]=x.default.useState({}),[N,w]=x.default.useState({}),C=(0,u.useReactTable)({data:e,columns:l,state:{sorting:a,columnSizing:m,columnVisibility:N,...n&&i?{pagination:i}:{}},columnResizeMode:c,onSortingChange:r,onColumnSizingChange:v,onColumnVisibilityChange:w,...n&&o?{onPaginationChange:o}:{},getCoreRowModel:(0,h.getCoreRowModel)(),...n?{getPaginationRowModel:(0,h.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,manualSorting:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(p.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:C.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(g.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(_.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(f.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,u.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&r&&(0,t.jsx)(b.TableHeaderSortDropdown,{sortState:!1!==e.column.getIsSorted()&&e.column.getIsSorted(),onSortChange:t=>{!1===t?r([]):r([{id:e.column.id,desc:"desc"===t}])},columnId:e.column.id})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(j.TableBody,{children:s?(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(y.TableCell,{colSpan:l.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):C.getRowModel().rows.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(_.TableRow,{className:d?"cursor-pointer hover:bg-gray-50":"",onClick:()=>d?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(y.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,u.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(y.TableCell,{colSpan:l.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}var N=e.i(751904),w=e.i(827252),C=e.i(772345),S=e.i(68155),k=e.i(389083),T=e.i(994388),F=e.i(752978),I=e.i(312361),M=e.i(525720),P=e.i(282786),A=e.i(770914),E=e.i(592968),L=e.i(898586),R=e.i(418371);let{Text:O,Title:B}=L.Typography,z=(0,t.jsxs)(A.Space,{direction:"vertical",size:12,children:[(0,t.jsx)(O,{strong:!0,style:{fontSize:13},children:"Credential types"}),(0,t.jsxs)(A.Space,{direction:"vertical",size:8,children:[(0,t.jsx)(M.Flex,{align:"center",gap:8,children:(0,t.jsxs)(A.Space,{direction:"vertical",children:[(0,t.jsxs)(M.Flex,{align:"center",gap:8,children:[(0,t.jsx)(C.SyncOutlined,{style:{color:"#1890ff"}}),(0,t.jsx)(B,{level:5,style:{margin:0,color:"#1890ff"},children:"Reusable"})]}),(0,t.jsx)(O,{type:"secondary",children:"Credentials saved in LiteLLM that can be added to models repeatedly."})]})}),(0,t.jsx)(I.Divider,{size:"small"}),(0,t.jsx)(M.Flex,{align:"center",gap:8,children:(0,t.jsxs)(A.Space,{direction:"vertical",size:8,children:[(0,t.jsxs)(M.Flex,{align:"center",gap:8,children:[(0,t.jsx)(N.EditOutlined,{style:{color:"#8c8c8c",fontSize:14,flexShrink:0}}),(0,t.jsx)(B,{level:5,style:{margin:0},children:"Manual"})]}),(0,t.jsx)(O,{type:"secondary",children:"Credentials added directly during model creation or defined in the config file."})]})})]})]}),q=e=>e?.model_info?.team_public_model_name?e.model_info.team_public_model_name:e?.model_name||"-";var V=e.i(127952),D=e.i(727749),H=e.i(313603),G=e.i(912598),$=e.i(350967),U=e.i(404206),J=e.i(906579),K=e.i(464571),W=e.i(199133),Q=e.i(981339),Y=e.i(153472),X=e.i(954616);let Z=async(e,t)=>{let s=(0,l.getProxyBaseUrl)(),a=s?`${s}/config/field/update`:"/config/field/update",r=await fetch(a,{method:"POST",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:"store_model_in_db",field_value:t.store_model_in_db,config_type:"general_settings"})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update model storage settings")}return await r.json()};var ee=e.i(190702),et=e.i(808613),el=e.i(212931),es=e.i(790848);let ea=({isVisible:e,onCancel:l,onSuccess:s})=>{let[a]=et.Form.useForm(),{mutateAsync:i,isPending:o}=(()=>{let{accessToken:e}=(0,r.default)();return(0,X.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await Z(e,t)}})})(),{data:n,isLoading:d,refetch:c}=(0,Y.useProxyConfig)(Y.ConfigType.GENERAL_SETTINGS);(0,x.useEffect)(()=>{e&&c()},[e,c]);let m=(0,x.useMemo)(()=>{if(!n)return{store_model_in_db:!1};let e=n.find(e=>"store_model_in_db"===e.field_name);return{store_model_in_db:e?.field_value??!1}},[n]),u=async e=>{try{await i(e,{onSuccess:()=>{D.default.success("Model storage settings updated successfully"),c(),s?.()},onError:e=>{D.default.fromBackend("Failed to save model storage settings: "+(0,ee.parseErrorMessage)(e))}})}catch(e){D.default.fromBackend("Failed to save model storage settings: "+(0,ee.parseErrorMessage)(e))}},h=()=>{a.resetFields(),l()};return(0,t.jsx)(el.Modal,{title:(0,t.jsx)(L.Typography.Title,{level:5,children:"Model Settings"}),open:e,footer:(0,t.jsxs)(A.Space,{children:[(0,t.jsx)(K.Button,{onClick:h,disabled:o||d,children:"Cancel"}),(0,t.jsx)(K.Button,{type:"primary",loading:o,disabled:d,onClick:()=>a.submit(),children:o?"Saving...":"Save Settings"})]}),onCancel:h,children:(0,t.jsx)(et.Form,{form:a,layout:"horizontal",onFinish:u,initialValues:m,children:(0,t.jsx)(et.Form.Item,{label:"Store Model in DB",name:"store_model_in_db",tooltip:n?.find(e=>"store_model_in_db"===e.field_name)?.field_description||"If enabled, models and config are stored in and loaded from the database.",valuePropName:"checked",children:d?(0,t.jsx)(Q.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(es.Switch,{})})},n?JSON.stringify(m):"loading")})};var er=e.i(374009);let ei=(e,t)=>{if(!e?.data)return{data:[]};let l=JSON.parse(JSON.stringify(e.data));for(let e=0;e"model"!==e&&"api_base"!==e))),l[e].provider=o,l[e].input_cost=n,l[e].output_cost=d,l[e].litellm_model_name=a,null!=l[e].input_cost&&(l[e].input_cost=(1e6*Number(l[e].input_cost)).toFixed(2)),null!=l[e].output_cost&&(l[e].output_cost=(1e6*Number(l[e].output_cost)).toFixed(2)),l[e].max_tokens=c,l[e].max_input_tokens=m,l[e].api_base=s?.litellm_params?.api_base,l[e].cleanedLitellmParams=u}return{data:l}},{Text:eo}=L.Typography,en=({selectedModelGroup:e,setSelectedModelGroup:s,availableModelGroups:a,availableModelAccessGroups:i,setSelectedModelId:o,setSelectedTeamId:c})=>{let{data:u,isLoading:h}=(0,n.useModelCostMap)(),{accessToken:p,userId:g,userRole:f,premiumUser:j}=(0,r.default)(),{data:_,isLoading:y}=(0,m.useTeams)(),b=(0,G.useQueryClient)(),[I,L]=(0,x.useState)(""),[B,Y]=(0,x.useState)(""),[X,Z]=(0,x.useState)("current_team"),[ee,et]=(0,x.useState)("personal"),[el,es]=(0,x.useState)(!1),[en,ed]=(0,x.useState)(null),[ec,em]=(0,x.useState)(new Set),[eu,eh]=(0,x.useState)(1),[ex]=(0,x.useState)(50),[ep,eg]=(0,x.useState)({pageIndex:0,pageSize:50}),[ef,ej]=(0,x.useState)([]),[e_,ey]=(0,x.useState)(!1),eb=(0,x.useMemo)(()=>(0,er.default)(e=>{Y(e),eh(1),eg(e=>({...e,pageIndex:0}))},200),[]);(0,x.useEffect)(()=>(eb(I),()=>{eb.cancel()}),[I,eb]);let ev="personal"===ee?void 0:ee.team_id,eN=(0,x.useMemo)(()=>{if(0===ef.length)return;let e=ef[0];return({input_cost:"costs",model_info_db_model:"status",model_info_created_by:"created_at",model_info_updated_at:"updated_at"})[e.id]||e.id},[ef]),ew=(0,x.useMemo)(()=>{if(0!==ef.length)return ef[0].desc?"desc":"asc"},[ef]),{data:eC,isLoading:eS,refetch:ek}=(0,d.useModelsInfo)(eu,ex,B||void 0,void 0,ev,eN,ew),eT=eS||h,eF=e=>null!=u&&"object"==typeof u&&e in u?u[e].litellm_provider:"openai",eI=(0,x.useMemo)(()=>eC?ei(eC,eF):{data:[]},[eC,u]),[eM,eP]=(0,x.useState)(null),[eA,eE]=(0,x.useState)(!1),eL=(0,x.useMemo)(()=>eC?{total_count:eC.total_count??0,current_page:eC.current_page??1,total_pages:eC.total_pages??1,size:eC.size??ex}:{total_count:0,current_page:1,total_pages:1,size:ex},[eC,ex]),eR=(0,x.useMemo)(()=>eI&&eI.data&&0!==eI.data.length?eI.data.filter(t=>{let l="all"===e||t.model_name===e||!e||"wildcard"===e&&t.model_name?.includes("*"),s="all"===en||t.model_info.access_groups?.includes(en)||!en;return l&&s}):[],[eI,e,en]);(0,x.useEffect)(()=>{eg(e=>({...e,pageIndex:0})),eh(1)},[e,en]),(0,x.useEffect)(()=>{eh(1),eg(e=>({...e,pageIndex:0}))},[ev]),(0,x.useEffect)(()=>{eh(1),eg(e=>({...e,pageIndex:0}))},[ef]);let eO=(0,x.useMemo)(()=>eM&&eI?.data?eI.data.find(e=>e.model_info.id===eM):null,[eM,eI]),eB=async()=>{if(p&&eM)try{eE(!0),await (0,l.modelDeleteCall)(p,eM),D.default.success("Model deleted successfully"),b.invalidateQueries({queryKey:["models","list"]}),ek()}catch(e){console.error("Error deleting model:",e),D.default.fromBackend(e)}finally{eE(!1),eP(null)}};return(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsx)($.Grid,{children:(0,t.jsx)("div",{className:"flex flex-col space-y-4",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(eo,{className:"text-lg font-semibold text-gray-900",children:"Current Team:"}),(0,t.jsx)("div",{className:"w-80",children:eT?(0,t.jsx)(Q.Skeleton.Input,{active:!0,block:!0,size:"large"}):(0,t.jsx)(W.Select,{style:{width:"100%"},size:"large",defaultValue:"personal",value:"personal"===ee?"personal":ee.team_id,onChange:e=>{if("personal"===e)et("personal"),eh(1),eg(e=>({...e,pageIndex:0}));else{let t=_?.find(t=>t.team_id===e);t&&(et(t),eh(1),eg(e=>({...e,pageIndex:0})))}},loading:y,options:[{value:"personal",label:(0,t.jsxs)(A.Space,{direction:"horizontal",align:"center",children:[(0,t.jsx)(J.Badge,{color:"blue",size:"small"}),(0,t.jsx)(eo,{style:{fontSize:16},children:"Personal"})]})},..._?.filter(e=>e.team_id).map(e=>({value:e.team_id,label:(0,t.jsxs)(A.Space,{direction:"horizontal",align:"center",children:[(0,t.jsx)(J.Badge,{color:"green",size:"small"}),(0,t.jsx)(eo,{ellipsis:!0,style:{fontSize:16},children:e.team_alias?e.team_alias:e.team_id})]})}))??[]]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(eo,{className:"text-lg font-semibold text-gray-900",children:"View:"}),(0,t.jsx)("div",{className:"w-64",children:eT?(0,t.jsx)(Q.Skeleton.Input,{active:!0,block:!0,size:"large"}):(0,t.jsx)(W.Select,{style:{width:"100%"},size:"large",defaultValue:"current_team",value:X,onChange:e=>Z(e),options:[{value:"current_team",label:(0,t.jsxs)(A.Space,{direction:"horizontal",align:"center",children:[(0,t.jsx)(J.Badge,{color:"purple",size:"small"}),(0,t.jsx)(eo,{style:{fontSize:16},children:"Current Team Models"})]})},{value:"all",label:(0,t.jsxs)(A.Space,{direction:"horizontal",align:"center",children:[(0,t.jsx)(J.Badge,{color:"gray",size:"small"}),(0,t.jsx)(eo,{style:{fontSize:16},children:"All Available Models"})]})}]})})]})]}),"current_team"===X&&(0,t.jsxs)("div",{className:"flex items-start gap-2 mt-3",children:[(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400 mt-0.5 flex-shrink-0 text-xs"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"personal"===ee?(0,t.jsxs)("span",{children:["To access these models: Create a Virtual Key without selecting a team on the"," ",(0,t.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]}):(0,t.jsxs)("span",{children:['To access these models: Create a Virtual Key and select Team as "',"string"!=typeof ee?ee.team_alias||ee.team_id:"",'" on the'," ",(0,t.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]})})]})]}),(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("div",{className:"relative w-64",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search model names...","data-testid":"model-search-input",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>L(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("button",{className:`px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ${el?"bg-gray-100":""}`,onClick:()=>es(!el),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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filters"]}),(0,t.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:()=>{L(""),s("all"),ed(null),et("personal"),Z("current_team"),eh(1),eg({pageIndex:0,pageSize:50}),ej([])},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:"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"})}),"Reset Filters"]})]}),(0,t.jsx)(K.Button,{icon:(0,t.jsx)(H.SettingOutlined,{}),onClick:()=>ey(!0),title:"Model Settings"})]}),el&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(W.Select,{className:"w-full",value:e??"all",onChange:e=>s("all"===e?"all":e),placeholder:"Filter by Public Model Name",showSearch:!0,options:[{value:"all",label:"All Models"},{value:"wildcard",label:"Wildcard Models (*)"},...a.map((e,t)=>({value:e,label:e}))]})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(W.Select,{className:"w-full",value:en??"all",onChange:e=>ed("all"===e?null:e),placeholder:"Filter by Model Access Group",showSearch:!0,options:[{value:"all",label:"All Model Access Groups"},...i.map((e,t)=>({value:e,label:e}))]})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[eT?(0,t.jsx)(Q.Skeleton.Input,{active:!0,style:{width:184,height:20}}):(0,t.jsx)("span",{"data-testid":"models-results-count",className:"text-sm text-gray-700",children:eL.total_count>0?`Showing ${(eu-1)*ex+1} - ${Math.min(eu*ex,eL.total_count)} of ${eL.total_count} results`:"Showing 0 results"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[eT?(0,t.jsx)(Q.Skeleton.Button,{active:!0,style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>{eh(eu-1),eg(e=>({...e,pageIndex:0}))},disabled:1===eu,className:`px-3 py-1 text-sm border rounded-md ${1===eu?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),eT?(0,t.jsx)(Q.Skeleton.Button,{active:!0,style:{width:56,height:30}}):(0,t.jsx)("button",{onClick:()=>{eh(eu+1),eg(e=>({...e,pageIndex:0}))},disabled:eu>=eL.total_pages,className:`px-3 py-1 text-sm border rounded-md ${eu>=eL.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})]})]})}),(0,t.jsx)(v,{columns:[{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Model ID"}),accessorKey:"model_info.id",enableSorting:!1,size:130,minSize:80,cell:({row:e})=>{let l=e.original;return(0,t.jsx)(E.Tooltip,{title:l.model_info.id,children:(0,t.jsx)(O,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer w-full block",style:{fontSize:14,padding:"1px 8px"},onClick:e=>{e.stopPropagation(),o(l.model_info.id)},children:l.model_info.id})})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Model Information"}),accessorKey:"model_name",size:250,minSize:120,cell:({row:e})=>{let l=e.original,s=q(e.original)||"-",a=(0,t.jsxs)(A.Space,{direction:"vertical",size:12,style:{minWidth:220},children:[(0,t.jsxs)(M.Flex,{align:"center",gap:8,children:[(0,t.jsx)(R.ProviderLogo,{provider:l.provider}),(0,t.jsx)(O,{type:"secondary",style:{fontSize:12},ellipsis:!0,children:l.provider||"Unknown provider"})]}),(0,t.jsxs)(A.Space,{direction:"vertical",size:6,children:[(0,t.jsxs)(A.Space,{direction:"vertical",size:2,style:{width:"100%"},children:[(0,t.jsx)(O,{type:"secondary",style:{fontSize:11},children:"Public Model Name"}),(0,t.jsx)(O,{strong:!0,style:{fontSize:13,maxWidth:480},ellipsis:!0,title:s,children:s})]}),(0,t.jsxs)(A.Space,{direction:"vertical",size:2,children:[(0,t.jsx)(O,{type:"secondary",style:{fontSize:11},children:"LiteLLM Model Name"}),(0,t.jsx)(O,{style:{fontSize:13},copyable:{text:l.litellm_model_name||"-"},ellipsis:!0,title:l.litellm_model_name||"-",children:l.litellm_model_name||"-"})]})]})]});return(0,t.jsx)(P.Popover,{content:a,placement:"right",arrow:{pointAtCenter:!0},styles:{root:{maxWidth:500}},children:(0,t.jsxs)("div",{className:"flex items-start space-x-2 min-w-0 w-full cursor-pointer",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:l.provider?(0,t.jsx)(R.ProviderLogo,{provider:l.provider}):(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,t.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,t.jsx)(O,{ellipsis:!0,className:"text-gray-900",style:{fontSize:12,fontWeight:500,lineHeight:"16px"},children:s}),(0,t.jsx)(O,{ellipsis:!0,type:"secondary",style:{fontSize:12,lineHeight:"16px",marginTop:2},children:l.litellm_model_name||"-"})]})]})})}},{header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Credentials"}),(0,t.jsx)(P.Popover,{content:z,placement:"bottom",arrow:{pointAtCenter:!0},children:(0,t.jsx)(w.InfoCircleOutlined,{className:"cursor-pointer text-gray-400 hover:text-gray-600",style:{fontSize:12}})})]}),accessorKey:"litellm_credential_name",enableSorting:!1,size:180,minSize:100,cell:({row:e})=>{let l=e.original,s=l.litellm_params?.litellm_credential_name,a=!!s;return(0,t.jsx)("div",{className:"flex items-center space-x-2 min-w-0 w-full",children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C.SyncOutlined,{className:"flex-shrink-0",style:{color:"#1890ff",fontSize:14}}),(0,t.jsx)("span",{className:"text-xs truncate text-blue-600",title:s,children:s})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.EditOutlined,{className:"flex-shrink-0",style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Manual"})]})})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Created By"}),accessorKey:"model_info.created_by",sortingFn:"datetime",size:160,minSize:100,cell:({row:e})=>{let l=e.original,s=!l.model_info?.db_model,a=l.model_info.created_by,r=l.model_info.created_at?new Date(l.model_info.created_at).toLocaleDateString():null;return(0,t.jsxs)("div",{className:"flex flex-col min-w-0 w-full",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-gray-900 truncate",title:s?"Defined in config":a||"Unknown",children:s?"Defined in config":a||"Unknown"}),(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate mt-0.5",title:s?"Config file":r||"Unknown date",children:s?"-":r||"Unknown date"})]})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Updated At"}),accessorKey:"model_info.updated_at",sortingFn:"datetime",size:120,minSize:80,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("span",{className:"text-xs",children:l.model_info.updated_at?new Date(l.model_info.updated_at).toLocaleDateString():"-"})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Costs"}),accessorKey:"input_cost",size:120,minSize:80,cell:({row:e})=>{let l=e.original,s=l.input_cost,a=l.output_cost;return null==s&&null==a?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"-"})}):(0,t.jsx)(E.Tooltip,{title:"Cost per 1M tokens",children:(0,t.jsxs)("div",{className:"flex flex-col min-w-0 w-full",children:[null!=s&&(0,t.jsxs)("div",{className:"text-xs font-medium text-gray-900 truncate",children:["In: $",s]}),null!=a&&(0,t.jsxs)("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:["Out: $",a]})]})})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Team ID"}),accessorKey:"model_info.team_id",enableSorting:!1,size:130,minSize:80,cell:({row:e})=>{let l=e.original;return l.model_info.team_id?(0,t.jsx)("div",{className:"overflow-hidden w-full",children:(0,t.jsx)(E.Tooltip,{title:l.model_info.team_id,children:(0,t.jsxs)(T.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate w-full",onClick:e=>{e.stopPropagation(),c(l.model_info.team_id)},children:[l.model_info.team_id.slice(0,7),"..."]})})}):"-"}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Model Access Group"}),accessorKey:"model_info.model_access_group",enableSorting:!1,size:180,minSize:100,cell:({row:e})=>{let l=e.original,s=l.model_info.access_groups;if(!s||0===s.length)return"-";let a=l.model_info.id,r=ec.has(a),i=s.length>1;return(0,t.jsxs)("div",{className:"flex items-center gap-1 overflow-hidden w-full",children:[(0,t.jsx)(k.Badge,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:s[0]}),(r||!i&&2===s.length)&&s.slice(1).map((e,l)=>(0,t.jsx)(k.Badge,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:e},l+1)),i&&(0,t.jsx)("button",{onClick:e=>{let t;e.stopPropagation(),t=new Set(ec),r?t.delete(a):t.add(a),em(t)},className:"text-xs text-blue-600 hover:text-blue-800 px-1 py-0.5 rounded hover:bg-blue-50 h-5 leading-tight flex-shrink-0 whitespace-nowrap",children:r?"−":`+${s.length-1}`})]})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Status"}),accessorKey:"model_info.db_model",size:120,minSize:80,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:` +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,161059,147612,e=>{"use strict";var t=e.i(843476),l=e.i(764205),s=e.i(266027),a=e.i(243652),r=e.i(135214);let i=(0,a.createQueryKeys)("credentials"),o=()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.credentialListCall)(e),enabled:!!e})};var n=e.i(368670),d=e.i(625901),c=e.i(292639),m=e.i(785242),u=e.i(152990),h=e.i(682830),x=e.i(271645),p=e.i(269200),g=e.i(427612),f=e.i(64848),j=e.i(942232),_=e.i(496020),y=e.i(977572),b=e.i(446891);function v({data:e=[],columns:l,isLoading:s=!1,sorting:a=[],onSortingChange:r,pagination:i,onPaginationChange:o,enablePagination:n=!1,onRowClick:d}){let[c]=x.default.useState("onChange"),[m,v]=x.default.useState({}),[N,w]=x.default.useState({}),C=(0,u.useReactTable)({data:e,columns:l,state:{sorting:a,columnSizing:m,columnVisibility:N,...n&&i?{pagination:i}:{}},columnResizeMode:c,onSortingChange:r,onColumnSizingChange:v,onColumnVisibilityChange:w,...n&&o?{onPaginationChange:o}:{},getCoreRowModel:(0,h.getCoreRowModel)(),...n?{getPaginationRowModel:(0,h.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,manualSorting:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(p.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:C.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(g.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(_.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(f.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,u.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&r&&(0,t.jsx)(b.TableHeaderSortDropdown,{sortState:!1!==e.column.getIsSorted()&&e.column.getIsSorted(),onSortChange:t=>{!1===t?r([]):r([{id:e.column.id,desc:"desc"===t}])},columnId:e.column.id})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(j.TableBody,{children:s?(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(y.TableCell,{colSpan:l.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):C.getRowModel().rows.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(_.TableRow,{className:d?"cursor-pointer hover:bg-gray-50":"",onClick:()=>d?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(y.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,u.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(y.TableCell,{colSpan:l.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}var N=e.i(751904),w=e.i(827252),C=e.i(772345),S=e.i(68155),k=e.i(389083),T=e.i(994388),F=e.i(752978),I=e.i(312361),M=e.i(525720),P=e.i(282786),A=e.i(770914),E=e.i(592968),L=e.i(898586),R=e.i(418371);let{Text:O,Title:B}=L.Typography,z=(0,t.jsxs)(A.Space,{direction:"vertical",size:12,children:[(0,t.jsx)(O,{strong:!0,style:{fontSize:13},children:"Credential types"}),(0,t.jsxs)(A.Space,{direction:"vertical",size:8,children:[(0,t.jsx)(M.Flex,{align:"center",gap:8,children:(0,t.jsxs)(A.Space,{direction:"vertical",children:[(0,t.jsxs)(M.Flex,{align:"center",gap:8,children:[(0,t.jsx)(C.SyncOutlined,{style:{color:"#1890ff"}}),(0,t.jsx)(B,{level:5,style:{margin:0,color:"#1890ff"},children:"Reusable"})]}),(0,t.jsx)(O,{type:"secondary",children:"Credentials saved in LiteLLM that can be added to models repeatedly."})]})}),(0,t.jsx)(I.Divider,{size:"small"}),(0,t.jsx)(M.Flex,{align:"center",gap:8,children:(0,t.jsxs)(A.Space,{direction:"vertical",size:8,children:[(0,t.jsxs)(M.Flex,{align:"center",gap:8,children:[(0,t.jsx)(N.EditOutlined,{style:{color:"#8c8c8c",fontSize:14,flexShrink:0}}),(0,t.jsx)(B,{level:5,style:{margin:0},children:"Manual"})]}),(0,t.jsx)(O,{type:"secondary",children:"Credentials added directly during model creation or defined in the config file."})]})})]})]}),q=e=>e?.model_info?.team_public_model_name?e.model_info.team_public_model_name:e?.model_name||"-";var V=e.i(127952),D=e.i(727749),H=e.i(313603),$=e.i(912598),G=e.i(350967),U=e.i(404206),J=e.i(906579),K=e.i(464571),W=e.i(199133),Q=e.i(981339),Y=e.i(153472),X=e.i(954616);let Z=async(e,t)=>{let s=(0,l.getProxyBaseUrl)(),a=s?`${s}/config/field/update`:"/config/field/update",r=await fetch(a,{method:"POST",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:"store_model_in_db",field_value:t.store_model_in_db,config_type:"general_settings"})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update model storage settings")}return await r.json()};var ee=e.i(190702),et=e.i(808613),el=e.i(212931),es=e.i(790848);let ea=({isVisible:e,onCancel:l,onSuccess:s})=>{let[a]=et.Form.useForm(),{mutateAsync:i,isPending:o}=(()=>{let{accessToken:e}=(0,r.default)();return(0,X.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await Z(e,t)}})})(),{data:n,isLoading:d,refetch:c}=(0,Y.useProxyConfig)(Y.ConfigType.GENERAL_SETTINGS);(0,x.useEffect)(()=>{e&&c()},[e,c]);let m=(0,x.useMemo)(()=>{if(!n)return{store_model_in_db:!1};let e=n.find(e=>"store_model_in_db"===e.field_name);return{store_model_in_db:e?.field_value??!1}},[n]),u=async e=>{try{await i(e,{onSuccess:()=>{D.default.success("Model storage settings updated successfully"),c(),s?.()},onError:e=>{D.default.fromBackend("Failed to save model storage settings: "+(0,ee.parseErrorMessage)(e))}})}catch(e){D.default.fromBackend("Failed to save model storage settings: "+(0,ee.parseErrorMessage)(e))}},h=()=>{a.resetFields(),l()};return(0,t.jsx)(el.Modal,{title:(0,t.jsx)(L.Typography.Title,{level:5,children:"Model Settings"}),open:e,footer:(0,t.jsxs)(A.Space,{children:[(0,t.jsx)(K.Button,{onClick:h,disabled:o||d,children:"Cancel"}),(0,t.jsx)(K.Button,{type:"primary",loading:o,disabled:d,onClick:()=>a.submit(),children:o?"Saving...":"Save Settings"})]}),onCancel:h,children:(0,t.jsx)(et.Form,{form:a,layout:"horizontal",onFinish:u,initialValues:m,children:(0,t.jsx)(et.Form.Item,{label:"Store Model in DB",name:"store_model_in_db",tooltip:n?.find(e=>"store_model_in_db"===e.field_name)?.field_description||"If enabled, models and config are stored in and loaded from the database.",valuePropName:"checked",children:d?(0,t.jsx)(Q.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(es.Switch,{})})},n?JSON.stringify(m):"loading")})};var er=e.i(374009);let ei=(e,t)=>{if(!e?.data)return{data:[]};let l=JSON.parse(JSON.stringify(e.data));for(let e=0;e"model"!==e&&"api_base"!==e))),l[e].provider=o,l[e].input_cost=n,l[e].output_cost=d,l[e].litellm_model_name=a,null!=l[e].input_cost&&(l[e].input_cost=(1e6*Number(l[e].input_cost)).toFixed(2)),null!=l[e].output_cost&&(l[e].output_cost=(1e6*Number(l[e].output_cost)).toFixed(2)),l[e].max_tokens=c,l[e].max_input_tokens=m,l[e].api_base=s?.litellm_params?.api_base,l[e].cleanedLitellmParams=u}return{data:l}},{Text:eo}=L.Typography,en=({selectedModelGroup:e,setSelectedModelGroup:s,availableModelGroups:a,availableModelAccessGroups:i,setSelectedModelId:o,setSelectedTeamId:c})=>{let{data:u,isLoading:h}=(0,n.useModelCostMap)(),{accessToken:p,userId:g,userRole:f,premiumUser:j}=(0,r.default)(),{data:_,isLoading:y}=(0,m.useTeams)(),b=(0,$.useQueryClient)(),[I,L]=(0,x.useState)(""),[B,Y]=(0,x.useState)(""),[X,Z]=(0,x.useState)("current_team"),[ee,et]=(0,x.useState)("personal"),[el,es]=(0,x.useState)(!1),[en,ed]=(0,x.useState)(null),[ec,em]=(0,x.useState)(new Set),[eu,eh]=(0,x.useState)(1),[ex]=(0,x.useState)(50),[ep,eg]=(0,x.useState)({pageIndex:0,pageSize:50}),[ef,ej]=(0,x.useState)([]),[e_,ey]=(0,x.useState)(!1),eb=(0,x.useMemo)(()=>(0,er.default)(e=>{Y(e),eh(1),eg(e=>({...e,pageIndex:0}))},200),[]);(0,x.useEffect)(()=>(eb(I),()=>{eb.cancel()}),[I,eb]);let ev="personal"===ee?void 0:ee.team_id,eN=(0,x.useMemo)(()=>{if(0===ef.length)return;let e=ef[0];return({input_cost:"costs",model_info_db_model:"status",model_info_created_by:"created_at",model_info_updated_at:"updated_at"})[e.id]||e.id},[ef]),ew=(0,x.useMemo)(()=>{if(0!==ef.length)return ef[0].desc?"desc":"asc"},[ef]),{data:eC,isLoading:eS,refetch:ek}=(0,d.useModelsInfo)(eu,ex,B||void 0,void 0,ev,eN,ew),eT=eS||h,eF=e=>null!=u&&"object"==typeof u&&e in u?u[e].litellm_provider:"openai",eI=(0,x.useMemo)(()=>eC?ei(eC,eF):{data:[]},[eC,u]),[eM,eP]=(0,x.useState)(null),[eA,eE]=(0,x.useState)(!1),eL=(0,x.useMemo)(()=>eC?{total_count:eC.total_count??0,current_page:eC.current_page??1,total_pages:eC.total_pages??1,size:eC.size??ex}:{total_count:0,current_page:1,total_pages:1,size:ex},[eC,ex]),eR=(0,x.useMemo)(()=>eI&&eI.data&&0!==eI.data.length?eI.data.filter(t=>{let l="all"===e||t.model_name===e||!e||"wildcard"===e&&t.model_name?.includes("*"),s="all"===en||t.model_info.access_groups?.includes(en)||!en;return l&&s}):[],[eI,e,en]);(0,x.useEffect)(()=>{eg(e=>({...e,pageIndex:0})),eh(1)},[e,en]),(0,x.useEffect)(()=>{eh(1),eg(e=>({...e,pageIndex:0}))},[ev]),(0,x.useEffect)(()=>{eh(1),eg(e=>({...e,pageIndex:0}))},[ef]);let eO=(0,x.useMemo)(()=>eM&&eI?.data?eI.data.find(e=>e.model_info.id===eM):null,[eM,eI]),eB=async()=>{if(p&&eM)try{eE(!0),await (0,l.modelDeleteCall)(p,eM),D.default.success("Model deleted successfully"),b.invalidateQueries({queryKey:["models","list"]}),ek()}catch(e){console.error("Error deleting model:",e),D.default.fromBackend(e)}finally{eE(!1),eP(null)}};return(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsx)(G.Grid,{children:(0,t.jsx)("div",{className:"flex flex-col space-y-4",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(eo,{className:"text-lg font-semibold text-gray-900",children:"Current Team:"}),(0,t.jsx)("div",{className:"w-80",children:eT?(0,t.jsx)(Q.Skeleton.Input,{active:!0,block:!0,size:"large"}):(0,t.jsx)(W.Select,{style:{width:"100%"},size:"large",defaultValue:"personal",value:"personal"===ee?"personal":ee.team_id,onChange:e=>{if("personal"===e)et("personal"),eh(1),eg(e=>({...e,pageIndex:0}));else{let t=_?.find(t=>t.team_id===e);t&&(et(t),eh(1),eg(e=>({...e,pageIndex:0})))}},loading:y,options:[{value:"personal",label:(0,t.jsxs)(A.Space,{direction:"horizontal",align:"center",children:[(0,t.jsx)(J.Badge,{color:"blue",size:"small"}),(0,t.jsx)(eo,{style:{fontSize:16},children:"Personal"})]})},..._?.filter(e=>e.team_id).map(e=>({value:e.team_id,label:(0,t.jsxs)(A.Space,{direction:"horizontal",align:"center",children:[(0,t.jsx)(J.Badge,{color:"green",size:"small"}),(0,t.jsx)(eo,{ellipsis:!0,style:{fontSize:16},children:e.team_alias?e.team_alias:e.team_id})]})}))??[]]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(eo,{className:"text-lg font-semibold text-gray-900",children:"View:"}),(0,t.jsx)("div",{className:"w-64",children:eT?(0,t.jsx)(Q.Skeleton.Input,{active:!0,block:!0,size:"large"}):(0,t.jsx)(W.Select,{style:{width:"100%"},size:"large",defaultValue:"current_team",value:X,onChange:e=>Z(e),options:[{value:"current_team",label:(0,t.jsxs)(A.Space,{direction:"horizontal",align:"center",children:[(0,t.jsx)(J.Badge,{color:"purple",size:"small"}),(0,t.jsx)(eo,{style:{fontSize:16},children:"Current Team Models"})]})},{value:"all",label:(0,t.jsxs)(A.Space,{direction:"horizontal",align:"center",children:[(0,t.jsx)(J.Badge,{color:"gray",size:"small"}),(0,t.jsx)(eo,{style:{fontSize:16},children:"All Available Models"})]})}]})})]})]}),"current_team"===X&&(0,t.jsxs)("div",{className:"flex items-start gap-2 mt-3",children:[(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400 mt-0.5 flex-shrink-0 text-xs"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"personal"===ee?(0,t.jsxs)("span",{children:["To access these models: Create a Virtual Key without selecting a team on the"," ",(0,t.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]}):(0,t.jsxs)("span",{children:['To access these models: Create a Virtual Key and select Team as "',"string"!=typeof ee?ee.team_alias||ee.team_id:"",'" on the'," ",(0,t.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]})})]})]}),(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("div",{className:"relative w-64",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search model names...","data-testid":"model-search-input",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>L(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("button",{className:`px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ${el?"bg-gray-100":""}`,onClick:()=>es(!el),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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filters"]}),(0,t.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:()=>{L(""),s("all"),ed(null),et("personal"),Z("current_team"),eh(1),eg({pageIndex:0,pageSize:50}),ej([])},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:"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"})}),"Reset Filters"]})]}),(0,t.jsx)(K.Button,{icon:(0,t.jsx)(H.SettingOutlined,{}),onClick:()=>ey(!0),title:"Model Settings"})]}),el&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(W.Select,{className:"w-full",value:e??"all",onChange:e=>s("all"===e?"all":e),placeholder:"Filter by Public Model Name",showSearch:!0,options:[{value:"all",label:"All Models"},{value:"wildcard",label:"Wildcard Models (*)"},...a.map((e,t)=>({value:e,label:e}))]})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(W.Select,{className:"w-full",value:en??"all",onChange:e=>ed("all"===e?null:e),placeholder:"Filter by Model Access Group",showSearch:!0,options:[{value:"all",label:"All Model Access Groups"},...i.map((e,t)=>({value:e,label:e}))]})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[eT?(0,t.jsx)(Q.Skeleton.Input,{active:!0,style:{width:184,height:20}}):(0,t.jsx)("span",{"data-testid":"models-results-count",className:"text-sm text-gray-700",children:eL.total_count>0?`Showing ${(eu-1)*ex+1} - ${Math.min(eu*ex,eL.total_count)} of ${eL.total_count} results`:"Showing 0 results"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[eT?(0,t.jsx)(Q.Skeleton.Button,{active:!0,style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>{eh(eu-1),eg(e=>({...e,pageIndex:0}))},disabled:1===eu,className:`px-3 py-1 text-sm border rounded-md ${1===eu?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),eT?(0,t.jsx)(Q.Skeleton.Button,{active:!0,style:{width:56,height:30}}):(0,t.jsx)("button",{onClick:()=>{eh(eu+1),eg(e=>({...e,pageIndex:0}))},disabled:eu>=eL.total_pages,className:`px-3 py-1 text-sm border rounded-md ${eu>=eL.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})]})]})}),(0,t.jsx)(v,{columns:[{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Model ID"}),accessorKey:"model_info.id",enableSorting:!1,size:130,minSize:80,cell:({row:e})=>{let l=e.original;return(0,t.jsx)(E.Tooltip,{title:l.model_info.id,children:(0,t.jsx)(O,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer w-full block",style:{fontSize:14,padding:"1px 8px"},onClick:e=>{e.stopPropagation(),o(l.model_info.id)},children:l.model_info.id})})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Model Information"}),accessorKey:"model_name",size:250,minSize:120,cell:({row:e})=>{let l=e.original,s=q(e.original)||"-",a=(0,t.jsxs)(A.Space,{direction:"vertical",size:12,style:{minWidth:220},children:[(0,t.jsxs)(M.Flex,{align:"center",gap:8,children:[(0,t.jsx)(R.ProviderLogo,{provider:l.provider}),(0,t.jsx)(O,{type:"secondary",style:{fontSize:12},ellipsis:!0,children:l.provider||"Unknown provider"})]}),(0,t.jsxs)(A.Space,{direction:"vertical",size:6,children:[(0,t.jsxs)(A.Space,{direction:"vertical",size:2,style:{width:"100%"},children:[(0,t.jsx)(O,{type:"secondary",style:{fontSize:11},children:"Public Model Name"}),(0,t.jsx)(O,{strong:!0,style:{fontSize:13,maxWidth:480},ellipsis:!0,title:s,children:s})]}),(0,t.jsxs)(A.Space,{direction:"vertical",size:2,children:[(0,t.jsx)(O,{type:"secondary",style:{fontSize:11},children:"LiteLLM Model Name"}),(0,t.jsx)(O,{style:{fontSize:13},copyable:{text:l.litellm_model_name||"-"},ellipsis:!0,title:l.litellm_model_name||"-",children:l.litellm_model_name||"-"})]})]})]});return(0,t.jsx)(P.Popover,{content:a,placement:"right",arrow:{pointAtCenter:!0},styles:{root:{maxWidth:500}},children:(0,t.jsxs)("div",{className:"flex items-start space-x-2 min-w-0 w-full cursor-pointer",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:l.provider?(0,t.jsx)(R.ProviderLogo,{provider:l.provider}):(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,t.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,t.jsx)(O,{ellipsis:!0,className:"text-gray-900",style:{fontSize:12,fontWeight:500,lineHeight:"16px"},children:s}),(0,t.jsx)(O,{ellipsis:!0,type:"secondary",style:{fontSize:12,lineHeight:"16px",marginTop:2},children:l.litellm_model_name||"-"})]})]})})}},{header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Credentials"}),(0,t.jsx)(P.Popover,{content:z,placement:"bottom",arrow:{pointAtCenter:!0},children:(0,t.jsx)(w.InfoCircleOutlined,{className:"cursor-pointer text-gray-400 hover:text-gray-600",style:{fontSize:12}})})]}),accessorKey:"litellm_credential_name",enableSorting:!1,size:180,minSize:100,cell:({row:e})=>{let l=e.original,s=l.litellm_params?.litellm_credential_name,a=!!s;return(0,t.jsx)("div",{className:"flex items-center space-x-2 min-w-0 w-full",children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C.SyncOutlined,{className:"flex-shrink-0",style:{color:"#1890ff",fontSize:14}}),(0,t.jsx)("span",{className:"text-xs truncate text-blue-600",title:s,children:s})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.EditOutlined,{className:"flex-shrink-0",style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Manual"})]})})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Created By"}),accessorKey:"model_info.created_by",sortingFn:"datetime",size:160,minSize:100,cell:({row:e})=>{let l=e.original,s=!l.model_info?.db_model,a=l.model_info.created_by,r=l.model_info.created_at?new Date(l.model_info.created_at).toLocaleDateString():null;return(0,t.jsxs)("div",{className:"flex flex-col min-w-0 w-full",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-gray-900 truncate",title:s?"Defined in config":a||"Unknown",children:s?"Defined in config":a||"Unknown"}),(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate mt-0.5",title:s?"Config file":r||"Unknown date",children:s?"-":r||"Unknown date"})]})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Updated At"}),accessorKey:"model_info.updated_at",sortingFn:"datetime",size:120,minSize:80,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("span",{className:"text-xs",children:l.model_info.updated_at?new Date(l.model_info.updated_at).toLocaleDateString():"-"})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Costs"}),accessorKey:"input_cost",size:120,minSize:80,cell:({row:e})=>{let l=e.original,s=l.input_cost,a=l.output_cost;return null==s&&null==a?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"-"})}):(0,t.jsx)(E.Tooltip,{title:"Cost per 1M tokens",children:(0,t.jsxs)("div",{className:"flex flex-col min-w-0 w-full",children:[null!=s&&(0,t.jsxs)("div",{className:"text-xs font-medium text-gray-900 truncate",children:["In: $",s]}),null!=a&&(0,t.jsxs)("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:["Out: $",a]})]})})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Team ID"}),accessorKey:"model_info.team_id",enableSorting:!1,size:130,minSize:80,cell:({row:e})=>{let l=e.original;return l.model_info.team_id?(0,t.jsx)("div",{className:"overflow-hidden w-full",children:(0,t.jsx)(E.Tooltip,{title:l.model_info.team_id,children:(0,t.jsxs)(T.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate w-full",onClick:e=>{e.stopPropagation(),c(l.model_info.team_id)},children:[l.model_info.team_id.slice(0,7),"..."]})})}):"-"}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Model Access Group"}),accessorKey:"model_info.model_access_group",enableSorting:!1,size:180,minSize:100,cell:({row:e})=>{let l=e.original,s=l.model_info.access_groups;if(!s||0===s.length)return"-";let a=l.model_info.id,r=ec.has(a),i=s.length>1;return(0,t.jsxs)("div",{className:"flex items-center gap-1 overflow-hidden w-full",children:[(0,t.jsx)(k.Badge,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:s[0]}),(r||!i&&2===s.length)&&s.slice(1).map((e,l)=>(0,t.jsx)(k.Badge,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:e},l+1)),i&&(0,t.jsx)("button",{onClick:e=>{let t;e.stopPropagation(),t=new Set(ec),r?t.delete(a):t.add(a),em(t)},className:"text-xs text-blue-600 hover:text-blue-800 px-1 py-0.5 rounded hover:bg-blue-50 h-5 leading-tight flex-shrink-0 whitespace-nowrap",children:r?"−":`+${s.length-1}`})]})}},{header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Status"}),accessorKey:"model_info.db_model",size:120,minSize:80,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:` inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${l.model_info.db_model?"bg-blue-50 text-blue-600":"bg-gray-100 text-gray-600"} - `,children:l.model_info.db_model?"DB Model":"Config Model"})}},{id:"actions",header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Actions"}),size:60,minSize:40,enableResizing:!1,cell:({row:e})=>{let l=e.original,s="Admin"===f||l.model_info?.created_by===g,a=!l.model_info?.db_model;return(0,t.jsx)("div",{className:"flex items-center justify-end gap-2 pr-4",children:a?(0,t.jsx)(E.Tooltip,{title:"Config model cannot be deleted on the dashboard. Please delete it from the config file.",children:(0,t.jsx)(F.Icon,{icon:S.TrashIcon,size:"sm",className:"opacity-50 cursor-not-allowed"})}):(0,t.jsx)(E.Tooltip,{title:"Delete model",children:(0,t.jsx)(F.Icon,{icon:S.TrashIcon,size:"sm",onClick:e=>{e.stopPropagation(),s&&eP&&eP(l.model_info.id)},className:s?"cursor-pointer hover:text-red-600":"opacity-50 cursor-not-allowed"})})})}}],data:eR,isLoading:eS,sorting:ef,onSortingChange:ej,pagination:ep,onPaginationChange:eg,enablePagination:!0,onRowClick:e=>o(e.model_info.id)})]})})}),(0,t.jsx)(V.default,{isOpen:!!eM,title:"Delete Model",alertMessage:"This action cannot be undone.",message:"Are you sure you want to delete this model?",resourceInformationTitle:"Model Information",resourceInformation:eO?[{label:"Model Name",value:eO.model_name||"Not Set"},{label:"LiteLLM Model Name",value:eO.litellm_model_name||"Not Set"},{label:"Provider",value:eO.provider||"Not Set"},{label:"Created By",value:eO.model_info?.created_by||"Not Set"}]:[],onCancel:()=>eP(null),onOk:eB,confirmLoading:eA}),(0,t.jsx)(ea,{isVisible:e_,onCancel:()=>ey(!1),onSuccess:()=>ey(!1)})]})};var ed=e.i(206929),ec=e.i(35983),em=e.i(599724),eu=e.i(629569),eh=e.i(28651);let ex={"BadRequestError (400)":"BadRequestErrorRetries","AuthenticationError (401)":"AuthenticationErrorRetries","TimeoutError (408)":"TimeoutErrorRetries","RateLimitError (429)":"RateLimitErrorRetries","ContentPolicyViolationError (400)":"ContentPolicyViolationErrorRetries","InternalServerError (500)":"InternalServerErrorRetries"},ep=({selectedModelGroup:e,setSelectedModelGroup:l,availableModelGroups:s,globalRetryPolicy:a,setGlobalRetryPolicy:r,defaultRetry:i,modelGroupRetryPolicy:o,setModelGroupRetryPolicy:n,handleSaveRetrySettings:d})=>(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mb-6",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(em.Text,{children:"Retry Policy Scope:"}),(0,t.jsxs)(ed.Select,{className:"ml-2 w-48",defaultValue:"global",value:"global"===e?"global":e||s[0],onValueChange:e=>l(e),children:[(0,t.jsx)(ec.SelectItem,{value:"global",children:"Global Default"}),s.map((e,s)=>(0,t.jsx)(ec.SelectItem,{value:e,onClick:()=>l(e),children:e},s))]})]})}),"global"===e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eu.Title,{children:"Global Retry Policy"}),(0,t.jsx)(em.Text,{className:"mb-6",children:"Default retry settings applied to all model groups unless overridden"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(eu.Title,{children:["Retry Policy for ",e]}),(0,t.jsx)(em.Text,{className:"mb-6",children:"Model-specific retry settings. Falls back to global defaults if not set."})]}),ex&&(0,t.jsx)("table",{children:(0,t.jsx)("tbody",{children:Object.entries(ex).map(([l,s],d)=>{let c;if("global"===e)c=a?.[s]??i;else{let t=o?.[e]?.[s];c=null!=t?t:a?.[s]??i}return(0,t.jsxs)("tr",{className:"flex justify-between items-center mt-2",children:[(0,t.jsxs)("td",{children:[(0,t.jsx)(em.Text,{children:l}),"global"!==e&&(0,t.jsxs)(em.Text,{className:"text-xs text-gray-500 ml-2",children:["(Global: ",a?.[s]??i,")"]})]}),(0,t.jsx)("td",{children:(0,t.jsx)(eh.InputNumber,{className:"ml-5",value:c,min:0,step:1,onChange:t=>{"global"===e?r(e=>null==t?e:{...e??{},[s]:t}):n(l=>{let a=l?.[e]??{};return{...l??{},[e]:{...a,[s]:t}}})}})})]},d)})})}),(0,t.jsx)(T.Button,{className:"mt-6 mr-8",onClick:d,children:"Save"})]});var eg=e.i(883552),ef=e.i(262218),ej=e.i(175712),e_=e.i(91979),ey=e.i(637235),eb=e.i(724154);e.i(247167);var ev=e.i(931067);let eN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z"}}]},name:"cloud",theme:"outlined"};var ew=e.i(9583),eC=x.forwardRef(function(e,t){return x.createElement(ew.default,(0,ev.default)({},e,{ref:t,icon:eN}))}),eS=e.i(210612),ek=e.i(285027);let{Text:eT}=L.Typography,eF=({accessToken:e,onReloadSuccess:s,buttonText:a="Reload Price Data",showIcon:r=!0,size:i="middle",type:o="primary",className:n=""})=>{let[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)(!1),[h,p]=(0,x.useState)(!1),[g,f]=(0,x.useState)(!1),[j,_]=(0,x.useState)(6),[y,b]=(0,x.useState)(null),[v,N]=(0,x.useState)(!1),[C,S]=(0,x.useState)(null),[k,T]=(0,x.useState)(!1);(0,x.useEffect)(()=>{F(),M();let e=setInterval(()=>{F(),M()},3e4);return()=>clearInterval(e)},[e]);let F=async()=>{if(e){N(!0);try{console.log("Fetching reload status...");let t=await (0,l.getModelCostMapReloadStatus)(e);console.log("Received status:",t),b(t)}catch(e){console.error("Failed to fetch reload status:",e),b({scheduled:!1,interval_hours:null,last_run:null,next_run:null})}finally{N(!1)}}},M=async()=>{if(e){T(!0);try{let t=await (0,l.getModelCostMapSource)(e);S(t)}catch(e){console.error("Failed to fetch cost map source info:",e)}finally{T(!1)}}},P=async()=>{if(!e)return void D.default.fromBackend("No access token available");c(!0);try{let t=await (0,l.reloadModelCostMap)(e);"success"===t.status?(D.default.success(`Price data reloaded successfully! ${t.models_count||0} models updated.`),s?.(),await F(),await M()):D.default.fromBackend("Failed to reload price data")}catch(e){console.error("Error reloading price data:",e),D.default.fromBackend("Failed to reload price data. Please try again.")}finally{c(!1)}},L=async()=>{if(!e)return void D.default.fromBackend("No access token available");if(j<=0)return void D.default.fromBackend("Hours must be greater than 0");u(!0);try{let t=await (0,l.scheduleModelCostMapReload)(e,j);"success"===t.status?(D.default.success(`Periodic reload scheduled for every ${j} hours`),f(!1),await F()):D.default.fromBackend("Failed to schedule periodic reload")}catch(e){console.error("Error scheduling reload:",e),D.default.fromBackend("Failed to schedule periodic reload. Please try again.")}finally{u(!1)}},R=async()=>{if(!e)return void D.default.fromBackend("No access token available");p(!0);try{let t=await (0,l.cancelModelCostMapReload)(e);"success"===t.status?(D.default.success("Periodic reload cancelled successfully"),await F()):D.default.fromBackend("Failed to cancel periodic reload")}catch(e){console.error("Error cancelling reload:",e),D.default.fromBackend("Failed to cancel periodic reload. Please try again.")}finally{p(!1)}},O=e=>{if(!e)return"Never";try{return new Date(e).toLocaleString()}catch{return e}};return(0,t.jsxs)("div",{className:n,children:[(0,t.jsxs)(A.Space,{direction:"horizontal",size:"middle",style:{marginBottom:16},children:[(0,t.jsx)(eg.Popconfirm,{title:"Hard Refresh Price Data",description:"This will immediately fetch the latest pricing information from the remote source. Continue?",onConfirm:P,okText:"Yes",cancelText:"No",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"}},children:(0,t.jsx)(K.Button,{type:o,size:i,loading:d,icon:r?(0,t.jsx)(e_.ReloadOutlined,{}):void 0,style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"},children:a})}),y?.scheduled?(0,t.jsx)(K.Button,{type:"default",size:i,danger:!0,icon:(0,t.jsx)(eb.StopOutlined,{}),loading:h,onClick:R,style:{borderColor:"#ff4d4f",color:"#ff4d4f",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Cancel Periodic Reload"}):(0,t.jsx)(K.Button,{type:"default",size:i,icon:(0,t.jsx)(ey.ClockCircleOutlined,{}),onClick:()=>f(!0),style:{borderColor:"#d9d9d9",color:"#6366f1",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Set Up Periodic Reload"})]}),C&&(0,t.jsx)(ej.Card,{size:"small",style:{backgroundColor:"remote"===C.source?"#f0f7ff":"#fff8f0",border:`1px solid ${"remote"===C.source?"#bae0ff":"#ffd591"}`,borderRadius:8,marginBottom:12},children:(0,t.jsxs)(A.Space,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["remote"===C.source?(0,t.jsx)(eC,{style:{color:"#1677ff",fontSize:16}}):(0,t.jsx)(eS.DatabaseOutlined,{style:{color:"#fa8c16",fontSize:16}}),(0,t.jsx)(eT,{strong:!0,style:{fontSize:"13px"},children:"Pricing Data Source"}),(0,t.jsx)(ef.Tag,{color:"remote"===C.source?"blue":"orange",style:{marginLeft:"auto",fontWeight:600,textTransform:"uppercase",fontSize:"11px"},children:"remote"===C.source?"Remote":"Local"})]}),(0,t.jsx)(I.Divider,{style:{margin:"6px 0"}}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)(eT,{type:"secondary",style:{fontSize:"12px"},children:"Models loaded:"}),(0,t.jsx)(eT,{strong:!0,style:{fontSize:"12px"},children:C.model_count.toLocaleString()})]}),C.url&&(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:8},children:[(0,t.jsx)(eT,{type:"secondary",style:{fontSize:"12px",whiteSpace:"nowrap"},children:"remote"===C.source?"Loaded from:":"Attempted URL:"}),(0,t.jsx)(E.Tooltip,{title:C.url,children:(0,t.jsx)(eT,{style:{fontSize:"11px",maxWidth:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block",color:"#1677ff",cursor:"default"},children:C.url})})]}),C.is_env_forced&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginTop:2},children:[(0,t.jsx)(w.InfoCircleOutlined,{style:{color:"#fa8c16",fontSize:12}}),(0,t.jsxs)(eT,{type:"secondary",style:{fontSize:"11px"},children:["Local mode forced via ",(0,t.jsx)("code",{children:"LITELLM_LOCAL_MODEL_COST_MAP=True"})]})]}),C.fallback_reason&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:6,backgroundColor:"#fff7e6",border:"1px solid #ffd591",borderRadius:4,padding:"4px 8px",marginTop:2},children:[(0,t.jsx)(ek.WarningOutlined,{style:{color:"#fa8c16",fontSize:12,marginTop:2}}),(0,t.jsxs)(eT,{style:{fontSize:"11px",color:"#614700"},children:["Fell back to local: ",C.fallback_reason]})]})]})}),y&&(0,t.jsx)(ej.Card,{size:"small",style:{backgroundColor:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:8},children:(0,t.jsxs)(A.Space,{direction:"vertical",size:"small",style:{width:"100%"},children:[y.scheduled?(0,t.jsx)("div",{children:(0,t.jsxs)(ef.Tag,{color:"green",icon:(0,t.jsx)(ey.ClockCircleOutlined,{}),children:["Scheduled every ",y.interval_hours," hours"]})}):(0,t.jsx)(eT,{type:"secondary",children:"No periodic reload scheduled"}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)(eT,{type:"secondary",style:{fontSize:"12px"},children:"Last run:"}),(0,t.jsx)(eT,{style:{fontSize:"12px"},children:O(y.last_run)})]}),y.scheduled&&(0,t.jsxs)(t.Fragment,{children:[y.next_run&&(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)(eT,{type:"secondary",style:{fontSize:"12px"},children:"Next run:"}),(0,t.jsx)(eT,{style:{fontSize:"12px"},children:O(y.next_run)})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)(eT,{type:"secondary",style:{fontSize:"12px"},children:"Status:"}),(0,t.jsx)(ef.Tag,{color:y?.scheduled?y.last_run?"success":"processing":"default",children:y?.scheduled?y.last_run?"Active":"Ready":"Not scheduled"})]})]})]})}),(0,t.jsxs)(el.Modal,{title:"Set Up Periodic Reload",open:g,onOk:L,onCancel:()=>f(!1),confirmLoading:m,okText:"Schedule",cancelText:"Cancel",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"}},children:[(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(eT,{children:"Set up automatic reload of price data every:"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(eh.InputNumber,{min:1,max:168,value:j,onChange:e=>_(e||6),addonAfter:"hours",style:{width:"100%"}})}),(0,t.jsx)("div",{children:(0,t.jsxs)(eT,{type:"secondary",children:["This will automatically fetch the latest pricing data from the remote source every ",j," hours."]})})]})]})},eI=()=>{let{accessToken:e}=(0,r.default)(),{refetch:l}=(0,n.useModelCostMap)();return(0,t.jsx)(U.TabPanel,{children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(eu.Title,{children:"Price Data Management"}),(0,t.jsx)(em.Text,{className:"text-tremor-content",children:"Manage model pricing data and configure automatic reload schedules"})]}),(0,t.jsx)(eF,{accessToken:e,onReloadSuccess:()=>{l()},buttonText:"Reload Price Data",size:"middle",type:"primary",className:"w-full"})]})})};var eM=e.i(916925);let eP=async(e,t,l)=>{try{console.log("handling submit for formValues:",e);let t=e.model_mappings||[];if("model_mappings"in e&&delete e.model_mappings,e.model&&e.model.includes("all-wildcard")){let l=e.custom_llm_provider,s=(eM.provider_map[l]??l.toLowerCase())+"/*";e.model_name=s,t.push({public_name:s,litellm_model:s}),e.model=s}let l=[];for(let s of t){let t={},a={},r=s.public_name;for(let[l,r]of(t.model=s.litellm_model,void 0!==e.input_cost_per_token&&null!==e.input_cost_per_token&&""!==e.input_cost_per_token&&(e.input_cost_per_token=Number(e.input_cost_per_token)/1e6),void 0!==e.output_cost_per_token&&null!==e.output_cost_per_token&&""!==e.output_cost_per_token&&(e.output_cost_per_token=Number(e.output_cost_per_token)/1e6),t.model=s.litellm_model,console.log("formValues add deployment:",e),Object.entries(e)))if(""!==r&&"custom_pricing"!==l&&"pricing_model"!==l&&"cache_control"!==l)if("model_name"==l)t.model=r;else if("custom_llm_provider"==l){console.log("custom_llm_provider:",r);let e=eM.provider_map[r]??r.toLowerCase();t.custom_llm_provider=e,console.log("custom_llm_provider mappingResult:",e)}else if("model"==l)continue;else if("base_model"===l)a[l]=r;else if("team_id"===l)a.team_id=r;else if("model_access_group"===l)a.access_groups=r;else if("mode"==l)console.log("placing mode in modelInfo"),a.mode=r,delete t.mode;else if("custom_model_name"===l)t.model=r;else if("litellm_extra_params"==l){console.log("litellm_extra_params:",r);let e={};if(r&&void 0!=r){try{e=JSON.parse(r),"litellm_credential_name"in e&&delete e.litellm_credential_name}catch(e){throw D.default.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[l,s]of Object.entries(e))t[l]=s}}else if("model_info_params"==l){console.log("model_info_params:",r);let e={};if(r&&void 0!=r){try{e=JSON.parse(r)}catch(e){throw D.default.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[t,l]of Object.entries(e))a[t]=l}}else if("input_cost_per_token"===l||"output_cost_per_token"===l||"input_cost_per_second"===l){null!=r&&""!==r&&(t[l]=Number(r));continue}else t[l]=r;l.push({litellmParamsObj:t,modelInfoObj:a,modelName:r})}return l}catch(e){D.default.fromBackend("Failed to create model: "+e)}},eA=async(e,t,s,a)=>{try{let r=await eP(e,t,s);if(!r||0===r.length)return;for(let e of r){let{litellmParamsObj:s,modelInfoObj:a,modelName:r}=e,i={model_name:r,litellm_params:s,model_info:a},o=await (0,l.modelCreateCall)(t,i);console.log(`response for model create call: ${o.data}`)}a&&a(),s.resetFields()}catch(e){D.default.fromBackend("Failed to add model: "+e)}};var eE=e.i(591935),eL=e.i(304967),eR=e.i(779241);let eO=(0,a.createQueryKeys)("providerFields"),eB=()=>(0,s.useQuery)({queryKey:eO.list({}),queryFn:async()=>await (0,l.getProviderCreateMetadata)(),staleTime:864e5,gcTime:864e5});var ez=e.i(519756),eq=e.i(178654),eV=e.i(311451),eD=e.i(621192),eH=e.i(515831);let{Link:eG}=L.Typography,e$=e=>{let t="password"===e.field_type?"password":"select"===e.field_type?"select":"upload"===e.field_type?"upload":"textarea"===e.field_type?"textarea":"text";return{key:e.key,label:e.label,placeholder:e.placeholder??void 0,tooltip:e.tooltip??void 0,required:e.required??!1,type:t,options:e.options??void 0,defaultValue:e.default_value??void 0}},eU={},eJ=({selectedProvider:e,uploadProps:l})=>{let s=eM.Providers[e],a=et.Form.useFormInstance(),{data:r,isLoading:i,error:o}=eB(),n=x.default.useMemo(()=>{if(!r)return null;let e={};return r.forEach(t=>{let l=t.provider_display_name,s=t.credential_fields.map(e$);e[l]=s,t.provider&&(e[t.provider]=s),t.litellm_provider&&(e[t.litellm_provider]=s)}),e},[r]);x.default.useEffect(()=>{n&&Object.assign(eU,n)},[n]);let d=x.default.useMemo(()=>{let t=eU[s]??eU[e];if(t)return t;if(!r)return[];let l=r.find(t=>t.provider_display_name===s||t.provider===e||t.litellm_provider===e);if(!l)return[];let a=l.credential_fields.map(e$);return eU[l.provider_display_name]=a,l.provider&&(eU[l.provider]=a),l.litellm_provider&&(eU[l.litellm_provider]=a),a},[s,e,r]),c={name:"file",accept:".json",beforeUpload:e=>{if("application/json"===e.type){let t=new FileReader;t.onload=e=>{if(e.target){let t=e.target.result;console.log(`Setting field value from JSON, length: ${t.length}`),a.setFieldsValue({vertex_credentials:t}),console.log("Form values after setting:",a.getFieldsValue())}},t.readAsText(e)}return!1},onChange(e){console.log("Upload onChange triggered in ProviderSpecificFields"),console.log("Current form values:",a.getFieldsValue()),"uploading"!==e.file.status&&console.log(e.file,e.fileList)}};return(0,t.jsxs)(t.Fragment,{children:[i&&0===d.length&&(0,t.jsx)(eD.Row,{children:(0,t.jsx)(eq.Col,{span:24,children:(0,t.jsx)(em.Text,{className:"mb-2",children:"Loading provider fields..."})})}),o&&0===d.length&&(0,t.jsx)(eD.Row,{children:(0,t.jsx)(eq.Col,{span:24,children:(0,t.jsx)(em.Text,{className:"mb-2 text-red-500",children:o instanceof Error?o.message:"Failed to load provider credential fields"})})}),d.map(e=>(0,t.jsxs)(x.default.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:"Required"}]:void 0,tooltip:e.tooltip,className:"vertex_credentials"===e.key?"mb-0":void 0,children:"select"===e.type?(0,t.jsx)(W.Select,{placeholder:e.placeholder,defaultValue:e.defaultValue,children:e.options?.map(e=>(0,t.jsx)(W.Select.Option,{value:e,children:e},e))}):"upload"===e.type?(0,t.jsx)(eH.Upload,{...c,onChange:t=>{l?.onChange&&l.onChange(t),setTimeout(()=>{let t=a.getFieldValue(e.key);console.log(`${e.key} value after upload:`,JSON.stringify(t))},500)},children:(0,t.jsx)(K.Button,{icon:(0,t.jsx)(ez.UploadOutlined,{}),children:"Click to Upload"})}):"textarea"===e.type?(0,t.jsx)(eV.Input.TextArea,{placeholder:e.placeholder,defaultValue:e.defaultValue,rows:6,style:{fontFamily:"monospace",fontSize:"12px"}}):(0,t.jsx)(eR.TextInput,{placeholder:e.placeholder,type:"password"===e.type?"password":"text",defaultValue:e.defaultValue})}),"vertex_credentials"===e.key&&(0,t.jsx)(eD.Row,{children:(0,t.jsx)(eq.Col,{children:(0,t.jsx)(em.Text,{className:"mb-3 mt-1",children:"Give a gcp service account(.json file)"})})}),"base_model"===e.key&&(0,t.jsxs)(eD.Row,{children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:10,children:(0,t.jsxs)(em.Text,{className:"mb-2",children:["The actual model your azure deployment uses. Used for accurate cost tracking. Select name from"," ",(0,t.jsx)(eG,{href:"https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json",target:"_blank",children:"here"})]})})]})]},e.key))]})},{Link:eK}=L.Typography,eW=({open:e,onCancel:l,onAddCredential:s,uploadProps:a})=>{let[r]=et.Form.useForm(),[i,o]=(0,x.useState)(eM.Providers.OpenAI);return(0,t.jsx)(el.Modal,{title:"Add New Credential",open:e,onCancel:()=>{l(),r.resetFields()},footer:null,width:600,children:(0,t.jsxs)(et.Form,{form:r,onFinish:e=>{s(Object.entries(e).reduce((e,[t,l])=>(""!==l&&null!=l&&(e[t]=l),e),{})),r.resetFields()},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter a friendly name for these credentials"})}),(0,t.jsx)(et.Form.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,t.jsx)(W.Select,{showSearch:!0,onChange:e=>{o(e),r.setFieldValue("custom_llm_provider",e)},children:Object.entries(eM.Providers).map(([e,l])=>(0,t.jsx)(W.Select.Option,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:eM.providerLogoMap[l],alt:`${e} logo`,className:"w-5 h-5",onError:e=>{let t=e.target,s=t.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=l.charAt(0),s.replaceChild(e,t)}}}),(0,t.jsx)("span",{children:l})]})},e))})}),(0,t.jsx)(eJ,{selectedProvider:i,uploadProps:a}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(eK,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Button,{onClick:()=>{l(),r.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,t.jsx)(K.Button,{htmlType:"submit",children:"Add Credential"})]})]})]})})},{Link:eQ}=L.Typography;function eY({open:e,onCancel:l,onUpdateCredential:s,uploadProps:a,existingCredential:r}){let[i]=et.Form.useForm(),[o,n]=(0,x.useState)(eM.Providers.Anthropic);return(0,x.useEffect)(()=>{if(r){let e=Object.entries(r.credential_values||{}).reduce((e,[t,l])=>(e[t]=l??null,e),{});i.setFieldsValue({credential_name:r.credential_name,custom_llm_provider:r.credential_info.custom_llm_provider,...e}),n(r.credential_info.custom_llm_provider)}},[r]),(0,t.jsx)(el.Modal,{title:"Edit Credential",open:e,onCancel:()=>{l(),i.resetFields()},footer:null,width:600,destroyOnHidden:!0,children:(0,t.jsxs)(et.Form,{form:i,onFinish:e=>{s(Object.entries(e).reduce((e,[t,l])=>(""!==l&&null!=l&&(e[t]=l),e),{})),i.resetFields()},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:r?.credential_name,children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter a friendly name for these credentials",disabled:!!r?.credential_name})}),(0,t.jsx)(et.Form.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,t.jsx)(W.Select,{showSearch:!0,onChange:e=>{n(e),i.setFieldValue("custom_llm_provider",e)},children:Object.entries(eM.Providers).map(([e,l])=>(0,t.jsx)(W.Select.Option,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:eM.providerLogoMap[l],alt:`${e} logo`,className:"w-5 h-5",onError:e=>{let t=e.target,s=t.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=l.charAt(0),s.replaceChild(e,t)}}}),(0,t.jsx)("span",{children:l})]})},e))})}),(0,t.jsx)(eJ,{selectedProvider:o,uploadProps:a}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(eQ,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Button,{onClick:()=>{l(),i.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,t.jsx)(K.Button,{htmlType:"submit",children:"Update Credential"})]})]})]})})}let eX=({uploadProps:e})=>{let{accessToken:s}=(0,r.default)(),{data:a,refetch:i}=o(),n=a?.credentials||[],[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)(!1),[h,b]=(0,x.useState)(null),[v,N]=(0,x.useState)(null),[w,C]=(0,x.useState)(!1),[F,I]=(0,x.useState)(!1),[M]=et.Form.useForm(),P=["credential_name","custom_llm_provider"],A=async e=>{if(!s)return;let t=Object.entries(e).filter(([e])=>!P.includes(e)).reduce((e,[t,l])=>({...e,[t]:l}),{}),a={credential_name:e.credential_name,credential_values:t,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,l.credentialUpdateCall)(s,e.credential_name,a),D.default.success("Credential updated successfully"),u(!1),await i()},E=async e=>{if(!s)return;let t=Object.entries(e).filter(([e])=>!P.includes(e)).reduce((e,[t,l])=>({...e,[t]:l}),{}),a={credential_name:e.credential_name,credential_values:t,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,l.credentialCreateCall)(s,a),D.default.success("Credential added successfully"),c(!1),await i()},L=async()=>{if(s&&v){I(!0);try{await (0,l.credentialDeleteCall)(s,v.credential_name),D.default.success("Credential deleted successfully"),await i()}catch(e){D.default.error("Failed to delete credential")}finally{N(null),C(!1),I(!1)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto p-2",children:[(0,t.jsx)(T.Button,{onClick:()=>c(!0),children:"Add Credential"}),(0,t.jsx)("div",{className:"flex justify-between items-center mt-4 mb-4",children:(0,t.jsx)(em.Text,{children:"Configured credentials for different AI providers. Add and manage your API credentials."})}),(0,t.jsx)(eL.Card,{children:(0,t.jsxs)(p.Table,{children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(_.TableRow,{children:[(0,t.jsx)(f.TableHeaderCell,{children:"Credential Name"}),(0,t.jsx)(f.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(f.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(j.TableBody,{children:n&&0!==n.length?n.map((e,l)=>{var s;let a,r;return(0,t.jsxs)(_.TableRow,{children:[(0,t.jsx)(y.TableCell,{children:e.credential_name}),(0,t.jsx)(y.TableCell,{children:(s=e.credential_info?.custom_llm_provider||"-",r=(a={openai:"blue",azure:"indigo",anthropic:"purple",default:"gray"})[s.toLowerCase()]||a.default,(0,t.jsx)(k.Badge,{color:r,size:"xs",children:s}))}),(0,t.jsxs)(y.TableCell,{children:[(0,t.jsx)(T.Button,{icon:eE.PencilAltIcon,variant:"light",size:"sm",onClick:()=>{b(e),u(!0)}}),(0,t.jsx)(T.Button,{icon:S.TrashIcon,variant:"light",size:"sm",onClick:()=>{N(e),C(!0)},className:"ml-2"})]})]},l)}):(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(y.TableCell,{colSpan:4,className:"text-center py-4 text-gray-500",children:"No credentials configured"})})})]})}),d&&(0,t.jsx)(eW,{onAddCredential:E,open:d,onCancel:()=>c(!1),uploadProps:e}),m&&(0,t.jsx)(eY,{open:m,existingCredential:h,onUpdateCredential:A,uploadProps:e,onCancel:()=>u(!1)}),(0,t.jsx)(V.default,{isOpen:w,onCancel:()=>{N(null),C(!1)},onOk:L,title:"Delete Credential?",message:"Are you sure you want to delete this credential? This action cannot be undone and may break existing integrations.",resourceInformationTitle:"Credential Information",resourceInformation:[{label:"Credential Name",value:v?.credential_name},{label:"Provider",value:v?.credential_info?.custom_llm_provider||"-"}],confirmLoading:F,requiredConfirmation:v?.credential_name})]})};var eZ=e.i(708347),e0=e.i(278587),e1=e.i(309426),e2=e.i(197647),e4=e.i(653824),e5=e.i(881073),e6=e.i(723731),e3=e.i(475647),e8=e.i(91739),e7=e.i(437902),e9=e.i(166406);let{Text:te}=L.Typography,tt=({formValues:e,accessToken:s,testMode:a,modelName:r="this model",onClose:i,onTestComplete:o})=>{var n,d,c;let m,u,[h,p]=x.default.useState(null),[g,f]=x.default.useState(null),[j,_]=x.default.useState(null),[y,b]=x.default.useState(!0),[v,N]=x.default.useState(!1),[C,S]=x.default.useState(!1),k=async()=>{b(!0),S(!1),p(null),f(null),_(null),N(!1),await new Promise(e=>setTimeout(e,100));try{console.log("Testing connection with form values:",e);let t=await eP(e,s,null);if(!t){console.log("No result from prepareModelAddRequest"),p("Failed to prepare model data. Please check your form inputs."),N(!1),b(!1);return}console.log("Result from prepareModelAddRequest:",t);let{litellmParamsObj:a,modelInfoObj:r,modelName:i}=t[0],o=await (0,l.testConnectionRequest)(s,a,r,r?.mode);if("success"===o.status)D.default.success("Connection test successful!"),p(null),N(!0);else{let e=o.result?.error||o.message||"Unknown error";p(e),f(a),_(o.result?.raw_request_typed_dict),N(!1)}}catch(e){console.error("Test connection error:",e),p(e instanceof Error?e.message:String(e)),N(!1)}finally{b(!1),o&&o()}};x.default.useEffect(()=>{let e=setTimeout(()=>{k()},200);return()=>clearTimeout(e)},[]);let T=e=>e?e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error: /,""):"Unknown error",F="string"==typeof h?T(h):h?.message?T(h.message):"Unknown error",M=j?(n=j.raw_request_api_base,d=j.raw_request_body,c=j.raw_request_headers||{},m=JSON.stringify(d,null,2).split("\n").map(e=>` ${e}`).join("\n"),u=Object.entries(c).map(([e,t])=>`-H '${e}: ${t}'`).join(" \\\n "),`curl -X POST \\ + `,children:l.model_info.db_model?"DB Model":"Config Model"})}},{id:"actions",header:()=>(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Actions"}),size:60,minSize:40,enableResizing:!1,cell:({row:e})=>{let l=e.original,s="Admin"===f||l.model_info?.created_by===g,a=!l.model_info?.db_model;return(0,t.jsx)("div",{className:"flex items-center justify-end gap-2 pr-4",children:a?(0,t.jsx)(E.Tooltip,{title:"Config model cannot be deleted on the dashboard. Please delete it from the config file.",children:(0,t.jsx)(F.Icon,{icon:S.TrashIcon,size:"sm",className:"opacity-50 cursor-not-allowed"})}):(0,t.jsx)(E.Tooltip,{title:"Delete model",children:(0,t.jsx)(F.Icon,{icon:S.TrashIcon,size:"sm",onClick:e=>{e.stopPropagation(),s&&eP&&eP(l.model_info.id)},className:s?"cursor-pointer hover:text-red-600":"opacity-50 cursor-not-allowed"})})})}}],data:eR,isLoading:eS,sorting:ef,onSortingChange:ej,pagination:ep,onPaginationChange:eg,enablePagination:!0,onRowClick:e=>o(e.model_info.id)})]})})}),(0,t.jsx)(V.default,{isOpen:!!eM,title:"Delete Model",alertMessage:"This action cannot be undone.",message:"Are you sure you want to delete this model?",resourceInformationTitle:"Model Information",resourceInformation:eO?[{label:"Model Name",value:eO.model_name||"Not Set"},{label:"LiteLLM Model Name",value:eO.litellm_model_name||"Not Set"},{label:"Provider",value:eO.provider||"Not Set"},{label:"Created By",value:eO.model_info?.created_by||"Not Set"}]:[],onCancel:()=>eP(null),onOk:eB,confirmLoading:eA}),(0,t.jsx)(ea,{isVisible:e_,onCancel:()=>ey(!1),onSuccess:()=>ey(!1)})]})};var ed=e.i(206929),ec=e.i(35983),em=e.i(599724),eu=e.i(629569),eh=e.i(28651);let ex={"BadRequestError (400)":"BadRequestErrorRetries","AuthenticationError (401)":"AuthenticationErrorRetries","TimeoutError (408)":"TimeoutErrorRetries","RateLimitError (429)":"RateLimitErrorRetries","ContentPolicyViolationError (400)":"ContentPolicyViolationErrorRetries","InternalServerError (500)":"InternalServerErrorRetries"},ep=({selectedModelGroup:e,setSelectedModelGroup:l,availableModelGroups:s,globalRetryPolicy:a,setGlobalRetryPolicy:r,defaultRetry:i,modelGroupRetryPolicy:o,setModelGroupRetryPolicy:n,handleSaveRetrySettings:d})=>(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mb-6",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(em.Text,{children:"Retry Policy Scope:"}),(0,t.jsxs)(ed.Select,{className:"ml-2 w-48",defaultValue:"global",value:"global"===e?"global":e||s[0],onValueChange:e=>l(e),children:[(0,t.jsx)(ec.SelectItem,{value:"global",children:"Global Default"}),s.map((e,s)=>(0,t.jsx)(ec.SelectItem,{value:e,onClick:()=>l(e),children:e},s))]})]})}),"global"===e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eu.Title,{children:"Global Retry Policy"}),(0,t.jsx)(em.Text,{className:"mb-6",children:"Default retry settings applied to all model groups unless overridden"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(eu.Title,{children:["Retry Policy for ",e]}),(0,t.jsx)(em.Text,{className:"mb-6",children:"Model-specific retry settings. Falls back to global defaults if not set."})]}),ex&&(0,t.jsx)("table",{children:(0,t.jsx)("tbody",{children:Object.entries(ex).map(([l,s],d)=>{let c;if("global"===e)c=a?.[s]??i;else{let t=o?.[e]?.[s];c=null!=t?t:a?.[s]??i}return(0,t.jsxs)("tr",{className:"flex justify-between items-center mt-2",children:[(0,t.jsxs)("td",{children:[(0,t.jsx)(em.Text,{children:l}),"global"!==e&&(0,t.jsxs)(em.Text,{className:"text-xs text-gray-500 ml-2",children:["(Global: ",a?.[s]??i,")"]})]}),(0,t.jsx)("td",{children:(0,t.jsx)(eh.InputNumber,{className:"ml-5",value:c,min:0,step:1,onChange:t=>{"global"===e?r(e=>null==t?e:{...e??{},[s]:t}):n(l=>{let a=l?.[e]??{};return{...l??{},[e]:{...a,[s]:t}}})}})})]},d)})})}),(0,t.jsx)(T.Button,{className:"mt-6 mr-8",onClick:d,children:"Save"})]});var eg=e.i(883552),ef=e.i(262218),ej=e.i(175712),e_=e.i(91979),ey=e.i(637235),eb=e.i(724154);e.i(247167);var ev=e.i(931067);let eN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z"}}]},name:"cloud",theme:"outlined"};var ew=e.i(9583),eC=x.forwardRef(function(e,t){return x.createElement(ew.default,(0,ev.default)({},e,{ref:t,icon:eN}))}),eS=e.i(210612),ek=e.i(285027);let{Text:eT}=L.Typography,eF=({accessToken:e,onReloadSuccess:s,buttonText:a="Reload Price Data",showIcon:r=!0,size:i="middle",type:o="primary",className:n=""})=>{let[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)(!1),[h,p]=(0,x.useState)(!1),[g,f]=(0,x.useState)(!1),[j,_]=(0,x.useState)(6),[y,b]=(0,x.useState)(null),[v,N]=(0,x.useState)(!1),[C,S]=(0,x.useState)(null),[k,T]=(0,x.useState)(!1);(0,x.useEffect)(()=>{F(),M();let e=setInterval(()=>{F(),M()},3e4);return()=>clearInterval(e)},[e]);let F=async()=>{if(e){N(!0);try{console.log("Fetching reload status...");let t=await (0,l.getModelCostMapReloadStatus)(e);console.log("Received status:",t),b(t)}catch(e){console.error("Failed to fetch reload status:",e),b({scheduled:!1,interval_hours:null,last_run:null,next_run:null})}finally{N(!1)}}},M=async()=>{if(e){T(!0);try{let t=await (0,l.getModelCostMapSource)(e);S(t)}catch(e){console.error("Failed to fetch cost map source info:",e)}finally{T(!1)}}},P=async()=>{if(!e)return void D.default.fromBackend("No access token available");c(!0);try{let t=await (0,l.reloadModelCostMap)(e);"success"===t.status?(D.default.success(`Price data reloaded successfully! ${t.models_count||0} models updated.`),s?.(),await F(),await M()):D.default.fromBackend("Failed to reload price data")}catch(e){console.error("Error reloading price data:",e),D.default.fromBackend("Failed to reload price data. Please try again.")}finally{c(!1)}},L=async()=>{if(!e)return void D.default.fromBackend("No access token available");if(j<=0)return void D.default.fromBackend("Hours must be greater than 0");u(!0);try{let t=await (0,l.scheduleModelCostMapReload)(e,j);"success"===t.status?(D.default.success(`Periodic reload scheduled for every ${j} hours`),f(!1),await F()):D.default.fromBackend("Failed to schedule periodic reload")}catch(e){console.error("Error scheduling reload:",e),D.default.fromBackend("Failed to schedule periodic reload. Please try again.")}finally{u(!1)}},R=async()=>{if(!e)return void D.default.fromBackend("No access token available");p(!0);try{let t=await (0,l.cancelModelCostMapReload)(e);"success"===t.status?(D.default.success("Periodic reload cancelled successfully"),await F()):D.default.fromBackend("Failed to cancel periodic reload")}catch(e){console.error("Error cancelling reload:",e),D.default.fromBackend("Failed to cancel periodic reload. Please try again.")}finally{p(!1)}},O=e=>{if(!e)return"Never";try{return new Date(e).toLocaleString()}catch{return e}};return(0,t.jsxs)("div",{className:n,children:[(0,t.jsxs)(A.Space,{direction:"horizontal",size:"middle",style:{marginBottom:16},children:[(0,t.jsx)(eg.Popconfirm,{title:"Hard Refresh Price Data",description:"This will immediately fetch the latest pricing information from the remote source. Continue?",onConfirm:P,okText:"Yes",cancelText:"No",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"}},children:(0,t.jsx)(K.Button,{type:o,size:i,loading:d,icon:r?(0,t.jsx)(e_.ReloadOutlined,{}):void 0,style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"},children:a})}),y?.scheduled?(0,t.jsx)(K.Button,{type:"default",size:i,danger:!0,icon:(0,t.jsx)(eb.StopOutlined,{}),loading:h,onClick:R,style:{borderColor:"#ff4d4f",color:"#ff4d4f",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Cancel Periodic Reload"}):(0,t.jsx)(K.Button,{type:"default",size:i,icon:(0,t.jsx)(ey.ClockCircleOutlined,{}),onClick:()=>f(!0),style:{borderColor:"#d9d9d9",color:"#6366f1",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Set Up Periodic Reload"})]}),C&&(0,t.jsx)(ej.Card,{size:"small",style:{backgroundColor:"remote"===C.source?"#f0f7ff":"#fff8f0",border:`1px solid ${"remote"===C.source?"#bae0ff":"#ffd591"}`,borderRadius:8,marginBottom:12},children:(0,t.jsxs)(A.Space,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["remote"===C.source?(0,t.jsx)(eC,{style:{color:"#1677ff",fontSize:16}}):(0,t.jsx)(eS.DatabaseOutlined,{style:{color:"#fa8c16",fontSize:16}}),(0,t.jsx)(eT,{strong:!0,style:{fontSize:"13px"},children:"Pricing Data Source"}),(0,t.jsx)(ef.Tag,{color:"remote"===C.source?"blue":"orange",style:{marginLeft:"auto",fontWeight:600,textTransform:"uppercase",fontSize:"11px"},children:"remote"===C.source?"Remote":"Local"})]}),(0,t.jsx)(I.Divider,{style:{margin:"6px 0"}}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)(eT,{type:"secondary",style:{fontSize:"12px"},children:"Models loaded:"}),(0,t.jsx)(eT,{strong:!0,style:{fontSize:"12px"},children:C.model_count.toLocaleString()})]}),C.url&&(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:8},children:[(0,t.jsx)(eT,{type:"secondary",style:{fontSize:"12px",whiteSpace:"nowrap"},children:"remote"===C.source?"Loaded from:":"Attempted URL:"}),(0,t.jsx)(E.Tooltip,{title:C.url,children:(0,t.jsx)(eT,{style:{fontSize:"11px",maxWidth:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block",color:"#1677ff",cursor:"default"},children:C.url})})]}),C.is_env_forced&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginTop:2},children:[(0,t.jsx)(w.InfoCircleOutlined,{style:{color:"#fa8c16",fontSize:12}}),(0,t.jsxs)(eT,{type:"secondary",style:{fontSize:"11px"},children:["Local mode forced via ",(0,t.jsx)("code",{children:"LITELLM_LOCAL_MODEL_COST_MAP=True"})]})]}),C.fallback_reason&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:6,backgroundColor:"#fff7e6",border:"1px solid #ffd591",borderRadius:4,padding:"4px 8px",marginTop:2},children:[(0,t.jsx)(ek.WarningOutlined,{style:{color:"#fa8c16",fontSize:12,marginTop:2}}),(0,t.jsxs)(eT,{style:{fontSize:"11px",color:"#614700"},children:["Fell back to local: ",C.fallback_reason]})]})]})}),y&&(0,t.jsx)(ej.Card,{size:"small",style:{backgroundColor:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:8},children:(0,t.jsxs)(A.Space,{direction:"vertical",size:"small",style:{width:"100%"},children:[y.scheduled?(0,t.jsx)("div",{children:(0,t.jsxs)(ef.Tag,{color:"green",icon:(0,t.jsx)(ey.ClockCircleOutlined,{}),children:["Scheduled every ",y.interval_hours," hours"]})}):(0,t.jsx)(eT,{type:"secondary",children:"No periodic reload scheduled"}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)(eT,{type:"secondary",style:{fontSize:"12px"},children:"Last run:"}),(0,t.jsx)(eT,{style:{fontSize:"12px"},children:O(y.last_run)})]}),y.scheduled&&(0,t.jsxs)(t.Fragment,{children:[y.next_run&&(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)(eT,{type:"secondary",style:{fontSize:"12px"},children:"Next run:"}),(0,t.jsx)(eT,{style:{fontSize:"12px"},children:O(y.next_run)})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)(eT,{type:"secondary",style:{fontSize:"12px"},children:"Status:"}),(0,t.jsx)(ef.Tag,{color:y?.scheduled?y.last_run?"success":"processing":"default",children:y?.scheduled?y.last_run?"Active":"Ready":"Not scheduled"})]})]})]})}),(0,t.jsxs)(el.Modal,{title:"Set Up Periodic Reload",open:g,onOk:L,onCancel:()=>f(!1),confirmLoading:m,okText:"Schedule",cancelText:"Cancel",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"}},children:[(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(eT,{children:"Set up automatic reload of price data every:"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(eh.InputNumber,{min:1,max:168,value:j,onChange:e=>_(e||6),addonAfter:"hours",style:{width:"100%"}})}),(0,t.jsx)("div",{children:(0,t.jsxs)(eT,{type:"secondary",children:["This will automatically fetch the latest pricing data from the remote source every ",j," hours."]})})]})]})},eI=()=>{let{accessToken:e}=(0,r.default)(),{refetch:l}=(0,n.useModelCostMap)();return(0,t.jsx)(U.TabPanel,{children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(eu.Title,{children:"Price Data Management"}),(0,t.jsx)(em.Text,{className:"text-tremor-content",children:"Manage model pricing data and configure automatic reload schedules"})]}),(0,t.jsx)(eF,{accessToken:e,onReloadSuccess:()=>{l()},buttonText:"Reload Price Data",size:"middle",type:"primary",className:"w-full"})]})})};var eM=e.i(916925);let eP=async(e,t,l)=>{try{console.log("handling submit for formValues:",e);let t=e.model_mappings||[];if("model_mappings"in e&&delete e.model_mappings,e.model&&e.model.includes("all-wildcard")){let l=e.custom_llm_provider,s=(eM.provider_map[l]??l.toLowerCase())+"/*";e.model_name=s,t.push({public_name:s,litellm_model:s}),e.model=s}let l=[];for(let s of t){let t={},a={},r=s.public_name;for(let[l,r]of(t.model=s.litellm_model,void 0!==e.input_cost_per_token&&null!==e.input_cost_per_token&&""!==e.input_cost_per_token&&(e.input_cost_per_token=Number(e.input_cost_per_token)/1e6),void 0!==e.output_cost_per_token&&null!==e.output_cost_per_token&&""!==e.output_cost_per_token&&(e.output_cost_per_token=Number(e.output_cost_per_token)/1e6),t.model=s.litellm_model,console.log("formValues add deployment:",e),Object.entries(e)))if(""!==r&&"custom_pricing"!==l&&"pricing_model"!==l&&"cache_control"!==l)if("model_name"==l)t.model=r;else if("custom_llm_provider"==l){console.log("custom_llm_provider:",r);let e=eM.provider_map[r]??r.toLowerCase();t.custom_llm_provider=e,console.log("custom_llm_provider mappingResult:",e)}else if("model"==l)continue;else if("base_model"===l)a[l]=r;else if("team_id"===l)a.team_id=r;else if("model_access_group"===l)a.access_groups=r;else if("mode"==l)console.log("placing mode in modelInfo"),a.mode=r,delete t.mode;else if("custom_model_name"===l)t.model=r;else if("litellm_extra_params"==l){console.log("litellm_extra_params:",r);let e={};if(r&&void 0!=r){try{e=JSON.parse(r),"litellm_credential_name"in e&&delete e.litellm_credential_name}catch(e){throw D.default.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[l,s]of Object.entries(e))t[l]=s}}else if("model_info_params"==l){console.log("model_info_params:",r);let e={};if(r&&void 0!=r){try{e=JSON.parse(r)}catch(e){throw D.default.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[t,l]of Object.entries(e))a[t]=l}}else if("input_cost_per_token"===l||"output_cost_per_token"===l||"input_cost_per_second"===l){null!=r&&""!==r&&(t[l]=Number(r));continue}else t[l]=r;l.push({litellmParamsObj:t,modelInfoObj:a,modelName:r})}return l}catch(e){D.default.fromBackend("Failed to create model: "+e)}},eA=async(e,t,s,a)=>{try{let r=await eP(e,t,s);if(!r||0===r.length)return;for(let e of r){let{litellmParamsObj:s,modelInfoObj:a,modelName:r}=e,i={model_name:r,litellm_params:s,model_info:a},o=await (0,l.modelCreateCall)(t,i);console.log(`response for model create call: ${o.data}`)}a&&a(),s.resetFields()}catch(e){D.default.fromBackend("Failed to add model: "+e)}};var eE=e.i(591935),eL=e.i(304967),eR=e.i(779241);let eO=(0,a.createQueryKeys)("providerFields"),eB=()=>(0,s.useQuery)({queryKey:eO.list({}),queryFn:async()=>await (0,l.getProviderCreateMetadata)(),staleTime:864e5,gcTime:864e5});var ez=e.i(519756),eq=e.i(178654),eV=e.i(311451),eD=e.i(621192),eH=e.i(515831);let{Link:e$}=L.Typography,eG=e=>{let t="password"===e.field_type?"password":"select"===e.field_type?"select":"upload"===e.field_type?"upload":"textarea"===e.field_type?"textarea":"text";return{key:e.key,label:e.label,placeholder:e.placeholder??void 0,tooltip:e.tooltip??void 0,required:e.required??!1,type:t,options:e.options??void 0,defaultValue:e.default_value??void 0}},eU={},eJ=({selectedProvider:e,uploadProps:l})=>{let s=eM.Providers[e],a=et.Form.useFormInstance(),{data:r,isLoading:i,error:o}=eB(),n=x.default.useMemo(()=>{if(!r)return null;let e={};return r.forEach(t=>{let l=t.provider_display_name,s=t.credential_fields.map(eG);e[l]=s,t.provider&&(e[t.provider]=s),t.litellm_provider&&(e[t.litellm_provider]=s)}),e},[r]);x.default.useEffect(()=>{n&&Object.assign(eU,n)},[n]);let d=x.default.useMemo(()=>{let t=eU[s]??eU[e];if(t)return t;if(!r)return[];let l=r.find(t=>t.provider_display_name===s||t.provider===e||t.litellm_provider===e);if(!l)return[];let a=l.credential_fields.map(eG);return eU[l.provider_display_name]=a,l.provider&&(eU[l.provider]=a),l.litellm_provider&&(eU[l.litellm_provider]=a),a},[s,e,r]),c={name:"file",accept:".json",beforeUpload:e=>{if("application/json"===e.type){let t=new FileReader;t.onload=e=>{if(e.target){let t=e.target.result;console.log(`Setting field value from JSON, length: ${t.length}`),a.setFieldsValue({vertex_credentials:t}),console.log("Form values after setting:",a.getFieldsValue())}},t.readAsText(e)}return!1},onChange(e){console.log("Upload onChange triggered in ProviderSpecificFields"),console.log("Current form values:",a.getFieldsValue()),"uploading"!==e.file.status&&console.log(e.file,e.fileList)}};return(0,t.jsxs)(t.Fragment,{children:[i&&0===d.length&&(0,t.jsx)(eD.Row,{children:(0,t.jsx)(eq.Col,{span:24,children:(0,t.jsx)(em.Text,{className:"mb-2",children:"Loading provider fields..."})})}),o&&0===d.length&&(0,t.jsx)(eD.Row,{children:(0,t.jsx)(eq.Col,{span:24,children:(0,t.jsx)(em.Text,{className:"mb-2 text-red-500",children:o instanceof Error?o.message:"Failed to load provider credential fields"})})}),d.map(e=>(0,t.jsxs)(x.default.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:"Required"}]:void 0,tooltip:e.tooltip,className:"vertex_credentials"===e.key?"mb-0":void 0,children:"select"===e.type?(0,t.jsx)(W.Select,{placeholder:e.placeholder,defaultValue:e.defaultValue,children:e.options?.map(e=>(0,t.jsx)(W.Select.Option,{value:e,children:e},e))}):"upload"===e.type?(0,t.jsx)(eH.Upload,{...c,onChange:t=>{l?.onChange&&l.onChange(t),setTimeout(()=>{let t=a.getFieldValue(e.key);console.log(`${e.key} value after upload:`,JSON.stringify(t))},500)},children:(0,t.jsx)(K.Button,{icon:(0,t.jsx)(ez.UploadOutlined,{}),children:"Click to Upload"})}):"textarea"===e.type?(0,t.jsx)(eV.Input.TextArea,{placeholder:e.placeholder,defaultValue:e.defaultValue,rows:6,style:{fontFamily:"monospace",fontSize:"12px"}}):(0,t.jsx)(eR.TextInput,{placeholder:e.placeholder,type:"password"===e.type?"password":"text",defaultValue:e.defaultValue})}),"vertex_credentials"===e.key&&(0,t.jsx)(eD.Row,{children:(0,t.jsx)(eq.Col,{children:(0,t.jsx)(em.Text,{className:"mb-3 mt-1",children:"Give a gcp service account(.json file)"})})}),"base_model"===e.key&&(0,t.jsxs)(eD.Row,{children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:10,children:(0,t.jsxs)(em.Text,{className:"mb-2",children:["The actual model your azure deployment uses. Used for accurate cost tracking. Select name from"," ",(0,t.jsx)(e$,{href:"https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json",target:"_blank",children:"here"})]})})]})]},e.key))]})},{Link:eK}=L.Typography,eW=({open:e,onCancel:l,onAddCredential:s,uploadProps:a})=>{let[r]=et.Form.useForm(),[i,o]=(0,x.useState)(eM.Providers.OpenAI);return(0,t.jsx)(el.Modal,{title:"Add New Credential",open:e,onCancel:()=>{l(),r.resetFields()},footer:null,width:600,children:(0,t.jsxs)(et.Form,{form:r,onFinish:e=>{s(Object.entries(e).reduce((e,[t,l])=>(""!==l&&null!=l&&(e[t]=l),e),{})),r.resetFields()},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter a friendly name for these credentials"})}),(0,t.jsx)(et.Form.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,t.jsx)(W.Select,{showSearch:!0,onChange:e=>{o(e),r.setFieldValue("custom_llm_provider",e)},children:Object.entries(eM.Providers).map(([e,l])=>(0,t.jsx)(W.Select.Option,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:eM.providerLogoMap[l],alt:`${e} logo`,className:"w-5 h-5",onError:e=>{let t=e.target,s=t.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=l.charAt(0),s.replaceChild(e,t)}}}),(0,t.jsx)("span",{children:l})]})},e))})}),(0,t.jsx)(eJ,{selectedProvider:i,uploadProps:a}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(eK,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Button,{onClick:()=>{l(),r.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,t.jsx)(K.Button,{htmlType:"submit",children:"Add Credential"})]})]})]})})},{Link:eQ}=L.Typography;function eY({open:e,onCancel:l,onUpdateCredential:s,uploadProps:a,existingCredential:r}){let[i]=et.Form.useForm(),[o,n]=(0,x.useState)(eM.Providers.Anthropic);return(0,x.useEffect)(()=>{if(r){let e=Object.entries(r.credential_values||{}).reduce((e,[t,l])=>(e[t]=l??null,e),{});i.setFieldsValue({credential_name:r.credential_name,custom_llm_provider:r.credential_info.custom_llm_provider,...e}),n(r.credential_info.custom_llm_provider)}},[r]),(0,t.jsx)(el.Modal,{title:"Edit Credential",open:e,onCancel:()=>{l(),i.resetFields()},footer:null,width:600,destroyOnHidden:!0,children:(0,t.jsxs)(et.Form,{form:i,onFinish:e=>{s(Object.entries(e).reduce((e,[t,l])=>(""!==l&&null!=l&&(e[t]=l),e),{})),i.resetFields()},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:r?.credential_name,children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter a friendly name for these credentials",disabled:!!r?.credential_name})}),(0,t.jsx)(et.Form.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,t.jsx)(W.Select,{showSearch:!0,onChange:e=>{n(e),i.setFieldValue("custom_llm_provider",e)},children:Object.entries(eM.Providers).map(([e,l])=>(0,t.jsx)(W.Select.Option,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:eM.providerLogoMap[l],alt:`${e} logo`,className:"w-5 h-5",onError:e=>{let t=e.target,s=t.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=l.charAt(0),s.replaceChild(e,t)}}}),(0,t.jsx)("span",{children:l})]})},e))})}),(0,t.jsx)(eJ,{selectedProvider:o,uploadProps:a}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(eQ,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Button,{onClick:()=>{l(),i.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,t.jsx)(K.Button,{htmlType:"submit",children:"Update Credential"})]})]})]})})}var eX=e.i(708347);let eZ=({uploadProps:e})=>{let{accessToken:s,userRole:a}=(0,r.default)(),i=(0,eX.isProxyAdminRole)(a??""),{data:n,refetch:d}=o(),c=n?.credentials||[],[m,u]=(0,x.useState)(!1),[h,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)(null),[w,C]=(0,x.useState)(null),[F,I]=(0,x.useState)(!1),[M,P]=(0,x.useState)(!1),[A]=et.Form.useForm(),E=["credential_name","custom_llm_provider"],L=async e=>{if(!s)return;let t=Object.entries(e).filter(([e])=>!E.includes(e)).reduce((e,[t,l])=>({...e,[t]:l}),{}),a={credential_name:e.credential_name,credential_values:t,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,l.credentialUpdateCall)(s,e.credential_name,a),D.default.success("Credential updated successfully"),b(!1),await d()},R=async e=>{if(!s)return;let t=Object.entries(e).filter(([e])=>!E.includes(e)).reduce((e,[t,l])=>({...e,[t]:l}),{}),a={credential_name:e.credential_name,credential_values:t,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,l.credentialCreateCall)(s,a),D.default.success("Credential added successfully"),u(!1),await d()},O=async()=>{if(s&&w){P(!0);try{await (0,l.credentialDeleteCall)(s,w.credential_name),D.default.success("Credential deleted successfully"),await d()}catch(e){D.default.error("Failed to delete credential")}finally{C(null),I(!1),P(!1)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto p-2",children:[i&&(0,t.jsx)(T.Button,{onClick:()=>u(!0),children:"Add Credential"}),(0,t.jsx)("div",{className:"flex justify-between items-center mt-4 mb-4",children:(0,t.jsx)(em.Text,{children:"Configured credentials for different AI providers. Add and manage your API credentials."})}),(0,t.jsx)(eL.Card,{children:(0,t.jsxs)(p.Table,{children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(_.TableRow,{children:[(0,t.jsx)(f.TableHeaderCell,{children:"Credential Name"}),(0,t.jsx)(f.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(f.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(j.TableBody,{children:c&&0!==c.length?c.map((e,l)=>{var s;let a,r;return(0,t.jsxs)(_.TableRow,{children:[(0,t.jsx)(y.TableCell,{children:e.credential_name}),(0,t.jsx)(y.TableCell,{children:(s=e.credential_info?.custom_llm_provider||"-",r=(a={openai:"blue",azure:"indigo",anthropic:"purple",default:"gray"})[s.toLowerCase()]||a.default,(0,t.jsx)(k.Badge,{color:r,size:"xs",children:s}))}),(0,t.jsx)(y.TableCell,{children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Button,{icon:eE.PencilAltIcon,variant:"light",size:"sm",onClick:()=>{N(e),b(!0)}}),(0,t.jsx)(T.Button,{icon:S.TrashIcon,variant:"light",size:"sm",onClick:()=>{C(e),I(!0)},className:"ml-2"})]}):null})]},l)}):(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(y.TableCell,{colSpan:4,className:"text-center py-4 text-gray-500",children:"No credentials configured"})})})]})}),m&&(0,t.jsx)(eW,{onAddCredential:R,open:m,onCancel:()=>u(!1),uploadProps:e}),h&&(0,t.jsx)(eY,{open:h,existingCredential:v,onUpdateCredential:L,uploadProps:e,onCancel:()=>b(!1)}),(0,t.jsx)(V.default,{isOpen:F,onCancel:()=>{C(null),I(!1)},onOk:O,title:"Delete Credential?",message:"Are you sure you want to delete this credential? This action cannot be undone and may break existing integrations.",resourceInformationTitle:"Credential Information",resourceInformation:[{label:"Credential Name",value:w?.credential_name},{label:"Provider",value:w?.credential_info?.custom_llm_provider||"-"}],confirmLoading:M,requiredConfirmation:w?.credential_name})]})};var e0=e.i(278587),e1=e.i(309426),e2=e.i(197647),e4=e.i(653824),e5=e.i(881073),e6=e.i(723731),e3=e.i(475647),e8=e.i(91739),e7=e.i(437902),e9=e.i(166406);let{Text:te}=L.Typography,tt=({formValues:e,accessToken:s,testMode:a,modelName:r="this model",onClose:i,onTestComplete:o})=>{var n,d,c;let m,u,[h,p]=x.default.useState(null),[g,f]=x.default.useState(null),[j,_]=x.default.useState(null),[y,b]=x.default.useState(!0),[v,N]=x.default.useState(!1),[C,S]=x.default.useState(!1),k=async()=>{b(!0),S(!1),p(null),f(null),_(null),N(!1),await new Promise(e=>setTimeout(e,100));try{console.log("Testing connection with form values:",e);let t=await eP(e,s,null);if(!t){console.log("No result from prepareModelAddRequest"),p("Failed to prepare model data. Please check your form inputs."),N(!1),b(!1);return}console.log("Result from prepareModelAddRequest:",t);let{litellmParamsObj:a,modelInfoObj:r,modelName:i}=t[0],o=await (0,l.testConnectionRequest)(s,a,r,r?.mode);if("success"===o.status)D.default.success("Connection test successful!"),p(null),N(!0);else{let e=o.result?.error||o.message||"Unknown error";p(e),f(a),_(o.result?.raw_request_typed_dict),N(!1)}}catch(e){console.error("Test connection error:",e),p(e instanceof Error?e.message:String(e)),N(!1)}finally{b(!1),o&&o()}};x.default.useEffect(()=>{let e=setTimeout(()=>{k()},200);return()=>clearTimeout(e)},[]);let T=e=>e?e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error: /,""):"Unknown error",F="string"==typeof h?T(h):h?.message?T(h.message):"Unknown error",M=j?(n=j.raw_request_api_base,d=j.raw_request_body,c=j.raw_request_headers||{},m=JSON.stringify(d,null,2).split("\n").map(e=>` ${e}`).join("\n"),u=Object.entries(c).map(([e,t])=>`-H '${e}: ${t}'`).join(" \\\n "),`curl -X POST \\ ${n} \\ ${u?`${u} \\ `:""}-H 'Content-Type: application/json' \\ -d '{ ${m} - }'`):"";return(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:[y?(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,t.jsxs)(te,{style:{fontSize:"16px"},children:["Testing connection to ",r,"..."]}),(0,t.jsx)(e7.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]}):v?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.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.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,t.jsxs)(te,{"data-testid":"connection-success-msg",type:"success",style:{fontSize:"18px",fontWeight:500,marginLeft:"10px"},children:["Connection to ",r," successful!"]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(ek.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(te,{"data-testid":"connection-failure-msg",type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",r," failed"]})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,t.jsxs)(te,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(te,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:F}),h&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(K.Button,{type:"link",onClick:()=>S(!C),style:{paddingLeft:0,height:"auto"},children:C?"Hide Details":"Show Details"})})]}),C&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(te,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Troubleshooting Details"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:"string"==typeof h?h:JSON.stringify(h,null,2)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(te,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"API Request"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"250px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:M||"No request data available"}),(0,t.jsx)(K.Button,{style:{marginTop:"8px"},icon:(0,t.jsx)(e9.CopyOutlined,{}),onClick:()=>{navigator.clipboard.writeText(M||""),D.default.success("Copied to clipboard")},children:"Copy to Clipboard"})]})]})}),(0,t.jsx)(I.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(K.Button,{type:"link",href:"https://docs.litellm.ai/docs/providers",target:"_blank",icon:(0,t.jsx)(w.InfoCircleOutlined,{}),children:"View Documentation"})})]})},tl=async(e,t,s,a)=>{try{let r;console.log("=== AUTO ROUTER SUBMIT HANDLER CALLED ==="),console.log("handling auto router submit for formValues:",e),console.log("Model type:",e.model_type),"complexity_router"===e.model_type?(console.log("Creating complexity router configuration"),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:{}},console.log("Complexity router config:",e.complexity_router_config)):(console.log("Creating semantic router configuration"),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&&"custom"!==e.auto_router_embedding_model?r.litellm_params.auto_router_embedding_model=e.auto_router_embedding_model:e.custom_embedding_model&&(r.litellm_params.auto_router_embedding_model=e.custom_embedding_model),console.log("Semantic router config (stringified):",r.litellm_params.auto_router_config)),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),console.log("Auto router configuration to be created:",r),console.log("Calling modelCreateCall...");let i=await (0,l.modelCreateCall)(t,r);console.log("response for auto router create call:",i);let o="complexity_router"===e.model_type?"Complexity Router":"Semantic Router";D.default.success(`Successfully created ${o}: ${e.auto_router_name}`),s.resetFields(),a&&a()}catch(e){console.error("Failed to add auto router:",e),D.default.fromBackend("Failed to add auto router: "+e)}};var ts=e.i(689020),ta=e.i(955135),tr=e.i(646563),ti=e.i(362024),to=e.i(21548);let{Text:tn}=L.Typography,{TextArea:td}=eV.Input,tc=({modelInfo:e,value:l,onChange:s})=>{let[a,r]=(0,x.useState)([]),[i,o]=(0,x.useState)(!1),[n,d]=(0,x.useState)([]);(0,x.useEffect)(()=>{let e=l?.routes;if(e){let t=[];r(l=>e.map((e,s)=>{let a=l[s],r=a?.id||e.id||`route-${s}-${Date.now()}`;return t.push(r),{id:r,model:e.name||e.model||"",utterances:e.utterances||[],description:e.description||"",score_threshold:e.score_threshold??.5}})),d(t)}else r([]),d([])},[l]);let c=(e,t,l)=>{let s=a.map(s=>s.id===e?{...s,[t]:l}:s);r(s),m(s)},m=e=>{let t={routes:e.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))};s?.(t)},u=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)(A.Space,{align:"center",children:[(0,t.jsx)(L.Typography.Title,{level:4,style:{margin:0},children:"Routes Configuration"}),(0,t.jsx)(E.Tooltip,{title:"Configure routing logic to automatically select the best model based on user input patterns",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(K.Button,{type:"primary",icon:(0,t.jsx)(tr.PlusOutlined,{}),onClick:()=>{let e=`route-${Date.now()}`,t=[...a,{id:e,model:"",utterances:[],description:"",score_threshold:.5}];r(t),m(t),d(t=>[...t,e])},className:"bg-blue-600 hover:bg-blue-700",children:"Add Route"})]}),0===a.length?(0,t.jsx)(ej.Card,{children:(0,t.jsx)(to.Empty,{description:'No routes configured. Click "Add Route" to get started.'})}):(0,t.jsx)(ti.Collapse,{activeKey:n,onChange:e=>d(Array.isArray(e)?e:[e].filter(Boolean)),style:{width:"100%"},items:a.map((e,l)=>({key:e.id,label:(0,t.jsxs)(tn,{style:{fontSize:16},children:["Route ",l+1,": ",e.model||"Unnamed"]}),extra:(0,t.jsx)(K.Button,{type:"text",danger:!0,size:"small",icon:(0,t.jsx)(ta.DeleteOutlined,{}),onClick:t=>{var l;let s;t.stopPropagation(),l=e.id,r(s=a.filter(e=>e.id!==l)),m(s),d(e=>e.filter(e=>e!==l))}}),children:(0,t.jsxs)(ej.Card,{children:[(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-sm font-medium mb-2 block",children:"Model"}),(0,t.jsx)(W.Select,{value:e.model,onChange:t=>c(e.id,"model",t),placeholder:"Select model",showSearch:!0,style:{width:"100%"},options:u})]}),(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-sm font-medium mb-2 block",children:"Description"}),(0,t.jsx)(td,{value:e.description,onChange:t=>c(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)(tn,{className:"text-sm font-medium",children:"Score Threshold"}),(0,t.jsx)(E.Tooltip,{title:"Minimum similarity score to route to this model (0-1)",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(eh.InputNumber,{value:e.score_threshold,onChange:t=>c(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)(tn,{className:"text-sm font-medium",children:"Example Utterances"}),(0,t.jsx)(E.Tooltip,{title:"Training examples for this route. Type an utterance and press Enter to add it.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(tn,{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)(W.Select,{mode:"tags",value:e.utterances,onChange:t=>c(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)(I.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-lg font-semibold",children:"JSON Preview"}),(0,t.jsx)(K.Button,{type:"link",onClick:()=>o(!i),className:"text-blue-600 p-0",children:i?"Hide":"Show"})]}),i&&(0,t.jsx)(ej.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:a.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))},null,2)})})]})},{Text:tm}=L.Typography,tu={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..."'}},th=({modelInfo:e,value:l,onChange:s})=>{let a=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)(A.Space,{align:"center",style:{marginBottom:16},children:[(0,t.jsx)(L.Typography.Title,{level:4,style:{margin:0},children:"Complexity Tier Configuration"}),(0,t.jsx)(E.Tooltip,{title:"Map each complexity tier to a model. Simple queries use cheaper/faster models, complex queries use more capable models.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(tm,{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 handles each tier."}),(0,t.jsx)(ej.Card,{children:Object.keys(tu).map((e,r)=>{let i=tu[e];return(0,t.jsxs)("div",{children:[r>0&&(0,t.jsx)(I.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)(tm,{strong:!0,style:{fontSize:16},children:[i.label," Tier"]}),(0,t.jsx)(E.Tooltip,{title:i.description,children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsxs)(tm,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:["Examples: ",i.examples]}),(0,t.jsx)(W.Select,{value:l[e],onChange:t=>{s({...l,[e]:t})},placeholder:`Select model for ${i.label.toLowerCase()} queries`,showSearch:!0,style:{width:"100%"},options:a})]})]},e)})}),(0,t.jsx)(I.Divider,{}),(0,t.jsxs)(ej.Card,{className:"bg-gray-50",children:[(0,t.jsx)(tm,{strong:!0,style:{display:"block",marginBottom:8},children:"How Classification Works"}),(0,t.jsx)(tm,{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)"]})]})]})]})};var tx=e.i(962944);let tp={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 tg=x.forwardRef(function(e,t){return x.createElement(ew.default,(0,ev.default)({},e,{ref:t,icon:tp}))});let{Title:tf,Link:tj}=L.Typography,t_=({form:e,handleOk:s,accessToken:a,userRole:r})=>{let[i,o]=(0,x.useState)(!1),[n,d]=(0,x.useState)(!1),[c,m]=(0,x.useState)(""),[u,h]=(0,x.useState)([]),[p,g]=(0,x.useState)([]),[f,j]=(0,x.useState)(!1),[_,y]=(0,x.useState)(!1),[b,v]=(0,x.useState)("complexity"),[N,w]=(0,x.useState)(null),[C,S]=(0,x.useState)({SIMPLE:"",MEDIUM:"",COMPLEX:"",REASONING:""});(0,x.useEffect)(()=>{(async()=>{h((await (0,l.modelAvailableCall)(a,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[a]),(0,x.useEffect)(()=>{(async()=>{try{let e=await (0,ts.fetchAvailableModels)(a);console.log("Fetched models for auto router:",e),g(e)}catch(e){console.error("Error fetching model info for auto router:",e)}})()},[a]);let k=eZ.all_admin_roles.includes(r),T=async()=>{d(!0),m(`test-${Date.now()}`),o(!0)},F=()=>{console.log("Auto router submit triggered!"),console.log("Router type:",b);let t=e.getFieldsValue();if(console.log("Form values:",t),!t.auto_router_name)return void D.default.fromBackend("Please enter an Auto Router Name");if("complexity"===b){if(0===Object.values(C).filter(Boolean).length)return void D.default.fromBackend("Please select at least one model for a complexity tier");let l=C.MEDIUM||C.SIMPLE||C.COMPLEX||C.REASONING;e.setFieldsValue({custom_llm_provider:"auto_router",model:t.auto_router_name,api_key:"not_required_for_auto_router",auto_router_default_model:l}),e.validateFields(["auto_router_name"]).then(r=>{console.log("Complexity router validation passed");let i={...r,auto_router_name:t.auto_router_name,auto_router_default_model:l,model_type:"complexity_router",complexity_router_config:{tiers:C},model_access_group:t.model_access_group};console.log("Final submit values:",i),tl(i,a,e,s)}).catch(e=>{console.error("Validation failed:",e),D.default.fromBackend("Please fill in all required fields")})}else{if(!t.auto_router_default_model)return void D.default.fromBackend("Please select a Default Model");if(e.setFieldsValue({custom_llm_provider:"auto_router",model:t.auto_router_name,api_key:"not_required_for_auto_router"}),!N||!N.routes||0===N.routes.length)return void D.default.fromBackend("Please configure at least one route for the auto router");if(N.routes.filter(e=>!e.name||!e.description||0===e.utterances.length).length>0)return void D.default.fromBackend("Please ensure all routes have a target model, description, and at least one utterance");e.validateFields().then(t=>{console.log("Form validation passed, submitting with values:",t);let l={...t,auto_router_config:N,model_type:"semantic_router"};console.log("Final submit values:",l),tl(l,a,e,s)}).catch(e=>{console.error("Validation failed:",e);let t=e.errorFields||[];if(t.length>0){let e=t.map(e=>{let t=e.name[0];return({auto_router_name:"Auto Router Name",auto_router_default_model:"Default Model",auto_router_embedding_model:"Embedding Model"})[t]||t});D.default.fromBackend(`Please fill in the following required fields: ${e.join(", ")}`)}else D.default.fromBackend("Please fill in all required fields")})}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tf,{level:2,children:"Add Auto Router"}),(0,t.jsx)(em.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."}),(0,t.jsx)(ej.Card,{className:"mb-4",children:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(em.Text,{className:"text-sm font-medium mb-2 block",children:"Router Type"}),(0,t.jsx)(e8.Radio.Group,{value:b,onChange:e=>v(e.target.value),className:"w-full",children:(0,t.jsxs)(A.Space,{direction:"vertical",className:"w-full",children:[(0,t.jsxs)(e8.Radio,{value:"complexity",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tx.ThunderboltOutlined,{className:"text-yellow-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Complexity Router"}),(0,t.jsx)(J.Badge,{count:"Recommended",style:{backgroundColor:"#52c41a",fontSize:"10px",padding:"0 6px"}})]}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:["Automatically routes based on request complexity. No training data needed — just pick 4 models and go.",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-green-600",children:"✓ Zero API calls"})," · ",(0,t.jsx)("span",{className:"text-green-600",children:"✓ <1ms latency"})," · ",(0,t.jsx)("span",{className:"text-green-600",children:"✓ No cost"})]})]}),(0,t.jsxs)(e8.Radio,{value:"semantic",className:"w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tg,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Semantic Router"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:"Routes based on semantic similarity to example utterances. Requires embedding model and training examples."})]})]})})]})}),(0,t.jsx)(ej.Card,{children:(0,t.jsxs)(et.Form,{form:e,onFinish:F,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(et.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)(eR.TextInput,{placeholder:"e.g., smart_router, auto_router_1"})}),"complexity"===b?(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(th,{modelInfo:p,value:C,onChange:e=>{S(e)}})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(tc,{modelInfo:p,value:N,onChange:t=>{w(t),e.setFieldValue("auto_router_config",t)}})}),(0,t.jsx)(et.Form.Item,{rules:[{required:"semantic"===b,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)(W.Select,{placeholder:"Select a default model",onChange:e=>{j("custom"===e)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0})}),(0,t.jsx)(et.Form.Item,{label:"Embedding Model",name:"auto_router_embedding_model",tooltip:"Optional: Embedding model to use for semantic routing decisions",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(W.Select,{value:e.getFieldValue("auto_router_embedding_model"),placeholder:"Select an embedding model (optional)",onChange:t=>{y("custom"===t),e.setFieldValue("auto_router_embedding_model",t)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0,allowClear:!0})})]}),(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-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:"flex-grow border-t border-gray-200"})]}),k&&(0,t.jsx)(et.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)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:u.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)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(L.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(K.Button,{onClick:T,loading:n,children:"Test Connection"}),(0,t.jsx)(K.Button,{type:"primary",onClick:()=>{console.log("Add Auto Router button clicked!"),F()},children:"Add Auto Router"})]})]})]})}),(0,t.jsx)(el.Modal,{title:"Connection Test Results",open:i,onCancel:()=>{o(!1),d(!1)},footer:[(0,t.jsx)(K.Button,{onClick:()=>{o(!1),d(!1)},children:"Close"},"close")],width:700,children:i&&(0,t.jsx)(tt,{formValues:e.getFieldsValue(),accessToken:a,testMode:"chat",modelName:e.getFieldValue("auto_router_name"),onClose:()=>{o(!1),d(!1)},onTestComplete:()=>d(!1)},c)})]})};var ty=e.i(838932),tb=e.i(109034),tv=e.i(793130),tN=e.i(560445),tw=e.i(663435),tC=e.i(677667),tS=e.i(898667),tk=e.i(130643),tT=e.i(635432),tF=e.i(564897),tI=e.i(435451);let{Text:tM}=L.Typography,tP=({form:e,showCacheControl:l,onCacheControlChange:s})=>{let a=t=>{let l=e.getFieldValue("litellm_extra_params");try{let s=l?JSON.parse(l):{};t.length>0?s.cache_control_injection_points=t:delete s.cache_control_injection_points,Object.keys(s).length>0?e.setFieldValue("litellm_extra_params",JSON.stringify(s,null,2)):e.setFieldValue("litellm_extra_params","")}catch(e){console.error("Error updating cache control points:",e)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Cache Control Injection Points",name:"cache_control",valuePropName:"checked",className:"mb-4",tooltip:"Tell litellm where to inject cache control checkpoints. You can specify either by role (to apply to all messages of that role) or by specific message index.",children:(0,t.jsx)(es.Switch,{onChange:s,className:"bg-gray-600"})}),l&&(0,t.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,t.jsx)(tM,{className:"text-sm text-gray-500 block mb-4",children:"Providers like Anthropic, Bedrock API require users to specify where to inject cache control checkpoints, litellm can automatically add them for you as a cost saving feature."}),(0,t.jsx)(et.Form.List,{name:"cache_control_injection_points",initialValue:[{location:"message"}],children:(l,{add:s,remove:r})=>(0,t.jsxs)(t.Fragment,{children:[l.map((s,i)=>(0,t.jsxs)("div",{className:"flex items-center mb-4 gap-4",children:[(0,t.jsx)(et.Form.Item,{...s,label:"Type",name:[s.name,"location"],initialValue:"message",className:"mb-0",style:{width:"180px"},children:(0,t.jsx)(W.Select,{disabled:!0,options:[{value:"message",label:"Message"}]})}),(0,t.jsx)(et.Form.Item,{...s,label:"Role",name:[s.name,"role"],className:"mb-0",style:{width:"180px"},tooltip:"LiteLLM will mark all messages of this role as cacheable",children:(0,t.jsx)(W.Select,{placeholder:"Select a role",allowClear:!0,options:[{value:"user",label:"User"},{value:"system",label:"System"},{value:"assistant",label:"Assistant"}],onChange:()=>{a(e.getFieldValue("cache_control_points"))}})}),(0,t.jsx)(et.Form.Item,{...s,label:"Index",name:[s.name,"index"],className:"mb-0",style:{width:"180px"},tooltip:"(Optional) If set litellm will mark the message at this index as cacheable",children:(0,t.jsx)(tI.default,{type:"number",placeholder:"Optional",step:1,onChange:()=>{a(e.getFieldValue("cache_control_points"))}})}),l.length>1&&(0,t.jsx)(tF.MinusCircleOutlined,{className:"text-red-500 cursor-pointer text-lg ml-12",onClick:()=>{r(s.name),setTimeout(()=>{a(e.getFieldValue("cache_control_points"))},0)}})]},s.key)),(0,t.jsx)(et.Form.Item,{children:(0,t.jsxs)("button",{type:"button",className:"flex items-center justify-center w-full border border-dashed border-gray-300 py-2 px-4 text-gray-600 hover:text-blue-600 hover:border-blue-300 transition-all rounded",onClick:()=>s(),children:[(0,t.jsx)(tr.PlusOutlined,{className:"mr-2"}),"Add Injection Point"]})})]})})]})]})};var tA=e.i(916940),tE=e.i(122550);let{Link:tL}=L.Typography,tR=({showAdvancedSettings:e,setShowAdvancedSettings:l,teams:s,guardrailsList:a,tagsList:r,accessToken:i})=>{let[o]=et.Form.useForm(),[n,d]=x.default.useState(!1),[c,m]=x.default.useState("per_token"),[u,h]=x.default.useState(!1),p=(e,t)=>t&&(isNaN(Number(t))||0>Number(t))?Promise.reject("Please enter a valid positive number"):Promise.resolve();return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(tC.Accordion,{className:"mt-2 mb-4",children:[(0,t.jsx)(tS.AccordionHeader,{children:(0,t.jsx)("b",{children:"Advanced Settings"})}),(0,t.jsx)(tk.AccordionBody,{children:(0,t.jsxs)("div",{className:"bg-white rounded-lg",children:[(0,t.jsx)(et.Form.Item,{label:"Custom Pricing",name:"custom_pricing",valuePropName:"checked",className:"mb-4",children:(0,t.jsx)(es.Switch,{onChange:e=>{d(e),e||o.setFieldsValue({input_cost_per_token:void 0,output_cost_per_token:void 0,input_cost_per_second:void 0})},className:"bg-gray-600"})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{children:["Attached Knowledge Bases (RAG)"," ",(0,t.jsx)(E.Tooltip,{title:"Vector stores to use for RAG. Every request to this model will automatically retrieve context from these knowledge bases.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/knowledgebase",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"vector_store_ids",className:"mt-4",help:"Select vector stores to attach. Requests to this model will automatically use these for RAG. Set up vector stores in Tools > Vector Stores.",children:(0,t.jsx)(tA.default,{onChange:()=>{},accessToken:i,placeholder:"Select knowledge bases (optional)"})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(E.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)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:"Select existing guardrails. Go to 'Guardrails' tab to create new guardrails.",children:(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:a.map(e=>({value:e,label:e}))})}),(0,t.jsx)(et.Form.Item,{label:"Tags",name:"tags",className:"mb-4",children:(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(r).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),n&&(0,t.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,t.jsx)(et.Form.Item,{label:"Pricing Model",name:"pricing_model",className:"mb-4",children:(0,t.jsx)(W.Select,{defaultValue:"per_token",onChange:e=>m(e),options:[{value:"per_token",label:"Per Million Tokens"},{value:"per_second",label:"Per Second"}]})}),"per_token"===c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Input Cost (per 1M tokens)",name:"input_cost_per_token",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})}),(0,t.jsx)(et.Form.Item,{label:"Output Cost (per 1M tokens)",name:"output_cost_per_token",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})})]}):(0,t.jsx)(et.Form.Item,{label:"Cost Per Second",name:"input_cost_per_second",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})})]}),(0,t.jsx)(et.Form.Item,{label:"Use in pass through routes",name:"use_in_pass_through",valuePropName:"checked",className:"mb-4 mt-4",tooltip:(0,t.jsxs)("span",{children:["Allow using these credentials in pass through routes."," ",(0,t.jsx)(tL,{href:"https://docs.litellm.ai/docs/pass_through/vertex_ai",target:"_blank",children:"Learn more"})]}),children:(0,t.jsx)(es.Switch,{onChange:e=>{let t=o.getFieldValue("litellm_extra_params");try{let l=t?JSON.parse(t):{};e?l.use_in_pass_through=!0:delete l.use_in_pass_through,Object.keys(l).length>0?o.setFieldValue("litellm_extra_params",JSON.stringify(l,null,2)):o.setFieldValue("litellm_extra_params","")}catch(t){e?o.setFieldValue("litellm_extra_params",JSON.stringify({use_in_pass_through:!0},null,2)):o.setFieldValue("litellm_extra_params","")}},className:"bg-gray-600"})}),(0,t.jsx)(tP,{form:o,showCacheControl:u,onCacheControlChange:e=>{if(h(e),!e){let e=o.getFieldValue("litellm_extra_params");try{let t=e?JSON.parse(e):{};delete t.cache_control_injection_points,Object.keys(t).length>0?o.setFieldValue("litellm_extra_params",JSON.stringify(t,null,2)):o.setFieldValue("litellm_extra_params","")}catch(e){o.setFieldValue("litellm_extra_params","")}}}}),(0,t.jsx)(et.Form.Item,{label:"LiteLLM Params",name:"litellm_extra_params",tooltip:"Optional litellm params used for making a litellm.completion() call.",className:"mb-4 mt-4",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(tT.default,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}),(0,t.jsxs)(eD.Row,{className:"mb-4",children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:10,children:(0,t.jsxs)(em.Text,{className:"text-gray-600 text-sm",children:["Pass JSON of litellm supported params"," ",(0,t.jsx)(tL,{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",children:"litellm.completion() call"})]})})]}),(0,t.jsx)(et.Form.Item,{label:"Model Info",name:"model_info_params",tooltip:"Optional model info params. Returned when calling `/model/info` endpoint.",className:"mb-0",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(tT.default,{rows:4,placeholder:'{ "mode": "chat" }'})})]})})]})})};var tO=e.i(291542),tB=e.i(750113);let tz=({content:e,children:l,width:s="auto",className:a=""})=>{let[r,i]=(0,x.useState)(!1),[o,n]=(0,x.useState)("top"),d=(0,x.useRef)(null);return(0,t.jsxs)("div",{className:"relative inline-block",ref:d,children:[l||(0,t.jsx)(tB.QuestionCircleOutlined,{className:"ml-1 text-gray-500 cursor-help",onMouseEnter:()=>{if(d.current){let e=d.current.getBoundingClientRect(),t=e.top,l=window.innerHeight-e.bottom;t<300&&l>300?n("bottom"):n("top")}i(!0)},onMouseLeave:()=>i(!1)}),r&&(0,t.jsxs)("div",{className:`absolute left-1/2 -translate-x-1/2 z-50 bg-black/90 text-white p-2 rounded-md text-sm font-normal shadow-lg ${a}`,style:{["top"===o?"bottom":"top"]:"100%",width:s,marginBottom:"top"===o?"8px":"0",marginTop:"bottom"===o?"8px":"0"},children:[e,(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 w-0 h-0",style:{top:"top"===o?"100%":"auto",bottom:"bottom"===o?"100%":"auto",borderTop:"top"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderBottom:"bottom"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderLeft:"6px solid transparent",borderRight:"6px solid transparent"}})]})]})},tq=()=>{let e=et.Form.useFormInstance(),[l,s]=(0,x.useState)(0),a=et.Form.useWatch("model",e)||[],r=Array.isArray(a)?a:[a],i=et.Form.useWatch("custom_model_name",e),o=!r.includes("all-wildcard"),n=et.Form.useWatch("custom_llm_provider",e);if((0,x.useEffect)(()=>{if(i&&r.includes("custom")){let t=(e.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?n===eM.Providers.Azure?{public_name:i,litellm_model:`azure/${i}`}:{public_name:i,litellm_model:i}:e);e.setFieldValue("model_mappings",t),s(e=>e+1)}},[i,r,n,e]),(0,x.useEffect)(()=>{if(r.length>0&&!r.includes("all-wildcard")){let t=e.getFieldValue("model_mappings")||[];if(t.length!==r.length||!r.every(e=>t.some(t=>"custom"===e?"custom"===t.litellm_model||t.litellm_model===i:n===eM.Providers.Azure?t.litellm_model===`azure/${e}`:t.litellm_model===e))){let t=r.map(e=>"custom"===e&&i?n===eM.Providers.Azure?{public_name:i,litellm_model:`azure/${i}`}:{public_name:i,litellm_model:i}:n===eM.Providers.Azure?{public_name:e,litellm_model:`azure/${e}`}:{public_name:e,litellm_model:e});e.setFieldValue("model_mappings",t),s(e=>e+1)}}},[r,i,n,e]),!o)return null;let d=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-2 font-normal",children:"The name you specify in your API calls to LiteLLM Proxy"}),(0,t.jsxs)("div",{className:"mb-2 font-normal",children:[(0,t.jsx)("strong",{children:"Example:"})," If you name your public model"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"example-name"}),", and choose"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"openai/qwen-plus-latest"})," as the LiteLLM model"]}),(0,t.jsxs)("div",{className:"mb-2 font-normal",children:[(0,t.jsx)("strong",{children:"Usage:"})," You make an API call to the LiteLLM proxy with"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:'model = "example-name"'})]}),(0,t.jsxs)("div",{className:"font-normal",children:[(0,t.jsx)("strong",{children:"Result:"})," LiteLLM sends"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"qwen-plus-latest"})," to the provider"]})]}),c=(0,t.jsx)("div",{children:"The model name LiteLLM will send to the LLM API"}),m=[{title:(0,t.jsxs)("span",{className:"flex items-center",children:["Public Model Name",(0,t.jsx)(tz,{content:d,width:"500px"})]}),dataIndex:"public_name",key:"public_name",render:(l,s,a)=>(0,t.jsx)(eR.TextInput,{value:l,onChange:t=>{let l=t.target.value,s=[...e.getFieldValue("model_mappings")],r=n===eM.Providers.Anthropic,i=l.endsWith("-1m"),o=e.getFieldValue("litellm_extra_params"),d=!o||""===o.trim(),c=l;if(r&&i&&d){let t=JSON.stringify({extra_headers:{"anthropic-beta":"context-1m-2025-08-07"}},null,2);e.setFieldValue("litellm_extra_params",t),c=l.slice(0,-3)}s[a].public_name=c,e.setFieldValue("model_mappings",s)}})},{title:(0,t.jsxs)("span",{className:"flex items-center",children:["LiteLLM Model Name",(0,t.jsx)(tz,{content:c,width:"360px"})]}),dataIndex:"litellm_model",key:"litellm_model"}];return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(et.Form.Item,{label:"Model Mappings",name:"model_mappings",tooltip:"Map public model names to LiteLLM model names for load balancing",labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",rules:[{required:!0,validator:async(e,t)=>{if(!t||0===t.length)throw Error("At least one model mapping is required");if(t.filter(e=>!e.public_name||""===e.public_name.trim()).length>0)throw Error("All model mappings must have valid public names")}}],children:(0,t.jsx)(tO.Table,{dataSource:e.getFieldValue("model_mappings"),columns:m,pagination:!1,size:"small"},l)})})},tV=({selectedProvider:e,providerModels:l,getPlaceholder:s})=>{let a=et.Form.useFormInstance(),r=t=>{let l=t.target.value,s=(a.getFieldValue("model_mappings")||[]).map(t=>"custom"===t.public_name||"custom"===t.litellm_model?e===eM.Providers.Azure?{public_name:l,litellm_model:`azure/${l}`}:{public_name:l,litellm_model:l}:t);a.setFieldsValue({model_mappings:s})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(et.Form.Item,{label:"LiteLLM Model Name(s)",tooltip:"The model name LiteLLM will send to the LLM API",className:"mb-0",children:[(0,t.jsx)(et.Form.Item,{name:"model",rules:[{required:!0,message:`Please enter ${e===eM.Providers.Azure?"a deployment name":"at least one model"}.`}],noStyle:!0,children:e===eM.Providers.Azure||e===eM.Providers.OpenAI_Compatible||e===eM.Providers.Ollama?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(eR.TextInput,{placeholder:s(e),onChange:e===eM.Providers.Azure?e=>{let t=e.target.value,l=t?[{public_name:t,litellm_model:`azure/${t}`}]:[];a.setFieldsValue({model:t,model_mappings:l})}:void 0})}):l.length>0?(0,t.jsx)(W.Select,{"data-testid":"model-name-select",mode:"multiple",allowClear:!0,showSearch:!0,placeholder:"Select models",onChange:t=>{let l=Array.isArray(t)?t:[t];if(l.includes("all-wildcard"))a.setFieldsValue({model_name:void 0,model_mappings:[]});else if(JSON.stringify(a.getFieldValue("model"))!==JSON.stringify(l)){let t=l.map(t=>e===eM.Providers.Azure?{public_name:t,litellm_model:`azure/${t}`}:{public_name:t,litellm_model:t});a.setFieldsValue({model:l,model_mappings:t})}},optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{label:"Custom Model Name (Enter below)",value:"custom"},{label:`All ${e} Models (Wildcard)`,value:"all-wildcard"},...l.map(e=>({label:e,value:e}))],style:{width:"100%"}}):(0,t.jsx)(eR.TextInput,{placeholder:s(e)})}),(0,t.jsx)(et.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.model!==t.model,children:({getFieldValue:l})=>{let s=l("model")||[];return(Array.isArray(s)?s:[s]).includes("custom")&&(0,t.jsx)(et.Form.Item,{name:"custom_model_name",rules:[{required:!0,message:"Please enter a custom model name."}],className:"mt-2",children:(0,t.jsx)(eR.TextInput,{placeholder:e===eM.Providers.Azure?"Enter Azure deployment name":"Enter custom model name",onChange:r})})}})]}),(0,t.jsxs)(eD.Row,{children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:14,children:(0,t.jsx)(em.Text,{className:"mb-3 mt-1",children:e===eM.Providers.Azure?"Your deployment name will be saved as the public model name, and LiteLLM will use 'azure/deployment-name' internally":"The model name LiteLLM will send to the LLM API"})})]})]})},tD=[{value:"chat",label:"Chat - /chat/completions"},{value:"completion",label:"Completion - /completions"},{value:"embedding",label:"Embedding - /embeddings"},{value:"audio_speech",label:"Audio Speech - /audio/speech"},{value:"audio_transcription",label:"Audio Transcription - /audio/transcriptions"},{value:"image_generation",label:"Image Generation - /images/generations"},{value:"video_generation",label:"Video Generation - /videos"},{value:"rerank",label:"Rerank - /rerank"},{value:"realtime",label:"Realtime - /realtime"},{value:"batch",label:"Batch - /batch"},{value:"ocr",label:"OCR - /ocr"}],{Title:tH,Link:tG}=L.Typography,t$=({form:e,handleOk:s,selectedProvider:a,setSelectedProvider:i,providerModels:o,setProviderModelsFn:n,getPlaceholder:d,uploadProps:c,showAdvancedSettings:m,setShowAdvancedSettings:u,teams:h,credentials:p})=>{let[g,f]=(0,x.useState)("chat"),[j,_]=(0,x.useState)(!1),[y,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)(""),{accessToken:w,userRole:C,premiumUser:S,userId:k}=(0,r.default)(),{data:T,isLoading:F,error:I}=eB(),{data:M}=(0,ty.useGuardrails)(),P=M?.guardrails.map(e=>e.guardrail_name),{data:A,isLoading:O,error:B}=(0,tb.useTags)(),z=async()=>{b(!0),N(`test-${Date.now()}`),_(!0)},[q,V]=(0,x.useState)(!1),[D,H]=(0,x.useState)([]),[G,$]=(0,x.useState)(null);(0,x.useEffect)(()=>{(async()=>{H((await (0,l.modelAvailableCall)(w,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[w]);let U=(0,x.useMemo)(()=>T?[...T].sort((e,t)=>e.provider_display_name.localeCompare(t.provider_display_name)):[],[T]),J=I?I instanceof Error?I.message:"Failed to load providers":null,Q=eZ.all_admin_roles.includes(C),Y=(0,eZ.isUserTeamAdminForAnyTeam)(h,k);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tH,{level:2,children:"Add Model"}),(0,t.jsx)(ej.Card,{children:(0,t.jsx)(et.Form,{form:e,onFinish:async e=>{console.log("🔥 Form onFinish triggered with values:",e),await s().then(()=>{$(null)})},onFinishFailed:e=>{console.log("💥 Form onFinishFailed triggered:",e)},labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[Y&&!Q&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Select Team",name:"team_id",rules:[{required:!0,message:"Please select a team to continue"}],tooltip:"Select the team for which you want to add this model",children:(0,t.jsx)(tw.default,{onChange:e=>{$(e)}})}),!G&&(0,t.jsx)(tN.Alert,{message:"Team Selection Required",description:"As a team admin, you need to select your team first before adding models.",type:"info",showIcon:!0,className:"mb-4"})]}),(Q||Y&&G)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"E.g. OpenAI, Azure OpenAI, Anthropic, Bedrock, etc.",labelCol:{span:10},labelAlign:"left",children:(0,t.jsxs)(W.Select,{virtual:!1,showSearch:!0,loading:F,placeholder:F?"Loading providers...":"Select a provider",optionFilterProp:"data-label",onChange:t=>{i(t),n(t),e.setFieldsValue({custom_llm_provider:t}),e.setFieldsValue({model:[],model_name:void 0})},children:[J&&0===U.length&&(0,t.jsx)(W.Select.Option,{value:"",children:J},"__error"),U.map(e=>{let l=e.provider_display_name,s=e.provider;return eM.providerLogoMap[l],(0,t.jsx)(W.Select.Option,{value:s,"data-label":l,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(R.ProviderLogo,{provider:s,className:"w-5 h-5"}),(0,t.jsx)("span",{children:l})]})},s)})]})}),(0,t.jsx)(tV,{selectedProvider:a,providerModels:o,getPlaceholder:d}),(0,t.jsx)(tq,{}),(0,t.jsx)(et.Form.Item,{label:"Mode",name:"mode",className:"mb-1",children:(0,t.jsx)(W.Select,{style:{width:"100%"},value:g,onChange:e=>f(e),options:tD})}),(0,t.jsxs)(eD.Row,{children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:10,children:(0,t.jsxs)(em.Text,{className:"mb-5 mt-1",children:[(0,t.jsx)("strong",{children:"Optional"})," - LiteLLM endpoint to use when health checking this model"," ",(0,t.jsx)(tG,{href:"https://docs.litellm.ai/docs/proxy/health#health",target:"_blank",children:"Learn more"})]})})]}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(L.Typography.Text,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter new provider credentials below"})}),(0,t.jsx)(et.Form.Item,{label:"Existing Credentials",name:"litellm_credential_name",initialValue:null,children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{value:null,label:"None"},...p.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,t.jsx)(et.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.litellm_credential_name!==t.litellm_credential_name||e.provider!==t.provider,children:({getFieldValue:e})=>{let l=e("litellm_credential_name");return(console.log("🔑 Credential Name Changed:",l),l)?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,t.jsx)(eJ,{selectedProvider:a,uploadProps:c})]})}}),(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Model Info Settings"}),(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(Q||!Y)&&(0,t.jsx)(et.Form.Item,{label:"Team-BYOK Model",tooltip:"Only use this model + credential combination for this team. Useful when teams want to onboard their own OpenAI keys.",className:"mb-4",children:(0,t.jsx)(E.Tooltip,{title:S?"":"This is an enterprise-only feature. Upgrade to premium to restrict model+credential combinations to a specific team.",placement:"top",children:(0,t.jsx)(tv.Switch,{checked:q,onChange:t=>{V(t),t||e.setFieldValue("team_id",void 0)},disabled:!S})})}),q&&(Q||!Y)&&(0,t.jsx)(et.Form.Item,{label:"Select Team",name:"team_id",className:"mb-4",tooltip:"Only keys for this team will be able to call this model.",rules:[{required:q&&!Q,message:"Please select a team."}],children:(0,t.jsx)(tw.default,{disabled:!S})}),Q&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(et.Form.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to give users access to select models, and add new ones to the group over time.",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:D.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})}),(0,t.jsx)(tR,{showAdvancedSettings:m,setShowAdvancedSettings:u,teams:h,guardrailsList:P||[],tagsList:A||{},accessToken:w||""})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(L.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(K.Button,{"data-testid":"test-connect-btn",onClick:z,loading:y,children:"Test Connect"}),(0,t.jsx)(K.Button,{"data-testid":"add-model-btn",htmlType:"submit",children:"Add Model"})]})]})]})})}),(0,t.jsx)(el.Modal,{title:"Connection Test Results",open:j,onCancel:()=>{_(!1),b(!1)},footer:[(0,t.jsx)(K.Button,{onClick:()=>{_(!1),b(!1)},children:"Close"},"close")],width:700,children:j&&(0,t.jsx)(tt,{formValues:e.getFieldsValue(),accessToken:w,testMode:g,modelName:e.getFieldValue("model_name")||e.getFieldValue("model"),onClose:()=>{_(!1),b(!1)},onTestComplete:()=>b(!1)},v)})]})},tU=({form:e,handleOk:l,selectedProvider:s,setSelectedProvider:a,providerModels:r,setProviderModelsFn:i,getPlaceholder:o,uploadProps:n,showAdvancedSettings:d,setShowAdvancedSettings:c,teams:m,credentials:u,accessToken:h,userRole:x})=>{let[p]=et.Form.useForm();return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(e4.TabGroup,{className:"w-full",children:[(0,t.jsxs)(e5.TabList,{className:"mb-4",children:[(0,t.jsx)(e2.Tab,{children:"Add Model"}),(0,t.jsx)(e2.Tab,{children:"Add Auto Router"})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t$,{form:e,handleOk:l,selectedProvider:s,setSelectedProvider:a,providerModels:r,setProviderModelsFn:i,getPlaceholder:o,uploadProps:n,showAdvancedSettings:d,setShowAdvancedSettings:c,teams:m,credentials:u})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t_,{form:p,handleOk:()=>{p.validateFields().then(e=>{tl(e,h,p,l)}).catch(e=>{console.error("Validation failed:",e)})},accessToken:h,userRole:x})})]})]})})};var tJ=e.i(798496),tK=e.i(536916),tW=e.i(502275),tQ=e.i(122577);let tY=[{pattern:/Missing .* API Key/i,replacement:"Missing API Key"},{pattern:/Connection timeout/i,replacement:"Connection timeout"},{pattern:/Network.*not.*ok/i,replacement:"Network connection failed"},{pattern:/403.*Forbidden/i,replacement:"Access forbidden - check API key permissions"},{pattern:/401.*Unauthorized/i,replacement:"Unauthorized - invalid API key"},{pattern:/429.*rate limit/i,replacement:"Rate limit exceeded"},{pattern:/500.*Internal Server Error/i,replacement:"Provider internal server error"},{pattern:/litellm\.AuthenticationError/i,replacement:"Authentication failed"},{pattern:/litellm\.RateLimitError/i,replacement:"Rate limit exceeded"},{pattern:/litellm\.APIError/i,replacement:"API error"}],tX=({accessToken:e,modelData:s,all_models_on_proxy:a,getDisplayModelName:r,setSelectedModelId:i,teams:o})=>{let n,d,c,m,[u,h]=(0,x.useState)({}),[p,g]=(0,x.useState)([]),[f,j]=(0,x.useState)(!1),[_,y]=(0,x.useState)(!1),[b,v]=(0,x.useState)(null),[N,w]=(0,x.useState)(!1),[C,S]=(0,x.useState)(null);(0,x.useRef)(null),(0,x.useEffect)(()=>{e&&s?.data&&(async()=>{let t={};s.data.forEach(e=>{let l=e.model_info?.id;l&&(t[l]={status:"none",lastCheck:"None",lastSuccess:"None",loading:!1,error:void 0,fullError:void 0,successResponse:void 0})});try{let a=await (0,l.latestHealthChecksCall)(e);a&&a.latest_health_checks&&"object"==typeof a.latest_health_checks&&Object.entries(a.latest_health_checks).forEach(([e,l])=>{if(!l||!s.data.some(t=>t.model_info?.id===e))return;let a=l.error_message||void 0;t[e]={status:l.status||"unknown",lastCheck:l.checked_at?new Date(l.checked_at).toLocaleString():"None",lastSuccess:"healthy"===l.status&&l.checked_at?new Date(l.checked_at).toLocaleString():"None",loading:!1,error:a?F(a):void 0,fullError:a,successResponse:"healthy"===l.status?l:void 0}})}catch(e){console.warn("Failed to load health check history (using default states):",e)}h(t)})()},[e,s]);let F=e=>{if(!e)return"Health check failed";let t="string"==typeof e?e:JSON.stringify(e),l=t.match(/(\w+Error):\s*(\d{3})/i);if(l)return`${l[1]}: ${l[2]}`;let s=t.match(/(AuthenticationError|RateLimitError|BadRequestError|InternalServerError|TimeoutError|NotFoundError|ForbiddenError|ServiceUnavailableError|BadGatewayError|ContentPolicyViolationError|\w+Error)/i),a=t.match(/\b(400|401|403|404|408|429|500|502|503|504)\b/);if(s&&a)return`${s[1]}: ${a[1]}`;if(a){let e=a[1];return`${({400:"BadRequestError",401:"AuthenticationError",403:"ForbiddenError",404:"NotFoundError",408:"TimeoutError",429:"RateLimitError",500:"InternalServerError",502:"BadGatewayError",503:"ServiceUnavailableError",504:"GatewayTimeoutError"})[e]}: ${e}`}if(s){let e=s[1],t={AuthenticationError:"401",RateLimitError:"429",BadRequestError:"400",InternalServerError:"500",TimeoutError:"408",NotFoundError:"404",ForbiddenError:"403",ServiceUnavailableError:"503",BadGatewayError:"502",GatewayTimeoutError:"504",ContentPolicyViolationError:"400"}[e];return t?`${e}: ${t}`:e}for(let{pattern:e,replacement:l}of tY)if(e.test(t))return l;if(/missing.*api.*key|invalid.*key|unauthorized/i.test(t))return"AuthenticationError: 401";if(/rate.*limit|too.*many.*requests/i.test(t))return"RateLimitError: 429";if(/timeout|timed.*out/i.test(t))return"TimeoutError: 408";if(/not.*found/i.test(t))return"NotFoundError: 404";if(/forbidden|access.*denied/i.test(t))return"ForbiddenError: 403";if(/internal.*server.*error/i.test(t))return"InternalServerError: 500";let r=t.replace(/[\n\r]+/g," ").replace(/\s+/g," ").trim(),i=r.split(/[.!?]/),o=i[0]?.trim();return o&&o.length>0?o.length>100?o.substring(0,97)+"...":o:r.length>100?r.substring(0,97)+"...":r},I=async t=>{if(e){h(e=>({...e,[t]:{...e[t],loading:!0,status:"checking"}}));try{let s=await (0,l.individualModelHealthCheckCall)(e,t),a=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){let e=s.unhealthy_endpoints[0]?.error||"Health check failed",l=F(e);h(s=>({...s,[t]:{status:"unhealthy",lastCheck:a,lastSuccess:s[t]?.lastSuccess||"None",loading:!1,error:l,fullError:e}}))}else h(e=>({...e,[t]:{status:"healthy",lastCheck:a,lastSuccess:a,loading:!1,successResponse:s}}));try{let s=await (0,l.latestHealthChecksCall)(e),a=s.latest_health_checks?.[t];if(a){let e=a.error_message||void 0;h(l=>({...l,[t]:{status:a.status||l[t]?.status||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():l[t]?.lastCheck||"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():l[t]?.lastSuccess||"None",loading:!1,error:e?F(e):l[t]?.error,fullError:e||l[t]?.fullError,successResponse:"healthy"===a.status?a:l[t]?.successResponse}}))}}catch(e){console.debug("Could not fetch updated status from database (non-critical):",e)}}catch(a){let e=new Date().toLocaleString(),l=a instanceof Error?a.message:String(a),s=F(l);h(a=>({...a,[t]:{status:"unhealthy",lastCheck:e,lastSuccess:a[t]?.lastSuccess||"None",loading:!1,error:s,fullError:l}}))}}},M=async()=>{let t=p.length>0?p:a,s=t.reduce((e,t)=>(e[t]={...u[t],loading:!0,status:"checking"},e),{});h(e=>({...e,...s}));let r={},i=t.map(async t=>{if(e)try{let s=await (0,l.individualModelHealthCheckCall)(e,t);r[t]=s;let a=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){let e=s.unhealthy_endpoints[0]?.error||"Health check failed",l=F(e);h(s=>({...s,[t]:{status:"unhealthy",lastCheck:a,lastSuccess:s[t]?.lastSuccess||"None",loading:!1,error:l,fullError:e}}))}else h(e=>({...e,[t]:{status:"healthy",lastCheck:a,lastSuccess:a,loading:!1,successResponse:s}}))}catch(a){console.error(`Health check failed for model id ${t}:`,a);let e=new Date().toLocaleString(),l=a instanceof Error?a.message:String(a),s=F(l);h(a=>({...a,[t]:{status:"unhealthy",lastCheck:e,lastSuccess:a[t]?.lastSuccess||"None",loading:!1,error:s,fullError:l}}))}});await Promise.allSettled(i);try{if(!e)return;let s=await (0,l.latestHealthChecksCall)(e);s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(([e,l])=>{if(t.includes(e)&&l){let t=l.error_message||void 0;h(s=>{let a=s[e];return{...s,[e]:{status:l.status||a?.status||"unknown",lastCheck:l.checked_at?new Date(l.checked_at).toLocaleString():a?.lastCheck||"None",lastSuccess:"healthy"===l.status&&l.checked_at?new Date(l.checked_at).toLocaleString():a?.lastSuccess||"None",loading:!1,error:t?F(t):a?.error,fullError:t||a?.fullError,successResponse:"healthy"===l.status?l:a?.successResponse}}})}})}catch(e){console.warn("Failed to fetch updated health statuses from database (non-critical):",e)}},P=e=>{j(e),e?g(a):g([])},A=()=>{y(!1),v(null)},L=()=>{w(!1),S(null)};return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eu.Title,{children:"Model Health Status"}),(0,t.jsx)(em.Text,{className:"text-gray-600 mt-1",children:"Run health checks on individual models to verify they are working correctly"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[p.length>0&&(0,t.jsx)(T.Button,{size:"sm",variant:"light",onClick:()=>P(!1),className:"px-3 py-1 text-sm",children:"Clear Selection"}),(0,t.jsx)(T.Button,{size:"sm",variant:"secondary",onClick:M,disabled:Object.values(u).some(e=>e.loading),className:"px-3 py-1 text-sm",children:p.length>0&&p.length{t?g(t=>[...t,e]):(g(t=>t.filter(t=>t!==e)),j(!1))},d=e=>{switch(e){case"healthy":return(0,t.jsx)(k.Badge,{color:"emerald",children:"healthy"});case"unhealthy":return(0,t.jsx)(k.Badge,{color:"red",children:"unhealthy"});case"checking":return(0,t.jsx)(k.Badge,{color:"blue",children:"checking"});case"none":return(0,t.jsx)(k.Badge,{color:"gray",children:"none"});default:return(0,t.jsx)(k.Badge,{color:"gray",children:"unknown"})}},c=(e,t,l)=>{v({modelName:e,cleanedError:t,fullError:l}),y(!0)},m=(e,t)=>{S({modelName:e,response:t}),w(!0)},[{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tK.Checkbox,{checked:f,indeterminate:p.length>0&&!f,onChange:e=>P(e.target.checked),onClick:e=>e.stopPropagation()}),(0,t.jsx)("span",{children:"Model ID"})]}),accessorKey:"model_info.id",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=p.includes(s);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tK.Checkbox,{checked:a,onChange:e=>n(s,e.target.checked),onClick:e=>e.stopPropagation()}),(0,t.jsx)(E.Tooltip,{title:l.model_info.id,children:(0,t.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>i&&i(l.model_info.id),children:l.model_info.id})})]})}},{header:"Model Name",accessorKey:"model_name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=r(l)||l.model_name;return(0,t.jsx)("div",{className:"font-medium text-sm",children:(0,t.jsx)(E.Tooltip,{title:s,children:(0,t.jsx)("div",{className:"truncate max-w-[200px]",children:s})})})}},{header:"Team Alias",accessorKey:"model_info.team_id",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=l.model_info?.team_id;if(!s)return(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"-"});let a=o?.find(e=>e.team_id===s),r=a?.team_alias||s;return(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsx)(E.Tooltip,{title:r,children:(0,t.jsx)("div",{className:"truncate max-w-[150px]",children:r})})})}},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("health_status")||"unknown",a=t.getValue("health_status")||"unknown",r={healthy:0,checking:1,unknown:2,unhealthy:3};return(r[s]??4)-(r[a]??4)},cell:({row:e})=>{let l=e.original,s={status:l.health_status,loading:l.health_loading,error:l.health_error};if(s.loading)return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse"}),(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}),(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:"Checking..."})]});let a=l.model_info?.id??"",i=r(l)||l.model_name,o="healthy"===s.status&&u[a]?.successResponse;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d(s.status),o&&m&&(0,t.jsx)(E.Tooltip,{title:"View response details",placement:"top",children:(0,t.jsx)("button",{onClick:()=>m(i,u[a]?.successResponse),className:"p-1 text-green-600 hover:text-green-800 hover:bg-green-50 rounded cursor-pointer transition-colors",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"h-4 w-4"})})})]})}},{header:"Error Details",accessorKey:"health_error",enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=r(l)||l.model_name,i=u[s];if(!i?.error)return(0,t.jsx)(em.Text,{className:"text-gray-400 text-sm",children:"No errors"});let o=i.error,n=i.fullError||i.error;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"max-w-[200px]",children:(0,t.jsx)(E.Tooltip,{title:o,placement:"top",children:(0,t.jsx)(em.Text,{className:"text-red-600 text-sm truncate",children:o})})}),c&&n!==o&&(0,t.jsx)(E.Tooltip,{title:"View full error details",placement:"top",children:(0,t.jsx)("button",{onClick:()=>c(a,o,n),className:"p-1 text-red-600 hover:text-red-800 hover:bg-red-50 rounded cursor-pointer transition-colors",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"h-4 w-4"})})})]})}},{header:"Last Check",accessorKey:"last_check",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("last_check")||"Never checked",a=t.getValue("last_check")||"Never checked";if("Never checked"===s&&"Never checked"===a)return 0;if("Never checked"===s)return 1;if("Never checked"===a)return -1;if("Check in progress..."===s&&"Check in progress..."===a)return 0;if("Check in progress..."===s)return -1;if("Check in progress..."===a)return 1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:({row:e})=>{let l=e.original;return(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:l.health_loading?"Check in progress...":l.last_check})}},{header:"Last Success",accessorKey:"last_success",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("last_success")||"Never succeeded",a=t.getValue("last_success")||"Never succeeded";if("Never succeeded"===s&&"Never succeeded"===a)return 0;if("Never succeeded"===s)return 1;if("Never succeeded"===a)return -1;if("None"===s&&"None"===a)return 0;if("None"===s)return 1;if("None"===a)return -1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:({row:e})=>{let l=e.original,s=u[l.model_info?.id??""],a=s?.lastSuccess||"None";return(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:a})}},{header:"Actions",id:"actions",cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=l.health_status&&"none"!==l.health_status,r=l.health_loading?"Checking...":a?"Re-run Health Check":"Run Health Check";return(0,t.jsx)(E.Tooltip,{title:r,placement:"top",children:(0,t.jsx)("button",{"data-testid":"run-health-check-btn",className:`p-2 rounded-md transition-colors ${l.health_loading?"text-gray-400 cursor-not-allowed bg-gray-100":"text-indigo-600 hover:text-indigo-700 hover:bg-indigo-50"}`,onClick:()=>{l.health_loading||I(s)},disabled:l.health_loading,children:l.health_loading?(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse"}),(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}):a?(0,t.jsx)(e0.RefreshIcon,{className:"h-4 w-4"}):(0,t.jsx)(tQ.PlayIcon,{className:"h-4 w-4"})})})},enableSorting:!1}]),data:s.data.map(e=>{let t=e.model_info?.id,l=(t?u[t]:null)||{status:"none",lastCheck:"None",loading:!1};return{model_name:e.model_name,model_info:e.model_info,provider:e.provider,litellm_model_name:e.litellm_model_name,health_status:l.status,last_check:l.lastCheck,last_success:l.lastSuccess||"None",health_loading:l.loading,health_error:l.error,health_full_error:l.fullError}}),isLoading:!1})}),(0,t.jsx)(el.Modal,{title:b?`Health Check Error - ${b.modelName}`:"Error Details",open:_,onCancel:A,footer:[(0,t.jsx)(K.Button,{onClick:A,children:"Close"},"close")],width:800,children:b&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Error:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,t.jsx)(em.Text,{className:"text-red-800",children:b.cleanedError})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Full Error Details:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:b.fullError})})]})]})}),(0,t.jsx)(el.Modal,{title:C?`Health Check Response - ${C.modelName}`:"Response Details",open:N,onCancel:L,footer:[(0,t.jsx)(K.Button,{onClick:L,children:"Close"},"close")],width:800,children:C&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Status:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-green-50 border border-green-200 rounded-md",children:(0,t.jsx)(em.Text,{className:"text-green-800",children:"Health check passed successfully"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Response Details:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:JSON.stringify(C.response,null,2)})})]})]})})]})};var tZ=e.i(250980),t0=e.i(797672),t1=e.i(871943),t2=e.i(502547);let t4=({accessToken:e,initialModelGroupAlias:s={},onAliasUpdate:a})=>{let[r,i]=(0,x.useState)([]),[o,n]=(0,x.useState)({aliasName:"",targetModelGroup:""}),[d,c]=(0,x.useState)(null),[m,u]=(0,x.useState)(!0);(0,x.useEffect)(()=>{i(Object.entries(s).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModelGroup:"string"==typeof t?t:t?.model??""})))},[s]);let h=async t=>{if(!e)return console.error("Access token is missing"),!1;try{let s={};return t.forEach(e=>{s[e.aliasName]=e.targetModelGroup}),console.log("Saving model group alias:",s),await (0,l.setCallbacksCall)(e,{router_settings:{model_group_alias:s}}),a&&a(s),!0}catch(e){return console.error("Failed to save model group alias settings:",e),D.default.fromBackend("Failed to save model group alias settings"),!1}},b=async()=>{if(!o.aliasName||!o.targetModelGroup)return void D.default.fromBackend("Please provide both alias name and target model group");if(r.some(e=>e.aliasName===o.aliasName))return void D.default.fromBackend("An alias with this name already exists");let e=[...r,{id:`${Date.now()}-${o.aliasName}`,aliasName:o.aliasName,targetModelGroup:o.targetModelGroup}];await h(e)&&(i(e),n({aliasName:"",targetModelGroup:""}),D.default.success("Alias added successfully"))},v=async()=>{if(!d)return;if(!d.aliasName||!d.targetModelGroup)return void D.default.fromBackend("Please provide both alias name and target model group");if(r.some(e=>e.id!==d.id&&e.aliasName===d.aliasName))return void D.default.fromBackend("An alias with this name already exists");let e=r.map(e=>e.id===d.id?d:e);await h(e)&&(i(e),c(null),D.default.success("Alias updated successfully"))},N=()=>{c(null)},w=async e=>{let t=r.filter(t=>t.id!==e);await h(t)&&(i(t),D.default.success("Alias deleted successfully"))},C=r.reduce((e,t)=>(e[t.aliasName]=t.targetModelGroup,e),{});return(0,t.jsxs)(eL.Card,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>u(!m),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(eu.Title,{className:"mb-0",children:"Model Group Alias Settings"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Create aliases for your model groups to simplify API calls. For example, you can create an alias 'gpt-4o' that points to 'gpt-4o-mini-openai' model group."})]}),(0,t.jsx)("div",{className:"flex items-center",children:m?(0,t.jsx)(t1.ChevronDownIcon,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(t2.ChevronRightIcon,{className:"w-5 h-5 text-gray-500"})})]}),m&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(em.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:o.aliasName,onChange:e=>n({...o,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 Group"}),(0,t.jsx)("input",{type:"text",value:o.targetModelGroup,onChange:e=>n({...o,targetModelGroup:e.target.value}),placeholder:"e.g., gpt-4o-mini-openai",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:b,disabled:!o.aliasName||!o.targetModelGroup,className:`flex items-center px-4 py-2 rounded-md text-sm ${!o.aliasName||!o.targetModelGroup?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(tZ.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(em.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)(p.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(_.TableRow,{children:[(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Target Model Group"}),(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(j.TableBody,{children:[r.map(e=>(0,t.jsx)(_.TableRow,{className:"h-8",children:d&&d.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:d.aliasName,onChange:e=>c({...d,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(y.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:d.targetModelGroup,onChange:e=>c({...d,targetModelGroup:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(y.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:v,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:N,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.TableCell,{className:"py-0.5 text-sm text-gray-900",children:e.aliasName}),(0,t.jsx)(y.TableCell,{className:"py-0.5 text-sm text-gray-500",children:e.targetModelGroup}),(0,t.jsx)(y.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{c({...e})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(t0.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>w(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(S.TrashIcon,{className:"w-3 h-3"})})]})})]})},e.id)),0===r.length&&(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(y.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(eu.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(em.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config.yaml:"}),(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:["router_settings:",(0,t.jsx)("br",{}),"  model_group_alias:",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))]})})]})]})]})};var t5=e.i(530212);let t6=x.forwardRef(function(e,t){return x.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),x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"}))});var t3=e.i(678784),t8=e.i(118366),t7=e.i(500330);let t9=({isVisible:e,onCancel:s,onSuccess:a,modelData:r,accessToken:i,userRole:o})=>{let[n]=et.Form.useForm(),[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)([]),[h,p]=(0,x.useState)([]),[g,f]=(0,x.useState)(!1),[j,_]=(0,x.useState)(!1),[y,b]=(0,x.useState)(null);(0,x.useEffect)(()=>{e&&r&&v()},[e,r]),(0,x.useEffect)(()=>{let t=async()=>{if(i)try{let e=await (0,l.modelAvailableCall)(i,"","",!1,null,!0,!0);u(e.data.map(e=>e.id))}catch(e){console.error("Error fetching model access groups:",e)}},s=async()=>{if(i)try{let e=await (0,ts.fetchAvailableModels)(i);p(e)}catch(e){console.error("Error fetching model info:",e)}};e&&(t(),s())},[e,i]);let v=()=>{try{let e=null;r.litellm_params?.auto_router_config&&(e="string"==typeof r.litellm_params.auto_router_config?JSON.parse(r.litellm_params.auto_router_config):r.litellm_params.auto_router_config),b(e),n.setFieldsValue({auto_router_name:r.model_name,auto_router_default_model:r.litellm_params?.auto_router_default_model||"",auto_router_embedding_model:r.litellm_params?.auto_router_embedding_model||"",model_access_group:r.model_info?.access_groups||[]});let t=new Set(h.map(e=>e.model_group));f(!t.has(r.litellm_params?.auto_router_default_model)),_(!t.has(r.litellm_params?.auto_router_embedding_model))}catch(e){console.error("Error parsing auto router config:",e),D.default.fromBackend("Error loading auto router configuration")}},N=async()=>{try{c(!0);let e=await n.validateFields(),t={...r.litellm_params,auto_router_config:JSON.stringify(y),auto_router_default_model:e.auto_router_default_model,auto_router_embedding_model:e.auto_router_embedding_model||void 0},o={...r.model_info,access_groups:e.model_access_group||[]},d={model_name:e.auto_router_name,litellm_params:t,model_info:o};await (0,l.modelPatchUpdateCall)(i,d,r.model_info.id);let m={...r,model_name:e.auto_router_name,litellm_params:t,model_info:o};D.default.success("Auto router configuration updated successfully"),a(m),s()}catch(e){console.error("Error updating auto router:",e),D.default.fromBackend("Failed to update auto router configuration")}finally{c(!1)}},w=h.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsx)(el.Modal,{title:"Edit Auto Router Configuration",open:e,onCancel:s,footer:[(0,t.jsx)(K.Button,{onClick:s,children:"Cancel"},"cancel"),(0,t.jsx)(K.Button,{loading:d,onClick:N,children:"Save Changes"},"submit")],width:1e3,destroyOnHidden:!0,children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(em.Text,{className:"text-gray-600",children:"Edit the auto router configuration including routing logic, default models, and access settings."}),(0,t.jsxs)(et.Form,{form:n,layout:"vertical",className:"space-y-4",children:[(0,t.jsx)(et.Form.Item,{label:"Auto Router Name",name:"auto_router_name",rules:[{required:!0,message:"Auto router name is required"}],children:(0,t.jsx)(eR.TextInput,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(tc,{modelInfo:h,value:y,onChange:e=>{b(e)}})}),(0,t.jsx)(et.Form.Item,{label:"Default Model",name:"auto_router_default_model",rules:[{required:!0,message:"Default model is required"}],children:(0,t.jsx)(W.Select,{placeholder:"Select a default model",onChange:e=>{f("custom"===e)},options:[...w,{value:"custom",label:"Enter custom model name"}],showSearch:!0})}),(0,t.jsx)(et.Form.Item,{label:"Embedding Model",name:"auto_router_embedding_model",children:(0,t.jsx)(W.Select,{placeholder:"Select an embedding model (optional)",onChange:e=>{_("custom"===e)},options:[...w,{value:"custom",label:"Enter custom model name"}],showSearch:!0,allowClear:!0})}),"Admin"===o&&(0,t.jsx)(et.Form.Item,{label:"Model Access Groups",name:"model_access_group",tooltip:"Control who can access this auto router",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:m.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})]})]})})},{Title:le,Link:lt}=L.Typography,ll=({isVisible:e,onCancel:l,onAddCredential:s,existingCredential:a,setIsCredentialModalOpen:r})=>{let[i]=et.Form.useForm();return console.log(`existingCredential in add credentials tab: ${JSON.stringify(a)}`),(0,t.jsx)(el.Modal,{title:"Reuse Credentials",open:e,onCancel:()=>{l(),i.resetFields()},footer:null,width:600,children:(0,t.jsxs)(et.Form,{form:i,onFinish:e=>{s(e),i.resetFields(),r(!1)},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:a?.credential_name,children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter a friendly name for these credentials"})}),Object.entries(a?.credential_values||{}).map(([e,l])=>(0,t.jsx)(et.Form.Item,{label:e,name:e,initialValue:l,children:(0,t.jsx)(eR.TextInput,{placeholder:`Enter ${e}`,disabled:!0})},e)),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(lt,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Button,{onClick:()=>{l(),i.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,t.jsx)(K.Button,{htmlType:"submit",children:"Reuse Credentials"})]})]})]})})};function ls({modelId:e,onClose:s,accessToken:a,userID:r,userRole:i,onModelUpdate:o,modelAccessGroups:c}){let m,[u]=et.Form.useForm(),[h,p]=(0,x.useState)(null),[g,f]=(0,x.useState)(!1),[j,_]=(0,x.useState)(!1),[y,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)(!1),[C,k]=(0,x.useState)(!1),[F,I]=(0,x.useState)(!1),[M,P]=(0,x.useState)(null),[A,L]=(0,x.useState)(!1),[R,O]=(0,x.useState)({}),[B,z]=(0,x.useState)(!1),[H,G]=(0,x.useState)([]),[J,Q]=(0,x.useState)({}),[Y,X]=(0,x.useState)([]),{data:Z,isLoading:ee}=(0,d.useModelsInfo)(1,50,void 0,e),{data:es}=(0,n.useModelCostMap)(),{data:ea}=(0,d.useModelHub)(),er=e=>null!=es&&"object"==typeof es&&e in es?es[e].litellm_provider:"openai",eo=(0,x.useMemo)(()=>Z?.data&&0!==Z.data.length&&ei(Z,er).data[0]||null,[Z,es]),en=("Admin"===i||eo?.model_info?.created_by===r)&&eo?.model_info?.db_model,ed="Admin"===i,ec=eo?.litellm_params?.auto_router_config!=null,eh=eo?.litellm_params?.litellm_credential_name!=null&&eo?.litellm_params?.litellm_credential_name!=void 0;(0,x.useEffect)(()=>{if(eo&&!h){let e=eo;e.litellm_model_name||(e={...e,litellm_model_name:e?.litellm_params?.litellm_model_name??e?.litellm_params?.model??e?.model_info?.key??null}),p(e),e?.litellm_params?.cache_control_injection_points&&L(!0)}},[eo,h]),(0,x.useEffect)(()=>{let t=async()=>{if(!a||eo)return;let t=(await (0,l.modelInfoV1Call)(a,e)).data[0];t&&!t.litellm_model_name&&(t={...t,litellm_model_name:t?.litellm_params?.litellm_model_name??t?.litellm_params?.model??t?.model_info?.key??null}),p(t),t?.litellm_params?.cache_control_injection_points&&L(!0)},s=async()=>{if(a)try{let e=(await (0,l.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);G(e)}catch(e){console.error("Failed to fetch guardrails:",e)}},r=async()=>{if(a)try{let e=await (0,l.tagListCall)(a);Q(e)}catch(e){console.error("Failed to fetch tags:",e)}},i=async()=>{if(a)try{let e=await (0,l.credentialListCall)(a);X(e.credentials||[])}catch(e){console.error("Failed to fetch credentials:",e)}};(async()=>{if(!a||eh)return;let t=await (0,l.credentialGetCall)(a,null,e);P({credential_name:t.credential_name,credential_values:t.credential_values,credential_info:t.credential_info})})(),t(),s(),r(),i()},[a,e]);let ex=async t=>{if(!a)return;let s={credential_name:t.credential_name,model_id:e,credential_info:{custom_llm_provider:h.litellm_params?.custom_llm_provider}};D.default.info("Storing credential.."),await (0,l.credentialCreateCall)(a,s),D.default.success("Credential stored successfully")},ep=async t=>{try{let s;if(!a)return;k(!0);let r={};try{r=t.litellm_extra_params?JSON.parse(t.litellm_extra_params):{},delete r.litellm_credential_name}catch(e){D.default.fromBackend("Invalid JSON in LiteLLM Params"),k(!1);return}let i={...t.litellm_params,...r,model:t.litellm_model_name,api_base:t.api_base,custom_llm_provider:t.custom_llm_provider,organization:t.organization,tpm:t.tpm,rpm:t.rpm,max_retries:t.max_retries,timeout:t.timeout,stream_timeout:t.stream_timeout,tags:t.tags};u.isFieldTouched("input_cost")&&void 0!==t.input_cost&&null!==t.input_cost&&(i.input_cost_per_token=Number(t.input_cost)/1e6),u.isFieldTouched("output_cost")&&void 0!==t.output_cost&&null!==t.output_cost&&(i.output_cost_per_token=Number(t.output_cost)/1e6),t.litellm_credential_name?i.litellm_credential_name=t.litellm_credential_name:delete i.litellm_credential_name,t.guardrails&&(i.guardrails=t.guardrails),t.vector_store_ids?.length>0?i.vector_store_ids=t.vector_store_ids:void 0!==t.vector_store_ids?i.vector_store_ids=[]:delete i.vector_store_ids,t.cache_control&&t.cache_control_injection_points?.length>0?i.cache_control_injection_points=t.cache_control_injection_points:delete i.cache_control_injection_points;try{s=t.model_info?JSON.parse(t.model_info):eo.model_info,t.model_access_group&&(s={...s,access_groups:t.model_access_group}),void 0!==t.health_check_model&&(s={...s,health_check_model:t.health_check_model})}catch(e){D.default.fromBackend("Invalid JSON in Model Info");return}let n={model_name:t.model_name,litellm_params:i,model_info:s};await (0,l.modelPatchUpdateCall)(a,n,e);let d={...h,model_name:t.model_name,litellm_model_name:t.litellm_model_name,litellm_params:i,model_info:s};p(d),o&&o(d),D.default.success("Model settings updated successfully"),N(!1),I(!1)}catch(e){console.error("Error updating model:",e),D.default.fromBackend("Failed to update model settings")}finally{k(!1)}};if(ee)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsx)(em.Text,{children:"Loading..."})]});if(!eo)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsx)(em.Text,{children:"Model not found"})]});let eg=async()=>{if(a)try{D.default.info("Testing connection...");let e=await (0,l.testConnectionRequest)(a,{custom_llm_provider:h.litellm_params.custom_llm_provider,litellm_credential_name:h.litellm_params.litellm_credential_name,model:h.litellm_model_name},{mode:h.model_info?.mode},h.model_info?.mode);if("success"===e.status)D.default.success("Connection test successful!");else throw Error(e?.result?.error||e?.message||"Unknown error")}catch(e){e instanceof Error?D.default.error("Error testing connection: "+(0,tE.truncateString)(e.message,100)):D.default.error("Error testing connection: "+String(e))}},ef=async()=>{try{if(_(!0),!a)return;await (0,l.modelDeleteCall)(a,e),D.default.success("Model deleted successfully"),o&&o({deleted:!0,model_info:{id:e}}),s()}catch(e){console.error("Error deleting the model:",e),D.default.fromBackend("Failed to delete model")}finally{_(!1),f(!1)}},ej=async(e,t)=>{await (0,t7.copyToClipboard)(e)&&(O(e=>({...e,[t]:!0})),setTimeout(()=>{O(e=>({...e,[t]:!1}))},2e3))},e_=eo.litellm_model_name.includes("*");return(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)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsxs)(eu.Title,{children:["Public Model Name: ",q(eo)]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(em.Text,{className:"text-gray-500 font-mono",children:eo.model_info.id}),(0,t.jsx)(K.Button,{type:"text",size:"small",icon:R["model-id"]?(0,t.jsx)(t3.CheckIcon,{size:12}):(0,t.jsx)(t8.CopyIcon,{size:12}),onClick:()=>ej(eo.model_info.id,"model-id"),className:`left-2 z-10 transition-all duration-200 ${R["model-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(T.Button,{variant:"secondary",icon:e0.RefreshIcon,onClick:eg,className:"flex items-center gap-2","data-testid":"test-connection-button",children:"Test Connection"}),(0,t.jsx)(T.Button,{icon:t6,variant:"secondary",onClick:()=>b(!0),className:"flex items-center",disabled:!ed,"data-testid":"reuse-credentials-button",children:"Re-use Credentials"}),(0,t.jsx)(T.Button,{icon:S.TrashIcon,variant:"secondary",onClick:()=>f(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-700",disabled:!en,"data-testid":"delete-model-button",children:"Delete Model"})]})]}),(0,t.jsxs)(e4.TabGroup,{children:[(0,t.jsxs)(e5.TabList,{className:"mb-6",children:[(0,t.jsx)(e2.Tab,{children:"Overview"}),(0,t.jsx)(e2.Tab,{children:"Raw JSON"})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsxs)($.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6 mb-6",children:[(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Provider"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[eo.provider&&(0,t.jsx)("img",{src:(0,eM.getProviderLogoAndName)(eo.provider).logo,alt:`${eo.provider} logo`,className:"w-4 h-4",onError:e=>{let t=e.currentTarget,l=t.parentElement;if(l&&l.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=eo.provider?.charAt(0)||"-",l.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}),(0,t.jsx)(eu.Title,{children:eo.provider||"Not Set"})]})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"LiteLLM Model"}),(0,t.jsx)("div",{className:"mt-2 overflow-hidden",children:(0,t.jsx)(E.Tooltip,{title:eo.litellm_model_name||"Not Set",children:(0,t.jsx)("div",{className:"break-all text-sm font-medium leading-relaxed cursor-pointer",children:eo.litellm_model_name||"Not Set"})})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Pricing"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(em.Text,{children:["Input: $",eo.input_cost,"/1M tokens"]}),(0,t.jsxs)(em.Text,{children:["Output: $",eo.output_cost,"/1M tokens"]})]})]})]}),(0,t.jsxs)("div",{className:"mb-6 text-sm text-gray-500 flex items-center gap-x-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-2",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:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Created At"," ",eo.model_info.created_at?new Date(eo.model_info.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not Set"]}),(0,t.jsxs)("div",{className:"flex items-center gap-x-2",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:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),"Created By ",eo.model_info.created_by||"Not Set"]})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eu.Title,{children:"Model Settings"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[ec&&en&&!F&&(0,t.jsx)(T.Button,{onClick:()=>z(!0),className:"flex items-center",children:"Edit Auto Router"}),en?!F&&(0,t.jsx)(T.Button,{onClick:()=>I(!0),className:"flex items-center",children:"Edit Settings"}):(0,t.jsx)(E.Tooltip,{title:"Only DB models can be edited. You must be an admin or the creator of the model to edit it.",children:(0,t.jsx)(w.InfoCircleOutlined,{})})]})]}),h?(0,t.jsx)(et.Form,{form:u,onFinish:ep,initialValues:{model_name:h.model_name,litellm_model_name:h.litellm_model_name,api_base:h.litellm_params.api_base,custom_llm_provider:h.litellm_params.custom_llm_provider,organization:h.litellm_params.organization,tpm:h.litellm_params.tpm,rpm:h.litellm_params.rpm,max_retries:h.litellm_params.max_retries,timeout:h.litellm_params.timeout,stream_timeout:h.litellm_params.stream_timeout,input_cost:h.litellm_params.input_cost_per_token?1e6*h.litellm_params.input_cost_per_token:h.model_info?.input_cost_per_token*1e6||null,output_cost:h.litellm_params?.output_cost_per_token?1e6*h.litellm_params.output_cost_per_token:h.model_info?.output_cost_per_token*1e6||null,cache_control:!!h.litellm_params?.cache_control_injection_points,cache_control_injection_points:h.litellm_params?.cache_control_injection_points||[],model_access_group:Array.isArray(h.model_info?.access_groups)?h.model_info.access_groups:[],guardrails:Array.isArray(h.litellm_params?.guardrails)?h.litellm_params.guardrails:[],vector_store_ids:Array.isArray(h.litellm_params?.vector_store_ids)&&h.litellm_params.vector_store_ids.length>0?h.litellm_params.vector_store_ids:void 0,tags:Array.isArray(h.litellm_params?.tags)?h.litellm_params.tags:[],health_check_model:e_?h.model_info?.health_check_model:null,litellm_credential_name:h.litellm_params?.litellm_credential_name||"",litellm_extra_params:JSON.stringify(Object.fromEntries(Object.entries(h.litellm_params||{}).filter(([e])=>"litellm_credential_name"!==e)),null,2)},layout:"vertical",onValuesChange:()=>N(!0),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Name"}),F?(0,t.jsx)(et.Form.Item,{name:"model_name",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter model name"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"LiteLLM Model Name"}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_model_name",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter LiteLLM model name"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_model_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Input Cost (per 1M tokens)"}),F?(0,t.jsx)(et.Form.Item,{name:"input_cost",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter input cost"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h?.litellm_params?.input_cost_per_token?(h.litellm_params?.input_cost_per_token*1e6).toFixed(4):h?.model_info?.input_cost_per_token?(1e6*h.model_info.input_cost_per_token).toFixed(4):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Output Cost (per 1M tokens)"}),F?(0,t.jsx)(et.Form.Item,{name:"output_cost",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter output cost"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h?.litellm_params?.output_cost_per_token?(1e6*h.litellm_params.output_cost_per_token).toFixed(4):h?.model_info?.output_cost_per_token?(1e6*h.model_info.output_cost_per_token).toFixed(4):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"API Base"}),F?(0,t.jsx)(et.Form.Item,{name:"api_base",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter API base"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.api_base||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Custom LLM Provider"}),F?(0,t.jsx)(et.Form.Item,{name:"custom_llm_provider",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter custom LLM provider"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.custom_llm_provider||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Organization"}),F?(0,t.jsx)(et.Form.Item,{name:"organization",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter organization"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.organization||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"TPM (Tokens per Minute)"}),F?(0,t.jsx)(et.Form.Item,{name:"tpm",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter TPM"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.tpm||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"RPM (Requests per Minute)"}),F?(0,t.jsx)(et.Form.Item,{name:"rpm",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter RPM"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.rpm||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Max Retries"}),F?(0,t.jsx)(et.Form.Item,{name:"max_retries",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter max retries"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.max_retries||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Timeout (seconds)"}),F?(0,t.jsx)(et.Form.Item,{name:"timeout",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter timeout"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.timeout||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Stream Timeout (seconds)"}),F?(0,t.jsx)(et.Form.Item,{name:"stream_timeout",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter stream timeout"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.stream_timeout||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Access Groups"}),F?(0,t.jsx)(et.Form.Item,{name:"model_access_group",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:c?.map(e=>({value:e,label:e}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_info?.access_groups?Array.isArray(h.model_info.access_groups)?h.model_info.access_groups.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.model_info.access_groups.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No groups assigned":h.model_info.access_groups:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["Guardrails",(0,t.jsx)(E.Tooltip,{title:"Apply safety guardrails to this model 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)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"guardrails",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing guardrails or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:H.map(e=>({value:e,label:e}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.guardrails?Array.isArray(h.litellm_params.guardrails)?h.litellm_params.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.guardrails.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:e},l))}):"No guardrails assigned":h.litellm_params.guardrails:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["Attached Knowledge Bases (RAG)",(0,t.jsx)(E.Tooltip,{title:"Vector stores used for RAG. Every request to this model will automatically retrieve context from these knowledge bases.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/knowledgebase",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"vector_store_ids",className:"mb-0",children:(0,t.jsx)(tA.default,{onChange:()=>{},accessToken:a||"",placeholder:"Select knowledge bases (optional)"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.vector_store_ids?Array.isArray(h.litellm_params.vector_store_ids)?h.litellm_params.vector_store_ids.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.vector_store_ids.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No knowledge bases attached":String(h.litellm_params.vector_store_ids):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Tags"}),F?(0,t.jsx)(et.Form.Item,{name:"tags",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing tags or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:Object.values(J).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.tags?Array.isArray(h.litellm_params.tags)?h.litellm_params.tags.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.tags.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:e},l))}):"No tags assigned":h.litellm_params.tags:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Existing Credentials"}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_credential_name",className:"mb-0",children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{value:"",label:"None"},...Y.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.litellm_credential_name||"Manual"})]}),e_&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Health Check Model"}),F?(0,t.jsx)(et.Form.Item,{name:"health_check_model",className:"mb-0",children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select existing health check model",optionFilterProp:"children",allowClear:!0,options:(m=eo.litellm_model_name.split("/")[0],ea?.data?.filter(e=>e.providers?.includes(m)&&e.model_group!==eo.litellm_model_name).map(e=>({value:e.model_group,label:e.model_group}))||[])})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_info?.health_check_model||"Not Set"})]}),F?(0,t.jsx)(tP,{form:u,showCacheControl:A,onCacheControlChange:e=>L(e)}):(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Cache Control"}),(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.cache_control_injection_points?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"Enabled"}),(0,t.jsx)("div",{className:"mt-2",children:h.litellm_params.cache_control_injection_points.map((e,l)=>(0,t.jsxs)("div",{className:"text-sm text-gray-600 mb-1",children:["Location: ",e.location,",",e.role&&(0,t.jsxs)("span",{children:[" Role: ",e.role]}),void 0!==e.index&&(0,t.jsxs)("span",{children:[" Index: ",e.index]})]},l))})]}):"Disabled"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Info"}),F?(0,t.jsx)(et.Form.Item,{name:"model_info",className:"mb-0",children:(0,t.jsx)(eV.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}',defaultValue:JSON.stringify(eo.model_info,null,2)})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(h.model_info,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["LiteLLM Params",(0,t.jsx)(E.Tooltip,{title:"Optional litellm params used for making a litellm.completion() call. Some params are automatically added by LiteLLM.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_extra_params",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(eV.Input.TextArea,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(h.litellm_params,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:eo.model_info.team_id||"Not Set"})]})]}),F&&(0,t.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,t.jsx)(T.Button,{variant:"secondary",onClick:()=>{u.resetFields(),N(!1),I(!1)},disabled:C,children:"Cancel"}),(0,t.jsx)(T.Button,{variant:"primary",onClick:()=>u.submit(),loading:C,children:"Save Changes"})]})]})}):(0,t.jsx)(em.Text,{children:"Loading..."})]})]}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(eL.Card,{children:(0,t.jsx)("pre",{className:"bg-gray-100 p-4 rounded text-xs overflow-auto",children:JSON.stringify(eo,null,2)})})})]})]}),(0,t.jsx)(V.default,{isOpen:g,title:"Delete Model",alertMessage:"This action cannot be undone.",message:"Are you sure you want to delete this model?",resourceInformationTitle:"Model Information",resourceInformation:[{label:"Model Name",value:eo?.model_name||"Not Set"},{label:"LiteLLM Model Name",value:eo?.litellm_model_name||"Not Set"},{label:"Provider",value:eo?.provider||"Not Set"},{label:"Created By",value:eo?.model_info?.created_by||"Not Set"}],onCancel:()=>f(!1),onOk:ef,confirmLoading:j}),y&&!eh?(0,t.jsx)(ll,{isVisible:y,onCancel:()=>b(!1),onAddCredential:ex,existingCredential:M,setIsCredentialModalOpen:b}):(0,t.jsx)(el.Modal,{open:y,onCancel:()=>b(!1),title:"Using Existing Credential",children:(0,t.jsx)(em.Text,{children:eo.litellm_params.litellm_credential_name})}),(0,t.jsx)(t9,{isVisible:B,onCancel:()=>z(!1),onSuccess:e=>{p(e),o&&o(e)},modelData:h||eo,accessToken:a||"",userRole:i||""})]})}var la=e.i(37091),lr=e.i(218129);let li=({value:e={},onChange:l})=>{let[s,a]=(0,x.useState)(Object.entries(e)),r=(e,t,r)=>{let i=[...s];i[e]=[t,r],a(i),l?.(Object.fromEntries(i))};return(0,t.jsxs)("div",{children:[s.map(([e,i],o)=>(0,t.jsxs)(A.Space,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,t.jsx)(eR.TextInput,{placeholder:"Header Name",value:e,onChange:e=>r(o,e.target.value,i)}),(0,t.jsx)(eR.TextInput,{placeholder:"Header Value",value:i,onChange:t=>r(o,e,t.target.value)}),(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(tF.MinusCircleOutlined,{onClick:()=>{let e;a(e=s.filter((e,t)=>t!==o)),l?.(Object.fromEntries(e))},style:{cursor:"pointer"}})})]},o)),(0,t.jsx)(K.Button,{type:"dashed",onClick:()=>{a([...s,["",""]])},icon:(0,t.jsx)(tr.PlusOutlined,{}),children:"Add Header"})]})},lo=({value:e={},onChange:l})=>{let[s,a]=(0,x.useState)(Object.entries(e)),r=(e,t,r)=>{let i=[...s];i[e]=[t,r],a(i),l?.(Object.fromEntries(i))};return(0,t.jsxs)("div",{children:[s.map(([e,i],o)=>(0,t.jsxs)(A.Space,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,t.jsx)(eR.TextInput,{placeholder:"Parameter Name (e.g., version)",value:e,onChange:e=>r(o,e.target.value,i)}),(0,t.jsx)(eR.TextInput,{placeholder:"Parameter Value (e.g., v1)",value:i,onChange:t=>r(o,e,t.target.value)}),(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(tF.MinusCircleOutlined,{onClick:()=>{let e;a(e=s.filter((e,t)=>t!==o)),l?.(Object.fromEntries(e))},style:{cursor:"pointer"}})})]},o)),(0,t.jsx)(K.Button,{type:"dashed",onClick:()=>{a([...s,["",""]])},icon:(0,t.jsx)(tr.PlusOutlined,{}),children:"Add Query Parameter"})]})};var ln=e.i(240647);let{Title:ld,Text:lc}=L.Typography,lm=({pathValue:e,targetValue:s,includeSubpath:a})=>{let r=(0,l.getProxyBaseUrl)();return e&&s?(0,t.jsxs)(ej.Card,{className:"p-5",children:[(0,t.jsx)(ld,{level:5,className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Preview"}),(0,t.jsx)(lc,{type:"secondary",className:"text-gray-600 mb-5",style:{display:"block"},children:"How your requests will be routed"}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"Basic routing:"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint"}),(0,t.jsx)("code",{className:"font-mono text-sm text-gray-900",children:e?`${r}${e}`:""})]}),(0,t.jsx)("div",{className:"text-gray-400",children:(0,t.jsx)(ln.RightOutlined,{className:"text-lg"})}),(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,t.jsx)("code",{className:"font-mono text-sm text-gray-900",children:s})]})]})]}),a&&(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"With subpaths:"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint + subpath"}),(0,t.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[e&&`${r}${e}`,(0,t.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]}),(0,t.jsx)("div",{className:"text-gray-400",children:(0,t.jsx)(ln.RightOutlined,{className:"text-lg"})}),(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,t.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[s,(0,t.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]})]}),(0,t.jsxs)("div",{className:"mt-3 text-sm text-gray-600",children:["Any path after ",e," will be appended to the target URL"]})]})}),!a&&(0,t.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-md border border-blue-200",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)(w.InfoCircleOutlined,{className:"text-blue-500 mt-0.5 mr-2 flex-shrink-0"}),(0,t.jsxs)("div",{className:"text-sm text-blue-700",children:[(0,t.jsx)("span",{className:"font-medium",children:"Not seeing the routing you wanted?"})," Try enabling - Include Subpaths - above - this allows subroutes like"," ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded font-mono text-xs",children:"/api/v1/models"})," to be forwarded automatically."]})]})})]})]}):null},lu=({premiumUser:e,authEnabled:l,onAuthChange:s})=>(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Security"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-4",children:"When enabled, requests to this endpoint will require a valid LiteLLM Virtual Key"}),e?(0,t.jsx)(et.Form.Item,{name:"auth",valuePropName:"checked",className:"mb-0",children:(0,t.jsx)(es.Switch,{checked:l,onChange:e=>{s(e)}})}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-3",children:[(0,t.jsx)(es.Switch,{disabled:!0,checked:!1,style:{outline:"2px solid #d1d5db",outlineOffset:"2px"}}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-400",children:"Authentication (Premium)"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(em.Text,{className:"text-sm text-yellow-800",children:["Setting authentication for pass-through endpoints 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"}),"."]})})]})]});var lh=e.i(891547);let lx=({accessToken:e,value:l={},onChange:s,disabled:a=!1})=>{let[r,i]=(0,x.useState)(Object.keys(l)),[o,n]=(0,x.useState)(l);(0,x.useEffect)(()=>{n(l),i(Object.keys(l))},[l]);let d=(e,t,l)=>{let a=o[e]||{},r={...o,[e]:{...a,[t]:l.length>0?l:void 0}};r[e]?.request_fields||r[e]?.response_fields||(r[e]=null),n(r),s&&s(r)};return(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Guardrails"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Configure guardrails to enforce policies on requests and responses. Guardrails are opt-in for passthrough endpoints."}),(0,t.jsx)(tN.Alert,{message:(0,t.jsxs)("span",{children:["Field-Level Targeting"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through_guardrails#field-level-targeting",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"(Learn More)"})]}),description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{children:"Optionally specify which fields to check. If left empty, the entire request/response is sent to the guardrail."}),(0,t.jsxs)("div",{className:"text-xs space-y-1 mt-2",children:[(0,t.jsx)("div",{className:"font-medium",children:"Common Examples:"}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"query"})," - Single field"]}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"documents[*].text"})," - All text in documents array"]}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"messages[*].content"})," - All message contents"]})]})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Select Guardrails",(0,t.jsx)(E.Tooltip,{title:"Choose which guardrails should run on this endpoint. Org/team/key level guardrails will also be included.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),children:(0,t.jsx)(lh.default,{accessToken:e,value:r,onChange:e=>{i(e);let t={};e.forEach(e=>{t[e]=o[e]||null}),n(t),s&&s(t)},disabled:a})}),r.length>0&&(0,t.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Field Targeting (Optional)"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"💡 Tip: Leave empty to check entire payload"})]}),r.map(e=>(0,t.jsxs)(eL.Card,{className:"p-4 bg-gray-50",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900 mb-3",children:e}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Request Fields (pre_call)",(0,t.jsx)(E.Tooltip,{title:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Specify which request fields to check"}),(0,t.jsxs)("div",{className:"text-xs space-y-1",children:[(0,t.jsx)("div",{children:"Examples:"}),(0,t.jsx)("div",{children:"• query"}),(0,t.jsx)("div",{children:"• documents[*].text"}),(0,t.jsx)("div",{children:"• messages[*].content"})]})]}),children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.request_fields||[];d(e,"request_fields",[...t,"query"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ query"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.request_fields||[];d(e,"request_fields",[...t,"documents[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ documents[*]"})]})]}),(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., query, documents[*].text)",value:o[e]?.request_fields||[],onChange:t=>d(e,"request_fields",t),disabled:a,tokenSeparators:[","]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Response Fields (post_call)",(0,t.jsx)(E.Tooltip,{title:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Specify which response fields to check"}),(0,t.jsxs)("div",{className:"text-xs space-y-1",children:[(0,t.jsx)("div",{children:"Examples:"}),(0,t.jsx)("div",{children:"• results[*].text"}),(0,t.jsx)("div",{children:"• choices[*].message.content"})]})]}),children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)("div",{className:"flex gap-1",children:(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.response_fields||[];d(e,"response_fields",[...t,"results[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ results[*]"})})]}),(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., results[*].text)",value:o[e]?.response_fields||[],onChange:t=>d(e,"response_fields",t),disabled:a,tokenSeparators:[","]})]})]})]},e))]})]})},{Option:lp}=W.Select,lg=["GET","POST","PUT","DELETE","PATCH"],lf=({accessToken:e,setPassThroughItems:s,passThroughItems:a,premiumUser:r=!1})=>{let[i]=et.Form.useForm(),[o,n]=(0,x.useState)(!1),[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)(""),[h,p]=(0,x.useState)(""),[g,f]=(0,x.useState)(""),[j,_]=(0,x.useState)(!0),[y,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)([]),[C,S]=(0,x.useState)({}),k=()=>{i.resetFields(),p(""),f(""),_(!0),N([]),S({}),n(!1)},F=async t=>{console.log("addPassThrough called with:",t),c(!0);try{!r&&"auth"in t&&delete t.auth,C&&Object.keys(C).length>0&&(t.guardrails=C),v&&v.length>0&&(t.methods=v),console.log(`formValues: ${JSON.stringify(t)}`);let o=(await (0,l.createPassThroughEndpoint)(e,t)).endpoints[0],d=[...a,o];s(d),D.default.success("Pass-through endpoint created successfully"),i.resetFields(),p(""),f(""),_(!0),N([]),S({}),n(!1)}catch(e){D.default.fromBackend("Error creating pass-through endpoint: "+e)}finally{c(!1)}};return(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Button,{className:"mx-auto mb-4 mt-4",onClick:()=>n(!0),children:"+ Add Pass-Through Endpoint"}),(0,t.jsx)(el.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)(lr.ApiOutlined,{className:"text-xl text-blue-500"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Pass-Through Endpoint"})]}),open:o,width:1e3,onCancel:k,footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(tN.Alert,{message:"What is a Pass-Through Endpoint?",description:"Route requests from your LiteLLM proxy to any external API. Perfect for custom models, image generation APIs, or any service you want to proxy through LiteLLM.",type:"info",showIcon:!0,className:"mb-6"}),(0,t.jsxs)(et.Form,{form:i,onFinish:F,layout:"vertical",className:"space-y-6",initialValues:{include_subpath:!0,path:h,target:g},children:[(0,t.jsxs)(eL.Card,{className:"p-5",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Configuration"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-5",children:"Configure how requests to your domain will be forwarded to the target API"}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsx)(et.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Path Prefix"}),name:"path",rules:[{required:!0,message:"Path is required",pattern:/^\//}],extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example: /bria, /adobe-photoshop, /elasticsearch"}),className:"mb-4",children:(0,t.jsx)("div",{className:"flex items-center",children:(0,t.jsx)(eR.TextInput,{placeholder:"bria",value:h,onChange:e=>{var t;let l;return l=t=e.target.value,void(t&&!t.startsWith("/")&&(l="/"+t),p(l),i.setFieldsValue({path:l}))},className:"flex-1"})})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Target URL"}),name:"target",rules:[{required:!0,message:"Target URL is required"},{type:"url",message:"Please enter a valid URL"}],extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example:https://engine.prod.bria-api.com"}),className:"mb-4",children:(0,t.jsx)(eR.TextInput,{placeholder:"https://engine.prod.bria-api.com",value:g,onChange:e=>{f(e.target.value),i.setFieldsValue({target:e.target.value})}})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["HTTP Methods (Optional)",(0,t.jsx)(E.Tooltip,{title:"Select specific HTTP methods. Leave empty to support all methods (GET, POST, PUT, DELETE, PATCH). Useful when the same path needs different targets for different methods.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"methods",extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:0===v.length?"All HTTP methods supported (default)":`Only ${v.join(", ")} requests will be routed to this endpoint`}),className:"mb-4",children:(0,t.jsx)(W.Select,{mode:"multiple",placeholder:"Select methods (leave empty for all)",value:v,onChange:N,allowClear:!0,style:{width:"100%"},children:lg.map(e=>(0,t.jsx)(lp,{value:e,children:e},e))})}),(0,t.jsxs)("div",{className:"flex items-center justify-between py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Include Subpaths"}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Forward all subpaths to the target API (recommended for REST APIs)"})]}),(0,t.jsx)(et.Form.Item,{name:"include_subpath",valuePropName:"checked",className:"mb-0",children:(0,t.jsx)(tv.Switch,{checked:j,onChange:_})})]})]})]}),(0,t.jsx)(lm,{pathValue:h,targetValue:g,includeSubpath:j}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Headers"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Add headers that will be sent with every request to the target API"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Headers",(0,t.jsx)(E.Tooltip,{title:"Authentication and other headers to forward with requests",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"headers",rules:[{required:!0,message:"Please configure the headers"}],extra:(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Add authentication tokens and other required headers"}),(0,t.jsx)("div",{children:"Common examples: auth_token, Authorization, x-api-key"})]}),children:(0,t.jsx)(li,{})})]}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Default Query Parameters"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Add query parameters that will be automatically sent with every request to the target API"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Default Query Parameters (Optional)",(0,t.jsx)(E.Tooltip,{title:"Query parameters that will be added to all requests. Clients can override these by providing their own values.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"default_query_params",extra:(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Parameters are sent with all GET, POST, PUT, PATCH requests"}),(0,t.jsx)("div",{children:"Client parameters override defaults. Examples: version=v1, format=json, key=default"})]}),children:(0,t.jsx)(lo,{})})]}),(0,t.jsx)(lu,{premiumUser:r,authEnabled:y,onAuthChange:e=>{b(e),i.setFieldsValue({auth:e})}}),(0,t.jsx)(lx,{accessToken:e,value:C,onChange:S}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Billing"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Optional cost tracking for this endpoint"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Cost Per Request (USD)",(0,t.jsx)(E.Tooltip,{title:"Optional: Track costs for requests to this endpoint",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:"cost_per_request",extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"The cost charged for each request through this endpoint"}),children:(0,t.jsx)(tI.default,{min:0,step:.001,precision:4,placeholder:"2.0000",size:"large"})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,t.jsx)(T.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,t.jsx)(T.Button,{variant:"primary",loading:d,onClick:()=>{console.log("Submit button clicked"),i.submit()},children:d?"Creating...":"Add Pass-Through Endpoint"})]})]})]})})]})};var lj=e.i(286536),l_=e.i(77705);let ly=["GET","POST","PUT","DELETE","PATCH"],{Option:lb}=W.Select,lv=({value:e})=>{let[l,s]=(0,x.useState)(!1),a=JSON.stringify(e,null,2);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("pre",{className:"font-mono text-xs bg-gray-50 p-2 rounded max-w-md overflow-auto",children:l?a:"••••••••"}),(0,t.jsx)("button",{onClick:()=>s(!l),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:l?(0,t.jsx)(l_.EyeOff,{className:"w-4 h-4 text-gray-500"}):(0,t.jsx)(lj.Eye,{className:"w-4 h-4 text-gray-500"})})]})},lN=({endpointData:e,onClose:s,accessToken:a,isAdmin:r,premiumUser:i=!1,onEndpointUpdated:o})=>{let[n,d]=(0,x.useState)(e),[c,m]=(0,x.useState)(!1),[u,h]=(0,x.useState)(!1),[p,g]=(0,x.useState)(e?.auth||!1),[f,j]=(0,x.useState)(e?.methods||[]),[_,y]=(0,x.useState)(e?.guardrails||{}),[b]=et.Form.useForm(),v=async e=>{try{if(!a||!n?.id)return;let t={};if(e.headers)try{t="string"==typeof e.headers?JSON.parse(e.headers):e.headers}catch(e){D.default.fromBackend("Invalid JSON format for headers");return}let s={path:n.path,target:e.target,headers:t,include_subpath:e.include_subpath,cost_per_request:e.cost_per_request,auth:i?e.auth:void 0,methods:f&&f.length>0?f:void 0,guardrails:_&&Object.keys(_).length>0?_:void 0};await (0,l.updatePassThroughEndpoint)(a,n.id,s),d({...n,...s}),h(!1),o&&o()}catch(e){console.error("Error updating endpoint:",e),D.default.fromBackend("Failed to update pass through endpoint")}},N=async()=>{try{if(!a||!n?.id)return;await (0,l.deletePassThroughEndpointsCall)(a,n.id),D.default.success("Pass through endpoint deleted successfully"),s(),o&&o()}catch(e){console.error("Error deleting endpoint:",e),D.default.fromBackend("Failed to delete pass through endpoint")}};return c?(0,t.jsx)("div",{className:"p-4",children:"Loading..."}):n?(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)(K.Button,{onClick:s,className:"mb-4",children:"← Back"}),(0,t.jsxs)(eu.Title,{children:["Pass Through Endpoint: ",n.path]}),(0,t.jsx)(em.Text,{className:"text-gray-500 font-mono",children:n.id})]})}),(0,t.jsxs)(e4.TabGroup,{children:[(0,t.jsxs)(e5.TabList,{className:"mb-4",children:[(0,t.jsx)(e2.Tab,{children:"Overview"},"overview"),r?(0,t.jsx)(e2.Tab,{children:"Settings"},"settings"):(0,t.jsx)(t.Fragment,{})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsxs)($.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Path"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(eu.Title,{className:"font-mono",children:n.path})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Target"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(eu.Title,{children:n.target})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Configuration"}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{color:n.include_subpath?"green":"gray",children:n.include_subpath?"Include Subpath":"Exact Path"})}),(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{color:n.auth?"blue":"gray",children:n.auth?"Auth Required":"No Auth"})}),n.methods&&n.methods.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"text-xs text-gray-500",children:"HTTP Methods:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:n.methods.map(e=>(0,t.jsx)(k.Badge,{color:"indigo",size:"sm",children:e},e))})]}),(!n.methods||0===n.methods.length)&&(0,t.jsx)("div",{children:(0,t.jsx)(em.Text,{className:"text-xs text-gray-500",children:"All HTTP methods supported"})}),void 0!==n.cost_per_request&&(0,t.jsx)("div",{children:(0,t.jsxs)(em.Text,{children:["Cost per request: $",n.cost_per_request]})})]})]})]}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(lm,{pathValue:n.path,targetValue:n.target,includeSubpath:n.include_subpath||!1})}),n.headers&&Object.keys(n.headers).length>0&&(0,t.jsxs)(eL.Card,{className:"mt-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Headers"}),(0,t.jsxs)(k.Badge,{color:"blue",children:[Object.keys(n.headers).length," headers configured"]})]}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(lv,{value:n.headers})})]}),n.guardrails&&Object.keys(n.guardrails).length>0&&(0,t.jsxs)(eL.Card,{className:"mt-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Guardrails"}),(0,t.jsxs)(k.Badge,{color:"purple",children:[Object.keys(n.guardrails).length," guardrails configured"]})]}),(0,t.jsx)("div",{className:"mt-4 space-y-2",children:Object.entries(n.guardrails).map(([e,l])=>(0,t.jsxs)("div",{className:"p-3 bg-gray-50 rounded",children:[(0,t.jsx)("div",{className:"font-medium text-sm",children:e}),l&&(l.request_fields||l.response_fields)&&(0,t.jsxs)("div",{className:"mt-2 text-xs text-gray-600 space-y-1",children:[l.request_fields&&(0,t.jsxs)("div",{children:["Request fields: ",l.request_fields.join(", ")]}),l.response_fields&&(0,t.jsxs)("div",{children:["Response fields: ",l.response_fields.join(", ")]})]}),!l&&(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:"Uses entire payload"})]},e))})]})]}),r&&(0,t.jsx)(U.TabPanel,{children:(0,t.jsxs)(eL.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eu.Title,{children:"Pass Through Endpoint Settings"}),(0,t.jsx)("div",{className:"space-x-2",children:!u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Button,{onClick:()=>h(!0),children:"Edit Settings"}),(0,t.jsx)(T.Button,{onClick:N,variant:"secondary",color:"red",children:"Delete Endpoint"})]})})]}),u?(0,t.jsxs)(et.Form,{form:b,onFinish:v,initialValues:{target:n.target,headers:n.headers?JSON.stringify(n.headers,null,2):"",include_subpath:n.include_subpath||!1,cost_per_request:n.cost_per_request,auth:n.auth||!1,methods:n.methods||[]},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Target URL",name:"target",rules:[{required:!0,message:"Please input a target URL"}],children:(0,t.jsx)(eR.TextInput,{placeholder:"https://api.example.com"})}),(0,t.jsx)(et.Form.Item,{label:"Headers (JSON)",name:"headers",children:(0,t.jsx)(eV.Input.TextArea,{rows:5,placeholder:'{"Authorization": "Bearer your-token", "Content-Type": "application/json"}'})}),(0,t.jsx)(et.Form.Item,{label:"HTTP Methods (Optional)",name:"methods",extra:0===f.length?"All HTTP methods supported (default)":`Only ${f.join(", ")} requests will be routed to this endpoint`,children:(0,t.jsx)(W.Select,{mode:"multiple",placeholder:"Select methods (leave empty for all)",value:f,onChange:j,allowClear:!0,style:{width:"100%"},children:ly.map(e=>(0,t.jsx)(lb,{value:e,children:e},e))})}),(0,t.jsx)(et.Form.Item,{label:"Include Subpath",name:"include_subpath",valuePropName:"checked",children:(0,t.jsx)(es.Switch,{})}),(0,t.jsx)(et.Form.Item,{label:"Cost per Request",name:"cost_per_request",children:(0,t.jsx)(eh.InputNumber,{min:0,step:.01,precision:2,placeholder:"0.00",addonBefore:"$"})}),(0,t.jsx)(lu,{premiumUser:i,authEnabled:p,onAuthChange:e=>{g(e),b.setFieldsValue({auth:e})}}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(lx,{accessToken:a||"",value:_,onChange:y})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,t.jsx)(K.Button,{onClick:()=>h(!1),children:"Cancel"}),(0,t.jsx)(T.Button,{children:"Save Changes"})]})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Path"}),(0,t.jsx)("div",{className:"font-mono",children:n.path})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Target URL"}),(0,t.jsx)("div",{children:n.target})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Include Subpath"}),(0,t.jsx)(k.Badge,{color:n.include_subpath?"green":"gray",children:n.include_subpath?"Yes":"No"})]}),void 0!==n.cost_per_request&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Cost per Request"}),(0,t.jsxs)("div",{children:["$",n.cost_per_request]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Authentication Required"}),(0,t.jsx)(k.Badge,{color:n.auth?"green":"gray",children:n.auth?"Yes":"No"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Headers"}),n.headers&&Object.keys(n.headers).length>0?(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(lv,{value:n.headers})}):(0,t.jsx)("div",{className:"text-gray-500",children:"No headers configured"})]})]})]})})]})]})]}):(0,t.jsx)("div",{className:"p-4",children:"Pass through endpoint not found"})};var lw=e.i(149121);let lC=({value:e})=>{let[l,s]=(0,x.useState)(!1),a=JSON.stringify(e);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{className:"font-mono text-xs",children:l?a:"••••••••"}),(0,t.jsx)("button",{onClick:()=>s(!l),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:l?(0,t.jsx)(l_.EyeOff,{className:"w-4 h-4 text-gray-500"}):(0,t.jsx)(lj.Eye,{className:"w-4 h-4 text-gray-500"})})]})},lS=({accessToken:e,userRole:s,userID:a,modelData:r,premiumUser:i})=>{let[o,n]=(0,x.useState)([]),[d,c]=(0,x.useState)(null),[m,u]=(0,x.useState)(!1),[h,p]=(0,x.useState)(null);(0,x.useEffect)(()=>{e&&s&&a&&(0,l.getPassThroughEndpointsCall)(e).then(e=>{n(e.endpoints)})},[e,s,a]);let g=async e=>{p(e),u(!0)},f=async()=>{if(null!=h&&e){try{await (0,l.deletePassThroughEndpointsCall)(e,h);let t=o.filter(e=>e.id!==h);n(t),D.default.success("Endpoint deleted successfully.")}catch(e){console.error("Error deleting the endpoint:",e),D.default.fromBackend("Error deleting the endpoint: "+e)}u(!1),p(null)}},j=[{header:"ID",accessorKey:"id",cell:e=>(0,t.jsx)(E.Tooltip,{title:e.row.original.id,children:(0,t.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>e.row.original.id&&c(e.row.original.id),children:e.row.original.id})})},{header:"Path",accessorKey:"path"},{header:"Target",accessorKey:"target",cell:e=>(0,t.jsx)(em.Text,{children:e.getValue()})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:"Methods"}),(0,t.jsx)(E.Tooltip,{title:"HTTP methods supported by this endpoint",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"methods",cell:e=>{let l=e.getValue();return l&&0!==l.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.map(e=>(0,t.jsx)(J.Badge,{color:"indigo",className:"text-xs",children:e},e))}):(0,t.jsx)(J.Badge,{color:"blue",children:"ALL"})}},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:"Authentication"}),(0,t.jsx)(E.Tooltip,{title:"LiteLLM Virtual Key required to call endpoint",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"auth",cell:e=>(0,t.jsx)(J.Badge,{color:e.getValue()?"green":"gray",children:e.getValue()?"Yes":"No"})},{header:"Headers",accessorKey:"headers",cell:e=>(0,t.jsx)(lC,{value:e.getValue()||{}})},{header:"Actions",id:"actions",cell:({row:e})=>(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)(F.Icon,{icon:eE.PencilAltIcon,size:"sm",onClick:()=>e.original.id&&c(e.original.id),title:"Edit"}),(0,t.jsx)(F.Icon,{icon:S.TrashIcon,size:"sm",onClick:()=>{var t;return t=e.original.id,e.index,void g(t)},title:"Delete"})]})}];if(!e)return null;if(d){console.log("selectedEndpointId",d),console.log("generalSettings",o);let a=o.find(e=>e.id===d);return a?(0,t.jsx)(lN,{endpointData:a,onClose:()=>c(null),accessToken:e,isAdmin:"Admin"===s||"admin"===s,premiumUser:i,onEndpointUpdated:()=>{e&&(0,l.getPassThroughEndpointsCall)(e).then(e=>{n(e.endpoints)})}}):(0,t.jsx)("div",{children:"Endpoint not found"})}return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eu.Title,{children:"Pass Through Endpoints"}),(0,t.jsx)(em.Text,{className:"text-tremor-content",children:"Configure and manage your pass-through endpoints"})]}),(0,t.jsx)(lf,{accessToken:e,setPassThroughItems:n,passThroughItems:o,premiumUser:i}),(0,t.jsx)(lw.DataTable,{data:o,columns:j,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:!1,noDataMessage:"No pass-through endpoints configured"}),m&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),(0,t.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Pass-Through Endpoint"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this pass-through endpoint? This action cannot be undone."})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(T.Button,{onClick:f,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(T.Button,{onClick:()=>{u(!1),p(null)},children:"Cancel"})]})]})]})})]})};e.s(["default",0,lS],147612);var lk=e.i(56567);e.s(["default",0,({premiumUser:e,teams:s})=>{let{accessToken:a,token:i,userRole:m,userId:u}=(0,r.default)(),[h]=et.Form.useForm(),[p,g]=(0,x.useState)(""),[f,j]=(0,x.useState)([]),[_,y]=(0,x.useState)(eM.Providers.Anthropic),[b,v]=(0,x.useState)(null),[N,w]=(0,x.useState)(null),[C,S]=(0,x.useState)(null),[k,T]=(0,x.useState)(0),[I,M]=(0,x.useState)({}),[P,A]=(0,x.useState)(!1),[E,R]=(0,x.useState)(null),[O,B]=(0,x.useState)(null),[z,V]=(0,x.useState)(0),[H,J]=(0,x.useState)(()=>"true"!==localStorage.getItem("hideMissingProviderBanner")),K=(0,G.useQueryClient)(),{data:W,isLoading:Q,refetch:Y}=(0,d.useModelsInfo)(),{data:X,isLoading:Z}=(0,n.useModelCostMap)(),{data:ee,isLoading:el}=o(),es=ee?.credentials||[],{data:ea,isLoading:er}=(0,c.useUISettings)(),eo=(0,x.useMemo)(()=>{if(!W?.data)return[];let e=new Set;for(let t of W.data)e.add(t.model_name);return Array.from(e).sort()},[W?.data]),ed=(0,x.useMemo)(()=>{if(!W?.data)return[];let e=new Set;for(let t of W.data){let l=t.model_info;if(l?.access_groups)for(let t of l.access_groups)e.add(t)}return Array.from(e)},[W?.data]),ec=(0,x.useMemo)(()=>W?.data?W.data.map(e=>e.model_name):[],[W?.data]),em=(0,x.useMemo)(()=>W?.data?W.data.map(e=>e.model_info?.id).filter(e=>!!e):[],[W?.data]),eu=e=>null!=X&&"object"==typeof X&&e in X?X[e].litellm_provider:"openai",eh=(0,x.useMemo)(()=>W?.data?ei(W,eu):{data:[]},[W?.data,eu]),ex=m&&(0,eZ.isProxyAdminRole)(m),eg=m&&eZ.internalUserRoles.includes(m),ef=u&&(0,eZ.isUserTeamAdminForAnyTeam)(s,u),ej=eg&&ea?.values?.disable_model_add_for_internal_users===!0,e_=!ex&&(ej||!ef),ey={name:"file",accept:".json",pastable:!1,beforeUpload:e=>{if("application/json"===e.type){let t=new FileReader;t.onload=e=>{if(e.target){let t=e.target.result;h.setFieldsValue({vertex_credentials:t})}},t.readAsText(e)}return!1},onChange(e){"done"===e.file.status?D.default.success(`${e.file.name} file uploaded successfully`):"error"===e.file.status&&D.default.fromBackend(`${e.file.name} file upload failed.`)}},eb=()=>{g(new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})),K.invalidateQueries({queryKey:["models","list"]}),Y()},ev=async()=>{if(a)try{let e={router_settings:{}};"global"===b?(C&&(e.router_settings.retry_policy=C),D.default.success("Global retry settings saved successfully")):(N&&(e.router_settings.model_group_retry_policy=N),D.default.success(`Retry settings saved successfully for ${b}`)),await (0,l.setCallbacksCall)(a,e)}catch(e){D.default.fromBackend("Failed to save retry settings")}};if((0,x.useEffect)(()=>{if(!a||!i||!m||!u||!W)return;let e=async()=>{try{let e=(await (0,l.getCallbacksCall)(a,u,m)).router_settings,t=e.model_group_retry_policy,s=e.num_retries;w(t),S(e.retry_policy),T(s);let r=e.model_group_alias||{};M(r)}catch(e){console.error("Error fetching model data:",e)}};a&&i&&m&&u&&W&&e()},[a,i,m,u,W]),m&&"Admin Viewer"==m){let{Title:e,Paragraph:l}=L.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to view all models"})]})}let eN=async()=>{try{let e=await h.validateFields();await eA(e,a,h,eb)}catch(t){let e=t.errorFields?.map(e=>`${e.name.join(".")}: ${e.errors.join(", ")}`).join(" | ")||"Unknown validation error";D.default.fromBackend(`Please fill in the following required fields: ${e}`)}};return(Object.keys(eM.Providers).find(e=>eM.Providers[e]===_),O)?(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(lk.default,{teamId:O,onClose:()=>B(null),accessToken:a,is_team_admin:"Admin"===m,is_proxy_admin:"Proxy Admin"===m,userModels:ec,editTeam:!1,onUpdate:eb,premiumUser:e})}):(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)($.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(e1.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:"Model Management"}),eZ.all_admin_roles.includes(m)?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Add and manage models for the proxy"}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Add models for teams you are an admin for."})]}),!H&&(0,t.jsxs)("a",{href:"https://models.litellm.ai/?request=true",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-[#6366f1] hover:text-[#5558e3] border border-[#6366f1] hover:border-[#5558e3] rounded-lg transition-colors",children:[(0,t.jsx)(e3.PlusCircleOutlined,{style:{fontSize:"12px"}}),"Request Provider"]})]}),H&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-3 bg-blue-50 rounded-lg border border-blue-100 flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-10 h-10 bg-white rounded-full flex items-center justify-center border border-blue-200",children:(0,t.jsx)(e3.PlusCircleOutlined,{style:{fontSize:"18px",color:"#6366f1"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"text-gray-900 font-semibold text-sm m-0",children:"Missing a provider?"}),(0,t.jsx)("p",{className:"text-gray-500 text-xs m-0 mt-0.5",children:"The LiteLLM engineering team is constantly adding support for new LLM models, providers, endpoints. If you don't see the one you need, let us know and we'll prioritize it."})]}),(0,t.jsxs)("a",{href:"https://models.litellm.ai/?request=true",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0 inline-flex items-center gap-2 px-4 py-2 bg-[#6366f1] hover:bg-[#5558e3] text-white text-sm font-medium rounded-lg transition-colors",children:["Request Provider",(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("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"})})]}),(0,t.jsx)("button",{onClick:()=>{J(!1),localStorage.setItem("hideMissingProviderBanner","true")},className:"flex-shrink-0 p-1 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full transition-colors","aria-label":"Dismiss banner",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),E&&!(Q||Z||el||er)?(0,t.jsx)(ls,{modelId:E,onClose:()=>{R(null)},accessToken:a,userID:u,userRole:m,onModelUpdate:e=>{K.invalidateQueries({queryKey:["models","list"]}),eb()},modelAccessGroups:ed}):(0,t.jsxs)(e4.TabGroup,{index:z,onIndexChange:V,className:"gap-2 h-[75vh] w-full ",children:[(0,t.jsxs)(e5.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[eZ.all_admin_roles.includes(m)?(0,t.jsx)(e2.Tab,{children:"All Models"}):(0,t.jsx)(e2.Tab,{children:"Your Models"}),!e_&&(0,t.jsx)(e2.Tab,{children:"Add Model"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"LLM Credentials"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Pass-Through Endpoints"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Health Status"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Model Retry Settings"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Model Group Alias"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Price Data Reload"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 self-center",children:[p&&(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Last Refreshed: ",p]}),(0,t.jsx)(F.Icon,{icon:e0.RefreshIcon,variant:"shadow",size:"xs",className:"cursor-pointer",onClick:eb})]})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsx)(en,{selectedModelGroup:b,setSelectedModelGroup:v,availableModelGroups:eo,availableModelAccessGroups:ed,setSelectedModelId:R,setSelectedTeamId:B}),!e_&&(0,t.jsx)(U.TabPanel,{className:"h-full",children:(0,t.jsx)(tU,{form:h,handleOk:eN,selectedProvider:_,setSelectedProvider:y,providerModels:f,setProviderModelsFn:e=>{j((0,eM.getProviderModels)(e,X))},getPlaceholder:eM.getPlaceholder,uploadProps:ey,showAdvancedSettings:P,setShowAdvancedSettings:A,teams:s,credentials:es,accessToken:a,userRole:m})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(eX,{uploadProps:ey})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(lS,{accessToken:a,userRole:m,userID:u,modelData:eh,premiumUser:e})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(tX,{accessToken:a,modelData:eh,all_models_on_proxy:em,getDisplayModelName:q,setSelectedModelId:R,teams:s})}),(0,t.jsx)(ep,{selectedModelGroup:b,setSelectedModelGroup:v,availableModelGroups:eo,globalRetryPolicy:C,setGlobalRetryPolicy:S,defaultRetry:k,modelGroupRetryPolicy:N,setModelGroupRetryPolicy:w,handleSaveRetrySettings:ev}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t4,{accessToken:a,initialModelGroupAlias:I,onAliasUpdate:M})}),(0,t.jsx)(eI,{})]})]})]})})})}],161059)}]); \ No newline at end of file + }'`):"";return(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:[y?(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,t.jsxs)(te,{style:{fontSize:"16px"},children:["Testing connection to ",r,"..."]}),(0,t.jsx)(e7.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]}):v?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.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.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,t.jsxs)(te,{"data-testid":"connection-success-msg",type:"success",style:{fontSize:"18px",fontWeight:500,marginLeft:"10px"},children:["Connection to ",r," successful!"]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(ek.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(te,{"data-testid":"connection-failure-msg",type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",r," failed"]})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,t.jsxs)(te,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(te,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:F}),h&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(K.Button,{type:"link",onClick:()=>S(!C),style:{paddingLeft:0,height:"auto"},children:C?"Hide Details":"Show Details"})})]}),C&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(te,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Troubleshooting Details"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:"string"==typeof h?h:JSON.stringify(h,null,2)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(te,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"API Request"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"250px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:M||"No request data available"}),(0,t.jsx)(K.Button,{style:{marginTop:"8px"},icon:(0,t.jsx)(e9.CopyOutlined,{}),onClick:()=>{navigator.clipboard.writeText(M||""),D.default.success("Copied to clipboard")},children:"Copy to Clipboard"})]})]})}),(0,t.jsx)(I.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(K.Button,{type:"link",href:"https://docs.litellm.ai/docs/providers",target:"_blank",icon:(0,t.jsx)(w.InfoCircleOutlined,{}),children:"View Documentation"})})]})},tl=async(e,t,s,a)=>{try{let r;console.log("=== AUTO ROUTER SUBMIT HANDLER CALLED ==="),console.log("handling auto router submit for formValues:",e),console.log("Model type:",e.model_type),"complexity_router"===e.model_type?(console.log("Creating complexity router configuration"),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:{}},console.log("Complexity router config:",e.complexity_router_config)):(console.log("Creating semantic router configuration"),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&&"custom"!==e.auto_router_embedding_model?r.litellm_params.auto_router_embedding_model=e.auto_router_embedding_model:e.custom_embedding_model&&(r.litellm_params.auto_router_embedding_model=e.custom_embedding_model),console.log("Semantic router config (stringified):",r.litellm_params.auto_router_config)),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),console.log("Auto router configuration to be created:",r),console.log("Calling modelCreateCall...");let i=await (0,l.modelCreateCall)(t,r);console.log("response for auto router create call:",i);let o="complexity_router"===e.model_type?"Complexity Router":"Semantic Router";D.default.success(`Successfully created ${o}: ${e.auto_router_name}`),s.resetFields(),a&&a()}catch(e){console.error("Failed to add auto router:",e),D.default.fromBackend("Failed to add auto router: "+e)}};var ts=e.i(689020),ta=e.i(955135),tr=e.i(646563),ti=e.i(362024),to=e.i(21548);let{Text:tn}=L.Typography,{TextArea:td}=eV.Input,tc=({modelInfo:e,value:l,onChange:s})=>{let[a,r]=(0,x.useState)([]),[i,o]=(0,x.useState)(!1),[n,d]=(0,x.useState)([]);(0,x.useEffect)(()=>{let e=l?.routes;if(e){let t=[];r(l=>e.map((e,s)=>{let a=l[s],r=a?.id||e.id||`route-${s}-${Date.now()}`;return t.push(r),{id:r,model:e.name||e.model||"",utterances:e.utterances||[],description:e.description||"",score_threshold:e.score_threshold??.5}})),d(t)}else r([]),d([])},[l]);let c=(e,t,l)=>{let s=a.map(s=>s.id===e?{...s,[t]:l}:s);r(s),m(s)},m=e=>{let t={routes:e.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))};s?.(t)},u=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)(A.Space,{align:"center",children:[(0,t.jsx)(L.Typography.Title,{level:4,style:{margin:0},children:"Routes Configuration"}),(0,t.jsx)(E.Tooltip,{title:"Configure routing logic to automatically select the best model based on user input patterns",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(K.Button,{type:"primary",icon:(0,t.jsx)(tr.PlusOutlined,{}),onClick:()=>{let e=`route-${Date.now()}`,t=[...a,{id:e,model:"",utterances:[],description:"",score_threshold:.5}];r(t),m(t),d(t=>[...t,e])},className:"bg-blue-600 hover:bg-blue-700",children:"Add Route"})]}),0===a.length?(0,t.jsx)(ej.Card,{children:(0,t.jsx)(to.Empty,{description:'No routes configured. Click "Add Route" to get started.'})}):(0,t.jsx)(ti.Collapse,{activeKey:n,onChange:e=>d(Array.isArray(e)?e:[e].filter(Boolean)),style:{width:"100%"},items:a.map((e,l)=>({key:e.id,label:(0,t.jsxs)(tn,{style:{fontSize:16},children:["Route ",l+1,": ",e.model||"Unnamed"]}),extra:(0,t.jsx)(K.Button,{type:"text",danger:!0,size:"small",icon:(0,t.jsx)(ta.DeleteOutlined,{}),onClick:t=>{var l;let s;t.stopPropagation(),l=e.id,r(s=a.filter(e=>e.id!==l)),m(s),d(e=>e.filter(e=>e!==l))}}),children:(0,t.jsxs)(ej.Card,{children:[(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-sm font-medium mb-2 block",children:"Model"}),(0,t.jsx)(W.Select,{value:e.model,onChange:t=>c(e.id,"model",t),placeholder:"Select model",showSearch:!0,style:{width:"100%"},options:u})]}),(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-sm font-medium mb-2 block",children:"Description"}),(0,t.jsx)(td,{value:e.description,onChange:t=>c(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)(tn,{className:"text-sm font-medium",children:"Score Threshold"}),(0,t.jsx)(E.Tooltip,{title:"Minimum similarity score to route to this model (0-1)",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(eh.InputNumber,{value:e.score_threshold,onChange:t=>c(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)(tn,{className:"text-sm font-medium",children:"Example Utterances"}),(0,t.jsx)(E.Tooltip,{title:"Training examples for this route. Type an utterance and press Enter to add it.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(tn,{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)(W.Select,{mode:"tags",value:e.utterances,onChange:t=>c(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)(I.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-lg font-semibold",children:"JSON Preview"}),(0,t.jsx)(K.Button,{type:"link",onClick:()=>o(!i),className:"text-blue-600 p-0",children:i?"Hide":"Show"})]}),i&&(0,t.jsx)(ej.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:a.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))},null,2)})})]})},{Text:tm}=L.Typography,tu={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..."'}},th=({modelInfo:e,value:l,onChange:s})=>{let a=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)(A.Space,{align:"center",style:{marginBottom:16},children:[(0,t.jsx)(L.Typography.Title,{level:4,style:{margin:0},children:"Complexity Tier Configuration"}),(0,t.jsx)(E.Tooltip,{title:"Map each complexity tier to a model. Simple queries use cheaper/faster models, complex queries use more capable models.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(tm,{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 handles each tier."}),(0,t.jsx)(ej.Card,{children:Object.keys(tu).map((e,r)=>{let i=tu[e];return(0,t.jsxs)("div",{children:[r>0&&(0,t.jsx)(I.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)(tm,{strong:!0,style:{fontSize:16},children:[i.label," Tier"]}),(0,t.jsx)(E.Tooltip,{title:i.description,children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsxs)(tm,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:["Examples: ",i.examples]}),(0,t.jsx)(W.Select,{value:l[e],onChange:t=>{s({...l,[e]:t})},placeholder:`Select model for ${i.label.toLowerCase()} queries`,showSearch:!0,style:{width:"100%"},options:a})]})]},e)})}),(0,t.jsx)(I.Divider,{}),(0,t.jsxs)(ej.Card,{className:"bg-gray-50",children:[(0,t.jsx)(tm,{strong:!0,style:{display:"block",marginBottom:8},children:"How Classification Works"}),(0,t.jsx)(tm,{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)"]})]})]})]})};var tx=e.i(962944);let tp={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 tg=x.forwardRef(function(e,t){return x.createElement(ew.default,(0,ev.default)({},e,{ref:t,icon:tp}))});let{Title:tf,Link:tj}=L.Typography,t_=({form:e,handleOk:s,accessToken:a,userRole:r})=>{let[i,o]=(0,x.useState)(!1),[n,d]=(0,x.useState)(!1),[c,m]=(0,x.useState)(""),[u,h]=(0,x.useState)([]),[p,g]=(0,x.useState)([]),[f,j]=(0,x.useState)(!1),[_,y]=(0,x.useState)(!1),[b,v]=(0,x.useState)("complexity"),[N,w]=(0,x.useState)(null),[C,S]=(0,x.useState)({SIMPLE:"",MEDIUM:"",COMPLEX:"",REASONING:""});(0,x.useEffect)(()=>{(async()=>{h((await (0,l.modelAvailableCall)(a,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[a]),(0,x.useEffect)(()=>{(async()=>{try{let e=await (0,ts.fetchAvailableModels)(a);console.log("Fetched models for auto router:",e),g(e)}catch(e){console.error("Error fetching model info for auto router:",e)}})()},[a]);let k=eX.all_admin_roles.includes(r),T=async()=>{d(!0),m(`test-${Date.now()}`),o(!0)},F=()=>{console.log("Auto router submit triggered!"),console.log("Router type:",b);let t=e.getFieldsValue();if(console.log("Form values:",t),!t.auto_router_name)return void D.default.fromBackend("Please enter an Auto Router Name");if("complexity"===b){if(0===Object.values(C).filter(Boolean).length)return void D.default.fromBackend("Please select at least one model for a complexity tier");let l=C.MEDIUM||C.SIMPLE||C.COMPLEX||C.REASONING;e.setFieldsValue({custom_llm_provider:"auto_router",model:t.auto_router_name,api_key:"not_required_for_auto_router",auto_router_default_model:l}),e.validateFields(["auto_router_name"]).then(r=>{console.log("Complexity router validation passed");let i={...r,auto_router_name:t.auto_router_name,auto_router_default_model:l,model_type:"complexity_router",complexity_router_config:{tiers:C},model_access_group:t.model_access_group};console.log("Final submit values:",i),tl(i,a,e,s)}).catch(e=>{console.error("Validation failed:",e),D.default.fromBackend("Please fill in all required fields")})}else{if(!t.auto_router_default_model)return void D.default.fromBackend("Please select a Default Model");if(e.setFieldsValue({custom_llm_provider:"auto_router",model:t.auto_router_name,api_key:"not_required_for_auto_router"}),!N||!N.routes||0===N.routes.length)return void D.default.fromBackend("Please configure at least one route for the auto router");if(N.routes.filter(e=>!e.name||!e.description||0===e.utterances.length).length>0)return void D.default.fromBackend("Please ensure all routes have a target model, description, and at least one utterance");e.validateFields().then(t=>{console.log("Form validation passed, submitting with values:",t);let l={...t,auto_router_config:N,model_type:"semantic_router"};console.log("Final submit values:",l),tl(l,a,e,s)}).catch(e=>{console.error("Validation failed:",e);let t=e.errorFields||[];if(t.length>0){let e=t.map(e=>{let t=e.name[0];return({auto_router_name:"Auto Router Name",auto_router_default_model:"Default Model",auto_router_embedding_model:"Embedding Model"})[t]||t});D.default.fromBackend(`Please fill in the following required fields: ${e.join(", ")}`)}else D.default.fromBackend("Please fill in all required fields")})}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tf,{level:2,children:"Add Auto Router"}),(0,t.jsx)(em.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."}),(0,t.jsx)(ej.Card,{className:"mb-4",children:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(em.Text,{className:"text-sm font-medium mb-2 block",children:"Router Type"}),(0,t.jsx)(e8.Radio.Group,{value:b,onChange:e=>v(e.target.value),className:"w-full",children:(0,t.jsxs)(A.Space,{direction:"vertical",className:"w-full",children:[(0,t.jsxs)(e8.Radio,{value:"complexity",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tx.ThunderboltOutlined,{className:"text-yellow-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Complexity Router"}),(0,t.jsx)(J.Badge,{count:"Recommended",style:{backgroundColor:"#52c41a",fontSize:"10px",padding:"0 6px"}})]}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:["Automatically routes based on request complexity. No training data needed — just pick 4 models and go.",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-green-600",children:"✓ Zero API calls"})," · ",(0,t.jsx)("span",{className:"text-green-600",children:"✓ <1ms latency"})," · ",(0,t.jsx)("span",{className:"text-green-600",children:"✓ No cost"})]})]}),(0,t.jsxs)(e8.Radio,{value:"semantic",className:"w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tg,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Semantic Router"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:"Routes based on semantic similarity to example utterances. Requires embedding model and training examples."})]})]})})]})}),(0,t.jsx)(ej.Card,{children:(0,t.jsxs)(et.Form,{form:e,onFinish:F,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(et.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)(eR.TextInput,{placeholder:"e.g., smart_router, auto_router_1"})}),"complexity"===b?(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(th,{modelInfo:p,value:C,onChange:e=>{S(e)}})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(tc,{modelInfo:p,value:N,onChange:t=>{w(t),e.setFieldValue("auto_router_config",t)}})}),(0,t.jsx)(et.Form.Item,{rules:[{required:"semantic"===b,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)(W.Select,{placeholder:"Select a default model",onChange:e=>{j("custom"===e)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0})}),(0,t.jsx)(et.Form.Item,{label:"Embedding Model",name:"auto_router_embedding_model",tooltip:"Optional: Embedding model to use for semantic routing decisions",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(W.Select,{value:e.getFieldValue("auto_router_embedding_model"),placeholder:"Select an embedding model (optional)",onChange:t=>{y("custom"===t),e.setFieldValue("auto_router_embedding_model",t)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0,allowClear:!0})})]}),(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-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:"flex-grow border-t border-gray-200"})]}),k&&(0,t.jsx)(et.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)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:u.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)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(L.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(K.Button,{onClick:T,loading:n,children:"Test Connection"}),(0,t.jsx)(K.Button,{type:"primary",onClick:()=>{console.log("Add Auto Router button clicked!"),F()},children:"Add Auto Router"})]})]})]})}),(0,t.jsx)(el.Modal,{title:"Connection Test Results",open:i,onCancel:()=>{o(!1),d(!1)},footer:[(0,t.jsx)(K.Button,{onClick:()=>{o(!1),d(!1)},children:"Close"},"close")],width:700,children:i&&(0,t.jsx)(tt,{formValues:e.getFieldsValue(),accessToken:a,testMode:"chat",modelName:e.getFieldValue("auto_router_name"),onClose:()=>{o(!1),d(!1)},onTestComplete:()=>d(!1)},c)})]})};var ty=e.i(838932),tb=e.i(109034),tv=e.i(793130),tN=e.i(560445),tw=e.i(663435),tC=e.i(677667),tS=e.i(898667),tk=e.i(130643),tT=e.i(635432),tF=e.i(564897),tI=e.i(435451);let{Text:tM}=L.Typography,tP=({form:e,showCacheControl:l,onCacheControlChange:s})=>{let a=t=>{let l=e.getFieldValue("litellm_extra_params");try{let s=l?JSON.parse(l):{};t.length>0?s.cache_control_injection_points=t:delete s.cache_control_injection_points,Object.keys(s).length>0?e.setFieldValue("litellm_extra_params",JSON.stringify(s,null,2)):e.setFieldValue("litellm_extra_params","")}catch(e){console.error("Error updating cache control points:",e)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Cache Control Injection Points",name:"cache_control",valuePropName:"checked",className:"mb-4",tooltip:"Tell litellm where to inject cache control checkpoints. You can specify either by role (to apply to all messages of that role) or by specific message index.",children:(0,t.jsx)(es.Switch,{onChange:s,className:"bg-gray-600"})}),l&&(0,t.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,t.jsx)(tM,{className:"text-sm text-gray-500 block mb-4",children:"Providers like Anthropic, Bedrock API require users to specify where to inject cache control checkpoints, litellm can automatically add them for you as a cost saving feature."}),(0,t.jsx)(et.Form.List,{name:"cache_control_injection_points",initialValue:[{location:"message"}],children:(l,{add:s,remove:r})=>(0,t.jsxs)(t.Fragment,{children:[l.map((s,i)=>(0,t.jsxs)("div",{className:"flex items-center mb-4 gap-4",children:[(0,t.jsx)(et.Form.Item,{...s,label:"Type",name:[s.name,"location"],initialValue:"message",className:"mb-0",style:{width:"180px"},children:(0,t.jsx)(W.Select,{disabled:!0,options:[{value:"message",label:"Message"}]})}),(0,t.jsx)(et.Form.Item,{...s,label:"Role",name:[s.name,"role"],className:"mb-0",style:{width:"180px"},tooltip:"LiteLLM will mark all messages of this role as cacheable",children:(0,t.jsx)(W.Select,{placeholder:"Select a role",allowClear:!0,options:[{value:"user",label:"User"},{value:"system",label:"System"},{value:"assistant",label:"Assistant"}],onChange:()=>{a(e.getFieldValue("cache_control_points"))}})}),(0,t.jsx)(et.Form.Item,{...s,label:"Index",name:[s.name,"index"],className:"mb-0",style:{width:"180px"},tooltip:"(Optional) If set litellm will mark the message at this index as cacheable",children:(0,t.jsx)(tI.default,{type:"number",placeholder:"Optional",step:1,onChange:()=>{a(e.getFieldValue("cache_control_points"))}})}),l.length>1&&(0,t.jsx)(tF.MinusCircleOutlined,{className:"text-red-500 cursor-pointer text-lg ml-12",onClick:()=>{r(s.name),setTimeout(()=>{a(e.getFieldValue("cache_control_points"))},0)}})]},s.key)),(0,t.jsx)(et.Form.Item,{children:(0,t.jsxs)("button",{type:"button",className:"flex items-center justify-center w-full border border-dashed border-gray-300 py-2 px-4 text-gray-600 hover:text-blue-600 hover:border-blue-300 transition-all rounded",onClick:()=>s(),children:[(0,t.jsx)(tr.PlusOutlined,{className:"mr-2"}),"Add Injection Point"]})})]})})]})]})};var tA=e.i(916940),tE=e.i(122550);let{Link:tL}=L.Typography,tR=({showAdvancedSettings:e,setShowAdvancedSettings:l,teams:s,guardrailsList:a,tagsList:r,accessToken:i})=>{let[o]=et.Form.useForm(),[n,d]=x.default.useState(!1),[c,m]=x.default.useState("per_token"),[u,h]=x.default.useState(!1),p=(e,t)=>t&&(isNaN(Number(t))||0>Number(t))?Promise.reject("Please enter a valid positive number"):Promise.resolve();return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(tC.Accordion,{className:"mt-2 mb-4",children:[(0,t.jsx)(tS.AccordionHeader,{children:(0,t.jsx)("b",{children:"Advanced Settings"})}),(0,t.jsx)(tk.AccordionBody,{children:(0,t.jsxs)("div",{className:"bg-white rounded-lg",children:[(0,t.jsx)(et.Form.Item,{label:"Custom Pricing",name:"custom_pricing",valuePropName:"checked",className:"mb-4",children:(0,t.jsx)(es.Switch,{onChange:e=>{d(e),e||o.setFieldsValue({input_cost_per_token:void 0,output_cost_per_token:void 0,input_cost_per_second:void 0})},className:"bg-gray-600"})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{children:["Attached Knowledge Bases (RAG)"," ",(0,t.jsx)(E.Tooltip,{title:"Vector stores to use for RAG. Every request to this model will automatically retrieve context from these knowledge bases.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/knowledgebase",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"vector_store_ids",className:"mt-4",help:"Select vector stores to attach. Requests to this model will automatically use these for RAG. Set up vector stores in Tools > Vector Stores.",children:(0,t.jsx)(tA.default,{onChange:()=>{},accessToken:i,placeholder:"Select knowledge bases (optional)"})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(E.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)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:"Select existing guardrails. Go to 'Guardrails' tab to create new guardrails.",children:(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:a.map(e=>({value:e,label:e}))})}),(0,t.jsx)(et.Form.Item,{label:"Tags",name:"tags",className:"mb-4",children:(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(r).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),n&&(0,t.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,t.jsx)(et.Form.Item,{label:"Pricing Model",name:"pricing_model",className:"mb-4",children:(0,t.jsx)(W.Select,{defaultValue:"per_token",onChange:e=>m(e),options:[{value:"per_token",label:"Per Million Tokens"},{value:"per_second",label:"Per Second"}]})}),"per_token"===c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Input Cost (per 1M tokens)",name:"input_cost_per_token",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})}),(0,t.jsx)(et.Form.Item,{label:"Output Cost (per 1M tokens)",name:"output_cost_per_token",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})})]}):(0,t.jsx)(et.Form.Item,{label:"Cost Per Second",name:"input_cost_per_second",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})})]}),(0,t.jsx)(et.Form.Item,{label:"Use in pass through routes",name:"use_in_pass_through",valuePropName:"checked",className:"mb-4 mt-4",tooltip:(0,t.jsxs)("span",{children:["Allow using these credentials in pass through routes."," ",(0,t.jsx)(tL,{href:"https://docs.litellm.ai/docs/pass_through/vertex_ai",target:"_blank",children:"Learn more"})]}),children:(0,t.jsx)(es.Switch,{onChange:e=>{let t=o.getFieldValue("litellm_extra_params");try{let l=t?JSON.parse(t):{};e?l.use_in_pass_through=!0:delete l.use_in_pass_through,Object.keys(l).length>0?o.setFieldValue("litellm_extra_params",JSON.stringify(l,null,2)):o.setFieldValue("litellm_extra_params","")}catch(t){e?o.setFieldValue("litellm_extra_params",JSON.stringify({use_in_pass_through:!0},null,2)):o.setFieldValue("litellm_extra_params","")}},className:"bg-gray-600"})}),(0,t.jsx)(tP,{form:o,showCacheControl:u,onCacheControlChange:e=>{if(h(e),!e){let e=o.getFieldValue("litellm_extra_params");try{let t=e?JSON.parse(e):{};delete t.cache_control_injection_points,Object.keys(t).length>0?o.setFieldValue("litellm_extra_params",JSON.stringify(t,null,2)):o.setFieldValue("litellm_extra_params","")}catch(e){o.setFieldValue("litellm_extra_params","")}}}}),(0,t.jsx)(et.Form.Item,{label:"LiteLLM Params",name:"litellm_extra_params",tooltip:"Optional litellm params used for making a litellm.completion() call.",className:"mb-4 mt-4",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(tT.default,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}),(0,t.jsxs)(eD.Row,{className:"mb-4",children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:10,children:(0,t.jsxs)(em.Text,{className:"text-gray-600 text-sm",children:["Pass JSON of litellm supported params"," ",(0,t.jsx)(tL,{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",children:"litellm.completion() call"})]})})]}),(0,t.jsx)(et.Form.Item,{label:"Model Info",name:"model_info_params",tooltip:"Optional model info params. Returned when calling `/model/info` endpoint.",className:"mb-0",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(tT.default,{rows:4,placeholder:'{ "mode": "chat" }'})})]})})]})})};var tO=e.i(291542),tB=e.i(750113);let tz=({content:e,children:l,width:s="auto",className:a=""})=>{let[r,i]=(0,x.useState)(!1),[o,n]=(0,x.useState)("top"),d=(0,x.useRef)(null);return(0,t.jsxs)("div",{className:"relative inline-block",ref:d,children:[l||(0,t.jsx)(tB.QuestionCircleOutlined,{className:"ml-1 text-gray-500 cursor-help",onMouseEnter:()=>{if(d.current){let e=d.current.getBoundingClientRect(),t=e.top,l=window.innerHeight-e.bottom;t<300&&l>300?n("bottom"):n("top")}i(!0)},onMouseLeave:()=>i(!1)}),r&&(0,t.jsxs)("div",{className:`absolute left-1/2 -translate-x-1/2 z-50 bg-black/90 text-white p-2 rounded-md text-sm font-normal shadow-lg ${a}`,style:{["top"===o?"bottom":"top"]:"100%",width:s,marginBottom:"top"===o?"8px":"0",marginTop:"bottom"===o?"8px":"0"},children:[e,(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 w-0 h-0",style:{top:"top"===o?"100%":"auto",bottom:"bottom"===o?"100%":"auto",borderTop:"top"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderBottom:"bottom"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderLeft:"6px solid transparent",borderRight:"6px solid transparent"}})]})]})},tq=()=>{let e=et.Form.useFormInstance(),[l,s]=(0,x.useState)(0),a=et.Form.useWatch("model",e)||[],r=Array.isArray(a)?a:[a],i=et.Form.useWatch("custom_model_name",e),o=!r.includes("all-wildcard"),n=et.Form.useWatch("custom_llm_provider",e);if((0,x.useEffect)(()=>{if(i&&r.includes("custom")){let t=(e.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?n===eM.Providers.Azure?{public_name:i,litellm_model:`azure/${i}`}:{public_name:i,litellm_model:i}:e);e.setFieldValue("model_mappings",t),s(e=>e+1)}},[i,r,n,e]),(0,x.useEffect)(()=>{if(r.length>0&&!r.includes("all-wildcard")){let t=e.getFieldValue("model_mappings")||[];if(t.length!==r.length||!r.every(e=>t.some(t=>"custom"===e?"custom"===t.litellm_model||t.litellm_model===i:n===eM.Providers.Azure?t.litellm_model===`azure/${e}`:t.litellm_model===e))){let t=r.map(e=>"custom"===e&&i?n===eM.Providers.Azure?{public_name:i,litellm_model:`azure/${i}`}:{public_name:i,litellm_model:i}:n===eM.Providers.Azure?{public_name:e,litellm_model:`azure/${e}`}:{public_name:e,litellm_model:e});e.setFieldValue("model_mappings",t),s(e=>e+1)}}},[r,i,n,e]),!o)return null;let d=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-2 font-normal",children:"The name you specify in your API calls to LiteLLM Proxy"}),(0,t.jsxs)("div",{className:"mb-2 font-normal",children:[(0,t.jsx)("strong",{children:"Example:"})," If you name your public model"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"example-name"}),", and choose"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"openai/qwen-plus-latest"})," as the LiteLLM model"]}),(0,t.jsxs)("div",{className:"mb-2 font-normal",children:[(0,t.jsx)("strong",{children:"Usage:"})," You make an API call to the LiteLLM proxy with"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:'model = "example-name"'})]}),(0,t.jsxs)("div",{className:"font-normal",children:[(0,t.jsx)("strong",{children:"Result:"})," LiteLLM sends"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"qwen-plus-latest"})," to the provider"]})]}),c=(0,t.jsx)("div",{children:"The model name LiteLLM will send to the LLM API"}),m=[{title:(0,t.jsxs)("span",{className:"flex items-center",children:["Public Model Name",(0,t.jsx)(tz,{content:d,width:"500px"})]}),dataIndex:"public_name",key:"public_name",render:(l,s,a)=>(0,t.jsx)(eR.TextInput,{value:l,onChange:t=>{let l=t.target.value,s=[...e.getFieldValue("model_mappings")],r=n===eM.Providers.Anthropic,i=l.endsWith("-1m"),o=e.getFieldValue("litellm_extra_params"),d=!o||""===o.trim(),c=l;if(r&&i&&d){let t=JSON.stringify({extra_headers:{"anthropic-beta":"context-1m-2025-08-07"}},null,2);e.setFieldValue("litellm_extra_params",t),c=l.slice(0,-3)}s[a].public_name=c,e.setFieldValue("model_mappings",s)}})},{title:(0,t.jsxs)("span",{className:"flex items-center",children:["LiteLLM Model Name",(0,t.jsx)(tz,{content:c,width:"360px"})]}),dataIndex:"litellm_model",key:"litellm_model"}];return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(et.Form.Item,{label:"Model Mappings",name:"model_mappings",tooltip:"Map public model names to LiteLLM model names for load balancing",labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",rules:[{required:!0,validator:async(e,t)=>{if(!t||0===t.length)throw Error("At least one model mapping is required");if(t.filter(e=>!e.public_name||""===e.public_name.trim()).length>0)throw Error("All model mappings must have valid public names")}}],children:(0,t.jsx)(tO.Table,{dataSource:e.getFieldValue("model_mappings"),columns:m,pagination:!1,size:"small"},l)})})},tV=({selectedProvider:e,providerModels:l,getPlaceholder:s})=>{let a=et.Form.useFormInstance(),r=t=>{let l=t.target.value,s=(a.getFieldValue("model_mappings")||[]).map(t=>"custom"===t.public_name||"custom"===t.litellm_model?e===eM.Providers.Azure?{public_name:l,litellm_model:`azure/${l}`}:{public_name:l,litellm_model:l}:t);a.setFieldsValue({model_mappings:s})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(et.Form.Item,{label:"LiteLLM Model Name(s)",tooltip:"The model name LiteLLM will send to the LLM API",className:"mb-0",children:[(0,t.jsx)(et.Form.Item,{name:"model",rules:[{required:!0,message:`Please enter ${e===eM.Providers.Azure?"a deployment name":"at least one model"}.`}],noStyle:!0,children:e===eM.Providers.Azure||e===eM.Providers.OpenAI_Compatible||e===eM.Providers.Ollama?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(eR.TextInput,{placeholder:s(e),onChange:e===eM.Providers.Azure?e=>{let t=e.target.value,l=t?[{public_name:t,litellm_model:`azure/${t}`}]:[];a.setFieldsValue({model:t,model_mappings:l})}:void 0})}):l.length>0?(0,t.jsx)(W.Select,{"data-testid":"model-name-select",mode:"multiple",allowClear:!0,showSearch:!0,placeholder:"Select models",onChange:t=>{let l=Array.isArray(t)?t:[t];if(l.includes("all-wildcard"))a.setFieldsValue({model_name:void 0,model_mappings:[]});else if(JSON.stringify(a.getFieldValue("model"))!==JSON.stringify(l)){let t=l.map(t=>e===eM.Providers.Azure?{public_name:t,litellm_model:`azure/${t}`}:{public_name:t,litellm_model:t});a.setFieldsValue({model:l,model_mappings:t})}},optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{label:"Custom Model Name (Enter below)",value:"custom"},{label:`All ${e} Models (Wildcard)`,value:"all-wildcard"},...l.map(e=>({label:e,value:e}))],style:{width:"100%"}}):(0,t.jsx)(eR.TextInput,{placeholder:s(e)})}),(0,t.jsx)(et.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.model!==t.model,children:({getFieldValue:l})=>{let s=l("model")||[];return(Array.isArray(s)?s:[s]).includes("custom")&&(0,t.jsx)(et.Form.Item,{name:"custom_model_name",rules:[{required:!0,message:"Please enter a custom model name."}],className:"mt-2",children:(0,t.jsx)(eR.TextInput,{placeholder:e===eM.Providers.Azure?"Enter Azure deployment name":"Enter custom model name",onChange:r})})}})]}),(0,t.jsxs)(eD.Row,{children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:14,children:(0,t.jsx)(em.Text,{className:"mb-3 mt-1",children:e===eM.Providers.Azure?"Your deployment name will be saved as the public model name, and LiteLLM will use 'azure/deployment-name' internally":"The model name LiteLLM will send to the LLM API"})})]})]})},tD=[{value:"chat",label:"Chat - /chat/completions"},{value:"completion",label:"Completion - /completions"},{value:"embedding",label:"Embedding - /embeddings"},{value:"audio_speech",label:"Audio Speech - /audio/speech"},{value:"audio_transcription",label:"Audio Transcription - /audio/transcriptions"},{value:"image_generation",label:"Image Generation - /images/generations"},{value:"video_generation",label:"Video Generation - /videos"},{value:"rerank",label:"Rerank - /rerank"},{value:"realtime",label:"Realtime - /realtime"},{value:"batch",label:"Batch - /batch"},{value:"ocr",label:"OCR - /ocr"}],{Title:tH,Link:t$}=L.Typography,tG=({form:e,handleOk:s,selectedProvider:a,setSelectedProvider:i,providerModels:o,setProviderModelsFn:n,getPlaceholder:d,uploadProps:c,showAdvancedSettings:m,setShowAdvancedSettings:u,teams:h,credentials:p})=>{let[g,f]=(0,x.useState)("chat"),[j,_]=(0,x.useState)(!1),[y,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)(""),{accessToken:w,userRole:C,premiumUser:S,userId:k}=(0,r.default)(),{data:T,isLoading:F,error:I}=eB(),{data:M}=(0,ty.useGuardrails)(),P=M?.guardrails.map(e=>e.guardrail_name),{data:A,isLoading:O,error:B}=(0,tb.useTags)(),z=async()=>{b(!0),N(`test-${Date.now()}`),_(!0)},[q,V]=(0,x.useState)(!1),[D,H]=(0,x.useState)([]),[$,G]=(0,x.useState)(null);(0,x.useEffect)(()=>{(async()=>{H((await (0,l.modelAvailableCall)(w,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[w]);let U=(0,x.useMemo)(()=>T?[...T].sort((e,t)=>e.provider_display_name.localeCompare(t.provider_display_name)):[],[T]),J=I?I instanceof Error?I.message:"Failed to load providers":null,Q=eX.all_admin_roles.includes(C),Y=(0,eX.isUserTeamAdminForAnyTeam)(h,k);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tH,{level:2,children:"Add Model"}),(0,t.jsx)(ej.Card,{children:(0,t.jsx)(et.Form,{form:e,onFinish:async e=>{console.log("🔥 Form onFinish triggered with values:",e),await s().then(()=>{G(null)})},onFinishFailed:e=>{console.log("💥 Form onFinishFailed triggered:",e)},labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[Y&&!Q&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Select Team",name:"team_id",rules:[{required:!0,message:"Please select a team to continue"}],tooltip:"Select the team for which you want to add this model",children:(0,t.jsx)(tw.default,{onChange:e=>{G(e)}})}),!$&&(0,t.jsx)(tN.Alert,{message:"Team Selection Required",description:"As a team admin, you need to select your team first before adding models.",type:"info",showIcon:!0,className:"mb-4"})]}),(Q||Y&&$)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"E.g. OpenAI, Azure OpenAI, Anthropic, Bedrock, etc.",labelCol:{span:10},labelAlign:"left",children:(0,t.jsxs)(W.Select,{virtual:!1,showSearch:!0,loading:F,placeholder:F?"Loading providers...":"Select a provider",optionFilterProp:"data-label",onChange:t=>{i(t),n(t),e.setFieldsValue({custom_llm_provider:t}),e.setFieldsValue({model:[],model_name:void 0})},children:[J&&0===U.length&&(0,t.jsx)(W.Select.Option,{value:"",children:J},"__error"),U.map(e=>{let l=e.provider_display_name,s=e.provider;return eM.providerLogoMap[l],(0,t.jsx)(W.Select.Option,{value:s,"data-label":l,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(R.ProviderLogo,{provider:s,className:"w-5 h-5"}),(0,t.jsx)("span",{children:l})]})},s)})]})}),(0,t.jsx)(tV,{selectedProvider:a,providerModels:o,getPlaceholder:d}),(0,t.jsx)(tq,{}),(0,t.jsx)(et.Form.Item,{label:"Mode",name:"mode",className:"mb-1",children:(0,t.jsx)(W.Select,{style:{width:"100%"},value:g,onChange:e=>f(e),options:tD})}),(0,t.jsxs)(eD.Row,{children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:10,children:(0,t.jsxs)(em.Text,{className:"mb-5 mt-1",children:[(0,t.jsx)("strong",{children:"Optional"})," - LiteLLM endpoint to use when health checking this model"," ",(0,t.jsx)(t$,{href:"https://docs.litellm.ai/docs/proxy/health#health",target:"_blank",children:"Learn more"})]})})]}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(L.Typography.Text,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter new provider credentials below"})}),(0,t.jsx)(et.Form.Item,{label:"Existing Credentials",name:"litellm_credential_name",initialValue:null,children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{value:null,label:"None"},...p.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,t.jsx)(et.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.litellm_credential_name!==t.litellm_credential_name||e.provider!==t.provider,children:({getFieldValue:e})=>{let l=e("litellm_credential_name");return(console.log("🔑 Credential Name Changed:",l),l)?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,t.jsx)(eJ,{selectedProvider:a,uploadProps:c})]})}}),(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Model Info Settings"}),(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(Q||!Y)&&(0,t.jsx)(et.Form.Item,{label:"Team-BYOK Model",tooltip:"Only use this model + credential combination for this team. Useful when teams want to onboard their own OpenAI keys.",className:"mb-4",children:(0,t.jsx)(E.Tooltip,{title:S?"":"This is an enterprise-only feature. Upgrade to premium to restrict model+credential combinations to a specific team.",placement:"top",children:(0,t.jsx)(tv.Switch,{checked:q,onChange:t=>{V(t),t||e.setFieldValue("team_id",void 0)},disabled:!S})})}),q&&(Q||!Y)&&(0,t.jsx)(et.Form.Item,{label:"Select Team",name:"team_id",className:"mb-4",tooltip:"Only keys for this team will be able to call this model.",rules:[{required:q&&!Q,message:"Please select a team."}],children:(0,t.jsx)(tw.default,{disabled:!S})}),Q&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(et.Form.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to give users access to select models, and add new ones to the group over time.",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:D.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})}),(0,t.jsx)(tR,{showAdvancedSettings:m,setShowAdvancedSettings:u,teams:h,guardrailsList:P||[],tagsList:A||{},accessToken:w||""})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(L.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(K.Button,{"data-testid":"test-connect-btn",onClick:z,loading:y,children:"Test Connect"}),(0,t.jsx)(K.Button,{"data-testid":"add-model-btn",htmlType:"submit",children:"Add Model"})]})]})]})})}),(0,t.jsx)(el.Modal,{title:"Connection Test Results",open:j,onCancel:()=>{_(!1),b(!1)},footer:[(0,t.jsx)(K.Button,{onClick:()=>{_(!1),b(!1)},children:"Close"},"close")],width:700,children:j&&(0,t.jsx)(tt,{formValues:e.getFieldsValue(),accessToken:w,testMode:g,modelName:e.getFieldValue("model_name")||e.getFieldValue("model"),onClose:()=>{_(!1),b(!1)},onTestComplete:()=>b(!1)},v)})]})},tU=({form:e,handleOk:l,selectedProvider:s,setSelectedProvider:a,providerModels:r,setProviderModelsFn:i,getPlaceholder:o,uploadProps:n,showAdvancedSettings:d,setShowAdvancedSettings:c,teams:m,credentials:u,accessToken:h,userRole:x})=>{let[p]=et.Form.useForm();return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(e4.TabGroup,{className:"w-full",children:[(0,t.jsxs)(e5.TabList,{className:"mb-4",children:[(0,t.jsx)(e2.Tab,{children:"Add Model"}),(0,t.jsx)(e2.Tab,{children:"Add Auto Router"})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(tG,{form:e,handleOk:l,selectedProvider:s,setSelectedProvider:a,providerModels:r,setProviderModelsFn:i,getPlaceholder:o,uploadProps:n,showAdvancedSettings:d,setShowAdvancedSettings:c,teams:m,credentials:u})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t_,{form:p,handleOk:()=>{p.validateFields().then(e=>{tl(e,h,p,l)}).catch(e=>{console.error("Validation failed:",e)})},accessToken:h,userRole:x})})]})]})})};var tJ=e.i(798496),tK=e.i(536916),tW=e.i(502275),tQ=e.i(122577);let tY=[{pattern:/Missing .* API Key/i,replacement:"Missing API Key"},{pattern:/Connection timeout/i,replacement:"Connection timeout"},{pattern:/Network.*not.*ok/i,replacement:"Network connection failed"},{pattern:/403.*Forbidden/i,replacement:"Access forbidden - check API key permissions"},{pattern:/401.*Unauthorized/i,replacement:"Unauthorized - invalid API key"},{pattern:/429.*rate limit/i,replacement:"Rate limit exceeded"},{pattern:/500.*Internal Server Error/i,replacement:"Provider internal server error"},{pattern:/litellm\.AuthenticationError/i,replacement:"Authentication failed"},{pattern:/litellm\.RateLimitError/i,replacement:"Rate limit exceeded"},{pattern:/litellm\.APIError/i,replacement:"API error"}],tX=({accessToken:e,modelData:s,all_models_on_proxy:a,getDisplayModelName:r,setSelectedModelId:i,teams:o,isLoading:n=!1,paginationMeta:d,currentPage:c=1,pageSize:m=50,onPageChange:u})=>{let h,p,g,f,[j,_]=(0,x.useState)({}),[y,b]=(0,x.useState)([]),[v,N]=(0,x.useState)(!1),[w,C]=(0,x.useState)(!1),[S,F]=(0,x.useState)(null),[I,M]=(0,x.useState)(!1),[P,A]=(0,x.useState)(null);(0,x.useRef)(null),(0,x.useEffect)(()=>{e&&s?.data&&(async()=>{let t={};s.data.forEach(e=>{let l=e.model_info?.id;l&&(t[l]={status:"none",lastCheck:"None",lastSuccess:"None",loading:!1,error:void 0,fullError:void 0,successResponse:void 0})});try{let a=await (0,l.latestHealthChecksCall)(e);a&&a.latest_health_checks&&"object"==typeof a.latest_health_checks&&Object.entries(a.latest_health_checks).forEach(([e,l])=>{if(!l||!s.data.some(t=>t.model_info?.id===e))return;let a=l.error_message||void 0;t[e]={status:l.status||"unknown",lastCheck:l.checked_at?new Date(l.checked_at).toLocaleString():"None",lastSuccess:"healthy"===l.status&&l.checked_at?new Date(l.checked_at).toLocaleString():"None",loading:!1,error:a?L(a):void 0,fullError:a,successResponse:"healthy"===l.status?l:void 0}})}catch(e){console.warn("Failed to load health check history (using default states):",e)}_(t)})()},[e,s]);let L=e=>{if(!e)return"Health check failed";let t="string"==typeof e?e:JSON.stringify(e),l=t.match(/(\w+Error):\s*(\d{3})/i);if(l)return`${l[1]}: ${l[2]}`;let s=t.match(/(AuthenticationError|RateLimitError|BadRequestError|InternalServerError|TimeoutError|NotFoundError|ForbiddenError|ServiceUnavailableError|BadGatewayError|ContentPolicyViolationError|\w+Error)/i),a=t.match(/\b(400|401|403|404|408|429|500|502|503|504)\b/);if(s&&a)return`${s[1]}: ${a[1]}`;if(a){let e=a[1];return`${({400:"BadRequestError",401:"AuthenticationError",403:"ForbiddenError",404:"NotFoundError",408:"TimeoutError",429:"RateLimitError",500:"InternalServerError",502:"BadGatewayError",503:"ServiceUnavailableError",504:"GatewayTimeoutError"})[e]}: ${e}`}if(s){let e=s[1],t={AuthenticationError:"401",RateLimitError:"429",BadRequestError:"400",InternalServerError:"500",TimeoutError:"408",NotFoundError:"404",ForbiddenError:"403",ServiceUnavailableError:"503",BadGatewayError:"502",GatewayTimeoutError:"504",ContentPolicyViolationError:"400"}[e];return t?`${e}: ${t}`:e}for(let{pattern:e,replacement:l}of tY)if(e.test(t))return l;if(/missing.*api.*key|invalid.*key|unauthorized/i.test(t))return"AuthenticationError: 401";if(/rate.*limit|too.*many.*requests/i.test(t))return"RateLimitError: 429";if(/timeout|timed.*out/i.test(t))return"TimeoutError: 408";if(/not.*found/i.test(t))return"NotFoundError: 404";if(/forbidden|access.*denied/i.test(t))return"ForbiddenError: 403";if(/internal.*server.*error/i.test(t))return"InternalServerError: 500";let r=t.replace(/[\n\r]+/g," ").replace(/\s+/g," ").trim(),i=r.split(/[.!?]/),o=i[0]?.trim();return o&&o.length>0?o.length>100?o.substring(0,97)+"...":o:r.length>100?r.substring(0,97)+"...":r},R=async t=>{if(e){_(e=>({...e,[t]:{...e[t],loading:!0,status:"checking"}}));try{let s=await (0,l.individualModelHealthCheckCall)(e,t),a=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){let e=s.unhealthy_endpoints[0]?.error||"Health check failed",l=L(e);_(s=>({...s,[t]:{status:"unhealthy",lastCheck:a,lastSuccess:s[t]?.lastSuccess||"None",loading:!1,error:l,fullError:e}}))}else _(e=>({...e,[t]:{status:"healthy",lastCheck:a,lastSuccess:a,loading:!1,successResponse:s}}));try{let s=await (0,l.latestHealthChecksCall)(e),a=s.latest_health_checks?.[t];if(a){let e=a.error_message||void 0;_(l=>({...l,[t]:{status:a.status||l[t]?.status||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():l[t]?.lastCheck||"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():l[t]?.lastSuccess||"None",loading:!1,error:e?L(e):l[t]?.error,fullError:e||l[t]?.fullError,successResponse:"healthy"===a.status?a:l[t]?.successResponse}}))}}catch(e){console.debug("Could not fetch updated status from database (non-critical):",e)}}catch(a){let e=new Date().toLocaleString(),l=a instanceof Error?a.message:String(a),s=L(l);_(a=>({...a,[t]:{status:"unhealthy",lastCheck:e,lastSuccess:a[t]?.lastSuccess||"None",loading:!1,error:s,fullError:l}}))}}},O=async()=>{let t=y.length>0?y:a,s=t.reduce((e,t)=>(e[t]={...j[t],loading:!0,status:"checking"},e),{});_(e=>({...e,...s}));let r={},i=t.map(async t=>{if(e)try{let s=await (0,l.individualModelHealthCheckCall)(e,t);r[t]=s;let a=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){let e=s.unhealthy_endpoints[0]?.error||"Health check failed",l=L(e);_(s=>({...s,[t]:{status:"unhealthy",lastCheck:a,lastSuccess:s[t]?.lastSuccess||"None",loading:!1,error:l,fullError:e}}))}else _(e=>({...e,[t]:{status:"healthy",lastCheck:a,lastSuccess:a,loading:!1,successResponse:s}}))}catch(a){console.error(`Health check failed for model id ${t}:`,a);let e=new Date().toLocaleString(),l=a instanceof Error?a.message:String(a),s=L(l);_(a=>({...a,[t]:{status:"unhealthy",lastCheck:e,lastSuccess:a[t]?.lastSuccess||"None",loading:!1,error:s,fullError:l}}))}});await Promise.allSettled(i);try{if(!e)return;let s=await (0,l.latestHealthChecksCall)(e);s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(([e,l])=>{if(t.includes(e)&&l){let t=l.error_message||void 0;_(s=>{let a=s[e];return{...s,[e]:{status:l.status||a?.status||"unknown",lastCheck:l.checked_at?new Date(l.checked_at).toLocaleString():a?.lastCheck||"None",lastSuccess:"healthy"===l.status&&l.checked_at?new Date(l.checked_at).toLocaleString():a?.lastSuccess||"None",loading:!1,error:t?L(t):a?.error,fullError:t||a?.fullError,successResponse:"healthy"===l.status?l:a?.successResponse}}})}})}catch(e){console.warn("Failed to fetch updated health statuses from database (non-critical):",e)}},B=e=>{N(e),e?b(a):b([])},z=e=>{b([]),N(!1),_({}),u?.(e)},q=()=>{C(!1),F(null)},V=()=>{M(!1),A(null)},D=(s?.data??[]).map(e=>{let t=e.model_info?.id,l=(t?j[t]:null)||{status:"none",lastCheck:"None",loading:!1};return{model_name:e.model_name,model_info:e.model_info,provider:e.provider,litellm_model_name:e.litellm_model_name,health_status:l.status,last_check:l.lastCheck,last_success:l.lastSuccess||"None",health_loading:l.loading,health_error:l.error,health_full_error:l.fullError}}),H=!!(d&&u),$=d?.total_count??0,G=d?.total_pages??1,U=d?.current_page??c,J=d?.size??m,W=H&&$>0?(U-1)*J+1:0,Q=H?Math.min(U*J,$):0;return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eu.Title,{children:"Model Health Status"}),(0,t.jsx)(em.Text,{className:"text-gray-600 mt-1",children:"Run health checks on individual models to verify they are working correctly"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[y.length>0&&(0,t.jsx)(T.Button,{size:"sm",variant:"light",onClick:()=>B(!1),className:"px-3 py-1 text-sm",children:"Clear Selection"}),(0,t.jsx)(T.Button,{size:"sm",variant:"secondary",onClick:O,disabled:Object.values(j).some(e=>e.loading),className:"px-3 py-1 text-sm",children:y.length>0&&y.length0?`Showing ${W} - ${Q} of ${$} results`:"Showing 0 results"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("button",{onClick:()=>z(c-1),disabled:n||1===c,className:`px-3 py-1 text-sm border rounded-md ${n||1===c?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,t.jsx)("button",{onClick:()=>z(c+1),disabled:n||c>=G,className:`px-3 py-1 text-sm border rounded-md ${n||c>=G?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})]}),(0,t.jsx)(tJ.ModelDataTable,{columns:(h=(e,t)=>{t?b(t=>[...t,e]):(b(t=>t.filter(t=>t!==e)),N(!1))},p=e=>{switch(e){case"healthy":return(0,t.jsx)(k.Badge,{color:"emerald",children:"healthy"});case"unhealthy":return(0,t.jsx)(k.Badge,{color:"red",children:"unhealthy"});case"checking":return(0,t.jsx)(k.Badge,{color:"blue",children:"checking"});case"none":return(0,t.jsx)(k.Badge,{color:"gray",children:"none"});default:return(0,t.jsx)(k.Badge,{color:"gray",children:"unknown"})}},g=(e,t,l)=>{F({modelName:e,cleanedError:t,fullError:l}),C(!0)},f=(e,t)=>{A({modelName:e,response:t}),M(!0)},[{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tK.Checkbox,{checked:v,indeterminate:y.length>0&&!v,onChange:e=>B(e.target.checked),onClick:e=>e.stopPropagation()}),(0,t.jsx)("span",{children:"Model ID"})]}),accessorKey:"model_info.id",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=y.includes(s);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tK.Checkbox,{checked:a,onChange:e=>h(s,e.target.checked),onClick:e=>e.stopPropagation()}),(0,t.jsx)(E.Tooltip,{title:l.model_info.id,children:(0,t.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>i&&i(l.model_info.id),children:l.model_info.id})})]})}},{header:"Model Name",accessorKey:"model_name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=r(l)||l.model_name;return(0,t.jsx)("div",{className:"font-medium text-sm",children:(0,t.jsx)(E.Tooltip,{title:s,children:(0,t.jsx)("div",{className:"truncate max-w-[200px]",children:s})})})}},{header:"Team Alias",accessorKey:"model_info.team_id",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=l.model_info?.team_id;if(!s)return(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"-"});let a=o?.find(e=>e.team_id===s),r=a?.team_alias||s;return(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsx)(E.Tooltip,{title:r,children:(0,t.jsx)("div",{className:"truncate max-w-[150px]",children:r})})})}},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("health_status")||"unknown",a=t.getValue("health_status")||"unknown",r={healthy:0,checking:1,unknown:2,unhealthy:3};return(r[s]??4)-(r[a]??4)},cell:({row:e})=>{let l=e.original,s={status:l.health_status,loading:l.health_loading,error:l.health_error};if(s.loading)return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse"}),(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}),(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:"Checking..."})]});let a=l.model_info?.id??"",i=r(l)||l.model_name,o="healthy"===s.status&&j[a]?.successResponse;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[p(s.status),o&&f&&(0,t.jsx)(E.Tooltip,{title:"View response details",placement:"top",children:(0,t.jsx)("button",{onClick:()=>f(i,j[a]?.successResponse),className:"p-1 text-green-600 hover:text-green-800 hover:bg-green-50 rounded cursor-pointer transition-colors",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"h-4 w-4"})})})]})}},{header:"Error Details",accessorKey:"health_error",enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=r(l)||l.model_name,i=j[s];if(!i?.error)return(0,t.jsx)(em.Text,{className:"text-gray-400 text-sm",children:"No errors"});let o=i.error,n=i.fullError||i.error;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"max-w-[200px]",children:(0,t.jsx)(E.Tooltip,{title:o,placement:"top",children:(0,t.jsx)(em.Text,{className:"text-red-600 text-sm truncate",children:o})})}),g&&n!==o&&(0,t.jsx)(E.Tooltip,{title:"View full error details",placement:"top",children:(0,t.jsx)("button",{onClick:()=>g(a,o,n),className:"p-1 text-red-600 hover:text-red-800 hover:bg-red-50 rounded cursor-pointer transition-colors",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"h-4 w-4"})})})]})}},{header:"Last Check",accessorKey:"last_check",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("last_check")||"Never checked",a=t.getValue("last_check")||"Never checked";if("Never checked"===s&&"Never checked"===a)return 0;if("Never checked"===s)return 1;if("Never checked"===a)return -1;if("Check in progress..."===s&&"Check in progress..."===a)return 0;if("Check in progress..."===s)return -1;if("Check in progress..."===a)return 1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:({row:e})=>{let l=e.original;return(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:l.health_loading?"Check in progress...":l.last_check})}},{header:"Last Success",accessorKey:"last_success",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("last_success")||"Never succeeded",a=t.getValue("last_success")||"Never succeeded";if("Never succeeded"===s&&"Never succeeded"===a)return 0;if("Never succeeded"===s)return 1;if("Never succeeded"===a)return -1;if("None"===s&&"None"===a)return 0;if("None"===s)return 1;if("None"===a)return -1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:({row:e})=>{let l=e.original,s=j[l.model_info?.id??""],a=s?.lastSuccess||"None";return(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:a})}},{header:"Actions",id:"actions",cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=l.health_status&&"none"!==l.health_status,r=l.health_loading?"Checking...":a?"Re-run Health Check":"Run Health Check";return(0,t.jsx)(E.Tooltip,{title:r,placement:"top",children:(0,t.jsx)("button",{"data-testid":"run-health-check-btn",className:`p-2 rounded-md transition-colors ${l.health_loading?"text-gray-400 cursor-not-allowed bg-gray-100":"text-indigo-600 hover:text-indigo-700 hover:bg-indigo-50"}`,onClick:()=>{l.health_loading||R(s)},disabled:l.health_loading,children:l.health_loading?(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse"}),(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}):a?(0,t.jsx)(e0.RefreshIcon,{className:"h-4 w-4"}):(0,t.jsx)(tQ.PlayIcon,{className:"h-4 w-4"})})})},enableSorting:!1}]),data:D,isLoading:n})]}),(0,t.jsx)(el.Modal,{title:S?`Health Check Error - ${S.modelName}`:"Error Details",open:w,onCancel:q,footer:[(0,t.jsx)(K.Button,{onClick:q,children:"Close"},"close")],width:800,children:S&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Error:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,t.jsx)(em.Text,{className:"text-red-800",children:S.cleanedError})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Full Error Details:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:S.fullError})})]})]})}),(0,t.jsx)(el.Modal,{title:P?`Health Check Response - ${P.modelName}`:"Response Details",open:I,onCancel:V,footer:[(0,t.jsx)(K.Button,{onClick:V,children:"Close"},"close")],width:800,children:P&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Status:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-green-50 border border-green-200 rounded-md",children:(0,t.jsx)(em.Text,{className:"text-green-800",children:"Health check passed successfully"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Response Details:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:JSON.stringify(P.response,null,2)})})]})]})})]})};var tZ=e.i(250980),t0=e.i(797672),t1=e.i(871943),t2=e.i(502547);let t4=({accessToken:e,initialModelGroupAlias:s={},onAliasUpdate:a})=>{let[r,i]=(0,x.useState)([]),[o,n]=(0,x.useState)({aliasName:"",targetModelGroup:""}),[d,c]=(0,x.useState)(null),[m,u]=(0,x.useState)(!0);(0,x.useEffect)(()=>{i(Object.entries(s).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModelGroup:"string"==typeof t?t:t?.model??""})))},[s]);let h=async t=>{if(!e)return console.error("Access token is missing"),!1;try{let s={};return t.forEach(e=>{s[e.aliasName]=e.targetModelGroup}),console.log("Saving model group alias:",s),await (0,l.setCallbacksCall)(e,{router_settings:{model_group_alias:s}}),a&&a(s),!0}catch(e){return console.error("Failed to save model group alias settings:",e),D.default.fromBackend("Failed to save model group alias settings"),!1}},b=async()=>{if(!o.aliasName||!o.targetModelGroup)return void D.default.fromBackend("Please provide both alias name and target model group");if(r.some(e=>e.aliasName===o.aliasName))return void D.default.fromBackend("An alias with this name already exists");let e=[...r,{id:`${Date.now()}-${o.aliasName}`,aliasName:o.aliasName,targetModelGroup:o.targetModelGroup}];await h(e)&&(i(e),n({aliasName:"",targetModelGroup:""}),D.default.success("Alias added successfully"))},v=async()=>{if(!d)return;if(!d.aliasName||!d.targetModelGroup)return void D.default.fromBackend("Please provide both alias name and target model group");if(r.some(e=>e.id!==d.id&&e.aliasName===d.aliasName))return void D.default.fromBackend("An alias with this name already exists");let e=r.map(e=>e.id===d.id?d:e);await h(e)&&(i(e),c(null),D.default.success("Alias updated successfully"))},N=()=>{c(null)},w=async e=>{let t=r.filter(t=>t.id!==e);await h(t)&&(i(t),D.default.success("Alias deleted successfully"))},C=r.reduce((e,t)=>(e[t.aliasName]=t.targetModelGroup,e),{});return(0,t.jsxs)(eL.Card,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>u(!m),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(eu.Title,{className:"mb-0",children:"Model Group Alias Settings"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Create aliases for your model groups to simplify API calls. For example, you can create an alias 'gpt-4o' that points to 'gpt-4o-mini-openai' model group."})]}),(0,t.jsx)("div",{className:"flex items-center",children:m?(0,t.jsx)(t1.ChevronDownIcon,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(t2.ChevronRightIcon,{className:"w-5 h-5 text-gray-500"})})]}),m&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(em.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:o.aliasName,onChange:e=>n({...o,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 Group"}),(0,t.jsx)("input",{type:"text",value:o.targetModelGroup,onChange:e=>n({...o,targetModelGroup:e.target.value}),placeholder:"e.g., gpt-4o-mini-openai",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:b,disabled:!o.aliasName||!o.targetModelGroup,className:`flex items-center px-4 py-2 rounded-md text-sm ${!o.aliasName||!o.targetModelGroup?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(tZ.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(em.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)(p.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(_.TableRow,{children:[(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Target Model Group"}),(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(j.TableBody,{children:[r.map(e=>(0,t.jsx)(_.TableRow,{className:"h-8",children:d&&d.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:d.aliasName,onChange:e=>c({...d,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(y.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:d.targetModelGroup,onChange:e=>c({...d,targetModelGroup:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(y.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:v,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:N,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.TableCell,{className:"py-0.5 text-sm text-gray-900",children:e.aliasName}),(0,t.jsx)(y.TableCell,{className:"py-0.5 text-sm text-gray-500",children:e.targetModelGroup}),(0,t.jsx)(y.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{c({...e})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(t0.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>w(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(S.TrashIcon,{className:"w-3 h-3"})})]})})]})},e.id)),0===r.length&&(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(y.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(eu.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(em.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config.yaml:"}),(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:["router_settings:",(0,t.jsx)("br",{}),"  model_group_alias:",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))]})})]})]})]})};var t5=e.i(530212);let t6=x.forwardRef(function(e,t){return x.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),x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"}))});var t3=e.i(678784),t8=e.i(118366),t7=e.i(500330);let t9=({isVisible:e,onCancel:s,onSuccess:a,modelData:r,accessToken:i,userRole:o})=>{let[n]=et.Form.useForm(),[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)([]),[h,p]=(0,x.useState)([]),[g,f]=(0,x.useState)(!1),[j,_]=(0,x.useState)(!1),[y,b]=(0,x.useState)(null);(0,x.useEffect)(()=>{e&&r&&v()},[e,r]),(0,x.useEffect)(()=>{let t=async()=>{if(i)try{let e=await (0,l.modelAvailableCall)(i,"","",!1,null,!0,!0);u(e.data.map(e=>e.id))}catch(e){console.error("Error fetching model access groups:",e)}},s=async()=>{if(i)try{let e=await (0,ts.fetchAvailableModels)(i);p(e)}catch(e){console.error("Error fetching model info:",e)}};e&&(t(),s())},[e,i]);let v=()=>{try{let e=null;r.litellm_params?.auto_router_config&&(e="string"==typeof r.litellm_params.auto_router_config?JSON.parse(r.litellm_params.auto_router_config):r.litellm_params.auto_router_config),b(e),n.setFieldsValue({auto_router_name:r.model_name,auto_router_default_model:r.litellm_params?.auto_router_default_model||"",auto_router_embedding_model:r.litellm_params?.auto_router_embedding_model||"",model_access_group:r.model_info?.access_groups||[]});let t=new Set(h.map(e=>e.model_group));f(!t.has(r.litellm_params?.auto_router_default_model)),_(!t.has(r.litellm_params?.auto_router_embedding_model))}catch(e){console.error("Error parsing auto router config:",e),D.default.fromBackend("Error loading auto router configuration")}},N=async()=>{try{c(!0);let e=await n.validateFields(),t={...r.litellm_params,auto_router_config:JSON.stringify(y),auto_router_default_model:e.auto_router_default_model,auto_router_embedding_model:e.auto_router_embedding_model||void 0},o={...r.model_info,access_groups:e.model_access_group||[]},d={model_name:e.auto_router_name,litellm_params:t,model_info:o};await (0,l.modelPatchUpdateCall)(i,d,r.model_info.id);let m={...r,model_name:e.auto_router_name,litellm_params:t,model_info:o};D.default.success("Auto router configuration updated successfully"),a(m),s()}catch(e){console.error("Error updating auto router:",e),D.default.fromBackend("Failed to update auto router configuration")}finally{c(!1)}},w=h.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsx)(el.Modal,{title:"Edit Auto Router Configuration",open:e,onCancel:s,footer:[(0,t.jsx)(K.Button,{onClick:s,children:"Cancel"},"cancel"),(0,t.jsx)(K.Button,{loading:d,onClick:N,children:"Save Changes"},"submit")],width:1e3,destroyOnHidden:!0,children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(em.Text,{className:"text-gray-600",children:"Edit the auto router configuration including routing logic, default models, and access settings."}),(0,t.jsxs)(et.Form,{form:n,layout:"vertical",className:"space-y-4",children:[(0,t.jsx)(et.Form.Item,{label:"Auto Router Name",name:"auto_router_name",rules:[{required:!0,message:"Auto router name is required"}],children:(0,t.jsx)(eR.TextInput,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(tc,{modelInfo:h,value:y,onChange:e=>{b(e)}})}),(0,t.jsx)(et.Form.Item,{label:"Default Model",name:"auto_router_default_model",rules:[{required:!0,message:"Default model is required"}],children:(0,t.jsx)(W.Select,{placeholder:"Select a default model",onChange:e=>{f("custom"===e)},options:[...w,{value:"custom",label:"Enter custom model name"}],showSearch:!0})}),(0,t.jsx)(et.Form.Item,{label:"Embedding Model",name:"auto_router_embedding_model",children:(0,t.jsx)(W.Select,{placeholder:"Select an embedding model (optional)",onChange:e=>{_("custom"===e)},options:[...w,{value:"custom",label:"Enter custom model name"}],showSearch:!0,allowClear:!0})}),"Admin"===o&&(0,t.jsx)(et.Form.Item,{label:"Model Access Groups",name:"model_access_group",tooltip:"Control who can access this auto router",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:m.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})]})]})})},{Title:le,Link:lt}=L.Typography,ll=({isVisible:e,onCancel:l,onAddCredential:s,existingCredential:a,setIsCredentialModalOpen:r})=>{let[i]=et.Form.useForm();return console.log(`existingCredential in add credentials tab: ${JSON.stringify(a)}`),(0,t.jsx)(el.Modal,{title:"Reuse Credentials",open:e,onCancel:()=>{l(),i.resetFields()},footer:null,width:600,children:(0,t.jsxs)(et.Form,{form:i,onFinish:e=>{s(e),i.resetFields(),r(!1)},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:a?.credential_name,children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter a friendly name for these credentials"})}),Object.entries(a?.credential_values||{}).map(([e,l])=>(0,t.jsx)(et.Form.Item,{label:e,name:e,initialValue:l,children:(0,t.jsx)(eR.TextInput,{placeholder:`Enter ${e}`,disabled:!0})},e)),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(lt,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Button,{onClick:()=>{l(),i.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,t.jsx)(K.Button,{htmlType:"submit",children:"Reuse Credentials"})]})]})]})})};function ls({modelId:e,onClose:s,accessToken:a,userID:r,userRole:i,onModelUpdate:o,modelAccessGroups:c}){let m,[u]=et.Form.useForm(),[h,p]=(0,x.useState)(null),[g,f]=(0,x.useState)(!1),[j,_]=(0,x.useState)(!1),[y,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)(!1),[C,k]=(0,x.useState)(!1),[F,I]=(0,x.useState)(!1),[M,P]=(0,x.useState)(null),[A,L]=(0,x.useState)(!1),[R,O]=(0,x.useState)({}),[B,z]=(0,x.useState)(!1),[H,$]=(0,x.useState)([]),[J,Q]=(0,x.useState)({}),[Y,X]=(0,x.useState)([]),{data:Z,isLoading:ee}=(0,d.useModelsInfo)(1,50,void 0,e),{data:es}=(0,n.useModelCostMap)(),{data:ea}=(0,d.useModelHub)(),er=e=>null!=es&&"object"==typeof es&&e in es?es[e].litellm_provider:"openai",eo=(0,x.useMemo)(()=>Z?.data&&0!==Z.data.length&&ei(Z,er).data[0]||null,[Z,es]),en=("Admin"===i||eo?.model_info?.created_by===r)&&eo?.model_info?.db_model,ed="Admin"===i,ec=eo?.litellm_params?.auto_router_config!=null,eh=eo?.litellm_params?.litellm_credential_name!=null&&eo?.litellm_params?.litellm_credential_name!=void 0;(0,x.useEffect)(()=>{if(eo&&!h){let e=eo;e.litellm_model_name||(e={...e,litellm_model_name:e?.litellm_params?.litellm_model_name??e?.litellm_params?.model??e?.model_info?.key??null}),p(e),e?.litellm_params?.cache_control_injection_points&&L(!0)}},[eo,h]),(0,x.useEffect)(()=>{let t=async()=>{if(!a||eo)return;let t=(await (0,l.modelInfoV1Call)(a,e)).data[0];t&&!t.litellm_model_name&&(t={...t,litellm_model_name:t?.litellm_params?.litellm_model_name??t?.litellm_params?.model??t?.model_info?.key??null}),p(t),t?.litellm_params?.cache_control_injection_points&&L(!0)},s=async()=>{if(a)try{let e=(await (0,l.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);$(e)}catch(e){console.error("Failed to fetch guardrails:",e)}},r=async()=>{if(a)try{let e=await (0,l.tagListCall)(a);Q(e)}catch(e){console.error("Failed to fetch tags:",e)}},i=async()=>{if(a)try{let e=await (0,l.credentialListCall)(a);X(e.credentials||[])}catch(e){console.error("Failed to fetch credentials:",e)}};(async()=>{if(!a||eh)return;let t=await (0,l.credentialGetCall)(a,null,e);P({credential_name:t.credential_name,credential_values:t.credential_values,credential_info:t.credential_info})})(),t(),s(),r(),i()},[a,e]);let ex=async t=>{if(!a)return;let s={credential_name:t.credential_name,model_id:e,credential_info:{custom_llm_provider:h.litellm_params?.custom_llm_provider}};D.default.info("Storing credential.."),await (0,l.credentialCreateCall)(a,s),D.default.success("Credential stored successfully")},ep=async t=>{try{let s;if(!a)return;k(!0);let r={};try{r=t.litellm_extra_params?JSON.parse(t.litellm_extra_params):{},delete r.litellm_credential_name}catch(e){D.default.fromBackend("Invalid JSON in LiteLLM Params"),k(!1);return}let i={...t.litellm_params,...r,model:t.litellm_model_name,api_base:t.api_base,custom_llm_provider:t.custom_llm_provider,organization:t.organization,tpm:t.tpm,rpm:t.rpm,max_retries:t.max_retries,timeout:t.timeout,stream_timeout:t.stream_timeout,tags:t.tags};u.isFieldTouched("input_cost")&&void 0!==t.input_cost&&null!==t.input_cost&&(i.input_cost_per_token=Number(t.input_cost)/1e6),u.isFieldTouched("output_cost")&&void 0!==t.output_cost&&null!==t.output_cost&&(i.output_cost_per_token=Number(t.output_cost)/1e6),t.litellm_credential_name?i.litellm_credential_name=t.litellm_credential_name:delete i.litellm_credential_name,t.guardrails&&(i.guardrails=t.guardrails),t.vector_store_ids?.length>0?i.vector_store_ids=t.vector_store_ids:void 0!==t.vector_store_ids?i.vector_store_ids=[]:delete i.vector_store_ids,t.cache_control&&t.cache_control_injection_points?.length>0?i.cache_control_injection_points=t.cache_control_injection_points:delete i.cache_control_injection_points;try{s=t.model_info?JSON.parse(t.model_info):eo.model_info,t.model_access_group&&(s={...s,access_groups:t.model_access_group}),void 0!==t.health_check_model&&(s={...s,health_check_model:t.health_check_model})}catch(e){D.default.fromBackend("Invalid JSON in Model Info");return}let n={model_name:t.model_name,litellm_params:i,model_info:s};await (0,l.modelPatchUpdateCall)(a,n,e);let d={...h,model_name:t.model_name,litellm_model_name:t.litellm_model_name,litellm_params:i,model_info:s};p(d),o&&o(d),D.default.success("Model settings updated successfully"),N(!1),I(!1)}catch(e){console.error("Error updating model:",e),D.default.fromBackend("Failed to update model settings")}finally{k(!1)}};if(ee)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsx)(em.Text,{children:"Loading..."})]});if(!eo)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsx)(em.Text,{children:"Model not found"})]});let eg=async()=>{if(a)try{D.default.info("Testing connection...");let e=await (0,l.testConnectionRequest)(a,{custom_llm_provider:h.litellm_params.custom_llm_provider,litellm_credential_name:h.litellm_params.litellm_credential_name,model:h.litellm_model_name},{mode:h.model_info?.mode},h.model_info?.mode);if("success"===e.status)D.default.success("Connection test successful!");else throw Error(e?.result?.error||e?.message||"Unknown error")}catch(e){e instanceof Error?D.default.error("Error testing connection: "+(0,tE.truncateString)(e.message,100)):D.default.error("Error testing connection: "+String(e))}},ef=async()=>{try{if(_(!0),!a)return;await (0,l.modelDeleteCall)(a,e),D.default.success("Model deleted successfully"),o&&o({deleted:!0,model_info:{id:e}}),s()}catch(e){console.error("Error deleting the model:",e),D.default.fromBackend("Failed to delete model")}finally{_(!1),f(!1)}},ej=async(e,t)=>{await (0,t7.copyToClipboard)(e)&&(O(e=>({...e,[t]:!0})),setTimeout(()=>{O(e=>({...e,[t]:!1}))},2e3))},e_=eo.litellm_model_name.includes("*");return(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)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsxs)(eu.Title,{children:["Public Model Name: ",q(eo)]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(em.Text,{className:"text-gray-500 font-mono",children:eo.model_info.id}),(0,t.jsx)(K.Button,{type:"text",size:"small",icon:R["model-id"]?(0,t.jsx)(t3.CheckIcon,{size:12}):(0,t.jsx)(t8.CopyIcon,{size:12}),onClick:()=>ej(eo.model_info.id,"model-id"),className:`left-2 z-10 transition-all duration-200 ${R["model-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(T.Button,{variant:"secondary",icon:e0.RefreshIcon,onClick:eg,className:"flex items-center gap-2","data-testid":"test-connection-button",children:"Test Connection"}),(0,t.jsx)(T.Button,{icon:t6,variant:"secondary",onClick:()=>b(!0),className:"flex items-center",disabled:!ed,"data-testid":"reuse-credentials-button",children:"Re-use Credentials"}),(0,t.jsx)(T.Button,{icon:S.TrashIcon,variant:"secondary",onClick:()=>f(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-700",disabled:!en,"data-testid":"delete-model-button",children:"Delete Model"})]})]}),(0,t.jsxs)(e4.TabGroup,{children:[(0,t.jsxs)(e5.TabList,{className:"mb-6",children:[(0,t.jsx)(e2.Tab,{children:"Overview"}),(0,t.jsx)(e2.Tab,{children:"Raw JSON"})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsxs)(G.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6 mb-6",children:[(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Provider"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[eo.provider&&(0,t.jsx)("img",{src:(0,eM.getProviderLogoAndName)(eo.provider).logo,alt:`${eo.provider} logo`,className:"w-4 h-4",onError:e=>{let t=e.currentTarget,l=t.parentElement;if(l&&l.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=eo.provider?.charAt(0)||"-",l.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}),(0,t.jsx)(eu.Title,{children:eo.provider||"Not Set"})]})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"LiteLLM Model"}),(0,t.jsx)("div",{className:"mt-2 overflow-hidden",children:(0,t.jsx)(E.Tooltip,{title:eo.litellm_model_name||"Not Set",children:(0,t.jsx)("div",{className:"break-all text-sm font-medium leading-relaxed cursor-pointer",children:eo.litellm_model_name||"Not Set"})})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Pricing"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(em.Text,{children:["Input: $",eo.input_cost,"/1M tokens"]}),(0,t.jsxs)(em.Text,{children:["Output: $",eo.output_cost,"/1M tokens"]})]})]})]}),(0,t.jsxs)("div",{className:"mb-6 text-sm text-gray-500 flex items-center gap-x-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-2",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:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Created At"," ",eo.model_info.created_at?new Date(eo.model_info.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not Set"]}),(0,t.jsxs)("div",{className:"flex items-center gap-x-2",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:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),"Created By ",eo.model_info.created_by||"Not Set"]})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eu.Title,{children:"Model Settings"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[ec&&en&&!F&&(0,t.jsx)(T.Button,{onClick:()=>z(!0),className:"flex items-center",children:"Edit Auto Router"}),en?!F&&(0,t.jsx)(T.Button,{onClick:()=>I(!0),className:"flex items-center",children:"Edit Settings"}):(0,t.jsx)(E.Tooltip,{title:"Only DB models can be edited. You must be an admin or the creator of the model to edit it.",children:(0,t.jsx)(w.InfoCircleOutlined,{})})]})]}),h?(0,t.jsx)(et.Form,{form:u,onFinish:ep,initialValues:{model_name:h.model_name,litellm_model_name:h.litellm_model_name,api_base:h.litellm_params.api_base,custom_llm_provider:h.litellm_params.custom_llm_provider,organization:h.litellm_params.organization,tpm:h.litellm_params.tpm,rpm:h.litellm_params.rpm,max_retries:h.litellm_params.max_retries,timeout:h.litellm_params.timeout,stream_timeout:h.litellm_params.stream_timeout,input_cost:h.litellm_params.input_cost_per_token?1e6*h.litellm_params.input_cost_per_token:h.model_info?.input_cost_per_token*1e6||null,output_cost:h.litellm_params?.output_cost_per_token?1e6*h.litellm_params.output_cost_per_token:h.model_info?.output_cost_per_token*1e6||null,cache_control:!!h.litellm_params?.cache_control_injection_points,cache_control_injection_points:h.litellm_params?.cache_control_injection_points||[],model_access_group:Array.isArray(h.model_info?.access_groups)?h.model_info.access_groups:[],guardrails:Array.isArray(h.litellm_params?.guardrails)?h.litellm_params.guardrails:[],vector_store_ids:Array.isArray(h.litellm_params?.vector_store_ids)&&h.litellm_params.vector_store_ids.length>0?h.litellm_params.vector_store_ids:void 0,tags:Array.isArray(h.litellm_params?.tags)?h.litellm_params.tags:[],health_check_model:e_?h.model_info?.health_check_model:null,litellm_credential_name:h.litellm_params?.litellm_credential_name||"",litellm_extra_params:JSON.stringify(Object.fromEntries(Object.entries(h.litellm_params||{}).filter(([e])=>"litellm_credential_name"!==e)),null,2)},layout:"vertical",onValuesChange:()=>N(!0),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Name"}),F?(0,t.jsx)(et.Form.Item,{name:"model_name",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter model name"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"LiteLLM Model Name"}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_model_name",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter LiteLLM model name"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_model_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Input Cost (per 1M tokens)"}),F?(0,t.jsx)(et.Form.Item,{name:"input_cost",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter input cost"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h?.litellm_params?.input_cost_per_token?(h.litellm_params?.input_cost_per_token*1e6).toFixed(4):h?.model_info?.input_cost_per_token?(1e6*h.model_info.input_cost_per_token).toFixed(4):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Output Cost (per 1M tokens)"}),F?(0,t.jsx)(et.Form.Item,{name:"output_cost",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter output cost"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h?.litellm_params?.output_cost_per_token?(1e6*h.litellm_params.output_cost_per_token).toFixed(4):h?.model_info?.output_cost_per_token?(1e6*h.model_info.output_cost_per_token).toFixed(4):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"API Base"}),F?(0,t.jsx)(et.Form.Item,{name:"api_base",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter API base"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.api_base||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Custom LLM Provider"}),F?(0,t.jsx)(et.Form.Item,{name:"custom_llm_provider",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter custom LLM provider"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.custom_llm_provider||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Organization"}),F?(0,t.jsx)(et.Form.Item,{name:"organization",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter organization"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.organization||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"TPM (Tokens per Minute)"}),F?(0,t.jsx)(et.Form.Item,{name:"tpm",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter TPM"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.tpm||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"RPM (Requests per Minute)"}),F?(0,t.jsx)(et.Form.Item,{name:"rpm",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter RPM"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.rpm||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Max Retries"}),F?(0,t.jsx)(et.Form.Item,{name:"max_retries",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter max retries"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.max_retries||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Timeout (seconds)"}),F?(0,t.jsx)(et.Form.Item,{name:"timeout",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter timeout"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.timeout||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Stream Timeout (seconds)"}),F?(0,t.jsx)(et.Form.Item,{name:"stream_timeout",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter stream timeout"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.stream_timeout||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Access Groups"}),F?(0,t.jsx)(et.Form.Item,{name:"model_access_group",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:c?.map(e=>({value:e,label:e}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_info?.access_groups?Array.isArray(h.model_info.access_groups)?h.model_info.access_groups.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.model_info.access_groups.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No groups assigned":h.model_info.access_groups:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["Guardrails",(0,t.jsx)(E.Tooltip,{title:"Apply safety guardrails to this model 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)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"guardrails",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing guardrails or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:H.map(e=>({value:e,label:e}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.guardrails?Array.isArray(h.litellm_params.guardrails)?h.litellm_params.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.guardrails.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:e},l))}):"No guardrails assigned":h.litellm_params.guardrails:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["Attached Knowledge Bases (RAG)",(0,t.jsx)(E.Tooltip,{title:"Vector stores used for RAG. Every request to this model will automatically retrieve context from these knowledge bases.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/knowledgebase",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"vector_store_ids",className:"mb-0",children:(0,t.jsx)(tA.default,{onChange:()=>{},accessToken:a||"",placeholder:"Select knowledge bases (optional)"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.vector_store_ids?Array.isArray(h.litellm_params.vector_store_ids)?h.litellm_params.vector_store_ids.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.vector_store_ids.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No knowledge bases attached":String(h.litellm_params.vector_store_ids):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Tags"}),F?(0,t.jsx)(et.Form.Item,{name:"tags",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing tags or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:Object.values(J).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.tags?Array.isArray(h.litellm_params.tags)?h.litellm_params.tags.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.tags.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:e},l))}):"No tags assigned":h.litellm_params.tags:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Existing Credentials"}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_credential_name",className:"mb-0",children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{value:"",label:"None"},...Y.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.litellm_credential_name||"Manual"})]}),e_&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Health Check Model"}),F?(0,t.jsx)(et.Form.Item,{name:"health_check_model",className:"mb-0",children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select existing health check model",optionFilterProp:"children",allowClear:!0,options:(m=eo.litellm_model_name.split("/")[0],ea?.data?.filter(e=>e.providers?.includes(m)&&e.model_group!==eo.litellm_model_name).map(e=>({value:e.model_group,label:e.model_group}))||[])})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_info?.health_check_model||"Not Set"})]}),F?(0,t.jsx)(tP,{form:u,showCacheControl:A,onCacheControlChange:e=>L(e)}):(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Cache Control"}),(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.cache_control_injection_points?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"Enabled"}),(0,t.jsx)("div",{className:"mt-2",children:h.litellm_params.cache_control_injection_points.map((e,l)=>(0,t.jsxs)("div",{className:"text-sm text-gray-600 mb-1",children:["Location: ",e.location,",",e.role&&(0,t.jsxs)("span",{children:[" Role: ",e.role]}),void 0!==e.index&&(0,t.jsxs)("span",{children:[" Index: ",e.index]})]},l))})]}):"Disabled"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Info"}),F?(0,t.jsx)(et.Form.Item,{name:"model_info",className:"mb-0",children:(0,t.jsx)(eV.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}',defaultValue:JSON.stringify(eo.model_info,null,2)})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(h.model_info,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["LiteLLM Params",(0,t.jsx)(E.Tooltip,{title:"Optional litellm params used for making a litellm.completion() call. Some params are automatically added by LiteLLM.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_extra_params",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(eV.Input.TextArea,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(h.litellm_params,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:eo.model_info.team_id||"Not Set"})]})]}),F&&(0,t.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,t.jsx)(T.Button,{variant:"secondary",onClick:()=>{u.resetFields(),N(!1),I(!1)},disabled:C,children:"Cancel"}),(0,t.jsx)(T.Button,{variant:"primary",onClick:()=>u.submit(),loading:C,children:"Save Changes"})]})]})}):(0,t.jsx)(em.Text,{children:"Loading..."})]})]}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(eL.Card,{children:(0,t.jsx)("pre",{className:"bg-gray-100 p-4 rounded text-xs overflow-auto",children:JSON.stringify(eo,null,2)})})})]})]}),(0,t.jsx)(V.default,{isOpen:g,title:"Delete Model",alertMessage:"This action cannot be undone.",message:"Are you sure you want to delete this model?",resourceInformationTitle:"Model Information",resourceInformation:[{label:"Model Name",value:eo?.model_name||"Not Set"},{label:"LiteLLM Model Name",value:eo?.litellm_model_name||"Not Set"},{label:"Provider",value:eo?.provider||"Not Set"},{label:"Created By",value:eo?.model_info?.created_by||"Not Set"}],onCancel:()=>f(!1),onOk:ef,confirmLoading:j}),y&&!eh?(0,t.jsx)(ll,{isVisible:y,onCancel:()=>b(!1),onAddCredential:ex,existingCredential:M,setIsCredentialModalOpen:b}):(0,t.jsx)(el.Modal,{open:y,onCancel:()=>b(!1),title:"Using Existing Credential",children:(0,t.jsx)(em.Text,{children:eo.litellm_params.litellm_credential_name})}),(0,t.jsx)(t9,{isVisible:B,onCancel:()=>z(!1),onSuccess:e=>{p(e),o&&o(e)},modelData:h||eo,accessToken:a||"",userRole:i||""})]})}var la=e.i(37091),lr=e.i(218129);let li=({value:e={},onChange:l})=>{let[s,a]=(0,x.useState)(Object.entries(e)),r=(e,t,r)=>{let i=[...s];i[e]=[t,r],a(i),l?.(Object.fromEntries(i))};return(0,t.jsxs)("div",{children:[s.map(([e,i],o)=>(0,t.jsxs)(A.Space,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,t.jsx)(eR.TextInput,{placeholder:"Header Name",value:e,onChange:e=>r(o,e.target.value,i)}),(0,t.jsx)(eR.TextInput,{placeholder:"Header Value",value:i,onChange:t=>r(o,e,t.target.value)}),(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(tF.MinusCircleOutlined,{onClick:()=>{let e;a(e=s.filter((e,t)=>t!==o)),l?.(Object.fromEntries(e))},style:{cursor:"pointer"}})})]},o)),(0,t.jsx)(K.Button,{type:"dashed",onClick:()=>{a([...s,["",""]])},icon:(0,t.jsx)(tr.PlusOutlined,{}),children:"Add Header"})]})},lo=({value:e={},onChange:l})=>{let[s,a]=(0,x.useState)(Object.entries(e)),r=(e,t,r)=>{let i=[...s];i[e]=[t,r],a(i),l?.(Object.fromEntries(i))};return(0,t.jsxs)("div",{children:[s.map(([e,i],o)=>(0,t.jsxs)(A.Space,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,t.jsx)(eR.TextInput,{placeholder:"Parameter Name (e.g., version)",value:e,onChange:e=>r(o,e.target.value,i)}),(0,t.jsx)(eR.TextInput,{placeholder:"Parameter Value (e.g., v1)",value:i,onChange:t=>r(o,e,t.target.value)}),(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(tF.MinusCircleOutlined,{onClick:()=>{let e;a(e=s.filter((e,t)=>t!==o)),l?.(Object.fromEntries(e))},style:{cursor:"pointer"}})})]},o)),(0,t.jsx)(K.Button,{type:"dashed",onClick:()=>{a([...s,["",""]])},icon:(0,t.jsx)(tr.PlusOutlined,{}),children:"Add Query Parameter"})]})};var ln=e.i(240647);let{Title:ld,Text:lc}=L.Typography,lm=({pathValue:e,targetValue:s,includeSubpath:a})=>{let r=(0,l.getProxyBaseUrl)();return e&&s?(0,t.jsxs)(ej.Card,{className:"p-5",children:[(0,t.jsx)(ld,{level:5,className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Preview"}),(0,t.jsx)(lc,{type:"secondary",className:"text-gray-600 mb-5",style:{display:"block"},children:"How your requests will be routed"}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"Basic routing:"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint"}),(0,t.jsx)("code",{className:"font-mono text-sm text-gray-900",children:e?`${r}${e}`:""})]}),(0,t.jsx)("div",{className:"text-gray-400",children:(0,t.jsx)(ln.RightOutlined,{className:"text-lg"})}),(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,t.jsx)("code",{className:"font-mono text-sm text-gray-900",children:s})]})]})]}),a&&(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"With subpaths:"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint + subpath"}),(0,t.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[e&&`${r}${e}`,(0,t.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]}),(0,t.jsx)("div",{className:"text-gray-400",children:(0,t.jsx)(ln.RightOutlined,{className:"text-lg"})}),(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,t.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[s,(0,t.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]})]}),(0,t.jsxs)("div",{className:"mt-3 text-sm text-gray-600",children:["Any path after ",e," will be appended to the target URL"]})]})}),!a&&(0,t.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-md border border-blue-200",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)(w.InfoCircleOutlined,{className:"text-blue-500 mt-0.5 mr-2 flex-shrink-0"}),(0,t.jsxs)("div",{className:"text-sm text-blue-700",children:[(0,t.jsx)("span",{className:"font-medium",children:"Not seeing the routing you wanted?"})," Try enabling - Include Subpaths - above - this allows subroutes like"," ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded font-mono text-xs",children:"/api/v1/models"})," to be forwarded automatically."]})]})})]})]}):null},lu=({premiumUser:e,authEnabled:l,onAuthChange:s})=>(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Security"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-4",children:"When enabled, requests to this endpoint will require a valid LiteLLM Virtual Key"}),e?(0,t.jsx)(et.Form.Item,{name:"auth",valuePropName:"checked",className:"mb-0",children:(0,t.jsx)(es.Switch,{checked:l,onChange:e=>{s(e)}})}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-3",children:[(0,t.jsx)(es.Switch,{disabled:!0,checked:!1,style:{outline:"2px solid #d1d5db",outlineOffset:"2px"}}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-400",children:"Authentication (Premium)"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(em.Text,{className:"text-sm text-yellow-800",children:["Setting authentication for pass-through endpoints 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"}),"."]})})]})]});var lh=e.i(891547);let lx=({accessToken:e,value:l={},onChange:s,disabled:a=!1})=>{let[r,i]=(0,x.useState)(Object.keys(l)),[o,n]=(0,x.useState)(l);(0,x.useEffect)(()=>{n(l),i(Object.keys(l))},[l]);let d=(e,t,l)=>{let a=o[e]||{},r={...o,[e]:{...a,[t]:l.length>0?l:void 0}};r[e]?.request_fields||r[e]?.response_fields||(r[e]=null),n(r),s&&s(r)};return(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Guardrails"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Configure guardrails to enforce policies on requests and responses. Guardrails are opt-in for passthrough endpoints."}),(0,t.jsx)(tN.Alert,{message:(0,t.jsxs)("span",{children:["Field-Level Targeting"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through_guardrails#field-level-targeting",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"(Learn More)"})]}),description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{children:"Optionally specify which fields to check. If left empty, the entire request/response is sent to the guardrail."}),(0,t.jsxs)("div",{className:"text-xs space-y-1 mt-2",children:[(0,t.jsx)("div",{className:"font-medium",children:"Common Examples:"}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"query"})," - Single field"]}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"documents[*].text"})," - All text in documents array"]}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"messages[*].content"})," - All message contents"]})]})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Select Guardrails",(0,t.jsx)(E.Tooltip,{title:"Choose which guardrails should run on this endpoint. Org/team/key level guardrails will also be included.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),children:(0,t.jsx)(lh.default,{accessToken:e,value:r,onChange:e=>{i(e);let t={};e.forEach(e=>{t[e]=o[e]||null}),n(t),s&&s(t)},disabled:a})}),r.length>0&&(0,t.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Field Targeting (Optional)"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"💡 Tip: Leave empty to check entire payload"})]}),r.map(e=>(0,t.jsxs)(eL.Card,{className:"p-4 bg-gray-50",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900 mb-3",children:e}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Request Fields (pre_call)",(0,t.jsx)(E.Tooltip,{title:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Specify which request fields to check"}),(0,t.jsxs)("div",{className:"text-xs space-y-1",children:[(0,t.jsx)("div",{children:"Examples:"}),(0,t.jsx)("div",{children:"• query"}),(0,t.jsx)("div",{children:"• documents[*].text"}),(0,t.jsx)("div",{children:"• messages[*].content"})]})]}),children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.request_fields||[];d(e,"request_fields",[...t,"query"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ query"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.request_fields||[];d(e,"request_fields",[...t,"documents[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ documents[*]"})]})]}),(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., query, documents[*].text)",value:o[e]?.request_fields||[],onChange:t=>d(e,"request_fields",t),disabled:a,tokenSeparators:[","]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Response Fields (post_call)",(0,t.jsx)(E.Tooltip,{title:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Specify which response fields to check"}),(0,t.jsxs)("div",{className:"text-xs space-y-1",children:[(0,t.jsx)("div",{children:"Examples:"}),(0,t.jsx)("div",{children:"• results[*].text"}),(0,t.jsx)("div",{children:"• choices[*].message.content"})]})]}),children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)("div",{className:"flex gap-1",children:(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.response_fields||[];d(e,"response_fields",[...t,"results[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ results[*]"})})]}),(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., results[*].text)",value:o[e]?.response_fields||[],onChange:t=>d(e,"response_fields",t),disabled:a,tokenSeparators:[","]})]})]})]},e))]})]})},{Option:lp}=W.Select,lg=["GET","POST","PUT","DELETE","PATCH"],lf=({accessToken:e,setPassThroughItems:s,passThroughItems:a,premiumUser:r=!1})=>{let[i]=et.Form.useForm(),[o,n]=(0,x.useState)(!1),[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)(""),[h,p]=(0,x.useState)(""),[g,f]=(0,x.useState)(""),[j,_]=(0,x.useState)(!0),[y,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)([]),[C,S]=(0,x.useState)({}),k=()=>{i.resetFields(),p(""),f(""),_(!0),N([]),S({}),n(!1)},F=async t=>{console.log("addPassThrough called with:",t),c(!0);try{!r&&"auth"in t&&delete t.auth,C&&Object.keys(C).length>0&&(t.guardrails=C),v&&v.length>0&&(t.methods=v),console.log(`formValues: ${JSON.stringify(t)}`);let o=(await (0,l.createPassThroughEndpoint)(e,t)).endpoints[0],d=[...a,o];s(d),D.default.success("Pass-through endpoint created successfully"),i.resetFields(),p(""),f(""),_(!0),N([]),S({}),n(!1)}catch(e){D.default.fromBackend("Error creating pass-through endpoint: "+e)}finally{c(!1)}};return(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Button,{className:"mx-auto mb-4 mt-4",onClick:()=>n(!0),children:"+ Add Pass-Through Endpoint"}),(0,t.jsx)(el.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)(lr.ApiOutlined,{className:"text-xl text-blue-500"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Pass-Through Endpoint"})]}),open:o,width:1e3,onCancel:k,footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(tN.Alert,{message:"What is a Pass-Through Endpoint?",description:"Route requests from your LiteLLM proxy to any external API. Perfect for custom models, image generation APIs, or any service you want to proxy through LiteLLM.",type:"info",showIcon:!0,className:"mb-6"}),(0,t.jsxs)(et.Form,{form:i,onFinish:F,layout:"vertical",className:"space-y-6",initialValues:{include_subpath:!0,path:h,target:g},children:[(0,t.jsxs)(eL.Card,{className:"p-5",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Configuration"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-5",children:"Configure how requests to your domain will be forwarded to the target API"}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsx)(et.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Path Prefix"}),name:"path",rules:[{required:!0,message:"Path is required",pattern:/^\//}],extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example: /bria, /adobe-photoshop, /elasticsearch"}),className:"mb-4",children:(0,t.jsx)("div",{className:"flex items-center",children:(0,t.jsx)(eR.TextInput,{placeholder:"bria",value:h,onChange:e=>{var t;let l;return l=t=e.target.value,void(t&&!t.startsWith("/")&&(l="/"+t),p(l),i.setFieldsValue({path:l}))},className:"flex-1"})})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Target URL"}),name:"target",rules:[{required:!0,message:"Target URL is required"},{type:"url",message:"Please enter a valid URL"}],extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example:https://engine.prod.bria-api.com"}),className:"mb-4",children:(0,t.jsx)(eR.TextInput,{placeholder:"https://engine.prod.bria-api.com",value:g,onChange:e=>{f(e.target.value),i.setFieldsValue({target:e.target.value})}})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["HTTP Methods (Optional)",(0,t.jsx)(E.Tooltip,{title:"Select specific HTTP methods. Leave empty to support all methods (GET, POST, PUT, DELETE, PATCH). Useful when the same path needs different targets for different methods.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"methods",extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:0===v.length?"All HTTP methods supported (default)":`Only ${v.join(", ")} requests will be routed to this endpoint`}),className:"mb-4",children:(0,t.jsx)(W.Select,{mode:"multiple",placeholder:"Select methods (leave empty for all)",value:v,onChange:N,allowClear:!0,style:{width:"100%"},children:lg.map(e=>(0,t.jsx)(lp,{value:e,children:e},e))})}),(0,t.jsxs)("div",{className:"flex items-center justify-between py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Include Subpaths"}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Forward all subpaths to the target API (recommended for REST APIs)"})]}),(0,t.jsx)(et.Form.Item,{name:"include_subpath",valuePropName:"checked",className:"mb-0",children:(0,t.jsx)(tv.Switch,{checked:j,onChange:_})})]})]})]}),(0,t.jsx)(lm,{pathValue:h,targetValue:g,includeSubpath:j}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Headers"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Add headers that will be sent with every request to the target API"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Headers",(0,t.jsx)(E.Tooltip,{title:"Authentication and other headers to forward with requests",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"headers",rules:[{required:!0,message:"Please configure the headers"}],extra:(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Add authentication tokens and other required headers"}),(0,t.jsx)("div",{children:"Common examples: auth_token, Authorization, x-api-key"})]}),children:(0,t.jsx)(li,{})})]}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Default Query Parameters"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Add query parameters that will be automatically sent with every request to the target API"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Default Query Parameters (Optional)",(0,t.jsx)(E.Tooltip,{title:"Query parameters that will be added to all requests. Clients can override these by providing their own values.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"default_query_params",extra:(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Parameters are sent with all GET, POST, PUT, PATCH requests"}),(0,t.jsx)("div",{children:"Client parameters override defaults. Examples: version=v1, format=json, key=default"})]}),children:(0,t.jsx)(lo,{})})]}),(0,t.jsx)(lu,{premiumUser:r,authEnabled:y,onAuthChange:e=>{b(e),i.setFieldsValue({auth:e})}}),(0,t.jsx)(lx,{accessToken:e,value:C,onChange:S}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Billing"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Optional cost tracking for this endpoint"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Cost Per Request (USD)",(0,t.jsx)(E.Tooltip,{title:"Optional: Track costs for requests to this endpoint",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:"cost_per_request",extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"The cost charged for each request through this endpoint"}),children:(0,t.jsx)(tI.default,{min:0,step:.001,precision:4,placeholder:"2.0000",size:"large"})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,t.jsx)(T.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,t.jsx)(T.Button,{variant:"primary",loading:d,onClick:()=>{console.log("Submit button clicked"),i.submit()},children:d?"Creating...":"Add Pass-Through Endpoint"})]})]})]})})]})};var lj=e.i(286536),l_=e.i(77705);let ly=["GET","POST","PUT","DELETE","PATCH"],{Option:lb}=W.Select,lv=({value:e})=>{let[l,s]=(0,x.useState)(!1),a=JSON.stringify(e,null,2);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("pre",{className:"font-mono text-xs bg-gray-50 p-2 rounded max-w-md overflow-auto",children:l?a:"••••••••"}),(0,t.jsx)("button",{onClick:()=>s(!l),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:l?(0,t.jsx)(l_.EyeOff,{className:"w-4 h-4 text-gray-500"}):(0,t.jsx)(lj.Eye,{className:"w-4 h-4 text-gray-500"})})]})},lN=({endpointData:e,onClose:s,accessToken:a,isAdmin:r,premiumUser:i=!1,onEndpointUpdated:o})=>{let[n,d]=(0,x.useState)(e),[c,m]=(0,x.useState)(!1),[u,h]=(0,x.useState)(!1),[p,g]=(0,x.useState)(e?.auth||!1),[f,j]=(0,x.useState)(e?.methods||[]),[_,y]=(0,x.useState)(e?.guardrails||{}),[b]=et.Form.useForm(),v=async e=>{try{if(!a||!n?.id)return;let t={};if(e.headers)try{t="string"==typeof e.headers?JSON.parse(e.headers):e.headers}catch(e){D.default.fromBackend("Invalid JSON format for headers");return}let s={path:n.path,target:e.target,headers:t,include_subpath:e.include_subpath,cost_per_request:e.cost_per_request,auth:i?e.auth:void 0,methods:f&&f.length>0?f:void 0,guardrails:_&&Object.keys(_).length>0?_:void 0};await (0,l.updatePassThroughEndpoint)(a,n.id,s),d({...n,...s}),h(!1),o&&o()}catch(e){console.error("Error updating endpoint:",e),D.default.fromBackend("Failed to update pass through endpoint")}},N=async()=>{try{if(!a||!n?.id)return;await (0,l.deletePassThroughEndpointsCall)(a,n.id),D.default.success("Pass through endpoint deleted successfully"),s(),o&&o()}catch(e){console.error("Error deleting endpoint:",e),D.default.fromBackend("Failed to delete pass through endpoint")}};return c?(0,t.jsx)("div",{className:"p-4",children:"Loading..."}):n?(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)(K.Button,{onClick:s,className:"mb-4",children:"← Back"}),(0,t.jsxs)(eu.Title,{children:["Pass Through Endpoint: ",n.path]}),(0,t.jsx)(em.Text,{className:"text-gray-500 font-mono",children:n.id})]})}),(0,t.jsxs)(e4.TabGroup,{children:[(0,t.jsxs)(e5.TabList,{className:"mb-4",children:[(0,t.jsx)(e2.Tab,{children:"Overview"},"overview"),r?(0,t.jsx)(e2.Tab,{children:"Settings"},"settings"):(0,t.jsx)(t.Fragment,{})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsxs)(G.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Path"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(eu.Title,{className:"font-mono",children:n.path})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Target"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(eu.Title,{children:n.target})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Configuration"}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{color:n.include_subpath?"green":"gray",children:n.include_subpath?"Include Subpath":"Exact Path"})}),(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{color:n.auth?"blue":"gray",children:n.auth?"Auth Required":"No Auth"})}),n.methods&&n.methods.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"text-xs text-gray-500",children:"HTTP Methods:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:n.methods.map(e=>(0,t.jsx)(k.Badge,{color:"indigo",size:"sm",children:e},e))})]}),(!n.methods||0===n.methods.length)&&(0,t.jsx)("div",{children:(0,t.jsx)(em.Text,{className:"text-xs text-gray-500",children:"All HTTP methods supported"})}),void 0!==n.cost_per_request&&(0,t.jsx)("div",{children:(0,t.jsxs)(em.Text,{children:["Cost per request: $",n.cost_per_request]})})]})]})]}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(lm,{pathValue:n.path,targetValue:n.target,includeSubpath:n.include_subpath||!1})}),n.headers&&Object.keys(n.headers).length>0&&(0,t.jsxs)(eL.Card,{className:"mt-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Headers"}),(0,t.jsxs)(k.Badge,{color:"blue",children:[Object.keys(n.headers).length," headers configured"]})]}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(lv,{value:n.headers})})]}),n.guardrails&&Object.keys(n.guardrails).length>0&&(0,t.jsxs)(eL.Card,{className:"mt-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Guardrails"}),(0,t.jsxs)(k.Badge,{color:"purple",children:[Object.keys(n.guardrails).length," guardrails configured"]})]}),(0,t.jsx)("div",{className:"mt-4 space-y-2",children:Object.entries(n.guardrails).map(([e,l])=>(0,t.jsxs)("div",{className:"p-3 bg-gray-50 rounded",children:[(0,t.jsx)("div",{className:"font-medium text-sm",children:e}),l&&(l.request_fields||l.response_fields)&&(0,t.jsxs)("div",{className:"mt-2 text-xs text-gray-600 space-y-1",children:[l.request_fields&&(0,t.jsxs)("div",{children:["Request fields: ",l.request_fields.join(", ")]}),l.response_fields&&(0,t.jsxs)("div",{children:["Response fields: ",l.response_fields.join(", ")]})]}),!l&&(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:"Uses entire payload"})]},e))})]})]}),r&&(0,t.jsx)(U.TabPanel,{children:(0,t.jsxs)(eL.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eu.Title,{children:"Pass Through Endpoint Settings"}),(0,t.jsx)("div",{className:"space-x-2",children:!u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Button,{onClick:()=>h(!0),children:"Edit Settings"}),(0,t.jsx)(T.Button,{onClick:N,variant:"secondary",color:"red",children:"Delete Endpoint"})]})})]}),u?(0,t.jsxs)(et.Form,{form:b,onFinish:v,initialValues:{target:n.target,headers:n.headers?JSON.stringify(n.headers,null,2):"",include_subpath:n.include_subpath||!1,cost_per_request:n.cost_per_request,auth:n.auth||!1,methods:n.methods||[]},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Target URL",name:"target",rules:[{required:!0,message:"Please input a target URL"}],children:(0,t.jsx)(eR.TextInput,{placeholder:"https://api.example.com"})}),(0,t.jsx)(et.Form.Item,{label:"Headers (JSON)",name:"headers",children:(0,t.jsx)(eV.Input.TextArea,{rows:5,placeholder:'{"Authorization": "Bearer your-token", "Content-Type": "application/json"}'})}),(0,t.jsx)(et.Form.Item,{label:"HTTP Methods (Optional)",name:"methods",extra:0===f.length?"All HTTP methods supported (default)":`Only ${f.join(", ")} requests will be routed to this endpoint`,children:(0,t.jsx)(W.Select,{mode:"multiple",placeholder:"Select methods (leave empty for all)",value:f,onChange:j,allowClear:!0,style:{width:"100%"},children:ly.map(e=>(0,t.jsx)(lb,{value:e,children:e},e))})}),(0,t.jsx)(et.Form.Item,{label:"Include Subpath",name:"include_subpath",valuePropName:"checked",children:(0,t.jsx)(es.Switch,{})}),(0,t.jsx)(et.Form.Item,{label:"Cost per Request",name:"cost_per_request",children:(0,t.jsx)(eh.InputNumber,{min:0,step:.01,precision:2,placeholder:"0.00",addonBefore:"$"})}),(0,t.jsx)(lu,{premiumUser:i,authEnabled:p,onAuthChange:e=>{g(e),b.setFieldsValue({auth:e})}}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(lx,{accessToken:a||"",value:_,onChange:y})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,t.jsx)(K.Button,{onClick:()=>h(!1),children:"Cancel"}),(0,t.jsx)(T.Button,{children:"Save Changes"})]})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Path"}),(0,t.jsx)("div",{className:"font-mono",children:n.path})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Target URL"}),(0,t.jsx)("div",{children:n.target})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Include Subpath"}),(0,t.jsx)(k.Badge,{color:n.include_subpath?"green":"gray",children:n.include_subpath?"Yes":"No"})]}),void 0!==n.cost_per_request&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Cost per Request"}),(0,t.jsxs)("div",{children:["$",n.cost_per_request]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Authentication Required"}),(0,t.jsx)(k.Badge,{color:n.auth?"green":"gray",children:n.auth?"Yes":"No"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Headers"}),n.headers&&Object.keys(n.headers).length>0?(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(lv,{value:n.headers})}):(0,t.jsx)("div",{className:"text-gray-500",children:"No headers configured"})]})]})]})})]})]})]}):(0,t.jsx)("div",{className:"p-4",children:"Pass through endpoint not found"})};var lw=e.i(149121);let lC=({value:e})=>{let[l,s]=(0,x.useState)(!1),a=JSON.stringify(e);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{className:"font-mono text-xs",children:l?a:"••••••••"}),(0,t.jsx)("button",{onClick:()=>s(!l),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:l?(0,t.jsx)(l_.EyeOff,{className:"w-4 h-4 text-gray-500"}):(0,t.jsx)(lj.Eye,{className:"w-4 h-4 text-gray-500"})})]})},lS=({accessToken:e,userRole:s,userID:a,modelData:r,premiumUser:i})=>{let[o,n]=(0,x.useState)([]),[d,c]=(0,x.useState)(null),[m,u]=(0,x.useState)(!1),[h,p]=(0,x.useState)(null);(0,x.useEffect)(()=>{e&&s&&a&&(0,l.getPassThroughEndpointsCall)(e).then(e=>{n(e.endpoints)})},[e,s,a]);let g=async e=>{p(e),u(!0)},f=async()=>{if(null!=h&&e){try{await (0,l.deletePassThroughEndpointsCall)(e,h);let t=o.filter(e=>e.id!==h);n(t),D.default.success("Endpoint deleted successfully.")}catch(e){console.error("Error deleting the endpoint:",e),D.default.fromBackend("Error deleting the endpoint: "+e)}u(!1),p(null)}},j=[{header:"ID",accessorKey:"id",cell:e=>(0,t.jsx)(E.Tooltip,{title:e.row.original.id,children:(0,t.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>e.row.original.id&&c(e.row.original.id),children:e.row.original.id})})},{header:"Path",accessorKey:"path"},{header:"Target",accessorKey:"target",cell:e=>(0,t.jsx)(em.Text,{children:e.getValue()})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:"Methods"}),(0,t.jsx)(E.Tooltip,{title:"HTTP methods supported by this endpoint",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"methods",cell:e=>{let l=e.getValue();return l&&0!==l.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.map(e=>(0,t.jsx)(J.Badge,{color:"indigo",className:"text-xs",children:e},e))}):(0,t.jsx)(J.Badge,{color:"blue",children:"ALL"})}},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:"Authentication"}),(0,t.jsx)(E.Tooltip,{title:"LiteLLM Virtual Key required to call endpoint",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"auth",cell:e=>(0,t.jsx)(J.Badge,{color:e.getValue()?"green":"gray",children:e.getValue()?"Yes":"No"})},{header:"Headers",accessorKey:"headers",cell:e=>(0,t.jsx)(lC,{value:e.getValue()||{}})},{header:"Actions",id:"actions",cell:({row:e})=>(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)(F.Icon,{icon:eE.PencilAltIcon,size:"sm",onClick:()=>e.original.id&&c(e.original.id),title:"Edit"}),(0,t.jsx)(F.Icon,{icon:S.TrashIcon,size:"sm",onClick:()=>{var t;return t=e.original.id,e.index,void g(t)},title:"Delete"})]})}];if(!e)return null;if(d){console.log("selectedEndpointId",d),console.log("generalSettings",o);let a=o.find(e=>e.id===d);return a?(0,t.jsx)(lN,{endpointData:a,onClose:()=>c(null),accessToken:e,isAdmin:"Admin"===s||"admin"===s,premiumUser:i,onEndpointUpdated:()=>{e&&(0,l.getPassThroughEndpointsCall)(e).then(e=>{n(e.endpoints)})}}):(0,t.jsx)("div",{children:"Endpoint not found"})}return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eu.Title,{children:"Pass Through Endpoints"}),(0,t.jsx)(em.Text,{className:"text-tremor-content",children:"Configure and manage your pass-through endpoints"})]}),(0,t.jsx)(lf,{accessToken:e,setPassThroughItems:n,passThroughItems:o,premiumUser:i}),(0,t.jsx)(lw.DataTable,{data:o,columns:j,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:!1,noDataMessage:"No pass-through endpoints configured"}),m&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),(0,t.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Pass-Through Endpoint"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this pass-through endpoint? This action cannot be undone."})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(T.Button,{onClick:f,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(T.Button,{onClick:()=>{u(!1),p(null)},children:"Cancel"})]})]})]})})]})};e.s(["default",0,lS],147612);var lk=e.i(56567);e.s(["default",0,({premiumUser:e,teams:s})=>{let a,i,{accessToken:m,token:u,userRole:h,userId:p}=(0,r.default)(),[g]=et.Form.useForm(),[f,j]=(0,x.useState)(""),[_,y]=(0,x.useState)([]),[b,v]=(0,x.useState)(eM.Providers.Anthropic),[N,w]=(0,x.useState)(null),[C,S]=(0,x.useState)(null),[k,T]=(0,x.useState)(null),[I,M]=(0,x.useState)(0),[P,A]=(0,x.useState)({}),[E,L]=(0,x.useState)(!1),[R,O]=(0,x.useState)(null),[B,z]=(0,x.useState)(null),[V,H]=(0,x.useState)(0),[J,K]=(0,x.useState)(1),[W,Q]=(0,x.useState)(()=>"true"!==localStorage.getItem("hideMissingProviderBanner")),Y=(0,$.useQueryClient)(),{data:X,isLoading:Z,refetch:ee}=(0,d.useModelsInfo)(),{data:el,isLoading:es}=(0,d.useModelsInfo)(J,50),{data:ea,isLoading:er}=(0,n.useModelCostMap)(),{data:eo,isLoading:ed}=o(),ec=eo?.credentials||[],{data:em,isLoading:eu}=(0,c.useUISettings)(),eh=(0,x.useMemo)(()=>{if(!X?.data)return[];let e=new Set;for(let t of X.data)e.add(t.model_name);return Array.from(e).sort()},[X?.data]),ex=(0,x.useMemo)(()=>{if(!X?.data)return[];let e=new Set;for(let t of X.data){let l=t.model_info;if(l?.access_groups)for(let t of l.access_groups)e.add(t)}return Array.from(e)},[X?.data]),eg=(0,x.useMemo)(()=>X?.data?X.data.map(e=>e.model_name):[],[X?.data]),ef=(0,x.useMemo)(()=>el?.data?el.data.map(e=>e.model_info?.id).filter(e=>!!e):[],[el?.data]),ej=e=>null!=ea&&"object"==typeof ea&&e in ea?ea[e].litellm_provider:"openai",e_=(0,x.useMemo)(()=>X?.data?ei(X,ej):{data:[]},[X?.data,ej]),ey=(0,x.useMemo)(()=>el?.data?ei(el,ej):{data:[]},[el?.data,ej]),eb=(0,x.useMemo)(()=>({total_count:el?.total_count??0,current_page:el?.current_page??J,total_pages:el?.total_pages??1,size:el?.size??50}),[el,J]),ev=h&&(0,eX.isProxyAdminRole)(h),eN=h&&eX.internalUserRoles.includes(h),ew=p&&(0,eX.isUserTeamAdminForAnyTeam)(s,p),eC=eN&&em?.values?.disable_model_add_for_internal_users===!0,eS={name:"file",accept:".json",pastable:!1,beforeUpload:e=>{if("application/json"===e.type){let t=new FileReader;t.onload=e=>{if(e.target){let t=e.target.result;g.setFieldsValue({vertex_credentials:t})}},t.readAsText(e)}return!1},onChange(e){"done"===e.file.status?D.default.success(`${e.file.name} file uploaded successfully`):"error"===e.file.status&&D.default.fromBackend(`${e.file.name} file upload failed.`)}},ek=()=>{j(new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})),K(1),Y.invalidateQueries({queryKey:["models","list"]}),ee()},eT=async()=>{if(m)try{let e={router_settings:{}};"global"===N?(k&&(e.router_settings.retry_policy=k),D.default.success("Global retry settings saved successfully")):(C&&(e.router_settings.model_group_retry_policy=C),D.default.success(`Retry settings saved successfully for ${N}`)),await (0,l.setCallbacksCall)(m,e)}catch(e){D.default.fromBackend("Failed to save retry settings")}};(0,x.useEffect)(()=>{if(!m||!u||!h||!p||!X)return;let e=async()=>{try{let e=(await (0,l.getCallbacksCall)(m,p,h)).router_settings,t=e.model_group_retry_policy,s=e.num_retries;S(t),T(e.retry_policy),M(s);let a=e.model_group_alias||{};A(a)}catch(e){console.error("Error fetching model data:",e)}};m&&u&&h&&p&&X&&e()},[m,u,h,p,X]);let eF=async()=>{try{let e=await g.validateFields();await eA(e,m,g,ek)}catch(t){let e=t.errorFields?.map(e=>`${e.name.join(".")}: ${e.errors.join(", ")}`).join(" | ")||"Unknown validation error";D.default.fromBackend(`Please fill in the following required fields: ${e}`)}};return(Object.keys(eM.Providers).find(e=>eM.Providers[e]===b),B)?(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(lk.default,{teamId:B,onClose:()=>z(null),accessToken:m,is_team_admin:"Admin"===h,is_proxy_admin:"Proxy Admin"===h,userModels:eg,editTeam:!1,onUpdate:ek,premiumUser:e})}):(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(G.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(e1.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:"Model Management"}),eX.all_admin_roles.includes(h)?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Add and manage models for the proxy"}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Add models for teams you are an admin for."})]}),!W&&(0,t.jsxs)("a",{href:"https://models.litellm.ai/?request=true",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-[#6366f1] hover:text-[#5558e3] border border-[#6366f1] hover:border-[#5558e3] rounded-lg transition-colors",children:[(0,t.jsx)(e3.PlusCircleOutlined,{style:{fontSize:"12px"}}),"Request Provider"]})]}),W&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-3 bg-blue-50 rounded-lg border border-blue-100 flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-10 h-10 bg-white rounded-full flex items-center justify-center border border-blue-200",children:(0,t.jsx)(e3.PlusCircleOutlined,{style:{fontSize:"18px",color:"#6366f1"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"text-gray-900 font-semibold text-sm m-0",children:"Missing a provider?"}),(0,t.jsx)("p",{className:"text-gray-500 text-xs m-0 mt-0.5",children:"The LiteLLM engineering team is constantly adding support for new LLM models, providers, endpoints. If you don't see the one you need, let us know and we'll prioritize it."})]}),(0,t.jsxs)("a",{href:"https://models.litellm.ai/?request=true",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0 inline-flex items-center gap-2 px-4 py-2 bg-[#6366f1] hover:bg-[#5558e3] text-white text-sm font-medium rounded-lg transition-colors",children:["Request Provider",(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("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"})})]}),(0,t.jsx)("button",{onClick:()=>{Q(!1),localStorage.setItem("hideMissingProviderBanner","true")},className:"flex-shrink-0 p-1 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full transition-colors","aria-label":"Dismiss banner",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),R&&!(Z||er||ed||eu)?(0,t.jsx)(ls,{modelId:R,onClose:()=>{O(null)},accessToken:m,userID:p,userRole:h,onModelUpdate:e=>{Y.invalidateQueries({queryKey:["models","list"]}),ek()},modelAccessGroups:ex}):(a=eX.all_admin_roles.includes(h),i=[{tab:(0,t.jsx)(e2.Tab,{children:a?"All Models":"Your Models"},"all-models"),panel:(0,t.jsx)(en,{selectedModelGroup:N,setSelectedModelGroup:w,availableModelGroups:eh,availableModelAccessGroups:ex,setSelectedModelId:O,setSelectedTeamId:z},"all-models")}],(ev||!eC&&ew)&&i.push({tab:(0,t.jsx)(e2.Tab,{children:"Add Model"},"add-model"),panel:(0,t.jsx)(U.TabPanel,{className:"h-full",children:(0,t.jsx)(tU,{form:g,handleOk:eF,selectedProvider:b,setSelectedProvider:v,providerModels:_,setProviderModelsFn:e=>{y((0,eM.getProviderModels)(e,ea))},getPlaceholder:eM.getPlaceholder,uploadProps:eS,showAdvancedSettings:E,setShowAdvancedSettings:L,teams:s,credentials:ec,accessToken:m,userRole:h})},"add-model")}),a&&i.push({tab:(0,t.jsx)(e2.Tab,{children:"LLM Credentials"},"llm-credentials"),panel:(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(eZ,{uploadProps:eS})},"llm-credentials")},{tab:(0,t.jsx)(e2.Tab,{children:"Pass-Through Endpoints"},"pass-through"),panel:(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(lS,{accessToken:m,userRole:h,userID:p,modelData:e_,premiumUser:e})},"pass-through")},{tab:(0,t.jsx)(e2.Tab,{children:"Health Status"},"health-status"),panel:(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(tX,{accessToken:m,modelData:ey,all_models_on_proxy:ef,getDisplayModelName:q,setSelectedModelId:O,teams:s,isLoading:es,paginationMeta:eb,currentPage:J,pageSize:50,onPageChange:K})},"health-status")},{tab:(0,t.jsx)(e2.Tab,{children:"Model Retry Settings"},"model-retry-settings"),panel:(0,t.jsx)(ep,{selectedModelGroup:N,setSelectedModelGroup:w,availableModelGroups:eh,globalRetryPolicy:k,setGlobalRetryPolicy:T,defaultRetry:I,modelGroupRetryPolicy:C,setModelGroupRetryPolicy:S,handleSaveRetrySettings:eT},"model-retry-settings")},{tab:(0,t.jsx)(e2.Tab,{children:"Model Group Alias"},"model-group-alias"),panel:(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t4,{accessToken:m,initialModelGroupAlias:P,onAliasUpdate:A})},"model-group-alias")},{tab:(0,t.jsx)(e2.Tab,{children:"Price Data Reload"},"price-data-reload"),panel:(0,t.jsx)(eI,{},"price-data-reload")}),(0,t.jsxs)(e4.TabGroup,{index:V,onIndexChange:H,className:"gap-2 h-[75vh] w-full ",children:[(0,t.jsxs)(e5.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsx)("div",{className:"flex",children:i.map(e=>e.tab)}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 self-center",children:[f&&(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Last Refreshed: ",f]}),(0,t.jsx)(F.Icon,{icon:e0.RefreshIcon,variant:"shadow",size:"xs",className:"cursor-pointer",onClick:ek})]})]}),(0,t.jsx)(e6.TabPanels,{children:i.map(e=>e.panel)})]}))]})})})}],161059)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5da3aa6d4034aceb.js b/litellm/proxy/_experimental/out/_next/static/chunks/5da3aa6d4034aceb.js new file mode 100644 index 0000000000..9f0332f0d7 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/5da3aa6d4034aceb.js @@ -0,0 +1,72 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),Object.defineProperty(l,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},269200,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("Table"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement("div",{className:(0,a.tremorTwMerge)(r("root"),"overflow-auto",i)},l.default.createElement("table",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},o),n))});s.displayName="Table",e.s(["Table",()=>s],269200)},427612,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHead"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("thead",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},o),n))});s.displayName="TableHead",e.s(["TableHead",()=>s],427612)},64848,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHeaderCell"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("th",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},o),n))});s.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>s],64848)},942232,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableBody"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("tbody",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},o),n))});s.displayName="TableBody",e.s(["TableBody",()=>s],942232)},496020,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableRow"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("tr",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("row"),i)},o),n))});s.displayName="TableRow",e.s(["TableRow",()=>s],496020)},977572,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableCell"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("td",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"align-middle whitespace-nowrap text-left p-4",i)},o),n))});s.displayName="TableCell",e.s(["TableCell",()=>s],977572)},389083,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(829087),r=e.i(480731),s=e.i(95779),n=e.i(444755),i=e.i(673706);let o={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"}},c={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"}},d=(0,i.makeClassName)("Badge"),u=l.default.forwardRef((e,u)=>{let{color:m,icon:h,size:g=r.Sizes.SM,tooltip:p,className:x,children:f}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),y=h||null,{tooltipProps:j,getReferenceProps:v}=(0,a.useTooltip)();return l.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([u,j.refs.setReference]),className:(0,n.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,n.tremorTwMerge)((0,i.getColorClassNames)(m,s.colorPalette.background).bgColor,(0,i.getColorClassNames)(m,s.colorPalette.iconText).textColor,(0,i.getColorClassNames)(m,s.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,n.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"),o[g].paddingX,o[g].paddingY,o[g].fontSize,x)},v,b),l.default.createElement(a.default,Object.assign({text:p},j)),y?l.default.createElement(y,{className:(0,n.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[g].height,c[g].width)}):null,l.default.createElement("span",{className:(0,n.tremorTwMerge)(d("text"),"whitespace-nowrap")},f))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},68155,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:"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,l],68155)},360820,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:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,l],360820)},871943,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:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,l],871943)},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,l],94629)},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},848725,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:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});e.s(["EyeIcon",0,l],848725)},292335,122520,165615,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",AWS_SIGV4:"aws_sigv4"},l={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};function a(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(["AUTH_TYPE",0,t,"OAUTH_FLOW",0,{INTERACTIVE:"interactive",M2M:"m2m"},"TRANSPORT",0,l,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?l.SSE:t&&e!==l.STDIO?l.OPENAPI:e],292335),e.s(["extractErrorMessage",()=>a],122520);let r=e=>{let t=new Uint8Array(e),l="";return t.forEach(e=>l+=String.fromCharCode(e)),btoa(l).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},s=async e=>{let t=new TextEncoder().encode(e);return r(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,s,"generateCodeVerifier",0,()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),r(e.buffer)}],165615)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["StopOutlined",0,s],724154)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var l=e.i(546467);e.s(["ExternalLinkIcon",()=>l.default],634831);let a=(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(["KeyIcon",()=>a],438100)},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},264843,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["MessageOutlined",0,s],264843)},446891,836991,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(326373),r=e.i(94629),s=e.i(360820),n=e.i(871943),i=e.i(271645);let o=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,o],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:i})=>{let c=[{key:"asc",label:"Ascending",icon:(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,t.jsx)(o,{className:"h-4 w-4"})}];return(0,t.jsx)(a.Dropdown,{menu:{items:c,onClick:({key:e})=>{"asc"===e?i("asc"):"desc"===e?i("desc"):"reset"===e&&i(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,t.jsx)(l.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"}):(0,t.jsx)(r.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891)},149121,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(152990),r=e.i(682830),s=e.i(269200),n=e.i(427612),i=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572);function u({data:e=[],columns:u,onRowClick:m,renderSubComponent:h,renderChildRows:g,getRowCanExpand:p,isLoading:x=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:b="No logs found",enableSorting:y=!1}){let j=!!(h||g)&&!!p,[v,w]=(0,l.useState)([]),k=(0,a.useReactTable)({data:e,columns:u,...y&&{state:{sorting:v},onSortingChange:w,enableSortingRemoval:!1},...j&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,r.getCoreRowModel)(),...y&&{getSortedRowModel:(0,r.getSortedRowModel)()},...j&&{getExpandedRowModel:(0,r.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(n.TableHead,{children:k.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let l=y&&e.column.getCanSort(),r=e.column.getIsSorted();return(0,t.jsx)(i.TableHeaderCell,{className:`py-1 h-8 ${l?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:l?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),l&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===r?"↑":"desc"===r?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:x?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):k.getRowModel().rows.length>0?k.getRowModel().rows.map(e=>(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),j&&e.getIsExpanded()&&g&&g({row:e}),j&&e.getIsExpanded()&&h&&!g&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:h({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})})})]})})}e.s(["DataTable",()=>u])},37091,e=>{"use strict";var t=e.i(290571),l=e.i(95779),a=e.i(444755),r=e.i(673706),s=e.i(271645);let n=s.default.forwardRef((e,n)=>{let{color:i,children:o,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return s.default.createElement("p",Object.assign({ref:n,className:(0,a.tremorTwMerge)(i?(0,r.getColorClassNames)(i,l.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},d),o)});n.displayName="Subtitle",e.s(["Subtitle",()=>n],37091)},888288,e=>{"use strict";var t=e.i(271645);let l=(e,l)=>{let a=void 0!==l,[r,s]=(0,t.useState)(e);return[a?l:r,e=>{a||s(e)}]};e.s(["default",()=>l])},793130,e=>{"use strict";var t=e.i(290571),l=e.i(429427),a=e.i(371330),r=e.i(271645),s=e.i(394487),n=e.i(503269),i=e.i(214520),o=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(601893),h=e.i(140721),g=e.i(942803),p=e.i(233538),x=e.i(694421),f=e.i(700020),b=e.i(35889),y=e.i(998348),j=e.i(722678);let v=(0,r.createContext)(null);v.displayName="GroupContext";let w=r.Fragment,k=Object.assign((0,f.forwardRefWithAs)(function(e,t){var w;let k=(0,r.useId)(),_=(0,g.useProvidedId)(),C=(0,m.useDisabled)(),{id:N=_||`headlessui-switch-${k}`,disabled:S=C||!1,checked:T,defaultChecked:M,onChange:E,name:I,value:O,form:A,autoFocus:D=!1,...B}=e,R=(0,r.useContext)(v),[F,P]=(0,r.useState)(null),$=(0,r.useRef)(null),L=(0,u.useSyncRefs)($,t,null===R?null:R.setSwitch,P),H=(0,i.useDefaultValue)(M),[z,V]=(0,n.useControllable)(T,E,null!=H&&H),U=(0,o.useDisposables)(),[q,W]=(0,r.useState)(!1),G=(0,c.useEvent)(()=>{W(!0),null==V||V(!z),U.nextFrame(()=>{W(!1)})}),K=(0,c.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),G()}),Y=(0,c.useEvent)(e=>{e.key===y.Keys.Space?(e.preventDefault(),G()):e.key===y.Keys.Enter&&(0,x.attemptSubmit)(e.currentTarget)}),J=(0,c.useEvent)(e=>e.preventDefault()),Q=(0,j.useLabelledBy)(),X=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,l.useFocusRing)({autoFocus:D}),{isHovered:et,hoverProps:el}=(0,a.useHover)({isDisabled:S}),{pressed:ea,pressProps:er}=(0,s.useActivePress)({disabled:S}),es=(0,r.useMemo)(()=>({checked:z,disabled:S,hover:et,focus:Z,active:ea,autofocus:D,changing:q}),[z,et,Z,ea,S,q,D]),en=(0,f.mergeProps)({id:N,ref:L,role:"switch",type:(0,d.useResolveButtonType)(e,F),tabIndex:-1===e.tabIndex?0:null!=(w=e.tabIndex)?w:0,"aria-checked":z,"aria-labelledby":Q,"aria-describedby":X,disabled:S||void 0,autoFocus:D,onClick:K,onKeyUp:Y,onKeyPress:J},ee,el,er),ei=(0,r.useCallback)(()=>{if(void 0!==H)return null==V?void 0:V(H)},[V,H]),eo=(0,f.useRender)();return r.default.createElement(r.default.Fragment,null,null!=I&&r.default.createElement(h.FormFields,{disabled:S,data:{[I]:O||"on"},overrides:{type:"checkbox",checked:z},form:A,onReset:ei}),eo({ourProps:en,theirProps:B,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[l,a]=(0,r.useState)(null),[s,n]=(0,j.useLabels)(),[i,o]=(0,b.useDescriptions)(),c=(0,r.useMemo)(()=>({switch:l,setSwitch:a}),[l,a]),d=(0,f.useRender)();return r.default.createElement(o,{name:"Switch.Description",value:i},r.default.createElement(n,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){l&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),l.click(),l.focus({preventScroll:!0}))}}},r.default.createElement(v.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:w,name:"Switch.Group"}))))},Label:j.Label,Description:b.Description});var _=e.i(888288),C=e.i(95779),N=e.i(444755),S=e.i(673706),T=e.i(829087);let M=(0,S.makeClassName)("Switch"),E=r.default.forwardRef((e,l)=>{let{checked:a,defaultChecked:s=!1,onChange:n,color:i,name:o,error:c,errorMessage:d,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"]),x={bgColor:i?(0,S.getColorClassNames)(i,C.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,S.getColorClassNames)(i,C.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[f,b]=(0,_.default)(s,a),[y,j]=(0,r.useState)(!1),{tooltipProps:v,getReferenceProps:w}=(0,T.useTooltip)(300);return r.default.createElement("div",{className:"flex flex-row items-center justify-start"},r.default.createElement(T.default,Object.assign({text:h},v)),r.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([l,v.refs.setReference]),className:(0,N.tremorTwMerge)(M("root"),"flex flex-row relative h-5")},p,w),r.default.createElement("input",{type:"checkbox",className:(0,N.tremorTwMerge)(M("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:m,checked:f,onChange:e=>{e.preventDefault()}}),r.default.createElement(k,{checked:f,onChange:e=>{b(e),null==n||n(e)},disabled:u,className:(0,N.tremorTwMerge)(M("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:()=>j(!0),onBlur:()=>j(!1),id:g},r.default.createElement("span",{className:(0,N.tremorTwMerge)(M("sr-only"),"sr-only")},"Switch ",f?"on":"off"),r.default.createElement("span",{"aria-hidden":"true",className:(0,N.tremorTwMerge)(M("background"),f?x.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")}),r.default.createElement("span",{"aria-hidden":"true",className:(0,N.tremorTwMerge)(M("round"),f?(0,N.tremorTwMerge)(x.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",y?(0,N.tremorTwMerge)("ring-2",x.ringColor):"")}))),c&&d?r.default.createElement("p",{className:(0,N.tremorTwMerge)(M("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});E.displayName="Switch",e.s(["Switch",()=>E],793130)},418371,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:r="w-4 h-4"})=>{let[s,n]=(0,l.useState)(!1),{logo:i}=(0,a.getProviderLogoAndName)(e);return s||!i?(0,t.jsx)("div",{className:`${r} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:i,alt:`${e} logo`,className:r,onError:()=>n(!0)})}])},704308,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(994388),r=e.i(212931),s=e.i(764205),n=e.i(808613),i=e.i(311451),o=e.i(199133),c=e.i(888259),d=e.i(209261);let{TextArea:u}=i.Input,{Option:m}=o.Select,h=["Development","Productivity","Learning","Security","Data & Analytics","Integration","Testing","Documentation"],g=({visible:e,onClose:g,accessToken:p,onSuccess:x})=>{let[f]=n.Form.useForm(),[b,y]=(0,l.useState)(!1),[j,v]=(0,l.useState)(null),w=async e=>{if(!p)return void c.default.error("No access token available");if(!j)return void c.default.error("Please enter a valid GitHub URL");if(!(0,d.validatePluginName)(e.name))return void c.default.error("Skill name must be kebab-case (lowercase letters, numbers, and hyphens only)");if(e.version&&!(0,d.isValidSemanticVersion)(e.version))return void c.default.error("Version must be in semantic versioning format (e.g., 1.0.0)");if(e.authorEmail&&!(0,d.isValidEmail)(e.authorEmail))return void c.default.error("Invalid email format");if(e.homepage&&!(0,d.isValidUrl)(e.homepage))return void c.default.error("Invalid homepage URL format");y(!0);try{let t={name:e.name.trim(),source:j.parsed};e.version&&(t.version=e.version.trim()),e.description&&(t.description=e.description.trim()),(e.authorName||e.authorEmail)&&(t.author={},e.authorName&&(t.author.name=e.authorName.trim()),e.authorEmail&&(t.author.email=e.authorEmail.trim())),e.homepage&&(t.homepage=e.homepage.trim()),e.category&&(t.category=e.category),e.keywords&&(t.keywords=(0,d.parseKeywords)(e.keywords)),e.domain&&(t.domain=e.domain.trim()),e.namespace&&(t.namespace=e.namespace.trim()),await (0,s.registerClaudeCodePlugin)(p,t),c.default.success("Skill registered successfully"),f.resetFields(),v(null),x(),g()}catch(e){console.error("Error registering skill:",e),c.default.error("Failed to register skill")}finally{y(!1)}},k=()=>{f.resetFields(),v(null),g()};return(0,t.jsx)(r.Modal,{title:"Add New Skill",open:e,onCancel:k,footer:null,width:700,className:"top-8",children:(0,t.jsxs)(n.Form,{form:f,layout:"vertical",onFinish:w,className:"mt-4",children:[(0,t.jsx)(n.Form.Item,{label:"GitHub URL",name:"skillUrl",rules:[{required:!0,message:"Please enter a GitHub URL"}],tooltip:"Paste a GitHub URL — repo, folder, or file link. E.g. github.com/org/repo or github.com/org/repo/tree/main/my-skill",children:(0,t.jsx)(i.Input,{placeholder:"https://github.com/org/repo/tree/main/my-skill",className:"rounded-lg",onChange:e=>{let t=function(e){let t=e.trim().replace(/^https?:\/\//,"").replace(/\/+$/,"");if(!t.startsWith("github.com/"))return null;let l=t.slice(11).split("/");if(l.length<2)return null;let a=l[0],r=l[1].replace(/\.git$/,"");if(2===l.length||2===l.length&&r)return{parsed:{source:"github",repo:`${a}/${r}`},label:`GitHub repo — ${a}/${r}`,suggestedName:r};if(l.length>=5&&("tree"===l[2]||"blob"===l[2])){let e=l.slice(4),t=e[e.length-1];if(t&&t.includes(".")&&e.pop(),0===e.length)return{parsed:{source:"github",repo:`${a}/${r}`},label:`GitHub repo — ${a}/${r}`,suggestedName:r};let s=e.join("/");return{parsed:{source:"git-subdir",url:`https://github.com/${a}/${r}`,path:s},label:`GitHub subdir — ${a}/${r} @ ${s}`,suggestedName:e[e.length-1]}}return null}(e.target.value);v(t),t&&(f.getFieldValue("name")||f.setFieldsValue({name:t.suggestedName}))}})}),j&&(0,t.jsxs)("div",{className:"mb-4 px-3 py-2 bg-blue-50 border border-blue-200 rounded-lg text-sm text-blue-700",children:["Detected: ",j.label]}),(0,t.jsx)(n.Form.Item,{label:"Skill Name",name:"name",rules:[{required:!0,message:"Please enter skill name"},{pattern:/^[a-z0-9-]+$/,message:"Name must be kebab-case (lowercase, numbers, hyphens only)"}],tooltip:"Unique identifier in kebab-case format (e.g., my-skill)",children:(0,t.jsx)(i.Input,{placeholder:"my-skill",className:"rounded-lg"})}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)(n.Form.Item,{label:"Domain (Optional)",name:"domain",tooltip:"Top-level grouping in the Skill Hub (e.g., Productivity)",className:"flex-1",children:(0,t.jsx)(i.Input,{placeholder:"Productivity",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Namespace (Optional)",name:"namespace",tooltip:"Sub-grouping within domain (e.g., workflows)",className:"flex-1",children:(0,t.jsx)(i.Input,{placeholder:"workflows",className:"rounded-lg"})})]}),(0,t.jsx)(n.Form.Item,{label:"Description (Optional)",name:"description",tooltip:"Brief description of what the skill does",children:(0,t.jsx)(u,{rows:3,placeholder:"A skill that helps with...",maxLength:500,className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Category (Optional)",name:"category",tooltip:"Select a category or enter a custom one",children:(0,t.jsx)(o.Select,{placeholder:"Select or type a category",allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"rounded-lg",children:h.map(e=>(0,t.jsx)(m,{value:e,children:e},e))})}),(0,t.jsx)(n.Form.Item,{label:"Keywords (Optional)",name:"keywords",tooltip:"Comma-separated list of keywords for search",children:(0,t.jsx)(i.Input,{placeholder:"search, web, api",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Version (Optional)",name:"version",tooltip:"Semantic version (e.g., 1.0.0)",children:(0,t.jsx)(i.Input,{placeholder:"1.0.0",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Author Name (Optional)",name:"authorName",tooltip:"Name of the skill author or organization",children:(0,t.jsx)(i.Input,{placeholder:"Your Name or Organization",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Author Email (Optional)",name:"authorEmail",rules:[{type:"email",message:"Please enter a valid email"}],tooltip:"Contact email for the skill author",children:(0,t.jsx)(i.Input,{type:"email",placeholder:"author@example.com",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{className:"mb-0 mt-6",children:(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(a.Button,{variant:"secondary",onClick:k,disabled:b,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"submit",loading:b,children:b?"Adding...":"Add Skill"})]})})]})})};var p=e.i(166406),x=e.i(871943),f=e.i(360820),b=e.i(94629),y=e.i(68155),j=e.i(152990),v=e.i(682830),w=e.i(389083),k=e.i(269200),_=e.i(942232),C=e.i(977572),N=e.i(427612),S=e.i(64848),T=e.i(496020),M=e.i(592968),E=e.i(727749);let I=({pluginsList:e,isLoading:r,onDeleteClick:s,accessToken:n,isAdmin:i,onPluginClick:o})=>{let[c,u]=(0,l.useState)([{id:"created_at",desc:!0}]),m=[{header:"Skill Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,r=l.name||"";return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.Tooltip,{title:r,children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[150px] justify-start",onClick:()=>o(l.id),children:r})}),(0,t.jsx)(M.Tooltip,{title:"Copy Plugin ID",children:(0,t.jsx)(p.CopyOutlined,{onClick:e=>{var t;e.stopPropagation(),t=l.id,navigator.clipboard.writeText(t),E.default.success("Copied to clipboard!")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Version",accessorKey:"version",cell:({row:e})=>{let l=e.original.version||"N/A";return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:l})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original.description||"No description";return(0,t.jsx)(M.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"text-xs text-gray-600 block max-w-[300px] truncate",children:l})})}},{header:"Category",accessorKey:"category",cell:({row:e})=>{let l=e.original.category;if(!l)return(0,t.jsx)(w.Badge,{color:"gray",className:"text-xs font-normal",size:"xs",children:"Uncategorized"});let a=(0,d.getCategoryBadgeColor)(l);return(0,t.jsx)(w.Badge,{color:a,className:"text-xs font-normal",size:"xs",children:l})}},{header:"Public",accessorKey:"enabled",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(w.Badge,{color:l.enabled?"green":"gray",className:"text-xs font-normal",size:"xs",children:l.enabled?"Yes":"No"})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{var l;let a=e.original;return(0,t.jsx)(M.Tooltip,{title:a.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:(l=a.created_at)?new Date(l).toLocaleString():"-"})})}},...i?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(M.Tooltip,{title:"Delete skill",children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),s(l.name,l.name)},icon:y.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],h=(0,j.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:u,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(k.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(N.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(T.TableRow,{children:e.headers.map(e=>(0,t.jsx)(S.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(f.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(x.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(b.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(_.TableBody,{children:r?(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(C.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e&&e.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(T.TableRow,{className:"h-8 cursor-pointer hover:bg-gray-50",onClick:()=>o(e.original.id),children:e.getVisibleCells().map(e=>(0,t.jsx)(C.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(C.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No skills found. Add one to get started."})})})})})]})})})};var O=e.i(652272),A=e.i(708347);e.s(["default",0,({accessToken:e,userRole:n})=>{let[i,o]=(0,l.useState)([]),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),[h,p]=(0,l.useState)(!1),[x,f]=(0,l.useState)(null),[b,y]=(0,l.useState)(null),j=!!n&&(0,A.isAdminRole)(n),v=async()=>{if(e){m(!0);try{let t=await (0,s.getClaudeCodePluginsList)(e,!1);o(t.plugins)}catch(e){console.error("Error fetching skills:",e)}finally{m(!1)}}};(0,l.useEffect)(()=>{v()},[e]);let w=async()=>{if(x&&e){p(!0);try{await (0,s.deleteClaudeCodePlugin)(e,x.name),E.default.success(`Skill "${x.displayName}" deleted successfully`),v()}catch(e){console.error("Error deleting skill:",e),E.default.error("Failed to delete skill")}finally{p(!1),f(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[b?(0,t.jsx)(O.default,{skill:b,onBack:()=>y(null),isAdmin:j,accessToken:e,onPublishClick:v}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Skills"}),(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["Register Claude Code skills. Published skills appear in the Skill Hub for all users and are served via"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"/claude-code/marketplace.json"}),"."]}),(0,t.jsx)("div",{className:"mt-2 flex gap-2",children:(0,t.jsx)(a.Button,{onClick:()=>d(!0),disabled:!e||!j,children:"+ Add Skill"})})]}),(0,t.jsx)(I,{pluginsList:i,isLoading:u,onDeleteClick:(e,t)=>{f({name:e,displayName:t})},accessToken:e,isAdmin:j,onPluginClick:e=>{let t=i.find(t=>t.id===e);t&&y(t)}})]}),(0,t.jsx)(g,{visible:c,onClose:()=>d(!1),accessToken:e,onSuccess:v}),x&&(0,t.jsxs)(r.Modal,{title:"Delete Skill",open:null!==x,onOk:w,onCancel:()=>f(null),confirmLoading:h,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete skill:"," ",(0,t.jsx)("strong",{children:x.displayName}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],704308)},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(562901),a=e.i(343794),r=e.i(914949),s=e.i(529681),n=e.i(242064),i=e.i(829672),o=e.i(285781),c=e.i(836938),d=e.i(920228),u=e.i(62405),m=e.i(408850),h=e.i(87414),g=e.i(310730);let p=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:l,antCls:a,zIndexPopup:r,colorText:s,colorWarning:n,marginXXS:i,marginXS:o,fontSize:c,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:r,[`&${a}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:o,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${l}`]:{color:n,fontSize:c,lineHeight:1,marginInlineEnd:o},[`${t}-title`]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:i,color:s}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:o}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var x=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let f=e=>{let{prefixCls:a,okButtonProps:r,cancelButtonProps:s,title:i,description:g,cancelText:p,okText:x,okType:f="primary",icon:b=t.createElement(l.default,null),showCancel:y=!0,close:j,onConfirm:v,onCancel:w,onPopupClick:k}=e,{getPrefixCls:_}=t.useContext(n.ConfigContext),[C]=(0,m.useLocale)("Popconfirm",h.default.Popconfirm),N=(0,c.getRenderPropValue)(i),S=(0,c.getRenderPropValue)(g);return t.createElement("div",{className:`${a}-inner-content`,onClick:k},t.createElement("div",{className:`${a}-message`},b&&t.createElement("span",{className:`${a}-message-icon`},b),t.createElement("div",{className:`${a}-message-text`},N&&t.createElement("div",{className:`${a}-title`},N),S&&t.createElement("div",{className:`${a}-description`},S))),t.createElement("div",{className:`${a}-buttons`},y&&t.createElement(d.default,Object.assign({onClick:w,size:"small"},s),p||(null==C?void 0:C.cancelText)),t.createElement(o.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,u.convertLegacyProps)(f)),r),actionFn:v,close:j,prefixCls:_("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},x||(null==C?void 0:C.okText))))};var b=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let y=t.forwardRef((e,o)=>{var c,d;let{prefixCls:u,placement:m="top",trigger:h="click",okType:g="primary",icon:x=t.createElement(l.default,null),children:y,overlayClassName:j,onOpenChange:v,onVisibleChange:w,overlayStyle:k,styles:_,classNames:C}=e,N=b(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:S,className:T,style:M,classNames:E,styles:I}=(0,n.useComponentConfig)("popconfirm"),[O,A]=(0,r.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(d=e.defaultOpen)?d:e.defaultVisible}),D=(e,t)=>{A(e,!0),null==w||w(e),null==v||v(e,t)},B=S("popconfirm",u),R=(0,a.default)(B,T,j,E.root,null==C?void 0:C.root),F=(0,a.default)(E.body,null==C?void 0:C.body),[P]=p(B);return P(t.createElement(i.default,Object.assign({},(0,s.default)(N,["title"]),{trigger:h,placement:m,onOpenChange:(t,l)=>{let{disabled:a=!1}=e;a||D(t,l)},open:O,ref:o,classNames:{root:R,body:F},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},I.root),M),k),null==_?void 0:_.root),body:Object.assign(Object.assign({},I.body),null==_?void 0:_.body)},content:t.createElement(f,Object.assign({okType:g,icon:x},e,{prefixCls:B,close:e=>{D(!1,e)},onConfirm:t=>{var l;return null==(l=e.onConfirm)?void 0:l.call(void 0,t)},onCancel:t=>{var l;D(!1,t),null==(l=e.onCancel)||l.call(void 0,t)}})),"data-popover-inject":!0}),y))});y._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:l,placement:r,className:s,style:i}=e,o=x(e,["prefixCls","placement","className","style"]),{getPrefixCls:c}=t.useContext(n.ConfigContext),d=c("popconfirm",l),[u]=p(d);return u(t.createElement(g.default,{placement:r,className:(0,a.default)(d,s),style:i,content:t.createElement(f,Object.assign({prefixCls:d},o))}))},e.s(["Popconfirm",0,y],883552)},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(914949),r=e.i(404948);let s=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,s],836938);var n=e.i(613541),i=e.i(763731),o=e.i(242064),c=e.i(491816);e.i(793154);var d=e.i(880476),u=e.i(183293),m=e.i(717356),h=e.i(320560),g=e.i(307358),p=e.i(246422),x=e.i(838378),f=e.i(617933);let b=(0,p.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:l}=e,a=(0,x.mergeToken)(e,{popoverBg:t,popoverColor:l});return[(e=>{let{componentCls:t,popoverColor:l,titleMinWidth:a,fontWeightStrong:r,innerPadding:s,boxShadowSecondary:n,colorTextHeading:i,borderRadiusLG:o,zIndexPopup:c,titleMarginBottom:d,colorBgElevated:m,popoverBg:g,titleBorderBottom:p,innerContentPadding:x,titlePadding:f}=e;return[{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:o,boxShadow:n,padding:s},[`${t}-title`]:{minWidth:a,marginBottom:d,color:i,fontWeight:r,borderBottom:p,padding:f},[`${t}-inner-content`]:{color:l,padding:x}})},(0,h.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:f.PresetColors.map(l=>{let a=e[`${l}6`];return{[`&${t}-${l}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:l,fontHeight:a,padding:r,wireframe:s,zIndexPopupBase:n,borderRadiusLG:i,marginXS:o,lineType:c,colorSplit:d,paddingSM:u}=e,m=l-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:n+30},(0,g.getArrowToken)(e)),(0,h.getArrowOffsetToken)({contentRadius:i,limitVerticalRadius:!0})),{innerPadding:12*!s,titleMarginBottom:s?0:o,titlePadding:s?`${m/2}px ${r}px ${m/2-t}px`:0,titleBorderBottom:s?`${t}px ${c} ${d}`:"none",innerContentPadding:s?`${u}px ${r}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var y=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let j=({title:e,content:l,prefixCls:a})=>e||l?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),l&&t.createElement("div",{className:`${a}-inner-content`},l)):null,v=e=>{let{hashId:a,prefixCls:r,className:n,style:i,placement:o="top",title:c,content:u,children:m}=e,h=s(c),g=s(u),p=(0,l.default)(a,r,`${r}-pure`,`${r}-placement-${o}`,n);return t.createElement("div",{className:p,style:i},t.createElement("div",{className:`${r}-arrow`}),t.createElement(d.Popup,Object.assign({},e,{className:a,prefixCls:r}),m||t.createElement(j,{prefixCls:r,title:h,content:g})))},w=e=>{let{prefixCls:a,className:r}=e,s=y(e,["prefixCls","className"]),{getPrefixCls:n}=t.useContext(o.ConfigContext),i=n("popover",a),[c,d,u]=b(i);return c(t.createElement(v,Object.assign({},s,{prefixCls:i,hashId:d,className:(0,l.default)(r,u)})))};e.s(["Overlay",0,j,"default",0,w],310730);var k=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let _=t.forwardRef((e,d)=>{var u,m;let{prefixCls:h,title:g,content:p,overlayClassName:x,placement:f="top",trigger:y="hover",children:v,mouseEnterDelay:w=.1,mouseLeaveDelay:_=.1,onOpenChange:C,overlayStyle:N={},styles:S,classNames:T}=e,M=k(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:I,style:O,classNames:A,styles:D}=(0,o.useComponentConfig)("popover"),B=E("popover",h),[R,F,P]=b(B),$=E(),L=(0,l.default)(x,F,P,I,A.root,null==T?void 0:T.root),H=(0,l.default)(A.body,null==T?void 0:T.body),[z,V]=(0,a.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),U=(e,t)=>{V(e,!0),null==C||C(e,t)},q=s(g),W=s(p);return R(t.createElement(c.default,Object.assign({placement:f,trigger:y,mouseEnterDelay:w,mouseLeaveDelay:_},M,{prefixCls:B,classNames:{root:L,body:H},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},D.root),O),N),null==S?void 0:S.root),body:Object.assign(Object.assign({},D.body),null==S?void 0:S.body)},ref:d,open:z,onOpenChange:e=>{U(e)},overlay:q||W?t.createElement(j,{prefixCls:B,title:q,content:W}):null,transitionName:(0,n.getTransitionName)($,"zoom-big",M.transitionName),"data-popover-inject":!0}),(0,i.cloneElement)(v,{onKeyDown:e=>{var l,a;(0,t.isValidElement)(v)&&(null==(a=null==v?void 0:(l=v.props).onKeyDown)||a.call(l,e)),e.keyCode===r.default.ESC&&U(!1,e)}})))});_._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,_],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},822315,(e,t,l)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",l="minute",a="hour",r="week",s="month",n="quarter",i="year",o="date",c="Invalid Date",d=/^(\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,l){var a=String(e);return!a||a.length>=t?e:""+Array(t+1-a.length).join(l)+e},h="en",g={};g[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"],l=e%100;return"["+e+(t[(l-20)%10]||t[l]||t[0])+"]"}};var p="$isDayjsObject",x=function(e){return e instanceof j||!(!e||!e[p])},f=function e(t,l,a){var r;if(!t)return h;if("string"==typeof t){var s=t.toLowerCase();g[s]&&(r=s),l&&(g[s]=l,r=s);var n=t.split("-");if(!r&&n.length>1)return e(n[0])}else{var i=t.name;g[i]=t,r=i}return!a&&r&&(h=r),r||!a&&h},b=function(e,t){if(x(e))return e.clone();var l="object"==typeof t?t:{};return l.date=e,l.args=arguments,new j(l)},y={s:m,z:function(e){var t=-e.utcOffset(),l=Math.abs(t);return(t<=0?"+":"-")+m(Math.floor(l/60),2,"0")+":"+m(l%60,2,"0")},m:function e(t,l){if(t.date(){"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(115504);function r({className:e="",...r}){var s,n;let i=(0,l.useId)();return s=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===i),l=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==i);t&&l&&(t.currentTime=l.currentTime)},n=[i],(0,l.useLayoutEffect)(s,n),(0,t.jsxs)("svg",{"data-spinner-id":i,className:(0,a.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...r,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>r],571303)},936578,e=>{"use strict";var t=e.i(843476),l=e.i(115504),a=e.i(571303);function r(){return(0,t.jsxs)("div",{className:(0,l.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(a.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>r])},902739,e=>{"use strict";var t=e.i(843476),l=e.i(111672),a=e.i(764205),r=e.i(135214),s=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:n,sidebarCollapsed:i})=>{let{accessToken:o}=(0,r.default)(),[c,d]=(0,s.useState)(null),[u,m]=(0,s.useState)(!1),[h,g]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,b]=(0,s.useState)(!1),[y,j]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(!o)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,a.getUISettings)(o);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),d(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&m(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&x(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&b(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&j(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[o]),(0,t.jsx)(l.default,{setPage:e,defaultSelectedKey:n,collapsed:i,enabledPagesInternalUsers:c,enableProjectsUI:u,disableAgentsForInternalUsers:h,allowAgentsForTeamAdmins:p,disableVectorStoresForInternalUsers:f,allowVectorStoresForTeamAdmins:y})}])},208075,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),r=e.i(629569),s=e.i(599724),n=e.i(779241),i=e.i(994388),o=e.i(275144),c=e.i(764205),d=e.i(727749);e.s(["default",0,({userID:e,userRole:u,accessToken:m})=>{let{logoUrl:h,setLogoUrl:g,faviconUrl:p,setFaviconUrl:x}=(0,o.useTheme)(),[f,b]=(0,l.useState)(""),[y,j]=(0,l.useState)(""),[v,w]=(0,l.useState)(!1);(0,l.useEffect)(()=>{m&&k()},[m]);let k=async()=>{try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",l=await fetch(t,{method:"GET",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();b(e.values?.logo_url||""),j(e.values?.favicon_url||""),g(e.values?.logo_url||null),x(e.values?.favicon_url||null)}}catch(e){console.error("Error fetching theme settings:",e)}},_=async()=>{w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:f||null,favicon_url:y||null})})).ok)d.default.success("Theme settings updated successfully!"),g(f||null),x(y||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating theme settings:",e),d.default.fromBackend("Failed to update theme settings")}finally{w(!1)}},C=async()=>{b(""),j(""),g(null),x(null),w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:null,favicon_url:null})})).ok)d.default.success("Theme settings reset to default!");else throw Error("Failed to reset")}catch(e){console.error("Error resetting theme settings:",e),d.default.fromBackend("Failed to reset theme settings")}finally{w(!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)(r.Title,{className:"text-2xl font-bold mb-2",children:"UI Theme Customization"}),(0,t.jsx)(s.Text,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo and favicon."})]}),(0,t.jsx)(a.Card,{className:"shadow-sm p-6",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,t.jsx)(n.TextInput,{placeholder:"https://example.com/logo.png",value:f,onValueChange:e=>{b(e),g(e||null)},className:"w-full"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty for default"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Favicon URL"}),(0,t.jsx)(n.TextInput,{placeholder:"https://example.com/favicon.ico",value:y,onValueChange:e=>{j(e),x(e||null)},className:"w-full"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 mt-1",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.jsx)(i.Button,{onClick:_,loading:v,disabled:v,color:"indigo",children:"Save Changes"}),(0,t.jsx)(i.Button,{onClick:C,loading:v,disabled:v,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}])},662316,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(464571),r=e.i(166406),s=e.i(629569),n=e.i(764205),i=e.i(727749);e.s(["default",0,({accessToken:e})=>{let[o,c]=(0,l.useState)(`{ + "model": "openai/gpt-4o", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "Explain quantum computing in simple terms" + } + ], + "temperature": 0.7, + "max_tokens": 500, + "stream": true +}`),[d,u]=(0,l.useState)(""),[m,h]=(0,l.useState)(!1),g=async()=>{h(!0);try{let r;try{r=JSON.parse(o)}catch(e){i.default.fromBackend("Invalid JSON in request body"),h(!1);return}let s={call_type:"completion",request_body:r};if(!e){i.default.fromBackend("No access token found"),h(!1);return}let c=await (0,n.transformRequestCall)(e,s);if(c.raw_request_api_base&&c.raw_request_body){var t,l,a;let e,r,s=(t=c.raw_request_api_base,l=c.raw_request_body,a=c.raw_request_headers||{},e=JSON.stringify(l,null,2).split("\n").map(e=>` ${e}`).join("\n"),r=Object.entries(a).map(([e,t])=>`-H '${e}: ${t}'`).join(" \\\n "),`curl -X POST \\ + ${t} \\ + ${r?`${r} \\ + `:""}-H 'Content-Type: application/json' \\ + -d '{ +${e} + }'`);u(s),i.default.success("Request transformed successfully")}else{let e="string"==typeof c?c:JSON.stringify(c);u(e),i.default.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),i.default.fromBackend("Failed to transform request")}finally{h(!1)}};return(0,t.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,t.jsx)(s.Title,{children:"Playground"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"See how LiteLLM transforms your request for the specified provider."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"16px",width:"100%",minWidth:0,overflow:"hidden"},className:"mt-4",children:[(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"600px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Original Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"The request you would send to LiteLLM /chat/completions endpoint."})]}),(0,t.jsx)("textarea",{style:{flex:"1 1 auto",width:"100%",minHeight:"240px",padding:"16px",border:"1px solid #e8e8e8",borderRadius:"6px",fontFamily:"monospace",fontSize:"14px",resize:"none",marginBottom:"24px",overflow:"auto"},value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),g())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,t.jsxs)(a.Button,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:g,loading:m,children:[(0,t.jsx)("span",{children:"Transform"}),(0,t.jsx)("span",{children:"→"})]})})]}),(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"800px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Transformed Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"How LiteLLM transforms your request for the specified provider."}),(0,t.jsx)("br",{}),(0,t.jsx)("p",{style:{color:"#666",margin:0},className:"text-xs",children:"Note: Sensitive headers are not shown."})]}),(0,t.jsxs)("div",{style:{position:"relative",backgroundColor:"#f5f5f5",borderRadius:"6px",flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsx)("pre",{style:{padding:"16px",fontFamily:"monospace",fontSize:"14px",margin:0,overflow:"auto",flex:"1 1 auto"},children:d||`curl -X POST \\ + https://api.openai.com/v1/chat/completions \\ + -H 'Authorization: Bearer sk-xxx' \\ + -H 'Content-Type: application/json' \\ + -d '{ + "model": "gpt-4", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + } + ], + "temperature": 0.7 + }'`}),(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(r.CopyOutlined,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(d||""),i.default.success("Copied to clipboard")}})]})]})]}),(0,t.jsx)("div",{className:"mt-4 text-right w-full",children:(0,t.jsxs)("p",{className:"text-sm text-gray-500",children:["Found an error? File an issue"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})]})}])},673709,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(678784);let r=(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 s=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:i})=>{let[o,c]=(0,l.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:o?(0,t.jsx)(a.CheckIcon,{size:16}):(0,t.jsx)(r,{size:16})}),(0,t.jsx)(s.Prism,{language:i,style:n,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],673709)},778917,e=>{"use strict";var t=e.i(546467);e.s(["ExternalLink",()=>t.default])},646050,e=>{"use strict";var t=e.i(843476),l=e.i(994388),a=e.i(304967),r=e.i(197647),s=e.i(653824),n=e.i(269200),i=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),m=e.i(881073),h=e.i(404206),g=e.i(723731),p=e.i(599724),x=e.i(271645),f=e.i(650056),b=e.i(127952),y=e.i(902555),j=e.i(727749),v=e.i(266027),w=e.i(954616),k=e.i(912598),_=e.i(243652),C=e.i(764205),N=e.i(135214);let S=(0,_.createQueryKeys)("budgets");var T=e.i(779241),M=e.i(677667),E=e.i(898667),I=e.i(130643),O=e.i(464571),A=e.i(212931),D=e.i(808613),B=e.i(28651),R=e.i(199133);let F=({isModalVisible:e,setIsModalVisible:l})=>{let[a]=D.Form.useForm(),r=(()=>{let{accessToken:e}=(0,N.default)(),t=(0,k.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,C.budgetCreateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),s=async e=>{try{j.default.info("Making API Call"),await r.mutateAsync(e),j.default.success("Budget Created"),a.resetFields(),l(!1)}catch(e){console.error("Error creating the budget:",e),j.default.fromBackend(`Error creating the budget: ${e}`)}};return(0,t.jsx)(A.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),a.resetFields()},onCancel:()=>{l(!1),a.resetFields()},children:(0,t.jsxs)(D.Form,{form:a,onFinish:s,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,t.jsx)(T.TextInput,{placeholder:""})}),(0,t.jsx)(D.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(M.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(I.AccordionBody,{children:[(0,t.jsx)(D.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(B.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(R.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(R.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(R.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(R.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(O.Button,{htmlType:"submit",children:"Create Budget"})})]})})},P=({isModalVisible:e,setIsModalVisible:l,existingBudget:a})=>{let[r]=D.Form.useForm(),s=(()=>{let{accessToken:e}=(0,N.default)(),t=(0,k.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,C.budgetUpdateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})();(0,x.useEffect)(()=>{r.setFieldsValue(a)},[a,r]);let n=async e=>{try{j.default.info("Making API Call"),await s.mutateAsync(e),j.default.success("Budget Updated"),r.resetFields(),l(!1)}catch(e){console.error("Error updating the budget:",e),j.default.fromBackend(`Error updating the budget: ${e}`)}};return(0,t.jsx)(A.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),r.resetFields()},onCancel:()=>{l(!1),r.resetFields()},children:(0,t.jsxs)(D.Form,{form:r,onFinish:n,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:a,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Form.Item,{label:"Budget ID",name:"budget_id",help:"Budget ID cannot be changed after creation",children:(0,t.jsx)(T.TextInput,{placeholder:"",disabled:!0})}),(0,t.jsx)(D.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(M.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(I.AccordionBody,{children:[(0,t.jsx)(D.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(B.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(D.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(R.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(R.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(R.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(R.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(O.Button,{htmlType:"submit",children:"Save"})})]})})},$=` +curl -X POST --location '/end_user/new' \\ + +-H 'Authorization: Bearer ' \\ + +-H 'Content-Type: application/json' \\ + +-d '{"user_id": "my-customer-id', "budget_id": ""}' # 👈 KEY CHANGE + +`,L=` +curl -X POST --location '/chat/completions' \\ + +-H 'Authorization: Bearer ' \\ + +-H 'Content-Type: application/json' \\ + +-d '{ + "model": "gpt-3.5-turbo', + "messages":[{"role": "user", "content": "Hey, how's it going?"}], + "user": "my-customer-id" +}' # 👈 KEY CHANGE + +`,H=`from openai import OpenAI +client = OpenAI( + base_url="", + api_key="" +) + +completion = client.chat.completions.create( + model="gpt-3.5-turbo", + messages=[ + {"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Hello!"} + ], + user="my-customer-id" +) + +print(completion.choices[0].message)`;var z=e.i(708347);e.s(["default",0,({accessToken:e})=>{let[_,T]=(0,x.useState)(!1),[M,E]=(0,x.useState)(!1),[I,O]=(0,x.useState)(null),[A,D]=(0,x.useState)(!1),{userRole:B}=(0,N.default)(),R=(0,z.isProxyAdminRole)(B??""),{data:V=[]}=(()=>{let{accessToken:e}=(0,N.default)();return(0,v.useQuery)({queryKey:S.list({}),queryFn:async()=>(await (0,C.getBudgetList)(e)??[]).filter(e=>null!=e),enabled:!!e})})(),U=(()=>{let{accessToken:e}=(0,N.default)(),t=(0,k.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,C.budgetDeleteCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),q=async t=>{null!=e&&(O(t),E(!0))},W=async()=>{if(I&&null!=e)try{await U.mutateAsync(I.budget_id),j.default.success("Budget deleted.")}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{D(!1),O(null)}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[R&&(0,t.jsx)(l.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>T(!0),children:"+ Create Budget"}),(0,t.jsxs)(s.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Budgets"}),(0,t.jsx)(r.Tab,{children:"Examples"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(F,{isModalVisible:_,setIsModalVisible:T}),I&&(0,t.jsx)(P,{isModalVisible:M,setIsModalVisible:E,existingBudget:I}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(p.Text,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(n.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"Budget ID"}),(0,t.jsx)(d.TableHeaderCell,{children:"Max Budget"}),(0,t.jsx)(d.TableHeaderCell,{children:"TPM"}),(0,t.jsx)(d.TableHeaderCell,{children:"RPM"})]})}),(0,t.jsx)(i.TableBody,{children:V.slice().sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()).map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e.budget_id}),(0,t.jsx)(o.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),R&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>q(e),dataTestId:"edit-budget-button"}),(0,t.jsx)(y.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{O(e),D(!0)},dataTestId:"delete-budget-button"})]})]},e.budget_id))})]})]}),(0,t.jsx)(b.default,{isOpen:A,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:I?.budget_id,code:!0},{label:"Max Budget",value:I?.max_budget},{label:"TPM",value:I?.tpm_limit},{label:"RPM",value:I?.rpm_limit}],onCancel:()=>{D(!1)},onOk:W,confirmLoading:U.isPending})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(p.Text,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(s.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Assign Budget to Customer"}),(0,t.jsx)(r.Tab,{children:"Test it (Curl)"}),(0,t.jsx)(r.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:$})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:L})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"python",children:H})})]})]})]})})]})]})]})}],646050)},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,t)=>(e[t.team_id]=t.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,t)=>{let l=t.find(t=>t.team_id===e);return l?l.team_alias:null}])},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["GlobalOutlined",0,s],160818)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["MinusCircleOutlined",0,s],564897)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["SaveOutlined",0,s],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,r,s)=>{let n;n="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,r?.organization_id||null,l):await (0,t.teamListCall)(e,r?.organization_id||null),console.log(`givenTeams: ${n}`),s(n)};e.s(["fetchTeams",0,l])},747871,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(269200),r=e.i(942232),s=e.i(977572),n=e.i(427612),i=e.i(64848),o=e.i(496020),c=e.i(304967),d=e.i(994388),u=e.i(599724),m=e.i(389083),h=e.i(764205),g=e.i(727749);e.s(["default",0,({accessToken:e,userID:p})=>{let[x,f]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{if(e&&p)try{let t=await (0,h.availableTeamListCall)(e);f(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,p]);let b=async t=>{if(e&&p)try{await (0,h.teamMemberAddCall)(e,t,{user_id:p,role:"user"}),g.default.success("Successfully joined team"),f(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),g.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(n.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(i.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(i.TableHeaderCell,{children:"Description"}),(0,t.jsx)(i.TableHeaderCell,{children:"Members"}),(0,t.jsx)(i.TableHeaderCell,{children:"Models"}),(0,t.jsx)(i.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(r.TableBody,{children:[x.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Text,{children:e.team_alias})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Text,{children:e.description||"No description available"})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsxs)(u.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,l)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(u.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},l)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(u.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Button,{size:"xs",variant:"secondary",onClick:()=>b(e.team_id),children:"Join Team"})})]},e.team_id)),0===x.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(s.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(u.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])},468133,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(175712),r=e.i(464571),s=e.i(28651),n=e.i(898586),i=e.i(482725),o=e.i(199133),c=e.i(262218),d=e.i(621192),u=e.i(178654),m=e.i(751904),h=e.i(987432),g=e.i(764205),p=e.i(860585),x=e.i(355619),f=e.i(727749),b=e.i(162386);let{Title:y,Text:j}=n.Typography,v=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],w=({label:e,description:l,isEditing:a,viewContent:r,editContent:s})=>(0,t.jsxs)(d.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(u.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:l})]}),(0,t.jsx)(u.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:a?s:r})})]}),k=()=>(0,t.jsx)(j,{className:"text-gray-400 italic",children:"Not set"}),_=(e,l)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:l?l(e):e},e))}):(0,t.jsx)(k,{}),C={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[n,d]=(0,l.useState)(!0),[u,N]=(0,l.useState)(C),[S,T]=(0,l.useState)(!1),[M,E]=(0,l.useState)(C),[I,O]=(0,l.useState)(!1),[A,D]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(!e)return d(!1);try{let t=await (0,g.getDefaultTeamSettings)(e),l={...C,...t.values||{}};N(l),E(l)}catch(e){console.error("Error fetching team SSO settings:",e),D(!0),f.default.fromBackend("Failed to fetch team settings")}finally{d(!1)}})()},[e]);let B=async()=>{if(e){O(!0);try{let t=await (0,g.updateDefaultTeamSettings)(e,M),l={...C,...t.settings||{}};N(l),E(l),T(!1),f.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),f.default.fromBackend("Failed to update team settings")}finally{O(!1)}}},R=(e,t)=>{E(l=>({...l,[e]:t}))};return n?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(i.Spin,{size:"large"})}):A?(0,t.jsx)(a.Card,{children:(0,t.jsx)(j,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(a.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(y,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(j,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:S?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(r.Button,{onClick:()=>{T(!1),E(u)},disabled:I,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"primary",onClick:B,loading:I,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(r.Button,{onClick:()=>T(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:S,viewContent:null!=u.max_budget?(0,t.jsxs)(j,{children:["$",Number(u.max_budget).toLocaleString()]}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.max_budget,onChange:e=>R("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(w,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:S,viewContent:u.budget_duration?(0,t.jsx)(j,{children:(0,p.getBudgetDurationLabel)(u.budget_duration)}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(p.default,{value:M.budget_duration||null,onChange:e=>R("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(w,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:S,viewContent:null!=u.tpm_limit?(0,t.jsx)(j,{children:u.tpm_limit.toLocaleString()}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.tpm_limit,onChange:e=>R("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(w,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:S,viewContent:null!=u.rpm_limit?(0,t.jsx)(j,{children:u.rpm_limit.toLocaleString()}):(0,t.jsx)(k,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.rpm_limit,onChange:e=>R("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Models",description:"Default list of models that new teams can access.",isEditing:S,viewContent:_(u.models,x.getModelDisplayName),editContent:(0,t.jsx)(b.ModelSelect,{value:M.models||[],onChange:e=>R("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(w,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:S,viewContent:_(u.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:M.team_member_permissions||[],onChange:e=>R("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:l,onClose:a})=>(0,t.jsx)(c.Tag,{color:"blue",closable:l,onClose:a,className:"mr-1 mt-1 mb-1",children:e}),children:v.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},735042,e=>{"use strict";e.i(247167);var t=e.i(843476),l=e.i(584935),a=e.i(290571),r=e.i(271645),s=e.i(95779),n=e.i(444755),i=e.i(673706);let o=(0,i.makeClassName)("BarList");function c(e,t){let{data:l=[],color:c,valueFormatter:d=i.defaultValueFormatter,showAnimation:u=!1,onValueChange:m,sortOrder:h="descending",className:g}=e,p=(0,a.__rest)(e,["data","color","valueFormatter","showAnimation","onValueChange","sortOrder","className"]),x=m?"button":"div",f=r.default.useMemo(()=>"none"===h?l:[...l].sort((e,t)=>"ascending"===h?e.value-t.value:t.value-e.value),[l,h]),b=r.default.useMemo(()=>{let e=Math.max(...f.map(e=>e.value),0);return f.map(t=>0===t.value?0:Math.max(t.value/e*100,2))},[f]);return r.default.createElement("div",Object.assign({ref:t,className:(0,n.tremorTwMerge)(o("root"),"flex justify-between space-x-6",g),"aria-sort":h},p),r.default.createElement("div",{className:(0,n.tremorTwMerge)(o("bars"),"relative w-full space-y-1.5")},f.map((e,t)=>{var l,a,d;let h=e.icon;return r.default.createElement(x,{key:null!=(l=e.key)?l:t,onClick:()=>{null==m||m(e)},className:(0,n.tremorTwMerge)(o("bar"),"group w-full flex items-center rounded-tremor-small",m?["cursor-pointer","hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-subtle/40"]:"")},r.default.createElement("div",{className:(0,n.tremorTwMerge)("flex items-center rounded transition-all bg-opacity-40","h-8",e.color||c?[(0,i.getColorClassNames)(null!=(a=e.color)?a:c,s.colorPalette.background).bgColor,m?"group-hover:bg-opacity-30":""]:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle/60",!m||e.color||c?"":"group-hover:bg-tremor-brand-subtle/30 group-hover:dark:bg-dark-tremor-brand-subtle/70",t===f.length-1?"mb-0":"",u?"duration-500":""),style:{width:`${b[t]}%`,transition:u?"all 1s":""}},r.default.createElement("div",{className:(0,n.tremorTwMerge)("absolute left-2 pr-4 flex max-w-full")},h?r.default.createElement(h,{className:(0,n.tremorTwMerge)(o("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?r.default.createElement("a",{href:e.href,target:null!=(d=e.target)?d:"_blank",rel:"noreferrer",className:(0,n.tremorTwMerge)(o("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default",m?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:e=>e.stopPropagation()},e.name):r.default.createElement("p",{className:(0,n.tremorTwMerge)(o("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name))))})),r.default.createElement("div",{className:o("labels")},f.map((e,t)=>{var l;return r.default.createElement("div",{key:null!=(l=e.key)?l:t,className:(0,n.tremorTwMerge)(o("labelWrapper"),"flex justify-end items-center","h-8",t===f.length-1?"mb-0":"mb-1.5")},r.default.createElement("p",{className:(0,n.tremorTwMerge)(o("labelText"),"whitespace-nowrap leading-none truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},d(e.value)))})))}c.displayName="BarList";let d=r.default.forwardRef(c);var u=e.i(304967),m=e.i(629569),h=e.i(269200),g=e.i(427612),p=e.i(64848),x=e.i(496020),f=e.i(977572),b=e.i(942232),y=e.i(37091),j=e.i(617802),v=e.i(144267),w=e.i(350967),k=e.i(309426),_=e.i(599724),C=e.i(404206),N=e.i(723731),S=e.i(653824),T=e.i(881073),M=e.i(197647),E=e.i(206929),I=e.i(35983),O=e.i(413990),A=e.i(476961),D=e.i(994388),B=e.i(621642),R=e.i(25080),F=e.i(764205),P=e.i(1023),$=e.i(500330);console.log("process.env.NODE_ENV","production");let L=e=>null!==e&&("Admin"===e||"Admin Viewer"===e);e.s(["default",0,({accessToken:e,token:a,userRole:s,userID:n,keys:i,premiumUser:o})=>{let c=new Date,[H,z]=(0,r.useState)([]),[V,U]=(0,r.useState)([]),[q,W]=(0,r.useState)([]),[G,K]=(0,r.useState)([]),[Y,J]=(0,r.useState)([]),[Q,X]=(0,r.useState)([]),[Z,ee]=(0,r.useState)([]),[et,el]=(0,r.useState)([]),[ea,er]=(0,r.useState)([]),[es,en]=(0,r.useState)([]),[ei,eo]=(0,r.useState)({}),[ec,ed]=(0,r.useState)([]),[eu,em]=(0,r.useState)(""),[eh,eg]=(0,r.useState)(["all-tags"]),[ep,ex]=(0,r.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[ef,eb]=(0,r.useState)(null),[ey,ej]=(0,r.useState)(0),ev=new Date(c.getFullYear(),c.getMonth(),1),ew=new Date(c.getFullYear(),c.getMonth()+1,0),ek=eM(ev),e_=eM(ew);function eC(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}console.log("keys in usage",i),console.log("premium user in usage",o);let eN=async()=>{if(e)try{let t=await (0,F.getProxyUISettings)(e);return console.log("usage tab: proxy_settings",t),t}catch(e){console.error("Error fetching proxy settings:",e)}};(0,r.useEffect)(()=>{eT(ep.from,ep.to)},[ep,eh]);let eS=async(t,l,a)=>{if(!t||!l||!e)return;console.log("uiSelectedKey",a);let r=await (0,F.adminTopEndUsersCall)(e,a,t.toISOString(),l.toISOString());console.log("End user data updated successfully",r),K(r)},eT=async(t,l)=>{if(!t||!l||!e)return;let a=await eN();a?.DISABLE_EXPENSIVE_DB_QUERIES||(X((await (0,F.tagsSpendLogsCall)(e,t.toISOString(),l.toISOString(),0===eh.length?void 0:eh)).spend_per_tag),console.log("Tag spend data updated successfully"))};function eM(e){let t=e.getFullYear(),l=e.getMonth()+1,a=e.getDate();return`${t}-${l<10?"0"+l:l}-${a<10?"0"+a:a}`}console.log(`Start date is ${ek}`),console.log(`End date is ${e_}`);let eE=async(e,t,l)=>{try{let l=await e();t(l)}catch(e){console.error(l,e)}},eI=(e,t,l,a)=>{let r=[],s=new Date(t),n=new Map(e.map(e=>{let t=(e=>{if(e.includes("-"))return e;{let[t,l]=e.split(" ");return new Date(new Date().getFullYear(),new Date(`${t} 01 2024`).getMonth(),parseInt(l)).toISOString().split("T")[0]}})(e.date);return[t,{...e,date:t}]}));for(;s<=l;){let e=s.toISOString().split("T")[0];if(n.has(e))r.push(n.get(e));else{let t={date:e,api_requests:0,total_tokens:0};a.forEach(e=>{t[e]||(t[e]=0)}),r.push(t)}s.setDate(s.getDate()+1)}return r},eO=async()=>{if(e)try{let t=await (0,F.adminSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=eI(t,a,r,[]),n=Number(s.reduce((e,t)=>e+(t.spend||0),0).toFixed(2));ej(n),z(s)}catch(e){console.error("Error fetching overall spend:",e)}},eA=async()=>{e&&await eE(async()=>(await (0,F.adminTopKeysCall)(e)).map(e=>({key:e.api_key.substring(0,10),api_key:e.api_key,key_alias:e.key_alias,spend:Number(e.total_spend.toFixed(2))})),U,"Error fetching top keys")},eD=async()=>{e&&await eE(async()=>(await (0,F.adminTopModelsCall)(e)).map(e=>({key:e.model,spend:(0,$.formatNumberWithCommas)(e.total_spend,2)})),W,"Error fetching top models")},eB=async()=>{e&&await eE(async()=>{let t=await (0,F.teamSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0);return J(eI(t.daily_spend,a,r,t.teams)),el(t.teams),t.total_spend_per_team.map(e=>({name:e.team_id||"",value:(0,$.formatNumberWithCommas)(e.total_spend||0,2)}))},er,"Error fetching team spend")},eR=async()=>{if(e)try{let t=await (0,F.adminGlobalActivity)(e,ek,e_),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=eI(t.daily_data||[],a,r,["api_requests","total_tokens"]);eo({...t,daily_data:s})}catch(e){console.error("Error fetching global activity:",e)}},eF=async()=>{if(e)try{let t=await (0,F.adminGlobalActivityPerModel)(e,ek,e_),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=t.map(e=>({...e,daily_data:eI(e.daily_data||[],a,r,["api_requests","total_tokens"])}));ed(s)}catch(e){console.error("Error fetching global activity per model:",e)}};return((0,r.useEffect)(()=>{(async()=>{if(e&&a&&s&&n){let t=await eN();!(t&&(eb(t),t?.DISABLE_EXPENSIVE_DB_QUERIES))&&(console.log("fetching data - valiue of proxySettings",ef),eO(),eE(()=>e&&a?(0,F.adminspendByProvider)(e,a,ek,e_):Promise.reject("No access token or token"),en,"Error fetching provider spend"),eA(),eD(),eR(),eF(),L(s)&&(eB(),e&&eE(async()=>(await (0,F.allTagNamesCall)(e)).tag_names,ee,"Error fetching tag names"),e&&eE(()=>(0,F.tagsSpendLogsCall)(e,ep.from?.toISOString(),ep.to?.toISOString(),void 0),e=>X(e.spend_per_tag),"Error fetching top tags"),e&&eE(()=>(0,F.adminTopEndUsersCall)(e,null,void 0,void 0),K,"Error fetching top end users")))}})()},[e,a,s,n,ek,e_]),ef?.DISABLE_EXPENSIVE_DB_QUERIES)?(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Database Query Limit Reached"}),(0,t.jsxs)(_.Text,{className:"mt-4",children:["SpendLogs in DB has ",ef.NUM_SPEND_LOGS_ROWS," rows.",(0,t.jsx)("br",{}),"Please follow our guide to view usage when SpendLogs has more than 1M rows."]}),(0,t.jsx)(D.Button,{className:"mt-4",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/spending_monitoring",target:"_blank",children:"View Usage Guide"})})]})}):(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{className:"mt-2",children:[(0,t.jsx)(M.Tab,{children:"All Up"}),L(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Tab,{children:"Team Based Usage"}),(0,t.jsx)(M.Tab,{children:"Customer Usage"}),(0,t.jsx)(M.Tab,{children:"Tag Based Usage"})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{})})]}),(0,t.jsxs)(N.TabPanels,{children:[(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(M.Tab,{children:"Cost"}),(0,t.jsx)(M.Tab,{children:"Activity"})]}),(0,t.jsxs)(N.TabPanels,{children:[(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[100vh] w-full",children:[(0,t.jsxs)(k.Col,{numColSpan:2,children:[(0,t.jsxs)(_.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content mb-2 mt-2 text-lg",children:["Project Spend ",new Date().toLocaleString("default",{month:"long"})," 1 -"," ",new Date(new Date().getFullYear(),new Date().getMonth()+1,0).getDate()]}),(0,t.jsx)(j.default,{userSpend:ey,selectedTeam:null,userMaxBudget:null})]}),(0,t.jsx)(k.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Monthly Spend"}),(0,t.jsx)(l.BarChart,{data:H,index:"date",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$ ${(0,$.formatNumberWithCommas)(e,2)}`,yAxisWidth:100,tickGap:5})]})}),(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(P.default,{topKeys:V,teams:null,topKeysLimit:5,setTopKeysLimit:()=>{}})]})}),(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Models"}),(0,t.jsx)(l.BarChart,{className:"mt-4 h-40",data:q,index:"key",categories:["spend"],colors:["cyan"],yAxisWidth:200,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>`$${(0,$.formatNumberWithCommas)(e,2)}`})]})}),(0,t.jsx)(k.Col,{numColSpan:1}),(0,t.jsx)(k.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Spend by Provider"}),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsx)(O.DonutChart,{className:"mt-4 h-40",variant:"pie",data:es,index:"provider",category:"spend",colors:["cyan"],valueFormatter:e=>`$${(0,$.formatNumberWithCommas)(e,2)}`})}),(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend"})]})}),(0,t.jsx)(b.TableBody,{children:es.map(e=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.provider}),(0,t.jsx)(f.TableCell,{children:1e-5>parseFloat(e.spend.toFixed(2))?"less than 0.00":(0,$.formatNumberWithCommas)(e.spend,2)})]},e.provider))})]})})]})})]})})]})}),(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:1,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"All Up"}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",eC(ei.sum_api_requests)]}),(0,t.jsx)(A.AreaChart,{className:"h-40",data:ei.daily_data,valueFormatter:eC,index:"date",colors:["cyan"],categories:["api_requests"],onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",eC(ei.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:ei.daily_data,valueFormatter:eC,index:"date",colors:["cyan"],categories:["total_tokens"],onValueChange:e=>console.log(e)})]})]})]}),(0,t.jsx)(t.Fragment,{children:ec.map((e,a)=>(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:e.model}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",eC(e.sum_api_requests)]}),(0,t.jsx)(A.AreaChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["api_requests"],valueFormatter:eC,onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(k.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",eC(e.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["total_tokens"],valueFormatter:eC,onValueChange:e=>console.log(e)})]})]})]},a))})]})})]})]})}),(0,t.jsx)(C.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(k.Col,{numColSpan:2,children:[(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Total Spend Per Team"}),(0,t.jsx)(d,{data:ea})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Daily Spend Per Team"}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Y,showLegend:!0,index:"date",categories:et,yAxisWidth:80,stack:!0})]})]}),(0,t.jsx)(k.Col,{numColSpan:2})]})}),(0,t.jsxs)(C.TabPanel,{children:[(0,t.jsxs)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:["Customers of your LLM API calls. Tracked when a `user` param is passed in your LLM calls"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/users",target:"_blank",children:"docs here"})]}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(k.Col,{children:(0,t.jsx)(v.default,{value:ep,onValueChange:e=>{ex(e),eS(e.from,e.to,null)}})}),(0,t.jsxs)(k.Col,{children:[(0,t.jsx)(_.Text,{children:"Select Key"}),(0,t.jsxs)(E.Select,{defaultValue:"all-keys",children:[(0,t.jsx)(I.SelectItem,{value:"all-keys",onClick:()=>{eS(ep.from,ep.to,null)},children:"All Keys"},"all-keys"),i?.map((e,l)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,t.jsx)(I.SelectItem,{value:String(l),onClick:()=>{eS(ep.from,ep.to,e.token)},children:e.key_alias},l):null)]})]})]}),(0,t.jsx)(u.Card,{className:"mt-4",children:(0,t.jsxs)(h.Table,{className:"max-h-[70vh] min-h-[500px]",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Customer"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(p.TableHeaderCell,{children:"Total Events"})]})}),(0,t.jsx)(b.TableBody,{children:G?.map((e,l)=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.end_user}),(0,t.jsx)(f.TableCell,{children:(0,$.formatNumberWithCommas)(e.total_spend,2)}),(0,t.jsx)(f.TableCell,{children:e.total_count})]},l))})]})})]}),(0,t.jsxs)(C.TabPanel,{children:[(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(k.Col,{numColSpan:1,children:(0,t.jsx)(v.default,{className:"mb-4",value:ep,onValueChange:e=>{ex(e),eT(e.from,e.to)}})}),(0,t.jsx)(k.Col,{children:o?(0,t.jsx)("div",{children:(0,t.jsxs)(B.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(R.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsx)(R.MultiSelectItem,{value:String(e),children:e},e))]})}):(0,t.jsx)("div",{children:(0,t.jsxs)(B.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(R.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsxs)(I.SelectItem,{value:String(e),disabled:!0,children:["✨ ",e," (Enterprise only Feature)"]},e))]})})})]}),(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full mb-4",children:[(0,t.jsx)(k.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Spend Per Tag"}),(0,t.jsxs)(_.Text,{children:["Get Started by Tracking cost per tag"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/cost_tracking",target:"_blank",children:"here"})]}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Q,index:"name",categories:["spend"],colors:["cyan"]})]})}),(0,t.jsx)(k.Col,{numColSpan:2})]})]})]})]})})}],735042)},345244,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(752978),r=e.i(994388),s=e.i(309426),n=e.i(599724),i=e.i(350967),o=e.i(278587),c=e.i(304967),d=e.i(629569),u=e.i(389083),m=e.i(677667),h=e.i(898667),g=e.i(130643),p=e.i(808613),x=e.i(311451),f=e.i(199133),b=e.i(592968),y=e.i(827252),j=e.i(702597),v=e.i(355619),w=e.i(764205),k=e.i(727749),_=e.i(435451),C=e.i(860585),N=e.i(500330),S=e.i(678784),T=e.i(118366),M=e.i(464571);let E=({tagId:e,onClose:a,accessToken:s,is_admin:i,editTag:o})=>{let[E]=p.Form.useForm(),[I,O]=(0,l.useState)(null),[A,D]=(0,l.useState)(o),[B,R]=(0,l.useState)([]),[F,P]=(0,l.useState)({}),$=async(e,t)=>{await (0,N.copyToClipboard)(e)&&(P(e=>({...e,[t]:!0})),setTimeout(()=>{P(e=>({...e,[t]:!1}))},2e3))},L=async()=>{if(s)try{let t=(await (0,w.tagInfoCall)(s,[e]))[e];t&&(O(t),o&&E.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),k.default.fromBackend("Error fetching tag details: "+e)}};(0,l.useEffect)(()=>{L()},[e,s]),(0,l.useEffect)(()=>{s&&(0,j.fetchUserModels)("dummy-user","Admin",s,R)},[s]);let H=async e=>{if(s)try{await (0,w.tagUpdateCall)(s,{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}),k.default.success("Tag updated successfully"),D(!1),L()}catch(e){console.error("Error updating tag:",e),k.default.fromBackend("Error updating tag: "+e)}};return I?(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)(r.Button,{onClick:a,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 text-sm border border-gray-200",children:I.name}),(0,t.jsx)(M.Button,{type:"text",size:"small",icon:F["tag-name"]?(0,t.jsx)(S.CheckIcon,{size:12}):(0,t.jsx)(T.CopyIcon,{size:12}),onClick:()=>$(I.name,"tag-name"),className:`transition-all duration-200 ${F["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:I.description||"No description"})]}),i&&!A&&(0,t.jsx)(r.Button,{onClick:()=>D(!0),children:"Edit Tag"})]}),A?(0,t.jsx)(c.Card,{children:(0,t.jsxs)(p.Form,{form:E,onFinish:H,layout:"vertical",initialValues:I,children:[(0,t.jsx)(p.Form.Item,{label:"Tag Name",name:"name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(x.Input,{className:"rounded-md border-gray-300"})}),(0,t.jsx)(p.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(x.Input.TextArea,{rows:4})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process this type of data",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:B.map(e=>(0,t.jsx)(f.Select.Option,{value:e,children:(0,v.getModelDisplayName)(e)},e))})}),(0,t.jsxs)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(_.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(C.default,{onChange:e=>E.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)(r.Button,{onClick:()=>D(!1),children:"Cancel"}),(0,t.jsx)(r.Button,{type:"submit",children:"Save Changes"})]})]})}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.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:I.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Description"}),(0,t.jsx)(n.Text,{children:I.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:I.models&&0!==I.models.length?I.models.map(e=>(0,t.jsx)(u.Badge,{color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:I.model_info?.[e]||e})},e)):(0,t.jsx)(u.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:I.created_at?new Date(I.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:I.updated_at?new Date(I.updated_at).toLocaleString():"-"})]})]})]}),I.litellm_budget_table&&(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.Title,{children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[void 0!==I.litellm_budget_table.max_budget&&null!==I.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:["$",I.litellm_budget_table.max_budget]})]}),I.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:I.litellm_budget_table.budget_duration})]}),void 0!==I.litellm_budget_table.tpm_limit&&null!==I.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:I.litellm_budget_table.tpm_limit.toLocaleString()})]}),void 0!==I.litellm_budget_table.rpm_limit&&null!==I.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:I.litellm_budget_table.rpm_limit.toLocaleString()})]})]})]})]})]}):(0,t.jsx)("div",{children:"Loading..."})};var I=e.i(871943),O=e.i(360820),A=e.i(591935),D=e.i(94629),B=e.i(68155),R=e.i(152990),F=e.i(682830),P=e.i(269200),$=e.i(942232),L=e.i(977572),H=e.i(427612),z=e.i(64848),V=e.i(496020);let U="This is just a spend tag that was passed dynamically in a request. It does not control any LLM models.",q=({data:e,onEdit:s,onDelete:i,onSelectTag:o})=>{let[c,d]=l.default.useState([{id:"created_at",desc:!0}]),m=[{header:"Tag Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,a=l.description===U;return(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(b.Tooltip,{title:a?"You cannot view the information of a dynamically generated spend tag":l.name,children:(0,t.jsx)(r.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5",onClick:()=>o(l.name),disabled:a,children:l.name})})})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(b.Tooltip,{title:l.description,children:(0,t.jsx)("span",{className:"text-xs",children:l.description||"-"})})}},{header:"Allowed Models",accessorKey:"models",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:l?.models?.length===0?(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"red",children:"All Models"}):l?.models?.map(e=>(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:(0,t.jsx)(n.Text,{children:l.model_info?.[e]||e})})},e))})}},{header:"Created",accessorKey:"created_at",sortingFn:"datetime",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("span",{className:"text-xs",children:new Date(l.created_at).toLocaleDateString()})}},{id:"actions",header:"Actions",cell:({row:e})=>{let l=e.original,r=l.description===U;return(0,t.jsxs)("div",{className:"flex space-x-2",children:[r?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be edited",children:(0,t.jsx)(a.Icon,{icon:A.PencilAltIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Edit tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Edit tag",children:(0,t.jsx)(a.Icon,{icon:A.PencilAltIcon,size:"sm",onClick:()=>s(l),className:"cursor-pointer hover:text-blue-500"})}),r?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be deleted",children:(0,t.jsx)(a.Icon,{icon:B.TrashIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Delete tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Delete tag",children:(0,t.jsx)(a.Icon,{icon:B.TrashIcon,size:"sm",onClick:()=>i(l.name),className:"cursor-pointer hover:text-red-500"})})]})}}],h=(0,R.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:d,getCoreRowModel:(0,F.getCoreRowModel)(),getSortedRowModel:(0,F.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(P.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(H.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(V.TableRow,{children:e.headers.map(e=>(0,t.jsx)(z.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,R.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(O.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(I.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(D.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)($.TableBody,{children:h.getRowModel().rows.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(V.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(L.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,R.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(V.TableRow,{children:(0,t.jsx)(L.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No tags found"})})})})})]})})})};var W=e.i(779241),G=e.i(212931);let K=({visible:e,onCancel:l,onSubmit:a,availableModels:s})=>{let[n]=p.Form.useForm();return(0,t.jsx)(G.Modal,{title:"Create New Tag",open:e,width:800,footer:null,onCancel:()=>{n.resetFields(),l()},children:(0,t.jsxs)(p.Form,{form:n,onFinish:e=>{a(e),n.resetFields()},labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(p.Form.Item,{label:"Tag Name",name:"tag_name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(W.TextInput,{})}),(0,t.jsx)(p.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(x.Input.TextArea,{rows:4})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process requests from this tag",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_llms",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:s.map(e=>(0,t.jsx)(f.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)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits (Optional)"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(p.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend. When reached, requests with this tag will be blocked",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(_.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(p.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(C.default,{onChange:e=>n.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)(r.Button,{type:"submit",children:"Create Tag"})})]})})};e.s(["default",0,({accessToken:e,userID:c,userRole:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1),[p,x]=(0,l.useState)(null),[f,b]=(0,l.useState)(!1),[y,j]=(0,l.useState)(!1),[v,_]=(0,l.useState)(null),[C,N]=(0,l.useState)(""),[S,T]=(0,l.useState)([]),M=async()=>{if(e)try{let t=await (0,w.tagListCall)(e);console.log("List tags response:",t),m(Object.values(t))}catch(e){console.error("Error fetching tags:",e),k.default.fromBackend("Error fetching tags: "+e)}},I=async t=>{if(e)try{await (0,w.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}),k.default.success("Tag created successfully"),g(!1),M()}catch(e){console.error("Error creating tag:",e),k.default.fromBackend("Error creating tag: "+e)}},O=async e=>{_(e),j(!0)},A=async()=>{if(e&&v){try{await (0,w.tagDeleteCall)(e,v),k.default.success("Tag deleted successfully"),M()}catch(e){console.error("Error deleting tag:",e),k.default.fromBackend("Error deleting tag: "+e)}j(!1),_(null)}};return(0,l.useEffect)(()=>{c&&d&&e&&(async()=>{try{let t=await (0,w.modelInfoCall)(e,c,d);t&&t.data&&T(t.data)}catch(e){console.error("Error fetching models:",e),k.default.fromBackend("Error fetching models: "+e)}})()},[e,c,d]),(0,l.useEffect)(()=>{M()},[e]),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:p?(0,t.jsx)(E,{tagId:p,onClose:()=>{x(null),b(!1)},accessToken:e,is_admin:"Admin"===d,editTag:f}):(0,t.jsxs)("div",{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between mt-2 w-full items-center mb-4",children:[(0,t.jsx)("h1",{children:"Tag Management"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[C&&(0,t.jsxs)(n.Text,{children:["Last Refreshed: ",C]}),(0,t.jsx)(a.Icon,{icon:o.RefreshIcon,variant:"shadow",size:"xs",className:"self-center cursor-pointer",onClick:()=>{M(),N(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(n.Text,{className:"mb-4",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)(r.Button,{className:"mb-4",onClick:()=>g(!0),children:"+ Create New Tag"}),(0,t.jsx)(i.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,t.jsx)(s.Col,{numColSpan:1,children:(0,t.jsx)(q,{data:u,onEdit:e=>{x(e.name),b(!0)},onDelete:O,onSelectTag:x})})}),(0,t.jsx)(K,{visible:h,onCancel:()=>g(!1),onSubmit:I,availableModels:S}),y&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Tag"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this tag?"})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(r.Button,{onClick:A,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(r.Button,{onClick:()=>{j(!1),_(null)},children:"Cancel"})]})]})]})})]})})}],345244)},368670,e=>{"use strict";var t=e.i(764205),l=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,l.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},226898,972520,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(389083),o=e.i(64848),c=e.i(977572),d=e.i(942232),u=e.i(599724),m=e.i(994388),h=e.i(752978),g=e.i(793130),p=e.i(404206),x=e.i(723731),f=e.i(653824),b=e.i(881073),y=e.i(197647),j=e.i(764205),v=e.i(28651),w=e.i(68155),k=e.i(220508),_=e.i(464571),C=e.i(727749),N=e.i(158392);let S=({accessToken:e,userRole:a,userID:r,modelData:s})=>{let[n,i]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)({}),[m,h]=(0,l.useState)({});return((0,l.useEffect)(()=>{e&&a&&r&&((0,j.getCallbacksCall)(e,r,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy;let l=t.routing_strategy||null;i(e=>({...e,routerSettings:t,selectedStrategy:l}))}),(0,j.getRouterSettingsCall)(e).then(e=>{if(console.log("router settings from API",e),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}}),u(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&c(l.options),e.routing_strategy_descriptions&&h(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&&i(e=>({...e,enableTagFiltering:a.field_value}))}}))},[e,a,r]),e)?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(N.default,{value:n,onChange:i,routerFieldsMetadata:d,availableRoutingStrategies:o,routingStrategyDescriptions:m}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(_.Button,{onClick:()=>window.location.reload(),children:"Reset"}),(0,t.jsx)(_.Button,{type:"primary",onClick:()=>{if(!e)return;let t=n.routerSettings;console.log("router_settings",t);let l=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),a=new Set(["model_group_alias","retry_policy"]),r=Object.fromEntries(Object.entries({...t,enable_tag_filtering:n.enableTagFiltering}).map(([e,t])=>{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,n.selectedStrategy];if("enable_tag_filtering"===e)return[e,n.enableTagFiltering];if("routing_strategy_args"===e&&"latency-based-routing"===n.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)),console.log(`setRoutingStrategyArgs: ${e}`),["routing_strategy_args",e]}return null}).filter(e=>null!=e));console.log("updatedVariables",r);try{(0,j.setCallbacksCall)(e,{router_settings:r})}catch(e){C.default.fromBackend("Failed to update router settings: "+e)}C.default.success("router settings updated successfully")},children:"Save Changes"})]})]}):null};e.i(247167);var T=e.i(368670);let M=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 E=e.i(122577),I=e.i(592968),O=e.i(898586),A=e.i(356449),D=e.i(127952),B=e.i(418371),R=e.i(708347),F=e.i(888259),P=e.i(689020),$=e.i(212931);let L=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function H({open:e,onCancel:l,children:a}){return(0,t.jsx)($.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)(L,{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})})}e.s(["ArrowRight",()=>L],972520);var z=e.i(419470);function V({models:e,accessToken:a,value:r=[],onChange:s}){let[n,i]=(0,l.useState)(!1),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)(0),[h,g]=(0,l.useState)(!1),[p,x]=(0,l.useState)([{id:"1",primaryModel:null,fallbackModels:[]}]);(0,l.useEffect)(()=>{n&&(x([{id:"1",primaryModel:null,fallbackModels:[]}]),u(e=>e+1))},[n]),(0,l.useEffect)(()=>{let e=async()=>{try{let e=await (0,P.fetchAvailableModels)(a);console.log("Fetched models for fallbacks:",e),c(e)}catch(e){console.error("Error fetching model info for fallbacks:",e)}};n&&e()},[a,n]);let f=Array.from(new Set(o.map(e=>e.model_group))).sort(),b=()=>{i(!1),x([{id:"1",primaryModel:null,fallbackModels:[]}])},y=async()=>{let e=p.filter(e=>!e.primaryModel||0===e.fallbackModels.length);if(e.length>0)return void F.default.error(`Please complete configuration for all groups. ${e.length} group(s) incomplete.`);let t=[...r||[],...p.map(e=>({[e.primaryModel]:e.fallbackModels}))];if(s){g(!0);try{await s(t),C.default.success(`${p.length} fallback configuration(s) added successfully!`),b()}catch(e){console.error("Error saving fallbacks:",e)}finally{g(!1)}}else C.default.fromBackend("onChange callback not provided")};return(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Button,{className:"mx-auto",onClick:()=>i(!0),icon:()=>(0,t.jsx)("span",{className:"mr-1",children:"+"}),children:"Add Fallbacks"}),(0,t.jsxs)(H,{open:n,onCancel:b,children:[(0,t.jsx)(z.FallbackSelectionForm,{groups:p,onGroupsChange:x,availableModels:f,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)(_.Button,{type:"default",onClick:b,disabled:h,children:"Cancel"}),(0,t.jsx)(_.Button,{type:"default",onClick:y,disabled:0===p.length||h,loading:h,children:h?"Saving Configuration...":"Save All Configurations"})]})]})]})}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 q(e,l){console.log=function(){};let a=window.location.origin,r=new A.default.OpenAI({apiKey:l,baseURL:a,dangerouslyAllowBrowser:!0});try{C.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});C.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){C.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`)}}let W=({accessToken:e,userRole:a,userID:i,modelData:u})=>{let[m,g]=(0,l.useState)({}),[p,x]=(0,l.useState)(!1),[f,b]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),{data:k}=(0,T.useModelCostMap)(),_=e=>null!=k&&"object"==typeof k&&e in k?k[e].litellm_provider??"":"";(0,l.useEffect)(()=>{e&&a&&i&&(0,j.getCallbacksCall)(e,i,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)})},[e,a,i]);let N=e=>{b(e),v(!0)},S=async()=>{if(!f||!e)return;let t=Object.keys(f)[0];if(!t)return;x(!0);let l=m.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={...m,fallbacks:l};try{await (0,j.setCallbacksCall)(e,{router_settings:a}),g(a),C.default.success("Router settings updated successfully")}catch(e){C.default.fromBackend("Failed to update router settings: "+e)}finally{x(!1),v(!1),b(null)}};if(!e)return null;let A=async t=>{if(!e)return;let l={...m,fallbacks:t};try{await (0,j.setCallbacksCall)(e,{router_settings:l}),g(l)}catch(t){throw C.default.fromBackend("Failed to update router settings: "+t),e&&a&&i&&(0,j.getCallbacksCall)(e,i,a).then(e=>{let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)}),t}},F=Array.isArray(m.fallbacks)&&m.fallbacks.length>0,P=(0,R.isProxyAdminRole)(a??"");return(0,t.jsxs)(t.Fragment,{children:[P&&(0,t.jsx)(V,{models:u?.data?u.data.map(e=>e.model_name):[],accessToken:e||"",value:m.fallbacks||[],onChange:A}),F?(0,t.jsxs)(r.Table,{children:[(0,t.jsx)(s.TableHead,{children:(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(o.TableHeaderCell,{children:"Model Name"}),(0,t.jsx)(o.TableHeaderCell,{children:"Fallbacks"}),(0,t.jsx)(o.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(d.TableBody,{children:m.fallbacks.map((a,r)=>Object.entries(a).map(([s,i])=>{let o;return(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(c.TableCell,{className:"align-top",children:(o=_?.(s)??s,(0,t.jsxs)("span",{className:U,children:[(0,t.jsx)(B.ProviderLogo,{provider:o,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:s})]}))}),(0,t.jsx)(c.TableCell,{className:"align-top",children:function(e,a,r){let s=Array.isArray(a)?a:[];if(0===s.length)return null;let n=({modelName:e})=>{let l=r?.(e)??e;return(0,t.jsxs)("span",{className:U,children:[(0,t.jsx)(B.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)(M,{className:"w-5 h-5 stroke-[2.5]"})}),(0,t.jsx)("span",{className:"flex flex-wrap items-start gap-1 min-w-0",children:s.map((e,a)=>(0,t.jsxs)(l.default.Fragment,{children:[a>0&&(0,t.jsx)(h.Icon,{icon:M,size:"xs",className:"shrink-0 text-gray-400"}),(0,t.jsx)(n,{modelName:e})]},e))})]})}(0,Array.isArray(i)?i:[],_)}),(0,t.jsx)(c.TableCell,{className:"align-top",children:P&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.Tooltip,{title:"Test fallback",children:(0,t.jsx)(h.Icon,{icon:E.PlayIcon,size:"sm",onClick:()=>q(Object.keys(a)[0],e||""),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(I.Tooltip,{title:"Delete fallback",children:(0,t.jsx)("span",{"data-testid":"delete-fallback-button",role:"button",tabIndex:0,onClick:()=>N(a),onKeyDown:e=>"Enter"===e.key&&N(a),className:"cursor-pointer inline-flex",children:(0,t.jsx)(h.Icon,{icon:w.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)(O.Typography.Text,{type:"secondary",children:"No fallbacks configured. Add fallbacks to automatically try another model when the primary fails."})}),(0,t.jsx)(D.default,{isOpen:y,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:f?Object.keys(f)[0]:"",code:!0}],onCancel:()=>{v(!1),b(null)},onOk:S,confirmLoading:p})]})};e.s(["default",0,({accessToken:e,userRole:_,userID:C,modelData:N})=>{let[T,M]=(0,l.useState)([]);(0,l.useEffect)(()=>{e&&(0,j.getGeneralSettingsCall)(e).then(e=>{M(e)})},[e]);let E=(e,t)=>{M(T.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.TabGroup,{className:"h-[75vh] w-full",children:[(0,t.jsxs)(b.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(y.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(y.Tab,{value:"2",children:"Fallbacks"}),(0,t.jsx)(y.Tab,{value:"3",children:"General"})]}),(0,t.jsxs)(x.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(S,{accessToken:e,userRole:_,userID:C,modelData:N})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(W,{accessToken:e,userRole:_,userID:C,modelData:N})}),(0,t.jsx)(p.TabPanel,{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)(o.TableHeaderCell,{children:"Setting"}),(0,t.jsx)(o.TableHeaderCell,{children:"Value"}),(0,t.jsx)(o.TableHeaderCell,{children:"Status"}),(0,t.jsx)(o.TableHeaderCell,{children:"Action"})]})}),(0,t.jsx)(d.TableBody,{children:T.filter(e=>"TypedDictionary"!==e.field_type).map((l,a)=>(0,t.jsxs)(n.TableRow,{children:[(0,t.jsxs)(c.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)(c.TableCell,{children:"Integer"==l.field_type?(0,t.jsx)(v.InputNumber,{step:1,value:l.field_value,onChange:e=>E(l.field_name,e)}):"Boolean"==l.field_type?(0,t.jsx)(g.Switch,{checked:!0===l.field_value||"true"===l.field_value,onChange:e=>E(l.field_name,e)}):null}),(0,t.jsx)(c.TableCell,{children:!0==l.stored_in_db?(0,t.jsx)(i.Badge,{icon:k.CheckCircleIcon,className:"text-white",children:"In DB"}):!1==l.stored_in_db?(0,t.jsx)(i.Badge,{className:"text-gray bg-white outline",children:"In Config"}):(0,t.jsx)(i.Badge,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,t.jsxs)(c.TableCell,{children:[(0,t.jsx)(m.Button,{onClick:()=>((t,l)=>{if(!e)return;let a=T[l].field_value;if(null!=a&&void 0!=a)try{(0,j.updateConfigFieldSetting)(e,t,a);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:!0}:e);M(l)}catch(e){}})(l.field_name,a),children:"Update"}),(0,t.jsx)(h.Icon,{icon:w.TrashIcon,color:"red",onClick:()=>((t,l)=>{if(e)try{(0,j.deleteConfigFieldSetting)(e,t);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:null,field_value:null}:e);M(l)}catch(e){}})(l.field_name,0),children:"Reset"})]})]},a))})]})})})]})]})}):null}],226898)},559061,e=>{"use strict";var t=e.i(843476),l=e.i(584935),a=e.i(304967),r=e.i(309426),s=e.i(350967),n=e.i(752978),i=e.i(621642),o=e.i(25080),c=e.i(37091),d=e.i(197647),u=e.i(653824),m=e.i(881073),h=e.i(404206),g=e.i(723731),p=e.i(599724),x=e.i(271645),f=e.i(727749),b=e.i(144267),y=e.i(278587),j=e.i(764205),v=e.i(994388),w=e.i(220508),k=e.i(964306),_=e.i(551332);let C=({responseTimeMs:e})=>null==e?null:(0,t.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-500 font-mono",children:[(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 6V12L16 14M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,t.jsxs)("span",{children:[e.toFixed(0),"ms"]})]}),N=e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{}return t},S=({label:e,value:l})=>{let[a,r]=x.default.useState(!1),[s,n]=x.default.useState(!1),i=l?.toString()||"N/A",o=i.length>50?i.substring(0,50)+"...":i;return(0,t.jsx)("tr",{className:"hover:bg-gray-50",children:(0,t.jsx)("td",{className:"px-4 py-2 align-top",colSpan:2,children:(0,t.jsxs)("div",{className:"flex items-center justify-between group",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[(0,t.jsx)("button",{onClick:()=>r(!a),className:"text-gray-400 hover:text-gray-600 mr-2",children:a?"▼":"▶"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm text-gray-600",children:e}),(0,t.jsx)("pre",{className:"mt-1 text-sm font-mono text-gray-800 whitespace-pre-wrap",children:a?i:o})]})]}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(i),n(!0),setTimeout(()=>n(!1),2e3)},className:"opacity-0 group-hover:opacity-100 text-gray-400 hover:text-gray-600",children:(0,t.jsx)(_.ClipboardCopyIcon,{className:"h-4 w-4"})})]})})})},T=({response:e})=>{let l=null,a={},r={};try{if(e?.error)try{let t="string"==typeof e.error.message?JSON.parse(e.error.message):e.error.message;l={message:t?.message||"Unknown error",traceback:t?.traceback||"No traceback available",litellm_params:t?.litellm_cache_params||{},health_check_cache_params:t?.health_check_cache_params||{}},a=N(l.litellm_params)||{},r=N(l.health_check_cache_params)||{}}catch(t){console.warn("Error parsing error details:",t),l={message:String(e.error.message||"Unknown error"),traceback:"Error parsing details",litellm_params:{},health_check_cache_params:{}}}else a=N(e?.litellm_cache_params)||{},r=N(e?.health_check_cache_params)||{}}catch(e){console.warn("Error in response parsing:",e),a={},r={}}let s={redis_host:r?.redis_client?.connection_pool?.connection_kwargs?.host||r?.redis_async_client?.connection_pool?.connection_kwargs?.host||r?.connection_kwargs?.host||r?.host||"N/A",redis_port:r?.redis_client?.connection_pool?.connection_kwargs?.port||r?.redis_async_client?.connection_pool?.connection_kwargs?.port||r?.connection_kwargs?.port||r?.port||"N/A",redis_version:r?.redis_version||"N/A",startup_nodes:(()=>{try{if(r?.redis_kwargs?.startup_nodes)return JSON.stringify(r.redis_kwargs.startup_nodes);let e=r?.redis_client?.connection_pool?.connection_kwargs?.host||r?.redis_async_client?.connection_pool?.connection_kwargs?.host,t=r?.redis_client?.connection_pool?.connection_kwargs?.port||r?.redis_async_client?.connection_pool?.connection_kwargs?.port;return e&&t?JSON.stringify([{host:e,port:t}]):"N/A"}catch(e){return"N/A"}})(),namespace:r?.namespace||"N/A"};return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,t.jsxs)(u.TabGroup,{children:[(0,t.jsxs)(m.TabList,{className:"border-b border-gray-200 px-4",children:[(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Summary"}),(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Raw Response"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-6",children:[e?.status==="healthy"?(0,t.jsx)(w.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}):(0,t.jsx)(k.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsxs)(p.Text,{className:`text-sm font-medium ${e?.status==="healthy"?"text-green-500":"text-red-500"}`,children:["Cache Status: ",e?.status||"unhealthy"]})]}),(0,t.jsx)("table",{className:"w-full border-collapse",children:(0,t.jsxs)("tbody",{children:[l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold text-red-600",children:"Error Details"})}),(0,t.jsx)(S,{label:"Error Message",value:l.message}),(0,t.jsx)(S,{label:"Traceback",value:l.traceback})]}),(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Cache Details"})}),(0,t.jsx)(S,{label:"Cache Configuration",value:String(a?.type)}),(0,t.jsx)(S,{label:"Ping Response",value:String(e.ping_response)}),(0,t.jsx)(S,{label:"Set Cache Response",value:e.set_cache_response||"N/A"}),(0,t.jsx)(S,{label:"litellm_settings.cache_params",value:JSON.stringify(a,null,2)}),a?.type==="redis"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Redis Details"})}),(0,t.jsx)(S,{label:"Redis Host",value:s.redis_host||"N/A"}),(0,t.jsx)(S,{label:"Redis Port",value:s.redis_port||"N/A"}),(0,t.jsx)(S,{label:"Redis Version",value:s.redis_version||"N/A"}),(0,t.jsx)(S,{label:"Startup Nodes",value:s.startup_nodes||"N/A"}),(0,t.jsx)(S,{label:"Namespace",value:s.namespace||"N/A"})]})]})})]})}),(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded-md p-4 font-mono text-sm",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words overflow-auto max-h-[500px]",children:(()=>{try{let t={...e,litellm_cache_params:a,health_check_cache_params:r},l=JSON.parse(JSON.stringify(t,(e,t)=>{if("string"==typeof t)try{return JSON.parse(t)}catch{}return t}));return JSON.stringify(l,null,2)}catch(e){return"Error formatting JSON: "+e.message}})()})})})]})]})})},M=({accessToken:e,healthCheckResponse:l,runCachingHealthCheck:a,responseTimeMs:r})=>{let[s,n]=x.default.useState(null),[i,o]=x.default.useState(!1),c=async()=>{o(!0);let e=performance.now();await a(),n(performance.now()-e),o(!1)};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(v.Button,{onClick:c,disabled:i,className:"bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 text-white text-sm px-4 py-2 rounded-md",children:i?"Running Health Check...":"Run Health Check"}),(0,t.jsx)(C,{responseTimeMs:s})]}),l&&(0,t.jsx)(T,{response:l})]})};var E=e.i(677667),I=e.i(898667),O=e.i(130643),A=e.i(206929),D=e.i(35983);let B=({redisType:e,redisTypeDescriptions:l,onTypeChange:a})=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Redis Type"}),(0,t.jsxs)(A.Select,{value:e,onValueChange:a,children:[(0,t.jsx)(D.SelectItem,{value:"node",children:"Node (Single Instance)"}),(0,t.jsx)(D.SelectItem,{value:"cluster",children:"Cluster"}),(0,t.jsx)(D.SelectItem,{value:"sentinel",children:"Sentinel"}),(0,t.jsx)(D.SelectItem,{value:"semantic",children:"Semantic"})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:l[e]||"Select the type of Redis deployment you're using"})]});var R=e.i(135214),F=e.i(620250),P=e.i(779241),$=e.i(199133),L=e.i(689020),H=e.i(435451);let z=({field:e,currentValue:l})=>{let[a,r]=(0,x.useState)([]),[s,n]=(0,x.useState)(l||""),{accessToken:i}=(0,R.default)();if((0,x.useEffect)(()=>{i&&(async()=>{try{let e=await (0,L.fetchAvailableModels)(i);console.log("Fetched models for selector:",e),e.length>0&&r(e)}catch(e){console.error("Error fetching model info:",e)}})()},[i]),"Boolean"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",name:e.field_name,defaultChecked:!0===l||"true"===l,className:"h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:e.field_description})]})]});if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(H.default,{name:e.field_name,type:"number",defaultValue:l,placeholder:e.field_description}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("List"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)("textarea",{name:e.field_name,defaultValue:"object"==typeof l?JSON.stringify(l,null,2):l,placeholder:e.field_description,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500",rows:4}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("Models_Select"===e.field_type){let l=a.filter(e=>"embedding"===e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)($.Select,{value:s,onChange:n,showSearch:!0,placeholder:"Search and select a model...",options:l,style:{width:"100%"},className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("input",{type:"hidden",name:e.field_name,value:s}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})}if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(F.NumberInput,{name:e.field_name,defaultValue:l,placeholder:e.field_description,step:"Float"===e.field_type?.01:1}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});let o="password"===e.field_name||e.field_name.includes("password")?"password":"text";return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(P.TextInput,{name:e.field_name,type:o,defaultValue:l,placeholder:e.field_description}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})},V=(e,t)=>e.find(e=>e.field_name===t),U=(e,t)=>{let l={type:"redis"};return e.forEach(e=>{if("redis_type"===e.field_name||null!==e.redis_type&&void 0!==e.redis_type&&e.redis_type!==t)return;let a=e.field_name,r=null;if("Boolean"===e.field_type){let e=document.querySelector(`input[name="${a}"]`);e?.checked!==void 0&&(r=e.checked)}else if("List"===e.field_type){let e=document.querySelector(`textarea[name="${a}"]`);if(e?.value)try{r=JSON.parse(e.value)}catch(e){console.error(`Invalid JSON for ${a}:`,e)}}else{let t=document.querySelector(`input[name="${a}"]`);if(t?.value){let l=t.value.trim();if(""!==l)if("Integer"===e.field_type){let e=Number(l);isNaN(e)||(r=e)}else if("Float"===e.field_type){let e=Number(l);isNaN(e)||(r=e)}else r=l}}null!=r&&(l[a]=r)}),l},q=({accessToken:e,userRole:l,userID:a})=>{let r,s,n,i,o,[c,d]=(0,x.useState)({}),[u,m]=(0,x.useState)([]),[h,g]=(0,x.useState)({}),[p,b]=(0,x.useState)("node"),[y,w]=(0,x.useState)(!1),[k,_]=(0,x.useState)(!1),C=(0,x.useCallback)(async()=>{try{let t=await (0,j.getCacheSettingsCall)(e);console.log("cache settings from API",t),t.fields&&m(t.fields),t.current_values&&(d(t.current_values),t.current_values.redis_type&&b(t.current_values.redis_type)),t.redis_type_descriptions&&g(t.redis_type_descriptions)}catch(e){console.error("Failed to load cache settings:",e),f.default.fromBackend("Failed to load cache settings")}},[e]);(0,x.useEffect)(()=>{e&&C()},[e,C]);let N=async()=>{if(e){w(!0);try{let t=U(u,p),l=await (0,j.testCacheConnectionCall)(e,t);"success"===l.status?f.default.success("Cache connection test successful!"):f.default.fromBackend(`Connection test failed: ${l.message||l.error}`)}catch(e){console.error("Test connection error:",e),f.default.fromBackend(`Connection test failed: ${e.message||"Unknown error"}`)}finally{w(!1)}}},S=async()=>{if(e){_(!0);try{let t=U(u,p);"semantic"===p&&(t.type="redis-semantic"),await (0,j.updateCacheSettingsCall)(e,t),f.default.success("Cache settings updated successfully"),await C()}catch(e){console.error("Failed to save cache settings:",e),f.default.fromBackend("Failed to update cache settings")}finally{_(!1)}}};if(!e)return null;let{basicFields:T,sslFields:M,cacheManagementFields:A,gcpFields:D,clusterFields:R,sentinelFields:F,semanticFields:P}=(r=["host","port","password","username"].map(e=>V(u,e)).filter(Boolean),s=["ssl","ssl_cert_reqs","ssl_check_hostname"].map(e=>V(u,e)).filter(Boolean),n=["namespace","ttl","max_connections"].map(e=>V(u,e)).filter(Boolean),i=["gcp_service_account","gcp_ssl_ca_certs"].map(e=>V(u,e)).filter(Boolean),o=u.filter(e=>"cluster"===e.redis_type),{basicFields:r,sslFields:s,cacheManagementFields:n,gcpFields:i,clusterFields:o,sentinelFields:u.filter(e=>"sentinel"===e.redis_type),semanticFields:u.filter(e=>"semantic"===e.redis_type)});return(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:"Cache Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure Redis cache for LiteLLM"})]}),(0,t.jsx)(B,{redisType:p,redisTypeDescriptions:h,onTypeChange:b}),(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Connection Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:T.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),"cluster"===p&&R.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Cluster Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6",children:R.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),"sentinel"===p&&F.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Sentinel Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:F.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),"semantic"===p&&P.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Semantic Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:P.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),(0,t.jsxs)(E.Accordion,{className:"mt-4",children:[(0,t.jsx)(I.AccordionHeader,{children:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Advanced Settings"})}),(0,t.jsx)(O.AccordionBody,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[M.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"SSL Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:M.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),A.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"Cache Management"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:A.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]}),D.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"GCP Authentication"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:D.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(z,{field:e,currentValue:l},e.field_name)})})]})]})})]})]}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(v.Button,{variant:"secondary",size:"sm",onClick:N,disabled:y,className:"text-sm",children:y?"Testing...":"Test Connection"}),(0,t.jsx)(v.Button,{size:"sm",onClick:S,disabled:k,className:"text-sm font-medium",children:k?"Saving...":"Save Changes"})]})]})},W=e=>{if(e)return e.toISOString().split("T")[0]};function G(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}e.s(["default",0,({accessToken:e,token:v,userRole:w,userID:k,premiumUser:_})=>{let[C,N]=(0,x.useState)([]),[S,T]=(0,x.useState)([]),[E,I]=(0,x.useState)([]),[O,A]=(0,x.useState)([]),[D,B]=(0,x.useState)("0"),[R,F]=(0,x.useState)("0"),[P,$]=(0,x.useState)("0"),[L,H]=(0,x.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[z,V]=(0,x.useState)(""),[U,K]=(0,x.useState)("");(0,x.useEffect)(()=>{e&&L&&((async()=>{A(await (0,j.adminGlobalCacheActivity)(e,W(L.from),W(L.to)))})(),V(new Date().toLocaleString()))},[e]);let Y=Array.from(new Set(O.map(e=>e?.api_key??""))),J=Array.from(new Set(O.map(e=>e?.model??"")));Array.from(new Set(O.map(e=>e?.call_type??"")));let Q=async(t,l)=>{t&&l&&e&&A(await (0,j.adminGlobalCacheActivity)(e,W(t),W(l)))};(0,x.useEffect)(()=>{console.log("DATA IN CACHE DASHBOARD",O);let e=O;S.length>0&&(e=e.filter(e=>S.includes(e.api_key))),E.length>0&&(e=e.filter(e=>E.includes(e.model))),console.log("before processed data in cache dashboard",e);let t=0,l=0,a=0,r=e.reduce((e,r)=>{console.log("Processing item:",r),r.call_type||(console.log("Item has no call_type:",r),r.call_type="Unknown"),t+=(r.total_rows||0)-(r.cache_hit_true_rows||0),l+=r.cache_hit_true_rows||0,a+=r.cached_completion_tokens||0;let s=e.find(e=>e.name===r.call_type);return s?(s["LLM API requests"]+=(r.total_rows||0)-(r.cache_hit_true_rows||0),s["Cache hit"]+=r.cache_hit_true_rows||0,s["Cached Completion Tokens"]+=r.cached_completion_tokens||0,s["Generated Completion Tokens"]+=r.generated_completion_tokens||0):e.push({name:r.call_type,"LLM API requests":(r.total_rows||0)-(r.cache_hit_true_rows||0),"Cache hit":r.cache_hit_true_rows||0,"Cached Completion Tokens":r.cached_completion_tokens||0,"Generated Completion Tokens":r.generated_completion_tokens||0}),e},[]);B(G(l)),F(G(a));let s=l+t;s>0?$((l/s*100).toFixed(2)):$("0"),N(r),console.log("PROCESSED DATA IN CACHE DASHBOARD",r)},[S,E,L,O]);let X=async()=>{try{f.default.info("Running cache health check..."),K("");let t=await (0,j.cachingHealthCheckCall)(null!==e?e:"");console.log("CACHING HEALTH CHECK RESPONSE",t),K(t)}catch(t){let e;if(console.error("Error running health check:",t),t&&t.message)try{let l=JSON.parse(t.message);l.error&&(l=l.error),e=l}catch(l){e={message:t.message}}else e={message:"Unknown error occurred"};K({error:e})}};return(0,t.jsxs)(u.TabGroup,{className:"gap-2 p-8 h-full w-full mt-2 mb-8",children:[(0,t.jsxs)(m.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(d.Tab,{children:"Cache Analytics"}),(0,t.jsx)(d.Tab,{children:"Cache Health"}),(0,t.jsx)(d.Tab,{children:"Cache Settings"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[z&&(0,t.jsxs)(p.Text,{children:["Last Refreshed: ",z]}),(0,t.jsx)(n.Icon,{icon:y.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:()=>{V(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(a.Card,{children:[(0,t.jsxs)(s.Grid,{numItems:3,className:"gap-4 mt-4",children:[(0,t.jsx)(r.Col,{children:(0,t.jsx)(i.MultiSelect,{placeholder:"Select Virtual Keys",value:S,onValueChange:T,children:Y.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(r.Col,{children:(0,t.jsx)(i.MultiSelect,{placeholder:"Select Models",value:E,onValueChange:I,children:J.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(r.Col,{children:(0,t.jsx)(b.default,{value:L,onValueChange:e=>{H(e),Q(e.from,e.to)}})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mt-4",children:[(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hit Ratio"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsxs)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:[P,"%"]})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hits"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:D})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cached Tokens"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:R})})]})]}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cache Hits vs API Requests"}),(0,t.jsx)(l.BarChart,{title:"Cache Hits vs API Requests",data:C,stack:!0,index:"name",valueFormatter:G,categories:["LLM API requests","Cache hit"],colors:["sky","teal"],yAxisWidth:48}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cached Completion Tokens vs Generated Completion Tokens"}),(0,t.jsx)(l.BarChart,{className:"mt-6",data:C,stack:!0,index:"name",valueFormatter:G,categories:["Generated Completion Tokens","Cached Completion Tokens"],colors:["sky","teal"],yAxisWidth:48})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(M,{accessToken:e,healthCheckResponse:U,runCachingHealthCheck:X})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:w,userID:k})})]})]})}],559061)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5f2d62a75803a3f7.js b/litellm/proxy/_experimental/out/_next/static/chunks/5f2d62a75803a3f7.js new file mode 100644 index 0000000000..c27952a639 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/5f2d62a75803a3f7.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,618566,(e,t,n)=>{t.exports=e.r(976562)},161281,e=>{"use strict";var t=e.i(947293);function n(e){try{let n=(0,t.jwtDecode)(e);if(n&&"number"==typeof n.exp)return 1e3*n.exp<=Date.now();return!1}catch{return!0}}function r(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function o(e){return!!e&&null!==r(e)&&!n(e)}e.s(["checkTokenValidity",()=>o,"decodeToken",()=>r,"isJwtExpired",()=>n])},321836,e=>{"use strict";let t="litellm_return_url",n="redirect_to";function r(){return window.location.href}function o(){let e=r();e&&function(e,t,n=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function u(){return new URLSearchParams(window.location.search).get(n)}function a(e,t){let o=t||r();if(!o||o.includes("/login"))return e;let i=e.includes("?")?"&":"?";return`${e}${i}${n}=${encodeURIComponent(o)}`}function s(){let e=u();if(e)return e;let t=i();return t||null}function c(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function f(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),n=window.location.hostname;if(t.hostname!==n)return!1;if(c())return!0;return t.origin===window.location.origin}catch{return!1}}function d(e){try{let t=new URL(e,window.location.origin),n=t.pathname;n.length>1&&n.endsWith("/")&&(n=n.slice(0,-1));let r=new URLSearchParams(t.search),o=new URLSearchParams;Array.from(r.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{o.append(e,t)});let i=o.toString(),l=t.hash||"";return`${t.origin}${n}${i?`?${i}`:""}${l}`}catch{return e}}function m(){let e=u();if(e){if(f(e))return l(),e;c()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=i();if(t){if(f(t))return l(),t;c()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>a,"clearStoredReturnUrl",()=>l,"consumeReturnUrl",()=>m,"getReturnUrl",()=>s,"isValidReturnUrl",()=>f,"normalizeUrlForCompare",()=>d,"storeReturnUrl",()=>o])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],n=["Internal User","Admin","proxy_admin"],r=[...n,"Admin Viewer","proxy_admin_viewer"],o=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>o(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,o,"rolesAllowedToViewWriteScopedPages",0,r,"rolesWithWriteAccess",0,n])},135214,e=>{"use strict";var t=e.i(764205),n=e.i(268004),r=e.i(161281),o=e.i(321836),i=e.i(618566),l=e.i(271645),u=e.i(708347),a=e.i(612256);e.s(["default",0,()=>{let e=(0,i.useRouter)(),{data:s,isLoading:c}=(0,a.useUIConfig)(),f="u">typeof document?(0,n.getCookie)("token"):null,d=(0,l.useMemo)(()=>(0,r.decodeToken)(f),[f]),m=(0,l.useMemo)(()=>(0,r.checkTokenValidity)(f),[f])&&!s?.admin_ui_disabled,p=(0,l.useCallback)(()=>{(0,o.storeReturnUrl)();let n=`${(0,t.getProxyBaseUrl)()}/ui/login`,r=(0,o.buildLoginUrlWithReturn)(n);e.replace(r)},[e]);return(0,l.useEffect)(()=>{!c&&(m||(f&&(0,n.clearTokenCookies)(),p()))},[c,m,f,p]),{isLoading:c,isAuthorized:m,token:m?f:null,accessToken:d?.key??null,userId:d?.user_id??null,userEmail:d?.user_email??null,userRole:(0,u.formatUserRole)(d?.user_role),premiumUser:d?.premium_user??null,disabledPersonalKeyCreation:d?.disabled_non_admin_personal_key_creation??null,showSSOBanner:d?.login_method==="username_password"}}])},95779,e=>{"use strict";var t=e.i(480731);let n={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},r=[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",()=>n,"themeColorRange",()=>r])},829087,397126,229315,343084,953760,e=>{"use strict";e.i(247167);var t=e.i(271645);new WeakMap,new WeakMap;var n='input:not([inert]):not([inert] *),select:not([inert]):not([inert] *),textarea:not([inert]):not([inert] *),a[href]:not([inert]):not([inert] *),button:not([inert]):not([inert] *),[tabindex]:not(slot):not([inert]):not([inert] *),audio[controls]:not([inert]):not([inert] *),video[controls]:not([inert]):not([inert] *),[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *),details>summary:first-of-type:not([inert]):not([inert] *),details:not([inert]):not([inert] *)',r="u"typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=h(t,e.form);return!o||o===e},v=function(e){return p(e)&&"radio"===e.type&&!g(e)},y=function(e){var t,n,r,o,l,u,a,s=e&&i(e),c=null==(t=s)?void 0:t.host,f=!1;if(s&&s!==e)for(f=!!(null!=(n=c)&&null!=(r=n.ownerDocument)&&r.contains(c)||null!=e&&null!=(o=e.ownerDocument)&&o.contains(e));!f&&c;)f=!!(null!=(u=c=null==(l=s=i(c))?void 0:l.host)&&null!=(a=u.ownerDocument)&&a.contains(c));return f},w=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},b=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var l=o.call(e,"details>summary:first-of-type")?e.parentElement:e;if(o.call(l,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return w(e)}else{if("function"==typeof r){for(var u=e;e;){var a=e.parentElement,s=i(e);if(a&&!a.shadowRoot&&!0===r(a))return w(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=u}if(y(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},x=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;nf(t))&&!!R(e,t)},C=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},T=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,l=d(i,o),u=o?T(e.candidates):i;0===l?o?t.push.apply(t,u):t.push(i):n.push({documentOrder:r,tabIndex:l,item:e,isScope:o,content:u})}),n.sort(m).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},S=function(e,t){return T((t=t||{}).getShadowRoot?s([e],t.includeContainer,{filter:E.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:C}):a(e,t.includeContainer,E.bind(null,t)))},A=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==o.call(e,n)&&E(t,e)};e.s(["isTabbable",()=>A,"tabbable",()=>S],397126);var L=e.i(174080);function k(){return"u">typeof window}function P(e){return B(e)?(e.nodeName||"").toLowerCase():"#document"}function O(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _(e){var t;return null==(t=(B(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function B(e){return!!k()&&(e instanceof Node||e instanceof O(e).Node)}function D(e){return!!k()&&(e instanceof Element||e instanceof O(e).Element)}function U(e){return!!k()&&(e instanceof HTMLElement||e instanceof O(e).HTMLElement)}function M(e){return!(!k()||"u"{try{return e.matches(t)}catch(e){return!1}})}let H=["transform","translate","scale","rotate","perspective"],j=["transform","translate","scale","rotate","perspective","filter"],z=["paint","layout","strict","content"];function K(e){let t=Y(),n=D(e)?J(e):e;return H.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||j.some(e=>(n.willChange||"").includes(e))||z.some(e=>(n.contain||"").includes(e))}function X(e){let t=Q(e);for(;U(t)&&!G(t);){if(K(t))return t;if($(t))break;t=Q(t)}return null}function Y(){return!("u"J,"getContainingBlock",()=>X,"getDocumentElement",()=>_,"getFrameElement",()=>et,"getNodeName",()=>P,"getNodeScroll",()=>Z,"getOverflowAncestors",()=>ee,"getParentNode",()=>Q,"getWindow",()=>O,"isContainingBlock",()=>K,"isElement",()=>D,"isHTMLElement",()=>U,"isLastTraversableNode",()=>G,"isOverflowElement",()=>N,"isShadowRoot",()=>M,"isTableElement",()=>W,"isTopLayer",()=>$,"isWebKit",()=>Y],229315);let en=["top","right","bottom","left"],er=en.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),eo=Math.min,ei=Math.max,el=Math.round,eu=Math.floor,ea=e=>({x:e,y:e}),es={left:"right",right:"left",bottom:"top",top:"bottom"},ec={start:"end",end:"start"};function ef(e,t,n){return ei(e,eo(t,n))}function ed(e,t){return"function"==typeof e?e(t):e}function em(e){return e.split("-")[0]}function ep(e){return e.split("-")[1]}function eh(e){return"x"===e?"y":"x"}function eg(e){return"y"===e?"height":"width"}let ev=new Set(["top","bottom"]);function ey(e){return ev.has(em(e))?"y":"x"}function ew(e){return eh(ey(e))}function eb(e,t,n){void 0===n&&(n=!1);let r=ep(e),o=ew(e),i=eg(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=eL(l)),[l,eL(l)]}function ex(e){let t=eL(e);return[eR(e),t,eR(t)]}function eR(e){return e.replace(/start|end/g,e=>ec[e])}let eE=["left","right"],eC=["right","left"],eT=["top","bottom"],eS=["bottom","top"];function eA(e,t,n,r){let o=ep(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?eC:eE;return t?eE:eC;case"left":case"right":return t?eT:eS;default:return[]}}(em(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(eR)))),i}function eL(e){return e.replace(/left|right|bottom|top/g,e=>es[e])}function ek(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function eP(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function eO(e,t,n){let r,{reference:o,floating:i}=e,l=ey(t),u=ew(t),a=eg(u),s=em(t),c="y"===l,f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,m=o[a]/2-i[a]/2;switch(s){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:d};break;case"left":r={x:o.x-i.width,y:d};break;default:r={x:o.x,y:o.y}}switch(ep(t)){case"start":r[u]-=m*(n&&c?-1:1);break;case"end":r[u]+=m*(n&&c?-1:1)}return r}async function e_(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:u,strategy:a}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:m=0}=ed(t,e),p=ek(m),h=u[d?"floating"===f?"reference":"floating":f],g=eP(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(u.floating)),boundary:s,rootBoundary:c,strategy:a})),v="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await (null==i.getOffsetParent?void 0:i.getOffsetParent(u.floating)),w=await (null==i.isElement?void 0:i.isElement(y))&&await (null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=eP(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:v,offsetParent:y,strategy:a}):v);return{top:(g.top-b.top+p.top)/w.y,bottom:(b.bottom-g.bottom+p.bottom)/w.y,left:(g.left-b.left+p.left)/w.x,right:(b.right-g.right+p.right)/w.x}}e.s(["clamp",()=>ef,"createCoords",()=>ea,"evaluate",()=>ed,"floor",()=>eu,"getAlignment",()=>ep,"getAlignmentAxis",()=>ew,"getAlignmentSides",()=>eb,"getAxisLength",()=>eg,"getExpandedPlacements",()=>ex,"getOppositeAlignmentPlacement",()=>eR,"getOppositeAxis",()=>eh,"getOppositeAxisPlacements",()=>eA,"getOppositePlacement",()=>eL,"getPaddingObject",()=>ek,"getSide",()=>em,"getSideAxis",()=>ey,"max",()=>ei,"min",()=>eo,"placements",()=>er,"rectToClientRect",()=>eP,"round",()=>el,"sides",()=>en],343084);let eB=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),a=await (null==l.isRTL?void 0:l.isRTL(t)),s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=eO(s,r,a),d=r,m={},p=0;for(let n=0;ne[t]>=0)}function eM(e){let t=eo(...e.map(e=>e.left)),n=eo(...e.map(e=>e.top));return{x:t,y:n,width:ei(...e.map(e=>e.right))-t,height:ei(...e.map(e=>e.bottom))-n}}let eI=new Set(["left","top"]);async function eN(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=em(n),u=ep(n),a="y"===ey(n),s=eI.has(l)?-1:1,c=i&&a?-1:1,f=ed(t,e),{mainAxis:d,crossAxis:m,alignmentAxis:p}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&"number"==typeof p&&(m="end"===u?-1*p:p),a?{x:m*c,y:d*s}:{x:d*s,y:m*c}}function eF(e){let t=J(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=U(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=el(n)!==i||el(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function eW(e){return D(e)?e:e.contextElement}function eV(e){let t=eW(e);if(!U(t))return ea(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=eF(t),l=(i?el(n.width):n.width)/r,u=(i?el(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}let e$=ea(0);function eH(e){let t=O(e);return Y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:e$}function ej(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=eW(e),u=ea(1);t&&(r?D(r)&&(u=eV(r)):u=eV(e));let a=(void 0===(o=n)&&(o=!1),r&&(!o||r===O(l))&&o)?eH(l):ea(0),s=(i.left+a.x)/u.x,c=(i.top+a.y)/u.y,f=i.width/u.x,d=i.height/u.y;if(l){let e=O(l),t=r&&D(r)?O(r):r,n=e,o=et(n);for(;o&&r&&t!==n;){let e=eV(o),t=o.getBoundingClientRect(),r=J(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,f*=e.x,d*=e.y,s+=i,c+=l,o=et(n=O(o))}}return eP({width:f,height:d,x:s,y:c})}function ez(e,t){let n=Z(e).scrollLeft;return t?t.left+n:ej(_(e)).left+n}function eK(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ez(e,n),y:n.top+t.scrollTop}}let eX=new Set(["absolute","fixed"]);function eY(e,t,n){var r;let o;if("viewport"===t)o=function(e,t){let n=O(e),r=_(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,u=0,a=0;if(o){i=o.width,l=o.height;let e=Y();(!e||e&&"fixed"===t)&&(u=o.offsetLeft,a=o.offsetTop)}let s=ez(r);if(s<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else s<=25&&(i+=s);return{width:i,height:l,x:u,y:a}}(e,n);else if("document"===t){let t,n,i,l,u,a,s;r=_(e),t=_(r),n=Z(r),i=r.ownerDocument.body,l=ei(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),u=ei(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-n.scrollLeft+ez(r),s=-n.scrollTop,"rtl"===J(i).direction&&(a+=ei(t.clientWidth,i.clientWidth)-l),o={width:l,height:u,x:a,y:s}}else if(D(t)){let e,r,i,l,u,a;r=(e=ej(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,l=U(t)?eV(t):ea(1),u=t.clientWidth*l.x,a=t.clientHeight*l.y,o={width:u,height:a,x:i*l.x,y:r*l.y}}else{let n=eH(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return eP(o)}function eq(e){return"static"===J(e).position}function eG(e,t){if(!U(e)||"fixed"===J(e).position)return null;if(t)return t(e);let n=e.offsetParent;return _(e)===n&&(n=n.ownerDocument.body),n}function eJ(e,t){let n=O(e);if($(e))return n;if(!U(e)){let t=Q(e);for(;t&&!G(t);){if(D(t)&&!eq(t))return t;t=Q(t)}return n}let r=eG(e,t);for(;r&&W(r)&&eq(r);)r=eG(r,t);return r&&G(r)&&eq(r)&&!K(r)?n:r||X(e)||n}let eZ=async function(e){let t=this.getOffsetParent||eJ,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=U(t),o=_(t),i="fixed"===n,l=ej(e,!0,i,t),u={scrollLeft:0,scrollTop:0},a=ea(0);if(r||!r&&!i)if(("body"!==P(t)||N(o))&&(u=Z(t)),r){let e=ej(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=ez(o));i&&!r&&o&&(a.x=ez(o));let s=!o||r||i?ea(0):eK(o,u);return{x:l.left+u.scrollLeft-a.x-s.x,y:l.top+u.scrollTop-a.y-s.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eQ={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=_(r),u=!!t&&$(t.floating);if(r===l||u&&i)return n;let a={scrollLeft:0,scrollTop:0},s=ea(1),c=ea(0),f=U(r);if((f||!f&&!i)&&(("body"!==P(r)||N(l))&&(a=Z(r)),U(r))){let e=ej(r);s=eV(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let d=!l||f||i?ea(0):eK(l,a);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-a.scrollLeft*s.x+c.x+d.x,y:n.y*s.y-a.scrollTop*s.y+c.y+d.y}},getDocumentElement:_,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?$(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=ee(e,[],!1).filter(e=>D(e)&&"body"!==P(e)),o=null,i="fixed"===J(e).position,l=i?Q(e):e;for(;D(l)&&!G(l);){let t=J(l),n=K(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&eX.has(o.position)||N(l)&&!n&&function e(t,n){let r=Q(t);return!(r===n||!D(r)||G(r))&&("fixed"===J(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):o=t,l=Q(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],u=i.reduce((e,n)=>{let r=eY(t,n,o);return e.top=ei(r.top,e.top),e.right=eo(r.right,e.right),e.bottom=eo(r.bottom,e.bottom),e.left=ei(r.left,e.left),e},eY(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:eJ,getElementRects:eZ,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=eF(e);return{width:t,height:n}},getScale:eV,isElement:D,isRTL:function(e){return"rtl"===J(e).direction}};function e0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function e1(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=eW(e),f=i||l?[...c?ee(c):[],...ee(t)]:[];f.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let d=c&&a?function(e,t){let n,r=null,o=_(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(u,a){void 0===u&&(u=!1),void 0===a&&(a=1),i();let s=e.getBoundingClientRect(),{left:c,top:f,width:d,height:m}=s;if(u||t(),!d||!m)return;let p={rootMargin:-eu(f)+"px "+-eu(o.clientWidth-(c+d))+"px "+-eu(o.clientHeight-(f+m))+"px "+-eu(c)+"px",threshold:ei(0,eo(1,a))||1},h=!0;function g(t){let r=t[0].intersectionRatio;if(r!==a){if(!h)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||e0(s,e.getBoundingClientRect())||l(),h=!1}try{r=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),i}(c,n):null,m=-1,p=null;u&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!s&&p.observe(c),p.observe(t));let h=s?ej(e):null;return s&&function t(){let r=ej(e);h&&!e0(h,r)&&n(),h=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(o)}}let e2=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:u}=t,a=await eN(t,e);return l===(null==(n=u.offset)?void 0:n.placement)&&null!=(r=u.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},e7=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o,i;let{rects:l,middlewareData:u,placement:a,platform:s,elements:c}=t,{crossAxis:f=!1,alignment:d,allowedPlacements:m=er,autoAlignment:p=!0,...h}=ed(e,t),g=void 0!==d||m===er?((i=d||null)?[...m.filter(e=>ep(e)===i),...m.filter(e=>ep(e)!==i)]:m.filter(e=>em(e)===e)).filter(e=>!i||ep(e)===i||!!p&&eR(e)!==e):m,v=await s.detectOverflow(t,h),y=(null==(n=u.autoPlacement)?void 0:n.index)||0,w=g[y];if(null==w)return{};let b=eb(w,l,await (null==s.isRTL?void 0:s.isRTL(c.floating)));if(a!==w)return{reset:{placement:g[0]}};let x=[v[em(w)],v[b[0]],v[b[1]]],R=[...(null==(r=u.autoPlacement)?void 0:r.overflows)||[],{placement:w,overflows:x}],E=g[y+1];if(E)return{data:{index:y+1,overflows:R},reset:{placement:E}};let C=R.map(e=>{let t=ep(e.placement);return[e.placement,t&&f?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),T=(null==(o=C.filter(e=>e[2].slice(0,ep(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||C[0][0];return T!==a?{data:{index:y+1,overflows:R},reset:{placement:T}}:{}}}},e5=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o,platform:i}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=ed(e,t),c={x:n,y:r},f=await i.detectOverflow(t,s),d=ey(em(o)),m=eh(d),p=c[m],h=c[d];if(l){let e="y"===m?"top":"left",t="y"===m?"bottom":"right",n=p+f[e],r=p-f[t];p=ef(n,p,r)}if(u){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=h+f[e],r=h-f[t];h=ef(n,h,r)}let g=a.fn({...t,[m]:p,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:l,[d]:u}}}}}},e3=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let{placement:u,middlewareData:a,rects:s,initialPlacement:c,platform:f,elements:d}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...w}=ed(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};let b=em(u),x=ey(c),R=em(c)===c,E=await (null==f.isRTL?void 0:f.isRTL(d.floating)),C=h||(R||!y?[eL(c)]:ex(c)),T="none"!==v;!h&&T&&C.push(...eA(c,y,v,E));let S=[c,...C],A=await f.detectOverflow(t,w),L=[],k=(null==(r=a.flip)?void 0:r.overflows)||[];if(m&&L.push(A[b]),p){let e=eb(u,s,E);L.push(A[e[0]],A[e[1]])}if(k=[...k,{placement:u,overflows:L}],!L.every(e=>e<=0)){let e=((null==(o=a.flip)?void 0:o.index)||0)+1,t=S[e];if(t&&("alignment"!==p||x===ey(t)||k.every(e=>ey(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:k},reset:{placement:t}};let n=null==(i=k.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(g){case"bestFit":{let e=null==(l=k.filter(e=>{if(T){let t=ey(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=c}if(u!==n)return{reset:{placement:n}}}return{}}}},e6=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let o,i,{placement:l,rects:u,platform:a,elements:s}=t,{apply:c=()=>{},...f}=ed(e,t),d=await a.detectOverflow(t,f),m=em(l),p=ep(l),h="y"===ey(l),{width:g,height:v}=u.floating;"top"===m||"bottom"===m?(o=m,i=p===(await (null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(i=m,o="end"===p?"top":"bottom");let y=v-d.top-d.bottom,w=g-d.left-d.right,b=eo(v-d[o],y),x=eo(g-d[i],w),R=!t.middlewareData.shift,E=b,C=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),R&&!p){let e=ei(d.left,0),t=ei(d.right,0),n=ei(d.top,0),r=ei(d.bottom,0);h?C=g-2*(0!==e||0!==t?e+t:ei(d.left,d.right)):E=v-2*(0!==n||0!==r?n+r:ei(d.top,d.bottom))}await c({...t,availableWidth:C,availableHeight:E});let T=await a.getDimensions(s.floating);return g!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}},e4=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=ed(e,t);switch(o){case"referenceHidden":{let e=eD(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:eU(e)}}}case"escaped":{let e=eD(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:eU(e)}}}default:return{}}}}},e8=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:l,elements:u,middlewareData:a}=t,{element:s,padding:c=0}=ed(e,t)||{};if(null==s)return{};let f=ek(c),d={x:n,y:r},m=ew(o),p=eg(m),h=await l.getDimensions(s),g="y"===m,v=g?"clientHeight":"clientWidth",y=i.reference[p]+i.reference[m]-d[m]-i.floating[p],w=d[m]-i.reference[m],b=await (null==l.getOffsetParent?void 0:l.getOffsetParent(s)),x=b?b[v]:0;x&&await (null==l.isElement?void 0:l.isElement(b))||(x=u.floating[v]||i.floating[p]);let R=x/2-h[p]/2-1,E=eo(f[g?"top":"left"],R),C=eo(f[g?"bottom":"right"],R),T=x-h[p]-C,S=x/2-h[p]/2+(y/2-w/2),A=ef(E,S,T),L=!a.arrow&&null!=ep(o)&&S!==A&&i.reference[p]/2-(Se.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(e=>eP(eM(e)))}(c),d=eP(eM(c)),m=ek(u),p=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&f[0].left>f[1].right&&null!=a&&null!=s)return f.find(e=>a>e.left-m.left&&ae.top-m.top&&s=2){if("y"===ey(n)){let e=f[0],t=f[f.length-1],r="top"===em(n),o=e.top,i=t.bottom,l=r?e.left:t.left,u=r?e.right:t.right;return{top:o,bottom:i,left:l,right:u,width:u-l,height:i-o,x:l,y:o}}let e="left"===em(n),t=ei(...f.map(e=>e.right)),r=eo(...f.map(e=>e.left)),o=f.filter(n=>e?n.left===r:n.right===t),i=o[0].top,l=o[o.length-1].bottom;return{top:i,bottom:l,left:r,right:t,width:t-r,height:l-i,x:r,y:i}}return d}},floating:r.floating,strategy:l});return o.reference.x!==p.reference.x||o.reference.y!==p.reference.y||o.reference.width!==p.reference.width||o.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}},te=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:u=0,mainAxis:a=!0,crossAxis:s=!0}=ed(e,t),c={x:n,y:r},f=ey(o),d=eh(f),m=c[d],p=c[f],h=ed(u,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){let e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;mn&&(m=n)}if(s){var v,y;let e="y"===d?"width":"height",t=eI.has(em(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(v=l.offset)?void 0:v[f])||0)+(t?0:g.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(y=l.offset)?void 0:y[f])||0)-(t?g.crossAxis:0);pr&&(p=r)}return{[d]:m,[f]:p}}}},tt=(e,t,n)=>{let r=new Map,o={platform:eQ,...n},i={...o.platform,_c:r};return eB(e,t,{...o,platform:i})};e.s(["arrow",()=>e8,"autoPlacement",()=>e7,"autoUpdate",()=>e1,"computePosition",()=>tt,"detectOverflow",()=>e_,"flip",()=>e3,"hide",()=>e4,"inline",()=>e9,"limitShift",()=>te,"offset",()=>e2,"shift",()=>e5,"size",()=>e6],953760);var tn="u">typeof document?t.useLayoutEffect:t.useEffect;function tr(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!tr(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!tr(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function to(e){let n=t.useRef(e);return tn(()=>{n.current=e}),n}var ti="u">typeof document?t.useLayoutEffect:t.useEffect;let tl=!1,tu=0,ta=()=>"floating-ui-"+tu++,ts=t["useId".toString()]||function(){let[e,n]=t.useState(()=>tl?ta():void 0);return ti(()=>{null==e&&n(ta())},[]),t.useEffect(()=>{tl||(tl=!0)},[]),e},tc=t.createContext(null),tf=t.createContext(null),td=()=>{var e;return(null==(e=t.useContext(tc))?void 0:e.id)||null};function tm(e){return(null==e?void 0:e.ownerDocument)||document}function tp(e){return tm(e).defaultView||window}function th(e){return!!e&&e instanceof tp(e).Element}function tg(e){return!!e&&e instanceof tp(e).HTMLElement}function tv(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ty(e){let n=(0,t.useRef)(e);return ti(()=>{n.current=e}),n}let tw="data-floating-ui-safe-polygon";function tb(e,t,n){return n&&!tv(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let tx=function(e,n){let{enabled:r=!0,delay:o=0,handleClose:i=null,mouseOnly:l=!1,restMs:u=0,move:a=!0}=void 0===n?{}:n,{open:s,onOpenChange:c,dataRef:f,events:d,elements:{domReference:m,floating:p},refs:h}=e,g=t.useContext(tf),v=td(),y=ty(i),w=ty(o),b=t.useRef(),x=t.useRef(),R=t.useRef(),E=t.useRef(),C=t.useRef(!0),T=t.useRef(!1),S=t.useRef(()=>{}),A=t.useCallback(()=>{var e;let t=null==(e=f.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[f]);t.useEffect(()=>{if(r)return d.on("dismiss",e),()=>{d.off("dismiss",e)};function e(){clearTimeout(x.current),clearTimeout(E.current),C.current=!0}},[r,d]),t.useEffect(()=>{if(!r||!y.current||!s)return;function e(){A()&&c(!1)}let t=tm(p).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[p,s,c,r,y,f,A]);let L=t.useCallback(function(e){void 0===e&&(e=!0);let t=tb(w.current,"close",b.current);t&&!R.current?(clearTimeout(x.current),x.current=setTimeout(()=>c(!1),t)):e&&(clearTimeout(x.current),c(!1))},[w,c]),k=t.useCallback(()=>{S.current(),R.current=void 0},[]),P=t.useCallback(()=>{if(T.current){let e=tm(h.floating.current).body;e.style.pointerEvents="",e.removeAttribute(tw),T.current=!1}},[h]);return t.useEffect(()=>{if(r&&th(m))return s&&m.addEventListener("mouseleave",i),null==p||p.addEventListener("mouseleave",i),a&&m.addEventListener("mousemove",n,{once:!0}),m.addEventListener("mouseenter",n),m.addEventListener("mouseleave",o),()=>{s&&m.removeEventListener("mouseleave",i),null==p||p.removeEventListener("mouseleave",i),a&&m.removeEventListener("mousemove",n),m.removeEventListener("mouseenter",n),m.removeEventListener("mouseleave",o)};function t(){return!!f.current.openEvent&&["click","mousedown"].includes(f.current.openEvent.type)}function n(e){if(clearTimeout(x.current),C.current=!1,l&&!tv(b.current)||u>0&&0===tb(w.current,"open"))return;f.current.openEvent=e;let t=tb(w.current,"open",b.current);t?x.current=setTimeout(()=>{c(!0)},t):c(!0)}function o(n){if(t())return;S.current();let r=tm(p);if(clearTimeout(E.current),y.current){s||clearTimeout(x.current),R.current=y.current({...e,tree:g,x:n.clientX,y:n.clientY,onClose(){P(),k(),L()}});let t=R.current;r.addEventListener("mousemove",t),S.current=()=>{r.removeEventListener("mousemove",t)};return}L()}function i(n){t()||null==y.current||y.current({...e,tree:g,x:n.clientX,y:n.clientY,onClose(){P(),k(),L()}})(n)}},[m,p,r,e,l,u,a,L,k,P,c,s,g,w,y,f]),ti(()=>{var e,t,n;if(r&&s&&null!=(e=y.current)&&e.__options.blockPointerEvents&&A()){let e=tm(p).body;if(e.setAttribute(tw,""),e.style.pointerEvents="none",T.current=!0,th(m)&&p){let e=null==g||null==(t=g.nodesRef.current.find(e=>e.id===v))||null==(n=t.context)?void 0:n.elements.floating;return e&&(e.style.pointerEvents=""),m.style.pointerEvents="auto",p.style.pointerEvents="auto",()=>{m.style.pointerEvents="",p.style.pointerEvents=""}}}},[r,s,v,p,m,g,y,f,A]),ti(()=>{s||(b.current=void 0,k(),P())},[s,k,P]),t.useEffect(()=>()=>{k(),clearTimeout(x.current),clearTimeout(E.current),P()},[r,k,P]),t.useMemo(()=>{if(!r)return{};function e(e){b.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(){s||0===u||(clearTimeout(E.current),E.current=setTimeout(()=>{C.current||c(!0)},u))}},floating:{onMouseEnter(){clearTimeout(x.current)},onMouseLeave(){d.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),L(!1)}}}},[d,r,u,s,c,L])};function tR(e,t){if(!e||!t)return!1;let n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&function(e){if("u"{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})||[],r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})})||[],n=n.concat(r);return n}let tC=t["useInsertionEffect".toString()]||(e=>e());function tT(e){let n=t.useRef(()=>{});return tC(()=>{n.current=e}),t.useCallback(function(){for(var e=arguments.length,t=Array(e),r=0;r!1),R="function"==typeof m?x:m,E=t.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:T}=tk(y);return t.useEffect(()=>{if(!r||!f)return;function e(e){if("Escape"===e.key){let e=w?tE(w.nodesRef.current,l):[];if(e.length>0){let t=!0;if(e.forEach(e=>{var n;if(null!=(n=e.context)&&n.open&&!e.context.dataRef.current.__escapeKeyBubbles){t=!1;return}}),!t)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),o(!1)}}function t(e){var t;let n=E.current;if(E.current=!1,n||"function"==typeof R&&!R(e))return;let r="composedPath"in e?e.composedPath()[0]:e.target;if(tg(r)&&s){let t=s.ownerDocument.defaultView||window,n=r.scrollWidth>r.clientWidth,o=r.scrollHeight>r.clientHeight,i=o&&e.offsetX>r.clientWidth;if(o&&"rtl"===t.getComputedStyle(r).direction&&(i=e.offsetX<=r.offsetWidth-r.clientWidth),i||n&&e.offsetY>r.clientHeight)return}let u=w&&tE(w.nodesRef.current,l).some(t=>{var n;return tS(e,null==(n=t.context)?void 0:n.elements.floating)});if(tS(e,s)||tS(e,a)||u)return;let c=w?tE(w.nodesRef.current,l):[];if(c.length>0){let e=!0;if(c.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:function(e){let t,n;if(0===e.mozInputSource&&e.isTrusted)return!0;let r=/Android/i;return(r.test(null!=(n=navigator.userAgentData)&&n.platform?n.platform:navigator.platform)||r.test((t=navigator.userAgentData)&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent))&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType}(e)||0===(t=e).width&&0===t.height||1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"!==t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail}}),o(!1)}function n(){o(!1)}c.current.__escapeKeyBubbles=C,c.current.__outsidePressBubbles=T;let m=tm(s);d&&m.addEventListener("keydown",e),R&&m.addEventListener(p,t);let h=[];return v&&(th(a)&&(h=ee(a)),th(s)&&(h=h.concat(ee(s))),!th(u)&&u&&u.contextElement&&(h=h.concat(ee(u.contextElement)))),(h=h.filter(e=>{var t;return e!==(null==(t=m.defaultView)?void 0:t.visualViewport)})).forEach(e=>{e.addEventListener("scroll",n,{passive:!0})}),()=>{d&&m.removeEventListener("keydown",e),R&&m.removeEventListener(p,t),h.forEach(e=>{e.removeEventListener("scroll",n)})}},[c,s,a,u,d,R,p,i,w,l,r,o,v,f,C,T,b]),t.useEffect(()=>{E.current=!1},[R,p]),t.useMemo(()=>f?{reference:{[tA[g]]:()=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),o(!1))}},floating:{[tL[p]]:()=>{E.current=!0}}}:{},[f,i,h,p,g,o])},tO=function(e,n){let{open:r,onOpenChange:o,dataRef:i,events:l,refs:u,elements:{floating:a,domReference:s}}=e,{enabled:c=!0,keyboardOnly:f=!0}=void 0===n?{}:n,d=t.useRef(""),m=t.useRef(!1),p=t.useRef();return t.useEffect(()=>{if(!c)return;let e=tm(a).defaultView||window;function t(){!r&&tg(s)&&s===function(e){let t=e.activeElement;for(;(null==(n=t)||null==(r=n.shadowRoot)?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}(tm(s))&&(m.current=!0)}return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}},[a,s,r,c]),t.useEffect(()=>{if(c)return l.on("dismiss",e),()=>{l.off("dismiss",e)};function e(e){("referencePress"===e.type||"escapeKey"===e.type)&&(m.current=!0)}},[l,c]),t.useEffect(()=>()=>{clearTimeout(p.current)},[]),t.useMemo(()=>c?{reference:{onPointerDown(e){let{pointerType:t}=e;d.current=t,m.current=!!(t&&f)},onMouseLeave(){m.current=!1},onFocus(e){var t;m.current||"focus"===e.type&&(null==(t=i.current.openEvent)?void 0:t.type)==="mousedown"&&i.current.openEvent&&tS(i.current.openEvent,s)||(i.current.openEvent=e.nativeEvent,o(!0))},onBlur(e){m.current=!1;let t=e.relatedTarget,n=th(t)&&t.hasAttribute("data-floating-ui-focus-guard")&&"outside"===t.getAttribute("data-type");p.current=setTimeout(()=>{tR(u.floating.current,t)||tR(s,t)||n||o(!1)})}}}:{},[c,f,s,u,i,o])},t_=function(e,n){let{open:r}=e,{enabled:o=!0,role:i="dialog"}=void 0===n?{}:n,l=ts(),u=ts();return t.useMemo(()=>{let e={id:l,role:i};return o?"tooltip"===i?{reference:{"aria-describedby":r?l:void 0},floating:e}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===i?"dialog":i,"aria-controls":r?l:void 0,..."listbox"===i&&{role:"combobox"},..."menu"===i&&{id:u}},floating:{...e,..."menu"===i&&{"aria-labelledby":u}}}:{}},[o,i,r,l,u])};function tB(e,t,n){let r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map(e=>e?e[n]:null).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,o]=t;if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof o){var i;null==(i=r.get(n))||i.push(o),e[n]=function(){for(var e,t=arguments.length,o=Array(t),i=0;ie(...o))}}}else e[n]=o}),e),{})}}let tD=function(e){void 0===e&&(e=[]);let n=e,r=t.useCallback(t=>tB(t,e,"reference"),n),o=t.useCallback(t=>tB(t,e,"floating"),n),i=t.useCallback(t=>tB(t,e,"item"),e.map(e=>null==e?void 0:e.item));return t.useMemo(()=>({getReferenceProps:r,getFloatingProps:o,getItemProps:i}),[r,o,i])};var tU=e.i(444755);let tM=e=>{let[n,r]=(0,t.useState)(!1),[o,i]=(0,t.useState)(),{x:l,y:u,refs:a,strategy:s,context:c}=function(e){void 0===e&&(e={});let{open:n=!1,onOpenChange:r,nodeId:o}=e,i=function(e){void 0===e&&(e={});let{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,whileElementsMounted:l,open:u}=e,[a,s]=t.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[c,f]=t.useState(o);tr(c,o)||f(o);let d=t.useRef(null),m=t.useRef(null),p=t.useRef(a),h=to(l),g=to(i),[v,y]=t.useState(null),[w,b]=t.useState(null),x=t.useCallback(e=>{d.current!==e&&(d.current=e,y(e))},[]),R=t.useCallback(e=>{m.current!==e&&(m.current=e,b(e))},[]),E=t.useCallback(()=>{if(!d.current||!m.current)return;let e={placement:n,strategy:r,middleware:c};g.current&&(e.platform=g.current),tt(d.current,m.current,e).then(e=>{let t={...e,isPositioned:!0};C.current&&!tr(p.current,t)&&(p.current=t,L.flushSync(()=>{s(t)}))})},[c,n,r,g]);tn(()=>{!1===u&&p.current.isPositioned&&(p.current.isPositioned=!1,s(e=>({...e,isPositioned:!1})))},[u]);let C=t.useRef(!1);tn(()=>(C.current=!0,()=>{C.current=!1}),[]),tn(()=>{if(v&&w)if(h.current)return h.current(v,w,E);else E()},[v,w,E,h]);let T=t.useMemo(()=>({reference:d,floating:m,setReference:x,setFloating:R}),[x,R]),S=t.useMemo(()=>({reference:v,floating:w}),[v,w]);return t.useMemo(()=>({...a,update:E,refs:T,elements:S,reference:x,floating:R}),[a,E,T,S,x,R])}(e),l=t.useContext(tf),u=t.useRef(null),a=t.useRef({}),s=t.useState(()=>{let e;return e=new Map,{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(e=>e!==n))}}})[0],[c,f]=t.useState(null),d=t.useCallback(e=>{let t=th(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;i.refs.setReference(t)},[i.refs]),m=t.useCallback(e=>{(th(e)||null===e)&&(u.current=e,f(e)),(th(i.refs.reference.current)||null===i.refs.reference.current||null!==e&&!th(e))&&i.refs.setReference(e)},[i.refs]),p=t.useMemo(()=>({...i.refs,setReference:m,setPositionReference:d,domReference:u}),[i.refs,m,d]),h=t.useMemo(()=>({...i.elements,domReference:c}),[i.elements,c]),g=tT(r),v=t.useMemo(()=>({...i,refs:p,elements:h,dataRef:a,nodeId:o,events:s,open:n,onOpenChange:g}),[i,o,s,n,g,p,h]);return ti(()=>{let e=null==l?void 0:l.nodesRef.current.find(e=>e.id===o);e&&(e.context=v)}),t.useMemo(()=>({...i,context:v,refs:p,reference:m,positionReference:d}),[i,p,v,m,d])}({open:n,onOpenChange:t=>{t&&e?i(setTimeout(()=>{r(t)},e)):(clearTimeout(o),r(t))},placement:"top",whileElementsMounted:e1,middleware:[e2(5),e3({fallbackAxisSideDirection:"start"}),e5()]}),{getReferenceProps:f,getFloatingProps:d}=tD([tx(c,{move:!1}),tO(c),tP(c),t_(c,{role:"tooltip"})]);return{tooltipProps:{open:n,x:l,y:u,refs:a,strategy:s,getFloatingProps:d},getReferenceProps:f}},tI=({text:e,open:n,x:r,y:o,refs:i,strategy:l,getFloatingProps:u})=>n&&e?t.default.createElement("div",Object.assign({className:(0,tU.tremorTwMerge)("max-w-xs text-sm z-20 rounded-tremor-default opacity-100 px-2.5 py-1","text-white bg-tremor-background-emphasis","dark:text-tremor-content-emphasis dark:bg-white"),ref:i.setFloating,style:{position:l,top:null!=o?o:0,left:null!=r?r:0}},u()),e):null;tI.displayName="Tooltip",e.s(["default",()=>tI,"useTooltip",()=>tM],829087)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/623eaea02d123060.js b/litellm/proxy/_experimental/out/_next/static/chunks/623eaea02d123060.js deleted file mode 100644 index b0dc3f38b7..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/623eaea02d123060.js +++ /dev/null @@ -1,7 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,262218,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(529681),a=e.i(702779),l=e.i(563113),i=e.i(763731),o=e.i(121872),d=e.i(242064);e.i(296059);var c=e.i(915654);e.i(262370);var s=e.i(135551),u=e.i(183293),g=e.i(246422),p=e.i(838378);let m=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,a=e.fontSizeSM;return(0,p.mergeToken)(e,{tagFontSize:a,tagLineHeight:(0,c.unit)(n(e.lineHeightSM).mul(a).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},f=e=>({defaultBg:new s.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),b=(0,g.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:a,calc:l}=e,i=l(n).sub(r).equal(),o=l(t).sub(r).equal();return{[a]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(m(e)),f);var h=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let $=t.forwardRef((e,n)=>{let{prefixCls:a,style:l,className:i,checked:o,children:c,icon:s,onChange:u,onClick:g}=e,p=h(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:m,tag:f}=t.useContext(d.ConfigContext),$=m("tag",a),[v,C,y]=b($),k=(0,r.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==f?void 0:f.className,i,C,y);return v(t.createElement("span",Object.assign({},p,{ref:n,style:Object.assign(Object.assign({},l),null==f?void 0:f.style),className:k,onClick:e=>{null==u||u(!o),null==g||g(e)}}),s,t.createElement("span",null,c)))});var v=e.i(403541);let C=(0,g.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=m(e),(0,v.genPresetColor)(t,(e,{textColor:r,lightBorderColor:n,lightColor:a,darkColor:l})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:r,background:a,borderColor:n,"&-inverse":{color:t.colorTextLightSolid,background:l,borderColor:l},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},f),y=(e,t,r)=>{let n="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},k=(0,g.genSubStyleComponent)(["Tag","status"],e=>{let t=m(e);return[y(t,"success","Success"),y(t,"processing","Info"),y(t,"error","Error"),y(t,"warning","Warning")]},f);var S=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let x=t.forwardRef((e,c)=>{let{prefixCls:s,className:u,rootClassName:g,style:p,children:m,icon:f,color:h,onClose:$,bordered:v=!0,visible:y}=e,x=S(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:w,direction:O,tag:I}=t.useContext(d.ConfigContext),[E,N]=t.useState(!0),z=(0,n.default)(x,["closeIcon","closable"]);t.useEffect(()=>{void 0!==y&&N(y)},[y]);let j=(0,a.isPresetColor)(h),P=(0,a.isPresetStatusColor)(h),T=j||P,M=Object.assign(Object.assign({backgroundColor:h&&!T?h:void 0},null==I?void 0:I.style),p),R=w("tag",s),[B,H,q]=b(R),D=(0,r.default)(R,null==I?void 0:I.className,{[`${R}-${h}`]:T,[`${R}-has-color`]:h&&!T,[`${R}-hidden`]:!E,[`${R}-rtl`]:"rtl"===O,[`${R}-borderless`]:!v},u,g,H,q),L=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||N(!1)},[,G]=(0,l.useClosable)((0,l.pickClosable)(e),(0,l.pickClosable)(I),{closable:!1,closeIconRender:e=>{let n=t.createElement("span",{className:`${R}-close-icon`,onClick:L},e);return(0,i.replaceElement)(e,n,e=>({onClick:t=>{var r;null==(r=null==e?void 0:e.onClick)||r.call(e,t),L(t)},className:(0,r.default)(null==e?void 0:e.className,`${R}-close-icon`)}))}}),W="function"==typeof x.onClick||m&&"a"===m.type,A=f||null,X=A?t.createElement(t.Fragment,null,A,m&&t.createElement("span",null,m)):m,F=t.createElement("span",Object.assign({},z,{ref:c,className:D,style:M}),X,G,j&&t.createElement(C,{key:"preset",prefixCls:R}),P&&t.createElement(k,{key:"status",prefixCls:R}));return B(W?t.createElement(o.default,{component:"Tag"},F):F)});x.CheckableTag=$,e.s(["Tag",0,x],262218)},91874,e=>{"use strict";var t=e.i(931067),r=e.i(209428),n=e.i(211577),a=e.i(392221),l=e.i(703923),i=e.i(343794),o=e.i(914949),d=e.i(271645),c=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],s=(0,d.forwardRef)(function(e,s){var u=e.prefixCls,g=void 0===u?"rc-checkbox":u,p=e.className,m=e.style,f=e.checked,b=e.disabled,h=e.defaultChecked,$=e.type,v=void 0===$?"checkbox":$,C=e.title,y=e.onChange,k=(0,l.default)(e,c),S=(0,d.useRef)(null),x=(0,d.useRef)(null),w=(0,o.default)(void 0!==h&&h,{value:f}),O=(0,a.default)(w,2),I=O[0],E=O[1];(0,d.useImperativeHandle)(s,function(){return{focus:function(e){var t;null==(t=S.current)||t.focus(e)},blur:function(){var e;null==(e=S.current)||e.blur()},input:S.current,nativeElement:x.current}});var N=(0,i.default)(g,p,(0,n.default)((0,n.default)({},"".concat(g,"-checked"),I),"".concat(g,"-disabled"),b));return d.createElement("span",{className:N,title:C,style:m,ref:x},d.createElement("input",(0,t.default)({},k,{className:"".concat(g,"-input"),ref:S,onChange:function(t){b||("checked"in e||E(t.target.checked),null==y||y({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:b,checked:!!I,type:v})),d.createElement("span",{className:"".concat(g,"-inner")}))});e.s(["default",0,s])},421512,236836,e=>{"use strict";let t=e.i(271645).default.createContext(null);e.s(["default",0,t],421512),e.i(296059);var r=e.i(915654),n=e.i(183293),a=e.i(246422),l=e.i(838378);function i(e,t){return(e=>{let{checkboxCls:t}=e,a=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,n.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[a]:Object.assign(Object.assign({},(0,n.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${a}`]:{marginInlineStart:0},[`&${a}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,n.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,n.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,r.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,r.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}})},{[` - ${a}:not(${a}-disabled), - ${t}:not(${t}-disabled) - `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${a}:not(${a}-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}`}}},[` - ${a}-checked:not(${a}-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}`}}}}},{[`${a}-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,l.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let o=(0,a.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[i(t,e)]);e.s(["default",0,o,"getStyle",()=>i],236836)},681216,e=>{"use strict";var t=e.i(271645),r=e.i(963188);function n(e){let n=t.default.useRef(null),a=()=>{r.default.cancel(n.current),n.current=null};return[()=>{a(),n.current=(0,r.default)(()=>{n.current=null})},t=>{n.current&&(t.stopPropagation(),a()),null==e||e(t)}]}e.s(["default",()=>n])},374276,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(91874),a=e.i(611935),l=e.i(121872),i=e.i(26905),o=e.i(242064),d=e.i(937328),c=e.i(321883),s=e.i(62139),u=e.i(421512),g=e.i(236836),p=e.i(681216),m=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let f=t.forwardRef((e,f)=>{var b;let{prefixCls:h,className:$,rootClassName:v,children:C,indeterminate:y=!1,style:k,onMouseEnter:S,onMouseLeave:x,skipGroup:w=!1,disabled:O}=e,I=m(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:E,direction:N,checkbox:z}=t.useContext(o.ConfigContext),j=t.useContext(u.default),{isFormItemInput:P}=t.useContext(s.FormItemInputContext),T=t.useContext(d.default),M=null!=(b=(null==j?void 0:j.disabled)||O)?b:T,R=t.useRef(I.value),B=t.useRef(null),H=(0,a.composeRef)(f,B);t.useEffect(()=>{null==j||j.registerValue(I.value)},[]),t.useEffect(()=>{if(!w)return I.value!==R.current&&(null==j||j.cancelValue(R.current),null==j||j.registerValue(I.value),R.current=I.value),()=>null==j?void 0:j.cancelValue(I.value)},[I.value]),t.useEffect(()=>{var e;(null==(e=B.current)?void 0:e.input)&&(B.current.input.indeterminate=y)},[y]);let q=E("checkbox",h),D=(0,c.default)(q),[L,G,W]=(0,g.default)(q,D),A=Object.assign({},I);j&&!w&&(A.onChange=(...e)=>{I.onChange&&I.onChange.apply(I,e),j.toggleOption&&j.toggleOption({label:C,value:I.value})},A.name=j.name,A.checked=j.value.includes(I.value));let X=(0,r.default)(`${q}-wrapper`,{[`${q}-rtl`]:"rtl"===N,[`${q}-wrapper-checked`]:A.checked,[`${q}-wrapper-disabled`]:M,[`${q}-wrapper-in-form-item`]:P},null==z?void 0:z.className,$,v,W,D,G),F=(0,r.default)({[`${q}-indeterminate`]:y},i.TARGET_CLS,G),[V,_]=(0,p.default)(A.onClick);return L(t.createElement(l.default,{component:"Checkbox",disabled:M},t.createElement("label",{className:X,style:Object.assign(Object.assign({},null==z?void 0:z.style),k),onMouseEnter:S,onMouseLeave:x,onClick:V},t.createElement(n.default,Object.assign({},A,{onClick:_,prefixCls:q,className:F,disabled:M,ref:H})),null!=C&&t.createElement("span",{className:`${q}-label`},C))))});var b=e.i(8211),h=e.i(529681),$=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let v=t.forwardRef((e,n)=>{let{defaultValue:a,children:l,options:i=[],prefixCls:d,className:s,rootClassName:p,style:m,onChange:v}=e,C=$(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:y,direction:k}=t.useContext(o.ConfigContext),[S,x]=t.useState(C.value||a||[]),[w,O]=t.useState([]);t.useEffect(()=>{"value"in C&&x(C.value||[])},[C.value]);let I=t.useMemo(()=>i.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[i]),E=e=>{O(t=>t.filter(t=>t!==e))},N=e=>{O(t=>[].concat((0,b.default)(t),[e]))},z=e=>{let t=S.indexOf(e.value),r=(0,b.default)(S);-1===t?r.push(e.value):r.splice(t,1),"value"in C||x(r),null==v||v(r.filter(e=>w.includes(e)).sort((e,t)=>I.findIndex(t=>t.value===e)-I.findIndex(e=>e.value===t)))},j=y("checkbox",d),P=`${j}-group`,T=(0,c.default)(j),[M,R,B]=(0,g.default)(j,T),H=(0,h.default)(C,["value","disabled"]),q=i.length?I.map(e=>t.createElement(f,{prefixCls:j,key:e.value.toString(),disabled:"disabled"in e?e.disabled:C.disabled,value:e.value,checked:S.includes(e.value),onChange:e.onChange,className:(0,r.default)(`${P}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):l,D=t.useMemo(()=>({toggleOption:z,value:S,disabled:C.disabled,name:C.name,registerValue:N,cancelValue:E}),[z,S,C.disabled,C.name,N,E]),L=(0,r.default)(P,{[`${P}-rtl`]:"rtl"===k},s,p,B,T,R);return M(t.createElement("div",Object.assign({className:L,style:m},H,{ref:n}),t.createElement(u.default.Provider,{value:D},q)))});f.Group=v,f.__ANT_CHECKBOX=!0,e.s(["default",0,f],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(739295),n=e.i(343794),a=e.i(931067),l=e.i(211577),i=e.i(392221),o=e.i(703923),d=e.i(914949),c=e.i(404948),s=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,r){var u,g=e.prefixCls,p=void 0===g?"rc-switch":g,m=e.className,f=e.checked,b=e.defaultChecked,h=e.disabled,$=e.loadingIcon,v=e.checkedChildren,C=e.unCheckedChildren,y=e.onClick,k=e.onChange,S=e.onKeyDown,x=(0,o.default)(e,s),w=(0,d.default)(!1,{value:f,defaultValue:b}),O=(0,i.default)(w,2),I=O[0],E=O[1];function N(e,t){var r=I;return h||(E(r=e),null==k||k(r,t)),r}var z=(0,n.default)(p,m,(u={},(0,l.default)(u,"".concat(p,"-checked"),I),(0,l.default)(u,"".concat(p,"-disabled"),h),u));return t.createElement("button",(0,a.default)({},x,{type:"button",role:"switch","aria-checked":I,disabled:h,className:z,ref:r,onKeyDown:function(e){e.which===c.default.LEFT?N(!1,e):e.which===c.default.RIGHT&&N(!0,e),null==S||S(e)},onClick:function(e){var t=N(!I,e);null==y||y(t,e)}}),$,t.createElement("span",{className:"".concat(p,"-inner")},t.createElement("span",{className:"".concat(p,"-inner-checked")},v),t.createElement("span",{className:"".concat(p,"-inner-unchecked")},C)))});u.displayName="Switch";var g=e.i(121872),p=e.i(242064),m=e.i(937328),f=e.i(517455);e.i(296059);var b=e.i(915654);e.i(262370);var h=e.i(135551),$=e.i(183293),v=e.i(246422),C=e.i(838378);let y=(0,v.genStyleHooks)("Switch",e=>{let t=(0,C.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:(0,b.unit)(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:a,innerMaxMargin:l,handleSize:i,calc:o}=e,d=`${t}-inner`,c=(0,b.unit)(o(i).add(o(n).mul(2)).equal()),s=(0,b.unit)(o(l).mul(2).equal());return{[t]:{[d]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:l,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${d}-checked, ${d}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${s})`,marginInlineEnd:`calc(100% - ${c} + ${s})`},[`${d}-unchecked`]:{marginTop:o(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${d}`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${s})`,marginInlineEnd:`calc(-100% + ${c} - ${s})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:o(n).mul(2).equal(),marginInlineEnd:o(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:o(n).mul(-1).mul(2).equal(),marginInlineEnd:o(n).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:r,handleBg:n,handleShadow:a,handleSize:l,calc:i}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:r,insetInlineStart:r,width:l,height:l,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:i(l).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,b.unit)(i(l).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:a,innerMinMarginSM:l,innerMaxMarginSM:i,handleSizeSM:o,calc:d}=e,c=`${t}-inner`,s=(0,b.unit)(d(o).add(d(n).mul(2)).equal()),u=(0,b.unit)(d(i).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:a,height:r,lineHeight:(0,b.unit)(r),[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:l,[`${c}-checked, ${c}-unchecked`]:{minHeight:r},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${u})`,marginInlineEnd:`calc(100% - ${s} + ${u})`},[`${c}-unchecked`]:{marginTop:d(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:d(d(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:i,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${u})`,marginInlineEnd:`calc(-100% + ${s} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,b.unit)(d(o).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:d(e.marginXXS).div(2).equal(),marginInlineEnd:d(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:d(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:d(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:a}=e,l=t*r,i=n/2,o=l-4,d=i-4;return{trackHeight:l,trackHeightSM:i,trackMinWidth:2*o+8,trackMinWidthSM:2*d+4,trackPadding:2,handleBg:a,handleSize:o,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new h.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:d/2,innerMaxMarginSM:d+2+4}});var k=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let S=t.forwardRef((e,a)=>{let{prefixCls:l,size:i,disabled:o,loading:c,className:s,rootClassName:b,style:h,checked:$,value:v,defaultChecked:C,defaultValue:S,onChange:x}=e,w=k(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[O,I]=(0,d.default)(!1,{value:null!=$?$:v,defaultValue:null!=C?C:S}),{getPrefixCls:E,direction:N,switch:z}=t.useContext(p.ConfigContext),j=t.useContext(m.default),P=(null!=o?o:j)||c,T=E("switch",l),M=t.createElement("div",{className:`${T}-handle`},c&&t.createElement(r.default,{className:`${T}-loading-icon`})),[R,B,H]=y(T),q=(0,f.default)(i),D=(0,n.default)(null==z?void 0:z.className,{[`${T}-small`]:"small"===q,[`${T}-loading`]:c,[`${T}-rtl`]:"rtl"===N},s,b,B,H),L=Object.assign(Object.assign({},null==z?void 0:z.style),h);return R(t.createElement(g.default,{component:"Switch",disabled:P},t.createElement(u,Object.assign({},w,{checked:O,onChange:(...e)=>{I(e[0]),null==x||x.apply(void 0,e)},prefixCls:T,className:D,style:L,disabled:P,ref:a,loadingIcon:M}))))});S.__ANT_SWITCH=!0,e.s(["Switch",0,S],790848)},475254,e=>{"use strict";var t=e.i(271645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:o="",children:d,iconNode:c,...s},u)=>(0,t.createElement)("svg",{ref:u,...a,width:r,height:r,stroke:e,strokeWidth:i?24*Number(l)/Number(r):l,className:n("lucide",o),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(s)&&{"aria-hidden":"true"},...s},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(d)?d:[d]])),i=(e,a)=>{let i=(0,t.forwardRef)(({className:i,...o},d)=>(0,t.createElement)(l,{ref:d,iconNode:a,className:n(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,i),...o}));return i.displayName=r(e),i};e.s(["default",()=>i],475254)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:n}))});e.s(["default",0,l],959013)},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),n=e.i(673706),a=e.i(271645);let l=a.default.forwardRef((e,l)=>{let{color:i,className:o,children:d}=e;return a.default.createElement("p",{ref:l,className:(0,r.tremorTwMerge)("text-tremor-default",i?(0,n.getColorClassNames)(i,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),o)},d)});l.displayName="Text",e.s(["default",()=>l],936325),e.s(["Text",()=>l],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(480731),a=e.i(95779),l=e.i(444755),i=e.i(673706);let o=(0,i.makeClassName)("Card"),d=r.default.forwardRef((e,d)=>{let{decoration:c="",decorationColor:s,children:u,className:g}=e,p=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:d,className:(0,l.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",s?(0,i.getColorClassNames)(s,a.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",(e=>{if(!e)return"";switch(e){case n.HorizontalPositions.Left:return"border-l-4";case n.VerticalPositions.Top:return"border-t-4";case n.HorizontalPositions.Right:return"border-r-4";case n.VerticalPositions.Bottom:return"border-b-4";default:return""}})(c),g)},p),u)});d.displayName="Card",e.s(["Card",()=>d],304967)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(876556);function a(e){return["small","middle","large"].includes(e)}function l(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>a,"isValidGapNumber",()=>l],908286);var i=e.i(242064),o=e.i(249616),d=e.i(372409),c=e.i(246422);let s=(0,c.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:a,paddingXS:l,fontSizeLG:i,fontSizeSM:o,borderRadiusLG:c,borderRadiusSM:s,colorBgContainerDisabled:u,lineWidth:g}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:n,margin:0,background:u,borderWidth:g,borderStyle:"solid",borderColor:a,borderRadius:r,"&-large":{fontSize:i,borderRadius:c},"&-small":{paddingInline:l,borderRadius:s,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,d.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let g=t.default.forwardRef((e,n)=>{let{className:a,children:l,style:d,prefixCls:c}=e,g=u(e,["className","children","style","prefixCls"]),{getPrefixCls:p,direction:m}=t.default.useContext(i.ConfigContext),f=p("space-addon",c),[b,h,$]=s(f),{compactItemClassnames:v,compactSize:C}=(0,o.useCompactItemContext)(f,m),y=(0,r.default)(f,h,v,$,{[`${f}-${C}`]:C},a);return b(t.default.createElement("div",Object.assign({ref:n,className:y,style:d},g),l))}),p=t.default.createContext({latestIndex:0}),m=p.Provider,f=({className:e,index:r,children:n,split:a,style:l})=>{let{latestIndex:i}=t.useContext(p);return null==n?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:l},n),r{let t=(0,b.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var $=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let v=t.forwardRef((e,o)=>{var d;let{getPrefixCls:c,direction:s,size:u,className:g,style:p,classNames:b,styles:v}=(0,i.useComponentConfig)("space"),{size:C=null!=u?u:"small",align:y,className:k,rootClassName:S,children:x,direction:w="horizontal",prefixCls:O,split:I,style:E,wrap:N=!1,classNames:z,styles:j}=e,P=$(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[T,M]=Array.isArray(C)?C:[C,C],R=a(M),B=a(T),H=l(M),q=l(T),D=(0,n.default)(x,{keepEmpty:!0}),L=void 0===y&&"horizontal"===w?"center":y,G=c("space",O),[W,A,X]=h(G),F=(0,r.default)(G,g,A,`${G}-${w}`,{[`${G}-rtl`]:"rtl"===s,[`${G}-align-${L}`]:L,[`${G}-gap-row-${M}`]:R,[`${G}-gap-col-${T}`]:B},k,S,X),V=(0,r.default)(`${G}-item`,null!=(d=null==z?void 0:z.item)?d:b.item),_=Object.assign(Object.assign({},v.item),null==j?void 0:j.item),Y=D.map((e,r)=>{let n=(null==e?void 0:e.key)||`${V}-${r}`;return t.createElement(f,{className:V,key:n,index:r,split:I,style:_},e)}),K=t.useMemo(()=>({latestIndex:D.reduce((e,t,r)=>null!=t?r:e,0)}),[D]);if(0===D.length)return null;let U={};return N&&(U.flexWrap="wrap"),!B&&q&&(U.columnGap=T),!R&&H&&(U.rowGap=M),W(t.createElement("div",Object.assign({ref:o,className:F,style:Object.assign(Object.assign(Object.assign({},U),p),E)},P),t.createElement(m,{value:K},Y)))});v.Compact=o.default,v.Addon=g,e.s(["default",0,v],38243)},389083,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(829087),a=e.i(480731),l=e.i(95779),i=e.i(444755),o=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"}},c={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"}},s=(0,o.makeClassName)("Badge"),u=r.default.forwardRef((e,u)=>{let{color:g,icon:p,size:m=a.Sizes.SM,tooltip:f,className:b,children:h}=e,$=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),v=p||null,{tooltipProps:C,getReferenceProps:y}=(0,n.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,C.refs.setReference]),className:(0,i.tremorTwMerge)(s("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",g?(0,i.tremorTwMerge)((0,o.getColorClassNames)(g,l.colorPalette.background).bgColor,(0,o.getColorClassNames)(g,l.colorPalette.iconText).textColor,(0,o.getColorClassNames)(g,l.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,i.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[m].paddingX,d[m].paddingY,d[m].fontSize,b)},y,$),r.default.createElement(n.default,Object.assign({text:f},C)),v?r.default.createElement(v,{className:(0,i.tremorTwMerge)(s("icon"),"shrink-0 -ml-1 mr-1.5",c[m].height,c[m].width)}):null,r.default.createElement("span",{className:(0,i.tremorTwMerge)(s("text"),"whitespace-nowrap")},h))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(242064),a=e.i(517455);e.i(296059);var l=e.i(915654),i=e.i(183293),o=e.i(246422),d=e.i(838378);let c=(0,o.genStyleHooks)("Divider",e=>{let t=(0,d.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:a,textPaddingInline:o,orientationMargin:d,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,i.resetComponent)(e)),{borderBlockStart:`${(0,l.unit)(a)} solid ${n}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,l.unit)(a)} solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,l.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,l.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,l.unit)(a)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${d} * 100%)`},"&::after":{width:`calc(100% - ${d} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${d} * 100%)`},"&::after":{width:`calc(${d} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${(0,l.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:n,borderStyle:"dotted",borderWidth:`${(0,l.unit)(a)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var s=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 a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};let u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:l,direction:i,className:o,style:d}=(0,n.useComponentConfig)("divider"),{prefixCls:g,type:p="horizontal",orientation:m="center",orientationMargin:f,className:b,rootClassName:h,children:$,dashed:v,variant:C="solid",plain:y,style:k,size:S}=e,x=s(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),w=l("divider",g),[O,I,E]=c(w),N=u[(0,a.default)(S)],z=!!$,j=t.useMemo(()=>"left"===m?"rtl"===i?"end":"start":"right"===m?"rtl"===i?"start":"end":m,[i,m]),P="start"===j&&null!=f,T="end"===j&&null!=f,M=(0,r.default)(w,o,I,E,`${w}-${p}`,{[`${w}-with-text`]:z,[`${w}-with-text-${j}`]:z,[`${w}-dashed`]:!!v,[`${w}-${C}`]:"solid"!==C,[`${w}-plain`]:!!y,[`${w}-rtl`]:"rtl"===i,[`${w}-no-default-orientation-margin-start`]:P,[`${w}-no-default-orientation-margin-end`]:T,[`${w}-${N}`]:!!N},b,h),R=t.useMemo(()=>"number"==typeof f?f:/^\d+$/.test(f)?Number(f):f,[f]);return O(t.createElement("div",Object.assign({className:M,style:Object.assign(Object.assign({},d),k)},x,{role:"separator"}),$&&"vertical"!==p&&t.createElement("span",{className:`${w}-inner-text`,style:{marginInlineStart:P?R:void 0,marginInlineEnd:T?R:void 0}},$)))}],312361)},801312,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:n}))});e.s(["default",0,l],801312)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6392214b899e5c07.js b/litellm/proxy/_experimental/out/_next/static/chunks/6392214b899e5c07.js deleted file mode 100644 index b887cee133..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/6392214b899e5c07.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207670,e=>{"use strict";function t(){for(var e,t,r=0,n="",i=arguments.length;rt,"default",0,t])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(914949),i=e.i(404948);let o=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,o],836938);var l=e.i(613541),a=e.i(763731),s=e.i(242064),c=e.i(491816);e.i(793154);var d=e.i(880476),u=e.i(183293),m=e.i(717356),p=e.i(320560),g=e.i(307358),f=e.i(246422),h=e.i(838378),x=e.i(617933);let y=(0,f.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,n=(0,h.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:n,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:l,colorTextHeading:a,borderRadiusLG:s,zIndexPopup:c,titleMarginBottom:d,colorBgElevated:m,popoverBg:g,titleBorderBottom:f,innerContentPadding:h,titlePadding:x}=e;return[{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:s,boxShadow:l,padding:o},[`${t}-title`]:{minWidth:n,marginBottom:d,color:a,fontWeight:i,borderBottom:f,padding:x},[`${t}-inner-content`]:{color:r,padding:h}})},(0,p.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(n),(e=>{let{componentCls:t}=e;return{[t]:x.PresetColors.map(r=>{let n=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":n,[`${t}-inner`]:{backgroundColor:n},[`${t}-arrow`]:{background:"transparent"}}}})}})(n),(0,m.initZoomMotion)(n,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:n,padding:i,wireframe:o,zIndexPopupBase:l,borderRadiusLG:a,marginXS:s,lineType:c,colorSplit:d,paddingSM:u}=e,m=r-n;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:l+30},(0,g.getArrowToken)(e)),(0,p.getArrowOffsetToken)({contentRadius:a,limitVerticalRadius:!0})),{innerPadding:12*!o,titleMarginBottom:o?0:s,titlePadding:o?`${m/2}px ${i}px ${m/2-t}px`:0,titleBorderBottom:o?`${t}px ${c} ${d}`:"none",innerContentPadding:o?`${u}px ${i}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});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 i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let b=({title:e,content:r,prefixCls:n})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${n}-title`},e),r&&t.createElement("div",{className:`${n}-inner-content`},r)):null,w=e=>{let{hashId:n,prefixCls:i,className:l,style:a,placement:s="top",title:c,content:u,children:m}=e,p=o(c),g=o(u),f=(0,r.default)(n,i,`${i}-pure`,`${i}-placement-${s}`,l);return t.createElement("div",{className:f,style:a},t.createElement("div",{className:`${i}-arrow`}),t.createElement(d.Popup,Object.assign({},e,{className:n,prefixCls:i}),m||t.createElement(b,{prefixCls:i,title:p,content:g})))},j=e=>{let{prefixCls:n,className:i}=e,o=v(e,["prefixCls","className"]),{getPrefixCls:l}=t.useContext(s.ConfigContext),a=l("popover",n),[c,d,u]=y(a);return c(t.createElement(w,Object.assign({},o,{prefixCls:a,hashId:d,className:(0,r.default)(i,u)})))};e.s(["Overlay",0,b,"default",0,j],310730);var S=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 i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let k=t.forwardRef((e,d)=>{var u,m;let{prefixCls:p,title:g,content:f,overlayClassName:h,placement:x="top",trigger:v="hover",children:w,mouseEnterDelay:j=.1,mouseLeaveDelay:k=.1,onOpenChange:C,overlayStyle:O={},styles:_,classNames:N}=e,I=S(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:L,className:E,style:$,classNames:P,styles:U}=(0,s.useComponentConfig)("popover"),T=L("popover",p),[A,z,W]=y(T),R=L(),B=(0,r.default)(h,z,W,E,P.root,null==N?void 0:N.root),M=(0,r.default)(P.body,null==N?void 0:N.body),[F,D]=(0,n.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),V=(e,t)=>{D(e,!0),null==C||C(e,t)},K=o(g),H=o(f);return A(t.createElement(c.default,Object.assign({placement:x,trigger:v,mouseEnterDelay:j,mouseLeaveDelay:k},I,{prefixCls:T,classNames:{root:B,body:M},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},U.root),$),O),null==_?void 0:_.root),body:Object.assign(Object.assign({},U.body),null==_?void 0:_.body)},ref:d,open:F,onOpenChange:e=>{V(e)},overlay:K||H?t.createElement(b,{prefixCls:T,title:K,content:H}):null,transitionName:(0,l.getTransitionName)(R,"zoom-big",I.transitionName),"data-popover-inject":!0}),(0,a.cloneElement)(w,{onKeyDown:e=>{var r,n;(0,t.isValidElement)(w)&&(null==(n=null==w?void 0:(r=w.props).onKeyDown)||n.call(r,e)),e.keyCode===i.default.ESC&&V(!1,e)}})))});k._InternalPanelDoNotUseOrYouWillBeFired=j,e.s(["default",0,k],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},295320,283713,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",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:n}))});e.s(["CloudServerOutlined",0,o],295320);var l=e.i(764205),a=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,a.useUIConfig)(),t=e?.is_control_plane??!1,n=e?.workers??[],[i,o]=(0,r.useState)(()=>localStorage.getItem(s));(0,r.useEffect)(()=>{if(!i||0===n.length)return;let e=n.find(e=>e.worker_id===i);e&&(0,l.switchToWorkerUrl)(e.url)},[i,n]);let c=n.find(e=>e.worker_id===i)??null,d=(0,r.useCallback)(e=>{let t=n.find(t=>t.worker_id===e);t&&(o(e),localStorage.setItem(s,e),(0,l.switchToWorkerUrl)(t.url))},[n]);return{isControlPlane:t,workers:n,selectedWorkerId:i,selectedWorker:c,selectWorker:d,disconnectFromWorker:(0,r.useCallback)(()=>{o(null),localStorage.removeItem(s),(0,l.switchToWorkerUrl)(null)},[])}}],283713)},571303,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(115504);function i({className:e="",...i}){var o,l;let a=(0,r.useId)();return o=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===a),r=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==a);t&&r&&(t.currentTime=r.currentTime)},l=[a],(0,r.useLayoutEffect)(o,l),(0,t.jsxs)("svg",{"data-spinner-id":a,className:(0,n.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...i,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>i],571303)},936578,e=>{"use strict";var t=e.i(843476),r=e.i(115504),n=e.i(571303);function i(){return(0,t.jsxs)("div",{className:(0,r.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(n.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>i])},594542,e=>{"use strict";var t=e.i(843476),r=e.i(954616),n=e.i(764205),i=e.i(612256),o=e.i(936578),l=e.i(268004),a=e.i(161281),s=e.i(321836),c=e.i(827252),d=e.i(295320),u=e.i(560445),m=e.i(464571),p=e.i(175712),g=e.i(808613),f=e.i(311451),h=e.i(282786),x=e.i(199133),y=e.i(770914),v=e.i(898586),b=e.i(618566),w=e.i(271645),j=e.i(283713);function S(){let[e,S]=(0,w.useState)(""),[k,C]=(0,w.useState)(""),[O,_]=(0,w.useState)(!0),{data:N,isLoading:I}=(0,i.useUIConfig)(),L=(0,r.useMutation)({mutationFn:async({username:e,password:t,useV3:r})=>await (0,n.loginCall)(e,t,r)}),E=(0,b.useRouter)(),{workers:$,selectWorker:P}=(0,j.useWorker)(),[U,T]=(0,w.useState)(null);(0,w.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("worker");e&&T(e)},[]),(0,w.useEffect)(()=>{if(I)return;if(N&&N.admin_ui_disabled)return void _(!1);let e=new URLSearchParams(window.location.search),t=e.get("code"),r=t&&/^[a-zA-Z0-9._~+/=-]+$/.test(t)?t:null;if(r){let t=localStorage.getItem("litellm_worker_url"),i=t&&/^https?:\/\/.+/.test(t)?t:null;(0,n.exchangeLoginCode)(r,i).then(()=>{e.delete("code");let t=e.toString();window.history.replaceState(null,"",window.location.pathname+(t?`?${t}`:"")),E.replace("/ui/?login=success")});return}let i=e.get("token");if(i&&!(0,a.isJwtExpired)(i)){document.cookie=`token=${i}; path=/; SameSite=Lax`,e.delete("token");let t=e.toString();window.history.replaceState(null,"",window.location.pathname+(t?`?${t}`:"")),E.replace("/ui/?login=success");return}if(e.has("worker")&&N?.is_control_plane){(0,l.clearTokenCookies)(),_(!1);return}let o=(0,l.getCookie)("token");if(o&&!(0,a.isJwtExpired)(o)){let e=(0,s.consumeReturnUrl)();e?E.replace(e):E.replace("/ui");return}if(N&&N.auto_redirect_to_sso){let e=(0,s.getReturnUrl)(),t=`${(0,n.getProxyBaseUrl)()}/sso/key/generate`;e&&(0,s.isValidReturnUrl)(e)&&(t+=`?redirect_to=${encodeURIComponent(e)}`),E.push(t);return}_(!1)},[I,E,N]);let A=L.error instanceof Error?L.error.message:null,z=L.isPending,{Title:W,Text:R,Paragraph:B}=v.Typography;return I||O?(0,t.jsx)(o.default,{}):N&&N.admin_ui_disabled?(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:(0,t.jsx)(p.Card,{className:"w-full max-w-lg shadow-md",children:(0,t.jsxs)(y.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)(W,{level:2,children:"🚅 LiteLLM"})}),(0,t.jsx)(u.Alert,{message:"Admin UI Disabled",description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B,{className:"text-sm",children:"The Admin UI has been disabled by the administrator. To re-enable it, please update the following environment variable:"}),(0,t.jsx)(B,{className:"text-sm",children:(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"DISABLE_ADMIN_UI=False"})})]}),type:"warning",showIcon:!0})]})})}):(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:(0,t.jsxs)(p.Card,{className:"w-full max-w-lg shadow-md",children:[(0,t.jsxs)(y.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)(W,{level:2,children:"🚅 LiteLLM"})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(W,{level:3,children:"Login"}),(0,t.jsx)(R,{type:"secondary",children:"Access your LiteLLM Admin UI."})]}),(0,t.jsx)(u.Alert,{message:"Default Credentials",description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(B,{className:"text-sm",children:["By default, Username is ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"admin"})," and Password is your set LiteLLM Proxy",(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"MASTER_KEY"}),"."]}),(0,t.jsxs)(B,{className:"text-sm",children:["Need to set UI credentials or SSO?"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/ui",target:"_blank",rel:"noopener noreferrer",children:"Check the documentation"}),"."]})]}),type:"info",icon:(0,t.jsx)(c.InfoCircleOutlined,{}),showIcon:!0}),A&&(0,t.jsx)(u.Alert,{message:A,type:"error",showIcon:!0}),(0,t.jsxs)(g.Form,{onFinish:()=>{let t=$.find(e=>e.worker_id===U);t&&(0,n.switchToWorkerUrl)(t.url),L.mutate({username:e,password:k,useV3:!!t},{onSuccess:e=>{if(t)P(t.worker_id),E.push("/ui/?login=success");else{let t=(0,s.consumeReturnUrl)();t?E.push(t):E.push(e.redirect_url)}},onError:()=>{t&&(0,n.switchToWorkerUrl)(null)}})},layout:"vertical",requiredMark:!1,children:[N?.is_control_plane&&$.length>0&&(0,t.jsx)(g.Form.Item,{label:"Worker",style:{marginBottom:16},children:(0,t.jsx)(x.Select,{value:U||void 0,onChange:e=>T(e),placeholder:"Choose a worker to connect to",size:"large",suffixIcon:(0,t.jsx)(d.CloudServerOutlined,{}),options:$.map(e=>({label:e.name,value:e.worker_id}))})}),(0,t.jsx)(g.Form.Item,{label:"Username",name:"username",rules:[{required:!0,message:"Please enter your username"}],children:(0,t.jsx)(f.Input,{placeholder:"Enter your username",autoComplete:"username",value:e,onChange:e=>S(e.target.value),disabled:z,size:"large",className:"rounded-md border-gray-300"})}),(0,t.jsx)(g.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"Please enter your password"}],children:(0,t.jsx)(f.Input.Password,{placeholder:"Enter your password",autoComplete:"current-password",value:k,onChange:e=>C(e.target.value),disabled:z,size:"large"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:z,disabled:z,block:!0,size:"large",children:z?"Logging in...":"Login"})}),(0,t.jsx)(g.Form.Item,{children:N?.sso_configured?(0,t.jsx)(m.Button,{disabled:z||!!U&&0===$.length,onClick:()=>{let e=$.find(e=>e.worker_id===U);e&&(localStorage.setItem("litellm_selected_worker_id",U),(0,n.switchToWorkerUrl)(e.url));let t=e?.url??(0,n.getProxyBaseUrl)(),r=encodeURIComponent(window.location.origin+"/ui/login");E.push(`${t}/sso/key/generate?return_to=${r}`)},block:!0,size:"large",children:"Login with SSO"}):(0,t.jsx)(h.Popover,{content:"Please configure SSO to log in with SSO.",trigger:"hover",children:(0,t.jsx)(m.Button,{disabled:!0,block:!0,size:"large",children:"Login with SSO"})})})]})]}),N?.sso_configured&&(0,t.jsx)(u.Alert,{type:"info",showIcon:!0,closable:!0,message:(0,t.jsxs)(R,{children:["Single Sign-On (SSO) is enabled. LiteLLM no longer automatically redirects to the SSO login flow upon loading this page. To re-enable auto-redirect-to-SSO, set ",(0,t.jsx)(R,{code:!0,children:"AUTO_REDIRECT_UI_LOGIN_TO_SSO=true"})," in your environment configuration."]})})]})})}e.s(["default",0,function(){return(0,t.jsx)(S,{})}],594542)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/65968777d52ff874.js b/litellm/proxy/_experimental/out/_next/static/chunks/65968777d52ff874.js deleted file mode 100644 index c4f4afac40..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/65968777d52ff874.js +++ /dev/null @@ -1,7 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,954616,e=>{"use strict";var t=e.i(271645),a=e.i(114272),s=e.i(540143),r=e.i(915823),l=e.i(619273),i=class extends r.Subscribable{#e;#t=void 0;#a;#s;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.#a,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#r(),this.#l()}mutate(e,t){return this.#s=t,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(e)}#r(){let e=this.#a?.state??(0,a.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){s.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,a,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,a,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,a){let r=(0,n.useQueryClient)(a),[o]=t.useState(()=>new i(r,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let d=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(s.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=t.useCallback((e,t)=>{o.mutate(e,t).catch(l.noop)},[o]);if(d.error&&(0,l.shouldThrowError)(o.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>o],954616)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},530212,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:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,a],530212)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let a=e.i(264042).Row;e.s(["Row",0,a],621192)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),s=e.i(529681),r=e.i(908286),l=e.i(242064),i=e.i(246422),n=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"],c=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let s,r,l;return(0,a.default)(Object.assign(Object.assign(Object.assign({},(s=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${s}`]:s&&o.includes(s)})),(r={},c.forEach(a=>{r[`${e}-align-${a}`]=t.align===a}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r)),(l={},d.forEach(a=>{l[`${e}-justify-${a}`]=t.justify===a}),l)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:a,paddingLG:s}=e,r=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:a,flexGapLG:s});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(r),(e=>{let{componentCls:t}=e,a={};return o.forEach(e=>{a[`${t}-wrap-${e}`]={flexWrap:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return c.forEach(e=>{a[`${t}-align-${e}`]={alignItems:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return d.forEach(e=>{a[`${t}-justify-${e}`]={justifyContent:e}}),a})(r)]},()=>({}),{resetStyle:!1});var p=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let h=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:d,style:c,flex:h,gap:g,vertical:x=!1,component:f="div",children:y}=e,b=p(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:j,getPrefixCls:_}=t.default.useContext(l.ConfigContext),w=_("flex",n),[k,N,S]=m(w),C=null!=x?x:null==v?void 0:v.vertical,T=(0,a.default)(d,o,null==v?void 0:v.className,w,N,S,u(w,e),{[`${w}-rtl`]:"rtl"===j,[`${w}-gap-${g}`]:(0,r.isPresetSize)(g),[`${w}-vertical`]:C}),$=Object.assign(Object.assign({},null==v?void 0:v.style),c);return h&&($.flex=h),g&&!(0,r.isPresetSize)(g)&&($.gap=g),k(t.default.createElement(f,Object.assign({ref:i,className:T,style:$},(0,s.default)(b,["justify","wrap","align"])),y))});e.s(["Flex",0,h],525720)},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)},771674,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["UserOutlined",0,l],771674)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),a=e.i(271645);let s={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=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ArrowLeftOutlined",0,l],447566)},948401,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["MailOutlined",0,l],948401)},384767,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(271645),r=e.i(389083);let l=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(764205);let n=function({vectorStores:e,accessToken:n}){let[o,d]=(0,s.useState)([]);return(0,s.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)(r.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 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},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"})]})]})},o=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:"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 d=e.i(871943),c=e.i(502547),u=e.i(592968);let m=function({mcpServers:e,mcpAccessGroups:l=[],mcpToolPermissions:n={},mcpToolsets:m=[],accessToken:p}){let[h,g]=(0,s.useState)([]),[x,f]=(0,s.useState)([]),[y,b]=(0,s.useState)(new Set),[v,j]=(0,s.useState)(new Set);(0,s.useEffect)(()=>{(async()=>{if(p&&e.length>0)try{let e=await (0,i.fetchMCPServers)(p);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[p,e.length]),(0,s.useEffect)(()=>{(async()=>{if(p&&m.length>0)try{let e=await (0,i.fetchMCPToolsets)(p),t=Array.isArray(e)?e.filter(e=>m.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[p,m.length]);let _=[...e.map(e=>({type:"server",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],w=_.length+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)(o,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(r.Badge,{color:"blue",size:"xs",children:w})]}),w>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[_.map((e,a)=>{let s="server"===e.type?n[e.value]:void 0,r=s&&s.length>0,l=y.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return r&&(t=e.value,void b(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 ${r?"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)(u.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=h.find(t=>t.server_id===e);if(t){let a=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),r&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),l?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),r&&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:s.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)}),m.length>0&&m.map((e,a)=>{let s=x.find(t=>t.toolset_id===e),r=v.has(e),l=s?.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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),l>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),r?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l>0&&r&&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,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)(o,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No MCP servers, access groups, or toolsets configured"})]})]})},p=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"}))}),h=function({agents:e,agentAccessGroups:l=[],accessToken:n}){let[o,d]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,i.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],m=c.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)(p,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(r.Badge,{color:"purple",size:"xs",children:m})]}),m>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.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)(u.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 flex-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 flex-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 uppercase tracking-wide flex-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)(p,{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:s="card",className:r="",accessToken:l}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},u=e?.mcp_toolsets||[],p=e?.agents||[],g=e?.agent_access_groups||[],x=(0,t.jsxs)("div",{className:"card"===s?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:i,accessToken:l}),(0,t.jsx)(m,{mcpServers:o,mcpAccessGroups:d,mcpToolPermissions:c,mcpToolsets:u,accessToken:l}),(0,t.jsx)(h,{agents:p,agentAccessGroups:g,accessToken:l})]});return"card"===s?(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)(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"})]})}),x]}):(0,t.jsxs)("div",{className:`${r}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)},891547,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);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,r.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",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)(s.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:l,loading:u,className:i,allowClear:!0,options:d.map(e=>(console.log("Mapping guardrail:",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),s=e.i(199133),r=e.i(764205);function l(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let a=e.version_number??1,s=e.version_status??"draft";return{label:`${e.policy_name} — v${a} (${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:n,accessToken:o,disabled:d,onPoliciesLoaded:c})=>{let[u,m]=(0,a.useState)([]),[p,h]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,r.getPoliciesList)(o);e.policies&&(m(e.policies),c?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{h(!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:p,className:n,allowClear:!0,options:l(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>l])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ClockCircleOutlined",0,l],637235)},916940,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,placeholder:o="Select vector stores",disabled:d=!1})=>{let[c,u]=(0,a.useState)([]),[m,p]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,r.vectorStoreListCall)(n);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",placeholder:o,onChange:e,value:l,loading:m,className:i,allowClear:!0,options:c.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:d})})}])},689020,e=>{"use strict";var t=e.i(764205);let a=async e=>{try{let a=await (0,t.modelHubCall)(e);if(console.log("model_info:",a),a?.data.length>0){let e=a.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,a])},244451,e=>{"use strict";let t;e.i(247167);var a=e.i(271645),s=e.i(343794),r=e.i(242064),l=e.i(763731),i=e.i(174428);let n=80*Math.PI,o=e=>{let{dotClassName:t,style:r,hasCircleCls:l}=e;return a.createElement("circle",{className:(0,s.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]=a.useState(!1);(0,i.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let p={strokeDashoffset:`${n/4}`,strokeDasharray:`${n*m/100} ${n*(100-m)/100}`};return a.createElement("span",{className:(0,s.default)(l,`${r}-progress`,m<=0&&d)},a.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},a.createElement(o,{dotClassName:r,hasCircleCls:!0}),a.createElement(o,{dotClassName:r,style:p})))};function c(e){let{prefixCls:t,percent:r=0}=e,l=`${t}-dot`,i=`${l}-holder`,n=`${i}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:(0,s.default)(i,r>0&&n)},a.createElement("span",{className:(0,s.default)(l,`${t}-dot-spin`)},[1,2,3,4].map(e=>a.createElement("i",{className:`${t}-dot-item`,key:e})))),a.createElement(d,{prefixCls:t,percent:r}))}function u(e){var t;let{prefixCls:r,indicator:i,percent:n}=e,o=`${r}-dot`;return i&&a.isValidElement(i)?(0,l.cloneElement)(i,{className:(0,s.default)(null==(t=i.props)?void 0:t.className,o),percent:n}):a.createElement(c,{prefixCls:r,percent:n})}e.i(296059);var m=e.i(694758),p=e.i(183293),h=e.i(246422),g=e.i(838378);let x=new m.Keyframes("antSpinMove",{to:{opacity:1}}),f=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),y=(0,h.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:a}=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:a(a(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:a(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:a(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:a(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:a(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(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:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),height:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:x,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:f,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:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal(),height:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,g.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:a}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:a}}),b=[[30,.05],[70,.03],[96,.01]];var v=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let j=e=>{var l;let{prefixCls:i,spinning:n=!0,delay:o=0,className:d,rootClassName:c,size:m="default",tip:p,wrapperClassName:h,style:g,children:x,fullscreen:f=!1,indicator:j,percent:_}=e,w=v(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:k,direction:N,className:S,style:C,indicator:T}=(0,r.useComponentConfig)("spin"),$=k("spin",i),[I,O,E]=y($),[M,A]=a.useState(()=>n&&(!n||!o||!!Number.isNaN(Number(o)))),F=function(e,t){let[s,r]=a.useState(0),l=a.useRef(null),i="auto"===t;return a.useEffect(()=>(i&&e&&(r(0),l.current=setInterval(()=>{r(e=>{let t=100-e;for(let a=0;a{l.current&&(clearInterval(l.current),l.current=null)}),[i,e]),i?s:t}(M,_);a.useEffect(()=>{if(n){let e=function(e,t,a){var s,r=a||{},l=r.noTrailing,i=void 0!==l&&l,n=r.noLeading,o=void 0!==n&&n,d=r.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function p(){s&&clearTimeout(s)}function h(){for(var a=arguments.length,r=Array(a),l=0;le?o?(m=Date.now(),i||(s=setTimeout(c?g:h,e))):h():!0!==i&&(s=setTimeout(c?g:h,void 0===c?e-d:e)))}return h.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},h}(o,()=>{A(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}A(!1)},[o,n]);let z=a.useMemo(()=>void 0!==x&&!f,[x,f]),D=(0,s.default)($,S,{[`${$}-sm`]:"small"===m,[`${$}-lg`]:"large"===m,[`${$}-spinning`]:M,[`${$}-show-text`]:!!p,[`${$}-rtl`]:"rtl"===N},d,!f&&c,O,E),L=(0,s.default)(`${$}-container`,{[`${$}-blur`]:M}),R=null!=(l=null!=j?j:T)?l:t,P=Object.assign(Object.assign({},C),g),B=a.createElement("div",Object.assign({},w,{style:P,className:D,"aria-live":"polite","aria-busy":M}),a.createElement(u,{prefixCls:$,indicator:R,percent:F}),p&&(z||f)?a.createElement("div",{className:`${$}-text`},p):null);return I(z?a.createElement("div",Object.assign({},w,{className:(0,s.default)(`${$}-nested-loading`,h,O,E)}),M&&a.createElement("div",{key:"loading"},B),a.createElement("div",{className:L,key:"container"},x)):f?a.createElement("div",{className:(0,s.default)(`${$}-fullscreen`,{[`${$}-fullscreen-show`]:M},c,O,E)},B):B)};j.setDefaultIndicator=e=>{t=e},e.s(["default",0,j],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},91874,e=>{"use strict";var t=e.i(931067),a=e.i(209428),s=e.i(211577),r=e.i(392221),l=e.i(703923),i=e.i(343794),n=e.i(914949),o=e.i(271645),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],c=(0,o.forwardRef)(function(e,c){var u=e.prefixCls,m=void 0===u?"rc-checkbox":u,p=e.className,h=e.style,g=e.checked,x=e.disabled,f=e.defaultChecked,y=e.type,b=void 0===y?"checkbox":y,v=e.title,j=e.onChange,_=(0,l.default)(e,d),w=(0,o.useRef)(null),k=(0,o.useRef)(null),N=(0,n.default)(void 0!==f&&f,{value:g}),S=(0,r.default)(N,2),C=S[0],T=S[1];(0,o.useImperativeHandle)(c,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:k.current}});var $=(0,i.default)(m,p,(0,s.default)((0,s.default)({},"".concat(m,"-checked"),C),"".concat(m,"-disabled"),x));return o.createElement("span",{className:$,title:v,style:h,ref:k},o.createElement("input",(0,t.default)({},_,{className:"".concat(m,"-input"),ref:w,onChange:function(t){x||("checked"in e||T(t.target.checked),null==j||j({target:(0,a.default)((0,a.default)({},e),{},{type:b,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:x,checked:!!C,type:b})),o.createElement("span",{className:"".concat(m,"-inner")}))});e.s(["default",0,c])},681216,e=>{"use strict";var t=e.i(271645),a=e.i(963188);function s(e){let s=t.default.useRef(null),r=()=>{a.default.cancel(s.current),s.current=null};return[()=>{r(),s.current=(0,a.default)(()=>{s.current=null})},t=>{s.current&&(t.stopPropagation(),r()),null==e||e(t)}]}e.s(["default",()=>s])},421512,236836,e=>{"use strict";let t=e.i(271645).default.createContext(null);e.s(["default",0,t],421512),e.i(296059);var a=e.i(915654),s=e.i(183293),r=e.i(246422),l=e.i(838378);function i(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,s.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,s.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,s.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,s.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}})},{[` - ${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,l.mergeToken)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}let n=(0,r.genStyleHooks)("Checkbox",(e,{prefixCls:t})=>[i(t,e)]);e.s(["default",0,n,"getStyle",()=>i],236836)},374276,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),s=e.i(91874),r=e.i(611935),l=e.i(121872),i=e.i(26905),n=e.i(242064),o=e.i(937328),d=e.i(321883),c=e.i(62139),u=e.i(421512),m=e.i(236836),p=e.i(681216),h=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let g=t.forwardRef((e,g)=>{var x;let{prefixCls:f,className:y,rootClassName:b,children:v,indeterminate:j=!1,style:_,onMouseEnter:w,onMouseLeave:k,skipGroup:N=!1,disabled:S}=e,C=h(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:T,direction:$,checkbox:I}=t.useContext(n.ConfigContext),O=t.useContext(u.default),{isFormItemInput:E}=t.useContext(c.FormItemInputContext),M=t.useContext(o.default),A=null!=(x=(null==O?void 0:O.disabled)||S)?x:M,F=t.useRef(C.value),z=t.useRef(null),D=(0,r.composeRef)(g,z);t.useEffect(()=>{null==O||O.registerValue(C.value)},[]),t.useEffect(()=>{if(!N)return C.value!==F.current&&(null==O||O.cancelValue(F.current),null==O||O.registerValue(C.value),F.current=C.value),()=>null==O?void 0:O.cancelValue(C.value)},[C.value]),t.useEffect(()=>{var e;(null==(e=z.current)?void 0:e.input)&&(z.current.input.indeterminate=j)},[j]);let L=T("checkbox",f),R=(0,d.default)(L),[P,B,V]=(0,m.default)(L,R),K=Object.assign({},C);O&&!N&&(K.onChange=(...e)=>{C.onChange&&C.onChange.apply(C,e),O.toggleOption&&O.toggleOption({label:v,value:C.value})},K.name=O.name,K.checked=O.value.includes(C.value));let G=(0,a.default)(`${L}-wrapper`,{[`${L}-rtl`]:"rtl"===$,[`${L}-wrapper-checked`]:K.checked,[`${L}-wrapper-disabled`]:A,[`${L}-wrapper-in-form-item`]:E},null==I?void 0:I.className,y,b,V,R,B),U=(0,a.default)({[`${L}-indeterminate`]:j},i.TARGET_CLS,B),[H,W]=(0,p.default)(K.onClick);return P(t.createElement(l.default,{component:"Checkbox",disabled:A},t.createElement("label",{className:G,style:Object.assign(Object.assign({},null==I?void 0:I.style),_),onMouseEnter:w,onMouseLeave:k,onClick:H},t.createElement(s.default,Object.assign({},K,{onClick:W,prefixCls:L,className:U,disabled:A,ref:D})),null!=v&&t.createElement("span",{className:`${L}-label`},v))))});var x=e.i(8211),f=e.i(529681),y=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let b=t.forwardRef((e,s)=>{let{defaultValue:r,children:l,options:i=[],prefixCls:o,className:c,rootClassName:p,style:h,onChange:b}=e,v=y(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:j,direction:_}=t.useContext(n.ConfigContext),[w,k]=t.useState(v.value||r||[]),[N,S]=t.useState([]);t.useEffect(()=>{"value"in v&&k(v.value||[])},[v.value]);let C=t.useMemo(()=>i.map(e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e),[i]),T=e=>{S(t=>t.filter(t=>t!==e))},$=e=>{S(t=>[].concat((0,x.default)(t),[e]))},I=e=>{let t=w.indexOf(e.value),a=(0,x.default)(w);-1===t?a.push(e.value):a.splice(t,1),"value"in v||k(a),null==b||b(a.filter(e=>N.includes(e)).sort((e,t)=>C.findIndex(t=>t.value===e)-C.findIndex(e=>e.value===t)))},O=j("checkbox",o),E=`${O}-group`,M=(0,d.default)(O),[A,F,z]=(0,m.default)(O,M),D=(0,f.default)(v,["value","disabled"]),L=i.length?C.map(e=>t.createElement(g,{prefixCls:O,key:e.value.toString(),disabled:"disabled"in e?e.disabled:v.disabled,value:e.value,checked:w.includes(e.value),onChange:e.onChange,className:(0,a.default)(`${E}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):l,R=t.useMemo(()=>({toggleOption:I,value:w,disabled:v.disabled,name:v.name,registerValue:$,cancelValue:T}),[I,w,v.disabled,v.name,$,T]),P=(0,a.default)(E,{[`${E}-rtl`]:"rtl"===_},c,p,z,M,F);return A(t.createElement("div",Object.assign({className:P,style:h},D,{ref:s}),t.createElement(u.default.Provider,{value:R},L)))});g.Group=b,g.__ANT_CHECKBOX=!0,e.s(["default",0,g],374276)},536916,e=>{"use strict";var t=e.i(374276);e.s(["Checkbox",()=>t.default])},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),a=e.i(271645);let s={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 r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["FileTextOutlined",0,l],993914)},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},214541,e=>{"use strict";var t=e.i(271645),a=e.i(135214),s=e.i(270345);e.s(["default",0,()=>{let[e,r]=(0,t.useState)([]),{accessToken:l,userId:i,userRole:n}=(0,a.default)();return(0,t.useEffect)(()=>{(async()=>{r(await (0,s.fetchTeams)(l,i,n,null))})()},[l,i,n]),{teams:e,setTeams:r}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function a(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function s(e,s){let r=t(e);return isNaN(s)?a(e,NaN):(s&&r.setDate(r.getDate()+s),r)}function r(e,s){let r=t(e);if(isNaN(s))return a(e,NaN);if(!s)return r;let l=r.getDate(),i=a(e,r.getTime());return(i.setMonth(r.getMonth()+s+1,0),l>=i.getDate())?i:(r.setFullYear(i.getFullYear(),i.getMonth(),l),r)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>a],96226),e.s(["addDays",()=>s],439189),e.s(["addMonths",()=>r],497245)},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SyncOutlined",0,l],772345)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ThunderboltOutlined",0,l],962944)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),r=e.i(477386),l=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,r)=>{var i;let n=(i=e.callback_name,Object.entries(l.callback_map).find(([e,t])=>t===i)?.[0]||i),o=l.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},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)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=l.reverse_callback_map[e]||e,n=l.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(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)(r.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,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:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),d]})}])},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:r=[],onDisabledCallbacksChange:l})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:l})])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=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 r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["CalendarOutlined",0,l],72713)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SafetyCertificateOutlined",0,l],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(r.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function r({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>r])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),r=e.i(592968),l=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),u=e.i(646563),m=e.i(771674),p=e.i(948401),h=e.i(72713),g=e.i(637235),x=e.i(962944),f=e.i(534172),y=e.i(3750),b=e.i(304911);let{Text:v}=s.Typography;function j({label:e,value:a,icon:s,truncate:r=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(b.default,{userId:a}):(0,t.jsx)(v,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:r,style:r?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(l.Space,{size:4,children:[(0,t.jsx)(v,{type:"secondary",children:s}),(0,t.jsx)(v,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:_,Text:w}=s.Typography;function k({data:e,onBack:s,onCreateNew:b,onRegenerate:v,onDelete:k,onResetSpend:N,canModifyKey:S=!0,backButtonText:C="Back to Keys",regenerateDisabled:T=!1,regenerateTooltip:$}){return(0,t.jsxs)("div",{children:[b&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(u.PlusOutlined,{}),onClick:b,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:C})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(w,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),S&&(0,t.jsxs)(l.Space,{children:[(0,t.jsx)(r.Tooltip,{title:$||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:v,disabled:T,children:"Regenerate Key"})})}),N&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(y.TransactionOutlined,{}),onClick:N,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:k,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(j,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(p.MailOutlined,{})}),(0,t.jsx)(j,{label:"User ID",value:e.userId,icon:(0,t.jsx)(m.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(j,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(h.CalendarOutlined,{})}),(0,t.jsx)(j,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(f.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(j,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(j,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(x.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>k],784647);var N=e.i(599724),S=e.i(389083),C=e.i(278587),T=e.i(271645);let $=T.forwardRef(function(e,t){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:t},e),T.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:r,nextRotationAt:l,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(C.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(N.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(S.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(N.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||r||l)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)($,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(N.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(N.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(r||l)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)($,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(N.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(N.Text,{className:"text-sm text-gray-600",children:o(l||r||"")})]})]}),e&&!s&&!r&&!l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)($,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(N.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!r&&!l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(N.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(N.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(N.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let I=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!I.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},65932,272753,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),r=e.i(135214),l=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),r=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,l=await fetch(r,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return l.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,r.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:l.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(492030),d=e.i(166406),c=e.i(772345),u=e.i(560445),m=e.i(464571),p=e.i(178654),h=e.i(525720),g=e.i(808613),x=e.i(311451),f=e.i(28651),y=e.i(212931),b=e.i(621192),v=e.i(770914),j=e.i(898586),_=e.i(439189),w=e.i(497245),k=e.i(96226),N=e.i(435684);function S(e,t){let{years:a=0,months:s=0,weeks:r=0,days:l=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,N.toDate)(e),c=s||a?(0,w.addMonths)(d,s+12*a):d,u=l||r?(0,_.addDays)(c,l+7*r):c;return(0,k.constructFrom)(e,u.getTime()+1e3*(o+60*(n+60*i)))}var C=e.i(271645),T=e.i(237016),$=e.i(727749);let{Text:I}=j.Typography;function O({selectedToken:e,visible:t,onClose:a,onKeyUpdate:l}){let{accessToken:i}=(0,r.default)(),[j]=g.Form.useForm(),[_,w]=(0,C.useState)(null),[k,N]=(0,C.useState)(null),[O,E]=(0,C.useState)(null),[M,A]=(0,C.useState)(!1),[F,z]=(0,C.useState)(!1);(0,C.useEffect)(()=>{t&&e&&i&&j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""})},[t,e,j,i]);let D=e=>{if(!e)return null;try{let t,a=parseInt(e);if(Number.isNaN(a))throw Error("Invalid duration format");let s=new Date;if(e.endsWith("mo"))t=S(s,{months:a});else if(e.endsWith("s"))t=S(s,{seconds:a});else if(e.endsWith("m"))t=S(s,{minutes:a});else if(e.endsWith("h"))t=S(s,{hours:a});else if(e.endsWith("d"))t=S(s,{days:a});else if(e.endsWith("w"))t=S(s,{weeks:a});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,C.useEffect)(()=>{k?.duration?E(D(k.duration)):E(null)},[k?.duration]);let L=async()=>{if(e&&i){A(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(i,e.token||e.token_id,t);w(a.key),$.default.success("Virtual Key regenerated successfully");let r={...a,token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?D(t.duration)??e.expires:e.expires};l&&l(r),A(!1)}catch(e){console.error("Error regenerating key:",e),$.default.fromBackend(e),A(!1)}}},R=()=>{w(null),A(!1),z(!1),j.resetFields(),a()};return(0,n.jsx)(y.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:R,width:520,maskClosable:!1,footer:_?[(0,n.jsxs)(v.Space,{children:[(0,n.jsx)(m.Button,{onClick:R,children:"Close"}),(0,n.jsx)(T.CopyToClipboard,{text:_,onCopy:()=>{z(!0)},children:(0,n.jsx)(m.Button,{type:"primary",icon:F?(0,n.jsx)(o.CheckOutlined,{}):(0,n.jsx)(d.CopyOutlined,{}),children:F?"Copied":"Copy Key"})})]},"footer-actions")]:[(0,n.jsxs)(v.Space,{children:[(0,n.jsx)(m.Button,{onClick:R,children:"Cancel"}),(0,n.jsx)(m.Button,{type:"primary",icon:(0,n.jsx)(c.SyncOutlined,{}),onClick:L,loading:M,children:"Regenerate"})]},"footer-actions")],children:_?(0,n.jsxs)(h.Flex,{vertical:!0,gap:"middle",children:[(0,n.jsx)(u.Alert,{type:"warning",showIcon:!0,message:"Save it now, you will not see it again"}),(0,n.jsxs)(h.Flex,{vertical:!0,gap:2,children:[(0,n.jsx)(I,{type:"secondary",style:{fontSize:12},children:"Key Alias"}),(0,n.jsx)(I,{children:e?.key_alias||"No alias set"})]}),(0,n.jsxs)(h.Flex,{vertical:!0,gap:6,children:[(0,n.jsx)(I,{type:"secondary",style:{fontSize:12},children:"Virtual Key"}),(0,n.jsx)("div",{style:{background:"#f5f5f5",border:"1px solid #e8e8e8",borderRadius:6,padding:"14px 16px",fontFamily:"SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace",fontSize:16,wordBreak:"break-all",color:"#262626"},children:_})]})]}):(0,n.jsxs)(g.Form,{form:j,layout:"vertical",style:{marginTop:4},onValuesChange:e=>{"duration"in e&&N(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(g.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(x.Input,{disabled:!0})}),(0,n.jsxs)(b.Row,{gutter:12,children:[(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(f.InputNumber,{step:.01,precision:2,style:{width:"100%"}})})}),(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(f.InputNumber,{style:{width:"100%"}})})}),(0,n.jsx)(p.Col,{span:8,children:(0,n.jsx)(g.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(f.InputNumber,{style:{width:"100%"}})})})]}),(0,n.jsxs)(b.Row,{gutter:12,children:[(0,n.jsx)(p.Col,{span:12,children:(0,n.jsx)(g.Form.Item,{name:"duration",label:"Expire Key",extra:(0,n.jsxs)(h.Flex,{vertical:!0,gap:2,children:[(0,n.jsxs)(I,{type:"secondary",style:{fontSize:12},children:["Current expiry:"," ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),O&&(0,n.jsxs)(I,{type:"success",style:{fontSize:12},children:["New expiry: ",O]})]}),children:(0,n.jsx)(x.Input,{placeholder:"e.g. 30s, 30h, 30d"})})}),(0,n.jsx)(p.Col,{span:12,children:(0,n.jsx)(g.Form.Item,{name:"grace_period",label:"Grace Period",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",extra:(0,n.jsx)(I,{type:"secondary",style:{fontSize:12},children:"Recommended: 24h to 72h for production keys"}),rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(x.Input,{placeholder:"e.g. 24h, 2d"})})})]})]})})}e.s(["RegenerateKeyModal",()=>O],272753)},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),r=e.i(292639),l=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),u=e.i(304967),m=e.i(350967),p=e.i(197647),h=e.i(653824),g=e.i(881073),x=e.i(404206),f=e.i(723731),y=e.i(599724),b=e.i(629569),v=e.i(808613),j=e.i(212931),_=e.i(262218),w=e.i(784647),k=e.i(271645),N=e.i(708347),S=e.i(557662),C=e.i(505022),T=e.i(127952),$=e.i(721929),I=e.i(643449),O=e.i(727749),E=e.i(764205),M=e.i(65932),A=e.i(384767),F=e.i(272753),z=e.i(190702),D=e.i(891547),L=e.i(109799),R=e.i(921511),P=e.i(827252),B=e.i(779241),V=e.i(311451),K=e.i(199133),G=e.i(790848),U=e.i(592968),H=e.i(552130),W=e.i(9314),q=e.i(392110),X=e.i(844565),J=e.i(939510),Q=e.i(363256),Y=e.i(319312),Z=e.i(75921),ee=e.i(390605),et=e.i(702597),ea=e.i(435451),es=e.i(183588),er=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:l,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:u=!1}){let m=u||null!=d&&N.rolesWithWriteAccess.includes(d),[p]=v.Form.useForm(),[h,g]=(0,k.useState)([]),[x,f]=(0,k.useState)({}),y=i?.find(t=>t.team_id===e.team_id),[b,j]=(0,k.useState)([]),[_,w]=(0,k.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[C,T]=(0,k.useState)(e.organization_id||null),[I,M]=(0,k.useState)(e.auto_rotate||!1),[A,F]=(0,k.useState)(e.rotation_interval||""),[z,el]=(0,k.useState)(!e.expires),[ei,en]=(0,k.useState)(!1),[eo,ed]=(0,k.useState)(Array.isArray(e.budget_limits)?e.budget_limits:[]),{data:ec,isLoading:eu}=(0,L.useOrganizations)(),{data:em}=(0,s.useProjects)(),{data:ep}=(0,r.useUISettings)(),eh=!!ep?.values?.enable_projects_ui,eg=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=em?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,k.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,E.modelAvailableCall)(n,o,d)).data.map(e=>e.id);j(e)}else if(y?.team_id){let e=await (0,et.fetchTeamModels)(o,d,n,y.team_id);j(Array.from(new Set([...y.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,E.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,y,e.team_id]),(0,k.useEffect)(()=>{p.setFieldValue("disabled_callbacks",_)},[p,_]);let ef=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,ey={...e,token:e.token||e.token_id,budget_duration:ef(e.budget_duration),metadata:(0,$.formatMetadataForDisplay)((0,$.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,$.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,k.useEffect)(()=>{p.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:ef(e.budget_duration),metadata:(0,$.formatMetadataForDisplay)((0,$.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,$.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,p]),(0,k.useEffect)(()=>{p.setFieldValue("auto_rotate",I)},[I,p]),(0,k.useEffect)(()=>{A&&p.setFieldValue("rotation_interval",A)},[A,p]),(0,k.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,E.tagListCall)(n);f(e)}catch(e){O.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eb=async e=>{try{if(en(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}z&&(e.duration=null);let t=eo.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);e.budget_limits=t.length>0?t:void 0,await l(e)}finally{en(!1)}};return(0,t.jsxs)(v.Form,{form:p,onFinish:eb,initialValues:ey,layout:"vertical",children:[(0,t.jsx)(v.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(B.TextInput,{})}),(0,t.jsx)(v.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(v.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",r="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],l=r.includes("management_routes")||r.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(K.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:l,value:l?[]:i,onChange:e=>a("models",e),children:[b.length>0&&(0,t.jsx)(K.Select.Option,{value:"all-team-models",children:"All Team Models"}),b.map(e=>(0,t.jsx)(K.Select.Option,{value:e,children:e},e))]}),l&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(v.Form.Item,{label:"Key Type",children:(0,t.jsx)(v.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let r=e("allowed_routes")||"",l=(s="string"==typeof r&&""!==r.trim()?r.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(K.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:l,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(K.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(K.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(K.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(U.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(v.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(ea.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(v.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(K.Select,{placeholder:"n/a",children:[(0,t.jsx)(K.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(K.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(K.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(U.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)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.BudgetWindowsEditor,{value:eo,onChange:ed})}),(0,t.jsx)(v.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(ea.default,{min:0})}),(0,t.jsx)(J.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(v.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(ea.default,{min:0})}),(0,t.jsx)(J.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(v.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(ea.default,{min:0})}),(0,t.jsx)(v.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(v.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(v.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(D.default,{onChange:e=>{p.setFieldValue("guardrails",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(U.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)(G.Switch,{disabled:!m,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(U.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(R.default,{onChange:e=>{p.setFieldValue("policies",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(v.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(K.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(x).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(v.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(U.Tooltip,{title:u?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(K.Select,{mode:"tags",style:{width:"100%"},disabled:!u,placeholder:u?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:h.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(U.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)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(W.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(v.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(U.Tooltip,{title:u?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(X.default,{onChange:e=>p.setFieldValue("allowed_passthrough_routes",e),value:p.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:u?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!u})})}),(0,t.jsx)(v.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(er.default,{onChange:e=>p.setFieldValue("vector_stores",e),value:p.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(v.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(Z.default,{onChange:e=>p.setFieldValue("mcp_servers_and_groups",e),value:p.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(v.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(v.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)(ee.default,{accessToken:n||"",selectedServers:p.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:p.getFieldValue("mcp_tool_permissions")||{},onChange:e=>p.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(v.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(H.default,{onChange:e=>p.setFieldValue("agents_and_groups",e),value:p.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(v.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(U.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(P.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Q.default,{organizations:ec,loading:eu,disabled:"Admin"!==d,onChange:e=>{T(e||null),p.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(v.Form.Item,{label:"Team ID",name:"team_id",help:eh&&eg?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(K.Select,{placeholder:"Select team",showSearch:!0,disabled:eh&&eg,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(T(t.organization_id),p.setFieldValue("organization_id",t.organization_id)):e||(T(null),p.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=C?i?.filter(e=>e.organization_id===C):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(C?i?.filter(e=>e.organization_id===C):i)?.map(e=>(0,t.jsx)(K.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),eh&&eg&&(0,t.jsx)(v.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(v.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(es.default,{value:p.getFieldValue("logging_settings"),onChange:e=>p.setFieldValue("logging_settings",e),disabledCallbacks:_,onDisabledCallbacksChange:e=>{w((0,S.mapInternalToDisplayNames)(e)),p.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(v.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:p,autoRotationEnabled:I,onAutoRotationChange:M,rotationInterval:A,onRotationIntervalChange:F,neverExpire:z,onNeverExpireChange:el}),(0,t.jsx)(v.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(v.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(v.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(v.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(v.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:ei,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:ei,children:"Save Changes"})]})})]})}let ei=["policies","guardrails","prompts","tags","allowed_passthrough_routes"],en=e=>null==e||Array.isArray(e)&&0===e.length||"string"==typeof e&&""===e.trim();function eo({onClose:e,keyData:D,teams:L,onKeyDataUpdate:R,onDelete:P,backButtonText:B="Back to Keys"}){let V,{accessToken:K,userId:G,userRole:U,premiumUser:H}=(0,a.default)(),W=H||null!=U&&N.rolesWithWriteAccess.includes(U),{teams:q}=(0,l.default)(),{data:X}=(0,s.useProjects)(),{data:J}=(0,r.useUISettings)(),Q=!!J?.values?.enable_projects_ui,[Y,Z]=(0,k.useState)(!1),[ee]=v.Form.useForm(),[et,ea]=(0,k.useState)(!1),[es,er]=(0,k.useState)(!1),[eo,ed]=(0,k.useState)(""),[ec,eu]=(0,k.useState)(!1),[em,ep]=(0,k.useState)(!1),{mutate:eh,isPending:eg}=(0,M.useResetKeySpend)(),[ex,ef]=(0,k.useState)(D),[ey,eb]=(0,k.useState)(null),[ev,ej]=(0,k.useState)(!1),[e_,ew]=(0,k.useState)({}),[ek,eN]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{D&&ef(D)},[D]),(0,k.useEffect)(()=>{(async()=>{let e=ex?.metadata?.policies;if(!K||!e||!Array.isArray(e)||0===e.length)return;eN(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,E.getPolicyInfoWithGuardrails)(K,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ew(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eN(!1)}})()},[K,ex?.metadata?.policies]),(0,k.useEffect)(()=>{if(ev){let e=setTimeout(()=>{ej(!1)},5e3);return()=>clearTimeout(e)}},[ev]),!ex)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:B}),(0,t.jsx)(y.Text,{children:"Key not found"})]});let eS=async e=>{try{if(!K)return;let t=e.token;for(let a of(e.key=t,W||(delete e.guardrails,delete e.prompts),ei)){let t=ex.metadata?.[a]??ex[a];en(e[a])&&en(t)&&delete e[a]}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ex.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a,toolsets:s}=e.mcp_servers_and_groups||{servers:[],accessGroups:[],toolsets:[]};e.object_permission={...ex.object_permission,mcp_servers:t||[],mcp_access_groups:a||[],mcp_toolsets:s||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,S.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),O.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,S.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,E.keyUpdateCall)(K,e);ef(e=>e?{...e,...a}:void 0),R&&R(a),O.default.success("Key updated successfully"),Z(!1)}catch(e){O.default.fromBackend((0,z.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eC=async()=>{try{if(er(!0),!K)return;await (0,E.keyDeleteCall)(K,ex.token||ex.token_id),O.default.success("Key deleted successfully"),P&&P(),e()}catch(e){console.error("Error deleting the key:",e),O.default.fromBackend(e)}finally{er(!1),ea(!1),ed("")}},eT=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},e$=(0,N.isProxyAdminRole)(U||"")||q&&(0,N.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ex.team_id)[0]?.members_with_roles,G||"")||G===ex.user_id&&"Internal Viewer"!==U,eI=(0,N.isProxyAdminRole)(U||"")||q&&(0,N.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ex.team_id)[0]?.members_with_roles,G||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(w.KeyInfoHeader,{data:{keyName:ex.key_alias||"Virtual Key",keyId:ex.token_id||ex.token,userId:ex.user_id||"",userEmail:ex.user_email||"",createdBy:ex.user_email||ex.user_id||"",createdAt:ex.created_at?eT(ex.created_at):"",lastUpdated:ex.updated_at?eT(ex.updated_at):"",lastActive:ex.last_active?eT(ex.last_active):"Never"},onBack:e,onRegenerate:()=>eu(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>ep(!0):void 0,canModifyKey:e$,backButtonText:B,regenerateDisabled:!H,regenerateTooltip:H?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(F.RegenerateKeyModal,{selectedToken:ex,visible:ec,onClose:()=>eu(!1),onKeyUpdate:e=>{ef(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),eb(new Date),ej(!0),R&&R({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(T.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:ex?.key_alias||"-"},{label:"Key ID",value:ex?.token_id||ex?.token||"-",code:!0},{label:"Team ID",value:ex?.team_id||"-",code:!0},{label:"Spend",value:ex?.spend?`$${(0,i.formatNumberWithCommas)(ex.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),ed("")},onOk:eC,confirmLoading:es,requiredConfirmation:ex?.key_alias}),(0,t.jsxs)(j.Modal,{title:"Reset Key Spend",open:em,onOk:()=>{eh(ex.token||ex.token_id,{onSuccess:()=>{ef(e=>e?{...e,spend:0}:void 0),R&&R({spend:0}),O.default.success("Key spend reset to $0"),ep(!1)},onError:e=>{O.default.fromBackend((0,z.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>ep(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:eg,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:ex?.key_alias||ex?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(h.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(p.Tab,{children:"Overview"}),(0,t.jsx)(p.Tab,{children:"Settings"})]}),(0,t.jsxs)(f.TabPanels,{children:[(0,t.jsx)(x.TabPanel,{children:(0,t.jsxs)(m.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(y.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(b.Title,{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)]}),(0,t.jsxs)(y.Text,{children:["of"," ",null!==ex.max_budget?`$${(0,i.formatNumberWithCommas)(ex.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(y.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Text,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(y.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ex.models&&ex.models.length>0?ex.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(y.Text,{children:"No models specified"})})]}),(0,t.jsx)(u.Card,{children:(0,t.jsx)(A.default,{objectPermission:ex.object_permission,variant:"inline",accessToken:K})}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(y.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(ex.metadata?.guardrails)&&ex.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ex.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(y.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof ex.metadata?.disable_global_guardrails&&!0===ex.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(y.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(ex.metadata?.policies)&&ex.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ex.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ek&&(0,t.jsx)(y.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ek&&e_[e]&&e_[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(y.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e_[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(y.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(I.default,{loggingConfigs:(0,$.extractLoggingSettings)(ex.metadata),disabledCallbacks:Array.isArray(ex.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(ex.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(C.default,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(x.TabPanel,{children:(0,t.jsxs)(u.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)(b.Title,{children:"Key Settings"}),!Y&&e$&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),Y?(0,t.jsx)(el,{keyData:ex,onCancel:()=>Z(!1),onSubmit:eS,teams:L,accessToken:K,userID:G,userRole:U,premiumUser:H}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(y.Text,{className:"font-mono",children:ex.token_id||ex.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(y.Text,{children:ex.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(y.Text,{className:"font-mono",children:ex.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(y.Text,{children:ex.team_id||"Not Set"})]}),Q&&(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(y.Text,{children:ex.project_id?(V=X?.find(e=>e.project_id===ex.project_id),V?.project_alias?`${V.project_alias} (${ex.project_id})`:ex.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(y.Text,{children:(ex.organization_id??ex.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(y.Text,{children:eT(ex.created_at)})]}),ey&&(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Text,{children:eT(ey)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(y.Text,{children:ex.expires?eT(ex.expires):"Never"})]}),(0,t.jsx)(C.default,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(y.Text,{children:["$",(0,i.formatNumberWithCommas)(ex.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(y.Text,{children:null!==ex.max_budget?`$${(0,i.formatNumberWithCommas)(ex.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ex.metadata?.tags)&&ex.metadata.tags.length>0?ex.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(y.Text,{children:Array.isArray(ex.metadata?.prompts)&&ex.metadata.prompts.length>0?ex.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ex.allowed_routes)&&ex.allowed_routes.length>0?ex.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(y.Text,{children:Array.isArray(ex.metadata?.allowed_passthrough_routes)&&ex.metadata.allowed_passthrough_routes.length>0?ex.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(y.Text,{children:ex.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ex.models&&ex.models.length>0?ex.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(y.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(y.Text,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Max Parallel Requests:"," ",null!==ex.max_parallel_requests?ex.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Model TPM Limits:"," ",ex.metadata?.model_tpm_limit?JSON.stringify(ex.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Model RPM Limits:"," ",ex.metadata?.model_rpm_limit?JSON.stringify(ex.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,$.formatMetadataForDisplay)((0,$.stripTagsFromMetadata)(ex.metadata))})]}),(0,t.jsx)(A.default,{objectPermission:ex.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:K}),(0,t.jsx)(I.default,{loggingConfigs:(0,$.extractLoggingSettings)(ex.metadata),disabledCallbacks:Array.isArray(ex.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(ex.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>eo],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6665fdc6e86f173a.js b/litellm/proxy/_experimental/out/_next/static/chunks/6665fdc6e86f173a.js deleted file mode 100644 index 66718e8452..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/6665fdc6e86f173a.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,105278,e=>{"use strict";var t=e.i(843476),s=e.i(135214),r=e.i(994388),i=e.i(366283),l=e.i(304967),n=e.i(269200),a=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),p=e.i(560445),m=e.i(464571),g=e.i(808613),h=e.i(311451),_=e.i(212931),x=e.i(770914),f=e.i(653496),y=e.i(898586),j=e.i(271645),v=e.i(844444),S=e.i(700514),b=e.i(727749),I=e.i(764205),w=e.i(629569),T=e.i(599724),C=e.i(350967),k=e.i(779241),E=e.i(114600),N=e.i(237016),O=e.i(596239),F=e.i(438957),A=e.i(166406),P=e.i(270377),M=e.i(475647),B=e.i(190702);let U=({accessToken:e,userID:s,proxySettings:n})=>{let[a]=g.Form.useForm(),[o,c]=(0,j.useState)(!1),[d,u]=(0,j.useState)(null),[p,m]=(0,j.useState)("");(0,j.useEffect)(()=>{let e="";m(e=n&&n.PROXY_BASE_URL&&void 0!==n.PROXY_BASE_URL?n.PROXY_BASE_URL:window.location.origin)},[n]);let h=`${p}/scim/v2`,_=async t=>{if(!e||!s)return void b.default.fromBackend("You need to be logged in to create a SCIM token");try{c(!0);let r={key_alias:t.key_alias||"SCIM Access Token",team_id:null,models:[],allowed_routes:["/scim/*"]},i=await (0,I.keyCreateCall)(e,s,r);u(i),b.default.success("SCIM token created successfully")}catch(e){console.error("Error creating SCIM token:",e),b.default.fromBackend("Failed to create SCIM token: "+(0,B.parseErrorMessage)(e))}finally{c(!1)}};return(0,t.jsx)(C.Grid,{numItems:1,children:(0,t.jsxs)(l.Card,{children:[(0,t.jsx)("div",{className:"flex items-center mb-4",children:(0,t.jsx)(w.Title,{children:"SCIM Configuration"})}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"System for Cross-domain Identity Management (SCIM) allows you to automatically provision and manage users and groups in LiteLLM."}),(0,t.jsx)(E.Divider,{}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"1"}),(0,t.jsxs)(w.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(O.LinkOutlined,{className:"h-5 w-5 mr-2"}),"SCIM Tenant URL"]})]}),(0,t.jsx)(T.Text,{className:"text-gray-600 mb-3",children:"Use this URL in your identity provider SCIM integration settings."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:h,disabled:!0,className:"flex-grow"}),(0,t.jsx)(N.CopyToClipboard,{text:h,onCopy:()=>b.default.success("URL copied to clipboard"),children:(0,t.jsxs)(r.Button,{variant:"primary",className:"ml-2 flex items-center",children:[(0,t.jsx)(A.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"2"}),(0,t.jsxs)(w.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(F.KeyOutlined,{className:"h-5 w-5 mr-2"}),"Authentication Token"]})]}),(0,t.jsx)(i.Callout,{title:"Using SCIM",color:"blue",className:"mb-4",children:"You need a SCIM token to authenticate with the SCIM API. Create one below and use it in your SCIM provider configuration."}),d?(0,t.jsxs)(l.Card,{className:"border border-yellow-300 bg-yellow-50",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-yellow-800",children:[(0,t.jsx)(P.ExclamationCircleOutlined,{className:"h-5 w-5 mr-2"}),(0,t.jsx)(w.Title,{className:"text-lg text-yellow-800",children:"Your SCIM Token"})]}),(0,t.jsx)(T.Text,{className:"text-yellow-800 mb-4 font-medium",children:"Make sure to copy this token now. You will not be able to see it again."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:d.key,className:"flex-grow mr-2 bg-white",type:"password",disabled:!0}),(0,t.jsx)(N.CopyToClipboard,{text:d.key,onCopy:()=>b.default.success("Token copied to clipboard"),children:(0,t.jsxs)(r.Button,{variant:"primary",className:"flex items-center",children:[(0,t.jsx)(A.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]}),(0,t.jsxs)(r.Button,{className:"mt-4 flex items-center",variant:"secondary",onClick:()=>u(null),children:[(0,t.jsx)(M.PlusCircleOutlined,{className:"h-4 w-4 mr-1"}),"Create Another Token"]})]}):(0,t.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,t.jsxs)(g.Form,{form:a,onFinish:_,layout:"vertical",children:[(0,t.jsx)(g.Form.Item,{name:"key_alias",label:"Token Name",rules:[{required:!0,message:"Please enter a name for your token"}],children:(0,t.jsx)(k.TextInput,{placeholder:"SCIM Access Token"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsxs)(r.Button,{variant:"primary",type:"submit",loading:o,className:"flex items-center",children:[(0,t.jsx)(F.KeyOutlined,{className:"h-4 w-4 mr-1"}),"Create SCIM Token"]})})]})})]})]})]})})};var L=e.i(266027),R=e.i(243652);let z=(0,R.createQueryKeys)("sso"),D=()=>{let{accessToken:e,userId:t,userRole:r}=(0,s.default)();return(0,L.useQuery)({queryKey:z.detail("settings"),queryFn:async()=>await (0,I.getSSOSettings)(e),enabled:!!(e&&t&&r)})};var G=e.i(175712),V=e.i(869216),q=e.i(262218),H=e.i(688511),K=e.i(98919),$=e.i(727612);let Q={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},Y={google:"Google SSO",microsoft:"Microsoft SSO",okta:"Okta / Auth0 SSO",generic:"Generic SSO"},W={internal_user_viewer:"Internal Viewer",internal_user:"Internal User",proxy_admin_viewer:"Proxy Admin Viewer",proxy_admin:"Proxy Admin"};var J=e.i(536916),Z=e.i(199133);let X={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},ee=({form:e,onFormSubmit:s})=>(0,t.jsx)("div",{children:(0,t.jsxs)(g.Form,{form:e,onFinish:s,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(g.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(Z.Select,{children:Object.entries(Q).map(([e,s])=>(0,t.jsx)(Z.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,t.jsx)("img",{src:s,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsx)("span",{children:Y[e]||e.charAt(0).toUpperCase()+e.slice(1)+" SSO"})]})},e))})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s,r=e("sso_provider");return r&&(s=X[r])?s.fields.map(e=>(0,t.jsx)(g.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(h.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_role_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsx)(g.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_role_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(Z.Select,{children:[(0,t.jsx)(Z.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Team Mappings",name:"use_team_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_team_mappings!==t.use_team_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_team_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsx)(g.Form.Item,{label:"Team IDs JWT Field",name:"team_ids_jwt_field",rules:[{required:!0,message:"Please enter the team IDs JWT field"}],children:(0,t.jsx)(k.TextInput,{})}):null}})]})});var et=e.i(954616);let es=()=>{let{accessToken:e}=(0,s.default)();return(0,et.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await (0,I.updateSSOSettings)(e,t)}})},er=e=>{let{proxy_admin_teams:t,admin_viewer_teams:s,internal_user_teams:r,internal_viewer_teams:i,default_role:l,group_claim:n,use_role_mappings:a,use_team_mappings:o,team_ids_jwt_field:c,...d}=e,u={...d},p=d.sso_provider;if(a&&("okta"===p||"generic"===p)){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:n,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[l]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(s),internal_user:e(r),internal_user_viewer:e(i)}}}return o&&("okta"===p||"generic"===p)&&(u.team_mappings={team_ids_jwt_field:c}),u},ei=e=>e.google_client_id?"google":e.microsoft_client_id?"microsoft":e.generic_client_id?e.generic_authorization_endpoint?.includes("okta")||e.generic_authorization_endpoint?.includes("auth0")?"okta":"generic":null,el=({isVisible:e,onCancel:s,onSuccess:r})=>{let[i]=g.Form.useForm(),{mutateAsync:l,isPending:n}=es(),a=async e=>{let t=er(e);await l(t,{onSuccess:()=>{b.default.success("SSO settings added successfully"),r()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}})},o=()=>{i.resetFields(),s()};return(0,t.jsx)(_.Modal,{title:"Add SSO",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:o,disabled:n,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:n,onClick:()=>i.submit(),children:n?"Adding...":"Add SSO"})]}),onCancel:o,children:(0,t.jsx)(ee,{form:i,onFormSubmit:a})})};var en=e.i(127952);let ea=({isVisible:e,onCancel:s,onSuccess:r})=>{let{data:i}=D(),{mutateAsync:l,isPending:n}=es(),a=async()=>{await l({google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null,team_mappings:null},{onSuccess:()=>{b.default.success("SSO settings cleared successfully"),s(),r()},onError:e=>{b.default.fromBackend("Failed to clear SSO settings: "+(0,B.parseErrorMessage)(e))}})};return(0,t.jsx)(en.default,{isOpen:e,title:"Confirm Clear SSO Settings",alertMessage:"This action cannot be undone.",message:"Are you sure you want to clear all SSO settings? Users will no longer be able to login using SSO after this change.",resourceInformationTitle:"SSO Settings",resourceInformation:[{label:"Provider",value:i?.values&&ei(i?.values)||"Generic"}],onCancel:s,onOk:a,confirmLoading:n})},eo=({isVisible:e,onCancel:s,onSuccess:r})=>{let[i]=g.Form.useForm(),l=D(),{mutateAsync:n,isPending:a}=es();(0,j.useEffect)(()=>{if(e&&l.data&&l.data.values){let e=l.data;console.log("Raw SSO data received:",e),console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let s={};if(e.values.role_mappings){let t=e.values.role_mappings,r=e=>e&&0!==e.length?e.join(", "):"";s={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:r(t.roles?.proxy_admin),admin_viewer_teams:r(t.roles?.proxy_admin_viewer),internal_user_teams:r(t.roles?.internal_user),internal_viewer_teams:r(t.roles?.internal_user_viewer)}}let r={};e.values.team_mappings&&(r={use_team_mappings:!0,team_ids_jwt_field:e.values.team_mappings.team_ids_jwt_field});let n={sso_provider:t,...e.values,...s,...r};console.log("Setting form values:",n),i.resetFields(),setTimeout(()=>{i.setFieldsValue(n),console.log("Form values set, current form values:",i.getFieldsValue())},100)}},[e,l.data,i]);let o=async e=>{try{let t=er(e);await n(t,{onSuccess:()=>{b.default.success("SSO settings updated successfully"),r()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}})}catch(e){b.default.fromBackend("Failed to process SSO settings: "+(0,B.parseErrorMessage)(e))}},c=()=>{i.resetFields(),s()};return(0,t.jsx)(_.Modal,{title:"Edit SSO Settings",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:c,disabled:a,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:a,onClick:()=>i.submit(),children:a?"Saving...":"Save"})]}),onCancel:c,children:(0,t.jsx)(ee,{form:i,onFormSubmit:o})})};var ec=e.i(286536),ed=e.i(77705);function eu({defaultHidden:e=!0,value:s}){let[r,i]=(0,j.useState)(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-gray-600 flex-1",children:s?r?"•".repeat(s.length):s:(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})}),s&&(0,t.jsx)(m.Button,{type:"text",size:"small",icon:r?(0,t.jsx)(ec.Eye,{className:"w-4 h-4"}):(0,t.jsx)(ed.EyeOff,{className:"w-4 h-4"}),onClick:()=>i(!r),className:"text-gray-400 hover:text-gray-600"})]})}var ep=e.i(312361),em=e.i(291542),eg=e.i(761911);let{Title:eh,Text:e_}=y.Typography;function ex({roleMappings:e}){if(!e)return null;let s=[{title:"Role",dataIndex:"role",key:"role",render:e=>(0,t.jsx)(e_,{strong:!0,children:W[e]})},{title:"Mapped Groups",dataIndex:"groups",key:"groups",render:e=>(0,t.jsx)(t.Fragment,{children:e.length>0?e.map((e,s)=>(0,t.jsx)(q.Tag,{color:"blue",children:e},s)):(0,t.jsx)(e_,{className:"text-gray-400 italic",children:"No groups mapped"})})}];return(0,t.jsxs)(G.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(eg.Users,{className:"w-6 h-6 text-gray-400 mb-2"}),(0,t.jsx)(eh,{level:3,children:"Role Mappings"})]}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eh,{level:5,children:"Group Claim"}),(0,t.jsx)("div",{children:(0,t.jsx)(e_,{code:!0,children:e.group_claim})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eh,{level:5,children:"Default Role"}),(0,t.jsx)("div",{children:(0,t.jsx)(e_,{strong:!0,children:W[e.default_role]})})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(em.Table,{columns:s,dataSource:Object.entries(e.roles).map(([e,t])=>({role:e,groups:t})),pagination:!1,bordered:!0,size:"small",className:"w-full"})]})]})}var ef=e.i(21548);let{Title:ey,Paragraph:ej}=y.Typography;function ev({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(ef.Empty,{image:ef.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ey,{level:4,children:"No SSO Configuration Found"}),(0,t.jsx)(ej,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Single Sign-On (SSO) to enable seamless authentication for your team members using your identity provider."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure SSO"})})})}var eS=e.i(981339);let{Title:eb,Text:eI}=y.Typography;function ew(){return(0,t.jsx)(G.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(K.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eb,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eI,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(eS.Skeleton.Button,{active:!0,size:"default",style:{width:170,height:32}}),(0,t.jsx)(eS.Skeleton.Button,{active:!0,size:"default",style:{width:190,height:32}})]})]}),(0,t.jsxs)(V.Descriptions,{bordered:!0,...{column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},children:[(0,t.jsx)(V.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:100,height:16}})})}),(0,t.jsx)(V.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:200,height:16}})}),(0,t.jsx)(V.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:250,height:16}})}),(0,t.jsx)(V.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:180,height:16}})}),(0,t.jsx)(V.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:220,height:16}})})]})]})})}let{Title:eT,Text:eC}=y.Typography;function ek(){let{data:e,refetch:s,isLoading:r}=D(),[i,l]=(0,j.useState)(!1),[n,a]=(0,j.useState)(!1),[o,c]=(0,j.useState)(!1),d=!!e?.values.google_client_id||!!e?.values.microsoft_client_id||!!e?.values.generic_client_id,u=e?.values?ei(e.values):null,p=!!e?.values.role_mappings,g=!!e?.values.team_mappings,h=e=>(0,t.jsx)(eC,{className:"font-mono text-gray-600 text-sm",copyable:!!e,children:e||"-"}),_=e=>e||(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),f=e=>e.team_mappings?.team_ids_jwt_field?(0,t.jsx)(q.Tag,{children:e.team_mappings.team_ids_jwt_field}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),y={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},v={google:{providerText:Y.google,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.google_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.google_client_secret})},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)}]},microsoft:{providerText:Y.microsoft,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.microsoft_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.microsoft_client_secret})},{label:"Tenant",render:e=>_(e.microsoft_tenant)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)}]},okta:{providerText:Y.okta,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>h(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>h(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>h(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)},g?{label:"Team IDs JWT Field",render:e=>f(e)}:null]},generic:{providerText:Y.generic,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>h(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>h(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>h(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)},g?{label:"Team IDs JWT Field",render:e=>f(e)}:null]}};return(0,t.jsxs)(t.Fragment,{children:[r?(0,t.jsx)(ew,{}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(G.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(K.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eT,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eC,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(H.Edit,{className:"w-4 h-4"}),onClick:()=>c(!0),children:"Edit SSO Settings"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)($.Trash2,{className:"w-4 h-4"}),onClick:()=>l(!0),children:"Delete SSO Settings"})]})})]}),d?(()=>{if(!e?.values||!u)return null;let{values:s}=e,r=v[u];return r?(0,t.jsxs)(V.Descriptions,{bordered:!0,...y,children:[(0,t.jsx)(V.Descriptions.Item,{label:"Provider",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Q[u]&&(0,t.jsx)("img",{src:Q[u],alt:u,style:{height:24,width:24,objectFit:"contain"}}),(0,t.jsx)("span",{children:r.providerText})]})}),r.fields.map((e,r)=>e&&(0,t.jsx)(V.Descriptions.Item,{label:e.label,children:e.render(s)},r))]}):null})():(0,t.jsx)(ev,{onAdd:()=>a(!0)})]})}),p&&(0,t.jsx)(ex,{roleMappings:e?.values.role_mappings})]}),(0,t.jsx)(ea,{isVisible:i,onCancel:()=>l(!1),onSuccess:()=>s()}),(0,t.jsx)(el,{isVisible:n,onCancel:()=>a(!1),onSuccess:()=>{a(!1),s()}}),(0,t.jsx)(eo,{isVisible:o,onCancel:()=>c(!1),onSuccess:()=>{c(!1),s()}})]})}var eE=e.i(292639),eN=e.i(912598);let eO=(0,R.createQueryKeys)("uiSettings");var eF=e.i(111672);let eA={"api-keys":"Manage virtual keys for API access and authentication","llm-playground":"Interactive playground for testing LLM requests",models:"Configure and manage LLM models and endpoints",agents:"Create and manage AI agents","mcp-servers":"Configure Model Context Protocol servers",memory:"Inspect and manage agent memory entries stored under /v1/memory",guardrails:"Set up content moderation and safety guardrails",policies:"Define access control and usage policies","search-tools":"Configure RAG search and retrieval tools","tool-policies":"Configure tool use policies and permissions","vector-stores":"Manage vector databases for embeddings",new_usage:"View usage analytics and metrics",logs:"Access request and response logs","guardrails-monitor":"Monitor guardrail performance and view logs",users:"Manage internal user accounts and permissions",teams:"Create and manage teams for access control",organizations:"Manage organizations and their members",projects:"Manage projects within teams","access-groups":"Manage access groups for role-based permissions",budgets:"Set and monitor spending budgets","api-reference":"Browse API documentation and endpoints","model-hub-table":"Explore available AI models and providers","learning-resources":"Access tutorials and documentation",caching:"Configure response caching settings","transform-request":"Set up request transformation rules","cost-tracking":"Track and analyze API costs","ui-theme":"Customize dashboard appearance","tag-management":"Organize resources with tags",prompts:"Manage and version prompt templates",skills:"Browse and manage Claude Code skills",usage:"View legacy usage dashboard","router-settings":"Configure routing and load balancing settings","logging-and-alerts":"Set up logging and alert configurations","admin-panel":"Access admin panel and settings"};var eP=e.i(708347);let eM=e=>!e||0===e.length||e.some(e=>eP.internalUserRoles.includes(e));var eB=e.i(362024);function eU({enabledPagesInternalUsers:e,enabledPagesPropertyDescription:s,isUpdating:r,onUpdate:i}){let l=null!=e,n=(0,j.useMemo)(()=>{let e;return e=[],eF.menuGroups.forEach(t=>{t.items.forEach(s=>{if(s.page&&"tools"!==s.page&&"experimental"!==s.page&&"settings"!==s.page&&eM(s.roles)){let r="string"==typeof s.label?s.label:s.key;e.push({page:s.page,label:r,group:t.groupLabel,description:eA[s.page]||"No description available"})}if(s.children){let r="string"==typeof s.label?s.label:s.key;s.children.forEach(s=>{if(eM(s.roles)){let i="string"==typeof s.label?s.label:s.key;e.push({page:s.page,label:i,group:`${t.groupLabel} > ${r}`,description:eA[s.page]||"No description available"})}})}})}),e},[]),a=(0,j.useMemo)(()=>{let e={};return n.forEach(t=>{e[t.group]||(e[t.group]=[]),e[t.group].push(t)}),e},[n]),[o,c]=(0,j.useState)(e||[]);return(0,j.useMemo)(()=>{e?c(e):c([])},[e]),(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsxs)(x.Space,{align:"center",children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Internal User Page Visibility"}),!l&&(0,t.jsx)(q.Tag,{color:"default",style:{marginLeft:"8px"},children:"Not set (all pages visible)"}),l&&(0,t.jsxs)(q.Tag,{color:"blue",style:{marginLeft:"8px"},children:[o.length," page",1!==o.length?"s":""," selected"]})]}),s&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:s}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"By default, all pages are visible to internal users. Select specific pages to restrict visibility."}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",color:"#8b5cf6"},children:"Note: Only pages accessible to internal user roles are shown here. Admin-only pages are excluded as they cannot be made visible to internal users regardless of this setting."})]}),(0,t.jsx)(eB.Collapse,{items:[{key:"page-visibility",label:"Configure Page Visibility",children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(J.Checkbox.Group,{value:o,onChange:c,style:{width:"100%"},children:(0,t.jsx)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:Object.entries(a).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Typography.Text,{strong:!0,style:{fontSize:"11px",color:"#6b7280",letterSpacing:"0.05em",display:"block",marginBottom:"8px"},children:e}),(0,t.jsx)(x.Space,{direction:"vertical",size:"small",style:{marginLeft:"16px",width:"100%"},children:s.map(e=>(0,t.jsx)("div",{style:{marginBottom:"4px"},children:(0,t.jsx)(J.Checkbox,{value:e.page,children:(0,t.jsxs)(x.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(y.Typography.Text,{children:e.label}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px"},children:e.description})]})})},e.page))})]},e))})}),(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{type:"primary",onClick:()=>{i({enabled_ui_pages_internal_users:o.length>0?o:null})},loading:r,disabled:r,children:"Save Page Visibility Settings"}),l&&(0,t.jsx)(m.Button,{onClick:()=>{c([]),i({enabled_ui_pages_internal_users:null})},loading:r,disabled:r,children:"Reset to Default (All Pages)"})]})]})}]})]})}var eL=e.i(790848);function eR(){let e,{accessToken:r}=(0,s.default)(),{data:i,isLoading:l,isError:n,error:a}=(0,eE.useUISettings)(),{mutate:o,isPending:c,error:d}=(e=(0,eN.useQueryClient)(),(0,et.useMutation)({mutationFn:async e=>{if(!r)throw Error("Access token is required");return(0,I.updateUiSettings)(r,e)},onSuccess:()=>{e.invalidateQueries({queryKey:eO.all})}})),u=i?.field_schema,m=u?.properties?.disable_model_add_for_internal_users,g=u?.properties?.disable_team_admin_delete_team_user,h=u?.properties?.require_auth_for_public_ai_hub,_=u?.properties?.forward_client_headers_to_llm_api,f=u?.properties?.forward_llm_provider_auth_headers,j=u?.properties?.enable_projects_ui,v=u?.properties?.enabled_ui_pages_internal_users,S=u?.properties?.disable_agents_for_internal_users,w=u?.properties?.allow_agents_for_team_admins,T=u?.properties?.disable_vector_stores_for_internal_users,C=u?.properties?.allow_vector_stores_for_team_admins,k=u?.properties?.scope_user_search_to_org,E=u?.properties?.disable_custom_api_keys,N=i?.values??{},O=!!N.disable_model_add_for_internal_users,F=!!N.disable_team_admin_delete_team_user,A=!!N.disable_agents_for_internal_users,P=!!N.disable_vector_stores_for_internal_users;return(0,t.jsx)(G.Card,{title:"UI Settings",children:l?(0,t.jsx)(eS.Skeleton,{active:!0}):n?(0,t.jsx)(p.Alert,{type:"error",message:"Could not load UI settings",description:a instanceof Error?a.message:void 0}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[u?.description&&(0,t.jsx)(y.Typography.Paragraph,{style:{marginBottom:0},children:u.description}),d&&(0,t.jsx)(p.Alert,{type:"error",message:"Could not update UI settings",description:d instanceof Error?d.message:void 0}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:O,disabled:c,loading:c,onChange:e=>{o({disable_model_add_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":m?.description??"Disable model add for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable model add for internal users"}),m?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:m.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:F,disabled:c,loading:c,onChange:e=>{o({disable_team_admin_delete_team_user:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":g?.description??"Disable team admin delete team user"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable team admin delete team user"}),g?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:g.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:N.require_auth_for_public_ai_hub,disabled:c,loading:c,onChange:e=>{o({require_auth_for_public_ai_hub:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":h?.description??"Require authentication for public AI Hub"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Require authentication for public AI Hub"}),h?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:h.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:!!N.forward_client_headers_to_llm_api,disabled:c,loading:c,onChange:e=>{o({forward_client_headers_to_llm_api:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":_?.description??"Forward client headers to LLM API"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Forward client headers to LLM API"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:_?.description??"Forwards client headers (Authorization, anthropic-beta, and x-* custom headers) to the upstream LLM. Enable for Claude Code with a Max subscription (forwards the OAuth token) or to pass custom/tracing headers through to the provider. Independent of the BYOK toggle — enable only the one(s) you need."})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:!!N.forward_llm_provider_auth_headers,disabled:c,loading:c,onChange:e=>{o({forward_llm_provider_auth_headers:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":f?.description??"Forward LLM provider auth headers"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Forward LLM provider auth headers"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:f?.description??"Forwards provider auth headers (x-api-key, x-goog-api-key, api-key, ocp-apim-subscription-key) to the upstream LLM, overriding any deployment-configured key for that request. Enable for Claude Code BYOK (clients bring their own API key). Independent of the client-headers toggle — enable only the one(s) you need."})]})]}),j&&(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:!!N.enable_projects_ui,disabled:c,loading:c,onChange:e=>{o({enable_projects_ui:e},{onSuccess:()=>{b.default.success("UI settings updated successfully. Refreshing page..."),setTimeout(()=>window.location.reload(),1e3)},onError:e=>{b.default.fromBackend(e)}})},"aria-label":j.description??"Enable Projects UI"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"[BETA] Enable Projects (page will refresh)"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:j.description??"If enabled, shows the Projects feature in the UI sidebar and the project field in key management."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:A,disabled:c,loading:c,onChange:e=>{o({disable_agents_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":S?.description??"Disable agents for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable agents for internal users"}),S?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:S.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(eL.Switch,{checked:!!N.allow_agents_for_team_admins,disabled:c||!A,loading:c,onChange:e=>{o({allow_agents_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":w?.description??"Allow agents for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:A?void 0:"secondary",children:"Allow agents for team admins"}),w?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:w.description})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:P,disabled:c,loading:c,onChange:e=>{o({disable_vector_stores_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":T?.description??"Disable vector stores for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable vector stores for internal users"}),T?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:T.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(eL.Switch,{checked:!!N.allow_vector_stores_for_team_admins,disabled:c||!P,loading:c,onChange:e=>{o({allow_vector_stores_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":C?.description??"Allow vector stores for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:P?void 0:"secondary",children:"Allow vector stores for team admins"}),C?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:C.description})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:!!N.scope_user_search_to_org,disabled:c,loading:c,onChange:e=>{o({scope_user_search_to_org:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":k?.description??"Scope user search to organization"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Scope user search to organization"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:k?.description??"If enabled, the user search endpoint restricts results by organization. When off, any authenticated user can search all users."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:!!N.disable_custom_api_keys,disabled:c,loading:c,onChange:e=>{o({disable_custom_api_keys:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":E?.description??"Disable custom Virtual key values"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable custom Virtual key values"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:E?.description??"If true, users cannot specify custom key values. All keys must be auto-generated."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(eU,{enabledPagesInternalUsers:N.enabled_ui_pages_internal_users,enabledPagesPropertyDescription:v?.description,isUpdating:c,onUpdate:e=>{o(e,{onSuccess:()=>{b.default.success("Page visibility settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})}})]})})}let ez=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",r=await fetch(s,{method:"GET",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eD=async(e,t)=>{let s=(0,I.getProxyBaseUrl)(),r=s?`${s}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",i=await fetch(r,{method:"POST",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok){let e=await i.json();throw Error((0,I.deriveErrorMessage)(e))}return await i.json()},eG=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",r=await fetch(s,{method:"DELETE",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eV=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault/test_connection`:"/config_overrides/hashicorp_vault/test_connection",r=await fetch(s,{method:"POST",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eq=(0,R.createQueryKeys)("hashicorpVaultConfig"),eH=()=>{let{accessToken:e}=(0,s.default)();return(0,L.useQuery)({queryKey:eq.list({}),queryFn:async()=>{if(!e)throw Error("Access token is required");return ez(e)},enabled:!!e,staleTime:36e5,gcTime:36e5})},eK=e=>{let t=(0,eN.useQueryClient)();return(0,et.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return eD(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:eq.all})}})};var e$=e.i(525720),eQ=e.i(475254);let eY=(0,eQ.default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]),eW=(0,eQ.default)("plug-zap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]),eJ=new Set(["vault_token","approle_secret_id","client_key"]),eZ={vault_addr:"Vault Address",vault_namespace:"Namespace",vault_mount_name:"KV Mount Name",vault_path_prefix:"Path Prefix",vault_token:"Token",approle_role_id:"Role ID",approle_secret_id:"Secret ID",approle_mount_path:"Mount Path",client_cert:"Client Certificate",client_key:"Client Key",vault_cert_role:"Certificate Role"},eX=[{title:"Connection",fields:["vault_addr","vault_namespace","vault_mount_name","vault_path_prefix"]},{title:"Token Authentication",subtitle:"Use a Vault token to authenticate. Only one auth method is required.",fields:["vault_token"]},{title:"AppRole Authentication",subtitle:"Use AppRole credentials to authenticate. Only one auth method is required.",fields:["approle_role_id","approle_secret_id","approle_mount_path"]},{title:"TLS",subtitle:"Optional client certificate for mTLS.",fields:["client_cert","client_key","vault_cert_role"]}],e0=({isVisible:e,onCancel:r,onSuccess:i})=>{let[l]=g.Form.useForm(),{accessToken:n}=(0,s.default)(),{data:a}=eH(),{mutate:o,isPending:c}=eK(n),d=a?.field_schema,u=d?.properties??{},p=a?.values??{};(0,j.useEffect)(()=>{if(e&&a){l.resetFields();let e={};for(let[t,s]of Object.entries(p))eJ.has(t)||(e[t]=s);l.setFieldsValue(e)}},[e,a,l]);let f=()=>{l.resetFields(),r()},v=e=>{let s=u[e];if(!s)return null;let r="vault_addr"===e?[{pattern:/^https?:\/\/.+/,message:"Must start with http:// or https://"}]:void 0,i=eJ.has(e),l=p[e],n=i&&null!=l&&""!==l?`Leave blank to keep existing (${l})`:s?.description;return(0,t.jsx)(g.Form.Item,{name:e,label:eZ[e]??e,rules:r,children:i?(0,t.jsx)(h.Input.Password,{placeholder:n}):(0,t.jsx)(h.Input,{placeholder:s?.description})},e)};return(0,t.jsx)(_.Modal,{title:"Edit Hashicorp Vault Configuration",open:e,width:700,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:f,disabled:c,children:"Cancel"}),(0,t.jsx)(m.Button,{type:"primary",loading:c,onClick:()=>l.submit(),children:c?"Saving...":"Save"})]}),onCancel:f,children:(0,t.jsx)(g.Form,{form:l,layout:"vertical",onFinish:e=>{let t={};for(let[s,r]of Object.entries(e))null!=r&&""!==r?t[s]=r:eJ.has(s)||(t[s]="");o(t,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration updated successfully"),i()},onError:e=>{b.default.fromBackend(e)}})},children:eX.map((e,s)=>(0,t.jsxs)("div",{children:[s>0&&(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(y.Typography.Title,{level:5,style:{marginBottom:4},children:e.title}),e.subtitle&&(0,t.jsx)(y.Typography.Paragraph,{type:"secondary",style:{marginBottom:16},children:e.subtitle}),e.fields.map(v)]},e.title))})})},{Title:e1,Paragraph:e4}=y.Typography;function e2({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(ef.Empty,{image:ef.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(e1,{level:4,children:"No Vault Configuration Found"}),(0,t.jsx)(e4,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Hashicorp Vault to securely manage provider API keys and secrets for your LiteLLM deployment."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure Vault"})})})}let{Title:e6,Text:e5}=y.Typography,e3={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}};function e8(){let e,{accessToken:r}=(0,s.default)(),{data:i,isLoading:l,isError:n,error:a}=eH(),{mutate:o,isPending:c}=(e=(0,eN.useQueryClient)(),(0,et.useMutation)({mutationFn:async()=>{if(!r)throw Error("Access token is required");return eG(r)},onSuccess:()=>{e.invalidateQueries({queryKey:eq.all})}})),{mutate:d,isPending:u}=eK(r),[g,h]=(0,j.useState)(!1),[_,f]=(0,j.useState)(!1),[v,S]=(0,j.useState)(null),[I,w]=(0,j.useState)(!1),T=i?.values??{},C=!!T.vault_addr,k=async()=>{if(r){w(!0);try{let e=await eV(r);b.default.success(e.message||"Connection to Vault successful!")}catch(e){b.default.fromBackend(e)}finally{w(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(G.Card,{children:(0,t.jsx)(eS.Skeleton,{active:!0})}):n?(0,t.jsx)(G.Card,{children:(0,t.jsx)(p.Alert,{type:"error",message:"Could not load Hashicorp Vault configuration",description:a instanceof Error?a.message:void 0})}):(0,t.jsx)(G.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)(e$.Flex,{justify:"space-between",align:"center",children:[(0,t.jsxs)(e$.Flex,{align:"center",gap:12,children:[(0,t.jsx)(eY,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(e6,{level:3,style:{marginBottom:0},children:"Hashicorp Vault"}),(0,t.jsx)(e5,{type:"secondary",children:"Manage secret manager configuration"})]})]}),(0,t.jsx)(x.Space,{children:C&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(eW,{className:"w-4 h-4"}),loading:I,onClick:k,children:"Test Connection"}),(0,t.jsx)(m.Button,{icon:(0,t.jsx)(H.Edit,{className:"w-4 h-4"}),onClick:()=>h(!0),children:"Edit Configuration"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)($.Trash2,{className:"w-4 h-4"}),onClick:()=>f(!0),children:"Delete Configuration"})]})})]}),C&&(0,t.jsx)(p.Alert,{type:"info",showIcon:!0,message:'Secrets must be stored with the field name "key"',description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e5,{code:!0,children:"vault kv put secret/SECRET_NAME key=secret_value"}),(0,t.jsx)("br",{}),(0,t.jsx)(y.Typography.Link,{href:"https://docs.litellm.ai/docs/secret_managers/hashicorp_vault",target:"_blank",children:"View documentation"})]})}),C?(()=>{let e=Object.entries(T).filter(([e,t])=>null!=t&&""!==t);return 0===e.length?null:(0,t.jsxs)(V.Descriptions,{bordered:!0,...e3,children:[(0,t.jsx)(V.Descriptions.Item,{label:"Auth Method",children:(0,t.jsx)(e5,{children:T.approle_role_id||T.approle_secret_id?"AppRole":T.client_cert&&T.client_key?"TLS Certificate":T.vault_token?"Token":"None"})}),e.map(([e])=>{let s;return(0,t.jsx)(V.Descriptions.Item,{label:eZ[e]??e,children:(s=T[e])?eJ.has(e)?(0,t.jsxs)(e$.Flex,{justify:"space-between",align:"center",children:[(0,t.jsx)(e5,{className:"font-mono text-gray-600",children:s}),(0,t.jsx)(m.Button,{type:"text",size:"small",danger:!0,icon:(0,t.jsx)($.Trash2,{className:"w-3.5 h-3.5"}),onClick:()=>S(e)})]}):(0,t.jsx)(e5,{className:"font-mono text-gray-600",children:s}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})},e)})]})})():(0,t.jsx)(e2,{onAdd:()=>h(!0)})]})}),(0,t.jsx)(e0,{isVisible:g,onCancel:()=>h(!1),onSuccess:()=>h(!1)}),(0,t.jsx)(en.default,{isOpen:_,title:"Delete Hashicorp Vault Configuration?",message:"Models using Vault secrets will lose access to their API keys until a new configuration is saved.",resourceInformationTitle:"Vault Configuration",resourceInformation:[{label:"Vault Address",value:T.vault_addr}],onCancel:()=>f(!1),onOk:()=>{o(void 0,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration deleted"),f(!1)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:c}),(0,t.jsx)(en.default,{isOpen:null!==v,title:`Clear ${v?eZ[v]??v:""}?`,message:"This will remove the stored value.",resourceInformationTitle:"Field",resourceInformation:[{label:"Field",value:v?eZ[v]??v:""}],onCancel:()=>S(null),onOk:()=>{v&&d({[v]:""},{onSuccess:()=>{b.default.success(`${eZ[v]??v} cleared`),S(null)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:u})]})}let e7={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},e9={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},te=({isAddSSOModalVisible:e,isInstructionsModalVisible:s,handleAddSSOOk:r,handleAddSSOCancel:i,handleShowInstructions:l,handleInstructionsOk:n,handleInstructionsCancel:a,form:o,accessToken:c,ssoConfigured:d=!1})=>{let[u,p]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e&&c)try{let e=await (0,I.getSSOSettings)(c);if(console.log("Raw SSO data received:",e),e&&e.values){console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let s={};if(e.values.role_mappings){let t=e.values.role_mappings,r=e=>e&&0!==e.length?e.join(", "):"";s={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:r(t.roles?.proxy_admin),admin_viewer_teams:r(t.roles?.proxy_admin_viewer),internal_user_teams:r(t.roles?.internal_user),internal_viewer_teams:r(t.roles?.internal_user_viewer)}}let r={sso_provider:t,proxy_base_url:e.values.proxy_base_url,user_email:e.values.user_email,...e.values,...s};console.log("Setting form values:",r),o.resetFields(),setTimeout(()=>{o.setFieldsValue(r),console.log("Form values set, current form values:",o.getFieldsValue())},100)}}catch(e){console.error("Failed to load SSO settings:",e)}})()},[e,c,o]);let x=async e=>{if(!c)return void b.default.fromBackend("No access token available");try{let{proxy_admin_teams:t,admin_viewer_teams:s,internal_user_teams:r,internal_viewer_teams:i,default_role:n,group_claim:a,use_role_mappings:o,...d}=e,u={...d};if(o){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:a,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[n]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(s),internal_user:e(r),internal_user_viewer:e(i)}}}await (0,I.updateSSOSettings)(c,u),l(e)}catch(e){b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}},f=async()=>{if(!c)return void b.default.fromBackend("No access token available");try{await (0,I.updateSSOSettings)(c,{google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null}),o.resetFields(),p(!1),r(),b.default.success("SSO settings cleared successfully")}catch(e){console.error("Failed to clear SSO settings:",e),b.default.fromBackend("Failed to clear SSO settings")}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.Modal,{title:d?"Edit SSO Settings":"Add SSO",open:e,width:800,footer:null,onOk:r,onCancel:i,children:(0,t.jsxs)(g.Form,{form:o,onFinish:x,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(Z.Select,{children:Object.entries(e7).map(([e,s])=>(0,t.jsx)(Z.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,t.jsx)("img",{src:s,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsxs)("span",{children:["okta"===e.toLowerCase()?"Okta / Auth0":e.charAt(0).toUpperCase()+e.slice(1)," ","SSO"]})]})},e))})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s,r=e("sso_provider");return r&&(s=e9[r])?s.fields.map(e=>(0,t.jsx)(g.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(h.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsx)(g.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(Z.Select,{children:[(0,t.jsx)(Z.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null})]}),(0,t.jsxs)("div",{style:{textAlign:"right",marginTop:"10px",display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px"},children:[d&&(0,t.jsx)(m.Button,{onClick:()=>p(!0),style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#5558eb",e.currentTarget.style.borderColor="#5558eb"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1",e.currentTarget.style.borderColor="#6366f1"},children:"Clear"}),(0,t.jsx)(m.Button,{htmlType:"submit",children:"Save"})]})]})}),(0,t.jsxs)(_.Modal,{title:"Confirm Clear SSO Settings",open:u,onOk:f,onCancel:()=>p(!1),okText:"Yes, Clear",cancelText:"Cancel",okButtonProps:{danger:!0,style:{backgroundColor:"#dc2626",borderColor:"#dc2626"}},children:[(0,t.jsx)("p",{children:"Are you sure you want to clear all SSO settings? This action cannot be undone."}),(0,t.jsx)("p",{children:"Users will no longer be able to login using SSO after this change."})]}),(0,t.jsxs)(_.Modal,{title:"SSO Setup Instructions",open:s,width:800,footer:null,onOk:n,onCancel:a,children:[(0,t.jsx)("p",{children:"Follow these steps to complete the SSO setup:"}),(0,t.jsx)(T.Text,{className:"mt-2",children:"1. DO NOT Exit this TAB"}),(0,t.jsx)(T.Text,{className:"mt-2",children:"2. Open a new tab, visit your proxy base url"}),(0,t.jsx)(T.Text,{className:"mt-2",children:"3. Confirm your SSO is configured correctly and you can login on the new Tab"}),(0,t.jsx)(T.Text,{className:"mt-2",children:"4. If Step 3 is successful, you can close this tab"}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(m.Button,{onClick:n,children:"Done"})})]})]})},tt=({accessToken:e,onSuccess:s})=>{let[r]=g.Form.useForm(),[i,l]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e)try{let t=await (0,I.getSSOSettings)(e);if(t&&t.values){let e=t.values.ui_access_mode,s={};e&&"object"==typeof e?s={ui_access_mode_type:e.type,restricted_sso_group:e.restricted_sso_group,sso_group_jwt_field:e.sso_group_jwt_field}:"string"==typeof e&&(s={ui_access_mode_type:e,restricted_sso_group:t.values.restricted_sso_group,sso_group_jwt_field:t.values.team_ids_jwt_field||t.values.sso_group_jwt_field}),r.setFieldsValue(s)}}catch(e){console.error("Failed to load UI access settings:",e)}})()},[e,r]);let n=async t=>{if(!e)return void b.default.fromBackend("No access token available");l(!0);try{let r;r="all_authenticated_users"===t.ui_access_mode_type?{ui_access_mode:"none"}:{ui_access_mode:{type:t.ui_access_mode_type,restricted_sso_group:t.restricted_sso_group,sso_group_jwt_field:t.sso_group_jwt_field}},await (0,I.updateSSOSettings)(e,r),s()}catch(e){console.error("Failed to save UI access settings:",e),b.default.fromBackend("Failed to save UI access settings")}finally{l(!1)}};return(0,t.jsxs)("div",{style:{padding:"16px"},children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},children:(0,t.jsx)(T.Text,{style:{fontSize:"14px",color:"#6b7280"},children:"Configure who can access the UI interface and how group information is extracted from JWT tokens."})}),(0,t.jsxs)(g.Form,{form:r,onFinish:n,layout:"vertical",children:[(0,t.jsx)(g.Form.Item,{label:"UI Access Mode",name:"ui_access_mode_type",tooltip:"Controls who can access the UI interface",children:(0,t.jsxs)(Z.Select,{placeholder:"Select access mode",children:[(0,t.jsx)(Z.Select.Option,{value:"all_authenticated_users",children:"All Authenticated Users"}),(0,t.jsx)(Z.Select.Option,{value:"restricted_sso_group",children:"Restricted SSO Group"})]})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.ui_access_mode_type!==t.ui_access_mode_type,children:({getFieldValue:e})=>"restricted_sso_group"===e("ui_access_mode_type")?(0,t.jsx)(g.Form.Item,{label:"Restricted SSO Group",name:"restricted_sso_group",rules:[{required:!0,message:"Please enter the restricted SSO group"}],children:(0,t.jsx)(k.TextInput,{placeholder:"ui-access-group"})}):null}),(0,t.jsx)(g.Form.Item,{label:"SSO Group JWT Field",name:"sso_group_jwt_field",tooltip:"JWT field name that contains team/group information. Use dot notation to access nested fields.",children:(0,t.jsx)(k.TextInput,{placeholder:"groups"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"16px"},children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:i,style:{backgroundColor:"#6366f1",borderColor:"#6366f1"},children:"Update UI Access Control"})})]})]})},{Title:ts,Paragraph:tr,Text:ti}=y.Typography;e.s(["default",0,({proxySettings:e})=>{let{premiumUser:y,accessToken:w,userId:T}=(0,s.default)(),[C]=g.Form.useForm(),[k,E]=(0,j.useState)(!1),[N,O]=(0,j.useState)(!1),[F,A]=(0,j.useState)(!1),[P,M]=(0,j.useState)(!1),[B,L]=(0,j.useState)(!1),[R,z]=(0,j.useState)(!1),[D,G]=(0,j.useState)([]),[V,q]=(0,j.useState)(null),[H,K]=(0,j.useState)(!1),$=(0,S.useBaseUrl)(),Q="All IP Addresses Allowed",Y=$;Y+="/fallback/login";let W=async()=>{if(w)try{let e=await (0,I.getSSOSettings)(w);if(e&&e.values){let t=e.values.google_client_id&&e.values.google_client_secret,s=e.values.microsoft_client_id&&e.values.microsoft_client_secret,r=e.values.generic_client_id&&e.values.generic_client_secret;K(t||s||r)}else K(!1)}catch(e){console.error("Error checking SSO configuration:",e),K(!1)}},J=async()=>{try{if(!0!==y)return void b.default.fromBackend("This feature is only available for premium users. Please upgrade your account.");if(w){let e=await (0,I.getAllowedIPs)(w);G(e&&e.length>0?e:[Q])}else G([Q])}catch(e){console.error("Error fetching allowed IPs:",e),b.default.fromBackend(`Failed to fetch allowed IPs ${e}`),G([Q])}finally{!0===y&&A(!0)}},Z=async e=>{try{if(w){await (0,I.addAllowedIP)(w,e.ip);let t=await (0,I.getAllowedIPs)(w);G(t),b.default.success("IP address added successfully")}}catch(e){console.error("Error adding IP:",e),b.default.fromBackend(`Failed to add IP address ${e}`)}finally{M(!1)}},X=async e=>{q(e),L(!0)},ee=async()=>{if(V&&w)try{await (0,I.deleteAllowedIP)(w,V);let e=await (0,I.getAllowedIPs)(w);G(e.length>0?e:[Q]),b.default.success("IP address deleted successfully")}catch(e){console.error("Error deleting IP:",e),b.default.fromBackend(`Failed to delete IP address ${e}`)}finally{L(!1),q(null)}};(0,j.useEffect)(()=>{W()},[w,y,W]);let et=()=>{z(!1)},es=[{key:"sso-settings",label:"SSO Settings",children:(0,t.jsx)(ek,{})},{key:"security-settings",label:"Security Settings",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(ts,{level:4,children:" ✨ Security Settings"}),(0,t.jsx)(p.Alert,{message:"SSO Configuration Deprecated",description:"Editing SSO Settings on this page is deprecated and will be removed in a future version. Please use the SSO Settings tab for SSO configuration.",type:"warning",showIcon:!0}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",marginTop:"1rem",marginLeft:"0.5rem"},children:[(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:()=>E(!0),children:H?"Edit SSO Settings":"Add SSO"})}),(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:J,children:"Allowed IPs"})}),(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:()=>!0===y?z(!0):b.default.fromBackend("Only premium users can configure UI access control"),children:"UI Access Control"})})]})]}),(0,t.jsxs)("div",{className:"flex justify-start mb-4",children:[(0,t.jsx)(te,{isAddSSOModalVisible:k,isInstructionsModalVisible:N,handleAddSSOOk:()=>{E(!1),C.resetFields(),w&&y&&W()},handleAddSSOCancel:()=>{E(!1),C.resetFields()},handleShowInstructions:e=>{E(!1),O(!0)},handleInstructionsOk:()=>{O(!1),w&&y&&W()},handleInstructionsCancel:()=>{O(!1),w&&y&&W()},form:C,accessToken:w,ssoConfigured:H}),(0,t.jsx)(_.Modal,{title:"Manage Allowed IP Addresses",width:800,open:F,onCancel:()=>A(!1),footer:[(0,t.jsx)(r.Button,{className:"mx-1",onClick:()=>M(!0),children:"Add IP Address"},"add"),(0,t.jsx)(r.Button,{onClick:()=>A(!1),children:"Close"},"close")],children:(0,t.jsxs)(n.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"IP Address"}),(0,t.jsx)(d.TableHeaderCell,{className:"text-right",children:"Action"})]})}),(0,t.jsx)(a.TableBody,{children:D.map((e,s)=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e}),(0,t.jsx)(o.TableCell,{className:"text-right",children:e!==Q&&(0,t.jsx)(r.Button,{onClick:()=>X(e),color:"red",size:"xs",children:"Delete"})})]},s))})]})}),(0,t.jsx)(_.Modal,{title:"Add Allowed IP Address",open:P,onCancel:()=>M(!1),footer:null,children:(0,t.jsxs)(g.Form,{onFinish:Z,children:[(0,t.jsx)(g.Form.Item,{name:"ip",rules:[{required:!0,message:"Please enter an IP address"}],children:(0,t.jsx)(h.Input,{placeholder:"Enter IP address"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{htmlType:"submit",children:"Add IP Address"})})]})}),(0,t.jsx)(_.Modal,{title:"Confirm Delete",open:B,onCancel:()=>L(!1),onOk:ee,footer:[(0,t.jsx)(r.Button,{className:"mx-1",onClick:()=>ee(),children:"Yes"},"delete"),(0,t.jsx)(r.Button,{onClick:()=>L(!1),children:"Close"},"close")],children:(0,t.jsxs)(ti,{children:["Are you sure you want to delete the IP address: ",V,"?"]})}),(0,t.jsx)(_.Modal,{title:"UI Access Control Settings",open:R,width:600,footer:null,onOk:et,onCancel:()=>{z(!1)},children:(0,t.jsx)(tt,{accessToken:w,onSuccess:()=>{et(),b.default.success("UI Access Control settings updated successfully")}})})]}),(0,t.jsxs)(i.Callout,{title:"Login without SSO",color:"teal",children:["If you need to login without sso, you can access"," ",(0,t.jsxs)("a",{href:Y,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)("b",{children:Y})," "]})]})]})},{key:"scim",label:"SCIM",children:(0,t.jsx)(U,{accessToken:w,userID:T,proxySettings:e})},{key:"ui-settings",label:(0,t.jsx)(x.Space,{children:(0,t.jsxs)(ti,{children:["UI Settings ",(0,t.jsx)(v.default,{})]})}),children:(0,t.jsx)(eR,{})},{key:"hashicorp-vault",label:"Hashicorp Vault",children:(0,t.jsx)(e8,{})}];return(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsx)(ts,{level:4,children:"Admin Access "}),(0,t.jsx)(tr,{children:"Go to 'Internal Users' page to add other admins."}),(0,t.jsx)(f.Tabs,{items:es})]})}],105278)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/673491d4036a0cfe.js b/litellm/proxy/_experimental/out/_next/static/chunks/673491d4036a0cfe.js new file mode 100644 index 0000000000..1e60b4abc1 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/673491d4036a0cfe.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),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214),r=e.i(708347);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,a.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&r.all_admin_roles.includes(s)})}])},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6dc89cea942b737a.js b/litellm/proxy/_experimental/out/_next/static/chunks/6dc89cea942b737a.js deleted file mode 100644 index 7b211d7cd1..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/6dc89cea942b737a.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),o=e.i(908286),l=e.i(242064),n=e.i(246422),i=e.i(838378);let s=["wrap","nowrap","wrap-reverse"],d=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],c=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let a,o,l;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&s.includes(a)})),(o={},c.forEach(r=>{o[`${e}-align-${r}`]=t.align===r}),o[`${e}-align-stretch`]=!t.align&&!!t.vertical,o)),(l={},d.forEach(r=>{l[`${e}-justify-${r}`]=t.justify===r}),l)))},m=(0,n.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,o=(0,i.mergeToken)(e,{flexGapSM:t,flexGap:r,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"}}}})(o),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(o),(e=>{let{componentCls:t}=e,r={};return s.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(o),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(o),(e=>{let{componentCls:t}=e,r={};return d.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(o)]},()=>({}),{resetStyle:!1});var g=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 f=t.default.forwardRef((e,n)=>{let{prefixCls:i,rootClassName:s,className:d,style:c,flex:f,gap:p,vertical:b=!1,component:h="div",children:C}=e,y=g(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:x,getPrefixCls:w}=t.default.useContext(l.ConfigContext),k=w("flex",i),[O,$,j]=m(k),N=null!=b?b:null==v?void 0:v.vertical,T=(0,r.default)(d,s,null==v?void 0:v.className,k,$,j,u(k,e),{[`${k}-rtl`]:"rtl"===x,[`${k}-gap-${p}`]:(0,o.isPresetSize)(p),[`${k}-vertical`]:N}),E=Object.assign(Object.assign({},null==v?void 0:v.style),c);return f&&(E.flex=f),p&&!(0,o.isPresetSize)(p)&&(E.gap=p),O(t.default.createElement(h,Object.assign({ref:n,className:T,style:E},(0,a.default)(y,["justify","wrap","align"])),C))});e.s(["Flex",0,f],525720)},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var o=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(o.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),o=e.i(529681);let l=e=>{let{prefixCls:a,className:o,style:l,size:n,shape:i}=e,s=(0,r.default)({[`${a}-lg`]:"large"===n,[`${a}-sm`]:"small"===n}),d=(0,r.default)({[`${a}-circle`]:"circle"===i,[`${a}-square`]:"square"===i,[`${a}-round`]:"round"===i}),c=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(a,s,d,o),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var n=e.i(694758),i=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,i.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),f=e=>Object.assign({width:e},u(e)),p=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),h=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:o,skeletonButtonCls:l,skeletonInputCls:n,skeletonImageCls:i,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:h,padding:C,marginSM:y,borderRadius:v,titleHeight:x,blockRadius:w,paragraphLiHeight:k,controlHeightXS:O,paragraphMarginTop:$}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:C,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:h},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:x,background:h,borderRadius:w,[`+ ${o}`]:{marginBlockStart:u}},[o]:{padding:0,"> li":{width:"100%",height:k,listStyle:"none",background:h,borderRadius:w,"+ li":{marginBlockStart:O}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${o} > li`]:{borderRadius:v}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:y,[`+ ${o}`]:{marginBlockStart:$}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=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:i(a).mul(2).equal(),minWidth:i(a).mul(2).equal()},b(a,i))},p(e,a,r)),{[`${r}-lg`]:Object.assign({},b(o,i))}),p(e,o,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(l,i))}),p(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(o)),[`${t}${t}-sm`]:Object.assign({},m(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},g(t,i)),[`${a}-lg`]:Object.assign({},g(o,i)),[`${a}-sm`]:Object.assign({},g(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:o,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:o},f(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${a}, - ${o} > li, - ${r}, - ${l}, - ${n}, - ${i} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),C=e=>{let{prefixCls:a,className:o,style:l,rows:n=0}=e,i=Array.from({length:n}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,o),style:l},i)},y=({prefixCls:e,className:a,width:o,style:l})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:o},l)});function v(e){return e&&"object"==typeof e?e:{}}let x=e=>{let{prefixCls:o,loading:n,className:i,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:p}=e,{getPrefixCls:b,direction:x,className:w,style:k}=(0,a.useComponentConfig)("skeleton"),O=b("skeleton",o),[$,j,N]=h(O);if(n||!("loading"in e)){let e,a,o=!!u,n=!!m,c=!!g;if(o){let r=Object.assign(Object.assign({prefixCls:`${O}-avatar`},n&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),v(u));e=t.createElement("div",{className:`${O}-header`},t.createElement(l,Object.assign({},r)))}if(n||c){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${O}-title`},!o&&c?{width:"38%"}:o&&c?{width:"50%"}:{}),v(m));e=t.createElement(y,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${O}-paragraph`},(e={},o&&n||(e.width="61%"),!o&&n?e.rows=3:e.rows=2,e)),v(g));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${O}-content`},e,r)}let b=(0,r.default)(O,{[`${O}-with-avatar`]:o,[`${O}-active`]:f,[`${O}-rtl`]:"rtl"===x,[`${O}-round`]:p},w,i,s,j,N);return $(t.createElement("div",{className:b,style:Object.assign(Object.assign({},k),d)},e,a))}return null!=c?c:null};x.Button=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",n),[f,p,b]=h(g),C=(0,o.default)(e,["prefixCls"]),y=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,p,b);return f(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-button`,size:u},C))))},x.Avatar=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",n),[f,p,b]=h(g),C=(0,o.default)(e,["prefixCls","className"]),y=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},i,s,p,b);return f(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},C))))},x.Input=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",n),[f,p,b]=h(g),C=(0,o.default)(e,["prefixCls"]),y=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,p,b);return f(t.createElement("div",{className:y},t.createElement(l,Object.assign({prefixCls:`${g}-input`,size:u},C))))},x.Image=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",o),[u,m,g]=h(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},l,n,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,l),style:i},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`})))))},x.Node=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",o),[m,g,f]=h(u),p=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,l,n,f);return m(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${u}-image`,l),style:i},d)))},e.s(["default",0,x],185793)},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"],l=e=>({_s:e,status:o[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),n=e=>e?6:5,i=(e,t,r,a,o)=>{clearTimeout(a.current);let n=l(e);t(n),r.current=n,o&&o({current:n})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let u=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 g={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"}},f=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,c.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:l,transitionStatus:n})=>{let i=l?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(u,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",i,m.default,m[n]),style:{transition:"width 150ms"}}):a.default.createElement(o,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,i)})},h=a.default.forwardRef((e,o)=>{let{icon:u,iconPosition:m=s.HorizontalPositions.Left,size:h=s.Sizes.SM,color:C,variant:y="primary",disabled:v,loading:x=!1,loadingText:w,children:k,tooltip:O,className:$}=e,j=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),N=x||v,T=void 0!==u||x,E=x&&w,P=!(!k&&!E),S=(0,d.tremorTwMerge)(g[h].height,g[h].width),R="light"!==y?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",M=f(y,C),z=("light"!==y?{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:_}=(0,r.useTooltip)(300),[q,H]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[g,f]=(0,a.useState)(()=>l(d?2:n(c))),p=(0,a.useRef)(g),b=(0,a.useRef)(0),[h,C]="object"==typeof s?[s.enter,s.exit]:[s,s],y=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return n(t)}})(p.current._s,u);e&&i(e,f,p,b,m)},[m,u]);return[g,(0,a.useCallback)(a=>{let l=e=>{switch(i(e,f,p,b,m),e){case 1:h>=0&&(b.current=((...e)=>setTimeout(...e))(y,h));break;case 4:C>=0&&(b.current=((...e)=>setTimeout(...e))(y,C));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},s=p.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||l(e?+!r:2):s&&l(t?o?3:4:n(u))},[y,m,e,t,r,o,h,C,u]),y]})({timeout:50});return(0,a.useEffect)(()=>{H(x)},[x]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([o,B.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",R,z.paddingX,z.paddingY,z.fontSize,M.textColor,M.bgColor,M.borderColor,M.hoverBorderColor,N?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(f(y,C).hoverTextColor,f(y,C).hoverBgColor,f(y,C).hoverBorderColor),$),disabled:N},_,j),a.default.createElement(r.default,Object.assign({text:O},B)),T&&m!==s.HorizontalPositions.Right?a.default.createElement(b,{loading:x,iconSize:S,iconPosition:m,Icon:u,transitionStatus:q.status,needMargin:P}):null,E||k?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},E?w:k):null,T&&m===s.HorizontalPositions.Right?a.default.createElement(b,{loading:x,iconSize:S,iconPosition:m,Icon:u,transitionStatus:q.status,needMargin:P}):null)});h.displayName="Button",e.s(["Button",()=>h],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("Table"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(o("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),n))});l.displayName="Table",e.s(["Table",()=>l],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableBody"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),n))});l.displayName="TableBody",e.s(["TableBody",()=>l],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),n))});l.displayName="TableCell",e.s(["TableCell",()=>l],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHead"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),n))});l.displayName="TableHead",e.s(["TableHead",()=>l],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHeaderCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},s),n))});l.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>l],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableRow"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("row"),i)},s),n))});l.displayName="TableRow",e.s(["TableRow",()=>l],496020)},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),a=e.i(673706),o=e.i(271645);let l=o.default.forwardRef((e,l)=>{let{color:n,className:i,children:s}=e;return o.default.createElement("p",{ref:l,className:(0,r.tremorTwMerge)("text-tremor-default",n?(0,a.getColorClassNames)(n,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),i)},s)});l.displayName="Text",e.s(["default",()=>l],936325),e.s(["Text",()=>l],599724)},304967,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(480731),o=e.i(95779),l=e.i(444755),n=e.i(673706);let i=(0,n.makeClassName)("Card"),s=r.default.forwardRef((e,s)=>{let{decoration:d="",decorationColor:c,children:u,className:m}=e,g=(0,t.__rest)(e,["decoration","decorationColor","children","className"]);return r.default.createElement("div",Object.assign({ref:s,className:(0,l.tremorTwMerge)(i("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,n.getColorClassNames)(c,o.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),m)},g),u)});s.displayName="Card",e.s(["Card",()=>s],304967)},629569,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),o=e.i(673706),l=e.i(271645);let n=l.default.forwardRef((e,n)=>{let{color:i,children:s,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return l.default.createElement("p",Object.assign({ref:n,className:(0,a.tremorTwMerge)("font-medium text-tremor-title",i?(0,o.getColorClassNames)(i,r.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},c),s)});n.displayName="Title",e.s(["Title",()=>n],629569)},292639,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},743151,(e,t,r)=>{"use strict";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)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var o=i(e.r(271645)),l=i(e.r(844343)),n=["text","onCopy","options","children"];function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function d(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,n),a=o.default.Children.only(t);return o.default.cloneElement(a,d(d({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var a=e.r(743151).CopyToClipboard;a.CopyToClipboard=a,t.exports=a}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/72debc51022299b8.js b/litellm/proxy/_experimental/out/_next/static/chunks/72debc51022299b8.js deleted file mode 100644 index 6df11fc74b..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/72debc51022299b8.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,446891,836991,153472,e=>{"use strict";var t,r,a=e.i(843476),l=e.i(464571),s=e.i(326373),n=e.i(94629),i=e.i(360820),o=e.i(871943),c=e.i(271645);let u=c.forwardRef(function(e,t){return c.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),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,u],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let r=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(i.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(u,{className:"h-4 w-4"})}];return(0,a.jsx)(s.Dropdown,{menu:{items:r,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(l.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(i.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var d=e.i(266027),h=e.i(954616),f=e.i(243652),m=e.i(135214),p=e.i(764205),g=((t={}).GENERAL_SETTINGS="general_settings",t),y=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let b=async(e,t)=>{try{let r=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(r,{method:"GET",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},w=(0,f.createQueryKeys)("proxyConfig"),v=async(e,t)=>{try{let r=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(r,{method:"POST",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>g,"GeneralSettingsFieldName",()=>y,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,m.default)();return(0,h.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await v(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,m.default)();return(0,d.useQuery)({queryKey:w.list({filters:{configType:e}}),queryFn:async()=>await b(t,e),enabled:!!t})}],153472)},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ArrowLeftOutlined",0,s],447566)},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var l=e.i(464571),s=e.i(311451),n=e.i(199133),i=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[h,f]=(0,r.useState)(!1),[m,p]=(0,r.useState)(u),[g,y]=(0,r.useState)({}),[b,w]=(0,r.useState)({}),[v,x]=(0,r.useState)({}),[C,S]=(0,r.useState)({}),j=(0,r.useCallback)((0,i.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){w(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);y(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),y(e=>({...e,[t.name]:[]}))}finally{w(e=>({...e,[t.name]:!1}))}}},300),[]),k=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!C[e.name]){w(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");y(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),y(t=>({...t,[e.name]:[]}))}finally{w(t=>({...t,[e.name]:!1}))}}},[C]);(0,r.useEffect)(()=>{h&&e.forEach(e=>{e.isSearchable&&!C[e.name]&&k(e)})},[h,e,k,C]);let E=(e,t)=>{let r={...m,[e]:t};p(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>f(!h),className:"flex items-center gap-2",children:d}),(0,t.jsx)(l.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),h&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,l=e.find(e=>e.label===r||e.name===r);return l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:l.label||l.name}),l.isSearchable?(0,t.jsx)(n.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${l.label||l.name}...`,value:m[l.name]||void 0,onChange:e=>E(l.name,e),onOpenChange:e=>{e&&l.isSearchable&&!C[l.name]&&k(l)},onSearch:e=>{x(t=>({...t,[l.name]:e})),l.searchFn&&j(e,l)},filterOption:!1,loading:b[l.name],options:g[l.name]||[],allowClear:!0,notFoundContent:b[l.name]?"Loading...":"No results found"}):l.options?(0,t.jsx)(n.Select,{className:"w-full",placeholder:`Select ${l.label||l.name}...`,value:m[l.name]||void 0,onChange:e=>E(l.name,e),allowClear:!0,children:l.options.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))}):l.customComponent?(a=l.customComponent,(0,t.jsx)(a,{value:m[l.name]||void 0,onChange:e=>E(l.name,e??""),placeholder:`Select ${l.label||l.name}...`,allFilters:m})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${l.label||l.name}...`,value:m[l.name]||"",onChange:e=>E(l.name,e.target.value),allowClear:!0})]},l.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let l of e){let e=l?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=l?.organization_id??l?.org_id;s&&"string"==typeof s&&r.add(s.trim());let n=l?.user_id;if(n&&"string"==typeof n){let e=l?.user?.user_email||n;a.set(n,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let l=new Set,s=new Set,n=new Map,i=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=i?.keys||[],c=i?.total_pages??1;r(o,l,s,n);let u=Math.min(c,10)-1;if(u>0){let i=Array.from({length:u},(r,l)=>(0,t.keyListCall)(e,null,a,null,null,null,l+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(i)))"fulfilled"===e.status&&r(e.value?.keys||[],l,s,n)}return{keyAliases:Array.from(l).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(n.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},l=async(e,r)=>{if(!e)return[];try{let a=[],l=1,s=!0;for(;s;){let n=await (0,t.teamListCall)(e,r||null,null);a=[...a,...n],l{if(!e)return[];try{let r=[],a=1,l=!0;for(;l;){let s=await (0,t.organizationListCall)(e);r=[...r,...s],a{"use strict";var t=e.i(266027),r=e.i(621482),a=e.i(243652),l=e.i(764205),s=e.i(135214);let n=(0,a.createQueryKeys)("models"),i=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let c=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:r,userRole:a}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,r,a,!0,null,!0,!1,"expand"),enabled:!!(e&&r&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:n,userRole:i}=(0,s.default)();return(0,r.useInfiniteQuery)({queryKey:c.list({filters:{...n&&{userId:n},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:r})=>await (0,l.modelInfoCall)(a,n,i,r,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,r=50,a,i,o,c,u)=>{let{accessToken:d,userId:h,userRole:f}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({filters:{...h&&{userId:h},...f&&{userRole:f},page:e,size:r,...a&&{search:a},...i&&{modelId:i},...o&&{teamId:o},...c&&{sortBy:c},...u&&{sortOrder:u}}}),queryFn:async()=>await (0,l.modelInfoCall)(d,h,f,e,r,a,i,o,c,u),enabled:!!(d&&h&&f)})}])},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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ReloadOutlined",0,s],91979)},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),a=e.i(371330),l=e.i(271645),s=e.i(394487),n=e.i(503269),i=e.i(214520),o=e.i(746725),c=e.i(914189),u=e.i(144279),d=e.i(294316),h=e.i(601893),f=e.i(140721),m=e.i(942803),p=e.i(233538),g=e.i(694421),y=e.i(700020),b=e.i(35889),w=e.i(998348),v=e.i(722678);let x=(0,l.createContext)(null);x.displayName="GroupContext";let C=l.Fragment,S=Object.assign((0,y.forwardRefWithAs)(function(e,t){var C;let S=(0,l.useId)(),j=(0,m.useProvidedId)(),k=(0,h.useDisabled)(),{id:E=j||`headlessui-switch-${S}`,disabled:M=k||!1,checked:N,defaultChecked:O,onChange:R,name:T,value:P,form:D,autoFocus:I=!1,...F}=e,_=(0,l.useContext)(x),[$,L]=(0,l.useState)(null),K=(0,l.useRef)(null),A=(0,d.useSyncRefs)(K,t,null===_?null:_.setSwitch,L),G=(0,i.useDefaultValue)(O),[B,H]=(0,n.useControllable)(N,R,null!=G&&G),q=(0,o.useDisposables)(),[U,z]=(0,l.useState)(!1),Q=(0,c.useEvent)(()=>{z(!0),null==H||H(!B),q.nextFrame(()=>{z(!1)})}),V=(0,c.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),Q()}),W=(0,c.useEvent)(e=>{e.key===w.Keys.Space?(e.preventDefault(),Q()):e.key===w.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),X=(0,c.useEvent)(e=>e.preventDefault()),Y=(0,v.useLabelledBy)(),J=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:I}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:M}),{pressed:ea,pressProps:el}=(0,s.useActivePress)({disabled:M}),es=(0,l.useMemo)(()=>({checked:B,disabled:M,hover:et,focus:Z,active:ea,autofocus:I,changing:U}),[B,et,Z,ea,M,U,I]),en=(0,y.mergeProps)({id:E,ref:A,role:"switch",type:(0,u.useResolveButtonType)(e,$),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":B,"aria-labelledby":Y,"aria-describedby":J,disabled:M||void 0,autoFocus:I,onClick:V,onKeyUp:W,onKeyPress:X},ee,er,el),ei=(0,l.useCallback)(()=>{if(void 0!==G)return null==H?void 0:H(G)},[H,G]),eo=(0,y.useRender)();return l.default.createElement(l.default.Fragment,null,null!=T&&l.default.createElement(f.FormFields,{disabled:M,data:{[T]:P||"on"},overrides:{type:"checkbox",checked:B},form:D,onReset:ei}),eo({ourProps:en,theirProps:F,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,l.useState)(null),[s,n]=(0,v.useLabels)(),[i,o]=(0,b.useDescriptions)(),c=(0,l.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),u=(0,y.useRender)();return l.default.createElement(o,{name:"Switch.Description",value:i},l.default.createElement(n,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},l.default.createElement(x.Provider,{value:c},u({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:v.Label,Description:b.Description});var j=e.i(888288),k=e.i(95779),E=e.i(444755),M=e.i(673706),N=e.i(829087);let O=(0,M.makeClassName)("Switch"),R=l.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:s=!1,onChange:n,color:i,name:o,error:c,errorMessage:u,disabled:d,required:h,tooltip:f,id:m}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:i?(0,M.getColorClassNames)(i,k.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,M.getColorClassNames)(i,k.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[y,b]=(0,j.default)(s,a),[w,v]=(0,l.useState)(!1),{tooltipProps:x,getReferenceProps:C}=(0,N.useTooltip)(300);return l.default.createElement("div",{className:"flex flex-row items-center justify-start"},l.default.createElement(N.default,Object.assign({text:f},x)),l.default.createElement("div",Object.assign({ref:(0,M.mergeRefs)([r,x.refs.setReference]),className:(0,E.tremorTwMerge)(O("root"),"flex flex-row relative h-5")},p,C),l.default.createElement("input",{type:"checkbox",className:(0,E.tremorTwMerge)(O("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:h,checked:y,onChange:e=>{e.preventDefault()}}),l.default.createElement(S,{checked:y,onChange:e=>{b(e),null==n||n(e)},disabled:d,className:(0,E.tremorTwMerge)(O("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:m},l.default.createElement("span",{className:(0,E.tremorTwMerge)(O("sr-only"),"sr-only")},"Switch ",y?"on":"off"),l.default.createElement("span",{"aria-hidden":"true",className:(0,E.tremorTwMerge)(O("background"),y?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")}),l.default.createElement("span",{"aria-hidden":"true",className:(0,E.tremorTwMerge)(O("round"),y?(0,E.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",w?(0,E.tremorTwMerge)("ring-2",g.ringColor):"")}))),c&&u?l.default.createElement("p",{className:(0,E.tremorTwMerge)(O("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});R.displayName="Switch",e.s(["Switch",()=>R],793130)},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),l=e.i(682830),s=e.i(269200),n=e.i(427612),i=e.i(64848),o=e.i(942232),c=e.i(496020),u=e.i(977572);function d({data:e=[],columns:d,onRowClick:h,renderSubComponent:f,renderChildRows:m,getRowCanExpand:p,isLoading:g=!1,loadingMessage:y="🚅 Loading logs...",noDataMessage:b="No logs found",enableSorting:w=!1}){let v=!!(f||m)&&!!p,[x,C]=(0,r.useState)([]),S=(0,a.useReactTable)({data:e,columns:d,...w&&{state:{sorting:x},onSortingChange:C,enableSortingRemoval:!1},...v&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,l.getCoreRowModel)(),...w&&{getSortedRowModel:(0,l.getSortedRowModel)()},...v&&{getExpandedRowModel:(0,l.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(n.TableHead,{children:S.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let r=w&&e.column.getCanSort(),l=e.column.getIsSorted();return(0,t.jsx)(i.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===l?"↑":"desc"===l?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:g?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:y})})})}):S.getRowModel().rows.length>0?S.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${h?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>h?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),v&&e.getIsExpanded()&&m&&m({row:e}),v&&e.getIsExpanded()&&f&&!m&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:f({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})})})]})})}e.s(["DataTable",()=>d])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),l=e.i(915823),s=e.i(619273),n=class extends l.Subscribable{#e;#t=void 0;#r;#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,s.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.hashKey)(t.mutationKey)!==(0,s.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.#l(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#l(),this.#s()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#l(){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}}#s(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=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,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},i=e.i(912598);function o(e,r){let l=(0,i.useQueryClient)(r),[o]=t.useState(()=>new n(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(s.noop)},[o]);if(c.error&&(0,s.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},888288,e=>{"use strict";var t=e.i(271645);let r=(e,r)=>{let a=void 0!==r,[l,s]=(0,t.useState)(e);return[a?r:l,e=>{a||s(e)}]};e.s(["default",()=>r])},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:n,accessToken:i,disabled:o})=>{let[c,u]=(0,r.useState)([]),[d,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(i){h(!0);try{let e=await (0,l.getGuardrailsList)(i);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{h(!1)}}})()},[i]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:s,loading:d,className:n,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),a=e.i(199133),l=e.i(764205);function s(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:n,className:i,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,h]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,l.getPoliciesList)(o);e.policies&&(h(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[o,u]),(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:n,loading:f,className:i,allowClear:!0,options:s(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>s])},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let r=e.i(264042).Row;e.s(["Row",0,r],621192)},214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,l]=(0,t.useState)([]),{accessToken:s,userId:n,userRole:i}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{l(await (0,a.fetchTeams)(s,n,i,null))})()},[s,n,i]),{teams:e,setTeams:l}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let l=t(e);return isNaN(a)?r(e,NaN):(a&&l.setDate(l.getDate()+a),l)}function l(e,a){let l=t(e);if(isNaN(a))return r(e,NaN);if(!a)return l;let s=l.getDate(),n=r(e,l.getTime());return(n.setMonth(l.getMonth()+a+1,0),s>=n.getDate())?n:(l.setFullYear(n.getFullYear(),n.getMonth(),s),l)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>l],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(908286),s=e.i(242064),n=e.i(246422),i=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["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"],d=function(e,t){let a,l,s;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(l={},u.forEach(r=>{l[`${e}-align-${r}`]=t.align===r}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(s={},c.forEach(r=>{s[`${e}-justify-${r}`]=t.justify===r}),s)))},h=(0,n.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,l=(0,i.mergeToken)(e,{flexGapSM:t,flexGap:r,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,r={};return o.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(l)]},()=>({}),{resetStyle:!1});var f=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 m=t.default.forwardRef((e,n)=>{let{prefixCls:i,rootClassName:o,className:c,style:u,flex:m,gap:p,vertical:g=!1,component:y="div",children:b}=e,w=f(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:x,getPrefixCls:C}=t.default.useContext(s.ConfigContext),S=C("flex",i),[j,k,E]=h(S),M=null!=g?g:null==v?void 0:v.vertical,N=(0,r.default)(c,o,null==v?void 0:v.className,S,k,E,d(S,e),{[`${S}-rtl`]:"rtl"===x,[`${S}-gap-${p}`]:(0,l.isPresetSize)(p),[`${S}-vertical`]:M}),O=Object.assign(Object.assign({},null==v?void 0:v.style),u);return m&&(O.flex=m),p&&!(0,l.isPresetSize)(p)&&(O.gap=p),j(t.default.createElement(y,Object.assign({ref:n,className:N,style:O},(0,a.default)(w,["justify","wrap","align"])),b))});e.s(["Flex",0,m],525720)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7a2c975c414f5b5b.js b/litellm/proxy/_experimental/out/_next/static/chunks/7a2c975c414f5b5b.js new file mode 100644 index 0000000000..df55655490 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/7a2c975c414f5b5b.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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",c="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|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},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 g="$isDayjsObject",p=function(e){return e instanceof b||!(!e||!e[g])},x=function e(t,r,a){var n;if(!t)return h;if("string"==typeof t){var s=t.toLowerCase();f[s]&&(n=s),r&&(f[s]=r,n=s);var i=t.split("-");if(!n&&i.length>1)return e(i[0])}else{var l=t.name;f[l]=t,n=l}return!a&&n&&(h=n),n||!a&&h},y=function(e,t){if(p(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new b(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)},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)},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var n=e.i(464571),s=e.i(311451),i=e.i(199133),l=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[m,h]=(0,r.useState)(!1),[f,g]=(0,r.useState)(u),[p,x]=(0,r.useState)({}),[y,v]=(0,r.useState)({}),[b,j]=(0,r.useState)({}),[w,$]=(0,r.useState)({}),C=(0,r.useCallback)((0,l.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){v(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);x(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{v(e=>({...e,[t.name]:!1}))}}},300),[]),S=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!w[e.name]){v(t=>({...t,[e.name]:!0})),$(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{v(t=>({...t,[e.name]:!1}))}}},[w]);(0,r.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!w[e.name]&&S(e)})},[m,e,S,w]);let k=(e,t)=>{let r={...f,[e]:t};g(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(n.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:d}),(0,t.jsx)(n.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),g(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model","Public model / search tool"].map(r=>{let a,n=e.find(e=>e.label===r||e.name===r);return n?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:n.label||n.name}),n.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${n.label||n.name}...`,value:f[n.name]||void 0,onChange:e=>k(n.name,e),onOpenChange:e=>{e&&n.isSearchable&&!w[n.name]&&S(n)},onSearch:e=>{j(t=>({...t,[n.name]:e})),n.searchFn&&C(e,n)},filterOption:!1,loading:y[n.name],options:p[n.name]||[],allowClear:!0,notFoundContent:y[n.name]?"Loading...":"No results found"}):n.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${n.label||n.name}...`,value:f[n.name]||void 0,onChange:e=>k(n.name,e),allowClear:!0,children:n.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):n.customComponent?(a=n.customComponent,(0,t.jsx)(a,{value:f[n.name]||void 0,onChange:e=>k(n.name,e??""),placeholder:`Select ${n.label||n.name}...`,allFilters:f})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${n.label||n.name}...`,value:f[n.name]||"",onChange:e=>k(n.name,e.target.value),allowClear:!0})]},n.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let n of e){let e=n?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=n?.organization_id??n?.org_id;s&&"string"==typeof s&&r.add(s.trim());let i=n?.user_id;if(i&&"string"==typeof i){let e=n?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let n=new Set,s=new Set,i=new Map,l=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=l?.keys||[],c=l?.total_pages??1;r(o,n,s,i);let u=Math.min(c,10)-1;if(u>0){let l=Array.from({length:u},(r,n)=>(0,t.keyListCall)(e,null,a,null,null,null,n+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(l)))"fulfilled"===e.status&&r(e.value?.keys||[],n,s,i)}return{keyAliases:Array.from(n).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},n=async(e,r)=>{if(!e)return[];try{let a=[],n=1,s=!0;for(;s;){let i=await (0,t.teamListCall)(e,r||null,null);a=[...a,...i],n{if(!e)return[];try{let r=[],a=1,n=!0;for(;n;){let s=await (0,t.organizationListCall)(e);r=[...r,...s],a{"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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},678784,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",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(914949),n=e.i(404948);let s=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,s],836938);var i=e.i(613541),l=e.i(763731),o=e.i(242064),c=e.i(491816);e.i(793154);var u=e.i(880476),d=e.i(183293),m=e.i(717356),h=e.i(320560),f=e.i(307358),g=e.i(246422),p=e.i(838378),x=e.i(617933);let y=(0,g.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,a=(0,p.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:a,fontWeightStrong:n,innerPadding:s,boxShadowSecondary:i,colorTextHeading:l,borderRadiusLG:o,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:m,popoverBg:f,titleBorderBottom:g,innerContentPadding:p,titlePadding:x}=e;return[{[t]:Object.assign(Object.assign({},(0,d.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:o,boxShadow:i,padding:s},[`${t}-title`]:{minWidth:a,marginBottom:u,color:l,fontWeight:n,borderBottom:g,padding:x},[`${t}-inner-content`]:{color:r,padding:p}})},(0,h.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:x.PresetColors.map(r=>{let a=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:a,padding:n,wireframe:s,zIndexPopupBase:i,borderRadiusLG:l,marginXS:o,lineType:c,colorSplit:u,paddingSM:d}=e,m=r-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:i+30},(0,f.getArrowToken)(e)),(0,h.getArrowOffsetToken)({contentRadius:l,limitVerticalRadius:!0})),{innerPadding:12*!s,titleMarginBottom:s?0:o,titlePadding:s?`${m/2}px ${n}px ${m/2-t}px`:0,titleBorderBottom:s?`${t}px ${c} ${u}`:"none",innerContentPadding:s?`${d}px ${n}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var 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 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};let b=({title:e,content:r,prefixCls:a})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),r&&t.createElement("div",{className:`${a}-inner-content`},r)):null,j=e=>{let{hashId:a,prefixCls:n,className:i,style:l,placement:o="top",title:c,content:d,children:m}=e,h=s(c),f=s(d),g=(0,r.default)(a,n,`${n}-pure`,`${n}-placement-${o}`,i);return t.createElement("div",{className:g,style:l},t.createElement("div",{className:`${n}-arrow`}),t.createElement(u.Popup,Object.assign({},e,{className:a,prefixCls:n}),m||t.createElement(b,{prefixCls:n,title:h,content:f})))},w=e=>{let{prefixCls:a,className:n}=e,s=v(e,["prefixCls","className"]),{getPrefixCls:i}=t.useContext(o.ConfigContext),l=i("popover",a),[c,u,d]=y(l);return c(t.createElement(j,Object.assign({},s,{prefixCls:l,hashId:u,className:(0,r.default)(n,d)})))};e.s(["Overlay",0,b,"default",0,w],310730);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 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};let C=t.forwardRef((e,u)=>{var d,m;let{prefixCls:h,title:f,content:g,overlayClassName:p,placement:x="top",trigger:v="hover",children:j,mouseEnterDelay:w=.1,mouseLeaveDelay:C=.1,onOpenChange:S,overlayStyle:k={},styles:M,classNames:O}=e,N=$(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:_,className:T,style:D,classNames:E,styles:z}=(0,o.useComponentConfig)("popover"),A=_("popover",h),[L,B,H]=y(A),I=_(),P=(0,r.default)(p,B,H,T,E.root,null==O?void 0:O.root),V=(0,r.default)(E.body,null==O?void 0:O.body),[W,R]=(0,a.default)(!1,{value:null!=(d=e.open)?d:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),F=(e,t)=>{R(e,!0),null==S||S(e,t)},Y=s(f),U=s(g);return L(t.createElement(c.default,Object.assign({placement:x,trigger:v,mouseEnterDelay:w,mouseLeaveDelay:C},N,{prefixCls:A,classNames:{root:P,body:V},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},z.root),D),k),null==M?void 0:M.root),body:Object.assign(Object.assign({},z.body),null==M?void 0:M.body)},ref:u,open:W,onOpenChange:e=>{F(e)},overlay:Y||U?t.createElement(b,{prefixCls:A,title:Y,content:U}):null,transitionName:(0,i.getTransitionName)(I,"zoom-big",N.transitionName),"data-popover-inject":!0}),(0,l.cloneElement)(j,{onKeyDown:e=>{var r,a;(0,t.isValidElement)(j)&&(null==(a=null==j?void 0:(r=j.props).onKeyDown)||a.call(r,e)),e.keyCode===n.default.ESC&&F(!1,e)}})))});C._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,C],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},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)},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",()=>t])},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)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},584578,e=>{"use strict";var t=e.i(764205);let r=async(e,r,a,n,s)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,n?.organization_id||null,r):await (0,t.teamListCall)(e,n?.organization_id||null),console.log(`givenTeams: ${i}`),s(i)};e.s(["fetchTeams",0,r])},468133,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(175712),n=e.i(464571),s=e.i(28651),i=e.i(898586),l=e.i(482725),o=e.i(199133),c=e.i(262218),u=e.i(621192),d=e.i(178654),m=e.i(751904),h=e.i(987432),f=e.i(764205),g=e.i(860585),p=e.i(355619),x=e.i(727749),y=e.i(162386);let{Title:v,Text:b}=i.Typography,j=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],w=({label:e,description:r,isEditing:a,viewContent:n,editContent:s})=>(0,t.jsxs)(u.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(d.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:r})]}),(0,t.jsx)(d.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:a?s:n})})]}),$=()=>(0,t.jsx)(b,{className:"text-gray-400 italic",children:"Not set"}),C=(e,r)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:r?r(e):e},e))}):(0,t.jsx)($,{}),S={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[i,u]=(0,r.useState)(!0),[d,k]=(0,r.useState)(S),[M,O]=(0,r.useState)(!1),[N,_]=(0,r.useState)(S),[T,D]=(0,r.useState)(!1),[E,z]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(!e)return u(!1);try{let t=await (0,f.getDefaultTeamSettings)(e),r={...S,...t.values||{}};k(r),_(r)}catch(e){console.error("Error fetching team SSO settings:",e),z(!0),x.default.fromBackend("Failed to fetch team settings")}finally{u(!1)}})()},[e]);let A=async()=>{if(e){D(!0);try{let t=await (0,f.updateDefaultTeamSettings)(e,N),r={...S,...t.settings||{}};k(r),_(r),O(!1),x.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),x.default.fromBackend("Failed to update team settings")}finally{D(!1)}}},L=(e,t)=>{_(r=>({...r,[e]:t}))};return i?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(l.Spin,{size:"large"})}):E?(0,t.jsx)(a.Card,{children:(0,t.jsx)(b,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(a.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(b,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:M?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(n.Button,{onClick:()=>{O(!1),_(d)},disabled:T,children:"Cancel"}),(0,t.jsx)(n.Button,{type:"primary",onClick:A,loading:T,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(n.Button,{onClick:()=>O(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:M,viewContent:null!=d.max_budget?(0,t.jsxs)(b,{children:["$",Number(d.max_budget).toLocaleString()]}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.max_budget,onChange:e=>L("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(w,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:M,viewContent:d.budget_duration?(0,t.jsx)(b,{children:(0,g.getBudgetDurationLabel)(d.budget_duration)}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(g.default,{value:N.budget_duration||null,onChange:e=>L("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(w,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:M,viewContent:null!=d.tpm_limit?(0,t.jsx)(b,{children:d.tpm_limit.toLocaleString()}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.tpm_limit,onChange:e=>L("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(w,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:M,viewContent:null!=d.rpm_limit?(0,t.jsx)(b,{children:d.rpm_limit.toLocaleString()}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.rpm_limit,onChange:e=>L("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Models",description:"Default list of models that new teams can access.",isEditing:M,viewContent:C(d.models,p.getModelDisplayName),editContent:(0,t.jsx)(y.ModelSelect,{value:N.models||[],onChange:e=>L("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(w,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:M,viewContent:C(d.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:N.team_member_permissions||[],onChange:e=>L("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:r,onClose:a})=>(0,t.jsx)(c.Tag,{color:"blue",closable:r,onClose:a,className:"mr-1 mt-1 mb-1",children:e}),children:j.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},747871,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(269200),n=e.i(942232),s=e.i(977572),i=e.i(427612),l=e.i(64848),o=e.i(496020),c=e.i(304967),u=e.i(994388),d=e.i(599724),m=e.i(389083),h=e.i(764205),f=e.i(727749);e.s(["default",0,({accessToken:e,userID:g})=>{let[p,x]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(e&&g)try{let t=await (0,h.availableTeamListCall)(e);x(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,g]);let y=async t=>{if(e&&g)try{await (0,h.teamMemberAddCall)(e,t,{user_id:g,role:"user"}),f.default.success("Successfully joined team"),x(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),f.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(i.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(l.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(l.TableHeaderCell,{children:"Description"}),(0,t.jsx)(l.TableHeaderCell,{children:"Members"}),(0,t.jsx)(l.TableHeaderCell,{children:"Models"}),(0,t.jsx)(l.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(n.TableBody,{children:[p.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Text,{children:e.team_alias})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Text,{children:e.description||"No description available"})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsxs)(d.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,r)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(d.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},r)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(d.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Button,{size:"xs",variant:"secondary",onClick:()=>y(e.team_id),children:"Join Team"})})]},e.team_id)),0===p.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(s.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(d.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7c797521435cb59c.js b/litellm/proxy/_experimental/out/_next/static/chunks/7c797521435cb59c.js deleted file mode 100644 index bff700a17a..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/7c797521435cb59c.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,757440,e=>{"use strict";var t=e.i(290571),s=e.i(271645);let l=e=>{var l=(0,t.__rest)(e,[]);return s.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},l),s.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>l])},446428,854056,e=>{"use strict";let t;var s=e.i(290571),l=e.i(271645);let a=e=>{var t=(0,s.__rest)(e,[]);return l.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),l.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"}))};e.s(["default",()=>a],446428);var r=e.i(746725),i=e.i(914189),n=e.i(553521),d=e.i(835696),o=e.i(941444),c=e.i(178677),u=e.i(294316),m=e.i(83733),h=e.i(233137),x=e.i(732607),f=e.i(397701),g=e.i(700020);function p(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:w)!==l.Fragment||1===l.default.Children.count(e.children)}let b=(0,l.createContext)(null);b.displayName="TransitionContext";var j=((t=j||{}).Visible="visible",t.Hidden="hidden",t);let v=(0,l.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 _(e,t){let s=(0,o.useLatestValue)(e),a=(0,l.useRef)([]),d=(0,n.useIsMounted)(),c=(0,r.useDisposables)(),u=(0,i.useEvent)((e,t=g.RenderStrategy.Hidden)=>{let l=a.current.findIndex(({el:t})=>t===e);-1!==l&&((0,f.match)(t,{[g.RenderStrategy.Unmount](){a.current.splice(l,1)},[g.RenderStrategy.Hidden](){a.current[l].state="hidden"}}),c.microTask(()=>{var e;!y(a)&&d.current&&(null==(e=s.current)||e.call(s))}))}),m=(0,i.useEvent)(e=>{let t=a.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):a.current.push({el:e,state:"visible"}),()=>u(e,g.RenderStrategy.Unmount)}),h=(0,l.useRef)([]),x=(0,l.useRef)(Promise.resolve()),p=(0,l.useRef)({enter:[],leave:[]}),b=(0,i.useEvent)((e,s,l)=>{h.current.splice(0),t&&(t.chains.current[s]=t.chains.current[s].filter(([t])=>t!==e)),null==t||t.chains.current[s].push([e,new Promise(e=>{h.current.push(e)})]),null==t||t.chains.current[s].push([e,new Promise(e=>{Promise.all(p.current[s].map(([e,t])=>t)).then(()=>e())})]),"enter"===s?x.current=x.current.then(()=>null==t?void 0:t.wait.current).then(()=>l(s)):l(s)}),j=(0,i.useEvent)((e,t,s)=>{Promise.all(p.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=h.current.shift())||e()}).then(()=>s(t))});return(0,l.useMemo)(()=>({children:a,register:m,unregister:u,onStart:b,onStop:j,wait:x,chains:p}),[m,u,a,b,j,p,x])}v.displayName="NestingContext";let w=l.Fragment,S=g.RenderFeatures.RenderStrategy,N=(0,g.forwardRefWithAs)(function(e,t){let{show:s,appear:a=!1,unmount:r=!0,...n}=e,o=(0,l.useRef)(null),m=p(e),x=(0,u.useSyncRefs)(...m?[o,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let f=(0,h.useOpenClosed)();if(void 0===s&&null!==f&&(s=(f&h.State.Open)===h.State.Open),void 0===s)throw Error("A is used but it is missing a `show={true | false}` prop.");let[j,w]=(0,l.useState)(s?"visible":"hidden"),N=_(()=>{s||w("hidden")}),[T,k]=(0,l.useState)(!0),I=(0,l.useRef)([s]);(0,d.useIsoMorphicEffect)(()=>{!1!==T&&I.current[I.current.length-1]!==s&&(I.current.push(s),k(!1))},[I,s]);let E=(0,l.useMemo)(()=>({show:s,appear:a,initial:T}),[s,a,T]);(0,d.useIsoMorphicEffect)(()=>{s?w("visible"):y(N)||null===o.current||w("hidden")},[s,N]);let U={unmount:r},R=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeEnter)||t.call(e)}),B=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeLeave)||t.call(e)}),M=(0,g.useRender)();return l.default.createElement(v.Provider,{value:N},l.default.createElement(b.Provider,{value:E},M({ourProps:{...U,as:l.Fragment,children:l.default.createElement(C,{ref:x,...U,...n,beforeEnter:R,beforeLeave:B})},theirProps:{},defaultTag:l.Fragment,features:S,visible:"visible"===j,name:"Transition"})))}),C=(0,g.forwardRefWithAs)(function(e,t){var s,a;let{transition:r=!0,beforeEnter:n,afterEnter:o,beforeLeave:j,afterLeave:N,enter:C,enterFrom:T,enterTo:k,entered:I,leave:E,leaveFrom:U,leaveTo:R,...B}=e,[M,F]=(0,l.useState)(null),D=(0,l.useRef)(null),A=p(e),L=(0,u.useSyncRefs)(...A?[D,t,F]:null===t?[]:[t]),O=null==(s=B.unmount)||s?g.RenderStrategy.Unmount:g.RenderStrategy.Hidden,{show:P,appear:z,initial:V}=function(){let e=(0,l.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[$,K]=(0,l.useState)(P?"visible":"hidden"),H=function(){let e=(0,l.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:q,unregister:G}=H;(0,d.useIsoMorphicEffect)(()=>q(D),[q,D]),(0,d.useIsoMorphicEffect)(()=>{if(O===g.RenderStrategy.Hidden&&D.current)return P&&"visible"!==$?void K("visible"):(0,f.match)($,{hidden:()=>G(D),visible:()=>q(D)})},[$,D,q,G,P,O]);let W=(0,c.useServerHandoffComplete)();(0,d.useIsoMorphicEffect)(()=>{if(A&&W&&"visible"===$&&null===D.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,$,W,A]);let J=V&&!z,Q=z&&P&&V,Z=(0,l.useRef)(!1),Y=_(()=>{Z.current||(K("hidden"),G(D))},H),X=(0,i.useEvent)(e=>{Z.current=!0,Y.onStart(D,e?"enter":"leave",e=>{"enter"===e?null==n||n():"leave"===e&&(null==j||j())})}),ee=(0,i.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Y.onStop(D,t,e=>{"enter"===e?null==o||o():"leave"===e&&(null==N||N())}),"leave"!==t||y(Y)||(K("hidden"),G(D))});(0,l.useEffect)(()=>{A&&r||(X(P),ee(P))},[P,A,r]);let et=!(!r||!A||!W||J),[,es]=(0,m.useTransition)(et,M,P,{start:X,end:ee}),el=(0,g.compact)({ref:L,className:(null==(a=(0,x.classNames)(B.className,Q&&C,Q&&T,es.enter&&C,es.enter&&es.closed&&T,es.enter&&!es.closed&&k,es.leave&&E,es.leave&&!es.closed&&U,es.leave&&es.closed&&R,!es.transition&&P&&I))?void 0:a.trim())||void 0,...(0,m.transitionDataAttributes)(es)}),ea=0;"visible"===$&&(ea|=h.State.Open),"hidden"===$&&(ea|=h.State.Closed),es.enter&&(ea|=h.State.Opening),es.leave&&(ea|=h.State.Closing);let er=(0,g.useRender)();return l.default.createElement(v.Provider,{value:Y},l.default.createElement(h.OpenClosedProvider,{value:ea},er({ourProps:el,theirProps:B,defaultTag:w,features:S,visible:"visible"===$,name:"Transition.Child"})))}),T=(0,g.forwardRefWithAs)(function(e,t){let s=null!==(0,l.useContext)(b),a=null!==(0,h.useOpenClosed)();return l.default.createElement(l.default.Fragment,null,!s&&a?l.default.createElement(N,{ref:t,...e}):l.default.createElement(C,{ref:t,...e}))}),k=Object.assign(N,{Child:T,Root:N});e.s(["Transition",()=>k],854056)},206929,e=>{"use strict";var t=e.i(290571),s=e.i(757440),l=e.i(271645),a=e.i(446428),r=e.i(444755),i=e.i(673706),n=e.i(103471),d=e.i(495470),o=e.i(854056),c=e.i(888288);let u=(0,i.makeClassName)("Select"),m=l.default.forwardRef((e,i)=>{let{defaultValue:m="",value:h,onValueChange:x,placeholder:f="Select...",disabled:g=!1,icon:p,enableClear:b=!1,required:j,children:v,name:y,error:_=!1,errorMessage:w,className:S,id:N}=e,C=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),T=(0,l.useRef)(null),k=l.Children.toArray(v),[I,E]=(0,c.default)(m,h),U=(0,l.useMemo)(()=>{let e=l.default.Children.toArray(v).filter(l.isValidElement);return(0,n.constructValueToNameMapping)(e)},[v]);return l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",S)},l.default.createElement("div",{className:"relative"},l.default.createElement("select",{title:"select-hidden",required:j,className:(0,r.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:I,onChange:e=>{e.preventDefault()},name:y,disabled:g,id:N,onFocus:()=>{let e=T.current;e&&e.focus()}},l.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},f),k.map(e=>{let t=e.props.value,s=e.props.children;return l.default.createElement("option",{className:"hidden",key:t,value:t},s)})),l.default.createElement(d.Listbox,Object.assign({as:"div",ref:i,defaultValue:I,value:I,onChange:e=>{null==x||x(e),E(e)},disabled:g,id:N},C),({value:e})=>{var t;return l.default.createElement(l.default.Fragment,null,l.default.createElement(d.ListboxButton,{ref:T,className:(0,r.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",p?"pl-10":"pl-3",(0,n.getSelectButtonColors)((0,n.hasValue)(e),g,_))},p&&l.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},l.default.createElement(p,{className:(0,r.tremorTwMerge)(u("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),l.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=U.get(e))?t:f),l.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},l.default.createElement(s.default,{className:(0,r.tremorTwMerge)(u("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&I?l.default.createElement("button",{type:"button",className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E(""),null==x||x("")}},l.default.createElement(a.default,{className:(0,r.tremorTwMerge)(u("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,l.default.createElement(o.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},l.default.createElement(d.ListboxOptions,{anchor:"bottom start",className:(0,r.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},v)))})),_&&w?l.default.createElement("p",{className:(0,r.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},w):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},502275,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,s],502275)},78085,e=>{"use strict";var t=e.i(290571),s=e.i(103471),l=e.i(888288),a=e.i(271645),r=e.i(444755),i=e.i(673706);let n=(0,i.makeClassName)("Textarea"),d=a.default.forwardRef((e,d)=>{let{value:o,defaultValue:c="",placeholder:u="Type...",error:m=!1,errorMessage:h,disabled:x=!1,className:f,onChange:g,onValueChange:p,autoHeight:b=!1}=e,j=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[v,y]=(0,l.default)(c,o),_=(0,a.useRef)(null),w=(0,s.hasValue)(v);return(0,a.useEffect)(()=>{let e=_.current;if(b&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[b,_,v]),a.default.createElement(a.default.Fragment,null,a.default.createElement("textarea",Object.assign({ref:(0,i.mergeRefs)([_,d]),value:v,placeholder:u,disabled:x,className:(0,r.tremorTwMerge)(n("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,s.getSelectButtonColors)(w,x,m),x?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",f),"data-testid":"text-area",onChange:e=>{null==g||g(e),y(e.target.value),null==p||p(e.target.value)}},j)),m&&h?a.default.createElement("p",{className:(0,r.tremorTwMerge)(n("errorMessage"),"text-sm text-red-500 mt-1")},h):null)});d.displayName="Textarea",e.s(["Textarea",()=>d],78085)},114600,e=>{"use strict";var t=e.i(290571),s=e.i(444755),l=e.i(673706),a=e.i(271645);let r=(0,l.makeClassName)("Divider"),i=a.default.forwardRef((e,l)=>{let{className:i,children:n}=e,d=(0,t.__rest)(e,["className","children"]);return a.default.createElement("div",Object.assign({ref:l,className:(0,s.tremorTwMerge)(r("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",i)},d),n?a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),a.default.createElement("div",{className:(0,s.tremorTwMerge)("text-inherit whitespace-nowrap")},n),a.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):a.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});i.displayName="Divider",e.s(["Divider",()=>i],114600)},910119,e=>{"use strict";var t=e.i(843476),s=e.i(197647),l=e.i(653824),a=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),h=e.i(199133),x=e.i(28651),f=e.i(175712),g=e.i(770914),p=e.i(536916),b=e.i(764205),j=e.i(827252),v=e.i(994388),y=e.i(35983),_=e.i(779241),w=e.i(78085),S=e.i(808613),N=e.i(592968),C=e.i(708347),T=e.i(860585),k=e.i(355619),I=e.i(435451);function E({userData:e,onCancel:s,onSubmit:l,teams:a,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=S.Form.useForm(),[x,f]=(0,n.useState)(!1);return n.default.useEffect(()=>{let t=e.user_info?.max_budget,s=null==t;f(s),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:s?"":t,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,t.jsxs)(S.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(x||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),l(e)},layout:"vertical",children:[!u&&(0,t.jsx)(S.Form.Item,{label:"User ID",name:"user_id",children:(0,t.jsx)(_.TextInput,{disabled:!0})}),!u&&(0,t.jsx)(S.Form.Item,{label:"Email",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(S.Form.Item,{label:"User Alias",name:"user_alias",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(S.Form.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(N.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,t.jsx)(j.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,t.jsx)(h.Select,{children:c&&Object.entries(c).map(([e,{ui_label:s,description:l}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,t.jsx)(S.Form.Item,{label:(0,t.jsxs)("span",{children:["Personal Models"," ",(0,t.jsx)(N.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,t.jsx)(j.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsxs)(h.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!C.all_admin_roles.includes(d||""),children:[(0,t.jsx)(h.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(h.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,t.jsx)(h.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(S.Form.Item,{label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,t.jsx)("span",{children:"Max Budget (USD)"}),(0,t.jsx)(p.Checkbox,{checked:x,onChange:e=>{let t=e.target.checked;f(t),t&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,t)=>x||""!==t&&null!=t?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,t.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:x})}),(0,t.jsx)(S.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)(S.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(w.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(v.Button,{variant:"secondary",type:"button",onClick:s,children:"Cancel"}),(0,t.jsx)(v.Button,{type:"submit",children:"Save Changes"})]})]})}var U=e.i(727749),R=e.i(888259);let{Text:B,Title:M}=c.Typography,F=({open:e,onCancel:s,selectedUsers:l,possibleUIRoles:a,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:j,allowAllUsers:v=!1})=>{let[y,_]=(0,n.useState)(!1),[w,S]=(0,n.useState)([]),[N,C]=(0,n.useState)(null),[T,k]=(0,n.useState)(!1),[I,F]=(0,n.useState)(!1),D=()=>{S([]),C(null),k(!1),F(!1),s()},A=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),L=async e=>{if(console.log("formValues",e),!r)return void U.default.fromBackend("Access token not found");_(!0);try{let t=l.map(e=>e.user_id),a={};e.user_role&&""!==e.user_role&&(a.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(a.max_budget=e.max_budget),e.models&&e.models.length>0&&(a.models=e.models),e.budget_duration&&""!==e.budget_duration&&(a.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(a.metadata=e.metadata);let n=Object.keys(a).length>0,d=T&&w.length>0;if(!n&&!d)return void U.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,b.userBulkUpdateUserCall)(r,a,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,b.userBulkUpdateUserCall)(r,a,t),o.push(`Updated ${t.length} user(s)`);if(d){let e=[];for(let t of w)try{let s=null;s=I?null:l.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let a=await (0,b.teamBulkMemberAddCall)(r,t,s||null,N||void 0,I);console.log("result",a),e.push({teamId:t,success:!0,successfulAdditions:a.successful_additions,failedAdditions:a.failed_additions})}catch(s){console.error(`Failed to add users to team ${t}:`,s),e.push({teamId:t,success:!1,error:s})}let t=e.filter(e=>e.success),s=e.filter(e=>!e.success);if(t.length>0){let e=t.reduce((e,t)=>e+t.successfulAdditions,0);o.push(`Added users to ${t.length} team(s) (${e} total additions)`)}s.length>0&&R.default.warning(`Failed to add users to ${s.length} team(s)`)}o.length>0&&U.default.success(o.join(". ")),S([]),C(null),k(!1),F(!1),i(),s()}catch(e){console.error("Bulk operation failed:",e),U.default.fromBackend("Failed to perform bulk operations")}finally{_(!1)}};return(0,t.jsxs)(o.Modal,{open:e,onCancel:D,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${l.length} User(s)`,width:800,children:[v&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(p.Checkbox,{checked:I,onChange:e=>F(e.target.checked),children:(0,t.jsx)(B,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsx)(B,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(M,{level:5,children:["Selected Users (",l.length,"):"]}),(0,t.jsx)(m.Table,{size:"small",bordered:!0,dataSource:l,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,t.jsx)(B,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:a?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,t.jsx)(u.Divider,{}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)(B,{children:[(0,t.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,t.jsx)(f.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,t.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsx)(p.Checkbox,{checked:T,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Select Teams:"}),(0,t.jsx)(h.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:w,onChange:S,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Team Budget (Optional):"}),(0,t.jsx)(x.InputNumber,{placeholder:"Max budget per user in team",value:N,onChange:e=>C(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,t.jsx)(E,{userData:A,onCancel:D,onSubmit:L,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:j,possibleUIRoles:a,isBulkEdit:!0}),y&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,t.jsxs)(B,{children:["Updating ",I?"all users":l.length," user(s)..."]})})]})};var D=e.i(371455);let A=({visible:e,possibleUIRoles:s,onCancel:l,user:a,onSubmit:r})=>{let[i,c]=(0,n.useState)(a),[u]=S.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[a]);let m=async()=>{u.resetFields(),l()},f=async e=>{r(e),u.resetFields(),l()};return a?(0,t.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+a.user_id,width:1e3,children:(0,t.jsx)(S.Form,{form:u,onFinish:f,initialValues:a,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(S.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(S.Form.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(h.Select,{children:s&&Object.entries(s).map(([e,{ui_label:s,description:l}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,t.jsx)(S.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,t.jsx)(x.InputNumber,{min:0,step:.01})}),(0,t.jsx)(S.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,t.jsx)(I.default,{min:0,step:.01})}),(0,t.jsx)(S.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var L=e.i(172372),O=e.i(500330),P=e.i(152473),z=e.i(266027),V=e.i(912598),$=e.i(127952),K=e.i(304967),H=e.i(629569),q=e.i(599724),G=e.i(114600),W=e.i(482725),J=e.i(790848),Q=e.i(646563),Z=e.i(955135);let Y=({accessToken:e,possibleUIRoles:s,userID:l,userRole:a})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,f]=(0,n.useState)(!1),[g,p]=(0,n.useState)({}),[j,v]=(0,n.useState)(!1),[y,w]=(0,n.useState)([]),{Paragraph:S}=c.Typography,{Option:N}=h.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let t=await (0,b.getInternalUserSettings)(e);if(u(t),p(t.values||{}),e)try{let t=await (0,b.modelAvailableCall)(e,l,a);if(t&&t.data){let e=t.data.map(e=>e.id);w(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),U.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let C=async()=>{if(e){v(!0);try{let t=Object.entries(g).reduce((e,[t,s])=>(e[t]=""===s?null:s,e),{}),s=await (0,b.updateInternalUserSettings)(e,t);u({...o,values:s.settings}),f(!1)}catch(e){console.error("Error updating SSO settings:",e),U.default.fromBackend("Failed to update settings: "+e)}finally{v(!1)}}},I=(e,t)=>{p(s=>({...s,[e]:t}))},E=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(W.Spin,{size:"large"})}):o?(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(d.Button,{onClick:()=>{f(!1),p(o.values||{})},disabled:j,children:"Cancel"}),(0,t.jsx)(d.Button,{type:"primary",onClick:C,loading:j,children:"Save Changes"})]}):(0,t.jsx)(d.Button,{type:"primary",onClick:()=>f(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,t.jsx)(S,{className:"mb-4",children:o.field_schema.description}),(0,t.jsx)(G.Divider,{}),(0,t.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:l}=o;return l&&l.properties?Object.entries(l.properties).map(([l,a])=>{let r=e[l],i=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,t.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,t.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,t.jsx)(S,{className:"text-sm text-gray-500 mt-1",children:a.description||"No description available"}),m?(0,t.jsx)("div",{className:"mt-2",children:((e,l,a)=>{let r=l.type;if("teams"===e){let s,l;return(0,t.jsx)("div",{className:"mt-2",children:(s=E(g[e]||[]),l=(e,t,l)=>{let a=[...s];a[e]={...a[e],[t]:l},I("teams",a)},(0,t.jsxs)("div",{className:"space-y-3",children:[s.map((e,a)=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)(q.Text,{className:"font-medium",children:["Team ",a+1]}),(0,t.jsx)(d.Button,{size:"small",danger:!0,icon:(0,t.jsx)(Z.DeleteOutlined,{}),onClick:()=>{I("teams",s.filter((e,t)=>t!==a))},children:"Remove"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,t.jsx)(_.TextInput,{value:e.team_id,onChange:e=>l(a,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,t.jsx)(x.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>l(a,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,t.jsxs)(h.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>l(a,"user_role",e),children:[(0,t.jsx)(N,{value:"user",children:"User"}),(0,t.jsx)(N,{value:"admin",children:"Admin"})]})]})]})]},a)),(0,t.jsx)(d.Button,{icon:(0,t.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...s,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&s)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:g[e]||"",onChange:t=>I(e,t),className:"mt-2",children:Object.entries(s).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:s,description:l}])=>(0,t.jsx)(N,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:l})]})},e))});if("budget_duration"===e)return(0,t.jsx)(T.default,{value:g[e]||null,onChange:t=>I(e,t),className:"mt-2"});if("boolean"===r)return(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(J.Switch,{checked:!!g[e],onChange:t=>I(e,t)})});if("array"===r&&l.items?.enum)return(0,t.jsx)(h.Select,{mode:"multiple",style:{width:"100%"},value:g[e]||[],onChange:t=>I(e,t),className:"mt-2",children:l.items.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else if("models"===e)return(0,t.jsxs)(h.Select,{mode:"multiple",style:{width:"100%"},value:g[e]||[],onChange:t=>I(e,t),className:"mt-2",children:[(0,t.jsx)(N,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,t.jsx)(N,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),y.map(e=>(0,t.jsx)(N,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&l.enum)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:g[e]||"",onChange:t=>I(e,t),className:"mt-2",children:l.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else return(0,t.jsx)(_.TextInput,{value:void 0!==g[e]?String(g[e]):"",onChange:t=>I(e,t.target.value),placeholder:l.description||"",className:"mt-2"})})(l,a,0)}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,l)=>{if(null==l)return(0,t.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(l)){if(0===l.length)return(0,t.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=E(l);return(0,t.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,s)=>(0,t.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,t.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,t.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,O.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,t.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},s))})}if("user_role"===e&&s&&s[l]){let{ui_label:e,description:a}=s[l];return(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:e}),a&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:a})]})}if("budget_duration"===e)return(0,t.jsx)("span",{children:(0,T.getBudgetDurationLabel)(l)});if("boolean"==typeof l)return(0,t.jsx)("span",{children:l?"Enabled":"Disabled"});if("models"===e&&Array.isArray(l))return 0===l.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},s))});if("object"==typeof l)return Array.isArray(l)?0===l.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(l,null,2)});return(0,t.jsx)("span",{children:String(l)})})(l,r)})]},l)}):(0,t.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,t.jsx)(K.Card,{children:(0,t.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var X=e.i(389083),ee=e.i(350967),et=e.i(752978),es=e.i(591935),el=e.i(68155),ea=e.i(502275),er=e.i(278587),ei=e.i(166406);let en=(e,s,l,a,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(N.Tooltip,{title:e.original.user_id,children:(0,t.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,t.jsx)(N.Tooltip,{title:"Copy User ID",children:(0,t.jsx)(ei.CopyOutlined,{onClick:t=>{t.stopPropagation(),(0,O.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:s})=>(0,t.jsx)("span",{className:"text-xs",children:e?.[s.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.spend?(0,O.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"SSO ID"}),(0,t.jsx)(N.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,t.jsx)(ea.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,t.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,t.jsxs)(X.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,t.jsx)(X.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(N.Tooltip,{title:"Edit user details",children:(0,t.jsx)(et.Icon,{icon:es.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(N.Tooltip,{title:"Delete user",children:(0,t.jsx)(et.Icon,{icon:el.TrashIcon,size:"sm",onClick:()=>l(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,t.jsx)(N.Tooltip,{title:"Reset Password",children:(0,t.jsx)(et.Icon,{icon:er.RefreshIcon,size:"sm",onClick:()=>a(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:s,isUserSelected:l,isAllSelected:a,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,t.jsx)(p.Checkbox,{indeterminate:r,checked:a,onChange:e=>s(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:s})=>(0,t.jsx)(p.Checkbox,{checked:l(s.original),onChange:t=>e(s.original,t.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var ed=e.i(152990),eo=e.i(682830),ec=e.i(269200),eu=e.i(427612),em=e.i(64848),eh=e.i(942232),ex=e.i(496020),ef=e.i(977572),eg=e.i(206929),ep=e.i(94629),eb=e.i(360820),ej=e.i(871943),ev=e.i(981339),ey=e.i(530212),e_=e.i(988297),ew=e.i(118366),eS=e.i(678784);function eN({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:x,possibleUIRoles:f,initialTab:g=0,startInEditMode:p=!1}){let[j,y]=(0,n.useState)(null),[_,w]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[R,B]=(0,n.useState)(!1),[M,F]=(0,n.useState)(!0),[D,A]=(0,n.useState)(p),[P,z]=(0,n.useState)([]),[V,G]=(0,n.useState)(!1),[W,J]=(0,n.useState)(null),[Q,Z]=(0,n.useState)(null),[Y,X]=(0,n.useState)(g),[et,es]=(0,n.useState)({}),[ea,ei]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,eg]=(0,n.useState)(!1),[ep,eb]=(0,n.useState)(null),[ej,ev]=(0,n.useState)(!1),[eN,eC]=(0,n.useState)(!1),[eT,ek]=(0,n.useState)([]),[eI,eE]=(0,n.useState)(""),[eU,eR]=(0,n.useState)("user"),[eB,eM]=(0,n.useState)(!1);n.default.useEffect(()=>{Z((0,b.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0)try{let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),s=await Promise.all(e);w(s)}catch{w(t.teams.map(e=>({team_id:e,team_alias:null})))}let s=(await (0,b.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(s)}catch(e){console.error("Error fetching user data:",e),U.default.fromBackend("Failed to fetch user data")}finally{F(!1)}})()},[u,e,m]);let eF="proxy_admin"===m||"Admin"===m,eD=async()=>{if(u){eM(!0);try{let e=await (0,b.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eM(!1)}}},eA=async()=>{if(u&&eI){ev(!0);try{await (0,b.teamMemberAddCall)(u,eI,{role:eU,user_id:e}),U.default.success("User added to team successfully"),ed(!1);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});w(await Promise.all(e))}else w([])}catch(e){console.error("Error adding user to team:",e),U.default.fromBackend(e?.message||"Failed to add user to team")}finally{ev(!1)}}},eL=async()=>{if(u&&ep){eC(!0);try{await (0,b.teamMemberDeleteCall)(u,ep.team_id,{role:"user",user_id:e}),U.default.success("User removed from team successfully"),eg(!1),eb(null);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});w(await Promise.all(e))}else w([])}catch(e){console.error("Error removing user from team:",e),U.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eC(!1)}}},eO=eT.filter(e=>!_.some(t=>t.team_id===e.team_id)),eP=async()=>{if(!u)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let t=await (0,b.invitationCreateCall)(u,e);J(t),G(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;B(!0),await (0,b.userDeleteCall)(u,[e]),U.default.success("User deleted successfully"),x&&x(),c()}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{I(!1),B(!1)}},eV=async e=>{try{if(!u||!j)return;await (0,b.userUpdateUserCall)(u,e,null),y({...j,user_email:e.user_email??j.user_email,user_alias:e.user_alias??j.user_alias,models:e.models??j.models,max_budget:e.max_budget??j.max_budget,budget_duration:e.budget_duration??j.budget_duration,metadata:e.metadata??j.metadata}),U.default.success("User updated successfully"),A(!1)}catch(e){console.error("Error updating user:",e),U.default.fromBackend("Failed to update user")}};if(M)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:ey.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"Loading user data..."})]});if(!j)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:ey.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"User not found"})]});let e$=async(e,t)=>{await (0,O.copyToClipboard)(e)&&(es(e=>({...e,[t]:!0})),setTimeout(()=>{es(e=>({...e,[t]:!1}))},2e3))},eK={user_id:j.user_id,user_info:{user_email:j.user_email,user_alias:j.user_alias,user_role:j.user_role,models:j.models,max_budget:j.max_budget,budget_duration:j.budget_duration,metadata:j.metadata}};return(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)(v.Button,{icon:ey.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(H.Title,{children:j.user_email||"User"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"text-gray-500 font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eS.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(v.Button,{icon:er.RefreshIcon,variant:"secondary",onClick:eP,className:"flex items-center",children:"Reset Password"}),(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,t.jsx)($.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:j.user_email},{label:"User ID",value:j.user_id,code:!0},{label:"Global Proxy Role",value:j.user_role&&f?.[j.user_role]?.ui_label||j.user_role||"-"},{label:"Total Spend (USD)",value:null!==j.spend&&void 0!==j.spend?j.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:R}),(0,t.jsxs)(l.TabGroup,{defaultIndex:Y,onIndexChange:X,children:[(0,t.jsxs)(a.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Overview"}),(0,t.jsx)(s.Tab,{children:"Details"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(H.Title,{children:["$",(0,O.formatNumberWithCommas)(j.spend||0,4)]}),(0,t.jsxs)(q.Text,{children:["of"," ",null!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"]})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)(q.Text,{children:"Teams"}),eF&&(0,t.jsx)(v.Button,{icon:e_.PlusIcon,variant:"light",size:"xs",onClick:()=>{eE(""),eR("user"),ed(!0),eD()},children:"Add Team"})]}),(0,t.jsxs)("div",{className:"mt-2",children:[_.length>0?(0,t.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,t.jsxs)(ec.Table,{children:[(0,t.jsx)(eu.TableHead,{children:(0,t.jsxs)(ex.TableRow,{children:[(0,t.jsx)(em.TableHeaderCell,{children:"Team Name"}),eF&&(0,t.jsx)(em.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,t.jsx)(eh.TableBody,{children:_.slice(0,ea?_.length:20).map(e=>(0,t.jsxs)(ex.TableRow,{children:[(0,t.jsx)(ef.TableCell,{children:e.team_alias||e.team_id}),eF&&(0,t.jsx)(ef.TableCell,{className:"text-right",children:(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{eb(e),eg(!0)}})})]},e.team_id))})]})}):(0,t.jsx)(q.Text,{children:"No teams"}),!ea&&_.length>20&&(0,t.jsxs)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>ei(!0),children:["+",_.length-20," more"]}),ea&&_.length>20&&(0,t.jsx)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>ei(!1),children:"Show Less"})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Personal Models"}),(0,t.jsx)("div",{className:"mt-2",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)(q.Text,{children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"User Settings"}),!D&&m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsx)(v.Button,{onClick:()=>A(!0),children:"Edit Settings"})]}),D&&j?(0,t.jsx)(E,{userData:eK,onCancel:()=>A(!1),onSubmit:eV,teams:_,accessToken:u,userID:e,userRole:m,userModels:P,possibleUIRoles:f}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eS.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,t.jsx)(q.Text,{children:j.user_email||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,t.jsx)(q.Text,{children:j.user_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,t.jsx)(q.Text,{children:j.user_role||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(q.Text,{children:j.created_at?new Date(j.created_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(q.Text,{children:j.updated_at?new Date(j.updated_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsx)(q.Text,{children:null!==j.max_budget&&void 0!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,t.jsx)(q.Text,{children:(0,T.getBudgetDurationLabel)(j.budget_duration??null)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(j.metadata||{},null,2)})]})]})]})})]})]}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:V,setIsInvitationLinkModalVisible:G,baseUrl:Q||"",invitationLinkData:W,modalType:"resetPassword"}),(0,t.jsx)($.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ep?.team_alias||ep?.team_id},{label:"User ID",value:j?.user_id,code:!0},{label:"Email",value:j?.user_email}],onCancel:()=>{eg(!1),eb(null)},onOk:eL,confirmLoading:eN}),(0,t.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!ej,children:(0,t.jsxs)(S.Form,{layout:"vertical",onFinish:eA,children:[(0,t.jsx)(S.Form.Item,{label:"Team",required:!0,children:(0,t.jsx)(h.Select,{showSearch:!0,value:eI||void 0,onChange:eE,placeholder:"Select a team",filterOption:(e,t)=>{let s=eO.find(e=>e.team_id===t?.value);return!!s&&s.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eB,children:eO.map(e=>(0,t.jsx)(h.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,t.jsx)(S.Form.Item,{label:"Member Role",children:(0,t.jsxs)(h.Select,{value:eU,onChange:eR,children:[(0,t.jsx)(h.Select.Option,{value:"user",children:(0,t.jsxs)(N.Tooltip,{title:"Can view team info, but not manage it",children:[(0,t.jsx)("span",{className:"font-medium",children:"user"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,t.jsx)(h.Select.Option,{value:"admin",children:(0,t.jsxs)(N.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,t.jsx)("span",{className:"font-medium",children:"admin"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:ej,disabled:!eI,children:ej?"Adding...":"Add to Team"})})]})})]})}var eC=e.i(655913),eT=e.i(38419),ek=e.i(78334),eI=e.i(555436),eE=e.i(284614);let eU=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eR({data:e=[],columns:s,isLoading:l=!1,onSortChange:a,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:h=[],onSelectionChange:x,enableSelection:f=!1,filters:g,updateFilters:p,initialFilters:b,teams:j,userListResponse:v,currentPage:_,handlePageChange:w}){let[S,N]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[C,T]=n.default.useState(null),[k,I]=n.default.useState(!1),[E,U]=n.default.useState(!1),R=(e,t=!1)=>{T(e),I(t)},B=(e,t)=>{x&&(t?x([...h,e]):x(h.filter(t=>t.user_id!==e.user_id)))},M=t=>{x&&(t?x(e):x([]))},F=e=>h.some(t=>t.user_id===e.user_id),D=e.length>0&&h.length===e.length,A=h.length>0&&h.lengtho?en(o,c,u,m,R,f?{selectedUsers:h,onSelectUser:B,onSelectAll:M,isUserSelected:F,isAllSelected:D,isIndeterminate:A}:void 0):s,[o,c,u,m,R,s,f,h,D,A]),O=(0,ed.useReactTable)({data:e,columns:L,state:{sorting:S},onSortingChange:e=>{let t="function"==typeof e?e(S):e;if(N(t),t&&Array.isArray(t)&&t.length>0&&t[0]){let e=t[0];if(e.id){let t=e.id,s=e.desc?"desc":"asc";a?.(t,s)}}else a?.("created_at","desc")},getCoreRowModel:(0,eo.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&N([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),C)?(0,t.jsx)(eN,{userId:C,onClose:()=>{T(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(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)(eC.FilterInput,{placeholder:"Search by email...",value:g.email,onChange:e=>p({email:e}),icon:eI.Search}),(0,t.jsx)(eT.FiltersButton,{onClick:()=>U(!E),active:E,hasActiveFilters:!!(g.user_id||g.user_role||g.team)}),(0,t.jsx)(ek.ResetFiltersButton,{onClick:()=>{p(b)}})]}),E&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)(eC.FilterInput,{placeholder:"Filter by User ID",value:g.user_id,onChange:e=>p({user_id:e}),icon:eE.User}),(0,t.jsx)(eC.FilterInput,{placeholder:"Filter by SSO ID",value:g.sso_user_id,onChange:e=>p({sso_user_id:e}),icon:eU}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(eg.Select,{value:g.user_role,onValueChange:e=>p({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s.ui_label},e))})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(eg.Select,{value:g.team,onValueChange:e=>p({team:e}),placeholder:"Select Team",children:j?.map(e=>(0,t.jsx)(y.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[l?(0,t.jsx)(ev.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",v&&v.users&&v.users.length>0?(v.page-1)*v.page_size+1:0," ","-"," ",v&&v.users?Math.min(v.page*v.page_size,v.total):0," ","of ",v?v.total:0," results"]}),(0,t.jsx)("div",{className:"flex space-x-2",children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ev.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,t.jsx)(ev.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>w(_-1),disabled:1===_,className:`px-3 py-1 text-sm border rounded-md ${1===_?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,t.jsx)("button",{onClick:()=>w(_+1),disabled:!v||_>=v.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!v||_>=v.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,t.jsx)("div",{className:"overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(ec.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(eu.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(ex.TableRow,{children:e.headers.map(e=>(0,t.jsx)(em.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,ed.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(eb.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ej.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(ep.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(eh.TableBody,{children:l?(0,t.jsx)(ex.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?O.getRowModel().rows.map(e=>(0,t.jsx)(ex.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(ef.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&R(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,ed.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(ex.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eB,Title:eM}=c.Typography,eF={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:h})=>{let x=!!c&&(0,C.isProxyAdminRole)(c),f=(0,V.useQueryClient)(),[g,p]=(0,n.useState)(1),[j,v]=(0,n.useState)(!1),[y,_]=(0,n.useState)(null),[w,S]=(0,n.useState)(!1),[N,T]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[E,R]=(0,n.useState)("users"),[B,M]=(0,n.useState)(eF),[K,H,q]=(0,P.useDebouncedState)(B,{wait:300}),[G,W]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Z,X]=(0,n.useState)(null),[ee,et]=(0,n.useState)([]),[es,el]=(0,n.useState)(!1),[ea,er]=(0,n.useState)(!1),[ei,ed]=(0,n.useState)([]),eo=e=>{I(e),S(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{X((0,b.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let t=(await (0,b.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",t),ed(t)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{M(t=>{let s={...t,...e};return H(s),s})},eu=(e,t)=>{ec({sort_by:e,sort_order:t})},em=async t=>{if(!e)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let s=await (0,b.invitationCreateCall)(e,t);Q(s),W(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},eh=async()=>{if(k&&e)try{T(!0),await (0,b.userDeleteCall)(e,[k.user_id]),f.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:t}}),U.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{S(!1),I(null),T(!1)}},ex=async()=>{_(null),v(!1)},ef=async t=>{if(console.log("inside handleEditSubmit:",t),e&&o&&c&&u){try{let s=await (0,b.userUpdateUserCall)(e,t,null);f.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.map(e=>e.user_id===s.data.user_id?(0,O.updateExistingKeys)(e,s.data):e);return{...e,users:t}}),U.default.success(`User ${t.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}_(null),v(!1)}},eg=async e=>{p(e)},ep=e=>{et(e)},eb=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:K,currentPage:g,orgAdminOrgIds:h}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.userListCall)(e,K.user_id?[K.user_id]:null,g,25,K.email||null,K.user_role||null,K.team||null,K.sso_user_id||null,K.sort_by,K.sort_order,h?h.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),ej=eb.data,ey=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,e_=en(ey,e=>{_(e),v(!0)},eo,em,()=>{});return(0,t.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("div",{className:"flex space-x-3",children:eb.isLoading?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ev.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,t.jsx)(ev.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,t.jsx)(ev.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ey}),x&&(0,t.jsx)(d.Button,{onClick:()=>{er(!ea),et([])},type:ea?"primary":"default",className:"flex items-center",children:ea?"Cancel Selection":"Select Users"}),x&&ea&&(0,t.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?U.default.fromBackend("Please select users to edit"):el(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),x?(0,t.jsxs)(l.TabGroup,{defaultIndex:0,onIndexChange:e=>R(0===e?"users":"settings"),children:[(0,t.jsxs)(a.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Users"}),(0,t.jsx)(s.Tab,{children:"Default User Settings"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsx)(eR,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ey,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:ea,selectedUsers:ee,onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eF,teams:m,userListResponse:ej,currentPage:g,handlePageChange:eg})}),(0,t.jsx)(r.TabPanel,{children:u&&c&&e?(0,t.jsx)(Y,{accessToken:e,possibleUIRoles:ey,userID:u,userRole:c}):(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(ev.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,t.jsx)(eR,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ey,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eF,teams:m,userListResponse:ej,currentPage:g,handlePageChange:eg}),(0,t.jsx)(A,{visible:j,possibleUIRoles:ey,onCancel:ex,user:y,onSubmit:ef}),(0,t.jsx)($.default,{isOpen:w,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ey?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{S(!1),I(null)},onOk:eh,confirmLoading:N}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:G,setIsInvitationLinkModalVisible:W,baseUrl:Z||"",invitationLinkData:J,modalType:"resetPassword"}),(0,t.jsx)(F,{open:es,onCancel:()=>el(!1),selectedUsers:ee,possibleUIRoles:ey,accessToken:e,onSuccess:()=>{f.invalidateQueries({queryKey:["userList"]}),et([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,C.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7e2dbe0d25a79405.js b/litellm/proxy/_experimental/out/_next/static/chunks/7e2dbe0d25a79405.js new file mode 100644 index 0000000000..8baf346062 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/7e2dbe0d25a79405.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214),r=e.i(708347);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,a.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&r.all_admin_roles.includes(s)})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7e4551c11f7f1e8a.js b/litellm/proxy/_experimental/out/_next/static/chunks/7e4551c11f7f1e8a.js deleted file mode 100644 index 2ed38553b5..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/7e4551c11f7f1e8a.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,596115,e=>{"use strict";var s=e.i(843476),l=e.i(271645),a=e.i(912598),t=e.i(109799),r=e.i(764205),i=e.i(584578),o=e.i(808613),n=e.i(56567),d=e.i(468133),c=e.i(708347),m=e.i(304967),u=e.i(994388),h=e.i(309426),x=e.i(599724),p=e.i(350967),g=e.i(404206),_=e.i(747871),j=e.i(500330),f=e.i(752978),b=e.i(197647),y=e.i(653824),v=e.i(881073),w=e.i(723731),T=e.i(278587);let C=({lastRefreshed:e,onRefresh:l,userRole:a,children:t})=>(0,s.jsxs)(y.TabGroup,{className:"gap-2 h-[75vh] w-full",children:[(0,s.jsxs)(v.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)(b.Tab,{children:"Your Teams"}),(0,s.jsx)(b.Tab,{children:"Available Teams"}),(0,c.isAdminRole)(a||"")&&(0,s.jsx)(b.Tab,{children:"Default Team Settings"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[e&&(0,s.jsxs)(x.Text,{children:["Last Refreshed: ",e]}),(0,s.jsx)(f.Icon,{icon:T.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:l})]})]}),(0,s.jsx)(w.TabPanels,{children:t})]});var N=e.i(206929),S=e.i(35983);let k=({filters:e,organizations:l,showFilters:a,onToggleFilters:t,onChange:r,onReset:i})=>(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Search by Team Name...",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:e.team_alias,onChange:e=>r("team_alias",e.target.value)}),(0,s.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,s.jsxs)("button",{className:`px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ${a?"bg-gray-100":""}`,onClick:()=>t(!a),children:[(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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filters",(e.team_id||e.team_alias||e.organization_id)&&(0,s.jsx)("span",{"data-testid":"active-filter-indicator",className:"w-2 h-2 rounded-full bg-blue-500"})]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:i,children:[(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 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"})}),"Reset Filters"]})]}),a&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Enter Team ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:e.team_id,onChange:e=>r("team_id",e.target.value)}),(0,s.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(N.Select,{value:e.organization_id||"",onValueChange:e=>r("organization_id",e),placeholder:"Select Organization",children:l?.map(e=>(0,s.jsx)(S.SelectItem,{value:e.organization_id||"",children:e.organization_alias||e.organization_id},e.organization_id))})})]})]});var I=e.i(135214),F=e.i(269200),A=e.i(942232),z=e.i(977572),O=e.i(427612),M=e.i(64848),D=e.i(496020),L=e.i(592968),P=e.i(591935),E=e.i(68155),B=e.i(389083),R=e.i(871943),V=e.i(502547),H=e.i(355619);let U=({team:e})=>{let[a,t]=(0,l.useState)(!1),r=!e.models||0===e.models.length||e.models.includes("all-proxy-models"),i=(0,l.useMemo)(()=>{if(r)return[];let s=e.models.map(e=>({name:e,source:"direct"}));for(let l of e.access_group_models||[])s.push({name:l,source:"access_group"});return s},[e.models,e.access_group_models,r]),o=(e,l)=>{if("all-proxy-models"===e.name)return(0,s.jsx)(B.Badge,{size:"xs",color:"red",children:(0,s.jsx)(x.Text,{children:"All Proxy Models"})},l);let a=(0,H.getModelDisplayName)(e.name),t=a.length>30?`${a.slice(0,30)}...`:a;return(0,s.jsx)(B.Badge,{size:"xs",color:"access_group"===e.source?"green":"blue",title:"access_group"===e.source?"From access group":"Direct assignment",children:(0,s.jsx)(x.Text,{children:t})},l)};return(0,s.jsx)(z.TableCell,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:i.length>3?"px-0":"",children:(0,s.jsx)("div",{className:"flex flex-col",children:0===i.length?(0,s.jsx)(B.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,s.jsx)(x.Text,{children:"All Proxy Models"})}):(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("div",{className:"flex items-start",children:[i.length>3&&(0,s.jsx)("div",{children:(0,s.jsx)(f.Icon,{icon:a?R.ChevronDownIcon:V.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{t(e=>!e)}})}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[i.slice(0,3).map((e,s)=>o(e,s)),i.length>3&&!a&&(0,s.jsx)(B.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,s.jsxs)(x.Text,{children:["+",i.length-3," ",i.length-3==1?"more model":"more models"]})}),a&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:i.slice(3).map((e,s)=>o(e,s+3))})]})]})})})})};var W=e.i(918549),W=W,K=e.i(846753),K=K;let G=({team:e,userId:l})=>{var a;let t,r=(a=((e,s)=>{if(!s)return null;let l=e.members_with_roles?.find(e=>e.user_id===s);return l?.role??null})(e,l),t="inline-flex items-center px-2.5 py-0.5 rounded-md text-xs font-medium border","admin"===a?(0,s.jsxs)("span",{className:t,style:{backgroundColor:"#EEF2FF",color:"#3730A3",borderColor:"#C7D2FE"},children:[(0,s.jsx)(W.default,{className:"h-3 w-3 mr-1"}),"Admin"]}):(0,s.jsxs)("span",{className:t,style:{backgroundColor:"#F3F4F6",color:"#4B5563",borderColor:"#E5E7EB"},children:[(0,s.jsx)(K.default,{className:"h-3 w-3 mr-1"}),"Member"]}));return(0,s.jsx)(z.TableCell,{children:r})},J=({teams:e,currentOrg:l,setSelectedTeamId:a,perTeamInfo:t,userRole:r,userId:i,setEditTeam:o,onDeleteTeam:n})=>(0,s.jsxs)(F.Table,{children:[(0,s.jsx)(O.TableHead,{children:(0,s.jsxs)(D.TableRow,{children:[(0,s.jsx)(M.TableHeaderCell,{children:"Team Name"}),(0,s.jsx)(M.TableHeaderCell,{children:"Team ID"}),(0,s.jsx)(M.TableHeaderCell,{children:"Created"}),(0,s.jsx)(M.TableHeaderCell,{children:"Spend (USD)"}),(0,s.jsx)(M.TableHeaderCell,{children:"Budget (USD)"}),(0,s.jsx)(M.TableHeaderCell,{children:"Models"}),(0,s.jsx)(M.TableHeaderCell,{children:"Organization"}),(0,s.jsx)(M.TableHeaderCell,{children:"Your Role"}),(0,s.jsx)(M.TableHeaderCell,{children:"Info"})]})}),(0,s.jsx)(A.TableBody,{children:e&&e.length>0?e.filter(e=>!l||e.organization_id===l.organization_id).sort((e,s)=>new Date(s.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,s.jsxs)(D.TableRow,{children:[(0,s.jsx)(z.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.team_alias}),(0,s.jsx)(z.TableCell,{children:(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(L.Tooltip,{title:e.team_id,children:(0,s.jsxs)(u.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]","data-testid":"team-id-cell",onClick:()=>{a(e.team_id)},children:[e.team_id.slice(0,7),"..."]})})})}),(0,s.jsx)(z.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,s.jsx)(z.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:(0,j.formatNumberWithCommas)(e.spend,4)}),(0,s.jsx)(z.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:null!==e.max_budget&&void 0!==e.max_budget?e.max_budget:"No limit"}),(0,s.jsx)(U,{team:e}),(0,s.jsx)(z.TableCell,{children:e.organization_id}),(0,s.jsx)(G,{team:e,userId:i}),(0,s.jsxs)(z.TableCell,{children:[(0,s.jsxs)(x.Text,{children:[t&&e.team_id&&t[e.team_id]&&t[e.team_id].keys&&t[e.team_id].keys.length," ","Keys"]}),(0,s.jsxs)(x.Text,{children:[t&&e.team_id&&t[e.team_id]&&t[e.team_id].team_info&&t[e.team_id].team_info.members_with_roles&&t[e.team_id].team_info.members_with_roles.length," ","Members"]})]}),(0,s.jsx)(z.TableCell,{children:"Admin"==r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Icon,{icon:P.PencilAltIcon,size:"sm",onClick:()=>{a(e.team_id),o(!0)}}),(0,s.jsx)(f.Icon,{onClick:()=>n(e.team_id),icon:E.TrashIcon,size:"sm"})]}):null})]},e.team_id)):null})]});var $=e.i(582458),$=$,q=e.i(995926);let Q=({teams:e,teamToDelete:a,onCancel:t,onConfirm:r})=>{let[i,o]=(0,l.useState)(""),n=e?.find(e=>e.team_id===a),d=n?.team_alias||"",c=n?.keys?.length||0,m=i===d;return(0,s.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl min-h-[380px] py-6 overflow-hidden transform transition-all flex flex-col justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Delete Team"}),(0,s.jsx)("button",{"aria-label":"Close",onClick:()=>{t(),o("")},className:"text-gray-400 hover:text-gray-500 focus:outline-none",children:(0,s.jsx)(q.XIcon,{size:20})})]}),(0,s.jsxs)("div",{className:"px-6 py-4",children:[c>0&&(0,s.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-red-50 border border-red-100 rounded-md mb-5",children:[(0,s.jsx)("div",{className:"text-red-500 mt-0.5",children:(0,s.jsx)($.default,{size:20})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-base font-medium text-red-600",children:["Warning: This team has ",c," associated key",c>1?"s":"","."]}),(0,s.jsx)("p",{className:"text-base text-red-600 mt-2",children:"Deleting the team will also delete all associated keys. This action is irreversible."})]})]}),(0,s.jsx)("p",{className:"text-base text-gray-600 mb-5",children:"Are you sure you want to force delete this team and all its keys?"}),(0,s.jsxs)("div",{className:"mb-5",children:[(0,s.jsxs)("label",{className:"block text-base font-medium text-gray-700 mb-2",children:["Type ",(0,s.jsx)("span",{className:"underline",children:d})," to confirm deletion:"]}),(0,s.jsx)("input",{type:"text",value:i,onChange:e=>o(e.target.value),placeholder:"Enter team name exactly",className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]})]})]}),(0,s.jsxs)("div",{className:"px-6 py-4 bg-gray-50 flex justify-end gap-4",children:[(0,s.jsx)("button",{onClick:()=>{t(),o("")},className:"px-5 py-3 bg-white border border-gray-300 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Cancel"}),(0,s.jsx)("button",{onClick:r,disabled:!m,className:`px-5 py-3 rounded-md text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 ${m?"bg-red-600 hover:bg-red-700":"bg-red-300 cursor-not-allowed"}`,children:"Force Delete"})]})]})})};var Y=e.i(464571),X=e.i(311451),Z=e.i(212931),ee=e.i(199133),es=e.i(790848),el=e.i(677667),ea=e.i(130643),et=e.i(898667),er=e.i(779241),ei=e.i(827252),eo=e.i(435451),en=e.i(916940),ed=e.i(75921),ec=e.i(552130),em=e.i(651904),eu=e.i(533882),eh=e.i(727749),ex=e.i(390605);let ep=({isTeamModalVisible:e,handleOk:i,handleCancel:n,currentOrg:d,organizations:c,teams:m,setTeams:u,modelAliases:h,setModelAliases:p,loggingSettings:g,setLoggingSettings:_,setIsTeamModalVisible:j})=>{let{userId:f,userRole:b,accessToken:y,premiumUser:v}=(0,I.default)(),w=(0,a.useQueryClient)(),[T]=o.Form.useForm(),[C,N]=(0,l.useState)([]),[S,k]=(0,l.useState)(null),[F,A]=(0,l.useState)([]),[z,O]=(0,l.useState)([]),[M,D]=(0,l.useState)([]),[P,E]=(0,l.useState)([]),[B,R]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{try{if(null===f||null===b||null===y)return;let e=await (0,H.fetchAvailableModelsForTeamOrKey)(f,b,y);e&&N(e)}catch(e){console.error("Error fetching user models:",e)}})()},[y,f,b,m]),(0,l.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${S}`);let s=(e=[],S&&S.models.length>0?(console.log(`organization.models: ${S.models}`),e=S.models):e=C,(0,H.unfurlWildcardModelsInList)(e,C));console.log(`models: ${s}`),A(s),T.setFieldValue("models",[])},[S,C,T]);let V=async()=>{try{if(null==y)return;let e=await (0,r.fetchMCPAccessGroups)(y);E(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,l.useEffect)(()=>{V()},[y,V]),(0,l.useEffect)(()=>{let e=async()=>{try{if(null==y)return;let e=(await (0,r.getPoliciesList)(y)).policies.map(e=>e.policy_name);D(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==y)return;let e=(await (0,r.getGuardrailsList)(y)).guardrails.map(e=>e.guardrail_name);O(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[y]);let U=async e=>{try{if(console.log(`formValues: ${JSON.stringify(e)}`),null!=y){let s=e?.team_alias,l=m?.map(e=>e.team_alias)??[],a=e?.organization_id||d?.organization_id;if(""===a||"string"!=typeof a?e.organization_id=null:e.organization_id=a.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(eh.default.info("Creating Team"),g.length>0){let s={};if(e.metadata)try{s=JSON.parse(e.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}s={...s,logging:g.filter(e=>e.callback_name)},e.metadata=JSON.stringify(s)}if(e.secret_manager_settings&&"string"==typeof e.secret_manager_settings)if(""===e.secret_manager_settings.trim())delete e.secret_manager_settings;else try{e.secret_manager_settings=JSON.parse(e.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}if(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||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.toolPermissions)){if(e.object_permission={},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){let{servers:s,accessGroups:l}=e.allowed_mcp_servers_and_groups;s&&s.length>0&&(e.object_permission.mcp_servers=s),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),delete e.allowed_mcp_servers_and_groups}if(e.mcp_tool_permissions&&Object.keys(e.mcp_tool_permissions).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=e.mcp_tool_permissions,delete e.mcp_tool_permissions),e.allowed_agents_and_groups){let{agents:s,accessGroups:l}=e.allowed_agents_and_groups;e.object_permission||(e.object_permission={}),s&&s.length>0&&(e.object_permission.agents=s),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}}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),Object.keys(h).length>0&&(e.model_aliases=h);let i=await (0,r.teamCreateCall)(y,e);w.invalidateQueries({queryKey:t.organizationKeys.all}),null!==m?u([...m,i]):u([i]),console.log(`response for team create call: ${i}`),eh.default.success("Team created"),T.resetFields(),_([]),p({}),j(!1)}}catch(e){console.error("Error creating the team:",e),eh.default.fromBackend("Error creating the team: "+e)}};return(0,s.jsx)(Z.Modal,{title:"Create Team",open:e,width:1e3,footer:null,onOk:i,onCancel:n,children:(0,s.jsxs)(o.Form,{form:T,onFinish:U,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,s.jsx)(er.TextInput,{placeholder:"","data-testid":"team-name-input"})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Organization"," ",(0,s.jsx)(L.Tooltip,{title:(0,s.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:d?d.organization_id:null,className:"mt-8",children:(0,s.jsx)(ee.Select,{showSearch:!0,allowClear:!0,placeholder:"Search or select an Organization",onChange:e=>{T.setFieldValue("organization_id",e),k(c?.find(s=>s.organization_id===e)||null)},filterOption:(e,s)=>!!s&&(s.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:c?.map(e=>(0,s.jsxs)(ee.Select.Option,{value:e.organization_id,children:[(0,s.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,s.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Models"," ",(0,s.jsx)(L.Tooltip,{title:"These are the models that your selected team has access to",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(ee.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},"data-testid":"team-models-select",children:[(0,s.jsx)(ee.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),F.map(e=>(0,s.jsx)(ee.Select.Option,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Team Member Settings"})}),(0,s.jsxs)(ea.AccordionBody,{children:[(0,s.jsx)(x.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,s.jsx)(o.Form.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.models!==s.models,children:({getFieldValue:e})=>{let l=e("models")||[],a=l.length>0?l:F;return(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Default Model Access"," ",(0,s.jsx)(L.Tooltip,{title:"Optional. If set, new members can only access these models by default. Must be a subset of the team's models. Leave empty to give all members access to all team models.",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"default_team_member_models",children:(0,s.jsx)(ee.Select,{mode:"multiple",placeholder:"Leave empty — all team models accessible to every member",style:{width:"100%"},children:a.map(e=>(0,s.jsx)(ee.Select.Option,{value:e,children:(0,H.getModelDisplayName)(e)},e))})})}}),(0,s.jsx)(o.Form.Item,{label:"Default Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"Default spend budget for each member in this team.",children:(0,s.jsx)(eo.default,{step:.01,precision:2,width:200})}),(0,s.jsx)(o.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,s.jsx)(er.TextInput,{placeholder:"e.g., 30d"})}),(0,s.jsx)(o.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,s.jsx)(eo.default,{step:1,width:400})}),(0,s.jsx)(o.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,s.jsx)(eo.default,{step:1,width:400})})]})]}),(0,s.jsx)(o.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,s.jsx)(eo.default,{step:.01,precision:2,width:200})}),(0,s.jsx)(o.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,s.jsxs)(ee.Select,{defaultValue:null,placeholder:"n/a",children:[(0,s.jsx)(ee.Select.Option,{value:"24h",children:"daily"}),(0,s.jsx)(ee.Select.Option,{value:"7d",children:"weekly"}),(0,s.jsx)(ee.Select.Option,{value:"30d",children:"monthly"})]})}),(0,s.jsx)(o.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,s.jsx)(eo.default,{step:1,width:400})}),(0,s.jsx)(o.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,s.jsx)(eo.default,{step:1,width:400})}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",onClick:()=>{B||(V(),R(!0))},children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Additional Settings"})}),(0,s.jsxs)(ea.AccordionBody,{children:[(0,s.jsx)(o.Form.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,s.jsx)(er.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,s.jsx)(o.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,s.jsx)(X.Input.TextArea,{rows:4})}),(0,s.jsx)(o.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:v?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,s)=>{if(!s)return Promise.resolve();try{return JSON.parse(s),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,s.jsx)(X.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!v})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(L.Tooltip,{title:"Setup your first guardrail",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,s.jsx)(ee.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:z.map(e=>({value:e,label:e}))})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,s.jsx)(L.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,s.jsx)(es.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Policies"," ",(0,s.jsx)(L.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,s.jsx)(ee.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:M.map(e=>({value:e,label:e}))})}),(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,s.jsx)(L.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,s.jsx)(en.default,{onChange:e=>T.setFieldValue("allowed_vector_store_ids",e),value:T.getFieldValue("allowed_vector_store_ids"),accessToken:y||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"MCP Settings"})}),(0,s.jsxs)(ea.AccordionBody,{children:[(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,s.jsx)(L.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,s.jsx)(ed.default,{onChange:e=>T.setFieldValue("allowed_mcp_servers_and_groups",e),value:T.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:y||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,s.jsx)(o.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,s.jsx)(X.Input,{type:"hidden"})}),(0,s.jsx)(o.Form.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_mcp_servers_and_groups!==s.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==s.mcp_tool_permissions,children:()=>(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(ex.default,{accessToken:y||"",selectedServers:T.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:T.getFieldValue("mcp_tool_permissions")||{},onChange:e=>T.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Agent Settings"})}),(0,s.jsx)(ea.AccordionBody,{children:(0,s.jsx)(o.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Agents"," ",(0,s.jsx)(L.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,s.jsx)(ei.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,s.jsx)(ec.default,{onChange:e=>T.setFieldValue("allowed_agents_and_groups",e),value:T.getFieldValue("allowed_agents_and_groups"),accessToken:y||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Logging Settings"})}),(0,s.jsx)(ea.AccordionBody,{children:(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(em.default,{value:g,onChange:_,premiumUser:v})})})]}),(0,s.jsxs)(el.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(et.AccordionHeader,{children:(0,s.jsx)("b",{children:"Model Aliases"})}),(0,s.jsx)(ea.AccordionBody,{children:(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)(x.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,s.jsx)(eu.default,{accessToken:y||"",initialModelAliases:h,onAliasUpdate:p,showExampleConfig:!1})]})})]})]}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(Y.Button,{htmlType:"submit","data-testid":"create-team-submit",children:"Create Team"})})]})})},eg=({teams:e,accessToken:f,setTeams:b,userID:y,userRole:v,organizations:w,premiumUser:T=!1})=>{let N=(0,a.useQueryClient)(),[S,F]=(0,l.useState)(null),[A,z]=(0,l.useState)(!1),[O,M]=(0,l.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),[D]=o.Form.useForm(),[L]=o.Form.useForm(),[P,E]=(0,l.useState)(null),[B,R]=(0,l.useState)(!1),[V,H]=(0,l.useState)(!1),[U,W]=(0,l.useState)(!1),[K,G]=(0,l.useState)(!1),[$,q]=(0,l.useState)([]),[Y,X]=(0,l.useState)(!1),[Z,ee]=(0,l.useState)(null),[es,el]=(0,l.useState)({}),[ea,et]=(0,l.useState)([]),[er,ei]=(0,l.useState)({}),{lastRefreshed:eo,onRefreshClick:en}=(({currentOrg:e,setTeams:s})=>{let[a,t]=(0,l.useState)(""),{accessToken:r,userId:o,userRole:n}=(0,I.default)(),d=(0,l.useCallback)(()=>{t(new Date().toLocaleString())},[]);return(0,l.useEffect)(()=>{r&&(0,i.fetchTeams)(r,o,n,e,s).then(),d()},[r,e,a,d,s,o,n]),{lastRefreshed:a,setLastRefreshed:t,onRefreshClick:d}})({currentOrg:S,setTeams:b});(0,l.useEffect)(()=>{e&&el(e.reduce((e,s)=>(e[s.team_id]={keys:s.keys||[],team_info:{members_with_roles:s.members_with_roles||[]}},e),{}))},[e]);let ed=async e=>{ee(e),X(!0)},ec=async()=>{if(null!=Z&&null!=e&&null!=f){try{await (0,r.teamDeleteCall)(f,Z),N.invalidateQueries({queryKey:t.organizationKeys.all}),(0,i.fetchTeams)(f,y,v,S,b)}catch(e){console.error("Error deleting the team:",e)}X(!1),ee(null)}};return(0,s.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,s.jsx)(p.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,s.jsxs)(h.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[("Admin"==v||"Org Admin"==v)&&(0,s.jsx)(u.Button,{className:"w-fit",onClick:()=>H(!0),children:"+ Create New Team"}),P?(0,s.jsx)(n.default,{teamId:P,onUpdate:e=>{b(s=>{if(null==s)return s;let l=s.map(s=>e.team_id===s.team_id?(0,j.updateExistingKeys)(s,e):s);return f&&(0,i.fetchTeams)(f,y,v,S,b),l})},onClose:()=>{E(null),R(!1)},accessToken:f,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let s=0;se.team_id===P)),is_proxy_admin:"Admin"==v,is_org_admin:(()=>{let s=e?.find(e=>e.team_id===P);if(!s?.organization_id||!w||!y)return!1;let l=w.find(e=>e.organization_id===s.organization_id);return l?.members?.some(e=>e.user_id===y&&"org_admin"===e.user_role)??!1})(),userModels:$,editTeam:B,premiumUser:T}):(0,s.jsxs)(C,{lastRefreshed:eo,onRefresh:en,userRole:v,children:[(0,s.jsxs)(g.TabPanel,{children:[(0,s.jsxs)(x.Text,{children:["Click on “Team ID” to view team details ",(0,s.jsx)("b",{children:"and"})," manage team members."]}),(0,s.jsx)(p.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,s.jsx)(h.Col,{numColSpan:1,children:(0,s.jsxs)(m.Card,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsx)("div",{className:"flex flex-col space-y-4",children:(0,s.jsx)(k,{filters:O,organizations:w,showFilters:A,onToggleFilters:z,onChange:(e,s)=>{let l={...O,[e]:s};M(l),f&&(0,r.v2TeamListCall)(f,l.organization_id||null,null,l.team_id||null,l.team_alias||null).then(e=>{e&&e.teams&&b(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})},onReset:()=>{M({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),f&&(0,r.v2TeamListCall)(f,null,y||null,null,null).then(e=>{e&&e.teams&&b(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})}})})}),(0,s.jsx)(J,{teams:e,currentOrg:S,perTeamInfo:es,userRole:v,userId:y,setSelectedTeamId:E,setEditTeam:R,onDeleteTeam:ed}),Y&&(0,s.jsx)(Q,{teams:e,teamToDelete:Z,onCancel:()=>{X(!1),ee(null)},onConfirm:ec})]})})})]}),(0,s.jsx)(g.TabPanel,{children:(0,s.jsx)(_.default,{accessToken:f,userID:y})}),(0,c.isAdminRole)(v||"")&&(0,s.jsx)(g.TabPanel,{children:(0,s.jsx)(d.default,{accessToken:f,userID:y||"",userRole:v||""})})]}),("Admin"==v||"Org Admin"==v)&&(0,s.jsx)(ep,{isTeamModalVisible:V,handleOk:()=>{H(!1),D.resetFields(),et([]),ei({})},handleCancel:()=>{H(!1),D.resetFields(),et([]),ei({})},currentOrg:S,organizations:w,teams:e,setTeams:b,modelAliases:er,setModelAliases:ei,loggingSettings:ea,setLoggingSettings:et,setIsTeamModalVisible:H})]})})})};var e_=e.i(214541),ej=e.i(846835);e.s(["default",0,()=>{let{accessToken:e,userId:a,userRole:t}=(0,I.default)(),{teams:r,setTeams:i}=(0,e_.default)(),[o,n]=(0,l.useState)([]);return(0,l.useEffect)(()=>{(0,ej.fetchOrganizations)(e,n).then(()=>{})},[e]),(0,s.jsx)(eg,{teams:r,accessToken:e,setTeams:i,userID:a,userRole:t,organizations:o})}],596115)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7ede3688da5c7a5f.js b/litellm/proxy/_experimental/out/_next/static/chunks/7ede3688da5c7a5f.js deleted file mode 100644 index 3f61552271..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/7ede3688da5c7a5f.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(708347),r=e.i(135214);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&a.all_admin_roles.includes(s||"")})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/8127cf0d5ad2772a.js b/litellm/proxy/_experimental/out/_next/static/chunks/8127cf0d5ad2772a.js deleted file mode 100644 index d82544c689..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/8127cf0d5ad2772a.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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 s={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 a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ArrowLeftOutlined",0,l],447566)},214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),s=e.i(270345);e.s(["default",0,()=>{let[e,a]=(0,t.useState)([]),{accessToken:l,userId:n,userRole:i}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{a(await (0,s.fetchTeams)(l,n,i,null))})()},[l,n,i]),{teams:e,setTeams:a}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function s(e,s){let a=t(e);return isNaN(s)?r(e,NaN):(s&&a.setDate(a.getDate()+s),a)}function a(e,s){let a=t(e);if(isNaN(s))return r(e,NaN);if(!s)return a;let l=a.getDate(),n=r(e,a.getTime());return(n.setMonth(a.getMonth()+s+1,0),l>=n.getDate())?n:(a.setFullYear(n.getFullYear(),n.getMonth(),l),a)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>s],439189),e.s(["addMonths",()=>a],497245)},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),s=e.i(540143),a=e.i(915823),l=e.i(619273),n=class extends a.Subscribable{#e;#t=void 0;#r;#s;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,l.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.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.#a(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#l()}mutate(e,t){return this.#s=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#a(){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}}#l(e){s.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,r,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,r,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,r,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,r,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},i=e.i(912598);function o(e,r){let a=(0,i.useQueryClient)(r),[o]=t.useState(()=>new n(a,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(s.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(l.noop)},[o]);if(c.error&&(0,l.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let r=e.i(264042).Row;e.s(["Row",0,r],621192)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),s=e.i(529681),a=e.i(908286),l=e.i(242064),n=e.i(246422),i=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["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"],d=function(e,t){let s,a,l;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(s=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${s}`]:s&&o.includes(s)})),(a={},u.forEach(r=>{a[`${e}-align-${r}`]=t.align===r}),a[`${e}-align-stretch`]=!t.align&&!!t.vertical,a)),(l={},c.forEach(r=>{l[`${e}-justify-${r}`]=t.justify===r}),l)))},m=(0,n.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:s}=e,a=(0,i.mergeToken)(e,{flexGapSM:t,flexGap:r,flexGapLG:s});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(a),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(a),(e=>{let{componentCls:t}=e,r={};return o.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(a),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(a),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(a)]},()=>({}),{resetStyle:!1});var h=function(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,s=Object.getOwnPropertySymbols(e);at.indexOf(s[a])&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r};let p=t.default.forwardRef((e,n)=>{let{prefixCls:i,rootClassName:o,className:c,style:u,flex:p,gap:g,vertical:f=!1,component:x="div",children:v}=e,y=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:b,direction:w,getPrefixCls:j}=t.default.useContext(l.ConfigContext),N=j("flex",i),[S,k,C]=m(N),E=null!=f?f:null==b?void 0:b.vertical,M=(0,r.default)(c,o,null==b?void 0:b.className,N,k,C,d(N,e),{[`${N}-rtl`]:"rtl"===w,[`${N}-gap-${g}`]:(0,a.isPresetSize)(g),[`${N}-vertical`]:E}),O=Object.assign(Object.assign({},null==b?void 0:b.style),u);return p&&(O.flex=p),g&&!(0,a.isPresetSize)(g)&&(O.gap=g),S(t.default.createElement(x,Object.assign({ref:n,className:M,style:O},(0,s.default)(y,["justify","wrap","align"])),v))});e.s(["Flex",0,p],525720)},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:n,accessToken:i,disabled:o})=>{let[c,u]=(0,r.useState)([]),[d,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(i){m(!0);try{let e=await (0,a.getGuardrailsList)(i);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[i]),(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=>{console.log("Selected guardrails:",t),e(t)},value:l,loading:d,className:n,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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(764205);function l(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:n,className:i,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,m]=(0,r.useState)([]),[h,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){p(!0);try{let e=await (0,a.getPoliciesList)(o);e.policies&&(m(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{p(!1)}}})()},[o,u]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:n,loading:h,className:i,allowClear:!0,options:l(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>l])},292639,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let s=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,r.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},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)},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)},384767,e=>{"use strict";var t=e.i(843476),r=e.i(599724),s=e.i(271645),a=e.i(389083);let l=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 n=e.i(764205);let i=function({vectorStores:e,accessToken:i}){let[o,c]=(0,s.useState)([]);return(0,s.useEffect)(()=>{(async()=>{if(i&&0!==e.length)try{let e=await (0,n.vectorStoreListCall)(i);e.data&&c(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)}})()},[i,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)(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)(l,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=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:"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 c=e.i(871943),u=e.i(502547),d=e.i(592968);let m=function({mcpServers:e,mcpAccessGroups:l=[],mcpToolPermissions:i={},mcpToolsets:m=[],accessToken:h}){let[p,g]=(0,s.useState)([]),[f,x]=(0,s.useState)([]),[v,y]=(0,s.useState)(new Set),[b,w]=(0,s.useState)(new Set);(0,s.useEffect)(()=>{(async()=>{if(h&&e.length>0)try{let e=await (0,n.fetchMCPServers)(h);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[h,e.length]),(0,s.useEffect)(()=>{(async()=>{if(h&&m.length>0)try{let e=await (0,n.fetchMCPToolsets)(h),t=Array.isArray(e)?e.filter(e=>m.includes(e.toolset_id)):[];x(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[h,m.length]);let j=[...e.map(e=>({type:"server",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],N=j.length+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)(o,{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)(a.Badge,{color:"blue",size:"xs",children:N})]}),N>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[j.map((e,r)=>{let s="server"===e.type?i[e.value]:void 0,a=s&&s.length>0,l=v.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)(d.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 flex-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} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),a&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),l?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&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: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)}),m.length>0&&m.map((e,r)=>{let s=f.find(t=>t.toolset_id===e),a=b.has(e),l=s?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>l>0&&void w(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 ${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),l>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),a?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l>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)(o,{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"})]})]})},h=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"}))}),p=function({agents:e,agentAccessGroups:l=[],accessToken:i}){let[o,c]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{if(i&&e.length>0)try{let e=await (0,n.getAgentsList)(i);e&&e.agents&&Array.isArray(e.agents)&&c(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[i,e.length]);let u=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],m=u.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)(h,{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:m})]}),m>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:u.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)(d.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 flex-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 flex-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 uppercase tracking-wide flex-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)(h,{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:l}){let n=e?.vector_stores||[],o=e?.mcp_servers||[],c=e?.mcp_access_groups||[],u=e?.mcp_tool_permissions||{},d=e?.mcp_toolsets||[],h=e?.agents||[],g=e?.agent_access_groups||[],f=(0,t.jsxs)("div",{className:"card"===s?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(i,{vectorStores:n,accessToken:l}),(0,t.jsx)(m,{mcpServers:o,mcpAccessGroups:c,mcpToolPermissions:u,mcpToolsets:d,accessToken:l}),(0,t.jsx)(p,{agents:h,agentAccessGroups:g,accessToken:l})]});return"card"===s?(0,t.jsxs)("div",{className:`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"})]})}),f]}):(0,t.jsxs)("div",{className:`${a}`,children:[(0,t.jsx)(r.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),f]})}],384767)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,s)=>{for(let a of e){let e=a?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let l=a?.organization_id??a?.org_id;l&&"string"==typeof l&&r.add(l.trim());let n=a?.user_id;if(n&&"string"==typeof n){let e=a?.user?.user_email||n;s.set(n,e)}}},s=async(e,s)=>{if(!e||!s)return{keyAliases:[],organizationIds:[],userIds:[]};try{let a=new Set,l=new Set,n=new Map,i=await (0,t.keyListCall)(e,null,s,null,null,null,1,100,null,null,"user",null),o=i?.keys||[],c=i?.total_pages??1;r(o,a,l,n);let u=Math.min(c,10)-1;if(u>0){let i=Array.from({length:u},(r,a)=>(0,t.keyListCall)(e,null,s,null,null,null,a+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(i)))"fulfilled"===e.status&&r(e.value?.keys||[],a,l,n)}return{keyAliases:Array.from(a).sort(),organizationIds:Array.from(l).sort(),userIds:Array.from(n.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},a=async(e,r)=>{if(!e)return[];try{let s=[],a=1,l=!0;for(;l;){let n=await (0,t.teamListCall)(e,r||null,null);s=[...s,...n],a{if(!e)return[];try{let r=[],s=1,a=!0;for(;a;){let l=await (0,t.organizationListCall)(e);r=[...r,...l],s{"use strict";var t=e.i(843476),r=e.i(271645);let s=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var a=e.i(464571),l=e.i(311451),n=e.i(199133),i=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[m,h]=(0,r.useState)(!1),[p,g]=(0,r.useState)(u),[f,x]=(0,r.useState)({}),[v,y]=(0,r.useState)({}),[b,w]=(0,r.useState)({}),[j,N]=(0,r.useState)({}),S=(0,r.useCallback)((0,i.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){y(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);x(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{y(e=>({...e,[t.name]:!1}))}}},300),[]),k=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!j[e.name]){y(t=>({...t,[e.name]:!0})),N(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{y(t=>({...t,[e.name]:!1}))}}},[j]);(0,r.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!j[e.name]&&k(e)})},[m,e,k,j]);let C=(e,t)=>{let r={...p,[e]:t};g(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(a.Button,{icon:(0,t.jsx)(s,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:d}),(0,t.jsx)(a.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),g(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let s,a=e.find(e=>e.label===r||e.name===r);return a?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:a.label||a.name}),a.isSearchable?(0,t.jsx)(n.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${a.label||a.name}...`,value:p[a.name]||void 0,onChange:e=>C(a.name,e),onOpenChange:e=>{e&&a.isSearchable&&!j[a.name]&&k(a)},onSearch:e=>{w(t=>({...t,[a.name]:e})),a.searchFn&&S(e,a)},filterOption:!1,loading:v[a.name],options:f[a.name]||[],allowClear:!0,notFoundContent:v[a.name]?"Loading...":"No results found"}):a.options?(0,t.jsx)(n.Select,{className:"w-full",placeholder:`Select ${a.label||a.name}...`,value:p[a.name]||void 0,onChange:e=>C(a.name,e),allowClear:!0,children:a.options.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))}):a.customComponent?(s=a.customComponent,(0,t.jsx)(s,{value:p[a.name]||void 0,onChange:e=>C(a.name,e??""),placeholder:`Select ${a.label||a.name}...`,allFilters:p})):(0,t.jsx)(l.Input,{className:"w-full",placeholder:`Enter ${a.label||a.name}...`,value:p[a.name]||"",onChange:e=>C(a.name,e.target.value),allowClear:!0})]},a.name):null})})]})}],969550)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/82a3cc31a8cf4b5f.js b/litellm/proxy/_experimental/out/_next/static/chunks/82a3cc31a8cf4b5f.js new file mode 100644 index 0000000000..293066df84 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/82a3cc31a8cf4b5f.js @@ -0,0 +1,8 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,790848,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(739295),a=e.i(343794),i=e.i(931067),r=e.i(211577),l=e.i(392221),o=e.i(703923),s=e.i(914949),c=e.i(404948),d=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,n){var u,m=e.prefixCls,g=void 0===m?"rc-switch":m,h=e.className,f=e.checked,p=e.defaultChecked,b=e.disabled,$=e.loadingIcon,w=e.checkedChildren,k=e.unCheckedChildren,C=e.onClick,v=e.onChange,y=e.onKeyDown,x=(0,o.default)(e,d),S=(0,s.default)(!1,{value:f,defaultValue:p}),E=(0,l.default)(S,2),O=E[0],j=E[1];function I(e,t){var n=O;return b||(j(n=e),null==v||v(n,t)),n}var N=(0,a.default)(g,h,(u={},(0,r.default)(u,"".concat(g,"-checked"),O),(0,r.default)(u,"".concat(g,"-disabled"),b),u));return t.createElement("button",(0,i.default)({},x,{type:"button",role:"switch","aria-checked":O,disabled:b,className:N,ref:n,onKeyDown:function(e){e.which===c.default.LEFT?I(!1,e):e.which===c.default.RIGHT&&I(!0,e),null==y||y(e)},onClick:function(e){var t=I(!O,e);null==C||C(t,e)}}),$,t.createElement("span",{className:"".concat(g,"-inner")},t.createElement("span",{className:"".concat(g,"-inner-checked")},w),t.createElement("span",{className:"".concat(g,"-inner-unchecked")},k)))});u.displayName="Switch";var m=e.i(121872),g=e.i(242064),h=e.i(937328),f=e.i(517455);e.i(296059);var p=e.i(915654);e.i(262370);var b=e.i(135551),$=e.i(183293),w=e.i(246422),k=e.i(838378);let C=(0,w.genStyleHooks)("Switch",e=>{let t=(0,k.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:n,trackMinWidth:a}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:a,height:n,lineHeight:(0,p.unit)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:n,trackPadding:a,innerMinMargin:i,innerMaxMargin:r,handleSize:l,calc:o}=e,s=`${t}-inner`,c=(0,p.unit)(o(l).add(o(a).mul(2)).equal()),d=(0,p.unit)(o(r).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:r,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${d})`,marginInlineEnd:`calc(100% - ${c} + ${d})`},[`${s}-unchecked`]:{marginTop:o(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:i,paddingInlineEnd:r,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${d})`,marginInlineEnd:`calc(-100% + ${c} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:o(a).mul(2).equal(),marginInlineEnd:o(a).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:o(a).mul(-1).mul(2).equal(),marginInlineEnd:o(a).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:n,handleBg:a,handleShadow:i,handleSize:r,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:n,insetInlineStart:n,width:r,height:r,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:a,borderRadius:l(r).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,p.unit)(l(r).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:n,calc:a}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:a(a(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:n,trackPadding:a,trackMinWidthSM:i,innerMinMarginSM:r,innerMaxMarginSM:l,handleSizeSM:o,calc:s}=e,c=`${t}-inner`,d=(0,p.unit)(s(o).add(s(a).mul(2)).equal()),u=(0,p.unit)(s(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:(0,p.unit)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:r,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${c}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:s(s(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:r,paddingInlineEnd:l,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,p.unit)(s(o).add(a).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:a,colorWhite:i}=e,r=t*n,l=a/2,o=r-4,s=l-4;return{trackHeight:r,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*s+4,trackPadding:2,handleBg:i,handleSize:o,handleSizeSM:s,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:s/2,innerMaxMarginSM:s+2+4}});var v=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[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])&&(n[a[i]]=e[a[i]]);return n};let y=t.forwardRef((e,i)=>{let{prefixCls:r,size:l,disabled:o,loading:c,className:d,rootClassName:p,style:b,checked:$,value:w,defaultChecked:k,defaultValue:y,onChange:x}=e,S=v(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[E,O]=(0,s.default)(!1,{value:null!=$?$:w,defaultValue:null!=k?k:y}),{getPrefixCls:j,direction:I,switch:N}=t.useContext(g.ConfigContext),R=t.useContext(h.default),T=(null!=o?o:R)||c,_=j("switch",r),B=t.createElement("div",{className:`${_}-handle`},c&&t.createElement(n.default,{className:`${_}-loading-icon`})),[M,q,A]=C(_),U=(0,f.default)(l),z=(0,a.default)(null==N?void 0:N.className,{[`${_}-small`]:"small"===U,[`${_}-loading`]:c,[`${_}-rtl`]:"rtl"===I},d,p,q,A),H=Object.assign(Object.assign({},null==N?void 0:N.style),b);return M(t.createElement(m.default,{component:"Switch",disabled:T},t.createElement(u,Object.assign({},S,{checked:E,onChange:(...e)=>{O(e[0]),null==x||x.apply(void 0,e)},prefixCls:_,className:z,style:H,disabled:T,ref:i,loadingIcon:B}))))});y.__ANT_SWITCH=!0,e.s(["Switch",0,y],790848)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var i=e.i(9583),r=n.forwardRef(function(e,r){return n.createElement(i.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["default",0,r],959013)},190144,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",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:a}))});e.s(["default",0,r],190144)},735049,e=>{"use strict";var t=e.i(654310),n=function(e){if((0,t.default)()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],a=window.document.documentElement;return n.some(function(e){return e in a.style})}return!1},a=function(e,t){if(!n(e))return!1;var a=document.createElement("div"),i=a.style[e];return a.style[e]=t,a.style[e]!==i};function i(e,t){return Array.isArray(e)||void 0===t?n(e):a(e,t)}e.s(["isStyleSupport",()=>i])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),a=e.i(242064),i=e.i(529681);let r=e=>{let{prefixCls:a,className:i,style:r,size:l,shape:o}=e,s=(0,n.default)({[`${a}-lg`]:"large"===l,[`${a}-sm`]:"small"===l}),c=(0,n.default)({[`${a}-circle`]:"circle"===o,[`${a}-square`]:"square"===o,[`${a}-round`]:"round"===o}),d=t.useMemo(()=>"number"==typeof l?{width:l,height:l,lineHeight:`${l}px`}:{},[l]);return t.createElement("span",{className:(0,n.default)(a,s,c,i),style:Object.assign(Object.assign({},d),r)})};e.i(296059);var l=e.i(694758),o=e.i(915654),s=e.i(246422),c=e.i(838378);let d=new l.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,o.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(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,n)=>{let{skeletonButtonCls:a}=e;return{[`${n}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${a}-round`]:{borderRadius:t}}},p=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),b=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:n}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:a,skeletonParagraphCls:i,skeletonButtonCls:r,skeletonInputCls:l,skeletonImageCls:o,controlHeight:s,controlHeightLG:c,controlHeightSM:u,gradientFromColor:b,padding:$,marginSM:w,borderRadius:k,titleHeight:C,blockRadius:v,paragraphLiHeight:y,controlHeightXS:x,paragraphMarginTop:S}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:$,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:b},m(s)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},m(c)),[`${n}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:C,background:b,borderRadius:v,[`+ ${i}`]:{marginBlockStart:u}},[i]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:b,borderRadius:v,"+ li":{marginBlockStart:x}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${i} > li`]:{borderRadius:k}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:w,[`+ ${i}`]:{marginBlockStart:S}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:a,controlHeightLG:i,controlHeightSM:r,gradientFromColor:l,calc:o}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:l,borderRadius:t,width:o(a).mul(2).equal(),minWidth:o(a).mul(2).equal()},p(a,o))},f(e,a,n)),{[`${n}-lg`]:Object.assign({},p(i,o))}),f(e,i,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},p(r,o))}),f(e,r,`${n}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:a,controlHeightLG:i,controlHeightSM:r}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(i)),[`${t}${t}-sm`]:Object.assign({},m(r))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:a,controlHeightLG:i,controlHeightSM:r,gradientFromColor:l,calc:o}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:l,borderRadius:n},g(t,o)),[`${a}-lg`]:Object.assign({},g(i,o)),[`${a}-sm`]:Object.assign({},g(r,o))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:a,borderRadiusSM:i,calc:r}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:i},h(r(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},h(n)),{maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[r]:{width:"100%"},[l]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${a}, + ${i} > li, + ${n}, + ${r}, + ${l}, + ${o} + `]: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: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"]]}),$=e=>{let{prefixCls:a,className:i,style:r,rows:l=0}=e,o=Array.from({length:l}).map((n,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:n,rows:a=2}=t;return Array.isArray(n)?n[e]:a-1===e?n:void 0})(a,e)}}));return t.createElement("ul",{className:(0,n.default)(a,i),style:r},o)},w=({prefixCls:e,className:a,width:i,style:r})=>t.createElement("h3",{className:(0,n.default)(e,a),style:Object.assign({width:i},r)});function k(e){return e&&"object"==typeof e?e:{}}let C=e=>{let{prefixCls:i,loading:l,className:o,rootClassName:s,style:c,children:d,avatar:u=!1,title:m=!0,paragraph:g=!0,active:h,round:f}=e,{getPrefixCls:p,direction:C,className:v,style:y}=(0,a.useComponentConfig)("skeleton"),x=p("skeleton",i),[S,E,O]=b(x);if(l||!("loading"in e)){let e,a,i=!!u,l=!!m,d=!!g;if(i){let n=Object.assign(Object.assign({prefixCls:`${x}-avatar`},l&&!d?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),k(u));e=t.createElement("div",{className:`${x}-header`},t.createElement(r,Object.assign({},n)))}if(l||d){let e,n;if(l){let n=Object.assign(Object.assign({prefixCls:`${x}-title`},!i&&d?{width:"38%"}:i&&d?{width:"50%"}:{}),k(m));e=t.createElement(w,Object.assign({},n))}if(d){let e,a=Object.assign(Object.assign({prefixCls:`${x}-paragraph`},(e={},i&&l||(e.width="61%"),!i&&l?e.rows=3:e.rows=2,e)),k(g));n=t.createElement($,Object.assign({},a))}a=t.createElement("div",{className:`${x}-content`},e,n)}let p=(0,n.default)(x,{[`${x}-with-avatar`]:i,[`${x}-active`]:h,[`${x}-rtl`]:"rtl"===C,[`${x}-round`]:f},v,o,s,E,O);return S(t.createElement("div",{className:p,style:Object.assign(Object.assign({},y),c)},e,a))}return null!=d?d:null};C.Button=e=>{let{prefixCls:l,className:o,rootClassName:s,active:c,block:d=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",l),[h,f,p]=b(g),$=(0,i.default)(e,["prefixCls"]),w=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:c,[`${g}-block`]:d},o,s,f,p);return h(t.createElement("div",{className:w},t.createElement(r,Object.assign({prefixCls:`${g}-button`,size:u},$))))},C.Avatar=e=>{let{prefixCls:l,className:o,rootClassName:s,active:c,shape:d="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",l),[h,f,p]=b(g),$=(0,i.default)(e,["prefixCls","className"]),w=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:c},o,s,f,p);return h(t.createElement("div",{className:w},t.createElement(r,Object.assign({prefixCls:`${g}-avatar`,shape:d,size:u},$))))},C.Input=e=>{let{prefixCls:l,className:o,rootClassName:s,active:c,block:d,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",l),[h,f,p]=b(g),$=(0,i.default)(e,["prefixCls"]),w=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:c,[`${g}-block`]:d},o,s,f,p);return h(t.createElement("div",{className:w},t.createElement(r,Object.assign({prefixCls:`${g}-input`,size:u},$))))},C.Image=e=>{let{prefixCls:i,className:r,rootClassName:l,style:o,active:s}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),d=c("skeleton",i),[u,m,g]=b(d),h=(0,n.default)(d,`${d}-element`,{[`${d}-active`]:s},r,l,m,g);return u(t.createElement("div",{className:h},t.createElement("div",{className:(0,n.default)(`${d}-image`,r),style:o},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`})))))},C.Node=e=>{let{prefixCls:i,className:r,rootClassName:l,style:o,active:s,children:c}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),u=d("skeleton",i),[m,g,h]=b(u),f=(0,n.default)(u,`${u}-element`,{[`${u}-active`]:s},g,r,l,h);return m(t.createElement("div",{className:f},t.createElement("div",{className:(0,n.default)(`${u}-image`,r),style:o},c)))},e.s(["default",0,C],185793)},618566,(e,t,n)=>{t.exports=e.r(976562)},161281,e=>{"use strict";var t=e.i(947293);function n(e){try{let n=(0,t.jwtDecode)(e);if(n&&"number"==typeof n.exp)return 1e3*n.exp<=Date.now();return!1}catch{return!0}}function a(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function i(e){return!!e&&null!==a(e)&&!n(e)}e.s(["checkTokenValidity",()=>i,"decodeToken",()=>a,"isJwtExpired",()=>n])},321836,e=>{"use strict";let t="litellm_return_url",n="redirect_to";function a(){return window.location.href}function i(){let e=a();e&&function(e,t,n=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function o(){return new URLSearchParams(window.location.search).get(n)}function s(e,t){let i=t||a();if(!i||i.includes("/login"))return e;let r=e.includes("?")?"&":"?";return`${e}${r}${n}=${encodeURIComponent(i)}`}function c(){let e=o();if(e)return e;let t=r();return t||null}function d(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function u(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),n=window.location.hostname;if(t.hostname!==n)return!1;if(d())return!0;return t.origin===window.location.origin}catch{return!1}}function m(e){try{let t=new URL(e,window.location.origin),n=t.pathname;n.length>1&&n.endsWith("/")&&(n=n.slice(0,-1));let a=new URLSearchParams(t.search),i=new URLSearchParams;Array.from(a.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{i.append(e,t)});let r=i.toString(),l=t.hash||"";return`${t.origin}${n}${r?`?${r}`:""}${l}`}catch{return e}}function g(){let e=o();if(e){if(u(e))return l(),e;d()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=r();if(t){if(u(t))return l(),t;d()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>s,"clearStoredReturnUrl",()=>l,"consumeReturnUrl",()=>g,"getReturnUrl",()=>c,"isValidReturnUrl",()=>u,"normalizeUrlForCompare",()=>m,"storeReturnUrl",()=>i])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],n=["Internal User","Admin","proxy_admin"],a=[...n,"Admin Viewer","proxy_admin_viewer"],i=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>i(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,i,"rolesAllowedToViewWriteScopedPages",0,a,"rolesWithWriteAccess",0,n])},135214,e=>{"use strict";var t=e.i(764205),n=e.i(268004),a=e.i(161281),i=e.i(321836),r=e.i(618566),l=e.i(271645),o=e.i(708347),s=e.i(612256);e.s(["default",0,()=>{let e=(0,r.useRouter)(),{data:c,isLoading:d}=(0,s.useUIConfig)(),u="u">typeof document?(0,n.getCookie)("token"):null,m=(0,l.useMemo)(()=>(0,a.decodeToken)(u),[u]),g=(0,l.useMemo)(()=>(0,a.checkTokenValidity)(u),[u])&&!c?.admin_ui_disabled,h=(0,l.useCallback)(()=>{(0,i.storeReturnUrl)();let n=`${(0,t.getProxyBaseUrl)()}/ui/login`,a=(0,i.buildLoginUrlWithReturn)(n);e.replace(a)},[e]);return(0,l.useEffect)(()=>{!d&&(g||(u&&(0,n.clearTokenCookies)(),h()))},[d,g,u,h]),{isLoading:d,isAuthorized:g,token:g?u:null,accessToken:m?.key??null,userId:m?.user_id??null,userEmail:m?.user_email??null,userRole:(0,o.formatUserRole)(m?.user_role),premiumUser:m?.premium_user??null,disabledPersonalKeyCreation:m?.disabled_non_admin_personal_key_creation??null,showSSOBanner:m?.login_method==="username_password"}}])},95779,e=>{"use strict";var t=e.i(480731);let n={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},a=[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",()=>n,"themeColorRange",()=>a])},563113,887719,e=>{"use strict";var t=e.i(271645),n=e.i(864517),a=e.i(244009),i=e.i(408850),r=e.i(87414);let l=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{void 0!==e[n]&&(t[n]=e[n])})}),t};function o(e){if(!e)return;let{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function s(e){let{closable:n,closeIcon:a}=e||{};return t.default.useMemo(()=>{if(!n&&(!1===n||!1===a||null===a))return!1;if(void 0===n&&void 0===a)return null;let e={closeIcon:"boolean"!=typeof a&&null!==a?a:void 0};return n&&"object"==typeof n&&(e=Object.assign(Object.assign({},e),n)),e},[n,a])}e.s(["default",0,l],887719);let c={};e.s(["pickClosable",()=>o,"useClosable",0,(e,o,d=c)=>{let u=s(e),m=s(o),[g]=(0,i.useLocale)("global",r.default.global),h="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),f=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(n.default,null)},d),[d]),p=t.default.useMemo(()=>!1!==u&&(u?l(f,m,u):!1!==m&&(m?l(f,m):!!f.closable&&f)),[u,m,f]);return t.default.useMemo(()=>{var e,n;if(!1===p)return[!1,null,h,{}];let{closeIconRender:i}=f,{closeIcon:r}=p,l=r,o=(0,a.default)(p,!0);return null!=l&&(i&&(l=i(r)),l=t.default.isValidElement(l)?t.default.cloneElement(l,Object.assign(Object.assign(Object.assign({},l.props),{"aria-label":null!=(n=null==(e=l.props)?void 0:e["aria-label"])?n:g.close}),o)):t.default.createElement("span",Object.assign({"aria-label":g.close},o),l)),[!0,l,h,o]},[h,g.close,p,f])}],563113)},269200,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let i=(0,e.i(673706).makeClassName)("Table"),r=n.default.forwardRef((e,r)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement("div",{className:(0,a.tremorTwMerge)(i("root"),"overflow-auto",o)},n.default.createElement("table",Object.assign({ref:r,className:(0,a.tremorTwMerge)(i("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),l))});r.displayName="Table",e.s(["Table",()=>r],269200)},942232,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableBody"),r=n.default.forwardRef((e,r)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("tbody",Object.assign({ref:r,className:(0,a.tremorTwMerge)(i("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",o)},s),l))});r.displayName="TableBody",e.s(["TableBody",()=>r],942232)},977572,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableCell"),r=n.default.forwardRef((e,r)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("td",Object.assign({ref:r,className:(0,a.tremorTwMerge)(i("root"),"align-middle whitespace-nowrap text-left p-4",o)},s),l))});r.displayName="TableCell",e.s(["TableCell",()=>r],977572)},427612,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableHead"),r=n.default.forwardRef((e,r)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("thead",Object.assign({ref:r,className:(0,a.tremorTwMerge)(i("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",o)},s),l))});r.displayName="TableHead",e.s(["TableHead",()=>r],427612)},64848,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableHeaderCell"),r=n.default.forwardRef((e,r)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("th",Object.assign({ref:r,className:(0,a.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",o)},s),l))});r.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>r],64848)},496020,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableRow"),r=n.default.forwardRef((e,r)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("tr",Object.assign({ref:r,className:(0,a.tremorTwMerge)(i("row"),o)},s),l))});r.displayName="TableRow",e.s(["TableRow",()=>r],496020)},389083,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(829087),i=e.i(480731),r=e.i(95779),l=e.i(444755),o=e.i(673706);let s={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"}},c={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"}},d=(0,o.makeClassName)("Badge"),u=n.default.forwardRef((e,u)=>{let{color:m,icon:g,size:h=i.Sizes.SM,tooltip:f,className:p,children:b}=e,$=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),w=g||null,{tooltipProps:k,getReferenceProps:C}=(0,a.useTooltip)();return n.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,k.refs.setReference]),className:(0,l.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,l.tremorTwMerge)((0,o.getColorClassNames)(m,r.colorPalette.background).bgColor,(0,o.getColorClassNames)(m,r.colorPalette.iconText).textColor,(0,o.getColorClassNames)(m,r.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,l.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"),s[h].paddingX,s[h].paddingY,s[h].fontSize,p)},C,$),n.default.createElement(a.default,Object.assign({text:f},k)),w?n.default.createElement(w,{className:(0,l.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[h].height,c[h].width)}):null,n.default.createElement("span",{className:(0,l.tremorTwMerge)(d("text"),"whitespace-nowrap")},b))});u.displayName="Badge",e.s(["Badge",()=>u],389083)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/05cc063d4c1cb77b.js b/litellm/proxy/_experimental/out/_next/static/chunks/8489ea6f0be86483.js similarity index 94% rename from litellm/proxy/_experimental/out/_next/static/chunks/05cc063d4c1cb77b.js rename to litellm/proxy/_experimental/out/_next/static/chunks/8489ea6f0be86483.js index fe1bc05dc2..c54ee59289 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/05cc063d4c1cb77b.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/8489ea6f0be86483.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,910119,e=>{"use strict";var s=e.i(843476),t=e.i(197647),l=e.i(653824),a=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),x=e.i(199133),h=e.i(28651),g=e.i(175712),p=e.i(770914),j=e.i(536916),f=e.i(764205),b=e.i(827252),y=e.i(994388),_=e.i(35983),v=e.i(779241),S=e.i(78085),N=e.i(808613),C=e.i(592968),T=e.i(708347),w=e.i(860585),k=e.i(355619),I=e.i(435451);function U({userData:e,onCancel:t,onSubmit:l,teams:a,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=N.Form.useForm(),[h,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let s=e.user_info?.max_budget,t=null==s;g(t),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:t?"":s,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,s.jsxs)(N.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(h||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),l(e)},layout:"vertical",children:[!u&&(0,s.jsx)(N.Form.Item,{label:"User ID",name:"user_id",children:(0,s.jsx)(v.TextInput,{disabled:!0})}),!u&&(0,s.jsx)(N.Form.Item,{label:"Email",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Alias",name:"user_alias",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Global Proxy Role"," ",(0,s.jsx)(C.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,s.jsx)(b.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,s.jsx)(x.Select,{children:c&&Object.entries(c).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Personal Models"," ",(0,s.jsx)(C.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,s.jsx)(b.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(x.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!T.all_admin_roles.includes(d||""),children:[(0,s.jsx)(x.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,s.jsx)(x.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,s.jsx)("span",{children:"Max Budget (USD)"}),(0,s.jsx)(j.Checkbox,{checked:h,onChange:e=>{let s=e.target.checked;g(s),s&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,s)=>h||""!==s&&null!=s?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,s.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:h})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(w.default,{})}),(0,s.jsx)(N.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,s.jsx)(y.Button,{variant:"secondary",type:"button",onClick:t,children:"Cancel"}),(0,s.jsx)(y.Button,{type:"submit",children:"Save Changes"})]})]})}var B=e.i(727749),A=e.i(888259);let{Text:D,Title:F}=c.Typography,R=({open:e,onCancel:t,selectedUsers:l,possibleUIRoles:a,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:b,allowAllUsers:y=!1})=>{let[_,v]=(0,n.useState)(!1),[S,N]=(0,n.useState)([]),[C,T]=(0,n.useState)(null),[w,k]=(0,n.useState)(!1),[I,R]=(0,n.useState)(!1),O=()=>{N([]),T(null),k(!1),R(!1),t()},E=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),P=async e=>{if(console.log("formValues",e),!r)return void B.default.fromBackend("Access token not found");v(!0);try{let s=l.map(e=>e.user_id),a={};e.user_role&&""!==e.user_role&&(a.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(a.max_budget=e.max_budget),e.models&&e.models.length>0&&(a.models=e.models),e.budget_duration&&""!==e.budget_duration&&(a.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(a.metadata=e.metadata);let n=Object.keys(a).length>0,d=w&&S.length>0;if(!n&&!d)return void B.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,f.userBulkUpdateUserCall)(r,a,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,f.userBulkUpdateUserCall)(r,a,s),o.push(`Updated ${s.length} user(s)`);if(d){let e=[];for(let s of S)try{let t=null;t=I?null:l.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let a=await (0,f.teamBulkMemberAddCall)(r,s,t||null,C||void 0,I);console.log("result",a),e.push({teamId:s,success:!0,successfulAdditions:a.successful_additions,failedAdditions:a.failed_additions})}catch(t){console.error(`Failed to add users to team ${s}:`,t),e.push({teamId:s,success:!1,error:t})}let s=e.filter(e=>e.success),t=e.filter(e=>!e.success);if(s.length>0){let e=s.reduce((e,s)=>e+s.successfulAdditions,0);o.push(`Added users to ${s.length} team(s) (${e} total additions)`)}t.length>0&&A.default.warning(`Failed to add users to ${t.length} team(s)`)}o.length>0&&B.default.success(o.join(". ")),N([]),T(null),k(!1),R(!1),i(),t()}catch(e){console.error("Bulk operation failed:",e),B.default.fromBackend("Failed to perform bulk operations")}finally{v(!1)}};return(0,s.jsxs)(o.Modal,{open:e,onCancel:O,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${l.length} User(s)`,width:800,children:[y&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(j.Checkbox,{checked:I,onChange:e=>R(e.target.checked),children:(0,s.jsx)(D,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,s.jsx)("div",{style:{marginTop:8},children:(0,s.jsx)(D,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)(F,{level:5,children:["Selected Users (",l.length,"):"]}),(0,s.jsx)(m.Table,{size:"small",bordered:!0,dataSource:l,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,s.jsx)(D,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:a?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,s.jsx)(u.Divider,{}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsxs)(D,{children:[(0,s.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,s.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,s.jsxs)(p.Space,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(j.Checkbox,{checked:w,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Select Teams:"}),(0,s.jsx)(x.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:N,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Team Budget (Optional):"}),(0,s.jsx)(h.InputNumber,{placeholder:"Max budget per user in team",value:C,onChange:e=>T(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,s.jsx)(U,{userData:E,onCancel:O,onSubmit:P,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:b,possibleUIRoles:a,isBulkEdit:!0}),_&&(0,s.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,s.jsxs)(D,{children:["Updating ",I?"all users":l.length," user(s)..."]})})]})};var O=e.i(371455);let E=({visible:e,possibleUIRoles:t,onCancel:l,user:a,onSubmit:r})=>{let[i,c]=(0,n.useState)(a),[u]=N.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[a]);let m=async()=>{u.resetFields(),l()},g=async e=>{r(e),u.resetFields(),l()};return a?(0,s.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+a.user_id,width:1e3,children:(0,s.jsx)(N.Form,{form:u,onFinish:g,initialValues:a,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Role",name:"user_role",children:(0,s.jsx)(x.Select,{children:t&&Object.entries(t).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,s.jsx)(h.InputNumber,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,s.jsx)(I.default,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(w.default,{})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var P=e.i(172372),L=e.i(500330),M=e.i(152473),z=e.i(266027),$=e.i(912598),K=e.i(127952),V=e.i(304967),G=e.i(629569),q=e.i(599724),W=e.i(114600),H=e.i(482725),J=e.i(790848),Q=e.i(646563),Y=e.i(955135);let X=({accessToken:e,possibleUIRoles:t,userID:l,userRole:a})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[p,j]=(0,n.useState)({}),[b,y]=(0,n.useState)(!1),[_,S]=(0,n.useState)([]),{Paragraph:N}=c.Typography,{Option:C}=x.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let s=await (0,f.getInternalUserSettings)(e);if(u(s),j(s.values||{}),e)try{let s=await (0,f.modelAvailableCall)(e,l,a);if(s&&s.data){let e=s.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),B.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let T=async()=>{if(e){y(!0);try{let s=Object.entries(p).reduce((e,[s,t])=>(e[s]=""===t?null:t,e),{}),t=await (0,f.updateInternalUserSettings)(e,s);u({...o,values:t.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),B.default.fromBackend("Failed to update settings: "+e)}finally{y(!1)}}},I=(e,s)=>{j(t=>({...t,[e]:s}))},U=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(H.Spin,{size:"large"})}):o?(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:()=>{g(!1),j(o.values||{})},disabled:b,children:"Cancel"}),(0,s.jsx)(d.Button,{type:"primary",onClick:T,loading:b,children:"Save Changes"})]}):(0,s.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,s.jsx)(N,{className:"mb-4",children:o.field_schema.description}),(0,s.jsx)(W.Divider,{}),(0,s.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:l}=o;return l&&l.properties?Object.entries(l.properties).map(([l,a])=>{let r=e[l],i=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,s.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,s.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,s.jsx)(N,{className:"text-sm text-gray-500 mt-1",children:a.description||"No description available"}),m?(0,s.jsx)("div",{className:"mt-2",children:((e,l,a)=>{let r=l.type;if("teams"===e){let t,l;return(0,s.jsx)("div",{className:"mt-2",children:(t=U(p[e]||[]),l=(e,s,l)=>{let a=[...t];a[e]={...a[e],[s]:l},I("teams",a)},(0,s.jsxs)("div",{className:"space-y-3",children:[t.map((e,a)=>(0,s.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)(q.Text,{className:"font-medium",children:["Team ",a+1]}),(0,s.jsx)(d.Button,{size:"small",danger:!0,icon:(0,s.jsx)(Y.DeleteOutlined,{}),onClick:()=>{I("teams",t.filter((e,s)=>s!==a))},children:"Remove"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,s.jsx)(v.TextInput,{value:e.team_id,onChange:e=>l(a,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,s.jsx)(h.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>l(a,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,s.jsxs)(x.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>l(a,"user_role",e),children:[(0,s.jsx)(C,{value:"user",children:"User"}),(0,s.jsx)(C,{value:"admin",children:"Admin"})]})]})]})]},a)),(0,s.jsx)(d.Button,{icon:(0,s.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...t,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&t)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:Object.entries(t).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(C,{value:e,children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{children:t}),(0,s.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:l})]})},e))});if("budget_duration"===e)return(0,s.jsx)(w.default,{value:p[e]||null,onChange:s=>I(e,s),className:"mt-2"});if("boolean"===r)return(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(J.Switch,{checked:!!p[e],onChange:s=>I(e,s)})});if("array"===r&&l.items?.enum)return(0,s.jsx)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:l.items.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else if("models"===e)return(0,s.jsxs)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:[(0,s.jsx)(C,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,s.jsx)(C,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),_.map(e=>(0,s.jsx)(C,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&l.enum)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:l.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else return(0,s.jsx)(v.TextInput,{value:void 0!==p[e]?String(p[e]):"",onChange:s=>I(e,s.target.value),placeholder:l.description||"",className:"mt-2"})})(l,a,0)}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,l)=>{if(null==l)return(0,s.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(l)){if(0===l.length)return(0,s.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=U(l);return(0,s.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,t)=>(0,s.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,s.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,s.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,L.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,s.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},t))})}if("user_role"===e&&t&&t[l]){let{ui_label:e,description:a}=t[l];return(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium",children:e}),a&&(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:a})]})}if("budget_duration"===e)return(0,s.jsx)("span",{children:(0,w.getBudgetDurationLabel)(l)});if("boolean"==typeof l)return(0,s.jsx)("span",{children:l?"Enabled":"Disabled"});if("models"===e&&Array.isArray(l))return 0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},t))});if("object"==typeof l)return Array.isArray(l)?0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},t))}):(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(l,null,2)});return(0,s.jsx)("span",{children:String(l)})})(l,r)})]},l)}):(0,s.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,s.jsx)(V.Card,{children:(0,s.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var Z=e.i(389083),ee=e.i(350967),es=e.i(752978),et=e.i(262218),el=e.i(591935),ea=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,t,l,a,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(C.Tooltip,{title:e.original.user_id,children:(0,s.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,s.jsx)(C.Tooltip,{title:"Copy User ID",children:(0,s.jsx)(en.CopyOutlined,{onClick:s=>{s.stopPropagation(),(0,L.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>e.original.metadata?.scim_active===!1?(0,s.jsx)(C.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,s.jsx)(et.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,s.jsx)(et.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:t})=>(0,s.jsx)("span",{className:"text-xs",children:e?.[t.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.spend?(0,L.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{children:"SSO ID"}),(0,s.jsx)(C.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,s.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,s.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,s.jsxs)(Z.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,s.jsx)(Z.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(C.Tooltip,{title:"Edit user details",children:(0,s.jsx)(es.Icon,{icon:el.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,s.jsx)(C.Tooltip,{title:"Delete user",children:(0,s.jsx)(es.Icon,{icon:ea.TrashIcon,size:"sm",onClick:()=>l(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,s.jsx)(C.Tooltip,{title:"Reset Password",children:(0,s.jsx)(es.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>a(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:t,isUserSelected:l,isAllSelected:a,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,s.jsx)(j.Checkbox,{indeterminate:r,checked:a,onChange:e=>t(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:t})=>(0,s.jsx)(j.Checkbox,{checked:l(t.original),onChange:s=>e(t.original,s.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),ex=e.i(64848),eh=e.i(942232),eg=e.i(496020),ep=e.i(977572),ej=e.i(206929),ef=e.i(94629),eb=e.i(360820),ey=e.i(871943),e_=e.i(981339),ev=e.i(530212),eS=e.i(988297),eN=e.i(118366),eC=e.i(678784);function eT({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:h,possibleUIRoles:g,initialTab:p=0,startInEditMode:j=!1}){let[b,_]=(0,n.useState)(null),[v,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[A,D]=(0,n.useState)(!1),[F,R]=(0,n.useState)(!0),[O,E]=(0,n.useState)(j),[M,z]=(0,n.useState)([]),[$,W]=(0,n.useState)(!1),[H,J]=(0,n.useState)(null),[Q,Y]=(0,n.useState)(null),[X,Z]=(0,n.useState)(p),[es,et]=(0,n.useState)({}),[el,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ej,ef]=(0,n.useState)(null),[eb,ey]=(0,n.useState)(!1),[e_,eT]=(0,n.useState)(!1),[ew,ek]=(0,n.useState)([]),[eI,eU]=(0,n.useState)(""),[eB,eA]=(0,n.useState)("user"),[eD,eF]=(0,n.useState)(!1);n.default.useEffect(()=>{Y((0,f.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0)try{let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),t=await Promise.all(e);S(t)}catch{S(s.teams.map(e=>({team_id:e,team_alias:null})))}let t=(await (0,f.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(t)}catch(e){console.error("Error fetching user data:",e),B.default.fromBackend("Failed to fetch user data")}finally{R(!1)}})()},[u,e,m]);let eR="proxy_admin"===m||"Admin"===m,eO=async()=>{if(u){eF(!0);try{let e=await (0,f.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eF(!1)}}},eE=async()=>{if(u&&eI){ey(!0);try{await (0,f.teamMemberAddCall)(u,eI,{role:eB,user_id:e}),B.default.success("User added to team successfully"),ed(!1);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),B.default.fromBackend(e?.message||"Failed to add user to team")}finally{ey(!1)}}},eP=async()=>{if(u&&ej){eT(!0);try{await (0,f.teamMemberDeleteCall)(u,ej.team_id,{role:"user",user_id:e}),B.default.success("User removed from team successfully"),ec(!1),ef(null);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),B.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eT(!1)}}},eL=ew.filter(e=>!v.some(s=>s.team_id===e.team_id)),eM=async()=>{if(!u)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let s=await (0,f.invitationCreateCall)(u,e);J(s),W(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;D(!0),await (0,f.userDeleteCall)(u,[e]),B.default.success("User deleted successfully"),h&&h(),c()}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{I(!1),D(!1)}},e$=async e=>{try{if(!u||!b)return;await (0,f.userUpdateUserCall)(u,e,null),_({...b,user_email:e.user_email??b.user_email,user_alias:e.user_alias??b.user_alias,models:e.models??b.models,max_budget:e.max_budget??b.max_budget,budget_duration:e.budget_duration??b.budget_duration,metadata:e.metadata??b.metadata}),B.default.success("User updated successfully"),E(!1)}catch(e){console.error("Error updating user:",e),B.default.fromBackend("Failed to update user")}};if(F)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"Loading user data..."})]});if(!b)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"User not found"})]});let eK=async(e,s)=>{await (0,L.copyToClipboard)(e)&&(et(e=>({...e,[s]:!0})),setTimeout(()=>{et(e=>({...e,[s]:!1}))},2e3))},eV={user_id:b.user_id,user_info:{user_email:b.user_email,user_alias:b.user_alias,user_role:b.user_role,models:b.models,max_budget:b.max_budget,budget_duration:b.budget_duration,metadata:b.metadata}};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(G.Title,{children:b.user_email||"User"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"text-gray-500 font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eC.CheckIcon,{size:12}):(0,s.jsx)(eN.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&T.rolesWithWriteAccess.includes(m)&&(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(y.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:eM,className:"flex items-center",children:"Reset Password"}),(0,s.jsx)(y.Button,{icon:ea.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,s.jsx)(K.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:b.user_email},{label:"User ID",value:b.user_id,code:!0},{label:"Global Proxy Role",value:b.user_role&&g?.[b.user_role]?.ui_label||b.user_role||"-"},{label:"Total Spend (USD)",value:null!==b.spend&&void 0!==b.spend?b.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:A}),(0,s.jsxs)(l.TabGroup,{defaultIndex:X,onIndexChange:Z,children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Overview"}),(0,s.jsx)(t.Tab,{children:"Details"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Spend"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(G.Title,{children:["$",(0,L.formatNumberWithCommas)(b.spend||0,4)]}),(0,s.jsxs)(q.Text,{children:["of"," ",null!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"]})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,s.jsx)(q.Text,{children:"Teams"}),eR&&(0,s.jsx)(y.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eU(""),eA("user"),ed(!0),eO()},children:"Add Team"})]}),(0,s.jsxs)("div",{className:"mt-2",children:[v.length>0?(0,s.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,s.jsxs)(eu.Table,{children:[(0,s.jsx)(em.TableHead,{children:(0,s.jsxs)(eg.TableRow,{children:[(0,s.jsx)(ex.TableHeaderCell,{children:"Team Name"}),eR&&(0,s.jsx)(ex.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,s.jsx)(eh.TableBody,{children:v.slice(0,el?v.length:20).map(e=>(0,s.jsxs)(eg.TableRow,{children:[(0,s.jsx)(ep.TableCell,{children:e.team_alias||e.team_id}),eR&&(0,s.jsx)(ep.TableCell,{className:"text-right",children:(0,s.jsx)(y.Button,{icon:ea.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{ef(e),ec(!0)}})})]},e.team_id))})]})}):(0,s.jsx)(q.Text,{children:"No teams"}),!el&&v.length>20&&(0,s.jsxs)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",v.length-20," more"]}),el&&v.length>20&&(0,s.jsx)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Personal Models"}),(0,s.jsx)("div",{className:"mt-2",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)(q.Text,{children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"User Settings"}),!O&&m&&T.rolesWithWriteAccess.includes(m)&&(0,s.jsx)(y.Button,{onClick:()=>E(!0),children:"Edit Settings"})]}),O&&b?(0,s.jsx)(U,{userData:eV,onCancel:()=>E(!1),onSubmit:e$,teams:v,accessToken:u,userID:e,userRole:m,userModels:M,possibleUIRoles:g}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eC.CheckIcon,{size:12}):(0,s.jsx)(eN.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,s.jsx)(q.Text,{children:b.user_email||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,s.jsx)(q.Text,{children:b.user_alias||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,s.jsx)(q.Text,{children:b.user_role||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,s.jsx)(q.Text,{children:b.created_at?new Date(b.created_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,s.jsx)(q.Text,{children:b.updated_at?new Date(b.updated_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,s.jsx)(q.Text,{children:null!==b.max_budget&&void 0!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,s.jsx)(q.Text,{children:(0,w.getBudgetDurationLabel)(b.budget_duration??null)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(b.metadata||{},null,2)})]})]})]})})]})]}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:$,setIsInvitationLinkModalVisible:W,baseUrl:Q||"",invitationLinkData:H,modalType:"resetPassword"}),(0,s.jsx)(K.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ej?.team_alias||ej?.team_id},{label:"User ID",value:b?.user_id,code:!0},{label:"Email",value:b?.user_email}],onCancel:()=>{ec(!1),ef(null)},onOk:eP,confirmLoading:e_}),(0,s.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!eb,children:(0,s.jsxs)(N.Form,{layout:"vertical",onFinish:eE,children:[(0,s.jsx)(N.Form.Item,{label:"Team",required:!0,children:(0,s.jsx)(x.Select,{showSearch:!0,value:eI||void 0,onChange:eU,placeholder:"Select a team",filterOption:(e,s)=>{let t=eL.find(e=>e.team_id===s?.value);return!!t&&t.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eD,children:eL.map(e=>(0,s.jsx)(x.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,s.jsx)(N.Form.Item,{label:"Member Role",children:(0,s.jsxs)(x.Select,{value:eB,onChange:eA,children:[(0,s.jsx)(x.Select.Option,{value:"user",children:(0,s.jsxs)(C.Tooltip,{title:"Can view team info, but not manage it",children:[(0,s.jsx)("span",{className:"font-medium",children:"user"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,s.jsx)(x.Select.Option,{value:"admin",children:(0,s.jsxs)(C.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,s.jsx)("span",{className:"font-medium",children:"admin"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,s.jsx)("div",{className:"text-right mt-4",children:(0,s.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:eb,disabled:!eI,children:eb?"Adding...":"Add to Team"})})]})})]})}var ew=e.i(655913),ek=e.i(38419),eI=e.i(78334),eU=e.i(555436),eB=e.i(284614);let eA=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eD({data:e=[],columns:t,isLoading:l=!1,onSortChange:a,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:x=[],onSelectionChange:h,enableSelection:g=!1,filters:p,updateFilters:j,initialFilters:f,teams:b,userListResponse:y,currentPage:v,handlePageChange:S}){let[N,C]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[T,w]=n.default.useState(null),[k,I]=n.default.useState(!1),[U,B]=n.default.useState(!1),A=(e,s=!1)=>{w(e),I(s)},D=(e,s)=>{h&&(s?h([...x,e]):h(x.filter(s=>s.user_id!==e.user_id)))},F=s=>{h&&(s?h(e):h([]))},R=e=>x.some(s=>s.user_id===e.user_id),O=e.length>0&&x.length===e.length,E=x.length>0&&x.lengtho?ed(o,c,u,m,A,g?{selectedUsers:x,onSelectUser:D,onSelectAll:F,isUserSelected:R,isAllSelected:O,isIndeterminate:E}:void 0):t,[o,c,u,m,A,t,g,x,O,E]),L=(0,eo.useReactTable)({data:e,columns:P,state:{sorting:N},onSortingChange:e=>{let s="function"==typeof e?e(N):e;if(C(s),s&&Array.isArray(s)&&s.length>0&&s[0]){let e=s[0];if(e.id){let s=e.id,t=e.desc?"desc":"asc";a?.(s,t)}}else a?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&C([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),T)?(0,s.jsx)(eT,{userId:T,onClose:()=>{w(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Search by email...",value:p.email,onChange:e=>j({email:e}),icon:eU.Search}),(0,s.jsx)(ek.FiltersButton,{onClick:()=>B(!U),active:U,hasActiveFilters:!!(p.user_id||p.user_role||p.team)}),(0,s.jsx)(eI.ResetFiltersButton,{onClick:()=>{j(f)}})]}),U&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by User ID",value:p.user_id,onChange:e=>j({user_id:e}),icon:eB.User}),(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by SSO ID",value:p.sso_user_id,onChange:e=>j({sso_user_id:e}),icon:eA}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ej.Select,{value:p.user_role,onValueChange:e=>j({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,t])=>(0,s.jsx)(_.SelectItem,{value:e,children:t.ui_label},e))})}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ej.Select,{value:p.team,onValueChange:e=>j({team:e}),placeholder:"Select Team",children:b?.map(e=>(0,s.jsx)(_.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[l?(0,s.jsx)(e_.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,s.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",y&&y.users&&y.users.length>0?(y.page-1)*y.page_size+1:0," ","-"," ",y&&y.users?Math.min(y.page*y.page_size,y.total):0," ","of ",y?y.total:0," results"]}),(0,s.jsx)("div",{className:"flex space-x-2",children:l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>S(v-1),disabled:1===v,className:`px-3 py-1 text-sm border rounded-md ${1===v?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,s.jsx)("button",{onClick:()=>S(v+1),disabled:!y||v>=y.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!y||v>=y.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,s.jsx)("div",{className:"overflow-auto",children:(0,s.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,s.jsx)(em.TableHead,{children:L.getHeaderGroups().map(e=>(0,s.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,s.jsx)(ex.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,s.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,s.jsx)(eb.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,s.jsx)(ey.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,s.jsx)(ef.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,s.jsx)(eh.TableBody,{children:l?(0,s.jsx)(eg.TableRow,{children:(0,s.jsx)(ep.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?L.getRowModel().rows.map(e=>(0,s.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,s.jsx)(ep.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&A(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,s.jsx)(eg.TableRow,{children:(0,s.jsx)(ep.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eF,Title:eR}=c.Typography,eO={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:x})=>{let h=!!c&&(0,T.isProxyAdminRole)(c),g=(0,$.useQueryClient)(),[p,j]=(0,n.useState)(1),[b,y]=(0,n.useState)(!1),[_,v]=(0,n.useState)(null),[S,N]=(0,n.useState)(!1),[C,w]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[U,A]=(0,n.useState)("users"),[D,F]=(0,n.useState)(eO),[V,G,q]=(0,M.useDebouncedState)(D,{wait:300}),[W,H]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Y,Z]=(0,n.useState)(null),[ee,es]=(0,n.useState)([]),[et,el]=(0,n.useState)(!1),[ea,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),N(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{Z((0,f.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let s=(await (0,f.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",s),en(s)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{F(s=>{let t={...s,...e};return G(t),t})},eu=(e,s)=>{ec({sort_by:e,sort_order:s})},em=async s=>{if(!e)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let t=await (0,f.invitationCreateCall)(e,s);Q(t),H(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ex=async()=>{if(k&&e)try{w(!0),await (0,f.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:s}}),B.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{N(!1),I(null),w(!1)}},eh=async()=>{v(null),y(!1)},eg=async s=>{if(console.log("inside handleEditSubmit:",s),e&&o&&c&&u){try{let t=await (0,f.userUpdateUserCall)(e,s,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.map(e=>e.user_id===t.data.user_id?(0,L.updateExistingKeys)(e,t.data):e);return{...e,users:s}}),B.default.success(`User ${s.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}v(null),y(!1)}},ep=async e=>{j(e)},ej=e=>{es(e)},ef=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:V,currentPage:p,orgAdminOrgIds:x}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.userListCall)(e,V.user_id?[V.user_id]:null,p,25,V.email||null,V.user_role||null,V.team||null,V.sso_user_id||null,V.sort_by,V.sort_order,x?x.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),eb=ef.data,ey=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,ev=ed(ey,e=>{v(e),y(!0)},eo,em,()=>{});return(0,s.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,s.jsx)("div",{className:"flex space-x-3",children:ef.isLoading?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(O.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ey}),h&&(0,s.jsx)(d.Button,{onClick:()=>{er(!ea),es([])},type:ea?"primary":"default",className:"flex items-center",children:ea?"Cancel Selection":"Select Users"}),h&&ea&&(0,s.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?B.default.fromBackend("Please select users to edit"):el(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),h?(0,s.jsxs)(l.TabGroup,{defaultIndex:0,onIndexChange:e=>A(0===e?"users":"settings"),children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Users"}),(0,s.jsx)(t.Tab,{children:"Default User Settings"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsx)(eD,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ey,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:ea,selectedUsers:ee,onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eO,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep})}),(0,s.jsx)(r.TabPanel,{children:u&&c&&e?(0,s.jsx)(X,{accessToken:e,possibleUIRoles:ey,userID:u,userRole:c}):(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(e_.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,s.jsx)(eD,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ey,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eO,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep}),(0,s.jsx)(E,{visible:b,possibleUIRoles:ey,onCancel:eh,user:_,onSubmit:eg}),(0,s.jsx)(K.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ey?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{N(!1),I(null)},onOk:ex,confirmLoading:C}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:W,setIsInvitationLinkModalVisible:H,baseUrl:Y||"",invitationLinkData:J,modalType:"resetPassword"}),(0,s.jsx)(R,{open:et,onCancel:()=>el(!1),selectedUsers:ee,possibleUIRoles:ey,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),es([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,T.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,910119,e=>{"use strict";var s=e.i(843476),t=e.i(197647),l=e.i(653824),a=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),x=e.i(199133),h=e.i(28651),g=e.i(175712),p=e.i(770914),j=e.i(536916),f=e.i(764205),b=e.i(827252),y=e.i(994388),_=e.i(35983),v=e.i(779241),S=e.i(78085),N=e.i(808613),C=e.i(592968),T=e.i(708347),w=e.i(860585),k=e.i(355619),I=e.i(435451);function U({userData:e,onCancel:t,onSubmit:l,teams:a,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=N.Form.useForm(),[h,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let s=e.user_info?.max_budget,t=null==s;g(t),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:t?"":s,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,s.jsxs)(N.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(h||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),l(e)},layout:"vertical",children:[!u&&(0,s.jsx)(N.Form.Item,{label:"User ID",name:"user_id",children:(0,s.jsx)(v.TextInput,{disabled:!0})}),!u&&(0,s.jsx)(N.Form.Item,{label:"Email",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Alias",name:"user_alias",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Global Proxy Role"," ",(0,s.jsx)(C.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,s.jsx)(b.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,s.jsx)(x.Select,{children:c&&Object.entries(c).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("span",{children:["Personal Models"," ",(0,s.jsx)(C.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,s.jsx)(b.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(x.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!T.all_admin_roles.includes(d||""),children:[(0,s.jsx)(x.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,s.jsx)(x.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,s.jsx)(N.Form.Item,{label:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,s.jsx)("span",{children:"Max Budget (USD)"}),(0,s.jsx)(j.Checkbox,{checked:h,onChange:e=>{let s=e.target.checked;g(s),s&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,s)=>h||""!==s&&null!=s?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,s.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:h})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(w.default,{})}),(0,s.jsx)(N.Form.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,s.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,s.jsx)(y.Button,{variant:"secondary",type:"button",onClick:t,children:"Cancel"}),(0,s.jsx)(y.Button,{type:"submit",children:"Save Changes"})]})]})}var B=e.i(727749),A=e.i(888259);let{Text:D,Title:F}=c.Typography,R=({open:e,onCancel:t,selectedUsers:l,possibleUIRoles:a,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:b,allowAllUsers:y=!1})=>{let[_,v]=(0,n.useState)(!1),[S,N]=(0,n.useState)([]),[C,T]=(0,n.useState)(null),[w,k]=(0,n.useState)(!1),[I,R]=(0,n.useState)(!1),O=()=>{N([]),T(null),k(!1),R(!1),t()},E=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),P=async e=>{if(console.log("formValues",e),!r)return void B.default.fromBackend("Access token not found");v(!0);try{let s=l.map(e=>e.user_id),a={};e.user_role&&""!==e.user_role&&(a.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(a.max_budget=e.max_budget),e.models&&e.models.length>0&&(a.models=e.models),e.budget_duration&&""!==e.budget_duration&&(a.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(a.metadata=e.metadata);let n=Object.keys(a).length>0,d=w&&S.length>0;if(!n&&!d)return void B.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,f.userBulkUpdateUserCall)(r,a,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,f.userBulkUpdateUserCall)(r,a,s),o.push(`Updated ${s.length} user(s)`);if(d){let e=[];for(let s of S)try{let t=null;t=I?null:l.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let a=await (0,f.teamBulkMemberAddCall)(r,s,t||null,C||void 0,I);console.log("result",a),e.push({teamId:s,success:!0,successfulAdditions:a.successful_additions,failedAdditions:a.failed_additions})}catch(t){console.error(`Failed to add users to team ${s}:`,t),e.push({teamId:s,success:!1,error:t})}let s=e.filter(e=>e.success),t=e.filter(e=>!e.success);if(s.length>0){let e=s.reduce((e,s)=>e+s.successfulAdditions,0);o.push(`Added users to ${s.length} team(s) (${e} total additions)`)}t.length>0&&A.default.warning(`Failed to add users to ${t.length} team(s)`)}o.length>0&&B.default.success(o.join(". ")),N([]),T(null),k(!1),R(!1),i(),t()}catch(e){console.error("Bulk operation failed:",e),B.default.fromBackend("Failed to perform bulk operations")}finally{v(!1)}};return(0,s.jsxs)(o.Modal,{open:e,onCancel:O,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${l.length} User(s)`,width:800,children:[y&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(j.Checkbox,{checked:I,onChange:e=>R(e.target.checked),children:(0,s.jsx)(D,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,s.jsx)("div",{style:{marginTop:8},children:(0,s.jsx)(D,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)(F,{level:5,children:["Selected Users (",l.length,"):"]}),(0,s.jsx)(m.Table,{size:"small",bordered:!0,dataSource:l,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,s.jsx)(D,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:a?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,s.jsx)(D,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,s.jsx)(u.Divider,{}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsxs)(D,{children:[(0,s.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,s.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,s.jsxs)(p.Space,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(j.Checkbox,{checked:w,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Select Teams:"}),(0,s.jsx)(x.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:N,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D,{strong:!0,children:"Team Budget (Optional):"}),(0,s.jsx)(h.InputNumber,{placeholder:"Max budget per user in team",value:C,onChange:e=>T(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,s.jsx)(D,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,s.jsx)(U,{userData:E,onCancel:O,onSubmit:P,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:b,possibleUIRoles:a,isBulkEdit:!0}),_&&(0,s.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,s.jsxs)(D,{children:["Updating ",I?"all users":l.length," user(s)..."]})})]})};var O=e.i(371455);let E=({visible:e,possibleUIRoles:t,onCancel:l,user:a,onSubmit:r})=>{let[i,c]=(0,n.useState)(a),[u]=N.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[a]);let m=async()=>{u.resetFields(),l()},g=async e=>{r(e),u.resetFields(),l()};return a?(0,s.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+a.user_id,width:1e3,children:(0,s.jsx)(N.Form,{form:u,onFinish:g,initialValues:a,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,s.jsx)(v.TextInput,{})}),(0,s.jsx)(N.Form.Item,{label:"User Role",name:"user_role",children:(0,s.jsx)(x.Select,{children:t&&Object.entries(t).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(_.SelectItem,{value:e,title:t,children:(0,s.jsxs)("div",{className:"flex",children:[t," ",(0,s.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:l})]})},e))})}),(0,s.jsx)(N.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,s.jsx)(h.InputNumber,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,s.jsx)(I.default,{min:0,step:.01})}),(0,s.jsx)(N.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsx)(w.default,{})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var P=e.i(172372),L=e.i(500330),M=e.i(152473),z=e.i(266027),$=e.i(912598),K=e.i(127952),V=e.i(304967),G=e.i(629569),q=e.i(599724),W=e.i(114600),H=e.i(482725),J=e.i(790848),Q=e.i(646563),Y=e.i(955135);let X=({accessToken:e,possibleUIRoles:t,userID:l,userRole:a})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[p,j]=(0,n.useState)({}),[b,y]=(0,n.useState)(!1),[_,S]=(0,n.useState)([]),{Paragraph:N}=c.Typography,{Option:C}=x.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let s=await (0,f.getInternalUserSettings)(e);if(u(s),j(s.values||{}),e)try{let s=await (0,f.modelAvailableCall)(e,l,a);if(s&&s.data){let e=s.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),B.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let T=async()=>{if(e){y(!0);try{let s=Object.entries(p).reduce((e,[s,t])=>(e[s]=""===t?null:t,e),{}),t=await (0,f.updateInternalUserSettings)(e,s);u({...o,values:t.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),B.default.fromBackend("Failed to update settings: "+e)}finally{y(!1)}}},I=(e,s)=>{j(t=>({...t,[e]:s}))},U=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(H.Spin,{size:"large"})}):o?(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:()=>{g(!1),j(o.values||{})},disabled:b,children:"Cancel"}),(0,s.jsx)(d.Button,{type:"primary",onClick:T,loading:b,children:"Save Changes"})]}):(0,s.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,s.jsx)(N,{className:"mb-4",children:o.field_schema.description}),(0,s.jsx)(W.Divider,{}),(0,s.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:l}=o;return l&&l.properties?Object.entries(l.properties).map(([l,a])=>{let r=e[l],i=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,s.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,s.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,s.jsx)(N,{className:"text-sm text-gray-500 mt-1",children:a.description||"No description available"}),m?(0,s.jsx)("div",{className:"mt-2",children:((e,l,a)=>{let r=l.type;if("teams"===e){let t,l;return(0,s.jsx)("div",{className:"mt-2",children:(t=U(p[e]||[]),l=(e,s,l)=>{let a=[...t];a[e]={...a[e],[s]:l},I("teams",a)},(0,s.jsxs)("div",{className:"space-y-3",children:[t.map((e,a)=>(0,s.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)(q.Text,{className:"font-medium",children:["Team ",a+1]}),(0,s.jsx)(d.Button,{size:"small",danger:!0,icon:(0,s.jsx)(Y.DeleteOutlined,{}),onClick:()=>{I("teams",t.filter((e,s)=>s!==a))},children:"Remove"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,s.jsx)(v.TextInput,{value:e.team_id,onChange:e=>l(a,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,s.jsx)(h.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>l(a,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,s.jsxs)(x.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>l(a,"user_role",e),children:[(0,s.jsx)(C,{value:"user",children:"User"}),(0,s.jsx)(C,{value:"admin",children:"Admin"})]})]})]})]},a)),(0,s.jsx)(d.Button,{icon:(0,s.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...t,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&t)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:Object.entries(t).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:t,description:l}])=>(0,s.jsx)(C,{value:e,children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{children:t}),(0,s.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:l})]})},e))});if("budget_duration"===e)return(0,s.jsx)(w.default,{value:p[e]||null,onChange:s=>I(e,s),className:"mt-2"});if("boolean"===r)return(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(J.Switch,{checked:!!p[e],onChange:s=>I(e,s)})});if("array"===r&&l.items?.enum)return(0,s.jsx)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:l.items.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else if("models"===e)return(0,s.jsxs)(x.Select,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:[(0,s.jsx)(C,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,s.jsx)(C,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),_.map(e=>(0,s.jsx)(C,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&l.enum)return(0,s.jsx)(x.Select,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:l.enum.map(e=>(0,s.jsx)(C,{value:e,children:e},e))});else return(0,s.jsx)(v.TextInput,{value:void 0!==p[e]?String(p[e]):"",onChange:s=>I(e,s.target.value),placeholder:l.description||"",className:"mt-2"})})(l,a,0)}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,l)=>{if(null==l)return(0,s.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(l)){if(0===l.length)return(0,s.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=U(l);return(0,s.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,t)=>(0,s.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,s.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,s.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,L.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,s.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},t))})}if("user_role"===e&&t&&t[l]){let{ui_label:e,description:a}=t[l];return(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-medium",children:e}),a&&(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:a})]})}if("budget_duration"===e)return(0,s.jsx)("span",{children:(0,w.getBudgetDurationLabel)(l)});if("boolean"==typeof l)return(0,s.jsx)("span",{children:l?"Enabled":"Disabled"});if("models"===e&&Array.isArray(l))return 0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},t))});if("object"==typeof l)return Array.isArray(l)?0===l.length?(0,s.jsx)("span",{className:"text-gray-400",children:"None"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:l.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},t))}):(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(l,null,2)});return(0,s.jsx)("span",{children:String(l)})})(l,r)})]},l)}):(0,s.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,s.jsx)(V.Card,{children:(0,s.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var Z=e.i(389083),ee=e.i(350967),es=e.i(752978),et=e.i(262218),el=e.i(591935),ea=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,t,l,a,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(C.Tooltip,{title:e.original.user_id,children:(0,s.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,s.jsx)(C.Tooltip,{title:"Copy User ID",children:(0,s.jsx)(en.CopyOutlined,{onClick:s=>{s.stopPropagation(),(0,L.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>e.original.metadata?.scim_active===!1?(0,s.jsx)(C.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,s.jsx)(et.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,s.jsx)(et.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:t})=>(0,s.jsx)("span",{className:"text-xs",children:e?.[t.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.spend?(0,L.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{children:"SSO ID"}),(0,s.jsx)(C.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,s.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,s.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,s.jsxs)(Z.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,s.jsx)(Z.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,s.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(C.Tooltip,{title:"Edit user details",children:(0,s.jsx)(es.Icon,{icon:el.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,s.jsx)(C.Tooltip,{title:"Delete user",children:(0,s.jsx)(es.Icon,{icon:ea.TrashIcon,size:"sm",onClick:()=>l(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,s.jsx)(C.Tooltip,{title:"Reset Password",children:(0,s.jsx)(es.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>a(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:t,isUserSelected:l,isAllSelected:a,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,s.jsx)(j.Checkbox,{indeterminate:r,checked:a,onChange:e=>t(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:t})=>(0,s.jsx)(j.Checkbox,{checked:l(t.original),onChange:s=>e(t.original,s.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),ex=e.i(64848),eh=e.i(942232),eg=e.i(496020),ep=e.i(977572),ej=e.i(206929),ef=e.i(94629),eb=e.i(360820),ey=e.i(871943),e_=e.i(981339),ev=e.i(530212),eS=e.i(988297),eN=e.i(118366),eC=e.i(678784);function eT({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:h,possibleUIRoles:g,initialTab:p=0,startInEditMode:j=!1}){let[b,_]=(0,n.useState)(null),[v,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[A,D]=(0,n.useState)(!1),[F,R]=(0,n.useState)(!0),[O,E]=(0,n.useState)(j),[M,z]=(0,n.useState)([]),[$,W]=(0,n.useState)(!1),[H,J]=(0,n.useState)(null),[Q,Y]=(0,n.useState)(null),[X,Z]=(0,n.useState)(p),[es,et]=(0,n.useState)({}),[el,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ej,ef]=(0,n.useState)(null),[eb,ey]=(0,n.useState)(!1),[e_,eT]=(0,n.useState)(!1),[ew,ek]=(0,n.useState)([]),[eI,eU]=(0,n.useState)(""),[eB,eA]=(0,n.useState)("user"),[eD,eF]=(0,n.useState)(!1);n.default.useEffect(()=>{Y((0,f.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0)try{let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),t=await Promise.all(e);S(t)}catch{S(s.teams.map(e=>({team_id:e,team_alias:null})))}let t=(await (0,f.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(t)}catch(e){console.error("Error fetching user data:",e),B.default.fromBackend("Failed to fetch user data")}finally{R(!1)}})()},[u,e,m]);let eR="proxy_admin"===m||"Admin"===m,eO=async()=>{if(u){eF(!0);try{let e=await (0,f.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eF(!1)}}},eE=async()=>{if(u&&eI){ey(!0);try{await (0,f.teamMemberAddCall)(u,eI,{role:eB,user_id:e}),B.default.success("User added to team successfully"),ed(!1);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),B.default.fromBackend(e?.message||"Failed to add user to team")}finally{ey(!1)}}},eP=async()=>{if(u&&ej){eT(!0);try{await (0,f.teamMemberDeleteCall)(u,ej.team_id,{role:"user",user_id:e}),B.default.success("User removed from team successfully"),ec(!1),ef(null);let s=await (0,f.userGetInfoV2)(u,e);if(_(s),s.teams&&s.teams.length>0){let e=s.teams.map(async e=>{try{let s=await (0,f.teamInfoCall)(u,e);return{team_id:e,team_alias:s?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),B.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eT(!1)}}},eL=ew.filter(e=>!v.some(s=>s.team_id===e.team_id)),eM=async()=>{if(!u)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let s=await (0,f.invitationCreateCall)(u,e);J(s),W(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;D(!0),await (0,f.userDeleteCall)(u,[e]),B.default.success("User deleted successfully"),h&&h(),c()}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{I(!1),D(!1)}},e$=async e=>{try{if(!u||!b)return;await (0,f.userUpdateUserCall)(u,e,null),_({...b,user_email:e.user_email??b.user_email,user_alias:e.user_alias??b.user_alias,models:e.models??b.models,max_budget:e.max_budget??b.max_budget,budget_duration:e.budget_duration??b.budget_duration,metadata:e.metadata??b.metadata}),B.default.success("User updated successfully"),E(!1)}catch(e){console.error("Error updating user:",e),B.default.fromBackend("Failed to update user")}};if(F)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"Loading user data..."})]});if(!b)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(q.Text,{children:"User not found"})]});let eK=async(e,s)=>{await (0,L.copyToClipboard)(e)&&(et(e=>({...e,[s]:!0})),setTimeout(()=>{et(e=>({...e,[s]:!1}))},2e3))},eV={user_id:b.user_id,user_info:{user_email:b.user_email,user_alias:b.user_alias,user_role:b.user_role,models:b.models,max_budget:b.max_budget,budget_duration:b.budget_duration,metadata:b.metadata}};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(y.Button,{icon:ev.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,s.jsx)(G.Title,{children:b.user_email||"User"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"text-gray-500 font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eC.CheckIcon,{size:12}):(0,s.jsx)(eN.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&T.rolesWithWriteAccess.includes(m)&&(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(y.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:eM,className:"flex items-center",children:"Reset Password"}),(0,s.jsx)(y.Button,{icon:ea.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,s.jsx)(K.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:b.user_email},{label:"User ID",value:b.user_id,code:!0},{label:"Global Proxy Role",value:b.user_role&&g?.[b.user_role]?.ui_label||b.user_role||"-"},{label:"Total Spend (USD)",value:null!==b.spend&&void 0!==b.spend?b.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:A}),(0,s.jsxs)(l.TabGroup,{defaultIndex:X,onIndexChange:Z,children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Overview"}),(0,s.jsx)(t.Tab,{children:"Details"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Spend"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(G.Title,{children:["$",(0,L.formatNumberWithCommas)(b.spend||0,4)]}),(0,s.jsxs)(q.Text,{children:["of"," ",null!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"]})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,s.jsx)(q.Text,{children:"Teams"}),eR&&(0,s.jsx)(y.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eU(""),eA("user"),ed(!0),eO()},children:"Add Team"})]}),(0,s.jsxs)("div",{className:"mt-2",children:[v.length>0?(0,s.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,s.jsxs)(eu.Table,{children:[(0,s.jsx)(em.TableHead,{children:(0,s.jsxs)(eg.TableRow,{children:[(0,s.jsx)(ex.TableHeaderCell,{children:"Team Name"}),eR&&(0,s.jsx)(ex.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,s.jsx)(eh.TableBody,{children:v.slice(0,el?v.length:20).map(e=>(0,s.jsxs)(eg.TableRow,{children:[(0,s.jsx)(ep.TableCell,{children:e.team_alias||e.team_id}),eR&&(0,s.jsx)(ep.TableCell,{className:"text-right",children:(0,s.jsx)(y.Button,{icon:ea.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{ef(e),ec(!0)}})})]},e.team_id))})]})}):(0,s.jsx)(q.Text,{children:"No teams"}),!el&&v.length>20&&(0,s.jsxs)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",v.length-20," more"]}),el&&v.length>20&&(0,s.jsx)(y.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,s.jsxs)(V.Card,{children:[(0,s.jsx)(q.Text,{children:"Personal Models"}),(0,s.jsx)("div",{className:"mt-2",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)(q.Text,{children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,s.jsx)(r.TabPanel,{children:(0,s.jsxs)(V.Card,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(G.Title,{children:"User Settings"}),!O&&m&&T.rolesWithWriteAccess.includes(m)&&(0,s.jsx)(y.Button,{onClick:()=>E(!0),children:"Edit Settings"})]}),O&&b?(0,s.jsx)(U,{userData:eV,onCancel:()=>E(!1),onSubmit:e$,teams:v,accessToken:u,userID:e,userRole:m,userModels:M,possibleUIRoles:g}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(q.Text,{className:"font-mono",children:b.user_id}),(0,s.jsx)(d.Button,{type:"text",size:"small",icon:es["user-id"]?(0,s.jsx)(eC.CheckIcon,{size:12}):(0,s.jsx)(eN.CopyIcon,{size:12}),onClick:()=>eK(b.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${es["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,s.jsx)(q.Text,{children:b.user_email||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,s.jsx)(q.Text,{children:b.user_alias||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,s.jsx)(q.Text,{children:b.user_role||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,s.jsx)(q.Text,{children:b.created_at?new Date(b.created_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,s.jsx)(q.Text,{children:b.updated_at?new Date(b.updated_at).toLocaleString():"Unknown"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:b.models?.length&&b.models?.length>0?b.models?.map((e,t)=>(0,s.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},t)):(0,s.jsx)(q.Text,{children:"All proxy models"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,s.jsx)(q.Text,{children:null!==b.max_budget&&void 0!==b.max_budget?`$${(0,L.formatNumberWithCommas)(b.max_budget,4)}`:"Unlimited"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,s.jsx)(q.Text,{children:(0,w.getBudgetDurationLabel)(b.budget_duration??null)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(b.metadata||{},null,2)})]})]})]})})]})]}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:$,setIsInvitationLinkModalVisible:W,baseUrl:Q||"",invitationLinkData:H,modalType:"resetPassword"}),(0,s.jsx)(K.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ej?.team_alias||ej?.team_id},{label:"User ID",value:b?.user_id,code:!0},{label:"Email",value:b?.user_email}],onCancel:()=>{ec(!1),ef(null)},onOk:eP,confirmLoading:e_}),(0,s.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!eb,children:(0,s.jsxs)(N.Form,{layout:"vertical",onFinish:eE,children:[(0,s.jsx)(N.Form.Item,{label:"Team",required:!0,children:(0,s.jsx)(x.Select,{showSearch:!0,value:eI||void 0,onChange:eU,placeholder:"Select a team",filterOption:(e,s)=>{let t=eL.find(e=>e.team_id===s?.value);return!!t&&t.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eD,children:eL.map(e=>(0,s.jsx)(x.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,s.jsx)(N.Form.Item,{label:"Member Role",children:(0,s.jsxs)(x.Select,{value:eB,onChange:eA,children:[(0,s.jsx)(x.Select.Option,{value:"user",children:(0,s.jsxs)(C.Tooltip,{title:"Can view team info, but not manage it",children:[(0,s.jsx)("span",{className:"font-medium",children:"user"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,s.jsx)(x.Select.Option,{value:"admin",children:(0,s.jsxs)(C.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,s.jsx)("span",{className:"font-medium",children:"admin"}),(0,s.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,s.jsx)("div",{className:"text-right mt-4",children:(0,s.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:eb,disabled:!eI,children:eb?"Adding...":"Add to Team"})})]})})]})}var ew=e.i(655913),ek=e.i(38419),eI=e.i(78334),eU=e.i(555436),eB=e.i(284614);let eA=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eD({data:e=[],columns:t,isLoading:l=!1,onSortChange:a,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:x=[],onSelectionChange:h,enableSelection:g=!1,filters:p,updateFilters:j,initialFilters:f,teams:b,userListResponse:y,currentPage:v,handlePageChange:S}){let[N,C]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[T,w]=n.default.useState(null),[k,I]=n.default.useState(!1),[U,B]=n.default.useState(!1),A=(e,s=!1)=>{w(e),I(s)},D=(e,s)=>{h&&(s?h([...x,e]):h(x.filter(s=>s.user_id!==e.user_id)))},F=s=>{h&&(s?h(e):h([]))},R=e=>x.some(s=>s.user_id===e.user_id),O=e.length>0&&x.length===e.length,E=x.length>0&&x.lengtho?ed(o,c,u,m,A,g?{selectedUsers:x,onSelectUser:D,onSelectAll:F,isUserSelected:R,isAllSelected:O,isIndeterminate:E}:void 0):t,[o,c,u,m,A,t,g,x,O,E]),L=(0,eo.useReactTable)({data:e,columns:P,state:{sorting:N},onSortingChange:e=>{let s="function"==typeof e?e(N):e;if(C(s),s&&Array.isArray(s)&&s.length>0&&s[0]){let e=s[0];if(e.id){let s=e.id,t=e.desc?"desc":"asc";a?.(s,t)}}else a?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&C([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),T)?(0,s.jsx)(eT,{userId:T,onClose:()=>{w(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Search by email...",value:p.email,onChange:e=>j({email:e}),icon:eU.Search}),(0,s.jsx)(ek.FiltersButton,{onClick:()=>B(!U),active:U,hasActiveFilters:!!(p.user_id||p.user_role||p.team)}),(0,s.jsx)(eI.ResetFiltersButton,{onClick:()=>{j(f)}})]}),U&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by User ID",value:p.user_id,onChange:e=>j({user_id:e}),icon:eB.User}),(0,s.jsx)(ew.FilterInput,{placeholder:"Filter by SSO ID",value:p.sso_user_id,onChange:e=>j({sso_user_id:e}),icon:eA}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ej.Select,{value:p.user_role,onValueChange:e=>j({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,t])=>(0,s.jsx)(_.SelectItem,{value:e,children:t.ui_label},e))})}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(ej.Select,{value:p.team,onValueChange:e=>j({team:e}),placeholder:"Select Team",children:b?.map(e=>(0,s.jsx)(_.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[l?(0,s.jsx)(e_.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,s.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",y&&y.users&&y.users.length>0?(y.page-1)*y.page_size+1:0," ","-"," ",y&&y.users?Math.min(y.page*y.page_size,y.total):0," ","of ",y?y.total:0," results"]}),(0,s.jsx)("div",{className:"flex space-x-2",children:l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>S(v-1),disabled:1===v,className:`px-3 py-1 text-sm border rounded-md ${1===v?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,s.jsx)("button",{onClick:()=>S(v+1),disabled:!y||v>=y.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!y||v>=y.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,s.jsx)("div",{className:"overflow-auto",children:(0,s.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,s.jsx)(em.TableHead,{children:L.getHeaderGroups().map(e=>(0,s.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,s.jsx)(ex.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,s.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,s.jsx)(eb.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,s.jsx)(ey.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,s.jsx)(ef.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,s.jsx)(eh.TableBody,{children:l?(0,s.jsx)(eg.TableRow,{children:(0,s.jsx)(ep.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?L.getRowModel().rows.map(e=>(0,s.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,s.jsx)(ep.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&A(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,s.jsx)(eg.TableRow,{children:(0,s.jsx)(ep.TableCell,{colSpan:P.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eF,Title:eR}=c.Typography,eO={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:x})=>{let h=!!c&&(0,T.isProxyAdminRole)(c),g=(0,$.useQueryClient)(),[p,j]=(0,n.useState)(1),[b,y]=(0,n.useState)(!1),[_,v]=(0,n.useState)(null),[S,N]=(0,n.useState)(!1),[C,w]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[U,A]=(0,n.useState)("users"),[D,F]=(0,n.useState)(eO),[V,G,q]=(0,M.useDebouncedState)(D,{wait:300}),[W,H]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Y,Z]=(0,n.useState)(null),[ee,es]=(0,n.useState)([]),[et,el]=(0,n.useState)(!1),[ea,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),N(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{Z((0,f.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let s=(await (0,f.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",s),en(s)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{F(s=>{let t={...s,...e};return G(t),t})},eu=(e,s)=>{ec({sort_by:e,sort_order:s})},em=async s=>{if(!e)return void B.default.fromBackend("Access token not found");try{B.default.success("Generating password reset link...");let t=await (0,f.invitationCreateCall)(e,s);Q(t),H(!0)}catch(e){B.default.fromBackend("Failed to generate password reset link")}},ex=async()=>{if(k&&e)try{w(!0),await (0,f.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:s}}),B.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),B.default.fromBackend("Failed to delete user")}finally{N(!1),I(null),w(!1)}},eh=async()=>{v(null),y(!1)},eg=async s=>{if(console.log("inside handleEditSubmit:",s),e&&o&&c&&u){try{let t=await (0,f.userUpdateUserCall)(e,s,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.map(e=>e.user_id===t.data.user_id?(0,L.updateExistingKeys)(e,t.data):e);return{...e,users:s}}),B.default.success(`User ${s.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}v(null),y(!1)}},ep=async e=>{j(e)},ej=e=>{es(e)},ef=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:V,currentPage:p,orgAdminOrgIds:x}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.userListCall)(e,V.user_id?[V.user_id]:null,p,25,V.email||null,V.user_role||null,V.team||null,V.sso_user_id||null,V.sort_by,V.sort_order,x?x.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),eb=ef.data,ey=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,f.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,ev=ed(ey,e=>{v(e),y(!0)},eo,em,()=>{});return(0,s.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,s.jsx)("div",{className:"flex space-x-3",children:ef.isLoading?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,s.jsx)(e_.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,s.jsxs)(s.Fragment,{children:[h&&(0,s.jsx)(O.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ey}),h&&(0,s.jsx)(d.Button,{onClick:()=>{er(!ea),es([])},type:ea?"primary":"default",className:"flex items-center",children:ea?"Cancel Selection":"Select Users"}),h&&ea&&(0,s.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?B.default.fromBackend("Please select users to edit"):el(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),h?(0,s.jsxs)(l.TabGroup,{defaultIndex:0,onIndexChange:e=>A(0===e?"users":"settings"),children:[(0,s.jsxs)(a.TabList,{className:"mb-4",children:[(0,s.jsx)(t.Tab,{children:"Users"}),(0,s.jsx)(t.Tab,{children:"Default User Settings"})]}),(0,s.jsxs)(i.TabPanels,{children:[(0,s.jsx)(r.TabPanel,{children:(0,s.jsx)(eD,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ey,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:ea,selectedUsers:ee,onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eO,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep})}),(0,s.jsx)(r.TabPanel,{children:u&&c&&e?(0,s.jsx)(X,{accessToken:e,possibleUIRoles:ey,userID:u,userRole:c}):(0,s.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,s.jsx)(e_.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,s.jsx)(eD,{data:ef.data?.users||[],columns:ev,isLoading:ef.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ey,handleEdit:e=>{v(e),y(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ej,filters:D,updateFilters:ec,initialFilters:eO,teams:m,userListResponse:eb,currentPage:p,handlePageChange:ep}),(0,s.jsx)(E,{visible:b,possibleUIRoles:ey,onCancel:eh,user:_,onSubmit:eg}),(0,s.jsx)(K.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ey?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{N(!1),I(null)},onOk:ex,confirmLoading:C}),(0,s.jsx)(P.default,{isInvitationLinkModalVisible:W,setIsInvitationLinkModalVisible:H,baseUrl:Y||"",invitationLinkData:J,modalType:"resetPassword"}),(0,s.jsx)(R,{open:et,onCancel:()=>el(!1),selectedUsers:ee,possibleUIRoles:ey,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),es([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,T.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7149faf92f484aca.js b/litellm/proxy/_experimental/out/_next/static/chunks/878832edb30e99a4.js similarity index 62% rename from litellm/proxy/_experimental/out/_next/static/chunks/7149faf92f484aca.js rename to litellm/proxy/_experimental/out/_next/static/chunks/878832edb30e99a4.js index 572cd39698..e952d8d888 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/7149faf92f484aca.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/878832edb30e99a4.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,280898,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(121229),i=e.i(864517),s=e.i(343794),a=e.i(931067),n=e.i(209428),r=e.i(211577),c=e.i(703923),o=e.i(404948),d=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function m(e){return"string"==typeof e}let x=function(e){var l,i,x,u,h,p=e.className,g=e.prefixCls,b=e.style,j=e.active,f=e.status,v=e.iconPrefix,y=e.icon,N=(e.wrapperStyle,e.stepNumber),S=e.disabled,k=e.description,$=e.title,T=e.subTitle,w=e.progressDot,C=e.stepIcon,_=e.tailContent,P=e.icons,M=e.stepIndex,I=e.onStepClick,B=e.onClick,z=e.render,A=(0,c.default)(e,d),O={};I&&!S&&(O.role="button",O.tabIndex=0,O.onClick=function(e){null==B||B(e),I(M)},O.onKeyDown=function(e){var t=e.which;(t===o.default.ENTER||t===o.default.SPACE)&&I(M)});var H=f||"wait",E=(0,s.default)("".concat(g,"-item"),"".concat(g,"-item-").concat(H),p,(h={},(0,r.default)(h,"".concat(g,"-item-custom"),y),(0,r.default)(h,"".concat(g,"-item-active"),j),(0,r.default)(h,"".concat(g,"-item-disabled"),!0===S),h)),F=(0,n.default)({},b),L=t.createElement("div",(0,a.default)({},A,{className:E,style:F}),t.createElement("div",(0,a.default)({onClick:B},O,{className:"".concat(g,"-item-container")}),t.createElement("div",{className:"".concat(g,"-item-tail")},_),t.createElement("div",{className:"".concat(g,"-item-icon")},(x=(0,s.default)("".concat(g,"-icon"),"".concat(v,"icon"),(l={},(0,r.default)(l,"".concat(v,"icon-").concat(y),y&&m(y)),(0,r.default)(l,"".concat(v,"icon-check"),!y&&"finish"===f&&(P&&!P.finish||!P)),(0,r.default)(l,"".concat(v,"icon-cross"),!y&&"error"===f&&(P&&!P.error||!P)),l)),u=t.createElement("span",{className:"".concat(g,"-icon-dot")}),i=w?"function"==typeof w?t.createElement("span",{className:"".concat(g,"-icon")},w(u,{index:N-1,status:f,title:$,description:k})):t.createElement("span",{className:"".concat(g,"-icon")},u):y&&!m(y)?t.createElement("span",{className:"".concat(g,"-icon")},y):P&&P.finish&&"finish"===f?t.createElement("span",{className:"".concat(g,"-icon")},P.finish):P&&P.error&&"error"===f?t.createElement("span",{className:"".concat(g,"-icon")},P.error):y||"finish"===f||"error"===f?t.createElement("span",{className:x}):t.createElement("span",{className:"".concat(g,"-icon")},N),C&&(i=C({index:N-1,status:f,title:$,description:k,node:i})),i)),t.createElement("div",{className:"".concat(g,"-item-content")},t.createElement("div",{className:"".concat(g,"-item-title")},$,T&&t.createElement("div",{title:"string"==typeof T?T:void 0,className:"".concat(g,"-item-subtitle")},T)),k&&t.createElement("div",{className:"".concat(g,"-item-description")},k))));return z&&(L=z(L)||null),L};var u=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function h(e){var l,i=e.prefixCls,o=void 0===i?"rc-steps":i,d=e.style,m=void 0===d?{}:d,h=e.className,p=(e.children,e.direction),g=e.type,b=void 0===g?"default":g,j=e.labelPlacement,f=e.iconPrefix,v=void 0===f?"rc":f,y=e.status,N=void 0===y?"process":y,S=e.size,k=e.current,$=void 0===k?0:k,T=e.progressDot,w=e.stepIcon,C=e.initial,_=void 0===C?0:C,P=e.icons,M=e.onChange,I=e.itemRender,B=e.items,z=(0,c.default)(e,u),A="inline"===b,O=A||void 0!==T&&T,H=A||void 0===p?"horizontal":p,E=A?void 0:S,F=(0,s.default)(o,"".concat(o,"-").concat(H),h,(l={},(0,r.default)(l,"".concat(o,"-").concat(E),E),(0,r.default)(l,"".concat(o,"-label-").concat(O?"vertical":void 0===j?"horizontal":j),"horizontal"===H),(0,r.default)(l,"".concat(o,"-dot"),!!O),(0,r.default)(l,"".concat(o,"-navigation"),"navigation"===b),(0,r.default)(l,"".concat(o,"-inline"),A),l)),L=function(e){M&&$!==e&&M(e)};return t.default.createElement("div",(0,a.default)({className:F,style:m},z),(void 0===B?[]:B).filter(function(e){return e}).map(function(e,l){var i=(0,n.default)({},e),s=_+l;return"error"===N&&l===$-1&&(i.className="".concat(o,"-next-error")),i.status||(s===$?i.status=N:s<$?i.status="finish":i.status="wait"),A&&(i.icon=void 0,i.subTitle=void 0),!i.render&&I&&(i.render=function(e){return I(i,e)}),t.default.createElement(x,(0,a.default)({},i,{active:s===$,stepNumber:s+1,stepIndex:s,key:s,prefixCls:o,iconPrefix:v,wrapperStyle:m,progressDot:O,stepIcon:w,icons:P,onStepClick:M&&L}))}))}h.Step=x;var p=e.i(242064),g=e.i(517455),b=e.i(150073),j=e.i(309821),f=e.i(491816);e.i(296059);var v=e.i(915654),y=e.i(183293),N=e.i(246422),S=e.i(838378);let k=(e,t)=>{let l=`${t.componentCls}-item`,i=`${e}IconColor`,s=`${e}TitleColor`,a=`${e}DescriptionColor`,n=`${e}TailColor`,r=`${e}IconBgColor`,c=`${e}IconBorderColor`,o=`${e}DotColor`;return{[`${l}-${e} ${l}-icon`]:{backgroundColor:t[r],borderColor:t[c],[`> ${t.componentCls}-icon`]:{color:t[i],[`${t.componentCls}-icon-dot`]:{background:t[o]}}},[`${l}-${e}${l}-custom ${l}-icon`]:{[`> ${t.componentCls}-icon`]:{color:t[o]}},[`${l}-${e} > ${l}-container > ${l}-content > ${l}-title`]:{color:t[s],"&::after":{backgroundColor:t[n]}},[`${l}-${e} > ${l}-container > ${l}-content > ${l}-description`]:{color:t[a]},[`${l}-${e} > ${l}-container > ${l}-tail::after`]:{backgroundColor:t[n]}}},$=(0,N.genStyleHooks)("Steps",e=>{let{colorTextDisabled:t,controlHeightLG:l,colorTextLightSolid:i,colorText:s,colorPrimary:a,colorTextDescription:n,colorTextQuaternary:r,colorError:c,colorBorderSecondary:o,colorSplit:d}=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(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,y.resetComponent)(e)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),(e=>{let{componentCls:t,motionDurationSlow:l}=e,i=`${t}-item`,s=`${i}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[i]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${i}-container > ${i}-tail, > ${i}-container > ${i}-content > ${i}-title::after`]:{display:"none"}}},[`${i}-container`]:{outline:"none",[`&:focus-visible ${s}`]:(0,y.genFocusOutline)(e)},[`${s}, ${i}-content`]:{display:"inline-block",verticalAlign:"top"},[s]:{width:e.iconSize,height:e.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:e.marginXS,fontSize:e.iconFontSize,fontFamily:e.fontFamily,lineHeight:(0,v.unit)(e.iconSize),textAlign:"center",borderRadius:e.iconSize,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} transparent`,transition:`background-color ${l}, border-color ${l}`,[`${t}-icon`]:{position:"relative",top:e.iconTop,color:e.colorPrimary,lineHeight:1}},[`${i}-tail`]:{position:"absolute",top:e.calc(e.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:e.lineWidth,background:e.colorSplit,borderRadius:e.lineWidth,transition:`background ${l}`,content:'""'}},[`${i}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:e.padding,color:e.colorText,fontSize:e.fontSizeLG,lineHeight:(0,v.unit)(e.titleLineHeight),"&::after":{position:"absolute",top:e.calc(e.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:e.lineWidth,background:e.processTailColor,content:'""'}},[`${i}-subtitle`]:{display:"inline",marginInlineStart:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize},[`${i}-description`]:{color:e.colorTextDescription,fontSize:e.fontSize}},k("wait",e)),k("process",e)),{[`${i}-process > ${i}-container > ${i}-title`]:{fontWeight:e.fontWeightStrong}}),k("finish",e)),k("error",e)),{[`${i}${t}-next-error > ${t}-item-title::after`]:{background:e.colorError},[`${i}-disabled`]:{cursor:"not-allowed"}})})(e)),(e=>{let{componentCls:t,motionDurationSlow:l}=e;return{[`& ${t}-item`]:{[`&:not(${t}-item-active)`]:{[`& > ${t}-item-container[role='button']`]:{cursor:"pointer",[`${t}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${t}-icon`]:{transition:`color ${l}`}},"&:hover":{[`${t}-item`]:{"&-title, &-subtitle, &-description":{color:e.colorPrimary}}}},[`&:not(${t}-item-process)`]:{[`& > ${t}-item-container[role='button']:hover`]:{[`${t}-item`]:{"&-icon":{borderColor:e.colorPrimary,[`${t}-icon`]:{color:e.colorPrimary}}}}}}},[`&${t}-horizontal:not(${t}-label-vertical)`]:{[`${t}-item`]:{paddingInlineStart:e.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${t}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:e.descriptionMaxWidth,whiteSpace:"normal"}}}}})(e)),(e=>{let{componentCls:t,customIconTop:l,customIconSize:i,customIconFontSize:s}=e;return{[`${t}-item-custom`]:{[`> ${t}-item-container > ${t}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${t}-icon`]:{top:l,width:i,height:i,fontSize:s,lineHeight:(0,v.unit)(i)}}},[`&:not(${t}-vertical)`]:{[`${t}-item-custom`]:{[`${t}-item-icon`]:{width:"auto",background:"none"}}}}})(e)),(e=>{let{componentCls:t,iconSizeSM:l,fontSizeSM:i,fontSize:s,colorTextDescription:a}=e;return{[`&${t}-small`]:{[`&${t}-horizontal:not(${t}-label-vertical) ${t}-item`]:{paddingInlineStart:e.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${t}-item-icon`]:{width:l,height:l,marginTop:0,marginBottom:0,marginInline:`0 ${(0,v.unit)(e.marginXS)}`,fontSize:i,lineHeight:(0,v.unit)(l),textAlign:"center",borderRadius:l},[`${t}-item-title`]:{paddingInlineEnd:e.paddingSM,fontSize:s,lineHeight:(0,v.unit)(l),"&::after":{top:e.calc(l).div(2).equal()}},[`${t}-item-description`]:{color:a,fontSize:s},[`${t}-item-tail`]:{top:e.calc(l).div(2).sub(e.paddingXXS).equal()},[`${t}-item-custom ${t}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${t}-icon`]:{fontSize:l,lineHeight:(0,v.unit)(l),transform:"none"}}}}})(e)),(e=>{let{componentCls:t,iconSizeSM:l,iconSize:i}=e;return{[`&${t}-vertical`]:{display:"flex",flexDirection:"column",[`> ${t}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${t}-item-icon`]:{float:"left",marginInlineEnd:e.margin},[`${t}-item-content`]:{display:"block",minHeight:e.calc(e.controlHeight).mul(1.5).equal(),overflow:"hidden"},[`${t}-item-title`]:{lineHeight:(0,v.unit)(i)},[`${t}-item-description`]:{paddingBottom:e.paddingSM}},[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.calc(i).div(2).sub(e.lineWidth).equal(),width:e.lineWidth,height:"100%",padding:`${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).add(i).equal())} 0 ${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).equal())}`,"&::after":{width:e.lineWidth,height:"100%"}},[`> ${t}-item:not(:last-child) > ${t}-item-container > ${t}-item-tail`]:{display:"block"},[` > ${t}-item > ${t}-item-container > ${t}-item-content > ${t}-item-title`]:{"&::after":{display:"none"}},[`&${t}-small ${t}-item-container`]:{[`${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.calc(l).div(2).sub(e.lineWidth).equal(),padding:`${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).add(l).equal())} 0 ${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).equal())}`},[`${t}-item-title`]:{lineHeight:(0,v.unit)(l)}}}}})(e)),(e=>{let{componentCls:t}=e,l=`${t}-item`;return{[`${t}-horizontal`]:{[`${l}-tail`]:{transform:"translateY(-50%)"}}}})(e)),(e=>{let{componentCls:t,iconSize:l,lineHeight:i,iconSizeSM:s}=e;return{[`&${t}-label-vertical`]:{[`${t}-item`]:{overflow:"visible","&-tail":{marginInlineStart:e.calc(l).div(2).add(e.controlHeightLG).equal(),padding:`0 ${(0,v.unit)(e.paddingLG)}`},"&-content":{display:"block",width:e.calc(l).div(2).add(e.controlHeightLG).mul(2).equal(),marginTop:e.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:e.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:e.marginXXS,marginInlineStart:0,lineHeight:i}},[`&${t}-small:not(${t}-dot)`]:{[`${t}-item`]:{"&-icon":{marginInlineStart:e.calc(l).sub(s).div(2).add(e.controlHeightLG).equal()}}}}}})(e)),(e=>{let{componentCls:t,descriptionMaxWidth:l,lineHeight:i,dotCurrentSize:s,dotSize:a,motionDurationSlow:n}=e;return{[`&${t}-dot, &${t}-dot${t}-small`]:{[`${t}-item`]:{"&-title":{lineHeight:i},"&-tail":{top:e.calc(e.dotSize).sub(e.calc(e.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:`${(0,v.unit)(e.calc(l).div(2).equal())} 0`,padding:0,"&::after":{width:`calc(100% - ${(0,v.unit)(e.calc(e.marginSM).mul(2).equal())})`,height:e.calc(e.lineWidth).mul(3).equal(),marginInlineStart:e.marginSM}},"&-icon":{width:a,height:a,marginInlineStart:e.calc(e.descriptionMaxWidth).sub(a).div(2).equal(),paddingInlineEnd:0,lineHeight:(0,v.unit)(a),background:"transparent",border:0,[`${t}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${n}`,"&::after":{position:"absolute",top:e.calc(e.marginSM).mul(-1).equal(),insetInlineStart:e.calc(a).sub(e.calc(e.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:e.calc(e.controlHeightLG).mul(1.5).equal(),height:e.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:l},[`&-process ${t}-item-icon`]:{position:"relative",top:e.calc(a).sub(s).div(2).equal(),width:s,height:s,lineHeight:(0,v.unit)(s),background:"none",marginInlineStart:e.calc(e.descriptionMaxWidth).sub(s).div(2).equal()},[`&-process ${t}-icon`]:{[`&:first-child ${t}-icon-dot`]:{insetInlineStart:0}}}},[`&${t}-vertical${t}-dot`]:{[`${t}-item-icon`]:{marginTop:e.calc(e.controlHeight).sub(a).div(2).equal(),marginInlineStart:0,background:"none"},[`${t}-item-process ${t}-item-icon`]:{marginTop:e.calc(e.controlHeight).sub(s).div(2).equal(),top:0,insetInlineStart:e.calc(a).sub(s).div(2).equal(),marginInlineStart:0},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:e.calc(e.controlHeight).sub(a).div(2).equal(),insetInlineStart:0,margin:0,padding:`${(0,v.unit)(e.calc(a).add(e.paddingXS).equal())} 0 ${(0,v.unit)(e.paddingXS)}`,"&::after":{marginInlineStart:e.calc(a).sub(e.lineWidth).div(2).equal()}},[`&${t}-small`]:{[`${t}-item-icon`]:{marginTop:e.calc(e.controlHeightSM).sub(a).div(2).equal()},[`${t}-item-process ${t}-item-icon`]:{marginTop:e.calc(e.controlHeightSM).sub(s).div(2).equal()},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:e.calc(e.controlHeightSM).sub(a).div(2).equal()}},[`${t}-item:first-child ${t}-icon-dot`]:{insetInlineStart:0},[`${t}-item-content`]:{width:"inherit"}}}})(e)),(e=>{let{componentCls:t,navContentMaxWidth:l,navArrowColor:i,stepsNavActiveColor:s,motionDurationSlow:a}=e;return{[`&${t}-navigation`]:{paddingTop:e.paddingSM,[`&${t}-small`]:{[`${t}-item`]:{"&-container":{marginInlineStart:e.calc(e.marginSM).mul(-1).equal()}}},[`${t}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:e.calc(e.margin).mul(-1).equal(),paddingBottom:e.paddingSM,textAlign:"start",transition:`opacity ${a}`,[`${t}-item-content`]:{maxWidth:l},[`${t}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},y.textEllipsis),{"&::after":{display:"none"}})},[`&:not(${t}-item-active)`]:{[`${t}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${(0,v.unit)(e.calc(e.paddingSM).div(2).equal())})`,insetInlineStart:"100%",display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,borderTop:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${i}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${i}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:e.lineWidthBold,backgroundColor:s,transition:`width ${a}, inset-inline-start ${a}`,transitionTimingFunction:"ease-out",content:'""'}},[`${t}-item${t}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${t}-navigation${t}-vertical`]:{[`> ${t}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${t}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:e.calc(e.lineWidth).mul(3).equal(),height:`calc(100% - ${(0,v.unit)(e.marginLG)})`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:e.calc(e.controlHeight).mul(.25).equal(),height:e.calc(e.controlHeight).mul(.25).equal(),marginBottom:e.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}},[`&${t}-navigation${t}-horizontal`]:{[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}}})(e)),(e=>{let{componentCls:t}=e;return{[`&${t}-rtl`]:{direction:"rtl",[`${t}-item`]:{"&-subtitle":{float:"left"}},[`&${t}-navigation`]:{[`${t}-item::after`]:{transform:"rotate(-45deg)"}},[`&${t}-vertical`]:{[`> ${t}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${t}-item-icon`]:{float:"right"}}},[`&${t}-dot`]:{[`${t}-item-icon ${t}-icon-dot, &${t}-small ${t}-item-icon ${t}-icon-dot`]:{float:"right"}}}}})(e)),(e=>{let{antCls:t,componentCls:l,iconSize:i,iconSizeSM:s,processIconColor:a,marginXXS:n,lineWidthBold:r,lineWidth:c,paddingXXS:o}=e,d=e.calc(i).add(e.calc(r).mul(4).equal()).equal(),m=e.calc(s).add(e.calc(e.lineWidth).mul(4).equal()).equal();return{[`&${l}-with-progress`]:{[`${l}-item`]:{paddingTop:o,[`&-process ${l}-item-container ${l}-item-icon ${l}-icon`]:{color:a}},[`&${l}-vertical > ${l}-item `]:{paddingInlineStart:o,[`> ${l}-item-container > ${l}-item-tail`]:{top:n,insetInlineStart:e.calc(i).div(2).sub(c).add(o).equal()}},[`&, &${l}-small`]:{[`&${l}-horizontal ${l}-item:first-child`]:{paddingBottom:o,paddingInlineStart:o}},[`&${l}-small${l}-vertical > ${l}-item > ${l}-item-container > ${l}-item-tail`]:{insetInlineStart:e.calc(s).div(2).sub(c).add(o).equal()},[`&${l}-label-vertical ${l}-item ${l}-item-tail`]:{top:e.calc(i).div(2).add(o).equal()},[`${l}-item-icon`]:{position:"relative",[`${t}-progress`]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:`${(0,v.unit)(d)} !important`,height:`${(0,v.unit)(d)} !important`}}},[`&${l}-small`]:{[`&${l}-label-vertical ${l}-item ${l}-item-tail`]:{top:e.calc(s).div(2).add(o).equal()},[`${l}-item-icon ${t}-progress-inner`]:{width:`${(0,v.unit)(m)} !important`,height:`${(0,v.unit)(m)} !important`}}}}})(e)),(e=>{let{componentCls:t,inlineDotSize:l,inlineTitleColor:i,inlineTailColor:s}=e,a=e.calc(e.paddingXS).add(e.lineWidth).equal(),n={[`${t}-item-container ${t}-item-content ${t}-item-title`]:{color:i}};return{[`&${t}-inline`]:{width:"auto",display:"inline-flex",[`${t}-item`]:{flex:"none","&-container":{padding:`${(0,v.unit)(a)} ${(0,v.unit)(e.paddingXXS)} 0`,margin:`0 ${(0,v.unit)(e.calc(e.marginXXS).div(2).equal())}`,borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:l,height:l,marginInlineStart:`calc(50% - ${(0,v.unit)(e.calc(l).div(2).equal())})`,[`> ${t}-icon`]:{top:0},[`${t}-icon-dot`]:{borderRadius:e.calc(e.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:e.calc(e.marginXS).sub(e.lineWidth).equal()},"&-title":{color:i,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,fontWeight:"normal",marginBottom:e.calc(e.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:e.calc(l).div(2).add(a).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:e.lineWidth,borderRadius:0,marginInlineStart:0,background:s}},[`&:first-child ${t}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${t}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:e.colorBorderBg,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${s}`}},n),"&-finish":Object.assign({[`${t}-item-tail::after`]:{backgroundColor:s},[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:s,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${s}`}},n),"&-error":n,"&-active, &-process":Object.assign({[`${t}-item-icon`]:{width:l,height:l,marginInlineStart:`calc(50% - ${(0,v.unit)(e.calc(l).div(2).equal())})`,top:0}},n),[`&:not(${t}-item-active) > ${t}-item-container[role='button']:hover`]:{[`${t}-item-title`]:{color:i}}}}}})(e))}})((0,S.mergeToken)(e,{processIconColor:i,processTitleColor:s,processDescriptionColor:s,processIconBgColor:a,processIconBorderColor:a,processDotColor:a,processTailColor:d,waitTitleColor:n,waitDescriptionColor:n,waitTailColor:d,waitDotColor:t,finishIconColor:a,finishTitleColor:s,finishDescriptionColor:n,finishTailColor:a,finishDotColor:a,errorIconColor:i,errorTitleColor:c,errorDescriptionColor:c,errorTailColor:d,errorIconBgColor:c,errorIconBorderColor:c,errorDotColor:c,stepsNavActiveColor:a,stepsProgressSize:l,inlineDotSize:6,inlineTitleColor:r,inlineTailColor:o}))},e=>({titleLineHeight:e.controlHeight,customIconSize:e.controlHeight,customIconTop:0,customIconFontSize:e.controlHeightSM,iconSize:e.controlHeight,iconTop:-.5,iconFontSize:e.fontSize,iconSizeSM:e.fontSizeHeading3,dotSize:e.controlHeight/4,dotCurrentSize:e.controlHeightLG/4,navArrowColor:e.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:140,waitIconColor:e.wireframe?e.colorTextDisabled:e.colorTextLabel,waitIconBgColor:e.wireframe?e.colorBgContainer:e.colorFillContent,waitIconBorderColor:e.wireframe?e.colorTextDisabled:"transparent",finishIconBgColor:e.wireframe?e.colorBgContainer:e.controlItemBgActive,finishIconBorderColor:e.wireframe?e.colorPrimary:e.controlItemBgActive}));var T=e.i(876556),w=function(e,t){var l={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(l[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,i=Object.getOwnPropertySymbols(e);st.indexOf(i[s])&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(l[i[s]]=e[i[s]]);return l};let C=e=>{var a,n;let{percent:r,size:c,className:o,rootClassName:d,direction:m,items:x,responsive:u=!0,current:v=0,children:y,style:N}=e,S=w(e,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:k}=(0,b.default)(u),{getPrefixCls:C,direction:_,className:P,style:M}=(0,p.useComponentConfig)("steps"),I=t.useMemo(()=>u&&k?"vertical":m,[u,k,m]),B=(0,g.default)(c),z=C("steps",e.prefixCls),[A,O,H]=$(z),E="inline"===e.type,F=C("",e.iconPrefix),L=(a=x,n=y,a?a:(0,T.default)(n).map(e=>{if(t.isValidElement(e)){let{props:t}=e;return Object.assign({},t)}return null}).filter(e=>e)),D=E?void 0:r,q=Object.assign(Object.assign({},M),N),R=(0,s.default)(P,{[`${z}-rtl`]:"rtl"===_,[`${z}-with-progress`]:void 0!==D},o,d,O,H),W={finish:t.createElement(l.default,{className:`${z}-finish-icon`}),error:t.createElement(i.default,{className:`${z}-error-icon`})};return A(t.createElement(h,Object.assign({icons:W},S,{style:q,current:v,size:B,items:L,itemRender:E?(e,l)=>e.description?t.createElement(f.default,{title:e.description},l):l:void 0,stepIcon:({node:e,status:l})=>"process"===l&&void 0!==D?t.createElement("div",{className:`${z}-progress-icon`},t.createElement(j.default,{type:"circle",percent:D,size:"small"===B?32:40,strokeWidth:4,format:()=>null}),e):e,direction:I,prefixCls:z,iconPrefix:F,className:R})))};C.Step=h.Step,e.s(["Steps",0,C],280898)},745434,e=>{"use strict";var t=e.i(843476),l=e.i(994388),i=e.i(389083),s=e.i(599724),a=e.i(592968),n=e.i(262218),r=e.i(166406),c=e.i(827252);e.s(["getAgentHubTableColumns",0,(e,o,d=!1)=>[{header:"Agent Name",accessorKey:"name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(s.Text,{className:"font-medium text-sm",children:l.name}),(0,t.jsx)(a.Tooltip,{title:"Copy agent name",children:(0,t.jsx)(r.CopyOutlined,{onClick:()=>o(l.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(s.Text,{className:"text-xs text-gray-600",children:l.description})})]})}},{header:"Description",accessorKey:"description",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(s.Text,{className:"text-xs line-clamp-2",children:l.description||"-"})},meta:{className:"hidden md:table-cell"}},{header:"Version",accessorKey:"version",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsxs)(i.Badge,{color:"blue",size:"sm",children:["v",l.version]})},meta:{className:"hidden lg:table-cell"}},{header:"Protocol",accessorKey:"protocolVersion",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(s.Text,{className:"text-xs",children:l.protocolVersion||"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let l=e.original.skills||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(s.Text,{className:"text-xs font-medium",children:[l.length," skill",1!==l.length?"s":""]}),l.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,2).map(e=>(0,t.jsx)(n.Tag,{color:"purple",className:"text-xs",children:e.name},e.id)),l.length>2&&(0,t.jsxs)(s.Text,{className:"text-xs text-gray-500",children:["+",l.length-2]})]})]})}},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let l=Object.entries(e.original.capabilities||{}).filter(([e,t])=>!0===t).map(([e])=>e);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(s.Text,{className:"text-gray-500 text-xs",children:"-"}):l.map(e=>(0,t.jsx)(i.Badge,{color:"green",size:"xs",children:e},e))})}},{header:"I/O Modes",accessorKey:"defaultInputModes",enableSorting:!1,cell:({row:e})=>{let l=e.original,i=l.defaultInputModes||[],a=l.defaultOutputModes||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(s.Text,{className:"text-xs",children:[(0,t.jsx)("span",{className:"font-medium",children:"In:"})," ",i.join(", ")||"-"]}),(0,t.jsxs)(s.Text,{className:"text-xs",children:[(0,t.jsx)("span",{className:"font-medium",children:"Out:"})," ",a.join(", ")||"-"]})]})},meta:{className:"hidden xl:table-cell"}},{header:"Public",accessorKey:"is_public",enableSorting:!0,sortingFn:(e,t)=>(!0===e.original.is_public)-(!0===t.original.is_public),cell:({row:e})=>!0===e.original.is_public?(0,t.jsx)(i.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(i.Badge,{color:"gray",size:"xs",children:"No"}),meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:i})=>{let s=i.original;return(0,t.jsxs)(l.Button,{size:"xs",variant:"secondary",onClick:()=>e(s),icon:c.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}]])},934879,e=>{"use strict";var t=e.i(843476),l=e.i(745434),i=e.i(271645),s=e.i(212931),a=e.i(808613),n=e.i(280898),r=e.i(464571),c=e.i(536916),o=e.i(599724),d=e.i(629569),m=e.i(389083),x=e.i(764205),u=e.i(727749);let{Step:h}=n.Steps,p=({visible:e,onClose:l,accessToken:p,agentHubData:g,onSuccess:b})=>{let[j,f]=(0,i.useState)(0),[v,y]=(0,i.useState)(new Set),[N,S]=(0,i.useState)(!1),[k]=a.Form.useForm(),$=()=>{f(0),y(new Set),k.resetFields(),l()};(0,i.useEffect)(()=>{e&&g.length>0&&y(new Set(g.filter(e=>!0===e.is_public).map(e=>e.agent_id||e.name)))},[e,g]);let T=async()=>{if(0===v.size)return void u.default.fromBackend("Please select at least one agent to make public");S(!0);try{let e=Array.from(v);await (0,x.makeAgentsPublicCall)(p,e),u.default.success(`Successfully made ${e.length} agent(s) public!`),$(),b()}catch(e){console.error("Error making agents public:",e),u.default.fromBackend("Failed to make agents public. Please try again.")}finally{S(!1)}};return(0,t.jsx)(s.Modal,{title:"Make Agents Public",open:e,onCancel:$,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:k,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:j,className:"mb-6",children:[(0,t.jsx)(h,{title:"Select Agents"}),(0,t.jsx)(h,{title:"Confirm"})]}),(()=>{switch(j){case 0:let e,l;return e=g.length>0&&g.every(e=>v.has(e.agent_id||e.name)),l=v.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Agents to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?y(new Set(g.map(e=>e.agent_id||e.name))):y(new Set)},disabled:0===g.length,children:["Select All ",g.length>0&&`(${g.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the agents you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these agents."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===g.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No agents available."})}):g.map(e=>{let l=e.agent_id||e.name;return(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:v.has(l),onChange:e=>{var t;let i;return t=e.target.checked,i=new Set(v),void(t?i.add(l):i.delete(l),y(i))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.name}),(0,t.jsxs)(m.Badge,{color:"blue",size:"sm",children:["v",e.version]})]}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:e.description}),e.skills&&e.skills.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[e.skills.slice(0,3).map(e=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e.name},e.id)),e.skills.length>3&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",e.skills.length-3," more"]})]})]})]},l)})})}),v.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:v.size})," agent",1!==v.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making Agents Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these agents public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Agents to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(v).map(e=>{let l=g.find(t=>(t.agent_id||t.name)===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:l?.name||e}),l&&(0,t.jsxs)(m.Badge,{color:"blue",size:"xs",children:["v",l.version]})]}),l?.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:l.description})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:v.size})," agent",1!==v.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===j?$:()=>{1===j&&f(0)},children:0===j?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===j&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===j){if(0===v.size)return void u.default.fromBackend("Please select at least one agent to make public");f(1)}},disabled:0===v.size,children:"Next"}),1===j&&(0,t.jsx)(r.Button,{onClick:T,loading:N,children:"Make Public"})]})]})]})})},{Step:g}=n.Steps,b=({visible:e,onClose:l,accessToken:h,mcpHubData:p,onSuccess:b})=>{let[j,f]=(0,i.useState)(0),[v,y]=(0,i.useState)(new Set),[N,S]=(0,i.useState)(!1),[k]=a.Form.useForm(),$=()=>{f(0),y(new Set),k.resetFields(),l()};(0,i.useEffect)(()=>{e&&p.length>0&&y(new Set(p.filter(e=>e.mcp_info?.is_public===!0).map(e=>e.server_id)))},[e]);let T=async()=>{if(0===v.size)return void u.default.fromBackend("Please select at least one MCP server to make public");S(!0);try{let e=Array.from(v);await (0,x.makeMCPPublicCall)(h,e),u.default.success(`Successfully made ${e.length} MCP server(s) public!`),$(),b()}catch(e){console.error("Error making MCP servers public:",e),u.default.fromBackend("Failed to make MCP servers public. Please try again.")}finally{S(!1)}};return(0,t.jsx)(s.Modal,{title:"Make MCP Servers Public",open:e,onCancel:$,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:k,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:j,className:"mb-6",children:[(0,t.jsx)(g,{title:"Select Servers"}),(0,t.jsx)(g,{title:"Confirm"})]}),(()=>{switch(j){case 0:let e,l;return e=p.length>0&&p.every(e=>v.has(e.server_id)),l=v.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select MCP Servers to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?y(new Set(p.map(e=>e.server_id))):y(new Set)},disabled:0===p.length,children:["Select All ",p.length>0&&`(${p.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the MCP servers you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these servers."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===p.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No MCP servers available."})}):p.map(e=>{let l=e.mcp_info?.is_public===!0;return(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:v.has(e.server_id),onChange:t=>{var l,i;let s;return l=e.server_id,i=t.target.checked,s=new Set(v),void(i?s.add(l):s.delete(l),y(s))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.server_name}),l&&(0,t.jsx)(m.Badge,{color:"emerald",size:"sm",children:"Public"}),(0,t.jsx)(m.Badge,{color:"blue",size:"sm",children:e.transport}),(0,t.jsx)(m.Badge,{color:"active"===e.status||"healthy"===e.status?"green":"inactive"===e.status||"unhealthy"===e.status?"red":"gray",size:"sm",children:e.status||"unknown"})]}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:e.description||e.url}),e.allowed_tools&&e.allowed_tools.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[e.allowed_tools.slice(0,3).map((e,l)=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e},l)),e.allowed_tools.length>3&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",e.allowed_tools.length-3," more"]})]})]})]},e.server_id)})})}),v.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:v.size})," MCP server",1!==v.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making MCP Servers Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these MCP servers public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"MCP Servers to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(v).map(e=>{let l=p.find(t=>t.server_id===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:l?.server_name||e}),l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:l.transport}),(0,t.jsx)(m.Badge,{color:"active"===l.status||"healthy"===l.status?"green":"inactive"===l.status||"unhealthy"===l.status?"red":"gray",size:"xs",children:l.status||"unknown"})]})]}),l?.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:l.description}),l?.url&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-500 mt-1",children:l.url})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:v.size})," MCP server",1!==v.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===j?$:()=>{1===j&&f(0)},children:0===j?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===j&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===j){if(0===v.size)return void u.default.fromBackend("Please select at least one MCP server to make public");f(1)}},disabled:0===v.size,children:"Next"}),1===j&&(0,t.jsx)(r.Button,{onClick:T,loading:N,children:"Make Public"})]})]})]})})};var j=e.i(304967);let f=({modelHubData:e,onFilteredDataChange:l,showFiltersCard:s=!0,className:a=""})=>{let n,r,c,[d,m]=(0,i.useState)(""),[x,u]=(0,i.useState)(""),[h,p]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),f=(0,i.useRef)([]),v=(0,i.useMemo)(()=>e?.filter(e=>{let t=e.model_group.toLowerCase().includes(d.toLowerCase()),l=""===x||e.providers.includes(x),i=""===h||e.mode===h,s=""===g||Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).some(([e])=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")===g);return t&&l&&i&&s})||[],[e,d,x,h,g]);(0,i.useEffect)(()=>{(v.length!==f.current.length||v.some((e,t)=>e.model_group!==f.current[t]?.model_group))&&(f.current=v,l(v))},[v,l]);let y=(0,t.jsxs)("div",{className:"flex flex-wrap gap-4 items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Search Models:"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names...",value:d,onChange:e=>m(e.target.value),className:"border rounded px-3 py-2 w-64 h-10 text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Provider:"}),(0,t.jsxs)("select",{value:x,onChange:e=>u(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-40 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Providers"}),e&&(n=new Set,e.forEach(e=>{e.providers.forEach(e=>n.add(e))}),Array.from(n)).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Mode:"}),(0,t.jsxs)("select",{value:h,onChange:e=>p(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-32 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Modes"}),e&&(r=new Set,e.forEach(e=>{e.mode&&r.add(e.mode)}),Array.from(r)).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Features:"}),(0,t.jsxs)("select",{value:g,onChange:e=>b(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-48 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Features"}),e&&(c=new Set,e.forEach(e=>{Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).forEach(([e])=>{let t=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");c.add(t)})}),Array.from(c).sort()).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(d||x||h||g)&&(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsx)("button",{onClick:()=>{m(""),u(""),p(""),b("")},className:"text-blue-600 hover:text-blue-800 text-sm underline h-10 flex items-center",children:"Clear Filters"})})]});return s?(0,t.jsx)(j.Card,{className:`mb-6 ${a}`,children:y}):(0,t.jsx)("div",{className:a,children:y})},{Step:v}=n.Steps,y=({visible:e,onClose:l,accessToken:h,modelHubData:p,onSuccess:g})=>{let[b,j]=(0,i.useState)(0),[y,N]=(0,i.useState)(new Set),[S,k]=(0,i.useState)([]),[$,T]=(0,i.useState)(!1),[w]=a.Form.useForm(),C=()=>{j(0),N(new Set),k([]),w.resetFields(),l()},_=(0,i.useCallback)(e=>{k(e)},[]);(0,i.useEffect)(()=>{e&&p.length>0&&(k(p),N(new Set(p.filter(e=>!0===e.is_public_model_group).map(e=>e.model_group))))},[e,p]);let P=async()=>{if(0===y.size)return void u.default.fromBackend("Please select at least one model to make public");T(!0);try{let e=Array.from(y);await (0,x.makeModelGroupPublic)(h,e),u.default.success(`Successfully made ${e.length} model group(s) public!`),C(),g()}catch(e){console.error("Error making model groups public:",e),u.default.fromBackend("Failed to make model groups public. Please try again.")}finally{T(!1)}};return(0,t.jsx)(s.Modal,{title:"Make Models Public",open:e,onCancel:C,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:w,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:b,className:"mb-6",children:[(0,t.jsx)(v,{title:"Select Models"}),(0,t.jsx)(v,{title:"Confirm"})]}),(()=>{switch(b){case 0:let e,l;return e=S.length>0&&S.every(e=>y.has(e.model_group)),l=y.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Models to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?N(new Set(S.map(e=>e.model_group))):N(new Set)},disabled:0===S.length,children:["Select All ",S.length>0&&`(${S.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the models you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these models."}),(0,t.jsx)(f,{modelHubData:p,onFilteredDataChange:_,showFiltersCard:!1,className:"border rounded-lg p-4 bg-gray-50"}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===S.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No models match the current filters."})}):S.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:y.has(e.model_group),onChange:t=>{var l,i;let s;return l=e.model_group,i=t.target.checked,s=new Set(y),void(i?s.add(l):s.delete(l),N(s))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.model_group}),e.mode&&(0,t.jsx)(m.Badge,{color:"green",size:"sm",children:e.mode})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e},e))})]})]},e.model_group))})}),y.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:y.size})," model",1!==y.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making Models Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these models public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Models to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(y).map(e=>{let l=p.find(t=>t.model_group===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e}),l&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:l.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e},e))})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:y.size})," model",1!==y.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===b?C:()=>{1===b&&j(0)},children:0===b?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===b&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===b){if(0===y.size)return void u.default.fromBackend("Please select at least one model to make public");j(1)}},disabled:0===y.size,children:"Next"}),1===b&&(0,t.jsx)(r.Button,{onClick:P,loading:$,children:"Make Public"})]})]})]})})};var N=e.i(994388),S=e.i(592968),k=e.i(262218),$=e.i(166406),T=e.i(827252);let w=e=>`$${(1e6*e).toFixed(2)}`,C=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString();var _=e.i(902555),P=e.i(708347),M=e.i(871943),I=e.i(502547),B=e.i(434626),z=e.i(250980),A=e.i(269200),O=e.i(942232),H=e.i(977572),E=e.i(427612),F=e.i(64848),L=e.i(496020),D=e.i(522016);let q=({accessToken:e,userRole:l})=>{let[s,a]=(0,i.useState)([]),[n,r]=(0,i.useState)({url:"",displayName:""}),[c,m]=(0,i.useState)(null),[h,p]=(0,i.useState)(!1),[g,b]=(0,i.useState)(!0),[f,v]=(0,i.useState)(!1),[y,N]=(0,i.useState)([]),S=async()=>{if(e)try{p(!0);let e=await (0,x.getPublicModelHubInfo)();if(e&&e.useful_links){let t=e.useful_links||{},l=Object.entries(t).map(([e,t])=>"object"==typeof t&&null!==t&&"url"in t?{id:`${t.index??0}-${e}`,displayName:e,url:t.url,index:t.index??0}:{id:`0-${e}`,displayName:e,url:t,index:0}).sort((e,t)=>(e.index??0)-(t.index??0)).map((e,t)=>({...e,id:`${t}-${e.displayName}`}));a(l)}else a([])}catch(e){console.error("Error fetching useful links:",e),a([])}finally{p(!1)}};if((0,i.useEffect)(()=>{S()},[e]),!(0,P.isAdminRole)(l||""))return null;let k=async t=>{if(!e)return!1;try{let l={};return t.forEach((e,t)=>{l[e.displayName]={url:e.url,index:t}}),await (0,x.updateUsefulLinksCall)(e,l),!0}catch(e){return console.error("Error saving links:",e),u.default.fromBackend(`Failed to save links - ${e}`),!1}},$=async()=>{if(!n.url||!n.displayName)return;try{new URL(n.url)}catch{u.default.fromBackend("Please enter a valid URL");return}if(s.some(e=>e.displayName===n.displayName))return void u.default.fromBackend("A link with this display name already exists");let e=[...s,{id:`${Date.now()}-${n.displayName}`,displayName:n.displayName,url:n.url}];await k(e)&&(a(e),r({url:"",displayName:""}),u.default.success("Link added successfully"))},T=async()=>{if(!c)return;try{new URL(c.url)}catch{u.default.fromBackend("Please enter a valid URL");return}if(s.some(e=>e.id!==c.id&&e.displayName===c.displayName))return void u.default.fromBackend("A link with this display name already exists");let e=s.map(e=>e.id===c.id?c:e);await k(e)&&(a(e),m(null),u.default.success("Link updated successfully"))},w=()=>{m(null)},C=async e=>{let t=s.filter(t=>t.id!==e);await k(t)&&(a(t),u.default.success("Link deleted successfully"))},q=async()=>{await k(s)&&(v(!1),N([]),u.default.success("Link order saved successfully"))};return(0,t.jsxs)(j.Card,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>b(!g),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(d.Title,{className:"mb-0",children:"Link Management"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Manage the links that are displayed under 'Useful Links' on the public model hub."})]}),(0,t.jsx)("div",{className:"flex items-center",children:g?(0,t.jsx)(M.ChevronDownIcon,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(I.ChevronRightIcon,{className:"w-5 h-5 text-gray-500"})})]}),g&&(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 Link"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Display Name"}),(0,t.jsx)("input",{type:"text",value:n.displayName,onChange:e=>r({...n,displayName:e.target.value}),placeholder:"Friendly name",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:"URL"}),(0,t.jsx)("input",{type:"text",value:n.url,onChange:e=>r({...n,url:e.target.value}),placeholder:"https://example.com",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:$,disabled:!n.url||!n.displayName,className:`flex items-center px-4 py-2 rounded-md text-sm ${!n.url||!n.displayName?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(z.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Link"]})})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700",children:"Manage Existing Links"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)(D.default,{href:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`,target:"_blank",rel:"noopener noreferrer",className:"text-xs bg-blue-50 text-blue-600 px-3 py-1.5 rounded hover:bg-blue-100 flex items-center",title:"Open Public Model Hub",children:["Public Model Hub",(0,t.jsx)(B.ExternalLinkIcon,{className:"w-4 h-4 ml-1"})]}),f?(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:q,className:"text-xs bg-green-600 text-white px-3 py-1.5 rounded hover:bg-green-700",children:"Save Order"}),(0,t.jsx)("button",{onClick:()=>{a([...y]),v(!1),N([])},className:"text-xs bg-gray-50 text-gray-600 px-3 py-1.5 rounded hover:bg-gray-100",children:"Cancel"})]}):(0,t.jsx)("button",{onClick:()=>{c&&m(null),N([...s]),v(!0)},className:"text-xs bg-purple-50 text-purple-600 px-3 py-1.5 rounded hover:bg-purple-100 flex items-center",children:"Rearrange Order"})]})]}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(A.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(E.TableHead,{children:(0,t.jsxs)(L.TableRow,{children:[(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"Display Name"}),(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"URL"}),(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(O.TableBody,{children:[s.map((e,l)=>(0,t.jsx)(L.TableRow,{className:"h-8",children:c&&c.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:c.displayName,onChange:e=>m({...c,displayName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(H.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:c.url,onChange:e=>m({...c,url:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(H.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:T,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:w,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.TableCell,{className:"py-0.5 text-sm text-gray-900",children:e.displayName}),(0,t.jsx)(H.TableCell,{className:"py-0.5 text-sm text-gray-500",children:e.url}),(0,t.jsx)(H.TableCell,{className:"py-0.5 whitespace-nowrap",children:f?(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)(_.default,{variant:"Up",onClick:()=>(e=>{if(0===e)return;let t=[...s];[t[e-1],t[e]]=[t[e],t[e-1]],a(t)})(l),tooltipText:"Move up",disabled:0===l,disabledTooltipText:"Already at the top",dataTestId:`move-up-${e.id}`}),(0,t.jsx)(_.default,{variant:"Down",onClick:()=>(e=>{if(e===s.length-1)return;let t=[...s];[t[e],t[e+1]]=[t[e+1],t[e]],a(t)})(l),tooltipText:"Move down",disabled:l===s.length-1,disabledTooltipText:"Already at the bottom",dataTestId:`move-down-${e.id}`})]}):(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)(_.default,{variant:"Open",onClick:()=>{var t;return t=e.url,void window.open(t,"_blank")},tooltipText:"Open link",dataTestId:`open-link-${e.id}`}),(0,t.jsx)(_.default,{variant:"Edit",onClick:()=>{m({...e})},tooltipText:"Edit link",dataTestId:`edit-link-${e.id}`}),(0,t.jsx)(_.default,{variant:"Delete",onClick:()=>C(e.id),tooltipText:"Delete link",dataTestId:`delete-link-${e.id}`})]})})]})},e.id)),0===s.length&&(0,t.jsx)(L.TableRow,{children:(0,t.jsx)(H.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No links added yet. Add a new link above."})})]})]})})})]})]})};var R=e.i(737033);let{Step:W}=n.Steps,U=({visible:e,onClose:l,accessToken:h,skillsList:p,onSuccess:g})=>{let[b,j]=(0,i.useState)(0),[f,v]=(0,i.useState)(new Set),[y,N]=(0,i.useState)(!1),[S]=a.Form.useForm(),k=()=>{j(0),v(new Set),S.resetFields(),l()};(0,i.useEffect)(()=>{e&&p.length>0&&v(new Set(p.filter(e=>e.enabled).map(e=>e.name)))},[e,p]);let $=async()=>{if(0===f.size)return void u.default.fromBackend("Please select at least one skill");N(!0);try{await Promise.all(p.map(e=>{let t=f.has(e.name);return t&&!e.enabled?(0,x.enableClaudeCodePlugin)(h,e.name):!t&&e.enabled?(0,x.disableClaudeCodePlugin)(h,e.name):Promise.resolve()})),u.default.success(`Skill Hub updated — ${f.size} skill(s) published`),k(),g()}catch(e){console.error("Error publishing skills:",e),u.default.fromBackend("Failed to update skills. Please try again.")}finally{N(!1)}},T=p.length>0&&p.every(e=>f.has(e.name)),w=f.size>0&&!T;return(0,t.jsx)(s.Modal,{title:"Publish to Skill Hub",open:e,onCancel:k,footer:null,width:700,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:S,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:b,className:"mb-6",children:[(0,t.jsx)(W,{title:"Select Skills"}),(0,t.jsx)(W,{title:"Confirm"})]}),0===b?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Skills to Publish"}),(0,t.jsxs)(c.Checkbox,{checked:T,indeterminate:w,onChange:e=>{e.target.checked?v(new Set(p.map(e=>e.name))):v(new Set)},disabled:0===p.length,children:["Select All (",p.length,")"]})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Selected skills will be visible to all users in the Skill Hub. Deselected skills will be unpublished."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===p.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No skills registered yet."})}):p.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:f.has(e.name),onChange:t=>{var l,i;let s;return l=e.name,i=t.target.checked,s=new Set(f),void(i?s.add(l):s.delete(l),v(s))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Text,{className:"font-medium font-mono text-sm",children:e.name}),e.enabled&&(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Public"})]}),e.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-500 truncate max-w-sm",children:e.description})]}),e.domain&&(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e.domain})]},e.name))})}),f.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:f.size})," skill",1!==f.size?"s":""," will be published"]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Publish to Skill Hub"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Note:"})," Published skills will be visible to all users in the Skill Hub tab. Skills not in the list below will be unpublished."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Skills to be published:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(f).map(e=>{let l=p.find(t=>t.name===e);return(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:[(0,t.jsx)(o.Text,{className:"font-mono text-sm",children:e}),l?.domain&&(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:l.domain})]},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:f.size})," skill",1!==f.size?"s":""," will be published"]})})]}),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===b?k:()=>j(0),children:0===b?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===b&&(0,t.jsx)(r.Button,{onClick:()=>{0===f.size?u.default.fromBackend("Please select at least one skill"):j(1)},disabled:0===f.size,children:"Next"}),1===b&&(0,t.jsx)(r.Button,{onClick:$,loading:y,children:"Publish to Hub"})]})]})]})})};var K=e.i(798496),X=e.i(976883),G=e.i(197647),V=e.i(653824),Y=e.i(881073),J=e.i(404206),Q=e.i(723731),Z=e.i(174886),ee=e.i(618566),et=e.i(650056),el=e.i(292639),ei=e.i(161281),es=e.i(268004);e.s(["default",0,({accessToken:e,publicPage:a,premiumUser:n,userRole:r})=>{let c,h,[g,v]=(0,i.useState)(!1),[_,M]=(0,i.useState)(null),[I,B]=(0,i.useState)(!0),[z,A]=(0,i.useState)(!1),[O,H]=(0,i.useState)(!1),[E,F]=(0,i.useState)(null),[L,D]=(0,i.useState)([]),[W,ea]=(0,i.useState)(!1),[en,er]=(0,i.useState)(null),[ec,eo]=(0,i.useState)(!1),[ed,em]=(0,i.useState)(!0),[ex,eu]=(0,i.useState)(null),[eh,ep]=(0,i.useState)(!1),[eg,eb]=(0,i.useState)(null),[ej,ef]=(0,i.useState)(!0),[ev,ey]=(0,i.useState)(null),[eN,eS]=(0,i.useState)(!1),[ek,e$]=(0,i.useState)(!1),[eT,ew]=(0,i.useState)([]),[eC,e_]=(0,i.useState)(!1),[eP,eM]=(0,i.useState)(!1),eI=(0,ee.useRouter)(),{data:eB,isLoading:ez}=(0,el.useUISettings)();(0,i.useEffect)(()=>{if(!ez&&a&&!0===eB?.values?.require_auth_for_public_ai_hub){let e=(0,es.getCookie)("token");if(!(0,ei.checkTokenValidity)(e))return void eI.replace(`${(0,x.getProxyBaseUrl)()}/ui/login`)}},[ez,a,eB,eI]),(0,i.useEffect)(()=>{let t=async e=>{try{B(!0);let t=await (0,x.modelHubCall)(e);console.log("ModelHubData:",t),M(t.data),(0,x.getConfigFieldSetting)(e,"enable_public_model_hub").then(e=>{console.log(`data: ${JSON.stringify(e)}`),!0==e.field_value&&v(!0)}).catch(e=>{})}catch(e){console.error("There was an error fetching the model data",e)}finally{B(!1)}},l=async()=>{try{B(!0),await (0,x.getUiConfig)();let e=await (0,x.modelHubPublicModelsCall)();console.log("ModelHubData:",e),console.log("First model structure:",e[0]),console.log("Model has model_group?",e[0]?.model_group),console.log("Model has providers?",e[0]?.providers),M(e),v(!0)}catch(e){console.error("There was an error fetching the public model data",e)}finally{B(!1)}};e?t(e):a&&l()},[e,a]),(0,i.useEffect)(()=>{let t=async()=>{if(e)try{em(!0);let t=await (0,x.getAgentsList)(e);console.log("AgentHubData:",t);let l=t.agents.map(e=>({agent_id:e.agent_id,...e.agent_card_params,is_public:e.litellm_params.is_public}));er(l)}catch(e){console.error("There was an error fetching the agent data",e)}finally{em(!1)}};a||t()},[a,e]),(0,i.useEffect)(()=>{let t=async()=>{if(e)try{ef(!0);let t=await (0,x.fetchMCPServers)(e);console.log("MCPHubData:",t),eb(t)}catch(e){console.error("There was an error fetching the MCP server data",e)}finally{ef(!1)}};a||t()},[a,e]),(0,i.useEffect)(()=>{(async()=>{if(e)try{e_(!0);let t=!0===a,l=await (0,x.getClaudeCodePluginsList)(e,t);ew(l.plugins)}catch(e){console.error("Error fetching skill hub data",e)}finally{e_(!1)}})()},[e,a]);let eA=()=>{A(!1),H(!1),F(null),ep(!1),eu(null),eS(!1),ey(null)},eO=()=>{A(!1),H(!1),F(null),ep(!1),eu(null),eS(!1),ey(null)},eH=e=>{navigator.clipboard.writeText(e),u.default.success("Copied to clipboard!")},eE=e=>`$${(1e6*e).toFixed(2)}`,eF=(0,i.useCallback)(e=>{D(e)},[]);return(console.log("publicPage: ",a),console.log("publicPageAllowed: ",g),a&&g)?(0,t.jsx)(X.default,{accessToken:e}):(0,t.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[!1==a?(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start",children:[(0,t.jsx)(d.Title,{className:"text-center",children:"AI Hub"}),(0,P.isAdminRole)(r||"")?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Make models, agents, and MCP servers public for developers to know what's available."}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"A list of all public model names personally available to you."})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)(o.Text,{children:"Model Hub URL:"}),(0,t.jsxs)("div",{className:"flex items-center bg-gray-200 px-2 py-1 rounded",children:[(0,t.jsx)(o.Text,{className:"mr-2",children:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`}),(0,t.jsx)("button",{onClick:()=>eH(`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`),className:"p-1 hover:bg-gray-300 rounded transition-colors",title:"Copy URL",children:(0,t.jsx)(Z.Copy,{size:16,className:"text-gray-600"})})]})]})]}),(0,P.isAdminRole)(r||"")&&(0,t.jsx)("div",{className:"mt-8 mb-2",children:(0,t.jsx)(q,{accessToken:e,userRole:r})}),(0,t.jsxs)(V.TabGroup,{children:[(0,t.jsxs)(Y.TabList,{className:"mb-4",children:[(0,t.jsx)(G.Tab,{children:"Model Hub"}),(0,t.jsx)(G.Tab,{children:"Agent Hub"}),(0,t.jsx)(G.Tab,{children:"MCP Hub"}),(0,t.jsx)(G.Tab,{children:"Skill Hub"})]}),(0,t.jsxs)(Q.TabPanels,{children:[(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&(0,P.isAdminRole)(r||"")&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&ea(!0)),children:"Select Models to Make Public"})}),(0,t.jsx)(f,{modelHubData:_||[],onFilteredDataChange:eF}),(0,t.jsx)(K.ModelDataTable,{columns:((e,l,i=!1)=>{let s=[{header:"Public Model Name",accessorKey:"model_group",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let i=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium text-sm",children:i.model_group}),(0,t.jsx)(S.Tooltip,{title:"Copy model name",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(i.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(o.Text,{className:"text-xs text-gray-600",children:i.providers.join(", ")})})]})}},{header:"Provider",accessorKey:"providers",enableSorting:!0,sortingFn:(e,t)=>{let l=e.original.providers.join(", "),i=t.original.providers.join(", ");return l.localeCompare(i)},cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.providers.slice(0,2).map(e=>(0,t.jsx)(k.Tag,{color:"blue",className:"text-xs",children:e},e)),l.providers.length>2&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",l.providers.length-2]})]})},meta:{className:"hidden md:table-cell"}},{header:"Mode",accessorKey:"mode",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return l.mode?(0,t.jsx)(m.Badge,{color:"green",size:"sm",children:l.mode}):(0,t.jsx)(o.Text,{className:"text-gray-500",children:"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Tokens",accessorKey:"max_input_tokens",enableSorting:!0,sortingFn:(e,t)=>(e.original.max_input_tokens||0)+(e.original.max_output_tokens||0)-((t.original.max_input_tokens||0)+(t.original.max_output_tokens||0)),cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsxs)(o.Text,{className:"text-xs",children:[l.max_input_tokens?C(l.max_input_tokens):"-"," /"," ",l.max_output_tokens?C(l.max_output_tokens):"-"]})})},meta:{className:"hidden lg:table-cell"}},{header:"Cost/1M",accessorKey:"input_cost_per_token",enableSorting:!0,sortingFn:(e,t)=>(e.original.input_cost_per_token||0)+(e.original.output_cost_per_token||0)-((t.original.input_cost_per_token||0)+(t.original.output_cost_per_token||0)),cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(o.Text,{className:"text-xs",children:l.input_cost_per_token?w(l.input_cost_per_token):"-"}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-500",children:l.output_cost_per_token?w(l.output_cost_per_token):"-"})]})}},{header:"Features",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let l=Object.entries(e.original).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),i=["green","blue","purple","orange","red","yellow"];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(o.Text,{className:"text-gray-500 text-xs",children:"-"}):l.map((e,l)=>(0,t.jsx)(m.Badge,{color:i[l%i.length],size:"xs",children:e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},e))})}},{header:"Public",accessorKey:"is_public_model_group",enableSorting:!0,sortingFn:(e,t)=>(!0===e.original.is_public_model_group)-(!0===t.original.is_public_model_group),cell:({row:e})=>!0===e.original.is_public_model_group?(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:"No"}),meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:l})=>{let i=l.original;return(0,t.jsxs)(N.Button,{size:"xs",variant:"secondary",onClick:()=>e(i),icon:T.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}];return i?s.filter(e=>!("accessorKey"in e)||"is_public_model_group"!==e.accessorKey):s})(e=>{F(e),A(!0)},eH,a),data:L,isLoading:I,defaultSorting:[{id:"model_group",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",L.length," of ",_?.length||0," models"]})})]}),(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&(0,P.isAdminRole)(r||"")&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&eo(!0)),children:"Select Agents to Make Public"})}),(0,t.jsx)(K.ModelDataTable,{columns:(0,l.getAgentHubTableColumns)(e=>{eu(e),ep(!0)},eH,a),data:en||[],isLoading:ed,defaultSorting:[{id:"name",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",en?.length||0," agent",en?.length!==1?"s":""]})})]}),(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&(0,P.isAdminRole)(r||"")&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&e$(!0)),children:"Select MCP Servers to Make Public"})}),(0,t.jsx)(K.ModelDataTable,{columns:((e,l,i=!1)=>[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let i=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium text-sm",children:i.server_name}),(0,t.jsx)(S.Tooltip,{title:"Copy server name",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(i.server_name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(o.Text,{className:"text-xs text-gray-600",children:i.description||"-"})})]})}},{header:"Description",accessorKey:"description",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(o.Text,{className:"text-xs line-clamp-2",children:l.description||"-"})},meta:{className:"hidden md:table-cell"}},{header:"URL",accessorKey:"url",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let i=e.original;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"text-xs truncate max-w-xs",children:i.url}),(0,t.jsx)(S.Tooltip,{title:"Copy URL",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(i.url),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs flex-shrink-0"})})]})},meta:{className:"hidden lg:table-cell"}},{header:"Transport",accessorKey:"transport",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(m.Badge,{color:"blue",size:"sm",children:l.transport})},meta:{className:"hidden md:table-cell"}},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,i="none"===l.auth_type?"gray":"green";return(0,t.jsx)(m.Badge,{color:i,size:"sm",children:l.auth_type})},meta:{className:"hidden md:table-cell"}},{header:"Status",accessorKey:"status",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,i={active:"green",inactive:"red",unknown:"gray",healthy:"green",unhealthy:"red"}[l.status]||"gray";return(0,t.jsx)(m.Badge,{color:i,size:"sm",children:l.status||"unknown"})}},{header:"Tools",accessorKey:"allowed_tools",enableSorting:!1,cell:({row:e})=>{let l=e.original.allowed_tools||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(o.Text,{className:"text-xs font-medium",children:l.length>0?`${l.length} tool${1!==l.length?"s":""}`:"All tools"}),l.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,2).map((e,l)=>(0,t.jsx)(k.Tag,{color:"purple",className:"text-xs",children:e},l)),l.length>2&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",l.length-2]})]})]})},meta:{className:"hidden lg:table-cell"}},{header:"Created By",accessorKey:"created_by",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(o.Text,{className:"text-xs",children:l.created_by||"-"})},meta:{className:"hidden xl:table-cell"}},{header:"Public",accessorKey:"mcp_info.is_public",enableSorting:!0,sortingFn:(e,t)=>(e.original.mcp_info?.is_public===!0)-(t.original.mcp_info?.is_public===!0),cell:({row:e})=>{let l=e.original;return l.mcp_info?.is_public===!0?(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:"No"})},meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:l})=>{let i=l.original;return(0,t.jsxs)(N.Button,{size:"xs",variant:"secondary",onClick:()=>e(i),icon:T.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}])(e=>{ey(e),eS(!0)},eH,a),data:eg||[],isLoading:ej,defaultSorting:[{id:"server_name",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",eg?.length||0," MCP server",eg?.length!==1?"s":""]})})]}),(0,t.jsxs)(J.TabPanel,{children:[!1==a&&(0,P.isAdminRole)(r||"")&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>eM(!0),children:"Select Skills to Make Public"})}),(0,t.jsx)(R.default,{skills:eT,isLoading:eC,isAdmin:(0,P.isAdminRole)(r||""),accessToken:e,publicPage:a,onPublishSuccess:async()=>{ew((await (0,x.getClaudeCodePluginsList)(e||"",a)).plugins)}})]})]})]})]}):(0,t.jsxs)(j.Card,{className:"mx-auto max-w-xl mt-10",children:[(0,t.jsx)(o.Text,{className:"text-xl text-center mb-2 text-black",children:"Public Model Hub not enabled."}),(0,t.jsx)("p",{className:"text-base text-center text-slate-800",children:"Ask your proxy admin to enable this on their Admin UI."})]}),(0,t.jsx)(s.Modal,{title:"Public Model Hub",width:600,open:O,footer:null,onOk:eA,onCancel:eO,children:(0,t.jsxs)("div",{className:"pt-5 pb-5",children:[(0,t.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,t.jsx)(o.Text,{className:"text-base mr-2",children:"Shareable Link:"}),(0,t.jsx)(o.Text,{className:"max-w-sm ml-2 bg-gray-200 pr-2 pl-2 pt-1 pb-1 text-center rounded",children:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(N.Button,{onClick:()=>{eI.replace(`/model_hub_table?key=${e}`)},children:"See Page"})})]})}),(0,t.jsx)(s.Modal,{title:E?.model_group||"Model Details",width:1e3,open:z,footer:null,onOk:eA,onCancel:eO,children:E&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Model Group:"}),(0,t.jsx)(o.Text,{children:E.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(o.Text,{children:E.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:E.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",children:e},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(o.Text,{children:E.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(o.Text,{children:E.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:E.input_cost_per_token?eE(E.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:E.output_cost_per_token?eE(E.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(c=Object.entries(E).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),h=["green","blue","purple","orange","red","yellow"],0===c.length?(0,t.jsx)(o.Text,{className:"text-gray-500",children:"No special capabilities listed"}):c.map((e,l)=>(0,t.jsx)(m.Badge,{color:h[l%h.length],children:e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},e)))})]}),(E.tpm||E.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[E.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(o.Text,{children:E.tpm.toLocaleString()})]}),E.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(o.Text,{children:E.rpm.toLocaleString()})]})]})]}),E.supported_openai_params&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:E.supported_openai_params.map(e=>(0,t.jsx)(m.Badge,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(et.Prism,{language:"python",className:"text-sm",children:`import openai +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,280898,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(121229),s=e.i(864517),i=e.i(343794),a=e.i(931067),n=e.i(209428),r=e.i(211577),c=e.i(703923),o=e.i(404948),d=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function m(e){return"string"==typeof e}let x=function(e){var l,s,x,u,h,p=e.className,g=e.prefixCls,b=e.style,j=e.active,f=e.status,v=e.iconPrefix,y=e.icon,N=(e.wrapperStyle,e.stepNumber),S=e.disabled,k=e.description,$=e.title,T=e.subTitle,w=e.progressDot,C=e.stepIcon,_=e.tailContent,P=e.icons,M=e.stepIndex,I=e.onStepClick,B=e.onClick,z=e.render,O=(0,c.default)(e,d),A={};I&&!S&&(A.role="button",A.tabIndex=0,A.onClick=function(e){null==B||B(e),I(M)},A.onKeyDown=function(e){var t=e.which;(t===o.default.ENTER||t===o.default.SPACE)&&I(M)});var H=f||"wait",E=(0,i.default)("".concat(g,"-item"),"".concat(g,"-item-").concat(H),p,(h={},(0,r.default)(h,"".concat(g,"-item-custom"),y),(0,r.default)(h,"".concat(g,"-item-active"),j),(0,r.default)(h,"".concat(g,"-item-disabled"),!0===S),h)),F=(0,n.default)({},b),L=t.createElement("div",(0,a.default)({},O,{className:E,style:F}),t.createElement("div",(0,a.default)({onClick:B},A,{className:"".concat(g,"-item-container")}),t.createElement("div",{className:"".concat(g,"-item-tail")},_),t.createElement("div",{className:"".concat(g,"-item-icon")},(x=(0,i.default)("".concat(g,"-icon"),"".concat(v,"icon"),(l={},(0,r.default)(l,"".concat(v,"icon-").concat(y),y&&m(y)),(0,r.default)(l,"".concat(v,"icon-check"),!y&&"finish"===f&&(P&&!P.finish||!P)),(0,r.default)(l,"".concat(v,"icon-cross"),!y&&"error"===f&&(P&&!P.error||!P)),l)),u=t.createElement("span",{className:"".concat(g,"-icon-dot")}),s=w?"function"==typeof w?t.createElement("span",{className:"".concat(g,"-icon")},w(u,{index:N-1,status:f,title:$,description:k})):t.createElement("span",{className:"".concat(g,"-icon")},u):y&&!m(y)?t.createElement("span",{className:"".concat(g,"-icon")},y):P&&P.finish&&"finish"===f?t.createElement("span",{className:"".concat(g,"-icon")},P.finish):P&&P.error&&"error"===f?t.createElement("span",{className:"".concat(g,"-icon")},P.error):y||"finish"===f||"error"===f?t.createElement("span",{className:x}):t.createElement("span",{className:"".concat(g,"-icon")},N),C&&(s=C({index:N-1,status:f,title:$,description:k,node:s})),s)),t.createElement("div",{className:"".concat(g,"-item-content")},t.createElement("div",{className:"".concat(g,"-item-title")},$,T&&t.createElement("div",{title:"string"==typeof T?T:void 0,className:"".concat(g,"-item-subtitle")},T)),k&&t.createElement("div",{className:"".concat(g,"-item-description")},k))));return z&&(L=z(L)||null),L};var u=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function h(e){var l,s=e.prefixCls,o=void 0===s?"rc-steps":s,d=e.style,m=void 0===d?{}:d,h=e.className,p=(e.children,e.direction),g=e.type,b=void 0===g?"default":g,j=e.labelPlacement,f=e.iconPrefix,v=void 0===f?"rc":f,y=e.status,N=void 0===y?"process":y,S=e.size,k=e.current,$=void 0===k?0:k,T=e.progressDot,w=e.stepIcon,C=e.initial,_=void 0===C?0:C,P=e.icons,M=e.onChange,I=e.itemRender,B=e.items,z=(0,c.default)(e,u),O="inline"===b,A=O||void 0!==T&&T,H=O||void 0===p?"horizontal":p,E=O?void 0:S,F=(0,i.default)(o,"".concat(o,"-").concat(H),h,(l={},(0,r.default)(l,"".concat(o,"-").concat(E),E),(0,r.default)(l,"".concat(o,"-label-").concat(A?"vertical":void 0===j?"horizontal":j),"horizontal"===H),(0,r.default)(l,"".concat(o,"-dot"),!!A),(0,r.default)(l,"".concat(o,"-navigation"),"navigation"===b),(0,r.default)(l,"".concat(o,"-inline"),O),l)),L=function(e){M&&$!==e&&M(e)};return t.default.createElement("div",(0,a.default)({className:F,style:m},z),(void 0===B?[]:B).filter(function(e){return e}).map(function(e,l){var s=(0,n.default)({},e),i=_+l;return"error"===N&&l===$-1&&(s.className="".concat(o,"-next-error")),s.status||(i===$?s.status=N:i<$?s.status="finish":s.status="wait"),O&&(s.icon=void 0,s.subTitle=void 0),!s.render&&I&&(s.render=function(e){return I(s,e)}),t.default.createElement(x,(0,a.default)({},s,{active:i===$,stepNumber:i+1,stepIndex:i,key:i,prefixCls:o,iconPrefix:v,wrapperStyle:m,progressDot:A,stepIcon:w,icons:P,onStepClick:M&&L}))}))}h.Step=x;var p=e.i(242064),g=e.i(517455),b=e.i(150073),j=e.i(309821),f=e.i(491816);e.i(296059);var v=e.i(915654),y=e.i(183293),N=e.i(246422),S=e.i(838378);let k=(e,t)=>{let l=`${t.componentCls}-item`,s=`${e}IconColor`,i=`${e}TitleColor`,a=`${e}DescriptionColor`,n=`${e}TailColor`,r=`${e}IconBgColor`,c=`${e}IconBorderColor`,o=`${e}DotColor`;return{[`${l}-${e} ${l}-icon`]:{backgroundColor:t[r],borderColor:t[c],[`> ${t.componentCls}-icon`]:{color:t[s],[`${t.componentCls}-icon-dot`]:{background:t[o]}}},[`${l}-${e}${l}-custom ${l}-icon`]:{[`> ${t.componentCls}-icon`]:{color:t[o]}},[`${l}-${e} > ${l}-container > ${l}-content > ${l}-title`]:{color:t[i],"&::after":{backgroundColor:t[n]}},[`${l}-${e} > ${l}-container > ${l}-content > ${l}-description`]:{color:t[a]},[`${l}-${e} > ${l}-container > ${l}-tail::after`]:{backgroundColor:t[n]}}},$=(0,N.genStyleHooks)("Steps",e=>{let{colorTextDisabled:t,controlHeightLG:l,colorTextLightSolid:s,colorText:i,colorPrimary:a,colorTextDescription:n,colorTextQuaternary:r,colorError:c,colorBorderSecondary:o,colorSplit:d}=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(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,y.resetComponent)(e)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),(e=>{let{componentCls:t,motionDurationSlow:l}=e,s=`${t}-item`,i=`${s}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[s]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${s}-container > ${s}-tail, > ${s}-container > ${s}-content > ${s}-title::after`]:{display:"none"}}},[`${s}-container`]:{outline:"none",[`&:focus-visible ${i}`]:(0,y.genFocusOutline)(e)},[`${i}, ${s}-content`]:{display:"inline-block",verticalAlign:"top"},[i]:{width:e.iconSize,height:e.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:e.marginXS,fontSize:e.iconFontSize,fontFamily:e.fontFamily,lineHeight:(0,v.unit)(e.iconSize),textAlign:"center",borderRadius:e.iconSize,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} transparent`,transition:`background-color ${l}, border-color ${l}`,[`${t}-icon`]:{position:"relative",top:e.iconTop,color:e.colorPrimary,lineHeight:1}},[`${s}-tail`]:{position:"absolute",top:e.calc(e.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:e.lineWidth,background:e.colorSplit,borderRadius:e.lineWidth,transition:`background ${l}`,content:'""'}},[`${s}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:e.padding,color:e.colorText,fontSize:e.fontSizeLG,lineHeight:(0,v.unit)(e.titleLineHeight),"&::after":{position:"absolute",top:e.calc(e.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:e.lineWidth,background:e.processTailColor,content:'""'}},[`${s}-subtitle`]:{display:"inline",marginInlineStart:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize},[`${s}-description`]:{color:e.colorTextDescription,fontSize:e.fontSize}},k("wait",e)),k("process",e)),{[`${s}-process > ${s}-container > ${s}-title`]:{fontWeight:e.fontWeightStrong}}),k("finish",e)),k("error",e)),{[`${s}${t}-next-error > ${t}-item-title::after`]:{background:e.colorError},[`${s}-disabled`]:{cursor:"not-allowed"}})})(e)),(e=>{let{componentCls:t,motionDurationSlow:l}=e;return{[`& ${t}-item`]:{[`&:not(${t}-item-active)`]:{[`& > ${t}-item-container[role='button']`]:{cursor:"pointer",[`${t}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${t}-icon`]:{transition:`color ${l}`}},"&:hover":{[`${t}-item`]:{"&-title, &-subtitle, &-description":{color:e.colorPrimary}}}},[`&:not(${t}-item-process)`]:{[`& > ${t}-item-container[role='button']:hover`]:{[`${t}-item`]:{"&-icon":{borderColor:e.colorPrimary,[`${t}-icon`]:{color:e.colorPrimary}}}}}}},[`&${t}-horizontal:not(${t}-label-vertical)`]:{[`${t}-item`]:{paddingInlineStart:e.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${t}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:e.descriptionMaxWidth,whiteSpace:"normal"}}}}})(e)),(e=>{let{componentCls:t,customIconTop:l,customIconSize:s,customIconFontSize:i}=e;return{[`${t}-item-custom`]:{[`> ${t}-item-container > ${t}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${t}-icon`]:{top:l,width:s,height:s,fontSize:i,lineHeight:(0,v.unit)(s)}}},[`&:not(${t}-vertical)`]:{[`${t}-item-custom`]:{[`${t}-item-icon`]:{width:"auto",background:"none"}}}}})(e)),(e=>{let{componentCls:t,iconSizeSM:l,fontSizeSM:s,fontSize:i,colorTextDescription:a}=e;return{[`&${t}-small`]:{[`&${t}-horizontal:not(${t}-label-vertical) ${t}-item`]:{paddingInlineStart:e.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${t}-item-icon`]:{width:l,height:l,marginTop:0,marginBottom:0,marginInline:`0 ${(0,v.unit)(e.marginXS)}`,fontSize:s,lineHeight:(0,v.unit)(l),textAlign:"center",borderRadius:l},[`${t}-item-title`]:{paddingInlineEnd:e.paddingSM,fontSize:i,lineHeight:(0,v.unit)(l),"&::after":{top:e.calc(l).div(2).equal()}},[`${t}-item-description`]:{color:a,fontSize:i},[`${t}-item-tail`]:{top:e.calc(l).div(2).sub(e.paddingXXS).equal()},[`${t}-item-custom ${t}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${t}-icon`]:{fontSize:l,lineHeight:(0,v.unit)(l),transform:"none"}}}}})(e)),(e=>{let{componentCls:t,iconSizeSM:l,iconSize:s}=e;return{[`&${t}-vertical`]:{display:"flex",flexDirection:"column",[`> ${t}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${t}-item-icon`]:{float:"left",marginInlineEnd:e.margin},[`${t}-item-content`]:{display:"block",minHeight:e.calc(e.controlHeight).mul(1.5).equal(),overflow:"hidden"},[`${t}-item-title`]:{lineHeight:(0,v.unit)(s)},[`${t}-item-description`]:{paddingBottom:e.paddingSM}},[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.calc(s).div(2).sub(e.lineWidth).equal(),width:e.lineWidth,height:"100%",padding:`${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).add(s).equal())} 0 ${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).equal())}`,"&::after":{width:e.lineWidth,height:"100%"}},[`> ${t}-item:not(:last-child) > ${t}-item-container > ${t}-item-tail`]:{display:"block"},[` > ${t}-item > ${t}-item-container > ${t}-item-content > ${t}-item-title`]:{"&::after":{display:"none"}},[`&${t}-small ${t}-item-container`]:{[`${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.calc(l).div(2).sub(e.lineWidth).equal(),padding:`${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).add(l).equal())} 0 ${(0,v.unit)(e.calc(e.marginXXS).mul(1.5).equal())}`},[`${t}-item-title`]:{lineHeight:(0,v.unit)(l)}}}}})(e)),(e=>{let{componentCls:t}=e,l=`${t}-item`;return{[`${t}-horizontal`]:{[`${l}-tail`]:{transform:"translateY(-50%)"}}}})(e)),(e=>{let{componentCls:t,iconSize:l,lineHeight:s,iconSizeSM:i}=e;return{[`&${t}-label-vertical`]:{[`${t}-item`]:{overflow:"visible","&-tail":{marginInlineStart:e.calc(l).div(2).add(e.controlHeightLG).equal(),padding:`0 ${(0,v.unit)(e.paddingLG)}`},"&-content":{display:"block",width:e.calc(l).div(2).add(e.controlHeightLG).mul(2).equal(),marginTop:e.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:e.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:e.marginXXS,marginInlineStart:0,lineHeight:s}},[`&${t}-small:not(${t}-dot)`]:{[`${t}-item`]:{"&-icon":{marginInlineStart:e.calc(l).sub(i).div(2).add(e.controlHeightLG).equal()}}}}}})(e)),(e=>{let{componentCls:t,descriptionMaxWidth:l,lineHeight:s,dotCurrentSize:i,dotSize:a,motionDurationSlow:n}=e;return{[`&${t}-dot, &${t}-dot${t}-small`]:{[`${t}-item`]:{"&-title":{lineHeight:s},"&-tail":{top:e.calc(e.dotSize).sub(e.calc(e.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:`${(0,v.unit)(e.calc(l).div(2).equal())} 0`,padding:0,"&::after":{width:`calc(100% - ${(0,v.unit)(e.calc(e.marginSM).mul(2).equal())})`,height:e.calc(e.lineWidth).mul(3).equal(),marginInlineStart:e.marginSM}},"&-icon":{width:a,height:a,marginInlineStart:e.calc(e.descriptionMaxWidth).sub(a).div(2).equal(),paddingInlineEnd:0,lineHeight:(0,v.unit)(a),background:"transparent",border:0,[`${t}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${n}`,"&::after":{position:"absolute",top:e.calc(e.marginSM).mul(-1).equal(),insetInlineStart:e.calc(a).sub(e.calc(e.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:e.calc(e.controlHeightLG).mul(1.5).equal(),height:e.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:l},[`&-process ${t}-item-icon`]:{position:"relative",top:e.calc(a).sub(i).div(2).equal(),width:i,height:i,lineHeight:(0,v.unit)(i),background:"none",marginInlineStart:e.calc(e.descriptionMaxWidth).sub(i).div(2).equal()},[`&-process ${t}-icon`]:{[`&:first-child ${t}-icon-dot`]:{insetInlineStart:0}}}},[`&${t}-vertical${t}-dot`]:{[`${t}-item-icon`]:{marginTop:e.calc(e.controlHeight).sub(a).div(2).equal(),marginInlineStart:0,background:"none"},[`${t}-item-process ${t}-item-icon`]:{marginTop:e.calc(e.controlHeight).sub(i).div(2).equal(),top:0,insetInlineStart:e.calc(a).sub(i).div(2).equal(),marginInlineStart:0},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:e.calc(e.controlHeight).sub(a).div(2).equal(),insetInlineStart:0,margin:0,padding:`${(0,v.unit)(e.calc(a).add(e.paddingXS).equal())} 0 ${(0,v.unit)(e.paddingXS)}`,"&::after":{marginInlineStart:e.calc(a).sub(e.lineWidth).div(2).equal()}},[`&${t}-small`]:{[`${t}-item-icon`]:{marginTop:e.calc(e.controlHeightSM).sub(a).div(2).equal()},[`${t}-item-process ${t}-item-icon`]:{marginTop:e.calc(e.controlHeightSM).sub(i).div(2).equal()},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:e.calc(e.controlHeightSM).sub(a).div(2).equal()}},[`${t}-item:first-child ${t}-icon-dot`]:{insetInlineStart:0},[`${t}-item-content`]:{width:"inherit"}}}})(e)),(e=>{let{componentCls:t,navContentMaxWidth:l,navArrowColor:s,stepsNavActiveColor:i,motionDurationSlow:a}=e;return{[`&${t}-navigation`]:{paddingTop:e.paddingSM,[`&${t}-small`]:{[`${t}-item`]:{"&-container":{marginInlineStart:e.calc(e.marginSM).mul(-1).equal()}}},[`${t}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:e.calc(e.margin).mul(-1).equal(),paddingBottom:e.paddingSM,textAlign:"start",transition:`opacity ${a}`,[`${t}-item-content`]:{maxWidth:l},[`${t}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},y.textEllipsis),{"&::after":{display:"none"}})},[`&:not(${t}-item-active)`]:{[`${t}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${(0,v.unit)(e.calc(e.paddingSM).div(2).equal())})`,insetInlineStart:"100%",display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,borderTop:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${s}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${s}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:e.lineWidthBold,backgroundColor:i,transition:`width ${a}, inset-inline-start ${a}`,transitionTimingFunction:"ease-out",content:'""'}},[`${t}-item${t}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${t}-navigation${t}-vertical`]:{[`> ${t}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${t}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:e.calc(e.lineWidth).mul(3).equal(),height:`calc(100% - ${(0,v.unit)(e.marginLG)})`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:e.calc(e.controlHeight).mul(.25).equal(),height:e.calc(e.controlHeight).mul(.25).equal(),marginBottom:e.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}},[`&${t}-navigation${t}-horizontal`]:{[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}}})(e)),(e=>{let{componentCls:t}=e;return{[`&${t}-rtl`]:{direction:"rtl",[`${t}-item`]:{"&-subtitle":{float:"left"}},[`&${t}-navigation`]:{[`${t}-item::after`]:{transform:"rotate(-45deg)"}},[`&${t}-vertical`]:{[`> ${t}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${t}-item-icon`]:{float:"right"}}},[`&${t}-dot`]:{[`${t}-item-icon ${t}-icon-dot, &${t}-small ${t}-item-icon ${t}-icon-dot`]:{float:"right"}}}}})(e)),(e=>{let{antCls:t,componentCls:l,iconSize:s,iconSizeSM:i,processIconColor:a,marginXXS:n,lineWidthBold:r,lineWidth:c,paddingXXS:o}=e,d=e.calc(s).add(e.calc(r).mul(4).equal()).equal(),m=e.calc(i).add(e.calc(e.lineWidth).mul(4).equal()).equal();return{[`&${l}-with-progress`]:{[`${l}-item`]:{paddingTop:o,[`&-process ${l}-item-container ${l}-item-icon ${l}-icon`]:{color:a}},[`&${l}-vertical > ${l}-item `]:{paddingInlineStart:o,[`> ${l}-item-container > ${l}-item-tail`]:{top:n,insetInlineStart:e.calc(s).div(2).sub(c).add(o).equal()}},[`&, &${l}-small`]:{[`&${l}-horizontal ${l}-item:first-child`]:{paddingBottom:o,paddingInlineStart:o}},[`&${l}-small${l}-vertical > ${l}-item > ${l}-item-container > ${l}-item-tail`]:{insetInlineStart:e.calc(i).div(2).sub(c).add(o).equal()},[`&${l}-label-vertical ${l}-item ${l}-item-tail`]:{top:e.calc(s).div(2).add(o).equal()},[`${l}-item-icon`]:{position:"relative",[`${t}-progress`]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:`${(0,v.unit)(d)} !important`,height:`${(0,v.unit)(d)} !important`}}},[`&${l}-small`]:{[`&${l}-label-vertical ${l}-item ${l}-item-tail`]:{top:e.calc(i).div(2).add(o).equal()},[`${l}-item-icon ${t}-progress-inner`]:{width:`${(0,v.unit)(m)} !important`,height:`${(0,v.unit)(m)} !important`}}}}})(e)),(e=>{let{componentCls:t,inlineDotSize:l,inlineTitleColor:s,inlineTailColor:i}=e,a=e.calc(e.paddingXS).add(e.lineWidth).equal(),n={[`${t}-item-container ${t}-item-content ${t}-item-title`]:{color:s}};return{[`&${t}-inline`]:{width:"auto",display:"inline-flex",[`${t}-item`]:{flex:"none","&-container":{padding:`${(0,v.unit)(a)} ${(0,v.unit)(e.paddingXXS)} 0`,margin:`0 ${(0,v.unit)(e.calc(e.marginXXS).div(2).equal())}`,borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:l,height:l,marginInlineStart:`calc(50% - ${(0,v.unit)(e.calc(l).div(2).equal())})`,[`> ${t}-icon`]:{top:0},[`${t}-icon-dot`]:{borderRadius:e.calc(e.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:e.calc(e.marginXS).sub(e.lineWidth).equal()},"&-title":{color:s,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,fontWeight:"normal",marginBottom:e.calc(e.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:e.calc(l).div(2).add(a).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:e.lineWidth,borderRadius:0,marginInlineStart:0,background:i}},[`&:first-child ${t}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${t}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:e.colorBorderBg,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${i}`}},n),"&-finish":Object.assign({[`${t}-item-tail::after`]:{backgroundColor:i},[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:i,border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${i}`}},n),"&-error":n,"&-active, &-process":Object.assign({[`${t}-item-icon`]:{width:l,height:l,marginInlineStart:`calc(50% - ${(0,v.unit)(e.calc(l).div(2).equal())})`,top:0}},n),[`&:not(${t}-item-active) > ${t}-item-container[role='button']:hover`]:{[`${t}-item-title`]:{color:s}}}}}})(e))}})((0,S.mergeToken)(e,{processIconColor:s,processTitleColor:i,processDescriptionColor:i,processIconBgColor:a,processIconBorderColor:a,processDotColor:a,processTailColor:d,waitTitleColor:n,waitDescriptionColor:n,waitTailColor:d,waitDotColor:t,finishIconColor:a,finishTitleColor:i,finishDescriptionColor:n,finishTailColor:a,finishDotColor:a,errorIconColor:s,errorTitleColor:c,errorDescriptionColor:c,errorTailColor:d,errorIconBgColor:c,errorIconBorderColor:c,errorDotColor:c,stepsNavActiveColor:a,stepsProgressSize:l,inlineDotSize:6,inlineTitleColor:r,inlineTailColor:o}))},e=>({titleLineHeight:e.controlHeight,customIconSize:e.controlHeight,customIconTop:0,customIconFontSize:e.controlHeightSM,iconSize:e.controlHeight,iconTop:-.5,iconFontSize:e.fontSize,iconSizeSM:e.fontSizeHeading3,dotSize:e.controlHeight/4,dotCurrentSize:e.controlHeightLG/4,navArrowColor:e.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:140,waitIconColor:e.wireframe?e.colorTextDisabled:e.colorTextLabel,waitIconBgColor:e.wireframe?e.colorBgContainer:e.colorFillContent,waitIconBorderColor:e.wireframe?e.colorTextDisabled:"transparent",finishIconBgColor:e.wireframe?e.colorBgContainer:e.controlItemBgActive,finishIconBorderColor:e.wireframe?e.colorPrimary:e.controlItemBgActive}));var T=e.i(876556),w=function(e,t){var l={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,s=Object.getOwnPropertySymbols(e);it.indexOf(s[i])&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(l[s[i]]=e[s[i]]);return l};let C=e=>{var a,n;let{percent:r,size:c,className:o,rootClassName:d,direction:m,items:x,responsive:u=!0,current:v=0,children:y,style:N}=e,S=w(e,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:k}=(0,b.default)(u),{getPrefixCls:C,direction:_,className:P,style:M}=(0,p.useComponentConfig)("steps"),I=t.useMemo(()=>u&&k?"vertical":m,[u,k,m]),B=(0,g.default)(c),z=C("steps",e.prefixCls),[O,A,H]=$(z),E="inline"===e.type,F=C("",e.iconPrefix),L=(a=x,n=y,a?a:(0,T.default)(n).map(e=>{if(t.isValidElement(e)){let{props:t}=e;return Object.assign({},t)}return null}).filter(e=>e)),D=E?void 0:r,q=Object.assign(Object.assign({},M),N),R=(0,i.default)(P,{[`${z}-rtl`]:"rtl"===_,[`${z}-with-progress`]:void 0!==D},o,d,A,H),W={finish:t.createElement(l.default,{className:`${z}-finish-icon`}),error:t.createElement(s.default,{className:`${z}-error-icon`})};return O(t.createElement(h,Object.assign({icons:W},S,{style:q,current:v,size:B,items:L,itemRender:E?(e,l)=>e.description?t.createElement(f.default,{title:e.description},l):l:void 0,stepIcon:({node:e,status:l})=>"process"===l&&void 0!==D?t.createElement("div",{className:`${z}-progress-icon`},t.createElement(j.default,{type:"circle",percent:D,size:"small"===B?32:40,strokeWidth:4,format:()=>null}),e):e,direction:I,prefixCls:z,iconPrefix:F,className:R})))};C.Step=h.Step,e.s(["Steps",0,C],280898)},745434,e=>{"use strict";var t=e.i(843476),l=e.i(994388),s=e.i(389083),i=e.i(599724),a=e.i(592968),n=e.i(262218),r=e.i(166406),c=e.i(827252);e.s(["getAgentHubTableColumns",0,(e,o,d=!1)=>[{header:"Agent Name",accessorKey:"name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(i.Text,{className:"font-medium text-sm",children:l.name}),(0,t.jsx)(a.Tooltip,{title:"Copy agent name",children:(0,t.jsx)(r.CopyOutlined,{onClick:()=>o(l.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(i.Text,{className:"text-xs text-gray-600",children:l.description})})]})}},{header:"Description",accessorKey:"description",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(i.Text,{className:"text-xs line-clamp-2",children:l.description||"-"})},meta:{className:"hidden md:table-cell"}},{header:"Version",accessorKey:"version",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsxs)(s.Badge,{color:"blue",size:"sm",children:["v",l.version]})},meta:{className:"hidden lg:table-cell"}},{header:"Protocol",accessorKey:"protocolVersion",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(i.Text,{className:"text-xs",children:l.protocolVersion||"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let l=e.original.skills||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(i.Text,{className:"text-xs font-medium",children:[l.length," skill",1!==l.length?"s":""]}),l.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,2).map(e=>(0,t.jsx)(n.Tag,{color:"purple",className:"text-xs",children:e.name},e.id)),l.length>2&&(0,t.jsxs)(i.Text,{className:"text-xs text-gray-500",children:["+",l.length-2]})]})]})}},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let l=Object.entries(e.original.capabilities||{}).filter(([e,t])=>!0===t).map(([e])=>e);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(i.Text,{className:"text-gray-500 text-xs",children:"-"}):l.map(e=>(0,t.jsx)(s.Badge,{color:"green",size:"xs",children:e},e))})}},{header:"I/O Modes",accessorKey:"defaultInputModes",enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.defaultInputModes||[],a=l.defaultOutputModes||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(i.Text,{className:"text-xs",children:[(0,t.jsx)("span",{className:"font-medium",children:"In:"})," ",s.join(", ")||"-"]}),(0,t.jsxs)(i.Text,{className:"text-xs",children:[(0,t.jsx)("span",{className:"font-medium",children:"Out:"})," ",a.join(", ")||"-"]})]})},meta:{className:"hidden xl:table-cell"}},{header:"Public",accessorKey:"is_public",enableSorting:!0,sortingFn:(e,t)=>(!0===e.original.is_public)-(!0===t.original.is_public),cell:({row:e})=>!0===e.original.is_public?(0,t.jsx)(s.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(s.Badge,{color:"gray",size:"xs",children:"No"}),meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:s})=>{let i=s.original;return(0,t.jsxs)(l.Button,{size:"xs",variant:"secondary",onClick:()=>e(i),icon:c.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}]])},934879,e=>{"use strict";var t=e.i(843476),l=e.i(745434),s=e.i(271645),i=e.i(212931),a=e.i(808613),n=e.i(280898),r=e.i(464571),c=e.i(536916),o=e.i(599724),d=e.i(629569),m=e.i(389083),x=e.i(764205),u=e.i(727749);let{Step:h}=n.Steps,p=({visible:e,onClose:l,accessToken:p,agentHubData:g,onSuccess:b})=>{let[j,f]=(0,s.useState)(0),[v,y]=(0,s.useState)(new Set),[N,S]=(0,s.useState)(!1),[k]=a.Form.useForm(),$=()=>{f(0),y(new Set),k.resetFields(),l()};(0,s.useEffect)(()=>{e&&g.length>0&&y(new Set(g.filter(e=>!0===e.is_public).map(e=>e.agent_id||e.name)))},[e,g]);let T=async()=>{if(0===v.size)return void u.default.fromBackend("Please select at least one agent to make public");S(!0);try{let e=Array.from(v);await (0,x.makeAgentsPublicCall)(p,e),u.default.success(`Successfully made ${e.length} agent(s) public!`),$(),b()}catch(e){console.error("Error making agents public:",e),u.default.fromBackend("Failed to make agents public. Please try again.")}finally{S(!1)}};return(0,t.jsx)(i.Modal,{title:"Make Agents Public",open:e,onCancel:$,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:k,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:j,className:"mb-6",children:[(0,t.jsx)(h,{title:"Select Agents"}),(0,t.jsx)(h,{title:"Confirm"})]}),(()=>{switch(j){case 0:let e,l;return e=g.length>0&&g.every(e=>v.has(e.agent_id||e.name)),l=v.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Agents to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?y(new Set(g.map(e=>e.agent_id||e.name))):y(new Set)},disabled:0===g.length,children:["Select All ",g.length>0&&`(${g.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the agents you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these agents."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===g.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No agents available."})}):g.map(e=>{let l=e.agent_id||e.name;return(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:v.has(l),onChange:e=>{var t;let s;return t=e.target.checked,s=new Set(v),void(t?s.add(l):s.delete(l),y(s))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.name}),(0,t.jsxs)(m.Badge,{color:"blue",size:"sm",children:["v",e.version]})]}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:e.description}),e.skills&&e.skills.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[e.skills.slice(0,3).map(e=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e.name},e.id)),e.skills.length>3&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",e.skills.length-3," more"]})]})]})]},l)})})}),v.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:v.size})," agent",1!==v.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making Agents Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these agents public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Agents to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(v).map(e=>{let l=g.find(t=>(t.agent_id||t.name)===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:l?.name||e}),l&&(0,t.jsxs)(m.Badge,{color:"blue",size:"xs",children:["v",l.version]})]}),l?.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:l.description})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:v.size})," agent",1!==v.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===j?$:()=>{1===j&&f(0)},children:0===j?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===j&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===j){if(0===v.size)return void u.default.fromBackend("Please select at least one agent to make public");f(1)}},disabled:0===v.size,children:"Next"}),1===j&&(0,t.jsx)(r.Button,{onClick:T,loading:N,children:"Make Public"})]})]})]})})},{Step:g}=n.Steps,b=({visible:e,onClose:l,accessToken:h,mcpHubData:p,onSuccess:b})=>{let[j,f]=(0,s.useState)(0),[v,y]=(0,s.useState)(new Set),[N,S]=(0,s.useState)(!1),[k]=a.Form.useForm(),$=()=>{f(0),y(new Set),k.resetFields(),l()};(0,s.useEffect)(()=>{e&&p.length>0&&y(new Set(p.filter(e=>e.mcp_info?.is_public===!0).map(e=>e.server_id)))},[e]);let T=async()=>{if(0===v.size)return void u.default.fromBackend("Please select at least one MCP server to make public");S(!0);try{let e=Array.from(v);await (0,x.makeMCPPublicCall)(h,e),u.default.success(`Successfully made ${e.length} MCP server(s) public!`),$(),b()}catch(e){console.error("Error making MCP servers public:",e),u.default.fromBackend("Failed to make MCP servers public. Please try again.")}finally{S(!1)}};return(0,t.jsx)(i.Modal,{title:"Make MCP Servers Public",open:e,onCancel:$,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:k,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:j,className:"mb-6",children:[(0,t.jsx)(g,{title:"Select Servers"}),(0,t.jsx)(g,{title:"Confirm"})]}),(()=>{switch(j){case 0:let e,l;return e=p.length>0&&p.every(e=>v.has(e.server_id)),l=v.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select MCP Servers to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?y(new Set(p.map(e=>e.server_id))):y(new Set)},disabled:0===p.length,children:["Select All ",p.length>0&&`(${p.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the MCP servers you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these servers."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===p.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No MCP servers available."})}):p.map(e=>{let l=e.mcp_info?.is_public===!0;return(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:v.has(e.server_id),onChange:t=>{var l,s;let i;return l=e.server_id,s=t.target.checked,i=new Set(v),void(s?i.add(l):i.delete(l),y(i))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.server_name}),l&&(0,t.jsx)(m.Badge,{color:"emerald",size:"sm",children:"Public"}),(0,t.jsx)(m.Badge,{color:"blue",size:"sm",children:e.transport}),(0,t.jsx)(m.Badge,{color:"active"===e.status||"healthy"===e.status?"green":"inactive"===e.status||"unhealthy"===e.status?"red":"gray",size:"sm",children:e.status||"unknown"})]}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:e.description||e.url}),e.allowed_tools&&e.allowed_tools.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[e.allowed_tools.slice(0,3).map((e,l)=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e},l)),e.allowed_tools.length>3&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",e.allowed_tools.length-3," more"]})]})]})]},e.server_id)})})}),v.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:v.size})," MCP server",1!==v.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making MCP Servers Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these MCP servers public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"MCP Servers to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(v).map(e=>{let l=p.find(t=>t.server_id===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:l?.server_name||e}),l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:l.transport}),(0,t.jsx)(m.Badge,{color:"active"===l.status||"healthy"===l.status?"green":"inactive"===l.status||"unhealthy"===l.status?"red":"gray",size:"xs",children:l.status||"unknown"})]})]}),l?.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-600 mt-1",children:l.description}),l?.url&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-500 mt-1",children:l.url})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:v.size})," MCP server",1!==v.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===j?$:()=>{1===j&&f(0)},children:0===j?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===j&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===j){if(0===v.size)return void u.default.fromBackend("Please select at least one MCP server to make public");f(1)}},disabled:0===v.size,children:"Next"}),1===j&&(0,t.jsx)(r.Button,{onClick:T,loading:N,children:"Make Public"})]})]})]})})};var j=e.i(304967);let f=({modelHubData:e,onFilteredDataChange:l,showFiltersCard:i=!0,className:a=""})=>{let n,r,c,[d,m]=(0,s.useState)(""),[x,u]=(0,s.useState)(""),[h,p]=(0,s.useState)(""),[g,b]=(0,s.useState)(""),f=(0,s.useRef)([]),v=(0,s.useMemo)(()=>e?.filter(e=>{let t=e.model_group.toLowerCase().includes(d.toLowerCase()),l=""===x||e.providers.includes(x),s=""===h||e.mode===h,i=""===g||Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).some(([e])=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")===g);return t&&l&&s&&i})||[],[e,d,x,h,g]);(0,s.useEffect)(()=>{(v.length!==f.current.length||v.some((e,t)=>e.model_group!==f.current[t]?.model_group))&&(f.current=v,l(v))},[v,l]);let y=(0,t.jsxs)("div",{className:"flex flex-wrap gap-4 items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Search Models:"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names...",value:d,onChange:e=>m(e.target.value),className:"border rounded px-3 py-2 w-64 h-10 text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Provider:"}),(0,t.jsxs)("select",{value:x,onChange:e=>u(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-40 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Providers"}),e&&(n=new Set,e.forEach(e=>{e.providers.forEach(e=>n.add(e))}),Array.from(n)).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Mode:"}),(0,t.jsxs)("select",{value:h,onChange:e=>p(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-32 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Modes"}),e&&(r=new Set,e.forEach(e=>{e.mode&&r.add(e.mode)}),Array.from(r)).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2",children:"Features:"}),(0,t.jsxs)("select",{value:g,onChange:e=>b(e.target.value),className:"border rounded px-3 py-2 text-sm text-gray-600 w-48 h-10",children:[(0,t.jsx)("option",{value:"",className:"text-sm text-gray-600",children:"All Features"}),e&&(c=new Set,e.forEach(e=>{Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).forEach(([e])=>{let t=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");c.add(t)})}),Array.from(c).sort()).map(e=>(0,t.jsx)("option",{value:e,className:"text-sm text-gray-800",children:e},e))]})]}),(d||x||h||g)&&(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsx)("button",{onClick:()=>{m(""),u(""),p(""),b("")},className:"text-blue-600 hover:text-blue-800 text-sm underline h-10 flex items-center",children:"Clear Filters"})})]});return i?(0,t.jsx)(j.Card,{className:`mb-6 ${a}`,children:y}):(0,t.jsx)("div",{className:a,children:y})},{Step:v}=n.Steps,y=({visible:e,onClose:l,accessToken:h,modelHubData:p,onSuccess:g})=>{let[b,j]=(0,s.useState)(0),[y,N]=(0,s.useState)(new Set),[S,k]=(0,s.useState)([]),[$,T]=(0,s.useState)(!1),[w]=a.Form.useForm(),C=()=>{j(0),N(new Set),k([]),w.resetFields(),l()},_=(0,s.useCallback)(e=>{k(e)},[]);(0,s.useEffect)(()=>{e&&p.length>0&&(k(p),N(new Set(p.filter(e=>!0===e.is_public_model_group).map(e=>e.model_group))))},[e,p]);let P=async()=>{if(0===y.size)return void u.default.fromBackend("Please select at least one model to make public");T(!0);try{let e=Array.from(y);await (0,x.makeModelGroupPublic)(h,e),u.default.success(`Successfully made ${e.length} model group(s) public!`),C(),g()}catch(e){console.error("Error making model groups public:",e),u.default.fromBackend("Failed to make model groups public. Please try again.")}finally{T(!1)}};return(0,t.jsx)(i.Modal,{title:"Make Models Public",open:e,onCancel:C,footer:null,width:1200,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:w,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:b,className:"mb-6",children:[(0,t.jsx)(v,{title:"Select Models"}),(0,t.jsx)(v,{title:"Confirm"})]}),(()=>{switch(b){case 0:let e,l;return e=S.length>0&&S.every(e=>y.has(e.model_group)),l=y.size>0&&!e,(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Models to Make Public"}),(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsxs)(c.Checkbox,{checked:e,indeterminate:l,onChange:e=>{e.target.checked?N(new Set(S.map(e=>e.model_group))):N(new Set)},disabled:0===S.length,children:["Select All ",S.length>0&&`(${S.length})`]})})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Select the models you want to be visible on the public model hub. Users will still require a valid Virtual Key to use these models."}),(0,t.jsx)(f,{modelHubData:p,onFilteredDataChange:_,showFiltersCard:!1,className:"border rounded-lg p-4 bg-gray-50"}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===S.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No models match the current filters."})}):S.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:y.has(e.model_group),onChange:t=>{var l,s;let i;return l=e.model_group,s=t.target.checked,i=new Set(y),void(s?i.add(l):i.delete(l),N(i))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e.model_group}),e.mode&&(0,t.jsx)(m.Badge,{color:"green",size:"sm",children:e.mode})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e},e))})]})]},e.model_group))})}),y.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:y.size})," model",1!==y.size?"s":""," selected"]})})]});case 1:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Making Models Public"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Warning:"})," Once you make these models public, anyone who can go to the"," ",(0,t.jsx)("code",{children:"/ui/model_hub_table"})," will be able to know they exist on the proxy."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Models to be made public:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(y).map(e=>{let l=p.find(t=>t.model_group===e);return(0,t.jsx)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:e}),l&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:l.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e},e))})]})},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:y.size})," model",1!==y.size?"s":""," will be made public"]})})]});default:return null}})(),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===b?C:()=>{1===b&&j(0)},children:0===b?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===b&&(0,t.jsx)(r.Button,{onClick:()=>{if(0===b){if(0===y.size)return void u.default.fromBackend("Please select at least one model to make public");j(1)}},disabled:0===y.size,children:"Next"}),1===b&&(0,t.jsx)(r.Button,{onClick:P,loading:$,children:"Make Public"})]})]})]})})};var N=e.i(994388),S=e.i(592968),k=e.i(262218),$=e.i(166406),T=e.i(827252);let w=e=>`$${(1e6*e).toFixed(2)}`,C=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString();var _=e.i(902555),P=e.i(708347),M=e.i(871943),I=e.i(502547),B=e.i(434626),z=e.i(250980),O=e.i(269200),A=e.i(942232),H=e.i(977572),E=e.i(427612),F=e.i(64848),L=e.i(496020),D=e.i(522016);let q=({accessToken:e,userRole:l})=>{let[i,a]=(0,s.useState)([]),[n,r]=(0,s.useState)({url:"",displayName:""}),[c,m]=(0,s.useState)(null),[h,p]=(0,s.useState)(!1),[g,b]=(0,s.useState)(!0),[f,v]=(0,s.useState)(!1),[y,N]=(0,s.useState)([]),S=async()=>{if(e)try{p(!0);let e=await (0,x.getPublicModelHubInfo)();if(e&&e.useful_links){let t=e.useful_links||{},l=Object.entries(t).map(([e,t])=>"object"==typeof t&&null!==t&&"url"in t?{id:`${t.index??0}-${e}`,displayName:e,url:t.url,index:t.index??0}:{id:`0-${e}`,displayName:e,url:t,index:0}).sort((e,t)=>(e.index??0)-(t.index??0)).map((e,t)=>({...e,id:`${t}-${e.displayName}`}));a(l)}else a([])}catch(e){console.error("Error fetching useful links:",e),a([])}finally{p(!1)}};if((0,s.useEffect)(()=>{S()},[e]),!(0,P.isAdminRole)(l||""))return null;let k=async t=>{if(!e)return!1;try{let l={};return t.forEach((e,t)=>{l[e.displayName]={url:e.url,index:t}}),await (0,x.updateUsefulLinksCall)(e,l),!0}catch(e){return console.error("Error saving links:",e),u.default.fromBackend(`Failed to save links - ${e}`),!1}},$=async()=>{if(!n.url||!n.displayName)return;try{new URL(n.url)}catch{u.default.fromBackend("Please enter a valid URL");return}if(i.some(e=>e.displayName===n.displayName))return void u.default.fromBackend("A link with this display name already exists");let e=[...i,{id:`${Date.now()}-${n.displayName}`,displayName:n.displayName,url:n.url}];await k(e)&&(a(e),r({url:"",displayName:""}),u.default.success("Link added successfully"))},T=async()=>{if(!c)return;try{new URL(c.url)}catch{u.default.fromBackend("Please enter a valid URL");return}if(i.some(e=>e.id!==c.id&&e.displayName===c.displayName))return void u.default.fromBackend("A link with this display name already exists");let e=i.map(e=>e.id===c.id?c:e);await k(e)&&(a(e),m(null),u.default.success("Link updated successfully"))},w=()=>{m(null)},C=async e=>{let t=i.filter(t=>t.id!==e);await k(t)&&(a(t),u.default.success("Link deleted successfully"))},q=async()=>{await k(i)&&(v(!1),N([]),u.default.success("Link order saved successfully"))};return(0,t.jsxs)(j.Card,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>b(!g),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(d.Title,{className:"mb-0",children:"Link Management"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Manage the links that are displayed under 'Useful Links' on the public model hub."})]}),(0,t.jsx)("div",{className:"flex items-center",children:g?(0,t.jsx)(M.ChevronDownIcon,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(I.ChevronRightIcon,{className:"w-5 h-5 text-gray-500"})})]}),g&&(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 Link"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Display Name"}),(0,t.jsx)("input",{type:"text",value:n.displayName,onChange:e=>r({...n,displayName:e.target.value}),placeholder:"Friendly name",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:"URL"}),(0,t.jsx)("input",{type:"text",value:n.url,onChange:e=>r({...n,url:e.target.value}),placeholder:"https://example.com",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:$,disabled:!n.url||!n.displayName,className:`flex items-center px-4 py-2 rounded-md text-sm ${!n.url||!n.displayName?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(z.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Link"]})})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700",children:"Manage Existing Links"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)(D.default,{href:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`,target:"_blank",rel:"noopener noreferrer",className:"text-xs bg-blue-50 text-blue-600 px-3 py-1.5 rounded hover:bg-blue-100 flex items-center",title:"Open Public Model Hub",children:["Public Model Hub",(0,t.jsx)(B.ExternalLinkIcon,{className:"w-4 h-4 ml-1"})]}),f?(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:q,className:"text-xs bg-green-600 text-white px-3 py-1.5 rounded hover:bg-green-700",children:"Save Order"}),(0,t.jsx)("button",{onClick:()=>{a([...y]),v(!1),N([])},className:"text-xs bg-gray-50 text-gray-600 px-3 py-1.5 rounded hover:bg-gray-100",children:"Cancel"})]}):(0,t.jsx)("button",{onClick:()=>{c&&m(null),N([...i]),v(!0)},className:"text-xs bg-purple-50 text-purple-600 px-3 py-1.5 rounded hover:bg-purple-100 flex items-center",children:"Rearrange Order"})]})]}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(O.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(E.TableHead,{children:(0,t.jsxs)(L.TableRow,{children:[(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"Display Name"}),(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"URL"}),(0,t.jsx)(F.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(A.TableBody,{children:[i.map((e,l)=>(0,t.jsx)(L.TableRow,{className:"h-8",children:c&&c.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:c.displayName,onChange:e=>m({...c,displayName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(H.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:c.url,onChange:e=>m({...c,url:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(H.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:T,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:w,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H.TableCell,{className:"py-0.5 text-sm text-gray-900",children:e.displayName}),(0,t.jsx)(H.TableCell,{className:"py-0.5 text-sm text-gray-500",children:e.url}),(0,t.jsx)(H.TableCell,{className:"py-0.5 whitespace-nowrap",children:f?(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)(_.default,{variant:"Up",onClick:()=>(e=>{if(0===e)return;let t=[...i];[t[e-1],t[e]]=[t[e],t[e-1]],a(t)})(l),tooltipText:"Move up",disabled:0===l,disabledTooltipText:"Already at the top",dataTestId:`move-up-${e.id}`}),(0,t.jsx)(_.default,{variant:"Down",onClick:()=>(e=>{if(e===i.length-1)return;let t=[...i];[t[e],t[e+1]]=[t[e+1],t[e]],a(t)})(l),tooltipText:"Move down",disabled:l===i.length-1,disabledTooltipText:"Already at the bottom",dataTestId:`move-down-${e.id}`})]}):(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)(_.default,{variant:"Open",onClick:()=>{var t;return t=e.url,void window.open(t,"_blank")},tooltipText:"Open link",dataTestId:`open-link-${e.id}`}),(0,t.jsx)(_.default,{variant:"Edit",onClick:()=>{m({...e})},tooltipText:"Edit link",dataTestId:`edit-link-${e.id}`}),(0,t.jsx)(_.default,{variant:"Delete",onClick:()=>C(e.id),tooltipText:"Delete link",dataTestId:`delete-link-${e.id}`})]})})]})},e.id)),0===i.length&&(0,t.jsx)(L.TableRow,{children:(0,t.jsx)(H.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No links added yet. Add a new link above."})})]})]})})})]})]})};var R=e.i(737033);let{Step:W}=n.Steps,U=({visible:e,onClose:l,accessToken:h,skillsList:p,onSuccess:g})=>{let[b,j]=(0,s.useState)(0),[f,v]=(0,s.useState)(new Set),[y,N]=(0,s.useState)(!1),[S]=a.Form.useForm(),k=()=>{j(0),v(new Set),S.resetFields(),l()};(0,s.useEffect)(()=>{e&&p.length>0&&v(new Set(p.filter(e=>e.enabled).map(e=>e.name)))},[e,p]);let $=async()=>{if(0===f.size)return void u.default.fromBackend("Please select at least one skill");N(!0);try{await Promise.all(p.map(e=>{let t=f.has(e.name);return t&&!e.enabled?(0,x.enableClaudeCodePlugin)(h,e.name):!t&&e.enabled?(0,x.disableClaudeCodePlugin)(h,e.name):Promise.resolve()})),u.default.success(`Skill Hub updated — ${f.size} skill(s) published`),k(),g()}catch(e){console.error("Error publishing skills:",e),u.default.fromBackend("Failed to update skills. Please try again.")}finally{N(!1)}},T=p.length>0&&p.every(e=>f.has(e.name)),w=f.size>0&&!T;return(0,t.jsx)(i.Modal,{title:"Publish to Skill Hub",open:e,onCancel:k,footer:null,width:700,maskClosable:!1,children:(0,t.jsxs)(a.Form,{form:S,layout:"vertical",children:[(0,t.jsxs)(n.Steps,{current:b,className:"mb-6",children:[(0,t.jsx)(W,{title:"Select Skills"}),(0,t.jsx)(W,{title:"Confirm"})]}),0===b?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(d.Title,{children:"Select Skills to Publish"}),(0,t.jsxs)(c.Checkbox,{checked:T,indeterminate:w,onChange:e=>{e.target.checked?v(new Set(p.map(e=>e.name))):v(new Set)},disabled:0===p.length,children:["Select All (",p.length,")"]})]}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:"Selected skills will be visible to all users in the Skill Hub. Deselected skills will be unpublished."}),(0,t.jsx)("div",{className:"max-h-96 overflow-y-auto border rounded-lg p-4",children:(0,t.jsx)("div",{className:"space-y-3",children:0===p.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:(0,t.jsx)(o.Text,{children:"No skills registered yet."})}):p.map(e=>(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(c.Checkbox,{checked:f.has(e.name),onChange:t=>{var l,s;let i;return l=e.name,s=t.target.checked,i=new Set(f),void(s?i.add(l):i.delete(l),v(i))}}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Text,{className:"font-medium font-mono text-sm",children:e.name}),e.enabled&&(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Public"})]}),e.description&&(0,t.jsx)(o.Text,{className:"text-xs text-gray-500 truncate max-w-sm",children:e.description})]}),e.domain&&(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:e.domain})]},e.name))})}),f.size>0&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:[(0,t.jsx)("strong",{children:f.size})," skill",1!==f.size?"s":""," will be published"]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(d.Title,{children:"Confirm Publish to Skill Hub"}),(0,t.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:(0,t.jsxs)(o.Text,{className:"text-sm text-yellow-800",children:[(0,t.jsx)("strong",{children:"Note:"})," Published skills will be visible to all users in the Skill Hub tab. Skills not in the list below will be unpublished."]})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Skills to be published:"}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto border rounded-lg p-3",children:(0,t.jsx)("div",{className:"space-y-2",children:Array.from(f).map(e=>{let l=p.find(t=>t.name===e);return(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:[(0,t.jsx)(o.Text,{className:"font-mono text-sm",children:e}),l?.domain&&(0,t.jsx)(m.Badge,{color:"blue",size:"xs",children:l.domain})]},e)})})})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["Total: ",(0,t.jsx)("strong",{children:f.size})," skill",1!==f.size?"s":""," will be published"]})})]}),(0,t.jsxs)("div",{className:"flex justify-between mt-6",children:[(0,t.jsx)(r.Button,{onClick:0===b?k:()=>j(0),children:0===b?"Cancel":"Previous"}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[0===b&&(0,t.jsx)(r.Button,{onClick:()=>{0===f.size?u.default.fromBackend("Please select at least one skill"):j(1)},disabled:0===f.size,children:"Next"}),1===b&&(0,t.jsx)(r.Button,{onClick:$,loading:y,children:"Publish to Hub"})]})]})]})})};var K=e.i(798496),X=e.i(976883),G=e.i(197647),V=e.i(653824),Y=e.i(881073),J=e.i(404206),Q=e.i(723731),Z=e.i(174886),ee=e.i(618566),et=e.i(650056),el=e.i(292639),es=e.i(161281),ei=e.i(268004);e.s(["default",0,({accessToken:e,publicPage:a,premiumUser:n,userRole:r})=>{let c,h,g=(0,P.isProxyAdminRole)(r||""),[v,_]=(0,s.useState)(!1),[M,I]=(0,s.useState)(null),[B,z]=(0,s.useState)(!0),[O,A]=(0,s.useState)(!1),[H,E]=(0,s.useState)(!1),[F,L]=(0,s.useState)(null),[D,W]=(0,s.useState)([]),[ea,en]=(0,s.useState)(!1),[er,ec]=(0,s.useState)(null),[eo,ed]=(0,s.useState)(!1),[em,ex]=(0,s.useState)(!0),[eu,eh]=(0,s.useState)(null),[ep,eg]=(0,s.useState)(!1),[eb,ej]=(0,s.useState)(null),[ef,ev]=(0,s.useState)(!0),[ey,eN]=(0,s.useState)(null),[eS,ek]=(0,s.useState)(!1),[e$,eT]=(0,s.useState)(!1),[ew,eC]=(0,s.useState)([]),[e_,eP]=(0,s.useState)(!1),[eM,eI]=(0,s.useState)(!1),eB=(0,ee.useRouter)(),{data:ez,isLoading:eO}=(0,el.useUISettings)();(0,s.useEffect)(()=>{if(!eO&&a&&!0===ez?.values?.require_auth_for_public_ai_hub){let e=(0,ei.getCookie)("token");if(!(0,es.checkTokenValidity)(e))return void eB.replace(`${(0,x.getProxyBaseUrl)()}/ui/login`)}},[eO,a,ez,eB]),(0,s.useEffect)(()=>{let t=async e=>{try{z(!0);let t=await (0,x.modelHubCall)(e);console.log("ModelHubData:",t),I(t.data),(0,x.getConfigFieldSetting)(e,"enable_public_model_hub").then(e=>{console.log(`data: ${JSON.stringify(e)}`),!0==e.field_value&&_(!0)}).catch(e=>{})}catch(e){console.error("There was an error fetching the model data",e)}finally{z(!1)}},l=async()=>{try{z(!0),await (0,x.getUiConfig)();let e=await (0,x.modelHubPublicModelsCall)();console.log("ModelHubData:",e),console.log("First model structure:",e[0]),console.log("Model has model_group?",e[0]?.model_group),console.log("Model has providers?",e[0]?.providers),I(e),_(!0)}catch(e){console.error("There was an error fetching the public model data",e)}finally{z(!1)}};e?t(e):a&&l()},[e,a]),(0,s.useEffect)(()=>{let t=async()=>{if(e)try{ex(!0);let t=await (0,x.getAgentsList)(e);console.log("AgentHubData:",t);let l=t.agents.map(e=>({agent_id:e.agent_id,...e.agent_card_params,is_public:e.litellm_params.is_public}));ec(l)}catch(e){console.error("There was an error fetching the agent data",e)}finally{ex(!1)}};a||t()},[a,e]),(0,s.useEffect)(()=>{let t=async()=>{if(e)try{ev(!0);let t=await (0,x.fetchMCPServers)(e);console.log("MCPHubData:",t),ej(t)}catch(e){console.error("There was an error fetching the MCP server data",e)}finally{ev(!1)}};a||t()},[a,e]),(0,s.useEffect)(()=>{(async()=>{if(e)try{eP(!0);let t=!0===a,l=await (0,x.getClaudeCodePluginsList)(e,t);eC(l.plugins)}catch(e){console.error("Error fetching skill hub data",e)}finally{eP(!1)}})()},[e,a]);let eA=()=>{A(!1),E(!1),L(null),eg(!1),eh(null),ek(!1),eN(null)},eH=()=>{A(!1),E(!1),L(null),eg(!1),eh(null),ek(!1),eN(null)},eE=e=>{navigator.clipboard.writeText(e),u.default.success("Copied to clipboard!")},eF=e=>`$${(1e6*e).toFixed(2)}`,eL=(0,s.useCallback)(e=>{W(e)},[]);return(console.log("publicPage: ",a),console.log("publicPageAllowed: ",v),a&&v)?(0,t.jsx)(X.default,{accessToken:e}):(0,t.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[!1==a?(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start",children:[(0,t.jsx)(d.Title,{className:"text-center",children:"AI Hub"}),(0,P.isAdminRole)(r||"")?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Make models, agents, and MCP servers public for developers to know what's available."}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"A list of all public model names personally available to you."})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)(o.Text,{children:"Model Hub URL:"}),(0,t.jsxs)("div",{className:"flex items-center bg-gray-200 px-2 py-1 rounded",children:[(0,t.jsx)(o.Text,{className:"mr-2",children:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`}),(0,t.jsx)("button",{onClick:()=>eE(`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`),className:"p-1 hover:bg-gray-300 rounded transition-colors",title:"Copy URL",children:(0,t.jsx)(Z.Copy,{size:16,className:"text-gray-600"})})]})]})]}),g&&(0,t.jsx)("div",{className:"mt-8 mb-2",children:(0,t.jsx)(q,{accessToken:e,userRole:r})}),(0,t.jsxs)(V.TabGroup,{children:[(0,t.jsxs)(Y.TabList,{className:"mb-4",children:[(0,t.jsx)(G.Tab,{children:"Model Hub"}),(0,t.jsx)(G.Tab,{children:"Agent Hub"}),(0,t.jsx)(G.Tab,{children:"MCP Hub"}),(0,t.jsx)(G.Tab,{children:"Skill Hub"})]}),(0,t.jsxs)(Q.TabPanels,{children:[(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&g&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&en(!0)),children:"Select Models to Make Public"})}),(0,t.jsx)(f,{modelHubData:M||[],onFilteredDataChange:eL}),(0,t.jsx)(K.ModelDataTable,{columns:((e,l,s=!1)=>{let i=[{header:"Public Model Name",accessorKey:"model_group",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let s=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium text-sm",children:s.model_group}),(0,t.jsx)(S.Tooltip,{title:"Copy model name",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(s.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(o.Text,{className:"text-xs text-gray-600",children:s.providers.join(", ")})})]})}},{header:"Provider",accessorKey:"providers",enableSorting:!0,sortingFn:(e,t)=>{let l=e.original.providers.join(", "),s=t.original.providers.join(", ");return l.localeCompare(s)},cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.providers.slice(0,2).map(e=>(0,t.jsx)(k.Tag,{color:"blue",className:"text-xs",children:e},e)),l.providers.length>2&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",l.providers.length-2]})]})},meta:{className:"hidden md:table-cell"}},{header:"Mode",accessorKey:"mode",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return l.mode?(0,t.jsx)(m.Badge,{color:"green",size:"sm",children:l.mode}):(0,t.jsx)(o.Text,{className:"text-gray-500",children:"-"})},meta:{className:"hidden lg:table-cell"}},{header:"Tokens",accessorKey:"max_input_tokens",enableSorting:!0,sortingFn:(e,t)=>(e.original.max_input_tokens||0)+(e.original.max_output_tokens||0)-((t.original.max_input_tokens||0)+(t.original.max_output_tokens||0)),cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsxs)(o.Text,{className:"text-xs",children:[l.max_input_tokens?C(l.max_input_tokens):"-"," /"," ",l.max_output_tokens?C(l.max_output_tokens):"-"]})})},meta:{className:"hidden lg:table-cell"}},{header:"Cost/1M",accessorKey:"input_cost_per_token",enableSorting:!0,sortingFn:(e,t)=>(e.original.input_cost_per_token||0)+(e.original.output_cost_per_token||0)-((t.original.input_cost_per_token||0)+(t.original.output_cost_per_token||0)),cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(o.Text,{className:"text-xs",children:l.input_cost_per_token?w(l.input_cost_per_token):"-"}),(0,t.jsx)(o.Text,{className:"text-xs text-gray-500",children:l.output_cost_per_token?w(l.output_cost_per_token):"-"})]})}},{header:"Features",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let l=Object.entries(e.original).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),s=["green","blue","purple","orange","red","yellow"];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:0===l.length?(0,t.jsx)(o.Text,{className:"text-gray-500 text-xs",children:"-"}):l.map((e,l)=>(0,t.jsx)(m.Badge,{color:s[l%s.length],size:"xs",children:e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},e))})}},{header:"Public",accessorKey:"is_public_model_group",enableSorting:!0,sortingFn:(e,t)=>(!0===e.original.is_public_model_group)-(!0===t.original.is_public_model_group),cell:({row:e})=>!0===e.original.is_public_model_group?(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:"No"}),meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:l})=>{let s=l.original;return(0,t.jsxs)(N.Button,{size:"xs",variant:"secondary",onClick:()=>e(s),icon:T.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}];return s?i.filter(e=>!("accessorKey"in e)||"is_public_model_group"!==e.accessorKey):i})(e=>{L(e),A(!0)},eE,a),data:D,isLoading:B,defaultSorting:[{id:"model_group",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",D.length," of ",M?.length||0," models"]})})]}),(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&g&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&ed(!0)),children:"Select Agents to Make Public"})}),(0,t.jsx)(K.ModelDataTable,{columns:(0,l.getAgentHubTableColumns)(e=>{eh(e),eg(!0)},eE,a),data:er||[],isLoading:em,defaultSorting:[{id:"name",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",er?.length||0," agent",er?.length!==1?"s":""]})})]}),(0,t.jsxs)(J.TabPanel,{children:[(0,t.jsxs)(j.Card,{children:[!1==a&&g&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>void(e&&eT(!0)),children:"Select MCP Servers to Make Public"})}),(0,t.jsx)(K.ModelDataTable,{columns:((e,l,s=!1)=>[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let s=e.original;return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"font-medium text-sm",children:s.server_name}),(0,t.jsx)(S.Tooltip,{title:"Copy server name",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(s.server_name),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)(o.Text,{className:"text-xs text-gray-600",children:s.description||"-"})})]})}},{header:"Description",accessorKey:"description",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(o.Text,{className:"text-xs line-clamp-2",children:l.description||"-"})},meta:{className:"hidden md:table-cell"}},{header:"URL",accessorKey:"url",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let s=e.original;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"text-xs truncate max-w-xs",children:s.url}),(0,t.jsx)(S.Tooltip,{title:"Copy URL",children:(0,t.jsx)($.CopyOutlined,{onClick:()=>l(s.url),className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs flex-shrink-0"})})]})},meta:{className:"hidden lg:table-cell"}},{header:"Transport",accessorKey:"transport",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(m.Badge,{color:"blue",size:"sm",children:l.transport})},meta:{className:"hidden md:table-cell"}},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s="none"===l.auth_type?"gray":"green";return(0,t.jsx)(m.Badge,{color:s,size:"sm",children:l.auth_type})},meta:{className:"hidden md:table-cell"}},{header:"Status",accessorKey:"status",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s={active:"green",inactive:"red",unknown:"gray",healthy:"green",unhealthy:"red"}[l.status]||"gray";return(0,t.jsx)(m.Badge,{color:s,size:"sm",children:l.status||"unknown"})}},{header:"Tools",accessorKey:"allowed_tools",enableSorting:!1,cell:({row:e})=>{let l=e.original.allowed_tools||[];return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(o.Text,{className:"text-xs font-medium",children:l.length>0?`${l.length} tool${1!==l.length?"s":""}`:"All tools"}),l.length>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,2).map((e,l)=>(0,t.jsx)(k.Tag,{color:"purple",className:"text-xs",children:e},l)),l.length>2&&(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["+",l.length-2]})]})]})},meta:{className:"hidden lg:table-cell"}},{header:"Created By",accessorKey:"created_by",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(o.Text,{className:"text-xs",children:l.created_by||"-"})},meta:{className:"hidden xl:table-cell"}},{header:"Public",accessorKey:"mcp_info.is_public",enableSorting:!0,sortingFn:(e,t)=>(e.original.mcp_info?.is_public===!0)-(t.original.mcp_info?.is_public===!0),cell:({row:e})=>{let l=e.original;return l.mcp_info?.is_public===!0?(0,t.jsx)(m.Badge,{color:"green",size:"xs",children:"Yes"}):(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:"No"})},meta:{className:"hidden md:table-cell"}},{header:"Details",id:"details",enableSorting:!1,cell:({row:l})=>{let s=l.original;return(0,t.jsxs)(N.Button,{size:"xs",variant:"secondary",onClick:()=>e(s),icon:T.InfoCircleOutlined,children:[(0,t.jsx)("span",{className:"hidden lg:inline",children:"Details"}),(0,t.jsx)("span",{className:"lg:hidden",children:"Info"})]})}}])(e=>{eN(e),ek(!0)},eE,a),data:eb||[],isLoading:ef,defaultSorting:[{id:"server_name",desc:!1}]})]}),(0,t.jsx)("div",{className:"mt-4 text-center space-y-2",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",eb?.length||0," MCP server",eb?.length!==1?"s":""]})})]}),(0,t.jsxs)(J.TabPanel,{children:[!1==a&&g&&(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(N.Button,{onClick:()=>eI(!0),children:"Select Skills to Make Public"})}),(0,t.jsx)(R.default,{skills:ew,isLoading:e_,isAdmin:g,accessToken:e,publicPage:a,onPublishSuccess:async()=>{eC((await (0,x.getClaudeCodePluginsList)(e||"",a)).plugins)}})]})]})]})]}):(0,t.jsxs)(j.Card,{className:"mx-auto max-w-xl mt-10",children:[(0,t.jsx)(o.Text,{className:"text-xl text-center mb-2 text-black",children:"Public Model Hub not enabled."}),(0,t.jsx)("p",{className:"text-base text-center text-slate-800",children:"Ask your proxy admin to enable this on their Admin UI."})]}),(0,t.jsx)(i.Modal,{title:"Public Model Hub",width:600,open:H,footer:null,onOk:eA,onCancel:eH,children:(0,t.jsxs)("div",{className:"pt-5 pb-5",children:[(0,t.jsxs)("div",{className:"flex justify-between mb-4",children:[(0,t.jsx)(o.Text,{className:"text-base mr-2",children:"Shareable Link:"}),(0,t.jsx)(o.Text,{className:"max-w-sm ml-2 bg-gray-200 pr-2 pl-2 pt-1 pb-1 text-center rounded",children:`${(0,x.getProxyBaseUrl)()}/ui/model_hub_table`})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(N.Button,{onClick:()=>{eB.replace(`/model_hub_table?key=${e}`)},children:"See Page"})})]})}),(0,t.jsx)(i.Modal,{title:F?.model_group||"Model Details",width:1e3,open:O,footer:null,onOk:eA,onCancel:eH,children:F&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Model Group:"}),(0,t.jsx)(o.Text,{children:F.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(o.Text,{children:F.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:F.providers.map(e=>(0,t.jsx)(m.Badge,{color:"blue",children:e},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(o.Text,{children:F.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(o.Text,{children:F.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:F.input_cost_per_token?eF(F.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:F.output_cost_per_token?eF(F.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(c=Object.entries(F).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),h=["green","blue","purple","orange","red","yellow"],0===c.length?(0,t.jsx)(o.Text,{className:"text-gray-500",children:"No special capabilities listed"}):c.map((e,l)=>(0,t.jsx)(m.Badge,{color:h[l%h.length],children:e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},e)))})]}),(F.tpm||F.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[F.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(o.Text,{children:F.tpm.toLocaleString()})]}),F.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(o.Text,{children:F.rpm.toLocaleString()})]})]})]}),F.supported_openai_params&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:F.supported_openai_params.map(e=>(0,t.jsx)(m.Badge,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(et.Prism,{language:"python",className:"text-sm",children:`import openai client = openai.OpenAI( api_key="your_api_key", @@ -6,7 +6,7 @@ client = openai.OpenAI( ) response = client.chat.completions.create( - model="${E.model_group}", + model="${F.model_group}", messages=[ { "role": "user", @@ -15,14 +15,14 @@ response = client.chat.completions.create( ] ) -print(response.choices[0].message.content)`})]})]})}),(0,t.jsx)(s.Modal,{title:ex?.name||"Agent Details",width:1e3,open:eh,footer:null,onOk:eA,onCancel:eO,children:ex&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Name:"}),(0,t.jsx)(o.Text,{children:ex.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Version:"}),(0,t.jsxs)(m.Badge,{color:"blue",children:["v",ex.version]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Protocol Version:"}),(0,t.jsx)(o.Text,{children:ex.protocolVersion})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"URL:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"truncate",children:ex.url}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eH(ex.url),className:"cursor-pointer text-gray-500 hover:text-blue-500"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(o.Text,{className:"mt-1",children:ex.description})]})]}),ex.capabilities&&Object.keys(ex.capabilities).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(ex.capabilities).filter(([e,t])=>!0===t).map(([e])=>(0,t.jsx)(m.Badge,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:ex.defaultInputModes?.map(e=>(0,t.jsx)(m.Badge,{color:"blue",children:e},e))||(0,t.jsx)(o.Text,{children:"Not specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:ex.defaultOutputModes?.map(e=>(0,t.jsx)(m.Badge,{color:"purple",children:e},e))||(0,t.jsx)(o.Text,{children:"Not specified"})})]})]})]}),ex.skills&&ex.skills.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,t.jsx)("div",{className:"space-y-4",children:ex.skills.map(e=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium text-base",children:e.name}),(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["ID: ",e.id]})]}),e.tags&&e.tags.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e.tags.map(e=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e},e))})]}),(0,t.jsx)(o.Text,{className:"text-sm mb-2",children:e.description}),e.examples&&e.examples.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-xs font-medium text-gray-700",children:"Examples:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.examples.map((e,l)=>(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:e},l))})]})]},e.id))})]}),ex.supportsAuthenticatedExtendedCard&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Additional Features"}),(0,t.jsx)(m.Badge,{color:"green",children:"Supports Authenticated Extended Card"})]})]})}),(0,t.jsx)(s.Modal,{title:ev?.server_name||"MCP Server Details",width:1e3,open:eN,footer:null,onOk:eA,onCancel:eO,children:ev&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Server Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Server Name:"}),(0,t.jsx)(o.Text,{children:ev.server_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Server ID:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"text-xs truncate",children:ev.server_id}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eH(ev.server_id),className:"cursor-pointer text-gray-500 hover:text-blue-500"})]})]}),ev.alias&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Alias:"}),(0,t.jsx)(o.Text,{children:ev.alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Transport:"}),(0,t.jsx)(m.Badge,{color:"blue",children:ev.transport})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Auth Type:"}),(0,t.jsx)(m.Badge,{color:"none"===ev.auth_type?"gray":"green",children:ev.auth_type})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Status:"}),(0,t.jsx)(m.Badge,{color:"active"===ev.status||"healthy"===ev.status?"green":"inactive"===ev.status||"unhealthy"===ev.status?"red":"gray",children:ev.status||"unknown"})]})]}),ev.description&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(o.Text,{className:"mt-1",children:ev.description})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Connection Details"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"URL:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,t.jsx)(o.Text,{className:"text-sm break-all bg-gray-100 p-2 rounded flex-1",children:ev.url}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eH(ev.url),className:"cursor-pointer text-gray-500 hover:text-blue-500 flex-shrink-0"})]})]}),ev.command&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Command:"}),(0,t.jsx)(o.Text,{className:"text-sm bg-gray-100 p-2 rounded mt-1 font-mono",children:ev.command})]})]})]}),ev.allowed_tools&&ev.allowed_tools.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Allowed Tools"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ev.allowed_tools.map((e,l)=>(0,t.jsx)(m.Badge,{color:"purple",children:e},l))})]}),ev.teams&&ev.teams.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Teams"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ev.teams.map((e,l)=>(0,t.jsx)(m.Badge,{color:"blue",children:e},l))})]}),ev.mcp_access_groups&&ev.mcp_access_groups.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Access Groups"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ev.mcp_access_groups.map((e,l)=>(0,t.jsx)(m.Badge,{color:"green",children:e},l))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Metadata"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Created By:"}),(0,t.jsx)(o.Text,{children:ev.created_by})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Updated By:"}),(0,t.jsx)(o.Text,{children:ev.updated_by})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Created At:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ev.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Updated At:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ev.updated_at).toLocaleString()})]}),ev.last_health_check&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Last Health Check:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ev.last_health_check).toLocaleString()})]})]}),ev.health_check_error&&(0,t.jsxs)("div",{className:"mt-2 p-2 bg-red-50 rounded",children:[(0,t.jsx)(o.Text,{className:"font-medium text-red-700",children:"Health Check Error:"}),(0,t.jsx)(o.Text,{className:"text-sm text-red-600 mt-1",children:ev.health_check_error})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(et.Prism,{language:"python",className:"text-sm",children:`from fastmcp import Client +print(response.choices[0].message.content)`})]})]})}),(0,t.jsx)(i.Modal,{title:eu?.name||"Agent Details",width:1e3,open:ep,footer:null,onOk:eA,onCancel:eH,children:eu&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Name:"}),(0,t.jsx)(o.Text,{children:eu.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Version:"}),(0,t.jsxs)(m.Badge,{color:"blue",children:["v",eu.version]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Protocol Version:"}),(0,t.jsx)(o.Text,{children:eu.protocolVersion})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"URL:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"truncate",children:eu.url}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eE(eu.url),className:"cursor-pointer text-gray-500 hover:text-blue-500"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(o.Text,{className:"mt-1",children:eu.description})]})]}),eu.capabilities&&Object.keys(eu.capabilities).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(eu.capabilities).filter(([e,t])=>!0===t).map(([e])=>(0,t.jsx)(m.Badge,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:eu.defaultInputModes?.map(e=>(0,t.jsx)(m.Badge,{color:"blue",children:e},e))||(0,t.jsx)(o.Text,{children:"Not specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:eu.defaultOutputModes?.map(e=>(0,t.jsx)(m.Badge,{color:"purple",children:e},e))||(0,t.jsx)(o.Text,{children:"Not specified"})})]})]})]}),eu.skills&&eu.skills.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,t.jsx)("div",{className:"space-y-4",children:eu.skills.map(e=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium text-base",children:e.name}),(0,t.jsxs)(o.Text,{className:"text-xs text-gray-500",children:["ID: ",e.id]})]}),e.tags&&e.tags.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e.tags.map(e=>(0,t.jsx)(m.Badge,{color:"purple",size:"xs",children:e},e))})]}),(0,t.jsx)(o.Text,{className:"text-sm mb-2",children:e.description}),e.examples&&e.examples.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-xs font-medium text-gray-700",children:"Examples:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:e.examples.map((e,l)=>(0,t.jsx)(m.Badge,{color:"gray",size:"xs",children:e},l))})]})]},e.id))})]}),eu.supportsAuthenticatedExtendedCard&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Additional Features"}),(0,t.jsx)(m.Badge,{color:"green",children:"Supports Authenticated Extended Card"})]})]})}),(0,t.jsx)(i.Modal,{title:ey?.server_name||"MCP Server Details",width:1e3,open:eS,footer:null,onOk:eA,onCancel:eH,children:ey&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Server Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Server Name:"}),(0,t.jsx)(o.Text,{children:ey.server_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Server ID:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"text-xs truncate",children:ey.server_id}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eE(ey.server_id),className:"cursor-pointer text-gray-500 hover:text-blue-500"})]})]}),ey.alias&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Alias:"}),(0,t.jsx)(o.Text,{children:ey.alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Transport:"}),(0,t.jsx)(m.Badge,{color:"blue",children:ey.transport})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Auth Type:"}),(0,t.jsx)(m.Badge,{color:"none"===ey.auth_type?"gray":"green",children:ey.auth_type})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Status:"}),(0,t.jsx)(m.Badge,{color:"active"===ey.status||"healthy"===ey.status?"green":"inactive"===ey.status||"unhealthy"===ey.status?"red":"gray",children:ey.status||"unknown"})]})]}),ey.description&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(o.Text,{className:"mt-1",children:ey.description})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Connection Details"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"URL:"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,t.jsx)(o.Text,{className:"text-sm break-all bg-gray-100 p-2 rounded flex-1",children:ey.url}),(0,t.jsx)($.CopyOutlined,{onClick:()=>eE(ey.url),className:"cursor-pointer text-gray-500 hover:text-blue-500 flex-shrink-0"})]})]}),ey.command&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Command:"}),(0,t.jsx)(o.Text,{className:"text-sm bg-gray-100 p-2 rounded mt-1 font-mono",children:ey.command})]})]})]}),ey.allowed_tools&&ey.allowed_tools.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Allowed Tools"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.allowed_tools.map((e,l)=>(0,t.jsx)(m.Badge,{color:"purple",children:e},l))})]}),ey.teams&&ey.teams.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Teams"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.teams.map((e,l)=>(0,t.jsx)(m.Badge,{color:"blue",children:e},l))})]}),ey.mcp_access_groups&&ey.mcp_access_groups.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Access Groups"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.mcp_access_groups.map((e,l)=>(0,t.jsx)(m.Badge,{color:"green",children:e},l))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Metadata"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Created By:"}),(0,t.jsx)(o.Text,{children:ey.created_by})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Updated By:"}),(0,t.jsx)(o.Text,{children:ey.updated_by})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Created At:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ey.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Updated At:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ey.updated_at).toLocaleString()})]}),ey.last_health_check&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Last Health Check:"}),(0,t.jsx)(o.Text,{className:"text-sm",children:new Date(ey.last_health_check).toLocaleString()})]})]}),ey.health_check_error&&(0,t.jsxs)("div",{className:"mt-2 p-2 bg-red-50 rounded",children:[(0,t.jsx)(o.Text,{className:"font-medium text-red-700",children:"Health Check Error:"}),(0,t.jsx)(o.Text,{className:"text-sm text-red-600 mt-1",children:ey.health_check_error})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)(et.Prism,{language:"python",className:"text-sm",children:`from fastmcp import Client import asyncio # Standard MCP configuration config = { "mcpServers": { - "${ev.server_name}": { - "url": "${(0,x.getProxyBaseUrl)()}/${ev.server_name}/mcp", + "${ey.server_name}": { + "url": "${(0,x.getProxyBaseUrl)()}/${ey.server_name}/mcp", "headers": { "x-litellm-api-key": "Bearer sk-1234" } @@ -47,4 +47,4 @@ async def main(): print(f"Response: {response}") if __name__ == "__main__": - asyncio.run(main())`})]})]})}),(0,t.jsx)(y,{visible:W,onClose:()=>ea(!1),accessToken:e||"",modelHubData:_||[],onSuccess:()=>{e&&(async()=>{try{let t=await (0,x.modelHubCall)(e);M(t.data)}catch(e){console.error("Error refreshing model data:",e)}})()}}),(0,t.jsx)(p,{visible:ec,onClose:()=>eo(!1),accessToken:e||"",agentHubData:en||[],onSuccess:()=>{e&&(async()=>{try{let t=(await (0,x.getAgentsList)(e)).agents.map(e=>({agent_id:e.agent_id,...e.agent_card_params,is_public:e.is_public}));er(t)}catch(e){console.error("Error refreshing agent data:",e)}})()}}),(0,t.jsx)(b,{visible:ek,onClose:()=>e$(!1),accessToken:e||"",mcpHubData:eg||[],onSuccess:()=>{e&&(async()=>{try{let t=await (0,x.fetchMCPServers)(e);eb(t)}catch(e){console.error("Error refreshing MCP server data:",e)}})()}}),(0,t.jsx)(U,{visible:eP,onClose:()=>eM(!1),accessToken:e||"",skillsList:eT,onSuccess:async()=>{ew((await (0,x.getClaudeCodePluginsList)(e||"",!0===a)).plugins)}})]})}],934879)}]); \ No newline at end of file + asyncio.run(main())`})]})]})}),(0,t.jsx)(y,{visible:ea,onClose:()=>en(!1),accessToken:e||"",modelHubData:M||[],onSuccess:()=>{e&&(async()=>{try{let t=await (0,x.modelHubCall)(e);I(t.data)}catch(e){console.error("Error refreshing model data:",e)}})()}}),(0,t.jsx)(p,{visible:eo,onClose:()=>ed(!1),accessToken:e||"",agentHubData:er||[],onSuccess:()=>{e&&(async()=>{try{let t=(await (0,x.getAgentsList)(e)).agents.map(e=>({agent_id:e.agent_id,...e.agent_card_params,is_public:e.is_public}));ec(t)}catch(e){console.error("Error refreshing agent data:",e)}})()}}),(0,t.jsx)(b,{visible:e$,onClose:()=>eT(!1),accessToken:e||"",mcpHubData:eb||[],onSuccess:()=>{e&&(async()=>{try{let t=await (0,x.fetchMCPServers)(e);ej(t)}catch(e){console.error("Error refreshing MCP server data:",e)}})()}}),(0,t.jsx)(U,{visible:eM,onClose:()=>eI(!1),accessToken:e||"",skillsList:ew,onSuccess:async()=>{eC((await (0,x.getClaudeCodePluginsList)(e||"",!0===a)).plugins)}})]})}],934879)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/8a26922c4b7235a4.js b/litellm/proxy/_experimental/out/_next/static/chunks/8a26922c4b7235a4.js new file mode 100644 index 0000000000..0d66f66d77 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/8a26922c4b7235a4.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214),r=e.i(708347);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,a.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&r.all_admin_roles.includes(s)})}])},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/8c17e934bd227606.js b/litellm/proxy/_experimental/out/_next/static/chunks/8c17e934bd227606.js new file mode 100644 index 0000000000..a06ab272f5 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/8c17e934bd227606.js @@ -0,0 +1,231 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,952683,e=>{"use strict";var t=e.i(843476),s=e.i(902739),a=e.i(161059),l=e.i(213970),r=e.i(105278),i=e.i(271645),n=e.i(994388),o=e.i(304967),d=e.i(269200),c=e.i(942232),m=e.i(977572),u=e.i(427612),p=e.i(64848),x=e.i(496020),h=e.i(389083),g=e.i(599724),y=e.i(212931),j=e.i(560445),f=e.i(592968),b=e.i(981339),_=e.i(790848),v=e.i(245704),w=e.i(764205),k=e.i(808613),N=e.i(199133),S=e.i(311451),C=e.i(280898),T=e.i(91739),I=e.i(262218),F=e.i(312361),A=e.i(28651),L=e.i(888259),M=e.i(826910),P=e.i(438957),D=e.i(983561),z=e.i(477189),E=e.i(827252),O=e.i(364769),R=e.i(135214),B=e.i(355619),$=e.i(663435),q=e.i(362024),U=e.i(770914),V=e.i(464571),H=e.i(646563),G=e.i(564897);let K={basic:{key:"basic",title:"Basic Information",defaultExpanded:!0,fields:[{name:"name",label:"Display Name",type:"text",required:!0,placeholder:"e.g., Customer Support Agent"},{name:"description",label:"Description",type:"textarea",required:!0,placeholder:"Describe what this agent does...",rows:3},{name:"url",label:"URL",type:"url",required:!1,placeholder:"http://localhost:9999/",tooltip:"Base URL where the agent is hosted (optional)"},{name:"version",label:"Version",type:"text",placeholder:"1.0.0",defaultValue:"1.0.0"},{name:"protocolVersion",label:"Protocol Version",type:"text",placeholder:"1.0",defaultValue:"1.0"}]},skills:{key:"skills",title:"Skills",fields:[{name:"skills",label:"Skills",type:"list",defaultValue:[]}]},capabilities:{key:"capabilities",title:"Capabilities",fields:[{name:"streaming",label:"Streaming",type:"switch",defaultValue:!1},{name:"pushNotifications",label:"Push Notifications",type:"switch"},{name:"stateTransitionHistory",label:"State Transition History",type:"switch"}]},optional:{key:"optional",title:"Optional Settings",fields:[{name:"iconUrl",label:"Icon URL",type:"url",placeholder:"https://example.com/icon.png"},{name:"documentationUrl",label:"Documentation URL",type:"url",placeholder:"https://docs.example.com"},{name:"supportsAuthenticatedExtendedCard",label:"Supports Authenticated Extended Card",type:"switch"}]},litellm:{key:"litellm",title:"LiteLLM Parameters",fields:[{name:"model",label:"Model (Optional)",type:"text"},{name:"make_public",label:"Make Public",type:"switch"}]},cost:{key:"cost",title:"Cost Configuration",fields:[{name:"cost_per_query",label:"Cost Per Query ($)",type:"text",placeholder:"0.0",tooltip:"Fixed cost per query"},{name:"input_cost_per_token",label:"Input Cost Per Token ($)",type:"text",placeholder:"0.000001",tooltip:"Cost per input token"},{name:"output_cost_per_token",label:"Output Cost Per Token ($)",type:"text",placeholder:"0.000002",tooltip:"Cost per output token"}]},tracing:{key:"tracing",title:"Tracing",fields:[{name:"enable_tracing",label:"Enable Tracing",type:"switch",defaultValue:!1,tooltip:"Enable request tracing for this agent"}]}},W="Skill ID",Q=!0,Y="e.g., hello_world",J="Skill Name",X=!0,Z="e.g., Returns hello world",ee="Description",et=!0,es="What this skill does",ea=2,el="Tags (comma-separated)",er=!0,ei="e.g., hello world, greeting",en="Examples (comma-separated)",eo="e.g., hi, hello world",ed=(e,t)=>{let s={agent_name:e.agent_name,agent_card_params:{protocolVersion:e.protocolVersion||"1.0",name:e.name||e.agent_name,description:e.description||"",url:e.url||"",version:e.version||"1.0.0",defaultInputModes:t?.agent_card_params?.defaultInputModes||["text"],defaultOutputModes:t?.agent_card_params?.defaultOutputModes||["text"],capabilities:{streaming:!0===e.streaming,...void 0!==e.pushNotifications&&{pushNotifications:e.pushNotifications},...void 0!==e.stateTransitionHistory&&{stateTransitionHistory:e.stateTransitionHistory}},skills:e.skills||[],...e.iconUrl&&{iconUrl:e.iconUrl},...e.documentationUrl&&{documentationUrl:e.documentationUrl},...void 0!==e.supportsAuthenticatedExtendedCard&&{supportsAuthenticatedExtendedCard:e.supportsAuthenticatedExtendedCard}}},a={};if(e.model&&(a.model=e.model),void 0!==e.make_public&&(a.make_public=e.make_public),e.cost_per_query&&(a.cost_per_query=parseFloat(e.cost_per_query)),e.input_cost_per_token&&(a.input_cost_per_token=parseFloat(e.input_cost_per_token)),e.output_cost_per_token&&(a.output_cost_per_token=parseFloat(e.output_cost_per_token)),Object.keys(a).length>0&&(s.litellm_params=a),null!=e.tpm_limit&&(s.tpm_limit=e.tpm_limit),null!=e.rpm_limit&&(s.rpm_limit=e.rpm_limit),null!=e.session_tpm_limit&&(s.session_tpm_limit=e.session_tpm_limit),null!=e.session_rpm_limit&&(s.session_rpm_limit=e.session_rpm_limit),Array.isArray(e.static_headers)&&e.static_headers.length>0){let t={};e.static_headers.forEach(e=>{let s=e?.header?.trim();s&&(t[s]=e?.value??"")}),Object.keys(t).length>0&&(s.static_headers=t)}return Array.isArray(e.extra_headers)&&e.extra_headers.length>0&&(s.extra_headers=e.extra_headers),s},ec=e=>{let t=e.agent_card_params?.skills?.map(e=>({...e,tags:e.tags,examples:e.examples||[]}))||[];return{agent_name:e.agent_name,name:e.agent_card_params?.name,description:e.agent_card_params?.description,url:e.agent_card_params?.url,version:e.agent_card_params?.version,protocolVersion:e.agent_card_params?.protocolVersion,streaming:e.agent_card_params?.capabilities?.streaming,pushNotifications:e.agent_card_params?.capabilities?.pushNotifications,stateTransitionHistory:e.agent_card_params?.capabilities?.stateTransitionHistory,skills:t,iconUrl:e.agent_card_params?.iconUrl,documentationUrl:e.agent_card_params?.documentationUrl,supportsAuthenticatedExtendedCard:e.agent_card_params?.supportsAuthenticatedExtendedCard,model:e.litellm_params?.model,make_public:e.litellm_params?.make_public,cost_per_query:e.litellm_params?.cost_per_query,input_cost_per_token:e.litellm_params?.input_cost_per_token,output_cost_per_token:e.litellm_params?.output_cost_per_token,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,session_tpm_limit:e.session_tpm_limit,session_rpm_limit:e.session_rpm_limit,static_headers:e.static_headers?Object.entries(e.static_headers).map(([e,t])=>({header:e,value:t})):[],extra_headers:e.extra_headers??[]}},em=()=>(0,t.jsx)(t.Fragment,{children:K.cost.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,tooltip:e.tooltip,children:(0,t.jsx)(S.Input,{placeholder:e.placeholder,type:"number",step:"0.000001"})},e.name))}),{Panel:eu}=q.Collapse,ep=({showAgentName:e=!0,visiblePanels:s})=>{let a=e=>!s||s.includes(e);return(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)(k.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter a unique agent name"}],tooltip:"Unique identifier for the agent",children:(0,t.jsx)(S.Input,{placeholder:"e.g., customer-support-agent"})}),(0,t.jsxs)(q.Collapse,{defaultActiveKey:["basic"],style:{marginBottom:16},children:[a(K.basic.key)&&(0,t.jsx)(eu,{header:`${K.basic.title} (Required)`,children:K.basic.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,rules:e.required?[{required:!0,message:`Please enter ${e.label.toLowerCase()}`}]:void 0,tooltip:e.tooltip,children:"textarea"===e.type?(0,t.jsx)(S.Input.TextArea,{rows:e.rows,placeholder:e.placeholder}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.basic.key),a(K.skills.key)&&(0,t.jsx)(eu,{header:`${K.skills.title} (Required)`,children:(0,t.jsx)(k.Form.List,{name:"skills",children:(e,{add:s,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(e=>(0,t.jsxs)("div",{style:{marginBottom:16,padding:16,border:"1px solid #d9d9d9",borderRadius:4},children:[(0,t.jsx)(k.Form.Item,{...e,label:W,name:[e.name,"id"],rules:[{required:Q,message:"Required"}],children:(0,t.jsx)(S.Input,{placeholder:Y})}),(0,t.jsx)(k.Form.Item,{...e,label:J,name:[e.name,"name"],rules:[{required:X,message:"Required"}],children:(0,t.jsx)(S.Input,{placeholder:Z})}),(0,t.jsx)(k.Form.Item,{...e,label:ee,name:[e.name,"description"],rules:[{required:et,message:"Required"}],children:(0,t.jsx)(S.Input.TextArea,{rows:ea,placeholder:es})}),(0,t.jsx)(k.Form.Item,{...e,label:el,name:[e.name,"tags"],rules:[{required:er,message:"Required"}],getValueFromEvent:e=>e.target.value.split(",").map(e=>e.trim()),getValueProps:e=>({value:Array.isArray(e)?e.join(", "):e}),children:(0,t.jsx)(S.Input,{placeholder:ei})}),(0,t.jsx)(k.Form.Item,{...e,label:en,name:[e.name,"examples"],getValueFromEvent:e=>e.target.value.split(",").map(e=>e.trim()).filter(e=>e),getValueProps:e=>({value:Array.isArray(e)?e.join(", "):""}),children:(0,t.jsx)(S.Input,{placeholder:eo})}),(0,t.jsx)(V.Button,{type:"link",danger:!0,onClick:()=>a(e.name),icon:(0,t.jsx)(G.MinusCircleOutlined,{}),children:"Remove Skill"})]},e.key)),(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(H.PlusOutlined,{}),style:{width:"100%"},children:"Add Skill"})]})})},K.skills.key),a(K.capabilities.key)&&(0,t.jsx)(eu,{header:K.capabilities.title,children:K.capabilities.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,valuePropName:"checked",children:(0,t.jsx)(_.Switch,{})},e.name))},K.capabilities.key),a(K.optional.key)&&(0,t.jsx)(eu,{header:K.optional.title,children:K.optional.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,valuePropName:"switch"===e.type?"checked":void 0,children:"switch"===e.type?(0,t.jsx)(_.Switch,{}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.optional.key),a(K.cost.key)&&(0,t.jsx)(eu,{header:K.cost.title,children:(0,t.jsx)(em,{})},K.cost.key),a(K.litellm.key)&&(0,t.jsx)(eu,{header:K.litellm.title,children:K.litellm.fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.name,valuePropName:"switch"===e.type?"checked":void 0,children:"switch"===e.type?(0,t.jsx)(_.Switch,{}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.litellm.key),a("auth_headers")&&(0,t.jsxs)(eu,{header:"Authentication Headers",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Static Headers"," ",(0,t.jsx)(f.Tooltip,{title:"Headers always sent to the backend agent, regardless of the client request. Admin-configured, static wins on conflict.",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(k.Form.List,{name:"static_headers",children:(e,{add:s,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(({key:e,name:s,...l})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(k.Form.Item,{...l,name:[s,"header"],rules:[{required:!0,message:"Header name required"}],children:(0,t.jsx)(S.Input,{placeholder:"Header name (e.g. Authorization)",style:{width:220}})}),(0,t.jsx)(k.Form.Item,{...l,name:[s,"value"],rules:[{required:!0,message:"Value required"}],children:(0,t.jsx)(S.Input,{placeholder:"Value (e.g. Bearer token123)",style:{width:260}})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>a(s),style:{color:"#ff4d4f"}})]},e)),(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(H.PlusOutlined,{}),style:{width:"100%"},children:"Add Static Header"})]})})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Forward Client Headers"," ",(0,t.jsx)(f.Tooltip,{title:"Header names to extract from the client's request and forward to the agent. Type a name and press Enter.",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),name:"extra_headers",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"e.g. x-api-key, Authorization",tokenSeparators:[","]})})]},"auth_headers")]})]})},{Panel:ex}=q.Collapse,eh=(e,t)=>{let s={...t.litellm_params_template||{}};for(let a of t.credential_fields){let t=e[a.key];t&&!1!==a.include_in_litellm_params&&(s[a.key]=t)}if(e.cost_per_query&&(s.cost_per_query=parseFloat(e.cost_per_query)),e.input_cost_per_token&&(s.input_cost_per_token=parseFloat(e.input_cost_per_token)),e.output_cost_per_token&&(s.output_cost_per_token=parseFloat(e.output_cost_per_token)),t.model_template){let a=t.model_template;for(let s of t.credential_fields){let t=`{${s.key}}`;a.includes(t)&&e[s.key]&&(a=a.replace(t,e[s.key]))}s.model=a}let a={agent_name:e.agent_name,agent_card_params:{protocolVersion:"1.0",name:e.display_name||e.agent_name,description:e.description||`${t.agent_type_display_name} agent`,url:e.api_base||"",version:"1.0.0",defaultInputModes:["text"],defaultOutputModes:["text"],capabilities:{streaming:!0},skills:[{id:"chat",name:"Chat",description:"General chat capability",tags:["chat","conversation"]}]},litellm_params:s};return null!=e.tpm_limit&&(a.tpm_limit=e.tpm_limit),null!=e.rpm_limit&&(a.rpm_limit=e.rpm_limit),null!=e.session_tpm_limit&&(a.session_tpm_limit=e.session_tpm_limit),null!=e.session_rpm_limit&&(a.session_rpm_limit=e.session_rpm_limit),a},eg=({agentTypeInfo:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter a unique agent name"}],tooltip:"Unique identifier for the agent",children:(0,t.jsx)(S.Input,{placeholder:"e.g., my-langgraph-agent"})}),(0,t.jsx)(k.Form.Item,{label:"Description",name:"description",tooltip:"Brief description of what this agent does",children:(0,t.jsx)(S.Input.TextArea,{rows:2,placeholder:"Describe what this agent does..."})}),e.credential_fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:`Please enter ${e.label}`}]:void 0,tooltip:e.tooltip,initialValue:e.default_value,children:"password"===e.field_type?(0,t.jsx)(S.Input.Password,{placeholder:e.placeholder||""}):"textarea"===e.field_type?(0,t.jsx)(S.Input.TextArea,{rows:3,placeholder:e.placeholder||""}):"select"===e.field_type&&e.options?(0,t.jsx)(N.Select,{placeholder:e.placeholder||"",children:e.options.map(e=>(0,t.jsx)(N.Select.Option,{value:e,children:e},e))}):(0,t.jsx)(S.Input,{placeholder:e.placeholder||""})},e.key)),(0,t.jsx)(q.Collapse,{style:{marginBottom:16},children:(0,t.jsx)(ex,{header:K.cost.title,children:(0,t.jsx)(em,{})},K.cost.key)})]});var ey=e.i(75921),ej=e.i(390605),ef=e.i(891547);let{Step:eb}=C.Steps,e_="custom",ev=({visible:e,onClose:s,accessToken:a,onSuccess:l,teams:r})=>{let o,d,{userId:c,userRole:m}=(0,R.default)(),[u]=k.Form.useForm(),[p,x]=(0,i.useState)(0),[h,g]=(0,i.useState)(!1),[j,f]=(0,i.useState)("a2a"),[b,v]=(0,i.useState)([]),[q,U]=(0,i.useState)(!1),[V,H]=(0,i.useState)("create_new"),[G,W]=(0,i.useState)(""),[Q,Y]=(0,i.useState)([]),[J,X]=(0,i.useState)([]),[Z,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)(!1),[ea,el]=(0,i.useState)([]),[er,ei]=(0,i.useState)(!1),[en,eo]=(0,i.useState)([]),[ec,em]=(0,i.useState)(!1),[eu,ex]=(0,i.useState)(""),[ev,ew]=(0,i.useState)(null),[ek,eN]=(0,i.useState)(null),[eS,eC]=(0,i.useState)(!1),[eT,eI]=(0,i.useState)(!1),[eF,eA]=(0,i.useState)(null),[eL,eM]=(0,i.useState)(null);(0,i.useEffect)(()=>{(async()=>{U(!0);try{let e=await (0,w.getAgentCreateMetadata)();v(e)}catch(e){console.error("Error fetching agent metadata:",e)}finally{U(!1)}})()},[]),(0,i.useEffect)(()=>{3===p&&a&&0===J.length&&(async()=>{es(!0);try{let e=await (0,w.keyListCall)(a,null,null,null,null,null,1,100);X(e?.keys||[])}catch(e){console.error("Error fetching keys:",e)}finally{es(!1)}})()},[p,a]),(0,i.useEffect)(()=>{if(1!==p&&3!==p||!a||!c||!m)return;let e=!1;return ei(!0),(0,w.modelAvailableCall)(a,c,m).then(t=>{e||el((t?.data??(Array.isArray(t)?t:[])).map(e=>e.id??e.model_name).filter(Boolean))}).catch(t=>{e||console.error("Error fetching models:",t)}).finally(()=>{e||ei(!1)}),()=>{e=!0}},[p,a,c,m]),(0,i.useEffect)(()=>{if(1!==p||!a)return;let e=!1;return em(!0),(0,w.getAgentsList)(a).then(t=>{e||eo((t?.agents??[]).map(e=>({agent_id:e.agent_id,agent_name:e.agent_name})))}).catch(t=>{e||console.error("Error fetching agents:",t)}).finally(()=>{e||em(!1)}),()=>{e=!0}},[p,a]);let eP=b.find(e=>e.agent_type===j),eD=async()=>{try{if(0===p){await u.validateFields(["agent_name"]);let e=u.getFieldValue("agent_name");e&&!G&&W(`${e}-key`)}x(e=>e+1)}catch{}},ez=async()=>{if(!a)return void L.default.error("No access token available");g(!0);try{await u.validateFields();let e={...u.getFieldsValue(!0)},t=(e=>{if(j===e_)return{agent_name:e.agent_name,agent_card_params:{protocolVersion:"1.0",name:e.agent_name,description:e.description||"",url:"",version:"1.0.0",defaultInputModes:["text"],defaultOutputModes:["text"],capabilities:{streaming:!1},skills:[]}};if("a2a"===j)return ed(e);if(eP?.use_a2a_form_fields){let t=ed(e);for(let s of(eP.litellm_params_template&&(t.litellm_params={...t.litellm_params,...eP.litellm_params_template}),eP.credential_fields)){let a=e[s.key];a&&!1!==s.include_in_litellm_params&&(t.litellm_params[s.key]=a)}return t}return eP?eh(e,eP):null})(e);if(!t){L.default.error("Failed to build agent data"),g(!1);return}let s=e.allowed_mcp_servers_and_groups,r=e.mcp_tool_permissions||{},i=e.entitlement_models||[],n=e.entitlement_agents||[];(s?.servers?.length>0||s?.accessGroups?.length>0||Object.keys(r).length>0||i.length>0||n.length>0)&&(t.object_permission={},s?.servers?.length>0&&(t.object_permission.mcp_servers=s.servers),s?.accessGroups?.length>0&&(t.object_permission.mcp_access_groups=s.accessGroups),Object.keys(r).length>0&&(t.object_permission.mcp_tool_permissions=r),i.length>0&&(t.object_permission.models=i),n.length>0&&(t.object_permission.agents=n)),(eS||eT)&&(t.litellm_params||(t.litellm_params={}),eS&&(t.litellm_params.require_trace_id_on_calls_to_agent=!0),eT&&(t.litellm_params.require_trace_id_on_calls_by_agent=!0,eF&&(t.litellm_params.max_iterations=eF),eL&&(t.litellm_params.max_budget_per_session=eL)));let o=e.guardrails||[];o.length>0&&(t.litellm_params||(t.litellm_params={}),t.litellm_params.guardrails=o);let d=e.team_id||null;d&&(t.team_id=d);let c=await (0,w.createAgentCall)(a,t),m=c.agent_id,p=c.agent_name||e.agent_name||m;if(ex(p),"create_new"===V&&G){let e=await (0,w.keyCreateForAgentCall)(a,m,G,Q,void 0,d);ew(e.key||null)}else if("existing_key"===V){if(!Z){L.default.error("Please select an existing key to assign"),g(!1);return}await (0,w.keyUpdateCall)(a,{key:Z,agent_id:m});let e=J.find(e=>e.token===Z);eN(e?.key_alias||Z.slice(0,12)+"…")}x(4),l()}catch(t){console.error("Error creating agent:",t);let e=t instanceof Error?t.message:String(t);L.default.error(e?`Failed to create agent: ${e}`:"Failed to create agent")}finally{g(!1)}},eE=()=>{u.resetFields(),f("a2a"),x(0),H("create_new"),W(""),Y([]),ee(null),ex(""),ew(null),eN(null),eC(!1),eI(!1),eA(null),eM(null),s()},eO=e=>{f(e),u.resetFields()},eR=j===e_?null:eP?.logo_url||b.find(e=>"a2a"===e.agent_type)?.logo_url;return(0,t.jsx)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[eR&&p<1&&(0,t.jsx)("img",{src:eR,alt:"Agent",className:"w-6 h-6 object-contain"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Agent"})]}),open:e,onCancel:eE,footer:null,width:900,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)(C.Steps,{current:p,size:"small",className:"mb-8",children:[(0,t.jsx)(eb,{title:"Configure"}),(0,t.jsx)(eb,{title:"Entitlements"}),(0,t.jsx)(eb,{title:"Governance"}),(0,t.jsx)(eb,{title:"Agent Management"}),(0,t.jsx)(eb,{title:"Ready"})]}),(0,t.jsxs)(k.Form,{form:u,layout:"vertical",initialValues:"a2a"===j?{...(o={defaultInputModes:["text"],defaultOutputModes:["text"]},Object.values(K).forEach(e=>{e.fields.forEach(e=>{void 0!==e.defaultValue&&(o[e.name]=e.defaultValue)})}),o),allowed_mcp_servers_and_groups:{servers:[],accessGroups:[]},mcp_tool_permissions:{},entitlement_models:[],entitlement_agents:[],guardrails:[]}:{allowed_mcp_servers_and_groups:{servers:[],accessGroups:[]},mcp_tool_permissions:{},entitlement_models:[],entitlement_agents:[],guardrails:[]},className:"space-y-4",children:[0===p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Agent Type"}),required:!0,tooltip:"Select the type of agent you want to create",children:(0,t.jsx)(N.Select,{value:j,onChange:eO,size:"large",style:{width:"100%"},optionLabelProp:"label",dropdownRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,(0,t.jsx)(F.Divider,{style:{margin:"4px 0"}}),(0,t.jsxs)("div",{className:"px-2 py-1",children:[(0,t.jsx)("div",{className:"text-xs text-gray-400 font-medium mb-1 uppercase tracking-wide px-2",children:"Not listed?"}),(0,t.jsxs)("div",{className:`flex items-center gap-3 px-2 py-2 rounded cursor-pointer transition-colors ${j===e_?"bg-amber-50":"hover:bg-amber-50"}`,onClick:()=>eO(e_),children:[(0,t.jsx)(z.AppstoreOutlined,{className:"text-amber-600 text-lg"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-amber-700",children:"Custom / Other"}),(0,t.jsx)(I.Tag,{color:"orange",style:{fontSize:10,padding:"0 4px"},children:"GENERIC"})]}),(0,t.jsx)("div",{className:"text-xs text-amber-600",children:"For agents that don't follow a standard protocol — just needs a virtual key"})]})]})]})]}),children:b.map(e=>(0,t.jsx)(N.Select.Option,{value:e.agent_type,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("img",{src:e.logo_url||"",alt:"",className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e.agent_type_display_name})]}),children:(0,t.jsxs)("div",{className:"flex items-center gap-3 py-1",children:[(0,t.jsx)("img",{src:e.logo_url||"",alt:e.agent_type_display_name,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium",children:e.agent_type_display_name}),e.description&&(0,t.jsx)("div",{className:"text-xs text-gray-500",children:e.description})]})]})},e.agent_type))})}),(0,t.jsx)("div",{className:"mt-4",children:j===e_?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(k.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter an agent name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. my-custom-agent"})}),(0,t.jsx)(k.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(S.Input.TextArea,{placeholder:"Describe what this agent does…",rows:3})})]}):"a2a"===j?(0,t.jsx)(ep,{showAgentName:!0}):eP?.use_a2a_form_fields?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ep,{showAgentName:!0}),eP.credential_fields.length>0&&(0,t.jsxs)("div",{className:"mt-4 p-4 border border-gray-200 rounded-lg",children:[(0,t.jsxs)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:[eP.agent_type_display_name," Settings"]}),eP.credential_fields.map(e=>(0,t.jsx)(k.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:`Please enter ${e.label}`}]:void 0,tooltip:e.tooltip,initialValue:e.default_value,children:"password"===e.field_type?(0,t.jsx)(S.Input.Password,{placeholder:e.placeholder||""}):(0,t.jsx)(S.Input,{placeholder:e.placeholder||""})},e.key))]})]}):eP?(0,t.jsx)(eg,{agentTypeInfo:eP}):null})]}),1===p&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Configure which models, agents, and MCP tools this agent is allowed to use. Leave fields empty to allow all (subject to key/team permissions)."}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allowed Models"}),name:"entitlement_models",tooltip:"Restrict which models this agent can call. Leave empty to allow all.",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:er?"Loading models...":"Select models (leave empty for all)",tokenSeparators:[","],loading:er,showSearch:!0,options:ea.map(e=>({label:(0,B.getModelDisplayName)(e),value:e}))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allowed Agents (Sub-Agents)"}),name:"entitlement_agents",tooltip:"Restrict which other agents this agent can invoke as sub-agents. Leave empty to allow all.",children:(0,t.jsx)(N.Select,{mode:"multiple",style:{width:"100%"},placeholder:ec?"Loading agents...":"Select agents (leave empty for all)",loading:ec,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:en.map(e=>({label:e.agent_name,value:e.agent_id}))})}),(0,t.jsx)(F.Divider,{className:"my-2"}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(E.InfoCircleOutlined,{title:"Select which MCP servers or access groups this agent can access",style:{marginLeft:"4px"}})]}),name:"allowed_mcp_servers_and_groups",initialValue:{servers:[],accessGroups:[]},children:(0,t.jsx)(ey.default,{onChange:e=>u.setFieldValue("allowed_mcp_servers_and_groups",e),value:u.getFieldValue("allowed_mcp_servers_and_groups")||{servers:[],accessGroups:[]},accessToken:a??"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(S.Input,{type:"hidden"})}),(0,t.jsx)(k.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-4",children:(0,t.jsx)(ej.default,{accessToken:a??"",selectedServers:u.getFieldValue("allowed_mcp_servers_and_groups")?.servers??[],toolPermissions:u.getFieldValue("mcp_tool_permissions")??{},onChange:e=>u.setFieldsValue({mcp_tool_permissions:e})})})})]}),2===p&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Tracing"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Require x-litellm-trace-id on calls TO this agent"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Only accept this agent being invoked with a trace-id (e.g. when used as a sub-agent)."})]}),(0,t.jsx)(_.Switch,{checked:eS,onChange:eC})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Require x-litellm-trace-id on calls BY this agent"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Requires LLM/MCP calls made by this agent to include x-litellm-trace-id for session tracking."})]}),(0,t.jsx)(_.Switch,{checked:eT,onChange:e=>{eI(e),e||(eA(null),eM(null))}})]})]})]}),(0,t.jsx)(F.Divider,{className:"my-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Budgets & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4",children:[!eT&&(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg text-sm text-yellow-800",children:'Enable "Require x-litellm-trace-id on calls BY this agent" in Tracing to configure budgets and rate limits.'}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Session Budgets"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Max Iterations"}),(0,t.jsx)(A.InputNumber,{className:"w-full",min:1,placeholder:"e.g. 25",disabled:!eT,value:eF,onChange:e=>eA(e)}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Hard cap on LLM calls per session"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Max Budget Per Session ($)"}),(0,t.jsx)(A.InputNumber,{className:"w-full",min:.01,step:.5,placeholder:"e.g. 5.00",disabled:!eT,value:eL,onChange:e=>eM(e)}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Max spend per trace before returning 429"})]})]}),(0,t.jsx)(F.Divider,{className:"my-2"}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Agent Rate Limits"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Global rate limits applied across all callers of this agent."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"TPM Limit",name:"tpm_limit",className:"mb-0",children:(0,t.jsx)(A.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 100000",disabled:!eT})}),(0,t.jsx)(k.Form.Item,{label:"RPM Limit",name:"rpm_limit",className:"mb-0",children:(0,t.jsx)(A.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 100",disabled:!eT})})]}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700 mt-4",children:"Per-Session Rate Limits"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Rate limits per session (x-litellm-trace-id). Each session gets its own counters."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"Session TPM Limit",name:"session_tpm_limit",className:"mb-0",children:(0,t.jsx)(A.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 10000",disabled:!eT})}),(0,t.jsx)(k.Form.Item,{label:"Session RPM Limit",name:"session_rpm_limit",className:"mb-0",children:(0,t.jsx)(A.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 20",disabled:!eT})})]})]})]}),(0,t.jsx)(F.Divider,{className:"my-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Guardrails"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Apply guardrails to this agent. Selected guardrails will run on all calls made by this agent."}),(0,t.jsx)(k.Form.Item,{name:"guardrails",initialValue:[],children:(0,t.jsx)(ef.default,{accessToken:a??"",value:u.getFieldValue("guardrails")??[],onChange:e=>u.setFieldsValue({guardrails:e})})})]})]}),3===p&&(d=u.getFieldValue("agent_name")||"your-agent",(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-center mb-6",children:(0,t.jsx)(I.Tag,{icon:(0,t.jsx)(D.RobotOutlined,{}),color:"purple",className:"px-3 py-1 text-sm",children:d})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Assign to Team"}),name:"team_id",tooltip:"Optionally assign this agent to a team. The agent and its key will belong to the selected team.",children:(0,t.jsx)($.default,{})}),(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:`p-4 border-2 rounded-lg cursor-pointer transition-colors ${"create_new"===V?"border-indigo-600 bg-indigo-50":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>H("create_new"),children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 flex-1",children:[(0,t.jsx)(T.Radio,{value:"create_new",checked:"create_new"===V,onChange:()=>H("create_new")}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(P.KeyOutlined,{className:"text-indigo-600"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"Create a new key for this agent"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"A dedicated key scoped to this agent."}),"create_new"===V&&(0,t.jsx)("div",{className:"mt-3 space-y-3",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Key Name"}),(0,t.jsx)(S.Input,{value:G,onChange:e=>W(e.target.value),placeholder:"e.g. my-agent-key"})]})})]})]}),(0,t.jsx)(I.Tag,{color:"green",children:"Recommended"})]})}),(0,t.jsx)("div",{className:`p-4 border-2 rounded-lg cursor-pointer transition-colors ${"existing_key"===V?"border-indigo-600 bg-indigo-50":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>H("existing_key"),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(T.Radio,{value:"existing_key",checked:"existing_key"===V,onChange:()=>H("existing_key")}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(P.KeyOutlined,{className:"text-gray-500"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"Assign an existing key"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Re-assign a key you already have to this agent."}),"existing_key"===V&&(0,t.jsx)("div",{className:"mt-3",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(N.Select,{showSearch:!0,style:{width:"100%"},placeholder:"Search by key name…",loading:et,value:Z,onChange:e=>ee(e),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:J.map(e=>({label:e.key_alias||e.token?.slice(0,12)+"…",value:e.token}))})})]})]})})]}),(0,t.jsx)("div",{className:"text-center mt-4",children:(0,t.jsx)("button",{type:"button",className:"text-sm text-gray-500 underline hover:text-gray-700",onClick:()=>H("skip"),children:"Skip for now — I'll assign a key later"})})]})),4===p&&(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)(M.CheckCircleFilled,{className:"text-5xl text-green-500 mb-4",style:{fontSize:48}}),(0,t.jsx)("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Agent Created!"}),(0,t.jsx)("div",{className:"flex justify-center mb-4",children:(0,t.jsx)(I.Tag,{icon:(0,t.jsx)(D.RobotOutlined,{}),color:"purple",className:"px-3 py-1 text-sm",children:eu})}),ev&&(0,t.jsx)("div",{className:"mt-4 text-left max-w-md mx-auto",children:(0,t.jsx)(O.default,{apiKey:ev})}),ek&&(0,t.jsxs)("p",{className:"text-sm text-gray-600 mt-2",children:["Key ",(0,t.jsx)("span",{className:"font-medium",children:ek})," has been assigned to this agent."]}),!ev&&!ek&&"skip"===V&&(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"No key assigned. You can create one from the Virtual Keys page."})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-6 border-t border-gray-100 mt-6",children:[(0,t.jsx)("div",{children:p>0&&p<4&&(0,t.jsx)("button",{type:"button",onClick:()=>{x(e=>Math.max(0,e-1))},className:"text-sm text-gray-600 border border-gray-300 rounded px-4 py-2 hover:bg-gray-50",children:"← Back"})}),(0,t.jsxs)("div",{className:"flex gap-3",children:[p<4&&(0,t.jsx)(n.Button,{variant:"secondary",onClick:eE,children:"Cancel"}),0===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),1===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),2===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),3===p&&(0,t.jsx)(n.Button,{variant:"primary",loading:h,onClick:ez,children:h?"Creating...":"Create Agent →"}),4===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eE,children:"Done"})]})]})]})})};var ew=e.i(708347),ek=e.i(629569),eN=e.i(197647),eS=e.i(653824),eC=e.i(881073),eT=e.i(404206),eI=e.i(723731),eF=e.i(482725),eA=e.i(869216),eL=e.i(530212);let eM=({agent:e})=>{let s=e.litellm_params;return s?.cost_per_query===void 0&&s?.input_cost_per_token===void 0&&s?.output_cost_per_token===void 0?null:(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ek.Title,{children:"Cost Configuration"}),(0,t.jsxs)(eA.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:[void 0!==s.cost_per_query&&(0,t.jsxs)(eA.Descriptions.Item,{label:"Cost Per Query",children:["$",s.cost_per_query]}),void 0!==s.input_cost_per_token&&(0,t.jsxs)(eA.Descriptions.Item,{label:"Input Cost Per Token",children:["$",s.input_cost_per_token]}),void 0!==s.output_cost_per_token&&(0,t.jsxs)(eA.Descriptions.Item,{label:"Output Cost Per Token",children:["$",s.output_cost_per_token]})]})]})},eP=e=>{let t=e.litellm_params?.model||"",s=e.litellm_params?.custom_llm_provider;return"langgraph"===s?"langgraph":"azure_ai"===s?"azure_ai_foundry":"bedrock"===s?"bedrock_agentcore":t.startsWith("langgraph/")?"langgraph":t.startsWith("azure_ai/agents/")?"azure_ai_foundry":t.startsWith("bedrock/agentcore/")?"bedrock_agentcore":"a2a"},eD=(e,t)=>{let s={agent_name:e.agent_name,description:e.agent_card_params?.description||""};for(let a of t.credential_fields)if(!1!==a.include_in_litellm_params)s[a.key]=e.litellm_params?.[a.key]||a.default_value||"";else if(t.model_template&&e.litellm_params?.model){let l=e.litellm_params.model,r=t.model_template.split("/"),i=l.split("/");r.forEach((e,t)=>{e===`{${a.key}}`&&i[t]&&(s[a.key]=i[t])})}return s.cost_per_query=e.litellm_params?.cost_per_query,s.input_cost_per_token=e.litellm_params?.input_cost_per_token,s.output_cost_per_token=e.litellm_params?.output_cost_per_token,s},ez=({agentId:e,onClose:s,accessToken:a,isAdmin:l})=>{let[r,d]=(0,i.useState)(null),[c,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(!1),[y]=k.Form.useForm(),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)("a2a");(0,i.useEffect)(()=>{(async()=>{try{let e=await (0,w.getAgentCreateMetadata)();f(e)}catch(e){console.error("Error fetching agent metadata:",e)}})()},[]),(0,i.useEffect)(()=>{v()},[e,a]);let v=async()=>{if(a){m(!0);try{let t=await (0,w.getAgentInfo)(a,e);d(t);let s=eP(t);if(_(s),"a2a"===s)y.setFieldsValue(ec(t));else{let e=j.find(e=>e.agent_type===s);e?y.setFieldsValue(eD(t,e)):y.setFieldsValue(ec(t))}}catch(e){console.error("Error fetching agent info:",e),L.default.error("Failed to load agent information")}finally{m(!1)}}};(0,i.useEffect)(()=>{if(r&&j.length>0){let e=eP(r);if("a2a"!==e){let t=j.find(t=>t.agent_type===e);t&&y.setFieldsValue(eD(r,t))}}},[j,r]);let N=j.find(e=>e.agent_type===b),C=async t=>{if(a&&r){h(!0);try{let s;"a2a"===b?s=ed(t,r):N?(s=eh(t,N)).agent_name=t.agent_name:s=ed(t,r),await (0,w.patchAgentCall)(a,e,s),L.default.success("Agent updated successfully"),p(!1),v()}catch(e){console.error("Error updating agent:",e),L.default.error("Failed to update agent")}finally{h(!1)}}};if(c)return(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!r)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"text-center",children:"Agent not found"}),(0,t.jsx)(n.Button,{onClick:s,className:"mt-4",children:"Back to Agents List"})]});let T=e=>e?new Date(e).toLocaleString():"-";return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eL.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Agents"}),(0,t.jsx)(ek.Title,{children:r.agent_name||"Unnamed Agent"}),(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:r.agent_id})]}),(0,t.jsxs)(eS.TabGroup,{children:[(0,t.jsxs)(eC.TabList,{className:"mb-4",children:[(0,t.jsx)(eN.Tab,{children:"Overview"},"overview"),l?(0,t.jsx)(eN.Tab,{children:"Settings"},"settings"):(0,t.jsx)(t.Fragment,{})]}),(0,t.jsxs)(eI.TabPanels,{children:[(0,t.jsxs)(eT.TabPanel,{children:[(0,t.jsxs)(eA.Descriptions,{bordered:!0,column:1,children:[(0,t.jsx)(eA.Descriptions.Item,{label:"Agent ID",children:r.agent_id}),(0,t.jsx)(eA.Descriptions.Item,{label:"Agent Name",children:r.agent_name}),(0,t.jsx)(eA.Descriptions.Item,{label:"Display Name",children:r.agent_card_params?.name||"-"}),(0,t.jsx)(eA.Descriptions.Item,{label:"Description",children:r.agent_card_params?.description||"-"}),(0,t.jsx)(eA.Descriptions.Item,{label:"URL",children:r.agent_card_params?.url||"-"}),(0,t.jsx)(eA.Descriptions.Item,{label:"Version",children:r.agent_card_params?.version||"-"}),(0,t.jsx)(eA.Descriptions.Item,{label:"Protocol Version",children:r.agent_card_params?.protocolVersion||"-"}),(0,t.jsx)(eA.Descriptions.Item,{label:"Streaming",children:r.agent_card_params?.capabilities?.streaming?"Yes":"No"}),r.agent_card_params?.capabilities?.pushNotifications&&(0,t.jsx)(eA.Descriptions.Item,{label:"Push Notifications",children:"Yes"}),r.agent_card_params?.capabilities?.stateTransitionHistory&&(0,t.jsx)(eA.Descriptions.Item,{label:"State Transition History",children:"Yes"}),(0,t.jsxs)(eA.Descriptions.Item,{label:"Skills",children:[r.agent_card_params?.skills?.length||0," configured"]}),r.litellm_params?.model&&(0,t.jsx)(eA.Descriptions.Item,{label:"Model",children:r.litellm_params.model}),r.litellm_params?.make_public!==void 0&&(0,t.jsx)(eA.Descriptions.Item,{label:"Make Public",children:r.litellm_params.make_public?"Yes":"No"}),r.agent_card_params?.iconUrl&&(0,t.jsx)(eA.Descriptions.Item,{label:"Icon URL",children:r.agent_card_params.iconUrl}),r.agent_card_params?.documentationUrl&&(0,t.jsx)(eA.Descriptions.Item,{label:"Documentation URL",children:r.agent_card_params.documentationUrl}),(0,t.jsx)(eA.Descriptions.Item,{label:"TPM Limit",children:r.tpm_limit??"Unlimited"}),(0,t.jsx)(eA.Descriptions.Item,{label:"RPM Limit",children:r.rpm_limit??"Unlimited"}),(0,t.jsx)(eA.Descriptions.Item,{label:"Session TPM Limit",children:r.session_tpm_limit??"Unlimited"}),(0,t.jsx)(eA.Descriptions.Item,{label:"Session RPM Limit",children:r.session_rpm_limit??"Unlimited"}),(0,t.jsx)(eA.Descriptions.Item,{label:"Created At",children:T(r.created_at)}),(0,t.jsx)(eA.Descriptions.Item,{label:"Updated At",children:T(r.updated_at)})]}),r.object_permission&&(r.object_permission.mcp_servers?.length||r.object_permission.mcp_access_groups?.length||r.object_permission.mcp_tool_permissions&&Object.keys(r.object_permission.mcp_tool_permissions).length>0)&&(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ek.Title,{children:"MCP Tool Permissions"}),(0,t.jsxs)(eA.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:[r.object_permission.mcp_servers&&r.object_permission.mcp_servers.length>0&&(0,t.jsx)(eA.Descriptions.Item,{label:"MCP Servers",children:r.object_permission.mcp_servers.join(", ")}),r.object_permission.mcp_access_groups&&r.object_permission.mcp_access_groups.length>0&&(0,t.jsx)(eA.Descriptions.Item,{label:"MCP Access Groups",children:r.object_permission.mcp_access_groups.join(", ")}),r.object_permission.mcp_tool_permissions&&Object.keys(r.object_permission.mcp_tool_permissions).length>0&&(0,t.jsx)(eA.Descriptions.Item,{label:"Tool permissions per server",children:(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(r.object_permission.mcp_tool_permissions).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"font-medium",children:[e,":"]})," ",Array.isArray(s)?s.join(", "):String(s)]},e))})})]})]}),(0,t.jsx)(eM,{agent:r}),r.agent_card_params?.skills&&r.agent_card_params.skills.length>0&&(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(ek.Title,{children:"Skills"}),(0,t.jsx)(eA.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:r.agent_card_params.skills.map((e,s)=>(0,t.jsx)(eA.Descriptions.Item,{label:e.name||`Skill ${s+1}`,children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"ID:"})," ",e.id]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Description:"})," ",e.description]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Tags:"})," ",Array.isArray(e.tags)?e.tags.join(", "):e.tags]}),e.examples&&e.examples.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Examples:"})," ",Array.isArray(e.examples)?e.examples.join(", "):e.examples]})]})},s))})]})]}),l&&(0,t.jsx)(eT.TabPanel,{children:(0,t.jsxs)(o.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(ek.Title,{children:"Agent Settings"}),!u&&(0,t.jsx)(n.Button,{onClick:()=>p(!0),children:"Edit Settings"})]}),u?(0,t.jsxs)(k.Form,{form:y,layout:"vertical",onFinish:C,children:[(0,t.jsx)(k.Form.Item,{label:"Agent ID",children:(0,t.jsx)(S.Input,{value:r.agent_id,disabled:!0})}),"a2a"===b?(0,t.jsx)(ep,{showAgentName:!0}):N?(0,t.jsx)(eg,{agentTypeInfo:N}):(0,t.jsx)(ep,{showAgentName:!0}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(ek.Title,{className:"mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(A.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})}),(0,t.jsx)(k.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(A.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(k.Form.Item,{label:"Session TPM Limit",name:"session_tpm_limit",children:(0,t.jsx)(A.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})}),(0,t.jsx)(k.Form.Item,{label:"Session RPM Limit",name:"session_rpm_limit",children:(0,t.jsx)(A.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,t.jsx)(V.Button,{onClick:()=>{p(!1),v()},children:"Cancel"}),(0,t.jsx)(n.Button,{loading:x,children:"Save Changes"})]})]}):(0,t.jsx)(g.Text,{children:'Click "Edit Settings" to modify agent configuration.'})]})})]})]})]})};var eE=e.i(727749),eO=e.i(500330),eR=e.i(902555);let eB=({accessToken:e,userRole:s,teams:a})=>{let[l,r]=(0,i.useState)([]),[k,N]=(0,i.useState)({}),[S,C]=(0,i.useState)(!1),[T,I]=(0,i.useState)(!1),[F,A]=(0,i.useState)(!1),[L,M]=(0,i.useState)(null),[P,D]=(0,i.useState)(null),[z,E]=(0,i.useState)(!1),O=!!s&&(0,ew.isAdminRole)(s),R=async t=>{if(e){I(!0);try{let s=await (0,w.getAgentsList)(e,t??z);r(s.agents||[])}catch(e){console.error("Error fetching agents:",e)}finally{I(!1)}}},B=async()=>{if(e)try{let{keys:t=[]}=await (0,w.keyListCall)(e,null,null,null,null,null,1,500),s={};for(let e of t){let t=e.agent_id;t&&!s[t]&&(s[t]={has_key:!0,key_alias:e.key_alias,token_prefix:e.token?`${e.token.slice(0,8)}…`:void 0})}N(s)}catch(e){console.error("Error fetching keys for agents:",e)}};(0,i.useEffect)(()=>{R()},[e]),(0,i.useEffect)(()=>{e&&l.length>0?B():0===l.length&&N({})},[e,l.length]);let $=async()=>{if(L&&e){A(!0);try{await (0,w.deleteAgentCall)(e,L.id),eE.default.success(`Agent "${L.name}" deleted successfully`),R()}catch(e){console.error("Error deleting agent:",e),eE.default.fromBackend("Failed to delete agent")}finally{A(!1),M(null)}}},q=[...l].sort((e,t)=>{let s=e.created_at?new Date(e.created_at).getTime():0;return(t.created_at?new Date(t.created_at).getTime():0)-s}),U=O?7:6;return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Agents"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"List of A2A-spec agents that are available to be used in your organization. Go to AI Hub, to make agents public."}),(0,t.jsx)(j.Alert,{message:"Why do agents need keys?",description:"Keys scope access to an agent and allow it to call MCP tools. Assign a key when creating an agent or from the Virtual Keys page.",type:"info",showIcon:!0,className:"mb-3"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-4",children:[O&&(0,t.jsx)(n.Button,{onClick:()=>{P&&D(null),C(!0)},disabled:!e,children:"+ Add New Agent"}),(0,t.jsx)(f.Tooltip,{title:"When enabled, only agents with reachable URLs are shown",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(v.CheckCircleOutlined,{className:z?"text-green-500":"text-gray-400"}),(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"Health Check"}),(0,t.jsx)(_.Switch,{size:"small",checked:z,onChange:e=>{E(e),R(e)},loading:T&&z})]})})]})]}),P?(0,t.jsx)(ez,{agentId:P,onClose:()=>D(null),accessToken:e,isAdmin:O}):(0,t.jsx)(o.Card,{children:T?(0,t.jsx)(b.Skeleton,{active:!0,paragraph:{rows:3}}):(0,t.jsxs)(d.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Agent Name"}),(0,t.jsx)(p.TableHeaderCell,{children:"Agent ID"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend (USD)"}),(0,t.jsx)(p.TableHeaderCell,{children:"Model"}),(0,t.jsx)(p.TableHeaderCell,{children:"Created"}),(0,t.jsx)(p.TableHeaderCell,{children:"Status"}),O&&(0,t.jsx)(p.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(c.TableBody,{children:0===q.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:U,children:(0,t.jsx)(g.Text,{className:"text-center",children:'No agents found. Click "+ Add New Agent" to create one.'})})}):q.map(e=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:e.agent_name})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(f.Tooltip,{title:e.agent_id,children:(0,t.jsxs)(n.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>D(e.agent_id),children:[e.agent_id.slice(0,7),"..."]})})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:(0,eO.formatNumberWithCommas)(e.spend,4)})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(h.Badge,{size:"xs",color:"blue",children:e.litellm_params?.model||"N/A"})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"})}),(0,t.jsx)(m.TableCell,{children:k[e.agent_id]?.has_key?(0,t.jsx)(h.Badge,{color:"green",children:"Active"}):(0,t.jsx)(h.Badge,{color:"yellow",children:"Needs Setup"})}),O&&(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(eR.default,{variant:"Delete",onClick:()=>{M({id:e.agent_id,name:e.agent_name})}})})]},e.agent_id))})]})}),(0,t.jsx)(ev,{visible:S,onClose:()=>{C(!1)},accessToken:e,onSuccess:()=>{R()},teams:a}),L&&(0,t.jsxs)(y.Modal,{title:"Delete Agent",open:null!==L,onOk:$,onCancel:()=>{M(null)},confirmLoading:F,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete agent: ",L.name,"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var e$=e.i(646050),eq=e.i(559061),eU=e.i(704308),eV=e.i(785242),eH=e.i(936578),eG=e.i(677667),eK=e.i(898667),eW=e.i(130643),eQ=e.i(779241),eY=e.i(752978),eJ=e.i(68155),eX=e.i(591935);let eZ=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))});var e0=e.i(836991);function e1({data:e,columns:s,isLoading:a=!1,loadingMessage:l="Loading...",emptyMessage:r="No data",getRowKey:i}){return(0,t.jsxs)(d.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsx)(x.TableRow,{children:s.map((e,s)=>(0,t.jsx)(p.TableHeaderCell,{style:{width:e.width},children:e.header},s))})}),(0,t.jsx)(c.TableBody,{children:a?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:s.length,className:"text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:l})})}):e.length>0?e.map((e,a)=>(0,t.jsx)(x.TableRow,{children:s.map((s,a)=>(0,t.jsx)(m.TableCell,{children:s.cell?s.cell(e):String(e[s.accessor]??"")},a))},i?i(e,a):a)):(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:s.length,className:"text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:r})})})})]})}var e2=e.i(916925);let e4=e=>{let t=Object.keys(e2.provider_map).find(t=>e2.provider_map[t]===e);if(t){let e=e2.Providers[t],s=e2.providerLogoMap[e];return{displayName:e,logo:s,enumKey:t}}return{displayName:e,logo:"",enumKey:null}},e5=e=>e2.provider_map[e]||null,e6=(e,t)=>{let s=e.target,a=s.parentElement;if(a){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=t.charAt(0),a.replaceChild(e,s)}},e3=({discountConfig:e,onDiscountChange:s,onRemoveProvider:a})=>{let[l,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(""),d=e=>{let t=parseFloat(n);!isNaN(t)&&t>=0&&t<=100&&s(e,(t/100).toString()),r(null),o("")},c=()=>{r(null),o("")},m=Object.entries(e).map(([e,t])=>({provider:e,discount:t})).sort((e,t)=>{let s=e4(e.provider).displayName,a=e4(t.provider).displayName;return s.localeCompare(a)});return(0,t.jsx)(e1,{data:m,columns:[{header:"Provider",cell:e=>{let{displayName:s,logo:a}=e4(e.provider);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,s)}),(0,t.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Discount Percentage",cell:e=>(0,t.jsx)("div",{className:"flex items-center gap-2",children:l===e.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eQ.TextInput,{value:n,onValueChange:o,onKeyDown:t=>{var s;return s=e.provider,void("Enter"===t.key?d(s):"Escape"===t.key&&c())},placeholder:"5",className:"w-20",autoFocus:!0}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"}),(0,t.jsx)(eY.Icon,{icon:eZ,size:"sm",onClick:()=>d(e.provider),className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,t.jsx)(eY.Icon,{icon:e0.XIcon,size:"sm",onClick:c,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(g.Text,{className:"font-medium",children:[(100*e.discount).toFixed(1),"%"]}),(0,t.jsx)(eY.Icon,{icon:eX.PencilAltIcon,size:"sm",onClick:()=>{var t,s;return t=e.provider,s=e.discount,void(r(t),o((100*s).toString()))},className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"250px"},{header:"Actions",cell:e=>{let{displayName:s}=e4(e.provider);return(0,t.jsx)(eY.Icon,{icon:eJ.TrashIcon,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider discounts configured"})},e8=({discountConfig:e,selectedProvider:s,newDiscount:a,onProviderChange:l,onDiscountChange:r,onAddProvider:i})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,t.jsx)(f.Tooltip,{title:"Select the LLM provider you want to configure a discount for",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Select provider",value:s,onChange:l,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),children:Object.entries(e2.Providers).map(([s,a])=>{let l=e2.provider_map[s];return l&&e[l]?null:(0,t.jsx)(N.Select.Option,{value:s,label:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:e2.providerLogoMap[a],alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,a)}),(0,t.jsx)("span",{children:a})]})},s)})})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Discount Percentage",(0,t.jsx)(f.Tooltip,{title:"Enter a percentage value (e.g., 5 for 5% discount)",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a discount percentage"}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{placeholder:"5",value:a,onValueChange:r,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,t.jsx)(n.Button,{variant:"primary",onClick:i,disabled:!s||!a,children:"Add Provider Discount"})})]}),e7=({marginConfig:e,onMarginChange:s,onRemoveProvider:a})=>{let[l,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(""),[d,c]=(0,i.useState)(""),m=()=>{r(null),o(""),c("")},u=Object.entries(e).map(([e,t])=>({provider:e,margin:t})).sort((e,t)=>{if("global"===e.provider)return -1;if("global"===t.provider)return 1;let s=e4(e.provider).displayName,a=e4(t.provider).displayName;return s.localeCompare(a)});return(0,t.jsx)(e1,{data:u,columns:[{header:"Provider",cell:e=>{if("global"===e.provider)return(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsx)("span",{className:"font-medium",children:"Global (All Providers)"})});let{displayName:s,logo:a}=e4(e.provider);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,s)}),(0,t.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Margin",cell:e=>(0,t.jsx)("div",{className:"flex items-center gap-2",children:l===e.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{value:n,onValueChange:o,placeholder:"10",className:"w-20",autoFocus:!0}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"}),(0,t.jsx)("span",{className:"text-gray-400",children:"+"}),(0,t.jsx)("span",{className:"text-gray-600",children:"$"}),(0,t.jsx)(eQ.TextInput,{value:d,onValueChange:c,placeholder:"0.001",className:"w-24"})]}),(0,t.jsx)(eY.Icon,{icon:eZ,size:"sm",onClick:()=>{var t;let a,l;return t=e.provider,a=n?parseFloat(n):void 0,l=d?parseFloat(d):void 0,void(void 0!==a&&!isNaN(a)&&a>=0&&a<=1e3?void 0!==l&&!isNaN(l)&&l>=0?s(t,{percentage:a/100,fixed_amount:l}):s(t,a/100):void 0!==l&&!isNaN(l)&&l>=0&&s(t,{fixed_amount:l}),r(null),o(""),c(""))},className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,t.jsx)(eY.Icon,{icon:e0.XIcon,size:"sm",onClick:m,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Text,{className:"font-medium",children:(e=>{if("number"==typeof e)return`${(100*e).toFixed(1)}%`;let t=[];return void 0!==e.percentage&&t.push(`${(100*e.percentage).toFixed(1)}%`),void 0!==e.fixed_amount&&t.push(`$${e.fixed_amount.toFixed(6)}`),t.join(" + ")||"0%"})(e.margin)}),(0,t.jsx)(eY.Icon,{icon:eX.PencilAltIcon,size:"sm",onClick:()=>{var t,s;return t=e.provider,s=e.margin,void(r(t),"number"==typeof s?(o((100*s).toString()),c("")):(o(s.percentage?(100*s.percentage).toString():""),c(s.fixed_amount?s.fixed_amount.toString():"")))},className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"350px"},{header:"Actions",cell:e=>{let s="global"===e.provider?"Global":e4(e.provider).displayName;return(0,t.jsx)(eY.Icon,{icon:eJ.TrashIcon,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider margins configured"})},e9=({marginConfig:e,selectedProvider:s,marginType:a,percentageValue:l,fixedAmountValue:r,onProviderChange:i,onMarginTypeChange:o,onPercentageChange:d,onFixedAmountChange:c,onAddProvider:m})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,t.jsx)(f.Tooltip,{title:"Select 'Global' to apply margin to all providers, or select a specific provider",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,t.jsxs)(N.Select,{showSearch:!0,placeholder:"Select provider or 'Global'",value:s,onChange:i,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),children:[(0,t.jsx)(N.Select.Option,{value:"global",label:"Global (All Providers)",children:(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsx)("span",{className:"font-medium",children:"Global (All Providers)"})})},"global"),Object.entries(e2.Providers).map(([s,a])=>{let l=e2.provider_map[s];return l&&e[l]?null:(0,t.jsx)(N.Select.Option,{value:s,label:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:e2.providerLogoMap[a],alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,a)}),(0,t.jsx)("span",{children:a})]})},s)})]})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Margin Type",(0,t.jsx)(f.Tooltip,{title:"Choose how to apply the margin: percentage-based or fixed amount",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a margin type"}],children:(0,t.jsxs)(T.Radio.Group,{value:a,onChange:e=>o(e.target.value),className:"w-full",children:[(0,t.jsx)(T.Radio,{value:"percentage",children:"Percentage-based"}),(0,t.jsx)(T.Radio,{value:"fixed",children:"Fixed Amount"})]})}),"percentage"===a&&(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Margin Percentage",(0,t.jsx)(f.Tooltip,{title:"Enter a percentage value (e.g., 10 for 10% margin)",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a margin percentage"},{validator:(e,t)=>{if(!t)return Promise.reject(Error("Please enter a margin percentage"));let s=parseFloat(t);return isNaN(s)||s<0||s>1e3?Promise.reject(Error("Percentage must be between 0 and 1000")):Promise.resolve()}}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{placeholder:"10",value:l,onValueChange:d,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"})]})}),"fixed"===a&&(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Fixed Margin Amount",(0,t.jsx)(f.Tooltip,{title:"Enter a fixed amount in USD (e.g., 0.001 for $0.001 per request)",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a fixed amount"},{validator:(e,t)=>{if(!t)return Promise.reject(Error("Please enter a fixed amount"));let s=parseFloat(t);return isNaN(s)||s<0?Promise.reject(Error("Fixed amount must be non-negative")):Promise.resolve()}}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"$"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.001",value:r,onValueChange:c,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,t.jsx)(n.Button,{variant:"primary",onClick:m,disabled:!s||"percentage"===a&&!l||"fixed"===a&&!r,children:"Add Provider Margin"})})]});var te=e.i(291542),tt=e.i(955135),ts=e.i(175712);e.i(247167),e.i(62664);var ta=e.i(697539),tl=e.i(963188),tr=e.i(763731),ti=e.i(343794),tn=e.i(244009),to=e.i(242064),td=e.i(185793);let tc=e=>{let t,{value:s,formatter:a,precision:l,decimalSeparator:r,groupSeparator:n="",prefixCls:o}=e;if("function"==typeof a)t=a(s);else{let e=String(s),a=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(a&&"-"!==e){let e=a[1],s=a[2]||"0",d=a[4]||"";s=s.replace(/\B(?=(\d{3})+(?!\d))/g,n),"number"==typeof l&&(d=d.padEnd(l,"0").slice(0,l>0?l:0)),d&&(d=`${r}${d}`),t=[i.createElement("span",{key:"int",className:`${o}-content-value-int`},e,s),d&&i.createElement("span",{key:"decimal",className:`${o}-content-value-decimal`},d)]}else t=e}return i.createElement("span",{className:`${o}-content-value`},t)};var tm=e.i(183293),tu=e.i(246422),tp=e.i(838378);let tx=(0,tu.genStyleHooks)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:s,padding:a,colorTextDescription:l,titleFontSize:r,colorTextHeading:i,contentFontSize:n,fontFamily:o}=e;return{[t]:Object.assign(Object.assign({},(0,tm.resetComponent)(e)),{[`${t}-title`]:{marginBottom:s,color:l,fontSize:r},[`${t}-skeleton`]:{paddingTop:a},[`${t}-content`]:{color:i,fontSize:n,fontFamily:o,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:s},[`${t}-content-suffix`]:{marginInlineStart:s}}})}})((0,tp.mergeToken)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:s}=e;return{titleFontSize:s,contentFontSize:t}});var th=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[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])&&(s[a[l]]=e[a[l]]);return s};let tg=i.forwardRef((e,t)=>{let{prefixCls:s,className:a,rootClassName:l,style:r,valueStyle:n,value:o=0,title:d,valueRender:c,prefix:m,suffix:u,loading:p=!1,formatter:x,precision:h,decimalSeparator:g=".",groupSeparator:y=",",onMouseEnter:j,onMouseLeave:f}=e,b=th(e,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:_,direction:v,className:w,style:k}=(0,to.useComponentConfig)("statistic"),N=_("statistic",s),[S,C,T]=tx(N),I=i.createElement(tc,{decimalSeparator:g,groupSeparator:y,prefixCls:N,formatter:x,precision:h,value:o}),F=(0,ti.default)(N,{[`${N}-rtl`]:"rtl"===v},w,a,l,C,T),A=i.useRef(null);i.useImperativeHandle(t,()=>({nativeElement:A.current}));let L=(0,tn.default)(b,{aria:!0,data:!0});return S(i.createElement("div",Object.assign({},L,{ref:A,className:F,style:Object.assign(Object.assign({},k),r),onMouseEnter:j,onMouseLeave:f}),d&&i.createElement("div",{className:`${N}-title`},d),i.createElement(td.default,{paragraph:!1,loading:p,className:`${N}-skeleton`,active:!0},i.createElement("div",{style:n,className:`${N}-content`},m&&i.createElement("span",{className:`${N}-content-prefix`},m),c?c(I):I,u&&i.createElement("span",{className:`${N}-content-suffix`},u)))))}),ty=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];var tj=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[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])&&(s[a[l]]=e[a[l]]);return s};let tf=e=>{let{value:t,format:s="HH:mm:ss",onChange:a,onFinish:l,type:r}=e,n=tj(e,["value","format","onChange","onFinish","type"]),o="countdown"===r,[d,c]=i.useState(null),m=(0,ta.useEvent)(()=>{let e=Date.now(),s=new Date(t).getTime();return c({}),null==a||a(o?s-e:e-s),!o||!(s{let e,t=()=>{e=(0,tl.default)(()=>{m()&&t()})};return t(),()=>tl.default.cancel(e)},[t,o]),i.useEffect(()=>{c({})},[]),i.createElement(tg,Object.assign({},n,{value:t,valueRender:e=>(0,tr.cloneElement)(e,{title:void 0}),formatter:(e,t)=>d?function(e,t,s){let a,l,r,i,n,o,{format:d=""}=t,c=new Date(e).getTime(),m=Date.now();return a=s?Math.max(c-m,0):Math.max(m-c,0),l=/\[[^\]]*]/g,r=(d.match(l)||[]).map(e=>e.slice(1,-1)),i=d.replace(l,"[]"),n=ty.reduce((e,[t,s])=>{if(e.includes(t)){let l=Math.floor(a/s);return a-=l*s,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return l.toString().padStart(t,"0")})}return e},i),o=0,n.replace(l,()=>{let e=r[o];return o+=1,e})}(e,Object.assign(Object.assign({},t),{format:s}),o):"-"}))},tb=i.memo(e=>i.createElement(tf,Object.assign({},e,{type:"countdown"})));tg.Timer=tf,tg.Countdown=tb;var t_=e.i(621192),tv=e.i(178654),tw=e.i(56456),tk=e.i(755151),tN=e.i(240647),tS=e.i(737434),tC=e.i(91500),tT=e.i(931067);let tI={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 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"}}]},name:"file-excel",theme:"outlined"};var tF=e.i(9583),tA=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:tI}))});let tL=e=>null==e?"-":0===e?"$0.00":e<.01?`$${e.toFixed(6)}`:e<1?`$${e.toFixed(4)}`:`$${(0,eO.formatNumberWithCommas)(e,2)}`,tM=e=>null==e?"-":(0,eO.formatNumberWithCommas)(e,0),tP=({multiResult:e})=>{let[s,a]=(0,i.useState)(!1),l=(0,i.useRef)(null),r=e.entries.some(e=>null!==e.result);return((0,i.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&a(!1)};return s&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[s]),r)?(0,t.jsxs)("div",{className:"relative inline-block",ref:l,children:[(0,t.jsx)(n.Button,{size:"xs",variant:"secondary",icon:tS.DownloadOutlined,onClick:()=>a(!s),children:"Export"}),s&&(0,t.jsxs)("div",{className:"absolute right-0 mt-1 w-44 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:[(0,t.jsxs)("button",{className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>{(e=>{let t=window.open("","_blank");if(!t)return alert("Please allow popups to export PDF");let s=e.entries.filter(e=>null!==e.result),a=s.length,l=` + + + + Multi-Model Cost Estimate Report + + + +

LLM Cost Estimate Report

+

${a} model${1!==a?"s":""} configured

+ +
+

Combined Totals

+
+
+
Total Per Request
+
${tL(e.totals.cost_per_request)}
+
+
+
Total Daily
+
${tL(e.totals.daily_cost)}
+
+
+
Total Monthly
+
${tL(e.totals.monthly_cost)}
+
+
+ ${e.totals.margin_per_request>0?` +
+
+
Margin/Request
+
${tL(e.totals.margin_per_request)}
+
+
+
Daily Margin
+
${tL(e.totals.daily_margin)}
+
+
+
Monthly Margin
+
${tL(e.totals.monthly_margin)}
+
+
+ `:""} +
+ +

Model Breakdown

+ ${s.map(e=>{let t;return t=e.result,` +
+

${t.model} ${t.provider?`(${t.provider})`:""}

+ +
+

Input Tokens per Request: ${tM(t.input_tokens)}

+

Output Tokens per Request: ${tM(t.output_tokens)}

+ ${t.num_requests_per_day?`

Requests per Day: ${tM(t.num_requests_per_day)}

`:""} + ${t.num_requests_per_month?`

Requests per Month: ${tM(t.num_requests_per_month)}

`:""} +
+ + + + + + ${null!==t.daily_cost?"":""} + ${null!==t.monthly_cost?"":""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + + + + + ${null!==t.daily_cost?``:""} + ${null!==t.monthly_cost?``:""} + +
Cost TypePer RequestDailyMonthly
Input Cost${tL(t.input_cost_per_request)}${tL(t.daily_input_cost)}${tL(t.monthly_input_cost)}
Output Cost${tL(t.output_cost_per_request)}${tL(t.daily_output_cost)}${tL(t.monthly_output_cost)}
Margin/Fee${tL(t.margin_cost_per_request)}${tL(t.daily_margin_cost)}${tL(t.monthly_margin_cost)}
Total${tL(t.cost_per_request)}${tL(t.daily_cost)}${tL(t.monthly_cost)}
+
+ `}).join("")} + + + + + `;t.document.write(l),t.document.close(),t.onload=()=>{t.print()}})(e),a(!1)},children:[(0,t.jsx)(tC.FilePdfOutlined,{className:"mr-3 text-red-500"}),"Export as PDF"]}),(0,t.jsxs)("button",{className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>{(e=>{let t=e.entries.filter(e=>null!==e.result),s=[["LLM Multi-Model Cost Estimate Report"],["Generated",new Date().toLocaleString()],[""]];for(let a of(s.push(["COMBINED TOTALS"],["Total Per Request",e.totals.cost_per_request.toString()],["Total Daily",e.totals.daily_cost?.toString()||"-"],["Total Monthly",e.totals.monthly_cost?.toString()||"-"],["Margin Per Request",e.totals.margin_per_request.toString()],["Daily Margin",e.totals.daily_margin?.toString()||"-"],["Monthly Margin",e.totals.monthly_margin?.toString()||"-"],[""]),s.push(["Model","Provider","Input Tokens","Output Tokens","Requests/Day","Requests/Month","Cost/Request","Daily Cost","Monthly Cost","Input Cost/Req","Output Cost/Req","Margin/Req"]),t)){let e=a.result;s.push([e.model,e.provider||"-",e.input_tokens.toString(),e.output_tokens.toString(),e.num_requests_per_day?.toString()||"-",e.num_requests_per_month?.toString()||"-",e.cost_per_request.toString(),e.daily_cost?.toString()||"-",e.monthly_cost?.toString()||"-",e.input_cost_per_request.toString(),e.output_cost_per_request.toString(),e.margin_cost_per_request.toString()])}let a=new Blob([s.map(e=>e.map(e=>`"${e}"`).join(",")).join("\n")],{type:"text/csv;charset=utf-8;"}),l=window.URL.createObjectURL(a),r=document.createElement("a");r.href=l,r.download=`cost_estimate_multi_model_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(l)})(e),a(!1)},children:[(0,t.jsx)(tA,{className:"mr-3 text-green-600"}),"Export as CSV"]})]})]}):null},tD=e=>null==e?"-":0===e?"$0":e<1e-4?`$${e.toExponential(2)}`:e<1?`$${e.toFixed(4)}`:`$${(0,eO.formatNumberWithCommas)(e,2,!0)}`,tz=({result:e,loading:s,timePeriod:a})=>{let l="day"===a?"Daily":"Monthly",r="day"===a?e.daily_cost:e.monthly_cost,i="day"===a?e.daily_input_cost:e.monthly_input_cost,n="day"===a?e.daily_output_cost:e.monthly_output_cost,o="day"===a?e.daily_margin_cost:e.monthly_margin_cost,d="day"===a?e.num_requests_per_day:e.num_requests_per_month;return(0,t.jsxs)("div",{className:"space-y-3 bg-gray-50 p-4 rounded-lg",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-500 text-sm",children:[(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}),(0,t.jsx)("span",{children:"Updating..."})]}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Total/Request"}),(0,t.jsx)(g.Text,{className:"text-base font-semibold text-blue-600",children:tD(e.cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Input Cost"}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(e.input_cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Output Cost"}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(e.output_cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Margin Fee"}),(0,t.jsx)(g.Text,{className:`text-sm ${e.margin_cost_per_request>0?"text-amber-600":""}`,children:tD(e.margin_cost_per_request)})]})]}),null!==r&&(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 pt-2 border-t border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Total (",null==d?"-":(0,eO.formatNumberWithCommas)(d,0,!0)," req)"]}),(0,t.jsx)(g.Text,{className:`text-base font-semibold ${"day"===a?"text-green-600":"text-purple-600"}`,children:tD(r)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Input"]}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(i)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Output"]}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(n)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Margin Fee"]}),(0,t.jsx)(g.Text,{className:`text-sm ${(o??0)>0?"text-amber-600":""}`,children:tD(o)})]})]}),(e.input_cost_per_token||e.output_cost_per_token)&&(0,t.jsxs)("div",{className:"text-xs text-gray-400 pt-2 border-t border-gray-200",children:["Token Pricing: "," ",e.input_cost_per_token&&(0,t.jsxs)("span",{children:["Input $",(0,eO.formatNumberWithCommas)(1e6*e.input_cost_per_token,2),"/1M"]}),e.input_cost_per_token&&e.output_cost_per_token&&" | ",e.output_cost_per_token&&(0,t.jsxs)("span",{children:["Output $",(0,eO.formatNumberWithCommas)(1e6*e.output_cost_per_token,2),"/1M"]})]})]})},tE=({multiResult:e,timePeriod:s})=>{let[a,l]=(0,i.useState)(new Set),r=e.entries.filter(e=>null!==e.result),o=e.entries.filter(e=>e.loading),d=e.entries.filter(e=>null!==e.error),c=r.length>0,m=o.length>0,u=d.length>0;if(!c&&!m&&!u)return(0,t.jsx)("div",{className:"py-6 text-center border border-dashed border-gray-300 rounded-lg bg-gray-50",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Select models above to see cost estimates"})});if(!c&&m&&!u)return(0,t.jsxs)("div",{className:"py-6 text-center",children:[(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0})}),(0,t.jsx)(g.Text,{className:"text-gray-500 block mt-2",children:"Calculating costs..."})]});if(!c&&u)return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-base font-semibold text-gray-900",children:"Cost Estimates"}),m&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})]}),d.map(e=>(0,t.jsxs)("div",{className:"text-sm text-red-600 bg-red-50 p-3 rounded-lg border border-red-200",children:[(0,t.jsxs)("span",{className:"font-medium",children:[e.entry.model||"Unknown model",": "]}),e.error]},e.entry.id))]});let p=e.totals.margin_per_request>0,x="day"===s?"Daily":"Monthly",h=[{title:"Model",dataIndex:"model",key:"model",render:(e,s)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e}),s.provider&&(0,t.jsx)(I.Tag,{color:"blue",className:"text-xs",children:s.provider}),s.loading&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})]}),s.error&&(0,t.jsxs)("div",{className:"text-xs text-red-600 bg-red-50 px-2 py-1 rounded",children:["⚠️ ",s.error]}),s.hasZeroCost&&!s.error&&(0,t.jsx)("div",{className:"text-xs text-amber-600 bg-amber-50 px-2 py-1 rounded",children:"⚠️ No pricing data found for this model. Set base_model in config."})]})},{title:"Per Request",dataIndex:"cost_per_request",key:"cost_per_request",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:"font-mono text-sm",children:tD(e)})},{title:"Margin Fee",dataIndex:"margin_cost_per_request",key:"margin_cost_per_request",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:`font-mono text-sm ${(e??0)>0?"text-amber-600":"text-gray-400"}`,children:tD(e)})},{title:x,dataIndex:"day"===s?"daily_cost":"monthly_cost",key:"period_cost",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:"font-mono text-sm",children:tD(e)})},{title:"",key:"expand",width:40,render:(e,s)=>s.error?null:(0,t.jsx)(n.Button,{size:"xs",variant:"light",onClick:()=>{var e;return e=s.id,void l(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},className:"text-gray-400 hover:text-gray-600",children:a.has(s.id)?(0,t.jsx)(tk.DownOutlined,{}):(0,t.jsx)(tN.RightOutlined,{})})}],y=e.entries.filter(e=>e.entry.model).map(e=>({key:e.entry.id,id:e.entry.id,model:e.result?.model||e.entry.model,provider:e.result?.provider,cost_per_request:e.result?.cost_per_request??null,margin_cost_per_request:e.result?.margin_cost_per_request??null,daily_cost:e.result?.daily_cost??null,monthly_cost:e.result?.monthly_cost??null,error:e.error,loading:e.loading,hasZeroCost:e.result&&0===e.result.cost_per_request}));return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-base font-semibold text-gray-900",children:"Cost Estimates"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[m&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}),(0,t.jsx)(tP,{multiResult:e})]})]}),(0,t.jsxs)(ts.Card,{size:"small",className:"bg-gradient-to-r from-slate-50 to-blue-50 border-slate-200",children:[(0,t.jsxs)(t_.Row,{gutter:[16,8],children:[(0,t.jsx)(tv.Col,{xs:24,sm:12,children:(0,t.jsx)(tg,{title:(0,t.jsx)("span",{className:"text-xs",children:"Total Per Request"}),value:tD(e.totals.cost_per_request),valueStyle:{color:"#1890ff",fontSize:"18px",fontFamily:"monospace"}})}),(0,t.jsx)(tv.Col,{xs:24,sm:12,children:(0,t.jsx)(tg,{title:(0,t.jsxs)("span",{className:"text-xs",children:["Total ",x]}),value:tD("day"===s?e.totals.daily_cost:e.totals.monthly_cost),valueStyle:{color:"day"===s?"#52c41a":"#722ed1",fontSize:"18px",fontFamily:"monospace"}})})]}),p&&(0,t.jsxs)(t_.Row,{gutter:[16,8],className:"mt-3 pt-3 border-t border-slate-200",children:[(0,t.jsxs)(tv.Col,{xs:24,sm:12,children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Margin Fee/Request"}),(0,t.jsx)("div",{className:"text-sm font-mono text-amber-600",children:tD(e.totals.margin_per_request)})]}),(0,t.jsxs)(tv.Col,{xs:24,sm:12,children:[(0,t.jsxs)("div",{className:"text-xs text-gray-500",children:[x," Margin Fee"]}),(0,t.jsx)("div",{className:"text-sm font-mono text-amber-600",children:tD("day"===s?e.totals.daily_margin:e.totals.monthly_margin)})]})]})]}),y.length>0&&(0,t.jsx)(te.Table,{columns:h,dataSource:y,pagination:!1,size:"small",className:"border border-gray-200 rounded-lg",expandable:{expandedRowKeys:Array.from(a),expandedRowRender:e=>{let a=r.find(t=>t.entry.id===e.id);return a?.result?(0,t.jsx)("div",{className:"py-2",children:(0,t.jsx)(tz,{result:a.result,loading:a.loading,timePeriod:s})}):null},showExpandColumn:!1}})]})},tO=()=>({id:`entry-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,model:"",input_tokens:1e3,output_tokens:500,num_requests_per_day:void 0,num_requests_per_month:void 0}),tR=({accessToken:e,models:s})=>{let[a,l]=(0,i.useState)([tO()]),[r,n]=(0,i.useState)("month"),{debouncedFetchForEntry:o,removeEntry:d,getMultiModelResult:c}=function(e){let[t,s]=(0,i.useState)(new Map),a=(0,i.useRef)(new Map),l=(0,i.useCallback)(async t=>{if(!e||!t.model)return void s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:null}),s});s(e=>{let s=new Map(e),a=s.get(t.id);return s.set(t.id,{entry:t,result:a?.result??null,loading:!0,error:null}),s});try{let a=(0,w.getProxyBaseUrl)(),l=a?`${a}/cost/estimate`:"/cost/estimate",r={model:t.model,input_tokens:t.input_tokens||0,output_tokens:t.output_tokens||0,num_requests_per_day:t.num_requests_per_day||null,num_requests_per_month:t.num_requests_per_month||null},i=await fetch(l,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(i.ok){let e=await i.json();s(s=>{let a=new Map(s);return a.set(t.id,{entry:t,result:e,loading:!1,error:null}),a})}else{let e=await i.json(),a=e.detail?.error||e.detail||"Failed to estimate cost";s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:a}),s})}}catch(e){console.error("Error estimating cost:",e),s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:"Network error"}),s})}},[e]),r=(0,i.useCallback)(e=>{let t=a.current.get(e.id);t&&clearTimeout(t);let s=setTimeout(()=>{l(e)},500);a.current.set(e.id,s)},[l]),n=(0,i.useCallback)(e=>{let t=a.current.get(e);t&&(clearTimeout(t),a.current.delete(e)),s(t=>{let s=new Map(t);return s.delete(e),s})},[]);return(0,i.useEffect)(()=>{let e=a.current;return()=>{e.forEach(e=>clearTimeout(e)),e.clear()}},[]),{debouncedFetchForEntry:r,removeEntry:n,getMultiModelResult:(0,i.useCallback)(e=>{let s=e.map(e=>{let s=t.get(e.id);return{entry:e,result:s?.result??null,loading:s?.loading??!1,error:s?.error??null}}),a=0,l=null,r=null,i=0,n=null,o=null;for(let e of s)e.result&&(a+=e.result.cost_per_request,i+=e.result.margin_cost_per_request,null!==e.result.daily_cost&&(l=(l??0)+e.result.daily_cost),null!==e.result.daily_margin_cost&&(n=(n??0)+e.result.daily_margin_cost),null!==e.result.monthly_cost&&(r=(r??0)+e.result.monthly_cost),null!==e.result.monthly_margin_cost&&(o=(o??0)+e.result.monthly_margin_cost));return{entries:s,totals:{cost_per_request:a,daily_cost:l,monthly_cost:r,margin_per_request:i,daily_margin:n,monthly_margin:o}}},[t])}}(e),m=(0,i.useCallback)((e,t,s)=>{l(a=>{let l=a.map(a=>a.id===e?{...a,[t]:s}:a),r=l.find(t=>t.id===e);return r&&r.model&&o(r),l})},[o]),u=(0,i.useCallback)(e=>{n(e),l(t=>t.map(t=>({...t,num_requests_per_day:"day"===e?t.num_requests_per_day:void 0,num_requests_per_month:"month"===e?t.num_requests_per_month:void 0})))},[]),p=(0,i.useCallback)(()=>{l(e=>[...e,tO()])},[]),x=(0,i.useCallback)(e=>{l(t=>t.filter(t=>t.id!==e)),d(e)},[d]),h=c(a),g=[{title:"Model",dataIndex:"model",key:"model",width:"35%",render:(e,a)=>(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Select a model",value:a.model||void 0,onChange:e=>m(a.id,"model",e),optionFilterProp:"label",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:s.map(e=>({value:e,label:e})),style:{width:"100%"},size:"small"})},{title:"Input Tokens",dataIndex:"input_tokens",key:"input_tokens",width:"18%",render:(e,s)=>(0,t.jsx)(A.InputNumber,{min:0,value:s.input_tokens,onChange:e=>m(s.id,"input_tokens",e??0),style:{width:"100%"},size:"small",formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")})},{title:"Output Tokens",dataIndex:"output_tokens",key:"output_tokens",width:"18%",render:(e,s)=>(0,t.jsx)(A.InputNumber,{min:0,value:s.output_tokens,onChange:e=>m(s.id,"output_tokens",e??0),style:{width:"100%"},size:"small",formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")})},{title:`Requests/${"day"===r?"Day":"Month"}`,dataIndex:"day"===r?"num_requests_per_day":"num_requests_per_month",key:"num_requests",width:"20%",render:(e,s)=>(0,t.jsx)(A.InputNumber,{min:0,value:"day"===r?s.num_requests_per_day:s.num_requests_per_month,onChange:e=>m(s.id,"day"===r?"num_requests_per_day":"num_requests_per_month",e??void 0),style:{width:"100%"},size:"small",placeholder:"-",formatter:e=>e?`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,","):""})},{title:"",key:"actions",width:50,render:(e,s)=>(0,t.jsx)(V.Button,{type:"text",icon:(0,t.jsx)(tt.DeleteOutlined,{}),onClick:()=>x(s.id),disabled:1===a.length,danger:!0,size:"small"})}];return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-2",children:(0,t.jsxs)(T.Radio.Group,{value:r,onChange:e=>u(e.target.value),size:"small",optionType:"button",buttonStyle:"solid",children:[(0,t.jsx)(T.Radio.Button,{value:"day",children:"Per Day"}),(0,t.jsx)(T.Radio.Button,{value:"month",children:"Per Month"})]})}),(0,t.jsx)(te.Table,{columns:g,dataSource:a,rowKey:"id",pagination:!1,size:"small",footer:()=>(0,t.jsx)(V.Button,{type:"dashed",onClick:p,icon:(0,t.jsx)(H.PlusOutlined,{}),className:"w-full",children:"Add Another Model"})}),(0,t.jsx)(tE,{multiResult:h,timePeriod:r})]})};var tB=e.i(270377),t$=e.i(778917),tq=e.i(664659);let tU=({items:e,children:s="Docs",className:a=""})=>{let[l,r]=(0,i.useState)(!1),n=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=e=>{n.current&&!n.current.contains(e.target)&&r(!1)};return l&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l]),(0,t.jsxs)("div",{className:`relative inline-block ${a}`,ref:n,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>r(!l),className:"inline-flex items-center gap-1 text-gray-500 hover:text-gray-700 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded px-2 py-1","aria-expanded":l,"aria-haspopup":"true",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)(tq.ChevronDown,{className:`h-3 w-3 transition-transform ${l?"rotate-180":""}`,"aria-hidden":"true"})]}),l&&(0,t.jsx)("div",{className:"absolute right-0 mt-1 w-56 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:e.map((e,s)=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>r(!1),children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)(t$.ExternalLink,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 ml-2","aria-hidden":"true"})]},s))})]})};var tV=e.i(673709);let tH=()=>{let[e,s]=(0,i.useState)(""),[a,l]=(0,i.useState)(""),r=(0,i.useMemo)(()=>{let t=parseFloat(e),s=parseFloat(a);if(isNaN(t)||isNaN(s)||0===t||0===s)return null;let l=t+s,r=s/l*100;return{originalCost:l.toFixed(10),finalCost:t.toFixed(10),discountAmount:s.toFixed(10),discountPercentage:r.toFixed(2)}},[e,a]);return(0,t.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Cost Calculation"}),(0,t.jsxs)(g.Text,{className:"text-xs text-gray-600",children:["Discounts are applied to provider costs: ",(0,t.jsx)("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-xs",children:"final_cost = base_cost × (1 - discount%/100)"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Example"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"A 5% discount on a $10.00 request results in: $10.00 × (1 - 0.05) = $9.50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Valid Range"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Discount percentages must be between 0% and 100%"})]}),(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-2",children:"Validating Discounts"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mb-3",children:"Make a test request and check the response headers to verify discounts are applied:"}),(0,t.jsx)(tV.default,{language:"bash",code:`curl -X POST -i http://your-proxy:4000/chat/completions \\ + -H "Content-Type: application/json" \\ + -H "Authorization: Bearer sk-1234" \\ + -d '{ + "model": "gemini/gemini-2.5-pro", + "messages": [{"role": "user", "content": "Hello"}] + }'`}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mt-3 mb-2",children:"Look for these headers in the response:"}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Final cost after discount"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-original"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Original cost before discount"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-discount-amount"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Amount discounted"})]})]})]}),(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-3",children:"Discount Calculator"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mb-3",children:"Enter values from your response headers to verify the discount:"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Response Cost (x-litellm-response-cost)"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.0171938125",value:e,onValueChange:s,className:"text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Discount Amount (x-litellm-response-cost-discount-amount)"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.0009049375",value:a,onValueChange:l,className:"text-sm"})]})]}),r&&(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,t.jsx)(g.Text,{className:"text-sm font-medium text-blue-900 mb-2",children:"Calculated Results"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Original Cost:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.originalCost]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Final Cost:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.finalCost]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Discount Amount:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.discountAmount]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-blue-300",children:[(0,t.jsx)(g.Text,{className:"text-xs font-semibold text-blue-900",children:"Discount Applied:"}),(0,t.jsxs)(g.Text,{className:"text-sm font-bold text-blue-900",children:[r.discountPercentage,"%"]})]})]})]})]})]})};var tG=e.i(689020);let tK=[{label:"Custom pricing for models",href:"https://docs.litellm.ai/docs/proxy/custom_pricing"},{label:"Spend tracking",href:"https://docs.litellm.ai/docs/proxy/cost_tracking"}],tW=({userID:e,userRole:s,accessToken:a})=>{let[l,r]=(0,i.useState)(void 0),[o,d]=(0,i.useState)(""),[c,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(void 0),[b,_]=(0,i.useState)("percentage"),[v,N]=(0,i.useState)(""),[S,C]=(0,i.useState)(""),[T,I]=(0,i.useState)([]),[F]=k.Form.useForm(),[A]=k.Form.useForm(),[L,M]=y.Modal.useModal(),P="proxy_admin"===s||"Admin"===s,{discountConfig:D,fetchDiscountConfig:z,handleAddProvider:E,handleRemoveProvider:O,handleDiscountChange:R}=function({accessToken:e}){let[t,s]=(0,i.useState)({}),a=(0,i.useCallback)(async()=>{try{let t=(0,w.getProxyBaseUrl)(),a=t?`${t}/config/cost_discount_config`:"/config/cost_discount_config",l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();s(e.values||{})}else console.error("Failed to fetch discount config")}catch(e){console.error("Error fetching discount config:",e),eE.default.fromBackend("Failed to fetch discount configuration")}},[e]),l=(0,i.useCallback)(async t=>{try{let s=(0,w.getProxyBaseUrl)(),l=s?`${s}/config/cost_discount_config`:"/config/cost_discount_config",r=await fetch(l,{method:"PATCH",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok)eE.default.success("Discount configuration updated successfully"),await a();else{let e=await r.json(),t=e.detail?.error||e.detail||"Failed to update settings";eE.default.fromBackend(t)}}catch(e){console.error("Error updating discount config:",e),eE.default.fromBackend("Failed to update discount configuration")}},[e,a]),r=(0,i.useCallback)(async(e,a)=>{if(!e||!a)return eE.default.fromBackend("Please select a provider and enter discount percentage"),!1;let r=parseFloat(a);if(isNaN(r)||r<0||r>100)return eE.default.fromBackend("Discount must be between 0% and 100%"),!1;let i=e5(e);if(!i)return eE.default.fromBackend("Invalid provider selected"),!1;if(t[i])return eE.default.fromBackend(`Discount for ${e2.Providers[e]} already exists. Edit it in the table above.`),!1;let n={...t,[i]:r/100};return s(n),await l(n),!0},[t,l]),n=(0,i.useCallback)(async e=>{let a={...t};delete a[e],s(a),await l(a)},[t,l]),o=(0,i.useCallback)(async(e,a)=>{let r=parseFloat(a);if(!isNaN(r)&&r>=0&&r<=1){let a={...t,[e]:r};s(a),await l(a)}},[t,l]);return{discountConfig:t,setDiscountConfig:s,fetchDiscountConfig:a,saveDiscountConfig:l,handleAddProvider:r,handleRemoveProvider:n,handleDiscountChange:o}}({accessToken:a}),{marginConfig:B,fetchMarginConfig:$,handleAddMargin:q,handleRemoveMargin:U,handleMarginChange:V}=function({accessToken:e}){let[t,s]=(0,i.useState)({}),a=(0,i.useCallback)(async()=>{try{let t=(0,w.getProxyBaseUrl)(),a=t?`${t}/config/cost_margin_config`:"/config/cost_margin_config",l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();s(e.values||{})}else console.error("Failed to fetch margin config")}catch(e){console.error("Error fetching margin config:",e),eE.default.fromBackend("Failed to fetch margin configuration")}},[e]),l=(0,i.useCallback)(async t=>{try{let s=(0,w.getProxyBaseUrl)(),l=s?`${s}/config/cost_margin_config`:"/config/cost_margin_config",r=await fetch(l,{method:"PATCH",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok)eE.default.success("Margin configuration updated successfully"),await a();else{let e=await r.json(),t=e.detail?.error||e.detail||"Failed to update settings";eE.default.fromBackend(t)}}catch(e){console.error("Error updating margin config:",e),eE.default.fromBackend("Failed to update margin configuration")}},[e,a]),r=(0,i.useCallback)(async e=>{let a,r,{selectedProvider:i,marginType:n,percentageValue:o,fixedAmountValue:d}=e;if(!i)return eE.default.fromBackend("Please select a provider"),!1;if("global"===i)a="global";else{let e=e5(i);if(!e)return eE.default.fromBackend("Invalid provider selected"),!1;a=e}if(t[a]){let e="global"===a?"Global":e2.Providers[i];return eE.default.fromBackend(`Margin for ${e} already exists. Edit it in the table above.`),!1}if("percentage"===n){let e=parseFloat(o);if(isNaN(e)||e<0||e>1e3)return eE.default.fromBackend("Percentage must be between 0% and 1000%"),!1;r=e/100}else{let e=parseFloat(d);if(isNaN(e)||e<0)return eE.default.fromBackend("Fixed amount must be non-negative"),!1;r={fixed_amount:e}}let c={...t,[a]:r};return s(c),await l(c),!0},[t,l]),n=(0,i.useCallback)(async e=>{let a={...t};delete a[e],s(a),await l(a)},[t,l]),o=(0,i.useCallback)(async(e,a)=>{let r={...t,[e]:a};s(r),await l(r)},[t,l]);return{marginConfig:t,setMarginConfig:s,fetchMarginConfig:a,saveMarginConfig:l,handleAddMargin:r,handleRemoveMargin:n,handleMarginChange:o}}({accessToken:a});(0,i.useEffect)(()=>{a&&(Promise.all([z(),$()]).finally(()=>{m(!1)}),(async()=>{try{let e=await (0,tG.fetchAvailableModels)(a);I(e.map(e=>e.model_group))}catch(e){console.error("Error fetching models:",e)}})())},[a,z,$]);let H=async()=>{await E(l,o)&&(r(void 0),d(""),p(!1))},G=async(e,s)=>{L.confirm({title:"Remove Provider Discount",icon:(0,t.jsx)(tB.ExclamationCircleOutlined,{}),content:`Are you sure you want to remove the discount for ${s}?`,okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:()=>O(e)})},K=async()=>{await q({selectedProvider:j,marginType:b,percentageValue:v,fixedAmountValue:S})&&(f(void 0),N(""),C(""),_("percentage"),h(!1))},W=async(e,s)=>{L.confirm({title:"Remove Provider Margin",icon:(0,t.jsx)(tB.ExclamationCircleOutlined,{}),content:`Are you sure you want to remove the margin for ${s}?`,okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:()=>U(e)})};return a?(0,t.jsxs)("div",{className:"w-full p-8",children:[M,(0,t.jsx)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ek.Title,{children:"Cost Tracking Settings"}),(0,t.jsx)(tU,{items:tK})]}),(0,t.jsx)(g.Text,{className:"text-gray-500 mt-1",children:"Configure cost discounts and margins for different LLM providers. Changes are saved automatically."})]})}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full space-y-4",children:[P&&(0,t.jsxs)(eG.Accordion,{children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Provider Discounts"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Apply percentage-based discounts to reduce costs for specific providers"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsxs)(eS.TabGroup,{children:[(0,t.jsxs)(eC.TabList,{className:"px-6 pt-4",children:[(0,t.jsx)(eN.Tab,{children:"Discounts"}),(0,t.jsx)(eN.Tab,{children:"Test It"})]}),(0,t.jsxs)(eI.TabPanels,{children:[(0,t.jsx)(eT.TabPanel,{children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(n.Button,{onClick:()=>p(!0),children:"+ Add Provider Discount"})}),c?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(D).length>0?(0,t.jsx)(e3,{discountConfig:D,onDiscountChange:R,onRemoveProvider:G}):(0,t.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)(g.Text,{className:"text-gray-700 font-medium mb-2",children:"No provider discounts configured"}),(0,t.jsx)(g.Text,{className:"text-gray-500 text-sm",children:'Click "Add Provider Discount" to get started'})]})]})}),(0,t.jsx)(eT.TabPanel,{children:(0,t.jsx)("div",{className:"px-6 pb-4",children:(0,t.jsx)(tH,{})})})]})]})})]}),P&&(0,t.jsxs)(eG.Accordion,{children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Fee/Price Margin"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Add fees or margins to LLM costs for internal billing and cost recovery"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(n.Button,{onClick:()=>h(!0),children:"+ Add Provider Margin"})}),c?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(B).length>0?(0,t.jsx)(e7,{marginConfig:B,onMarginChange:V,onRemoveProvider:W}):(0,t.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)(g.Text,{className:"text-gray-700 font-medium mb-2",children:"No provider margins configured"}),(0,t.jsx)(g.Text,{className:"text-gray-500 text-sm",children:'Click "Add Provider Margin" to get started'})]})]})})]}),(0,t.jsxs)(eG.Accordion,{defaultOpen:!0,children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Pricing Calculator"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Estimate LLM costs based on expected token usage and request volume"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(tR,{accessToken:a,models:T})})})]})]}),(0,t.jsx)(y.Modal,{title:(0,t.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Discount"})}),open:u,width:1e3,onCancel:()=>{p(!1),F.resetFields(),r(void 0),d("")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(g.Text,{className:"text-sm text-gray-600 mb-6",children:"Select a provider and set its discount percentage. Enter a value between 0% and 100% (e.g., 5 for a 5% discount)."}),(0,t.jsx)(k.Form,{form:F,onFinish:()=>{H()},layout:"vertical",className:"space-y-6",children:(0,t.jsx)(e8,{discountConfig:D,selectedProvider:l,newDiscount:o,onProviderChange:r,onDiscountChange:d,onAddProvider:H})})]})}),(0,t.jsx)(y.Modal,{title:(0,t.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Margin"})}),open:x,width:1e3,onCancel:()=>{h(!1),A.resetFields(),f(void 0),N(""),C(""),_("percentage")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(g.Text,{className:"text-sm text-gray-600 mb-6",children:'Select a provider (or "Global" for all providers) and configure the margin. You can use percentage-based or fixed amount.'}),(0,t.jsx)(k.Form,{form:A,layout:"vertical",className:"space-y-6",children:(0,t.jsx)(e9,{marginConfig:B,selectedProvider:j,marginType:b,percentageValue:v,fixedAmountValue:S,onProviderChange:f,onMarginTypeChange:_,onPercentageChange:N,onFixedAmountChange:C,onAddProvider:K})})]})})]}):null};var tQ=e.i(226898),tY=e.i(973706),tJ=e.i(447566),tX=e.i(602073),tZ=e.i(313603),t0=e.i(285027),t1=e.i(266027),t2=e.i(653496),t4=e.i(149192),t5=e.i(788191);let t6=`Evaluate whether this guardrail's decision was correct. +Analyze the user input, the guardrail action taken, and determine if it was appropriate. + +Consider: +— Was the user's intent genuinely harmful or policy-violating? +— Was the guardrail's action (block / flag / pass) appropriate? +— Could this be a false positive or false negative? + +Return a structured verdict with confidence and justification.`,t3=`{ + "verdict": "correct" | "false_positive" | "false_negative", + "confidence": 0.0, + "justification": "string", + "risk_category": "string", + "suggested_action": "keep" | "adjust threshold" | "add allowlist" +} +`;function t8({open:e,onClose:s,guardrailName:a,accessToken:l,onRunEvaluation:r}){let[n,o]=(0,i.useState)(t6),[d,c]=(0,i.useState)(t3),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)([]),[h,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!e||!l)return void x([]);let t=!1;return g(!0),(0,tG.fetchAvailableModels)(l).then(e=>{t||x(e)}).catch(()=>{t||x([])}).finally(()=>{t||g(!1)}),()=>{t=!0}},[e,l]);let j=p.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)(y.Modal,{title:"Evaluation Settings",open:e,onCancel:s,width:640,footer:null,closeIcon:(0,t.jsx)(t4.CloseOutlined,{}),destroyOnClose:!0,children:[(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-4",children:a?`Configure AI evaluation for ${a}`:"Configure AI evaluation for re-running on logs"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Evaluation Prompt"}),(0,t.jsx)("button",{type:"button",onClick:()=>o(t6),className:"text-xs text-indigo-600 hover:text-indigo-700",children:"Reset to default"})]}),(0,t.jsx)(S.Input.TextArea,{value:n,onChange:e=>o(e.target.value),rows:6,className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"System prompt sent to the evaluation model. Output is structured via response_format."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Response Schema"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:"response_format: json_schema"}),(0,t.jsx)(S.Input.TextArea,{value:d,onChange:e=>c(e.target.value),rows:6,className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Model"}),(0,t.jsx)(N.Select,{placeholder:h?"Loading models…":"Select a model",value:m??void 0,onChange:u,options:j,style:{width:"100%"},showSearch:!0,optionFilterProp:"label",loading:h,notFoundContent:l?"No models available":"Sign in to see models"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsx)(V.Button,{onClick:s,children:"Cancel"}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(t5.PlayCircleOutlined,{}),onClick:()=>{m&&(r?.({prompt:n,schema:d,model:m}),s())},disabled:!m,children:"Run Evaluation"})]})]})}var t7=e.i(166540);e.i(3565);var t9=e.i(502626);let se={blocked:{icon:t4.CloseOutlined,color:"text-red-600",bg:"bg-red-50",border:"border-red-200",label:"Blocked"},passed:{icon:v.CheckCircleOutlined,color:"text-green-600",bg:"bg-green-50",border:"border-green-200",label:"Passed"},flagged:{icon:t0.WarningOutlined,color:"text-amber-600",bg:"bg-amber-50",border:"border-amber-200",label:"Flagged"}};function st({guardrailName:e,filterAction:s="all",logs:a=[],logsLoading:l=!1,totalLogs:r,accessToken:n=null,startDate:o="",endDate:d=""}){let[c,m]=(0,i.useState)(10),[u,p]=(0,i.useState)(s),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(!1),j=a.filter(e=>"all"===u||e.action===u).slice(0,c),f=r??a.length,b=o?(0,t7.default)(o).utc().format("YYYY-MM-DD HH:mm:ss"):(0,t7.default)().subtract(24,"hours").utc().format("YYYY-MM-DD HH:mm:ss"),_=d?(0,t7.default)(d).utc().endOf("day").format("YYYY-MM-DD HH:mm:ss"):(0,t7.default)().utc().format("YYYY-MM-DD HH:mm:ss"),{data:v}=(0,t1.useQuery)({queryKey:["spend-log-by-request",x,b,_],queryFn:async()=>n&&x?await (0,w.uiSpendLogsCall)({accessToken:n,start_date:b,end_date:_,page:1,page_size:10,params:{request_id:x}}):null,enabled:!!(n&&x&&g)}),k=v?.data?.[0]??null;return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:e?`Logs — ${e}`:"Request Logs"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:l?"Loading…":a.length>0?`Showing ${j.length} of ${f} entries`:"No logs for this period. Select a guardrail and date range."})]}),a.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-1",children:["all","blocked","flagged","passed"].map(e=>(0,t.jsx)(V.Button,{type:u===e?"primary":"default",size:"small",onClick:()=>p(e),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,t.jsx)("div",{className:"h-4 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Sample:"}),[10,50,100].map(e=>(0,t.jsx)(V.Button,{type:c===e?"primary":"default",size:"small",onClick:()=>m(e),children:e},e))]})]})]})}),l&&(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{})}),!l&&0===j.length&&(0,t.jsx)("div",{className:"py-12 text-center text-sm text-gray-500",children:"No logs to display. Adjust filters or date range."}),!l&&j.length>0&&(0,t.jsx)("div",{className:"divide-y divide-gray-100",children:j.map(e=>{let s=se[e.action],a=s.icon;return(0,t.jsxs)("button",{type:"button",onClick:()=>{h(e.id),y(!0)},className:"w-full text-left px-4 py-3 hover:bg-gray-50 transition-colors flex items-start gap-3",children:[(0,t.jsx)(a,{className:`w-4 h-4 mt-0.5 flex-shrink-0 ${s.color}`}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${s.bg} ${s.color} ${s.border}`,children:s.label}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:e.timestamp}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"·"}),e.model&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.model})]}),(0,t.jsx)("p",{className:"text-sm text-gray-800 truncate",children:e.input_snippet??e.input??"—"})]}),(0,t.jsx)(tk.DownOutlined,{className:"w-4 h-4 text-gray-400 flex-shrink-0 mt-1"})]},e.id)})}),(0,t.jsx)(t9.LogDetailsDrawer,{open:g,onClose:()=>{y(!1),h(null)},logEntry:k,accessToken:n,allLogs:k?[k]:[],startTime:b})]})}function ss({label:e,value:s,valueColor:a="text-gray-900",icon:l,subtitle:r}){return(0,t.jsxs)("div",{className:"h-full bg-white border border-gray-200 rounded-lg p-5 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-600",children:e}),l&&(0,t.jsx)("span",{className:"text-gray-400",children:l})]}),(0,t.jsx)("div",{className:`text-3xl font-semibold ${a} tracking-tight`,children:s}),r&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:r})]})}let sa={healthy:{bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},warning:{bg:"bg-amber-50",text:"text-amber-700",dot:"bg-amber-500"},critical:{bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}};function sl({guardrailId:e,onBack:s,accessToken:a=null,startDate:l,endDate:r}){let[n,o]=(0,i.useState)("overview"),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(1),{data:p,isLoading:x,error:h}=(0,t1.useQuery)({queryKey:["guardrails-usage-detail",e,l,r],queryFn:()=>(0,w.getGuardrailsUsageDetail)(a,e,l,r),enabled:!!a&&!!e}),{data:g,isLoading:y}=(0,t1.useQuery)({queryKey:["guardrails-usage-logs",e,m,50],queryFn:()=>(0,w.getGuardrailsUsageLogs)(a,{guardrailId:e,page:m,pageSize:50,startDate:l,endDate:r}),enabled:!!a&&!!e}),j=(0,i.useMemo)(()=>(g?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:e.action,score:e.score,model:e.model,input_snippet:e.input_snippet,output_snippet:e.output_snippet,reason:e.reason})),[g?.logs]),f=p?{name:p.guardrail_name,description:p.description??"",status:p.status,provider:p.provider,type:p.type,requestsEvaluated:p.requestsEvaluated,failRate:p.failRate,avgScore:p.avgScore,avgLatency:p.avgLatency}:{name:e,description:"",status:"healthy",provider:"—",type:"—",requestsEvaluated:0,failRate:0,avgScore:void 0,avgLatency:void 0},b=sa[f.status]??sa.healthy;return x&&!p?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})}):h&&!p?(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load guardrail details."})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:f.name}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 text-xs font-medium rounded-full ${b.bg} ${b.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${b.dot}`}),f.status.charAt(0).toUpperCase()+f.status.slice(1)]})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 ml-8",children:f.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:f.provider}),(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>c(!0),title:"Evaluation settings"})]})]})]}),(0,t.jsx)(t2.Tabs,{activeKey:n,onChange:o,items:[{key:"overview",label:"Overview"},{key:"logs",label:"Logs"}]}),"overview"===n&&(0,t.jsxs)("div",{className:"space-y-6 mt-4",children:[(0,t.jsxs)(t_.Row,{gutter:[16,16],children:[(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Requests Evaluated",value:f.requestsEvaluated.toLocaleString()})}),(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Fail Rate",value:`${f.failRate}%`,valueColor:f.failRate>15?"text-red-600":f.failRate>5?"text-amber-600":"text-green-600",subtitle:`${Math.round(f.requestsEvaluated*f.failRate/100).toLocaleString()} blocked`,icon:f.failRate>15?(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"}):void 0})}),(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Avg. latency added",value:null!=f.avgLatency?`${Math.round(f.avgLatency)}ms`:"—",valueColor:null!=f.avgLatency?f.avgLatency>150?"text-red-600":f.avgLatency>50?"text-amber-600":"text-green-600":"text-gray-500",subtitle:null!=f.avgLatency?"Per request (avg)":"No data"})})]}),(0,t.jsx)(st,{guardrailName:f.name,filterAction:"all",logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})]}),"logs"===n&&(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(st,{guardrailName:f.name,logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})}),(0,t.jsx)(t8,{open:d,onClose:()=>c(!1),guardrailName:f.name,accessToken:a})]})}let sr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z"}}]},name:"rise",theme:"outlined"};var si=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:sr}))}),sn=e.i(898586),so=e.i(584935);function sd({data:e}){let s=e&&e.length>0?e:[];return(0,t.jsxs)(o.Card,{className:"bg-white border border-gray-200",children:[(0,t.jsx)(ek.Title,{className:"text-base font-semibold text-gray-900 mb-4",children:"Request Outcomes Over Time"}),(0,t.jsx)("div",{className:"h-80 min-h-[280px]",children:s.length>0?(0,t.jsx)(so.BarChart,{data:s,index:"date",categories:["passed","blocked"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),yAxisWidth:48,showLegend:!0,stack:!0}):(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-gray-500",children:"No chart data for this period"})})]})}let sc={Bedrock:"bg-orange-100 text-orange-700 border-orange-200","Google Cloud":"bg-sky-100 text-sky-700 border-sky-200",LiteLLM:"bg-indigo-100 text-indigo-700 border-indigo-200",Custom:"bg-gray-100 text-gray-600 border-gray-200"};function sm({accessToken:e=null,startDate:s,endDate:a,onSelectGuardrail:l}){let[r,n]=(0,i.useState)("failRate"),[o,d]=(0,i.useState)("desc"),[c,m]=(0,i.useState)(!1),{data:u,isLoading:p,error:x}=(0,t1.useQuery)({queryKey:["guardrails-usage-overview",s,a],queryFn:()=>(0,w.getGuardrailsUsageOverview)(e,s,a),enabled:!!e}),h=u?.rows??[],g=(0,i.useMemo)(()=>{let e,t,s,a;return u?{totalRequests:u.totalRequests??0,totalBlocked:u.totalBlocked??0,passRate:String(u.passRate??0),avgLatency:h.length?Math.round(h.reduce((e,t)=>e+(t.avgLatency??0),0)/h.length):0,count:h.length}:(e=h.reduce((e,t)=>e+t.requestsEvaluated,0),t=h.reduce((e,t)=>e+Math.round(t.requestsEvaluated*t.failRate/100),0),s=e>0?((1-t/e)*100).toFixed(1):"0",{totalRequests:e,totalBlocked:t,passRate:s,avgLatency:(a=h.filter(e=>null!=e.avgLatency)).length>0?Math.round(a.reduce((e,t)=>e+(t.avgLatency??0),0)/a.length):0,count:h.length})},[u,h]),y=u?.chart,j=(0,i.useMemo)(()=>[...h].sort((e,t)=>{let s="desc"===o?-1:1,a=e[r]??0,l=t[r]??0;return(Number(a)-Number(l))*s}),[h,r,o]),f=[{title:"Guardrail",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsx)("button",{type:"button",className:"text-sm font-medium text-gray-900 hover:text-indigo-600 text-left",onClick:()=>l(s.id),children:e})},{title:"Provider",dataIndex:"provider",key:"provider",render:e=>(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${sc[e]??sc.Custom}`,children:e})},{title:"Requests",dataIndex:"requestsEvaluated",key:"requestsEvaluated",align:"right",sorter:!0,sortOrder:"requestsEvaluated"===r?"desc"===o?"descend":"ascend":null,render:e=>e.toLocaleString()},{title:"Fail Rate",dataIndex:"failRate",key:"failRate",align:"right",sorter:!0,sortOrder:"failRate"===r?"desc"===o?"descend":"ascend":null,render:(e,s)=>(0,t.jsxs)("span",{className:e>15?"text-red-600":e>5?"text-amber-600":"text-green-600",children:[e,"%","up"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-red-400",children:"↑"}),"down"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-green-400",children:"↓"})]})},{title:"Avg. latency added",dataIndex:"avgLatency",key:"avgLatency",align:"right",sorter:!0,sortOrder:"avgLatency"===r?"desc"===o?"descend":"ascend":null,render:e=>(0,t.jsx)("span",{className:null==e?"text-gray-400":e>150?"text-red-600":e>50?"text-amber-600":"text-green-600",children:null!=e?`${e}ms`:"—"})},{title:"Status",dataIndex:"status",key:"status",align:"center",render:e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${"healthy"===e?"bg-green-500":"warning"===e?"bg-amber-500":"bg-red-500"}`}),(0,t.jsx)("span",{className:"text-xs text-gray-600 capitalize",children:e})]})}],b=["failRate","requestsEvaluated","avgLatency"];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-lg text-indigo-500"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:"Guardrails Monitor"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Monitor guardrail performance across all requests"})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tS.DownloadOutlined,{}),title:"Coming soon",children:"Export Data"})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],className:"mb-6",children:[(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Total Evaluations",value:g.totalRequests.toLocaleString()})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Blocked Requests",value:g.totalBlocked.toLocaleString(),valueColor:"text-red-600",icon:(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"})})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Pass Rate",value:`${g.passRate}%`,valueColor:"text-green-600",icon:(0,t.jsx)(si,{className:"text-green-400"})})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Avg. latency added",value:`${g.avgLatency}ms`,valueColor:g.avgLatency>150?"text-red-600":g.avgLatency>50?"text-amber-600":"text-green-600"})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Active Guardrails",value:g.count})})]}),(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(sd,{data:y})}),(0,t.jsxs)(ts.Card,{className:"border border-gray-200 rounded-lg bg-white",styles:{body:{padding:0}},children:[(p||x)&&(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-center gap-2",children:[p&&(0,t.jsx)(eF.Spin,{size:"small"}),x&&(0,t.jsx)("span",{className:"text-sm text-red-600",children:"Failed to load data. Try again."})]}),(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(sn.Typography.Title,{level:5,className:"!mb-0 text-gray-900",children:"Guardrail Performance"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Click a guardrail to view details, logs, and configuration"})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>m(!0),title:"Evaluation settings"})})]}),(0,t.jsx)(te.Table,{columns:f,dataSource:j,rowKey:"id",pagination:!1,loading:p,onChange:(e,t,s)=>{s?.field&&b.includes(s.field)&&(n(s.field),d("ascend"===s.order?"asc":"desc"))},locale:0!==h.length||p?void 0:{emptyText:"No data for this period"},onRow:e=>({onClick:()=>l(e.id),style:{cursor:"pointer"}})})]}),(0,t.jsx)(t8,{open:c,onClose:()=>m(!1),accessToken:e})]})}let su=new Date,sp=new Date;function sx({accessToken:e=null}){let[s,a]=(0,i.useState)({type:"overview"}),l=(0,i.useMemo)(()=>new Date(sp),[]),r=(0,i.useMemo)(()=>new Date(su),[]),[n,o]=(0,i.useState)({from:l,to:r}),d=n.from?(0,w.formatDate)(n.from):"",c=n.to?(0,w.formatDate)(n.to):"",m=(0,i.useCallback)(e=>{o(e)},[]);return(0,t.jsxs)("div",{className:"p-6 w-full min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-4",children:(0,t.jsx)(tY.default,{value:n,onValueChange:m,label:"",showTimeRange:!1})}),"overview"===s.type?(0,t.jsx)(sm,{accessToken:e,startDate:d,endDate:c,onSelectGuardrail:e=>{a({type:"detail",guardrailId:e})}}):(0,t.jsx)(sl,{guardrailId:s.guardrailId,onBack:()=>{a({type:"overview"})},accessToken:e,startDate:d,endDate:c})]})}sp.setDate(sp.getDate()-7);var sh=e.i(487304),sg=e.i(760221);e.i(111790);var sy=e.i(280881),sj=e.i(934879),sf=e.i(402874),sb=e.i(797305),s_=e.i(109799),sv=e.i(747871),sw=e.i(56567),sk=e.i(468133),sN=e.i(645526),sS=e.i(91979),sC=e.i(525720),sT=e.i(372943),sI=e.i(95684),sF=e.i(497650),sA=e.i(368869),sL=e.i(998573),sM=e.i(438100),sP=e.i(475254);let sD=(0,sP.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"}]]);var sz=e.i(988846),sE=e.i(98740),sE=sE;function sO({size:e,fontSize:s}){let a=(0,t.jsx)(tw.LoadingOutlined,{style:s?{fontSize:s}:void 0,spin:!0});return(0,t.jsx)(eF.Spin,{indicator:a,size:e})}var sR=e.i(363256),sB=e.i(9314),s$=e.i(552130),sq=e.i(533882),sU=e.i(651904),sV=e.i(460285),sH=e.i(435451),sG=e.i(916940),sK=e.i(471145),sW=e.i(127952),sQ=e.i(162386);let sY=(e,t,s)=>"Admin"===e||!!s&&!!t&&s.some(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)),sJ=(e,t,s)=>"Admin"===e?s||[]:s&&t?s.filter(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)):[],sX=({teams:e,searchParams:s,accessToken:a,setTeams:l,userID:r,userRole:n,organizations:o,premiumUser:d=!1})=>{let c,m,u,p;console.log(`organizations: ${JSON.stringify(o)}`);let{data:x}=(0,s_.useOrganizations)(),[h,g]=(0,i.useState)(!0),[j,b]=(0,i.useState)(null),[v,C]=(0,i.useState)(1),[T,F]=(0,i.useState)(10),[A,L]=(0,i.useState)(0),[M,P]=(0,i.useState)(null),[D,z]=(0,i.useState)(null),[O,R]=(0,i.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),$=(0,i.useRef)(null),[q,G]=(0,i.useState)(!1),K=async(e={})=>{if(!a)return;let t=e.page??v,s=e.size??T,i=e.sortBy??O.sort_by,o=e.sortOrder??O.sort_order,d=e.organizationID??O.organization_id,c=e.teamAlias??O.team_alias;g(!0),b(null);try{let e=await (0,eV.teamListCall)(a,t,s,{organizationID:d||null,team_alias:c||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:i||null,sortOrder:o||null});l(e.teams??[]),L(e.total??0)}catch(e){b(e?.message||"Failed to fetch teams")}finally{g(!1)}};(0,i.useEffect)(()=>{K()},[a]);let[W]=k.Form.useForm(),[Q]=k.Form.useForm(),[Y,J]=(0,i.useState)(""),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(null),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),[ei,en]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(!1),[eu,ep]=(0,i.useState)([]),[ex,eh]=(0,i.useState)(!1),[eg,ef]=(0,i.useState)(null),[eb,e_]=(0,i.useState)([]),[ev,ek]=(0,i.useState)({}),[eN,eS]=(0,i.useState)(!1),[eC,eT]=(0,i.useState)([]),[eI,eF]=(0,i.useState)([]),[eA,eL]=(0,i.useState)([]),[eM,eP]=(0,i.useState)([]),[eD,ez]=(0,i.useState)(!1),[eB,e$]=(0,i.useState)({}),[eq,eU]=(0,i.useState)(null),[eH,eY]=(0,i.useState)(0);(0,i.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${D}`);let t=(e=[],D&&D.models.length>0?(console.log(`organization.models: ${D.models}`),e=D.models):e=eu,(0,B.unfurlWildcardModelsInList)(e,eu));console.log(`models: ${t}`),e_(t),W.setFieldValue("models",[])},[D,eu]),(0,i.useEffect)(()=>{if(ei){let e=sJ(n,r,o);if(1===e.length){let t=e[0];W.setFieldValue("organization_id",t.organization_id),z(t)}else W.setFieldValue("organization_id",M?.organization_id||null),z(M)}},[ei,n,r,o,M]),(0,i.useEffect)(()=>{let e=async()=>{try{if(null==a)return;let e=(await (0,w.getPoliciesList)(a)).policies.map(e=>e.policy_name);eF(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==a)return;let e=(await (0,w.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);eT(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[a]);let eJ=async()=>{try{if(null==a)return;let e=await (0,w.fetchMCPAccessGroups)(a);eP(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,i.useEffect)(()=>{eJ()},[a]),(0,i.useEffect)(()=>{e&&ek(e.reduce((e,t)=>(e[t.team_id]={keys:t.keys||[],team_info:{members_with_roles:t.members_with_roles||[]}},e),{}))},[e]);let eX=async e=>{ef(e),eh(!0)},eZ=async()=>{if(null!=eg&&null!=e&&null!=a)try{eS(!0),await (0,w.teamDeleteCall)(a,eg.team_id),await K(),eE.default.success("Team deleted successfully")}catch(e){eE.default.fromBackend("Error deleting the team: "+e)}finally{eS(!1),eh(!1),ef(null)}};(0,i.useEffect)(()=>{(async()=>{try{if(null===r||null===n||null===a)return;let e=await (0,B.fetchAvailableModelsForTeamOrKey)(r,n,a);e&&ep(e)}catch(e){console.error("Error fetching user models:",e)}})()},[a,r,n,e]);let e0=async t=>{try{if(console.log(`formValues: ${JSON.stringify(t)}`),null!=a){let s=t?.team_alias,l=e?.map(e=>e.team_alias)??[],r=t?.organization_id||M?.organization_id;if(""===r||"string"!=typeof r?t.organization_id=null:t.organization_id=r.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(eE.default.info("Creating Team"),eA.length>0){let e={};if(t.metadata)try{e=JSON.parse(t.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}e={...e,logging:eA.filter(e=>e.callback_name)},t.metadata=JSON.stringify(e)}if(t.secret_manager_settings&&"string"==typeof t.secret_manager_settings)if(""===t.secret_manager_settings.trim())delete t.secret_manager_settings;else try{t.secret_manager_settings=JSON.parse(t.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}let i=Array.isArray(t.object_permission_search_tools)&&t.object_permission_search_tools.length>0;if(t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0||t.allowed_mcp_servers_and_groups&&(t.allowed_mcp_servers_and_groups.servers?.length>0||t.allowed_mcp_servers_and_groups.accessGroups?.length>0||t.allowed_mcp_servers_and_groups.toolPermissions)){if(t.object_permission||(t.object_permission={}),t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0&&(t.object_permission.vector_stores=t.allowed_vector_store_ids,delete t.allowed_vector_store_ids),t.allowed_mcp_servers_and_groups){let{servers:e,accessGroups:s}=t.allowed_mcp_servers_and_groups;e&&e.length>0&&(t.object_permission.mcp_servers=e),s&&s.length>0&&(t.object_permission.mcp_access_groups=s),delete t.allowed_mcp_servers_and_groups}t.mcp_tool_permissions&&Object.keys(t.mcp_tool_permissions).length>0&&(t.object_permission.mcp_tool_permissions=t.mcp_tool_permissions,delete t.mcp_tool_permissions)}if(t.allowed_mcp_access_groups&&t.allowed_mcp_access_groups.length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_access_groups=t.allowed_mcp_access_groups,delete t.allowed_mcp_access_groups),t.allowed_agents_and_groups){let{agents:e,accessGroups:s}=t.allowed_agents_and_groups;t.object_permission||(t.object_permission={}),e&&e.length>0&&(t.object_permission.agents=e),s&&s.length>0&&(t.object_permission.agent_access_groups=s),delete t.allowed_agents_and_groups}i&&(t.object_permission||(t.object_permission={}),t.object_permission.search_tools=t.object_permission_search_tools,delete t.object_permission_search_tools),Object.keys(eB).length>0&&(t.model_aliases=eB),eq?.router_settings&&Object.values(eq.router_settings).some(e=>null!=e&&""!==e)&&(t.router_settings=eq.router_settings),await (0,w.teamCreateCall)(a,t),eE.default.success("Team created"),await K({page:v,size:T}),W.resetFields(),eL([]),e$({}),eU(null),eY(e=>e+1),en(!1)}}catch(e){console.error("Error creating the team:",e),eE.default.fromBackend("Error creating the team: "+e)}},e1=async(e,t)=>{let s={...O,[e]:t};if(R(s),C(1),a)try{let e=await (0,eV.teamListCall)(a,1,T,{organizationID:s.organization_id||null,team_alias:s.team_alias||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:s.sort_by||null,sortOrder:s.sort_order||null});l(e.teams??[]),L(e.total??0)}catch(e){console.error("Error fetching teams:",e)}},{token:e2}=sA.theme.useToken(),{Title:e4,Text:e5}=sn.Typography,{Content:e6}=sT.Layout,e3=(0,i.useMemo)(()=>[{title:"Team ID",dataIndex:"team_id",key:"team_id",width:170,ellipsis:!0,render:(e,s)=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(e5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>ea(s.team_id),"data-testid":"team-id-cell",children:e})})},{title:"Team Alias",dataIndex:"team_alias",key:"team_alias",ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{style:{fontSize:14},children:e||(0,t.jsx)(e5,{type:"secondary",italic:!0,children:"—"})})},{title:"Organization",key:"organization",width:160,ellipsis:!0,render:(e,s)=>{let a=((e,t)=>{if(!e||!t)return e||"N/A";let s=t.find(t=>t.organization_id===e);return s?.organization_alias||e})(s.organization_id,x||o);return s.organization_id?(0,t.jsx)(e5,{ellipsis:!0,style:{fontSize:14},children:a}):(0,t.jsx)(e5,{type:"secondary",children:"—"})}},{title:"Resources",key:"resources",width:240,render:(e,s)=>{let a=ev?.[s.team_id]?.team_info?.members_with_roles?.length??0,l=s.models?.length??0,r=ev?.[s.team_id]?.keys?.length??0;return(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a} Members`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sE.default,{size:14}),a]})})}),(0,t.jsx)(f.Tooltip,{title:`${l} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),l]})})}),(0,t.jsx)(f.Tooltip,{title:`${r} Keys`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sM.KeyIcon,{size:14}),r]})})})]})}},{title:"Spend / Budget",key:"spend",width:200,sorter:!0,render:(e,s)=>{let a=s.spend??0,l=s.max_budget,r=`$${a.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`,i=null!=l?`$${l.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:"Unlimited",n=null!=l&&l>0?Math.min(a/l*100,100):null;return(0,t.jsxs)(sC.Flex,{vertical:!0,gap:2,children:[(0,t.jsxs)(e5,{style:{fontSize:13},children:[r,(0,t.jsxs)(e5,{type:"secondary",style:{fontSize:12},children:[" / ",i]})]}),null!=n&&(0,t.jsx)(sF.Progress,{percent:n,size:"small",showInfo:!1,strokeColor:n>=90?"#ff4d4f":n>=70?"#faad14":"#1677ff",style:{marginBottom:0}})]})}},{title:"Created",dataIndex:"created_at",key:"created_at",width:130,ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:e?new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"—"})},{title:"Actions",key:"actions",width:120,align:"right",render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(eR.default,{variant:"Copy",tooltipText:"Copy Team ID",onClick:()=>{navigator.clipboard.writeText(s.team_id).then(()=>sL.message.success("Team ID copied")).catch(()=>sL.message.error("Failed to copy"))}}),"Admin"===n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit team",dataTestId:"edit-team-button",onClick:()=>{ea(s.team_id),er(!0)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete team",dataTestId:"delete-team-button",onClick:()=>eX(s)})]})]})}],[n,ev,x,o]),e8=(0,i.useMemo)(()=>e??[],[e]),e7=[{key:"your-teams",label:"Your Teams",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sz.SearchIcon,{size:16}),suffix:q?(0,t.jsx)(sO,{size:"small"}):null,placeholder:"Search teams by name...",onChange:e=>{var t;return t=e.target.value,void($.current&&clearTimeout($.current),G(!0),$.current=setTimeout(async()=>{try{R(e=>({...e,team_alias:t})),C(1),await K({page:1,teamAlias:t})}finally{G(!1)}},300))},allowClear:!0,style:{maxWidth:400}}),(0,t.jsx)(sR.default,{organizations:o,value:O.organization_id||void 0,onChange:e=>e1("organization_id",e||""),loading:h})]}),(0,t.jsx)(sI.Pagination,{current:v,total:A,pageSize:T,onChange:(e,t)=>{C(e),F(t),K({page:e,size:t})},size:"small",showTotal:e=>`${e} teams`,showSizeChanger:!0,pageSizeOptions:["10","20","50"]})]}),h?(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{padding:"80px 0"},children:(0,t.jsx)(sO,{fontSize:48})}):j?(0,t.jsxs)(sC.Flex,{vertical:!0,align:"center",gap:16,style:{padding:"64px 0"},children:[(0,t.jsx)(e5,{type:"danger",style:{fontSize:15},children:"Failed to load teams"}),(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:j}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>{K()},children:"Retry"})]}):(0,t.jsx)(te.Table,{columns:e3,dataSource:e8,rowKey:"team_id",pagination:!1,onChange:(e,t,s)=>{let a=Array.isArray(s)?s[0]:s,l=a.order?a.columnKey:"created_at",r="ascend"===a.order?"asc":(a.order,"desc");R(e=>({...e,sort_by:l,sort_order:r})),K({sortBy:l,sortOrder:r})},locale:{emptyText:(0,t.jsxs)("div",{style:{padding:"64px 0",textAlign:"center"},children:[(0,t.jsx)(sN.TeamOutlined,{style:{fontSize:40,color:"#d9d9d9",marginBottom:12}}),(0,t.jsx)("div",{children:(0,t.jsx)(e5,{style:{fontSize:15,color:"#595959"},children:"No teams yet"})}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:"Create your first team to organize members and manage access to models."})}),sY(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),style:{marginTop:16},"data-testid":"create-team-button",children:"Create Team"})]})},scroll:{x:1e3},size:"middle"})]}),(0,t.jsx)(sW.default,{isOpen:ex,title:"Delete Team?",alertMessage:eg?.keys?.length===0?void 0:`Warning: This team has ${eg?.keys?.length} keys associated with it. Deleting the team will also delete all associated keys. This action is irreversible.`,message:"Are you sure you want to delete this team and all its keys? This action cannot be undone.",resourceInformationTitle:"Team Information",resourceInformation:[{label:"Team ID",value:eg?.team_id,code:!0},{label:"Team Name",value:eg?.team_alias},{label:"Keys",value:eg?.keys?.length},{label:"Members",value:eg?.members_with_roles?.length}],requiredConfirmation:eg?.team_alias,onCancel:()=>{eh(!1),ef(null)},onOk:eZ,confirmLoading:eN})]})},{key:"available-teams",label:"Available Teams",children:(0,t.jsx)(sv.default,{accessToken:a,userID:r})},...(0,ew.isProxyAdminRole)(n||"")?[{key:"default-settings",label:"Default Team Settings",children:(0,t.jsx)(sk.default,{accessToken:a,userID:r||"",userRole:n||""})}]:[]];return(0,t.jsxs)(e6,{style:{padding:e2.paddingLG,paddingInline:2*e2.paddingLG},children:[es?(0,t.jsx)(sw.default,{teamId:es,onUpdate:e=>{l(t=>null==t?t:t.map(t=>e.team_id===t.team_id?(0,eO.updateExistingKeys)(t,e):t)),K()},onClose:()=>{ea(null),er(!1)},accessToken:a,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let t=0;te.team_id===es)),is_proxy_admin:"Admin"==n,userModels:eu,editTeam:el,premiumUser:d}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsxs)(e4,{level:2,style:{margin:0},children:[(0,t.jsx)(sN.TeamOutlined,{style:{marginRight:8}}),"Teams"]}),(0,t.jsx)(e5,{type:"secondary",children:"Manage teams, members, and their access to models and budgets"})]}),sY(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),"data-testid":"create-team-button",children:"Create Team"})]}),(0,t.jsx)(t2.Tabs,{items:e7})]}),sY(n,r,o)&&(0,t.jsx)(y.Modal,{title:"Create Team",open:ei,width:1e3,footer:null,onOk:()=>{en(!1),W.resetFields(),eL([]),e$({}),eU(null),eY(e=>e+1)},onCancel:()=>{en(!1),W.resetFields(),eL([]),e$({}),eU(null),eY(e=>e+1)},children:(0,t.jsxs)(k.Form,{form:W,onFinish:e0,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"","data-testid":"team-name-input"})}),(c=sJ(n,r,o),m="Admin"!==n,u=1===c.length,p=0===c.length,(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(f.Tooltip,{title:(0,t.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:M?M.organization_id:null,className:"mt-8",rules:m?[{required:!0,message:"Please select an organization"}]:[],help:u?"You can only create teams within this organization":m?"required":"",children:(0,t.jsx)(N.Select,{showSearch:!0,allowClear:!m,disabled:u,placeholder:p?"No organizations available":"Search or select an Organization",onChange:e=>{W.setFieldValue("organization_id",e),z(c?.find(t=>t.organization_id===e)||null)},filterOption:(e,t)=>!!t&&(t.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:c?.map(e=>(0,t.jsxs)(N.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),m&&!u&&c.length>1&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(e5,{style:{color:"#1e40af",fontSize:14},children:"Please select an organization to create a team for. You can only create teams within organizations where you are an admin."})})]})),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(f.Tooltip,{title:"These are the models that your selected team has access to",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),rules:[{required:!0,message:"Please select at least one model"}],name:"models",children:(0,t.jsx)(sQ.ModelSelect,{value:W.getFieldValue("models")||[],onChange:e=>W.setFieldValue("models",e),organizationID:W.getFieldValue("organization_id"),options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!W.getFieldValue("organization_id")},context:"team",dataTestId:"create-team-models-select"})}),(0,t.jsx)(k.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(sH.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(k.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(N.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(N.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(N.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(N.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(k.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(k.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsxs)(eG.Accordion,{className:"mt-20 mb-8",onClick:()=>{eD||(eJ(),ez(!0))},children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Additional Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(k.Form.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,t.jsx)(eQ.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,t.jsx)(k.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(sH.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(k.Form.Item,{label:"Team Member 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)(eQ.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(k.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(k.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(k.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,t.jsx)(S.Input.TextArea,{rows:4})}),(0,t.jsx)(k.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:d?"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)(S.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!d})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"Setup your first guardrail",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)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:eC.map(e=>({value:e,label:e}))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(_.Switch,{disabled:!d,checkedChildren:d?"Yes":"Premium feature - Upgrade to disable global guardrails by team",unCheckedChildren:d?"No":"Premium feature - Upgrade to disable global guardrails by team"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(f.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)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:eI.map(e=>({value:e,label:e}))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(f.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)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-8",help:"Select access groups to assign to this team",children:(0,t.jsx)(sB.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(f.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,t.jsx)(sG.default,{onChange:e=>W.setFieldValue("allowed_vector_store_ids",e),value:W.getFieldValue("allowed_vector_store_ids"),accessToken:a||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(f.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,t.jsx)(ey.default,{onChange:e=>W.setFieldValue("allowed_mcp_servers_and_groups",e),value:W.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:a||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(k.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(S.Input,{type:"hidden"})}),(0,t.jsx)(k.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)(ej.default,{accessToken:a||"",selectedServers:W.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:W.getFieldValue("mcp_tool_permissions")||{},onChange:e=>W.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(f.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,t.jsx)(s$.default,{onChange:e=>W.setFieldValue("allowed_agents_and_groups",e),value:W.getFieldValue("allowed_agents_and_groups"),accessToken:a||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Search Tool Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Search Tools"," ",(0,t.jsx)(f.Tooltip,{title:"Select which search tools this team can access. Leave empty to allow all search tools.",children:(0,t.jsx)(E.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"object_permission_search_tools",className:"mt-4",help:"Restrict which configured search tools keys on this team may call.",children:(0,t.jsx)(sK.default,{onChange:e=>W.setFieldValue("object_permission_search_tools",e),value:W.getFieldValue("object_permission_search_tools"),accessToken:a||"",placeholder:"Select search tools (optional, empty = all allowed)"})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(sU.default,{value:eA,onChange:eL,premiumUser:d})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(sV.default,{accessToken:a||"",value:eq||void 0,onChange:eU,modelData:eu.length>0?{data:eu.map(e=>({model_name:e}))}:void 0},eH)})})]},`router-settings-accordion-${eH}`),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(e5,{type:"secondary",style:{fontSize:14,marginBottom:16,display:"block"},children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(sq.default,{accessToken:a||"",initialModelAliases:eB,onAliasUpdate:e$,showExampleConfig:!1})]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(V.Button,{htmlType:"submit","data-testid":"create-team-submit",children:"Create Team"})})]})})]})};var sZ=e.i(702597),s0=e.i(846835),s1=e.i(147612),s2=e.i(191403),s4=e.i(976883),s5=e.i(657688),s6=e.i(437902);let{Text:s3}=sn.Typography,s8=({litellmParams:e,accessToken:s,onTestComplete:a})=>{let[l,r]=(0,i.useState)(!0),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{r(!0);try{let t=await (0,w.testSearchToolConnection)(s,e);o(t),"success"===t.status&&eE.default.success("Connection test successful!")}catch(e){o({status:"error",message:e instanceof Error?e.message:"Unknown error occurred",error_type:"NetworkError"})}finally{r(!1),a&&a()}})()},[s,e,a]);let m=n?.message?(e=>{if(!e)return"Unknown error";let t=e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error:\s*/,"").replace(/^AuthenticationError:\s*/,"");if(t.includes("")||t.includes("(.*?)<\/title>/);return e?e[1]:t.includes("401")||t.includes("Authorization Required")?"Authentication failed: Invalid API key or credentials":"Authentication error - please check your API key"}return t.length>200?t.substring(0,200)+"...":t})(n.message):"Unknown error";return l?(0,t.jsx)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,t.jsxs)(s3,{style:{fontSize:"16px"},children:["Testing connection to ",e.search_provider||"search provider","..."]}),(0,t.jsx)(s6.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]})}):n?(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:["success"===n.status?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.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.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,t.jsxs)("div",{style:{marginLeft:"12px"},children:[(0,t.jsxs)(s3,{type:"success",style:{fontSize:"18px",fontWeight:500,display:"block"},children:["Connection to ",e.search_provider," successful!"]}),n.test_query&&(0,t.jsxs)(s3,{style:{fontSize:"14px",color:"#666",marginTop:"8px",display:"block"},children:["Test query: ",(0,t.jsx)("code",{style:{backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"4px"},children:n.test_query})]}),void 0!==n.results_count&&(0,t.jsxs)(s3,{style:{fontSize:"14px",color:"#666",display:"block"},children:["Results retrieved: ",n.results_count]})]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(t0.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(s3,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",e.search_provider||"search provider"," failed"]})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,t.jsxs)(s3,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(s3,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:m}),n.error_type&&(0,t.jsx)("div",{style:{marginTop:"8px"},children:(0,t.jsxs)(s3,{style:{fontSize:"13px",color:"#666"},children:["Error type:"," ",(0,t.jsx)("code",{style:{backgroundColor:"#ffebee",padding:"2px 6px",borderRadius:"4px",color:"#d32f2f"},children:n.error_type})]})}),n.message&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),style:{paddingLeft:0,height:"auto"},children:d?"Hide Details":"Show Details"})})]}),d&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(s3,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Full Error Details"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:n.message})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fffbf0",border:"1px solid #ffe58f",borderLeft:"4px solid #faad14",borderRadius:"8px",padding:"16px"},children:[(0,t.jsx)(s3,{strong:!0,style:{display:"block",marginBottom:"8px",color:"#d48806"},children:"Troubleshooting tips:"}),(0,t.jsxs)("ul",{style:{margin:"8px 0",paddingLeft:"20px",color:"#ad6800"},children:[(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Verify your API key is correct and active"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Check if the search provider service is operational"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Ensure you have sufficient credits/quota with the provider"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Review the provider's documentation for any additional requirements"})]})]})]})}),(0,t.jsx)(F.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(V.Button,{type:"link",href:"https://docs.litellm.ai/docs/search",target:"_blank",icon:(0,t.jsx)(E.InfoCircleOutlined,{}),children:"View Search Documentation"})})]}):null},{TextArea:s7}=S.Input,s9=({providerName:e,displayName:s})=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)(s5.default,{src:`../ui/assets/logos/${e}.png`,alt:"",width:20,height:20,style:{marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,t.jsx)("span",{children:s})]}),ae=({userRole:e,accessToken:s,onCreateSuccess:a,isModalVisible:l,setModalVisible:r})=>{let[o]=k.Form.useForm(),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)({}),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),[j,b]=(0,i.useState)(""),{data:_,isLoading:v}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,w.fetchAvailableSearchProviders)(s)},enabled:!!s&&l}),S=_?.providers||[],C=async e=>{c(!0);try{let t={search_tool_name:e.search_tool_name,litellm_params:{search_provider:e.search_provider,api_key:e.api_key,api_base:e.api_base,timeout:e.timeout?parseFloat(e.timeout):void 0,max_retries:e.max_retries?parseInt(e.max_retries):void 0},search_tool_info:e.description?{description:e.description}:void 0};if(console.log("Creating search tool with payload:",t),null!=s){let e=await (0,w.createSearchTool)(s,t);eE.default.success("Search tool created successfully"),o.resetFields(),u({}),r(!1),a(e)}}catch(e){eE.default.error("Error creating search tool: "+e)}finally{c(!1)}},T=async()=>{try{await o.validateFields(["search_provider","api_key"]),g(!0),b(`test-${Date.now()}`),x(!0)}catch(e){eE.default.error("Please fill in Search Provider and API Key before testing")}};return(i.default.useEffect(()=>{l||u({})},[l]),(0,ew.isAdminRole)(e))?(0,t.jsxs)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)("span",{className:"text-2xl",children:"🔍"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Search Tool"})]}),open:l,width:800,onCancel:()=>{o.resetFields(),u({}),r(!1)},footer:null,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)(k.Form,{form:o,onFinish:C,onValuesChange:(e,t)=>u(t),layout:"vertical",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Tool Name",(0,t.jsx)(f.Tooltip,{title:"A unique name to identify this search tool configuration (e.g., 'perplexity-search', 'tavily-news-search').",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_tool_name",rules:[{required:!0,message:"Please enter a search tool name"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Name can only contain letters, numbers, hyphens, and underscores"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"e.g., perplexity-search, my-tavily-tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Provider",(0,t.jsx)(f.Tooltip,{title:"Select the search provider you want to use. Each provider has different capabilities and pricing.",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(N.Select,{placeholder:"Select a search provider",className:"rounded-lg",size:"large",loading:v,showSearch:!0,optionFilterProp:"children",optionLabelProp:"label",children:S.map(e=>(0,t.jsx)(N.Select.Option,{value:e.provider_name,label:(0,t.jsx)(s9,{providerName:e.provider_name,displayName:e.ui_friendly_name}),children:(0,t.jsx)(s9,{providerName:e.provider_name,displayName:e.ui_friendly_name})},e.provider_name))})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["API Key",(0,t.jsx)(f.Tooltip,{title:"The API key for authenticating with the search provider. This will be securely stored.",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"api_key",rules:[{required:!1,message:"Please enter an API key"}],children:(0,t.jsx)(eQ.TextInput,{type:"password",placeholder:"Enter your API key",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description (Optional)"}),name:"description",children:(0,t.jsx)(s7,{rows:3,placeholder:"Brief description of this search tool's purpose",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center pt-6 border-t border-gray-100",children:[(0,t.jsx)(f.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(sn.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(n.Button,{onClick:T,loading:h,children:"Test Connection"}),(0,t.jsx)(n.Button,{loading:d,type:"submit",children:"Add Search Tool"})]})]})]})}),(0,t.jsx)(y.Modal,{title:"Connection Test Results",open:p,onCancel:()=>{x(!1),g(!1)},footer:[(0,t.jsx)(n.Button,{onClick:()=>{x(!1),g(!1)},children:"Close"},"close")],width:700,children:p&&s&&(0,t.jsx)(s8,{litellmParams:{search_provider:m.search_provider,api_key:m.api_key,api_base:m.api_base},accessToken:s,onTestComplete:()=>g(!1)},j)})]}):null};var at=e.i(350967),as=e.i(678784),aa=e.i(118366),al=e.i(928685);let{Text:ar}=sn.Typography,ai=({searchToolName:e,accessToken:s,className:a=""})=>{let[l,r]=(0,i.useState)(""),[n,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)([]),[u,p]=(0,i.useState)({}),[x,h]=(0,i.useState)(!1),g=async()=>{if(!l.trim())return void L.default.warning("Please enter a search query");d(!0);let t=performance.now();try{let a=await (0,w.searchToolQueryCall)(s,e,l),r=performance.now(),i=Math.round(r-t),n={query:l,response:a,timestamp:Date.now(),latency:i};m(e=>[n,...e])}catch(e){console.error("Error querying search tool:",e),eE.default.fromBackend("Failed to query search tool")}finally{d(!1)}},y=e=>new Date(e).toLocaleString(),j=(0,t.jsx)(tw.LoadingOutlined,{style:{fontSize:24},spin:!0}),f=c.length>0?c[0]:null;return(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(ek.Title,{children:"Test Search Tool"})}),(0,t.jsxs)("div",{className:"flex flex-col",style:{minHeight:"600px"},children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex items-stretch gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white rounded-lg px-4 transition-all duration-200",style:{border:x?"2px solid #3b82f6":"2px solid #e5e7eb",boxShadow:x?"0 0 0 3px rgba(59, 130, 246, 0.1)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",height:"48px"},children:[(0,t.jsx)(al.SearchOutlined,{className:"text-gray-400 mr-3",style:{fontSize:"18px"}}),(0,t.jsx)(S.Input,{value:l,onChange:e=>r(e.target.value),onFocus:()=>h(!0),onBlur:()=>h(!1),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),g())},placeholder:"Enter your search query...",disabled:n,bordered:!1,style:{fontSize:"15px",padding:0,height:"100%",boxShadow:"none"}})]}),(0,t.jsx)(V.Button,{type:"primary",onClick:g,disabled:n||!l.trim(),icon:(0,t.jsx)(al.SearchOutlined,{}),loading:n,style:{height:"48px",paddingLeft:"24px",paddingRight:"24px",borderRadius:"8px",fontWeight:500,fontSize:"15px",backgroundColor:n||!l.trim()?void 0:"#1890ff",borderColor:n||!l.trim()?void 0:"#1890ff",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:"Search"})]})}),(0,t.jsx)("div",{className:"flex-1",children:f||n?(0,t.jsxs)("div",{children:[n&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center py-16",children:[(0,t.jsx)(eF.Spin,{indicator:j}),(0,t.jsx)(ar,{className:"mt-4 text-gray-600 font-medium",children:"Searching..."})]}),f&&!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(ar,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Search Query"}),(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mt-1.5",children:f.query})]}),(0,t.jsxs)("div",{className:"text-right ml-4",children:[(0,t.jsx)(ar,{className:"text-xs text-gray-500",children:y(f.timestamp)}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,t.jsxs)("div",{className:"text-sm font-semibold text-blue-600",children:[f.response?.results?.length||0," ",f.response?.results?.length===1?"result":"results"]}),void 0!==f.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("div",{className:"text-sm font-semibold text-green-600",children:[f.latency,"ms"]})]})]})]})]})}),f.response&&f.response.results&&f.response.results.length>0?(0,t.jsx)("div",{className:"space-y-3",children:f.response.results.map((e,s)=>{let a=u[`0-${s}`]||!1;return(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",e.currentTarget.style.borderColor="#e0e7ff"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)",e.currentTarget.style.borderColor="#e5e7eb"},children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-600 hover:text-blue-700 flex-1 leading-snug",style:{textDecoration:"none"},onMouseEnter:e=>e.currentTarget.style.textDecoration="underline",onMouseLeave:e=>e.currentTarget.style.textDecoration="none",children:e.title}),(0,t.jsx)(V.Button,{type:"text",size:"small",className:"flex-shrink-0",icon:(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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),onClick:()=>window.open(e.url,"_blank"),style:{color:"#6b7280"}})]}),(0,t.jsx)("div",{className:"text-sm text-green-700 mb-3 truncate font-medium",children:e.url}),(0,t.jsx)("div",{className:"text-sm text-gray-700 leading-relaxed",children:a?e.snippet:`${e.snippet.substring(0,200)}${e.snippet.length>200?"...":""}`}),e.snippet.length>200&&(0,t.jsx)(V.Button,{type:"link",size:"small",className:"mt-3 p-0 h-auto",onClick:()=>{let e;return e=`0-${s}`,void p(t=>({...t,[e]:!t[e]}))},style:{fontSize:"13px",fontWeight:500,color:"#3b82f6"},children:a?"Show less":"Show more"})]})},s)})}):(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 mx-auto mb-4",children:(0,t.jsx)(al.SearchOutlined,{style:{fontSize:"24px",color:"#9ca3af"}})}),(0,t.jsx)(ar,{className:"text-gray-600 font-medium",children:"No results found"}),(0,t.jsx)(ar,{className:"text-sm text-gray-500 mt-1",children:"Try a different search query"})]})]}),c.length>1&&(0,t.jsxs)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)(ar,{className:"text-sm font-semibold text-gray-700",children:"Previous Searches"}),(0,t.jsx)(V.Button,{onClick:()=>{m([]),p({}),eE.default.success("Search history cleared")},size:"small",type:"link",style:{fontSize:"13px",fontWeight:500},children:"Clear All"})]}),(0,t.jsx)("div",{className:"space-y-2",children:c.slice(1,6).map((e,s)=>(0,t.jsxs)("div",{className:"p-3 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:border-gray-300",onClick:()=>{r(e.query)},children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800 truncate",children:e.query}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-1.5 flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"font-medium text-blue-600",children:[e.response?.results?.length||0," ",e.response?.results?.length===1?"result":"results"]}),void 0!==e.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"•"}),(0,t.jsxs)("span",{className:"font-medium text-green-600",children:[e.latency,"ms"]})]}),(0,t.jsx)("span",{children:"•"}),(0,t.jsx)("span",{children:y(e.timestamp)})]})]},s+1))})]})]}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center p-8",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-24 h-24 rounded-full bg-gray-100 mb-6",children:(0,t.jsx)(al.SearchOutlined,{style:{fontSize:"48px",color:"#9ca3af"}})}),(0,t.jsx)(ar,{className:"text-lg text-gray-600 font-medium",children:"Test your search tool"}),(0,t.jsx)(ar,{className:"text-sm text-gray-500 mt-2",children:"Enter a query above to see search results"})]})})]})]})},an=({searchTool:e,onBack:s,isEditing:a,accessToken:l,availableProviders:r})=>{var d;let c,[m,u]=(0,i.useState)({}),p=async(e,t)=>{await (0,eO.copyToClipboard)(e)&&(u(e=>({...e,[t]:!0})),setTimeout(()=>{u(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eL.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Search Tools"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(ek.Title,{children:e.search_tool_name}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-name"]?(0,t.jsx)(as.CheckIcon,{size:12}):(0,t.jsx)(aa.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_name,"search-tool-name"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:e.search_tool_id}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-id"]?(0,t.jsx)(as.CheckIcon,{size:12}):(0,t.jsx)(aa.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_id,"search-tool-id"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsxs)(at.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Provider"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(ek.Title,{children:(d=e.litellm_params.search_provider,c=r.find(e=>e.provider_name===d),c?.ui_friendly_name||d)})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"API Key"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.litellm_params.api_key?"****":"Not set"})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Created At"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleString():"Unknown"})})]})]}),e.search_tool_info?.description&&(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)(g.Text,{children:"Description"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.search_tool_info.description})})]}),(0,t.jsx)("div",{className:"mt-6",children:l&&(0,t.jsx)(ai,{searchToolName:e.search_tool_name,accessToken:l})})]})},ao=({accessToken:e,userRole:s,userID:a})=>{let{data:l,isLoading:r,refetch:o}=(0,t1.useQuery)({queryKey:["searchTools"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,w.fetchSearchTools)(e).then(e=>e.search_tools||[])},enabled:!!e}),{data:d,isLoading:c}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,w.fetchAvailableSearchProviders)(e)},enabled:!!e}),m=d?.providers||[],[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(!1),[b,_]=(0,i.useState)(null),[v,C]=(0,i.useState)(!1),[T,F]=(0,i.useState)(!1),[A,L]=(0,i.useState)(!1),[M]=k.Form.useForm(),P=i.default.useMemo(()=>{let e,s,a;return e=e=>{_(e),C(!1)},s=e=>{let t=l?.find(t=>t.search_tool_id===e);t&&(M.setFieldsValue({search_tool_name:t.search_tool_name,search_provider:t.litellm_params.search_provider,api_key:t.litellm_params.api_key,api_base:t.litellm_params.api_base,timeout:t.litellm_params.timeout,max_retries:t.litellm_params.max_retries,description:t.search_tool_info?.description}),_(e),L(!0))},a=D,[{title:"Search Tool ID",dataIndex:"search_tool_id",key:"search_tool_id",render:(s,a)=>a.is_from_config?(0,t.jsx)("span",{className:"text-xs",children:"-"}):(0,t.jsx)("button",{onClick:()=>e(a.search_tool_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left cursor-pointer max-w-40",children:(0,t.jsx)("span",{className:"truncate block",children:a.search_tool_id})})},{title:"Name",dataIndex:"search_tool_name",key:"search_tool_name",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Provider",key:"provider",render:(e,s)=>{let a=s.litellm_params.search_provider,l=m.find(e=>e.provider_name===a),r=l?.ui_friendly_name||a;return(0,t.jsx)("span",{className:"text-sm",children:r})}},{title:"Created At",dataIndex:"created_at",key:"created_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.created_at?new Date(s.created_at).toLocaleDateString():"-"})},{title:"Updated At",dataIndex:"updated_at",key:"updated_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.updated_at?new Date(s.updated_at).toLocaleDateString():"-"})},{title:"Source",key:"source",render:(e,s)=>{let a=s.is_from_config??!1;return(0,t.jsx)(I.Tag,{color:a?"default":"blue",children:a?"Config":"DB"})}},{title:"Actions",key:"actions",render:(e,l)=>{let r=l.search_tool_id,i=l.is_from_config??!1;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit search tool",disabled:i,disabledTooltipText:"Config search tool cannot be edited on the dashboard. Please edit it from the config file.",onClick:()=>{r&&!i&&s(r)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete search tool",disabled:i,disabledTooltipText:"Config search tool cannot be deleted on the dashboard. Please delete it from the config file.",onClick:()=>{r&&!i&&a(r)}})]})}}]},[m,l,M]);function D(e){p(e),h(!0)}let z=async()=>{if(null!=u&&null!=e){f(!0);try{await (0,w.deleteSearchTool)(e,u),eE.default.success("Deleted search tool successfully"),h(!1),p(null),o()}catch(e){console.error("Error deleting the search tool:",e),eE.default.error("Failed to delete search tool")}finally{f(!1)}}},E=l?.find(e=>e.search_tool_id===u),O=E?m.find(e=>e.provider_name===E.litellm_params.search_provider):null,R=async()=>{if(e&&b)try{let t=await M.validateFields(),s={search_tool_name:t.search_tool_name,litellm_params:{search_provider:t.search_provider,api_key:t.api_key,api_base:t.api_base,timeout:t.timeout?parseFloat(t.timeout):void 0,max_retries:t.max_retries?parseInt(t.max_retries):void 0},search_tool_info:t.description?{description:t.description}:void 0};await (0,w.updateSearchTool)(e,b,s),eE.default.success("Search tool updated successfully"),L(!1),M.resetFields(),_(null),o()}catch(e){console.error("Failed to update search tool:",e),eE.default.error("Failed to update search tool")}};return e&&s&&a?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(sW.default,{isOpen:x,title:"Delete Search Tool",message:"Are you sure you want to delete this search tool? This action cannot be undone.",resourceInformationTitle:"Search Tool Information",resourceInformation:E?[{label:"Name",value:E.search_tool_name},{label:"ID",value:E.search_tool_id,code:!0},{label:"Provider",value:O?.ui_friendly_name||E.litellm_params.search_provider},{label:"Description",value:E.search_tool_info?.description||"-"}]:[],onCancel:()=>{h(!1),p(null)},onOk:z,confirmLoading:j}),(0,t.jsx)(ae,{userRole:s,accessToken:e,onCreateSuccess:e=>{F(!1),o()},isModalVisible:T,setModalVisible:F}),(0,t.jsx)(y.Modal,{title:"Edit Search Tool",open:A,onOk:R,onCancel:()=>{L(!1),M.resetFields(),_(null)},width:600,children:(0,t.jsxs)(k.Form,{form:M,layout:"vertical",children:[(0,t.jsx)(k.Form.Item,{name:"search_tool_name",label:"Search Tool Name",rules:[{required:!0,message:"Please enter a search tool name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g., my-perplexity-search"})}),(0,t.jsx)(k.Form.Item,{name:"search_provider",label:"Search Provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(N.Select,{placeholder:"Select a search provider",loading:c,children:m.map(e=>(0,t.jsx)(N.Select.Option,{value:e.provider_name,children:e.ui_friendly_name},e.provider_name))})}),(0,t.jsx)(k.Form.Item,{name:"api_key",label:"API Key",extra:"API key for the search provider",children:(0,t.jsx)(S.Input.Password,{placeholder:"Enter API key"})}),(0,t.jsx)(k.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(S.Input.TextArea,{rows:3,placeholder:"Description of this search tool"})})]})}),(0,t.jsx)(ek.Title,{children:"Search Tools"}),(0,t.jsx)(g.Text,{className:"text-tremor-content mt-2",children:"Configure and manage your search providers"}),(0,ew.isAdminRole)(s)&&(0,t.jsx)(n.Button,{className:"mt-4 mb-4",onClick:()=>F(!0),children:"+ Add New Search Tool"}),(0,t.jsx)(()=>b?(0,t.jsx)(an,{searchTool:l?.find(e=>e.search_tool_id===b)||{search_tool_id:"",search_tool_name:"",litellm_params:{search_provider:""}},onBack:()=>{C(!1),_(null),o()},isEditing:v,accessToken:e,availableProviders:m}):(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(eF.Spin,{spinning:r,indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"large",children:(0,t.jsx)(te.Table,{bordered:!0,dataSource:l||[],columns:P,rowKey:e=>e.search_tool_id||e.search_tool_name,pagination:!1,locale:{emptyText:"No search tools configured"},size:"small"})})}),{})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:s,userID:a}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))};var ad=e.i(700904),ac=e.i(686311),am=e.i(37727),au=e.i(643531),ap=e.i(636772),ax=e.i(115571);function ah({onOpen:e,onDismiss:s,isVisible:a,title:l,description:r,buttonText:n,icon:o,accentColor:d,buttonStyle:c}){let m=(0,ap.useDisableShowPrompts)(),[u,p]=(0,i.useState)(100),[x,h]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{if(!a){p(100),h(!1);return}let e=Date.now(),t=setInterval(()=>{let s=Math.max(0,100-(Date.now()-e)/15e3*100);p(s),s<=0&&clearInterval(t)},50);return()=>clearInterval(t)},[a]),(0,i.useEffect)(()=>{if(x){let e=setTimeout(()=>{h(!1),s()},5e3);return()=>clearTimeout(e)}},[x,s]),x)?(0,t.jsx)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center",children:(0,t.jsx)(au.Check,{className:"h-5 w-5 text-green-600"})}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)("p",{className:"text-sm text-gray-700 font-medium",children:"Got it, we will not ask again. Reactivate this at any time in the User Menu."})})]})})}):!a||m?null:(0,t.jsxs)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:[(0,t.jsx)("div",{className:"h-1 bg-gray-100 w-full",children:(0,t.jsx)("div",{className:"h-full transition-all duration-100 ease-linear",style:{width:`${u}%`,backgroundColor:d}})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",style:{color:d},children:[(0,t.jsx)(o,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm",children:l})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-0.5 rounded hover:bg-gray-100",children:(0,t.jsx)(am.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-3",children:r}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(V.Button,{type:"primary",block:!0,onClick:e,style:c,children:n}),(0,t.jsx)(V.Button,{variant:"outlined",danger:!0,block:!0,onClick:()=>{(0,ax.setLocalStorageItem)("disableShowPrompts","true"),(0,ax.emitLocalStorageChange)("disableShowPrompts"),h(!0)},className:"text-xs",children:"Don't ask me again"})]})]})]})}function ag({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ah,{onOpen:e,onDismiss:s,isVisible:a,title:"Quick feedback",description:"Help us improve LiteLLM! Share your experience in 5 quick questions.",buttonText:"Share feedback",icon:ac.MessageSquare,accentColor:"#3b82f6"})}var ay=e.i(972520),aj=e.i(180127),aj=aj,af=e.i(536916);let ab=[{id:"oss_adoption",label:"OSS Adoption",description:"Stars, contributors, forks, community support"},{id:"ai_integration",label:"AI Integration",description:"LiteLLM had the logging/guardrail integration we needed - Langfuse, OTEL, S3 logging, Azure Content Safety guardrails"},{id:"unified_api",label:"Unified API",description:"LiteLLM had the best OpenAI-compatible API across providers - OpenAI, Anthropic, Gemini, etc."},{id:"breadth_of_models",label:"Breadth of Models/Providers",description:"LiteLLM had the provider + endpoint combinations we needed - /ocr endpoint with Mistral OCR, /batches endppint with Bedrock API, etc."},{id:"other",label:"Other",description:"Something else not listed above"}];function a_({isOpen:e,onClose:s,onComplete:a}){let[l,r]=(0,i.useState)(1),[n,o]=(0,i.useState)({usingAtCompany:null,companyName:"",startDate:"",reasons:[],otherReason:"",email:""}),[d,c]=(0,i.useState)(!1),m=!0===n.usingAtCompany?5:4;if(!e)return null;let u=async()=>{c(!0);try{let e={oss_adoption:"OSS Adoption (stars, contributors, forks)",ai_integration:"AI Integration (Langfuse, OTEL, S3, Azure Content Safety)",unified_api:"Unified API (OpenAI-compatible)",breadth_of_models:"Breadth of Models/Providers (/ocr, /batches, Bedrock, Azure OCR)"},t=n.reasons.map(t=>"other"===t&&n.otherReason?`Other: ${n.otherReason}`:e[t]||t),s=new URLSearchParams({"entry.2015264290":n.usingAtCompany?"Yes":"No","entry.1876243786":n.companyName||"","entry.1282591459":n.startDate,"entry.393456108":t.join(", "),"entry.928142208":n.email||""});await fetch("https://feedback.litellm.ai/survey",{method:"POST",mode:"no-cors",body:s})}catch(e){console.error("Failed to submit survey:",e)}c(!1),a()},p=(e,t)=>{o(s=>({...s,[e]:t}))},x=e=>{o(t=>({...t,reasons:t.reasons.includes(e)?t.reasons.filter(t=>t!==e):[...t.reasons,e]}))},h=()=>{if(!1===n.usingAtCompany){if(1===l)return 1;if(3===l)return 2;if(4===l)return 3;if(5===l)return 4}return l},g=5===l;return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-lg bg-white rounded-xl shadow-2xl overflow-hidden flex flex-col max-h-[90vh] transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-blue-600",children:[(0,t.jsx)(ac.MessageSquare,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Quick Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(am.X,{className:"h-5 w-5"})})]}),(0,t.jsx)(sF.Progress,{percent:h()/m*100,showInfo:!1,strokeColor:"#2563eb",className:"m-0"}),(0,t.jsx)("div",{className:"p-8 flex-1 overflow-y-auto",children:1===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Are you using LiteLLM at your company?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Help us understand how our product is being used in professional environments."}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 pt-4",children:[(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!0),className:`p-6 rounded-lg border-2 text-left transition-all ${!0===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"Yes"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"We use it for work"})]}),(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!1),className:`p-6 rounded-lg border-2 text-left transition-all ${!1===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"No"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Personal project / Hobby"})]})]})]}):2===l&&!0===n.usingAtCompany?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"What company are you using LiteLLM at?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"This helps us understand our user base better."}),(0,t.jsx)(S.Input,{size:"large",placeholder:"Enter your company name",value:n.companyName,onChange:e=>p("companyName",e.target.value),autoFocus:!0})]}):3===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"When did you start using LiteLLM?"}),(0,t.jsx)(T.Radio.Group,{value:n.startDate,onChange:e=>p("startDate",e.target.value),className:"w-full",children:(0,t.jsx)(U.Space,{direction:"vertical",className:"w-full",children:["Less than a month ago","1-3 months ago","3-6 months ago","More than 6 months ago"].map(e=>(0,t.jsx)("label",{className:`flex items-center p-4 rounded-lg border cursor-pointer transition-all w-full ${n.startDate===e?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:(0,t.jsx)(T.Radio,{value:e,children:e})},e))})})]}):4===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Why did you pick LiteLLM over other AI Gateways?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Select all that apply."}),(0,t.jsx)("div",{className:"space-y-3",children:ab.map(e=>{let s=n.reasons.includes(e.id);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>x(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),x(e.id))},className:`flex items-start p-4 rounded-lg border cursor-pointer transition-all ${s?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:[(0,t.jsx)(af.Checkbox,{checked:s,className:"mt-0.5 pointer-events-none"}),(0,t.jsxs)("div",{className:"ml-3",children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900",children:e.label}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.description})]})]}),"other"===e.id&&s&&(0,t.jsx)(S.Input,{className:"mt-2 ml-7",placeholder:"Please specify...",value:n.otherReason,onChange:e=>p("otherReason",e.target.value),onClick:e=>e.stopPropagation(),autoFocus:!0})]},e.id)})})]}):5===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Want to share more?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Leave your email and we may reach out to learn more about your experience. This is completely optional."}),(0,t.jsx)(S.Input,{size:"large",type:"email",placeholder:"your@email.com (optional)",value:n.email,onChange:e=>p("email",e.target.value),autoFocus:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"We will only use this to follow up on your feedback. No spam, ever."})]}):null}),(0,t.jsxs)("div",{className:"px-6 py-4 bg-gray-50 border-t border-gray-200 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-sm text-gray-500 font-medium",children:["Step ",h()," of ",m]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[l>1&&(0,t.jsx)(V.Button,{onClick:()=>{3===l&&!1===n.usingAtCompany?r(1):r(l-1)},disabled:d,icon:(0,t.jsx)(aj.default,{className:"h-4 w-4"}),children:"Back"}),(0,t.jsxs)(V.Button,{type:"primary",onClick:()=>{1===l&&!1===n.usingAtCompany?r(3):l<5?r(l+1):u()},disabled:!(1===l?null!==n.usingAtCompany:2===l?n.companyName.trim().length>0:3===l?""!==n.startDate:4===l?n.reasons.includes("other")?n.reasons.length>0&&n.otherReason.trim().length>0:n.reasons.length>0:5===l)||d,loading:d,className:"min-w-[100px]",children:[g?"Submit":"Next",!g&&(0,t.jsx)(ay.ArrowRight,{className:"ml-2 h-4 w-4"})]})]})]})]})]})}var av=e.i(758472);function aw({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ah,{onOpen:e,onDismiss:s,isVisible:a,title:"Claude Code Feedback",description:"Help us improve your Claude Code experience with LiteLLM! Share your feedback in 4 quick questions.",buttonText:"Share feedback",icon:av.Code,accentColor:"#7c3aed",buttonStyle:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"}})}function ak({isOpen:e,onClose:s,onComplete:a}){return e?(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-md bg-white rounded-xl shadow-2xl overflow-hidden transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-purple-600",children:[(0,t.jsx)(av.Code,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Claude Code Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(am.X,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"p-8",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Help us improve your experience"}),(0,t.jsx)("p",{className:"text-gray-600 mb-6",children:"We'd love to hear about your experience using LiteLLM with Claude Code. Your feedback helps us improve the product for everyone."}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-6",children:"This brief survey takes about 2-3 minutes to complete."}),(0,t.jsx)(V.Button,{type:"primary",size:"large",block:!0,onClick:()=>{window.open("https://forms.gle/LZeJQ3XytBakckYa9","_blank","noopener,noreferrer"),a()},icon:(0,t.jsx)(t$.ExternalLink,{className:"h-4 w-4"}),style:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"},children:"Open Feedback Form"})]})]})]}):null}var aN=e.i(345244),aS=e.i(662316),aC=e.i(208075),aT=e.i(735042),aI=e.i(693569),aF=e.i(263147),aA=e.i(954616),aL=e.i(912598);let aM=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"DELETE",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}};var aP=e.i(152990),aD=e.i(682830),az=e.i(657150),az=az,aE=e.i(302202),aO=e.i(446891);let aR=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};var aB=e.i(21548),a$=e.i(573421),aq=e.i(516430),az=az,aU=e.i(823429),aU=aU,sE=sE,aV=e.i(304911),aH=e.i(289793),aG=e.i(500727),az=az,aK=e.i(168118);let{TextArea:aW}=S.Input;function aQ({form:e,isNameDisabled:s=!1}){let{data:a}=(0,aH.useAgents)(),{data:l}=(0,aG.useMCPServers)(),r=a?.agents??[],i=[{key:"1",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aK.InfoIcon,{size:16}),"General Info"]}),children:(0,t.jsxs)("div",{style:{paddingTop:16},children:[(0,t.jsx)(k.Form.Item,{name:"name",label:"Group Name",rules:[{required:!0,message:"Please enter the access group name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. Engineering Team",disabled:s})}),(0,t.jsx)(k.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(aW,{rows:4,placeholder:"Describe the purpose of this access group..."})})]})},{key:"2",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(sD,{size:16}),"Models"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(k.Form.Item,{name:"modelIds",label:"Allowed Models",children:(0,t.jsx)(sQ.ModelSelect,{context:"global",value:e.getFieldValue("modelIds")??[],onChange:t=>e.setFieldsValue({modelIds:t}),style:{width:"100%"}})})})},{key:"3",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aE.ServerIcon,{size:16}),"MCP Servers"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(k.Form.Item,{name:"mcpServerIds",label:"Allowed MCP Servers",children:(0,t.jsx)(N.Select,{mode:"multiple",placeholder:"Select MCP servers",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:(l??[]).map(e=>({label:e.server_name??e.server_id,value:e.server_id}))})})})},{key:"4",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(az.default,{size:16}),"Agents"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(k.Form.Item,{name:"agentIds",label:"Allowed Agents",children:(0,t.jsx)(N.Select,{mode:"multiple",placeholder:"Select agents",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:r.map(e=>({label:e.agent_name,value:e.agent_id}))})})})}];return(0,t.jsx)(k.Form,{form:e,layout:"vertical",name:"access_group_form",initialValues:{modelIds:[],mcpServerIds:[],agentIds:[]},children:(0,t.jsx)(t2.Tabs,{defaultActiveKey:"1",items:i})})}let aY=async(e,t,s)=>{let a=(0,w.getProxyBaseUrl)(),l=`${a}/v1/access_group/${encodeURIComponent(t)}`,r=await fetch(l,{method:"PUT",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){let e=await r.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return r.json()};function aJ({visible:e,accessGroup:s,onCancel:a,onSuccess:l}){let[r]=k.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aA.useMutation)({mutationFn:async({accessGroupId:t,params:s})=>{if(!e)throw Error("Access token is required");return aY(e,t,s)},onSuccess:(e,{accessGroupId:s})=>{t.invalidateQueries({queryKey:aF.accessGroupKeys.all}),t.invalidateQueries({queryKey:aF.accessGroupKeys.detail(s)})}})})();return(0,i.useEffect)(()=>{e&&s&&r.setFieldsValue({name:s.access_group_name,description:s.description??"",modelIds:s.access_model_names??[],mcpServerIds:s.access_mcp_server_ids??[],agentIds:s.access_agent_ids??[]})},[e,s,r]),(0,t.jsx)(y.Modal,{title:"Edit Access Group",open:e,onOk:()=>{r.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};n.mutate({accessGroupId:s.access_group_id,params:t},{onSuccess:()=>{L.default.success("Access group updated successfully"),l?.(),a()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:a,width:700,okText:"Save Changes",cancelText:"Cancel",confirmLoading:n.isPending,destroyOnHidden:!0,children:(0,t.jsx)(aQ,{form:r})})}let{Title:aX,Text:aZ}=sn.Typography,{Content:a0}=sT.Layout;function a1({accessGroupId:e,onBack:s}){let{data:a,isLoading:l}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aL.useQueryClient)();return(0,t1.useQuery)({queryKey:aF.accessGroupKeys.detail(e),queryFn:async()=>aR(t,e),enabled:!!(t&&e)&&ew.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(aF.accessGroupKeys.list({}));return t?.find(t=>t.access_group_id===e)}})})(e),{token:r}=sA.theme.useToken(),[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(!1);if(l)return(0,t.jsx)(a0,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!a)return(0,t.jsxs)(a0,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aB.Empty,{description:"Access group not found"})]});let p=a.access_model_names??[],x=a.access_mcp_server_ids??[],h=a.access_agent_ids??[],g=a.assigned_key_ids??[],y=a.assigned_team_ids??[],j=d?g:g.slice(0,5),f=m?y:y.slice(0,5),b=[{key:"models",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sD,{size:16}),"Models",(0,t.jsx)(I.Tag,{style:{marginInlineEnd:0},children:p?.length})]}),children:p?.length>0?(0,t.jsx)(a$.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:p,renderItem:e=>(0,t.jsx)(a$.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aZ,{code:!0,children:e})})})}):(0,t.jsx)(aB.Empty,{description:"No models assigned to this group"})},{key:"mcp",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(aE.ServerIcon,{size:16}),"MCP Servers",(0,t.jsx)(I.Tag,{children:x?.length})]}),children:x?.length>0?(0,t.jsx)(a$.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:x,renderItem:e=>(0,t.jsx)(a$.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aZ,{code:!0,children:e})})})}):(0,t.jsx)(aB.Empty,{description:"No MCP servers assigned to this group"})},{key:"agents",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(az.default,{size:16}),"Agents",(0,t.jsx)(I.Tag,{children:h?.length})]}),children:h?.length>0?(0,t.jsx)(a$.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:h,renderItem:e=>(0,t.jsx)(a$.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aZ,{code:!0,children:e})})})}):(0,t.jsx)(aB.Empty,{description:"No agents assigned to this group"})}];return(0,t.jsxs)(a0,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(aX,{level:2,style:{margin:0},children:a.access_group_name}),(0,t.jsxs)(aZ,{type:"secondary",children:["ID: ",(0,t.jsx)(aZ,{copyable:!0,children:a.access_group_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(aU.default,{size:16}),onClick:()=>{o(!0)},children:"Edit Access Group"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eA.Descriptions,{title:"Group Details",column:1,children:[(0,t.jsx)(eA.Descriptions.Item,{label:"Description",children:a.description||"—"}),(0,t.jsxs)(eA.Descriptions.Item,{label:"Created",children:[new Date(a.created_at).toLocaleString(),a.created_by&&(0,t.jsxs)(aZ,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:a.created_by})]})]}),(0,t.jsxs)(eA.Descriptions.Item,{label:"Last Updated",children:[new Date(a.updated_at).toLocaleString(),a.updated_by&&(0,t.jsxs)(aZ,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:a.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sM.KeyIcon,{size:16}),"Attached Keys",(0,t.jsx)(I.Tag,{children:g?.length})]}),extra:g?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),children:d?"Show Less":`View All (${g?.length})`}):null,children:g?.length>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:8,children:j.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aZ,{code:!0,style:{fontSize:12},children:e.length>20?`${e.slice(0,10)}...${e.slice(-6)}`:e})},e))}):(0,t.jsx)(aB.Empty,{description:"No keys attached",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sE.default,{size:16}),"Attached Teams",(0,t.jsx)(I.Tag,{children:y?.length})]}),extra:y?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>u(!m),children:m?"Show Less":`View All (${y?.length})`}):null,children:y?.length>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:8,children:f.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aZ,{code:!0,style:{fontSize:12},children:e})},e))}):(0,t.jsx)(aB.Empty,{description:"No teams attached",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ts.Card,{children:(0,t.jsx)(t2.Tabs,{defaultActiveKey:"models",items:b})}),(0,t.jsx)(aJ,{visible:n,accessGroup:a,onCancel:()=>o(!1)})]})}let a2=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group`,l=await fetch(a,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};function a4({visible:e,onCancel:s,onSuccess:a}){let[l]=k.Form.useForm(),r=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aA.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return a2(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aF.accessGroupKeys.all})}})})();return(0,t.jsx)(y.Modal,{title:"Create Access Group",open:e,onOk:()=>{l.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};r.mutate(t,{onSuccess:()=>{L.default.success("Access group created successfully"),l.resetFields(),a?.(),s()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:s,width:700,okText:"Create Group",cancelText:"Cancel",confirmLoading:r.isPending,destroyOnClose:!0,children:(0,t.jsx)(aQ,{form:l})})}let{Title:a5,Text:a6}=sn.Typography,{Content:a3}=sT.Layout;function a8(e){return{id:e.access_group_id,name:e.access_group_name,description:e.description??"",modelIds:e.access_model_names,mcpServerIds:e.access_mcp_server_ids,agentIds:e.access_agent_ids,keyIds:e.assigned_key_ids,teamIds:e.assigned_team_ids,createdAt:e.created_at,createdBy:e.created_by??"",updatedAt:e.updated_at,updatedBy:e.updated_by??""}}function a7(){let{token:e}=sA.theme.useToken(),{userRole:s}=(0,R.default)(),a=(0,ew.isProxyAdminRole)(s??""),{data:l,isLoading:r}=(0,aF.useAccessGroups)(),n=(0,i.useMemo)(()=>(l??[]).map(a8),[l]),[o,d]=(0,i.useState)(null),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(1),[g,y]=(0,i.useState)([]),[j,b]=(0,i.useState)(null),_=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aA.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return aM(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aF.accessGroupKeys.all})}})})();(0,i.useEffect)(()=>{h(1)},[u]);let v=(0,i.useMemo)(()=>n.filter(e=>e.name.toLowerCase().includes(u.toLowerCase())||e.id.toLowerCase().includes(u.toLowerCase())||e.description.toLowerCase().includes(u.toLowerCase())),[n,u]),w=(0,i.useMemo)(()=>[{id:"id",accessorKey:"id",header:()=>(0,t.jsx)("span",{children:"ID"}),enableSorting:!1,size:170,cell:({row:e})=>{let s=e.original;return(0,t.jsx)(f.Tooltip,{title:s.id,children:(0,t.jsx)(a6,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>d(s.id),children:s.id})})}},{id:"name",accessorKey:"name",header:()=>(0,t.jsx)("span",{children:"Name"}),enableSorting:!0,cell:({getValue:e})=>e()},{id:"resources",header:()=>(0,t.jsx)("span",{children:"Resources"}),enableSorting:!1,cell:({row:e})=>{let s=e.original,a=s.modelIds??[],l=s.mcpServerIds??[],r=s.agentIds??[];return(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a?.length} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),a?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${l?.length} MCP Servers`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(aE.ServerIcon,{size:14}),l?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${r?.length} Agents`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(az.default,{size:14}),r?.length]})})})]})}},{id:"createdAt",accessorKey:"createdAt",header:()=>(0,t.jsx)("span",{children:"Created"}),enableSorting:!0,sortingFn:"datetime",cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["lg"]}},{id:"updatedAt",accessorKey:"updatedAt",header:()=>(0,t.jsx)("span",{children:"Updated"}),enableSorting:!1,cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["xl"]}},...a?[{id:"actions",header:()=>(0,t.jsx)("span",{children:"Actions"}),enableSorting:!1,cell:({row:e})=>(0,t.jsx)(U.Space,{children:(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete access group",onClick:()=>b(e.original)})})}]:[]],[a]),k=(0,aP.useReactTable)({data:v,columns:w,state:{sorting:g},onSortingChange:y,getCoreRowModel:(0,aD.getCoreRowModel)(),getSortedRowModel:(0,aD.getSortedRowModel)(),getRowId:e=>e.id}),N=k.getRowModel().rows,C=N.slice((x-1)*10,10*x),T=(0,i.useMemo)(()=>new Map(C.map(e=>[e.original.id,e])),[C]),F=(k.getHeaderGroups()[0]?.headers??[]).map(e=>{let s=e.column.getCanSort(),a=e.column.getIsSorted(),l=e.column.columnDef.meta,r={title:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[e.isPlaceholder?null:(0,aP.flexRender)(e.column.columnDef.header,e.getContext()),s&&(0,t.jsx)(aO.TableHeaderSortDropdown,{sortState:!1!==a&&a,onSortChange:t=>{y(!1===t?[]:[{id:e.column.id,desc:"desc"===t}])},columnId:e.column.id})]}),key:e.id,width:e.column.columnDef.size,render:(t,s)=>{let a=T.get(s.id);if(!a)return null;let l=a.getVisibleCells().find(t=>t.column.id===e.id);return l?(0,aP.flexRender)(l.column.columnDef.cell,l.getContext()):null}};return l?.responsive&&(r.responsive=l.responsive),r}),A=C.map(e=>e.original);return o?(0,t.jsx)(a1,{accessGroupId:o,onBack:()=>d(null)}):(0,t.jsxs)(a3,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(a5,{level:2,style:{margin:0},children:"Access Groups"}),(0,t.jsx)(a6,{type:"secondary",children:"Manage resource permissions for your organization"})]}),a&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>m(!0),children:"Create Access Group"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sz.SearchIcon,{size:16}),placeholder:"Search groups by name, ID, or description...",style:{maxWidth:400},value:u,onChange:e=>p(e.target.value),allowClear:!0}),(0,t.jsx)(sI.Pagination,{current:x,total:N?.length,pageSize:10,onChange:e=>h(e),size:"small",showTotal:e=>`${e} groups`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:F,dataSource:A,rowKey:"id",loading:r,pagination:!1})]}),(0,t.jsx)(a4,{visible:c,onCancel:()=>m(!1)}),(0,t.jsx)(sW.default,{isOpen:!!j,title:"Delete Access Group",message:"Are you sure you want to delete this access group? This action cannot be undone.",resourceInformationTitle:"Access Group Information",resourceInformation:[{label:"ID",value:j?.id,code:!0},{label:"Name",value:j?.name},{label:"Description",value:j?.description||"—"}],onCancel:()=>b(null),onOk:()=>{j&&_.mutate(j.id,{onSuccess:()=>{b(null)}})},confirmLoading:_.isPending})]})}var a9=e.i(510674);let le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder-add",theme:"outlined"};var lt=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:le}))});let ls=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/project/new`,l=await fetch(a,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};function la({form:e}){let{accessToken:s,userId:a,userRole:l}=(0,R.default)(),{data:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)([]);(0,i.useEffect)(()=>{(async()=>{if(s)try{let e=(await (0,w.getGuardrailsList)(s)).guardrails.map(e=>e.guardrail_name);u(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[s]);let p=k.Form.useWatch("team_id",e);return(0,i.useEffect)(()=>{if(p&&r){let e=r.find(e=>e.team_id===p)??null;e&&e.team_id!==n?.team_id&&o(e)}},[p,r,n?.team_id]),(0,i.useEffect)(()=>{a&&l&&s&&n?(0,sZ.fetchTeamModels)(a,l,s,n.team_id).then(e=>{c(Array.from(new Set([...n.models??[],...e])))}):c([])},[n,s,a,l]),(0,t.jsxs)(k.Form,{form:e,layout:"vertical",name:"project_form",initialValues:{isBlocked:!1},style:{marginTop:24},children:[(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:13,color:"#374151",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Basic Information"}),(0,t.jsx)(F.Divider,{style:{marginTop:8,marginBottom:16}}),(0,t.jsxs)(t_.Row,{gutter:24,children:[(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(k.Form.Item,{name:"project_alias",label:"Project Name",rules:[{required:!0,message:"Please enter a project name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. Customer Support Bot"})})}),(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(k.Form.Item,{name:"team_id",label:"Team",rules:[{required:!0,message:"Please select a team"}],children:(0,t.jsx)(N.Select,{showSearch:!0,placeholder:"Search or select a team",onChange:t=>{o(r?.find(e=>e.team_id===t)??null),e.setFieldValue("models",[])},allowClear:!0,optionLabelProp:"label",filterOption:(e,t)=>{let s=r?.find(e=>e.team_id===t?.value);if(!s)return!1;let a=e.toLowerCase().trim();return(s.team_alias||"").toLowerCase().includes(a)||s.team_id.toLowerCase().includes(a)},children:r?.map(e=>(0,t.jsxs)(N.Select.Option,{value:e.team_id,label:e.team_alias||e.team_id,children:[(0,t.jsx)("span",{style:{fontWeight:500},children:e.team_alias})," ",(0,t.jsxs)("span",{style:{color:"#9ca3af"},children:["(",e.team_id,")"]})]},e.team_id))})})})]}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(k.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(S.Input.TextArea,{placeholder:"Describe the purpose of this project",rows:3})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(k.Form.Item,{name:"models",label:"Allowed Models (scoped to selected team's models)",help:n?void 0:"Select a team first to see available models",children:(0,t.jsxs)(N.Select,{mode:"multiple",placeholder:n?"Select models":"Select a team first",disabled:!n,allowClear:!0,maxTagCount:"responsive",onChange:t=>{t.includes("all-team-models")&&e.setFieldsValue({models:["all-team-models"]})},children:[(0,t.jsx)(N.Select.Option,{value:"all-team-models",children:"All Team Models"},"all-team-models"),d.map(e=>(0,t.jsx)(N.Select.Option,{value:e,children:(0,B.getModelDisplayName)(e)},e))]})})})}),(0,t.jsx)(t_.Row,{gutter:24,children:(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(k.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,t.jsx)(A.InputNumber,{prefix:"$",style:{width:"100%"},placeholder:"0.00",min:0,precision:2})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(q.Collapse,{ghost:!0,style:{background:"#f9fafb",borderRadius:8,border:"1px solid #e5e7eb"},items:[{key:"1",label:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{color:"#374151"},children:"Advanced Settings"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sC.Flex,{align:"center",gap:12,children:[(0,t.jsx)(sn.Typography.Text,{strong:!0,children:"Block Project"}),(0,t.jsx)(k.Form.Item,{name:"isBlocked",valuePropName:"checked",noStyle:!0,children:(0,t.jsx)(_.Switch,{})})]}),(0,t.jsx)(k.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.isBlocked!==t.isBlocked,children:({getFieldValue:e})=>e("isBlocked")?(0,t.jsx)(j.Alert,{banner:!0,type:"warning",showIcon:!0,message:"All API requests using keys under this project will be rejected.",style:{marginTop:12}}):null}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(k.Form.Item,{label:"Guardrails",name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:m.map(e=>({value:e,label:e}))})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Model-Specific Limits"}),(0,t.jsx)(k.Form.List,{name:"modelLimits",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(k.Form.Item,{...r,name:[a,"model"],rules:[{required:!0,message:"Missing model"},{validator:(t,s)=>s&&(e.getFieldValue("modelLimits")??[]).filter(e=>e?.model===s).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],children:(0,t.jsx)(S.Input,{placeholder:"Model name (e.g. gpt-4)"})}),(0,t.jsx)(k.Form.Item,{...r,name:[a,"tpm"],children:(0,t.jsx)(A.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(k.Form.Item,{...r,name:[a,"rpm"],children:(0,t.jsx)(A.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(k.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Model Limit"})})]})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Metadata"}),(0,t.jsx)(k.Form.List,{name:"metadata",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(k.Form.Item,{...r,name:[a,"key"],rules:[{required:!0,message:"Missing key"},{validator:(t,s)=>s&&(e.getFieldValue("metadata")??[]).filter(e=>e?.key===s).length>1?Promise.reject(Error("Duplicate key")):Promise.resolve()}],children:(0,t.jsx)(S.Input,{placeholder:"Key"})}),(0,t.jsx)(k.Form.Item,{...r,name:[a,"value"],rules:[{required:!0,message:"Missing value"}],children:(0,t.jsx)(S.Input,{placeholder:"Value"})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(k.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Key-Value Pair"})})]})})]})}]})})})]})}function ll(e){let t={},s={};for(let a of e.modelLimits??[])a.model&&(null!=a.rpm&&(t[a.model]=a.rpm),null!=a.tpm&&(s[a.model]=a.tpm));let a={};for(let t of e.metadata??[])t.key&&(a[t.key]=t.value);return{project_alias:e.project_alias,description:e.description,models:e.models??[],max_budget:e.max_budget,blocked:e.isBlocked??!1,...e.guardrails&&e.guardrails.length>0&&{guardrails:e.guardrails},...Object.keys(t).length>0&&{model_rpm_limit:t},...Object.keys(s).length>0&&{model_tpm_limit:s},...Object.keys(a).length>0&&{metadata:a}}}function lr({isOpen:e,onClose:s}){let[a]=k.Form.useForm(),l=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aA.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return ls(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:a9.projectKeys.all})}})})(),r=async()=>{try{let e=await a.validateFields(),t={...ll(e),team_id:e.team_id};l.mutate(t,{onSuccess:()=>{L.default.success("Project created successfully"),a.resetFields(),s()},onError:e=>{L.default.error(e.message||"Failed to create project")}})}catch(e){console.error("Validation failed:",e)}},i=()=>{a.resetFields(),s()};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:18},children:"Create New Project"}),open:e,onCancel:i,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:i,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(lt,{}),loading:l.isPending,onClick:r,children:"Create Project"},"submit")],children:(0,t.jsx)(la,{form:a})})}let li=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/project/info?project_id=${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()},ln=(0,sP.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"}]]);var aU=aU,sE=sE,lo=e.i(987432);let ld=async(e,t,s)=>{let a=(0,w.getProxyBaseUrl)(),l=`${a}/project/update`,r=await fetch(l,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({project_id:t,...s})});if(!r.ok){let e=await r.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return r.json()};function lc({isOpen:e,project:s,onClose:a,onSuccess:l}){let[r]=k.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aA.useMutation)({mutationFn:async({projectId:t,params:s})=>{if(!e)throw Error("Access token is required");return ld(e,t,s)},onSuccess:()=>{t.invalidateQueries({queryKey:a9.projectKeys.all})}})})();(0,i.useEffect)(()=>{if(e&&s){let e=s.metadata??{},t=e.model_rpm_limit??{},a=e.model_tpm_limit??{},l=Array.isArray(e.guardrails)?e.guardrails:[],i=[];for(let e of new Set([...Object.keys(t),...Object.keys(a)]))i.push({model:e,rpm:t[e],tpm:a[e]});let n=new Set(["model_rpm_limit","model_tpm_limit","guardrails"]),o=[];for(let[t,s]of Object.entries(e))n.has(t)||o.push({key:t,value:String(s)});r.setFieldsValue({project_alias:s.project_alias??"",team_id:s.team_id??"",description:s.description??"",models:s.models??[],max_budget:s.litellm_budget_table?.max_budget??void 0,isBlocked:s.blocked,guardrails:l.length>0?l:void 0,modelLimits:i.length>0?i:void 0,metadata:o.length>0?o:void 0})}},[e,s,r]);let o=async()=>{try{let e=await r.validateFields(),t={...ll(e),team_id:e.team_id};n.mutate({projectId:s.project_id,params:t},{onSuccess:()=>{L.default.success("Project updated successfully"),l?.(),a()},onError:e=>{L.default.error(e.message||"Failed to update project")}})}catch(e){console.error("Validation failed:",e)}};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:18},children:"Edit Project"}),open:e,onCancel:a,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:a,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(lo.SaveOutlined,{}),loading:n.isPending,onClick:o,children:"Save Changes"},"submit")],children:(0,t.jsx)(la,{form:r})})}let{Title:lm,Text:lu}=sn.Typography,{Content:lp}=sT.Layout;function lx({projectId:e,onBack:s}){let a,l,r,n,{data:o,isLoading:d}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aL.useQueryClient)();return(0,t1.useQuery)({queryKey:a9.projectKeys.detail(e),queryFn:async()=>li(t,e),enabled:!!(t&&e)&&ew.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(a9.projectKeys.list({}));return t?.find(t=>t.project_id===e)}})})(e),{data:c}=(0,eV.useTeam)(o?.team_id??void 0),m=c?.team_info??c,{token:u}=sA.theme.useToken(),[p,x]=(0,i.useState)(!1),h=o?.spend??0,g=o?.litellm_budget_table?.max_budget??null,y=null!=g&&g>0,j=y?Math.min(h/g*100,100):0,f=(0,i.useMemo)(()=>Object.entries(o?.model_spend??{}).map(([e,t])=>({model:e,spend:t})).sort((e,t)=>t.spend-e.spend),[o?.model_spend]);return d?(0,t.jsx)(lp,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"large"})})}):o?(0,t.jsxs)(lp,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(lm,{level:2,style:{margin:0},children:o.project_alias??o.project_id}),(0,t.jsx)(I.Tag,{color:o.blocked?"red":"green",children:o.blocked?"Blocked":"Active"})]}),(0,t.jsxs)(lu,{type:"secondary",children:["ID: ",(0,t.jsx)(lu,{copyable:!0,children:o.project_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(aU.default,{size:16}),onClick:()=>x(!0),children:"Edit Project"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eA.Descriptions,{title:"Project Details",column:1,children:[(0,t.jsx)(eA.Descriptions.Item,{label:"Description",children:o.description||"—"}),(0,t.jsxs)(eA.Descriptions.Item,{label:"Created",children:[new Date(o.created_at).toLocaleString(),o.created_by&&(0,t.jsxs)(lu,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:o.created_by})]})]}),(0,t.jsxs)(eA.Descriptions.Item,{label:"Last Updated",children:[new Date(o.updated_at).toLocaleString(),o.updated_by&&(0,t.jsxs)(lu,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:o.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:8,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(ln,{size:16}),"Budget"]}),style:{height:"100%"},children:(0,t.jsxs)(sC.Flex,{vertical:!0,gap:16,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(lu,{strong:!0,style:{fontSize:28,lineHeight:1},children:["$",h.toFixed(2)]}),(0,t.jsx)("br",{}),(0,t.jsx)(lu,{type:"secondary",children:y?`of $${g.toFixed(2)} budget`:"No budget limit"})]}),y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(sF.Progress,{percent:Math.round(10*j)/10,strokeColor:j>=90?"#f5222d":j>=70?"#faad14":"#52c41a",showInfo:!1}),(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:[(Math.round(10*j)/10).toFixed(1),"% utilized"]})]})]})})}),(0,t.jsx)(tv.Col,{xs:24,lg:16,children:(0,t.jsx)(ts.Card,{title:"Spend by Model",style:{height:"100%"},children:f.length>0?(0,t.jsx)(so.BarChart,{data:f,index:"model",categories:["spend"],colors:["cyan"],layout:"vertical",valueFormatter:e=>`$${e.toFixed(4)}`,yAxisWidth:140,showLegend:!1,style:{height:Math.max(40*f.length,120)}}):(0,t.jsx)(aB.Empty,{description:"No model spend recorded yet",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sM.KeyIcon,{size:16}),"Keys"]}),style:{height:"100%"},children:(0,t.jsx)(aB.Empty,{description:"No keys to display",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sE.default,{size:16}),"Team"]}),style:{height:"100%"},children:m?(a=m.max_budget??null,l=m.spend??0,n=(r=null!=a&&a>0)?Math.min(l/a*100,100):0,(0,t.jsxs)(sC.Flex,{vertical:!0,gap:12,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lu,{strong:!0,style:{fontSize:16},children:m.team_alias||m.team_id}),(0,t.jsx)("br",{}),(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:["ID:"," ",(0,t.jsx)(lu,{copyable:!0,style:{fontSize:12},children:m.team_id})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lu,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"Models"}),(m.models?.length??0)>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:4,style:{maxHeight:60,overflow:"hidden"},children:m.models?.map(e=>(0,t.jsx)(I.Tag,{style:{margin:0},children:e},e))}):(0,t.jsx)(lu,{type:"secondary",children:"All models"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:2},children:[(0,t.jsx)(lu,{type:"secondary",style:{fontSize:12},children:"Spend"}),(0,t.jsxs)(lu,{style:{fontSize:12},children:["$",l.toFixed(2),r?(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:[" ","/ $",a.toFixed(2)]}):(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:[" ","(Unlimited)"]})]})]}),r&&(0,t.jsx)(sF.Progress,{percent:Math.round(10*n)/10,strokeColor:n>=90?"#f5222d":n>=70?"#faad14":"#52c41a",size:"small",showInfo:!1})]}),(0,t.jsxs)(sC.Flex,{justify:"space-between",children:[(0,t.jsx)(lu,{type:"secondary",style:{fontSize:12},children:"Members"}),(0,t.jsx)(lu,{style:{fontSize:12},children:m.members_with_roles?.length??0})]})]})):o.team_id?(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{padding:16},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})}):(0,t.jsx)(aB.Empty,{description:"No team assigned",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(lc,{isOpen:p,project:o,onClose:()=>x(!1)})]}):(0,t.jsxs)(lp,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aB.Empty,{description:"Project not found"})]})}let{Title:lh,Text:lg}=sn.Typography,{Content:ly}=sT.Layout;function lj(){let{token:e}=sA.theme.useToken(),{data:s,isLoading:a}=(0,a9.useProjects)(),{data:l,isLoading:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(""),[p,x]=(0,i.useState)(1);(0,i.useEffect)(()=>{x(1)},[m]);let h=(0,i.useMemo)(()=>{let e=new Map;for(let t of l??[])e.set(t.team_id,t.team_alias??t.team_id);return e},[l]),g=(0,i.useMemo)(()=>{let e=s??[];if(!m)return e;let t=m.toLowerCase();return e.filter(e=>{let s=h.get(e.team_id??"")??"";return(e.project_alias??"").toLowerCase().includes(t)||e.project_id.toLowerCase().includes(t)||(e.description??"").toLowerCase().includes(t)||s.toLowerCase().includes(t)})},[s,m,h]),y=[{title:"ID",dataIndex:"project_id",key:"project_id",width:170,render:e=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(lg,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>o(e),children:e})})},{title:"Name",dataIndex:"project_alias",key:"project_alias",sorter:(e,t)=>(e.project_alias??"").localeCompare(t.project_alias??""),render:e=>e??"—"},{title:"Team",key:"team",sorter:(e,t)=>{let s=h.get(e.team_id??"")??"",a=h.get(t.team_id??"")??"";return s.localeCompare(a)},render:(e,s)=>{if(!s.team_id)return"—";let a=h.get(s.team_id);return a||(r?(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}):s.team_id)}},{title:"Models",key:"models",render:(e,s)=>{let a=s.models??[];return(0,t.jsx)(f.Tooltip,{title:a.length>0?a.join(", "):"No models",children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),a.length]})})})}},{title:"Status",dataIndex:"blocked",key:"status",render:e=>(0,t.jsx)(I.Tag,{color:e?"red":"green",children:e?"Blocked":"Active"})},{title:"Created",dataIndex:"created_at",key:"created_at",sorter:(e,t)=>new Date(e.created_at).getTime()-new Date(t.created_at).getTime(),responsive:["lg"],render:e=>new Date(e).toLocaleDateString()},{title:"Updated",dataIndex:"updated_at",key:"updated_at",responsive:["xl"],render:e=>new Date(e).toLocaleDateString()}];return n?(0,t.jsx)(lx,{projectId:n,onBack:()=>o(null)}):(0,t.jsxs)(ly,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(lh,{level:2,style:{margin:0},children:"Projects"}),(0,t.jsx)(lg,{type:"secondary",children:"Manage projects within your teams"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>c(!0),children:"Create Project"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sz.SearchIcon,{size:16}),placeholder:"Search projects by name, ID, description, or team...",style:{maxWidth:400},value:m,onChange:e=>u(e.target.value),allowClear:!0}),(0,t.jsx)(sI.Pagination,{current:p,total:g.length,pageSize:10,onChange:e=>x(e),size:"small",showTotal:e=>`${e} projects`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:y,dataSource:g.slice((p-1)*10,10*p),rowKey:"project_id",loading:a,pagination:!1})]}),(0,t.jsx)(lr,{isOpen:d,onClose:()=>c(!1)})]})}var lf=e.i(241902);let lb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"};var l_=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:lb}))}),lv=e.i(366308);let lw=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"},{value:"blocked",label:"blocked",color:"#991b1b",bg:"#fee2e2",border:"#fca5a5"}],lk=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"}],lN=({value:e,toolName:s,saving:a,onChange:l,policyType:r="input",size:i="small",minWidth:n=110,stopPropagation:o=!0})=>{let d="output"===r?lk:lw,c=lw.find(t=>t.value===e)??lw[0];return(0,t.jsx)(N.Select,{size:i,value:e,disabled:a,loading:a,onChange:e=>l(s,e),onClick:e=>o&&e.stopPropagation(),style:{minWidth:n,fontWeight:500,backgroundColor:c.bg,borderColor:c.border,color:c.color,borderRadius:999,fontSize:"small"===i?11:12},popupMatchSelectWidth:!1,options:d.map(e=>({value:e.value,label:(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,fontWeight:500,color:e.color},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:e.color,display:"inline-block",flexShrink:0}}),e.label]})}))})},lS="tool-detail";function lC({toolName:e,onBack:s,accessToken:a}){let l=(0,aL.useQueryClient)(),[r,n]=(0,i.useState)(!1),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)("team"),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(null),j=(0,i.useMemo)(()=>{let e,t,s;return e=new Date,(t=new Date).setDate(t.getDate()-90),{start:(s=e=>e.toISOString().slice(0,19).replace("T"," "))(t),end:s(e)}},[]),{data:f,isLoading:b,error:_}=(0,t1.useQuery)({queryKey:[lS,e],queryFn:()=>(0,w.fetchToolDetail)(a,e),enabled:!!a&&!!e}),{data:v}=(0,t1.useQuery)({queryKey:["tool-policy-options"],queryFn:()=>(0,w.fetchToolPolicyOptions)(a),enabled:!!a,staleTime:6e4}),{data:k}=(0,t1.useQuery)({queryKey:["teams-list-tool-detail"],queryFn:()=>(0,w.teamListCall)(a,null,null),enabled:!!a}),{data:S}=(0,t1.useQuery)({queryKey:["keys-list-tool-detail"],queryFn:()=>(0,w.keyListCall)(a,null,null,null,null,null,1,100),enabled:!!a}),{data:C,isLoading:T}=(0,t1.useQuery)({queryKey:["tool-usage-logs",e,j.start,j.end],queryFn:()=>(0,w.getToolUsageLogs)(a,e,{page:1,pageSize:50,startDate:j.start,endDate:j.end}),enabled:!!a&&!!e}),I=(0,i.useMemo)(()=>(C?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:"passed",model:e.model??void 0,input_snippet:e.input_snippet??void 0})),[C?.logs]);(0,i.useMemo)(()=>(Array.isArray(k)?k:k?.data??[]).map(e=>({team_id:e.team_id??e.id??"",team_alias:e.team_alias??e.team_id??"",models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:"",created_at:"",keys:[],members_with_roles:[],spend:0})),[k]);let F=(0,i.useMemo)(()=>(S?.keys??S?.data??[]).map(e=>({token:e.token??e.api_key??e.key_hash??"",key_alias:e.key_alias??(e.token??e.api_key??e.key_hash)?.toString?.()?.substring?.(0,8)})),[S]),A=(0,i.useCallback)(()=>{l.invalidateQueries({queryKey:[lS,e]})},[l,e]),L=(0,i.useCallback)(async(t,s)=>{if(a){d(!0);try{await (0,w.updateToolPolicy)(a,e,{input_policy:s}),A()}catch(e){alert(`Failed to update input policy: ${e instanceof Error?e.message:String(e)}`)}finally{d(!1)}}},[a,e,A]),M=(0,i.useCallback)(async(t,s)=>{if(a){m(!0);try{await (0,w.updateToolPolicy)(a,e,{output_policy:s}),A()}catch(e){alert(`Failed to update output policy: ${e instanceof Error?e.message:String(e)}`)}finally{m(!1)}}},[a,e,A]),P=(0,i.useCallback)(async()=>{if(!a||!e)return;let t="team"===u;if((!t||x)&&(t||g?.token)){n(!0);try{await (0,w.updateToolPolicy)(a,e,{input_policy:"blocked"},{team_id:t?x:void 0,key_hash:t?void 0:g.token,key_alias:t?void 0:g.key_alias}),A(),h(null),y(null)}catch(e){alert(`Failed to add override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,u,x,g,A]),D=(0,i.useCallback)(async t=>{if(a&&e){n(!0);try{await (0,w.deleteToolPolicyOverride)(a,e,{team_id:t.team_id??void 0,key_hash:t.key_hash??void 0}),A()}catch(e){alert(`Failed to remove override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,A]);if(b&&!f)return(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})});if(_&&!f)return(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load tool details."})]});if(!f)return null;let{tool:z,overrides:E}=f,O=v?.input_policies?.find(e=>e.value===z.input_policy)?.description,R=v?.output_policies?.find(e=>e.value===z.output_policy)?.description;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1 flex-wrap",children:[(0,t.jsx)(lv.ToolOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900 font-mono",children:z.tool_name}),(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-gray-100 text-gray-700 border border-gray-200",children:z.origin??"—"}),(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:[(z.call_count??0).toLocaleString()," calls"]})]}),(0,t.jsxs)("dl",{className:"mt-3 flex flex-wrap gap-x-6 gap-y-1 text-sm text-gray-600",children:[z.user_agent&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"User Agent:"}),(0,t.jsx)("dd",{className:"font-mono truncate max-w-[40ch]",title:z.user_agent,children:z.user_agent})]}),z.created_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"First Discovered:"}),(0,t.jsx)("dd",{children:new Date(z.created_at).toLocaleString()})]}),z.last_used_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"Last Used:"}),(0,t.jsx)("dd",{children:new Date(z.last_used_at).toLocaleString()})]})]})]})})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Input Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:O??"Controls what data this tool is allowed to accept."}),(0,t.jsx)(lN,{value:z.input_policy,toolName:z.tool_name,saving:o,onChange:L,policyType:"input",size:"middle",minWidth:140,stopPropagation:!1})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Output Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:R??"Controls how this tool's output is trusted by downstream tools."}),(0,t.jsx)(lN,{value:z.output_policy,toolName:z.tool_name,saving:c,onChange:M,policyType:"output",size:"middle",minWidth:140,stopPropagation:!1})]})]}),E.length>0&&(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Blocked for team or key"}),(0,t.jsx)("ul",{className:"border rounded-md divide-y divide-gray-100 bg-red-50/30",children:E.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between px-3 py-2.5 text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-700",children:[e.team_id?`Team: ${e.team_id}`:"",e.team_id&&e.key_hash?" · ":"",e.key_hash?`Key: ${e.key_alias||e.key_hash.substring(0,8)}`:"",e.team_id||e.key_hash?"":"—"]}),(0,t.jsx)(V.Button,{type:"link",danger:!0,size:"small",disabled:r,onClick:()=>D(e),children:"Remove"})]},e.override_id))})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Block for team or key"}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 max-w-md",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Scope"}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"team"===u,onChange:()=>p("team"),className:"align-middle"}),"Team"]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"key"===u,onChange:()=>p("key"),className:"align-middle"}),"Key"]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"team"===u?"Team":"Key"}),"team"===u?(0,t.jsx)($.default,{value:x??void 0,onChange:e=>h(e||null)}):(0,t.jsx)(N.Select,{placeholder:"Select key",allowClear:!0,showSearch:!0,optionFilterProp:"label",value:g?g.token:void 0,onChange:e=>{y(F.find(t=>t.token===e)??null)},options:F.map(e=>({value:e.token,label:e.key_alias||e.token?.substring?.(0,12)||e.token})),className:"w-full",style:{minWidth:200}})]}),(0,t.jsxs)(V.Button,{type:"primary",danger:!0,disabled:r||("team"===u?!x:!g?.token),loading:r,onClick:P,children:["Block for ",u]})]})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2",children:[(0,t.jsx)(l_,{}),"Recent logs"]}),(0,t.jsx)(st,{guardrailName:z.tool_name,filterAction:"passed",logs:I,logsLoading:T,totalLogs:C?.total??0,accessToken:a,startDate:j.start,endDate:j.end})]})]})]})}var lT=e.i(307582),lI=e.i(969550);function lF(e){return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`}function lA(e,t){if(!e)return!1;try{let s=new Date(e);return lF(s)===t}catch{return!1}}function lL(e,t){return e.filter(e=>lA(e.created_at,t)).length}let lM=({accessToken:e,onSelectTool:s})=>{let[a,l]=(0,i.useState)([]),[r,n]=(0,i.useState)(!0),[o,h]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[j,b]=(0,i.useState)(null),[v,k]=(0,i.useState)(null),[N,S]=(0,i.useState)(""),[C,T]=(0,i.useState)("created_at"),[I,F]=(0,i.useState)("desc"),[A,L]=(0,i.useState)(1),[M,P]=(0,i.useState)(!0),[D,z]=(0,i.useState)({}),E=(0,i.useDeferredValue)(o),O=o||E,R=(0,i.useCallback)(async()=>{if(e){h(!0),y(null);try{let t=await (0,w.fetchToolsList)(e);l(t)}catch(e){y(e.message??"Failed to load tools")}finally{h(!1),n(!1)}}},[e]);(0,i.useEffect)(()=>{R()},[R]),(0,i.useEffect)(()=>{if(!M)return;let e=setInterval(R,15e3);return()=>clearInterval(e)},[M,R]);let B=async(t,s)=>{if(e){b(t);try{await (0,w.updateToolPolicy)(e,t,{input_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,input_policy:s}:e))}catch(e){alert(`Failed to update input policy: ${e.message}`)}finally{b(null)}}},$=async(t,s)=>{if(e){k(t);try{await (0,w.updateToolPolicy)(e,t,{output_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,output_policy:s}:e))}catch(e){alert(`Failed to update output policy: ${e.message}`)}finally{k(null)}}},q=Array.from(new Set(a.map(e=>e.team_id).filter(Boolean))).map(e=>({label:e,value:e})),U=Array.from(new Set(a.map(e=>e.key_alias).filter(Boolean))).map(e=>({label:e,value:e})),V=[{name:"Input Policy",label:"Input Policy",options:lw.map(e=>({label:e.label,value:e.value}))},{name:"Output Policy",label:"Output Policy",options:lk.map(e=>({label:e.label,value:e.value}))},{name:"Team Name",label:"Team Name",options:q},{name:"Key Name",label:"Key Name",options:U}],{newToday:H,newYesterday:G,trendSubtitle:K,totalTools:W,blockedCount:Q,activeTeamsCount:Y,needsReviewTools:J}=(0,i.useMemo)(()=>{let e=new Date,t=lF(e),s=new Date(e);s.setUTCDate(s.getUTCDate()-1);let l=lF(s),r=lL(a,t),i=lL(a,l),n=function(e,t){let s=e-t;if(0!==s)return s>0?`+${s} since yesterday`:`${s} since yesterday`}(r,i),o=a.length,d=a.filter(e=>"blocked"===e.input_policy).length;return{newToday:r,newYesterday:i,trendSubtitle:n,totalTools:o,blockedCount:d,activeTeamsCount:new Set(a.map(e=>e.team_id).filter(Boolean)).size,needsReviewTools:a.filter(e=>lA(e.created_at,t)&&"untrusted"===e.input_policy)}},[a]),X=({label:e,field:s})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(aO.TableHeaderSortDropdown,{sortState:C===s&&I,onSortChange:e=>{!1===e?(T("created_at"),F("desc")):(T(s),F(e)),L(1)}})]}),Z=a.filter(e=>{if(N){let t=N.toLowerCase();if(!(e.tool_name.toLowerCase().includes(t)||(e.team_id??"").toLowerCase().includes(t)||(e.key_alias??"").toLowerCase().includes(t)||(e.key_hash??"").toLowerCase().includes(t)||e.input_policy.toLowerCase().includes(t)||e.output_policy.toLowerCase().includes(t)))return!1}return(!D["Input Policy"]||e.input_policy===D["Input Policy"])&&(!D["Output Policy"]||e.output_policy===D["Output Policy"])&&(!D["Team Name"]||e.team_id===D["Team Name"])&&(!D["Key Name"]||e.key_alias===D["Key Name"])}),ee=[...Z].sort((e,t)=>{let s=e[C]??"",a=t[C]??"";return sa?"desc"===I?-1:1:0}),et=Math.max(1,Math.ceil(ee.length/50)),es=ee.slice((A-1)*50,50*A);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Tool Policies"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ss,{label:"New Today",value:H,valueColor:"text-green-600",subtitle:K,icon:(0,t.jsx)("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})})}),(0,t.jsx)(ss,{label:"Total Tools Discovered",value:W}),(0,t.jsx)(ss,{label:"Blocked Tools",value:Q,valueColor:Q>0?"text-red-600":void 0}),(0,t.jsx)(ss,{label:"Active Teams",value:Y>0?Y:"—"})]}),J.length>0&&(0,t.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-6",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-amber-900 mb-1",children:"Needs Review"}),(0,t.jsxs)("p",{className:"text-sm text-amber-800 mb-3",children:[J.length," new tool",1!==J.length?"s":""," discovered that require policy decisions."]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:J.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-white border border-amber-200 rounded-md text-sm",children:[(0,t.jsx)("span",{className:"font-mono text-amber-900 truncate max-w-[200px]",title:e.tool_name,children:e.tool_name}),(0,t.jsx)("button",{type:"button",onClick:()=>(e=>{let t=ee.findIndex(t=>t.tool_id===e);if(t>=0){let s=Math.floor(t/50)+1;s!==A&&L(s),requestAnimationFrame(()=>{setTimeout(()=>{document.getElementById(`tool-row-${e}`)?.scrollIntoView({behavior:"smooth",block:"center"})},100)})}})(e.tool_id),className:"text-amber-700 hover:text-amber-900 font-medium text-xs whitespace-nowrap",children:"Review"})]},e.tool_id))})]}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("div",{className:"relative w-64",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Tool Name",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:N,onChange:e=>{S(e.target.value),L(1)}}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(_.Switch,{checked:M,onChange:P})]}),(0,t.jsxs)("button",{onClick:R,disabled:O,className:"flex items-center gap-1.5 px-3 py-2 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-60",children:[(0,t.jsx)("svg",{className:`w-4 h-4 ${O?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),O?"Fetching":"Fetch"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm text-gray-600 whitespace-nowrap",children:[(0,t.jsxs)("span",{children:["Showing ",0===Z.length?0:(A-1)*50+1," -"," ",Math.min(50*A,Z.length)," of ",Z.length," results"]}),(0,t.jsxs)("span",{children:["Page ",A," of ",et]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>L(e=>Math.max(1,e-1)),disabled:1===A,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>L(e=>Math.min(et,e+1)),disabled:A===et,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(lI.default,{options:V,onApplyFilters:e=>{z(e),L(1)},onResetFilters:()=>{z({}),L(1)},buttonLabel:"Filters"})})]}),M&&(0,t.jsxs)("div",{className:"bg-green-50 border-b border-green-100 px-6 py-2 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"}),(0,t.jsx)("button",{onClick:()=>P(!1),className:"text-xs text-green-600 underline",children:"Stop"})]}),g&&(0,t.jsx)("div",{className:"mx-6 mt-4 p-3 bg-red-50 border border-red-200 rounded text-sm text-red-700",children:g}),(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 w-full",children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Discovered",field:"created_at"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Tool Name",field:"tool_name"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Input Policy",field:"input_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Output Policy",field:"output_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"# Calls",field:"call_count"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Team Name",field:"team_id"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"Key Hash"}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Key Name",field:"key_alias"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"User Agent"})]})}),(0,t.jsx)(c.TableBody,{children:r?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"Loading tools…"})}):0===es.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"No tools discovered yet. Make a chat completion that returns tool_calls to start auto-discovery."})}):es.map(e=>(0,t.jsxs)(x.TableRow,{id:`tool-row-${e.tool_id}`,className:"h-8 hover:bg-gray-50",children:[(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(lT.TimeCell,{utcTime:e.created_at??""})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden",children:(0,t.jsx)("button",{type:"button",onClick:()=>s?.(e.tool_name),className:"text-left w-full font-mono text-xs max-w-[20ch] truncate block font-medium text-blue-600 hover:text-blue-800 hover:underline focus:outline-none focus:ring-0",children:(0,t.jsx)(f.Tooltip,{title:s?"Click to view details and block for team/key":e.tool_name,children:(0,t.jsx)("span",{children:e.tool_name})})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lN,{value:e.input_policy,toolName:e.tool_name,saving:j===e.tool_name,onChange:B,policyType:"input"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lN,{value:e.output_policy,toolName:e.tool_name,saving:v===e.tool_name,onChange:$,policyType:"output"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)("div",{className:"flex items-center justify-end h-8 tabular-nums text-sm font-mono text-gray-700",children:(e.call_count??0).toLocaleString()})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.team_id??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.team_id??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_hash??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block text-blue-600",children:e.key_hash??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_alias??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.key_alias??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.user_agent??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[20ch] truncate block text-xs text-gray-500",children:e.user_agent??"-"})})})]},e.tool_id))})]}),et>1&&(0,t.jsxs)("div",{className:"border-t px-6 py-3 flex items-center justify-between text-sm text-gray-600",children:[(0,t.jsxs)("span",{children:["Showing ",(A-1)*50+1," - ",Math.min(50*A,ee.length)," of"," ",ee.length]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>L(e=>Math.max(1,e-1)),disabled:1===A,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>L(e=>Math.min(et,e+1)),disabled:A===et,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]})]})};function lP({accessToken:e,userRole:s}){let[a,l]=(0,i.useState)({type:"overview"});return(0,t.jsx)("div",{className:"p-6 w-full min-w-0 flex-1",children:"detail"===a.type?(0,t.jsx)(lC,{toolName:a.toolName,onBack:()=>{l({type:"overview"})},accessToken:e}):(0,t.jsx)(lM,{accessToken:e,userRole:s,onSelectTool:e=>{l({type:"detail",toolName:e})}})})}var lD=e.i(608856),lz=e.i(751904),lE=e.i(123521);let{Text:lO}=sn.Typography,lR=({open:e,mode:s,initialRow:a,onClose:l,onSave:r})=>{let[n]=k.Form.useForm(),[o,d]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&("edit"===s&&a?n.setFieldsValue({key:a.key,value:a.value,metadata:null!=a.metadata?JSON.stringify(a.metadata,null,2):""}):n.resetFields())},[e,s,a,n]);let c=async()=>{let e=await n.validateFields();d(!0);let t=await r(e.key.trim(),e.value??"",e.metadata??"","create"===s);d(!1),t&&(n.resetFields(),l())};return(0,t.jsx)(y.Modal,{open:e,title:"create"===s?"Create memory":`Edit ${a?.key??""}`,onCancel:()=>{n.resetFields(),l()},onOk:c,okText:"create"===s?"Create":"Save",confirmLoading:o,width:640,destroyOnClose:!0,children:(0,t.jsxs)(k.Form,{form:n,layout:"vertical",children:[(0,t.jsx)(k.Form.Item,{label:"Key",name:"key",rules:[{required:!0,message:"Key is required"}],tooltip:"Globally unique — two memories cannot share a key. Namespace your own keys if you need per-user isolation (e.g. user:123:notes).",children:(0,t.jsx)(S.Input,{placeholder:"e.g. user_role",disabled:"edit"===s})}),(0,t.jsx)(k.Form.Item,{label:"Value",name:"value",rules:[{required:!0,message:"Value is required"}],tooltip:"Markdown/text injected into LLM context. Plain strings are fine.",children:(0,t.jsx)(S.Input.TextArea,{rows:8,placeholder:"What the agent should remember…"})}),(0,t.jsx)(k.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata ",(0,t.jsx)(lO,{type:"secondary",children:"(optional JSON)"})]}),name:"metadata",tooltip:"Optional structured metadata — must be valid JSON if provided.",children:(0,t.jsx)(S.Input.TextArea,{rows:4,placeholder:'{"tags": ["example"]}',style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"}})})]})})},{Text:lB,Paragraph:l$,Title:lq}=sn.Typography;function lU(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}let lV=({accessToken:e})=>{let[s,a]=(0,i.useState)(""),[l,r]=(0,i.useState)(""),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(null),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(1);i.default.useEffect(()=>{g(1)},[l]);let y=(0,aL.useQueryClient)(),j="memoryList",{data:b,isLoading:_,isFetching:v}=(0,t1.useQuery)({queryKey:[j,l,h],queryFn:()=>{if(!e)throw Error("Access token required");return(0,w.fetchMemoryList)(e,{keyPrefix:l||void 0,page:h,pageSize:50})},enabled:!!e}),k=(0,i.useMemo)(()=>b?.memories??[],[b]),N=b?.total??0,C=()=>y.invalidateQueries({queryKey:[j]}),T=(0,aA.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");return(0,w.createMemory)(e,t)},onSuccess:e=>{sL.message.success(`Created ${e.key}`),C()},onError:e=>{sL.message.error(`Save failed: ${e.message}`)}}),I=(0,aA.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");let{key:s,...a}=t;return(0,w.updateMemory)(e,s,a)},onSuccess:e=>{sL.message.success(`Updated ${e.key}`),C()},onError:e=>{sL.message.error(`Save failed: ${e.message}`)}}),F=(0,aA.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");return(0,w.deleteMemory)(e,t).then(()=>t)},onSuccess:e=>{sL.message.success(`Deleted ${e}`),C()},onError:e=>{sL.message.error(`Delete failed: ${e.message}`)}}),A=async()=>{if(m)try{await F.mutateAsync(m.key),u(null)}catch{}},L=async(t,s,a,l)=>{let r;if(!e)return!1;if(a.trim())try{r=JSON.parse(a)}catch{return sL.message.error("Metadata must be valid JSON (or leave empty)."),!1}else r=l?void 0:null;try{return l?await T.mutateAsync({key:t,value:s,metadata:r}):await I.mutateAsync({key:t,value:s,metadata:r}),!0}catch{return!1}},M=(e,s)=>{if(!e)return(0,t.jsx)(lB,{type:"secondary",children:"-"});let a=e.length>10?`${e.slice(0,7)}...`:e,l="font-mono text-blue-600 bg-blue-50 text-xs font-medium px-2 py-0.5 rounded-md border border-blue-200 inline-block max-w-[15ch] truncate whitespace-nowrap";return(0,t.jsx)(f.Tooltip,{title:e,children:s?(0,t.jsx)("button",{onClick:s,className:`${l} hover:bg-blue-100 cursor-pointer transition-colors text-left`,children:a}):(0,t.jsx)("span",{className:l,children:a})})},P=[{title:"ID",dataIndex:"memory_id",key:"memory_id",width:140,render:(e,t)=>M(t.memory_id,()=>o(t))},{title:"Name",dataIndex:"key",key:"key",width:200,render:e=>(0,t.jsx)(lB,{code:!0,children:e})},{title:"Preview",dataIndex:"value",key:"value",render:e=>(0,t.jsx)(lB,{type:"secondary",style:{whiteSpace:"pre-wrap"},children:function(e,t=120){if(!e)return"";let s=e.trim();return s.length<=t?s:`${s.slice(0,t)}…`}(e)})},{title:"User ID",dataIndex:"user_id",key:"user_id",width:160,render:e=>M(e)},{title:"Team ID",dataIndex:"team_id",key:"team_id",width:160,render:e=>M(e)},{title:"Updated",dataIndex:"updated_at",key:"updated_at",width:180,render:e=>(0,t.jsx)(lB,{type:"secondary",children:lU(e)})},{title:"",key:"actions",width:140,render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(V.Button,{size:"small",type:"text",icon:(0,t.jsx)(lE.EyeOutlined,{}),onClick:()=>o(s),"aria-label":"View"}),(0,t.jsx)(V.Button,{size:"small",type:"text",icon:(0,t.jsx)(lz.EditOutlined,{}),onClick:()=>c(s),"aria-label":"Edit"}),(0,t.jsx)(V.Button,{size:"small",type:"text",danger:!0,icon:(0,t.jsx)(tt.DeleteOutlined,{}),onClick:()=>{u(s)},"aria-label":"Delete"})]})}];return(0,t.jsxs)("div",{className:"w-full",style:{padding:24},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lq,{level:3,style:{marginBottom:4},children:"Memory"}),(0,t.jsxs)(l$,{type:"secondary",style:{marginBottom:0},children:["Inspect what your agents have stored under ",(0,t.jsx)(lB,{code:!0,children:"/v1/memory"}),". Scoped to memories visible to your user / team (admins see all)."]})]}),(0,t.jsxs)(ts.Card,{children:[(0,t.jsxs)(U.Space,{style:{width:"100%",justifyContent:"space-between",marginBottom:16},wrap:!0,children:[(0,t.jsxs)(U.Space,{children:[(0,t.jsx)(S.Input,{allowClear:!0,placeholder:'Filter by key prefix, e.g. "user:"',prefix:(0,t.jsx)(al.SearchOutlined,{}),value:s,onChange:e=>a(e.target.value),onPressEnter:()=>r(s.trim()),onClear:()=>{a(""),r("")},style:{width:280}}),(0,t.jsx)(V.Button,{type:"primary",ghost:!0,onClick:()=>r(s.trim()),children:"Search"}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>C(),loading:v&&!_,children:"Refresh"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>x(!0),children:"New memory"})]}),(0,t.jsx)(te.Table,{rowKey:"memory_id",loading:_,dataSource:k,columns:P,pagination:{current:h,pageSize:50,total:N,showSizeChanger:!1,showTotal:(e,t)=>`${t[0]}–${t[1]} of ${e}`,onChange:e=>g(e)},locale:{emptyText:(0,t.jsx)(aB.Empty,{description:l?`No memories with keys starting with "${l}"`:"No memories stored yet"})}})]})]}),(0,t.jsx)(lD.Drawer,{open:!!n,onClose:()=>o(null),title:n?(0,t.jsx)(U.Space,{children:(0,t.jsx)(lB,{code:!0,children:n.key})}):"Memory",width:720,destroyOnClose:!0,children:n&&(0,t.jsxs)(U.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(U.Space,{size:"large",wrap:!0,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lB,{strong:!0,style:{display:"block"},children:"Memory ID"}),(0,t.jsx)(lB,{code:!0,style:{fontSize:12},children:n.memory_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lB,{strong:!0,style:{display:"block"},children:"User ID"}),(0,t.jsx)(lB,{type:n.user_id?void 0:"secondary",children:n.user_id??"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lB,{strong:!0,style:{display:"block"},children:"Team ID"}),(0,t.jsx)(lB,{type:n.team_id?void 0:"secondary",children:n.team_id??"-"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lB,{strong:!0,children:"Value"}),(0,t.jsx)(l$,{style:{background:"#fafafa",padding:12,borderRadius:6,whiteSpace:"pre-wrap",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:13},children:n.value})]}),void 0!==n.metadata&&null!==n.metadata&&(0,t.jsxs)("div",{children:[(0,t.jsx)(lB,{strong:!0,children:"Metadata"}),(0,t.jsx)(l$,{style:{background:"#fafafa",padding:12,borderRadius:6,whiteSpace:"pre-wrap",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:12},children:JSON.stringify(n.metadata,null,2)})]}),(0,t.jsxs)(U.Space,{split:(0,t.jsx)(lB,{type:"secondary",children:"·"}),wrap:!0,size:"small",style:{color:"rgba(0,0,0,0.45)"},children:[(0,t.jsxs)(lB,{type:"secondary",children:["Created ",lU(n.created_at),n.created_by?` by ${n.created_by}`:""]}),(0,t.jsxs)(lB,{type:"secondary",children:["Updated ",lU(n.updated_at),n.updated_by?` by ${n.updated_by}`:""]})]})]})}),(0,t.jsx)(lR,{open:p||!!d,mode:d?"edit":"create",initialRow:d??void 0,onClose:()=>{x(!1),c(null)},onSave:L}),(0,t.jsx)(sW.default,{isOpen:!!m,title:"Delete memory",message:"This action cannot be undone.",resourceInformationTitle:"Memory",resourceInformation:m?[{label:"Key",value:m.key,code:!0},{label:"Memory ID",value:m.memory_id,code:!0},{label:"User ID",value:m.user_id??"-",code:!0},{label:"Team ID",value:m.team_id??"-",code:!0}]:[],onCancel:()=>{F.isPending||u(null)},onOk:A,confirmLoading:F.isPending,requiredConfirmation:m?.key})]})},{Text:lH}=sn.Typography,lG={pending:"#a1a1aa",running:"#3b82f6",paused:"#f59e0b",completed:"#22c55e",failed:"#ef4444"},lK={"step.started":{bar:"#f0fdf4",border:"#86efac",text:"#16a34a"},"step.failed":{bar:"#fef2f2",border:"#fca5a5",text:"#dc2626"},"hook.waiting":{bar:"#fffbeb",border:"#fcd34d",text:"#d97706"},"hook.received":{bar:"#eff6ff",border:"#93c5fd",text:"#2563eb"}};function lW(e){let t=Date.now()-new Date(e).getTime();if(isNaN(t))return e;let s=Math.floor(t/1e3);if(s<60)return`${s}s ago`;let a=Math.floor(s/60);if(a<60)return`${a}m ago`;let l=Math.floor(a/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function lQ(e){return e<0?"":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function lY(e){let t=e.metadata?.title;return t?String(t):e.workflow_type??e.run_id.slice(0,8)}function lJ(e){return e.slice(0,8)}let lX=({status:e,size:s=8})=>(0,t.jsx)("span",{style:{display:"inline-block",width:s,height:s,borderRadius:"50%",background:lG[e]??"#a1a1aa",flexShrink:0}}),lZ=({value:e})=>{let[s,a]=(0,i.useState)(!1);return e.length<=120?(0,t.jsx)("span",{style:{color:"#27272a",wordBreak:"break-all"},children:e}):(0,t.jsxs)("span",{style:{color:"#27272a",wordBreak:"break-all"},children:[s?e:e.slice(0,120)+"…",(0,t.jsx)("button",{onClick:()=>a(e=>!e),style:{background:"none",border:"none",padding:"0 4px",cursor:"pointer",color:"#2563eb",fontSize:11,flexShrink:0},children:s?"less":"more"})]})},l0=({run:e})=>{let s=e.metadata??{},a=[{key:"state",label:"state"},{key:"worktree_path",label:"worktree"},{key:"grill_session_id",label:"grill session"},{key:"session_id",label:"session"}],l=new Set(["title",...a.map(e=>e.key)]),r=Object.entries(s).filter(([e,t])=>!l.has(e)&&null!=t&&""!==t);return(0,t.jsxs)("div",{style:{borderRadius:8,border:"1px solid #e4e4e7",marginBottom:16,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{padding:"14px 20px",borderBottom:"1px solid #f4f4f5",display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(lX,{status:e.status,size:10}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#18181b",flex:1},children:lY(e)}),(0,t.jsx)("span",{style:{fontFamily:"monospace",fontSize:11,color:"#a1a1aa",background:"#f4f4f5",padding:"2px 8px",borderRadius:4},children:lJ(e.run_id)}),(0,t.jsx)("span",{style:{fontSize:11,color:"#a1a1aa",background:"#f4f4f5",padding:"2px 8px",borderRadius:4},children:e.workflow_type})]}),(0,t.jsxs)("div",{style:{padding:"12px 20px",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:"8px 24px",fontFamily:"monospace",fontSize:12},children:[(0,t.jsx)(l1,{label:"status",children:(0,t.jsx)("span",{style:{textTransform:"capitalize",color:"#27272a"},children:e.status})}),(0,t.jsx)(l1,{label:"created",children:(0,t.jsx)("span",{style:{color:"#27272a"},children:lW(e.created_at)})}),s.pr_url&&(0,t.jsx)(l1,{label:"pr",children:(0,t.jsx)("a",{href:String(s.pr_url),target:"_blank",rel:"noopener noreferrer",style:{color:"#2563eb",textDecoration:"none",wordBreak:"break-all"},children:String(s.pr_url)})}),a.map(({key:e,label:a})=>{let l=s[e];if(null==l||""===l)return null;let r="object"==typeof l?JSON.stringify(l):String(l);return(0,t.jsx)(l1,{label:a,children:(0,t.jsx)(lZ,{value:r})},e)}),r.map(([e,s])=>{let a="object"==typeof s?JSON.stringify(s):String(s);return(0,t.jsx)(l1,{label:e,children:(0,t.jsx)(lZ,{value:a})},e)})]})]})},l1=({label:e,children:s})=>(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:1},children:[(0,t.jsx)("span",{style:{fontSize:10,color:"#a1a1aa",textTransform:"uppercase",letterSpacing:"0.06em"},children:e}),(0,t.jsx)("span",{style:{fontSize:12},children:s})]}),l2=({run:e,events:s})=>{if(0===s.length)return(0,t.jsx)("div",{style:{padding:"16px 0",color:"#a1a1aa",fontSize:12,fontFamily:"monospace"},children:"No events recorded"});let a=new Date(e.created_at).getTime(),l=Math.max(...s.map(e=>new Date(e.created_at).getTime())),r=Math.max(l-a,1),n=lQ(l-a);return(0,t.jsxs)("div",{style:{fontFamily:"monospace",fontSize:12},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",gap:"0 12px",marginBottom:2},children:[(0,t.jsx)("div",{}),(0,t.jsx)("div",{style:{position:"relative",height:16},children:[0,100].map(e=>(0,t.jsx)("span",{style:{position:"absolute",left:`${e}%`,transform:100===e?"translateX(-100%)":void 0,fontSize:10,color:"#a1a1aa"},children:0===e?"0":n},e))})]}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",gap:"0 12px",marginBottom:4},children:[(0,t.jsx)("div",{style:{color:"#3f3f46",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingTop:2},children:lY(e)}),(0,t.jsx)("div",{style:{height:24,background:"#f4f4f5",border:"1px solid #d4d4d8",borderRadius:4,display:"flex",alignItems:"center",paddingLeft:8},children:(0,t.jsx)("span",{style:{color:"#71717a",fontSize:11},children:n})})]}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"160px 1fr",gap:"0 12px",rowGap:3},children:s.map(e=>{let n=new Date(e.created_at).getTime(),o=(n-a)/r*100,d=s.findIndex(t=>t.sequence_number>e.sequence_number),c=d>=0?new Date(s[d].created_at).getTime():l+Math.max(.12*r,500),m=Math.max(8,(c-n)/r*100),u=lK[e.event_type]??{bar:"#f4f4f5",border:"#d4d4d8",text:"#52525b"},p=lQ(c-n);return(0,t.jsxs)(i.default.Fragment,{children:[(0,t.jsx)("div",{style:{color:u.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingTop:2,paddingLeft:12},children:e.step_name||e.event_type}),(0,t.jsx)("div",{style:{position:"relative",height:24},children:(0,t.jsx)(f.Tooltip,{title:(0,t.jsxs)("div",{style:{fontFamily:"monospace",fontSize:11,lineHeight:1.6},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"type: "}),(0,t.jsx)("span",{style:{color:u.text},children:e.event_type})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"step: "}),e.step_name]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"seq: "}),e.sequence_number]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"time: "}),lW(e.created_at)]}),e.data&&Object.keys(e.data).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#a1a1aa"},children:"data: "}),JSON.stringify(e.data)]})]}),children:(0,t.jsxs)("div",{style:{position:"absolute",left:`${Math.min(o,92)}%`,width:`${Math.min(m,100-Math.min(o,92))}%`,height:"100%",background:u.bar,border:`1px solid ${u.border}`,borderRadius:4,display:"flex",alignItems:"center",paddingLeft:8,cursor:"default",overflow:"hidden",gap:6},children:[(0,t.jsx)("span",{style:{color:u.text,whiteSpace:"nowrap",fontSize:11},children:e.event_type}),p&&(0,t.jsx)("span",{style:{color:"#a1a1aa",whiteSpace:"nowrap",fontSize:11},children:p})]})})})]},e.event_id)})})]})},l4=({msg:e})=>{let s={user:"#2563eb",assistant:"#16a34a",system:"#7c3aed",tool_result:"#d97706"}[e.role]??"#52525b";return(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"80px 1fr",gap:"0 16px",padding:"10px 0",borderBottom:"1px solid #f4f4f5",fontFamily:"monospace",fontSize:12,alignItems:"start"},children:[(0,t.jsxs)("span",{style:{color:s,paddingTop:1},children:["[",e.role,"]"]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#27272a",lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word",display:"block"},children:e.content}),(0,t.jsx)("span",{style:{color:"#a1a1aa",fontSize:11,marginTop:2,display:"block"},children:lW(e.created_at)})]})]})},l5=({accessToken:e})=>{let[s,a]=(0,i.useState)([]),[l,r]=(0,i.useState)(!1),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)([]),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),y=(0,i.useCallback)(async()=>{if(e){r(!0);try{let t=await fetch(`${w.proxyBaseUrl??""}/v1/workflows/runs?limit=100`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`HTTP ${t.status}`);let s=await t.json();a(s.runs??[])}catch(e){console.error("workflow runs fetch failed:",e)}finally{r(!1)}}},[e]),j=(0,i.useCallback)(async t=>{if(e){o(t),g(!0),x(!0),c([]),u([]);try{let s=w.proxyBaseUrl??"",[a,l]=await Promise.all([fetch(`${s}/v1/workflows/runs/${t.run_id}/events`,{headers:{Authorization:`Bearer ${e}`}}),fetch(`${s}/v1/workflows/runs/${t.run_id}/messages`,{headers:{Authorization:`Bearer ${e}`}})]),r=a.ok?await a.json():{events:[]},i=l.ok?await l.json():{messages:[]};c([...r.events??[]].sort((e,t)=>e.sequence_number-t.sequence_number)),u([...i.messages??[]].sort((e,t)=>e.sequence_number-t.sequence_number))}catch(e){console.error("workflow run detail fetch failed:",e)}finally{x(!1)}}},[e]);(0,i.useEffect)(()=>{y()},[y]);let f=[{title:"Run",dataIndex:"run_id",key:"run",render:(e,s)=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(lX,{status:s.status,size:7}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:13,color:"#18181b",fontWeight:500,lineHeight:1.4},children:lY(s)}),(0,t.jsx)("div",{style:{fontFamily:"monospace",fontSize:11,color:"#a1a1aa"},children:lJ(s.run_id)})]})]})},{title:"Type",dataIndex:"workflow_type",key:"workflow_type",render:e=>(0,t.jsx)("span",{style:{fontFamily:"monospace",fontSize:12,color:"#71717a"},children:e})},{title:"Status",dataIndex:"status",key:"status",render:(e,s)=>{let a=s.metadata?.state;return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,t.jsx)(lX,{status:e,size:7}),(0,t.jsx)("span",{style:{fontSize:12,color:"#52525b",textTransform:"capitalize"},children:a??e})]})}},{title:"Created",dataIndex:"created_at",key:"created_at",render:e=>(0,t.jsx)("span",{style:{fontSize:12,color:"#a1a1aa"},children:lW(e)})}];return(0,t.jsxs)("div",{style:{padding:"24px 32px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',minHeight:"calc(100vh - 64px)",background:"#fff"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:18,fontWeight:600,color:"#18181b"},children:"Workflow Runs"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#71717a",marginTop:2},children:"Durable state tracking for agents and automated workflows"})]}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:y,loading:l,style:{color:"#71717a",borderColor:"#e4e4e7"},children:"Refresh"})]}),(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full",children:(0,t.jsx)(te.Table,{dataSource:s,columns:f,rowKey:"run_id",loading:l,size:"small",pagination:{pageSize:50,hideOnSinglePage:!0,size:"small"},onRow:e=>({onClick:()=>j(e),style:{cursor:"pointer"}}),locale:{emptyText:(0,t.jsx)(aB.Empty,{description:(0,t.jsx)("span",{style:{color:"#a1a1aa",fontSize:13},children:"No workflow runs yet"}),image:aB.Empty.PRESENTED_IMAGE_SIMPLE})},className:"[&_.ant-table-cell]:py-0.5 [&_.ant-table-thead_.ant-table-cell]:py-1",style:{border:"none"}})}),(0,t.jsx)(lD.Drawer,{open:h,onClose:()=>g(!1),width:680,title:null,closable:!1,bodyStyle:{padding:0},styles:{body:{padding:0}},children:n?p?(0,t.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:80},children:(0,t.jsx)(eF.Spin,{})}):(0,t.jsxs)("div",{style:{padding:"24px 28px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[(0,t.jsx)("button",{onClick:()=>g(!1),style:{background:"none",border:"none",cursor:"pointer",padding:"4px 0",fontSize:12,color:"#a1a1aa",display:"flex",alignItems:"center",gap:4},children:"← close"}),(0,t.jsx)(V.Button,{size:"small",icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>j(n),loading:p,style:{color:"#71717a",borderColor:"#e4e4e7"},children:"Refresh"})]}),(0,t.jsx)(l0,{run:n}),(0,t.jsx)(q.Collapse,{defaultActiveKey:["timeline"],ghost:!1,style:{border:"1px solid #e4e4e7",borderRadius:8,overflow:"hidden"},items:[{key:"timeline",label:(0,t.jsxs)("span",{style:{fontSize:12,fontWeight:500,color:"#3f3f46"},children:["Timeline",(0,t.jsxs)("span",{style:{marginLeft:6,fontSize:11,color:"#a1a1aa",fontWeight:400},children:[d.length," ",1===d.length?"event":"events"]})]}),children:(0,t.jsx)("div",{style:{padding:"4px 4px 12px"},children:(0,t.jsx)(l2,{run:n,events:d})})},{key:"messages",label:(0,t.jsxs)("span",{style:{fontSize:12,fontWeight:500,color:"#3f3f46"},children:["Messages",(0,t.jsx)("span",{style:{marginLeft:6,fontSize:11,color:"#a1a1aa",fontWeight:400},children:m.length})]}),children:0===m.length?(0,t.jsx)("div",{style:{padding:"12px 4px",color:"#a1a1aa",fontSize:12,fontFamily:"monospace"},children:"No messages"}):(0,t.jsx)("div",{style:{paddingBottom:4},children:m.map(e=>(0,t.jsx)(l4,{msg:e},e.message_id))})}]})]}):null})]})};var l6=e.i(936190),l3=e.i(910119),l8=e.i(275144),l7=e.i(268004),l9=e.i(161281),re=e.i(321836),rt=e.i(947293),rs=e.i(618566),ra=e.i(592143);function rl(e,t="/"){document.cookie=`${e}=; Max-Age=0; Path=${t}`,"token"===e&&(0,l7.clearTokenCookies)()}let rr={api_ref:"api-reference","api-reference":"api-reference"};function ri(){let[e,n]=(0,i.useState)(""),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)([]),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)([]),[v,k]=(0,i.useState)({PROXY_BASE_URL:"",PROXY_LOGOUT_URL:""}),[N,S]=(0,i.useState)(!0),C=(0,rs.useRouter)(),T=(0,rs.useSearchParams)(),[I,F]=(0,i.useState)({data:[]}),[A,L]=(0,i.useState)(null),[M,P]=(0,i.useState)(!1),[D,z]=(0,i.useState)(!0),[E,O]=(0,i.useState)(null),[R,B]=(0,i.useState)(!0),[$,q]=(0,i.useState)(!1),[U,V]=(0,i.useState)(!1),[H,G]=(0,i.useState)(!1),[K,W]=(0,i.useState)(!1),[Q,Y]=(0,i.useState)(!1),J=T.get("invitation_id"),X="true"===T.get("create"),Z=(0,i.useMemo)(()=>{if(!X)return;let e=T.get("owned_by"),t=T.get("team_id"),s=T.get("key_alias"),a=T.get("models"),l=T.get("key_type");if(!e&&!t&&!s&&!a&&!l)return;let r=e&&["you","service_account","another_user"].includes(e)?e:void 0,i=l&&["default","llm_api","management"].includes(l)?l:void 0,n=s?s.trim().slice(0,256):void 0,o=a?a.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:i}},[T,X]),[ee,et]=(0,i.useState)(()=>T.get("page")||"api-keys"),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),ei=(0,i.useRef)(!1),en=e=>{y(t=>t?[...t,e]:[e]),P(()=>!M)},eo=!1===D&&null===A&&null===J;(0,i.useEffect)(()=>{let e=!1;return(async()=>{try{await (0,w.getUiConfig)()}catch{}if(e)return;let t=(0,l7.getCookie)("token"),s=t&&!(0,l9.isJwtExpired)(t)?t:null;t&&!s&&rl("token","/"),e||(L(s),z(!1))})(),()=>{e=!0}},[]),(0,i.useEffect)(()=>{if(eo){(0,re.storeReturnUrl)();let e=(w.proxyBaseUrl||"")+"/ui/login",t=(0,re.buildLoginUrlWithReturn)(e);window.location.replace(t)}},[eo]);let ed=ee in rr;return((0,i.useEffect)(()=>{if(!D&&ed){let e=(w.proxyBaseUrl||"")+"/ui";C.replace(`${e}/${rr[ee]}`)}},[D,ed,ee,C]),(0,i.useEffect)(()=>{if(D||!A||ei.current)return;ei.current=!0;let e=(0,re.consumeReturnUrl)();if(e&&(0,re.isValidReturnUrl)(e)){let t=new URL(e,window.location.origin);if(t.origin!==window.location.origin)return;let s=window.location.href;(0,re.normalizeUrlForCompare)(e)!==(0,re.normalizeUrlForCompare)(s)&&window.location.replace(t.href)}},[D,A]),(0,i.useEffect)(()=>{A||(ei.current=!1)},[A]),(0,i.useEffect)(()=>{if(!A)return;if((0,l9.isJwtExpired)(A)){rl("token","/"),L(null);return}let e=null;try{e=(0,rt.jwtDecode)(A)}catch{rl("token","/"),L(null);return}e&&(ea(e.key),m(e.disabled_non_admin_personal_key_creation),e.user_role&&n((0,ew.formatUserRole)(e.user_role)),e.user_email&&p(e.user_email),e.login_method&&S("username_password"==e.login_method),e.premium_user&&d(e.premium_user),e.auth_header_name&&(0,w.setGlobalLitellmHeaderName)(e.auth_header_name),e.user_id&&O(e.user_id))},[A]),(0,i.useEffect)(()=>{es&&E&&e&&(0,sZ.fetchUserModels)(E,e,es,_),es&&E&&e&&(0,eV.teamListCall)(es,1,100,{userID:"Admin"!==e&&"Admin Viewer"!==e?E:null}).then(e=>h(e.teams??[])).catch(console.error),es&&(0,s0.fetchOrganizations)(es,f)},[es,E,e]),(0,i.useEffect)(()=>{es&&A&&(async()=>{try{let e=await (0,w.getInProductNudgesCall)(es),t=e?.is_claude_code_enabled||!1;V(t),t&&(G(!0),B(!1))}catch(e){console.error("Failed to fetch in-product nudges:",e)}})()},[es,A]),(0,i.useEffect)(()=>{if(R&&!$){let e=setTimeout(()=>{B(!1)},15e3);return()=>clearTimeout(e)}},[R,$]),(0,i.useEffect)(()=>{if(H&&!K){let e=setTimeout(()=>{G(!1)},15e3);return()=>clearTimeout(e)}},[H,K]),D||eo||ed)?(0,t.jsx)(eH.default,{}):(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(ra.ConfigProvider,{theme:{algorithm:Q?sA.theme.darkAlgorithm:sA.theme.defaultAlgorithm},children:(0,t.jsx)(l8.ThemeProvider,{accessToken:es,children:J?(0,t.jsx)(aI.default,{userID:E,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:M}):(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,t.jsx)(sf.default,{userID:E,userRole:e,premiumUser:o,userEmail:u,setProxySettings:k,proxySettings:v,accessToken:es,isPublicPage:!1,sidebarCollapsed:el,onToggleSidebar:()=>{er(!el)},isDarkMode:Q,toggleDarkMode:()=>{Y(!Q)}}),(0,t.jsxs)("div",{className:"flex flex-1",children:[(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(s.default,{setPage:e=>{let t=new URLSearchParams(T);t.set("page",e),window.history.pushState(null,"",`?${t.toString()}`),et(e)},defaultSelectedKey:ee,sidebarCollapsed:el})}),"api-keys"==ee?(0,t.jsx)(aI.default,{userID:E,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:M,autoOpenCreate:X,prefillData:Z}):"models"==ee?(0,t.jsx)(a.default,{token:A,keys:g,modelData:I,setModelData:F,premiumUser:o,teams:x}):"llm-playground"==ee?(0,t.jsx)(l.default,{}):"users"==ee?(0,t.jsx)(l3.default,{userID:E,userRole:e,token:A,keys:g,teams:x,accessToken:es,setKeys:y}):"teams"==ee?(0,t.jsx)(sX,{teams:x,setTeams:h,accessToken:es,userID:E,userRole:e,organizations:j,premiumUser:o,searchParams:T}):"organizations"==ee?(0,t.jsx)(s0.default,{organizations:j,setOrganizations:f,userModels:b,accessToken:es,userRole:e,premiumUser:o}):"admin-panel"==ee?(0,t.jsx)(r.default,{proxySettings:v}):"logging-and-alerts"==ee?(0,t.jsx)(ad.default,{userID:E,userRole:e,accessToken:es,premiumUser:o}):"budgets"==ee?(0,t.jsx)(e$.default,{accessToken:es}):"guardrails"==ee?(0,t.jsx)(sh.default,{accessToken:es,userRole:e}):"policies"==ee?(0,t.jsx)(sg.default,{accessToken:es,userRole:e}):"agents"==ee?(0,t.jsx)(eB,{accessToken:es,userRole:e,teams:x}):"prompts"==ee?(0,t.jsx)(s2.default,{accessToken:es,userRole:e}):"transform-request"==ee?(0,t.jsx)(aS.default,{accessToken:es}):"router-settings"==ee?(0,t.jsx)(tQ.default,{userID:E,userRole:e,accessToken:es,modelData:I}):"ui-theme"==ee?(0,t.jsx)(aC.default,{userID:E,userRole:e,accessToken:es}):"cost-tracking"==ee?(0,t.jsx)(tW,{userID:E,userRole:e,accessToken:es}):"model-hub-table"==ee?(0,ew.isAdminRole)(e)?(0,t.jsx)(sj.default,{accessToken:es,publicPage:!1,premiumUser:o,userRole:e}):(0,t.jsx)(s4.default,{accessToken:es,isEmbedded:!0}):"caching"==ee?(0,t.jsx)(eq.default,{userID:E,userRole:e,token:A,accessToken:es,premiumUser:o}):"pass-through-settings"==ee?(0,t.jsx)(s1.default,{userID:E,userRole:e,accessToken:es,modelData:I,premiumUser:o}):"logs"==ee?(0,t.jsx)(l6.default,{userID:E,userRole:e,token:A,accessToken:es,premiumUser:o}):"mcp-servers"==ee?(0,t.jsx)(sy.MCPServers,{accessToken:es,userRole:e,userID:E}):"search-tools"==ee?(0,t.jsx)(ao,{accessToken:es,userRole:e,userID:E}):"tag-management"==ee?(0,t.jsx)(aN.default,{accessToken:es,userRole:e,userID:E}):"skills"==ee||"claude-code-plugins"==ee?(0,t.jsx)(eU.default,{accessToken:es,userRole:e}):"access-groups"==ee?(0,t.jsx)(a7,{}):"projects"==ee?(0,t.jsx)(lj,{}):"vector-stores"==ee?(0,t.jsx)(lf.default,{accessToken:es,userRole:e,userID:E}):"tool-policies"==ee?(0,t.jsx)(lP,{accessToken:es,userRole:e}):"workflows"==ee?(0,t.jsx)(l5,{accessToken:es}):"memory"==ee?(0,t.jsx)(lV,{accessToken:es,userID:E,userRole:e}):"guardrails-monitor"==ee?(0,t.jsx)(sx,{accessToken:es}):"new_usage"==ee?(0,t.jsx)(sb.default,{teams:x??[],organizations:j??[]}):(0,t.jsx)(aT.default,{userID:E,userRole:e,token:A,accessToken:es,keys:g,premiumUser:o})]}),(0,t.jsx)(ag,{isVisible:R,onOpen:()=>{B(!1),q(!0)},onDismiss:()=>{B(!1)}}),(0,t.jsx)(a_,{isOpen:$,onClose:()=>{q(!1),B(!0)},onComplete:()=>{q(!1)}}),(0,t.jsx)(aw,{isVisible:H,onOpen:()=>{G(!1),W(!0)},onDismiss:()=>{G(!1)}}),(0,t.jsx)(ak,{isOpen:K,onClose:()=>{W(!1),G(!0)},onComplete:()=>{W(!1)}})]})})})})}function rn(){return(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(ri,{})})}e.s(["default",()=>rn],952683)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/8c6f8ac32c75a373.js b/litellm/proxy/_experimental/out/_next/static/chunks/907d812b2431487b.js similarity index 59% rename from litellm/proxy/_experimental/out/_next/static/chunks/8c6f8ac32c75a373.js rename to litellm/proxy/_experimental/out/_next/static/chunks/907d812b2431487b.js index 6b2907dbed..635faddd43 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/8c6f8ac32c75a373.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/907d812b2431487b.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},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",()=>t])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},988297,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:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,a],988297)},797672,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:"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,a],797672)},992619,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(779241),l=e.i(599724),r=e.i(199133),i=e.i(983561),n=e.i(689020);e.s(["default",0,({accessToken:e,value:o,placeholder:d="Select a Model",onChange:c,disabled:u=!1,style:m,className:p,showLabel:g=!0,labelText:h="Select Model"})=>{let[x,f]=(0,a.useState)(o),[y,b]=(0,a.useState)(!1),[v,j]=(0,a.useState)([]),_=(0,a.useRef)(null);return(0,a.useEffect)(()=>{f(o)},[o]),(0,a.useEffect)(()=>{e&&(async()=>{try{let t=await (0,n.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&j(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[g&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.RobotOutlined,{className:"mr-2"})," ",h]}),(0,t.jsx)(r.Select,{value:x,placeholder:d,onChange:e=>{"custom"===e?(b(!0),f(void 0)):(b(!1),f(e),c&&c(e))},options:[...Array.from(new Set(v.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:u}),y&&(0,t.jsx)(s.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{f(e),c&&c(e)},500)},disabled:u})]})}])},500727,699857,696609,531516,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(135214);let r=(0,a.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:a}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,s.fetchMCPServers)(a,e),enabled:!!a})}],500727);let i=(0,a.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list(),queryFn:async()=>await (0,s.fetchMCPToolsets)(e),enabled:!!e})}],699857);var n=e.i(843476),o=e.i(271645),d=e.i(536916),c=e.i(599724),u=e.i(409797),m=e.i(246349),m=m;let p=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,g=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,h=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,x=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function f(e,t=""){let a=e.toLowerCase();if(x.test(a))return"read";if(p.test(a))return"delete";if(h.test(a))return"update";if(g.test(a))return"create";if(t){let e=t.toLowerCase();if(x.test(e))return"read";if(p.test(e))return"delete";if(h.test(e))return"update";if(g.test(e))return"create"}return"unknown"}function y(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let a of e)t[f(a.name,a.description)].push(a);return t}let b={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,b,"classifyToolOp",()=>f,"groupToolsByCrud",()=>y],696609);let v=["read","create","update","delete","unknown"],j={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"},_={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={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:t,onChange:a,readOnly:s=!1,searchFilter:l=""})=>{let[r,i]=(0,o.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),p=(0,o.useMemo)(()=>y(e),[e]),g=(0,o.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),h=e=>{if(s)return;let t=new Set(g);t.has(e)?t.delete(e):t.add(e),a(Array.from(t))};return 0===e.length?null:(0,n.jsx)("div",{className:"space-y-3",children:v.map(e=>{let t,o=p[e];if(0===o.length)return null;if(l){let e=l.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let x=b[e],f=(t=p[e]).length>0&&t.every(e=>g.has(e.name)),y=(e=>{let t=p[e];if(0===t.length)return!1;let a=t.filter(e=>g.has(e.name)).length;return a>0&&a{i(t=>({...t,[e]:!t[e]}))},children:[v?(0,n.jsx)(m.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,n.jsx)(u.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,n.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:x.label}),(0,n.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${j[x.risk]}`,children:"high"===x.risk?"High Risk":"medium"===x.risk?"Medium Risk":"low"===x.risk?"Safe":"Unclassified"}),(0,n.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>g.has(e.name)).length,"/",o.length," allowed"]})]}),!s&&(0,n.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,n.jsx)(c.Text,{className:"text-xs text-gray-500",children:f?"All on":y?"Partial":"All off"}),(0,n.jsx)(d.Checkbox,{checked:f,indeterminate:y,onChange:t=>((e,t)=>{if(s)return;let l=new Set(g);for(let a of p[e])t?l.add(a.name):l.delete(a.name);a(Array.from(l))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!v&&(0,n.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:x.description}),!v&&(0,n.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!l||e.name.toLowerCase().includes(l.toLowerCase())||(e.description??"").toLowerCase().includes(l.toLowerCase())).map(e=>{let t,a=(t=e.name,g.has(t));return(0,n.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!s?"cursor-pointer":""} ${a?"":"opacity-60"}`,onClick:()=>h(e.name),children:[(0,n.jsx)(d.Checkbox,{checked:a,onChange:()=>h(e.name),disabled:s,onClick:e=>e.stopPropagation()}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,n.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,n.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${a?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:a?"on":"off"})]},e.name)})})]},e)})})}],531516)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var a=e.i(841947);e.s(["X",()=>a.default],37727)},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",()=>t])},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",()=>t])},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",()=>t])},158392,419470,e=>{"use strict";var t=e.i(843476),a=e.i(311451);let s={ttl:3600,lowest_latency_buffer:0},l=({routingStrategyArgs:e})=>{let l={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||s).map(([e,s])=>(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:l[e]||""}),(0,t.jsx)(a.Input,{name:e,defaultValue:"object"==typeof s?JSON.stringify(s,null,2):s?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},r=({routerSettings:e,routerFieldsMetadata:s})=>(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,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).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:s[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:s[e]?.field_description||""}),(0,t.jsx)(a.Input,{name:e,defaultValue:null==l||"null"===l?"":"object"==typeof l?JSON.stringify(l,null,2):l?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var i=e.i(199133);let n=({selectedStrategy:e,availableStrategies:a,routingStrategyDescriptions:s,routerFieldsMetadata:l,onStrategyChange:r})=>(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:l.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(i.Select,{value:e,onChange:r,style:{width:"100%"},size:"large",children:a.map(e=>(0,t.jsx)(i.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}),s[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:s[e]})]})},e))})})]});var o=e.i(790848);let d=({enabled:e,routerFieldsMetadata:a,onToggle:s})=>(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:a.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[a.enable_tag_filtering?.field_description||"",a.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:a.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(o.Switch,{checked:e,onChange:s,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:a,routerFieldsMetadata:s,availableRoutingStrategies:i,routingStrategyDescriptions:o})=>(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"})]}),i.length>0&&(0,t.jsx)(n,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:i,routingStrategyDescriptions:o,routerFieldsMetadata:s,onStrategyChange:t=>{a({...e,selectedStrategy:t})}}),(0,t.jsx)(d,{enabled:e.enableTagFiltering,routerFieldsMetadata:s,onToggle:t=>{a({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(l,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(r,{routerSettings:e.routerSettings,routerFieldsMetadata:s})]})],158392);var c=e.i(994388),u=e.i(653496),m=e.i(107233),p=e.i(271645),g=e.i(888259),h=e.i(592968),x=e.i(361653),x=x;let f=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var y=e.i(37727);function b({group:e,onChange:a,availableModels:s,maxFallbacks:l}){let r=s.filter(t=>t!==e.primaryModel),n=e.fallbackModels.length{let s=[...e.fallbackModels];s.includes(t)&&(s=s.filter(e=>e!==t)),a({...e,primaryModel:t,fallbackModels:s})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:s.map(e=>({label:e,value:e}))}),!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",children:[(0,t.jsx)(x.default,{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-sm",children:[(0,t.jsx)(f,{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 ",l," 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)(i.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:n?"Select fallback models to add...":`Maximum ${l} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let s=t.slice(0,l);a({...e,fallbackModels:s})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:r.map(e=>({label:e,value:e})),optionRender:(a,s)=>{let l=e.fallbackModels.includes(a.value),r=l?e.fallbackModels.indexOf(a.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[l&&null!==r&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:r}),(0,t.jsx)("span",{children:a.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(h.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:n?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${l} used)`:`Maximum ${l} 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((s,l)=>(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-sm 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 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:l+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:s})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==l),void a({...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)(y.X,{className:"w-4 h-4"})})]},`${s}-${l}`))})]})]})]})}function v({groups:e,onGroupsChange:a,availableModels:s,maxFallbacks:l=10,maxGroups:r=5}){let[i,n]=(0,p.useState)(e.length>0?e[0].id:"1");(0,p.useEffect)(()=>{e.length>0?e.some(e=>e.id===i)||n(e[0].id):n("1")},[e]);let o=()=>{if(e.length>=r)return;let t=Date.now().toString();a([...e,{id:t,primaryModel:null,fallbackModels:[]}]),n(t)},d=t=>{a(e.map(e=>e.id===t.id?t:e))},h=e.map((a,r)=>{let i=a.primaryModel?a.primaryModel:`Group ${r+1}`;return{key:a.id,label:i,closable:e.length>1,children:(0,t.jsx)(b,{group:a,onChange:d,availableModels:s,maxFallbacks:l})}});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)(c.Button,{variant:"primary",onClick:o,icon:()=>(0,t.jsx)(m.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:i,onChange:n,onEdit:(t,s)=>{"add"===s?o():"remove"===s&&e.length>1&&(t=>{if(1===e.length)return g.default.warning("At least one group is required");let s=e.filter(e=>e.id!==t);a(s),i===t&&s.length>0&&n(s[s.length-1].id)})(t)},items:h,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=r})}e.s(["FallbackSelectionForm",()=>v],419470)},645526,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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 l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["TeamOutlined",0,r],645526)},109799,e=>{"use strict";var t=e.i(135214),a=e.i(764205),s=e.i(266027),l=e.i(912598);let r=(0,e.i(243652).createQueryKeys)("organizations");e.s(["organizationKeys",0,r,"useOrganization",0,e=>{let i=(0,l.useQueryClient)(),{accessToken:n}=(0,t.default)();return(0,s.useQuery)({queryKey:r.detail(e),enabled:!!(n&&e),queryFn:async()=>{if(!n||!e)throw Error("Missing auth or teamId");return(0,a.organizationInfoCall)(n,e)},initialData:()=>{if(!e)return;let t=i.getQueryData(r.list({}));return t?.find(t=>t.organization_id===e)}})},"useOrganizations",0,()=>{let{accessToken:e,userId:l,userRole:i}=(0,t.default)();return(0,s.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,a.organizationListCall)(e),enabled:!!(e&&l&&i)})}])},993914,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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 l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["FileTextOutlined",0,r],993914)},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",()=>t])},621482,e=>{"use strict";var t=e.i(869230),a=e.i(992571),s=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,a.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,a.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:s}=e,l=super.createResult(e,t),{isFetching:r,isRefetching:i,isError:n,isRefetchError:o}=l,d=s.fetchMeta?.fetchMore?.direction,c=n&&"forward"===d,u=r&&"forward"===d,m=n&&"backward"===d,p=r&&"backward"===d;return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a.hasNextPage)(t,s.data),hasPreviousPage:(0,a.hasPreviousPage)(t,s.data),isFetchNextPageError:c,isFetchingNextPage:u,isFetchPreviousPageError:m,isFetchingPreviousPage:p,isRefetchError:o&&!c&&!m,isRefetching:i&&!u&&!p}}},l=e.i(469637);function r(e,t){return(0,l.useBaseQuery)(e,s,t)}e.s(["useInfiniteQuery",()=>r],621482)},270345,e=>{"use strict";var t=e.i(764205);let a=async(e,a,s,l)=>"Admin"!=s&&"Admin Viewer"!=s?await (0,t.teamListCall)(e,l?.organization_id||null,a):await (0,t.teamListCall)(e,l?.organization_id||null);e.s(["fetchTeams",0,a])},785242,e=>{"use strict";var t=e.i(619273),a=e.i(621482),s=e.i(266027),l=e.i(912598),r=e.i(135214),i=e.i(270345),n=e.i(243652),o=e.i(764205);let d=async(e,t,a,s={})=>{try{let l=(0,o.getProxyBaseUrl)(),r=new URLSearchParams(Object.entries({team_id:s.teamID,organization_id:s.organizationID,team_alias:s.team_alias,user_id:s.userID,page:t,page_size:a,sort_by:s.sortBy,sort_order:s.sortOrder,status:s.status}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${r}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let d=await n.json();return console.log("/v2/team/list API Response:",d),d}catch(e){throw console.error("Failed to list teams:",e),e}},c=(0,n.createQueryKeys)("teams"),u=(0,n.createQueryKeys)("infiniteTeams"),m=async(e,t,a,s={})=>{try{let l=(0,o.getProxyBaseUrl)(),r=new URLSearchParams(Object.entries({team_id:s.teamID,organization_id:s.organizationID,team_alias:s.team_alias,user_id:s.userID,page:t,page_size:a,sort_by:s.sortBy,sort_order:s.sortOrder,status:"deleted"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${r}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let d=await n.json();if(console.log("/team/list?status=deleted API Response:",d),d&&"object"==typeof d&&"teams"in d)return d.teams;return d}catch(e){throw console.error("Failed to list deleted teams:",e),e}},p=(0,n.createQueryKeys)("deletedTeams");e.s(["teamListCall",0,d,"useDeletedTeams",0,(e,a,l={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:p.list({page:e,limit:a,...l}),queryFn:async()=>await m(i,e,a,l),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useInfiniteTeams",0,(e=50,t,s)=>{let{accessToken:l,userId:i,userRole:n}=(0,r.default)(),o="Admin"===n||"Admin Viewer"===n;return(0,a.useInfiniteQuery)({queryKey:u.list({filters:{pageSize:e,...t&&{search:t},...s&&{organizationId:s},...i&&{userId:i}}}),queryFn:async({pageParam:a})=>await d(l,a,e,{team_alias:t||void 0,organizationID:s,userID:o?void 0:i}),initialPageParam:1,getNextPageParam:e=>{if(e.page{let{accessToken:t}=(0,r.default)(),a=(0,l.useQueryClient)();return(0,s.useQuery)({queryKey:c.detail(e),enabled:!!(t&&e),queryFn:async()=>{if(!t||!e)throw Error("Missing auth or teamId");return(0,o.teamInfoCall)(t,e)},initialData:()=>{if(!e)return;let t=a.getQueryData(c.list({}));return t?.find(t=>t.team_id===e)}})},"useTeams",0,()=>{let{accessToken:e,userId:t,userRole:a}=(0,r.default)();return(0,s.useQuery)({queryKey:c.list({}),queryFn:async()=>await (0,i.fetchTeams)(e,t,a,null),enabled:!!e})}])},309426,e=>{"use strict";var t=e.i(290571),a=e.i(444755),s=e.i(673706),l=e.i(271645),r=e.i(46757);let i=(0,s.makeClassName)("Col"),n=l.default.forwardRef((e,s)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:p,numColSpanLg:g,children:h,className:x}=e,f=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),y=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return l.default.createElement("div",Object.assign({ref:s,className:(0,a.tremorTwMerge)(i("root"),(n=y(u,r.colSpan),o=y(m,r.colSpanSm),d=y(p,r.colSpanMd),c=y(g,r.colSpanLg),(0,a.tremorTwMerge)(n,o,d,c)),x)},f),h)});n.displayName="Col",e.s(["Col",()=>n],309426)},950724,(e,t,a)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},100236,(e,t,a)=>{t.exports=e.g&&e.g.Object===Object&&e.g},139088,(e,t,a)=>{var s=e.r(100236),l="object"==typeof self&&self&&self.Object===Object&&self;t.exports=s||l||Function("return this")()},631926,(e,t,a)=>{var s=e.r(139088);t.exports=function(){return s.Date.now()}},748891,(e,t,a)=>{var s=/\s/;t.exports=function(e){for(var t=e.length;t--&&s.test(e.charAt(t)););return t}},830364,(e,t,a)=>{var s=e.r(748891),l=/^\s+/;t.exports=function(e){return e?e.slice(0,s(e)+1).replace(l,""):e}},630353,(e,t,a)=>{t.exports=e.r(139088).Symbol},243436,(e,t,a)=>{var s=e.r(630353),l=Object.prototype,r=l.hasOwnProperty,i=l.toString,n=s?s.toStringTag:void 0;t.exports=function(e){var t=r.call(e,n),a=e[n];try{e[n]=void 0;var s=!0}catch(e){}var l=i.call(e);return s&&(t?e[n]=a:delete e[n]),l}},223243,(e,t,a)=>{var s=Object.prototype.toString;t.exports=function(e){return s.call(e)}},377684,(e,t,a)=>{var s=e.r(630353),l=e.r(243436),r=e.r(223243),i=s?s.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?l(e):r(e)}},877289,(e,t,a)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},361884,(e,t,a)=>{var s=e.r(377684),l=e.r(877289);t.exports=function(e){return"symbol"==typeof e||l(e)&&"[object Symbol]"==s(e)}},773759,(e,t,a)=>{var s=e.r(830364),l=e.r(950724),r=e.r(361884),i=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(r(e))return i;if(l(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=l(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var a=o.test(e);return a||d.test(e)?c(e.slice(2),a?2:8):n.test(e)?i:+e}},374009,(e,t,a)=>{var s=e.r(950724),l=e.r(631926),r=e.r(773759),i=Math.max,n=Math.min;t.exports=function(e,t,a){var o,d,c,u,m,p,g=0,h=!1,x=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var a=o,s=d;return o=d=void 0,g=t,u=e.apply(s,a)}function b(e){var a=e-p,s=e-g;return void 0===p||a>=t||a<0||x&&s>=c}function v(){var e,a,s,r=l();if(b(r))return j(r);m=setTimeout(v,(e=r-p,a=r-g,s=t-e,x?n(s,c-a):s))}function j(e){return(m=void 0,f&&o)?y(e):(o=d=void 0,u)}function _(){var e,a=l(),s=b(a);if(o=arguments,d=this,p=a,s){if(void 0===m)return g=e=p,m=setTimeout(v,t),h?y(e):u;if(x)return clearTimeout(m),m=setTimeout(v,t),y(p)}return void 0===m&&(m=setTimeout(v,t)),u}return t=r(t)||0,s(a)&&(h=!!a.leading,c=(x="maxWait"in a)?i(r(a.maxWait)||0,t):c,f="trailing"in a?!!a.trailing:f),_.cancel=function(){void 0!==m&&clearTimeout(m),g=0,o=p=d=m=void 0},_.flush=function(){return void 0===m?u:j(l())},_}},964306,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:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["XCircleIcon",0,a],964306)},435451,620250,e=>{"use strict";var t=e.i(843476),a=e.i(290571),s=e.i(271645);let l=e=>{var t=(0,a.__rest)(e,[]);return s.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"}),s.default.createElement("path",{d:"M12 4v16m8-8H4"}))},r=e=>{var t=(0,a.__rest)(e,[]);return s.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"}),s.default.createElement("path",{d:"M20 12H4"}))};var i=e.i(444755),n=e.i(673706),o=e.i(677955);let d="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",c="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",u=s.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:p,onValueChange:g,onChange:h}=e,x=(0,a.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),f=(0,s.useRef)(null),[y,b]=s.default.useState(!1),v=s.default.useCallback(()=>{b(!0)},[]),j=s.default.useCallback(()=>{b(!1)},[]),[_,w]=s.default.useState(!1),k=s.default.useCallback(()=>{w(!0)},[]),N=s.default.useCallback(()=>{w(!1)},[]);return s.default.createElement(o.default,Object.assign({type:"number",ref:(0,n.mergeRefs)([f,t]),disabled:p,makeInputClassName:(0,n.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=f.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&v(),"ArrowUp"===e.key&&k()},onKeyUp:e=>{"ArrowDown"===e.key&&j(),"ArrowUp"===e.key&&N()},onChange:e=>{p||(null==g||g(parseFloat(e.target.value)),null==h||h(e))},stepper:m?s.default.createElement("div",{className:(0,i.tremorTwMerge)("flex justify-center align-middle")},s.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=f.current)||e.stepDown(),null==(t=f.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},s.default.createElement(r,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),s.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=f.current)||e.stepUp(),null==(t=f.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},s.default.createElement(l,{"data-testid":"step-up",className:(_?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},x))});u.displayName="NumberInput",e.s(["NumberInput",()=>u],620250),e.s(["default",0,({step:e=.01,style:a={width:"100%"},placeholder:s="Enter a numerical value",min:l,max:r,onChange:i,...n})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:a,placeholder:s,min:l,max:r,onChange:i,...n})],435451)},677667,674175,886148,543086,e=>{"use strict";let t,a;var s,l=e.i(290571),r=e.i(429427),i=e.i(371330),n=e.i(271645),o=e.i(394487),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(83733);let p=(0,n.createContext)(()=>{});function g({value:e,children:t}){return n.default.createElement(p.Provider,{value:e},t)}e.s(["CloseProvider",()=>g],674175);var h=e.i(233137),x=e.i(233538),f=e.i(397701),y=e.i(402155),b=e.i(700020);let v=null!=(s=n.default.startTransition)?s:function(e){e()};var j=e.i(998348),_=((t=_||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),w=((a=w||{})[a.ToggleDisclosure=0]="ToggleDisclosure",a[a.CloseDisclosure=1]="CloseDisclosure",a[a.SetButtonId=2]="SetButtonId",a[a.SetPanelId=3]="SetPanelId",a[a.SetButtonElement=4]="SetButtonElement",a[a.SetPanelElement=5]="SetPanelElement",a);let k={0:e=>({...e,disclosureState:(0,f.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}},N=(0,n.createContext)(null);function S(e){let t=(0,n.useContext)(N);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,S),t}return t}N.displayName="DisclosureContext";let C=(0,n.createContext)(null);C.displayName="DisclosureAPIContext";let T=(0,n.createContext)(null);function I(e,t){return(0,f.match)(t.type,k,e,t)}T.displayName="DisclosurePanelContext";let M=n.Fragment,E=b.RenderFeatures.RenderStrategy|b.RenderFeatures.Static,A=Object.assign((0,b.forwardRefWithAs)(function(e,t){let{defaultOpen:a=!1,...s}=e,l=(0,n.useRef)(null),r=(0,u.useSyncRefs)(t,(0,u.optionalRef)(e=>{l.current=e},void 0===e.as||e.as===n.Fragment)),i=(0,n.useReducer)(I,{disclosureState:+!a,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:c},m]=i,p=(0,d.useEvent)(e=>{m({type:1});let t=(0,y.getOwnerDocument)(l);if(!t||!c)return;let a=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(c):t.getElementById(c);null==a||a.focus()}),x=(0,n.useMemo)(()=>({close:p}),[p]),v=(0,n.useMemo)(()=>({open:0===o,close:p}),[o,p]),j=(0,b.useRender)();return n.default.createElement(N.Provider,{value:i},n.default.createElement(C.Provider,{value:x},n.default.createElement(g,{value:p},n.default.createElement(h.OpenClosedProvider,{value:(0,f.match)(o,{0:h.State.Open,1:h.State.Closed})},j({ourProps:{ref:r},theirProps:s,slot:v,defaultTag:M,name:"Disclosure"})))))}),{Button:(0,b.forwardRefWithAs)(function(e,t){let a=(0,n.useId)(),{id:s=`headlessui-disclosure-button-${a}`,disabled:l=!1,autoFocus:m=!1,...p}=e,[g,h]=S("Disclosure.Button"),f=(0,n.useContext)(T),y=null!==f&&f===g.panelId,v=(0,n.useRef)(null),_=(0,u.useSyncRefs)(v,t,(0,d.useEvent)(e=>{if(!y)return h({type:4,element:e})}));(0,n.useEffect)(()=>{if(!y)return h({type:2,buttonId:s}),()=>{h({type:2,buttonId:null})}},[s,h,y]);let w=(0,d.useEvent)(e=>{var t;if(y){if(1===g.disclosureState)return;switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0}),null==(t=g.buttonElement)||t.focus()}}else switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0})}}),k=(0,d.useEvent)(e=>{e.key===j.Keys.Space&&e.preventDefault()}),N=(0,d.useEvent)(e=>{var t;(0,x.isDisabledReactIssue7711)(e.currentTarget)||l||(y?(h({type:0}),null==(t=g.buttonElement)||t.focus()):h({type:0}))}),{isFocusVisible:C,focusProps:I}=(0,r.useFocusRing)({autoFocus:m}),{isHovered:M,hoverProps:E}=(0,i.useHover)({isDisabled:l}),{pressed:A,pressProps:P}=(0,o.useActivePress)({disabled:l}),L=(0,n.useMemo)(()=>({open:0===g.disclosureState,hover:M,active:A,disabled:l,focus:C,autofocus:m}),[g,M,A,C,l,m]),O=(0,c.useResolveButtonType)(e,g.buttonElement),F=y?(0,b.mergeProps)({ref:_,type:O,disabled:l||void 0,autoFocus:m,onKeyDown:w,onClick:N},I,E,P):(0,b.mergeProps)({ref:_,id:s,type:O,"aria-expanded":0===g.disclosureState,"aria-controls":g.panelElement?g.panelId:void 0,disabled:l||void 0,autoFocus:m,onKeyDown:w,onKeyUp:k,onClick:N},I,E,P);return(0,b.useRender)()({ourProps:F,theirProps:p,slot:L,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,b.forwardRefWithAs)(function(e,t){let a=(0,n.useId)(),{id:s=`headlessui-disclosure-panel-${a}`,transition:l=!1,...r}=e,[i,o]=S("Disclosure.Panel"),{close:c}=function e(t){let a=(0,n.useContext)(C);if(null===a){let a=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,e),a}return a}("Disclosure.Panel"),[p,g]=(0,n.useState)(null),x=(0,u.useSyncRefs)(t,(0,d.useEvent)(e=>{v(()=>o({type:5,element:e}))}),g);(0,n.useEffect)(()=>(o({type:3,panelId:s}),()=>{o({type:3,panelId:null})}),[s,o]);let f=(0,h.useOpenClosed)(),[y,j]=(0,m.useTransition)(l,p,null!==f?(f&h.State.Open)===h.State.Open:0===i.disclosureState),_=(0,n.useMemo)(()=>({open:0===i.disclosureState,close:c}),[i.disclosureState,c]),w={ref:x,id:s,...(0,m.transitionDataAttributes)(j)},k=(0,b.useRender)();return n.default.createElement(h.ResetOpenClosedProvider,null,n.default.createElement(T.Provider,{value:i.panelId},k({ourProps:w,theirProps:r,slot:_,defaultTag:"div",features:E,visible:y,name:"Disclosure.Panel"})))})});e.s(["Disclosure",()=>A],886148);let P=(0,n.createContext)(void 0);var L=e.i(444755);let O=(0,e.i(673706).makeClassName)("Accordion"),F=(0,n.createContext)({isOpen:!1}),D=n.default.forwardRef((e,t)=>{var a;let{defaultOpen:s=!1,children:r,className:i}=e,o=(0,l.__rest)(e,["defaultOpen","children","className"]),d=null!=(a=(0,n.useContext)(P))?a:(0,L.tremorTwMerge)("rounded-tremor-default border");return n.default.createElement(A,Object.assign({as:"div",ref:t,className:(0,L.tremorTwMerge)(O("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",d,i),defaultOpen:s},o),({open:e})=>n.default.createElement(F.Provider,{value:{isOpen:e}},r))});D.displayName="Accordion",e.s(["OpenContext",()=>F,"default",()=>D],543086),e.s(["Accordion",()=>D],677667)},898667,e=>{"use strict";var t=e.i(290571),a=e.i(271645),s=e.i(886148);let l=e=>{var s=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},s),a.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),i=e.i(444755);let n=(0,e.i(673706).makeClassName)("AccordionHeader"),o=a.default.forwardRef((e,o)=>{let{children:d,className:c}=e,u=(0,t.__rest)(e,["children","className"]),{isOpen:m}=(0,a.useContext)(r.OpenContext);return a.default.createElement(s.Disclosure.Button,Object.assign({ref:o,className:(0,i.tremorTwMerge)(n("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",c)},u),a.default.createElement("div",{className:(0,i.tremorTwMerge)(n("children"),"flex flex-1 text-inherit mr-4")},d),a.default.createElement("div",null,a.default.createElement(l,{className:(0,i.tremorTwMerge)(n("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",()=>o],898667)},130643,e=>{"use strict";var t=e.i(290571),a=e.i(271645),s=e.i(886148),l=e.i(444755);let r=(0,e.i(673706).makeClassName)("AccordionBody"),i=a.default.forwardRef((e,i)=>{let{children:n,className:o}=e,d=(0,t.__rest)(e,["children","className"]);return a.default.createElement(s.Disclosure.Panel,Object.assign({ref:i,className:(0,l.tremorTwMerge)(r("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",o)},d),n)});i.displayName="AccordionBody",e.s(["AccordionBody",()=>i],130643)},109034,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(135214);let r=(0,a.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:a,userRole:i}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,s.tagListCall)(e),enabled:!!(e&&a&&i)})}])},9314,263147,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(981339),l=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),a=`${t}/v1/access_group`,s=await fetch(a,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return s.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:f}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});let y=(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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(a.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,notFoundContent:f?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(y.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:y.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},552130,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,a.useState)([]),[m,p]=(0,a.useState)([]),[g,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getAgentsList)(n),t=e?.agents||[];u(t);let a=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>a.add(e))}),p(Array.from(a))}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`}))],f=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(s.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:f,loading:g,className:i,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)(s.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))})})}])},844565,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,a.useState)([]),[p,g]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,l.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,a=e.methods;return a&&a.length>0?a.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(s.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,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:"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,a],810757);let s=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:"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,s],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",a=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],s=a.reduce((e,t)=>(e[t.displayName]=t,e),{}),l=a.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=a.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,s,"callback_map",0,l,"mapDisplayToInternalNames",0,e=>e.map(e=>l[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},75921,e=>{"use strict";var t=e.i(843476),a=e.i(266027),s=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,s.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:s,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:f}=(0,n.useMCPServers)(h),{data:y=[],isLoading:b}=(()=>{let{accessToken:e}=(0,r.default)();return(0,a.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:v=[],isLoading:j}=(0,o.useMCPToolsets)(),_=new Set(y),w=[...y.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`})),...v.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],k={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},N={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...s?.servers||[],...s?.accessGroups||[],...(s?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let a=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),s=t.filter(e=>!e.startsWith(c));e({servers:s.filter(e=>!_.has(e)),accessGroups:s.filter(e=>_.has(e)),toolsets:a})},value:S,loading:f||b||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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:k[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:k[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:N[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(764205),l=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,a.useState)({}),[f,y]=(0,a.useState)({}),[b,v]=(0,a.useState)({}),[j,_]=(0,a.useState)({}),w=(0,a.useRef)(u);(0,a.useEffect)(()=>{w.current=u},[u]);let k=(0,a.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),N=async(e,t)=>{y(t=>({...t,[e]:!0})),v(t=>({...t,[e]:""}));try{let a=await (0,s.listMCPTools)(t,e);if(a.error)v(t=>({...t,[e]:a.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=a.tools||[];x(a=>({...a,[e]:t}));let s=w.current;if(!s[e]&&t.length>0){let a=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...s,[e]:a})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),v(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{y(t=>({...t,[e]:!1}))}};(0,a.useEffect)(()=>{k.forEach(t=>{h[t.server_id]||f[t.server_id]||N(t.server_id,e)})},[k,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:k.map(e=>{let a=e.server_name||e.alias||e.server_id,s=h[e.server_id]||[],n=u[e.server_id]||[],d=f[e.server_id],c=b[e.server_id],g=j[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)(l.Text,{className:"font-semibold text-gray-900",children:a}),e.description&&(0,t.jsx)(l.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&s.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>_(a=>({...a,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 a;return a=h[t=e.server_id]||[],void m({...u,[t]:a.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)(r.Spin,{size:"large"}),(0,t.jsx)(l.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)(l.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(l.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&s.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:s,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&s.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:s.map(a=>{let s=n.includes(a.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{if(p)return;let t=s?n.filter(e=>e!==a.name):[...n,a.name];S(e.server_id,t)},disabled:p,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)(l.Text,{className:"font-medium text-gray-900",children:a.name}),(0,t.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["- ",a.description||"No description"]})]})})]},a.name)})}),!d&&!c&&0===s.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(l.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(592968),l=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=a.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:f=[],onDisabledCallbacksChange:y})=>{let b=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),v=Object.keys(p.callbackInfo),j=e=>{x?.(e)},_=(t,a,s)=>{let l=[...e];if("callback_name"===a){let e=p.callback_map[s]||s;l[t]={...l[t],[a]:e,callback_vars:{}}}else l[t]={...l[t],[a]:s};j(l)},w=(t,a,s)=>{let l=[...e];l[t]={...l[t],callback_vars:{...l[t].callback_vars,[a]:s}},j(l)};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)(s.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(a.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);y?.(t)},style:{width:"100%"},optionLabelProp:"label",children:v.map(e=>{let a=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(s.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(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)(l.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)(s.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((l,d)=>{let u=l.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===l.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(a.Select,{value:u,placeholder:"Select integration",onChange:e=>_(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:b.map(e=>{let a=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(s.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(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)(a.Select,{value:l.callback_type,onChange:e=>_(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,a)=>{if(!e.callback_name)return null;let l=Object.entries(p.callback_map).find(([t,a])=>a===e.callback_name)?.[0];if(!l)return null;let i=p.callbackInfo[l]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([l,i])=>(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:l.replace(/_/g," ")}),(0,t.jsx)(s.Tooltip,{title:`Environment variable reference recommended: os.environ/${l.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(a,l,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(a,l,e.target.value)})]},l))})]})})(l,d)]})]},d)})}),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'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(404206),l=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,a.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,f]=(0,a.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[y,b]=(0,a.useState)([]),[v,j]=(0,a.useState)([]),[_,w]=(0,a.useState)([]),[k,N]=(0,a.useState)([]),[S,C]=(0,a.useState)({}),[T,I]=(0,a.useState)({}),M=(0,a.useRef)(!1),E=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(M.current&&e===E.current){M.current=!1;return}if(M.current&&e!==E.current&&(M.current=!1),e!==E.current)if(E.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...a}=e;f({routerSettings:a,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let s=e.fallbacks||[];b(s),j(s&&0!==s.length?s.map((e,t)=>{let[a,s]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:a||null,fallbackModels:s||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),b([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,a.useEffect)(()=>{e&&(0,o.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 a=e.fields.find(e=>"routing_strategy"===e.field_name);a?.options&&N(a.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,a.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let A=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),a=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:y.length>0?y:null}).map(([a,s])=>{if("routing_strategy_args"!==a&&"routing_strategy"!==a&&"enable_tag_filtering"!==a&&"fallbacks"!==a){let l=document.querySelector(`input[name="${a}"]`);if(l){if(void 0!==l.value&&""!==l.value){let r=((a,s,l)=>{if(null==s)return l;let r=String(s).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(a)){let e=Number(r);return Number.isNaN(e)?l:e}if(t.has(a)){if(""===r)return null;try{return JSON.parse(r)}catch{return l}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(a,l.value,s);return[a,r]}return[a,null]}}else if("routing_strategy"===a)return[a,x.selectedStrategy];else if("enable_tag_filtering"===a)return[a,x.enableTagFiltering];else if("fallbacks"===a)return[a,y.length>0?y:null];else if("routing_strategy_args"===a&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),a={};return e?.value&&(a.lowest_latency_buffer=Number(e.value)),t?.value&&(a.ttl=Number(t.value)),["routing_strategy_args",Object.keys(a).length>0?a:null]}return[a,s]}).filter(e=>null!=e)),s=(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:s(a.routing_strategy),allowed_fails:s(a.allowed_fails,!0),cooldown_time:s(a.cooldown_time,!0),num_retries:s(a.num_retries,!0),timeout:s(a.timeout,!0),retry_after:s(a.retry_after,!0),fallbacks:y.length>0?y:null,context_window_fallbacks:s(a.context_window_fallbacks),retry_policy:s(a.retry_policy),model_group_alias:s(a.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:s(a.routing_strategy_args)}};(0,a.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{M.current=!0,p({router_settings:A()})},100);return()=>clearTimeout(e)},[x,y]);let P=Array.from(new Set(_.map(e=>e.model_group))).sort();return((0,a.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:A()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(l.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(s.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(s.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:v,onGroupsChange:e=>{j(e),b(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:P,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},207082,e=>{"use strict";var t=e.i(619273),a=e.i(266027),s=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,s.createQueryKeys)("keys"),n=async(e,t,a,s={})=>{try{let r=(0,l.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:s.teamID,project_id:s.projectID,organization_id:s.organizationID,key_alias:s.selectedKeyAlias,key_hash:s.keyHash,user_id:s.userID,page:t,size:a,sort_by:s.sortBy,sort_order:s.sortOrder,expand:s.expand,status:s.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,s.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,s,l={})=>{let{accessToken:i}=(0,r.default)();return(0,a.useQuery)({queryKey:o.list({page:e,limit:s,...l}),queryFn:async()=>await n(i,e,s,{...l,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,s,l={})=>{let{accessToken:o}=(0,r.default)();return(0,a.useQuery)({queryKey:i.list({page:e,limit:s,...l}),queryFn:async()=>await n(o,e,s,l),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(708347),r=e.i(135214);let i=(0,a.createQueryKeys)("projects"),n=async e=>{let t=(0,s.getProxyBaseUrl)(),a=`${t}/project/list`,l=await fetch(a,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return l.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:a}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&l.all_admin_roles.includes(a||"")})}])},392110,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=s.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:f})=>{let y=p&&!["7d","30d","90d","180d","365d"].includes(p),[b,v]=(0,a.useState)(y),[j,_]=(0,a.useState)(y?p:""),[w,k]=(0,a.useState)(e?.getFieldValue?.("duration")||"");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)(l.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&f&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let a=t.target.checked;f(a),a&&(k(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{k(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(l.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(l.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(s.Select,{value:b?"custom":p,onChange:e=>{"custom"===e?v(!0):(v(!1),_(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),b&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;_(t),g(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)"})]})]})]})]}),u&&(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."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),a=e.i(808613),s=e.i(199133),l=e.i(592968),r=e.i(827252);let{Option:i}=s.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(a.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(l.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(s.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),a=e.i(199133);let{Text:s}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:l,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(a.Select,{showSearch:!0,placeholder:"All Organizations",value:l,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,a)=>{if(!a)return!1;let s=e?.find(e=>e.organization_id===a.key);if(!s)return!1;let l=t.toLowerCase().trim(),r=(s.organization_alias||"").toLowerCase(),i=(s.organization_id||"").toLowerCase();return r.includes(l)||i.includes(l)},children:e?.map(e=>(0,t.jsxs)(a.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(s,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(28651),l=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,a,s)=>{i(e.map((e,l)=>l===t?{...e,[a]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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)(l.Select,{value:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(s.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(a.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(a.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},533882,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(250980),l=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:f={},onAliasUpdate:y,showExampleConfig:b=!0})=>{let[v,j]=(0,a.useState)([]),[_,w]=(0,a.useState)({aliasName:"",targetModel:""}),[k,N]=(0,a.useState)(null);(0,a.useEffect)(()=>{j(Object.entries(f).map(([e,t],a)=>({id:`${a}-${e}`,aliasName:e,targetModel:t})))},[f]);let S=()=>{if(!k)return;if(!k.aliasName||!k.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.id!==k.id&&e.aliasName===k.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=v.map(e=>e.id===k.id?k:e);j(e),N(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),x.default.success("Alias updated successfully")},C=()=>{N(null)},T=v.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:_.aliasName,onChange:e=>w({..._,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:_.targetModel,placeholder:"Select target model",onChange:e=>w({..._,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!_.aliasName||!_.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.aliasName===_.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...v,{id:`${Date.now()}-${_.aliasName}`,aliasName:_.aliasName,targetModel:_.targetModel}];j(e),w({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),x.default.success("Alias added successfully")},disabled:!_.aliasName||!_.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!_.aliasName||!_.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(s.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)(p.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:[v.map(a=>(0,t.jsx)(p.TableRow,{className:"h-8",children:k&&k.id===a.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:k.aliasName,onChange:e=>N({...k,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:k.targetModel,onChange:e=>N({...k,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:a.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:a.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{N({...a})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(l.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,s;return e=a.id,j(t=v.filter(t=>t.id!==e)),s={},void(t.forEach(e=>{s[e.aliasName]=e.targetModel}),y&&y(s),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},a.id)),0===v.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.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)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,a])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',a,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(266484);e.s(["default",0,function({value:e,onChange:l,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(s.default,{value:e,onChange:l,disabledCallbacks:i,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)(a.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"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(482725),l=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(a.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(s.Spin,{indicator:(0,t.jsx)(l.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let a=c?.find(e=>e.project_id===t.key);if(!a)return!1;let s=e.toLowerCase().trim(),l=(a.project_alias||"").toLowerCase(),r=(a.project_id||"").toLowerCase();return l.includes(s)||r.includes(s)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(a.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),a=e.i(207082),s=e.i(109799),l=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),f=e.i(599724),y=e.i(779241),b=e.i(629569),v=e.i(464571),j=e.i(808613),_=e.i(311451),w=e.i(212931),k=e.i(91739),N=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),M=e.i(271645),E=e.i(708347),A=e.i(552130),P=e.i(557662),L=e.i(9314),O=e.i(860585),F=e.i(82946),D=e.i(392110),R=e.i(533882),$=e.i(844565),B=e.i(651904),z=e.i(939510),K=e.i(460285),V=e.i(663435),U=e.i(363256),G=e.i(575260),q=e.i(371455),H=e.i(319312),W=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[a,s]=(0,M.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{s(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>s(!1),2e3)},children:(0,t.jsx)(v.Button,{type:"primary",style:{marginTop:12},children:a?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var ea=e.i(435451),es=e.i(916940);let{Option:el}=N.Select,er=async(e,t,a,s)=>{try{if(null===e||null===t)return[];if(null!==a){let l=(await (0,X.modelAvailableCall)(a,e,t,!0,s,!0)).data.map(e=>e.id);return console.log("available_model_names:",l),l}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,a,s)=>{try{if(null===e||null===t)return;if(null!==a){let l=(await (0,X.modelAvailableCall)(a,e,t)).data.map(e=>e.id);console.log("available_model_names:",l),s(l)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&E.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,s.useOrganizations)(),{data:ef,isLoading:ey}=(0,l.useProjects)(),{data:eb}=(0,i.useUISettings)(),{data:ev}=(0,r.useTags)(),ej=!!eb?.values?.enable_projects_ui,e_=!!eb?.values?.disable_custom_api_keys,ew=ev?Object.values(ev).map(e=>({value:e.name,label:e.name})):[],ek=(0,c.useQueryClient)(),[eN]=j.Form.useForm(),[eS,eC]=(0,M.useState)(!1),[eT,eI]=(0,M.useState)(null),[eM,eE]=(0,M.useState)(null),[eA,eP]=(0,M.useState)([]),[eL,eO]=(0,M.useState)([]),[eF,eD]=(0,M.useState)("you"),[eR,e$]=(0,M.useState)(!1),[eB,ez]=(0,M.useState)(null),[eK,eV]=(0,M.useState)([]),[eU,eG]=(0,M.useState)([]),[eq,eH]=(0,M.useState)([]),[eW,eQ]=(0,M.useState)([]),[eJ,eY]=(0,M.useState)(e),[eX,eZ]=(0,M.useState)(null),[e0,e1]=(0,M.useState)(null),[e2,e4]=(0,M.useState)(!1),[e3,e6]=(0,M.useState)(null),[e5,e7]=(0,M.useState)({}),[e8,e9]=(0,M.useState)([]),[te,tt]=(0,M.useState)(!1),[ta,ts]=(0,M.useState)([]),[tl,tr]=(0,M.useState)([]),[ti,tn]=(0,M.useState)("llm_api"),[to,td]=(0,M.useState)({}),[tc,tu]=(0,M.useState)(!1),[tm,tp]=(0,M.useState)("30d"),[tg,th]=(0,M.useState)(null),[tx,tf]=(0,M.useState)([]),[ty,tb]=(0,M.useState)(0),[tv,tj]=(0,M.useState)([]),[t_,tw]=(0,M.useState)(null),tk=()=>{eC(!1),eN.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),tb(e=>e+1),tw(null),eZ(null),e1(null),tf([])},tN=()=>{eC(!1),eI(null),eY(null),eN.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),tb(e=>e+1),tw(null),eZ(null),e1(null),tf([])};(0,M.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eP)},[ec,eu,em]),(0,M.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,M.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eG(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eH(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);eV(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,M.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,M.useEffect)(()=>{if(eo&&!eR&&Z&&em&&E.rolesWithWriteAccess.includes(em)&&(eC(!0),e$(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?eD("you"):eD(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),eN.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&eN.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&ez(ed.models),ed.key_type&&(tn(ed.key_type),eN.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eR,eN,em]);let tS=eL.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,s=e?.key_alias??"",l=e?.team_id??null;if((ee?.filter(e=>e.team_id===l).map(e=>e.key_alias)??[]).includes(s))throw Error(`Key alias ${s} already exists for team with ID ${l}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eF)e.user_id=eu;else if("agent"===eF){if(!t_)return void Y.default.fromBackend("Please select an agent");e.agent_id=t_}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eF&&(r.service_account_id=e.key_alias),eW.length>0&&(r={...r,logging:eW.filter(e=>e.callback_name)}),tl.length>0){let e=(0,P.mapDisplayToInternalNames)(tl);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),a&&a.length>0&&(e.object_permission.mcp_access_groups=a),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:a}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),a&&a.length>0&&(e.object_permission.agent_access_groups=a),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eF?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),ek.invalidateQueries({queryKey:a.keyKeys.lists()}),eI(t.key),eE(t.soft_budget),Y.default.success("Virtual Key Created"),eN.resetFields(),tf([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 a=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),s=t?.error||t;s?.message&&(a=s.message)}}else{let t=e?.error||e;t?.message&&(a=t.message)}}catch(e){}return t.includes("team_member_permission_error")||a.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);Y.default.fromBackend(e)}};(0,M.useEffect)(()=>{if(e0){let e=ef?.find(e=>e.project_id===e0);eO(e?.models??[]),eN.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eO(Array.from(new Set([...eJ?.models??[],...e])))}),eB||eN.setFieldValue("models",[]),eN.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,eN]),(0,M.useEffect)(()=>{if(!eB||0===eB.length||!eL||0===eL.length)return;let e=eB.filter(e=>eL.includes(e));e.length>0&&eN.setFieldsValue({models:e}),ez(null)},[eB,eL,eN]),(0,M.useEffect)(()=>{if(!e0||!Z)return;let e=ef?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),eN.setFieldValue("team_id",t.team_id))},[Z,e0,ef]);let tT=async e=>{if(!e)return void e9([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let a=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e9(a)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,M.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&E.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tk,onCancel:tN,children:(0,t.jsxs)(j.Form,{form:eN,onFinish:tC,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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(k.Radio.Group,{onChange:e=>eD(e.target.value),value:eF,children:[(0,t.jsx)(k.Radio,{value:"you",children:"You"}),(0,t.jsx)(k.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(k.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(k.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eF&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eF,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)(N.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tI(e)},onSelect:(e,t)=>{let a;return a=t.user,void eN.setFieldsValue({user_id:a.user_id})},options:e8,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(v.Button,{onClick:()=>e4(!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"===eF&&(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)(N.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:t_,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tv.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(U.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),eN.setFieldValue("team_id",void 0),eN.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eF,message:"Please select a team for the service account"}],help:"service_account"===eF?"required":"",children:(0,t.jsx)(V.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),eN.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),eN.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),eN.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(G.default,{projects:ef,teamId:eJ?.team_id,loading:ey||!Z,onChange:e=>{if(!e){e1(null),eY(null),eN.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(f.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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eF||"another_user"===eF?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eF||"another_user"===eF?"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"===eF?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(y.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(N.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&eN.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(el,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eL.map(e=>(0,t.jsx)(el,{value:e,children:(0,W.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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)(N.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tn(e),("management"===e||"read_only"===e)&&eN.setFieldsValue({models:[]})},children:[(0,t.jsx)(el,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(el,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(el,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.max_budget&&a>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ea.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(O.default,{onChange:e=>eN.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(H.BudgetWindowsEditor,{value:tx,onChange:tf})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.tpm_limit&&a>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ea.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eN,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.rpm_limit&&a>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ea.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eN,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eU.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(L.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)($.default,{onChange:e=>eN.setFieldValue("allowed_passthrough_routes",e),value:eN.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(es.default,{onChange:e=>eN.setFieldValue("allowed_vector_store_ids",e),value:eN.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(_.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>eN.setFieldValue("allowed_mcp_servers_and_groups",e),value:eN.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(_.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:eN.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:eN.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eN.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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)(A.default,{onChange:e=>eN.setFieldValue("allowed_agents_and_groups",e),value:eN.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{value:eW,onChange:eQ,premiumUser:!0,disabledCallbacks:tl,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(B.default,{value:eW,onChange:eQ,premiumUser:!1,disabledCallbacks:tl,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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)(K.default,{accessToken:ec||"",value:tg||void 0,onChange:th,modelData:eA.length>0?{data:eA.map(e=>({model_name:e}))}:void 0},ty)})})]},`router-settings-accordion-${ty}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(f.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)(R.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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:eN,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(_.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(F.default,{schemaComponent:"GenerateKeyRequest",form:eN,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...e_?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(v.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e5,onUserCreated:e=>{e6(e),eN.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tk,onCancel:tN,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!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(f.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},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",()=>t])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},988297,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:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,a],988297)},797672,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:"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,a],797672)},992619,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(779241),l=e.i(599724),r=e.i(199133),i=e.i(983561),n=e.i(689020);e.s(["default",0,({accessToken:e,value:o,placeholder:d="Select a Model",onChange:c,disabled:u=!1,style:m,className:p,showLabel:g=!0,labelText:h="Select Model"})=>{let[x,f]=(0,a.useState)(o),[y,b]=(0,a.useState)(!1),[v,j]=(0,a.useState)([]),_=(0,a.useRef)(null);return(0,a.useEffect)(()=>{f(o)},[o]),(0,a.useEffect)(()=>{e&&(async()=>{try{let t=await (0,n.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&j(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[g&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.RobotOutlined,{className:"mr-2"})," ",h]}),(0,t.jsx)(r.Select,{value:x,placeholder:d,onChange:e=>{"custom"===e?(b(!0),f(void 0)):(b(!1),f(e),c&&c(e))},options:[...Array.from(new Set(v.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:u}),y&&(0,t.jsx)(s.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{f(e),c&&c(e)},500)},disabled:u})]})}])},500727,699857,696609,531516,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(135214);let r=(0,a.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:a}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,s.fetchMCPServers)(a,e),enabled:!!a})}],500727);let i=(0,a.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list(),queryFn:async()=>await (0,s.fetchMCPToolsets)(e),enabled:!!e})}],699857);var n=e.i(843476),o=e.i(271645),d=e.i(536916),c=e.i(599724),u=e.i(409797),m=e.i(246349),m=m;let p=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,g=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,h=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,x=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function f(e,t=""){let a=e.toLowerCase();if(x.test(a))return"read";if(p.test(a))return"delete";if(h.test(a))return"update";if(g.test(a))return"create";if(t){let e=t.toLowerCase();if(x.test(e))return"read";if(p.test(e))return"delete";if(h.test(e))return"update";if(g.test(e))return"create"}return"unknown"}function y(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let a of e)t[f(a.name,a.description)].push(a);return t}let b={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,b,"classifyToolOp",()=>f,"groupToolsByCrud",()=>y],696609);let v=["read","create","update","delete","unknown"],j={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"},_={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={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:t,onChange:a,readOnly:s=!1,searchFilter:l=""})=>{let[r,i]=(0,o.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),p=(0,o.useMemo)(()=>y(e),[e]),g=(0,o.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),h=e=>{if(s)return;let t=new Set(g);t.has(e)?t.delete(e):t.add(e),a(Array.from(t))};return 0===e.length?null:(0,n.jsx)("div",{className:"space-y-3",children:v.map(e=>{let t,o=p[e];if(0===o.length)return null;if(l){let e=l.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let x=b[e],f=(t=p[e]).length>0&&t.every(e=>g.has(e.name)),y=(e=>{let t=p[e];if(0===t.length)return!1;let a=t.filter(e=>g.has(e.name)).length;return a>0&&a{i(t=>({...t,[e]:!t[e]}))},children:[v?(0,n.jsx)(m.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,n.jsx)(u.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,n.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:x.label}),(0,n.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${j[x.risk]}`,children:"high"===x.risk?"High Risk":"medium"===x.risk?"Medium Risk":"low"===x.risk?"Safe":"Unclassified"}),(0,n.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>g.has(e.name)).length,"/",o.length," allowed"]})]}),!s&&(0,n.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,n.jsx)(c.Text,{className:"text-xs text-gray-500",children:f?"All on":y?"Partial":"All off"}),(0,n.jsx)(d.Checkbox,{checked:f,indeterminate:y,onChange:t=>((e,t)=>{if(s)return;let l=new Set(g);for(let a of p[e])t?l.add(a.name):l.delete(a.name);a(Array.from(l))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!v&&(0,n.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:x.description}),!v&&(0,n.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!l||e.name.toLowerCase().includes(l.toLowerCase())||(e.description??"").toLowerCase().includes(l.toLowerCase())).map(e=>{let t,a=(t=e.name,g.has(t));return(0,n.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!s?"cursor-pointer":""} ${a?"":"opacity-60"}`,onClick:()=>h(e.name),children:[(0,n.jsx)(d.Checkbox,{checked:a,onChange:()=>h(e.name),disabled:s,onClick:e=>e.stopPropagation()}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,n.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,n.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${a?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:a?"on":"off"})]},e.name)})})]},e)})})}],531516)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var a=e.i(841947);e.s(["X",()=>a.default],37727)},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",()=>t])},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",()=>t])},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",()=>t])},158392,419470,e=>{"use strict";var t=e.i(843476),a=e.i(311451);let s={ttl:3600,lowest_latency_buffer:0},l=({routingStrategyArgs:e})=>{let l={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||s).map(([e,s])=>(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:l[e]||""}),(0,t.jsx)(a.Input,{name:e,defaultValue:"object"==typeof s?JSON.stringify(s,null,2):s?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},r=({routerSettings:e,routerFieldsMetadata:s})=>(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,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).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:s[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:s[e]?.field_description||""}),(0,t.jsx)(a.Input,{name:e,defaultValue:null==l||"null"===l?"":"object"==typeof l?JSON.stringify(l,null,2):l?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var i=e.i(199133);let n=({selectedStrategy:e,availableStrategies:a,routingStrategyDescriptions:s,routerFieldsMetadata:l,onStrategyChange:r})=>(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:l.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(i.Select,{value:e,onChange:r,style:{width:"100%"},size:"large",children:a.map(e=>(0,t.jsx)(i.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}),s[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:s[e]})]})},e))})})]});var o=e.i(790848);let d=({enabled:e,routerFieldsMetadata:a,onToggle:s})=>(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:a.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[a.enable_tag_filtering?.field_description||"",a.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:a.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(o.Switch,{checked:e,onChange:s,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:a,routerFieldsMetadata:s,availableRoutingStrategies:i,routingStrategyDescriptions:o})=>(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"})]}),i.length>0&&(0,t.jsx)(n,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:i,routingStrategyDescriptions:o,routerFieldsMetadata:s,onStrategyChange:t=>{a({...e,selectedStrategy:t})}}),(0,t.jsx)(d,{enabled:e.enableTagFiltering,routerFieldsMetadata:s,onToggle:t=>{a({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(l,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(r,{routerSettings:e.routerSettings,routerFieldsMetadata:s})]})],158392);var c=e.i(994388),u=e.i(653496),m=e.i(107233),p=e.i(271645),g=e.i(888259),h=e.i(592968),x=e.i(361653),x=x;let f=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var y=e.i(37727);function b({group:e,onChange:a,availableModels:s,maxFallbacks:l}){let r=s.filter(t=>t!==e.primaryModel),n=e.fallbackModels.length{let s=[...e.fallbackModels];s.includes(t)&&(s=s.filter(e=>e!==t)),a({...e,primaryModel:t,fallbackModels:s})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:s.map(e=>({label:e,value:e}))}),!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",children:[(0,t.jsx)(x.default,{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-sm",children:[(0,t.jsx)(f,{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 ",l," 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)(i.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:n?"Select fallback models to add...":`Maximum ${l} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let s=t.slice(0,l);a({...e,fallbackModels:s})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:r.map(e=>({label:e,value:e})),optionRender:(a,s)=>{let l=e.fallbackModels.includes(a.value),r=l?e.fallbackModels.indexOf(a.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[l&&null!==r&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:r}),(0,t.jsx)("span",{children:a.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(h.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:n?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${l} used)`:`Maximum ${l} 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((s,l)=>(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-sm 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 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:l+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:s})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==l),void a({...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)(y.X,{className:"w-4 h-4"})})]},`${s}-${l}`))})]})]})]})}function v({groups:e,onGroupsChange:a,availableModels:s,maxFallbacks:l=10,maxGroups:r=5}){let[i,n]=(0,p.useState)(e.length>0?e[0].id:"1");(0,p.useEffect)(()=>{e.length>0?e.some(e=>e.id===i)||n(e[0].id):n("1")},[e]);let o=()=>{if(e.length>=r)return;let t=Date.now().toString();a([...e,{id:t,primaryModel:null,fallbackModels:[]}]),n(t)},d=t=>{a(e.map(e=>e.id===t.id?t:e))},h=e.map((a,r)=>{let i=a.primaryModel?a.primaryModel:`Group ${r+1}`;return{key:a.id,label:i,closable:e.length>1,children:(0,t.jsx)(b,{group:a,onChange:d,availableModels:s,maxFallbacks:l})}});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)(c.Button,{variant:"primary",onClick:o,icon:()=>(0,t.jsx)(m.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:i,onChange:n,onEdit:(t,s)=>{"add"===s?o():"remove"===s&&e.length>1&&(t=>{if(1===e.length)return g.default.warning("At least one group is required");let s=e.filter(e=>e.id!==t);a(s),i===t&&s.length>0&&n(s[s.length-1].id)})(t)},items:h,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=r})}e.s(["FallbackSelectionForm",()=>v],419470)},645526,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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 l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["TeamOutlined",0,r],645526)},109799,e=>{"use strict";var t=e.i(135214),a=e.i(764205),s=e.i(266027),l=e.i(912598);let r=(0,e.i(243652).createQueryKeys)("organizations");e.s(["organizationKeys",0,r,"useOrganization",0,e=>{let i=(0,l.useQueryClient)(),{accessToken:n}=(0,t.default)();return(0,s.useQuery)({queryKey:r.detail(e),enabled:!!(n&&e),queryFn:async()=>{if(!n||!e)throw Error("Missing auth or teamId");return(0,a.organizationInfoCall)(n,e)},initialData:()=>{if(!e)return;let t=i.getQueryData(r.list({}));return t?.find(t=>t.organization_id===e)}})},"useOrganizations",0,()=>{let{accessToken:e,userId:l,userRole:i}=(0,t.default)();return(0,s.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,a.organizationListCall)(e),enabled:!!(e&&l&&i)})}])},993914,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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 l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["FileTextOutlined",0,r],993914)},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",()=>t])},621482,e=>{"use strict";var t=e.i(869230),a=e.i(992571),s=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,a.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,a.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:s}=e,l=super.createResult(e,t),{isFetching:r,isRefetching:i,isError:n,isRefetchError:o}=l,d=s.fetchMeta?.fetchMore?.direction,c=n&&"forward"===d,u=r&&"forward"===d,m=n&&"backward"===d,p=r&&"backward"===d;return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a.hasNextPage)(t,s.data),hasPreviousPage:(0,a.hasPreviousPage)(t,s.data),isFetchNextPageError:c,isFetchingNextPage:u,isFetchPreviousPageError:m,isFetchingPreviousPage:p,isRefetchError:o&&!c&&!m,isRefetching:i&&!u&&!p}}},l=e.i(469637);function r(e,t){return(0,l.useBaseQuery)(e,s,t)}e.s(["useInfiniteQuery",()=>r],621482)},270345,e=>{"use strict";var t=e.i(764205);let a=async(e,a,s,l)=>"Admin"!=s&&"Admin Viewer"!=s?await (0,t.teamListCall)(e,l?.organization_id||null,a):await (0,t.teamListCall)(e,l?.organization_id||null);e.s(["fetchTeams",0,a])},785242,e=>{"use strict";var t=e.i(619273),a=e.i(621482),s=e.i(266027),l=e.i(912598),r=e.i(135214),i=e.i(270345),n=e.i(243652),o=e.i(764205);let d=async(e,t,a,s={})=>{try{let l=(0,o.getProxyBaseUrl)(),r=new URLSearchParams(Object.entries({team_id:s.teamID,organization_id:s.organizationID,team_alias:s.team_alias,user_id:s.userID,page:t,page_size:a,sort_by:s.sortBy,sort_order:s.sortOrder,status:s.status}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${r}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let d=await n.json();return console.log("/v2/team/list API Response:",d),d}catch(e){throw console.error("Failed to list teams:",e),e}},c=(0,n.createQueryKeys)("teams"),u=(0,n.createQueryKeys)("infiniteTeams"),m=async(e,t,a,s={})=>{try{let l=(0,o.getProxyBaseUrl)(),r=new URLSearchParams(Object.entries({team_id:s.teamID,organization_id:s.organizationID,team_alias:s.team_alias,user_id:s.userID,page:t,page_size:a,sort_by:s.sortBy,sort_order:s.sortOrder,status:"deleted"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${r}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let d=await n.json();if(console.log("/team/list?status=deleted API Response:",d),d&&"object"==typeof d&&"teams"in d)return d.teams;return d}catch(e){throw console.error("Failed to list deleted teams:",e),e}},p=(0,n.createQueryKeys)("deletedTeams");e.s(["teamListCall",0,d,"useDeletedTeams",0,(e,a,l={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:p.list({page:e,limit:a,...l}),queryFn:async()=>await m(i,e,a,l),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useInfiniteTeams",0,(e=50,t,s)=>{let{accessToken:l,userId:i,userRole:n}=(0,r.default)(),o="Admin"===n||"Admin Viewer"===n;return(0,a.useInfiniteQuery)({queryKey:u.list({filters:{pageSize:e,...t&&{search:t},...s&&{organizationId:s},...i&&{userId:i}}}),queryFn:async({pageParam:a})=>await d(l,a,e,{team_alias:t||void 0,organizationID:s,userID:o?void 0:i}),initialPageParam:1,getNextPageParam:e=>{if(e.page{let{accessToken:t}=(0,r.default)(),a=(0,l.useQueryClient)();return(0,s.useQuery)({queryKey:c.detail(e),enabled:!!(t&&e),queryFn:async()=>{if(!t||!e)throw Error("Missing auth or teamId");return(0,o.teamInfoCall)(t,e)},initialData:()=>{if(!e)return;let t=a.getQueryData(c.list({}));return t?.find(t=>t.team_id===e)}})},"useTeams",0,()=>{let{accessToken:e,userId:t,userRole:a}=(0,r.default)();return(0,s.useQuery)({queryKey:c.list({}),queryFn:async()=>await (0,i.fetchTeams)(e,t,a,null),enabled:!!e})}])},309426,e=>{"use strict";var t=e.i(290571),a=e.i(444755),s=e.i(673706),l=e.i(271645),r=e.i(46757);let i=(0,s.makeClassName)("Col"),n=l.default.forwardRef((e,s)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:p,numColSpanLg:g,children:h,className:x}=e,f=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),y=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return l.default.createElement("div",Object.assign({ref:s,className:(0,a.tremorTwMerge)(i("root"),(n=y(u,r.colSpan),o=y(m,r.colSpanSm),d=y(p,r.colSpanMd),c=y(g,r.colSpanLg),(0,a.tremorTwMerge)(n,o,d,c)),x)},f),h)});n.displayName="Col",e.s(["Col",()=>n],309426)},950724,(e,t,a)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},100236,(e,t,a)=>{t.exports=e.g&&e.g.Object===Object&&e.g},139088,(e,t,a)=>{var s=e.r(100236),l="object"==typeof self&&self&&self.Object===Object&&self;t.exports=s||l||Function("return this")()},631926,(e,t,a)=>{var s=e.r(139088);t.exports=function(){return s.Date.now()}},748891,(e,t,a)=>{var s=/\s/;t.exports=function(e){for(var t=e.length;t--&&s.test(e.charAt(t)););return t}},830364,(e,t,a)=>{var s=e.r(748891),l=/^\s+/;t.exports=function(e){return e?e.slice(0,s(e)+1).replace(l,""):e}},630353,(e,t,a)=>{t.exports=e.r(139088).Symbol},243436,(e,t,a)=>{var s=e.r(630353),l=Object.prototype,r=l.hasOwnProperty,i=l.toString,n=s?s.toStringTag:void 0;t.exports=function(e){var t=r.call(e,n),a=e[n];try{e[n]=void 0;var s=!0}catch(e){}var l=i.call(e);return s&&(t?e[n]=a:delete e[n]),l}},223243,(e,t,a)=>{var s=Object.prototype.toString;t.exports=function(e){return s.call(e)}},377684,(e,t,a)=>{var s=e.r(630353),l=e.r(243436),r=e.r(223243),i=s?s.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?l(e):r(e)}},877289,(e,t,a)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},361884,(e,t,a)=>{var s=e.r(377684),l=e.r(877289);t.exports=function(e){return"symbol"==typeof e||l(e)&&"[object Symbol]"==s(e)}},773759,(e,t,a)=>{var s=e.r(830364),l=e.r(950724),r=e.r(361884),i=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(r(e))return i;if(l(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=l(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var a=o.test(e);return a||d.test(e)?c(e.slice(2),a?2:8):n.test(e)?i:+e}},374009,(e,t,a)=>{var s=e.r(950724),l=e.r(631926),r=e.r(773759),i=Math.max,n=Math.min;t.exports=function(e,t,a){var o,d,c,u,m,p,g=0,h=!1,x=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var a=o,s=d;return o=d=void 0,g=t,u=e.apply(s,a)}function b(e){var a=e-p,s=e-g;return void 0===p||a>=t||a<0||x&&s>=c}function v(){var e,a,s,r=l();if(b(r))return j(r);m=setTimeout(v,(e=r-p,a=r-g,s=t-e,x?n(s,c-a):s))}function j(e){return(m=void 0,f&&o)?y(e):(o=d=void 0,u)}function _(){var e,a=l(),s=b(a);if(o=arguments,d=this,p=a,s){if(void 0===m)return g=e=p,m=setTimeout(v,t),h?y(e):u;if(x)return clearTimeout(m),m=setTimeout(v,t),y(p)}return void 0===m&&(m=setTimeout(v,t)),u}return t=r(t)||0,s(a)&&(h=!!a.leading,c=(x="maxWait"in a)?i(r(a.maxWait)||0,t):c,f="trailing"in a?!!a.trailing:f),_.cancel=function(){void 0!==m&&clearTimeout(m),g=0,o=p=d=m=void 0},_.flush=function(){return void 0===m?u:j(l())},_}},964306,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:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["XCircleIcon",0,a],964306)},435451,620250,e=>{"use strict";var t=e.i(843476),a=e.i(290571),s=e.i(271645);let l=e=>{var t=(0,a.__rest)(e,[]);return s.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"}),s.default.createElement("path",{d:"M12 4v16m8-8H4"}))},r=e=>{var t=(0,a.__rest)(e,[]);return s.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"}),s.default.createElement("path",{d:"M20 12H4"}))};var i=e.i(444755),n=e.i(673706),o=e.i(677955);let d="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",c="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",u=s.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:p,onValueChange:g,onChange:h}=e,x=(0,a.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),f=(0,s.useRef)(null),[y,b]=s.default.useState(!1),v=s.default.useCallback(()=>{b(!0)},[]),j=s.default.useCallback(()=>{b(!1)},[]),[_,w]=s.default.useState(!1),k=s.default.useCallback(()=>{w(!0)},[]),N=s.default.useCallback(()=>{w(!1)},[]);return s.default.createElement(o.default,Object.assign({type:"number",ref:(0,n.mergeRefs)([f,t]),disabled:p,makeInputClassName:(0,n.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=f.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&v(),"ArrowUp"===e.key&&k()},onKeyUp:e=>{"ArrowDown"===e.key&&j(),"ArrowUp"===e.key&&N()},onChange:e=>{p||(null==g||g(parseFloat(e.target.value)),null==h||h(e))},stepper:m?s.default.createElement("div",{className:(0,i.tremorTwMerge)("flex justify-center align-middle")},s.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=f.current)||e.stepDown(),null==(t=f.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},s.default.createElement(r,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),s.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=f.current)||e.stepUp(),null==(t=f.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},s.default.createElement(l,{"data-testid":"step-up",className:(_?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},x))});u.displayName="NumberInput",e.s(["NumberInput",()=>u],620250),e.s(["default",0,({step:e=.01,style:a={width:"100%"},placeholder:s="Enter a numerical value",min:l,max:r,onChange:i,...n})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:a,placeholder:s,min:l,max:r,onChange:i,...n})],435451)},677667,674175,886148,543086,e=>{"use strict";let t,a;var s,l=e.i(290571),r=e.i(429427),i=e.i(371330),n=e.i(271645),o=e.i(394487),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(83733);let p=(0,n.createContext)(()=>{});function g({value:e,children:t}){return n.default.createElement(p.Provider,{value:e},t)}e.s(["CloseProvider",()=>g],674175);var h=e.i(233137),x=e.i(233538),f=e.i(397701),y=e.i(402155),b=e.i(700020);let v=null!=(s=n.default.startTransition)?s:function(e){e()};var j=e.i(998348),_=((t=_||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),w=((a=w||{})[a.ToggleDisclosure=0]="ToggleDisclosure",a[a.CloseDisclosure=1]="CloseDisclosure",a[a.SetButtonId=2]="SetButtonId",a[a.SetPanelId=3]="SetPanelId",a[a.SetButtonElement=4]="SetButtonElement",a[a.SetPanelElement=5]="SetPanelElement",a);let k={0:e=>({...e,disclosureState:(0,f.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}},N=(0,n.createContext)(null);function S(e){let t=(0,n.useContext)(N);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,S),t}return t}N.displayName="DisclosureContext";let C=(0,n.createContext)(null);C.displayName="DisclosureAPIContext";let T=(0,n.createContext)(null);function I(e,t){return(0,f.match)(t.type,k,e,t)}T.displayName="DisclosurePanelContext";let M=n.Fragment,E=b.RenderFeatures.RenderStrategy|b.RenderFeatures.Static,A=Object.assign((0,b.forwardRefWithAs)(function(e,t){let{defaultOpen:a=!1,...s}=e,l=(0,n.useRef)(null),r=(0,u.useSyncRefs)(t,(0,u.optionalRef)(e=>{l.current=e},void 0===e.as||e.as===n.Fragment)),i=(0,n.useReducer)(I,{disclosureState:+!a,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:c},m]=i,p=(0,d.useEvent)(e=>{m({type:1});let t=(0,y.getOwnerDocument)(l);if(!t||!c)return;let a=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(c):t.getElementById(c);null==a||a.focus()}),x=(0,n.useMemo)(()=>({close:p}),[p]),v=(0,n.useMemo)(()=>({open:0===o,close:p}),[o,p]),j=(0,b.useRender)();return n.default.createElement(N.Provider,{value:i},n.default.createElement(C.Provider,{value:x},n.default.createElement(g,{value:p},n.default.createElement(h.OpenClosedProvider,{value:(0,f.match)(o,{0:h.State.Open,1:h.State.Closed})},j({ourProps:{ref:r},theirProps:s,slot:v,defaultTag:M,name:"Disclosure"})))))}),{Button:(0,b.forwardRefWithAs)(function(e,t){let a=(0,n.useId)(),{id:s=`headlessui-disclosure-button-${a}`,disabled:l=!1,autoFocus:m=!1,...p}=e,[g,h]=S("Disclosure.Button"),f=(0,n.useContext)(T),y=null!==f&&f===g.panelId,v=(0,n.useRef)(null),_=(0,u.useSyncRefs)(v,t,(0,d.useEvent)(e=>{if(!y)return h({type:4,element:e})}));(0,n.useEffect)(()=>{if(!y)return h({type:2,buttonId:s}),()=>{h({type:2,buttonId:null})}},[s,h,y]);let w=(0,d.useEvent)(e=>{var t;if(y){if(1===g.disclosureState)return;switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0}),null==(t=g.buttonElement)||t.focus()}}else switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0})}}),k=(0,d.useEvent)(e=>{e.key===j.Keys.Space&&e.preventDefault()}),N=(0,d.useEvent)(e=>{var t;(0,x.isDisabledReactIssue7711)(e.currentTarget)||l||(y?(h({type:0}),null==(t=g.buttonElement)||t.focus()):h({type:0}))}),{isFocusVisible:C,focusProps:I}=(0,r.useFocusRing)({autoFocus:m}),{isHovered:M,hoverProps:E}=(0,i.useHover)({isDisabled:l}),{pressed:A,pressProps:P}=(0,o.useActivePress)({disabled:l}),L=(0,n.useMemo)(()=>({open:0===g.disclosureState,hover:M,active:A,disabled:l,focus:C,autofocus:m}),[g,M,A,C,l,m]),O=(0,c.useResolveButtonType)(e,g.buttonElement),F=y?(0,b.mergeProps)({ref:_,type:O,disabled:l||void 0,autoFocus:m,onKeyDown:w,onClick:N},I,E,P):(0,b.mergeProps)({ref:_,id:s,type:O,"aria-expanded":0===g.disclosureState,"aria-controls":g.panelElement?g.panelId:void 0,disabled:l||void 0,autoFocus:m,onKeyDown:w,onKeyUp:k,onClick:N},I,E,P);return(0,b.useRender)()({ourProps:F,theirProps:p,slot:L,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,b.forwardRefWithAs)(function(e,t){let a=(0,n.useId)(),{id:s=`headlessui-disclosure-panel-${a}`,transition:l=!1,...r}=e,[i,o]=S("Disclosure.Panel"),{close:c}=function e(t){let a=(0,n.useContext)(C);if(null===a){let a=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,e),a}return a}("Disclosure.Panel"),[p,g]=(0,n.useState)(null),x=(0,u.useSyncRefs)(t,(0,d.useEvent)(e=>{v(()=>o({type:5,element:e}))}),g);(0,n.useEffect)(()=>(o({type:3,panelId:s}),()=>{o({type:3,panelId:null})}),[s,o]);let f=(0,h.useOpenClosed)(),[y,j]=(0,m.useTransition)(l,p,null!==f?(f&h.State.Open)===h.State.Open:0===i.disclosureState),_=(0,n.useMemo)(()=>({open:0===i.disclosureState,close:c}),[i.disclosureState,c]),w={ref:x,id:s,...(0,m.transitionDataAttributes)(j)},k=(0,b.useRender)();return n.default.createElement(h.ResetOpenClosedProvider,null,n.default.createElement(T.Provider,{value:i.panelId},k({ourProps:w,theirProps:r,slot:_,defaultTag:"div",features:E,visible:y,name:"Disclosure.Panel"})))})});e.s(["Disclosure",()=>A],886148);let P=(0,n.createContext)(void 0);var L=e.i(444755);let O=(0,e.i(673706).makeClassName)("Accordion"),F=(0,n.createContext)({isOpen:!1}),D=n.default.forwardRef((e,t)=>{var a;let{defaultOpen:s=!1,children:r,className:i}=e,o=(0,l.__rest)(e,["defaultOpen","children","className"]),d=null!=(a=(0,n.useContext)(P))?a:(0,L.tremorTwMerge)("rounded-tremor-default border");return n.default.createElement(A,Object.assign({as:"div",ref:t,className:(0,L.tremorTwMerge)(O("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",d,i),defaultOpen:s},o),({open:e})=>n.default.createElement(F.Provider,{value:{isOpen:e}},r))});D.displayName="Accordion",e.s(["OpenContext",()=>F,"default",()=>D],543086),e.s(["Accordion",()=>D],677667)},898667,e=>{"use strict";var t=e.i(290571),a=e.i(271645),s=e.i(886148);let l=e=>{var s=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},s),a.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),i=e.i(444755);let n=(0,e.i(673706).makeClassName)("AccordionHeader"),o=a.default.forwardRef((e,o)=>{let{children:d,className:c}=e,u=(0,t.__rest)(e,["children","className"]),{isOpen:m}=(0,a.useContext)(r.OpenContext);return a.default.createElement(s.Disclosure.Button,Object.assign({ref:o,className:(0,i.tremorTwMerge)(n("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",c)},u),a.default.createElement("div",{className:(0,i.tremorTwMerge)(n("children"),"flex flex-1 text-inherit mr-4")},d),a.default.createElement("div",null,a.default.createElement(l,{className:(0,i.tremorTwMerge)(n("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",()=>o],898667)},130643,e=>{"use strict";var t=e.i(290571),a=e.i(271645),s=e.i(886148),l=e.i(444755);let r=(0,e.i(673706).makeClassName)("AccordionBody"),i=a.default.forwardRef((e,i)=>{let{children:n,className:o}=e,d=(0,t.__rest)(e,["children","className"]);return a.default.createElement(s.Disclosure.Panel,Object.assign({ref:i,className:(0,l.tremorTwMerge)(r("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",o)},d),n)});i.displayName="AccordionBody",e.s(["AccordionBody",()=>i],130643)},109034,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(135214);let r=(0,a.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:a,userRole:i}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,s.tagListCall)(e),enabled:!!(e&&a&&i)})}])},9314,263147,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(981339),l=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),a=`${t}/v1/access_group`,s=await fetch(a,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return s.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:f}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});let y=(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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(a.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,notFoundContent:f?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(y.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:y.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},552130,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,a.useState)([]),[m,p]=(0,a.useState)([]),[g,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getAgentsList)(n),t=e?.agents||[];u(t);let a=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>a.add(e))}),p(Array.from(a))}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`}))],f=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(s.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:f,loading:g,className:i,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)(s.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))})})}])},844565,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,a.useState)([]),[p,g]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,l.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,a=e.methods;return a&&a.length>0?a.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(s.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,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:"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,a],810757);let s=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:"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,s],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",a=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],s=a.reduce((e,t)=>(e[t.displayName]=t,e),{}),l=a.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=a.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,s,"callback_map",0,l,"mapDisplayToInternalNames",0,e=>e.map(e=>l[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},75921,e=>{"use strict";var t=e.i(843476),a=e.i(266027),s=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,s.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:s,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:f}=(0,n.useMCPServers)(h),{data:y=[],isLoading:b}=(()=>{let{accessToken:e}=(0,r.default)();return(0,a.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:v=[],isLoading:j}=(0,o.useMCPToolsets)(),_=new Set(y),w=[...y.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`})),...v.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],k={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},N={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...s?.servers||[],...s?.accessGroups||[],...(s?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let a=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),s=t.filter(e=>!e.startsWith(c));e({servers:s.filter(e=>!_.has(e)),accessGroups:s.filter(e=>_.has(e)),toolsets:a})},value:S,loading:f||b||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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:k[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:k[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:N[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(764205),l=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,a.useState)({}),[f,y]=(0,a.useState)({}),[b,v]=(0,a.useState)({}),[j,_]=(0,a.useState)({}),w=(0,a.useRef)(u);(0,a.useEffect)(()=>{w.current=u},[u]);let k=(0,a.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),N=async(e,t)=>{y(t=>({...t,[e]:!0})),v(t=>({...t,[e]:""}));try{let a=await (0,s.listMCPTools)(t,e);if(a.error)v(t=>({...t,[e]:a.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=a.tools||[];x(a=>({...a,[e]:t}));let s=w.current;if(!s[e]&&t.length>0){let a=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...s,[e]:a})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),v(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{y(t=>({...t,[e]:!1}))}};(0,a.useEffect)(()=>{k.forEach(t=>{h[t.server_id]||f[t.server_id]||N(t.server_id,e)})},[k,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:k.map(e=>{let a=e.server_name||e.alias||e.server_id,s=h[e.server_id]||[],n=u[e.server_id]||[],d=f[e.server_id],c=b[e.server_id],g=j[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)(l.Text,{className:"font-semibold text-gray-900",children:a}),e.description&&(0,t.jsx)(l.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&s.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>_(a=>({...a,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 a;return a=h[t=e.server_id]||[],void m({...u,[t]:a.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)(r.Spin,{size:"large"}),(0,t.jsx)(l.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)(l.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(l.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&s.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:s,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&s.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:s.map(a=>{let s=n.includes(a.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{if(p)return;let t=s?n.filter(e=>e!==a.name):[...n,a.name];S(e.server_id,t)},disabled:p,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)(l.Text,{className:"font-medium text-gray-900",children:a.name}),(0,t.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["- ",a.description||"No description"]})]})})]},a.name)})}),!d&&!c&&0===s.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(l.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(592968),l=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=a.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:f=[],onDisabledCallbacksChange:y})=>{let b=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),v=Object.keys(p.callbackInfo),j=e=>{x?.(e)},_=(t,a,s)=>{let l=[...e];if("callback_name"===a){let e=p.callback_map[s]||s;l[t]={...l[t],[a]:e,callback_vars:{}}}else l[t]={...l[t],[a]:s};j(l)},w=(t,a,s)=>{let l=[...e];l[t]={...l[t],callback_vars:{...l[t].callback_vars,[a]:s}},j(l)};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)(s.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(a.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);y?.(t)},style:{width:"100%"},optionLabelProp:"label",children:v.map(e=>{let a=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(s.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(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)(l.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)(s.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((l,d)=>{let u=l.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===l.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(a.Select,{value:u,placeholder:"Select integration",onChange:e=>_(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:b.map(e=>{let a=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(s.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(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)(a.Select,{value:l.callback_type,onChange:e=>_(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,a)=>{if(!e.callback_name)return null;let l=Object.entries(p.callback_map).find(([t,a])=>a===e.callback_name)?.[0];if(!l)return null;let i=p.callbackInfo[l]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([l,i])=>(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:l.replace(/_/g," ")}),(0,t.jsx)(s.Tooltip,{title:`Environment variable reference recommended: os.environ/${l.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(a,l,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(a,l,e.target.value)})]},l))})]})})(l,d)]})]},d)})}),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'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(404206),l=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,a.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,f]=(0,a.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[y,b]=(0,a.useState)([]),[v,j]=(0,a.useState)([]),[_,w]=(0,a.useState)([]),[k,N]=(0,a.useState)([]),[S,C]=(0,a.useState)({}),[T,I]=(0,a.useState)({}),M=(0,a.useRef)(!1),E=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(M.current&&e===E.current){M.current=!1;return}if(M.current&&e!==E.current&&(M.current=!1),e!==E.current)if(E.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...a}=e;f({routerSettings:a,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let s=e.fallbacks||[];b(s),j(s&&0!==s.length?s.map((e,t)=>{let[a,s]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:a||null,fallbackModels:s||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),b([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,a.useEffect)(()=>{e&&(0,o.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 a=e.fields.find(e=>"routing_strategy"===e.field_name);a?.options&&N(a.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,a.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let A=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),a=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:y.length>0?y:null}).map(([a,s])=>{if("routing_strategy_args"!==a&&"routing_strategy"!==a&&"enable_tag_filtering"!==a&&"fallbacks"!==a){let l=document.querySelector(`input[name="${a}"]`);if(l){if(void 0!==l.value&&""!==l.value){let r=((a,s,l)=>{if(null==s)return l;let r=String(s).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(a)){let e=Number(r);return Number.isNaN(e)?l:e}if(t.has(a)){if(""===r)return null;try{return JSON.parse(r)}catch{return l}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(a,l.value,s);return[a,r]}return[a,null]}}else if("routing_strategy"===a)return[a,x.selectedStrategy];else if("enable_tag_filtering"===a)return[a,x.enableTagFiltering];else if("fallbacks"===a)return[a,y.length>0?y:null];else if("routing_strategy_args"===a&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),a={};return e?.value&&(a.lowest_latency_buffer=Number(e.value)),t?.value&&(a.ttl=Number(t.value)),["routing_strategy_args",Object.keys(a).length>0?a:null]}return[a,s]}).filter(e=>null!=e)),s=(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:s(a.routing_strategy),allowed_fails:s(a.allowed_fails,!0),cooldown_time:s(a.cooldown_time,!0),num_retries:s(a.num_retries,!0),timeout:s(a.timeout,!0),retry_after:s(a.retry_after,!0),fallbacks:y.length>0?y:null,context_window_fallbacks:s(a.context_window_fallbacks),retry_policy:s(a.retry_policy),model_group_alias:s(a.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:s(a.routing_strategy_args)}};(0,a.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{M.current=!0,p({router_settings:A()})},100);return()=>clearTimeout(e)},[x,y]);let P=Array.from(new Set(_.map(e=>e.model_group))).sort();return((0,a.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:A()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(l.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(s.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(s.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:v,onGroupsChange:e=>{j(e),b(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:P,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},207082,e=>{"use strict";var t=e.i(619273),a=e.i(266027),s=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,s.createQueryKeys)("keys"),n=async(e,t,a,s={})=>{try{let r=(0,l.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:s.teamID,project_id:s.projectID,organization_id:s.organizationID,key_alias:s.selectedKeyAlias,key_hash:s.keyHash,user_id:s.userID,page:t,size:a,sort_by:s.sortBy,sort_order:s.sortOrder,expand:s.expand,status:s.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,s.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,s,l={})=>{let{accessToken:i}=(0,r.default)();return(0,a.useQuery)({queryKey:o.list({page:e,limit:s,...l}),queryFn:async()=>await n(i,e,s,{...l,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,s,l={})=>{let{accessToken:o}=(0,r.default)();return(0,a.useQuery)({queryKey:i.list({page:e,limit:s,...l}),queryFn:async()=>await n(o,e,s,l),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(135214),r=e.i(708347);let i=(0,a.createQueryKeys)("projects"),n=async e=>{let t=(0,s.getProxyBaseUrl)(),a=`${t}/project/list`,l=await fetch(a,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return l.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&r.all_admin_roles.includes(a)})}])},392110,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=s.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:f})=>{let y=p&&!["7d","30d","90d","180d","365d"].includes(p),[b,v]=(0,a.useState)(y),[j,_]=(0,a.useState)(y?p:""),[w,k]=(0,a.useState)(e?.getFieldValue?.("duration")||"");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)(l.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&f&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let a=t.target.checked;f(a),a&&(k(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{k(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(l.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(l.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(s.Select,{value:b?"custom":p,onChange:e=>{"custom"===e?v(!0):(v(!1),_(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),b&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;_(t),g(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)"})]})]})]})]}),u&&(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."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),a=e.i(808613),s=e.i(199133),l=e.i(592968),r=e.i(827252);let{Option:i}=s.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(a.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(l.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(s.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),a=e.i(199133);let{Text:s}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:l,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(a.Select,{showSearch:!0,placeholder:"All Organizations",value:l,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,a)=>{if(!a)return!1;let s=e?.find(e=>e.organization_id===a.key);if(!s)return!1;let l=t.toLowerCase().trim(),r=(s.organization_alias||"").toLowerCase(),i=(s.organization_id||"").toLowerCase();return r.includes(l)||i.includes(l)},children:e?.map(e=>(0,t.jsxs)(a.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(s,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(28651),l=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,a,s)=>{i(e.map((e,l)=>l===t?{...e,[a]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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)(l.Select,{value:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(s.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(a.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(a.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},533882,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(250980),l=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:f={},onAliasUpdate:y,showExampleConfig:b=!0})=>{let[v,j]=(0,a.useState)([]),[_,w]=(0,a.useState)({aliasName:"",targetModel:""}),[k,N]=(0,a.useState)(null);(0,a.useEffect)(()=>{j(Object.entries(f).map(([e,t],a)=>({id:`${a}-${e}`,aliasName:e,targetModel:t})))},[f]);let S=()=>{if(!k)return;if(!k.aliasName||!k.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.id!==k.id&&e.aliasName===k.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=v.map(e=>e.id===k.id?k:e);j(e),N(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),x.default.success("Alias updated successfully")},C=()=>{N(null)},T=v.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:_.aliasName,onChange:e=>w({..._,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:_.targetModel,placeholder:"Select target model",onChange:e=>w({..._,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!_.aliasName||!_.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.aliasName===_.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...v,{id:`${Date.now()}-${_.aliasName}`,aliasName:_.aliasName,targetModel:_.targetModel}];j(e),w({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),x.default.success("Alias added successfully")},disabled:!_.aliasName||!_.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!_.aliasName||!_.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(s.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)(p.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:[v.map(a=>(0,t.jsx)(p.TableRow,{className:"h-8",children:k&&k.id===a.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:k.aliasName,onChange:e=>N({...k,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:k.targetModel,onChange:e=>N({...k,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:a.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:a.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{N({...a})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(l.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,s;return e=a.id,j(t=v.filter(t=>t.id!==e)),s={},void(t.forEach(e=>{s[e.aliasName]=e.targetModel}),y&&y(s),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},a.id)),0===v.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.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)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,a])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',a,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(266484);e.s(["default",0,function({value:e,onChange:l,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(s.default,{value:e,onChange:l,disabledCallbacks:i,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)(a.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"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(482725),l=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(a.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(s.Spin,{indicator:(0,t.jsx)(l.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let a=c?.find(e=>e.project_id===t.key);if(!a)return!1;let s=e.toLowerCase().trim(),l=(a.project_alias||"").toLowerCase(),r=(a.project_id||"").toLowerCase();return l.includes(s)||r.includes(s)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(a.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),a=e.i(207082),s=e.i(109799),l=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),f=e.i(599724),y=e.i(779241),b=e.i(629569),v=e.i(464571),j=e.i(808613),_=e.i(311451),w=e.i(212931),k=e.i(91739),N=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),M=e.i(271645),E=e.i(708347),A=e.i(552130),P=e.i(557662),L=e.i(9314),O=e.i(860585),F=e.i(82946),D=e.i(392110),R=e.i(533882),$=e.i(844565),B=e.i(651904),z=e.i(939510),K=e.i(460285),V=e.i(663435),U=e.i(363256),G=e.i(575260),q=e.i(371455),H=e.i(319312),W=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[a,s]=(0,M.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{s(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>s(!1),2e3)},children:(0,t.jsx)(v.Button,{type:"primary",style:{marginTop:12},children:a?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var ea=e.i(435451),es=e.i(916940);let{Option:el}=N.Select,er=async(e,t,a,s)=>{try{if(null===e||null===t)return[];if(null!==a){let l=(await (0,X.modelAvailableCall)(a,e,t,!0,s,!0)).data.map(e=>e.id);return console.log("available_model_names:",l),l}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,a,s)=>{try{if(null===e||null===t)return;if(null!==a){let l=(await (0,X.modelAvailableCall)(a,e,t)).data.map(e=>e.id);console.log("available_model_names:",l),s(l)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&E.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,s.useOrganizations)(),{data:ef,isLoading:ey}=(0,l.useProjects)(),{data:eb}=(0,i.useUISettings)(),{data:ev}=(0,r.useTags)(),ej=!!eb?.values?.enable_projects_ui,e_=!!eb?.values?.disable_custom_api_keys,ew=ev?Object.values(ev).map(e=>({value:e.name,label:e.name})):[],ek=(0,c.useQueryClient)(),[eN]=j.Form.useForm(),[eS,eC]=(0,M.useState)(!1),[eT,eI]=(0,M.useState)(null),[eM,eE]=(0,M.useState)(null),[eA,eP]=(0,M.useState)([]),[eL,eO]=(0,M.useState)([]),[eF,eD]=(0,M.useState)("you"),[eR,e$]=(0,M.useState)(!1),[eB,ez]=(0,M.useState)(null),[eK,eV]=(0,M.useState)([]),[eU,eG]=(0,M.useState)([]),[eq,eH]=(0,M.useState)([]),[eW,eQ]=(0,M.useState)([]),[eJ,eY]=(0,M.useState)(e),[eX,eZ]=(0,M.useState)(null),[e0,e1]=(0,M.useState)(null),[e2,e4]=(0,M.useState)(!1),[e3,e6]=(0,M.useState)(null),[e5,e7]=(0,M.useState)({}),[e8,e9]=(0,M.useState)([]),[te,tt]=(0,M.useState)(!1),[ta,ts]=(0,M.useState)([]),[tl,tr]=(0,M.useState)([]),[ti,tn]=(0,M.useState)("llm_api"),[to,td]=(0,M.useState)({}),[tc,tu]=(0,M.useState)(!1),[tm,tp]=(0,M.useState)("30d"),[tg,th]=(0,M.useState)(null),[tx,tf]=(0,M.useState)([]),[ty,tb]=(0,M.useState)(0),[tv,tj]=(0,M.useState)([]),[t_,tw]=(0,M.useState)(null),tk=()=>{eC(!1),eN.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),tb(e=>e+1),tw(null),eZ(null),e1(null),tf([])},tN=()=>{eC(!1),eI(null),eY(null),eN.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),tb(e=>e+1),tw(null),eZ(null),e1(null),tf([])};(0,M.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eP)},[ec,eu,em]),(0,M.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,M.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eG(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eH(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);eV(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,M.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,M.useEffect)(()=>{if(eo&&!eR&&Z&&em&&E.rolesWithWriteAccess.includes(em)&&(eC(!0),e$(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?eD("you"):eD(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),eN.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&eN.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&ez(ed.models),ed.key_type&&(tn(ed.key_type),eN.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eR,eN,em]);let tS=eL.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,s=e?.key_alias??"",l=e?.team_id??null;if((ee?.filter(e=>e.team_id===l).map(e=>e.key_alias)??[]).includes(s))throw Error(`Key alias ${s} already exists for team with ID ${l}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eF)e.user_id=eu;else if("agent"===eF){if(!t_)return void Y.default.fromBackend("Please select an agent");e.agent_id=t_}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eF&&(r.service_account_id=e.key_alias),eW.length>0&&(r={...r,logging:eW.filter(e=>e.callback_name)}),tl.length>0){let e=(0,P.mapDisplayToInternalNames)(tl);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),a&&a.length>0&&(e.object_permission.mcp_access_groups=a),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:a}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),a&&a.length>0&&(e.object_permission.agent_access_groups=a),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eF?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),ek.invalidateQueries({queryKey:a.keyKeys.lists()}),eI(t.key),eE(t.soft_budget),Y.default.success("Virtual Key Created"),eN.resetFields(),tf([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 a=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),s=t?.error||t;s?.message&&(a=s.message)}}else{let t=e?.error||e;t?.message&&(a=t.message)}}catch(e){}return t.includes("team_member_permission_error")||a.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);Y.default.fromBackend(e)}};(0,M.useEffect)(()=>{if(e0){let e=ef?.find(e=>e.project_id===e0);eO(e?.models??[]),eN.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eO(Array.from(new Set([...eJ?.models??[],...e])))}),eB||eN.setFieldValue("models",[]),eN.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,eN]),(0,M.useEffect)(()=>{if(!eB||0===eB.length||!eL||0===eL.length)return;let e=eB.filter(e=>eL.includes(e));e.length>0&&eN.setFieldsValue({models:e}),ez(null)},[eB,eL,eN]),(0,M.useEffect)(()=>{if(!e0||!Z)return;let e=ef?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),eN.setFieldValue("team_id",t.team_id))},[Z,e0,ef]);let tT=async e=>{if(!e)return void e9([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let a=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e9(a)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,M.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&E.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tk,onCancel:tN,children:(0,t.jsxs)(j.Form,{form:eN,onFinish:tC,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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(k.Radio.Group,{onChange:e=>eD(e.target.value),value:eF,children:[(0,t.jsx)(k.Radio,{value:"you",children:"You"}),(0,t.jsx)(k.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(k.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(k.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eF&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eF,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)(N.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tI(e)},onSelect:(e,t)=>{let a;return a=t.user,void eN.setFieldsValue({user_id:a.user_id})},options:e8,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(v.Button,{onClick:()=>e4(!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"===eF&&(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)(N.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:t_,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tv.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(U.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),eN.setFieldValue("team_id",void 0),eN.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eF,message:"Please select a team for the service account"}],help:"service_account"===eF?"required":"",children:(0,t.jsx)(V.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),eN.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),eN.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),eN.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(G.default,{projects:ef,teamId:eJ?.team_id,loading:ey||!Z,onChange:e=>{if(!e){e1(null),eY(null),eN.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(f.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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eF||"another_user"===eF?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eF||"another_user"===eF?"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"===eF?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(y.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(N.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&eN.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(el,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eL.map(e=>(0,t.jsx)(el,{value:e,children:(0,W.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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)(N.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tn(e),("management"===e||"read_only"===e)&&eN.setFieldsValue({models:[]})},children:[(0,t.jsx)(el,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(el,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(el,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.max_budget&&a>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ea.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(O.default,{onChange:e=>eN.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(H.BudgetWindowsEditor,{value:tx,onChange:tf})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.tpm_limit&&a>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ea.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eN,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.rpm_limit&&a>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ea.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eN,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eU.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(L.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)($.default,{onChange:e=>eN.setFieldValue("allowed_passthrough_routes",e),value:eN.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(es.default,{onChange:e=>eN.setFieldValue("allowed_vector_store_ids",e),value:eN.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(_.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>eN.setFieldValue("allowed_mcp_servers_and_groups",e),value:eN.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(_.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:eN.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:eN.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eN.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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)(A.default,{onChange:e=>eN.setFieldValue("allowed_agents_and_groups",e),value:eN.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{value:eW,onChange:eQ,premiumUser:!0,disabledCallbacks:tl,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(B.default,{value:eW,onChange:eQ,premiumUser:!1,disabledCallbacks:tl,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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)(K.default,{accessToken:ec||"",value:tg||void 0,onChange:th,modelData:eA.length>0?{data:eA.map(e=>({model_name:e}))}:void 0},ty)})})]},`router-settings-accordion-${ty}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(f.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)(R.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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:eN,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(_.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(F.default,{schemaComponent:"GenerateKeyRequest",form:eN,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...e_?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(v.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e5,onUserCreated:e=>{e6(e),eN.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tk,onCancel:tN,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!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(f.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/914ef0e7b2f44614.js b/litellm/proxy/_experimental/out/_next/static/chunks/914ef0e7b2f44614.js deleted file mode 100644 index ca50136532..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/914ef0e7b2f44614.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),s=e.i(618566),a=e.i(947293),i=e.i(764205),r=e.i(954616),n=e.i(266027),o=e.i(612256);let d=(0,e.i(243652).createQueryKeys)("onboarding");var c=e.i(482725),u=e.i(56456);function g(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(c.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var m=e.i(560445),h=e.i(464571);function x(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(m.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(h.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),f=e.i(808613),y=e.i(311451),w=e.i(898586);function j({variant:e,userEmail:s,isPending:a,claimError:i,onSubmit:r}){let[n]=f.Form.useForm();return l.default.useEffect(()=>{s&&n.setFieldValue("user_email",s)},[s,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(m.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(h.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(f.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>r({password:e.password}),children:[(0,t.jsx)(f.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),i&&(0,t.jsx)(m.Alert,{type:"error",message:i,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(h.Button,{htmlType:"submit",loading:a,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function v({variant:e}){let c=(0,s.useSearchParams)().get("invitation_id"),[u,m]=l.default.useState(null),{data:h,isLoading:p,isError:f}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:d.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,i.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(c),{mutate:y,isPending:w}=(0,r.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:s})=>await (0,i.claimOnboardingToken)(e,t,l,s)}),v=h?.token?(0,a.jwtDecode)(h.token):null,S=v?.user_email??"",b=v?.user_id??null,_=v?.key??null,N=h?.token??null;return p?(0,t.jsx)(g,{}):f?(0,t.jsx)(x,{}):(0,t.jsx)(j,{variant:e,userEmail:S,isPending:w,claimError:u,onSubmit:e=>{_&&N&&b&&c&&(m(null),y({accessToken:_,inviteId:c,userId:b,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,i.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{m(e.message||"Failed to submit. Please try again.")}}))}})}function S(){let e=(0,s.useSearchParams)().get("action");return(0,t.jsx)(v,{variant:"reset_password"===e?"reset_password":"signup"})}function b(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(S,{})})}e.s(["default",()=>b],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),s=e.i(243652),a=e.i(764205),i=e.i(135214);let r=(0,s.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),d=e.i(199133),c=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:s,placeholder:u="Select a key alias",style:g,pageSize:m=50,allowClear:h=!0,disabled:x=!1,allFilters:p})=>{let[f,y]=(0,c.useState)(""),[w,j]=(0,o.useDebouncedState)("",{wait:300}),{data:v,fetchNextPage:S,hasNextPage:b,isFetchingNextPage:_,isLoading:N}=((e=50,t,s)=>{let{accessToken:n}=(0,i.default)();return(0,l.useInfiniteQuery)({queryKey:r.list({filters:{size:e,...t&&{search:t},...s&&{team_id:s}}}),queryFn:async({pageParam:l})=>await (0,a.keyAliasesCall)(n,l,e,t,s),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!v?.pages)return[];let e=new Set,t=[];for(let l of v.pages)for(let s of l.aliases)!s||e.has(s)||(e.add(s),t.push({label:s,value:s}));return t},[v]);return(0,t.jsx)(d.Select,{value:e||void 0,onChange:e=>{s?.(e??"")},placeholder:u,style:{width:"100%",...g},allowClear:h,disabled:x,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),j(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&b&&!_&&S()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:k,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),s=e.i(309426),a=e.i(350967),i=e.i(898586),r=e.i(947293),n=e.i(618566),o=e.i(271645),d=e.i(566606),c=e.i(584578),u=e.i(764205),g=e.i(702597),m=e.i(207082),h=e.i(109799),x=e.i(500330),p=e.i(871943),f=e.i(502547),y=e.i(360820),w=e.i(94629),j=e.i(152990),v=e.i(682830),S=e.i(389083),b=e.i(994388),_=e.i(752978),N=e.i(269200),k=e.i(942232),z=e.i(977572),I=e.i(427612),C=e.i(64848),D=e.i(496020),T=e.i(599724),A=e.i(827252),P=e.i(772345),O=e.i(464571),U=e.i(282786),R=e.i(981339),K=e.i(262218),L=e.i(592968),E=e.i(355619),B=e.i(633627),M=e.i(374009),$=e.i(700514),F=e.i(135214),V=e.i(50882),H=e.i(969550),W=e.i(304911),q=e.i(20147);function J({teams:e,organizations:l,onSortChange:s,currentSort:a}){let{data:r}=(0,h.useOrganizations)(),n=r??l??[],[d,c]=(0,o.useState)(null),[g,J]=o.default.useState(()=>a?[{id:a.sortBy,desc:"desc"===a.sortOrder}]:[{id:"created_at",desc:!0}]),[G,Q]=o.default.useState({pageIndex:0,pageSize:50}),Z=g.length>0?g[0].id:null,X=g.length>0?g[0].desc?"desc":"asc":null,{data:Y,isPending:ee,isFetching:et,isError:el,refetch:es}=(0,m.useKeys)(G.pageIndex+1,G.pageSize,{sortBy:Z||void 0,sortOrder:X||void 0,expand:"user"}),[ea,ei]=(0,o.useState)({}),{filters:er,filteredKeys:en,filteredTotalCount:eo,allTeams:ed,allOrganizations:ec,handleFilterChange:eu,handleFilterReset:eg}=function({keys:e,teams:t,organizations:l}){let s={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:a}=(0,F.default)(),[i,r]=(0,o.useState)(s),[n,d]=(0,o.useState)(t||[]),[c,g]=(0,o.useState)(l||[]),[m,h]=(0,o.useState)(e),[x,p]=(0,o.useState)(null),f=(0,o.useRef)(0),y=(0,o.useCallback)((0,M.default)(async e=>{if(!a)return;let t=Date.now();f.current=t;try{let l=await (0,u.keyListCall)(a,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,$.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===f.current&&l&&(h(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[a]);return(0,o.useEffect)(()=>{if(!e)return void h([]);let t=[...e];i["Team ID"]&&(t=t.filter(e=>e.team_id===i["Team ID"])),i["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===i["Organization ID"])),h(t)},[e,i]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,B.fetchAllTeams)(a);e.length>0&&d(e);let t=await (0,B.fetchAllOrganizations)(a);t.length>0&&g(t)};a&&e()},[a]),(0,o.useEffect)(()=>{t&&t.length>0&&d(e=>e.length{l&&l.length>0&&g(e=>e.length{r({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...i,...e})},handleFilterReset:()=>{r(s),p(null),y(s)}}}({keys:Y?.keys||[],teams:e,organizations:l}),em=(0,o.useDeferredValue)(et),eh=(et||em)&&!el,ex=eo??Y?.total_count??0;(0,o.useEffect)(()=>{if(es){let e=()=>{es()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[es]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)(L.Tooltip,{title:l,children:(0,t.jsx)(b.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:s,overflow:"hidden"},onClick:()=>c(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:l??"-"})}},{id:"status",header:"Status",size:100,enableSorting:!1,cell:({row:e})=>{let l=e.original,s=!0===l.blocked,a=!0===(l.metadata??{}).scim_blocked;return s?(0,t.jsx)(L.Tooltip,{title:a?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401.",children:(0,t.jsx)(K.Tag,{color:"red","data-testid":`key-status-${l.token_id}`,children:"Blocked"})}):(0,t.jsx)(K.Tag,{color:"green","data-testid":`key-status-${l.token_id}`,children:"Active"})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let s=l.getValue();if(!s)return"-";let a=e?.find(e=>e.team_id===s),i=a?.team_alias||s,r=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:i})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let s=n.find(e=>e.organization_id===l),a=s?.organization_alias||l,i=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:a})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(U.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(A.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.user?.user_alias??null,a=l.user?.user_email??l.user_email??null,r=l.user_id??null,n="default_user_id"===r,o=s||a||r,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:a},{label:"User ID",value:r}].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)(i.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||a?(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(W.default,{userId:r})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let s=e.row.original.created_by_user,a=s?.user_alias??null,r=s?.user_email??null,n="default_user_id"===l,o=a||r||l,d=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:r},{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)(i.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||r?(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(W.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(U.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(A.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let s=new Date(l);return(0,t.jsx)(L.Tooltip,{title:s.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:s.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,x.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,x.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(S.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})}):(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)(_.Icon,{icon:ea[e.row.id]?p.ChevronDownIcon:f.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{ei(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)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,E.getModelDisplayName)(e).slice(0,30)}...`:(0,E.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(S.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(T.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[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)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,E.getModelDisplayName)(e).slice(0,30)}...`:(0,E.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"]})]})}}],[e,n]),ef=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ey=(0,j.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:g,pagination:G},onSortingChange:e=>{let t="function"==typeof e?e(g):e;if(J(t),t&&t.length>0){let e=t[0],l=e.id,a=e.desc?"desc":"asc";eu({...er,"Sort By":l,"Sort Order":a},!0),s?.(l,a)}},onPaginationChange:Q,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),getPaginationRowModel:(0,v.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(ex/G.pageSize)});o.default.useEffect(()=>{a&&J([{id:a.sortBy,desc:"desc"===a.sortOrder}])},[a]);let{pageIndex:ew,pageSize:ej}=ey.getState().pagination,ev=Math.min((ew+1)*ej,ex),eS=`${ew*ej+1} - ${ev}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:d?(0,t.jsx)(q.default,{keyId:d.token,onClose:()=>c(null),keyData:d,teams:ed,onDelete:es}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(H.default,{options:ef,onApplyFilters:eu,initialValues:er,onResetFilters:eg})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(R.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",eS," of ",ex," results"]}),(0,t.jsx)(O.Button,{type:"default",icon:(0,t.jsx)(P.SyncOutlined,{spin:eh}),onClick:()=>{es()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(R.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ew+1," of ",ey.getPageCount()]}),ee?(0,t.jsx)(R.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.previousPage(),disabled:ee||!ey.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),ee?(0,t.jsx)(R.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.nextPage(),disabled:ee||!ey.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ey.getCenterTotalSize()},children:[(0,t.jsx)(I.TableHead,{children:ey.getHeaderGroups().map(e=>(0,t.jsx)(D.TableRow,{children:e.headers.map(e=>(0,t.jsx)(C.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(y.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(w.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ey.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(k.TableBody,{children:ee?(0,t.jsx)(D.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ey.getRowModel().rows.map(e=>(0,t.jsx)(D.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(z.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(D.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:m,teams:h,keys:x,setUserRole:p,userEmail:f,setUserEmail:y,setTeams:w,setKeys:j,premiumUser:v,organizations:S,addKey:b,createClicked:_,autoOpenCreate:N,prefillData:k})=>{let[z,I]=(0,o.useState)(null),[C,D]=(0,o.useState)(null),T=(0,n.useSearchParams)(),A=(0,l.getCookie)("token"),P=T.get("invitation_id"),[O,U]=(0,o.useState)(null),[R,K]=(0,o.useState)(null),[L,E]=(0,o.useState)([]),[B,M]=(0,o.useState)(null),[$,F]=(0,o.useState)(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(A){let e=(0,r.jwtDecode)(A);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),U(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),p(t)}else console.log("User role not defined");e.user_email?y(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&O&&m&&!z){let t=sessionStorage.getItem("userModels"+e);t?E(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(C)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(O);M(t);let l=await (0,u.userGetInfoV2)(O,e);I(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let s=(await (0,u.modelAvailableCall)(O,e,m)).data.map(e=>e.id);console.log("available_model_names:",s),E(s),console.log("userModels:",L),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")&&V()}})(),(0,c.fetchTeams)(O,e,m,C,w))}},[e,A,O,m]),(0,o.useEffect)(()=>{O&&(async()=>{try{let e=await (0,u.keyInfoCall)(O,[O]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&V()}})()},[O]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(C)}, accessToken: ${O}, userID: ${e}, userRole: ${m}`),O&&(console.log("fetching teams"),(0,c.fetchTeams)(O,e,m,C,w))},[C]),(0,o.useEffect)(()=>{if(null!==x&&null!=$&&null!==$.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(x)}`),x))$.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===$.team_id&&(e+=t.spend);console.log(`sum: ${e}`),K(e)}else if(null!==x){let e=0;for(let t of x)e+=t.spend;K(e)}},[$]),null!=P)return(0,t.jsx)(d.default,{});function V(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==A)return console.log("All cookies before redirect:",document.cookie),V(),null;try{let e=(0,r.jwtDecode)(A);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),V(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),V(),null}if(null==O)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==m&&p("App Owner"),m&&"Admin Viewer"==m){let{Title:e,Paragraph:l}=i.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",$),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(a.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(s.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(g.default,{team:$,teams:h,data:x,addKey:b,autoOpenCreate:N,prefillData:k},$?$.team_id:null),(0,t.jsx)(J,{teams:h,organizations:S})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/91a13e42c88cfff6.js b/litellm/proxy/_experimental/out/_next/static/chunks/91a13e42c88cfff6.js deleted file mode 100644 index 99b52c6a02..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/91a13e42c88cfff6.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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",c="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|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},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 g="$isDayjsObject",p=function(e){return e instanceof b||!(!e||!e[g])},x=function e(t,r,a){var n;if(!t)return h;if("string"==typeof t){var s=t.toLowerCase();f[s]&&(n=s),r&&(f[s]=r,n=s);var i=t.split("-");if(!n&&i.length>1)return e(i[0])}else{var l=t.name;f[l]=t,n=l}return!a&&n&&(h=n),n||!a&&h},y=function(e,t){if(p(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new b(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)},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)},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var n=e.i(464571),s=e.i(311451),i=e.i(199133),l=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[m,h]=(0,r.useState)(!1),[f,g]=(0,r.useState)(u),[p,x]=(0,r.useState)({}),[y,v]=(0,r.useState)({}),[b,j]=(0,r.useState)({}),[w,$]=(0,r.useState)({}),C=(0,r.useCallback)((0,l.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){v(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);x(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{v(e=>({...e,[t.name]:!1}))}}},300),[]),S=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!w[e.name]){v(t=>({...t,[e.name]:!0})),$(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{v(t=>({...t,[e.name]:!1}))}}},[w]);(0,r.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!w[e.name]&&S(e)})},[m,e,S,w]);let k=(e,t)=>{let r={...f,[e]:t};g(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(n.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:d}),(0,t.jsx)(n.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),g(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,n=e.find(e=>e.label===r||e.name===r);return n?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:n.label||n.name}),n.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${n.label||n.name}...`,value:f[n.name]||void 0,onChange:e=>k(n.name,e),onOpenChange:e=>{e&&n.isSearchable&&!w[n.name]&&S(n)},onSearch:e=>{j(t=>({...t,[n.name]:e})),n.searchFn&&C(e,n)},filterOption:!1,loading:y[n.name],options:p[n.name]||[],allowClear:!0,notFoundContent:y[n.name]?"Loading...":"No results found"}):n.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${n.label||n.name}...`,value:f[n.name]||void 0,onChange:e=>k(n.name,e),allowClear:!0,children:n.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):n.customComponent?(a=n.customComponent,(0,t.jsx)(a,{value:f[n.name]||void 0,onChange:e=>k(n.name,e??""),placeholder:`Select ${n.label||n.name}...`,allFilters:f})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${n.label||n.name}...`,value:f[n.name]||"",onChange:e=>k(n.name,e.target.value),allowClear:!0})]},n.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let n of e){let e=n?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=n?.organization_id??n?.org_id;s&&"string"==typeof s&&r.add(s.trim());let i=n?.user_id;if(i&&"string"==typeof i){let e=n?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let n=new Set,s=new Set,i=new Map,l=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=l?.keys||[],c=l?.total_pages??1;r(o,n,s,i);let u=Math.min(c,10)-1;if(u>0){let l=Array.from({length:u},(r,n)=>(0,t.keyListCall)(e,null,a,null,null,null,n+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(l)))"fulfilled"===e.status&&r(e.value?.keys||[],n,s,i)}return{keyAliases:Array.from(n).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},n=async(e,r)=>{if(!e)return[];try{let a=[],n=1,s=!0;for(;s;){let i=await (0,t.teamListCall)(e,r||null,null);a=[...a,...i],n{if(!e)return[];try{let r=[],a=1,n=!0;for(;n;){let s=await (0,t.organizationListCall)(e);r=[...r,...s],a{"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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},678784,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",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(914949),n=e.i(404948);let s=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,s],836938);var i=e.i(613541),l=e.i(763731),o=e.i(242064),c=e.i(491816);e.i(793154);var u=e.i(880476),d=e.i(183293),m=e.i(717356),h=e.i(320560),f=e.i(307358),g=e.i(246422),p=e.i(838378),x=e.i(617933);let y=(0,g.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,a=(0,p.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:a,fontWeightStrong:n,innerPadding:s,boxShadowSecondary:i,colorTextHeading:l,borderRadiusLG:o,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:m,popoverBg:f,titleBorderBottom:g,innerContentPadding:p,titlePadding:x}=e;return[{[t]:Object.assign(Object.assign({},(0,d.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:o,boxShadow:i,padding:s},[`${t}-title`]:{minWidth:a,marginBottom:u,color:l,fontWeight:n,borderBottom:g,padding:x},[`${t}-inner-content`]:{color:r,padding:p}})},(0,h.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:x.PresetColors.map(r=>{let a=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:a,padding:n,wireframe:s,zIndexPopupBase:i,borderRadiusLG:l,marginXS:o,lineType:c,colorSplit:u,paddingSM:d}=e,m=r-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:i+30},(0,f.getArrowToken)(e)),(0,h.getArrowOffsetToken)({contentRadius:l,limitVerticalRadius:!0})),{innerPadding:12*!s,titleMarginBottom:s?0:o,titlePadding:s?`${m/2}px ${n}px ${m/2-t}px`:0,titleBorderBottom:s?`${t}px ${c} ${u}`:"none",innerContentPadding:s?`${d}px ${n}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var 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 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};let b=({title:e,content:r,prefixCls:a})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),r&&t.createElement("div",{className:`${a}-inner-content`},r)):null,j=e=>{let{hashId:a,prefixCls:n,className:i,style:l,placement:o="top",title:c,content:d,children:m}=e,h=s(c),f=s(d),g=(0,r.default)(a,n,`${n}-pure`,`${n}-placement-${o}`,i);return t.createElement("div",{className:g,style:l},t.createElement("div",{className:`${n}-arrow`}),t.createElement(u.Popup,Object.assign({},e,{className:a,prefixCls:n}),m||t.createElement(b,{prefixCls:n,title:h,content:f})))},w=e=>{let{prefixCls:a,className:n}=e,s=v(e,["prefixCls","className"]),{getPrefixCls:i}=t.useContext(o.ConfigContext),l=i("popover",a),[c,u,d]=y(l);return c(t.createElement(j,Object.assign({},s,{prefixCls:l,hashId:u,className:(0,r.default)(n,d)})))};e.s(["Overlay",0,b,"default",0,w],310730);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 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};let C=t.forwardRef((e,u)=>{var d,m;let{prefixCls:h,title:f,content:g,overlayClassName:p,placement:x="top",trigger:v="hover",children:j,mouseEnterDelay:w=.1,mouseLeaveDelay:C=.1,onOpenChange:S,overlayStyle:k={},styles:M,classNames:O}=e,N=$(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:_,className:T,style:D,classNames:E,styles:z}=(0,o.useComponentConfig)("popover"),A=_("popover",h),[L,B,H]=y(A),I=_(),P=(0,r.default)(p,B,H,T,E.root,null==O?void 0:O.root),V=(0,r.default)(E.body,null==O?void 0:O.body),[W,R]=(0,a.default)(!1,{value:null!=(d=e.open)?d:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),F=(e,t)=>{R(e,!0),null==S||S(e,t)},Y=s(f),U=s(g);return L(t.createElement(c.default,Object.assign({placement:x,trigger:v,mouseEnterDelay:w,mouseLeaveDelay:C},N,{prefixCls:A,classNames:{root:P,body:V},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},z.root),D),k),null==M?void 0:M.root),body:Object.assign(Object.assign({},z.body),null==M?void 0:M.body)},ref:u,open:W,onOpenChange:e=>{F(e)},overlay:Y||U?t.createElement(b,{prefixCls:A,title:Y,content:U}):null,transitionName:(0,i.getTransitionName)(I,"zoom-big",N.transitionName),"data-popover-inject":!0}),(0,l.cloneElement)(j,{onKeyDown:e=>{var r,a;(0,t.isValidElement)(j)&&(null==(a=null==j?void 0:(r=j.props).onKeyDown)||a.call(r,e)),e.keyCode===n.default.ESC&&F(!1,e)}})))});C._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,C],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},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)},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",()=>t])},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)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},584578,e=>{"use strict";var t=e.i(764205);let r=async(e,r,a,n,s)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,n?.organization_id||null,r):await (0,t.teamListCall)(e,n?.organization_id||null),console.log(`givenTeams: ${i}`),s(i)};e.s(["fetchTeams",0,r])},468133,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(175712),n=e.i(464571),s=e.i(28651),i=e.i(898586),l=e.i(482725),o=e.i(199133),c=e.i(262218),u=e.i(621192),d=e.i(178654),m=e.i(751904),h=e.i(987432),f=e.i(764205),g=e.i(860585),p=e.i(355619),x=e.i(727749),y=e.i(162386);let{Title:v,Text:b}=i.Typography,j=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],w=({label:e,description:r,isEditing:a,viewContent:n,editContent:s})=>(0,t.jsxs)(u.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(d.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:r})]}),(0,t.jsx)(d.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:a?s:n})})]}),$=()=>(0,t.jsx)(b,{className:"text-gray-400 italic",children:"Not set"}),C=(e,r)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:r?r(e):e},e))}):(0,t.jsx)($,{}),S={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[i,u]=(0,r.useState)(!0),[d,k]=(0,r.useState)(S),[M,O]=(0,r.useState)(!1),[N,_]=(0,r.useState)(S),[T,D]=(0,r.useState)(!1),[E,z]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(!e)return u(!1);try{let t=await (0,f.getDefaultTeamSettings)(e),r={...S,...t.values||{}};k(r),_(r)}catch(e){console.error("Error fetching team SSO settings:",e),z(!0),x.default.fromBackend("Failed to fetch team settings")}finally{u(!1)}})()},[e]);let A=async()=>{if(e){D(!0);try{let t=await (0,f.updateDefaultTeamSettings)(e,N),r={...S,...t.settings||{}};k(r),_(r),O(!1),x.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),x.default.fromBackend("Failed to update team settings")}finally{D(!1)}}},L=(e,t)=>{_(r=>({...r,[e]:t}))};return i?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(l.Spin,{size:"large"})}):E?(0,t.jsx)(a.Card,{children:(0,t.jsx)(b,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(a.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(b,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:M?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(n.Button,{onClick:()=>{O(!1),_(d)},disabled:T,children:"Cancel"}),(0,t.jsx)(n.Button,{type:"primary",onClick:A,loading:T,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(n.Button,{onClick:()=>O(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:M,viewContent:null!=d.max_budget?(0,t.jsxs)(b,{children:["$",Number(d.max_budget).toLocaleString()]}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.max_budget,onChange:e=>L("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(w,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:M,viewContent:d.budget_duration?(0,t.jsx)(b,{children:(0,g.getBudgetDurationLabel)(d.budget_duration)}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(g.default,{value:N.budget_duration||null,onChange:e=>L("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(w,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:M,viewContent:null!=d.tpm_limit?(0,t.jsx)(b,{children:d.tpm_limit.toLocaleString()}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.tpm_limit,onChange:e=>L("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(w,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:M,viewContent:null!=d.rpm_limit?(0,t.jsx)(b,{children:d.rpm_limit.toLocaleString()}):(0,t.jsx)($,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.rpm_limit,onChange:e=>L("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Models",description:"Default list of models that new teams can access.",isEditing:M,viewContent:C(d.models,p.getModelDisplayName),editContent:(0,t.jsx)(y.ModelSelect,{value:N.models||[],onChange:e=>L("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(w,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:M,viewContent:C(d.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:N.team_member_permissions||[],onChange:e=>L("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:r,onClose:a})=>(0,t.jsx)(c.Tag,{color:"blue",closable:r,onClose:a,className:"mr-1 mt-1 mb-1",children:e}),children:j.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},747871,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(269200),n=e.i(942232),s=e.i(977572),i=e.i(427612),l=e.i(64848),o=e.i(496020),c=e.i(304967),u=e.i(994388),d=e.i(599724),m=e.i(389083),h=e.i(764205),f=e.i(727749);e.s(["default",0,({accessToken:e,userID:g})=>{let[p,x]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(e&&g)try{let t=await (0,h.availableTeamListCall)(e);x(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,g]);let y=async t=>{if(e&&g)try{await (0,h.teamMemberAddCall)(e,t,{user_id:g,role:"user"}),f.default.success("Successfully joined team"),x(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),f.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(i.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(l.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(l.TableHeaderCell,{children:"Description"}),(0,t.jsx)(l.TableHeaderCell,{children:"Members"}),(0,t.jsx)(l.TableHeaderCell,{children:"Models"}),(0,t.jsx)(l.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(n.TableBody,{children:[p.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Text,{children:e.team_alias})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Text,{children:e.description||"No description available"})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsxs)(d.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,r)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(d.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},r)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(d.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Button,{size:"xs",variant:"secondary",onClick:()=>y(e.team_id),children:"Join Team"})})]},e.team_id)),0===p.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(s.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(d.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/58170e1c551aede4.js b/litellm/proxy/_experimental/out/_next/static/chunks/92516c9f878f0819.js similarity index 76% rename from litellm/proxy/_experimental/out/_next/static/chunks/58170e1c551aede4.js rename to litellm/proxy/_experimental/out/_next/static/chunks/92516c9f878f0819.js index 0cc9a23086..0cf8b92264 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/58170e1c551aede4.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/92516c9f878f0819.js @@ -5,4 +5,4 @@ ${n}, ${o}, ${i} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),C=e=>{let{prefixCls:a,className:l,style:n,rows:o=0}=e,i=Array.from({length:o}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:n},i)},w=({prefixCls:e,className:a,width:l,style:n})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},n)});function k(e){return e&&"object"==typeof e?e:{}}let x=e=>{let{prefixCls:l,loading:o,className:i,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:b}=e,{getPrefixCls:h,direction:x,className:v,style:$}=(0,a.useComponentConfig)("skeleton"),y=h("skeleton",l),[T,N,j]=p(y);if(o||!("loading"in e)){let e,a,l=!!u,o=!!m,c=!!g;if(l){let r=Object.assign(Object.assign({prefixCls:`${y}-avatar`},o&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),k(u));e=t.createElement("div",{className:`${y}-header`},t.createElement(n,Object.assign({},r)))}if(o||c){let e,r;if(o){let r=Object.assign(Object.assign({prefixCls:`${y}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),k(m));e=t.createElement(w,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},(e={},l&&o||(e.width="61%"),!l&&o?e.rows=3:e.rows=2,e)),k(g));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${y}-content`},e,r)}let h=(0,r.default)(y,{[`${y}-with-avatar`]:l,[`${y}-active`]:f,[`${y}-rtl`]:"rtl"===x,[`${y}-round`]:b},v,i,s,N,j);return T(t.createElement("div",{className:h,style:Object.assign(Object.assign({},$),d)},e,a))}return null!=c?c:null};x.Button=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-button`,size:u},C))))},x.Avatar=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls","className"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},C))))},x.Input=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-input`,size:u},C))))},x.Image=e=>{let{prefixCls:l,className:n,rootClassName:o,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[u,m,g]=p(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},n,o,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,n),style:i},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`})))))},x.Node=e=>{let{prefixCls:l,className:n,rootClassName:o,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",l),[m,g,f]=p(u),b=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,n,o,f);return m(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${u}-image`,n),style:i},d)))},e.s(["default",0,x],185793)},618566,(e,t,r)=>{t.exports=e.r(976562)},321836,e=>{"use strict";let t="litellm_return_url",r="redirect_to";function a(){return window.location.href}function l(){let e=a();e&&function(e,t,r=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function i(){return new URLSearchParams(window.location.search).get(r)}function s(e,t){let l=t||a();if(!l||l.includes("/login"))return e;let n=e.includes("?")?"&":"?";return`${e}${n}${r}=${encodeURIComponent(l)}`}function d(){let e=i();if(e)return e;let t=n();return t||null}function c(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function u(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),r=window.location.hostname;if(t.hostname!==r)return!1;if(c())return!0;return t.origin===window.location.origin}catch{return!1}}function m(e){try{let t=new URL(e,window.location.origin),r=t.pathname;r.length>1&&r.endsWith("/")&&(r=r.slice(0,-1));let a=new URLSearchParams(t.search),l=new URLSearchParams;Array.from(a.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{l.append(e,t)});let n=l.toString(),o=t.hash||"";return`${t.origin}${r}${n?`?${n}`:""}${o}`}catch{return e}}function g(){let e=i();if(e){if(u(e))return o(),e;c()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=n();if(t){if(u(t))return o(),t;c()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>s,"clearStoredReturnUrl",()=>o,"consumeReturnUrl",()=>g,"getReturnUrl",()=>d,"isValidReturnUrl",()=>u,"normalizeUrlForCompare",()=>m,"storeReturnUrl",()=>l])},161281,e=>{"use strict";var t=e.i(947293);function r(e){try{let r=(0,t.jwtDecode)(e);if(r&&"number"==typeof r.exp)return 1e3*r.exp<=Date.now();return!1}catch{return!0}}function a(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function l(e){return!!e&&null!==a(e)&&!r(e)}e.s(["checkTokenValidity",()=>l,"decodeToken",()=>a,"isJwtExpired",()=>r])},95779,e=>{"use strict";var t=e.i(480731);let r={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},a=[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",()=>r,"themeColorRange",()=>a])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],r=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>r(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,r,"rolesWithWriteAccess",0,["Internal User","Admin","proxy_admin"]])},135214,e=>{"use strict";var t=e.i(764205),r=e.i(268004),a=e.i(161281),l=e.i(321836),n=e.i(618566),o=e.i(271645),i=e.i(708347),s=e.i(612256);e.s(["default",0,()=>{let e=(0,n.useRouter)(),{data:d,isLoading:c}=(0,s.useUIConfig)(),u="u">typeof document?(0,r.getCookie)("token"):null,m=(0,o.useMemo)(()=>(0,a.decodeToken)(u),[u]),g=(0,o.useMemo)(()=>(0,a.checkTokenValidity)(u),[u])&&!d?.admin_ui_disabled,f=(0,o.useCallback)(()=>{(0,l.storeReturnUrl)();let r=`${(0,t.getProxyBaseUrl)()}/ui/login`,a=(0,l.buildLoginUrlWithReturn)(r);e.replace(a)},[e]);return(0,o.useEffect)(()=>{!c&&(g||(u&&(0,r.clearTokenCookies)(),f()))},[c,g,u,f]),{isLoading:c,isAuthorized:g,token:g?u:null,accessToken:m?.key??null,userId:m?.user_id??null,userEmail:m?.user_email??null,userRole:(0,i.formatUserRole)(m?.user_role),premiumUser:m?.premium_user??null,disabledPersonalKeyCreation:m?.disabled_non_admin_personal_key_creation??null,showSSOBanner:m?.login_method==="username_password"}}])},563113,887719,e=>{"use strict";var t=e.i(271645),r=e.i(864517),a=e.i(244009),l=e.i(408850),n=e.i(87414);let o=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(r=>{void 0!==e[r]&&(t[r]=e[r])})}),t};function i(e){if(!e)return;let{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}}function s(e){let{closable:r,closeIcon:a}=e||{};return t.default.useMemo(()=>{if(!r&&(!1===r||!1===a||null===a))return!1;if(void 0===r&&void 0===a)return null;let e={closeIcon:"boolean"!=typeof a&&null!==a?a:void 0};return r&&"object"==typeof r&&(e=Object.assign(Object.assign({},e),r)),e},[r,a])}e.s(["default",0,o],887719);let d={};e.s(["pickClosable",()=>i,"useClosable",0,(e,i,c=d)=>{let u=s(e),m=s(i),[g]=(0,l.useLocale)("global",n.default.global),f="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),b=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(r.default,null)},c),[c]),h=t.default.useMemo(()=>!1!==u&&(u?o(b,m,u):!1!==m&&(m?o(b,m):!!b.closable&&b)),[u,m,b]);return t.default.useMemo(()=>{var e,r;if(!1===h)return[!1,null,f,{}];let{closeIconRender:l}=b,{closeIcon:n}=h,o=n,i=(0,a.default)(h,!0);return null!=o&&(l&&(o=l(n)),o=t.default.isValidElement(o)?t.default.cloneElement(o,Object.assign(Object.assign(Object.assign({},o.props),{"aria-label":null!=(r=null==(e=o.props)?void 0:e["aria-label"])?r:g.close}),i)):t.default.createElement("span",Object.assign({"aria-label":g.close},i),o)),[!0,o,f,i]},[f,g.close,h,b])}],563113)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),o))});n.displayName="Table",e.s(["Table",()=>n],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),o))});n.displayName="TableHead",e.s(["TableHead",()=>n],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:n,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",i)},s),o))});n.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>n],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),o))});n.displayName="TableBody",e.s(["TableBody",()=>n],942232)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("row"),i)},s),o))});n.displayName="TableRow",e.s(["TableRow",()=>n],496020)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),o))});n.displayName="TableCell",e.s(["TableCell",()=>n],977572)}]); \ No newline at end of file + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),C=e=>{let{prefixCls:a,className:l,style:n,rows:o=0}=e,i=Array.from({length:o}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:n},i)},w=({prefixCls:e,className:a,width:l,style:n})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},n)});function k(e){return e&&"object"==typeof e?e:{}}let x=e=>{let{prefixCls:l,loading:o,className:i,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:b}=e,{getPrefixCls:h,direction:x,className:v,style:$}=(0,a.useComponentConfig)("skeleton"),y=h("skeleton",l),[T,N,j]=p(y);if(o||!("loading"in e)){let e,a,l=!!u,o=!!m,c=!!g;if(l){let r=Object.assign(Object.assign({prefixCls:`${y}-avatar`},o&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),k(u));e=t.createElement("div",{className:`${y}-header`},t.createElement(n,Object.assign({},r)))}if(o||c){let e,r;if(o){let r=Object.assign(Object.assign({prefixCls:`${y}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),k(m));e=t.createElement(w,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},(e={},l&&o||(e.width="61%"),!l&&o?e.rows=3:e.rows=2,e)),k(g));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${y}-content`},e,r)}let h=(0,r.default)(y,{[`${y}-with-avatar`]:l,[`${y}-active`]:f,[`${y}-rtl`]:"rtl"===x,[`${y}-round`]:b},v,i,s,N,j);return T(t.createElement("div",{className:h,style:Object.assign(Object.assign({},$),d)},e,a))}return null!=c?c:null};x.Button=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-button`,size:u},C))))},x.Avatar=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls","className"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},C))))},x.Input=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-input`,size:u},C))))},x.Image=e=>{let{prefixCls:l,className:n,rootClassName:o,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[u,m,g]=p(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},n,o,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,n),style:i},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`})))))},x.Node=e=>{let{prefixCls:l,className:n,rootClassName:o,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",l),[m,g,f]=p(u),b=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,n,o,f);return m(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${u}-image`,n),style:i},d)))},e.s(["default",0,x],185793)},618566,(e,t,r)=>{t.exports=e.r(976562)},321836,e=>{"use strict";let t="litellm_return_url",r="redirect_to";function a(){return window.location.href}function l(){let e=a();e&&function(e,t,r=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function i(){return new URLSearchParams(window.location.search).get(r)}function s(e,t){let l=t||a();if(!l||l.includes("/login"))return e;let n=e.includes("?")?"&":"?";return`${e}${n}${r}=${encodeURIComponent(l)}`}function d(){let e=i();if(e)return e;let t=n();return t||null}function c(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function u(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),r=window.location.hostname;if(t.hostname!==r)return!1;if(c())return!0;return t.origin===window.location.origin}catch{return!1}}function m(e){try{let t=new URL(e,window.location.origin),r=t.pathname;r.length>1&&r.endsWith("/")&&(r=r.slice(0,-1));let a=new URLSearchParams(t.search),l=new URLSearchParams;Array.from(a.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{l.append(e,t)});let n=l.toString(),o=t.hash||"";return`${t.origin}${r}${n?`?${n}`:""}${o}`}catch{return e}}function g(){let e=i();if(e){if(u(e))return o(),e;c()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=n();if(t){if(u(t))return o(),t;c()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>s,"clearStoredReturnUrl",()=>o,"consumeReturnUrl",()=>g,"getReturnUrl",()=>d,"isValidReturnUrl",()=>u,"normalizeUrlForCompare",()=>m,"storeReturnUrl",()=>l])},161281,e=>{"use strict";var t=e.i(947293);function r(e){try{let r=(0,t.jwtDecode)(e);if(r&&"number"==typeof r.exp)return 1e3*r.exp<=Date.now();return!1}catch{return!0}}function a(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function l(e){return!!e&&null!==a(e)&&!r(e)}e.s(["checkTokenValidity",()=>l,"decodeToken",()=>a,"isJwtExpired",()=>r])},95779,e=>{"use strict";var t=e.i(480731);let r={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},a=[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",()=>r,"themeColorRange",()=>a])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],r=["Internal User","Admin","proxy_admin"],a=[...r,"Admin Viewer","proxy_admin_viewer"],l=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>l(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,l,"rolesAllowedToViewWriteScopedPages",0,a,"rolesWithWriteAccess",0,r])},135214,e=>{"use strict";var t=e.i(764205),r=e.i(268004),a=e.i(161281),l=e.i(321836),n=e.i(618566),o=e.i(271645),i=e.i(708347),s=e.i(612256);e.s(["default",0,()=>{let e=(0,n.useRouter)(),{data:d,isLoading:c}=(0,s.useUIConfig)(),u="u">typeof document?(0,r.getCookie)("token"):null,m=(0,o.useMemo)(()=>(0,a.decodeToken)(u),[u]),g=(0,o.useMemo)(()=>(0,a.checkTokenValidity)(u),[u])&&!d?.admin_ui_disabled,f=(0,o.useCallback)(()=>{(0,l.storeReturnUrl)();let r=`${(0,t.getProxyBaseUrl)()}/ui/login`,a=(0,l.buildLoginUrlWithReturn)(r);e.replace(a)},[e]);return(0,o.useEffect)(()=>{!c&&(g||(u&&(0,r.clearTokenCookies)(),f()))},[c,g,u,f]),{isLoading:c,isAuthorized:g,token:g?u:null,accessToken:m?.key??null,userId:m?.user_id??null,userEmail:m?.user_email??null,userRole:(0,i.formatUserRole)(m?.user_role),premiumUser:m?.premium_user??null,disabledPersonalKeyCreation:m?.disabled_non_admin_personal_key_creation??null,showSSOBanner:m?.login_method==="username_password"}}])},563113,887719,e=>{"use strict";var t=e.i(271645),r=e.i(864517),a=e.i(244009),l=e.i(408850),n=e.i(87414);let o=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(r=>{void 0!==e[r]&&(t[r]=e[r])})}),t};function i(e){if(!e)return;let{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}}function s(e){let{closable:r,closeIcon:a}=e||{};return t.default.useMemo(()=>{if(!r&&(!1===r||!1===a||null===a))return!1;if(void 0===r&&void 0===a)return null;let e={closeIcon:"boolean"!=typeof a&&null!==a?a:void 0};return r&&"object"==typeof r&&(e=Object.assign(Object.assign({},e),r)),e},[r,a])}e.s(["default",0,o],887719);let d={};e.s(["pickClosable",()=>i,"useClosable",0,(e,i,c=d)=>{let u=s(e),m=s(i),[g]=(0,l.useLocale)("global",n.default.global),f="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),b=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(r.default,null)},c),[c]),h=t.default.useMemo(()=>!1!==u&&(u?o(b,m,u):!1!==m&&(m?o(b,m):!!b.closable&&b)),[u,m,b]);return t.default.useMemo(()=>{var e,r;if(!1===h)return[!1,null,f,{}];let{closeIconRender:l}=b,{closeIcon:n}=h,o=n,i=(0,a.default)(h,!0);return null!=o&&(l&&(o=l(n)),o=t.default.isValidElement(o)?t.default.cloneElement(o,Object.assign(Object.assign(Object.assign({},o.props),{"aria-label":null!=(r=null==(e=o.props)?void 0:e["aria-label"])?r:g.close}),i)):t.default.createElement("span",Object.assign({"aria-label":g.close},i),o)),[!0,o,f,i]},[f,g.close,h,b])}],563113)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),o))});n.displayName="Table",e.s(["Table",()=>n],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),o))});n.displayName="TableHead",e.s(["TableHead",()=>n],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:n,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",i)},s),o))});n.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>n],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),o))});n.displayName="TableBody",e.s(["TableBody",()=>n],942232)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("row"),i)},s),o))});n.displayName="TableRow",e.s(["TableRow",()=>n],496020)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),o))});n.displayName="TableCell",e.s(["TableCell",()=>n],977572)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d57a01eeb0a140e9.js b/litellm/proxy/_experimental/out/_next/static/chunks/94f7208f5087e27c.js similarity index 95% rename from litellm/proxy/_experimental/out/_next/static/chunks/d57a01eeb0a140e9.js rename to litellm/proxy/_experimental/out/_next/static/chunks/94f7208f5087e27c.js index fa175e2925..5ef22befeb 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/d57a01eeb0a140e9.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/94f7208f5087e27c.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,757440,e=>{"use strict";var t=e.i(290571),s=e.i(271645);let a=e=>{var a=(0,t.__rest)(e,[]);return s.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},a),s.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>a])},446428,854056,e=>{"use strict";let t;var s=e.i(290571),a=e.i(271645);let l=e=>{var t=(0,s.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.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"}))};e.s(["default",()=>l],446428);var r=e.i(746725),i=e.i(914189),n=e.i(553521),d=e.i(835696),o=e.i(941444),c=e.i(178677),u=e.i(294316),m=e.i(83733),h=e.i(233137),x=e.i(732607),g=e.i(397701),f=e.i(700020);function p(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:S)!==a.Fragment||1===a.default.Children.count(e.children)}let b=(0,a.createContext)(null);b.displayName="TransitionContext";var j=((t=j||{}).Visible="visible",t.Hidden="hidden",t);let v=(0,a.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 _(e,t){let s=(0,o.useLatestValue)(e),l=(0,a.useRef)([]),d=(0,n.useIsMounted)(),c=(0,r.useDisposables)(),u=(0,i.useEvent)((e,t=f.RenderStrategy.Hidden)=>{let a=l.current.findIndex(({el:t})=>t===e);-1!==a&&((0,g.match)(t,{[f.RenderStrategy.Unmount](){l.current.splice(a,1)},[f.RenderStrategy.Hidden](){l.current[a].state="hidden"}}),c.microTask(()=>{var e;!y(l)&&d.current&&(null==(e=s.current)||e.call(s))}))}),m=(0,i.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,f.RenderStrategy.Unmount)}),h=(0,a.useRef)([]),x=(0,a.useRef)(Promise.resolve()),p=(0,a.useRef)({enter:[],leave:[]}),b=(0,i.useEvent)((e,s,a)=>{h.current.splice(0),t&&(t.chains.current[s]=t.chains.current[s].filter(([t])=>t!==e)),null==t||t.chains.current[s].push([e,new Promise(e=>{h.current.push(e)})]),null==t||t.chains.current[s].push([e,new Promise(e=>{Promise.all(p.current[s].map(([e,t])=>t)).then(()=>e())})]),"enter"===s?x.current=x.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(s)):a(s)}),j=(0,i.useEvent)((e,t,s)=>{Promise.all(p.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=h.current.shift())||e()}).then(()=>s(t))});return(0,a.useMemo)(()=>({children:l,register:m,unregister:u,onStart:b,onStop:j,wait:x,chains:p}),[m,u,l,b,j,p,x])}v.displayName="NestingContext";let S=a.Fragment,w=f.RenderFeatures.RenderStrategy,N=(0,f.forwardRefWithAs)(function(e,t){let{show:s,appear:l=!1,unmount:r=!0,...n}=e,o=(0,a.useRef)(null),m=p(e),x=(0,u.useSyncRefs)(...m?[o,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let g=(0,h.useOpenClosed)();if(void 0===s&&null!==g&&(s=(g&h.State.Open)===h.State.Open),void 0===s)throw Error("A is used but it is missing a `show={true | false}` prop.");let[j,S]=(0,a.useState)(s?"visible":"hidden"),N=_(()=>{s||S("hidden")}),[T,k]=(0,a.useState)(!0),I=(0,a.useRef)([s]);(0,d.useIsoMorphicEffect)(()=>{!1!==T&&I.current[I.current.length-1]!==s&&(I.current.push(s),k(!1))},[I,s]);let E=(0,a.useMemo)(()=>({show:s,appear:l,initial:T}),[s,l,T]);(0,d.useIsoMorphicEffect)(()=>{s?S("visible"):y(N)||null===o.current||S("hidden")},[s,N]);let U={unmount:r},R=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeEnter)||t.call(e)}),B=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeLeave)||t.call(e)}),M=(0,f.useRender)();return a.default.createElement(v.Provider,{value:N},a.default.createElement(b.Provider,{value:E},M({ourProps:{...U,as:a.Fragment,children:a.default.createElement(C,{ref:x,...U,...n,beforeEnter:R,beforeLeave:B})},theirProps:{},defaultTag:a.Fragment,features:w,visible:"visible"===j,name:"Transition"})))}),C=(0,f.forwardRefWithAs)(function(e,t){var s,l;let{transition:r=!0,beforeEnter:n,afterEnter:o,beforeLeave:j,afterLeave:N,enter:C,enterFrom:T,enterTo:k,entered:I,leave:E,leaveFrom:U,leaveTo:R,...B}=e,[M,F]=(0,a.useState)(null),D=(0,a.useRef)(null),A=p(e),L=(0,u.useSyncRefs)(...A?[D,t,F]:null===t?[]:[t]),O=null==(s=B.unmount)||s?f.RenderStrategy.Unmount:f.RenderStrategy.Hidden,{show:P,appear:z,initial:V}=function(){let e=(0,a.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[$,K]=(0,a.useState)(P?"visible":"hidden"),H=function(){let e=(0,a.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:q,unregister:G}=H;(0,d.useIsoMorphicEffect)(()=>q(D),[q,D]),(0,d.useIsoMorphicEffect)(()=>{if(O===f.RenderStrategy.Hidden&&D.current)return P&&"visible"!==$?void K("visible"):(0,g.match)($,{hidden:()=>G(D),visible:()=>q(D)})},[$,D,q,G,P,O]);let W=(0,c.useServerHandoffComplete)();(0,d.useIsoMorphicEffect)(()=>{if(A&&W&&"visible"===$&&null===D.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,$,W,A]);let J=V&&!z,Q=z&&P&&V,Z=(0,a.useRef)(!1),Y=_(()=>{Z.current||(K("hidden"),G(D))},H),X=(0,i.useEvent)(e=>{Z.current=!0,Y.onStart(D,e?"enter":"leave",e=>{"enter"===e?null==n||n():"leave"===e&&(null==j||j())})}),ee=(0,i.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Y.onStop(D,t,e=>{"enter"===e?null==o||o():"leave"===e&&(null==N||N())}),"leave"!==t||y(Y)||(K("hidden"),G(D))});(0,a.useEffect)(()=>{A&&r||(X(P),ee(P))},[P,A,r]);let et=!(!r||!A||!W||J),[,es]=(0,m.useTransition)(et,M,P,{start:X,end:ee}),ea=(0,f.compact)({ref:L,className:(null==(l=(0,x.classNames)(B.className,Q&&C,Q&&T,es.enter&&C,es.enter&&es.closed&&T,es.enter&&!es.closed&&k,es.leave&&E,es.leave&&!es.closed&&U,es.leave&&es.closed&&R,!es.transition&&P&&I))?void 0:l.trim())||void 0,...(0,m.transitionDataAttributes)(es)}),el=0;"visible"===$&&(el|=h.State.Open),"hidden"===$&&(el|=h.State.Closed),es.enter&&(el|=h.State.Opening),es.leave&&(el|=h.State.Closing);let er=(0,f.useRender)();return a.default.createElement(v.Provider,{value:Y},a.default.createElement(h.OpenClosedProvider,{value:el},er({ourProps:ea,theirProps:B,defaultTag:S,features:w,visible:"visible"===$,name:"Transition.Child"})))}),T=(0,f.forwardRefWithAs)(function(e,t){let s=null!==(0,a.useContext)(b),l=null!==(0,h.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!s&&l?a.default.createElement(N,{ref:t,...e}):a.default.createElement(C,{ref:t,...e}))}),k=Object.assign(N,{Child:T,Root:N});e.s(["Transition",()=>k],854056)},206929,e=>{"use strict";var t=e.i(290571),s=e.i(757440),a=e.i(271645),l=e.i(446428),r=e.i(444755),i=e.i(673706),n=e.i(103471),d=e.i(495470),o=e.i(854056),c=e.i(888288);let u=(0,i.makeClassName)("Select"),m=a.default.forwardRef((e,i)=>{let{defaultValue:m="",value:h,onValueChange:x,placeholder:g="Select...",disabled:f=!1,icon:p,enableClear:b=!1,required:j,children:v,name:y,error:_=!1,errorMessage:S,className:w,id:N}=e,C=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),T=(0,a.useRef)(null),k=a.Children.toArray(v),[I,E]=(0,c.default)(m,h),U=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(v).filter(a.isValidElement);return(0,n.constructValueToNameMapping)(e)},[v]);return a.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",w)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:j,className:(0,r.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:I,onChange:e=>{e.preventDefault()},name:y,disabled:f,id:N,onFocus:()=>{let e=T.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},g),k.map(e=>{let t=e.props.value,s=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},s)})),a.default.createElement(d.Listbox,Object.assign({as:"div",ref:i,defaultValue:I,value:I,onChange:e=>{null==x||x(e),E(e)},disabled:f,id:N},C),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(d.ListboxButton,{ref:T,className:(0,r.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",p?"pl-10":"pl-3",(0,n.getSelectButtonColors)((0,n.hasValue)(e),f,_))},p&&a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(p,{className:(0,r.tremorTwMerge)(u("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=U.get(e))?t:g),a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(s.default,{className:(0,r.tremorTwMerge)(u("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&I?a.default.createElement("button",{type:"button",className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E(""),null==x||x("")}},a.default.createElement(l.default,{className:(0,r.tremorTwMerge)(u("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(o.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.default.createElement(d.ListboxOptions,{anchor:"bottom start",className:(0,r.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},v)))})),_&&S?a.default.createElement("p",{className:(0,r.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},S):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},502275,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,s],502275)},78085,e=>{"use strict";var t=e.i(290571),s=e.i(103471),a=e.i(888288),l=e.i(271645),r=e.i(444755),i=e.i(673706);let n=(0,i.makeClassName)("Textarea"),d=l.default.forwardRef((e,d)=>{let{value:o,defaultValue:c="",placeholder:u="Type...",error:m=!1,errorMessage:h,disabled:x=!1,className:g,onChange:f,onValueChange:p,autoHeight:b=!1}=e,j=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[v,y]=(0,a.default)(c,o),_=(0,l.useRef)(null),S=(0,s.hasValue)(v);return(0,l.useEffect)(()=>{let e=_.current;if(b&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[b,_,v]),l.default.createElement(l.default.Fragment,null,l.default.createElement("textarea",Object.assign({ref:(0,i.mergeRefs)([_,d]),value:v,placeholder:u,disabled:x,className:(0,r.tremorTwMerge)(n("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,s.getSelectButtonColors)(S,x,m),x?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",g),"data-testid":"text-area",onChange:e=>{null==f||f(e),y(e.target.value),null==p||p(e.target.value)}},j)),m&&h?l.default.createElement("p",{className:(0,r.tremorTwMerge)(n("errorMessage"),"text-sm text-red-500 mt-1")},h):null)});d.displayName="Textarea",e.s(["Textarea",()=>d],78085)},114600,e=>{"use strict";var t=e.i(290571),s=e.i(444755),a=e.i(673706),l=e.i(271645);let r=(0,a.makeClassName)("Divider"),i=l.default.forwardRef((e,a)=>{let{className:i,children:n}=e,d=(0,t.__rest)(e,["className","children"]);return l.default.createElement("div",Object.assign({ref:a,className:(0,s.tremorTwMerge)(r("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",i)},d),n?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.default.createElement("div",{className:(0,s.tremorTwMerge)("text-inherit whitespace-nowrap")},n),l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});i.displayName="Divider",e.s(["Divider",()=>i],114600)},910119,e=>{"use strict";var t=e.i(843476),s=e.i(197647),a=e.i(653824),l=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),h=e.i(199133),x=e.i(28651),g=e.i(175712),f=e.i(770914),p=e.i(536916),b=e.i(764205),j=e.i(827252),v=e.i(994388),y=e.i(35983),_=e.i(779241),S=e.i(78085),w=e.i(808613),N=e.i(592968),C=e.i(708347),T=e.i(860585),k=e.i(355619),I=e.i(435451);function E({userData:e,onCancel:s,onSubmit:a,teams:l,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=w.Form.useForm(),[x,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let t=e.user_info?.max_budget,s=null==t;g(s),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:s?"":t,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,t.jsxs)(w.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(x||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),a(e)},layout:"vertical",children:[!u&&(0,t.jsx)(w.Form.Item,{label:"User ID",name:"user_id",children:(0,t.jsx)(_.TextInput,{disabled:!0})}),!u&&(0,t.jsx)(w.Form.Item,{label:"Email",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Alias",name:"user_alias",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(N.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,t.jsx)(j.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,t.jsx)(h.Select,{children:c&&Object.entries(c).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Personal Models"," ",(0,t.jsx)(N.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,t.jsx)(j.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsxs)(h.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!C.all_admin_roles.includes(d||""),children:[(0,t.jsx)(h.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(h.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,t.jsx)(h.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,t.jsx)("span",{children:"Max Budget (USD)"}),(0,t.jsx)(p.Checkbox,{checked:x,onChange:e=>{let t=e.target.checked;g(t),t&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,t)=>x||""!==t&&null!=t?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,t.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:x})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)(w.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(v.Button,{variant:"secondary",type:"button",onClick:s,children:"Cancel"}),(0,t.jsx)(v.Button,{type:"submit",children:"Save Changes"})]})]})}var U=e.i(727749),R=e.i(888259);let{Text:B,Title:M}=c.Typography,F=({open:e,onCancel:s,selectedUsers:a,possibleUIRoles:l,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:j,allowAllUsers:v=!1})=>{let[y,_]=(0,n.useState)(!1),[S,w]=(0,n.useState)([]),[N,C]=(0,n.useState)(null),[T,k]=(0,n.useState)(!1),[I,F]=(0,n.useState)(!1),D=()=>{w([]),C(null),k(!1),F(!1),s()},A=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),L=async e=>{if(console.log("formValues",e),!r)return void U.default.fromBackend("Access token not found");_(!0);try{let t=a.map(e=>e.user_id),l={};e.user_role&&""!==e.user_role&&(l.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(l.max_budget=e.max_budget),e.models&&e.models.length>0&&(l.models=e.models),e.budget_duration&&""!==e.budget_duration&&(l.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(l.metadata=e.metadata);let n=Object.keys(l).length>0,d=T&&S.length>0;if(!n&&!d)return void U.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,b.userBulkUpdateUserCall)(r,l,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,b.userBulkUpdateUserCall)(r,l,t),o.push(`Updated ${t.length} user(s)`);if(d){let e=[];for(let t of S)try{let s=null;s=I?null:a.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let l=await (0,b.teamBulkMemberAddCall)(r,t,s||null,N||void 0,I);console.log("result",l),e.push({teamId:t,success:!0,successfulAdditions:l.successful_additions,failedAdditions:l.failed_additions})}catch(s){console.error(`Failed to add users to team ${t}:`,s),e.push({teamId:t,success:!1,error:s})}let t=e.filter(e=>e.success),s=e.filter(e=>!e.success);if(t.length>0){let e=t.reduce((e,t)=>e+t.successfulAdditions,0);o.push(`Added users to ${t.length} team(s) (${e} total additions)`)}s.length>0&&R.default.warning(`Failed to add users to ${s.length} team(s)`)}o.length>0&&U.default.success(o.join(". ")),w([]),C(null),k(!1),F(!1),i(),s()}catch(e){console.error("Bulk operation failed:",e),U.default.fromBackend("Failed to perform bulk operations")}finally{_(!1)}};return(0,t.jsxs)(o.Modal,{open:e,onCancel:D,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${a.length} User(s)`,width:800,children:[v&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(p.Checkbox,{checked:I,onChange:e=>F(e.target.checked),children:(0,t.jsx)(B,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsx)(B,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(M,{level:5,children:["Selected Users (",a.length,"):"]}),(0,t.jsx)(m.Table,{size:"small",bordered:!0,dataSource:a,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,t.jsx)(B,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:l?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,t.jsx)(u.Divider,{}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)(B,{children:[(0,t.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,t.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,t.jsxs)(f.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsx)(p.Checkbox,{checked:T,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Select Teams:"}),(0,t.jsx)(h.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:w,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Team Budget (Optional):"}),(0,t.jsx)(x.InputNumber,{placeholder:"Max budget per user in team",value:N,onChange:e=>C(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,t.jsx)(E,{userData:A,onCancel:D,onSubmit:L,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:j,possibleUIRoles:l,isBulkEdit:!0}),y&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,t.jsxs)(B,{children:["Updating ",I?"all users":a.length," user(s)..."]})})]})};var D=e.i(371455);let A=({visible:e,possibleUIRoles:s,onCancel:a,user:l,onSubmit:r})=>{let[i,c]=(0,n.useState)(l),[u]=w.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[l]);let m=async()=>{u.resetFields(),a()},g=async e=>{r(e),u.resetFields(),a()};return l?(0,t.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+l.user_id,width:1e3,children:(0,t.jsx)(w.Form,{form:u,onFinish:g,initialValues:l,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(h.Select,{children:s&&Object.entries(s).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,t.jsx)(x.InputNumber,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,t.jsx)(I.default,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var L=e.i(172372),O=e.i(500330),P=e.i(152473),z=e.i(266027),V=e.i(912598),$=e.i(127952),K=e.i(304967),H=e.i(629569),q=e.i(599724),G=e.i(114600),W=e.i(482725),J=e.i(790848),Q=e.i(646563),Z=e.i(955135);let Y=({accessToken:e,possibleUIRoles:s,userID:a,userRole:l})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[f,p]=(0,n.useState)({}),[j,v]=(0,n.useState)(!1),[y,S]=(0,n.useState)([]),{Paragraph:w}=c.Typography,{Option:N}=h.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let t=await (0,b.getInternalUserSettings)(e);if(u(t),p(t.values||{}),e)try{let t=await (0,b.modelAvailableCall)(e,a,l);if(t&&t.data){let e=t.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),U.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let C=async()=>{if(e){v(!0);try{let t=Object.entries(f).reduce((e,[t,s])=>(e[t]=""===s?null:s,e),{}),s=await (0,b.updateInternalUserSettings)(e,t);u({...o,values:s.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),U.default.fromBackend("Failed to update settings: "+e)}finally{v(!1)}}},I=(e,t)=>{p(s=>({...s,[e]:t}))},E=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(W.Spin,{size:"large"})}):o?(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(d.Button,{onClick:()=>{g(!1),p(o.values||{})},disabled:j,children:"Cancel"}),(0,t.jsx)(d.Button,{type:"primary",onClick:C,loading:j,children:"Save Changes"})]}):(0,t.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,t.jsx)(w,{className:"mb-4",children:o.field_schema.description}),(0,t.jsx)(G.Divider,{}),(0,t.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:a}=o;return a&&a.properties?Object.entries(a.properties).map(([a,l])=>{let r=e[a],i=a.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,t.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,t.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,t.jsx)(w,{className:"text-sm text-gray-500 mt-1",children:l.description||"No description available"}),m?(0,t.jsx)("div",{className:"mt-2",children:((e,a,l)=>{let r=a.type;if("teams"===e){let s,a;return(0,t.jsx)("div",{className:"mt-2",children:(s=E(f[e]||[]),a=(e,t,a)=>{let l=[...s];l[e]={...l[e],[t]:a},I("teams",l)},(0,t.jsxs)("div",{className:"space-y-3",children:[s.map((e,l)=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)(q.Text,{className:"font-medium",children:["Team ",l+1]}),(0,t.jsx)(d.Button,{size:"small",danger:!0,icon:(0,t.jsx)(Z.DeleteOutlined,{}),onClick:()=>{I("teams",s.filter((e,t)=>t!==l))},children:"Remove"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,t.jsx)(_.TextInput,{value:e.team_id,onChange:e=>a(l,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,t.jsx)(x.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>a(l,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,t.jsxs)(h.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>a(l,"user_role",e),children:[(0,t.jsx)(N,{value:"user",children:"User"}),(0,t.jsx)(N,{value:"admin",children:"Admin"})]})]})]})]},l)),(0,t.jsx)(d.Button,{icon:(0,t.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...s,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&s)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:Object.entries(s).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(N,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:a})]})},e))});if("budget_duration"===e)return(0,t.jsx)(T.default,{value:f[e]||null,onChange:t=>I(e,t),className:"mt-2"});if("boolean"===r)return(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(J.Switch,{checked:!!f[e],onChange:t=>I(e,t)})});if("array"===r&&a.items?.enum)return(0,t.jsx)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:a.items.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else if("models"===e)return(0,t.jsxs)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:[(0,t.jsx)(N,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,t.jsx)(N,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),y.map(e=>(0,t.jsx)(N,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&a.enum)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:a.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else return(0,t.jsx)(_.TextInput,{value:void 0!==f[e]?String(f[e]):"",onChange:t=>I(e,t.target.value),placeholder:a.description||"",className:"mt-2"})})(a,l,0)}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,a)=>{if(null==a)return(0,t.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(a)){if(0===a.length)return(0,t.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=E(a);return(0,t.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,s)=>(0,t.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,t.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,t.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,O.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,t.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},s))})}if("user_role"===e&&s&&s[a]){let{ui_label:e,description:l}=s[a];return(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:e}),l&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:l})]})}if("budget_duration"===e)return(0,t.jsx)("span",{children:(0,T.getBudgetDurationLabel)(a)});if("boolean"==typeof a)return(0,t.jsx)("span",{children:a?"Enabled":"Disabled"});if("models"===e&&Array.isArray(a))return 0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},s))});if("object"==typeof a)return Array.isArray(a)?0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(a,null,2)});return(0,t.jsx)("span",{children:String(a)})})(a,r)})]},a)}):(0,t.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,t.jsx)(K.Card,{children:(0,t.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var X=e.i(389083),ee=e.i(350967),et=e.i(752978),es=e.i(262218),ea=e.i(591935),el=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,s,a,l,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(N.Tooltip,{title:e.original.user_id,children:(0,t.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,t.jsx)(N.Tooltip,{title:"Copy User ID",children:(0,t.jsx)(en.CopyOutlined,{onClick:t=>{t.stopPropagation(),(0,O.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>e.original.metadata?.scim_active===!1?(0,t.jsx)(N.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,t.jsx)(es.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,t.jsx)(es.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:s})=>(0,t.jsx)("span",{className:"text-xs",children:e?.[s.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.spend?(0,O.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"SSO ID"}),(0,t.jsx)(N.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,t.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,t.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,t.jsxs)(X.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,t.jsx)(X.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(N.Tooltip,{title:"Edit user details",children:(0,t.jsx)(et.Icon,{icon:ea.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(N.Tooltip,{title:"Delete user",children:(0,t.jsx)(et.Icon,{icon:el.TrashIcon,size:"sm",onClick:()=>a(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,t.jsx)(N.Tooltip,{title:"Reset Password",children:(0,t.jsx)(et.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>l(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:s,isUserSelected:a,isAllSelected:l,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,t.jsx)(p.Checkbox,{indeterminate:r,checked:l,onChange:e=>s(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:s})=>(0,t.jsx)(p.Checkbox,{checked:a(s.original),onChange:t=>e(s.original,t.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),eh=e.i(64848),ex=e.i(942232),eg=e.i(496020),ef=e.i(977572),ep=e.i(206929),eb=e.i(94629),ej=e.i(360820),ev=e.i(871943),ey=e.i(981339),e_=e.i(530212),eS=e.i(988297),ew=e.i(118366),eN=e.i(678784);function eC({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:x,possibleUIRoles:g,initialTab:f=0,startInEditMode:p=!1}){let[j,y]=(0,n.useState)(null),[_,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[R,B]=(0,n.useState)(!1),[M,F]=(0,n.useState)(!0),[D,A]=(0,n.useState)(p),[P,z]=(0,n.useState)([]),[V,G]=(0,n.useState)(!1),[W,J]=(0,n.useState)(null),[Q,Z]=(0,n.useState)(null),[Y,X]=(0,n.useState)(f),[et,es]=(0,n.useState)({}),[ea,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ep,eb]=(0,n.useState)(null),[ej,ev]=(0,n.useState)(!1),[ey,eC]=(0,n.useState)(!1),[eT,ek]=(0,n.useState)([]),[eI,eE]=(0,n.useState)(""),[eU,eR]=(0,n.useState)("user"),[eB,eM]=(0,n.useState)(!1);n.default.useEffect(()=>{Z((0,b.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0)try{let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),s=await Promise.all(e);S(s)}catch{S(t.teams.map(e=>({team_id:e,team_alias:null})))}let s=(await (0,b.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(s)}catch(e){console.error("Error fetching user data:",e),U.default.fromBackend("Failed to fetch user data")}finally{F(!1)}})()},[u,e,m]);let eF="proxy_admin"===m||"Admin"===m,eD=async()=>{if(u){eM(!0);try{let e=await (0,b.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eM(!1)}}},eA=async()=>{if(u&&eI){ev(!0);try{await (0,b.teamMemberAddCall)(u,eI,{role:eU,user_id:e}),U.default.success("User added to team successfully"),ed(!1);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),U.default.fromBackend(e?.message||"Failed to add user to team")}finally{ev(!1)}}},eL=async()=>{if(u&&ep){eC(!0);try{await (0,b.teamMemberDeleteCall)(u,ep.team_id,{role:"user",user_id:e}),U.default.success("User removed from team successfully"),ec(!1),eb(null);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),U.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eC(!1)}}},eO=eT.filter(e=>!_.some(t=>t.team_id===e.team_id)),eP=async()=>{if(!u)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let t=await (0,b.invitationCreateCall)(u,e);J(t),G(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;B(!0),await (0,b.userDeleteCall)(u,[e]),U.default.success("User deleted successfully"),x&&x(),c()}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{I(!1),B(!1)}},eV=async e=>{try{if(!u||!j)return;await (0,b.userUpdateUserCall)(u,e,null),y({...j,user_email:e.user_email??j.user_email,user_alias:e.user_alias??j.user_alias,models:e.models??j.models,max_budget:e.max_budget??j.max_budget,budget_duration:e.budget_duration??j.budget_duration,metadata:e.metadata??j.metadata}),U.default.success("User updated successfully"),A(!1)}catch(e){console.error("Error updating user:",e),U.default.fromBackend("Failed to update user")}};if(M)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"Loading user data..."})]});if(!j)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"User not found"})]});let e$=async(e,t)=>{await (0,O.copyToClipboard)(e)&&(es(e=>({...e,[t]:!0})),setTimeout(()=>{es(e=>({...e,[t]:!1}))},2e3))},eK={user_id:j.user_id,user_info:{user_email:j.user_email,user_alias:j.user_alias,user_role:j.user_role,models:j.models,max_budget:j.max_budget,budget_duration:j.budget_duration,metadata:j.metadata}};return(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)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(H.Title,{children:j.user_email||"User"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"text-gray-500 font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(v.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:eP,className:"flex items-center",children:"Reset Password"}),(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,t.jsx)($.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:j.user_email},{label:"User ID",value:j.user_id,code:!0},{label:"Global Proxy Role",value:j.user_role&&g?.[j.user_role]?.ui_label||j.user_role||"-"},{label:"Total Spend (USD)",value:null!==j.spend&&void 0!==j.spend?j.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:R}),(0,t.jsxs)(a.TabGroup,{defaultIndex:Y,onIndexChange:X,children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Overview"}),(0,t.jsx)(s.Tab,{children:"Details"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(H.Title,{children:["$",(0,O.formatNumberWithCommas)(j.spend||0,4)]}),(0,t.jsxs)(q.Text,{children:["of"," ",null!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"]})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)(q.Text,{children:"Teams"}),eF&&(0,t.jsx)(v.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eE(""),eR("user"),ed(!0),eD()},children:"Add Team"})]}),(0,t.jsxs)("div",{className:"mt-2",children:[_.length>0?(0,t.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,t.jsxs)(eu.Table,{children:[(0,t.jsx)(em.TableHead,{children:(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(eh.TableHeaderCell,{children:"Team Name"}),eF&&(0,t.jsx)(eh.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,t.jsx)(ex.TableBody,{children:_.slice(0,ea?_.length:20).map(e=>(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(ef.TableCell,{children:e.team_alias||e.team_id}),eF&&(0,t.jsx)(ef.TableCell,{className:"text-right",children:(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{eb(e),ec(!0)}})})]},e.team_id))})]})}):(0,t.jsx)(q.Text,{children:"No teams"}),!ea&&_.length>20&&(0,t.jsxs)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",_.length-20," more"]}),ea&&_.length>20&&(0,t.jsx)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Personal Models"}),(0,t.jsx)("div",{className:"mt-2",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)(q.Text,{children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"User Settings"}),!D&&m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsx)(v.Button,{onClick:()=>A(!0),children:"Edit Settings"})]}),D&&j?(0,t.jsx)(E,{userData:eK,onCancel:()=>A(!1),onSubmit:eV,teams:_,accessToken:u,userID:e,userRole:m,userModels:P,possibleUIRoles:g}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,t.jsx)(q.Text,{children:j.user_email||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,t.jsx)(q.Text,{children:j.user_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,t.jsx)(q.Text,{children:j.user_role||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(q.Text,{children:j.created_at?new Date(j.created_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(q.Text,{children:j.updated_at?new Date(j.updated_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsx)(q.Text,{children:null!==j.max_budget&&void 0!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,t.jsx)(q.Text,{children:(0,T.getBudgetDurationLabel)(j.budget_duration??null)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(j.metadata||{},null,2)})]})]})]})})]})]}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:V,setIsInvitationLinkModalVisible:G,baseUrl:Q||"",invitationLinkData:W,modalType:"resetPassword"}),(0,t.jsx)($.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ep?.team_alias||ep?.team_id},{label:"User ID",value:j?.user_id,code:!0},{label:"Email",value:j?.user_email}],onCancel:()=>{ec(!1),eb(null)},onOk:eL,confirmLoading:ey}),(0,t.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!ej,children:(0,t.jsxs)(w.Form,{layout:"vertical",onFinish:eA,children:[(0,t.jsx)(w.Form.Item,{label:"Team",required:!0,children:(0,t.jsx)(h.Select,{showSearch:!0,value:eI||void 0,onChange:eE,placeholder:"Select a team",filterOption:(e,t)=>{let s=eO.find(e=>e.team_id===t?.value);return!!s&&s.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eB,children:eO.map(e=>(0,t.jsx)(h.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,t.jsx)(w.Form.Item,{label:"Member Role",children:(0,t.jsxs)(h.Select,{value:eU,onChange:eR,children:[(0,t.jsx)(h.Select.Option,{value:"user",children:(0,t.jsxs)(N.Tooltip,{title:"Can view team info, but not manage it",children:[(0,t.jsx)("span",{className:"font-medium",children:"user"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,t.jsx)(h.Select.Option,{value:"admin",children:(0,t.jsxs)(N.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,t.jsx)("span",{className:"font-medium",children:"admin"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:ej,disabled:!eI,children:ej?"Adding...":"Add to Team"})})]})})]})}var eT=e.i(655913),ek=e.i(38419),eI=e.i(78334),eE=e.i(555436),eU=e.i(284614);let eR=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eB({data:e=[],columns:s,isLoading:a=!1,onSortChange:l,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:h=[],onSelectionChange:x,enableSelection:g=!1,filters:f,updateFilters:p,initialFilters:b,teams:j,userListResponse:v,currentPage:_,handlePageChange:S}){let[w,N]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[C,T]=n.default.useState(null),[k,I]=n.default.useState(!1),[E,U]=n.default.useState(!1),R=(e,t=!1)=>{T(e),I(t)},B=(e,t)=>{x&&(t?x([...h,e]):x(h.filter(t=>t.user_id!==e.user_id)))},M=t=>{x&&(t?x(e):x([]))},F=e=>h.some(t=>t.user_id===e.user_id),D=e.length>0&&h.length===e.length,A=h.length>0&&h.lengtho?ed(o,c,u,m,R,g?{selectedUsers:h,onSelectUser:B,onSelectAll:M,isUserSelected:F,isAllSelected:D,isIndeterminate:A}:void 0):s,[o,c,u,m,R,s,g,h,D,A]),O=(0,eo.useReactTable)({data:e,columns:L,state:{sorting:w},onSortingChange:e=>{let t="function"==typeof e?e(w):e;if(N(t),t&&Array.isArray(t)&&t.length>0&&t[0]){let e=t[0];if(e.id){let t=e.id,s=e.desc?"desc":"asc";l?.(t,s)}}else l?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&N([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),C)?(0,t.jsx)(eC,{userId:C,onClose:()=>{T(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(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)(eT.FilterInput,{placeholder:"Search by email...",value:f.email,onChange:e=>p({email:e}),icon:eE.Search}),(0,t.jsx)(ek.FiltersButton,{onClick:()=>U(!E),active:E,hasActiveFilters:!!(f.user_id||f.user_role||f.team)}),(0,t.jsx)(eI.ResetFiltersButton,{onClick:()=>{p(b)}})]}),E&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by User ID",value:f.user_id,onChange:e=>p({user_id:e}),icon:eU.User}),(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by SSO ID",value:f.sso_user_id,onChange:e=>p({sso_user_id:e}),icon:eR}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.user_role,onValueChange:e=>p({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s.ui_label},e))})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.team,onValueChange:e=>p({team:e}),placeholder:"Select Team",children:j?.map(e=>(0,t.jsx)(y.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[a?(0,t.jsx)(ey.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",v&&v.users&&v.users.length>0?(v.page-1)*v.page_size+1:0," ","-"," ",v&&v.users?Math.min(v.page*v.page_size,v.total):0," ","of ",v?v.total:0," results"]}),(0,t.jsx)("div",{className:"flex space-x-2",children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>S(_-1),disabled:1===_,className:`px-3 py-1 text-sm border rounded-md ${1===_?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,t.jsx)("button",{onClick:()=>S(_+1),disabled:!v||_>=v.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!v||_>=v.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,t.jsx)("div",{className:"overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(em.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eh.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(ej.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ev.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eb.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(ex.TableBody,{children:a?(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?O.getRowModel().rows.map(e=>(0,t.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(ef.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&R(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eM,Title:eF}=c.Typography,eD={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:h})=>{let x=!!c&&(0,C.isProxyAdminRole)(c),g=(0,V.useQueryClient)(),[f,p]=(0,n.useState)(1),[j,v]=(0,n.useState)(!1),[y,_]=(0,n.useState)(null),[S,w]=(0,n.useState)(!1),[N,T]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[E,R]=(0,n.useState)("users"),[B,M]=(0,n.useState)(eD),[K,H,q]=(0,P.useDebouncedState)(B,{wait:300}),[G,W]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Z,X]=(0,n.useState)(null),[ee,et]=(0,n.useState)([]),[es,ea]=(0,n.useState)(!1),[el,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),w(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{X((0,b.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let t=(await (0,b.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",t),en(t)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{M(t=>{let s={...t,...e};return H(s),s})},eu=(e,t)=>{ec({sort_by:e,sort_order:t})},em=async t=>{if(!e)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let s=await (0,b.invitationCreateCall)(e,t);Q(s),W(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},eh=async()=>{if(k&&e)try{T(!0),await (0,b.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:t}}),U.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{w(!1),I(null),T(!1)}},ex=async()=>{_(null),v(!1)},eg=async t=>{if(console.log("inside handleEditSubmit:",t),e&&o&&c&&u){try{let s=await (0,b.userUpdateUserCall)(e,t,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.map(e=>e.user_id===s.data.user_id?(0,O.updateExistingKeys)(e,s.data):e);return{...e,users:t}}),U.default.success(`User ${t.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}_(null),v(!1)}},ef=async e=>{p(e)},ep=e=>{et(e)},eb=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:K,currentPage:f,orgAdminOrgIds:h}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.userListCall)(e,K.user_id?[K.user_id]:null,f,25,K.email||null,K.user_role||null,K.team||null,K.sso_user_id||null,K.sort_by,K.sort_order,h?h.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),ej=eb.data,ev=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,e_=ed(ev,e=>{_(e),v(!0)},eo,em,()=>{});return(0,t.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("div",{className:"flex space-x-3",children:eb.isLoading?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ev}),x&&(0,t.jsx)(d.Button,{onClick:()=>{er(!el),et([])},type:el?"primary":"default",className:"flex items-center",children:el?"Cancel Selection":"Select Users"}),x&&el&&(0,t.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?U.default.fromBackend("Please select users to edit"):ea(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),x?(0,t.jsxs)(a.TabGroup,{defaultIndex:0,onIndexChange:e=>R(0===e?"users":"settings"),children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Users"}),(0,t.jsx)(s.Tab,{children:"Default User Settings"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:el,selectedUsers:ee,onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef})}),(0,t.jsx)(r.TabPanel,{children:u&&c&&e?(0,t.jsx)(Y,{accessToken:e,possibleUIRoles:ev,userID:u,userRole:c}):(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(ey.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef}),(0,t.jsx)(A,{visible:j,possibleUIRoles:ev,onCancel:ex,user:y,onSubmit:eg}),(0,t.jsx)($.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ev?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{w(!1),I(null)},onOk:eh,confirmLoading:N}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:G,setIsInvitationLinkModalVisible:W,baseUrl:Z||"",invitationLinkData:J,modalType:"resetPassword"}),(0,t.jsx)(F,{open:es,onCancel:()=>ea(!1),selectedUsers:ee,possibleUIRoles:ev,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),et([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,C.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,757440,e=>{"use strict";var t=e.i(290571),s=e.i(271645);let a=e=>{var a=(0,t.__rest)(e,[]);return s.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},a),s.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>a])},446428,854056,e=>{"use strict";let t;var s=e.i(290571),a=e.i(271645);let l=e=>{var t=(0,s.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.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"}))};e.s(["default",()=>l],446428);var r=e.i(746725),i=e.i(914189),n=e.i(553521),d=e.i(835696),o=e.i(941444),c=e.i(178677),u=e.i(294316),m=e.i(83733),h=e.i(233137),x=e.i(732607),g=e.i(397701),f=e.i(700020);function p(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:S)!==a.Fragment||1===a.default.Children.count(e.children)}let b=(0,a.createContext)(null);b.displayName="TransitionContext";var j=((t=j||{}).Visible="visible",t.Hidden="hidden",t);let v=(0,a.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 _(e,t){let s=(0,o.useLatestValue)(e),l=(0,a.useRef)([]),d=(0,n.useIsMounted)(),c=(0,r.useDisposables)(),u=(0,i.useEvent)((e,t=f.RenderStrategy.Hidden)=>{let a=l.current.findIndex(({el:t})=>t===e);-1!==a&&((0,g.match)(t,{[f.RenderStrategy.Unmount](){l.current.splice(a,1)},[f.RenderStrategy.Hidden](){l.current[a].state="hidden"}}),c.microTask(()=>{var e;!y(l)&&d.current&&(null==(e=s.current)||e.call(s))}))}),m=(0,i.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,f.RenderStrategy.Unmount)}),h=(0,a.useRef)([]),x=(0,a.useRef)(Promise.resolve()),p=(0,a.useRef)({enter:[],leave:[]}),b=(0,i.useEvent)((e,s,a)=>{h.current.splice(0),t&&(t.chains.current[s]=t.chains.current[s].filter(([t])=>t!==e)),null==t||t.chains.current[s].push([e,new Promise(e=>{h.current.push(e)})]),null==t||t.chains.current[s].push([e,new Promise(e=>{Promise.all(p.current[s].map(([e,t])=>t)).then(()=>e())})]),"enter"===s?x.current=x.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(s)):a(s)}),j=(0,i.useEvent)((e,t,s)=>{Promise.all(p.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=h.current.shift())||e()}).then(()=>s(t))});return(0,a.useMemo)(()=>({children:l,register:m,unregister:u,onStart:b,onStop:j,wait:x,chains:p}),[m,u,l,b,j,p,x])}v.displayName="NestingContext";let S=a.Fragment,w=f.RenderFeatures.RenderStrategy,N=(0,f.forwardRefWithAs)(function(e,t){let{show:s,appear:l=!1,unmount:r=!0,...n}=e,o=(0,a.useRef)(null),m=p(e),x=(0,u.useSyncRefs)(...m?[o,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let g=(0,h.useOpenClosed)();if(void 0===s&&null!==g&&(s=(g&h.State.Open)===h.State.Open),void 0===s)throw Error("A is used but it is missing a `show={true | false}` prop.");let[j,S]=(0,a.useState)(s?"visible":"hidden"),N=_(()=>{s||S("hidden")}),[T,k]=(0,a.useState)(!0),I=(0,a.useRef)([s]);(0,d.useIsoMorphicEffect)(()=>{!1!==T&&I.current[I.current.length-1]!==s&&(I.current.push(s),k(!1))},[I,s]);let E=(0,a.useMemo)(()=>({show:s,appear:l,initial:T}),[s,l,T]);(0,d.useIsoMorphicEffect)(()=>{s?S("visible"):y(N)||null===o.current||S("hidden")},[s,N]);let U={unmount:r},R=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeEnter)||t.call(e)}),B=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeLeave)||t.call(e)}),M=(0,f.useRender)();return a.default.createElement(v.Provider,{value:N},a.default.createElement(b.Provider,{value:E},M({ourProps:{...U,as:a.Fragment,children:a.default.createElement(C,{ref:x,...U,...n,beforeEnter:R,beforeLeave:B})},theirProps:{},defaultTag:a.Fragment,features:w,visible:"visible"===j,name:"Transition"})))}),C=(0,f.forwardRefWithAs)(function(e,t){var s,l;let{transition:r=!0,beforeEnter:n,afterEnter:o,beforeLeave:j,afterLeave:N,enter:C,enterFrom:T,enterTo:k,entered:I,leave:E,leaveFrom:U,leaveTo:R,...B}=e,[M,F]=(0,a.useState)(null),D=(0,a.useRef)(null),A=p(e),L=(0,u.useSyncRefs)(...A?[D,t,F]:null===t?[]:[t]),O=null==(s=B.unmount)||s?f.RenderStrategy.Unmount:f.RenderStrategy.Hidden,{show:P,appear:z,initial:V}=function(){let e=(0,a.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[$,K]=(0,a.useState)(P?"visible":"hidden"),H=function(){let e=(0,a.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:q,unregister:G}=H;(0,d.useIsoMorphicEffect)(()=>q(D),[q,D]),(0,d.useIsoMorphicEffect)(()=>{if(O===f.RenderStrategy.Hidden&&D.current)return P&&"visible"!==$?void K("visible"):(0,g.match)($,{hidden:()=>G(D),visible:()=>q(D)})},[$,D,q,G,P,O]);let W=(0,c.useServerHandoffComplete)();(0,d.useIsoMorphicEffect)(()=>{if(A&&W&&"visible"===$&&null===D.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,$,W,A]);let J=V&&!z,Q=z&&P&&V,Z=(0,a.useRef)(!1),Y=_(()=>{Z.current||(K("hidden"),G(D))},H),X=(0,i.useEvent)(e=>{Z.current=!0,Y.onStart(D,e?"enter":"leave",e=>{"enter"===e?null==n||n():"leave"===e&&(null==j||j())})}),ee=(0,i.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Y.onStop(D,t,e=>{"enter"===e?null==o||o():"leave"===e&&(null==N||N())}),"leave"!==t||y(Y)||(K("hidden"),G(D))});(0,a.useEffect)(()=>{A&&r||(X(P),ee(P))},[P,A,r]);let et=!(!r||!A||!W||J),[,es]=(0,m.useTransition)(et,M,P,{start:X,end:ee}),ea=(0,f.compact)({ref:L,className:(null==(l=(0,x.classNames)(B.className,Q&&C,Q&&T,es.enter&&C,es.enter&&es.closed&&T,es.enter&&!es.closed&&k,es.leave&&E,es.leave&&!es.closed&&U,es.leave&&es.closed&&R,!es.transition&&P&&I))?void 0:l.trim())||void 0,...(0,m.transitionDataAttributes)(es)}),el=0;"visible"===$&&(el|=h.State.Open),"hidden"===$&&(el|=h.State.Closed),es.enter&&(el|=h.State.Opening),es.leave&&(el|=h.State.Closing);let er=(0,f.useRender)();return a.default.createElement(v.Provider,{value:Y},a.default.createElement(h.OpenClosedProvider,{value:el},er({ourProps:ea,theirProps:B,defaultTag:S,features:w,visible:"visible"===$,name:"Transition.Child"})))}),T=(0,f.forwardRefWithAs)(function(e,t){let s=null!==(0,a.useContext)(b),l=null!==(0,h.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!s&&l?a.default.createElement(N,{ref:t,...e}):a.default.createElement(C,{ref:t,...e}))}),k=Object.assign(N,{Child:T,Root:N});e.s(["Transition",()=>k],854056)},206929,e=>{"use strict";var t=e.i(290571),s=e.i(757440),a=e.i(271645),l=e.i(446428),r=e.i(444755),i=e.i(673706),n=e.i(103471),d=e.i(495470),o=e.i(854056),c=e.i(888288);let u=(0,i.makeClassName)("Select"),m=a.default.forwardRef((e,i)=>{let{defaultValue:m="",value:h,onValueChange:x,placeholder:g="Select...",disabled:f=!1,icon:p,enableClear:b=!1,required:j,children:v,name:y,error:_=!1,errorMessage:S,className:w,id:N}=e,C=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),T=(0,a.useRef)(null),k=a.Children.toArray(v),[I,E]=(0,c.default)(m,h),U=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(v).filter(a.isValidElement);return(0,n.constructValueToNameMapping)(e)},[v]);return a.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",w)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:j,className:(0,r.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:I,onChange:e=>{e.preventDefault()},name:y,disabled:f,id:N,onFocus:()=>{let e=T.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},g),k.map(e=>{let t=e.props.value,s=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},s)})),a.default.createElement(d.Listbox,Object.assign({as:"div",ref:i,defaultValue:I,value:I,onChange:e=>{null==x||x(e),E(e)},disabled:f,id:N},C),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(d.ListboxButton,{ref:T,className:(0,r.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",p?"pl-10":"pl-3",(0,n.getSelectButtonColors)((0,n.hasValue)(e),f,_))},p&&a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(p,{className:(0,r.tremorTwMerge)(u("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=U.get(e))?t:g),a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(s.default,{className:(0,r.tremorTwMerge)(u("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&I?a.default.createElement("button",{type:"button",className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E(""),null==x||x("")}},a.default.createElement(l.default,{className:(0,r.tremorTwMerge)(u("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(o.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.default.createElement(d.ListboxOptions,{anchor:"bottom start",className:(0,r.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},v)))})),_&&S?a.default.createElement("p",{className:(0,r.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},S):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},502275,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,s],502275)},78085,e=>{"use strict";var t=e.i(290571),s=e.i(103471),a=e.i(888288),l=e.i(271645),r=e.i(444755),i=e.i(673706);let n=(0,i.makeClassName)("Textarea"),d=l.default.forwardRef((e,d)=>{let{value:o,defaultValue:c="",placeholder:u="Type...",error:m=!1,errorMessage:h,disabled:x=!1,className:g,onChange:f,onValueChange:p,autoHeight:b=!1}=e,j=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[v,y]=(0,a.default)(c,o),_=(0,l.useRef)(null),S=(0,s.hasValue)(v);return(0,l.useEffect)(()=>{let e=_.current;if(b&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[b,_,v]),l.default.createElement(l.default.Fragment,null,l.default.createElement("textarea",Object.assign({ref:(0,i.mergeRefs)([_,d]),value:v,placeholder:u,disabled:x,className:(0,r.tremorTwMerge)(n("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,s.getSelectButtonColors)(S,x,m),x?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",g),"data-testid":"text-area",onChange:e=>{null==f||f(e),y(e.target.value),null==p||p(e.target.value)}},j)),m&&h?l.default.createElement("p",{className:(0,r.tremorTwMerge)(n("errorMessage"),"text-sm text-red-500 mt-1")},h):null)});d.displayName="Textarea",e.s(["Textarea",()=>d],78085)},114600,e=>{"use strict";var t=e.i(290571),s=e.i(444755),a=e.i(673706),l=e.i(271645);let r=(0,a.makeClassName)("Divider"),i=l.default.forwardRef((e,a)=>{let{className:i,children:n}=e,d=(0,t.__rest)(e,["className","children"]);return l.default.createElement("div",Object.assign({ref:a,className:(0,s.tremorTwMerge)(r("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",i)},d),n?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.default.createElement("div",{className:(0,s.tremorTwMerge)("text-inherit whitespace-nowrap")},n),l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});i.displayName="Divider",e.s(["Divider",()=>i],114600)},910119,e=>{"use strict";var t=e.i(843476),s=e.i(197647),a=e.i(653824),l=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),h=e.i(199133),x=e.i(28651),g=e.i(175712),f=e.i(770914),p=e.i(536916),b=e.i(764205),j=e.i(827252),v=e.i(994388),y=e.i(35983),_=e.i(779241),S=e.i(78085),w=e.i(808613),N=e.i(592968),C=e.i(708347),T=e.i(860585),k=e.i(355619),I=e.i(435451);function E({userData:e,onCancel:s,onSubmit:a,teams:l,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=w.Form.useForm(),[x,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let t=e.user_info?.max_budget,s=null==t;g(s),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:s?"":t,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,t.jsxs)(w.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(x||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),a(e)},layout:"vertical",children:[!u&&(0,t.jsx)(w.Form.Item,{label:"User ID",name:"user_id",children:(0,t.jsx)(_.TextInput,{disabled:!0})}),!u&&(0,t.jsx)(w.Form.Item,{label:"Email",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Alias",name:"user_alias",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(N.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,t.jsx)(j.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,t.jsx)(h.Select,{children:c&&Object.entries(c).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Personal Models"," ",(0,t.jsx)(N.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,t.jsx)(j.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsxs)(h.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!C.all_admin_roles.includes(d||""),children:[(0,t.jsx)(h.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(h.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,t.jsx)(h.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,t.jsx)("span",{children:"Max Budget (USD)"}),(0,t.jsx)(p.Checkbox,{checked:x,onChange:e=>{let t=e.target.checked;g(t),t&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,t)=>x||""!==t&&null!=t?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,t.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:x})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)(w.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(v.Button,{variant:"secondary",type:"button",onClick:s,children:"Cancel"}),(0,t.jsx)(v.Button,{type:"submit",children:"Save Changes"})]})]})}var U=e.i(727749),R=e.i(888259);let{Text:B,Title:M}=c.Typography,F=({open:e,onCancel:s,selectedUsers:a,possibleUIRoles:l,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:j,allowAllUsers:v=!1})=>{let[y,_]=(0,n.useState)(!1),[S,w]=(0,n.useState)([]),[N,C]=(0,n.useState)(null),[T,k]=(0,n.useState)(!1),[I,F]=(0,n.useState)(!1),D=()=>{w([]),C(null),k(!1),F(!1),s()},A=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),L=async e=>{if(console.log("formValues",e),!r)return void U.default.fromBackend("Access token not found");_(!0);try{let t=a.map(e=>e.user_id),l={};e.user_role&&""!==e.user_role&&(l.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(l.max_budget=e.max_budget),e.models&&e.models.length>0&&(l.models=e.models),e.budget_duration&&""!==e.budget_duration&&(l.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(l.metadata=e.metadata);let n=Object.keys(l).length>0,d=T&&S.length>0;if(!n&&!d)return void U.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,b.userBulkUpdateUserCall)(r,l,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,b.userBulkUpdateUserCall)(r,l,t),o.push(`Updated ${t.length} user(s)`);if(d){let e=[];for(let t of S)try{let s=null;s=I?null:a.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let l=await (0,b.teamBulkMemberAddCall)(r,t,s||null,N||void 0,I);console.log("result",l),e.push({teamId:t,success:!0,successfulAdditions:l.successful_additions,failedAdditions:l.failed_additions})}catch(s){console.error(`Failed to add users to team ${t}:`,s),e.push({teamId:t,success:!1,error:s})}let t=e.filter(e=>e.success),s=e.filter(e=>!e.success);if(t.length>0){let e=t.reduce((e,t)=>e+t.successfulAdditions,0);o.push(`Added users to ${t.length} team(s) (${e} total additions)`)}s.length>0&&R.default.warning(`Failed to add users to ${s.length} team(s)`)}o.length>0&&U.default.success(o.join(". ")),w([]),C(null),k(!1),F(!1),i(),s()}catch(e){console.error("Bulk operation failed:",e),U.default.fromBackend("Failed to perform bulk operations")}finally{_(!1)}};return(0,t.jsxs)(o.Modal,{open:e,onCancel:D,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${a.length} User(s)`,width:800,children:[v&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(p.Checkbox,{checked:I,onChange:e=>F(e.target.checked),children:(0,t.jsx)(B,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsx)(B,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(M,{level:5,children:["Selected Users (",a.length,"):"]}),(0,t.jsx)(m.Table,{size:"small",bordered:!0,dataSource:a,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,t.jsx)(B,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:l?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,t.jsx)(u.Divider,{}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)(B,{children:[(0,t.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,t.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,t.jsxs)(f.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsx)(p.Checkbox,{checked:T,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Select Teams:"}),(0,t.jsx)(h.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:w,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Team Budget (Optional):"}),(0,t.jsx)(x.InputNumber,{placeholder:"Max budget per user in team",value:N,onChange:e=>C(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,t.jsx)(E,{userData:A,onCancel:D,onSubmit:L,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:j,possibleUIRoles:l,isBulkEdit:!0}),y&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,t.jsxs)(B,{children:["Updating ",I?"all users":a.length," user(s)..."]})})]})};var D=e.i(371455);let A=({visible:e,possibleUIRoles:s,onCancel:a,user:l,onSubmit:r})=>{let[i,c]=(0,n.useState)(l),[u]=w.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[l]);let m=async()=>{u.resetFields(),a()},g=async e=>{r(e),u.resetFields(),a()};return l?(0,t.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+l.user_id,width:1e3,children:(0,t.jsx)(w.Form,{form:u,onFinish:g,initialValues:l,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(h.Select,{children:s&&Object.entries(s).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,t.jsx)(x.InputNumber,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,t.jsx)(I.default,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var L=e.i(172372),O=e.i(500330),P=e.i(152473),z=e.i(266027),V=e.i(912598),$=e.i(127952),K=e.i(304967),H=e.i(629569),q=e.i(599724),G=e.i(114600),W=e.i(482725),J=e.i(790848),Q=e.i(646563),Z=e.i(955135);let Y=({accessToken:e,possibleUIRoles:s,userID:a,userRole:l})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[f,p]=(0,n.useState)({}),[j,v]=(0,n.useState)(!1),[y,S]=(0,n.useState)([]),{Paragraph:w}=c.Typography,{Option:N}=h.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let t=await (0,b.getInternalUserSettings)(e);if(u(t),p(t.values||{}),e)try{let t=await (0,b.modelAvailableCall)(e,a,l);if(t&&t.data){let e=t.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),U.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let C=async()=>{if(e){v(!0);try{let t=Object.entries(f).reduce((e,[t,s])=>(e[t]=""===s?null:s,e),{}),s=await (0,b.updateInternalUserSettings)(e,t);u({...o,values:s.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),U.default.fromBackend("Failed to update settings: "+e)}finally{v(!1)}}},I=(e,t)=>{p(s=>({...s,[e]:t}))},E=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(W.Spin,{size:"large"})}):o?(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(d.Button,{onClick:()=>{g(!1),p(o.values||{})},disabled:j,children:"Cancel"}),(0,t.jsx)(d.Button,{type:"primary",onClick:C,loading:j,children:"Save Changes"})]}):(0,t.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,t.jsx)(w,{className:"mb-4",children:o.field_schema.description}),(0,t.jsx)(G.Divider,{}),(0,t.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:a}=o;return a&&a.properties?Object.entries(a.properties).map(([a,l])=>{let r=e[a],i=a.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,t.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,t.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,t.jsx)(w,{className:"text-sm text-gray-500 mt-1",children:l.description||"No description available"}),m?(0,t.jsx)("div",{className:"mt-2",children:((e,a,l)=>{let r=a.type;if("teams"===e){let s,a;return(0,t.jsx)("div",{className:"mt-2",children:(s=E(f[e]||[]),a=(e,t,a)=>{let l=[...s];l[e]={...l[e],[t]:a},I("teams",l)},(0,t.jsxs)("div",{className:"space-y-3",children:[s.map((e,l)=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)(q.Text,{className:"font-medium",children:["Team ",l+1]}),(0,t.jsx)(d.Button,{size:"small",danger:!0,icon:(0,t.jsx)(Z.DeleteOutlined,{}),onClick:()=>{I("teams",s.filter((e,t)=>t!==l))},children:"Remove"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,t.jsx)(_.TextInput,{value:e.team_id,onChange:e=>a(l,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,t.jsx)(x.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>a(l,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,t.jsxs)(h.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>a(l,"user_role",e),children:[(0,t.jsx)(N,{value:"user",children:"User"}),(0,t.jsx)(N,{value:"admin",children:"Admin"})]})]})]})]},l)),(0,t.jsx)(d.Button,{icon:(0,t.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...s,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&s)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:Object.entries(s).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(N,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:a})]})},e))});if("budget_duration"===e)return(0,t.jsx)(T.default,{value:f[e]||null,onChange:t=>I(e,t),className:"mt-2"});if("boolean"===r)return(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(J.Switch,{checked:!!f[e],onChange:t=>I(e,t)})});if("array"===r&&a.items?.enum)return(0,t.jsx)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:a.items.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else if("models"===e)return(0,t.jsxs)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:[(0,t.jsx)(N,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,t.jsx)(N,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),y.map(e=>(0,t.jsx)(N,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&a.enum)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:a.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else return(0,t.jsx)(_.TextInput,{value:void 0!==f[e]?String(f[e]):"",onChange:t=>I(e,t.target.value),placeholder:a.description||"",className:"mt-2"})})(a,l,0)}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,a)=>{if(null==a)return(0,t.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(a)){if(0===a.length)return(0,t.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=E(a);return(0,t.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,s)=>(0,t.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,t.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,t.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,O.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,t.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},s))})}if("user_role"===e&&s&&s[a]){let{ui_label:e,description:l}=s[a];return(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:e}),l&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:l})]})}if("budget_duration"===e)return(0,t.jsx)("span",{children:(0,T.getBudgetDurationLabel)(a)});if("boolean"==typeof a)return(0,t.jsx)("span",{children:a?"Enabled":"Disabled"});if("models"===e&&Array.isArray(a))return 0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},s))});if("object"==typeof a)return Array.isArray(a)?0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(a,null,2)});return(0,t.jsx)("span",{children:String(a)})})(a,r)})]},a)}):(0,t.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,t.jsx)(K.Card,{children:(0,t.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var X=e.i(389083),ee=e.i(350967),et=e.i(752978),es=e.i(262218),ea=e.i(591935),el=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,s,a,l,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(N.Tooltip,{title:e.original.user_id,children:(0,t.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,t.jsx)(N.Tooltip,{title:"Copy User ID",children:(0,t.jsx)(en.CopyOutlined,{onClick:t=>{t.stopPropagation(),(0,O.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>e.original.metadata?.scim_active===!1?(0,t.jsx)(N.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,t.jsx)(es.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,t.jsx)(es.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:s})=>(0,t.jsx)("span",{className:"text-xs",children:e?.[s.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.spend?(0,O.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"SSO ID"}),(0,t.jsx)(N.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,t.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,t.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,t.jsxs)(X.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,t.jsx)(X.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(N.Tooltip,{title:"Edit user details",children:(0,t.jsx)(et.Icon,{icon:ea.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(N.Tooltip,{title:"Delete user",children:(0,t.jsx)(et.Icon,{icon:el.TrashIcon,size:"sm",onClick:()=>a(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,t.jsx)(N.Tooltip,{title:"Reset Password",children:(0,t.jsx)(et.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>l(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:s,isUserSelected:a,isAllSelected:l,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,t.jsx)(p.Checkbox,{indeterminate:r,checked:l,onChange:e=>s(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:s})=>(0,t.jsx)(p.Checkbox,{checked:a(s.original),onChange:t=>e(s.original,t.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),eh=e.i(64848),ex=e.i(942232),eg=e.i(496020),ef=e.i(977572),ep=e.i(206929),eb=e.i(94629),ej=e.i(360820),ev=e.i(871943),ey=e.i(981339),e_=e.i(530212),eS=e.i(988297),ew=e.i(118366),eN=e.i(678784);function eC({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:x,possibleUIRoles:g,initialTab:f=0,startInEditMode:p=!1}){let[j,y]=(0,n.useState)(null),[_,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[R,B]=(0,n.useState)(!1),[M,F]=(0,n.useState)(!0),[D,A]=(0,n.useState)(p),[P,z]=(0,n.useState)([]),[V,G]=(0,n.useState)(!1),[W,J]=(0,n.useState)(null),[Q,Z]=(0,n.useState)(null),[Y,X]=(0,n.useState)(f),[et,es]=(0,n.useState)({}),[ea,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ep,eb]=(0,n.useState)(null),[ej,ev]=(0,n.useState)(!1),[ey,eC]=(0,n.useState)(!1),[eT,ek]=(0,n.useState)([]),[eI,eE]=(0,n.useState)(""),[eU,eR]=(0,n.useState)("user"),[eB,eM]=(0,n.useState)(!1);n.default.useEffect(()=>{Z((0,b.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0)try{let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),s=await Promise.all(e);S(s)}catch{S(t.teams.map(e=>({team_id:e,team_alias:null})))}let s=(await (0,b.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(s)}catch(e){console.error("Error fetching user data:",e),U.default.fromBackend("Failed to fetch user data")}finally{F(!1)}})()},[u,e,m]);let eF="proxy_admin"===m||"Admin"===m,eD=async()=>{if(u){eM(!0);try{let e=await (0,b.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eM(!1)}}},eA=async()=>{if(u&&eI){ev(!0);try{await (0,b.teamMemberAddCall)(u,eI,{role:eU,user_id:e}),U.default.success("User added to team successfully"),ed(!1);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),U.default.fromBackend(e?.message||"Failed to add user to team")}finally{ev(!1)}}},eL=async()=>{if(u&&ep){eC(!0);try{await (0,b.teamMemberDeleteCall)(u,ep.team_id,{role:"user",user_id:e}),U.default.success("User removed from team successfully"),ec(!1),eb(null);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),U.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eC(!1)}}},eO=eT.filter(e=>!_.some(t=>t.team_id===e.team_id)),eP=async()=>{if(!u)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let t=await (0,b.invitationCreateCall)(u,e);J(t),G(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;B(!0),await (0,b.userDeleteCall)(u,[e]),U.default.success("User deleted successfully"),x&&x(),c()}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{I(!1),B(!1)}},eV=async e=>{try{if(!u||!j)return;await (0,b.userUpdateUserCall)(u,e,null),y({...j,user_email:e.user_email??j.user_email,user_alias:e.user_alias??j.user_alias,models:e.models??j.models,max_budget:e.max_budget??j.max_budget,budget_duration:e.budget_duration??j.budget_duration,metadata:e.metadata??j.metadata}),U.default.success("User updated successfully"),A(!1)}catch(e){console.error("Error updating user:",e),U.default.fromBackend("Failed to update user")}};if(M)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"Loading user data..."})]});if(!j)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"User not found"})]});let e$=async(e,t)=>{await (0,O.copyToClipboard)(e)&&(es(e=>({...e,[t]:!0})),setTimeout(()=>{es(e=>({...e,[t]:!1}))},2e3))},eK={user_id:j.user_id,user_info:{user_email:j.user_email,user_alias:j.user_alias,user_role:j.user_role,models:j.models,max_budget:j.max_budget,budget_duration:j.budget_duration,metadata:j.metadata}};return(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)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(H.Title,{children:j.user_email||"User"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"text-gray-500 font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(v.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:eP,className:"flex items-center",children:"Reset Password"}),(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,t.jsx)($.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:j.user_email},{label:"User ID",value:j.user_id,code:!0},{label:"Global Proxy Role",value:j.user_role&&g?.[j.user_role]?.ui_label||j.user_role||"-"},{label:"Total Spend (USD)",value:null!==j.spend&&void 0!==j.spend?j.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:R}),(0,t.jsxs)(a.TabGroup,{defaultIndex:Y,onIndexChange:X,children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Overview"}),(0,t.jsx)(s.Tab,{children:"Details"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(H.Title,{children:["$",(0,O.formatNumberWithCommas)(j.spend||0,4)]}),(0,t.jsxs)(q.Text,{children:["of"," ",null!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"]})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)(q.Text,{children:"Teams"}),eF&&(0,t.jsx)(v.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eE(""),eR("user"),ed(!0),eD()},children:"Add Team"})]}),(0,t.jsxs)("div",{className:"mt-2",children:[_.length>0?(0,t.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,t.jsxs)(eu.Table,{children:[(0,t.jsx)(em.TableHead,{children:(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(eh.TableHeaderCell,{children:"Team Name"}),eF&&(0,t.jsx)(eh.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,t.jsx)(ex.TableBody,{children:_.slice(0,ea?_.length:20).map(e=>(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(ef.TableCell,{children:e.team_alias||e.team_id}),eF&&(0,t.jsx)(ef.TableCell,{className:"text-right",children:(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{eb(e),ec(!0)}})})]},e.team_id))})]})}):(0,t.jsx)(q.Text,{children:"No teams"}),!ea&&_.length>20&&(0,t.jsxs)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",_.length-20," more"]}),ea&&_.length>20&&(0,t.jsx)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Personal Models"}),(0,t.jsx)("div",{className:"mt-2",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)(q.Text,{children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"User Settings"}),!D&&m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsx)(v.Button,{onClick:()=>A(!0),children:"Edit Settings"})]}),D&&j?(0,t.jsx)(E,{userData:eK,onCancel:()=>A(!1),onSubmit:eV,teams:_,accessToken:u,userID:e,userRole:m,userModels:P,possibleUIRoles:g}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,t.jsx)(q.Text,{children:j.user_email||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,t.jsx)(q.Text,{children:j.user_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,t.jsx)(q.Text,{children:j.user_role||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(q.Text,{children:j.created_at?new Date(j.created_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(q.Text,{children:j.updated_at?new Date(j.updated_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsx)(q.Text,{children:null!==j.max_budget&&void 0!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,t.jsx)(q.Text,{children:(0,T.getBudgetDurationLabel)(j.budget_duration??null)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(j.metadata||{},null,2)})]})]})]})})]})]}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:V,setIsInvitationLinkModalVisible:G,baseUrl:Q||"",invitationLinkData:W,modalType:"resetPassword"}),(0,t.jsx)($.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ep?.team_alias||ep?.team_id},{label:"User ID",value:j?.user_id,code:!0},{label:"Email",value:j?.user_email}],onCancel:()=>{ec(!1),eb(null)},onOk:eL,confirmLoading:ey}),(0,t.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!ej,children:(0,t.jsxs)(w.Form,{layout:"vertical",onFinish:eA,children:[(0,t.jsx)(w.Form.Item,{label:"Team",required:!0,children:(0,t.jsx)(h.Select,{showSearch:!0,value:eI||void 0,onChange:eE,placeholder:"Select a team",filterOption:(e,t)=>{let s=eO.find(e=>e.team_id===t?.value);return!!s&&s.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eB,children:eO.map(e=>(0,t.jsx)(h.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,t.jsx)(w.Form.Item,{label:"Member Role",children:(0,t.jsxs)(h.Select,{value:eU,onChange:eR,children:[(0,t.jsx)(h.Select.Option,{value:"user",children:(0,t.jsxs)(N.Tooltip,{title:"Can view team info, but not manage it",children:[(0,t.jsx)("span",{className:"font-medium",children:"user"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,t.jsx)(h.Select.Option,{value:"admin",children:(0,t.jsxs)(N.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,t.jsx)("span",{className:"font-medium",children:"admin"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:ej,disabled:!eI,children:ej?"Adding...":"Add to Team"})})]})})]})}var eT=e.i(655913),ek=e.i(38419),eI=e.i(78334),eE=e.i(555436),eU=e.i(284614);let eR=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eB({data:e=[],columns:s,isLoading:a=!1,onSortChange:l,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:h=[],onSelectionChange:x,enableSelection:g=!1,filters:f,updateFilters:p,initialFilters:b,teams:j,userListResponse:v,currentPage:_,handlePageChange:S}){let[w,N]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[C,T]=n.default.useState(null),[k,I]=n.default.useState(!1),[E,U]=n.default.useState(!1),R=(e,t=!1)=>{T(e),I(t)},B=(e,t)=>{x&&(t?x([...h,e]):x(h.filter(t=>t.user_id!==e.user_id)))},M=t=>{x&&(t?x(e):x([]))},F=e=>h.some(t=>t.user_id===e.user_id),D=e.length>0&&h.length===e.length,A=h.length>0&&h.lengtho?ed(o,c,u,m,R,g?{selectedUsers:h,onSelectUser:B,onSelectAll:M,isUserSelected:F,isAllSelected:D,isIndeterminate:A}:void 0):s,[o,c,u,m,R,s,g,h,D,A]),O=(0,eo.useReactTable)({data:e,columns:L,state:{sorting:w},onSortingChange:e=>{let t="function"==typeof e?e(w):e;if(N(t),t&&Array.isArray(t)&&t.length>0&&t[0]){let e=t[0];if(e.id){let t=e.id,s=e.desc?"desc":"asc";l?.(t,s)}}else l?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&N([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),C)?(0,t.jsx)(eC,{userId:C,onClose:()=>{T(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(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)(eT.FilterInput,{placeholder:"Search by email...",value:f.email,onChange:e=>p({email:e}),icon:eE.Search}),(0,t.jsx)(ek.FiltersButton,{onClick:()=>U(!E),active:E,hasActiveFilters:!!(f.user_id||f.user_role||f.team)}),(0,t.jsx)(eI.ResetFiltersButton,{onClick:()=>{p(b)}})]}),E&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by User ID",value:f.user_id,onChange:e=>p({user_id:e}),icon:eU.User}),(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by SSO ID",value:f.sso_user_id,onChange:e=>p({sso_user_id:e}),icon:eR}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.user_role,onValueChange:e=>p({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s.ui_label},e))})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.team,onValueChange:e=>p({team:e}),placeholder:"Select Team",children:j?.map(e=>(0,t.jsx)(y.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[a?(0,t.jsx)(ey.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",v&&v.users&&v.users.length>0?(v.page-1)*v.page_size+1:0," ","-"," ",v&&v.users?Math.min(v.page*v.page_size,v.total):0," ","of ",v?v.total:0," results"]}),(0,t.jsx)("div",{className:"flex space-x-2",children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>S(_-1),disabled:1===_,className:`px-3 py-1 text-sm border rounded-md ${1===_?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,t.jsx)("button",{onClick:()=>S(_+1),disabled:!v||_>=v.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!v||_>=v.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,t.jsx)("div",{className:"overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(em.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eh.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(ej.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ev.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eb.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(ex.TableBody,{children:a?(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?O.getRowModel().rows.map(e=>(0,t.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(ef.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&R(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eM,Title:eF}=c.Typography,eD={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:h})=>{let x=!!c&&(0,C.isProxyAdminRole)(c),g=(0,V.useQueryClient)(),[f,p]=(0,n.useState)(1),[j,v]=(0,n.useState)(!1),[y,_]=(0,n.useState)(null),[S,w]=(0,n.useState)(!1),[N,T]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[E,R]=(0,n.useState)("users"),[B,M]=(0,n.useState)(eD),[K,H,q]=(0,P.useDebouncedState)(B,{wait:300}),[G,W]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Z,X]=(0,n.useState)(null),[ee,et]=(0,n.useState)([]),[es,ea]=(0,n.useState)(!1),[el,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),w(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{X((0,b.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let t=(await (0,b.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",t),en(t)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{M(t=>{let s={...t,...e};return H(s),s})},eu=(e,t)=>{ec({sort_by:e,sort_order:t})},em=async t=>{if(!e)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let s=await (0,b.invitationCreateCall)(e,t);Q(s),W(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},eh=async()=>{if(k&&e)try{T(!0),await (0,b.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:t}}),U.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{w(!1),I(null),T(!1)}},ex=async()=>{_(null),v(!1)},eg=async t=>{if(console.log("inside handleEditSubmit:",t),e&&o&&c&&u){try{let s=await (0,b.userUpdateUserCall)(e,t,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.map(e=>e.user_id===s.data.user_id?(0,O.updateExistingKeys)(e,s.data):e);return{...e,users:t}}),U.default.success(`User ${t.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}_(null),v(!1)}},ef=async e=>{p(e)},ep=e=>{et(e)},eb=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:K,currentPage:f,orgAdminOrgIds:h}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.userListCall)(e,K.user_id?[K.user_id]:null,f,25,K.email||null,K.user_role||null,K.team||null,K.sso_user_id||null,K.sort_by,K.sort_order,h?h.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),ej=eb.data,ev=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,e_=ed(ev,e=>{_(e),v(!0)},eo,em,()=>{});return(0,t.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("div",{className:"flex space-x-3",children:eb.isLoading?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,t.jsxs)(t.Fragment,{children:[x&&(0,t.jsx)(D.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ev}),x&&(0,t.jsx)(d.Button,{onClick:()=>{er(!el),et([])},type:el?"primary":"default",className:"flex items-center",children:el?"Cancel Selection":"Select Users"}),x&&el&&(0,t.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?U.default.fromBackend("Please select users to edit"):ea(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),x?(0,t.jsxs)(a.TabGroup,{defaultIndex:0,onIndexChange:e=>R(0===e?"users":"settings"),children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Users"}),(0,t.jsx)(s.Tab,{children:"Default User Settings"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:el,selectedUsers:ee,onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef})}),(0,t.jsx)(r.TabPanel,{children:u&&c&&e?(0,t.jsx)(Y,{accessToken:e,possibleUIRoles:ev,userID:u,userRole:c}):(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(ey.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef}),(0,t.jsx)(A,{visible:j,possibleUIRoles:ev,onCancel:ex,user:y,onSubmit:eg}),(0,t.jsx)($.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ev?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{w(!1),I(null)},onOk:eh,confirmLoading:N}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:G,setIsInvitationLinkModalVisible:W,baseUrl:Z||"",invitationLinkData:J,modalType:"resetPassword"}),(0,t.jsx)(F,{open:es,onCancel:()=>ea(!1),selectedUsers:ee,possibleUIRoles:ev,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),et([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,C.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/98ddd18b25554abd.js b/litellm/proxy/_experimental/out/_next/static/chunks/98ddd18b25554abd.js deleted file mode 100644 index 162f5c573d..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/98ddd18b25554abd.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["LinkOutlined",0,s],596239)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,r]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;r(`${e}//${t}`)}},[]),e}])},688511,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",()=>t],823429),e.s(["Edit",()=>t],688511)},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},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",()=>t],727612)},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},114600,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),l=e.i(271645);let s=(0,a.makeClassName)("Divider"),d=l.default.forwardRef((e,a)=>{let{className:d,children:o}=e,c=(0,t.__rest)(e,["className","children"]);return l.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(s("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",d)},c),o?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.default.createElement("div",{className:(0,r.tremorTwMerge)("text-inherit whitespace-nowrap")},o),l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});d.displayName="Divider",e.s(["Divider",()=>d],114600)},366283,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(95779),l=e.i(444755),s=e.i(673706);let d=(0,s.makeClassName)("Callout"),o=r.default.forwardRef((e,o)=>{let{title:c,icon:i,color:m,className:u,children:n}=e,f=(0,t.__rest)(e,["title","icon","color","className","children"]);return r.default.createElement("div",Object.assign({ref:o,className:(0,l.tremorTwMerge)(d("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",m?(0,l.tremorTwMerge)((0,s.getColorClassNames)(m,a.colorPalette.background).bgColor,(0,s.getColorClassNames)(m,a.colorPalette.darkBorder).borderColor,(0,s.getColorClassNames)(m,a.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,l.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},f),r.default.createElement("div",{className:(0,l.tremorTwMerge)(d("header"),"flex items-start")},i?r.default.createElement(i,{className:(0,l.tremorTwMerge)(d("icon"),"flex-none h-5 w-5 mr-1.5")}):null,r.default.createElement("h4",{className:(0,l.tremorTwMerge)(d("title"),"font-semibold")},c)),r.default.createElement("p",{className:(0,l.tremorTwMerge)(d("body"),"overflow-y-auto",n?"mt-2":"")},n))});o.displayName="Callout",e.s(["Callout",()=>o],366283)},475647,286536,77705,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 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["PlusCircleOutlined",0,s],475647);var d=e.i(475254);let o=(0,d.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",()=>o],286536);let c=(0,d.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",()=>c],77705)},514236,e=>{"use strict";var t=e.i(843476),r=e.i(105278);e.s(["default",0,()=>(0,t.jsx)(r.default,{})])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9b19f9f63c383201.js b/litellm/proxy/_experimental/out/_next/static/chunks/9b19f9f63c383201.js deleted file mode 100644 index 0fa24217b3..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/9b19f9f63c383201.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(708347),r=e.i(135214);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&a.all_admin_roles.includes(s||"")})}])},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/29eca5447bef7f55.js b/litellm/proxy/_experimental/out/_next/static/chunks/9bbebdeb3f1cb03f.js similarity index 81% rename from litellm/proxy/_experimental/out/_next/static/chunks/29eca5447bef7f55.js rename to litellm/proxy/_experimental/out/_next/static/chunks/9bbebdeb3f1cb03f.js index e42812af0a..879b37ea1c 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/29eca5447bef7f55.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/9bbebdeb3f1cb03f.js @@ -1,3 +1,3 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.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",()=>a],283086);let l=(0,s.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",()=>l],195116)},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 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"}]])},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,x=e.i(755151),m=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(x.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,m.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,m.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,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:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"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,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[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 ${a?"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 ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(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:l(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},i=(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}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,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 ${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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),x=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=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)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{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)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(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 a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{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 gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(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:[n(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:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{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)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`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)(d,{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)(o,{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 p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},m=(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}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(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:()=>n(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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({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 a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=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)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&m(`${i} blocked`,"red"),n>0&&m(`${n} masked`,"blue"),0===i&&0===n&&m("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&m(`${a.length} patterns`,"slate"),l.length>0&&m(`${l.length} keywords`,"slate"),r.length>0&&m(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",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.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{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)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",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.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:m(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(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"})]}),y=()=>(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"})]}),j=()=>(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"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(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:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(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:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded 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:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(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))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,x]=(0,s.useState)(!1),[m,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),x(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>x(!1))},[e,a]),(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)(b,{title:"EU AI Act",data:l,loading:o,error:m}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(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},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,C=()=>(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"})]}),T=({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"})]}),L=({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"})]}),M=()=>(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"})]}),A=()=>(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"})}),D=({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"})}),E=()=>(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"})}),I=({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 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,z=({response:e})=>{let[a,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(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(D,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},O=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);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:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(A,{}):"llm"===e.type?(0,t.jsx)(M,{}):e.isSuccess?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),m=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(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))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} 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:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),(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:m}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),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 text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(D,{expanded:n})]})]}),n&&(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)(I,{matchDetails:e.match_details}),c>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 text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(x,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(z,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm 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)(C,{}),(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:[r.length," guardrail",1!==r.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 ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(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,i," 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(r,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)(E,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,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)(O,{entries:r})}),(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:r.map((e,s)=>(0,t.jsx)(R,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},869939,e=>{"use strict";var t=e.i(843476),s=e.i(175712),a=e.i(262218),l=e.i(291542),r=e.i(898586),i=e.i(770914),n=e.i(592968),o=e.i(245704),d=e.i(518617),c=e.i(19732);let{Text:x}=r.Typography;function m({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)(c.ExperimentOutlined,{style:{fontSize:16,color:"#6366f1"}}),(0,t.jsx)(x,{strong:!0,style:{fontSize:15},children:"LLM Judge Results"})]}),s.map((e,s)=>(0,t.jsx)(u,{entry:e},e.eval_id||s))]}):null}function u({entry:e}){let r=e.passed,c=r?"#52c41a":"#ff4d4f",m=(e.verdicts||[]).filter(e=>"overall"!==(e.criterion_name||"").toLowerCase()),u=[{title:"Criterion",dataIndex:"criterion_name",key:"criterion_name",width:160,render:e=>(0,t.jsx)(x,{strong:!0,style:{whiteSpace:"nowrap"},children:e})},{title:"Weight",dataIndex:"weight",key:"weight",width:65,render:e=>null!=e?(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:[e,"%"]}):null},{title:"Score",dataIndex:"score",key:"score",width:65,render:e=>(0,t.jsx)(x,{style:{color:e>=70?"#52c41a":e>=50?"#faad14":"#ff4d4f",fontWeight:600},children:e})},{title:(0,t.jsx)(n.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 a=s.score*s.weight/100;return(0,t.jsx)(x,{type:"secondary",style:{fontSize:12},children:a%1==0?a:a.toFixed(1)})}},{title:"Comment",dataIndex:"reasoning",key:"reasoning",ellipsis:{showTitle:!1},render:e=>(0,t.jsx)(n.Tooltip,{title:e,children:(0,t.jsx)("span",{style:{fontSize:12},children:e})})}];return(0,t.jsxs)(s.Card,{size:"small",className:"mb-3",style:{borderLeft:`3px solid ${c}`},title:(0,t.jsxs)(i.Space,{children:[r?(0,t.jsx)(o.CheckCircleOutlined,{style:{color:"#52c41a"}}):(0,t.jsx)(d.CloseCircleOutlined,{style:{color:"#ff4d4f"}}),(0,t.jsx)(x,{strong:!0,children:e.eval_name}),(0,t.jsx)(a.Tag,{color:r?"success":"error",children:r?"PASSED":"FAILED"}),(0,t.jsx)(n.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)(x,{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)(i.Space,{size:"small",children:[e.judge_model&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Judge: ",e.judge_model]}),null!=e.iteration&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Iter: ",e.iteration+1]})]}),children:[e.eval_error&&(0,t.jsxs)(x,{type:"warning",style:{display:"block",marginBottom:8,fontSize:12},children:["Judge error: ",e.eval_error]}),m.length>0?(0,t.jsx)(l.Table,{dataSource:m,columns:u,pagination:!1,size:"small",rowKey:"criterion_name",scroll:{x:!0},summary:()=>{if(!m.some(e=>null!=e.weight))return null;let e=m.reduce((e,t)=>e+(null!=t.weight?t.score*t.weight/100:0),0);return(0,t.jsxs)(l.Table.Summary.Row,{children:[(0,t.jsx)(l.Table.Summary.Cell,{index:0,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12},children:"Total"})}),(0,t.jsx)(l.Table.Summary.Cell,{index:1}),(0,t.jsx)(l.Table.Summary.Cell,{index:2}),(0,t.jsx)(l.Table.Summary.Cell,{index:3,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12,color:c},children:e%1==0?e:e.toFixed(1)})}),(0,t.jsx)(l.Table.Summary.Cell,{index:4})]})}}):(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Score: ",e.overall_score?.toFixed(1)," — no per-criterion breakdown available."]})]})}e.s(["default",()=>m])},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o,rawInputTokens:d,cacheReadTokens:c,cacheCreationTokens:x})=>{let m=o?.toLowerCase()==="true",u=void 0!==i||void 0!==n,p=e?.input_cost!==void 0||e?.output_cost!==void 0,h=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(p||u||h||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 g=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),f=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),y=m?0:e?.input_cost,j=m?0:e?.output_cost,b=m?0:e?.original_cost,v=m?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.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:[l(a),m&&" (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=m?0:(y??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:[l(s),null!=d&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",d.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:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_read_cost),(c??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(c??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:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_creation_cost),(x??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(x??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:[l(y),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.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:[l(j),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.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:l(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:l(s)})]},e))]}),!m&&(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:l(b)})]})}),(g||f)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[g&&(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 (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(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:["-",l(e.discount_amount)]})]})]}),f&&(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 (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((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:["+",l(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:[l(v),m&&" (Cached)"]})]})})]})}]})})}])},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({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 flex-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",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 border border-blue-200 text-xs font-mono overflow-auto",children:`general_settings: +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.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",()=>a],283086);let l=(0,s.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",()=>l],195116)},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 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"}]])},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,x=e.i(755151),m=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(x.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,m.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,m.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,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:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"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,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[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 ${a?"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 ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(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:l(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},i=(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}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,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 ${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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),x=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=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)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{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)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(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 a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{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 gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(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:[n(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:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{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)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`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)(d,{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)(o,{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 p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},m=(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}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(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:()=>n(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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({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 a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=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)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&m(`${i} blocked`,"red"),n>0&&m(`${n} masked`,"blue"),0===i&&0===n&&m("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&m(`${a.length} patterns`,"slate"),l.length>0&&m(`${l.length} keywords`,"slate"),r.length>0&&m(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",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.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{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)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",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.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:m(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:m(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(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"})]}),y=()=>(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"})]}),j=()=>(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"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(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:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(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:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded 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:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(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))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,x]=(0,s.useState)(!1),[m,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),x(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>x(!1))},[e,a]),(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)(b,{title:"EU AI Act",data:l,loading:o,error:m}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(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},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,T=()=>(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"})]}),C=({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"})]}),L=({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"})]}),E=()=>(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"})]}),M=()=>(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"})}),A=({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"})}),D=()=>(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"})}),R=({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 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,O=({response:e})=>{let[a,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(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(A,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},I=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);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:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(M,{}):"llm"===e.type?(0,t.jsx)(E,{}):e.isSuccess?(0,t.jsx)(C,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),m=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(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))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} 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:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(C,{}):(0,t.jsx)(L,{})}),(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:m}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),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 text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(A,{expanded:n})]})]}),n&&(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)(R,{matchDetails:e.match_details}),c>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 text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(x,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(O,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm 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)(T,{}),(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:[r.length," guardrail",1!==r.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 ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(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,i," 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(r,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)(D,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,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)(I,{entries:r})}),(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:r.map((e,s)=>(0,t.jsx)(z,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},869939,e=>{"use strict";var t=e.i(843476),s=e.i(175712),a=e.i(262218),l=e.i(291542),r=e.i(898586),i=e.i(770914),n=e.i(592968),o=e.i(245704),d=e.i(518617),c=e.i(19732);let{Text:x}=r.Typography;function m({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)(c.ExperimentOutlined,{style:{fontSize:16,color:"#6366f1"}}),(0,t.jsx)(x,{strong:!0,style:{fontSize:15},children:"LLM Judge Results"})]}),s.map((e,s)=>(0,t.jsx)(u,{entry:e},e.eval_id||s))]}):null}function u({entry:e}){let r=e.passed,c=r?"#52c41a":"#ff4d4f",m=(e.verdicts||[]).filter(e=>"overall"!==(e.criterion_name||"").toLowerCase()),u=[{title:"Criterion",dataIndex:"criterion_name",key:"criterion_name",width:160,render:e=>(0,t.jsx)(x,{strong:!0,style:{whiteSpace:"nowrap"},children:e})},{title:"Weight",dataIndex:"weight",key:"weight",width:65,render:e=>null!=e?(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:[e,"%"]}):null},{title:"Score",dataIndex:"score",key:"score",width:65,render:e=>(0,t.jsx)(x,{style:{color:e>=70?"#52c41a":e>=50?"#faad14":"#ff4d4f",fontWeight:600},children:e})},{title:(0,t.jsx)(n.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 a=s.score*s.weight/100;return(0,t.jsx)(x,{type:"secondary",style:{fontSize:12},children:a%1==0?a:a.toFixed(1)})}},{title:"Comment",dataIndex:"reasoning",key:"reasoning",ellipsis:{showTitle:!1},render:e=>(0,t.jsx)(n.Tooltip,{title:e,children:(0,t.jsx)("span",{style:{fontSize:12},children:e})})}];return(0,t.jsxs)(s.Card,{size:"small",className:"mb-3",style:{borderLeft:`3px solid ${c}`},title:(0,t.jsxs)(i.Space,{children:[r?(0,t.jsx)(o.CheckCircleOutlined,{style:{color:"#52c41a"}}):(0,t.jsx)(d.CloseCircleOutlined,{style:{color:"#ff4d4f"}}),(0,t.jsx)(x,{strong:!0,children:e.eval_name}),(0,t.jsx)(a.Tag,{color:r?"success":"error",children:r?"PASSED":"FAILED"}),(0,t.jsx)(n.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)(x,{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)(i.Space,{size:"small",children:[e.judge_model&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Judge: ",e.judge_model]}),null!=e.iteration&&(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Iter: ",e.iteration+1]})]}),children:[e.eval_error&&(0,t.jsxs)(x,{type:"warning",style:{display:"block",marginBottom:8,fontSize:12},children:["Judge error: ",e.eval_error]}),m.length>0?(0,t.jsx)(l.Table,{dataSource:m,columns:u,pagination:!1,size:"small",rowKey:"criterion_name",scroll:{x:!0},summary:()=>{if(!m.some(e=>null!=e.weight))return null;let e=m.reduce((e,t)=>e+(null!=t.weight?t.score*t.weight/100:0),0);return(0,t.jsxs)(l.Table.Summary.Row,{children:[(0,t.jsx)(l.Table.Summary.Cell,{index:0,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12},children:"Total"})}),(0,t.jsx)(l.Table.Summary.Cell,{index:1}),(0,t.jsx)(l.Table.Summary.Cell,{index:2}),(0,t.jsx)(l.Table.Summary.Cell,{index:3,children:(0,t.jsx)(x,{strong:!0,style:{fontSize:12,color:c},children:e%1==0?e:e.toFixed(1)})}),(0,t.jsx)(l.Table.Summary.Cell,{index:4})]})}}):(0,t.jsxs)(x,{type:"secondary",style:{fontSize:12},children:["Score: ",e.overall_score?.toFixed(1)," — no per-criterion breakdown available."]})]})}e.s(["default",()=>m])},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o,rawInputTokens:d,cacheReadTokens:c,cacheCreationTokens:x})=>{let m=o?.toLowerCase()==="true",u=void 0!==i||void 0!==n,p=e?.input_cost!==void 0||e?.output_cost!==void 0,h=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(p||u||h||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 g=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),f=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),y=m?0:e?.input_cost,j=m?0:e?.output_cost,b=m?0:e?.original_cost,v=m?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.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:[l(a),m&&" (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=m?0:(y??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:[l(s),null!=d&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",d.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:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_read_cost),(c??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(c??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:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(m?0:e?.cache_creation_cost),(x??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(x??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:[l(y),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.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:[l(j),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.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:l(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:l(s)})]},e))]}),!m&&(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:l(b)})]})}),(g||f)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[g&&(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 (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(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:["-",l(e.discount_amount)]})]})]}),f&&(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 (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((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:["+",l(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:[l(v),m&&" (Cached)"]})]})})]})}]})})}])},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({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 flex-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",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 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])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),x=e.i(195116),m=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(869939),M=e.i(70635),A=e.i(70969),D=e.i(916925);function E({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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 i,n;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:a}=(0,D.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(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:r(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:r(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:(i=e.start_time,n=e.end_time,`${((n-i)*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,r)=>{let i=a[`${s}-${r}`]||!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}-${r}`,void l(t=>({...t,[e]:!t[e]}))},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)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+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)})]})]})]}),i&&(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",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>E],331052);var I=e.i(592968),z=e.i(207066);let{Text:O}=g.Typography;function R({value:e,maxWidth:s=z.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(I.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:z.FONT_FAMILY_MONO,fontSize:z.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:P}=g.Typography;function B({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(P,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let F=e=>!!e&&e instanceof Date,q=e=>"object"==typeof e&&null!==e,H=e=>!!e&&e instanceof Object&&"function"==typeof e;function $(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function Y(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:x,outerRef:m,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},$(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!m.current)return;let s=m.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=m.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:S,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)&&(x?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},$(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},$(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(U,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:x,beforeExpandChange:u,outerRef:m}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function K(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function W(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function V(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=F(l)?l.toISOString():H(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},$(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function U(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(W,Object.assign({},e)):!q(t)||F(t)||H(t)?(0,s.createElement)(V,Object.assign({},e)):(0,s.createElement)(K,Object.assign({},e))}let G={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},J=()=>!0,Q=e=>{let{data:t,style:a=G,shouldExpandNode:l=J,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&q(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(U,{key:t,field:t,value:n,style:{...G,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(U,{value:t,style:{...G,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>Q,"defaultStyles",()=>G],867612);let{Text:X}=g.Typography;function Z({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:z.JSON_MAX_HEIGHT,overflow:"auto",background:z.COLOR_BG_LIGHT,padding:z.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(Q,{data:e,style:G,clickToExpandNode:!0})})}):(0,t.jsx)(X,{type:"secondary",children:"No data"})}function ee(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function et(e){return Array.isArray(e)?e:e?[e]:[]}function es(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var ea=e.i(366308),el=e.i(755151),er=e.i(291542);let{Text:ei}=g.Typography;function en({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})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(ei,{code:!0,children:[e,s.required&&(0,t.jsx)(ei,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(ei,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(ei,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(ei,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(ei,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(er.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(ei,{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 eo({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:ed}=g.Typography;function ec({tool:e}){let[a,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)(ed,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(en,{tool:e}):(0,t.jsx)(eo,{tool:e})]})}let{Text:ex}=g.Typography;function em({tool:e}){let[a,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(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(ea.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ex,{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"}),a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ec,{tool:e})})]})}let{Text:eu}=g.Typography;function ep({log:e}){let s=function(e){let t,s=!(t=es(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 a=function(e){let t=es(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(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.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:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eu,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(eu,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let eh=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eg=e.i(888259),ef=e.i(264843),ey=e.i(624001);let{Text:ej}=g.Typography;function eb({type:e,tokens:s,cost:l,onCopy:r,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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(ef.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ej,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(I.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:ev}=g.Typography;function e_({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(ev,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(ev,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(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,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:eN}=g.Typography;function ew({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)(eN,{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)(eN,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(eN,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:eS}=g.Typography;function ek({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(eS,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(ew,{tool:e,compact:l},e.id||s))})]}):null}let{Text:eC}=g.Typography;function eT({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(eC,{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: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,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(ek,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eL({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=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)(eb,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eg.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(e_,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eT,{messages:c}),d&&(0,t.jsx)(ek,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eM}=g.Typography;function eA({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eg.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(ek,{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)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eM,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eD=e.i(782273),eE=e.i(313603),eI=e.i(793916);let{Text:ez}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(eR,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eP,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.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 eR({session:e,turnCount:a}){let[l,r]=(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:()=>r(!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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eE.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(ez,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(ez,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eD.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)(eI.AudioOutlined,{}):(0,t.jsx)(ef.MessageOutlined,{})," ",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)(eH,{label:"Model",value:e.model}),(0,t.jsx)(eH,{label:"Voice",value:e.voice}),(0,t.jsx)(eH,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eH,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eH,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eH,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eH,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eH,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(ez,{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 eP({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:l?.completion_tokens??n,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:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eB,{response:e,index:s},e.id||s))})})]})}function eB({response:e,index:s}){let a=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)(ez,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(I.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(ez,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eF,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eq,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eq,{label:"Output",details:l.output_token_details})]})}function eF({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)(ez,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eI.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(ef.MessageOutlined,{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:a})]},s):null})]}):null}function eq({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(ez,{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:a.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 eH({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(ez,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function e$({request:e,response:s,metrics:a}){let l,r,i;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)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&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})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:eh(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eL,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eA,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:eY}=g.Typography;function eK({logEntry:e,isLoadingDetails:s=!1,accessToken:a}){var l,r;let i=e.metadata||{},n="failure"===i.status,o=n?i.error_information:null,d=!!(l=e.messages)&&(Array.isArray(l)?l.length>0:"object"==typeof l&&Object.keys(l).length>0),c=!!(r=e.response)&&Object.keys(ee(r)).length>0,x=!d&&!c&&!n&&!s,m=i?.guardrail_information,u=et(m),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`,j=i?.eval_information,b=i.vector_store_request_metadata&&Array.isArray(i.vector_store_request_metadata)&&i.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${z.DRAWER_CONTENT_PADDING} ${z.DRAWER_CONTENT_PADDING} 0`},children:[n&&o&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eW,{errorInfo:o}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eV,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(R,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(R,{value:e.api_base,maxWidth:z.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),p&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eU,{label:g,maskedCount:h})})]})})}),(0,t.jsx)(eG,{logEntry:e,metadata:i}),(0,t.jsx)(M.CostBreakdownViewer,{costBreakdown:i?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit,rawInputTokens:i?.additional_usage_values?.prompt_tokens_details?.text_tokens,cacheReadTokens:i?.additional_usage_values?.cache_read_input_tokens,cacheCreationTokens:i?.additional_usage_values?.cache_creation_input_tokens}),(0,t.jsx)(ep,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(A.ConfigInfoMessage,{show:x})}),s?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eJ,{hasResponse:c,hasError:n,getRawRequest:()=>ee(e.proxy_server_request||e.messages),getFormattedResponse:()=>n&&o?{error:{message:o.error_message||"An error occurred",type:o.error_class||"error",code:o.error_code||"unknown",param:null}}:ee(e.response),logEntry:e}),p&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:m,accessToken:a??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),null!=j&&(0,t.jsx)(L.default,{data:j}),b&&(0,t.jsx)(E,{data:i.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eX,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:z.DRAWER_CONTENT_PADDING}})]})}function eW({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eV({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(eY,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:z.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eU({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:z.SPACING_MEDIUM,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"]})]})}function eG({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default",o=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),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Input Tokens",children:(0,C.formatNumberWithCommas)(o)}),(0,t.jsx)(f.Descriptions.Item,{label:"Output Tokens",children:(0,C.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(B,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.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)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.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)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eJ({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(z.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),x=i.spend??0,m=i.prompt_tokens||0,u=i.completion_tokens||0,p=m+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?x*m/p:0,y=g?h.output_cost??0:p>0?x*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(e$,{request:l(),response:r(),metrics:{prompt_tokens:m,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(eY,{copyable:{text:JSON.stringify(n===z.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===z.TAB_RESPONSE&&!e&&!a}),items:[{key:z.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:(0,t.jsx)(Z,{data:l(),mode:"formatted"})})},{key:z.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:e||a?(0,t.jsx)(Z,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eQ({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 eX({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eY,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:z.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:z.FONT_SIZE_SMALL,fontFamily:z.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eZ=e.i(764205),e0=e.i(266027),e1=e.i(135214);function e2({row:e,isSelected:s,onClick:a}){let l=m.MCP_CALL_TYPES.includes(e.call_type),r=m.AGENT_CALL_TYPES.includes(e.call_type),i=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:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(x.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(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:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.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]})]})}function e5({open:e,onClose:d,logEntry:c,sessionId:x,accessToken:u,allLogs:g=[],onSelectLog:f,startTime:y}){let j=!!x,[b,v]=(0,s.useState)(null),[_,N]=(0,s.useState)(!1),[w,S]=(0,s.useState)(!1),{data:k=[]}=(0,e0.useQuery)({queryKey:["sessionLogs",x],queryFn:async()=>{if(!x||!u)return[];let e=await (0,eZ.sessionSpendLogsCall)(u,x);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!m.MCP_CALL_TYPES.includes(e.call_type),a=+!!m.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&j&&x&&u)}),T=(0,s.useMemo)(()=>j?k.length?b?k.find(e=>e.request_id===b)||k[0]:c?.request_id&&k.find(e=>e.request_id===c.request_id)||k[0]:null:c,[j,c,b,k]);(0,s.useEffect)(()=>{j&&k.length&&(b&&k.some(e=>e.request_id===b)||v(c?.request_id&&k.some(e=>e.request_id===c.request_id)?c.request_id:k[0].request_id))},[j,c,b,k]),(0,s.useEffect)(()=>{e?N(!1):(j&&v(null),S(!1))},[e,j]);let{selectNextLog:L,selectPreviousLog:M}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:T,allLogs:j?k:g,onClose:d,onSelectLog:e=>{j&&v(e.request_id),f?.(e)}}),A=((e,t,s)=>{let{accessToken:a}=(0,e1.default)();return(0,e0.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eZ.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(T?.request_id,y,e&&!!T?.request_id),D=A.data,E=A.isLoading,I=(0,s.useMemo)(()=>T?{...T,messages:D?.messages||T.messages,response:D?.response||T.response,proxy_server_request:D?.proxy_server_request||T.proxy_server_request}:null,[T,D]),O=T?.metadata||{},R="failure"===O.status?"Failure":"Success",P="failure"===O.status?"error":"success",B=O?.user_api_key_team_alias||"default",F=k.reduce((e,t)=>e+(t.spend||0),0),q=k.length>0?new Date(Math.min(...k.map(e=>new Date(e.startTime).getTime()))):null,H=k.length>0?new Date(Math.max(...k.map(e=>new Date(e.endTime).getTime()))):null,$=q&&H?((H.getTime()-q.getTime())/1e3).toFixed(2):"0.00",Y=k.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,K=k.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,W=k.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length,V=j?k:T?[T]:[],U=j?x||"":T?.request_id||"",G=U.length>14?`${U.slice(0,11)}...`:U,J=async()=>{if(U)try{await navigator.clipboard.writeText(U),S(!0),setTimeout(()=>S(!1),1200)}catch{}};return T&&I?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:z.DRAWER_WIDTH,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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>N(!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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>N(!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:j?"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:G}),(0,t.jsx)("button",{type:"button",onClick:J,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:w?(0,t.jsx)(r.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:[V.length," req",[j?Y:V.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?K:V.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?W:V.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),j?(0,C.getSpendString)(F):(0,C.getSpendString)(T.spend||0),j&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),$,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[et(O?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eQ,{guardrailEntries:et(O?.guardrail_information)})}),j?(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"}),V.map((e,s)=>{let a=s===V.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"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e2,{row:e,isSelected:e.request_id===T.request_id,onClick:()=>{v(e.request_id),f?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:V.map(e=>(0,t.jsx)(e2,{row:e,isSelected:e.request_id===T.request_id,onClick:()=>f?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:T,onClose:d,onPrevious:M,onNext:L,statusLabel:R,statusColor:P,environment:B}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eK,{logEntry:I,isLoadingDetails:E,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e5],502626),e.s([],3565)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},93648,245767,313793,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(560445),l=e.i(207082),r=e.i(135214),i=e.i(500330),n=e.i(871943),o=e.i(360820),d=e.i(94629),c=e.i(152990),x=e.i(682830),m=e.i(269200),u=e.i(942232),p=e.i(977572),h=e.i(427612),g=e.i(64848),f=e.i(496020),y=e.i(592968);function j({keys:e,totalCount:a,isLoading:l,isFetching:r,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,i.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,c.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),getPaginationRowModel:(0,x.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[l||r?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[l||r?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:l||r||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:l||r||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:l||r?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function b(){let{premiumUser:e}=(0,r.default)(),[i,n]=(0,s.useState)(0),[o]=(0,s.useState)(50),{data:d,isPending:c,isFetching:x}=(0,l.useDeletedKeys)(i+1,o);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(j,{keys:d?.keys||[],totalCount:d?.total_count||0,isLoading:c,isFetching:x,pageIndex:i,pageSize:o,onPageChange:n})]})}e.s(["default",()=>b],93648);var v=e.i(785242),_=e.i(389083),N=e.i(599724),w=e.i(355619);function S({teams:e,isLoading:a,isFetching:l}){let[r,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),b=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,i.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(_.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,w.getModelDisplayName)(e).slice(0,30)}...`:(0,w.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(_.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(N.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],v=(0,c.useReactTable)({data:e,columns:b,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:r},onSortingChange:j,getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||l?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:v.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:v.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${v.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:a||l?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?v.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function k(){let{premiumUser:e}=(0,r.default)(),{data:s,isPending:l,isFetching:i}=(0,v.useDeletedTeams)(1,100);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(S,{teams:s||[],isLoading:l,isFetching:i})]})}e.s(["default",()=>k],245767);var C=e.i(663435);e.s(["default",0,({value:e,onChange:s})=>(0,t.jsx)(C.default,{value:e,onChange:s})],313793);var T=e.i(625901),L=e.i(56456),M=e.i(152473),A=e.i(199133),D=e.i(770914);let{Text:E}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[x,m]=(0,M.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,T.useInfiniteModelInfo)(i,x||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(A.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),m(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(L.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(D.Space,{direction:"vertical",children:[(0,t.jsxs)(D.Space,{direction:"horizontal",children:[(0,t.jsx)(E,{strong:!0,children:"Model name:"}),(0,t.jsx)(E,{ellipsis:!0,children:s})]}),(0,t.jsxs)(E,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(E,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(L.LoadingOutlined,{spin:!0})})]})})}],291950)},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),x=e.i(482725),m=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.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(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function D({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,D]=(0,s.useState)(""),[E,I]=(0,s.useState)(""),[z,O]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,E,z,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:E||void 0,action:z||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../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"}})]});let K=$.data?.audit_logs??[],W=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{D(e),_(1)},onChange:e=>{e.target.value||(D(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{O(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{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"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(m.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:W,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(x.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>D],942161)},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.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"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.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"})}),x=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),m=({count:e})=>(0,t.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,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.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,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.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,t.jsx)(x,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(m,{});let f=(0,t.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,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(x,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:e?()=>(0,t.jsx)(h,{label:"TTFT (s)",field:"ttft_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:e?()=>(0,t.jsx)(h,{label:"Model",field:"model",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",x="Model",m="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[x]:"",[m]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[D,E]=(0,t.useState)(null),I=(0,t.useRef)(0),z=(0,t.useRef)(M),O=(0,t.useRef)(!1),R=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[m]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[x]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&E({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),E({data:[],total:0,page:1,page_size:v,total_pages:0})}},[y,j,b,_,v,k,C]),P=(0,t.useMemo)(()=>(0,i.default)((e,t)=>R(e,t),300),[R]);(0,t.useEffect)(()=>()=>P.cancel(),[P]);let B=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[m]||M[u]||M[g]||M[f]||M[x]),[M]);(0,t.useEffect)(()=>{z.current=M,O.current=B},[M,B]),(0,t.useEffect)(()=>{O.current&&y&&(P.cancel(),R(z.current,T))},[k,C,T,j,b,_]);let F=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:v,total_pages:0};if(B)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[x]&&(t=t.filter(e=>e.model_id===M[x])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,B]),q=(0,t.useMemo)(()=>B?null!==D?D:{data:[],total:0,page:1,page_size:v,total_pages:0}:F,[B,D,F]),{data:H}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y}),$=(0,t.useCallback)((e=T)=>{B&&y&&(P.cancel(),R(M,e))},[B,y,M,T,R,P]);return{filters:M,filteredLogs:q,hasBackendFilters:B,allTeams:H,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),E(null),P(s,1)),s})},handleFilterReset:()=>{A(L),E(null),P.cancel(),N(1)},refetchWithFilters:$}}e.s(["useLogFilterLogic",()=>y],504809)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(772345),o=e.i(793130),d=e.i(197647),c=e.i(653824),x=e.i(881073),m=e.i(404206),u=e.i(723731),p=e.i(464571),h=e.i(708347),g=e.i(93648),f=e.i(245767),y=e.i(313793),j=e.i(50882),b=e.i(291950),v=e.i(969550),_=e.i(764205),N=e.i(20147),w=e.i(942161),S=e.i(245099);e.i(70969);var k=e.i(97859);e.i(70635),e.i(339086);var C=e.i(504809);e.i(3565);var T=e.i(502626);e.i(727749),e.i(867612);var L=e.i(149121);function M({accessToken:e,token:M,userRole:A,userID:D,premiumUser:E}){let[I,z]=(0,i.useState)(""),[O,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),$=(0,i.useRef)(null),Y=(0,i.useRef)(null),K=(0,i.useRef)(null),[W,V]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[U,G]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)(!1),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(""),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,ex]=(0,i.useState)(null),[em,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(""),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(A&&h.internalUserRoles.includes(A)),[eb,ev]=(0,i.useState)("request logs"),[e_,eN]=(0,i.useState)(null),[ew,eS]=(0,i.useState)(!1),[ek,eC]=(0,i.useState)(null),[eT,eL]=(0,i.useState)("startTime"),[eM,eA]=(0,i.useState)("desc"),[eD,eE]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eI,ez]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eI))},[eI]);let[eO,eR]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{em&&e&&ex({...(await (0,_.keyInfoV1Call)(e,em)).info,token:em,api_key:em})})()},[em,e]),(0,i.useEffect)(()=>{function e(e){$.current&&!$.current.contains(e.target)&&B(!1),Y.current&&!Y.current.contains(e.target)&&R(!1),K.current&&!K.current.contains(e.target)&&Z(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{A&&h.internalUserRoles.includes(A)&&ej(!0)},[A]);let eP=(0,a.useQuery)({queryKey:["logs","table",F,H,W,U,el,ei,ey?D:null,ep,eo,eT,eM],queryFn:async()=>{if(!e||!M||!A||!D)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(W).utc().format("YYYY-MM-DD HH:mm:ss"),s=J?(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,_.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:ei||void 0,team_id:el||void 0,user_id:ey?D??void 0:void 0,end_user:eg||void 0,status_filter:ep||void 0,model_id:eo||void 0,sort_by:eT,sort_order:eM}})},enabled:!!e&&!!M&&!!A&&!!D&&"request logs"===eb&&eD,refetchInterval:!!eI&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),eB=(0,i.useDeferredValue)(eP.isFetching),eF=eP.isFetching||eB,eq=eP.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eH,filteredLogs:e$,hasBackendFilters:eY,allTeams:eK,handleFilterChange:eW,handleFilterReset:eV,refetchWithFilters:eU}=(0,C.useLogFilterLogic)({logs:eq,accessToken:e,startTime:W,endTime:U,pageSize:H,isCustomDate:J,setCurrentPage:q,userID:D,userRole:A,sortBy:eT,sortOrder:eM,currentPage:F}),eG=(0,i.useCallback)(()=>{eV(),V((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),Q(!1),eR({value:24,unit:"hours"}),q(1)},[eV]);if((0,i.useEffect)(()=>{eE(!eY)},[eY]),(0,i.useEffect)(()=>{e&&(eH["Team ID"]?er(eH["Team ID"]):er(""),eh(eH.Status||""),ed(eH.Model||""),ef(eH["End User"]||""),en(eH["Key Hash"]||""))},[eH,e]),!e||!M||!A||!D)return null;let eJ=e$.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),eQ=eJ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),k.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:k.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),eX=new Map;for(let e of eJ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=k.MCP_CALL_TYPES.includes(e.call_type),s=eX.get(e.session_id);s&&(!s.isMcp||t)||eX.set(e.session_id,{requestId:e.request_id,isMcp:t})}let eZ=eJ.map(e=>{let t=e.session_id?eQ[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eu(e),onSessionClick:t=>{t&&(eC(t),eN(e),eS(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||eX.get(e.session_id)?.requestId===e.request_id)||[],e0=[{name:"Team ID",label:"Team ID",customComponent:y.default},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:b.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:j.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,_.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return k.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=k.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!k.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e1=k.QUICK_SELECT_OPTIONS.find(e=>e.value===eO.value&&e.unit===eO.unit),e2=J?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"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=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(J,W,U):e1?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(c.TabGroup,{defaultIndex:0,onIndexChange:e=>ev(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(d.Tab,{children:"Request Logs"}),(0,t.jsx)(d.Tab,{children:"Audit Logs"}),(0,t.jsx)(d.Tab,{children:"Deleted Keys"}),(0,t.jsx)(d.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(u.TabPanels,{children:[(0,t.jsxs)(m.TabPanel,{children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"})}),ec&&em&&ec.api_key===em?(0,t.jsx)(N.default,{keyId:em,keyData:ec,teams:eK??[],onClose:()=>eu(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{options:e0,onApplyFilters:eW,onResetFilters:eG}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>z(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:K,children:[(0,t.jsxs)("button",{onClick:()=>Z(!X),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",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:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e2]}),X&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[k.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e2===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),V((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eR({value:e.value,unit:e.unit}),Q(!1),Z(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${J?"bg-blue-50 text-blue-600":""}`,onClick:()=>Q(!J),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(o.Switch,{color:"green",checked:eI,defaultChecked:!0,onChange:ez})]}),{}),(0,t.jsx)(p.Button,{type:"default",icon:(0,t.jsx)(n.SyncOutlined,{spin:eF}),onClick:()=>{eY?eU():eP.refetch()},disabled:eF,title:"Fetch data",children:eF?"Fetching":"Fetch"})]}),J&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:W,onChange:e=>{V(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eP.isLoading?"...":e$?(F-1)*H+1:0," -"," ",eP.isLoading?"...":e$?Math.min(F*H,e$.total):0," ","of ",eP.isLoading?"...":e$?e$.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eP.isLoading?"...":F," of"," ",eP.isLoading?"...":e$?e$.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eP.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(e$.total_pages||1,e+1)),disabled:eP.isLoading||F===(e$.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eI&&1===F&&eD&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>ez(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(L.DataTable,{columns:(0,S.createColumns)({sortBy:eT,sortOrder:eM,onSortChange:(e,t)=>{eL(e),eA(t),q(1)}}),data:eZ,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eC(e.session_id),eN(e),eS(!0);return}eC(null),eN(e),eS(!0)},isLoading:eP.isLoading})]})]})]}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(w.default,{userID:D,userRole:A,token:M,accessToken:e,isActive:"audit logs"===eb,premiumUser:E})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(g.default,{})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(f.default,{})})]})]}),(0,t.jsx)(T.LogDetailsDrawer,{open:ew,onClose:()=>{eS(!1),eC(null)},logEntry:e_,sessionId:ek,accessToken:e,allLogs:eZ,onSelectLog:e=>{eN(e)},startTime:(0,r.default)(W).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>M],936190)}]); \ No newline at end of file + 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])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),x=e.i(195116),m=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),T=e.i(500330),C=e.i(517442),L=e.i(869939),E=e.i(70635),M=e.i(70969),A=e.i(916925);function D({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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 i,n;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:a}=(0,A.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(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:r(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:r(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:(i=e.start_time,n=e.end_time,`${((n-i)*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,r)=>{let i=a[`${s}-${r}`]||!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}-${r}`,void l(t=>({...t,[e]:!t[e]}))},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)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+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)})]})]})]}),i&&(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",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>D],331052);var R=e.i(592968),O=e.i(207066);let{Text:I}=g.Typography;function z({value:e,maxWidth:s=O.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(R.Tooltip,{title:e,children:(0,t.jsx)(I,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:O.FONT_FAMILY_MONO,fontSize:O.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(I,{type:"secondary",children:"-"})}let{Text:P}=g.Typography;function B({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(P,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let F=e=>!!e&&e instanceof Date,H=e=>"object"==typeof e&&null!==e,q=e=>!!e&&e instanceof Object&&"function"==typeof e;function Y(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function K(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:x,outerRef:m,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},Y(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!m.current)return;let s=m.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=m.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:S,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)&&(x?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},Y(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},Y(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(V,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:x,beforeExpandChange:u,outerRef:m}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function $(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return K({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function U(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return K({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function W(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=F(l)?l.toISOString():q(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},Y(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function V(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(U,Object.assign({},e)):!H(t)||F(t)||q(t)?(0,s.createElement)(W,Object.assign({},e)):(0,s.createElement)($,Object.assign({},e))}let G={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},J=()=>!0,Q=e=>{let{data:t,style:a=G,shouldExpandNode:l=J,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&H(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(V,{key:t,field:t,value:n,style:{...G,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(V,{value:t,style:{...G,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>Q,"defaultStyles",()=>G],867612);let{Text:X}=g.Typography;function Z({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:O.JSON_MAX_HEIGHT,overflow:"auto",background:O.COLOR_BG_LIGHT,padding:O.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(Q,{data:e,style:G,clickToExpandNode:!0})})}):(0,t.jsx)(X,{type:"secondary",children:"No data"})}function ee(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function et(e){return Array.isArray(e)?e:e?[e]:[]}function es(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var ea=e.i(366308),el=e.i(755151),er=e.i(291542);let{Text:ei}=g.Typography;function en({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})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(ei,{code:!0,children:[e,s.required&&(0,t.jsx)(ei,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(ei,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(ei,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(ei,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(ei,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(er.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(ei,{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 eo({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:ed}=g.Typography;function ec({tool:e}){let[a,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)(ed,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(en,{tool:e}):(0,t.jsx)(eo,{tool:e})]})}let{Text:ex}=g.Typography;function em({tool:e}){let[a,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(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(ea.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ex,{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"}),a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ec,{tool:e})})]})}let{Text:eu}=g.Typography;function ep({log:e}){let s=function(e){let t,s=!(t=es(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 a=function(e){let t=es(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(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.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:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eu,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(eu,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let eh=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eg=e.i(888259),ef=e.i(264843),ey=e.i(624001);let{Text:ej}=g.Typography;function eb({type:e,tokens:s,cost:l,onCopy:r,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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(ef.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ej,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(R.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:ev}=g.Typography;function e_({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(ev,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(ev,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(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,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:eN}=g.Typography;function ew({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)(eN,{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)(eN,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(eN,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:eS}=g.Typography;function ek({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(eS,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(ew,{tool:e,compact:l},e.id||s))})]}):null}let{Text:eT}=g.Typography;function eC({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(eT,{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: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,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(ek,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eL({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=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)(eb,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eg.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(e_,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eC,{messages:c}),d&&(0,t.jsx)(ek,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eE}=g.Typography;function eM({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eg.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(ek,{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)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eE,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eA=e.i(782273),eD=e.i(313603),eR=e.i(793916);let{Text:eO}=g.Typography;function eI({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(ez,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eP,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.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 ez({session:e,turnCount:a}){let[l,r]=(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:()=>r(!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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eD.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(eO,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(eO,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eA.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)(eR.AudioOutlined,{}):(0,t.jsx)(ef.MessageOutlined,{})," ",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)(eq,{label:"Model",value:e.model}),(0,t.jsx)(eq,{label:"Voice",value:e.voice}),(0,t.jsx)(eq,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eq,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eq,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eq,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eq,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eq,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(eO,{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 eP({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:l?.completion_tokens??n,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:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eB,{response:e,index:s},e.id||s))})})]})}function eB({response:e,index:s}){let a=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)(eO,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(R.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(eO,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eF,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eH,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eH,{label:"Output",details:l.output_token_details})]})}function eF({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)(eO,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eR.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(ef.MessageOutlined,{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:a})]},s):null})]}):null}function eH({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(eO,{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:a.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 eq({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(eO,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function eY({request:e,response:s,metrics:a}){let l,r,i;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)(eI,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&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})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:eh(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eL,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eM,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:eK}=g.Typography;function e$({logEntry:e,isLoadingDetails:s=!1,accessToken:a}){var l,r;let i=e.metadata||{},n="failure"===i.status,o=n?i.error_information:null,d=!!(l=e.messages)&&(Array.isArray(l)?l.length>0:"object"==typeof l&&Object.keys(l).length>0),c=!!(r=e.response)&&Object.keys(ee(r)).length>0,x=!d&&!c&&!n&&!s,m=i?.guardrail_information,u=et(m),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`,j=i?.eval_information,b=i.vector_store_request_metadata&&Array.isArray(i.vector_store_request_metadata)&&i.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${O.DRAWER_CONTENT_PADDING} ${O.DRAWER_CONTENT_PADDING} 0`},children:[n&&o&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eU,{errorInfo:o}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eW,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(z,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(z,{value:e.api_base,maxWidth:O.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),p&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eV,{label:g,maskedCount:h})})]})})}),(0,t.jsx)(eG,{logEntry:e,metadata:i}),(0,t.jsx)(E.CostBreakdownViewer,{costBreakdown:i?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit,rawInputTokens:i?.additional_usage_values?.prompt_tokens_details?.text_tokens,cacheReadTokens:i?.additional_usage_values?.cache_read_input_tokens,cacheCreationTokens:i?.additional_usage_values?.cache_creation_input_tokens}),(0,t.jsx)(ep,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(M.ConfigInfoMessage,{show:x})}),s?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eJ,{hasResponse:c,hasError:n,getRawRequest:()=>ee(e.proxy_server_request||e.messages),getFormattedResponse:()=>n&&o?{error:{message:o.error_message||"An error occurred",type:o.error_class||"error",code:o.error_code||"unknown",param:null}}:ee(e.response),logEntry:e}),p&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(C.default,{data:m,accessToken:a??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),null!=j&&(0,t.jsx)(L.default,{data:j}),b&&(0,t.jsx)(D,{data:i.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eX,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:O.DRAWER_CONTENT_PADDING}})]})}function eU({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eK,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eK,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eW({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(eK,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:O.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eV({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:O.SPACING_MEDIUM,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"]})]})}function eG({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default",o=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),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Input Tokens",children:(0,T.formatNumberWithCommas)(o)}),(0,t.jsx)(f.Descriptions.Item,{label:"Output Tokens",children:(0,T.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(B,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,T.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.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)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,T.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,T.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.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)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eJ({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(O.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),x=i.spend??0,m=i.prompt_tokens||0,u=i.completion_tokens||0,p=m+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?x*m/p:0,y=g?h.output_cost??0:p>0?x*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(eY,{request:l(),response:r(),metrics:{prompt_tokens:m,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(eK,{copyable:{text:JSON.stringify(n===O.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===O.TAB_RESPONSE&&!e&&!a}),items:[{key:O.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:O.SPACING_XLARGE,paddingBottom:O.SPACING_XLARGE},children:(0,t.jsx)(Z,{data:l(),mode:"formatted"})})},{key:O.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:O.SPACING_XLARGE,paddingBottom:O.SPACING_XLARGE},children:e||a?(0,t.jsx)(Z,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eQ({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 eX({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eK,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:O.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:O.FONT_SIZE_SMALL,fontFamily:O.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eZ=e.i(764205),e0=e.i(266027),e1=e.i(135214);function e2({row:e,isSelected:s,onClick:a}){let l=m.MCP_CALL_TYPES.includes(e.call_type),r=m.AGENT_CALL_TYPES.includes(e.call_type),i=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:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(x.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(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:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,T.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]})]})}function e5({open:e,onClose:d,logEntry:c,sessionId:x,accessToken:u,allLogs:g=[],onSelectLog:f,startTime:y}){let j=!!x,[b,v]=(0,s.useState)(null),[_,N]=(0,s.useState)(!1),[w,S]=(0,s.useState)(!1),{data:k=[]}=(0,e0.useQuery)({queryKey:["sessionLogs",x],queryFn:async()=>{if(!x||!u)return[];let e=await (0,eZ.sessionSpendLogsCall)(u,x);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!m.MCP_CALL_TYPES.includes(e.call_type),a=+!!m.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&j&&x&&u)}),C=(0,s.useMemo)(()=>j?k.length?b?k.find(e=>e.request_id===b)||k[0]:c?.request_id&&k.find(e=>e.request_id===c.request_id)||k[0]:null:c,[j,c,b,k]);(0,s.useEffect)(()=>{j&&k.length&&(b&&k.some(e=>e.request_id===b)||v(c?.request_id&&k.some(e=>e.request_id===c.request_id)?c.request_id:k[0].request_id))},[j,c,b,k]),(0,s.useEffect)(()=>{e?N(!1):(j&&v(null),S(!1))},[e,j]);let{selectNextLog:L,selectPreviousLog:E}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:C,allLogs:j?k:g,onClose:d,onSelectLog:e=>{j&&v(e.request_id),f?.(e)}}),M=((e,t,s)=>{let{accessToken:a}=(0,e1.default)();return(0,e0.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eZ.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(C?.request_id,y,e&&!!C?.request_id),A=M.data,D=M.isLoading,R=(0,s.useMemo)(()=>C?{...C,messages:A?.messages||C.messages,response:A?.response||C.response,proxy_server_request:A?.proxy_server_request||C.proxy_server_request}:null,[C,A]),I=C?.metadata||{},z="failure"===I.status?"Failure":"Success",P="failure"===I.status?"error":"success",B=I?.user_api_key_team_alias||"default",F=k.reduce((e,t)=>e+(t.spend||0),0),H=k.length>0?new Date(Math.min(...k.map(e=>new Date(e.startTime).getTime()))):null,q=k.length>0?new Date(Math.max(...k.map(e=>new Date(e.endTime).getTime()))):null,Y=H&&q?((q.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=k.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,$=k.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,U=k.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length,W=j?k:C?[C]:[],V=j?x||"":C?.request_id||"",G=V.length>14?`${V.slice(0,11)}...`:V,J=async()=>{if(V)try{await navigator.clipboard.writeText(V),S(!0),setTimeout(()=>S(!1),1200)}catch{}};return C&&R?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:O.DRAWER_WIDTH,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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>N(!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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>N(!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:j?"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:G}),(0,t.jsx)("button",{type:"button",onClick:J,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:w?(0,t.jsx)(r.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:[W.length," req",[j?K:W.filter(e=>!m.MCP_CALL_TYPES.includes(e.call_type)&&!m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?$:W.filter(e=>m.AGENT_CALL_TYPES.includes(e.call_type)).length,j?U:W.filter(e=>m.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),j?(0,T.getSpendString)(F):(0,T.getSpendString)(C.spend||0),j&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),Y,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[et(I?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eQ,{guardrailEntries:et(I?.guardrail_information)})}),j?(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"}),W.map((e,s)=>{let a=s===W.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"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e2,{row:e,isSelected:e.request_id===C.request_id,onClick:()=>{v(e.request_id),f?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:W.map(e=>(0,t.jsx)(e2,{row:e,isSelected:e.request_id===C.request_id,onClick:()=>f?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:C,onClose:d,onPrevious:E,onNext:L,statusLabel:z,statusColor:P,environment:B}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(e$,{logEntry:R,isLoadingDetails:D,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e5],502626),e.s([],3565)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},93648,245767,313793,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(560445),l=e.i(207082),r=e.i(135214),i=e.i(500330),n=e.i(871943),o=e.i(360820),d=e.i(94629),c=e.i(152990),x=e.i(682830),m=e.i(269200),u=e.i(942232),p=e.i(977572),h=e.i(427612),g=e.i(64848),f=e.i(496020),y=e.i(592968);function j({keys:e,totalCount:a,isLoading:l,isFetching:r,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,i.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],T=(0,c.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),getPaginationRowModel:(0,x.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:C}=T.getState().pagination,L=C*b+1,E=Math.min((C+1)*b,a),M=`${L} - ${E}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[l||r?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",M," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[l||r?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",C+1," of ",T.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>T.previousPage(),disabled:l||r||!T.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>T.nextPage(),disabled:l||r||!T.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:T.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:T.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${T.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:l||r?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?T.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function b(){let{premiumUser:e}=(0,r.default)(),[i,n]=(0,s.useState)(0),[o]=(0,s.useState)(50),{data:d,isPending:c,isFetching:x}=(0,l.useDeletedKeys)(i+1,o);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(j,{keys:d?.keys||[],totalCount:d?.total_count||0,isLoading:c,isFetching:x,pageIndex:i,pageSize:o,onPageChange:n})]})}e.s(["default",()=>b],93648);var v=e.i(785242),_=e.i(389083),N=e.i(599724),w=e.i(355619);function S({teams:e,isLoading:a,isFetching:l}){let[r,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),b=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,i.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(_.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,w.getModelDisplayName)(e).slice(0,30)}...`:(0,w.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(_.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(N.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],v=(0,c.useReactTable)({data:e,columns:b,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:r},onSortingChange:j,getCoreRowModel:(0,x.getCoreRowModel)(),getSortedRowModel:(0,x.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||l?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(m.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:v.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:v.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${v.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:a||l?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?v.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function k(){let{premiumUser:e}=(0,r.default)(),{data:s,isPending:l,isFetching:i}=(0,v.useDeletedTeams)(1,100);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(S,{teams:s||[],isLoading:l,isFetching:i})]})}e.s(["default",()=>k],245767);var T=e.i(663435);e.s(["default",0,({value:e,onChange:s})=>(0,t.jsx)(T.default,{value:e,onChange:s})],313793);var C=e.i(625901),L=e.i(56456),E=e.i(152473),M=e.i(199133),A=e.i(770914);let{Text:D}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[x,m]=(0,E.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,C.useInfiniteModelInfo)(i,x||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(M.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),m(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(L.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(A.Space,{direction:"vertical",children:[(0,t.jsxs)(A.Space,{direction:"horizontal",children:[(0,t.jsx)(D,{strong:!0,children:"Model name:"}),(0,t.jsx)(D,{ellipsis:!0,children:s})]}),(0,t.jsxs)(D,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(D,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(L.LoadingOutlined,{spin:!0})})]})})}],291950)},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),x=e.i(482725),m=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.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(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function T({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function C({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(T,{log:a})]})]})}let{Search:L}=n.Input,E={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},M={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function A({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[T,A]=(0,s.useState)(""),[D,R]=(0,s.useState)(""),[O,I]=(0,s.useState)(void 0),[z,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[H,q]=(0,s.useState)(!1),Y=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,T,D,O,z],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:T||void 0,object_team_id:D||void 0,action:O||void 0,table_name:z||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),K=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:M[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>E[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../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"}})]});let $=Y.data?.audit_logs??[],U=Y.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{R(e),_(1)},onChange:e=>{e.target.value||(R(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{A(e),_(1)},onChange:e=>{e.target.value||(A(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{I(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{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"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(m.ReloadOutlined,{spin:Y.isFetching}),onClick:()=>Y.refetch(),disabled:Y.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:U,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:K,dataSource:$,rowKey:"id",loading:{spinning:Y.isLoading,indicator:(0,t.jsx)(x.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),q(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(C,{open:H,onClose:()=>q(!1),log:B})]})}e.s(["default",()=>A],942161)},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.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"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.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"})}),x=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),m=({count:e})=>(0,t.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,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.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,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.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,t.jsx)(x,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(m,{});let f=(0,t.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,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(x,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:e?()=>(0,t.jsx)(h,{label:"TTFT (s)",field:"ttft_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:e?()=>(0,t.jsx)(h,{label:"Model",field:"model",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o={TEAM_ID:"Team ID",KEY_HASH:"Key Hash",REQUEST_ID:"Request ID",MODEL:"Model",PUBLIC_MODEL_OR_SEARCH_TOOL:"Public model / search tool",USER_ID:"User ID",END_USER:"End User",STATUS:"Status",KEY_ALIAS:"Key Alias",ERROR_CODE:"Error Code",ERROR_MESSAGE:"Error Message"};function d({logs:e,accessToken:d,startTime:c,endTime:x,pageSize:m=n.defaultPageSize,isCustomDate:u,setCurrentPage:p,userID:h,userRole:g,sortBy:f="startTime",sortOrder:y="desc",currentPage:j=1}){let b=(0,t.useMemo)(()=>({[o.TEAM_ID]:"",[o.KEY_HASH]:"",[o.REQUEST_ID]:"",[o.MODEL]:"",[o.PUBLIC_MODEL_OR_SEARCH_TOOL]:"",[o.USER_ID]:"",[o.END_USER]:"",[o.STATUS]:"",[o.KEY_ALIAS]:"",[o.ERROR_CODE]:"",[o.ERROR_MESSAGE]:""}),[]),[v,_]=(0,t.useState)(b),[N,w]=(0,t.useState)(null),S=(0,t.useRef)(0),k=(0,t.useRef)(v),T=(0,t.useRef)(!1),C=(0,t.useCallback)(async(e,t=1)=>{if(!d)return;console.log("Filters being sent to API:",e);let l=Date.now();S.current=l;let r=(0,s.default)(c).utc().format("YYYY-MM-DD HH:mm:ss"),i=u?(0,s.default)(x).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:d,start_date:r,end_date:i,page:t,page_size:m,params:{api_key:e[o.KEY_HASH]||void 0,team_id:e[o.TEAM_ID]||void 0,request_id:e[o.REQUEST_ID]||void 0,user_id:e[o.USER_ID]||void 0,end_user:e[o.END_USER]||void 0,status_filter:e[o.STATUS]||void 0,model_id:e[o.MODEL]||void 0,model:e[o.PUBLIC_MODEL_OR_SEARCH_TOOL]||void 0,key_alias:e[o.KEY_ALIAS]||void 0,error_code:e[o.ERROR_CODE]||void 0,error_message:e[o.ERROR_MESSAGE]||void 0,sort_by:f,sort_order:y}});l===S.current&&w({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),w({data:[],total:0,page:1,page_size:m,total_pages:0})}},[d,c,x,u,m,f,y]),L=(0,t.useMemo)(()=>(0,i.default)((e,t)=>C(e,t),300),[C]);(0,t.useEffect)(()=>()=>L.cancel(),[L]);let E=(0,t.useMemo)(()=>!!(v[o.KEY_ALIAS]||v[o.KEY_HASH]||v[o.REQUEST_ID]||v[o.USER_ID]||v[o.END_USER]||v[o.ERROR_CODE]||v[o.ERROR_MESSAGE]||v[o.MODEL]||v[o.PUBLIC_MODEL_OR_SEARCH_TOOL]),[v]);(0,t.useEffect)(()=>{k.current=v,T.current=E},[v,E]),(0,t.useEffect)(()=>{T.current&&d&&(L.cancel(),C(k.current,j))},[f,y,j,c,x,u]);let M=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:m,total_pages:0};if(E)return e;let t=[...e.data];if(v[o.TEAM_ID]&&(t=t.filter(e=>e.team_id===v[o.TEAM_ID])),v[o.STATUS]&&(t=t.filter(e=>"success"===v[o.STATUS]?!e.status||"success"===e.status:e.status===v[o.STATUS])),v[o.MODEL]&&(t=t.filter(e=>e.model_id===v[o.MODEL])),v[o.PUBLIC_MODEL_OR_SEARCH_TOOL]){let e=v[o.PUBLIC_MODEL_OR_SEARCH_TOOL];t=t.filter(t=>t.model===e)}return v[o.KEY_HASH]&&(t=t.filter(e=>e.api_key===v[o.KEY_HASH])),v[o.END_USER]&&(t=t.filter(e=>e.end_user===v[o.END_USER])),v[o.ERROR_CODE]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===v[o.ERROR_CODE]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,v,E]),A=(0,t.useMemo)(()=>E?null!==N?N:{data:[],total:0,page:1,page_size:m,total_pages:0}:M,[E,N,M]),{data:D}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",d],queryFn:async()=>d&&await (0,r.fetchAllTeams)(d)||[],enabled:!!d}),R=(0,t.useCallback)((e=j)=>{E&&d&&(L.cancel(),C(v,e))},[E,d,v,j,C,L]);return{filters:v,filteredLogs:A,hasBackendFilters:E,allTeams:D,handleFilterChange:e=>{_(t=>{let s={...t,...e};for(let e of Object.keys(b))e in s||(s[e]=b[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(p(1),w(null),L(s,1)),s})},handleFilterReset:()=>{_(b),w(null),L.cancel(),p(1)},refetchWithFilters:R}}e.s(["FILTER_KEYS",0,o,"useLogFilterLogic",()=>d],504809)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(772345),o=e.i(793130),d=e.i(197647),c=e.i(653824),x=e.i(881073),m=e.i(404206),u=e.i(723731),p=e.i(464571),h=e.i(708347),g=e.i(93648),f=e.i(245767),y=e.i(313793),j=e.i(50882),b=e.i(291950),v=e.i(969550),_=e.i(764205),N=e.i(20147),w=e.i(942161),S=e.i(245099);e.i(70969);var k=e.i(97859);e.i(70635),e.i(339086);var T=e.i(504809);e.i(3565);var C=e.i(502626);e.i(727749),e.i(867612);var L=e.i(149121);function E({accessToken:e,token:E,userRole:M,userID:A,premiumUser:D}){let[R,O]=(0,i.useState)(""),[I,z]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,H]=(0,i.useState)(1),[q]=(0,i.useState)(50),Y=(0,i.useRef)(null),K=(0,i.useRef)(null),$=(0,i.useRef)(null),[U,W]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[V,G]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)(!1),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(""),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,ex]=(0,i.useState)(null),[em,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(""),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(M&&h.internalUserRoles.includes(M)),[eb,ev]=(0,i.useState)("request logs"),[e_,eN]=(0,i.useState)(null),[ew,eS]=(0,i.useState)(!1),[ek,eT]=(0,i.useState)(null),[eC,eL]=(0,i.useState)("startTime"),[eE,eM]=(0,i.useState)("desc"),[eA,eD]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eR,eO]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eR))},[eR]);let[eI,ez]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{em&&e&&ex({...(await (0,_.keyInfoV1Call)(e,em)).info,token:em,api_key:em})})()},[em,e]),(0,i.useEffect)(()=>{function e(e){Y.current&&!Y.current.contains(e.target)&&B(!1),K.current&&!K.current.contains(e.target)&&z(!1),$.current&&!$.current.contains(e.target)&&Z(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{M&&h.internalUserRoles.includes(M)&&ej(!0)},[M]);let eP=(0,a.useQuery)({queryKey:["logs","table",F,q,U,V,el,ei,ey?A:null,ep,eo,eC,eE],queryFn:async()=>{if(!e||!E||!M||!A)return{data:[],total:0,page:1,page_size:q,total_pages:0};let t=(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"),s=J?(0,r.default)(V).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,_.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:q,params:{api_key:ei||void 0,team_id:el||void 0,user_id:ey?A??void 0:void 0,end_user:eg||void 0,status_filter:ep||void 0,model_id:eo||void 0,sort_by:eC,sort_order:eE}})},enabled:!!e&&!!E&&!!M&&!!A&&"request logs"===eb&&eA,refetchInterval:!!eR&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),eB=(0,i.useDeferredValue)(eP.isFetching),eF=eP.isFetching||eB,eH=eP.data||{data:[],total:0,page:1,page_size:q||10,total_pages:1},{filters:eq,filteredLogs:eY,hasBackendFilters:eK,allTeams:e$,handleFilterChange:eU,handleFilterReset:eW,refetchWithFilters:eV}=(0,T.useLogFilterLogic)({logs:eH,accessToken:e,startTime:U,endTime:V,pageSize:q,isCustomDate:J,setCurrentPage:H,userID:A,userRole:M,sortBy:eC,sortOrder:eE,currentPage:F}),eG=(0,i.useCallback)(()=>{eW(),W((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),Q(!1),ez({value:24,unit:"hours"}),H(1)},[eW]);if((0,i.useEffect)(()=>{eD(!eK)},[eK]),(0,i.useEffect)(()=>{e&&(eq["Team ID"]?er(eq["Team ID"]):er(""),eh(eq.Status||""),ed(eq.Model||""),ef(eq["End User"]||""),en(eq["Key Hash"]||""))},[eq,e]),!e||!E||!M||!A)return null;let eJ=eY.data.filter(e=>!R||e.request_id.includes(R)||e.model.includes(R)||e.user&&e.user.includes(R)),eQ=eJ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),k.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:k.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),eX=new Map;for(let e of eJ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=k.MCP_CALL_TYPES.includes(e.call_type),s=eX.get(e.session_id);s&&(!s.isMcp||t)||eX.set(e.session_id,{requestId:e.request_id,isMcp:t})}let eZ=eJ.map(e=>{let t=e.session_id?eQ[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eu(e),onSessionClick:t=>{t&&(eT(t),eN(e),eS(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||eX.get(e.session_id)?.requestId===e.request_id)||[],e0=[{name:"Team ID",label:"Team ID",customComponent:y.default},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:b.PaginatedModelSelect},{name:T.FILTER_KEYS.PUBLIC_MODEL_OR_SEARCH_TOOL,label:"Public model / search tool",isSearchable:!1},{name:"Key Alias",label:"Key Alias",customComponent:j.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,_.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return k.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=k.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!k.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e1=k.QUICK_SELECT_OPTIONS.find(e=>e.value===eI.value&&e.unit===eI.unit),e2=J?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"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=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(J,U,V):e1?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(c.TabGroup,{defaultIndex:0,onIndexChange:e=>ev(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(d.Tab,{children:"Request Logs"}),(0,t.jsx)(d.Tab,{children:"Audit Logs"}),(0,t.jsx)(d.Tab,{children:"Deleted Keys"}),(0,t.jsx)(d.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(u.TabPanels,{children:[(0,t.jsxs)(m.TabPanel,{children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"})}),ec&&em&&ec.api_key===em?(0,t.jsx)(N.default,{keyId:em,keyData:ec,teams:e$??[],onClose:()=>eu(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{options:e0,onApplyFilters:eU,onResetFilters:eG}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:R,onChange:e=>O(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:$,children:[(0,t.jsxs)("button",{onClick:()=>Z(!X),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",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:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e2]}),X&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[k.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e2===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{H(1),G((0,r.default)().format("YYYY-MM-DDTHH:mm")),W((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),ez({value:e.value,unit:e.unit}),Q(!1),Z(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${J?"bg-blue-50 text-blue-600":""}`,onClick:()=>Q(!J),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(o.Switch,{color:"green",checked:eR,defaultChecked:!0,onChange:eO})]}),{}),(0,t.jsx)(p.Button,{type:"default",icon:(0,t.jsx)(n.SyncOutlined,{spin:eF}),onClick:()=>{eK?eV():eP.refetch()},disabled:eF,title:"Fetch data",children:eF?"Fetching":"Fetch"})]}),J&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{W(e.target.value),H(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:V,onChange:e=>{G(e.target.value),H(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eP.isLoading?"...":eY?(F-1)*q+1:0," -"," ",eP.isLoading?"...":eY?Math.min(F*q,eY.total):0," ","of ",eP.isLoading?"...":eY?eY.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eP.isLoading?"...":F," of"," ",eP.isLoading?"...":eY?eY.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>H(e=>Math.max(1,e-1)),disabled:eP.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>H(e=>Math.min(eY.total_pages||1,e+1)),disabled:eP.isLoading||F===(eY.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eR&&1===F&&eA&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>eO(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(L.DataTable,{columns:(0,S.createColumns)({sortBy:eC,sortOrder:eE,onSortChange:(e,t)=>{eL(e),eM(t),H(1)}}),data:eZ,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eT(e.session_id),eN(e),eS(!0);return}eT(null),eN(e),eS(!0)},isLoading:eP.isLoading})]})]})]}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(w.default,{userID:A,userRole:M,token:E,accessToken:e,isActive:"audit logs"===eb,premiumUser:D})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(g.default,{})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(f.default,{})})]})]}),(0,t.jsx)(C.LogDetailsDrawer,{open:ew,onClose:()=>{eS(!1),eT(null)},logEntry:e_,sessionId:ek,accessToken:e,allLogs:eZ,onSelectLog:e=>{eN(e)},startTime:(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>E],936190)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/eabd1c9341cacb49.js b/litellm/proxy/_experimental/out/_next/static/chunks/9fbdf10b9cf445d9.js similarity index 76% rename from litellm/proxy/_experimental/out/_next/static/chunks/eabd1c9341cacb49.js rename to litellm/proxy/_experimental/out/_next/static/chunks/9fbdf10b9cf445d9.js index 3669bf00c7..15b640d36d 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/eabd1c9341cacb49.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/9fbdf10b9cf445d9.js @@ -5,4 +5,4 @@ ${n}, ${o}, ${i} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),C=e=>{let{prefixCls:a,className:l,style:n,rows:o=0}=e,i=Array.from({length:o}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:n},i)},w=({prefixCls:e,className:a,width:l,style:n})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},n)});function k(e){return e&&"object"==typeof e?e:{}}let x=e=>{let{prefixCls:l,loading:o,className:i,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:b}=e,{getPrefixCls:h,direction:x,className:v,style:$}=(0,a.useComponentConfig)("skeleton"),y=h("skeleton",l),[T,N,j]=p(y);if(o||!("loading"in e)){let e,a,l=!!u,o=!!m,c=!!g;if(l){let r=Object.assign(Object.assign({prefixCls:`${y}-avatar`},o&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),k(u));e=t.createElement("div",{className:`${y}-header`},t.createElement(n,Object.assign({},r)))}if(o||c){let e,r;if(o){let r=Object.assign(Object.assign({prefixCls:`${y}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),k(m));e=t.createElement(w,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},(e={},l&&o||(e.width="61%"),!l&&o?e.rows=3:e.rows=2,e)),k(g));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${y}-content`},e,r)}let h=(0,r.default)(y,{[`${y}-with-avatar`]:l,[`${y}-active`]:f,[`${y}-rtl`]:"rtl"===x,[`${y}-round`]:b},v,i,s,N,j);return T(t.createElement("div",{className:h,style:Object.assign(Object.assign({},$),d)},e,a))}return null!=c?c:null};x.Button=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-button`,size:u},C))))},x.Avatar=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls","className"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},C))))},x.Input=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-input`,size:u},C))))},x.Image=e=>{let{prefixCls:l,className:n,rootClassName:o,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[u,m,g]=p(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},n,o,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,n),style:i},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`})))))},x.Node=e=>{let{prefixCls:l,className:n,rootClassName:o,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",l),[m,g,f]=p(u),b=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,n,o,f);return m(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${u}-image`,n),style:i},d)))},e.s(["default",0,x],185793)},618566,(e,t,r)=>{t.exports=e.r(976562)},321836,e=>{"use strict";let t="litellm_return_url",r="redirect_to";function a(){return window.location.href}function l(){let e=a();e&&function(e,t,r=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function i(){return new URLSearchParams(window.location.search).get(r)}function s(e,t){let l=t||a();if(!l||l.includes("/login"))return e;let n=e.includes("?")?"&":"?";return`${e}${n}${r}=${encodeURIComponent(l)}`}function d(){let e=i();if(e)return e;let t=n();return t||null}function c(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function u(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),r=window.location.hostname;if(t.hostname!==r)return!1;if(c())return!0;return t.origin===window.location.origin}catch{return!1}}function m(e){try{let t=new URL(e,window.location.origin),r=t.pathname;r.length>1&&r.endsWith("/")&&(r=r.slice(0,-1));let a=new URLSearchParams(t.search),l=new URLSearchParams;Array.from(a.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{l.append(e,t)});let n=l.toString(),o=t.hash||"";return`${t.origin}${r}${n?`?${n}`:""}${o}`}catch{return e}}function g(){let e=i();if(e){if(u(e))return o(),e;c()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=n();if(t){if(u(t))return o(),t;c()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>s,"clearStoredReturnUrl",()=>o,"consumeReturnUrl",()=>g,"getReturnUrl",()=>d,"isValidReturnUrl",()=>u,"normalizeUrlForCompare",()=>m,"storeReturnUrl",()=>l])},161281,e=>{"use strict";var t=e.i(947293);function r(e){try{let r=(0,t.jwtDecode)(e);if(r&&"number"==typeof r.exp)return 1e3*r.exp<=Date.now();return!1}catch{return!0}}function a(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function l(e){return!!e&&null!==a(e)&&!r(e)}e.s(["checkTokenValidity",()=>l,"decodeToken",()=>a,"isJwtExpired",()=>r])},95779,e=>{"use strict";var t=e.i(480731);let r={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},a=[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",()=>r,"themeColorRange",()=>a])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],r=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>r(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,r,"rolesWithWriteAccess",0,["Internal User","Admin","proxy_admin"]])},135214,e=>{"use strict";var t=e.i(764205),r=e.i(268004),a=e.i(161281),l=e.i(321836),n=e.i(618566),o=e.i(271645),i=e.i(708347),s=e.i(612256);e.s(["default",0,()=>{let e=(0,n.useRouter)(),{data:d,isLoading:c}=(0,s.useUIConfig)(),u="u">typeof document?(0,r.getCookie)("token"):null,m=(0,o.useMemo)(()=>(0,a.decodeToken)(u),[u]),g=(0,o.useMemo)(()=>(0,a.checkTokenValidity)(u),[u])&&!d?.admin_ui_disabled,f=(0,o.useCallback)(()=>{(0,l.storeReturnUrl)();let r=`${(0,t.getProxyBaseUrl)()}/ui/login`,a=(0,l.buildLoginUrlWithReturn)(r);e.replace(a)},[e]);return(0,o.useEffect)(()=>{!c&&(g||(u&&(0,r.clearTokenCookies)(),f()))},[c,g,u,f]),{isLoading:c,isAuthorized:g,token:g?u:null,accessToken:m?.key??null,userId:m?.user_id??null,userEmail:m?.user_email??null,userRole:(0,i.formatUserRole)(m?.user_role),premiumUser:m?.premium_user??null,disabledPersonalKeyCreation:m?.disabled_non_admin_personal_key_creation??null,showSSOBanner:m?.login_method==="username_password"}}])},563113,887719,e=>{"use strict";var t=e.i(271645),r=e.i(864517),a=e.i(244009),l=e.i(408850),n=e.i(87414);let o=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(r=>{void 0!==e[r]&&(t[r]=e[r])})}),t};function i(e){if(!e)return;let{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}}function s(e){let{closable:r,closeIcon:a}=e||{};return t.default.useMemo(()=>{if(!r&&(!1===r||!1===a||null===a))return!1;if(void 0===r&&void 0===a)return null;let e={closeIcon:"boolean"!=typeof a&&null!==a?a:void 0};return r&&"object"==typeof r&&(e=Object.assign(Object.assign({},e),r)),e},[r,a])}e.s(["default",0,o],887719);let d={};e.s(["pickClosable",()=>i,"useClosable",0,(e,i,c=d)=>{let u=s(e),m=s(i),[g]=(0,l.useLocale)("global",n.default.global),f="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),b=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(r.default,null)},c),[c]),h=t.default.useMemo(()=>!1!==u&&(u?o(b,m,u):!1!==m&&(m?o(b,m):!!b.closable&&b)),[u,m,b]);return t.default.useMemo(()=>{var e,r;if(!1===h)return[!1,null,f,{}];let{closeIconRender:l}=b,{closeIcon:n}=h,o=n,i=(0,a.default)(h,!0);return null!=o&&(l&&(o=l(n)),o=t.default.isValidElement(o)?t.default.cloneElement(o,Object.assign(Object.assign(Object.assign({},o.props),{"aria-label":null!=(r=null==(e=o.props)?void 0:e["aria-label"])?r:g.close}),i)):t.default.createElement("span",Object.assign({"aria-label":g.close},i),o)),[!0,o,f,i]},[f,g.close,h,b])}],563113)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),o))});n.displayName="Table",e.s(["Table",()=>n],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),o))});n.displayName="TableBody",e.s(["TableBody",()=>n],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),o))});n.displayName="TableCell",e.s(["TableCell",()=>n],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),o))});n.displayName="TableHead",e.s(["TableHead",()=>n],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:n,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",i)},s),o))});n.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>n],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("row"),i)},s),o))});n.displayName="TableRow",e.s(["TableRow",()=>n],496020)}]); \ No newline at end of file + `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),C=e=>{let{prefixCls:a,className:l,style:n,rows:o=0}=e,i=Array.from({length:o}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:n},i)},w=({prefixCls:e,className:a,width:l,style:n})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},n)});function k(e){return e&&"object"==typeof e?e:{}}let x=e=>{let{prefixCls:l,loading:o,className:i,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:b}=e,{getPrefixCls:h,direction:x,className:v,style:$}=(0,a.useComponentConfig)("skeleton"),y=h("skeleton",l),[T,N,j]=p(y);if(o||!("loading"in e)){let e,a,l=!!u,o=!!m,c=!!g;if(l){let r=Object.assign(Object.assign({prefixCls:`${y}-avatar`},o&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),k(u));e=t.createElement("div",{className:`${y}-header`},t.createElement(n,Object.assign({},r)))}if(o||c){let e,r;if(o){let r=Object.assign(Object.assign({prefixCls:`${y}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),k(m));e=t.createElement(w,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},(e={},l&&o||(e.width="61%"),!l&&o?e.rows=3:e.rows=2,e)),k(g));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${y}-content`},e,r)}let h=(0,r.default)(y,{[`${y}-with-avatar`]:l,[`${y}-active`]:f,[`${y}-rtl`]:"rtl"===x,[`${y}-round`]:b},v,i,s,N,j);return T(t.createElement("div",{className:h,style:Object.assign(Object.assign({},$),d)},e,a))}return null!=c?c:null};x.Button=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-button`,size:u},C))))},x.Avatar=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls","className"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},C))))},x.Input=e=>{let{prefixCls:o,className:i,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",o),[f,b,h]=p(g),C=(0,l.default)(e,["prefixCls"]),w=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},i,s,b,h);return f(t.createElement("div",{className:w},t.createElement(n,Object.assign({prefixCls:`${g}-input`,size:u},C))))},x.Image=e=>{let{prefixCls:l,className:n,rootClassName:o,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[u,m,g]=p(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},n,o,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,n),style:i},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`})))))},x.Node=e=>{let{prefixCls:l,className:n,rootClassName:o,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",l),[m,g,f]=p(u),b=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,n,o,f);return m(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${u}-image`,n),style:i},d)))},e.s(["default",0,x],185793)},618566,(e,t,r)=>{t.exports=e.r(976562)},321836,e=>{"use strict";let t="litellm_return_url",r="redirect_to";function a(){return window.location.href}function l(){let e=a();e&&function(e,t,r=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function i(){return new URLSearchParams(window.location.search).get(r)}function s(e,t){let l=t||a();if(!l||l.includes("/login"))return e;let n=e.includes("?")?"&":"?";return`${e}${n}${r}=${encodeURIComponent(l)}`}function d(){let e=i();if(e)return e;let t=n();return t||null}function c(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function u(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),r=window.location.hostname;if(t.hostname!==r)return!1;if(c())return!0;return t.origin===window.location.origin}catch{return!1}}function m(e){try{let t=new URL(e,window.location.origin),r=t.pathname;r.length>1&&r.endsWith("/")&&(r=r.slice(0,-1));let a=new URLSearchParams(t.search),l=new URLSearchParams;Array.from(a.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{l.append(e,t)});let n=l.toString(),o=t.hash||"";return`${t.origin}${r}${n?`?${n}`:""}${o}`}catch{return e}}function g(){let e=i();if(e){if(u(e))return o(),e;c()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=n();if(t){if(u(t))return o(),t;c()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>s,"clearStoredReturnUrl",()=>o,"consumeReturnUrl",()=>g,"getReturnUrl",()=>d,"isValidReturnUrl",()=>u,"normalizeUrlForCompare",()=>m,"storeReturnUrl",()=>l])},161281,e=>{"use strict";var t=e.i(947293);function r(e){try{let r=(0,t.jwtDecode)(e);if(r&&"number"==typeof r.exp)return 1e3*r.exp<=Date.now();return!1}catch{return!0}}function a(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function l(e){return!!e&&null!==a(e)&&!r(e)}e.s(["checkTokenValidity",()=>l,"decodeToken",()=>a,"isJwtExpired",()=>r])},95779,e=>{"use strict";var t=e.i(480731);let r={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},a=[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",()=>r,"themeColorRange",()=>a])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],r=["Internal User","Admin","proxy_admin"],a=[...r,"Admin Viewer","proxy_admin_viewer"],l=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>l(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,l,"rolesAllowedToViewWriteScopedPages",0,a,"rolesWithWriteAccess",0,r])},135214,e=>{"use strict";var t=e.i(764205),r=e.i(268004),a=e.i(161281),l=e.i(321836),n=e.i(618566),o=e.i(271645),i=e.i(708347),s=e.i(612256);e.s(["default",0,()=>{let e=(0,n.useRouter)(),{data:d,isLoading:c}=(0,s.useUIConfig)(),u="u">typeof document?(0,r.getCookie)("token"):null,m=(0,o.useMemo)(()=>(0,a.decodeToken)(u),[u]),g=(0,o.useMemo)(()=>(0,a.checkTokenValidity)(u),[u])&&!d?.admin_ui_disabled,f=(0,o.useCallback)(()=>{(0,l.storeReturnUrl)();let r=`${(0,t.getProxyBaseUrl)()}/ui/login`,a=(0,l.buildLoginUrlWithReturn)(r);e.replace(a)},[e]);return(0,o.useEffect)(()=>{!c&&(g||(u&&(0,r.clearTokenCookies)(),f()))},[c,g,u,f]),{isLoading:c,isAuthorized:g,token:g?u:null,accessToken:m?.key??null,userId:m?.user_id??null,userEmail:m?.user_email??null,userRole:(0,i.formatUserRole)(m?.user_role),premiumUser:m?.premium_user??null,disabledPersonalKeyCreation:m?.disabled_non_admin_personal_key_creation??null,showSSOBanner:m?.login_method==="username_password"}}])},563113,887719,e=>{"use strict";var t=e.i(271645),r=e.i(864517),a=e.i(244009),l=e.i(408850),n=e.i(87414);let o=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(r=>{void 0!==e[r]&&(t[r]=e[r])})}),t};function i(e){if(!e)return;let{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}}function s(e){let{closable:r,closeIcon:a}=e||{};return t.default.useMemo(()=>{if(!r&&(!1===r||!1===a||null===a))return!1;if(void 0===r&&void 0===a)return null;let e={closeIcon:"boolean"!=typeof a&&null!==a?a:void 0};return r&&"object"==typeof r&&(e=Object.assign(Object.assign({},e),r)),e},[r,a])}e.s(["default",0,o],887719);let d={};e.s(["pickClosable",()=>i,"useClosable",0,(e,i,c=d)=>{let u=s(e),m=s(i),[g]=(0,l.useLocale)("global",n.default.global),f="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),b=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(r.default,null)},c),[c]),h=t.default.useMemo(()=>!1!==u&&(u?o(b,m,u):!1!==m&&(m?o(b,m):!!b.closable&&b)),[u,m,b]);return t.default.useMemo(()=>{var e,r;if(!1===h)return[!1,null,f,{}];let{closeIconRender:l}=b,{closeIcon:n}=h,o=n,i=(0,a.default)(h,!0);return null!=o&&(l&&(o=l(n)),o=t.default.isValidElement(o)?t.default.cloneElement(o,Object.assign(Object.assign(Object.assign({},o.props),{"aria-label":null!=(r=null==(e=o.props)?void 0:e["aria-label"])?r:g.close}),i)):t.default.createElement("span",Object.assign({"aria-label":g.close},i),o)),[!0,o,f,i]},[f,g.close,h,b])}],563113)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),o))});n.displayName="Table",e.s(["Table",()=>n],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),o))});n.displayName="TableBody",e.s(["TableBody",()=>n],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),o))});n.displayName="TableCell",e.s(["TableCell",()=>n],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),o))});n.displayName="TableHead",e.s(["TableHead",()=>n],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:n,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",i)},s),o))});n.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>n],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),n=r.default.forwardRef((e,n)=>{let{children:o,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:n,className:(0,a.tremorTwMerge)(l("row"),i)},s),o))});n.displayName="TableRow",e.s(["TableRow",()=>n],496020)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a0b3f7d6c7b4d358.js b/litellm/proxy/_experimental/out/_next/static/chunks/a0b3f7d6c7b4d358.js deleted file mode 100644 index d113611817..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/a0b3f7d6c7b4d358.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},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),o=e.i(278587),l=e.i(68155),n=e.i(360820),i=e.i(871943),s=e.i(434626),d=e.i(551332),c=e.i(592968),m=e.i(115504),g=e.i(752978);function u({icon:e,onClick:r,className:a,disabled:o,dataTestId:l}){return o?(0,t.jsx)(g.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":l}):(0,t.jsx)(g.Icon,{icon:e,size:"sm",onClick:r,className:(0,m.cx)("cursor-pointer",a),"data-testid":l})}let b={Edit:{icon:r.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:l.TrashIcon,className:"hover:text-red-600"},Test:{icon:a.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:o.RefreshIcon,className:"hover:text-green-600"},Up:{icon:n.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:i.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:s.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function h({onClick:e,tooltipText:r,disabled:a=!1,disabledTooltipText:o,dataTestId:l,variant:n}){let{icon:i,className:s}=b[n];return(0,t.jsx)(c.Tooltip,{title:a?o:r,children:(0,t.jsx)("span",{children:(0,t.jsx)(u,{icon:i,onClick:e,className:s,disabled:a,dataTestId:l})})})}e.s(["default",()=>h],902555)},551332,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:"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"}))});e.s(["ClipboardCopyIcon",0,r],551332)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),l=e.i(444755),n=e.i(673706),i=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"}},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:""}},m=(0,n.makeClassName)("Icon"),g=r.default.forwardRef((e,g)=>{let{icon:u,variant:b="simple",tooltip:h,size:f=o.Sizes.SM,color:p,className:C}=e,k=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),x=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.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,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.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,n.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,n.getColorClassNames)(t,i.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.tremorTwMerge)((0,n.getColorClassNames)(t,i.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(b,p),{tooltipProps:w,getReferenceProps:v}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,n.mergeRefs)([g,w.refs.setReference]),className:(0,l.tremorTwMerge)(m("root"),"inline-flex shrink-0 items-center justify-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,c[b].rounded,c[b].border,c[b].shadow,c[b].ring,s[f].paddingX,s[f].paddingY,C)},v,k),r.default.createElement(a.default,Object.assign({text:h},w)),r.default.createElement(u,{className:(0,l.tremorTwMerge)(m("icon"),"shrink-0",d[f].height,d[f].width)}))});g.displayName="Icon",e.s(["default",()=>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)},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var o=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(o.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["default",0,l],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),o=e.i(529681);let l=e=>{let{prefixCls:a,className:o,style:l,size:n,shape:i}=e,s=(0,r.default)({[`${a}-lg`]:"large"===n,[`${a}-sm`]:"small"===n}),d=(0,r.default)({[`${a}-circle`]:"circle"===i,[`${a}-square`]:"square"===i,[`${a}-round`]:"round"===i}),c=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(a,s,d,o),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var n=e.i(694758),i=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),m=e=>({height:e,lineHeight:(0,i.unit)(e)}),g=e=>Object.assign({width:e},m(e)),u=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},m(e)),b=e=>Object.assign({width:e},m(e)),h=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},f=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},m(e)),p=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:o,skeletonButtonCls:l,skeletonInputCls:n,skeletonImageCls:i,controlHeight:s,controlHeightLG:d,controlHeightSM:m,gradientFromColor:p,padding:C,marginSM:k,borderRadius:x,titleHeight:w,blockRadius:v,paragraphLiHeight:N,controlHeightXS:$,paragraphMarginTop:j}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:C,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:p},g(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},g(d)),[`${r}-sm`]:Object.assign({},g(m))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:w,background:p,borderRadius:v,[`+ ${o}`]:{marginBlockStart:m}},[o]:{padding:0,"> li":{width:"100%",height:N,listStyle:"none",background:p,borderRadius:v,"+ li":{marginBlockStart:$}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${o} > li`]:{borderRadius:x}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:k,[`+ ${o}`]:{marginBlockStart:j}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=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:i(a).mul(2).equal(),minWidth:i(a).mul(2).equal()},f(a,i))},h(e,a,r)),{[`${r}-lg`]:Object.assign({},f(o,i))}),h(e,o,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},f(l,i))}),h(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:o,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},g(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},g(o)),[`${t}${t}-sm`]:Object.assign({},g(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:o,controlHeightSM:l,gradientFromColor:n,calc:i}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},u(t,i)),[`${a}-lg`]:Object.assign({},u(o,i)),[`${a}-sm`]:Object.assign({},u(l,i))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:o,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:o},b(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},b(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${a}, - ${o} > li, - ${r}, - ${l}, - ${n}, - ${i} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),C=e=>{let{prefixCls:a,className:o,style:l,rows:n=0}=e,i=Array.from({length:n}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,o),style:l},i)},k=({prefixCls:e,className:a,width:o,style:l})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:o},l)});function x(e){return e&&"object"==typeof e?e:{}}let w=e=>{let{prefixCls:o,loading:n,className:i,rootClassName:s,style:d,children:c,avatar:m=!1,title:g=!0,paragraph:u=!0,active:b,round:h}=e,{getPrefixCls:f,direction:w,className:v,style:N}=(0,a.useComponentConfig)("skeleton"),$=f("skeleton",o),[j,y,E]=p($);if(n||!("loading"in e)){let e,a,o=!!m,n=!!g,c=!!u;if(o){let r=Object.assign(Object.assign({prefixCls:`${$}-avatar`},n&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),x(m));e=t.createElement("div",{className:`${$}-header`},t.createElement(l,Object.assign({},r)))}if(n||c){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${$}-title`},!o&&c?{width:"38%"}:o&&c?{width:"50%"}:{}),x(g));e=t.createElement(k,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${$}-paragraph`},(e={},o&&n||(e.width="61%"),!o&&n?e.rows=3:e.rows=2,e)),x(u));r=t.createElement(C,Object.assign({},a))}a=t.createElement("div",{className:`${$}-content`},e,r)}let f=(0,r.default)($,{[`${$}-with-avatar`]:o,[`${$}-active`]:b,[`${$}-rtl`]:"rtl"===w,[`${$}-round`]:h},v,i,s,y,E);return j(t.createElement("div",{className:f,style:Object.assign(Object.assign({},N),d)},e,a))}return null!=c?c:null};w.Button=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c=!1,size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[b,h,f]=p(u),C=(0,o.default)(e,["prefixCls"]),k=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},i,s,h,f);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${u}-button`,size:m},C))))},w.Avatar=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,shape:c="circle",size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[b,h,f]=p(u),C=(0,o.default)(e,["prefixCls","className"]),k=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d},i,s,h,f);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${u}-avatar`,shape:c,size:m},C))))},w.Input=e=>{let{prefixCls:n,className:i,rootClassName:s,active:d,block:c,size:m="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),u=g("skeleton",n),[b,h,f]=p(u),C=(0,o.default)(e,["prefixCls"]),k=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:d,[`${u}-block`]:c},i,s,h,f);return b(t.createElement("div",{className:k},t.createElement(l,Object.assign({prefixCls:`${u}-input`,size:m},C))))},w.Image=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",o),[m,g,u]=p(c),b=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},l,n,g,u);return m(t.createElement("div",{className:b},t.createElement("div",{className:(0,r.default)(`${c}-image`,l),style:i},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`})))))},w.Node=e=>{let{prefixCls:o,className:l,rootClassName:n,style:i,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),m=c("skeleton",o),[g,u,b]=p(m),h=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:s},u,l,n,b);return g(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${m}-image`,l),style:i},d)))},e.s(["default",0,w],185793)},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"],l=e=>({_s:e,status:o[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),n=e=>e?6:5,i=(e,t,r,a,o)=>{clearTimeout(a.current);let n=l(e);t(n),r.current=n,o&&o({current:n})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let m=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 g=e.i(95779);let u={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,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,g.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,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},h=(0,c.makeClassName)("Button"),f=({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:l,transitionStatus:n})=>{let i=l?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),g={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(m,{className:(0,d.tremorTwMerge)(h("icon"),"animate-spin shrink-0",i,g.default,g[n]),style:{transition:"width 150ms"}}):a.default.createElement(o,{className:(0,d.tremorTwMerge)(h("icon"),"shrink-0",t,i)})},p=a.default.forwardRef((e,o)=>{let{icon:m,iconPosition:g=s.HorizontalPositions.Left,size:p=s.Sizes.SM,color:C,variant:k="primary",disabled:x,loading:w=!1,loadingText:v,children:N,tooltip:$,className:j}=e,y=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),E=w||x,T=void 0!==m||w,O=w&&v,M=!(!N&&!O),R=(0,d.tremorTwMerge)(u[p].height,u[p].width),z="light"!==k?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",P=b(k,C),B=("light"!==k?{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"}})[p],{tooltipProps:S,getReferenceProps:I}=(0,r.useTooltip)(300),[L,q]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:m,onStateChange:g}={})=>{let[u,b]=(0,a.useState)(()=>l(d?2:n(c))),h=(0,a.useRef)(u),f=(0,a.useRef)(0),[p,C]="object"==typeof s?[s.enter,s.exit]:[s,s],k=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return n(t)}})(h.current._s,m);e&&i(e,b,h,f,g)},[g,m]);return[u,(0,a.useCallback)(a=>{let l=e=>{switch(i(e,b,h,f,g),e){case 1:p>=0&&(f.current=((...e)=>setTimeout(...e))(k,p));break;case 4:C>=0&&(f.current=((...e)=>setTimeout(...e))(k,C));break;case 0:case 3:f.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||l(e+1)},0)}},s=h.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||l(e?+!r:2):s&&l(t?o?3:4:n(m))},[k,g,e,t,r,o,p,C,m]),k]})({timeout:50});return(0,a.useEffect)(()=>{q(w)},[w]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([o,S.refs.setReference]),className:(0,d.tremorTwMerge)(h("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",z,B.paddingX,B.paddingY,B.fontSize,P.textColor,P.bgColor,P.borderColor,P.hoverBorderColor,E?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(b(k,C).hoverTextColor,b(k,C).hoverBgColor,b(k,C).hoverBorderColor),j),disabled:E},I,y),a.default.createElement(r.default,Object.assign({text:$},S)),T&&g!==s.HorizontalPositions.Right?a.default.createElement(f,{loading:w,iconSize:R,iconPosition:g,Icon:m,transitionStatus:L.status,needMargin:M}):null,O||N?a.default.createElement("span",{className:(0,d.tremorTwMerge)(h("text"),"text-tremor-default whitespace-nowrap")},O?v:N):null,T&&g===s.HorizontalPositions.Right?a.default.createElement(f,{loading:w,iconSize:R,iconPosition:g,Icon:m,transitionStatus:L.status,needMargin:M}):null)});p.displayName="Button",e.s(["Button",()=>p],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("Table"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(o("root"),"overflow-auto",i)},r.default.createElement("table",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),n))});l.displayName="Table",e.s(["Table",()=>l],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHead"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),n))});l.displayName="TableHead",e.s(["TableHead",()=>l],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableHeaderCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},s),n))});l.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>l],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableBody"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),n))});l.displayName="TableBody",e.s(["TableBody",()=>l],942232)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableRow"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("row"),i)},s),n))});l.displayName="TableRow",e.s(["TableRow",()=>l],496020)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let o=(0,e.i(673706).makeClassName)("TableCell"),l=r.default.forwardRef((e,l)=>{let{children:n,className:i}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),n))});l.displayName="TableCell",e.s(["TableCell",()=>l],977572)},68155,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 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,r],68155)},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)},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)},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)},207670,e=>{"use strict";function t(){for(var e,t,r=0,a="",o=arguments.length;rt,"default",0,t])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a1abfc2f35c701cc.js b/litellm/proxy/_experimental/out/_next/static/chunks/a1abfc2f35c701cc.js deleted file mode 100644 index 286f418776..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/a1abfc2f35c701cc.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,790848,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(739295),a=e.i(343794),r=e.i(931067),i=e.i(211577),l=e.i(392221),o=e.i(703923),s=e.i(914949),c=e.i(404948),d=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,n){var u,m=e.prefixCls,g=void 0===m?"rc-switch":m,h=e.className,f=e.checked,p=e.defaultChecked,b=e.disabled,$=e.loadingIcon,k=e.checkedChildren,w=e.unCheckedChildren,C=e.onClick,v=e.onChange,y=e.onKeyDown,x=(0,o.default)(e,d),S=(0,s.default)(!1,{value:f,defaultValue:p}),E=(0,l.default)(S,2),O=E[0],j=E[1];function I(e,t){var n=O;return b||(j(n=e),null==v||v(n,t)),n}var N=(0,a.default)(g,h,(u={},(0,i.default)(u,"".concat(g,"-checked"),O),(0,i.default)(u,"".concat(g,"-disabled"),b),u));return t.createElement("button",(0,r.default)({},x,{type:"button",role:"switch","aria-checked":O,disabled:b,className:N,ref:n,onKeyDown:function(e){e.which===c.default.LEFT?I(!1,e):e.which===c.default.RIGHT&&I(!0,e),null==y||y(e)},onClick:function(e){var t=I(!O,e);null==C||C(t,e)}}),$,t.createElement("span",{className:"".concat(g,"-inner")},t.createElement("span",{className:"".concat(g,"-inner-checked")},k),t.createElement("span",{className:"".concat(g,"-inner-unchecked")},w)))});u.displayName="Switch";var m=e.i(121872),g=e.i(242064),h=e.i(937328),f=e.i(517455);e.i(296059);var p=e.i(915654);e.i(262370);var b=e.i(135551),$=e.i(183293),k=e.i(246422),w=e.i(838378);let C=(0,k.genStyleHooks)("Switch",e=>{let t=(0,w.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:n,trackMinWidth:a}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:a,height:n,lineHeight:(0,p.unit)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:n,trackPadding:a,innerMinMargin:r,innerMaxMargin:i,handleSize:l,calc:o}=e,s=`${t}-inner`,c=(0,p.unit)(o(l).add(o(a).mul(2)).equal()),d=(0,p.unit)(o(i).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:r,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${d})`,marginInlineEnd:`calc(100% - ${c} + ${d})`},[`${s}-unchecked`]:{marginTop:o(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:r,paddingInlineEnd:i,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${d})`,marginInlineEnd:`calc(-100% + ${c} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:o(a).mul(2).equal(),marginInlineEnd:o(a).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:o(a).mul(-1).mul(2).equal(),marginInlineEnd:o(a).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:n,handleBg:a,handleShadow:r,handleSize:i,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:n,insetInlineStart:n,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:a,borderRadius:l(i).div(2).equal(),boxShadow:r,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,p.unit)(l(i).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:n,calc:a}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:a(a(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:n,trackPadding:a,trackMinWidthSM:r,innerMinMarginSM:i,innerMaxMarginSM:l,handleSizeSM:o,calc:s}=e,c=`${t}-inner`,d=(0,p.unit)(s(o).add(s(a).mul(2)).equal()),u=(0,p.unit)(s(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:r,height:n,lineHeight:(0,p.unit)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:i,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${c}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:s(s(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:l,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,p.unit)(s(o).add(a).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:a,colorWhite:r}=e,i=t*n,l=a/2,o=i-4,s=l-4;return{trackHeight:i,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*s+4,trackPadding:2,handleBg:r,handleSize:o,handleSizeSM:s,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:s/2,innerMaxMarginSM:s+2+4}});var v=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[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])&&(n[a[r]]=e[a[r]]);return n};let y=t.forwardRef((e,r)=>{let{prefixCls:i,size:l,disabled:o,loading:c,className:d,rootClassName:p,style:b,checked:$,value:k,defaultChecked:w,defaultValue:y,onChange:x}=e,S=v(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[E,O]=(0,s.default)(!1,{value:null!=$?$:k,defaultValue:null!=w?w:y}),{getPrefixCls:j,direction:I,switch:N}=t.useContext(g.ConfigContext),R=t.useContext(h.default),T=(null!=o?o:R)||c,_=j("switch",i),B=t.createElement("div",{className:`${_}-handle`},c&&t.createElement(n.default,{className:`${_}-loading-icon`})),[M,q,A]=C(_),U=(0,f.default)(l),z=(0,a.default)(null==N?void 0:N.className,{[`${_}-small`]:"small"===U,[`${_}-loading`]:c,[`${_}-rtl`]:"rtl"===I},d,p,q,A),H=Object.assign(Object.assign({},null==N?void 0:N.style),b);return M(t.createElement(m.default,{component:"Switch",disabled:T},t.createElement(u,Object.assign({},S,{checked:E,onChange:(...e)=>{O(e[0]),null==x||x.apply(void 0,e)},prefixCls:_,className:z,style:H,disabled:T,ref:r,loadingIcon:B}))))});y.__ANT_SWITCH=!0,e.s(["Switch",0,y],790848)},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},959013,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var r=e.i(9583),i=n.forwardRef(function(e,i){return n.createElement(r.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["default",0,i],959013)},190144,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",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:a}))});e.s(["default",0,i],190144)},735049,e=>{"use strict";var t=e.i(654310),n=function(e){if((0,t.default)()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],a=window.document.documentElement;return n.some(function(e){return e in a.style})}return!1},a=function(e,t){if(!n(e))return!1;var a=document.createElement("div"),r=a.style[e];return a.style[e]=t,a.style[e]!==r};function r(e,t){return Array.isArray(e)||void 0===t?n(e):a(e,t)}e.s(["isStyleSupport",()=>r])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),a=e.i(242064),r=e.i(529681);let i=e=>{let{prefixCls:a,className:r,style:i,size:l,shape:o}=e,s=(0,n.default)({[`${a}-lg`]:"large"===l,[`${a}-sm`]:"small"===l}),c=(0,n.default)({[`${a}-circle`]:"circle"===o,[`${a}-square`]:"square"===o,[`${a}-round`]:"round"===o}),d=t.useMemo(()=>"number"==typeof l?{width:l,height:l,lineHeight:`${l}px`}:{},[l]);return t.createElement("span",{className:(0,n.default)(a,s,c,r),style:Object.assign(Object.assign({},d),i)})};e.i(296059);var l=e.i(694758),o=e.i(915654),s=e.i(246422),c=e.i(838378);let d=new l.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,o.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(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,n)=>{let{skeletonButtonCls:a}=e;return{[`${n}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${a}-round`]:{borderRadius:t}}},p=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),b=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:n}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:a,skeletonParagraphCls:r,skeletonButtonCls:i,skeletonInputCls:l,skeletonImageCls:o,controlHeight:s,controlHeightLG:c,controlHeightSM:u,gradientFromColor:b,padding:$,marginSM:k,borderRadius:w,titleHeight:C,blockRadius:v,paragraphLiHeight:y,controlHeightXS:x,paragraphMarginTop:S}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:$,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:b},m(s)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},m(c)),[`${n}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:C,background:b,borderRadius:v,[`+ ${r}`]:{marginBlockStart:u}},[r]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:b,borderRadius:v,"+ li":{marginBlockStart:x}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${r} > li`]:{borderRadius:w}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:k,[`+ ${r}`]:{marginBlockStart:S}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:a,controlHeightLG:r,controlHeightSM:i,gradientFromColor:l,calc:o}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:l,borderRadius:t,width:o(a).mul(2).equal(),minWidth:o(a).mul(2).equal()},p(a,o))},f(e,a,n)),{[`${n}-lg`]:Object.assign({},p(r,o))}),f(e,r,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},p(i,o))}),f(e,i,`${n}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:a,controlHeightLG:r,controlHeightSM:i}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(r)),[`${t}${t}-sm`]:Object.assign({},m(i))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:n,skeletonInputCls:a,controlHeightLG:r,controlHeightSM:i,gradientFromColor:l,calc:o}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:l,borderRadius:n},g(t,o)),[`${a}-lg`]:Object.assign({},g(r,o)),[`${a}-sm`]:Object.assign({},g(i,o))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:a,borderRadiusSM:r,calc:i}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:r},h(i(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},h(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%"},[l]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${a}, - ${r} > li, - ${n}, - ${i}, - ${l}, - ${o} - `]: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: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"]]}),$=e=>{let{prefixCls:a,className:r,style:i,rows:l=0}=e,o=Array.from({length:l}).map((n,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:n,rows:a=2}=t;return Array.isArray(n)?n[e]:a-1===e?n:void 0})(a,e)}}));return t.createElement("ul",{className:(0,n.default)(a,r),style:i},o)},k=({prefixCls:e,className:a,width:r,style:i})=>t.createElement("h3",{className:(0,n.default)(e,a),style:Object.assign({width:r},i)});function w(e){return e&&"object"==typeof e?e:{}}let C=e=>{let{prefixCls:r,loading:l,className:o,rootClassName:s,style:c,children:d,avatar:u=!1,title:m=!0,paragraph:g=!0,active:h,round:f}=e,{getPrefixCls:p,direction:C,className:v,style:y}=(0,a.useComponentConfig)("skeleton"),x=p("skeleton",r),[S,E,O]=b(x);if(l||!("loading"in e)){let e,a,r=!!u,l=!!m,d=!!g;if(r){let n=Object.assign(Object.assign({prefixCls:`${x}-avatar`},l&&!d?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),w(u));e=t.createElement("div",{className:`${x}-header`},t.createElement(i,Object.assign({},n)))}if(l||d){let e,n;if(l){let n=Object.assign(Object.assign({prefixCls:`${x}-title`},!r&&d?{width:"38%"}:r&&d?{width:"50%"}:{}),w(m));e=t.createElement(k,Object.assign({},n))}if(d){let e,a=Object.assign(Object.assign({prefixCls:`${x}-paragraph`},(e={},r&&l||(e.width="61%"),!r&&l?e.rows=3:e.rows=2,e)),w(g));n=t.createElement($,Object.assign({},a))}a=t.createElement("div",{className:`${x}-content`},e,n)}let p=(0,n.default)(x,{[`${x}-with-avatar`]:r,[`${x}-active`]:h,[`${x}-rtl`]:"rtl"===C,[`${x}-round`]:f},v,o,s,E,O);return S(t.createElement("div",{className:p,style:Object.assign(Object.assign({},y),c)},e,a))}return null!=d?d:null};C.Button=e=>{let{prefixCls:l,className:o,rootClassName:s,active:c,block:d=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",l),[h,f,p]=b(g),$=(0,r.default)(e,["prefixCls"]),k=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:c,[`${g}-block`]:d},o,s,f,p);return h(t.createElement("div",{className:k},t.createElement(i,Object.assign({prefixCls:`${g}-button`,size:u},$))))},C.Avatar=e=>{let{prefixCls:l,className:o,rootClassName:s,active:c,shape:d="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",l),[h,f,p]=b(g),$=(0,r.default)(e,["prefixCls","className"]),k=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:c},o,s,f,p);return h(t.createElement("div",{className:k},t.createElement(i,Object.assign({prefixCls:`${g}-avatar`,shape:d,size:u},$))))},C.Input=e=>{let{prefixCls:l,className:o,rootClassName:s,active:c,block:d,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",l),[h,f,p]=b(g),$=(0,r.default)(e,["prefixCls"]),k=(0,n.default)(g,`${g}-element`,{[`${g}-active`]:c,[`${g}-block`]:d},o,s,f,p);return h(t.createElement("div",{className:k},t.createElement(i,Object.assign({prefixCls:`${g}-input`,size:u},$))))},C.Image=e=>{let{prefixCls:r,className:i,rootClassName:l,style:o,active:s}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),d=c("skeleton",r),[u,m,g]=b(d),h=(0,n.default)(d,`${d}-element`,{[`${d}-active`]:s},i,l,m,g);return u(t.createElement("div",{className:h},t.createElement("div",{className:(0,n.default)(`${d}-image`,i),style:o},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`})))))},C.Node=e=>{let{prefixCls:r,className:i,rootClassName:l,style:o,active:s,children:c}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),u=d("skeleton",r),[m,g,h]=b(u),f=(0,n.default)(u,`${u}-element`,{[`${u}-active`]:s},g,i,l,h);return m(t.createElement("div",{className:f},t.createElement("div",{className:(0,n.default)(`${u}-image`,i),style:o},c)))},e.s(["default",0,C],185793)},618566,(e,t,n)=>{t.exports=e.r(976562)},161281,e=>{"use strict";var t=e.i(947293);function n(e){try{let n=(0,t.jwtDecode)(e);if(n&&"number"==typeof n.exp)return 1e3*n.exp<=Date.now();return!1}catch{return!0}}function a(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function r(e){return!!e&&null!==a(e)&&!n(e)}e.s(["checkTokenValidity",()=>r,"decodeToken",()=>a,"isJwtExpired",()=>n])},321836,e=>{"use strict";let t="litellm_return_url",n="redirect_to";function a(){return window.location.href}function r(){let e=a();e&&function(e,t,n=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function o(){return new URLSearchParams(window.location.search).get(n)}function s(e,t){let r=t||a();if(!r||r.includes("/login"))return e;let i=e.includes("?")?"&":"?";return`${e}${i}${n}=${encodeURIComponent(r)}`}function c(){let e=o();if(e)return e;let t=i();return t||null}function d(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function u(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),n=window.location.hostname;if(t.hostname!==n)return!1;if(d())return!0;return t.origin===window.location.origin}catch{return!1}}function m(e){try{let t=new URL(e,window.location.origin),n=t.pathname;n.length>1&&n.endsWith("/")&&(n=n.slice(0,-1));let a=new URLSearchParams(t.search),r=new URLSearchParams;Array.from(a.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{r.append(e,t)});let i=r.toString(),l=t.hash||"";return`${t.origin}${n}${i?`?${i}`:""}${l}`}catch{return e}}function g(){let e=o();if(e){if(u(e))return l(),e;d()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=i();if(t){if(u(t))return l(),t;d()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>s,"clearStoredReturnUrl",()=>l,"consumeReturnUrl",()=>g,"getReturnUrl",()=>c,"isValidReturnUrl",()=>u,"normalizeUrlForCompare",()=>m,"storeReturnUrl",()=>r])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],n=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>n(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,n,"rolesWithWriteAccess",0,["Internal User","Admin","proxy_admin"]])},135214,e=>{"use strict";var t=e.i(764205),n=e.i(268004),a=e.i(161281),r=e.i(321836),i=e.i(618566),l=e.i(271645),o=e.i(708347),s=e.i(612256);e.s(["default",0,()=>{let e=(0,i.useRouter)(),{data:c,isLoading:d}=(0,s.useUIConfig)(),u="u">typeof document?(0,n.getCookie)("token"):null,m=(0,l.useMemo)(()=>(0,a.decodeToken)(u),[u]),g=(0,l.useMemo)(()=>(0,a.checkTokenValidity)(u),[u])&&!c?.admin_ui_disabled,h=(0,l.useCallback)(()=>{(0,r.storeReturnUrl)();let n=`${(0,t.getProxyBaseUrl)()}/ui/login`,a=(0,r.buildLoginUrlWithReturn)(n);e.replace(a)},[e]);return(0,l.useEffect)(()=>{!d&&(g||(u&&(0,n.clearTokenCookies)(),h()))},[d,g,u,h]),{isLoading:d,isAuthorized:g,token:g?u:null,accessToken:m?.key??null,userId:m?.user_id??null,userEmail:m?.user_email??null,userRole:(0,o.formatUserRole)(m?.user_role),premiumUser:m?.premium_user??null,disabledPersonalKeyCreation:m?.disabled_non_admin_personal_key_creation??null,showSSOBanner:m?.login_method==="username_password"}}])},95779,e=>{"use strict";var t=e.i(480731);let n={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},a=[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",()=>n,"themeColorRange",()=>a])},563113,887719,e=>{"use strict";var t=e.i(271645),n=e.i(864517),a=e.i(244009),r=e.i(408850),i=e.i(87414);let l=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{void 0!==e[n]&&(t[n]=e[n])})}),t};function o(e){if(!e)return;let{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function s(e){let{closable:n,closeIcon:a}=e||{};return t.default.useMemo(()=>{if(!n&&(!1===n||!1===a||null===a))return!1;if(void 0===n&&void 0===a)return null;let e={closeIcon:"boolean"!=typeof a&&null!==a?a:void 0};return n&&"object"==typeof n&&(e=Object.assign(Object.assign({},e),n)),e},[n,a])}e.s(["default",0,l],887719);let c={};e.s(["pickClosable",()=>o,"useClosable",0,(e,o,d=c)=>{let u=s(e),m=s(o),[g]=(0,r.useLocale)("global",i.default.global),h="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),f=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(n.default,null)},d),[d]),p=t.default.useMemo(()=>!1!==u&&(u?l(f,m,u):!1!==m&&(m?l(f,m):!!f.closable&&f)),[u,m,f]);return t.default.useMemo(()=>{var e,n;if(!1===p)return[!1,null,h,{}];let{closeIconRender:r}=f,{closeIcon:i}=p,l=i,o=(0,a.default)(p,!0);return null!=l&&(r&&(l=r(i)),l=t.default.isValidElement(l)?t.default.cloneElement(l,Object.assign(Object.assign(Object.assign({},l.props),{"aria-label":null!=(n=null==(e=l.props)?void 0:e["aria-label"])?n:g.close}),o)):t.default.createElement("span",Object.assign({"aria-label":g.close},o),l)),[!0,l,h,o]},[h,g.close,p,f])}],563113)},269200,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("Table"),i=n.default.forwardRef((e,i)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement("div",{className:(0,a.tremorTwMerge)(r("root"),"overflow-auto",o)},n.default.createElement("table",Object.assign({ref:i,className:(0,a.tremorTwMerge)(r("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),l))});i.displayName="Table",e.s(["Table",()=>i],269200)},942232,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableBody"),i=n.default.forwardRef((e,i)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("tbody",Object.assign({ref:i,className:(0,a.tremorTwMerge)(r("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",o)},s),l))});i.displayName="TableBody",e.s(["TableBody",()=>i],942232)},977572,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableCell"),i=n.default.forwardRef((e,i)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("td",Object.assign({ref:i,className:(0,a.tremorTwMerge)(r("root"),"align-middle whitespace-nowrap text-left p-4",o)},s),l))});i.displayName="TableCell",e.s(["TableCell",()=>i],977572)},427612,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHead"),i=n.default.forwardRef((e,i)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("thead",Object.assign({ref:i,className:(0,a.tremorTwMerge)(r("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",o)},s),l))});i.displayName="TableHead",e.s(["TableHead",()=>i],427612)},64848,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHeaderCell"),i=n.default.forwardRef((e,i)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("th",Object.assign({ref:i,className:(0,a.tremorTwMerge)(r("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",o)},s),l))});i.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>i],64848)},496020,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableRow"),i=n.default.forwardRef((e,i)=>{let{children:l,className:o}=e,s=(0,t.__rest)(e,["children","className"]);return n.default.createElement(n.default.Fragment,null,n.default.createElement("tr",Object.assign({ref:i,className:(0,a.tremorTwMerge)(r("row"),o)},s),l))});i.displayName="TableRow",e.s(["TableRow",()=>i],496020)},389083,e=>{"use strict";var t=e.i(290571),n=e.i(271645),a=e.i(829087),r=e.i(480731),i=e.i(95779),l=e.i(444755),o=e.i(673706);let s={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"}},c={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"}},d=(0,o.makeClassName)("Badge"),u=n.default.forwardRef((e,u)=>{let{color:m,icon:g,size:h=r.Sizes.SM,tooltip:f,className:p,children:b}=e,$=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),k=g||null,{tooltipProps:w,getReferenceProps:C}=(0,a.useTooltip)();return n.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,w.refs.setReference]),className:(0,l.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,l.tremorTwMerge)((0,o.getColorClassNames)(m,i.colorPalette.background).bgColor,(0,o.getColorClassNames)(m,i.colorPalette.iconText).textColor,(0,o.getColorClassNames)(m,i.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,l.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"),s[h].paddingX,s[h].paddingY,s[h].fontSize,p)},C,$),n.default.createElement(a.default,Object.assign({text:f},w)),k?n.default.createElement(k,{className:(0,l.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[h].height,c[h].width)}):null,n.default.createElement("span",{className:(0,l.tremorTwMerge)(d("text"),"whitespace-nowrap")},b))});u.displayName="Badge",e.s(["Badge",()=>u],389083)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a1b5b0c54192471e.js b/litellm/proxy/_experimental/out/_next/static/chunks/a1b5b0c54192471e.js deleted file mode 100644 index c736cd01fc..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/a1b5b0c54192471e.js +++ /dev/null @@ -1,3 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.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",()=>a],283086);let l=(0,s.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",()=>l],195116)},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 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"}]])},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,m=e.i(755151),x=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(m.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,x.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,x.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,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:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"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,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[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 ${a?"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 ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(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:l(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},i=(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}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,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 ${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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),m=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=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)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{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)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(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 a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(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)(o,{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",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{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 gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(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:[n(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:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{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)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`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)(d,{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)(o,{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 p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},x=(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}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(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:()=>n(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 a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({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 a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=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)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&x(`${i} blocked`,"red"),n>0&&x(`${n} masked`,"blue"),0===i&&0===n&&x("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&x(`${a.length} patterns`,"slate"),l.length>0&&x(`${l.length} keywords`,"slate"),r.length>0&&x(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",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.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{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)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",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.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:x(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(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"})]}),y=()=>(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"})]}),j=()=>(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"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(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:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(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:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded 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:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(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))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(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||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),m(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>m(!1))},[e,a]),(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)(b,{title:"EU AI Act",data:l,loading:o,error:x}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(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},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,C=()=>(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"})]}),T=({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"})]}),L=({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"})]}),M=()=>(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"})]}),A=()=>(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"})}),E=({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"})}),D=()=>(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"})}),I=({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 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,z=({response:e})=>{let[a,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(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(E,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},O=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);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:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(A,{}):"llm"===e.type?(0,t.jsx)(M,{}):e.isSuccess?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),x=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(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))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} 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:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),(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:x}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),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 text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(E,{expanded:n})]})]}),n&&(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)(I,{matchDetails:e.match_details}),c>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 text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(m,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(z,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm 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)(C,{}),(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:[r.length," guardrail",1!==r.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 ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(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,i," 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(r,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)(D,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,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)(O,{entries:r})}),(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:r.map((e,s)=>(0,t.jsx)(R,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},869939,e=>{"use strict";var t=e.i(843476),s=e.i(175712),a=e.i(262218),l=e.i(291542),r=e.i(898586),i=e.i(770914),n=e.i(592968),o=e.i(245704),d=e.i(518617),c=e.i(19732);let{Text:m}=r.Typography;function x({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)(c.ExperimentOutlined,{style:{fontSize:16,color:"#6366f1"}}),(0,t.jsx)(m,{strong:!0,style:{fontSize:15},children:"LLM Judge Results"})]}),s.map((e,s)=>(0,t.jsx)(u,{entry:e},e.eval_id||s))]}):null}function u({entry:e}){let r=e.passed,c=r?"#52c41a":"#ff4d4f",x=(e.verdicts||[]).filter(e=>"overall"!==(e.criterion_name||"").toLowerCase()),u=[{title:"Criterion",dataIndex:"criterion_name",key:"criterion_name",width:160,render:e=>(0,t.jsx)(m,{strong:!0,style:{whiteSpace:"nowrap"},children:e})},{title:"Weight",dataIndex:"weight",key:"weight",width:65,render:e=>null!=e?(0,t.jsxs)(m,{type:"secondary",style:{fontSize:12},children:[e,"%"]}):null},{title:"Score",dataIndex:"score",key:"score",width:65,render:e=>(0,t.jsx)(m,{style:{color:e>=70?"#52c41a":e>=50?"#faad14":"#ff4d4f",fontWeight:600},children:e})},{title:(0,t.jsx)(n.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 a=s.score*s.weight/100;return(0,t.jsx)(m,{type:"secondary",style:{fontSize:12},children:a%1==0?a:a.toFixed(1)})}},{title:"Comment",dataIndex:"reasoning",key:"reasoning",ellipsis:{showTitle:!1},render:e=>(0,t.jsx)(n.Tooltip,{title:e,children:(0,t.jsx)("span",{style:{fontSize:12},children:e})})}];return(0,t.jsxs)(s.Card,{size:"small",className:"mb-3",style:{borderLeft:`3px solid ${c}`},title:(0,t.jsxs)(i.Space,{children:[r?(0,t.jsx)(o.CheckCircleOutlined,{style:{color:"#52c41a"}}):(0,t.jsx)(d.CloseCircleOutlined,{style:{color:"#ff4d4f"}}),(0,t.jsx)(m,{strong:!0,children:e.eval_name}),(0,t.jsx)(a.Tag,{color:r?"success":"error",children:r?"PASSED":"FAILED"}),(0,t.jsx)(n.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)(m,{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)(i.Space,{size:"small",children:[e.judge_model&&(0,t.jsxs)(m,{type:"secondary",style:{fontSize:12},children:["Judge: ",e.judge_model]}),null!=e.iteration&&(0,t.jsxs)(m,{type:"secondary",style:{fontSize:12},children:["Iter: ",e.iteration+1]})]}),children:[e.eval_error&&(0,t.jsxs)(m,{type:"warning",style:{display:"block",marginBottom:8,fontSize:12},children:["Judge error: ",e.eval_error]}),x.length>0?(0,t.jsx)(l.Table,{dataSource:x,columns:u,pagination:!1,size:"small",rowKey:"criterion_name",scroll:{x:!0},summary:()=>{if(!x.some(e=>null!=e.weight))return null;let e=x.reduce((e,t)=>e+(null!=t.weight?t.score*t.weight/100:0),0);return(0,t.jsxs)(l.Table.Summary.Row,{children:[(0,t.jsx)(l.Table.Summary.Cell,{index:0,children:(0,t.jsx)(m,{strong:!0,style:{fontSize:12},children:"Total"})}),(0,t.jsx)(l.Table.Summary.Cell,{index:1}),(0,t.jsx)(l.Table.Summary.Cell,{index:2}),(0,t.jsx)(l.Table.Summary.Cell,{index:3,children:(0,t.jsx)(m,{strong:!0,style:{fontSize:12,color:c},children:e%1==0?e:e.toFixed(1)})}),(0,t.jsx)(l.Table.Summary.Cell,{index:4})]})}}):(0,t.jsxs)(m,{type:"secondary",style:{fontSize:12},children:["Score: ",e.overall_score?.toFixed(1)," — no per-criterion breakdown available."]})]})}e.s(["default",()=>x])},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o,rawInputTokens:d,cacheReadTokens:c,cacheCreationTokens:m})=>{let x=o?.toLowerCase()==="true",u=void 0!==i||void 0!==n,p=e?.input_cost!==void 0||e?.output_cost!==void 0,h=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(p||u||h||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 g=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),f=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),y=x?0:e?.input_cost,j=x?0:e?.output_cost,b=x?0:e?.original_cost,v=x?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.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:[l(a),x&&" (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=x?0:(y??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:[l(s),null!=d&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",d.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:"Cache Read Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(x?0:e?.cache_read_cost),(c??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(c??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:"Cache Write Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(x?0:e?.cache_creation_cost),(m??0)>0&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",(m??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:[l(y),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.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:[l(j),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.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:l(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:l(s)})]},e))]}),!x&&(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:l(b)})]})}),(g||f)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[g&&(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 (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(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:["-",l(e.discount_amount)]})]})]}),f&&(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 (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((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:["+",l(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:[l(v),x&&" (Cached)"]})]})})]})}]})})}])},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({show:e,onOpenSettings:s})=>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 flex-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",children:"proxy_config.yaml"})," file",s&&(0,t.jsxs)(t.Fragment,{children:[" or"," ",(0,t.jsx)("button",{onClick:s,className:"text-blue-600 hover:text-blue-800 underline font-medium",children:"open the settings"})," ","to configure this directly."]})]}),(0,t.jsx)("pre",{className:"mt-2 bg-white p-3 rounded 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])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),m=e.i(195116),x=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(869939),M=e.i(70635),A=e.i(70969),E=e.i(916925);function D({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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 i,n;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:a}=(0,E.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(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:r(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:r(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:(i=e.start_time,n=e.end_time,`${((n-i)*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,r)=>{let i=a[`${s}-${r}`]||!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}-${r}`,void l(t=>({...t,[e]:!t[e]}))},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)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+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)})]})]})]}),i&&(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",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>D],331052);var I=e.i(592968),z=e.i(207066);let{Text:O}=g.Typography;function R({value:e,maxWidth:s=z.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(I.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:z.FONT_FAMILY_MONO,fontSize:z.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:P}=g.Typography;function B({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(P,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let F=e=>!!e&&e instanceof Date,q=e=>"object"==typeof e&&null!==e,H=e=>!!e&&e instanceof Object&&"function"==typeof e;function $(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function Y(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,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,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},$(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("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]"),a=-1;for(let e=0;e{var e;N(!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:S,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:S,onKeyDown:w},$(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},$(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(U,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:m,beforeExpandChange:u,outerRef:x}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function K(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function V(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return Y({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function W(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=F(l)?l.toISOString():H(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},$(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function U(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(V,Object.assign({},e)):!q(t)||F(t)||H(t)?(0,s.createElement)(W,Object.assign({},e)):(0,s.createElement)(K,Object.assign({},e))}let G={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},J=()=>!0,Q=e=>{let{data:t,style:a=G,shouldExpandNode:l=J,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&q(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(U,{key:t,field:t,value:n,style:{...G,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(U,{value:t,style:{...G,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>Q,"defaultStyles",()=>G],867612);let{Text:X}=g.Typography;function Z({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:z.JSON_MAX_HEIGHT,overflow:"auto",background:z.COLOR_BG_LIGHT,padding:z.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(Q,{data:e,style:G,clickToExpandNode:!0})})}):(0,t.jsx)(X,{type:"secondary",children:"No data"})}function ee(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function et(e){return Array.isArray(e)?e:e?[e]:[]}function es(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var ea=e.i(366308),el=e.i(755151),er=e.i(291542);let{Text:ei}=g.Typography;function en({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})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(ei,{code:!0,children:[e,s.required&&(0,t.jsx)(ei,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(ei,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(ei,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(ei,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(ei,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(er.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(ei,{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 eo({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:ed}=g.Typography;function ec({tool:e}){let[a,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)(ed,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(en,{tool:e}):(0,t.jsx)(eo,{tool:e})]})}let{Text:em}=g.Typography;function ex({tool:e}){let[a,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(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(ea.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(em,{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"}),a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ec,{tool:e})})]})}let{Text:eu}=g.Typography;function ep({log:e}){let s=function(e){let t,s=!(t=es(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 a=function(e){let t=es(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(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.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:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eu,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(eu,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(ex,{tool:e},e.name))})}]})})}let eh=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eg=e.i(888259),ef=e.i(264843),ey=e.i(624001);let{Text:ej}=g.Typography;function eb({type:e,tokens:s,cost:l,onCopy:r,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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(ef.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ej,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ej,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(I.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:ev}=g.Typography;function e_({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(ev,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(ev,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(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,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:eN}=g.Typography;function ew({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)(eN,{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)(eN,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(eN,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:eS}=g.Typography;function ek({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(eS,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(ew,{tool:e,compact:l},e.id||s))})]}):null}let{Text:eC}=g.Typography;function eT({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(eC,{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: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,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(ek,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eL({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=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)(eb,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eg.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(e_,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eT,{messages:c}),d&&(0,t.jsx)(ek,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eM}=g.Typography;function eA({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eg.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(ek,{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)(eb,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eM,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eE=e.i(782273),eD=e.i(313603),eI=e.i(793916);let{Text:ez}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(eR,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eP,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.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 eR({session:e,turnCount:a}){let[l,r]=(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:()=>r(!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)(el.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ey.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eD.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(ez,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(ez,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eE.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)(eI.AudioOutlined,{}):(0,t.jsx)(ef.MessageOutlined,{})," ",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)(eH,{label:"Model",value:e.model}),(0,t.jsx)(eH,{label:"Voice",value:e.voice}),(0,t.jsx)(eH,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eH,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eH,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eH,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eH,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eH,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(ez,{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 eP({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(eb,{type:"output",tokens:l?.completion_tokens??n,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:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eB,{response:e,index:s},e.id||s))})})]})}function eB({response:e,index:s}){let a=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)(ez,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(I.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(ez,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eF,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eq,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eq,{label:"Output",details:l.output_token_details})]})}function eF({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)(ez,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eI.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(ef.MessageOutlined,{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:a})]},s):null})]}):null}function eq({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(ez,{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:a.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 eH({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(ez,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function e$({request:e,response:s,metrics:a}){let l,r,i;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)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&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})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:eh(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eL,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eA,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:eY}=g.Typography;function eK({logEntry:e,onOpenSettings:s,isLoadingDetails:a=!1,accessToken:l}){var r,i;let n=e.metadata||{},o="failure"===n.status,d=o?n.error_information:null,c=!!(r=e.messages)&&(Array.isArray(r)?r.length>0:"object"==typeof r&&Object.keys(r).length>0),m=!!(i=e.response)&&Object.keys(ee(i)).length>0,x=!c&&!m&&!o&&!a,u=n?.guardrail_information,p=et(u),h=p.length>0,g=p.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),j=0===p.length?"-":1===p.length?p[0]?.guardrail_name??"-":`${p.length} guardrails`,b=n?.eval_information,_=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:`${z.DRAWER_CONTENT_PADDING} ${z.DRAWER_CONTENT_PADDING} 0`},children:[o&&d&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eV,{errorInfo:d}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eW,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(R,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(R,{value:e.api_base,maxWidth:z.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),h&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eU,{label:j,maskedCount:g})})]})})}),(0,t.jsx)(eG,{logEntry:e,metadata:n}),(0,t.jsx)(M.CostBreakdownViewer,{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)(ep,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(A.ConfigInfoMessage,{show:x,onOpenSettings:s})}),a?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eJ,{hasResponse:m,hasError:o,getRawRequest:()=>ee(e.proxy_server_request||e.messages),getFormattedResponse:()=>o&&d?{error:{message:d.error_message||"An error occurred",type:d.error_class||"error",code:d.error_code||"unknown",param:null}}:ee(e.response),logEntry:e}),h&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:u,accessToken:l??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),null!=b&&(0,t.jsx)(L.default,{data:b}),_&&(0,t.jsx)(D,{data:n.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eX,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:z.DRAWER_CONTENT_PADDING}})]})}function eV({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eY,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eW({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(eY,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:z.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eU({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:z.SPACING_MEDIUM,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"]})]})}function eG({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default",o=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),d="anthropic_messages"===e.call_type&&void 0!==o;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Input Tokens",children:(0,C.formatNumberWithCommas)(o)}),(0,t.jsx)(f.Descriptions.Item,{label:"Output Tokens",children:(0,C.formatNumberWithCommas)(e.completion_tokens)})]}):(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(B,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.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)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.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)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eJ({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(z.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),m=i.spend??0,x=i.prompt_tokens||0,u=i.completion_tokens||0,p=x+u,h=i.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 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)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(e$,{request:l(),response:r(),metrics:{prompt_tokens:x,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(eY,{copyable:{text:JSON.stringify(n===z.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===z.TAB_RESPONSE&&!e&&!a}),items:[{key:z.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:(0,t.jsx)(Z,{data:l(),mode:"formatted"})})},{key:z.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:z.SPACING_XLARGE,paddingBottom:z.SPACING_XLARGE},children:e||a?(0,t.jsx)(Z,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eQ({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 eX({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow 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)(eY,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:z.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:z.FONT_SIZE_SMALL,fontFamily:z.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eZ=e.i(764205),e0=e.i(266027),e1=e.i(135214);function e2({row:e,isSelected:s,onClick:a}){let l=x.MCP_CALL_TYPES.includes(e.call_type),r=x.AGENT_CALL_TYPES.includes(e.call_type),i=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:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(m.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(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:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.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]})]})}function e5({open:e,onClose:d,logEntry:c,sessionId:m,accessToken:u,onOpenSettings:g,allLogs:f=[],onSelectLog:y,startTime:j}){let b=!!m,[v,_]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),{data:T=[]}=(0,e0.useQuery)({queryKey:["sessionLogs",m],queryFn:async()=>{if(!m||!u)return[];let e=await (0,eZ.sessionSpendLogsCall)(u,m);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!x.MCP_CALL_TYPES.includes(e.call_type),a=+!!x.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&b&&m&&u)}),L=(0,s.useMemo)(()=>b?T.length?v?T.find(e=>e.request_id===v)||T[0]:c?.request_id&&T.find(e=>e.request_id===c.request_id)||T[0]:null:c,[b,c,v,T]);(0,s.useEffect)(()=>{b&&T.length&&(v&&T.some(e=>e.request_id===v)||_(c?.request_id&&T.some(e=>e.request_id===c.request_id)?c.request_id:T[0].request_id))},[b,c,v,T]),(0,s.useEffect)(()=>{e?w(!1):(b&&_(null),k(!1))},[e,b]);let{selectNextLog:M,selectPreviousLog:A}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:L,allLogs:b?T:f,onClose:d,onSelectLog:e=>{b&&_(e.request_id),y?.(e)}}),E=((e,t,s)=>{let{accessToken:a}=(0,e1.default)();return(0,e0.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eZ.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(L?.request_id,j,e&&!!L?.request_id),D=E.data,I=E.isLoading,O=(0,s.useMemo)(()=>L?{...L,messages:D?.messages||L.messages,response:D?.response||L.response,proxy_server_request:D?.proxy_server_request||L.proxy_server_request}:null,[L,D]),R=L?.metadata||{},P="failure"===R.status?"Failure":"Success",B="failure"===R.status?"error":"success",F=R?.user_api_key_team_alias||"default",q=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,$=T.length>0?new Date(Math.max(...T.map(e=>new Date(e.endTime).getTime()))):null,Y=H&&$?(($.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=T.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,V=T.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,W=T.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length,U=b?T:L?[L]:[],G=b?m||"":L?.request_id||"",J=G.length>14?`${G.slice(0,11)}...`:G,Q=async()=>{if(G)try{await navigator.clipboard.writeText(G),k(!0),setTimeout(()=>k(!1),1200)}catch{}};return L&&O?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:z.DRAWER_WIDTH,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:[N?(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.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)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.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"}),!N&&(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:b?"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:J}),(0,t.jsx)("button",{type:"button",onClick:Q,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:S?(0,t.jsx)(r.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:[U.length," req",[b?K:U.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?V:U.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?W:U.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),b?(0,C.getSpendString)(q):(0,C.getSpendString)(L.spend||0),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),Y,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[et(R?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eQ,{guardrailEntries:et(R?.guardrail_information)})}),b?(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"}),U.map((e,s)=>{let a=s===U.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"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e2,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>{_(e.request_id),y?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:U.map(e=>(0,t.jsx)(e2,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>y?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:L,onClose:d,onPrevious:A,onNext:M,statusLabel:P,statusColor:B,environment:F}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eK,{logEntry:O,onOpenSettings:g,isLoadingDetails:I,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e5],502626),e.s([],3565)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},93648,245767,313793,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(560445),l=e.i(207082),r=e.i(135214),i=e.i(500330),n=e.i(871943),o=e.i(360820),d=e.i(94629),c=e.i(152990),m=e.i(682830),x=e.i(269200),u=e.i(942232),p=e.i(977572),h=e.i(427612),g=e.i(64848),f=e.i(496020),y=e.i(592968);function j({keys:e,totalCount:a,isLoading:l,isFetching:r,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,i.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,c.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,m.getCoreRowModel)(),getSortedRowModel:(0,m.getSortedRowModel)(),getPaginationRowModel:(0,m.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[l||r?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[l||r?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:l||r||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:l||r||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(x.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:l||r?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function b(){let{premiumUser:e}=(0,r.default)(),[i,n]=(0,s.useState)(0),[o]=(0,s.useState)(50),{data:d,isPending:c,isFetching:m}=(0,l.useDeletedKeys)(i+1,o);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(j,{keys:d?.keys||[],totalCount:d?.total_count||0,isLoading:c,isFetching:m,pageIndex:i,pageSize:o,onPageChange:n})]})}e.s(["default",()=>b],93648);var v=e.i(785242),_=e.i(389083),N=e.i(599724),w=e.i(355619);function S({teams:e,isLoading:a,isFetching:l}){let[r,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),b=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,i.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,i.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(_.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(N.Text,{children:e.length>30?`${(0,w.getModelDisplayName)(e).slice(0,30)}...`:(0,w.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(_.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(N.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(_.Badge,{size:"xs",color:"red",children:(0,t.jsx)(N.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(y.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],v=(0,c.useReactTable)({data:e,columns:b,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:r},onSortingChange:j,getCoreRowModel:(0,m.getCoreRowModel)(),getSortedRowModel:(0,m.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||l?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(x.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:v.getCenterTotalSize()},children:[(0,t.jsx)(h.TableHead,{children:v.getHeaderGroups().map(e=>(0,t.jsx)(f.TableRow,{children:e.headers.map(e=>(0,t.jsx)(g.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,c.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(o.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${v.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(u.TableBody,{children:a||l?(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?v.getRowModel().rows.map(e=>(0,t.jsx)(f.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,c.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:b.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function k(){let{premiumUser:e}=(0,r.default)(),{data:s,isPending:l,isFetching:i}=(0,v.useDeletedTeams)(1,100);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[!e&&(0,t.jsx)(a.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,t.jsx)(S,{teams:s||[],isLoading:l,isFetching:i})]})}e.s(["default",()=>k],245767);var C=e.i(663435);e.s(["default",0,({value:e,onChange:s})=>(0,t.jsx)(C.default,{value:e,onChange:s})],313793);var T=e.i(625901),L=e.i(56456),M=e.i(152473),A=e.i(199133),E=e.i(770914);let{Text:D}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[m,x]=(0,M.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,T.useInfiniteModelInfo)(i,m||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(A.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),x(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(L.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(E.Space,{direction:"vertical",children:[(0,t.jsxs)(E.Space,{direction:"horizontal",children:[(0,t.jsx)(D,{strong:!0,children:"Model name:"}),(0,t.jsx)(D,{ellipsis:!0,children:s})]}),(0,t.jsxs)(D,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(D,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(L.LoadingOutlined,{spin:!0})})]})})}],291950)},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),m=e.i(482725),x=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.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(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function E({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,E]=(0,s.useState)(""),[D,I]=(0,s.useState)(""),[z,O]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,D,z,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:D||void 0,action:z||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../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"}})]});let K=$.data?.audit_logs??[],V=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{E(e),_(1)},onChange:e=>{e.target.value||(E(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{O(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{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"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(x.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:V,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(m.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>E],942161)},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.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"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.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"})}),m=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),x=({count:e})=>(0,t.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,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.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,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.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,t.jsx)(m,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(x,{});let f=(0,t.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,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(m,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:e?()=>(0,t.jsx)(h,{label:"TTFT (s)",field:"ttft_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:e?()=>(0,t.jsx)(h,{label:"Model",field:"model",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",m="Model",x="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[m]:"",[x]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[E,D]=(0,t.useState)(null),I=(0,t.useRef)(0),z=(0,t.useRef)(M),O=(0,t.useRef)(!1),R=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[x]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[m]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&D({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),D({data:[],total:0,page:1,page_size:v,total_pages:0})}},[y,j,b,_,v,k,C]),P=(0,t.useMemo)(()=>(0,i.default)((e,t)=>R(e,t),300),[R]);(0,t.useEffect)(()=>()=>P.cancel(),[P]);let B=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[x]||M[u]||M[g]||M[f]||M[m]),[M]);(0,t.useEffect)(()=>{z.current=M,O.current=B},[M,B]),(0,t.useEffect)(()=>{O.current&&y&&(P.cancel(),R(z.current,T))},[k,C,T,j,b,_]);let F=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:v,total_pages:0};if(B)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[m]&&(t=t.filter(e=>e.model_id===M[m])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,B]),q=(0,t.useMemo)(()=>B?null!==E?E:{data:[],total:0,page:1,page_size:v,total_pages:0}:F,[B,E,F]),{data:H}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y}),$=(0,t.useCallback)((e=T)=>{B&&y&&(P.cancel(),R(M,e))},[B,y,M,T,R,P]);return{filters:M,filteredLogs:q,hasBackendFilters:B,allTeams:H,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),D(null),P(s,1)),s})},handleFilterReset:()=>{A(L),D(null),P.cancel(),N(1)},refetchWithFilters:$}}e.s(["useLogFilterLogic",()=>y],504809)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(313603),o=e.i(772345),d=e.i(793130),c=e.i(197647),m=e.i(653824),x=e.i(881073),u=e.i(404206),p=e.i(723731),h=e.i(464571),g=e.i(708347),f=e.i(93648),y=e.i(245767),j=e.i(313793),b=e.i(50882),v=e.i(291950),_=e.i(969550),N=e.i(764205),w=e.i(20147),S=e.i(942161),k=e.i(245099);e.i(70969);var C=e.i(97859);e.i(70635),e.i(339086);var T=e.i(504809);e.i(3565);var L=e.i(502626),M=e.i(727749);e.i(867612);var A=e.i(153472),E=e.i(954616),D=e.i(135214);let I=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=s?`${s}/config/update`:"/config/update",l=await fetch(a,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:t.store_prompts_in_spend_logs,...t.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:t.maximum_spend_logs_retention_period}}})});if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update spend logs settings")}return await l.json()};var z=e.i(190702),O=e.i(637235),R=e.i(808613),P=e.i(311451),B=e.i(212931),F=e.i(981339),q=e.i(770914),H=e.i(790848),$=e.i(898586);let Y=({isVisible:e,onCancel:s,onSuccess:a})=>{let[l]=R.Form.useForm(),{mutateAsync:r,isPending:n}=(()=>{let{accessToken:e}=(0,D.default)();return(0,E.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await I(e,t)}})})(),{mutateAsync:o,isPending:d}=(0,A.useDeleteProxyConfigField)(),{data:c,isLoading:m,refetch:x}=(0,A.useProxyConfig)(A.ConfigType.GENERAL_SETTINGS),u=R.Form.useWatch("store_prompts_in_spend_logs",l);(0,i.useEffect)(()=>{e&&x()},[e,x]);let p=(0,i.useMemo)(()=>{if(!c)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let e=c.find(e=>"store_prompts_in_spend_logs"===e.field_name),t=c.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:e?.field_value??!1,maximum_spend_logs_retention_period:t?.field_value??void 0}},[c]),g=async e=>{try{let t=e.maximum_spend_logs_retention_period;if(!t||"string"==typeof t&&""===t.trim())try{await o({config_type:A.ConfigType.GENERAL_SETTINGS,field_name:A.GeneralSettingsFieldName.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD})}catch(e){console.warn("Failed to delete retention period field (may not exist):",e)}let s={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...t&&"string"==typeof t&&""!==t.trim()&&{maximum_spend_logs_retention_period:t}};await r(s,{onSuccess:()=>{M.default.success("Spend logs settings updated successfully"),x(),a?.()},onError:e=>{M.default.fromBackend("Failed to save spend logs settings: "+(0,z.parseErrorMessage)(e))}})}catch(e){M.default.fromBackend("Failed to save spend logs settings: "+(0,z.parseErrorMessage)(e))}},f=()=>{l.resetFields(),s()};return(0,t.jsx)(B.Modal,{title:(0,t.jsx)($.Typography.Title,{level:5,children:"Spend Logs Settings"}),open:e,footer:(0,t.jsxs)(q.Space,{children:[(0,t.jsx)(h.Button,{onClick:f,disabled:n||d||m,children:"Cancel"}),(0,t.jsx)(h.Button,{type:"primary",loading:n||d,disabled:m,onClick:()=>l.submit(),children:n||d?"Saving...":"Save Settings"})]}),onCancel:f,children:(0,t.jsxs)(R.Form,{form:l,layout:"horizontal",onFinish:g,initialValues:p,children:[(0,t.jsx)(R.Form.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:c?.find(e=>"store_prompts_in_spend_logs"===e.field_name)?.field_description||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:(0,t.jsx)("div",{children:m?(0,t.jsx)(F.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(H.Switch,{checked:u??!1,onChange:e=>l.setFieldValue("store_prompts_in_spend_logs",e)})})}),(0,t.jsx)(R.Form.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:c?.find(e=>"maximum_spend_logs_retention_period"===e.field_name)?.field_description||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:m?(0,t.jsx)(F.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(P.Input,{placeholder:"e.g., 7d, 30d",prefix:(0,t.jsx)(O.ClockCircleOutlined,{})})})]},c?JSON.stringify(p):"loading")})};var K=e.i(149121);function V({accessToken:e,token:M,userRole:A,userID:E,premiumUser:D}){let[I,z]=(0,i.useState)(""),[O,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),$=(0,i.useRef)(null),V=(0,i.useRef)(null),W=(0,i.useRef)(null),[U,G]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(null),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(""),[eb,ev]=(0,i.useState)(A&&g.internalUserRoles.includes(A)),[e_,eN]=(0,i.useState)("request logs"),[ew,eS]=(0,i.useState)(null),[ek,eC]=(0,i.useState)(!1),[eT,eL]=(0,i.useState)(null),[eM,eA]=(0,i.useState)(!1),[eE,eD]=(0,i.useState)("startTime"),[eI,ez]=(0,i.useState)("desc"),[eO,eR]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eP,eB]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eP))},[eP]);let[eF,eq]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{ep&&e&&eu({...(await (0,N.keyInfoV1Call)(e,ep)).info,token:ep,api_key:ep})})()},[ep,e]),(0,i.useEffect)(()=>{function e(e){$.current&&!$.current.contains(e.target)&&B(!1),V.current&&!V.current.contains(e.target)&&R(!1),W.current&&!W.current.contains(e.target)&&et(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{A&&g.internalUserRoles.includes(A)&&ev(!0)},[A]);let eH=(0,a.useQuery)({queryKey:["logs","table",F,H,U,J,ei,eo,eb?E:null,eg,ec,eE,eI],queryFn:async()=>{if(!e||!M||!A||!E)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"),s=X?(0,r.default)(J).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,N.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:eo||void 0,team_id:ei||void 0,user_id:eb?E??void 0:void 0,end_user:ey||void 0,status_filter:eg||void 0,model_id:ec||void 0,sort_by:eE,sort_order:eI}})},enabled:!!e&&!!M&&!!A&&!!E&&"request logs"===e_&&eO,refetchInterval:!!eP&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),e$=(0,i.useDeferredValue)(eH.isFetching),eY=eH.isFetching||e$,eK=eH.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eV,filteredLogs:eW,hasBackendFilters:eU,allTeams:eG,handleFilterChange:eJ,handleFilterReset:eQ,refetchWithFilters:eX}=(0,T.useLogFilterLogic)({logs:eK,accessToken:e,startTime:U,endTime:J,pageSize:H,isCustomDate:X,setCurrentPage:q,userID:E,userRole:A,sortBy:eE,sortOrder:eI,currentPage:F}),eZ=(0,i.useCallback)(()=>{eQ(),G((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),Z(!1),eq({value:24,unit:"hours"}),q(1)},[eQ]);if((0,i.useEffect)(()=>{eR(!eU)},[eU]),(0,i.useEffect)(()=>{e&&(eV["Team ID"]?en(eV["Team ID"]):en(""),ef(eV.Status||""),em(eV.Model||""),ej(eV["End User"]||""),ed(eV["Key Hash"]||""))},[eV,e]),!e||!M||!A||!E)return null;let e0=eW.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),e1=e0.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),C.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:C.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),e2=new Map;for(let e of e0){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=C.MCP_CALL_TYPES.includes(e.call_type),s=e2.get(e.session_id);s&&(!s.isMcp||t)||e2.set(e.session_id,{requestId:e.request_id,isMcp:t})}let e5=e0.map(e=>{let t=e.session_id?e1[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eh(e),onSessionClick:t=>{t&&(eL(t),eS(e),eC(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||e2.get(e.session_id)?.requestId===e.request_id)||[],e4=[{name:"Team ID",label:"Team ID",customComponent:j.default},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:v.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:b.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,N.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return C.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=C.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!C.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e6=C.QUICK_SELECT_OPTIONS.find(e=>e.value===eF.value&&e.unit===eF.unit),e3=X?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"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=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(X,U,J):e6?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(m.TabGroup,{defaultIndex:0,onIndexChange:e=>eN(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(c.Tab,{children:"Request Logs"}),(0,t.jsx)(c.Tab,{children:"Audit Logs"}),(0,t.jsx)(c.Tab,{children:"Deleted Keys"}),(0,t.jsx)(c.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsxs)(u.TabPanel,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"}),(0,t.jsx)(h.Button,{icon:(0,t.jsx)(n.SettingOutlined,{}),onClick:()=>eA(!0),title:"Spend Logs Settings"})]}),ex&&ep&&ex.api_key===ep?(0,t.jsx)(w.default,{keyId:ep,keyData:ex,teams:eG??[],onClose:()=>eh(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.default,{options:e4,onApplyFilters:eJ,onResetFilters:eZ}),(0,t.jsx)(Y,{isVisible:eM,onCancel:()=>eA(!1),onSuccess:()=>eA(!1)}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>z(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:W,children:[(0,t.jsxs)("button",{onClick:()=>et(!ee),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",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:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e3]}),ee&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[C.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e3===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),G((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eq({value:e.value,unit:e.unit}),Z(!1),et(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${X?"bg-blue-50 text-blue-600":""}`,onClick:()=>Z(!X),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(d.Switch,{color:"green",checked:eP,defaultChecked:!0,onChange:eB})]}),{}),(0,t.jsx)(h.Button,{type:"default",icon:(0,t.jsx)(o.SyncOutlined,{spin:eY}),onClick:()=>{eU?eX():eH.refetch()},disabled:eY,title:"Fetch data",children:eY?"Fetching":"Fetch"})]}),X&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:J,onChange:e=>{Q(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eH.isLoading?"...":eW?(F-1)*H+1:0," -"," ",eH.isLoading?"...":eW?Math.min(F*H,eW.total):0," ","of ",eH.isLoading?"...":eW?eW.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eH.isLoading?"...":F," of"," ",eH.isLoading?"...":eW?eW.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eH.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(eW.total_pages||1,e+1)),disabled:eH.isLoading||F===(eW.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eP&&1===F&&eO&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>eB(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(K.DataTable,{columns:(0,k.createColumns)({sortBy:eE,sortOrder:eI,onSortChange:(e,t)=>{eD(e),ez(t),q(1)}}),data:e5,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eL(e.session_id),eS(e),eC(!0);return}eL(null),eS(e),eC(!0)},isLoading:eH.isLoading})]})]})]}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(S.default,{userID:E,userRole:A,token:M,accessToken:e,isActive:"audit logs"===e_,premiumUser:D})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(f.default,{})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(y.default,{})})]})]}),(0,t.jsx)(L.LogDetailsDrawer,{open:ek,onClose:()=>{eC(!1),eL(null)},logEntry:ew,sessionId:eT,accessToken:e,onOpenSettings:()=>eA(!0),allLogs:e5,onSelectLog:e=>{eS(e)},startTime:(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>V],936190)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a542eaa81bba9029.js b/litellm/proxy/_experimental/out/_next/static/chunks/a542eaa81bba9029.js deleted file mode 100644 index d8d333df58..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/a542eaa81bba9029.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,l],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),l=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 s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ArrowLeftOutlined",0,r],447566)},891547,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,disabled:o})=>{let[c,d]=(0,l.useState)([]),[u,m]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,s.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:r,loading:u,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),l=e.i(271645),a=e.i(199133),s=e.i(764205);function r(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let l=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${l} (${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:i,className:n,accessToken:o,disabled:c,onPoliciesLoaded:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(o){g(!0);try{let e=await (0,s.getPoliciesList)(o);e.policies&&(m(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{g(!1)}}})()},[o,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:i,loading:h,className:n,allowClear:!0,options:r(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>r])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),l=e.i(114272),a=e.i(540143),s=e.i(915823),r=e.i(619273),i=class extends s.Subscribable{#e;#t=void 0;#l;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}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.#l,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#l?.state.status==="pending"&&this.#l.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#l?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#l?.removeObserver(this),this.#l=void 0,this.#s(),this.#r()}mutate(e,t){return this.#a=t,this.#l?.removeObserver(this),this.#l=this.#e.getMutationCache().build(this.#e,this.options),this.#l.addObserver(this),this.#l.execute(e)}#s(){let e=this.#l?.state??(0,l.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,l=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,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,l,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,l,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,l){let s=(0,n.useQueryClient)(l),[o]=t.useState(()=>new i(s,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=t.useCallback((e,t)=>{o.mutate(e,t).catch(r.noop)},[o]);if(c.error&&(0,r.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ClockCircleOutlined",0,r],637235)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let l=e.i(264042).Row;e.s(["Row",0,l],621192)},214541,e=>{"use strict";var t=e.i(271645),l=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,s]=(0,t.useState)([]),{accessToken:r,userId:i,userRole:n}=(0,l.default)();return(0,t.useEffect)(()=>{(async()=>{s(await (0,a.fetchTeams)(r,i,n,null))})()},[r,i,n]),{teams:e,setTeams:s}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function l(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let s=t(e);return isNaN(a)?l(e,NaN):(a&&s.setDate(s.getDate()+a),s)}function s(e,a){let s=t(e);if(isNaN(a))return l(e,NaN);if(!a)return s;let r=s.getDate(),i=l(e,s.getTime());return(i.setMonth(s.getMonth()+a+1,0),r>=i.getDate())?i:(s.setFullYear(i.getFullYear(),i.getMonth(),r),s)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>l],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>s],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(529681),s=e.i(908286),r=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],d=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let a,s,r;return(0,l.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(s={},d.forEach(l=>{s[`${e}-align-${l}`]=t.align===l}),s[`${e}-align-stretch`]=!t.align&&!!t.vertical,s)),(r={},c.forEach(l=>{r[`${e}-justify-${l}`]=t.justify===l}),r)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:l,paddingLG:a}=e,s=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:l,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"}}}})(s),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(s),(e=>{let{componentCls:t}=e,l={};return o.forEach(e=>{l[`${t}-wrap-${e}`]={flexWrap:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return d.forEach(e=>{l[`${t}-align-${e}`]={alignItems:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return c.forEach(e=>{l[`${t}-justify-${e}`]={justifyContent:e}}),l})(s)]},()=>({}),{resetStyle:!1});var h=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let g=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:d,flex:g,gap:f,vertical:p=!1,component:x="div",children:y}=e,w=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:b,getPrefixCls:j}=t.default.useContext(r.ConfigContext),S=j("flex",n),[_,N,C]=m(S),k=null!=p?p:null==v?void 0:v.vertical,z=(0,l.default)(c,o,null==v?void 0:v.className,S,N,C,u(S,e),{[`${S}-rtl`]:"rtl"===b,[`${S}-gap-${f}`]:(0,s.isPresetSize)(f),[`${S}-vertical`]:k}),O=Object.assign(Object.assign({},null==v?void 0:v.style),d);return g&&(O.flex=g),f&&!(0,s.isPresetSize)(f)&&(O.gap=f),_(t.default.createElement(x,Object.assign({ref:i,className:z,style:O},(0,a.default)(w,["justify","wrap","align"])),y))});e.s(["Flex",0,g],525720)},633627,e=>{"use strict";var t=e.i(764205);let l=(e,t,l,a)=>{for(let s of e){let e=s?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let r=s?.organization_id??s?.org_id;r&&"string"==typeof r&&l.add(r.trim());let i=s?.user_id;if(i&&"string"==typeof i){let e=s?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let s=new Set,r=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;l(o,s,r,i);let d=Math.min(c,10)-1;if(d>0){let n=Array.from({length:d},(l,s)=>(0,t.keyListCall)(e,null,a,null,null,null,s+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&l(e.value?.keys||[],s,r,i)}return{keyAliases:Array.from(s).sort(),organizationIds:Array.from(r).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},s=async(e,l)=>{if(!e)return[];try{let a=[],s=1,r=!0;for(;r;){let i=await (0,t.teamListCall)(e,l||null,null);a=[...a,...i],s{if(!e)return[];try{let l=[],a=1,s=!0;for(;s;){let r=await (0,t.organizationListCall)(e);l=[...l,...r],a{"use strict";var t=e.i(843476),l=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var s=e.i(464571),r=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:d={},buttonLabel:u="Filters"})=>{let[m,h]=(0,l.useState)(!1),[g,f]=(0,l.useState)(d),[p,x]=(0,l.useState)({}),[y,w]=(0,l.useState)({}),[v,b]=(0,l.useState)({}),[j,S]=(0,l.useState)({}),_=(0,l.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){w(e=>({...e,[t.name]:!0}));try{let l=await t.searchFn(e);x(e=>({...e,[t.name]:l}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{w(e=>({...e,[t.name]:!1}))}}},300),[]),N=(0,l.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!j[e.name]){w(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(l=>({...l,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{w(t=>({...t,[e.name]:!1}))}}},[j]);(0,l.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!j[e.name]&&N(e)})},[m,e,N,j]);let C=(e,t)=>{let l={...g,[e]:t};f(l),o(l)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(s.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:u}),(0,t.jsx)(s.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),f(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(l=>{let a,s=e.find(e=>e.label===l||e.name===l);return s?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:s.label||s.name}),s.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),onOpenChange:e=>{e&&s.isSearchable&&!j[s.name]&&N(s)},onSearch:e=>{b(t=>({...t,[s.name]:e})),s.searchFn&&_(e,s)},filterOption:!1,loading:y[s.name],options:p[s.name]||[],allowClear:!0,notFoundContent:y[s.name]?"Loading...":"No results found"}):s.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),allowClear:!0,children:s.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):s.customComponent?(a=s.customComponent,(0,t.jsx)(a,{value:g[s.name]||void 0,onChange:e=>C(s.name,e??""),placeholder:`Select ${s.label||s.name}...`,allFilters:g})):(0,t.jsx)(r.Input,{className:"w-full",placeholder:`Enter ${s.label||s.name}...`,value:g[s.name]||"",onChange:e=>C(s.name,e.target.value),allowClear:!0})]},s.name):null})})]})}],969550)},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,s,r)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,s?.organization_id||null,l):await (0,t.teamListCall)(e,s?.organization_id||null),console.log(`givenTeams: ${i}`),r(i)};e.s(["fetchTeams",0,l])},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),s=e.i(947293),r=e.i(764205),i=e.i(954616),n=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function f(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),x=e.i(808613),y=e.i(311451),w=e.i(898586);function v({variant:e,userEmail:a,isPending:s,claimError:r,onSubmit:i}){let[n]=x.Form.useForm();return l.default.useEffect(()=>{a&&n.setFieldValue("user_email",a)},[a,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(x.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>i({password:e.password}),children:[(0,t.jsx)(x.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(x.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),r&&(0,t.jsx)(h.Alert,{type:"error",message:r,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:s,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function b({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:p,isError:x}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,r.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:y,isPending:w}=(0,i.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,r.claimOnboardingToken)(e,t,l,a)}),b=g?.token?(0,s.jwtDecode)(g.token):null,j=b?.user_email??"",S=b?.user_id??null,_=b?.key??null,N=g?.token??null;return p?(0,t.jsx)(m,{}):x?(0,t.jsx)(f,{}):(0,t.jsx)(v,{variant:e,userEmail:j,isPending:w,claimError:u,onSubmit:e=>{_&&N&&S&&d&&(h(null),y({accessToken:_,inviteId:d,userId:S,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,r.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function j(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(b,{variant:"reset_password"===e?"reset_password":"signup"})}function S(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(j,{})})}e.s(["default",()=>S],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),s=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:f=!1,allFilters:p})=>{let[x,y]=(0,d.useState)(""),[w,v]=(0,o.useDebouncedState)("",{wait:300}),{data:b,fetchNextPage:j,hasNextPage:S,isFetchingNextPage:_,isLoading:N}=((e=50,t,a)=>{let{accessToken:n}=(0,r.default)();return(0,l.useInfiniteQuery)({queryKey:i.list({filters:{size:e,...t&&{search:t},...a&&{team_id:a}}}),queryFn:async({pageParam:l})=>await (0,s.keyAliasesCall)(n,l,e,t,a),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!b?.pages)return[];let e=new Set,t=[];for(let l of b.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[b]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:f,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),v(e)},searchValue:x,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&S&&!_&&j()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:C,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),s=e.i(350967),r=e.i(898586),i=e.i(947293),n=e.i(618566),o=e.i(271645),c=e.i(566606),d=e.i(584578),u=e.i(764205),m=e.i(702597),h=e.i(207082),g=e.i(109799),f=e.i(500330),p=e.i(871943),x=e.i(502547),y=e.i(360820),w=e.i(94629),v=e.i(152990),b=e.i(682830),j=e.i(389083),S=e.i(994388),_=e.i(752978),N=e.i(269200),C=e.i(942232),k=e.i(977572),z=e.i(427612),O=e.i(64848),I=e.i(496020),D=e.i(599724),T=e.i(827252),E=e.i(772345),M=e.i(464571),P=e.i(282786),A=e.i(981339),R=e.i(262218),L=e.i(592968),$=e.i(355619),U=e.i(633627),K=e.i(374009),F=e.i(700514),B=e.i(135214),V=e.i(50882),H=e.i(969550),G=e.i(304911),W=e.i(20147);function q({teams:e,organizations:l,onSortChange:a,currentSort:s}){let{data:i}=(0,g.useOrganizations)(),n=i??l??[],[c,d]=(0,o.useState)(null),[m,q]=o.default.useState(()=>s?[{id:s.sortBy,desc:"desc"===s.sortOrder}]:[{id:"created_at",desc:!0}]),[J,Q]=o.default.useState({pageIndex:0,pageSize:50}),Y=m.length>0?m[0].id:null,Z=m.length>0?m[0].desc?"desc":"asc":null,{data:X,isPending:ee,isFetching:et,isError:el,refetch:ea}=(0,h.useKeys)(J.pageIndex+1,J.pageSize,{sortBy:Y||void 0,sortOrder:Z||void 0,expand:"user"}),[es,er]=(0,o.useState)({}),{filters:ei,filteredKeys:en,filteredTotalCount:eo,allTeams:ec,allOrganizations:ed,handleFilterChange:eu,handleFilterReset:em}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:s}=(0,B.default)(),[r,i]=(0,o.useState)(a),[n,c]=(0,o.useState)(t||[]),[d,m]=(0,o.useState)(l||[]),[h,g]=(0,o.useState)(e),[f,p]=(0,o.useState)(null),x=(0,o.useRef)(0),y=(0,o.useCallback)((0,K.default)(async e=>{if(!s)return;let t=Date.now();x.current=t;try{let l=await (0,u.keyListCall)(s,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,F.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===x.current&&l&&(g(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[s]);return(0,o.useEffect)(()=>{if(!e)return void g([]);let t=[...e];r["Team ID"]&&(t=t.filter(e=>e.team_id===r["Team ID"])),r["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===r["Organization ID"])),g(t)},[e,r]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,U.fetchAllTeams)(s);e.length>0&&c(e);let t=await (0,U.fetchAllOrganizations)(s);t.length>0&&m(t)};s&&e()},[s]),(0,o.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{i({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...r,...e})},handleFilterReset:()=>{i(a),p(null),y(a)}}}({keys:X?.keys||[],teams:e,organizations:l}),eh=(0,o.useDeferredValue)(et),eg=(et||eh)&&!el,ef=eo??X?.total_count??0;(0,o.useEffect)(()=>{if(ea){let e=()=>{ea()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[ea]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(L.Tooltip,{title:l,children:(0,t.jsx)(S.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})}},{id:"status",header:"Status",size:100,enableSorting:!1,cell:({row:e})=>{let l=e.original;if(!0!==l.blocked)return(0,t.jsx)(R.Tag,{color:"green","data-testid":`key-status-${l.token_id}`,children:"Active"});let a=l.metadata?.scim_blocked===!0;return(0,t.jsx)(L.Tooltip,{title:a?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401.",children:(0,t.jsx)(R.Tag,{color:"red","data-testid":`key-status-${l.token_id}`,children:"Blocked"})})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let s=e?.find(e=>e.team_id===a),r=s?.team_alias||a,i=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=n.find(e=>e.organization_id===l),s=a?.organization_alias||l,r=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(P.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,s=l.user?.user_email??l.user_email??null,i=l.user_id??null,n="default_user_id"===i,o=a||s||i,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:s},{label:"User ID",value:i}].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)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||s?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(G.default,{userId:i})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,s=a?.user_alias??null,i=a?.user_email??null,n="default_user_id"===l,o=s||i||l,c=(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)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||i?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(G.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(P.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(L.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,f.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,f.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(j.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})}):(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)(_.Icon,{icon:es[e.row.id]?p.ChevronDownIcon:x.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{er(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)(j.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(j.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,$.getModelDisplayName)(e).slice(0,30)}...`:(0,$.getModelDisplayName)(e)})},l)),l.length>3&&!es[e.row.id]&&(0,t.jsx)(j.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(D.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),es[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)(j.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(j.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,$.getModelDisplayName)(e).slice(0,30)}...`:(0,$.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"]})]})}}],[e,n]),ex=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ey=(0,v.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:J},onSortingChange:e=>{let t="function"==typeof e?e(m):e;if(q(t),t&&t.length>0){let e=t[0],l=e.id,s=e.desc?"desc":"asc";eu({...ei,"Sort By":l,"Sort Order":s},!0),a?.(l,s)}},onPaginationChange:Q,getCoreRowModel:(0,b.getCoreRowModel)(),getSortedRowModel:(0,b.getSortedRowModel)(),getPaginationRowModel:(0,b.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(ef/J.pageSize)});o.default.useEffect(()=>{s&&q([{id:s.sortBy,desc:"desc"===s.sortOrder}])},[s]);let{pageIndex:ew,pageSize:ev}=ey.getState().pagination,eb=Math.min((ew+1)*ev,ef),ej=`${ew*ev+1} - ${eb}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:c?(0,t.jsx)(W.default,{keyId:c.token,onClose:()=>d(null),keyData:c,teams:ec,onDelete:ea}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(H.default,{options:ex,onApplyFilters:eu,initialValues:ei,onResetFilters:em})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",ej," of ",ef," results"]}),(0,t.jsx)(M.Button,{type:"default",icon:(0,t.jsx)(E.SyncOutlined,{spin:eg}),onClick:()=>{ea()},disabled:eg,title:"Fetch data",children:eg?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ew+1," of ",ey.getPageCount()]}),ee?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.previousPage(),disabled:ee||!ey.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),ee?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.nextPage(),disabled:ee||!ey.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ey.getCenterTotalSize()},children:[(0,t.jsx)(z.TableHead,{children:ey.getHeaderGroups().map(e=>(0,t.jsx)(I.TableRow,{children:e.headers.map(e=>(0,t.jsx)(O.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,v.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(y.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(w.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ey.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(C.TableBody,{children:ee?(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ey.getRowModel().rows.map(e=>(0,t.jsx)(I.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(k.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:h,teams:g,keys:f,setUserRole:p,userEmail:x,setUserEmail:y,setTeams:w,setKeys:v,premiumUser:b,organizations:j,addKey:S,createClicked:_,autoOpenCreate:N,prefillData:C})=>{let[k,z]=(0,o.useState)(null),[O,I]=(0,o.useState)(null),D=(0,n.useSearchParams)(),T=(0,l.getCookie)("token"),E=D.get("invitation_id"),[M,P]=(0,o.useState)(null),[A,R]=(0,o.useState)(null),[L,$]=(0,o.useState)([]),[U,K]=(0,o.useState)(null),[F,B]=(0,o.useState)(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(T){let e=(0,i.jwtDecode)(T);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),P(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),p(t)}else console.log("User role not defined");e.user_email?y(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&M&&h&&!k){let t=sessionStorage.getItem("userModels"+e);t?$(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(O)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(M);K(t);let l=await (0,u.userGetInfoV2)(M,e);z(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,u.modelAvailableCall)(M,e,h)).data.map(e=>e.id);console.log("available_model_names:",a),$(a),console.log("userModels:",L),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&V()}})(),(0,d.fetchTeams)(M,e,h,O,w))}},[e,T,M,h]),(0,o.useEffect)(()=>{M&&(async()=>{try{let e=await (0,u.keyInfoCall)(M,[M]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&V()}})()},[M]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(O)}, accessToken: ${M}, userID: ${e}, userRole: ${h}`),M&&(console.log("fetching teams"),(0,d.fetchTeams)(M,e,h,O,w))},[O]),(0,o.useEffect)(()=>{if(null!==f&&null!=F&&null!==F.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(f)}`),f))F.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===F.team_id&&(e+=t.spend);console.log(`sum: ${e}`),R(e)}else if(null!==f){let e=0;for(let t of f)e+=t.spend;R(e)}},[F]),null!=E)return(0,t.jsx)(c.default,{});function V(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==T)return console.log("All cookies before redirect:",document.cookie),V(),null;try{let e=(0,i.jwtDecode)(T);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),V(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),V(),null}if(null==M)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==h&&p("App Owner"),h&&"Admin Viewer"==h){let{Title:e,Paragraph:l}=r.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",F),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(m.default,{team:F,teams:g,data:f,addKey:S,autoOpenCreate:N,prefillData:C},F?F.team_id:null),(0,t.jsx)(q,{teams:g,organizations:j})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a5b10ff77096a982.js b/litellm/proxy/_experimental/out/_next/static/chunks/a5b10ff77096a982.js deleted file mode 100644 index a87ab5e05a..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/a5b10ff77096a982.js +++ /dev/null @@ -1,10 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,637235,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:"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),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:l}))});e.s(["ClockCircleOutlined",0,a],637235)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),l=e.i(908206),i=e.i(242064),a=e.i(517455),r=e.i(150073);let o={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 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:a,className:r,style:o,labelStyle:d,contentStyle:c,bordered:u,label:g,content:b,colon:m,type:p,styles:f}=e,{classNames:h}=t.useContext(s),y=Object.assign(Object.assign({},d),null==f?void 0:f.label),$=Object.assign(Object.assign({},c),null==f?void 0:f.content);if(u)return t.createElement(i,{colSpan:a,style:o,className:(0,n.default)(r,{[`${l}-item-${p}`]:"label"===p||"content"===p,[null==h?void 0:h.label]:(null==h?void 0:h.label)&&"label"===p,[null==h?void 0:h.content]:(null==h?void 0:h.content)&&"content"===p})},null!=g&&t.createElement("span",{style:y},g),null!=b&&t.createElement("span",{style:$},b));return t.createElement(i,{colSpan:a,style:o,className:(0,n.default)(`${l}-item`,r)},t.createElement("div",{className:`${l}-item-container`},null!=g&&t.createElement("span",{style:y,className:(0,n.default)(`${l}-item-label`,null==h?void 0:h.label,{[`${l}-item-no-colon`]:!m})},g),null!=b&&t.createElement("span",{style:$,className:(0,n.default)(`${l}-item-content`,null==h?void 0:h.content)},b)))};function b(e,{colon:n,prefixCls:l,bordered:i},{component:a,type:r,showLabel:o,showContent:s,labelStyle:d,contentStyle:c,styles:u}){return e.map(({label:e,children:b,prefixCls:m=l,className:p,style:f,labelStyle:h,contentStyle:y,span:$=1,key:v,styles:O},j)=>"string"==typeof a?t.createElement(g,{key:`${r}-${v||j}`,className:p,style:f,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),h),null==O?void 0:O.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),y),null==O?void 0:O.content)},span:$,colon:n,component:a,itemPrefixCls:m,bordered:i,label:o?e:null,content:s?b:null,type:r}):[t.createElement(g,{key:`label-${v||j}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.label),f),h),null==O?void 0:O.label),span:1,colon:n,component:a[0],itemPrefixCls:m,bordered:i,label:e,type:"label"}),t.createElement(g,{key:`content-${v||j}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.content),f),y),null==O?void 0:O.content),span:2*$-1,component:a[1],itemPrefixCls:m,bordered:i,content:b,type:"content"})])}let m=e=>{let n=t.useContext(s),{prefixCls:l,vertical:i,row:a,index:r,bordered:o}=e;return i?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${r}`,className:`${l}-row`},b(a,e,Object.assign({component:"th",type:"label",showLabel:!0},n))),t.createElement("tr",{key:`content-${r}`,className:`${l}-row`},b(a,e,Object.assign({component:"td",type:"content",showContent:!0},n)))):t.createElement("tr",{key:r,className:`${l}-row`},b(a,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},n)))};e.i(296059);var p=e.i(915654),f=e.i(183293),h=e.i(246422),y=e.i(838378);let $=(0,h.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:l,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:r,titleMarginBottom:o}=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,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({},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: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,p.unit)(r)} ${(0,p.unit)(a)}`},[`&${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:b,title:p,extra:f,column:h,colon:y=!0,bordered:O,layout:j,children:x,className:S,rootClassName:C,style:E,size:w,labelStyle:z,contentStyle:B,styles:k,items:N,classNames:T}=e,P=v(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:L,direction:M,className:I,style:R,classNames:H,styles:G}=(0,i.useComponentConfig)("descriptions"),W=L("descriptions",b),A=(0,r.default)(),D=t.useMemo(()=>{var e;return"number"==typeof h?h:null!=(e=(0,l.matchScreen)(A,Object.assign(Object.assign({},o),h)))?e:3},[A,h]),F=(g=t.useMemo(()=>N||(0,d.default)(x).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[N,x]),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,l.matchScreen)(A,t)})}),[g,A])),X=(0,a.default)(w),K=((e,n)=>{let[l,i]=(0,t.useMemo)(()=>{let t,l,i,a;return t=[],l=[],i=!1,a=0,n.filter(e=>e).forEach(n=>{let{filled:r}=n,o=u(n,["filled"]);if(r){l.push(o),t.push(l),l=[],a=0;return}let s=e-a;(a+=n.span||1)>=e?(a>e?(i=!0,l.push(Object.assign(Object.assign({},o),{span:s}))):l.push(o),t.push(l),l=[],a=0):l.push(o)}),l.length>0&&t.push(l),[t=t.map(t=>{let n=t.reduce((e,t)=>e+(t.span||1),0);if(n({labelStyle:z,contentStyle:B,styles:{content:Object.assign(Object.assign({},G.content),null==k?void 0:k.content),label:Object.assign(Object.assign({},G.label),null==k?void 0:k.label)},classNames:{label:(0,n.default)(H.label,null==T?void 0:T.label),content:(0,n.default)(H.content,null==T?void 0:T.content)}}),[z,B,k,T,H,G]);return q(t.createElement(s.Provider,{value:V},t.createElement("div",Object.assign({className:(0,n.default)(W,I,H.root,null==T?void 0:T.root,{[`${W}-${X}`]:X&&"default"!==X,[`${W}-bordered`]:!!O,[`${W}-rtl`]:"rtl"===M},S,C,Q,U),style:Object.assign(Object.assign(Object.assign(Object.assign({},R),G.root),null==k?void 0:k.root),E)},P),(p||f)&&t.createElement("div",{className:(0,n.default)(`${W}-header`,H.header,null==T?void 0:T.header),style:Object.assign(Object.assign({},G.header),null==k?void 0:k.header)},p&&t.createElement("div",{className:(0,n.default)(`${W}-title`,H.title,null==T?void 0:T.title),style:Object.assign(Object.assign({},G.title),null==k?void 0:k.title)},p),f&&t.createElement("div",{className:(0,n.default)(`${W}-extra`,H.extra,null==T?void 0:T.extra),style:Object.assign(Object.assign({},G.extra),null==k?void 0:k.extra)},f)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,K.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)},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),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:l}))});e.s(["ExclamationCircleOutlined",0,a],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),a=e.i(517455),r=e.i(185793),o=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 d=e=>{var{prefixCls:l,className:a,hoverable:r=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(i.ConfigContext),c=d("card",l),u=(0,n.default)(`${c}-grid`,a,{[`${c}-grid-hoverable`]:r});return t.createElement("div",Object.assign({},o,{className:u}))};e.i(296059);var c=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:l,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:r,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:a},[`${t}-head`]:(e=>{let{antCls:t,componentCls:n,headerHeight:l,headerPadding:i,tabsMarginBottom:a}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:l,marginBottom:-1,padding:`0 ${(0,c.unit)(i)}`,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:a,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:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:r,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.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:` - ${(0,c.unit)(i)} 0 0 0 ${n}, - 0 ${(0,c.unit)(i)} 0 0 ${n}, - ${(0,c.unit)(i)} ${(0,c.unit)(i)} 0 0 ${n}, - ${(0,c.unit)(i)} 0 0 0 ${n} inset, - 0 ${(0,c.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,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:l,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:r}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:r,borderTop:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${a}`,display:"flex",borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.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,c.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:(0,c.unit)(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${a}`}}})})(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} ${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,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:l}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:l,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${(0,c.unit)(l)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,c.unit)(e.padding)} ${(0,c.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:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${(0,c.unit)(l)}`,fontSize:a,[`> ${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),f=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 h=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 c,{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:z,actions:B,tabList:k,children:N,activeTabKey:T,defaultActiveTabKey:P,tabBarExtraContent:L,hoverable:M,tabProps:I={},classNames:R,styles:H}=e,G=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:W,direction:A,card:D}=t.useContext(i.ConfigContext),[F]=(0,p.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==R?void 0:R[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(N,t=>{(null==t?void 0:t.type)===d&&(e=!0)}),e},[N]),Q=W("card",u),[U,V,_]=m(Q),J=t.createElement(r.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},N),Y=void 0!==T,Z=Object.assign(Object.assign({},I),{[Y?"activeKey":"defaultActiveKey"]:Y?T:P,tabBarExtraContent:L}),ee=(0,a.default)(E),et=ee&&"default"!==ee?ee:"large",en=k?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:k.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(j||$||en){let e=(0,n.default)(`${Q}-head`,X("header")),l=(0,n.default)(`${Q}-head-title`,X("title")),i=(0,n.default)(`${Q}-extra`,X("extra")),a=Object.assign(Object.assign({},v),K("header"));c=t.createElement("div",{className:e,style:a},t.createElement("div",{className:`${Q}-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)(`${Q}-cover`,X("cover")),ei=z?t.createElement("div",{className:el,style:K("cover")},z):null,ea=(0,n.default)(`${Q}-body`,X("body")),er=Object.assign(Object.assign({},O),K("body")),eo=t.createElement("div",{className:ea,style:er},x?J:N),es=(0,n.default)(`${Q}-actions`,X("actions")),ed=(null==B?void 0:B.length)?t.createElement(h,{actionClasses:es,actionStyle:K("actions"),actions:B}):null,ec=(0,l.default)(G,["onTabChange"]),eu=(0,n.default)(Q,null==D?void 0:D.className,{[`${Q}-loading`]:x,[`${Q}-bordered`]:"borderless"!==F,[`${Q}-hoverable`]:M,[`${Q}-contain-grid`]:q,[`${Q}-contain-tabs`]:null==k?void 0:k.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},ec,{className:eu,style:eg}),c,ei,eo,ed))});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=d,y.Meta=e=>{let{prefixCls:l,className:a,avatar:r,title:o,description:s}=e,d=$(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(i.ConfigContext),u=c("card",l),g=(0,n.default)(`${u}-meta`,a),b=r?t.createElement("div",{className:`${u}-meta-avatar`},r):null,m=o?t.createElement("div",{className:`${u}-meta-title`},o):null,p=s?t.createElement("div",{className:`${u}-meta-description`},s):null,f=m||p?t.createElement("div",{className:`${u}-meta-detail`},m,p):null;return t.createElement("div",Object.assign({},d,{className:g}),b,f)},e.s(["Card",0,y],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),n=e.i(560445),l=e.i(175712),i=e.i(869216),a=e.i(311451),r=e.i(212931),o=e.i(898586);e.i(296059);var s=e.i(868297),d=e.i(732961),c=e.i(289882),u=e.i(170517),g=e.i(628882),b=e.i(320890),m=e.i(104458),p=e.i(722319),f=e.i(8398),h=e.i(279728);e.i(765846);var y=e.i(602716),$=e.i(328052);e.i(262370);var v=e.i(135551);let O=(e,t)=>new v.FastColor(e).setA(t).toRgbString(),j=(e,t)=>new v.FastColor(e).lighten(t).toHexString(),x=e=>{let t=(0,y.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]}},S=(e,t)=>{let n=e||"#000",l=t||"#fff";return{colorBgBase:n,colorTextBase:l,colorText:O(l,.85),colorTextSecondary:O(l,.65),colorTextTertiary:O(l,.45),colorTextQuaternary:O(l,.25),colorFill:O(l,.18),colorFillSecondary:O(l,.12),colorFillTertiary:O(l,.08),colorFillQuaternary:O(l,.04),colorBgSolid:O(l,.95),colorBgSolidHover:O(l,1),colorBgSolidActive:O(l,.9),colorBgElevated:j(n,12),colorBgContainer:j(n,8),colorBgLayout:j(n,0),colorBgSpotlight:j(n,26),colorBgBlur:O(l,.04),colorBorder:j(n,26),colorBorderSecondary:j(n,19)}},C={defaultSeed:b.defaultConfig.token,useToken:function(){let[e,t,n]=(0,m.useToken)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:p.default,darkAlgorithm:(e,t)=>{let n=Object.keys(u.defaultPresetColors).map(t=>{let n=(0,y.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,p.default)(e),i=(0,$.default)(e,{generateColorPalettes:x,generateNeutralColorPalettes:S});return Object.assign(Object.assign(Object.assign(Object.assign({},l),n),i),{colorPrimaryBg:i.colorPrimaryBorder,colorPrimaryBgHover:i.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,p.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,h.default)(l)),{controlHeight:i}),(0,f.default)(Object.assign(Object.assign({},n),{controlHeight:i})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):c.default,n=Object.assign(Object.assign({},u.default),null==e?void 0:e.token);return(0,d.getComputedToken)(n,{override:null==e?void 0:e.token},t,g.default)},defaultConfig:b.defaultConfig,_internalContext:b.DesignTokenContext};e.s(["theme",0,C],368869);var E=e.i(270377),w=e.i(271645);function z({isOpen:e,title:s,alertMessage:d,message:c,resourceInformationTitle:u,resourceInformation:g,onCancel:b,onOk:m,confirmLoading:p,requiredConfirmation:f}){let{Title:h,Text:y}=o.Typography,{token:$}=C.useToken(),[v,O]=(0,w.useState)("");return(0,w.useEffect)(()=>{e&&O("")},[e]),(0,t.jsx)(r.Modal,{title:s,open:e,onOk:m,onCancel:b,confirmLoading:p,okText:p?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!f&&v!==f||p},cancelButtonProps:{disabled:p},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(n.Alert,{message:d,type:"warning"}),(0,t.jsx)(l.Card,{title:u,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder}},style:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder},children:(0,t.jsx)(i.Descriptions,{column:1,size:"small",children:g&&g.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)(y,{...l,children:n??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(y,{children:c})}),f&&(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:f}),(0,t.jsx)(y,{children:" to confirm deletion:"})]}),(0,t.jsx)(a.Input,{value:v,onChange:e=>O(e.target.value),placeholder:f,className:"rounded-md",prefix:(0,t.jsx)(E.ExclamationCircleOutlined,{style:{color:$.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>z],127952)},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 diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a61a87ca92d576e9.js b/litellm/proxy/_experimental/out/_next/static/chunks/a61a87ca92d576e9.js deleted file mode 100644 index aaa02096c9..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/a61a87ca92d576e9.js +++ /dev/null @@ -1,420 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,755151,e=>{"use strict";var t=e.i(247153);e.s(["DownOutlined",()=>t.default])},916925,e=>{"use strict";var t,i=((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 Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",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.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);let a={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",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"},r="../ui/assets/logos/",o={"A2A Agent":`${r}a2a_agent.png`,Ai21:`${r}ai21.svg`,"Ai21 Chat":`${r}ai21.svg`,"AI/ML API":`${r}aiml_api.svg`,"Aiohttp Openai":`${r}openai_small.svg`,Anthropic:`${r}anthropic.svg`,"Anthropic Text":`${r}anthropic.svg`,AssemblyAI:`${r}assemblyai_small.png`,Azure:`${r}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${r}microsoft_azure.svg`,"Azure Text":`${r}microsoft_azure.svg`,Baseten:`${r}baseten.svg`,"Amazon Bedrock":`${r}bedrock.svg`,"Amazon Bedrock Mantle":`${r}bedrock.svg`,"AWS SageMaker":`${r}bedrock.svg`,Cerebras:`${r}cerebras.svg`,Cloudflare:`${r}cloudflare.svg`,Codestral:`${r}mistral.svg`,Cohere:`${r}cohere.svg`,"Cohere Chat":`${r}cohere.svg`,Cometapi:`${r}cometapi.svg`,Cursor:`${r}cursor.svg`,"Databricks (Qwen API)":`${r}databricks.svg`,Dashscope:`${r}dashscope.svg`,Deepseek:`${r}deepseek.svg`,Deepgram:`${r}deepgram.png`,DeepInfra:`${r}deepinfra.png`,ElevenLabs:`${r}elevenlabs.png`,"Fal AI":`${r}fal_ai.jpg`,"Featherless Ai":`${r}featherless.svg`,"Fireworks AI":`${r}fireworks.svg`,Friendliai:`${r}friendli.svg`,"Github Copilot":`${r}github_copilot.svg`,"Google AI Studio":`${r}google.svg`,GradientAI:`${r}gradientai.svg`,Groq:`${r}groq.svg`,vllm:`${r}vllm.png`,Huggingface:`${r}huggingface.svg`,Hyperbolic:`${r}hyperbolic.svg`,Infinity:`${r}infinity.png`,"Jina AI":`${r}jina.png`,"Lambda Ai":`${r}lambda.svg`,"Lm Studio":`${r}lmstudio.svg`,"Meta Llama":`${r}meta_llama.svg`,MiniMax:`${r}minimax.svg`,"Mistral AI":`${r}mistral.svg`,Moonshot:`${r}moonshot.svg`,Morph:`${r}morph.svg`,Nebius:`${r}nebius.svg`,Novita:`${r}novita.svg`,"Nvidia Nim":`${r}nvidia_nim.svg`,Ollama:`${r}ollama.svg`,"Ollama Chat":`${r}ollama.svg`,Oobabooga:`${r}openai_small.svg`,OpenAI:`${r}openai_small.svg`,"Openai Like":`${r}openai_small.svg`,"OpenAI Text Completion":`${r}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${r}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${r}openai_small.svg`,Openrouter:`${r}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${r}oracle.svg`,Perplexity:`${r}perplexity-ai.svg`,Recraft:`${r}recraft.svg`,Replicate:`${r}replicate.svg`,RunwayML:`${r}runwayml.png`,Sagemaker:`${r}bedrock.svg`,Sambanova:`${r}sambanova.svg`,"SAP Generative AI Hub":`${r}sap.png`,Snowflake:`${r}snowflake.svg`,"Text-Completion-Codestral":`${r}mistral.svg`,TogetherAI:`${r}togetherai.svg`,Topaz:`${r}topaz.svg`,Triton:`${r}nvidia_triton.png`,V0:`${r}v0.svg`,"Vercel Ai Gateway":`${r}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${r}google.svg`,"Vertex Ai Beta":`${r}google.svg`,Vllm:`${r}vllm.png`,VolcEngine:`${r}volcengine.png`,"Voyage AI":`${r}voyage.webp`,Watsonx:`${r}watsonx.svg`,"Watsonx Text":`${r}watsonx.svg`,xAI:`${r}xai.svg`,Xinference:`${r}xinference.svg`};e.s(["Providers",()=>i,"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 return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:o[e],displayName:e}}let t=Object.keys(a).find(t=>a[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let r=i[t];return{logo:o[r],displayName:r}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let i=a[e];console.log(`Provider mapped to: ${i}`);let r=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let a=t.litellm_provider;(a===i||"string"==typeof a&&a.includes(i))&&r.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&r.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&r.push(e)}))),r},"providerLogoMap",0,o,"provider_map",0,a])},115571,e=>{"use strict";let t="local-storage-change";function i(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))}function a(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}}function r(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}function o(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}}e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",()=>i,"getLocalStorageItem",()=>a,"removeLocalStorageItem",()=>o,"setLocalStorageItem",()=>r])},596239,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:"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 r=e.i(9583),o=i.forwardRef(function(e,o){return i.createElement(r.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["LinkOutlined",0,o],596239)},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},798496,e=>{"use strict";var t=e.i(843476),i=e.i(152990),a=e.i(682830),r=e.i(271645),o=e.i(269200),n=e.i(427612),l=e.i(64848),s=e.i(942232),d=e.i(496020),c=e.i(977572),p=e.i(94629),u=e.i(360820),g=e.i(871943);function m({data:e=[],columns:m,isLoading:f=!1,defaultSorting:h=[],pagination:_,onPaginationChange:x,enablePagination:v=!1,onRowClick:b}){let[A,y]=r.default.useState(h),[I]=r.default.useState("onChange"),[w,E]=r.default.useState({}),[C,S]=r.default.useState({}),O=(0,i.useReactTable)({data:e,columns:m,state:{sorting:A,columnSizing:w,columnVisibility:C,...v&&_?{pagination:_}:{}},columnResizeMode:I,onSortingChange:y,onColumnSizingChange:E,onColumnVisibilityChange:S,...v&&x?{onPaginationChange:x}:{},getCoreRowModel:(0,a.getCoreRowModel)(),getSortedRowModel:(0,a.getSortedRowModel)(),...v?{getPaginationRowModel:(0,a.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(o.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:O.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(n.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(d.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(l.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,i.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(u.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(g.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(p.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(s.TableBody,{children:f?(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):O.getRowModel().rows.length>0?O.getRowModel().rows.map(e=>(0,t.jsx)(d.TableRow,{onClick:()=>b?.(e.original),className:b?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,i.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>m])},771674,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:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var r=e.i(9583),o=i.forwardRef(function(e,o){return i.createElement(r.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["UserOutlined",0,o],771674)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),o=i.forwardRef(function(e,o){return i.createElement(r.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["ArrowLeftOutlined",0,o],447566)},948401,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:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var r=e.i(9583),o=i.forwardRef(function(e,o){return i.createElement(r.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["MailOutlined",0,o],948401)},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,i],94629)},389083,e=>{"use strict";var t=e.i(290571),i=e.i(271645),a=e.i(829087),r=e.i(480731),o=e.i(95779),n=e.i(444755),l=e.i(673706);let s={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,l.makeClassName)("Badge"),p=i.default.forwardRef((e,p)=>{let{color:u,icon:g,size:m=r.Sizes.SM,tooltip:f,className:h,children:_}=e,x=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),v=g||null,{tooltipProps:b,getReferenceProps:A}=(0,a.useTooltip)();return i.default.createElement("span",Object.assign({ref:(0,l.mergeRefs)([p,b.refs.setReference]),className:(0,n.tremorTwMerge)(c("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",u?(0,n.tremorTwMerge)((0,l.getColorClassNames)(u,o.colorPalette.background).bgColor,(0,l.getColorClassNames)(u,o.colorPalette.iconText).textColor,(0,l.getColorClassNames)(u,o.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,n.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"),s[m].paddingX,s[m].paddingY,s[m].fontSize,h)},A,x),i.default.createElement(a.default,Object.assign({text:f},b)),v?i.default.createElement(v,{className:(0,n.tremorTwMerge)(c("icon"),"shrink-0 -ml-1 mr-1.5",d[m].height,d[m].width)}):null,i.default.createElement("span",{className:(0,n.tremorTwMerge)(c("text"),"whitespace-nowrap")},_))});p.displayName="Badge",e.s(["Badge",()=>p],389083)},360820,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:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,i],360820)},871943,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 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,i],871943)},629569,e=>{"use strict";var t=e.i(290571),i=e.i(95779),a=e.i(444755),r=e.i(673706),o=e.i(271645);let n=o.default.forwardRef((e,n)=>{let{color:l,children:s,className:d}=e,c=(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",l?(0,r.getColorClassNames)(l,i.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",d)},c),s)});n.displayName="Title",e.s(["Title",()=>n],629569)},56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},434626,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 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,i],434626)},100486,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:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"};var r=e.i(9583),o=i.forwardRef(function(e,o){return i.createElement(r.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["CrownOutlined",0,o],100486)},818581,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"useMergedRef",{enumerable:!0,get:function(){return r}});let a=e.r(271645);function r(e,t){let i=(0,a.useRef)(null),r=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=i.current;e&&(i.current=null,e());let t=r.current;t&&(r.current=null,t())}else e&&(i.current=o(e,a)),t&&(r.current=o(t,a))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let i=e(t);return"function"==typeof i?i:()=>e(null)}}("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},62478,e=>{"use strict";var t=e.i(764205);let i=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,i])},602073,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"};var r=e.i(9583),o=i.forwardRef(function(e,o){return i.createElement(r.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["SafetyOutlined",0,o],602073)},190272,785913,e=>{"use strict";var t,i,a=((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),r=((i={}).IMAGE="image",i.VIDEO="video",i.CHAT="chat",i.RESPONSES="responses",i.IMAGE_EDITS="image_edits",i.ANTHROPIC_MESSAGES="anthropic_messages",i.EMBEDDINGS="embeddings",i.SPEECH="speech",i.TRANSCRIPTION="transcription",i.A2A_AGENTS="a2a_agents",i.MCP="mcp",i.REALTIME="realtime",i);let o={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",()=>r,"getEndpointType",0,e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let t=o[e];return console.log("endpointType:",t),t}return"chat"}],785913),e.s(["generateCodeSnippet",0,e=>{let t,{apiKeySource:i,accessToken:a,apiKey:o,inputMessage:n,chatHistory:l,selectedTags:s,selectedVectorStores:d,selectedGuardrails:c,selectedPolicies:p,selectedMCPServers:u,mcpServers:g,mcpServerToolRestrictions:m,selectedVoice:f,endpointType:h,selectedModel:_,selectedSdk:x,proxySettings:v}=e,b="session"===i?a:o,A=window.location.origin,y=v?.LITELLM_UI_API_DOC_BASE_URL;y&&y.trim()?A=y:v?.PROXY_BASE_URL&&(A=v.PROXY_BASE_URL);let I=n||"Your prompt here",w=I.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),E=l.filter(e=>!e.isImage).map(({role:e,content:t})=>({role:e,content:t})),C={};s.length>0&&(C.tags=s),d.length>0&&(C.vector_stores=d),c.length>0&&(C.guardrails=c),p.length>0&&(C.policies=p);let S=_||"your-model-name",O="azure"===x?`import openai - -client = openai.AzureOpenAI( - api_key="${b||"YOUR_LITELLM_API_KEY"}", - azure_endpoint="${A}", - api_version="2024-02-01" -)`:`import openai - -client = openai.OpenAI( - api_key="${b||"YOUR_LITELLM_API_KEY"}", - base_url="${A}" -)`;switch(h){case r.CHAT:{let e=Object.keys(C).length>0,i="";if(e){let e=JSON.stringify({metadata:C},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();i=`, - extra_body=${e}`}let a=E.length>0?E:[{role:"user",content:I}];t=` -import base64 - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Example with text only -response = client.chat.completions.create( - model="${S}", - messages=${JSON.stringify(a,null,4)}${i} -) - -print(response) - -# Example with image or PDF (uncomment and provide file path to use) -# base64_file = encode_image("path/to/your/file.jpg") # or .pdf -# response_with_file = client.chat.completions.create( -# model="${S}", -# messages=[ -# { -# "role": "user", -# "content": [ -# { -# "type": "text", -# "text": "${w}" -# }, -# { -# "type": "image_url", -# "image_url": { -# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file} -# } -# } -# ] -# } -# ]${i} -# ) -# print(response_with_file) -`;break}case r.RESPONSES:{let e=Object.keys(C).length>0,i="";if(e){let e=JSON.stringify({metadata:C},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();i=`, - extra_body=${e}`}let a=E.length>0?E:[{role:"user",content:I}];t=` -import base64 - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Example with text only -response = client.responses.create( - model="${S}", - input=${JSON.stringify(a,null,4)}${i} -) - -print(response.output_text) - -# Example with image or PDF (uncomment and provide file path to use) -# base64_file = encode_image("path/to/your/file.jpg") # or .pdf -# response_with_file = client.responses.create( -# model="${S}", -# input=[ -# { -# "role": "user", -# "content": [ -# {"type": "input_text", "text": "${w}"}, -# { -# "type": "input_image", -# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file} -# }, -# ], -# } -# ]${i} -# ) -# print(response_with_file.output_text) -`;break}case r.IMAGE:t="azure"===x?` -# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI. -# This snippet uses 'client.images.generate' and will create a new image based on your prompt. -# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context. -import os -import requests -import json -import time -from PIL import Image - -result = client.images.generate( - model="${S}", - prompt="${n}", - n=1 -) - -json_response = json.loads(result.model_dump_json()) - -# Set the directory for the stored image -image_dir = os.path.join(os.curdir, 'images') - -# If the directory doesn't exist, create it -if not os.path.isdir(image_dir): - os.mkdir(image_dir) - -# Initialize the image path -image_filename = f"generated_image_{int(time.time())}.png" -image_path = os.path.join(image_dir, image_filename) - -try: - # Retrieve the generated image - if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"): - image_url = json_response["data"][0]["url"] - generated_image = requests.get(image_url).content - with open(image_path, "wb") as image_file: - image_file.write(generated_image) - - print(f"Image saved to {image_path}") - # Display the image - image = Image.open(image_path) - image.show() - else: - print("Could not find image URL in response.") - print("Full response:", json_response) -except Exception as e: - print(f"An error occurred: {e}") - print("Full response:", json_response) -`:` -import base64 -import os -import time -import json -from PIL import Image -import requests - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Helper function to create a file (simplified for this example) -def create_file(image_path): - # In a real implementation, this would upload the file to OpenAI - # For this example, we'll just return a placeholder ID - return f"file_{os.path.basename(image_path).replace('.', '_')}" - -# The prompt entered by the user -prompt = "${w}" - -# Encode images to base64 -base64_image1 = encode_image("body-lotion.png") -base64_image2 = encode_image("soap.png") - -# Create file IDs -file_id1 = create_file("body-lotion.png") -file_id2 = create_file("incense-kit.png") - -response = client.responses.create( - model="${S}", - input=[ - { - "role": "user", - "content": [ - {"type": "input_text", "text": prompt}, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image1}", - }, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image2}", - }, - { - "type": "input_image", - "file_id": file_id1, - }, - { - "type": "input_image", - "file_id": file_id2, - } - ], - } - ], - tools=[{"type": "image_generation"}], -) - -# Process the response -image_generation_calls = [ - output - for output in response.output - if output.type == "image_generation_call" -] - -image_data = [output.result for output in image_generation_calls] - -if image_data: - image_base64 = image_data[0] - image_filename = f"edited_image_{int(time.time())}.png" - with open(image_filename, "wb") as f: - f.write(base64.b64decode(image_base64)) - print(f"Image saved to {image_filename}") -else: - # If no image is generated, there might be a text response with an explanation - text_response = [output.text for output in response.output if hasattr(output, 'text')] - if text_response: - print("No image generated. Model response:") - print("\\n".join(text_response)) - else: - print("No image data found in response.") - print("Full response for debugging:") - print(response) -`;break;case r.IMAGE_EDITS:t="azure"===x?` -import base64 -import os -import time -import json -from PIL import Image -import requests - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# The prompt entered by the user -prompt = "${w}" - -# Encode images to base64 -base64_image1 = encode_image("body-lotion.png") -base64_image2 = encode_image("soap.png") - -# Create file IDs -file_id1 = create_file("body-lotion.png") -file_id2 = create_file("incense-kit.png") - -response = client.responses.create( - model="${S}", - input=[ - { - "role": "user", - "content": [ - {"type": "input_text", "text": prompt}, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image1}", - }, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image2}", - }, - { - "type": "input_image", - "file_id": file_id1, - }, - { - "type": "input_image", - "file_id": file_id2, - } - ], - } - ], - tools=[{"type": "image_generation"}], -) - -# Process the response -image_generation_calls = [ - output - for output in response.output - if output.type == "image_generation_call" -] - -image_data = [output.result for output in image_generation_calls] - -if image_data: - image_base64 = image_data[0] - image_filename = f"edited_image_{int(time.time())}.png" - with open(image_filename, "wb") as f: - f.write(base64.b64decode(image_base64)) - print(f"Image saved to {image_filename}") -else: - # If no image is generated, there might be a text response with an explanation - text_response = [output.text for output in response.output if hasattr(output, 'text')] - if text_response: - print("No image generated. Model response:") - print("\\n".join(text_response)) - else: - print("No image data found in response.") - print("Full response for debugging:") - print(response) -`:` -import base64 -import os -import time - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Helper function to create a file (simplified for this example) -def create_file(image_path): - # In a real implementation, this would upload the file to OpenAI - # For this example, we'll just return a placeholder ID - return f"file_{os.path.basename(image_path).replace('.', '_')}" - -# The prompt entered by the user -prompt = "${w}" - -# Encode images to base64 -base64_image1 = encode_image("body-lotion.png") -base64_image2 = encode_image("soap.png") - -# Create file IDs -file_id1 = create_file("body-lotion.png") -file_id2 = create_file("incense-kit.png") - -response = client.responses.create( - model="${S}", - input=[ - { - "role": "user", - "content": [ - {"type": "input_text", "text": prompt}, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image1}", - }, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image2}", - }, - { - "type": "input_image", - "file_id": file_id1, - }, - { - "type": "input_image", - "file_id": file_id2, - } - ], - } - ], - tools=[{"type": "image_generation"}], -) - -# Process the response -image_generation_calls = [ - output - for output in response.output - if output.type == "image_generation_call" -] - -image_data = [output.result for output in image_generation_calls] - -if image_data: - image_base64 = image_data[0] - image_filename = f"edited_image_{int(time.time())}.png" - with open(image_filename, "wb") as f: - f.write(base64.b64decode(image_base64)) - print(f"Image saved to {image_filename}") -else: - # If no image is generated, there might be a text response with an explanation - text_response = [output.text for output in response.output if hasattr(output, 'text')] - if text_response: - print("No image generated. Model response:") - print("\\n".join(text_response)) - else: - print("No image data found in response.") - print("Full response for debugging:") - print(response) -`;break;case r.EMBEDDINGS:t=` -response = client.embeddings.create( - input="${n||"Your string here"}", - model="${S}", - encoding_format="base64" # or "float" -) - -print(response.data[0].embedding) -`;break;case r.TRANSCRIPTION:t=` -# Open the audio file -audio_file = open("path/to/your/audio/file.mp3", "rb") - -# Make the transcription request -response = client.audio.transcriptions.create( - model="${S}", - file=audio_file${n?`, - prompt="${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} -) - -print(response.text) -`;break;case r.SPEECH:t=` -# Make the text-to-speech request -response = client.audio.speech.create( - model="${S}", - input="${n||"Your text to convert to speech here"}", - voice="${f}" # Options: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer -) - -# Save the audio to a file -output_filename = "output_speech.mp3" -response.stream_to_file(output_filename) -print(f"Audio saved to {output_filename}") - -# Optional: Customize response format and speed -# response = client.audio.speech.create( -# model="${S}", -# input="${n||"Your text to convert to speech here"}", -# voice="alloy", -# response_format="mp3", # Options: mp3, opus, aac, flac, wav, pcm -# speed=1.0 # Range: 0.25 to 4.0 -# ) -# response.stream_to_file("output_speech.mp3") -`;break;default:t="\n# Code generation for this endpoint is not implemented yet."}return`${O} -${t}`}],190272)},652272,209261,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(447566),r=e.i(166406),o=e.i(492030),n=e.i(596239);let l=e=>"github"===e.source.source&&e.source.repo?`/plugin marketplace add ${e.source.repo}`:"url"===e.source.source&&e.source.url?`/plugin marketplace add ${e.source.url}`:`/plugin marketplace add ${e.name}`;e.s(["formatInstallCommand",0,l,"getCategoryBadgeColor",0,e=>{if(!e)return"gray";let t=e.toLowerCase();if(t.includes("development")||t.includes("dev"))return"blue";if(t.includes("productivity")||t.includes("workflow"))return"green";if(t.includes("learning")||t.includes("education"))return"purple";if(t.includes("security")||t.includes("safety"))return"red";if(t.includes("data")||t.includes("analytics"))return"orange";else if(t.includes("integration")||t.includes("api"))return"yellow";return"gray"},"isValidEmail",0,e=>!e||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),"isValidSemanticVersion",0,e=>!e||/^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?$/.test(e),"isValidUrl",0,e=>{if(!e)return!0;try{return new URL(e),!0}catch{return!1}},"parseKeywords",0,e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>""!==e):[],"validatePluginName",0,e=>!!e&&""!==e.trim()&&/^[a-z0-9-]+$/.test(e)],209261),e.s(["default",0,({skill:e,onBack:s})=>{let d,[c,p]=(0,i.useState)("overview"),[u,g]=(0,i.useState)(null),m=(e,t)=>{navigator.clipboard.writeText(e),g(t),setTimeout(()=>g(null),2e3)},f="github"===(d=e.source).source&&d.repo?`https://github.com/${d.repo}`:"git-subdir"===d.source&&d.url?d.path?`${d.url}/tree/main/${d.path}`:d.url:"url"===d.source&&d.url?d.url:null,h=l(e),_=[...e.category?[{property:"Category",value:e.category}]:[],...e.domain?[{property:"Domain",value:e.domain}]:[],...e.namespace?[{property:"Namespace",value:e.namespace}]:[],...e.version?[{property:"Version",value:e.version}]:[],...e.author?.name?[{property:"Author",value:e.author.name}]:[],...e.created_at?[{property:"Added",value:new Date(e.created_at).toLocaleDateString()}]:[]];return(0,t.jsxs)("div",{style:{padding:"24px 32px 24px 0"},children:[(0,t.jsxs)("div",{onClick:s,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(a.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:"Skills"})]}),(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name}),e.description&&(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"8px 0 0 0",lineHeight:1.6},children:e.description})]}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28,marginTop:24},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:[{key:"overview",label:"Overview"},{key:"usage",label:"How to Use"}].map(e=>(0,t.jsx)("div",{onClick:()=>p(e.key),style:{padding:"12px 20px",fontSize:14,color:c===e.key?"#1a73e8":"#5f6368",borderBottom:c===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:c===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===c&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Skill Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Metadata registered with this skill"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:160},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:_.map((e,i)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},i))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Status"}),(0,t.jsx)("span",{style:{fontSize:12,padding:"3px 10px",borderRadius:12,backgroundColor:e.enabled?"#e6f4ea":"#f1f3f4",color:e.enabled?"#137333":"#5f6368",fontWeight:500},children:e.enabled?"Public":"Draft"})]}),f&&(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Source"}),(0,t.jsxs)("a",{href:f,target:"_blank",rel:"noopener noreferrer",style:{fontSize:13,color:"#1a73e8",wordBreak:"break-all",display:"flex",alignItems:"center",gap:4},children:[f.replace("https://",""),(0,t.jsx)(n.LinkOutlined,{style:{fontSize:11,flexShrink:0}})]})]}),e.keywords&&e.keywords.length>0&&(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.keywords.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Skill ID"}),(0,t.jsx)("div",{style:{fontSize:12,fontFamily:"monospace",color:"#3c4043",wordBreak:"break-all"},children:e.id})]})]})]}),"usage"===c&&(0,t.jsxs)("div",{style:{maxWidth:640},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 8px 0"},children:"Using this skill"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 24px 0",lineHeight:1.6},children:"Once your proxy is set as a marketplace, enable this skill in Claude Code with one command:"}),(0,t.jsxs)("div",{style:{border:"1px solid #dadce0",borderRadius:8,overflow:"hidden",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#3c4043",fontWeight:500},children:"Run in Claude Code"}),(0,t.jsxs)("button",{onClick:()=>m(h,"install"),style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"install"===u?"#137333":"#1a73e8",background:"none",border:"none",cursor:"pointer",padding:0},children:["install"===u?(0,t.jsx)(o.CheckOutlined,{}):(0,t.jsx)(r.CopyOutlined,{}),"install"===u?"Copied":"Copy"]})]}),(0,t.jsx)("pre",{style:{margin:0,padding:"14px 16px",fontSize:14,fontFamily:"monospace",color:"#202124",backgroundColor:"#fff"},children:h})]}),(0,t.jsxs)("p",{style:{fontSize:13,color:"#5f6368",lineHeight:1.6,margin:0},children:["Don't have the marketplace configured yet?"," ",(0,t.jsx)("span",{onClick:()=>p("setup"),style:{color:"#1a73e8",cursor:"pointer"},children:"See one-time setup →"})]})]}),"setup"===c&&(0,t.jsxs)("div",{style:{maxWidth:640},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 8px 0"},children:"One-time marketplace setup"}),(0,t.jsxs)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 24px 0",lineHeight:1.6},children:["Add this to ",(0,t.jsx)("code",{style:{fontSize:13,backgroundColor:"#f1f3f4",padding:"1px 6px",borderRadius:4},children:"~/.claude/settings.json"})," to point Claude Code at your proxy:"]}),(0,t.jsxs)("div",{style:{border:"1px solid #dadce0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#3c4043",fontWeight:500},children:"~/.claude/settings.json"}),(0,t.jsxs)("button",{onClick:()=>{m(JSON.stringify({extraKnownMarketplaces:{"my-org":{source:"url",url:`${window.location.origin}/claude-code/marketplace.json`}}},null,2),"settings")},style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"settings"===u?"#137333":"#1a73e8",background:"none",border:"none",cursor:"pointer",padding:0},children:["settings"===u?(0,t.jsx)(o.CheckOutlined,{}):(0,t.jsx)(r.CopyOutlined,{}),"settings"===u?"Copied":"Copy"]})]}),(0,t.jsx)("pre",{style:{margin:0,padding:"14px 16px",fontSize:13,fontFamily:"monospace",color:"#202124",backgroundColor:"#fff"},children:JSON.stringify({extraKnownMarketplaces:{"my-org":{source:"url",url:`${window.location.origin}/claude-code/marketplace.json`}}},null,2)})]})]})]})}],652272)},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",()=>t])},371401,e=>{"use strict";var t=e.i(115571),i=e.i(271645);function a(e){let i=t=>{"disableUsageIndicator"===t.key&&e()},a=t=>{let{key:i}=t.detail;"disableUsageIndicator"===i&&e()};return window.addEventListener("storage",i),window.addEventListener(t.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",i),window.removeEventListener(t.LOCAL_STORAGE_EVENT,a)}}function r(){return"true"===(0,t.getLocalStorageItem)("disableUsageIndicator")}function o(){return(0,i.useSyncExternalStore)(a,r)}e.s(["useDisableUsageIndicator",()=>o])},275144,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(764205);let r=(0,i.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:o})=>{let[n,l]=(0,i.useState)(null),[s,d]=(0,i.useState)(null);return(0,i.useEffect)(()=>{(async()=>{try{let e=(0,a.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",i=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(i.ok){let e=await i.json();e.values?.logo_url&&l(e.values.logo_url),e.values?.favicon_url&&d(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,i.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)(r.Provider,{value:{logoUrl:n,setLogoUrl:l,faviconUrl:s,setFaviconUrl:d},children:e})},"useTheme",0,()=>{let e=(0,i.useContext)(r);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},295320,283713,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:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var r=e.i(9583),o=i.forwardRef(function(e,o){return i.createElement(r.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["CloudServerOutlined",0,o],295320);var n=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,a=e?.workers??[],[r,o]=(0,i.useState)(()=>localStorage.getItem(s));(0,i.useEffect)(()=>{if(!r||0===a.length)return;let e=a.find(e=>e.worker_id===r);e&&(0,n.switchToWorkerUrl)(e.url)},[r,a]);let d=a.find(e=>e.worker_id===r)??null,c=(0,i.useCallback)(e=>{let t=a.find(t=>t.worker_id===e);t&&(o(e),localStorage.setItem(s,e),(0,n.switchToWorkerUrl)(t.url))},[a]);return{isControlPlane:t,workers:a,selectedWorkerId:r,selectedWorker:d,selectWorker:c,disconnectFromWorker:(0,i.useCallback)(()=>{o(null),localStorage.removeItem(s),(0,n.switchToWorkerUrl)(null)},[])}}],283713)},44121,186515,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:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var r=e.i(9583),o=i.forwardRef(function(e,o){return i.createElement(r.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["MenuFoldOutlined",0,o],44121);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var l=i.forwardRef(function(e,a){return i.createElement(r.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["MenuUnfoldOutlined",0,l],186515)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/aa7c40f46cb1b417.js b/litellm/proxy/_experimental/out/_next/static/chunks/aa7c40f46cb1b417.js deleted file mode 100644 index 4548f2db26..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/aa7c40f46cb1b417.js +++ /dev/null @@ -1,420 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,652272,209261,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(447566),o=e.i(166406),r=e.i(492030),n=e.i(596239);let l=e=>"github"===e.source.source&&e.source.repo?`/plugin marketplace add ${e.source.repo}`:"url"===e.source.source&&e.source.url?`/plugin marketplace add ${e.source.url}`:`/plugin marketplace add ${e.name}`;e.s(["formatInstallCommand",0,l,"getCategoryBadgeColor",0,e=>{if(!e)return"gray";let t=e.toLowerCase();if(t.includes("development")||t.includes("dev"))return"blue";if(t.includes("productivity")||t.includes("workflow"))return"green";if(t.includes("learning")||t.includes("education"))return"purple";if(t.includes("security")||t.includes("safety"))return"red";if(t.includes("data")||t.includes("analytics"))return"orange";else if(t.includes("integration")||t.includes("api"))return"yellow";return"gray"},"isValidEmail",0,e=>!e||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),"isValidSemanticVersion",0,e=>!e||/^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?$/.test(e),"isValidUrl",0,e=>{if(!e)return!0;try{return new URL(e),!0}catch{return!1}},"parseKeywords",0,e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>""!==e):[],"validatePluginName",0,e=>!!e&&""!==e.trim()&&/^[a-z0-9-]+$/.test(e)],209261),e.s(["default",0,({skill:e,onBack:s})=>{let d,[c,p]=(0,i.useState)("overview"),[g,u]=(0,i.useState)(null),m=(e,t)=>{navigator.clipboard.writeText(e),u(t),setTimeout(()=>u(null),2e3)},f="github"===(d=e.source).source&&d.repo?`https://github.com/${d.repo}`:"git-subdir"===d.source&&d.url?d.path?`${d.url}/tree/main/${d.path}`:d.url:"url"===d.source&&d.url?d.url:null,h=l(e),_=[...e.category?[{property:"Category",value:e.category}]:[],...e.domain?[{property:"Domain",value:e.domain}]:[],...e.namespace?[{property:"Namespace",value:e.namespace}]:[],...e.version?[{property:"Version",value:e.version}]:[],...e.author?.name?[{property:"Author",value:e.author.name}]:[],...e.created_at?[{property:"Added",value:new Date(e.created_at).toLocaleDateString()}]:[]];return(0,t.jsxs)("div",{style:{padding:"24px 32px 24px 0"},children:[(0,t.jsxs)("div",{onClick:s,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(a.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:"Skills"})]}),(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name}),e.description&&(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"8px 0 0 0",lineHeight:1.6},children:e.description})]}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28,marginTop:24},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:[{key:"overview",label:"Overview"},{key:"usage",label:"How to Use"}].map(e=>(0,t.jsx)("div",{onClick:()=>p(e.key),style:{padding:"12px 20px",fontSize:14,color:c===e.key?"#1a73e8":"#5f6368",borderBottom:c===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:c===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===c&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Skill Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Metadata registered with this skill"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:160},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:_.map((e,i)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},i))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Status"}),(0,t.jsx)("span",{style:{fontSize:12,padding:"3px 10px",borderRadius:12,backgroundColor:e.enabled?"#e6f4ea":"#f1f3f4",color:e.enabled?"#137333":"#5f6368",fontWeight:500},children:e.enabled?"Public":"Draft"})]}),f&&(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Source"}),(0,t.jsxs)("a",{href:f,target:"_blank",rel:"noopener noreferrer",style:{fontSize:13,color:"#1a73e8",wordBreak:"break-all",display:"flex",alignItems:"center",gap:4},children:[f.replace("https://",""),(0,t.jsx)(n.LinkOutlined,{style:{fontSize:11,flexShrink:0}})]})]}),e.keywords&&e.keywords.length>0&&(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.keywords.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Skill ID"}),(0,t.jsx)("div",{style:{fontSize:12,fontFamily:"monospace",color:"#3c4043",wordBreak:"break-all"},children:e.id})]})]})]}),"usage"===c&&(0,t.jsxs)("div",{style:{maxWidth:640},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 8px 0"},children:"Using this skill"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 24px 0",lineHeight:1.6},children:"Once your proxy is set as a marketplace, enable this skill in Claude Code with one command:"}),(0,t.jsxs)("div",{style:{border:"1px solid #dadce0",borderRadius:8,overflow:"hidden",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#3c4043",fontWeight:500},children:"Run in Claude Code"}),(0,t.jsxs)("button",{onClick:()=>m(h,"install"),style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"install"===g?"#137333":"#1a73e8",background:"none",border:"none",cursor:"pointer",padding:0},children:["install"===g?(0,t.jsx)(r.CheckOutlined,{}):(0,t.jsx)(o.CopyOutlined,{}),"install"===g?"Copied":"Copy"]})]}),(0,t.jsx)("pre",{style:{margin:0,padding:"14px 16px",fontSize:14,fontFamily:"monospace",color:"#202124",backgroundColor:"#fff"},children:h})]}),(0,t.jsxs)("p",{style:{fontSize:13,color:"#5f6368",lineHeight:1.6,margin:0},children:["Don't have the marketplace configured yet?"," ",(0,t.jsx)("span",{onClick:()=>p("setup"),style:{color:"#1a73e8",cursor:"pointer"},children:"See one-time setup →"})]})]}),"setup"===c&&(0,t.jsxs)("div",{style:{maxWidth:640},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 8px 0"},children:"One-time marketplace setup"}),(0,t.jsxs)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 24px 0",lineHeight:1.6},children:["Add this to ",(0,t.jsx)("code",{style:{fontSize:13,backgroundColor:"#f1f3f4",padding:"1px 6px",borderRadius:4},children:"~/.claude/settings.json"})," to point Claude Code at your proxy:"]}),(0,t.jsxs)("div",{style:{border:"1px solid #dadce0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("span",{style:{fontSize:13,color:"#3c4043",fontWeight:500},children:"~/.claude/settings.json"}),(0,t.jsxs)("button",{onClick:()=>{m(JSON.stringify({extraKnownMarketplaces:{"my-org":{source:"url",url:`${window.location.origin}/claude-code/marketplace.json`}}},null,2),"settings")},style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"settings"===g?"#137333":"#1a73e8",background:"none",border:"none",cursor:"pointer",padding:0},children:["settings"===g?(0,t.jsx)(r.CheckOutlined,{}):(0,t.jsx)(o.CopyOutlined,{}),"settings"===g?"Copied":"Copy"]})]}),(0,t.jsx)("pre",{style:{margin:0,padding:"14px 16px",fontSize:13,fontFamily:"monospace",color:"#202124",backgroundColor:"#fff"},children:JSON.stringify({extraKnownMarketplaces:{"my-org":{source:"url",url:`${window.location.origin}/claude-code/marketplace.json`}}},null,2)})]})]})]})}],652272)},115571,e=>{"use strict";let t="local-storage-change";function i(e){window.dispatchEvent(new CustomEvent(t,{detail:{key:e}}))}function a(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn(`Error reading localStorage key "${e}":`,t),null}}function o(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn(`Error setting localStorage key "${e}":`,t)}}function r(e){try{window.localStorage.removeItem(e)}catch(t){console.warn(`Error removing localStorage key "${e}":`,t)}}e.s(["LOCAL_STORAGE_EVENT",0,t,"emitLocalStorageChange",()=>i,"getLocalStorageItem",()=>a,"removeLocalStorageItem",()=>r,"setLocalStorageItem",()=>o])},596239,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:"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 o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["LinkOutlined",0,r],596239)},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},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",()=>t])},798496,e=>{"use strict";var t=e.i(843476),i=e.i(152990),a=e.i(682830),o=e.i(271645),r=e.i(269200),n=e.i(427612),l=e.i(64848),s=e.i(942232),d=e.i(496020),c=e.i(977572),p=e.i(94629),g=e.i(360820),u=e.i(871943);function m({data:e=[],columns:m,isLoading:f=!1,defaultSorting:h=[],pagination:_,onPaginationChange:A,enablePagination:b=!1,onRowClick:v}){let[x,y]=o.default.useState(h),[I]=o.default.useState("onChange"),[E,C]=o.default.useState({}),[S,O]=o.default.useState({}),w=(0,i.useReactTable)({data:e,columns:m,state:{sorting:x,columnSizing:E,columnVisibility:S,...b&&_?{pagination:_}:{}},columnResizeMode:I,onSortingChange:y,onColumnSizingChange:C,onColumnVisibilityChange:O,...b&&A?{onPaginationChange:A}:{},getCoreRowModel:(0,a.getCoreRowModel)(),getSortedRowModel:(0,a.getSortedRowModel)(),...b?{getPaginationRowModel:(0,a.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(r.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:w.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(n.TableHead,{children:w.getHeaderGroups().map(e=>(0,t.jsx)(d.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(l.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,i.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(g.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(u.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(p.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(s.TableBody,{children:f?(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):w.getRowModel().rows.length>0?w.getRowModel().rows.map(e=>(0,t.jsx)(d.TableRow,{onClick:()=>v?.(e.original),className:v?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,i.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>m])},818581,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"useMergedRef",{enumerable:!0,get:function(){return o}});let a=e.r(271645);function o(e,t){let i=(0,a.useRef)(null),o=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=i.current;e&&(i.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(i.current=r(e,a)),t&&(o.current=r(t,a))},[e,t])}function r(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let i=e(t);return"function"==typeof i?i:()=>e(null)}}("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},62478,e=>{"use strict";var t=e.i(764205);let i=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,i])},602073,e=>{"use strict";e.i(247167);var t=e.i(931067),i=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["SafetyOutlined",0,r],602073)},190272,785913,e=>{"use strict";var t,i,a=((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),o=((i={}).IMAGE="image",i.VIDEO="video",i.CHAT="chat",i.RESPONSES="responses",i.IMAGE_EDITS="image_edits",i.ANTHROPIC_MESSAGES="anthropic_messages",i.EMBEDDINGS="embeddings",i.SPEECH="speech",i.TRANSCRIPTION="transcription",i.A2A_AGENTS="a2a_agents",i.MCP="mcp",i.REALTIME="realtime",i);let r={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",()=>o,"getEndpointType",0,e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let t=r[e];return console.log("endpointType:",t),t}return"chat"}],785913),e.s(["generateCodeSnippet",0,e=>{let t,{apiKeySource:i,accessToken:a,apiKey:r,inputMessage:n,chatHistory:l,selectedTags:s,selectedVectorStores:d,selectedGuardrails:c,selectedPolicies:p,selectedMCPServers:g,mcpServers:u,mcpServerToolRestrictions:m,selectedVoice:f,endpointType:h,selectedModel:_,selectedSdk:A,proxySettings:b}=e,v="session"===i?a:r,x=window.location.origin,y=b?.LITELLM_UI_API_DOC_BASE_URL;y&&y.trim()?x=y:b?.PROXY_BASE_URL&&(x=b.PROXY_BASE_URL);let I=n||"Your prompt here",E=I.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),C=l.filter(e=>!e.isImage).map(({role:e,content:t})=>({role:e,content:t})),S={};s.length>0&&(S.tags=s),d.length>0&&(S.vector_stores=d),c.length>0&&(S.guardrails=c),p.length>0&&(S.policies=p);let O=_||"your-model-name",w="azure"===A?`import openai - -client = openai.AzureOpenAI( - api_key="${v||"YOUR_LITELLM_API_KEY"}", - azure_endpoint="${x}", - api_version="2024-02-01" -)`:`import openai - -client = openai.OpenAI( - api_key="${v||"YOUR_LITELLM_API_KEY"}", - base_url="${x}" -)`;switch(h){case o.CHAT:{let e=Object.keys(S).length>0,i="";if(e){let e=JSON.stringify({metadata:S},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();i=`, - extra_body=${e}`}let a=C.length>0?C:[{role:"user",content:I}];t=` -import base64 - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Example with text only -response = client.chat.completions.create( - model="${O}", - messages=${JSON.stringify(a,null,4)}${i} -) - -print(response) - -# Example with image or PDF (uncomment and provide file path to use) -# base64_file = encode_image("path/to/your/file.jpg") # or .pdf -# response_with_file = client.chat.completions.create( -# model="${O}", -# messages=[ -# { -# "role": "user", -# "content": [ -# { -# "type": "text", -# "text": "${E}" -# }, -# { -# "type": "image_url", -# "image_url": { -# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file} -# } -# } -# ] -# } -# ]${i} -# ) -# print(response_with_file) -`;break}case o.RESPONSES:{let e=Object.keys(S).length>0,i="";if(e){let e=JSON.stringify({metadata:S},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();i=`, - extra_body=${e}`}let a=C.length>0?C:[{role:"user",content:I}];t=` -import base64 - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Example with text only -response = client.responses.create( - model="${O}", - input=${JSON.stringify(a,null,4)}${i} -) - -print(response.output_text) - -# Example with image or PDF (uncomment and provide file path to use) -# base64_file = encode_image("path/to/your/file.jpg") # or .pdf -# response_with_file = client.responses.create( -# model="${O}", -# input=[ -# { -# "role": "user", -# "content": [ -# {"type": "input_text", "text": "${E}"}, -# { -# "type": "input_image", -# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file} -# }, -# ], -# } -# ]${i} -# ) -# print(response_with_file.output_text) -`;break}case o.IMAGE:t="azure"===A?` -# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI. -# This snippet uses 'client.images.generate' and will create a new image based on your prompt. -# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context. -import os -import requests -import json -import time -from PIL import Image - -result = client.images.generate( - model="${O}", - prompt="${n}", - n=1 -) - -json_response = json.loads(result.model_dump_json()) - -# Set the directory for the stored image -image_dir = os.path.join(os.curdir, 'images') - -# If the directory doesn't exist, create it -if not os.path.isdir(image_dir): - os.mkdir(image_dir) - -# Initialize the image path -image_filename = f"generated_image_{int(time.time())}.png" -image_path = os.path.join(image_dir, image_filename) - -try: - # Retrieve the generated image - if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"): - image_url = json_response["data"][0]["url"] - generated_image = requests.get(image_url).content - with open(image_path, "wb") as image_file: - image_file.write(generated_image) - - print(f"Image saved to {image_path}") - # Display the image - image = Image.open(image_path) - image.show() - else: - print("Could not find image URL in response.") - print("Full response:", json_response) -except Exception as e: - print(f"An error occurred: {e}") - print("Full response:", json_response) -`:` -import base64 -import os -import time -import json -from PIL import Image -import requests - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Helper function to create a file (simplified for this example) -def create_file(image_path): - # In a real implementation, this would upload the file to OpenAI - # For this example, we'll just return a placeholder ID - return f"file_{os.path.basename(image_path).replace('.', '_')}" - -# The prompt entered by the user -prompt = "${E}" - -# Encode images to base64 -base64_image1 = encode_image("body-lotion.png") -base64_image2 = encode_image("soap.png") - -# Create file IDs -file_id1 = create_file("body-lotion.png") -file_id2 = create_file("incense-kit.png") - -response = client.responses.create( - model="${O}", - input=[ - { - "role": "user", - "content": [ - {"type": "input_text", "text": prompt}, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image1}", - }, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image2}", - }, - { - "type": "input_image", - "file_id": file_id1, - }, - { - "type": "input_image", - "file_id": file_id2, - } - ], - } - ], - tools=[{"type": "image_generation"}], -) - -# Process the response -image_generation_calls = [ - output - for output in response.output - if output.type == "image_generation_call" -] - -image_data = [output.result for output in image_generation_calls] - -if image_data: - image_base64 = image_data[0] - image_filename = f"edited_image_{int(time.time())}.png" - with open(image_filename, "wb") as f: - f.write(base64.b64decode(image_base64)) - print(f"Image saved to {image_filename}") -else: - # If no image is generated, there might be a text response with an explanation - text_response = [output.text for output in response.output if hasattr(output, 'text')] - if text_response: - print("No image generated. Model response:") - print("\\n".join(text_response)) - else: - print("No image data found in response.") - print("Full response for debugging:") - print(response) -`;break;case o.IMAGE_EDITS:t="azure"===A?` -import base64 -import os -import time -import json -from PIL import Image -import requests - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# The prompt entered by the user -prompt = "${E}" - -# Encode images to base64 -base64_image1 = encode_image("body-lotion.png") -base64_image2 = encode_image("soap.png") - -# Create file IDs -file_id1 = create_file("body-lotion.png") -file_id2 = create_file("incense-kit.png") - -response = client.responses.create( - model="${O}", - input=[ - { - "role": "user", - "content": [ - {"type": "input_text", "text": prompt}, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image1}", - }, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image2}", - }, - { - "type": "input_image", - "file_id": file_id1, - }, - { - "type": "input_image", - "file_id": file_id2, - } - ], - } - ], - tools=[{"type": "image_generation"}], -) - -# Process the response -image_generation_calls = [ - output - for output in response.output - if output.type == "image_generation_call" -] - -image_data = [output.result for output in image_generation_calls] - -if image_data: - image_base64 = image_data[0] - image_filename = f"edited_image_{int(time.time())}.png" - with open(image_filename, "wb") as f: - f.write(base64.b64decode(image_base64)) - print(f"Image saved to {image_filename}") -else: - # If no image is generated, there might be a text response with an explanation - text_response = [output.text for output in response.output if hasattr(output, 'text')] - if text_response: - print("No image generated. Model response:") - print("\\n".join(text_response)) - else: - print("No image data found in response.") - print("Full response for debugging:") - print(response) -`:` -import base64 -import os -import time - -# Helper function to encode images to base64 -def encode_image(image_path): - with open(image_path, "rb") as image_file: - return base64.b64encode(image_file.read()).decode('utf-8') - -# Helper function to create a file (simplified for this example) -def create_file(image_path): - # In a real implementation, this would upload the file to OpenAI - # For this example, we'll just return a placeholder ID - return f"file_{os.path.basename(image_path).replace('.', '_')}" - -# The prompt entered by the user -prompt = "${E}" - -# Encode images to base64 -base64_image1 = encode_image("body-lotion.png") -base64_image2 = encode_image("soap.png") - -# Create file IDs -file_id1 = create_file("body-lotion.png") -file_id2 = create_file("incense-kit.png") - -response = client.responses.create( - model="${O}", - input=[ - { - "role": "user", - "content": [ - {"type": "input_text", "text": prompt}, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image1}", - }, - { - "type": "input_image", - "image_url": f"data:image/jpeg;base64,{base64_image2}", - }, - { - "type": "input_image", - "file_id": file_id1, - }, - { - "type": "input_image", - "file_id": file_id2, - } - ], - } - ], - tools=[{"type": "image_generation"}], -) - -# Process the response -image_generation_calls = [ - output - for output in response.output - if output.type == "image_generation_call" -] - -image_data = [output.result for output in image_generation_calls] - -if image_data: - image_base64 = image_data[0] - image_filename = f"edited_image_{int(time.time())}.png" - with open(image_filename, "wb") as f: - f.write(base64.b64decode(image_base64)) - print(f"Image saved to {image_filename}") -else: - # If no image is generated, there might be a text response with an explanation - text_response = [output.text for output in response.output if hasattr(output, 'text')] - if text_response: - print("No image generated. Model response:") - print("\\n".join(text_response)) - else: - print("No image data found in response.") - print("Full response for debugging:") - print(response) -`;break;case o.EMBEDDINGS:t=` -response = client.embeddings.create( - input="${n||"Your string here"}", - model="${O}", - encoding_format="base64" # or "float" -) - -print(response.data[0].embedding) -`;break;case o.TRANSCRIPTION:t=` -# Open the audio file -audio_file = open("path/to/your/audio/file.mp3", "rb") - -# Make the transcription request -response = client.audio.transcriptions.create( - model="${O}", - file=audio_file${n?`, - prompt="${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} -) - -print(response.text) -`;break;case o.SPEECH:t=` -# Make the text-to-speech request -response = client.audio.speech.create( - model="${O}", - input="${n||"Your text to convert to speech here"}", - voice="${f}" # Options: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer -) - -# Save the audio to a file -output_filename = "output_speech.mp3" -response.stream_to_file(output_filename) -print(f"Audio saved to {output_filename}") - -# Optional: Customize response format and speed -# response = client.audio.speech.create( -# model="${O}", -# input="${n||"Your text to convert to speech here"}", -# voice="alloy", -# response_format="mp3", # Options: mp3, opus, aac, flac, wav, pcm -# speed=1.0 # Range: 0.25 to 4.0 -# ) -# response.stream_to_file("output_speech.mp3") -`;break;default:t="\n# Code generation for this endpoint is not implemented yet."}return`${w} -${t}`}],190272)},371401,e=>{"use strict";var t=e.i(115571),i=e.i(271645);function a(e){let i=t=>{"disableUsageIndicator"===t.key&&e()},a=t=>{let{key:i}=t.detail;"disableUsageIndicator"===i&&e()};return window.addEventListener("storage",i),window.addEventListener(t.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",i),window.removeEventListener(t.LOCAL_STORAGE_EVENT,a)}}function o(){return"true"===(0,t.getLocalStorageItem)("disableUsageIndicator")}function r(){return(0,i.useSyncExternalStore)(a,o)}e.s(["useDisableUsageIndicator",()=>r])},275144,e=>{"use strict";var t=e.i(843476),i=e.i(271645),a=e.i(764205);let o=(0,i.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:r})=>{let[n,l]=(0,i.useState)(null),[s,d]=(0,i.useState)(null);return(0,i.useEffect)(()=>{(async()=>{try{let e=(0,a.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",i=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(i.ok){let e=await i.json();e.values?.logo_url&&l(e.values.logo_url),e.values?.favicon_url&&d(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,i.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)(o.Provider,{value:{logoUrl:n,setLogoUrl:l,faviconUrl:s,setFaviconUrl:d},children:e})},"useTheme",0,()=>{let e=(0,i.useContext)(o);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},100486,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:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["CrownOutlined",0,r],100486)},295320,283713,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:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["CloudServerOutlined",0,r],295320);var n=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,a=e?.workers??[],[o,r]=(0,i.useState)(()=>localStorage.getItem(s));(0,i.useEffect)(()=>{if(!o||0===a.length)return;let e=a.find(e=>e.worker_id===o);e&&(0,n.switchToWorkerUrl)(e.url)},[o,a]);let d=a.find(e=>e.worker_id===o)??null,c=(0,i.useCallback)(e=>{let t=a.find(t=>t.worker_id===e);t&&(r(e),localStorage.setItem(s,e),(0,n.switchToWorkerUrl)(t.url))},[a]);return{isControlPlane:t,workers:a,selectedWorkerId:o,selectedWorker:d,selectWorker:c,disconnectFromWorker:(0,i.useCallback)(()=>{r(null),localStorage.removeItem(s),(0,n.switchToWorkerUrl)(null)},[])}}],283713)},755151,e=>{"use strict";var t=e.i(247153);e.s(["DownOutlined",()=>t.default])},916925,e=>{"use strict";var t,i=((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 Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",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.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);let a={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",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"},o="../ui/assets/logos/",r={"A2A Agent":`${o}a2a_agent.png`,Ai21:`${o}ai21.svg`,"Ai21 Chat":`${o}ai21.svg`,"AI/ML API":`${o}aiml_api.svg`,"Aiohttp Openai":`${o}openai_small.svg`,Anthropic:`${o}anthropic.svg`,"Anthropic Text":`${o}anthropic.svg`,AssemblyAI:`${o}assemblyai_small.png`,Azure:`${o}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${o}microsoft_azure.svg`,"Azure Text":`${o}microsoft_azure.svg`,Baseten:`${o}baseten.svg`,"Amazon Bedrock":`${o}bedrock.svg`,"Amazon Bedrock Mantle":`${o}bedrock.svg`,"AWS SageMaker":`${o}bedrock.svg`,Cerebras:`${o}cerebras.svg`,Cloudflare:`${o}cloudflare.svg`,Codestral:`${o}mistral.svg`,Cohere:`${o}cohere.svg`,"Cohere Chat":`${o}cohere.svg`,Cometapi:`${o}cometapi.svg`,Cursor:`${o}cursor.svg`,"Databricks (Qwen API)":`${o}databricks.svg`,Dashscope:`${o}dashscope.svg`,Deepseek:`${o}deepseek.svg`,Deepgram:`${o}deepgram.png`,DeepInfra:`${o}deepinfra.png`,ElevenLabs:`${o}elevenlabs.png`,"Fal AI":`${o}fal_ai.jpg`,"Featherless Ai":`${o}featherless.svg`,"Fireworks AI":`${o}fireworks.svg`,Friendliai:`${o}friendli.svg`,"Github Copilot":`${o}github_copilot.svg`,"Google AI Studio":`${o}google.svg`,GradientAI:`${o}gradientai.svg`,Groq:`${o}groq.svg`,vllm:`${o}vllm.png`,Huggingface:`${o}huggingface.svg`,Hyperbolic:`${o}hyperbolic.svg`,Infinity:`${o}infinity.png`,"Jina AI":`${o}jina.png`,"Lambda Ai":`${o}lambda.svg`,"Lm Studio":`${o}lmstudio.svg`,"Meta Llama":`${o}meta_llama.svg`,MiniMax:`${o}minimax.svg`,"Mistral AI":`${o}mistral.svg`,Moonshot:`${o}moonshot.svg`,Morph:`${o}morph.svg`,Nebius:`${o}nebius.svg`,Novita:`${o}novita.svg`,"Nvidia Nim":`${o}nvidia_nim.svg`,Ollama:`${o}ollama.svg`,"Ollama Chat":`${o}ollama.svg`,Oobabooga:`${o}openai_small.svg`,OpenAI:`${o}openai_small.svg`,"Openai Like":`${o}openai_small.svg`,"OpenAI Text Completion":`${o}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${o}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${o}openai_small.svg`,Openrouter:`${o}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${o}oracle.svg`,Perplexity:`${o}perplexity-ai.svg`,Recraft:`${o}recraft.svg`,Replicate:`${o}replicate.svg`,RunwayML:`${o}runwayml.png`,Sagemaker:`${o}bedrock.svg`,Sambanova:`${o}sambanova.svg`,"SAP Generative AI Hub":`${o}sap.png`,Snowflake:`${o}snowflake.svg`,"Text-Completion-Codestral":`${o}mistral.svg`,TogetherAI:`${o}togetherai.svg`,Topaz:`${o}topaz.svg`,Triton:`${o}nvidia_triton.png`,V0:`${o}v0.svg`,"Vercel Ai Gateway":`${o}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${o}google.svg`,"Vertex Ai Beta":`${o}google.svg`,Vllm:`${o}vllm.png`,VolcEngine:`${o}volcengine.png`,"Voyage AI":`${o}voyage.webp`,Watsonx:`${o}watsonx.svg`,"Watsonx Text":`${o}watsonx.svg`,xAI:`${o}xai.svg`,Xinference:`${o}xinference.svg`};e.s(["Providers",()=>i,"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 return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:r[e],displayName:e}}let t=Object.keys(a).find(t=>a[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let o=i[t];return{logo:r[o],displayName:o}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let i=a[e];console.log(`Provider mapped to: ${i}`);let o=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let a=t.litellm_provider;(a===i||"string"==typeof a&&a.includes(i))&&o.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&o.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&o.push(e)}))),o},"providerLogoMap",0,r,"provider_map",0,a])},44121,186515,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:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"};var o=e.i(9583),r=i.forwardRef(function(e,r){return i.createElement(o.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["MenuFoldOutlined",0,r],44121);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var l=i.forwardRef(function(e,a){return i.createElement(o.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["MenuUnfoldOutlined",0,l],186515)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7736882a2e4e2f73.js b/litellm/proxy/_experimental/out/_next/static/chunks/b533b97d3f73eba2.js similarity index 76% rename from litellm/proxy/_experimental/out/_next/static/chunks/7736882a2e4e2f73.js rename to litellm/proxy/_experimental/out/_next/static/chunks/b533b97d3f73eba2.js index 993aeded23..4bc3a7558d 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/7736882a2e4e2f73.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/b533b97d3f73eba2.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,384767,e=>{"use strict";var t=e.i(843476),r=e.i(599724),a=e.i(271645),l=e.i(389083);let n=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:"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(764205);let o=function({vectorStores:e,accessToken:o}){let[s,d]=(0,a.useState)([]);return(0,a.useEffect)(()=>{(async()=>{if(o&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(o);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)}})()},[o,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)(l.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 a;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:(a=s.find(t=>t.vector_store_id===e))?`${a.vector_store_name||a.vector_store_id} (${a.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"})]})]})},s=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 d=e.i(871943),c=e.i(502547),m=e.i(592968);let g=function({mcpServers:e,mcpAccessGroups:n=[],mcpToolPermissions:o={},mcpToolsets:g=[],accessToken:u}){let[p,b]=(0,a.useState)([]),[h,f]=(0,a.useState)([]),[x,v]=(0,a.useState)(new Set),[y,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{(async()=>{if(u&&e.length>0)try{let e=await (0,i.fetchMCPServers)(u);e&&Array.isArray(e)?b(e):e.data&&Array.isArray(e.data)&&b(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[u,e.length]),(0,a.useEffect)(()=>{(async()=>{if(u&&g.length>0)try{let e=await (0,i.fetchMCPToolsets)(u),t=Array.isArray(e)?e.filter(e=>g.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[u,g.length]);let $=[...e.map(e=>({type:"server",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],w=$.length+g.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)(s,{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)(l.Badge,{color:"blue",size:"xs",children:w})]}),w>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[$.map((e,r)=>{let a="server"===e.type?o[e.value]:void 0,l=a&&a.length>0,n=x.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return l&&(t=e.value,void v(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 ${l?"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)(m.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 flex-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} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),l&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:a.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===a.length?"tool":"tools"}),n?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l&&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:a.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)}),g.length>0&&g.map((e,r)=>{let a=h.find(t=>t.toolset_id===e),l=y.has(e),n=a?.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:a?.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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),n>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),l?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),n>0&&l&&a&&(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:a.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)(s,{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"})]})]})},u=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:"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"}))}),p=function({agents:e,agentAccessGroups:n=[],accessToken:o}){let[s,d]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(o&&e.length>0)try{let e=await (0,i.getAgentsList)(o);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[o,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],g=c.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)(u,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(l.Badge,{color:"purple",size:"xs",children:g})]}),g>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.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)(m.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=s.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 flex-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 uppercase tracking-wide flex-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)(u,{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:a="card",className:l="",accessToken:n}){let i=e?.vector_stores||[],s=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},m=e?.mcp_toolsets||[],u=e?.agents||[],b=e?.agent_access_groups||[],h=(0,t.jsxs)("div",{className:"card"===a?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(o,{vectorStores:i,accessToken:n}),(0,t.jsx)(g,{mcpServers:s,mcpAccessGroups:d,mcpToolPermissions:c,mcpToolsets:m,accessToken:n}),(0,t.jsx)(p,{agents:u,agentAccessGroups:b,accessToken:n})]});return"card"===a?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${l}`,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"})]})}),h]}):(0,t.jsxs)("div",{className:`${l}`,children:[(0,t.jsx)(r.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),h]})}],384767)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(908206),l=e.i(242064),n=e.i(517455),i=e.i(150073);let o={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 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},m=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 g=e=>{let{itemPrefixCls:a,component:l,span:n,className:i,style:o,labelStyle:d,contentStyle:c,bordered:m,label:g,content:u,colon:p,type:b,styles:h}=e,{classNames:f}=t.useContext(s),x=Object.assign(Object.assign({},d),null==h?void 0:h.label),v=Object.assign(Object.assign({},c),null==h?void 0:h.content);if(m)return t.createElement(l,{colSpan:n,style:o,className:(0,r.default)(i,{[`${a}-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:x},g),null!=u&&t.createElement("span",{style:v},u));return t.createElement(l,{colSpan:n,style:o,className:(0,r.default)(`${a}-item`,i)},t.createElement("div",{className:`${a}-item-container`},null!=g&&t.createElement("span",{style:x,className:(0,r.default)(`${a}-item-label`,null==f?void 0:f.label,{[`${a}-item-no-colon`]:!p})},g),null!=u&&t.createElement("span",{style:v,className:(0,r.default)(`${a}-item-content`,null==f?void 0:f.content)},u)))};function u(e,{colon:r,prefixCls:a,bordered:l},{component:n,type:i,showLabel:o,showContent:s,labelStyle:d,contentStyle:c,styles:m}){return e.map(({label:e,children:u,prefixCls:p=a,className:b,style:h,labelStyle:f,contentStyle:x,span:v=1,key:y,styles:j},$)=>"string"==typeof n?t.createElement(g,{key:`${i}-${y||$}`,className:b,style:h,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==m?void 0:m.label),f),null==j?void 0:j.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==m?void 0:m.content),x),null==j?void 0:j.content)},span:v,colon:r,component:n,itemPrefixCls:p,bordered:l,label:o?e:null,content:s?u:null,type:i}):[t.createElement(g,{key:`label-${y||$}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==m?void 0:m.label),h),f),null==j?void 0:j.label),span:1,colon:r,component:n[0],itemPrefixCls:p,bordered:l,label:e,type:"label"}),t.createElement(g,{key:`content-${y||$}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==m?void 0:m.content),h),x),null==j?void 0:j.content),span:2*v-1,component:n[1],itemPrefixCls:p,bordered:l,content:u,type:"content"})])}let p=e=>{let r=t.useContext(s),{prefixCls:a,vertical:l,row:n,index:i,bordered:o}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${a}-row`},u(n,e,Object.assign({component:"th",type:"label",showLabel:!0},r))),t.createElement("tr",{key:`content-${i}`,className:`${a}-row`},u(n,e,Object.assign({component:"td",type:"content",showContent:!0},r)))):t.createElement("tr",{key:i,className:`${a}-row`},u(n,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},r)))};e.i(296059);var b=e.i(915654),h=e.i(183293),f=e.i(246422),x=e.i(838378);let v=(0,f.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:r,itemPaddingBottom:a,itemPaddingEnd:l,colonMarginRight:n,colonMarginLeft:i,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,h.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:r}=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:r,"&::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: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:r,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,b.unit)(i)} ${(0,b.unit)(n)}`},[`&${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,x.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 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 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 j=e=>{let g,{prefixCls:u,title:b,extra:h,column:f,colon:x=!0,bordered:j,layout:$,children:w,className:C,rootClassName:O,style:k,size:N,labelStyle:S,contentStyle:E,styles:T,items:z,classNames:B}=e,M=y(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:P,direction:R,className:L,style:H,classNames:I,styles:_}=(0,l.useComponentConfig)("descriptions"),A=P("descriptions",u),W=(0,i.default)(),q=t.useMemo(()=>{var e;return"number"==typeof f?f:null!=(e=(0,a.matchScreen)(W,Object.assign(Object.assign({},o),f)))?e:3},[W,f]),G=(g=t.useMemo(()=>z||(0,d.default)(w).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[z,w]),t.useMemo(()=>g.map(e=>{var{span:t}=e,r=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},r),{filled:!0}):Object.assign(Object.assign({},r),{span:"number"==typeof t?t:(0,a.matchScreen)(W,t)})}),[g,W])),F=(0,n.default)(N),X=((e,r)=>{let[a,l]=(0,t.useMemo)(()=>{let t,a,l,n;return t=[],a=[],l=!1,n=0,r.filter(e=>e).forEach(r=>{let{filled:i}=r,o=m(r,["filled"]);if(i){a.push(o),t.push(a),a=[],n=0;return}let s=e-n;(n+=r.span||1)>=e?(n>e?(l=!0,a.push(Object.assign(Object.assign({},o),{span:s}))):a.push(o),t.push(a),a=[],n=0):a.push(o)}),a.length>0&&t.push(a),[t=t.map(t=>{let r=t.reduce((e,t)=>e+(t.span||1),0);if(r({labelStyle:S,contentStyle:E,styles:{content:Object.assign(Object.assign({},_.content),null==T?void 0:T.content),label:Object.assign(Object.assign({},_.label),null==T?void 0:T.label)},classNames:{label:(0,r.default)(I.label,null==B?void 0:B.label),content:(0,r.default)(I.content,null==B?void 0:B.content)}}),[S,E,T,B,I,_]);return D(t.createElement(s.Provider,{value:V},t.createElement("div",Object.assign({className:(0,r.default)(A,L,I.root,null==B?void 0:B.root,{[`${A}-${F}`]:F&&"default"!==F,[`${A}-bordered`]:!!j,[`${A}-rtl`]:"rtl"===R},C,O,Y,K),style:Object.assign(Object.assign(Object.assign(Object.assign({},H),_.root),null==T?void 0:T.root),k)},M),(b||h)&&t.createElement("div",{className:(0,r.default)(`${A}-header`,I.header,null==B?void 0:B.header),style:Object.assign(Object.assign({},_.header),null==T?void 0:T.header)},b&&t.createElement("div",{className:(0,r.default)(`${A}-title`,I.title,null==B?void 0:B.title),style:Object.assign(Object.assign({},_.title),null==T?void 0:T.title)},b),h&&t.createElement("div",{className:(0,r.default)(`${A}-extra`,I.extra,null==B?void 0:B.extra),style:Object.assign(Object.assign({},_.extra),null==T?void 0:T.extra)},h)),t.createElement("div",{className:`${A}-view`},t.createElement("table",null,t.createElement("tbody",null,X.map((e,r)=>t.createElement(p,{key:r,index:r,colon:x,prefixCls:A,vertical:"vertical"===$,bordered:j,row:e}))))))))};j.Item=({children:e})=>e,e.s(["Descriptions",0,j],869216)},270377,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:"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),n=r.forwardRef(function(e,n){return r.createElement(l.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ExclamationCircleOutlined",0,n],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(242064),n=e.i(517455),i=e.i(185793),o=e.i(721369),s=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 d=e=>{var{prefixCls:a,className:n,hoverable:i=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("card",a),m=(0,r.default)(`${c}-grid`,n,{[`${c}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},o,{className:m}))};e.i(296059);var c=e.i(915654),m=e.i(183293),g=e.i(246422),u=e.i(838378);let p=(0,g.genStyleHooks)("Card",e=>{let t=(0,u.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:r,cardHeadPadding:a,colorBorderSecondary:l,boxShadowTertiary:n,bodyPadding:i,extraColor:o}=e;return{[t]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:n},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:a,headerPadding:l,tabsMarginBottom:n}=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,m.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},m.textEllipsis),{[` +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,384767,e=>{"use strict";var t=e.i(843476),r=e.i(599724),a=e.i(271645),l=e.i(389083);let n=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:"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(764205);let o=function({vectorStores:e,accessToken:o}){let[s,d]=(0,a.useState)([]);return(0,a.useEffect)(()=>{(async()=>{if(o&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(o);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)}})()},[o,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)(l.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 a;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:(a=s.find(t=>t.vector_store_id===e))?`${a.vector_store_name||a.vector_store_id} (${a.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"})]})]})},s=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 d=e.i(871943),c=e.i(502547),m=e.i(592968);let g=function({mcpServers:e,mcpAccessGroups:n=[],mcpToolPermissions:o={},mcpToolsets:g=[],accessToken:u}){let[p,b]=(0,a.useState)([]),[h,f]=(0,a.useState)([]),[x,v]=(0,a.useState)(new Set),[y,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{(async()=>{if(u&&e.length>0)try{let e=await (0,i.fetchMCPServers)(u);e&&Array.isArray(e)?b(e):e.data&&Array.isArray(e.data)&&b(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[u,e.length]),(0,a.useEffect)(()=>{(async()=>{if(u&&g.length>0)try{let e=await (0,i.fetchMCPToolsets)(u),t=Array.isArray(e)?e.filter(e=>g.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[u,g.length]);let $=[...e.map(e=>({type:"server",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],w=$.length+g.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)(s,{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)(l.Badge,{color:"blue",size:"xs",children:w})]}),w>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[$.map((e,r)=>{let a="server"===e.type?o[e.value]:void 0,l=a&&a.length>0,n=x.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return l&&(t=e.value,void v(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 ${l?"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)(m.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 flex-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} (${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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),l&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:a.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===a.length?"tool":"tools"}),n?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l&&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:a.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)}),g.length>0&&g.map((e,r)=>{let a=h.find(t=>t.toolset_id===e),l=y.has(e),n=a?.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:a?.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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),n>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),l?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),n>0&&l&&a&&(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:a.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)(s,{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"})]})]})},u=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:"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"}))}),p=function({agents:e,agentAccessGroups:n=[],accessToken:o}){let[s,d]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(o&&e.length>0)try{let e=await (0,i.getAgentsList)(o);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[o,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],g=c.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)(u,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(l.Badge,{color:"purple",size:"xs",children:g})]}),g>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.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)(m.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=s.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 flex-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 uppercase tracking-wide flex-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)(u,{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:a="card",className:l="",accessToken:n}){let i=e?.vector_stores||[],s=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},m=e?.mcp_toolsets||[],u=e?.agents||[],b=e?.agent_access_groups||[],h=e?.search_tools||[],f=(0,t.jsxs)("div",{className:"card"===a?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(o,{vectorStores:i,accessToken:n}),(0,t.jsx)(g,{mcpServers:s,mcpAccessGroups:d,mcpToolPermissions:c,mcpToolsets:m,accessToken:n}),(0,t.jsx)(p,{agents:u,agentAccessGroups:b,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===h.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:h.join(", ")})]})]});return"card"===a?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${l}`,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"})]})}),f]}):(0,t.jsxs)("div",{className:`${l}`,children:[(0,t.jsx)(r.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),f]})}],384767)},869216,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(908206),l=e.i(242064),n=e.i(517455),i=e.i(150073);let o={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 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},m=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 g=e=>{let{itemPrefixCls:a,component:l,span:n,className:i,style:o,labelStyle:d,contentStyle:c,bordered:m,label:g,content:u,colon:p,type:b,styles:h}=e,{classNames:f}=t.useContext(s),x=Object.assign(Object.assign({},d),null==h?void 0:h.label),v=Object.assign(Object.assign({},c),null==h?void 0:h.content);if(m)return t.createElement(l,{colSpan:n,style:o,className:(0,r.default)(i,{[`${a}-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:x},g),null!=u&&t.createElement("span",{style:v},u));return t.createElement(l,{colSpan:n,style:o,className:(0,r.default)(`${a}-item`,i)},t.createElement("div",{className:`${a}-item-container`},null!=g&&t.createElement("span",{style:x,className:(0,r.default)(`${a}-item-label`,null==f?void 0:f.label,{[`${a}-item-no-colon`]:!p})},g),null!=u&&t.createElement("span",{style:v,className:(0,r.default)(`${a}-item-content`,null==f?void 0:f.content)},u)))};function u(e,{colon:r,prefixCls:a,bordered:l},{component:n,type:i,showLabel:o,showContent:s,labelStyle:d,contentStyle:c,styles:m}){return e.map(({label:e,children:u,prefixCls:p=a,className:b,style:h,labelStyle:f,contentStyle:x,span:v=1,key:y,styles:j},$)=>"string"==typeof n?t.createElement(g,{key:`${i}-${y||$}`,className:b,style:h,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==m?void 0:m.label),f),null==j?void 0:j.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==m?void 0:m.content),x),null==j?void 0:j.content)},span:v,colon:r,component:n,itemPrefixCls:p,bordered:l,label:o?e:null,content:s?u:null,type:i}):[t.createElement(g,{key:`label-${y||$}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==m?void 0:m.label),h),f),null==j?void 0:j.label),span:1,colon:r,component:n[0],itemPrefixCls:p,bordered:l,label:e,type:"label"}),t.createElement(g,{key:`content-${y||$}`,className:b,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==m?void 0:m.content),h),x),null==j?void 0:j.content),span:2*v-1,component:n[1],itemPrefixCls:p,bordered:l,content:u,type:"content"})])}let p=e=>{let r=t.useContext(s),{prefixCls:a,vertical:l,row:n,index:i,bordered:o}=e;return l?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${a}-row`},u(n,e,Object.assign({component:"th",type:"label",showLabel:!0},r))),t.createElement("tr",{key:`content-${i}`,className:`${a}-row`},u(n,e,Object.assign({component:"td",type:"content",showContent:!0},r)))):t.createElement("tr",{key:i,className:`${a}-row`},u(n,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},r)))};e.i(296059);var b=e.i(915654),h=e.i(183293),f=e.i(246422),x=e.i(838378);let v=(0,f.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:r,itemPaddingBottom:a,itemPaddingEnd:l,colonMarginRight:n,colonMarginLeft:i,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,h.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:r}=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:r,"&::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: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:r,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,b.unit)(i)} ${(0,b.unit)(n)}`},[`&${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,x.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 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 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 j=e=>{let g,{prefixCls:u,title:b,extra:h,column:f,colon:x=!0,bordered:j,layout:$,children:w,className:C,rootClassName:O,style:k,size:N,labelStyle:S,contentStyle:E,styles:T,items:z,classNames:B}=e,M=y(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:P,direction:R,className:L,style:H,classNames:I,styles:_}=(0,l.useComponentConfig)("descriptions"),A=P("descriptions",u),W=(0,i.default)(),q=t.useMemo(()=>{var e;return"number"==typeof f?f:null!=(e=(0,a.matchScreen)(W,Object.assign(Object.assign({},o),f)))?e:3},[W,f]),G=(g=t.useMemo(()=>z||(0,d.default)(w).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[z,w]),t.useMemo(()=>g.map(e=>{var{span:t}=e,r=c(e,["span"]);return"filled"===t?Object.assign(Object.assign({},r),{filled:!0}):Object.assign(Object.assign({},r),{span:"number"==typeof t?t:(0,a.matchScreen)(W,t)})}),[g,W])),F=(0,n.default)(N),X=((e,r)=>{let[a,l]=(0,t.useMemo)(()=>{let t,a,l,n;return t=[],a=[],l=!1,n=0,r.filter(e=>e).forEach(r=>{let{filled:i}=r,o=m(r,["filled"]);if(i){a.push(o),t.push(a),a=[],n=0;return}let s=e-n;(n+=r.span||1)>=e?(n>e?(l=!0,a.push(Object.assign(Object.assign({},o),{span:s}))):a.push(o),t.push(a),a=[],n=0):a.push(o)}),a.length>0&&t.push(a),[t=t.map(t=>{let r=t.reduce((e,t)=>e+(t.span||1),0);if(r({labelStyle:S,contentStyle:E,styles:{content:Object.assign(Object.assign({},_.content),null==T?void 0:T.content),label:Object.assign(Object.assign({},_.label),null==T?void 0:T.label)},classNames:{label:(0,r.default)(I.label,null==B?void 0:B.label),content:(0,r.default)(I.content,null==B?void 0:B.content)}}),[S,E,T,B,I,_]);return D(t.createElement(s.Provider,{value:V},t.createElement("div",Object.assign({className:(0,r.default)(A,L,I.root,null==B?void 0:B.root,{[`${A}-${F}`]:F&&"default"!==F,[`${A}-bordered`]:!!j,[`${A}-rtl`]:"rtl"===R},C,O,Y,K),style:Object.assign(Object.assign(Object.assign(Object.assign({},H),_.root),null==T?void 0:T.root),k)},M),(b||h)&&t.createElement("div",{className:(0,r.default)(`${A}-header`,I.header,null==B?void 0:B.header),style:Object.assign(Object.assign({},_.header),null==T?void 0:T.header)},b&&t.createElement("div",{className:(0,r.default)(`${A}-title`,I.title,null==B?void 0:B.title),style:Object.assign(Object.assign({},_.title),null==T?void 0:T.title)},b),h&&t.createElement("div",{className:(0,r.default)(`${A}-extra`,I.extra,null==B?void 0:B.extra),style:Object.assign(Object.assign({},_.extra),null==T?void 0:T.extra)},h)),t.createElement("div",{className:`${A}-view`},t.createElement("table",null,t.createElement("tbody",null,X.map((e,r)=>t.createElement(p,{key:r,index:r,colon:x,prefixCls:A,vertical:"vertical"===$,bordered:j,row:e}))))))))};j.Item=({children:e})=>e,e.s(["Descriptions",0,j],869216)},270377,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:"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),n=r.forwardRef(function(e,n){return r.createElement(l.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ExclamationCircleOutlined",0,n],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(242064),n=e.i(517455),i=e.i(185793),o=e.i(721369),s=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 d=e=>{var{prefixCls:a,className:n,hoverable:i=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:d}=t.useContext(l.ConfigContext),c=d("card",a),m=(0,r.default)(`${c}-grid`,n,{[`${c}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},o,{className:m}))};e.i(296059);var c=e.i(915654),m=e.i(183293),g=e.i(246422),u=e.i(838378);let p=(0,g.genStyleHooks)("Card",e=>{let t=(0,u.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:r,cardHeadPadding:a,colorBorderSecondary:l,boxShadowTertiary:n,bodyPadding:i,extraColor:o}=e;return{[t]:Object.assign(Object.assign({},(0,m.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:n},[`${t}-head`]:(e=>{let{antCls:t,componentCls:r,headerHeight:a,headerPadding:l,tabsMarginBottom:n}=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,m.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},m.textEllipsis),{[` > ${r}-typography, > ${r}-typography-edit-content `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:n,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:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:i,borderRadius:`0 0 ${(0,c.unit)(e.borderRadiusLG)} ${(0,c.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:a,lineWidth:l}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ba3052c7fda27695.js b/litellm/proxy/_experimental/out/_next/static/chunks/ba3052c7fda27695.js deleted file mode 100644 index b75ad232d6..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/ba3052c7fda27695.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,757440,e=>{"use strict";var t=e.i(290571),s=e.i(271645);let a=e=>{var a=(0,t.__rest)(e,[]);return s.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},a),s.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>a])},446428,854056,e=>{"use strict";let t;var s=e.i(290571),a=e.i(271645);let l=e=>{var t=(0,s.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.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"}))};e.s(["default",()=>l],446428);var r=e.i(746725),i=e.i(914189),n=e.i(553521),d=e.i(835696),o=e.i(941444),c=e.i(178677),u=e.i(294316),m=e.i(83733),h=e.i(233137),x=e.i(732607),g=e.i(397701),f=e.i(700020);function p(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:S)!==a.Fragment||1===a.default.Children.count(e.children)}let b=(0,a.createContext)(null);b.displayName="TransitionContext";var j=((t=j||{}).Visible="visible",t.Hidden="hidden",t);let v=(0,a.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 _(e,t){let s=(0,o.useLatestValue)(e),l=(0,a.useRef)([]),d=(0,n.useIsMounted)(),c=(0,r.useDisposables)(),u=(0,i.useEvent)((e,t=f.RenderStrategy.Hidden)=>{let a=l.current.findIndex(({el:t})=>t===e);-1!==a&&((0,g.match)(t,{[f.RenderStrategy.Unmount](){l.current.splice(a,1)},[f.RenderStrategy.Hidden](){l.current[a].state="hidden"}}),c.microTask(()=>{var e;!y(l)&&d.current&&(null==(e=s.current)||e.call(s))}))}),m=(0,i.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,f.RenderStrategy.Unmount)}),h=(0,a.useRef)([]),x=(0,a.useRef)(Promise.resolve()),p=(0,a.useRef)({enter:[],leave:[]}),b=(0,i.useEvent)((e,s,a)=>{h.current.splice(0),t&&(t.chains.current[s]=t.chains.current[s].filter(([t])=>t!==e)),null==t||t.chains.current[s].push([e,new Promise(e=>{h.current.push(e)})]),null==t||t.chains.current[s].push([e,new Promise(e=>{Promise.all(p.current[s].map(([e,t])=>t)).then(()=>e())})]),"enter"===s?x.current=x.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(s)):a(s)}),j=(0,i.useEvent)((e,t,s)=>{Promise.all(p.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=h.current.shift())||e()}).then(()=>s(t))});return(0,a.useMemo)(()=>({children:l,register:m,unregister:u,onStart:b,onStop:j,wait:x,chains:p}),[m,u,l,b,j,p,x])}v.displayName="NestingContext";let S=a.Fragment,w=f.RenderFeatures.RenderStrategy,N=(0,f.forwardRefWithAs)(function(e,t){let{show:s,appear:l=!1,unmount:r=!0,...n}=e,o=(0,a.useRef)(null),m=p(e),x=(0,u.useSyncRefs)(...m?[o,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let g=(0,h.useOpenClosed)();if(void 0===s&&null!==g&&(s=(g&h.State.Open)===h.State.Open),void 0===s)throw Error("A is used but it is missing a `show={true | false}` prop.");let[j,S]=(0,a.useState)(s?"visible":"hidden"),N=_(()=>{s||S("hidden")}),[T,k]=(0,a.useState)(!0),I=(0,a.useRef)([s]);(0,d.useIsoMorphicEffect)(()=>{!1!==T&&I.current[I.current.length-1]!==s&&(I.current.push(s),k(!1))},[I,s]);let E=(0,a.useMemo)(()=>({show:s,appear:l,initial:T}),[s,l,T]);(0,d.useIsoMorphicEffect)(()=>{s?S("visible"):y(N)||null===o.current||S("hidden")},[s,N]);let U={unmount:r},R=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeEnter)||t.call(e)}),B=(0,i.useEvent)(()=>{var t;T&&k(!1),null==(t=e.beforeLeave)||t.call(e)}),M=(0,f.useRender)();return a.default.createElement(v.Provider,{value:N},a.default.createElement(b.Provider,{value:E},M({ourProps:{...U,as:a.Fragment,children:a.default.createElement(C,{ref:x,...U,...n,beforeEnter:R,beforeLeave:B})},theirProps:{},defaultTag:a.Fragment,features:w,visible:"visible"===j,name:"Transition"})))}),C=(0,f.forwardRefWithAs)(function(e,t){var s,l;let{transition:r=!0,beforeEnter:n,afterEnter:o,beforeLeave:j,afterLeave:N,enter:C,enterFrom:T,enterTo:k,entered:I,leave:E,leaveFrom:U,leaveTo:R,...B}=e,[M,F]=(0,a.useState)(null),D=(0,a.useRef)(null),A=p(e),L=(0,u.useSyncRefs)(...A?[D,t,F]:null===t?[]:[t]),O=null==(s=B.unmount)||s?f.RenderStrategy.Unmount:f.RenderStrategy.Hidden,{show:P,appear:z,initial:V}=function(){let e=(0,a.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[$,K]=(0,a.useState)(P?"visible":"hidden"),H=function(){let e=(0,a.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:q,unregister:G}=H;(0,d.useIsoMorphicEffect)(()=>q(D),[q,D]),(0,d.useIsoMorphicEffect)(()=>{if(O===f.RenderStrategy.Hidden&&D.current)return P&&"visible"!==$?void K("visible"):(0,g.match)($,{hidden:()=>G(D),visible:()=>q(D)})},[$,D,q,G,P,O]);let W=(0,c.useServerHandoffComplete)();(0,d.useIsoMorphicEffect)(()=>{if(A&&W&&"visible"===$&&null===D.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,$,W,A]);let J=V&&!z,Q=z&&P&&V,Z=(0,a.useRef)(!1),Y=_(()=>{Z.current||(K("hidden"),G(D))},H),X=(0,i.useEvent)(e=>{Z.current=!0,Y.onStart(D,e?"enter":"leave",e=>{"enter"===e?null==n||n():"leave"===e&&(null==j||j())})}),ee=(0,i.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Y.onStop(D,t,e=>{"enter"===e?null==o||o():"leave"===e&&(null==N||N())}),"leave"!==t||y(Y)||(K("hidden"),G(D))});(0,a.useEffect)(()=>{A&&r||(X(P),ee(P))},[P,A,r]);let et=!(!r||!A||!W||J),[,es]=(0,m.useTransition)(et,M,P,{start:X,end:ee}),ea=(0,f.compact)({ref:L,className:(null==(l=(0,x.classNames)(B.className,Q&&C,Q&&T,es.enter&&C,es.enter&&es.closed&&T,es.enter&&!es.closed&&k,es.leave&&E,es.leave&&!es.closed&&U,es.leave&&es.closed&&R,!es.transition&&P&&I))?void 0:l.trim())||void 0,...(0,m.transitionDataAttributes)(es)}),el=0;"visible"===$&&(el|=h.State.Open),"hidden"===$&&(el|=h.State.Closed),es.enter&&(el|=h.State.Opening),es.leave&&(el|=h.State.Closing);let er=(0,f.useRender)();return a.default.createElement(v.Provider,{value:Y},a.default.createElement(h.OpenClosedProvider,{value:el},er({ourProps:ea,theirProps:B,defaultTag:S,features:w,visible:"visible"===$,name:"Transition.Child"})))}),T=(0,f.forwardRefWithAs)(function(e,t){let s=null!==(0,a.useContext)(b),l=null!==(0,h.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!s&&l?a.default.createElement(N,{ref:t,...e}):a.default.createElement(C,{ref:t,...e}))}),k=Object.assign(N,{Child:T,Root:N});e.s(["Transition",()=>k],854056)},206929,e=>{"use strict";var t=e.i(290571),s=e.i(757440),a=e.i(271645),l=e.i(446428),r=e.i(444755),i=e.i(673706),n=e.i(103471),d=e.i(495470),o=e.i(854056),c=e.i(888288);let u=(0,i.makeClassName)("Select"),m=a.default.forwardRef((e,i)=>{let{defaultValue:m="",value:h,onValueChange:x,placeholder:g="Select...",disabled:f=!1,icon:p,enableClear:b=!1,required:j,children:v,name:y,error:_=!1,errorMessage:S,className:w,id:N}=e,C=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),T=(0,a.useRef)(null),k=a.Children.toArray(v),[I,E]=(0,c.default)(m,h),U=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(v).filter(a.isValidElement);return(0,n.constructValueToNameMapping)(e)},[v]);return a.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",w)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:j,className:(0,r.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:I,onChange:e=>{e.preventDefault()},name:y,disabled:f,id:N,onFocus:()=>{let e=T.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},g),k.map(e=>{let t=e.props.value,s=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},s)})),a.default.createElement(d.Listbox,Object.assign({as:"div",ref:i,defaultValue:I,value:I,onChange:e=>{null==x||x(e),E(e)},disabled:f,id:N},C),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(d.ListboxButton,{ref:T,className:(0,r.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",p?"pl-10":"pl-3",(0,n.getSelectButtonColors)((0,n.hasValue)(e),f,_))},p&&a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(p,{className:(0,r.tremorTwMerge)(u("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=U.get(e))?t:g),a.default.createElement("span",{className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(s.default,{className:(0,r.tremorTwMerge)(u("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&I?a.default.createElement("button",{type:"button",className:(0,r.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E(""),null==x||x("")}},a.default.createElement(l.default,{className:(0,r.tremorTwMerge)(u("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(o.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.default.createElement(d.ListboxOptions,{anchor:"bottom start",className:(0,r.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},v)))})),_&&S?a.default.createElement("p",{className:(0,r.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},S):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},502275,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,s],502275)},78085,e=>{"use strict";var t=e.i(290571),s=e.i(103471),a=e.i(888288),l=e.i(271645),r=e.i(444755),i=e.i(673706);let n=(0,i.makeClassName)("Textarea"),d=l.default.forwardRef((e,d)=>{let{value:o,defaultValue:c="",placeholder:u="Type...",error:m=!1,errorMessage:h,disabled:x=!1,className:g,onChange:f,onValueChange:p,autoHeight:b=!1}=e,j=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[v,y]=(0,a.default)(c,o),_=(0,l.useRef)(null),S=(0,s.hasValue)(v);return(0,l.useEffect)(()=>{let e=_.current;if(b&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[b,_,v]),l.default.createElement(l.default.Fragment,null,l.default.createElement("textarea",Object.assign({ref:(0,i.mergeRefs)([_,d]),value:v,placeholder:u,disabled:x,className:(0,r.tremorTwMerge)(n("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,s.getSelectButtonColors)(S,x,m),x?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",g),"data-testid":"text-area",onChange:e=>{null==f||f(e),y(e.target.value),null==p||p(e.target.value)}},j)),m&&h?l.default.createElement("p",{className:(0,r.tremorTwMerge)(n("errorMessage"),"text-sm text-red-500 mt-1")},h):null)});d.displayName="Textarea",e.s(["Textarea",()=>d],78085)},114600,e=>{"use strict";var t=e.i(290571),s=e.i(444755),a=e.i(673706),l=e.i(271645);let r=(0,a.makeClassName)("Divider"),i=l.default.forwardRef((e,a)=>{let{className:i,children:n}=e,d=(0,t.__rest)(e,["className","children"]);return l.default.createElement("div",Object.assign({ref:a,className:(0,s.tremorTwMerge)(r("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",i)},d),n?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.default.createElement("div",{className:(0,s.tremorTwMerge)("text-inherit whitespace-nowrap")},n),l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});i.displayName="Divider",e.s(["Divider",()=>i],114600)},910119,e=>{"use strict";var t=e.i(843476),s=e.i(197647),a=e.i(653824),l=e.i(881073),r=e.i(404206),i=e.i(723731),n=e.i(271645),d=e.i(464571),o=e.i(212931),c=e.i(898586),u=e.i(312361),m=e.i(291542),h=e.i(199133),x=e.i(28651),g=e.i(175712),f=e.i(770914),p=e.i(536916),b=e.i(764205),j=e.i(827252),v=e.i(994388),y=e.i(35983),_=e.i(779241),S=e.i(78085),w=e.i(808613),N=e.i(592968),C=e.i(708347),T=e.i(860585),k=e.i(355619),I=e.i(435451);function E({userData:e,onCancel:s,onSubmit:a,teams:l,accessToken:r,userID:i,userRole:d,userModels:o,possibleUIRoles:c,isBulkEdit:u=!1}){let[m]=w.Form.useForm(),[x,g]=(0,n.useState)(!1);return n.default.useEffect(()=>{let t=e.user_info?.max_budget,s=null==t;g(s),m.setFieldsValue({user_id:e.user_id,user_email:e.user_info?.user_email,user_alias:e.user_info?.user_alias,user_role:e.user_info?.user_role,models:e.user_info?.models||[],max_budget:s?"":t,budget_duration:e.user_info?.budget_duration,metadata:e.user_info?.metadata?JSON.stringify(e.user_info.metadata,null,2):void 0})},[e,m]),(0,t.jsxs)(w.Form,{form:m,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}(x||""===e.max_budget||void 0===e.max_budget)&&(e.max_budget=null),a(e)},layout:"vertical",children:[!u&&(0,t.jsx)(w.Form.Item,{label:"User ID",name:"user_id",children:(0,t.jsx)(_.TextInput,{disabled:!0})}),!u&&(0,t.jsx)(w.Form.Item,{label:"Email",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Alias",name:"user_alias",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(N.Tooltip,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,t.jsx)(j.InfoCircleOutlined,{})})]}),name:"user_role",children:(0,t.jsx)(h.Select,{children:c&&Object.entries(c).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Personal Models"," ",(0,t.jsx)(N.Tooltip,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,t.jsx)(j.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsxs)(h.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!C.all_admin_roles.includes(d||""),children:[(0,t.jsx)(h.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(h.Select.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),o.map(e=>(0,t.jsx)(h.Select.Option,{value:e,children:(0,k.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,t.jsx)("span",{children:"Max Budget (USD)"}),(0,t.jsx)(p.Checkbox,{checked:x,onChange:e=>{let t=e.target.checked;g(t),t&&m.setFieldsValue({max_budget:""})},children:"Unlimited Budget"})]}),name:"max_budget",rules:[{validator:(e,t)=>x||""!==t&&null!=t?Promise.resolve():Promise.reject(Error("Please enter a budget or select Unlimited Budget"))}],children:(0,t.jsx)(I.default,{step:.01,precision:2,style:{width:"100%"},disabled:x})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)(w.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(S.Textarea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(v.Button,{variant:"secondary",type:"button",onClick:s,children:"Cancel"}),(0,t.jsx)(v.Button,{type:"submit",children:"Save Changes"})]})]})}var U=e.i(727749),R=e.i(888259);let{Text:B,Title:M}=c.Typography,F=({open:e,onCancel:s,selectedUsers:a,possibleUIRoles:l,accessToken:r,onSuccess:i,teams:d,userRole:c,userModels:j,allowAllUsers:v=!1})=>{let[y,_]=(0,n.useState)(!1),[S,w]=(0,n.useState)([]),[N,C]=(0,n.useState)(null),[T,k]=(0,n.useState)(!1),[I,F]=(0,n.useState)(!1),D=()=>{w([]),C(null),k(!1),F(!1),s()},A=n.default.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:d||[]}),[d,e]),L=async e=>{if(console.log("formValues",e),!r)return void U.default.fromBackend("Access token not found");_(!0);try{let t=a.map(e=>e.user_id),l={};e.user_role&&""!==e.user_role&&(l.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(l.max_budget=e.max_budget),e.models&&e.models.length>0&&(l.models=e.models),e.budget_duration&&""!==e.budget_duration&&(l.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(l.metadata=e.metadata);let n=Object.keys(l).length>0,d=T&&S.length>0;if(!n&&!d)return void U.default.fromBackend("Please modify at least one field or select teams to add users to");let o=[];if(n)if(I){let e=await (0,b.userBulkUpdateUserCall)(r,l,void 0,!0);o.push(`Updated all users (${e.total_requested} total)`)}else await (0,b.userBulkUpdateUserCall)(r,l,t),o.push(`Updated ${t.length} user(s)`);if(d){let e=[];for(let t of S)try{let s=null;s=I?null:a.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let l=await (0,b.teamBulkMemberAddCall)(r,t,s||null,N||void 0,I);console.log("result",l),e.push({teamId:t,success:!0,successfulAdditions:l.successful_additions,failedAdditions:l.failed_additions})}catch(s){console.error(`Failed to add users to team ${t}:`,s),e.push({teamId:t,success:!1,error:s})}let t=e.filter(e=>e.success),s=e.filter(e=>!e.success);if(t.length>0){let e=t.reduce((e,t)=>e+t.successfulAdditions,0);o.push(`Added users to ${t.length} team(s) (${e} total additions)`)}s.length>0&&R.default.warning(`Failed to add users to ${s.length} team(s)`)}o.length>0&&U.default.success(o.join(". ")),w([]),C(null),k(!1),F(!1),i(),s()}catch(e){console.error("Bulk operation failed:",e),U.default.fromBackend("Failed to perform bulk operations")}finally{_(!1)}};return(0,t.jsxs)(o.Modal,{open:e,onCancel:D,footer:null,title:I?"Bulk Edit All Users":`Bulk Edit ${a.length} User(s)`,width:800,children:[v&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(p.Checkbox,{checked:I,onChange:e=>F(e.target.checked),children:(0,t.jsx)(B,{strong:!0,children:"Update ALL users in the system"})}),I&&(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsx)(B,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!I&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(M,{level:5,children:["Selected Users (",a.length,"):"]}),(0,t.jsx)(m.Table,{size:"small",bordered:!0,dataSource:a,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,t.jsx)(B,{strong:!0,style:{fontSize:"12px"},children:e.length>20?`${e.slice(0,20)}...`:e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:l?.[e]?.ui_label||e})},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,t.jsx)(B,{style:{fontSize:"12px"},children:null!==e?`$${e}`:"Unlimited"})}]})]}),(0,t.jsx)(u.Divider,{}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)(B,{children:[(0,t.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,t.jsx)(g.Card,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,t.jsxs)(f.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsx)(p.Checkbox,{checked:T,onChange:e=>k(e.target.checked),children:"Add selected users to teams"}),T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Select Teams:"}),(0,t.jsx)(h.Select,{mode:"multiple",placeholder:"Select teams to add users to",value:S,onChange:w,style:{width:"100%",marginTop:8},options:d?.map(e=>({label:e.team_alias||e.team_id,value:e.team_id}))||[]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(B,{strong:!0,children:"Team Budget (Optional):"}),(0,t.jsx)(x.InputNumber,{placeholder:"Max budget per user in team",value:N,onChange:e=>C(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,t.jsx)(B,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,t.jsx)(E,{userData:A,onCancel:D,onSubmit:L,teams:d,accessToken:r,userID:"bulk_edit",userRole:c,userModels:j,possibleUIRoles:l,isBulkEdit:!0}),y&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,t.jsxs)(B,{children:["Updating ",I?"all users":a.length," user(s)..."]})})]})};var D=e.i(371455);let A=({visible:e,possibleUIRoles:s,onCancel:a,user:l,onSubmit:r})=>{let[i,c]=(0,n.useState)(l),[u]=w.Form.useForm();(0,n.useEffect)(()=>{u.resetFields()},[l]);let m=async()=>{u.resetFields(),a()},g=async e=>{r(e),u.resetFields(),a()};return l?(0,t.jsx)(o.Modal,{open:e,onCancel:m,footer:null,title:"Edit User "+l.user_id,width:1e3,children:(0,t.jsx)(w.Form,{form:u,onFinish:g,initialValues:l,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,t.jsx)(_.TextInput,{})}),(0,t.jsx)(w.Form.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(h.Select,{children:s&&Object.entries(s).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(y.SelectItem,{value:e,title:s,children:(0,t.jsxs)("div",{className:"flex",children:[s," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},e))})}),(0,t.jsx)(w.Form.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,t.jsx)(x.InputNumber,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,t.jsx)(I.default,{min:0,step:.01})}),(0,t.jsx)(w.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(T.default,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.Button,{htmlType:"submit",children:"Save"})})]})})}):null};var L=e.i(172372),O=e.i(500330),P=e.i(152473),z=e.i(266027),V=e.i(912598),$=e.i(127952),K=e.i(304967),H=e.i(629569),q=e.i(599724),G=e.i(114600),W=e.i(482725),J=e.i(790848),Q=e.i(646563),Z=e.i(955135);let Y=({accessToken:e,possibleUIRoles:s,userID:a,userRole:l})=>{let[r,i]=(0,n.useState)(!0),[o,u]=(0,n.useState)(null),[m,g]=(0,n.useState)(!1),[f,p]=(0,n.useState)({}),[j,v]=(0,n.useState)(!1),[y,S]=(0,n.useState)([]),{Paragraph:w}=c.Typography,{Option:N}=h.Select;(0,n.useEffect)(()=>{(async()=>{if(!e)return i(!1);try{let t=await (0,b.getInternalUserSettings)(e);if(u(t),p(t.values||{}),e)try{let t=await (0,b.modelAvailableCall)(e,a,l);if(t&&t.data){let e=t.data.map(e=>e.id);S(e)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),U.default.fromBackend("Failed to fetch SSO settings")}finally{i(!1)}})()},[e]);let C=async()=>{if(e){v(!0);try{let t=Object.entries(f).reduce((e,[t,s])=>(e[t]=""===s?null:s,e),{}),s=await (0,b.updateInternalUserSettings)(e,t);u({...o,values:s.settings}),g(!1)}catch(e){console.error("Error updating SSO settings:",e),U.default.fromBackend("Failed to update settings: "+e)}finally{v(!1)}}},I=(e,t)=>{p(s=>({...s,[e]:t}))},E=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[];return r?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(W.Spin,{size:"large"})}):o?(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"Default User Settings"}),!r&&o&&(m?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(d.Button,{onClick:()=>{g(!1),p(o.values||{})},disabled:j,children:"Cancel"}),(0,t.jsx)(d.Button,{type:"primary",onClick:C,loading:j,children:"Save Changes"})]}):(0,t.jsx)(d.Button,{type:"primary",onClick:()=>g(!0),children:"Edit Settings"}))]}),o?.field_schema?.description&&(0,t.jsx)(w,{className:"mb-4",children:o.field_schema.description}),(0,t.jsx)(G.Divider,{}),(0,t.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:a}=o;return a&&a.properties?Object.entries(a.properties).map(([a,l])=>{let r=e[a],i=a.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,t.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,t.jsx)(q.Text,{className:"font-medium text-lg",children:i}),(0,t.jsx)(w,{className:"text-sm text-gray-500 mt-1",children:l.description||"No description available"}),m?(0,t.jsx)("div",{className:"mt-2",children:((e,a,l)=>{let r=a.type;if("teams"===e){let s,a;return(0,t.jsx)("div",{className:"mt-2",children:(s=E(f[e]||[]),a=(e,t,a)=>{let l=[...s];l[e]={...l[e],[t]:a},I("teams",l)},(0,t.jsxs)("div",{className:"space-y-3",children:[s.map((e,l)=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)(q.Text,{className:"font-medium",children:["Team ",l+1]}),(0,t.jsx)(d.Button,{size:"small",danger:!0,icon:(0,t.jsx)(Z.DeleteOutlined,{}),onClick:()=>{I("teams",s.filter((e,t)=>t!==l))},children:"Remove"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,t.jsx)(_.TextInput,{value:e.team_id,onChange:e=>a(l,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,t.jsx)(x.InputNumber,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>a(l,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,t.jsxs)(h.Select,{style:{width:"100%"},value:e.user_role,onChange:e=>a(l,"user_role",e),children:[(0,t.jsx)(N,{value:"user",children:"User"}),(0,t.jsx)(N,{value:"admin",children:"Admin"})]})]})]})]},l)),(0,t.jsx)(d.Button,{icon:(0,t.jsx)(Q.PlusOutlined,{}),onClick:()=>{I("teams",[...s,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]}))})}if("user_role"===e&&s)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:Object.entries(s).filter(([e])=>e.includes("internal_user")).map(([e,{ui_label:s,description:a}])=>(0,t.jsx)(N,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:a})]})},e))});if("budget_duration"===e)return(0,t.jsx)(T.default,{value:f[e]||null,onChange:t=>I(e,t),className:"mt-2"});if("boolean"===r)return(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(J.Switch,{checked:!!f[e],onChange:t=>I(e,t)})});if("array"===r&&a.items?.enum)return(0,t.jsx)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:a.items.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else if("models"===e)return(0,t.jsxs)(h.Select,{mode:"multiple",style:{width:"100%"},value:f[e]||[],onChange:t=>I(e,t),className:"mt-2",children:[(0,t.jsx)(N,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,t.jsx)(N,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),y.map(e=>(0,t.jsx)(N,{value:e,children:(0,k.getModelDisplayName)(e)},e))]});else if("string"===r&&a.enum)return(0,t.jsx)(h.Select,{style:{width:"100%"},value:f[e]||"",onChange:t=>I(e,t),className:"mt-2",children:a.enum.map(e=>(0,t.jsx)(N,{value:e,children:e},e))});else return(0,t.jsx)(_.TextInput,{value:void 0!==f[e]?String(f[e]):"",onChange:t=>I(e,t.target.value),placeholder:a.description||"",className:"mt-2"})})(a,l,0)}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:((e,a)=>{if(null==a)return(0,t.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(a)){if(0===a.length)return(0,t.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=E(a);return(0,t.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,s)=>(0,t.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,t.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,t.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?`$${(0,O.formatNumberWithCommas)(e.max_budget_in_team,4)}`:"No limit"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,t.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},s))})}if("user_role"===e&&s&&s[a]){let{ui_label:e,description:l}=s[a];return(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:e}),l&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:l})]})}if("budget_duration"===e)return(0,t.jsx)("span",{children:(0,T.getBudgetDurationLabel)(a)});if("boolean"==typeof a)return(0,t.jsx)("span",{children:a?"Enabled":"Disabled"});if("models"===e&&Array.isArray(a))return 0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,k.getModelDisplayName)(e)},s))});if("object"==typeof a)return Array.isArray(a)?0===a.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:a.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(a,null,2)});return(0,t.jsx)("span",{children:String(a)})})(a,r)})]},a)}):(0,t.jsx)(q.Text,{children:"No schema information available"})})()})]}):(0,t.jsx)(K.Card,{children:(0,t.jsx)(q.Text,{children:"No settings available or you do not have permission to view them."})})};var X=e.i(389083),ee=e.i(350967),et=e.i(752978),es=e.i(262218),ea=e.i(591935),el=e.i(68155),er=e.i(502275),ei=e.i(278587),en=e.i(166406);let ed=(e,s,a,l,r,i)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(N.Tooltip,{title:e.original.user_id,children:(0,t.jsx)("span",{className:"text-xs",children:e.original.user_id?`${e.original.user_id.slice(0,7)}...`:"-"})}),e.original.user_id&&(0,t.jsx)(N.Tooltip,{title:"Copy User ID",children:(0,t.jsx)(en.CopyOutlined,{onClick:t=>{t.stopPropagation(),(0,O.copyToClipboard)(e.original.user_id,"User ID copied to clipboard")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_email||"-"})},{id:"status",header:"Status",enableSorting:!1,cell:({row:e})=>{let s;return(s=e.original.metadata)&&"object"==typeof s&&!1===s.scim_active?(0,t.jsx)(N.Tooltip,{title:"Deactivated via SCIM (external identity provider). The user's virtual keys are blocked.",children:(0,t.jsx)(es.Tag,{color:"red","data-testid":`user-status-${e.original.user_id}`,children:"Inactive"})}):(0,t.jsx)(es.Tag,{color:"green","data-testid":`user-status-${e.original.user_id}`,children:"Active"})}},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:({row:s})=>(0,t.jsx)("span",{className:"text-xs",children:e?.[s.original.user_role]?.ui_label||"-"})},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.user_alias||"-"})},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.spend?(0,O.formatNumberWithCommas)(e.original.spend,4):"-"})},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.max_budget?e.original.max_budget:"Unlimited"})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"SSO ID"}),(0,t.jsx)(N.Tooltip,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,t.jsx)(er.InformationCircleIcon,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:null!==e.original.sso_user_id?e.original.sso_user_id:"-"})},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:({row:e})=>(0,t.jsx)(ee.Grid,{numItems:2,children:e.original.key_count>0?(0,t.jsxs)(X.Badge,{size:"xs",color:"indigo",children:[e.original.key_count," ",1===e.original.key_count?"Key":"Keys"]}):(0,t.jsx)(X.Badge,{size:"xs",color:"gray",children:"No Keys"})})},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.created_at?new Date(e.original.created_at).toLocaleDateString():"-"})},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:({row:e})=>(0,t.jsx)("span",{className:"text-xs",children:e.original.updated_at?new Date(e.original.updated_at).toLocaleDateString():"-"})},{id:"actions",header:"Actions",enableSorting:!1,cell:({row:e})=>(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(N.Tooltip,{title:"Edit user details",children:(0,t.jsx)(et.Icon,{icon:ea.PencilAltIcon,size:"sm",onClick:()=>r(e.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(N.Tooltip,{title:"Delete user",children:(0,t.jsx)(et.Icon,{icon:el.TrashIcon,size:"sm",onClick:()=>a(e.original),className:"cursor-pointer hover:text-red-600"})}),(0,t.jsx)(N.Tooltip,{title:"Reset Password",children:(0,t.jsx)(et.Icon,{icon:ei.RefreshIcon,size:"sm",onClick:()=>l(e.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}];if(i){let{onSelectUser:e,onSelectAll:s,isUserSelected:a,isAllSelected:l,isIndeterminate:r}=i;return[{id:"select",enableSorting:!1,header:()=>(0,t.jsx)(p.Checkbox,{indeterminate:r,checked:l,onChange:e=>s(e.target.checked),onClick:e=>e.stopPropagation()}),cell:({row:s})=>(0,t.jsx)(p.Checkbox,{checked:a(s.original),onChange:t=>e(s.original,t.target.checked),onClick:e=>e.stopPropagation()})},...n]}return n};var eo=e.i(152990),ec=e.i(682830),eu=e.i(269200),em=e.i(427612),eh=e.i(64848),ex=e.i(942232),eg=e.i(496020),ef=e.i(977572),ep=e.i(206929),eb=e.i(94629),ej=e.i(360820),ev=e.i(871943),ey=e.i(981339),e_=e.i(530212),eS=e.i(988297),ew=e.i(118366),eN=e.i(678784);function eC({userId:e,onClose:c,accessToken:u,userRole:m,onDelete:x,possibleUIRoles:g,initialTab:f=0,startInEditMode:p=!1}){let[j,y]=(0,n.useState)(null),[_,S]=(0,n.useState)([]),[k,I]=(0,n.useState)(!1),[R,B]=(0,n.useState)(!1),[M,F]=(0,n.useState)(!0),[D,A]=(0,n.useState)(p),[P,z]=(0,n.useState)([]),[V,G]=(0,n.useState)(!1),[W,J]=(0,n.useState)(null),[Q,Z]=(0,n.useState)(null),[Y,X]=(0,n.useState)(f),[et,es]=(0,n.useState)({}),[ea,er]=(0,n.useState)(!1),[en,ed]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),[ep,eb]=(0,n.useState)(null),[ej,ev]=(0,n.useState)(!1),[ey,eC]=(0,n.useState)(!1),[eT,ek]=(0,n.useState)([]),[eI,eE]=(0,n.useState)(""),[eU,eR]=(0,n.useState)("user"),[eB,eM]=(0,n.useState)(!1);n.default.useEffect(()=>{Z((0,b.getProxyBaseUrl)())},[]),n.default.useEffect(()=>{console.log(`userId: ${e}, userRole: ${m}, accessToken: ${u}`),(async()=>{try{if(!u)return;let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0)try{let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}}),s=await Promise.all(e);S(s)}catch{S(t.teams.map(e=>({team_id:e,team_alias:null})))}let s=(await (0,b.modelAvailableCall)(u,e,m||"")).data.map(e=>e.id);z(s)}catch(e){console.error("Error fetching user data:",e),U.default.fromBackend("Failed to fetch user data")}finally{F(!1)}})()},[u,e,m]);let eF="proxy_admin"===m||"Admin"===m,eD=async()=>{if(u){eM(!0);try{let e=await (0,b.teamListCall)(u,null);ek((e||[]).map(e=>({team_id:e.team_id,team_alias:e.team_alias||e.team_id})))}catch(e){console.error("Error fetching teams:",e)}finally{eM(!1)}}},eA=async()=>{if(u&&eI){ev(!0);try{await (0,b.teamMemberAddCall)(u,eI,{role:eU,user_id:e}),U.default.success("User added to team successfully"),ed(!1);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error adding user to team:",e),U.default.fromBackend(e?.message||"Failed to add user to team")}finally{ev(!1)}}},eL=async()=>{if(u&&ep){eC(!0);try{await (0,b.teamMemberDeleteCall)(u,ep.team_id,{role:"user",user_id:e}),U.default.success("User removed from team successfully"),ec(!1),eb(null);let t=await (0,b.userGetInfoV2)(u,e);if(y(t),t.teams&&t.teams.length>0){let e=t.teams.map(async e=>{try{let t=await (0,b.teamInfoCall)(u,e);return{team_id:e,team_alias:t?.team_info?.team_alias||null}}catch{return{team_id:e,team_alias:null}}});S(await Promise.all(e))}else S([])}catch(e){console.error("Error removing user from team:",e),U.default.fromBackend(e?.message||"Failed to remove user from team")}finally{eC(!1)}}},eO=eT.filter(e=>!_.some(t=>t.team_id===e.team_id)),eP=async()=>{if(!u)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let t=await (0,b.invitationCreateCall)(u,e);J(t),G(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},ez=async()=>{try{if(!u)return;B(!0),await (0,b.userDeleteCall)(u,[e]),U.default.success("User deleted successfully"),x&&x(),c()}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{I(!1),B(!1)}},eV=async e=>{try{if(!u||!j)return;await (0,b.userUpdateUserCall)(u,e,null),y({...j,user_email:e.user_email??j.user_email,user_alias:e.user_alias??j.user_alias,models:e.models??j.models,max_budget:e.max_budget??j.max_budget,budget_duration:e.budget_duration??j.budget_duration,metadata:e.metadata??j.metadata}),U.default.success("User updated successfully"),A(!1)}catch(e){console.error("Error updating user:",e),U.default.fromBackend("Failed to update user")}};if(M)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"Loading user data..."})]});if(!j)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(q.Text,{children:"User not found"})]});let e$=async(e,t)=>{await (0,O.copyToClipboard)(e)&&(es(e=>({...e,[t]:!0})),setTimeout(()=>{es(e=>({...e,[t]:!1}))},2e3))},eK={user_id:j.user_id,user_info:{user_email:j.user_email,user_alias:j.user_alias,user_role:j.user_role,models:j.models,max_budget:j.max_budget,budget_duration:j.budget_duration,metadata:j.metadata}};return(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)(v.Button,{icon:e_.ArrowLeftIcon,variant:"light",onClick:c,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(H.Title,{children:j.user_email||"User"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"text-gray-500 font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(v.Button,{icon:ei.RefreshIcon,variant:"secondary",onClick:eP,className:"flex items-center",children:"Reset Password"}),(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"secondary",onClick:()=>I(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,t.jsx)($.default,{isOpen:k,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:j.user_email},{label:"User ID",value:j.user_id,code:!0},{label:"Global Proxy Role",value:j.user_role&&g?.[j.user_role]?.ui_label||j.user_role||"-"},{label:"Total Spend (USD)",value:null!==j.spend&&void 0!==j.spend?j.spend.toFixed(2):void 0}],onCancel:()=>{I(!1)},onOk:ez,confirmLoading:R}),(0,t.jsxs)(a.TabGroup,{defaultIndex:Y,onIndexChange:X,children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Overview"}),(0,t.jsx)(s.Tab,{children:"Details"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(ee.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(H.Title,{children:["$",(0,O.formatNumberWithCommas)(j.spend||0,4)]}),(0,t.jsxs)(q.Text,{children:["of"," ",null!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"]})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)(q.Text,{children:"Teams"}),eF&&(0,t.jsx)(v.Button,{icon:eS.PlusIcon,variant:"light",size:"xs",onClick:()=>{eE(""),eR("user"),ed(!0),eD()},children:"Add Team"})]}),(0,t.jsxs)("div",{className:"mt-2",children:[_.length>0?(0,t.jsx)("div",{className:"max-h-60 overflow-y-auto",children:(0,t.jsxs)(eu.Table,{children:[(0,t.jsx)(em.TableHead,{children:(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(eh.TableHeaderCell,{children:"Team Name"}),eF&&(0,t.jsx)(eh.TableHeaderCell,{className:"text-right",children:"Actions"})]})}),(0,t.jsx)(ex.TableBody,{children:_.slice(0,ea?_.length:20).map(e=>(0,t.jsxs)(eg.TableRow,{children:[(0,t.jsx)(ef.TableCell,{children:e.team_alias||e.team_id}),eF&&(0,t.jsx)(ef.TableCell,{className:"text-right",children:(0,t.jsx)(v.Button,{icon:el.TrashIcon,variant:"light",size:"xs",color:"red",onClick:()=>{eb(e),ec(!0)}})})]},e.team_id))})]})}):(0,t.jsx)(q.Text,{children:"No teams"}),!ea&&_.length>20&&(0,t.jsxs)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!0),children:["+",_.length-20," more"]}),ea&&_.length>20&&(0,t.jsx)(v.Button,{variant:"light",size:"xs",className:"mt-2",onClick:()=>er(!1),children:"Show Less"})]})]}),(0,t.jsxs)(K.Card,{children:[(0,t.jsx)(q.Text,{children:"Personal Models"}),(0,t.jsx)("div",{className:"mt-2",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)(q.Text,{children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]})]})}),(0,t.jsx)(r.TabPanel,{children:(0,t.jsxs)(K.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(H.Title,{children:"User Settings"}),!D&&m&&C.rolesWithWriteAccess.includes(m)&&(0,t.jsx)(v.Button,{onClick:()=>A(!0),children:"Edit Settings"})]}),D&&j?(0,t.jsx)(E,{userData:eK,onCancel:()=>A(!1),onSubmit:eV,teams:_,accessToken:u,userID:e,userRole:m,userModels:P,possibleUIRoles:g}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User ID"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(q.Text,{className:"font-mono",children:j.user_id}),(0,t.jsx)(d.Button,{type:"text",size:"small",icon:et["user-id"]?(0,t.jsx)(eN.CheckIcon,{size:12}):(0,t.jsx)(ew.CopyIcon,{size:12}),onClick:()=>e$(j.user_id,"user-id"),className:`left-2 z-10 transition-all duration-200 ${et["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Email"}),(0,t.jsx)(q.Text,{children:j.user_email||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"User Alias"}),(0,t.jsx)(q.Text,{children:j.user_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Global Proxy Role"}),(0,t.jsx)(q.Text,{children:j.user_role||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(q.Text,{children:j.created_at?new Date(j.created_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(q.Text,{children:j.updated_at?new Date(j.updated_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Personal Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:j.models?.length&&j.models?.length>0?j.models?.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,t.jsx)(q.Text,{children:"All proxy models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsx)(q.Text,{children:null!==j.max_budget&&void 0!==j.max_budget?`$${(0,O.formatNumberWithCommas)(j.max_budget,4)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Budget Reset"}),(0,t.jsx)(q.Text,{children:(0,T.getBudgetDurationLabel)(j.budget_duration??null)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(q.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(j.metadata||{},null,2)})]})]})]})})]})]}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:V,setIsInvitationLinkModalVisible:G,baseUrl:Q||"",invitationLinkData:W,modalType:"resetPassword"}),(0,t.jsx)($.default,{isOpen:eo,title:"Remove from Team",alertMessage:"Removing this user from the team will also delete any keys the user created for this team.",message:"Are you sure you want to remove this user from the team? This action cannot be undone.",resourceInformationTitle:"Team Membership",resourceInformation:[{label:"Team",value:ep?.team_alias||ep?.team_id},{label:"User ID",value:j?.user_id,code:!0},{label:"Email",value:j?.user_email}],onCancel:()=>{ec(!1),eb(null)},onOk:eL,confirmLoading:ey}),(0,t.jsx)(o.Modal,{title:"Add User to Team",open:en,onCancel:()=>ed(!1),footer:null,width:500,maskClosable:!ej,children:(0,t.jsxs)(w.Form,{layout:"vertical",onFinish:eA,children:[(0,t.jsx)(w.Form.Item,{label:"Team",required:!0,children:(0,t.jsx)(h.Select,{showSearch:!0,value:eI||void 0,onChange:eE,placeholder:"Select a team",filterOption:(e,t)=>{let s=eO.find(e=>e.team_id===t?.value);return!!s&&s.team_alias.toLowerCase().includes(e.toLowerCase())},loading:eB,children:eO.map(e=>(0,t.jsx)(h.Select.Option,{value:e.team_id,children:e.team_alias},e.team_id))})}),(0,t.jsx)(w.Form.Item,{label:"Member Role",children:(0,t.jsxs)(h.Select,{value:eU,onChange:eR,children:[(0,t.jsx)(h.Select.Option,{value:"user",children:(0,t.jsxs)(N.Tooltip,{title:"Can view team info, but not manage it",children:[(0,t.jsx)("span",{className:"font-medium",children:"user"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can view team info, but not manage it"})]})}),(0,t.jsx)(h.Select.Option,{value:"admin",children:(0,t.jsxs)(N.Tooltip,{title:"Can create team keys, add members, and manage settings",children:[(0,t.jsx)("span",{className:"font-medium",children:"admin"}),(0,t.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"- Can create team keys, add members, and manage settings"})]})})]})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(d.Button,{type:"primary",htmlType:"submit",loading:ej,disabled:!eI,children:ej?"Adding...":"Add to Team"})})]})})]})}var eT=e.i(655913),ek=e.i(38419),eI=e.i(78334),eE=e.i(555436),eU=e.i(284614);let eR=(0,e.i(475254).default)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function eB({data:e=[],columns:s,isLoading:a=!1,onSortChange:l,currentSort:r,accessToken:i,userRole:d,possibleUIRoles:o,handleEdit:c,handleDelete:u,handleResetPassword:m,selectedUsers:h=[],onSelectionChange:x,enableSelection:g=!1,filters:f,updateFilters:p,initialFilters:b,teams:j,userListResponse:v,currentPage:_,handlePageChange:S}){let[w,N]=n.default.useState([{id:r?.sortBy||"created_at",desc:r?.sortOrder==="desc"}]),[C,T]=n.default.useState(null),[k,I]=n.default.useState(!1),[E,U]=n.default.useState(!1),R=(e,t=!1)=>{T(e),I(t)},B=(e,t)=>{x&&(t?x([...h,e]):x(h.filter(t=>t.user_id!==e.user_id)))},M=t=>{x&&(t?x(e):x([]))},F=e=>h.some(t=>t.user_id===e.user_id),D=e.length>0&&h.length===e.length,A=h.length>0&&h.lengtho?ed(o,c,u,m,R,g?{selectedUsers:h,onSelectUser:B,onSelectAll:M,isUserSelected:F,isAllSelected:D,isIndeterminate:A}:void 0):s,[o,c,u,m,R,s,g,h,D,A]),O=(0,eo.useReactTable)({data:e,columns:L,state:{sorting:w},onSortingChange:e=>{let t="function"==typeof e?e(w):e;if(N(t),t&&Array.isArray(t)&&t.length>0&&t[0]){let e=t[0];if(e.id){let t=e.id,s=e.desc?"desc":"asc";l?.(t,s)}}else l?.("created_at","desc")},getCoreRowModel:(0,ec.getCoreRowModel)(),manualSorting:!0,enableSorting:!0});return(n.default.useEffect(()=>{r&&N([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]),C)?(0,t.jsx)(eC,{userId:C,onClose:()=>{T(null),I(!1)},accessToken:i,userRole:d,possibleUIRoles:o,initialTab:+!!k,startInEditMode:k}):(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(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)(eT.FilterInput,{placeholder:"Search by email...",value:f.email,onChange:e=>p({email:e}),icon:eE.Search}),(0,t.jsx)(ek.FiltersButton,{onClick:()=>U(!E),active:E,hasActiveFilters:!!(f.user_id||f.user_role||f.team)}),(0,t.jsx)(eI.ResetFiltersButton,{onClick:()=>{p(b)}})]}),E&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by User ID",value:f.user_id,onChange:e=>p({user_id:e}),icon:eU.User}),(0,t.jsx)(eT.FilterInput,{placeholder:"Filter by SSO ID",value:f.sso_user_id,onChange:e=>p({sso_user_id:e}),icon:eR}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.user_role,onValueChange:e=>p({user_role:e}),placeholder:"Select Role",children:o&&Object.entries(o).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s.ui_label},e))})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ep.Select,{value:f.team,onValueChange:e=>p({team:e}),placeholder:"Select Team",children:j?.map(e=>(0,t.jsx)(y.SelectItem,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[a?(0,t.jsx)(ey.Skeleton.Input,{active:!0,style:{width:192,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",v&&v.users&&v.users.length>0?(v.page-1)*v.page_size+1:0," ","-"," ",v&&v.users?Math.min(v.page*v.page_size,v.total):0," ","of ",v?v.total:0," results"]}),(0,t.jsx)("div",{className:"flex space-x-2",children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>S(_-1),disabled:1===_,className:`px-3 py-1 text-sm border rounded-md ${1===_?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Previous"}),(0,t.jsx)("button",{onClick:()=>S(_+1),disabled:!v||_>=v.total_pages,className:`px-3 py-1 text-sm border rounded-md ${!v||_>=v.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"}`,children:"Next"})]})})]})]})}),(0,t.jsx)("div",{className:"overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(eu.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(em.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(eg.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eh.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""} ${e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eo.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(ej.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ev.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eb.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(ex.TableBody,{children:a?(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading users..."})})})}):e.length>0?O.getRowModel().rows.map(e=>(0,t.jsx)(eg.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(ef.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:()=>{"user_id"===e.column.id&&R(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,eo.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(eg.TableRow,{children:(0,t.jsx)(ef.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:eM,Title:eF}=c.Typography,eD={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};e.s(["default",0,({accessToken:e,token:o,userRole:c,userID:u,teams:m,orgAdminOrgIds:h})=>{let x=!!c&&(0,C.isProxyAdminRole)(c),g=(0,V.useQueryClient)(),[f,p]=(0,n.useState)(1),[j,v]=(0,n.useState)(!1),[y,_]=(0,n.useState)(null),[S,w]=(0,n.useState)(!1),[N,T]=(0,n.useState)(!1),[k,I]=(0,n.useState)(null),[E,R]=(0,n.useState)("users"),[B,M]=(0,n.useState)(eD),[K,H,q]=(0,P.useDebouncedState)(B,{wait:300}),[G,W]=(0,n.useState)(!1),[J,Q]=(0,n.useState)(null),[Z,X]=(0,n.useState)(null),[ee,et]=(0,n.useState)([]),[es,ea]=(0,n.useState)(!1),[el,er]=(0,n.useState)(!1),[ei,en]=(0,n.useState)([]),eo=e=>{I(e),w(!0)};(0,n.useEffect)(()=>()=>{q.cancel()},[q]),(0,n.useEffect)(()=>{X((0,b.getProxyBaseUrl)())},[]),(0,n.useEffect)(()=>{(async()=>{try{if(!u||!c||!e)return;let t=(await (0,b.modelAvailableCall)(e,u,c)).data.map(e=>e.id);console.log("available_model_names:",t),en(t)}catch(e){console.error("Error fetching user models:",e)}})()},[e,u,c]);let ec=e=>{M(t=>{let s={...t,...e};return H(s),s})},eu=(e,t)=>{ec({sort_by:e,sort_order:t})},em=async t=>{if(!e)return void U.default.fromBackend("Access token not found");try{U.default.success("Generating password reset link...");let s=await (0,b.invitationCreateCall)(e,t);Q(s),W(!0)}catch(e){U.default.fromBackend("Failed to generate password reset link")}},eh=async()=>{if(k&&e)try{T(!0),await (0,b.userDeleteCall)(e,[k.user_id]),g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.filter(e=>e.user_id!==k.user_id);return{...e,users:t}}),U.default.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),U.default.fromBackend("Failed to delete user")}finally{w(!1),I(null),T(!1)}},ex=async()=>{_(null),v(!1)},eg=async t=>{if(console.log("inside handleEditSubmit:",t),e&&o&&c&&u){try{let s=await (0,b.userUpdateUserCall)(e,t,null);g.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let t=e.users.map(e=>e.user_id===s.data.user_id?(0,O.updateExistingKeys)(e,s.data):e);return{...e,users:t}}),U.default.success(`User ${t.user_id} updated successfully`)}catch(e){console.error("There was an error updating the user",e)}_(null),v(!1)}},ef=async e=>{p(e)},ep=e=>{et(e)},eb=(0,z.useQuery)({queryKey:["userList",{debouncedFilter:K,currentPage:f,orgAdminOrgIds:h}],queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.userListCall)(e,K.user_id?[K.user_id]:null,f,25,K.email||null,K.user_role||null,K.team||null,K.sso_user_id||null,K.sort_by,K.sort_order,h?h.map(e=>e.organization_id):null)},enabled:!!(e&&o&&c&&u),placeholderData:e=>e}),ej=eb.data,ev=(0,z.useQuery)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!e)throw Error("Access token required");return await (0,b.getPossibleUserRoles)(e)},enabled:!!(e&&o&&c&&u)}).data,e_=ed(ev,e=>{_(e),v(!0)},eo,em,()=>{});return(0,t.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("div",{className:"flex space-x-3",children:eb.isLoading?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,t.jsx)(ey.Skeleton.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.CreateUserButton,{userID:u,accessToken:e,teams:m,possibleUIRoles:ev}),x&&(0,t.jsx)(d.Button,{onClick:()=>{er(!el),et([])},type:el?"primary":"default",className:"flex items-center",children:el?"Cancel Selection":"Select Users"}),x&&el&&(0,t.jsxs)(d.Button,{type:"primary",onClick:()=>{0===ee.length?U.default.fromBackend("Please select users to edit"):ea(!0)},disabled:0===ee.length,className:"flex items-center",children:["Bulk Edit (",ee.length," selected)"]})]}):null})}),x?(0,t.jsxs)(a.TabGroup,{defaultIndex:0,onIndexChange:e=>R(0===e?"users":"settings"),children:[(0,t.jsxs)(l.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Users"}),(0,t.jsx)(s.Tab,{children:"Default User Settings"})]}),(0,t.jsxs)(i.TabPanels,{children:[(0,t.jsx)(r.TabPanel,{children:(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:el,selectedUsers:ee,onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef})}),(0,t.jsx)(r.TabPanel,{children:u&&c&&e?(0,t.jsx)(Y,{accessToken:e,possibleUIRoles:ev,userID:u,userRole:c}):(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(ey.Skeleton,{active:!0,paragraph:{rows:4}})})})]})]}):(0,t.jsx)(eB,{data:eb.data?.users||[],columns:e_,isLoading:eb.isLoading,accessToken:e,userRole:c,onSortChange:eu,currentSort:{sortBy:B.sort_by,sortOrder:B.sort_order},possibleUIRoles:ev,handleEdit:e=>{_(e),v(!0)},handleDelete:eo,handleResetPassword:em,enableSelection:!1,selectedUsers:[],onSelectionChange:ep,filters:B,updateFilters:ec,initialFilters:eD,teams:m,userListResponse:ej,currentPage:f,handlePageChange:ef}),(0,t.jsx)(A,{visible:j,possibleUIRoles:ev,onCancel:ex,user:y,onSubmit:eg}),(0,t.jsx)($.default,{isOpen:S,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:k?.user_email},{label:"User ID",value:k?.user_id,code:!0},{label:"Global Proxy Role",value:k&&ev?.[k.user_role]?.ui_label||k?.user_role||"-"},{label:"Total Spend (USD)",value:k?.spend?.toFixed(2)}],onCancel:()=>{w(!1),I(null)},onOk:eh,confirmLoading:N}),(0,t.jsx)(L.default,{isInvitationLinkModalVisible:G,setIsInvitationLinkModalVisible:W,baseUrl:Z||"",invitationLinkData:J,modalType:"resetPassword"}),(0,t.jsx)(F,{open:es,onCancel:()=>ea(!1),selectedUsers:ee,possibleUIRoles:ev,accessToken:e,onSuccess:()=>{g.invalidateQueries({queryKey:["userList"]}),et([]),er(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,C.isAdminRole)(c)})]})}],910119)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/cbab30fb3f911abc.js b/litellm/proxy/_experimental/out/_next/static/chunks/baadbd26839e7b66.js similarity index 62% rename from litellm/proxy/_experimental/out/_next/static/chunks/cbab30fb3f911abc.js rename to litellm/proxy/_experimental/out/_next/static/chunks/baadbd26839e7b66.js index a93dca7961..5944daa876 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/cbab30fb3f911abc.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/baadbd26839e7b66.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,844444,e=>{"use strict";var t=e.i(843476),a=e.i(906579),l=e.i(271645),s=e.i(115571);function r(e){let t=t=>{"disableShowNewBadge"===t.key&&e()},a=t=>{let{key:a}=t.detail;"disableShowNewBadge"===a&&e()};return window.addEventListener("storage",t),window.addEventListener(s.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",t),window.removeEventListener(s.LOCAL_STORAGE_EVENT,a)}}function i(){return"true"===(0,s.getLocalStorageItem)("disableShowNewBadge")}function n({children:e,dot:s=!1}){return(0,l.useSyncExternalStore)(r,i)?e?(0,t.jsx)(t.Fragment,{children:e}):null:e?(0,t.jsx)(a.Badge,{color:"blue",count:s?void 0:"New",dot:s,children:e}):(0,t.jsx)(a.Badge,{color:"blue",count:s?void 0:"New",dot:s})}e.s(["default",()=>n],844444)},477189,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["AppstoreOutlined",0,r],477189)},19732,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={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 s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["ExperimentOutlined",0,r],19732)},788191,e=>{"use strict";e.i(247167);var t=e.i(931067),a=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:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["PlayCircleOutlined",0,r],788191)},399219,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",()=>t])},299251,153702,777579,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={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 s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["BankOutlined",0,r],299251);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"};var n=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:i}))});e.s(["BarChartOutlined",0,n],153702);let o={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 c=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["LineChartOutlined",0,c],777579)},362133,457202,439061,182399,234779,374615,330995,592143,372943,899268,87316,655900,299023,25652,882293,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["ApartmentOutlined",0,r],362133);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-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-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};var n=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:i}))});e.s(["AuditOutlined",0,n],457202);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"};var c=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["BgColorsOutlined",0,c],439061);let d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"};var u=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:d}))});e.s(["BlockOutlined",0,u],182399);let m={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-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};var g=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:m}))});e.s(["BookOutlined",0,g],234779);let h={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var x=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:h}))});e.s(["CreditCardOutlined",0,x],374615);var f=e.i(366845);e.s(["FolderOutlined",()=>f.default],330995);var p=e.i(609587);e.s(["ConfigProvider",()=>p.default],592143);var y=e.i(8211),v=e.i(343794),b=e.i(529681),j=e.i(242064),w=e.i(704914),N=e.i(876556),k=e.i(290224),O=e.i(251224),L=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,l=Object.getOwnPropertySymbols(e);st.indexOf(l[s])&&Object.prototype.propertyIsEnumerable.call(e,l[s])&&(a[l[s]]=e[l[s]]);return a};function _({suffixCls:e,tagName:t,displayName:l}){return l=>a.forwardRef((s,r)=>a.createElement(l,Object.assign({ref:r,suffixCls:e,tagName:t},s)))}let z=a.forwardRef((e,t)=>{let{prefixCls:l,suffixCls:s,className:r,tagName:i}=e,n=L(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:o}=a.useContext(j.ConfigContext),c=o("layout",l),[d,u,m]=(0,O.default)(c),g=s?`${c}-${s}`:c;return d(a.createElement(i,Object.assign({className:(0,v.default)(l||g,r,u,m),ref:t},n)))}),C=a.forwardRef((e,t)=>{let{direction:l}=a.useContext(j.ConfigContext),[s,r]=a.useState([]),{prefixCls:i,className:n,rootClassName:o,children:c,hasSider:d,tagName:u,style:m}=e,g=L(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),h=(0,b.default)(g,["suffixCls"]),{getPrefixCls:x,className:f,style:p}=(0,j.useComponentConfig)("layout"),_=x("layout",i),z="boolean"==typeof d?d:!!s.length||(0,N.default)(c).some(e=>e.type===k.default),[C,S,M]=(0,O.default)(_),H=(0,v.default)(_,{[`${_}-has-sider`]:z,[`${_}-rtl`]:"rtl"===l},f,n,o,S,M),E=a.useMemo(()=>({siderHook:{addSider:e=>{r(t=>[].concat((0,y.default)(t),[e]))},removeSider:e=>{r(t=>t.filter(t=>t!==e))}}}),[]);return C(a.createElement(w.LayoutContext.Provider,{value:E},a.createElement(u,Object.assign({ref:t,className:H,style:Object.assign(Object.assign({},p),m)},h),c)))}),S=_({tagName:"div",displayName:"Layout"})(C),M=_({suffixCls:"header",tagName:"header",displayName:"Header"})(z),H=_({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(z),E=_({suffixCls:"content",tagName:"main",displayName:"Content"})(z);S.Header=M,S.Footer=H,S.Content=E,S.Sider=k.default,S._InternalSiderContext=k.SiderContext,e.s(["Layout",0,S],372943);var V=e.i(60699);e.s(["Menu",()=>V.default],899268);var B=e.i(475254);let R=(0,B.default)("calendar",[["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"}]]);e.s(["Calendar",()=>R],87316);var P=e.i(399219);e.s(["ChevronUp",()=>P.default],655900);let T=(0,B.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>T],299023);let A=(0,B.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>A],25652);let U=(0,B.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["UserCheck",()=>U],882293)},761911,98740,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>t],98740),e.s(["Users",()=>t],761911)},111672,e=>{"use strict";var t=e.i(247167),a=e.i(843476),l=e.i(109799),s=e.i(785242),r=e.i(135214),i=e.i(218129),n=e.i(362133),o=e.i(477189),c=e.i(457202),d=e.i(299251),u=e.i(153702),m=e.i(439061),g=e.i(182399),h=e.i(234779),x=e.i(374615),f=e.i(210612),p=e.i(19732),y=e.i(872934),v=e.i(993914),b=e.i(330995),j=e.i(438957),w=e.i(777579),N=e.i(788191),k=e.i(983561),O=e.i(602073),L=e.i(928685),_=e.i(313603),z=e.i(232164),C=e.i(645526),S=e.i(366308),M=e.i(771674),H=e.i(592143),E=e.i(372943),V=e.i(899268),B=e.i(271645),R=e.i(708347),P=e.i(844444),T=e.i(371401);e.i(389083);var A=e.i(878894),U=e.i(87316);e.i(664659),e.i(655900);var $=e.i(531278),I=e.i(299023),D=e.i(25652),K=e.i(882293),F=e.i(761911),W=e.i(764205);let G=(...e)=>e.filter(Boolean).join(" ");function q({accessToken:e,width:t=220}){let l=(0,T.useDisableUsageIndicator)(),[s,r]=(0,B.useState)(!1),[i,n]=(0,B.useState)(!1),[o,c]=(0,B.useState)(null),[d,u]=(0,B.useState)(null),[m,g]=(0,B.useState)(!1),[h,x]=(0,B.useState)(null);(0,B.useEffect)(()=>{(async()=>{if(e){g(!0),x(null);try{let[t,a]=await Promise.all([(0,W.getRemainingUsers)(e),(0,W.getLicenseInfo)(e).catch(()=>null)]);c(t),u(a)}catch(e){console.error("Failed to fetch usage data:",e),x("Failed to load usage data")}finally{g(!1)}}})()},[e]);let f=d?.expiration_date?(e=>{if(!e)return null;let t=new Date(e+"T00:00:00Z"),a=new Date;return a.setHours(0,0,0,0),Math.ceil((t.getTime()-a.getTime())/864e5)})(d.expiration_date):null,p=null!==f&&f<0,y=null!==f&&f>=0&&f<30,{isOverLimit:v,isNearLimit:b,usagePercentage:j,userMetrics:w,teamMetrics:N}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let t=e.total_users?e.total_users_used/e.total_users*100:0,a=t>100,l=t>=80&&t<=100,s=e.total_teams?e.total_teams_used/e.total_teams*100:0,r=s>100,i=s>=80&&s<=100,n=a||r;return{isOverLimit:n,isNearLimit:(l||i)&&!n,usagePercentage:Math.max(t,s),userMetrics:{isOverLimit:a,isNearLimit:l,usagePercentage:t},teamMetrics:{isOverLimit:r,isNearLimit:i,usagePercentage:s}}})(o),k=v||b||p||y,O=v||p,L=(b||y)&&!O;return l||!e||o?.total_users===null&&o?.total_teams===null?null:(0,a.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:`${Math.min(t,220)}px`},children:(0,a.jsx)(()=>i?(0,a.jsx)("button",{onClick:()=>n(!1),className:G("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),k&&(0,a.jsx)("span",{className:"flex-shrink-0",children:O?(0,a.jsx)(A.AlertTriangle,{className:"h-3 w-3"}):L?(0,a.jsx)(D.TrendingUp,{className:"h-3 w-3"}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[o&&null!==o.total_users&&(0,a.jsxs)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",w.isOverLimit&&"bg-red-50 text-red-700 border-red-200",w.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!w.isOverLimit&&!w.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",o.total_users_used,"/",o.total_users]}),o&&null!==o.total_teams&&(0,a.jsxs)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",o.total_teams_used,"/",o.total_teams]}),d?.expiration_date&&null!==f&&(0,a.jsx)("span",{className:G("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",p&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!p&&!y&&"bg-gray-50 text-gray-700 border-gray-200"),children:f<0?"Exp!":`${f}d`}),!o||null===o.total_users&&null===o.total_teams&&!d&&(0,a.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):m?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,a.jsx)($.Loader2,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):h||!o?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:h||"No data"})}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]})}):(0,a.jsxs)("div",{className:G("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[d?.has_license&&d.expiration_date&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",p&&"border-red-200 bg-red-50",y&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(U.Calendar,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"License"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",p&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!p&&!y&&"bg-gray-50 text-gray-600 border-gray-200"),children:p?"Expired":y?"Expiring soon":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Status:"}),(0,a.jsx)("span",{className:G("font-medium text-right",p&&"text-red-600",y&&"text-yellow-600"),children:(e=>{if(null===e)return"No expiration";if(e<0)return"Expired";if(0===e)return"Expires today";if(1===e)return"1 day remaining";if(e<30)return`${e} days remaining`;if(e<60)return"1 month remaining";let t=Math.floor(e/30);return`${t} months remaining`})(f)})]}),d.license_type&&(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Type:"}),(0,a.jsx)("span",{className:"font-medium text-right capitalize",children:d.license_type})]})]}),null!==o.total_users&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",w.isOverLimit&&"border-red-200 bg-red-50",w.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(F.Users,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Users"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",w.isOverLimit&&"bg-red-50 text-red-700 border-red-200",w.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!w.isOverLimit&&!w.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:w.isOverLimit?"Over limit":w.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_users_used,"/",o.total_users]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:G("font-medium text-right",w.isOverLimit&&"text-red-600",w.isNearLimit&&"text-yellow-600"),children:o.total_users_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(w.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:G("h-2 rounded-full transition-all duration-300",w.isOverLimit&&"bg-red-500",w.isNearLimit&&"bg-yellow-500",!w.isOverLimit&&!w.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(w.usagePercentage,100)}%`}})})]}),null!==o.total_teams&&(0,a.jsxs)("div",{className:G("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(K.UserCheck,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Teams"}),(0,a.jsx)("span",{className:G("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_teams_used,"/",o.total_teams]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:G("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:o.total_teams_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:G("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(N.usagePercentage,100)}%`}})})]})]})]}),{})})}let{Sider:Y}=E.Layout,X={"api-reference":"api-reference"},Z=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,a.jsx)(j.KeyOutlined,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,a.jsx)(N.PlayCircleOutlined,{}),roles:R.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:R.rolesWithWriteAccess},{key:"agentic",page:"agentic",label:"Agentic",icon:(0,a.jsx)(k.RobotOutlined,{}),children:[{key:"agents",page:"agents",label:"Agents",icon:(0,a.jsx)(k.RobotOutlined,{}),roles:R.rolesWithWriteAccess},{key:"workflows",page:"workflows",label:"Workflow Runs",icon:(0,a.jsx)(n.ApartmentOutlined,{})},{key:"memory",page:"memory",label:"Memory",icon:(0,a.jsx)(h.BookOutlined,{})}]},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,a.jsx)(S.ToolOutlined,{})},{key:"skills",page:"skills",label:"Skills",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:R.all_admin_roles},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,a.jsx)(O.SafetyOutlined,{})},{key:"policies",page:"policies",label:(0,a.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,a.jsx)(c.AuditOutlined,{}),roles:R.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,a.jsx)(S.ToolOutlined,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,a.jsx)(L.SearchOutlined,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,a.jsx)(f.DatabaseOutlined,{})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,a.jsx)(O.SafetyOutlined,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,a.jsx)(u.BarChartOutlined,{}),roles:[...R.all_admin_roles,...R.internalUserRoles],label:"Usage"},{key:"logs",page:"logs",label:"Logs",icon:(0,a.jsx)(w.LineChartOutlined,{})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,a.jsx)(O.SafetyOutlined,{}),roles:[...R.all_admin_roles,...R.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,a.jsx)(C.TeamOutlined,{})},{key:"projects",page:"projects",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,a.jsx)(P.default,{})]}),icon:(0,a.jsx)(b.FolderOutlined,{}),roles:R.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,a.jsx)(M.UserOutlined,{}),roles:R.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,a.jsx)(d.BankOutlined,{}),roles:R.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:R.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,a.jsx)(x.CreditCardOutlined,{}),roles:R.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api-reference",page:"api-reference",label:"API Reference",icon:(0,a.jsx)(i.ApiOutlined,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,a.jsx)(o.AppstoreOutlined,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,a.jsx)(h.BookOutlined,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,a.jsx)(p.ExperimentOutlined,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,a.jsx)(f.DatabaseOutlined,{}),roles:R.all_admin_roles},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,a.jsx)(v.FileTextOutlined,{}),roles:R.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:[...R.all_admin_roles,...R.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,a.jsx)(z.TagsOutlined,{}),roles:R.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,a.jsx)(u.BarChartOutlined,{})}]}]},{groupLabel:"SETTINGS",roles:R.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,a.jsx)(P.default,{})]}),icon:(0,a.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,a.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,a.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings ",(0,a.jsx)(P.default,{dot:!0,children:(0,a.jsx)("span",{})})]}),icon:(0,a.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,a.jsx)(u.BarChartOutlined,{}),roles:R.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,a.jsx)(m.BgColorsOutlined,{}),roles:R.all_admin_roles}]}]}];e.s(["default",0,({setPage:e,defaultSelectedKey:i,collapsed:n=!1,enabledPagesInternalUsers:o,enableProjectsUI:c,disableAgentsForInternalUsers:d,allowAgentsForTeamAdmins:u,disableVectorStoresForInternalUsers:m,allowVectorStoresForTeamAdmins:g})=>{let h,{userId:x,accessToken:f,userRole:p}=(0,r.default)(),{data:v}=(0,l.useOrganizations)(),{data:b}=(0,s.useTeams)(),j=(0,B.useMemo)(()=>!!x&&!!v&&v.some(e=>e.members?.some(e=>e.user_id===x&&"org_admin"===e.user_role)),[x,v]),w=(0,B.useMemo)(()=>(0,R.isUserTeamAdminForAnyTeam)(b??null,x??""),[b,x]),N=t=>{if(X[t])return void e(t);let a=new URLSearchParams(window.location.search);a.set("page",t),window.history.pushState(null,"",`?${a.toString()}`),e(t)},k=(e,l,s)=>{let r;if(s)return(0,a.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{color:"inherit",textDecoration:"none"},children:[e," ",(0,a.jsx)(y.ExportOutlined,{style:{fontSize:10,marginLeft:4}})]});let i=X[l],n=i?function(e){let a=(t.default.env.NEXT_PUBLIC_BASE_URL??"").replace(/^\/+|\/+$/g,""),l=a?`/${a}/`:"/";if(W.serverRootPath&&"/"!==W.serverRootPath){let e=W.serverRootPath.replace(/\/+$/,""),t=l.replace(/^\/+/,"");l=`${e}/${t}`}return`${l}${e}`}(i):((r=new URLSearchParams(window.location.search)).set("page",l),`?${r.toString()}`);return(0,a.jsx)("a",{href:n,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button?e.stopPropagation():e.preventDefault()},style:{color:"inherit",textDecoration:"none"},children:e})},O=e=>{let t=(0,R.isAdminRole)(p);return null!=o&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:p,isAdmin:t,enabledPagesInternalUsers:o}),e.map(e=>({...e,children:e.children?O(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key){if(!(!e.roles||e.roles.includes(p)||j))return!1;if(!t&&null!=o){let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0}if("projects"===e.key&&!c||!t&&"agents"===e.key&&d&&!(u&&w)||!t&&"vector-stores"===e.key&&m&&!(g&&w)||e.roles&&!e.roles.includes(p))return!1;if(!t&&null!=o){if(e.children&&e.children.length>0&&e.children.some(e=>o.includes(e.page)))return console.log(`[LeftNav] Parent "${e.page}" (${e.key}): VISIBLE (has visible children)`),!0;let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0})},L=(e=>{for(let t of Z)for(let a of t.items){if(a.page===e)return a.key;if(a.children){let t=a.children.find(t=>t.page===e);if(t)return t.key}}return"api-keys"})(i);return(0,a.jsx)(E.Layout,{children:(0,a.jsxs)(Y,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,a.jsx)(H.ConfigProvider,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,a.jsx)(V.Menu,{mode:"inline",selectedKeys:[L],defaultOpenKeys:[],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(h=[],Z.forEach(e=>{if(e.roles&&!e.roles.includes(p))return;let t=O(e.items);0!==t.length&&h.push({type:"group",label:n?null:(0,a.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:e.groupLabel}),children:t.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),children:e.children?.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):N(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):N(e.page)}}))})}),h)})}),(0,R.isAdminRole)(p)&&!n&&(0,a.jsx)(q,{accessToken:f,width:220})]})})},"menuGroups",()=>Z],111672)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,844444,e=>{"use strict";var t=e.i(843476),a=e.i(906579),l=e.i(271645),s=e.i(115571);function r(e){let t=t=>{"disableShowNewBadge"===t.key&&e()},a=t=>{let{key:a}=t.detail;"disableShowNewBadge"===a&&e()};return window.addEventListener("storage",t),window.addEventListener(s.LOCAL_STORAGE_EVENT,a),()=>{window.removeEventListener("storage",t),window.removeEventListener(s.LOCAL_STORAGE_EVENT,a)}}function i(){return"true"===(0,s.getLocalStorageItem)("disableShowNewBadge")}function n({children:e,dot:s=!1}){return(0,l.useSyncExternalStore)(r,i)?e?(0,t.jsx)(t.Fragment,{children:e}):null:e?(0,t.jsx)(a.Badge,{color:"blue",count:s?void 0:"New",dot:s,children:e}):(0,t.jsx)(a.Badge,{color:"blue",count:s?void 0:"New",dot:s})}e.s(["default",()=>n],844444)},477189,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["AppstoreOutlined",0,r],477189)},19732,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={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 s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["ExperimentOutlined",0,r],19732)},788191,e=>{"use strict";e.i(247167);var t=e.i(931067),a=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:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["PlayCircleOutlined",0,r],788191)},399219,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",()=>t])},299251,153702,777579,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={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 s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["BankOutlined",0,r],299251);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"};var n=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:i}))});e.s(["BarChartOutlined",0,n],153702);let o={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 c=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["LineChartOutlined",0,c],777579)},362133,457202,439061,182399,234779,374615,330995,592143,372943,899268,87316,655900,299023,25652,882293,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};var s=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(s.default,(0,t.default)({},e,{ref:r,icon:l}))});e.s(["ApartmentOutlined",0,r],362133);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-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-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};var n=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:i}))});e.s(["AuditOutlined",0,n],457202);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"};var c=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:o}))});e.s(["BgColorsOutlined",0,c],439061);let d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"};var u=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:d}))});e.s(["BlockOutlined",0,u],182399);let m={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-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};var g=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:m}))});e.s(["BookOutlined",0,g],234779);let h={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var x=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:h}))});e.s(["CreditCardOutlined",0,x],374615);var p=e.i(366845);e.s(["FolderOutlined",()=>p.default],330995);var f=e.i(609587);e.s(["ConfigProvider",()=>f.default],592143);var y=e.i(8211),v=e.i(343794),b=e.i(529681),j=e.i(242064),w=e.i(704914),N=e.i(876556),k=e.i(290224),O=e.i(251224),L=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,l=Object.getOwnPropertySymbols(e);st.indexOf(l[s])&&Object.prototype.propertyIsEnumerable.call(e,l[s])&&(a[l[s]]=e[l[s]]);return a};function _({suffixCls:e,tagName:t,displayName:l}){return l=>a.forwardRef((s,r)=>a.createElement(l,Object.assign({ref:r,suffixCls:e,tagName:t},s)))}let z=a.forwardRef((e,t)=>{let{prefixCls:l,suffixCls:s,className:r,tagName:i}=e,n=L(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:o}=a.useContext(j.ConfigContext),c=o("layout",l),[d,u,m]=(0,O.default)(c),g=s?`${c}-${s}`:c;return d(a.createElement(i,Object.assign({className:(0,v.default)(l||g,r,u,m),ref:t},n)))}),S=a.forwardRef((e,t)=>{let{direction:l}=a.useContext(j.ConfigContext),[s,r]=a.useState([]),{prefixCls:i,className:n,rootClassName:o,children:c,hasSider:d,tagName:u,style:m}=e,g=L(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),h=(0,b.default)(g,["suffixCls"]),{getPrefixCls:x,className:p,style:f}=(0,j.useComponentConfig)("layout"),_=x("layout",i),z="boolean"==typeof d?d:!!s.length||(0,N.default)(c).some(e=>e.type===k.default),[S,C,M]=(0,O.default)(_),H=(0,v.default)(_,{[`${_}-has-sider`]:z,[`${_}-rtl`]:"rtl"===l},p,n,o,C,M),V=a.useMemo(()=>({siderHook:{addSider:e=>{r(t=>[].concat((0,y.default)(t),[e]))},removeSider:e=>{r(t=>t.filter(t=>t!==e))}}}),[]);return S(a.createElement(w.LayoutContext.Provider,{value:V},a.createElement(u,Object.assign({ref:t,className:H,style:Object.assign(Object.assign({},f),m)},h),c)))}),C=_({tagName:"div",displayName:"Layout"})(S),M=_({suffixCls:"header",tagName:"header",displayName:"Header"})(z),H=_({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(z),V=_({suffixCls:"content",tagName:"main",displayName:"Content"})(z);C.Header=M,C.Footer=H,C.Content=V,C.Sider=k.default,C._InternalSiderContext=k.SiderContext,e.s(["Layout",0,C],372943);var E=e.i(60699);e.s(["Menu",()=>E.default],899268);var B=e.i(475254);let P=(0,B.default)("calendar",[["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"}]]);e.s(["Calendar",()=>P],87316);var R=e.i(399219);e.s(["ChevronUp",()=>R.default],655900);let T=(0,B.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>T],299023);let A=(0,B.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>A],25652);let U=(0,B.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["UserCheck",()=>U],882293)},761911,98740,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>t],98740),e.s(["Users",()=>t],761911)},111672,e=>{"use strict";var t=e.i(247167),a=e.i(843476),l=e.i(109799),s=e.i(785242),r=e.i(135214),i=e.i(218129),n=e.i(362133),o=e.i(477189),c=e.i(457202),d=e.i(299251),u=e.i(153702),m=e.i(439061),g=e.i(182399),h=e.i(234779),x=e.i(374615),p=e.i(210612),f=e.i(19732),y=e.i(872934),v=e.i(993914),b=e.i(330995),j=e.i(438957),w=e.i(777579),N=e.i(788191),k=e.i(983561),O=e.i(602073),L=e.i(928685),_=e.i(313603),z=e.i(232164),S=e.i(645526),C=e.i(366308),M=e.i(771674),H=e.i(592143),V=e.i(372943),E=e.i(899268),B=e.i(271645),P=e.i(708347),R=e.i(844444),T=e.i(371401);e.i(389083);var A=e.i(878894),U=e.i(87316);e.i(664659),e.i(655900);var $=e.i(531278),I=e.i(299023),D=e.i(25652),K=e.i(882293),F=e.i(761911),G=e.i(764205);let W=(...e)=>e.filter(Boolean).join(" ");function q({accessToken:e,width:t=220}){let l=(0,T.useDisableUsageIndicator)(),[s,r]=(0,B.useState)(!1),[i,n]=(0,B.useState)(!1),[o,c]=(0,B.useState)(null),[d,u]=(0,B.useState)(null),[m,g]=(0,B.useState)(!1),[h,x]=(0,B.useState)(null);(0,B.useEffect)(()=>{(async()=>{if(e){g(!0),x(null);try{let[t,a]=await Promise.all([(0,G.getRemainingUsers)(e),(0,G.getLicenseInfo)(e).catch(()=>null)]);c(t),u(a)}catch(e){console.error("Failed to fetch usage data:",e),x("Failed to load usage data")}finally{g(!1)}}})()},[e]);let p=d?.expiration_date?(e=>{if(!e)return null;let t=new Date(e+"T00:00:00Z"),a=new Date;return a.setHours(0,0,0,0),Math.ceil((t.getTime()-a.getTime())/864e5)})(d.expiration_date):null,f=null!==p&&p<0,y=null!==p&&p>=0&&p<30,{isOverLimit:v,isNearLimit:b,usagePercentage:j,userMetrics:w,teamMetrics:N}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let t=e.total_users?e.total_users_used/e.total_users*100:0,a=t>100,l=t>=80&&t<=100,s=e.total_teams?e.total_teams_used/e.total_teams*100:0,r=s>100,i=s>=80&&s<=100,n=a||r;return{isOverLimit:n,isNearLimit:(l||i)&&!n,usagePercentage:Math.max(t,s),userMetrics:{isOverLimit:a,isNearLimit:l,usagePercentage:t},teamMetrics:{isOverLimit:r,isNearLimit:i,usagePercentage:s}}})(o),k=v||b||f||y,O=v||f,L=(b||y)&&!O;return l||!e||o?.total_users===null&&o?.total_teams===null?null:(0,a.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:`${Math.min(t,220)}px`},children:(0,a.jsx)(()=>i?(0,a.jsx)("button",{onClick:()=>n(!1),className:W("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),k&&(0,a.jsx)("span",{className:"flex-shrink-0",children:O?(0,a.jsx)(A.AlertTriangle,{className:"h-3 w-3"}):L?(0,a.jsx)(D.TrendingUp,{className:"h-3 w-3"}):null}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[o&&null!==o.total_users&&(0,a.jsxs)("span",{className:W("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",w.isOverLimit&&"bg-red-50 text-red-700 border-red-200",w.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!w.isOverLimit&&!w.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",o.total_users_used,"/",o.total_users]}),o&&null!==o.total_teams&&(0,a.jsxs)("span",{className:W("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",o.total_teams_used,"/",o.total_teams]}),d?.expiration_date&&null!==p&&(0,a.jsx)("span",{className:W("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-700 border-gray-200"),children:p<0?"Exp!":`${p}d`}),!o||null===o.total_users&&null===o.total_teams&&!d&&(0,a.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):m?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,a.jsx)($.Loader2,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):h||!o?(0,a.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:h||"No data"})}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]})}):(0,a.jsxs)("div",{className:W("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,a.jsx)(F.Users,{className:"h-4 w-4 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,a.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,a.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[d?.has_license&&d.expiration_date&&(0,a.jsxs)("div",{className:W("space-y-1 border rounded-md p-2",f&&"border-red-200 bg-red-50",y&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(U.Calendar,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"License"}),(0,a.jsx)("span",{className:W("ml-1 px-1.5 py-0.5 rounded border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-600 border-gray-200"),children:f?"Expired":y?"Expiring soon":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Status:"}),(0,a.jsx)("span",{className:W("font-medium text-right",f&&"text-red-600",y&&"text-yellow-600"),children:(e=>{if(null===e)return"No expiration";if(e<0)return"Expired";if(0===e)return"Expires today";if(1===e)return"1 day remaining";if(e<30)return`${e} days remaining`;if(e<60)return"1 month remaining";let t=Math.floor(e/30);return`${t} months remaining`})(p)})]}),d.license_type&&(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Type:"}),(0,a.jsx)("span",{className:"font-medium text-right capitalize",children:d.license_type})]})]}),null!==o.total_users&&(0,a.jsxs)("div",{className:W("space-y-1 border rounded-md p-2",w.isOverLimit&&"border-red-200 bg-red-50",w.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(F.Users,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Users"}),(0,a.jsx)("span",{className:W("ml-1 px-1.5 py-0.5 rounded border",w.isOverLimit&&"bg-red-50 text-red-700 border-red-200",w.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!w.isOverLimit&&!w.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:w.isOverLimit?"Over limit":w.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_users_used,"/",o.total_users]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:W("font-medium text-right",w.isOverLimit&&"text-red-600",w.isNearLimit&&"text-yellow-600"),children:o.total_users_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(w.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:W("h-2 rounded-full transition-all duration-300",w.isOverLimit&&"bg-red-500",w.isNearLimit&&"bg-yellow-500",!w.isOverLimit&&!w.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(w.usagePercentage,100)}%`}})})]}),null!==o.total_teams&&(0,a.jsxs)("div",{className:W("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,a.jsx)(K.UserCheck,{className:"h-3 w-3"}),(0,a.jsx)("span",{className:"font-medium",children:"Teams"}),(0,a.jsx)("span",{className:W("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[o.total_teams_used,"/",o.total_teams]})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,a.jsx)("span",{className:W("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:o.total_teams_remaining})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,a.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,a.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,a.jsx)("div",{className:W("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(N.usagePercentage,100)}%`}})})]})]})]}),{})})}let{Sider:Y}=V.Layout,X={"api-reference":"api-reference"},Z=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,a.jsx)(j.KeyOutlined,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,a.jsx)(N.PlayCircleOutlined,{}),roles:P.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:P.rolesAllowedToViewWriteScopedPages},{key:"agentic",page:"agentic",label:"Agentic",icon:(0,a.jsx)(k.RobotOutlined,{}),children:[{key:"agents",page:"agents",label:"Agents",icon:(0,a.jsx)(k.RobotOutlined,{}),roles:P.rolesAllowedToViewWriteScopedPages},{key:"workflows",page:"workflows",label:"Workflow Runs",icon:(0,a.jsx)(n.ApartmentOutlined,{})},{key:"memory",page:"memory",label:"Memory",icon:(0,a.jsx)(h.BookOutlined,{})}]},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,a.jsx)(C.ToolOutlined,{})},{key:"skills",page:"skills",label:"Skills",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:P.all_admin_roles},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,a.jsx)(O.SafetyOutlined,{})},{key:"policies",page:"policies",label:(0,a.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,a.jsx)(c.AuditOutlined,{}),roles:P.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,a.jsx)(C.ToolOutlined,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,a.jsx)(L.SearchOutlined,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,a.jsx)(p.DatabaseOutlined,{})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,a.jsx)(O.SafetyOutlined,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,a.jsx)(u.BarChartOutlined,{}),roles:[...P.all_admin_roles,...P.internalUserRoles],label:"Usage"},{key:"logs",page:"logs",label:"Logs",icon:(0,a.jsx)(w.LineChartOutlined,{})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,a.jsx)(O.SafetyOutlined,{}),roles:[...P.all_admin_roles,...P.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,a.jsx)(S.TeamOutlined,{})},{key:"projects",page:"projects",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,a.jsx)(R.default,{})]}),icon:(0,a.jsx)(b.FolderOutlined,{}),roles:P.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,a.jsx)(M.UserOutlined,{}),roles:P.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,a.jsx)(d.BankOutlined,{}),roles:P.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,a.jsx)(g.BlockOutlined,{}),roles:P.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,a.jsx)(x.CreditCardOutlined,{}),roles:P.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api-reference",page:"api-reference",label:"API Reference",icon:(0,a.jsx)(i.ApiOutlined,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,a.jsx)(o.AppstoreOutlined,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,a.jsx)(h.BookOutlined,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,a.jsx)(f.ExperimentOutlined,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,a.jsx)(p.DatabaseOutlined,{}),roles:P.all_admin_roles},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,a.jsx)(v.FileTextOutlined,{}),roles:P.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,a.jsx)(i.ApiOutlined,{}),roles:[...P.all_admin_roles,...P.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,a.jsx)(z.TagsOutlined,{}),roles:P.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,a.jsx)(u.BarChartOutlined,{})}]}]},{groupLabel:"SETTINGS",roles:P.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,a.jsx)(R.default,{})]}),icon:(0,a.jsx)(_.SettingOutlined,{}),roles:P.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,a.jsx)(_.SettingOutlined,{}),roles:P.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,a.jsx)(_.SettingOutlined,{}),roles:P.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings ",(0,a.jsx)(R.default,{dot:!0,children:(0,a.jsx)("span",{})})]}),icon:(0,a.jsx)(_.SettingOutlined,{}),roles:P.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,a.jsx)(u.BarChartOutlined,{}),roles:P.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,a.jsx)(m.BgColorsOutlined,{}),roles:P.all_admin_roles}]}]}];e.s(["default",0,({setPage:e,defaultSelectedKey:i,collapsed:n=!1,enabledPagesInternalUsers:o,enableProjectsUI:c,disableAgentsForInternalUsers:d,allowAgentsForTeamAdmins:u,disableVectorStoresForInternalUsers:m,allowVectorStoresForTeamAdmins:g})=>{let h,{userId:x,accessToken:p,userRole:f}=(0,r.default)(),{data:v}=(0,l.useOrganizations)(),{data:b}=(0,s.useTeams)(),j=(0,B.useMemo)(()=>!!x&&!!v&&v.some(e=>e.members?.some(e=>e.user_id===x&&"org_admin"===e.user_role)),[x,v]),w=(0,B.useMemo)(()=>(0,P.isUserTeamAdminForAnyTeam)(b??null,x??""),[b,x]),N=t=>{if(X[t])return void e(t);let a=new URLSearchParams(window.location.search);a.set("page",t),window.history.pushState(null,"",`?${a.toString()}`),e(t)},k=(e,l,s)=>{let r;if(s)return(0,a.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{color:"inherit",textDecoration:"none"},children:[e," ",(0,a.jsx)(y.ExportOutlined,{style:{fontSize:10,marginLeft:4}})]});let i=X[l],n=i?function(e){let a=(t.default.env.NEXT_PUBLIC_BASE_URL??"").replace(/^\/+|\/+$/g,""),l=a?`/${a}/`:"/";if(G.serverRootPath&&"/"!==G.serverRootPath){let e=G.serverRootPath.replace(/\/+$/,""),t=l.replace(/^\/+/,"");l=`${e}/${t}`}return`${l}${e}`}(i):((r=new URLSearchParams(window.location.search)).set("page",l),`?${r.toString()}`);return(0,a.jsx)("a",{href:n,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button?e.stopPropagation():e.preventDefault()},style:{color:"inherit",textDecoration:"none"},children:e})},O=e=>{let t=(0,P.isAdminRole)(f);return null!=o&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:f,isAdmin:t,enabledPagesInternalUsers:o}),e.map(e=>({...e,children:e.children?O(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key){if(!(!e.roles||e.roles.includes(f)||j))return!1;if(!t&&null!=o){let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0}if("projects"===e.key&&!c||!t&&"agents"===e.key&&d&&!(u&&w)||!t&&"vector-stores"===e.key&&m&&!(g&&w)||e.roles&&!e.roles.includes(f))return!1;if(!t&&null!=o){if(e.children&&e.children.length>0&&e.children.some(e=>o.includes(e.page)))return console.log(`[LeftNav] Parent "${e.page}" (${e.key}): VISIBLE (has visible children)`),!0;let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0})},L=(e=>{for(let t of Z)for(let a of t.items){if(a.page===e)return a.key;if(a.children){let t=a.children.find(t=>t.page===e);if(t)return t.key}}return"api-keys"})(i);return(0,a.jsx)(V.Layout,{children:(0,a.jsxs)(Y,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,a.jsx)(H.ConfigProvider,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,a.jsx)(E.Menu,{mode:"inline",selectedKeys:[L],defaultOpenKeys:[],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(h=[],Z.forEach(e=>{if(e.roles&&!e.roles.includes(f))return;let t=O(e.items);0!==t.length&&h.push({type:"group",label:n?null:(0,a.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:e.groupLabel}),children:t.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),children:e.children?.map(e=>({key:e.key,icon:e.icon,label:k(e.label,e.page,e.external_url),onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):N(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):N(e.page)}}))})}),h)})}),(0,P.isAdminRole)(f)&&!n&&(0,a.jsx)(q,{accessToken:p,width:220})]})})},"menuGroups",()=>Z],111672)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/bacdab4ef587dc3f.js b/litellm/proxy/_experimental/out/_next/static/chunks/bacdab4ef587dc3f.js deleted file mode 100644 index c83be8a8cb..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/bacdab4ef587dc3f.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},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])},516015,(e,t,r)=>{},898547,(e,t,r)=>{var a=e.i(247167);e.r(516015);var n=e.r(271645),o=n&&"object"==typeof n&&"default"in n?n:{default:n},i=void 0!==a.default&&a.default.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},s=function(){function e(e){var t=void 0===e?{}:e,r=t.name,a=void 0===r?"stylesheet":r,n=t.optimizeForSpeed,o=void 0===n?i:n;u(l(a),"`name` must be a string"),this._name=a,this._deletedRulePlaceholder="#"+a+"-deleted-rule____{}",u("boolean"==typeof o,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=o,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var s="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=s?s.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){u("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),u(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(u(!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(a){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 a=this._tags[e];u(a,"old rule at index `"+e+"` not found"),a.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},d={};function m(e,t){if(!t)return"jsx-"+e;var r=String(t),a=e+r;return d[a]||(d[a]="jsx-"+c(e+"-"+r)),d[a]}function p(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),a=r.styleId,n=r.rules;if(a in this._instancesCounts){this._instancesCounts[a]+=1;return}var o=n.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[a]=o,this._instancesCounts[a]=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 a=this._fromServer&&this._fromServer[r];a?(a.parentNode.removeChild(a),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],a=e[1];return o.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:a}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,a=e.id;if(r){var n=m(a,r);return{styleId:n,rules:Array.isArray(t)?t.map(function(e){return p(n,e)}):[p(n,t)]}}return{styleId:m(a),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}(),h=n.createContext(null);function g(){return new f}function v(){return n.useContext(h)}h.displayName="StyleSheetContext";var b=o.default.useInsertionEffect||o.default.useLayoutEffect,y="u">typeof window?g():void 0;function A(e){var t=y||v();return t&&("u"{t.exports=e.r(898547).style},916925,e=>{"use strict";var t,r=((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 Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",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.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);let a={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",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"},n="../ui/assets/logos/",o={"A2A Agent":`${n}a2a_agent.png`,Ai21:`${n}ai21.svg`,"Ai21 Chat":`${n}ai21.svg`,"AI/ML API":`${n}aiml_api.svg`,"Aiohttp Openai":`${n}openai_small.svg`,Anthropic:`${n}anthropic.svg`,"Anthropic Text":`${n}anthropic.svg`,AssemblyAI:`${n}assemblyai_small.png`,Azure:`${n}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${n}microsoft_azure.svg`,"Azure Text":`${n}microsoft_azure.svg`,Baseten:`${n}baseten.svg`,"Amazon Bedrock":`${n}bedrock.svg`,"Amazon Bedrock Mantle":`${n}bedrock.svg`,"AWS SageMaker":`${n}bedrock.svg`,Cerebras:`${n}cerebras.svg`,Cloudflare:`${n}cloudflare.svg`,Codestral:`${n}mistral.svg`,Cohere:`${n}cohere.svg`,"Cohere Chat":`${n}cohere.svg`,Cometapi:`${n}cometapi.svg`,Cursor:`${n}cursor.svg`,"Databricks (Qwen API)":`${n}databricks.svg`,Dashscope:`${n}dashscope.svg`,Deepseek:`${n}deepseek.svg`,Deepgram:`${n}deepgram.png`,DeepInfra:`${n}deepinfra.png`,ElevenLabs:`${n}elevenlabs.png`,"Fal AI":`${n}fal_ai.jpg`,"Featherless Ai":`${n}featherless.svg`,"Fireworks AI":`${n}fireworks.svg`,Friendliai:`${n}friendli.svg`,"Github Copilot":`${n}github_copilot.svg`,"Google AI Studio":`${n}google.svg`,GradientAI:`${n}gradientai.svg`,Groq:`${n}groq.svg`,vllm:`${n}vllm.png`,Huggingface:`${n}huggingface.svg`,Hyperbolic:`${n}hyperbolic.svg`,Infinity:`${n}infinity.png`,"Jina AI":`${n}jina.png`,"Lambda Ai":`${n}lambda.svg`,"Lm Studio":`${n}lmstudio.svg`,"Meta Llama":`${n}meta_llama.svg`,MiniMax:`${n}minimax.svg`,"Mistral AI":`${n}mistral.svg`,Moonshot:`${n}moonshot.svg`,Morph:`${n}morph.svg`,Nebius:`${n}nebius.svg`,Novita:`${n}novita.svg`,"Nvidia Nim":`${n}nvidia_nim.svg`,Ollama:`${n}ollama.svg`,"Ollama Chat":`${n}ollama.svg`,Oobabooga:`${n}openai_small.svg`,OpenAI:`${n}openai_small.svg`,"Openai Like":`${n}openai_small.svg`,"OpenAI Text Completion":`${n}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${n}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${n}openai_small.svg`,Openrouter:`${n}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${n}oracle.svg`,Perplexity:`${n}perplexity-ai.svg`,Recraft:`${n}recraft.svg`,Replicate:`${n}replicate.svg`,RunwayML:`${n}runwayml.png`,Sagemaker:`${n}bedrock.svg`,Sambanova:`${n}sambanova.svg`,"SAP Generative AI Hub":`${n}sap.png`,Snowflake:`${n}snowflake.svg`,"Text-Completion-Codestral":`${n}mistral.svg`,TogetherAI:`${n}togetherai.svg`,Topaz:`${n}topaz.svg`,Triton:`${n}nvidia_triton.png`,V0:`${n}v0.svg`,"Vercel Ai Gateway":`${n}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${n}google.svg`,"Vertex Ai Beta":`${n}google.svg`,Vllm:`${n}vllm.png`,VolcEngine:`${n}volcengine.png`,"Voyage AI":`${n}voyage.webp`,Watsonx:`${n}watsonx.svg`,"Watsonx Text":`${n}watsonx.svg`,xAI:`${n}xai.svg`,Xinference:`${n}xinference.svg`};e.s(["Providers",()=>r,"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 return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:o[e],displayName:e}}let t=Object.keys(a).find(t=>a[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=r[t];return{logo:o[n],displayName:n}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let r=a[e];console.log(`Provider mapped to: ${r}`);let n=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let a=t.litellm_provider;(a===r||"string"==typeof a&&a.includes(r))&&n.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&n.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&n.push(e)}))),n},"providerLogoMap",0,o,"provider_map",0,a])},798496,e=>{"use strict";var t=e.i(843476),r=e.i(152990),a=e.i(682830),n=e.i(271645),o=e.i(269200),i=e.i(427612),l=e.i(64848),s=e.i(942232),u=e.i(496020),c=e.i(977572),d=e.i(94629),m=e.i(360820),p=e.i(871943);function f({data:e=[],columns:f,isLoading:h=!1,defaultSorting:g=[],pagination:v,onPaginationChange:b,enablePagination:y=!1,onRowClick:A}){let[_,C]=n.default.useState(g),[w]=n.default.useState("onChange"),[S,E]=n.default.useState({}),[x,I]=n.default.useState({}),T=(0,r.useReactTable)({data:e,columns:f,state:{sorting:_,columnSizing:S,columnVisibility:x,...y&&v?{pagination:v}:{}},columnResizeMode:w,onSortingChange:C,onColumnSizingChange:E,onColumnVisibilityChange:I,...y&&b?{onPaginationChange:b}:{},getCoreRowModel:(0,a.getCoreRowModel)(),getSortedRowModel:(0,a.getSortedRowModel)(),...y?{getPaginationRowModel:(0,a.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(o.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:T.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(i.TableHead,{children:T.getHeaderGroups().map(e=>(0,t.jsx)(u.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(l.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,r.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(m.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(s.TableBody,{children:h?(0,t.jsx)(u.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:f.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):T.getRowModel().rows.length>0?T.getRowModel().rows.map(e=>(0,t.jsx)(u.TableRow,{onClick:()=>A?.(e.original),className:A?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,r.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(u.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:f.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>f])},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(562901),a=e.i(343794),n=e.i(914949),o=e.i(529681),i=e.i(242064),l=e.i(829672),s=e.i(285781),u=e.i(836938),c=e.i(920228),d=e.i(62405),m=e.i(408850),p=e.i(87414),f=e.i(310730);let h=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:r,antCls:a,zIndexPopup:n,colorText:o,colorWarning:i,marginXXS:l,marginXS:s,fontSize:u,fontWeightStrong:c,colorTextHeading:d}=e;return{[t]:{zIndex:n,[`&${a}-popover`]:{fontSize:u},[`${t}-message`]:{marginBottom:s,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${r}`]:{color:i,fontSize:u,lineHeight:1,marginInlineEnd:s},[`${t}-title`]:{fontWeight:c,color:d,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:l,color:o}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:s}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var g=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};let v=e=>{let{prefixCls:a,okButtonProps:n,cancelButtonProps:o,title:l,description:f,cancelText:h,okText:g,okType:v="primary",icon:b=t.createElement(r.default,null),showCancel:y=!0,close:A,onConfirm:_,onCancel:C,onPopupClick:w}=e,{getPrefixCls:S}=t.useContext(i.ConfigContext),[E]=(0,m.useLocale)("Popconfirm",p.default.Popconfirm),x=(0,u.getRenderPropValue)(l),I=(0,u.getRenderPropValue)(f);return t.createElement("div",{className:`${a}-inner-content`,onClick:w},t.createElement("div",{className:`${a}-message`},b&&t.createElement("span",{className:`${a}-message-icon`},b),t.createElement("div",{className:`${a}-message-text`},x&&t.createElement("div",{className:`${a}-title`},x),I&&t.createElement("div",{className:`${a}-description`},I))),t.createElement("div",{className:`${a}-buttons`},y&&t.createElement(c.default,Object.assign({onClick:C,size:"small"},o),h||(null==E?void 0:E.cancelText)),t.createElement(s.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,d.convertLegacyProps)(v)),n),actionFn:_,close:A,prefixCls:S("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},g||(null==E?void 0:E.okText))))};var b=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};let y=t.forwardRef((e,s)=>{var u,c;let{prefixCls:d,placement:m="top",trigger:p="click",okType:f="primary",icon:g=t.createElement(r.default,null),children:y,overlayClassName:A,onOpenChange:_,onVisibleChange:C,overlayStyle:w,styles:S,classNames:E}=e,x=b(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:I,className:T,style:O,classNames:R,styles:k}=(0,i.useComponentConfig)("popconfirm"),[N,M]=(0,n.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(c=e.defaultOpen)?c:e.defaultVisible}),L=(e,t)=>{M(e,!0),null==C||C(e),null==_||_(e,t)},P=I("popconfirm",d),j=(0,a.default)(P,T,A,R.root,null==E?void 0:E.root),$=(0,a.default)(R.body,null==E?void 0:E.body),[F]=h(P);return F(t.createElement(l.default,Object.assign({},(0,o.default)(x,["title"]),{trigger:p,placement:m,onOpenChange:(t,r)=>{let{disabled:a=!1}=e;a||L(t,r)},open:N,ref:s,classNames:{root:j,body:$},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},k.root),O),w),null==S?void 0:S.root),body:Object.assign(Object.assign({},k.body),null==S?void 0:S.body)},content:t.createElement(v,Object.assign({okType:f,icon:g},e,{prefixCls:P,close:e=>{L(!1,e)},onConfirm:t=>{var r;return null==(r=e.onConfirm)?void 0:r.call(void 0,t)},onCancel:t=>{var r;L(!1,t),null==(r=e.onCancel)||r.call(void 0,t)}})),"data-popover-inject":!0}),y))});y._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:r,placement:n,className:o,style:l}=e,s=g(e,["prefixCls","placement","className","style"]),{getPrefixCls:u}=t.useContext(i.ConfigContext),c=u("popconfirm",r),[d]=h(c);return d(t.createElement(f.default,{placement:n,className:(0,a.default)(c,o),style:l,content:t.createElement(v,Object.assign({prefixCls:c},s))}))},e.s(["Popconfirm",0,y],883552)},757440,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let a=e=>{var a=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},a),r.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>a])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),a=e.i(271645);let n=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.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"}))};e.s(["default",()=>n],446428);var o=e.i(746725),i=e.i(914189),l=e.i(553521),s=e.i(835696),u=e.i(941444),c=e.i(178677),d=e.i(294316),m=e.i(83733),p=e.i(233137),f=e.i(732607),h=e.i(397701),g=e.i(700020);function v(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:w)!==a.Fragment||1===a.default.Children.count(e.children)}let b=(0,a.createContext)(null);b.displayName="TransitionContext";var y=((t=y||{}).Visible="visible",t.Hidden="hidden",t);let A=(0,a.createContext)(null);function _(e){return"children"in e?_(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function C(e,t){let r=(0,u.useLatestValue)(e),n=(0,a.useRef)([]),s=(0,l.useIsMounted)(),c=(0,o.useDisposables)(),d=(0,i.useEvent)((e,t=g.RenderStrategy.Hidden)=>{let a=n.current.findIndex(({el:t})=>t===e);-1!==a&&((0,h.match)(t,{[g.RenderStrategy.Unmount](){n.current.splice(a,1)},[g.RenderStrategy.Hidden](){n.current[a].state="hidden"}}),c.microTask(()=>{var e;!_(n)&&s.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,i.useEvent)(e=>{let t=n.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>d(e,g.RenderStrategy.Unmount)}),p=(0,a.useRef)([]),f=(0,a.useRef)(Promise.resolve()),v=(0,a.useRef)({enter:[],leave:[]}),b=(0,i.useEvent)((e,r,a)=>{p.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=>{p.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?f.current=f.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(r)):a(r)}),y=(0,i.useEvent)((e,t,r)=>{Promise.all(v.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=p.current.shift())||e()}).then(()=>r(t))});return(0,a.useMemo)(()=>({children:n,register:m,unregister:d,onStart:b,onStop:y,wait:f,chains:v}),[m,d,n,b,y,v,f])}A.displayName="NestingContext";let w=a.Fragment,S=g.RenderFeatures.RenderStrategy,E=(0,g.forwardRefWithAs)(function(e,t){let{show:r,appear:n=!1,unmount:o=!0,...l}=e,u=(0,a.useRef)(null),m=v(e),f=(0,d.useSyncRefs)(...m?[u,t]:null===t?[]:[t]);(0,c.useServerHandoffComplete)();let h=(0,p.useOpenClosed)();if(void 0===r&&null!==h&&(r=(h&p.State.Open)===p.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[y,w]=(0,a.useState)(r?"visible":"hidden"),E=C(()=>{r||w("hidden")}),[I,T]=(0,a.useState)(!0),O=(0,a.useRef)([r]);(0,s.useIsoMorphicEffect)(()=>{!1!==I&&O.current[O.current.length-1]!==r&&(O.current.push(r),T(!1))},[O,r]);let R=(0,a.useMemo)(()=>({show:r,appear:n,initial:I}),[r,n,I]);(0,s.useIsoMorphicEffect)(()=>{r?w("visible"):_(E)||null===u.current||w("hidden")},[r,E]);let k={unmount:o},N=(0,i.useEvent)(()=>{var t;I&&T(!1),null==(t=e.beforeEnter)||t.call(e)}),M=(0,i.useEvent)(()=>{var t;I&&T(!1),null==(t=e.beforeLeave)||t.call(e)}),L=(0,g.useRender)();return a.default.createElement(A.Provider,{value:E},a.default.createElement(b.Provider,{value:R},L({ourProps:{...k,as:a.Fragment,children:a.default.createElement(x,{ref:f,...k,...l,beforeEnter:N,beforeLeave:M})},theirProps:{},defaultTag:a.Fragment,features:S,visible:"visible"===y,name:"Transition"})))}),x=(0,g.forwardRefWithAs)(function(e,t){var r,n;let{transition:o=!0,beforeEnter:l,afterEnter:u,beforeLeave:y,afterLeave:E,enter:x,enterFrom:I,enterTo:T,entered:O,leave:R,leaveFrom:k,leaveTo:N,...M}=e,[L,P]=(0,a.useState)(null),j=(0,a.useRef)(null),$=v(e),F=(0,d.useSyncRefs)(...$?[j,t,P]:null===t?[]:[t]),D=null==(r=M.unmount)||r?g.RenderStrategy.Unmount:g.RenderStrategy.Hidden,{show:z,appear:V,initial:B}=function(){let e=(0,a.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[H,G]=(0,a.useState)(z?"visible":"hidden"),U=function(){let e=(0,a.useContext)(A);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:W,unregister:q}=U;(0,s.useIsoMorphicEffect)(()=>W(j),[W,j]),(0,s.useIsoMorphicEffect)(()=>{if(D===g.RenderStrategy.Hidden&&j.current)return z&&"visible"!==H?void G("visible"):(0,h.match)(H,{hidden:()=>q(j),visible:()=>W(j)})},[H,j,W,q,z,D]);let K=(0,c.useServerHandoffComplete)();(0,s.useIsoMorphicEffect)(()=>{if($&&K&&"visible"===H&&null===j.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[j,H,K,$]);let X=B&&!V,Y=V&&z&&B,Z=(0,a.useRef)(!1),Q=C(()=>{Z.current||(G("hidden"),q(j))},U),J=(0,i.useEvent)(e=>{Z.current=!0,Q.onStart(j,e?"enter":"leave",e=>{"enter"===e?null==l||l():"leave"===e&&(null==y||y())})}),ee=(0,i.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Q.onStop(j,t,e=>{"enter"===e?null==u||u():"leave"===e&&(null==E||E())}),"leave"!==t||_(Q)||(G("hidden"),q(j))});(0,a.useEffect)(()=>{$&&o||(J(z),ee(z))},[z,$,o]);let et=!(!o||!$||!K||X),[,er]=(0,m.useTransition)(et,L,z,{start:J,end:ee}),ea=(0,g.compact)({ref:F,className:(null==(n=(0,f.classNames)(M.className,Y&&x,Y&&I,er.enter&&x,er.enter&&er.closed&&I,er.enter&&!er.closed&&T,er.leave&&R,er.leave&&!er.closed&&k,er.leave&&er.closed&&N,!er.transition&&z&&O))?void 0:n.trim())||void 0,...(0,m.transitionDataAttributes)(er)}),en=0;"visible"===H&&(en|=p.State.Open),"hidden"===H&&(en|=p.State.Closed),er.enter&&(en|=p.State.Opening),er.leave&&(en|=p.State.Closing);let eo=(0,g.useRender)();return a.default.createElement(A.Provider,{value:Q},a.default.createElement(p.OpenClosedProvider,{value:en},eo({ourProps:ea,theirProps:M,defaultTag:w,features:S,visible:"visible"===H,name:"Transition.Child"})))}),I=(0,g.forwardRefWithAs)(function(e,t){let r=null!==(0,a.useContext)(b),n=null!==(0,p.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!r&&n?a.default.createElement(E,{ref:t,...e}):a.default.createElement(x,{ref:t,...e}))}),T=Object.assign(E,{Child:I,Root:E});e.s(["Transition",()=>T],854056)},206929,e=>{"use strict";var t=e.i(290571),r=e.i(757440),a=e.i(271645),n=e.i(446428),o=e.i(444755),i=e.i(673706),l=e.i(103471),s=e.i(495470),u=e.i(854056),c=e.i(888288);let d=(0,i.makeClassName)("Select"),m=a.default.forwardRef((e,i)=>{let{defaultValue:m="",value:p,onValueChange:f,placeholder:h="Select...",disabled:g=!1,icon:v,enableClear:b=!1,required:y,children:A,name:_,error:C=!1,errorMessage:w,className:S,id:E}=e,x=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),I=(0,a.useRef)(null),T=a.Children.toArray(A),[O,R]=(0,c.default)(m,p),k=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(A).filter(a.isValidElement);return(0,l.constructValueToNameMapping)(e)},[A]);return a.default.createElement("div",{className:(0,o.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",S)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:y,className:(0,o.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:O,onChange:e=>{e.preventDefault()},name:_,disabled:g,id:E,onFocus:()=>{let e=I.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},h),T.map(e=>{let t=e.props.value,r=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},r)})),a.default.createElement(s.Listbox,Object.assign({as:"div",ref:i,defaultValue:O,value:O,onChange:e=>{null==f||f(e),R(e)},disabled:g,id:E},x),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(s.ListboxButton,{ref:I,className:(0,o.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",v?"pl-10":"pl-3",(0,l.getSelectButtonColors)((0,l.hasValue)(e),g,C))},v&&a.default.createElement("span",{className:(0,o.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(v,{className:(0,o.tremorTwMerge)(d("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=k.get(e))?t:h),a.default.createElement("span",{className:(0,o.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(r.default,{className:(0,o.tremorTwMerge)(d("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&O?a.default.createElement("button",{type:"button",className:(0,o.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),R(""),null==f||f("")}},a.default.createElement(n.default,{className:(0,o.tremorTwMerge)(d("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(u.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.default.createElement(s.ListboxOptions,{anchor:"bottom start",className:(0,o.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},A)))})),C&&w?a.default.createElement("p",{className:(0,o.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},w):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},37091,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),n=e.i(673706),o=e.i(271645);let i=o.default.forwardRef((e,i)=>{let{color:l,children:s,className:u}=e,c=(0,t.__rest)(e,["color","children","className"]);return o.default.createElement("p",Object.assign({ref:i,className:(0,a.tremorTwMerge)(l?(0,n.getColorClassNames)(l,r.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",u)},c),s)});i.displayName="Subtitle",e.s(["Subtitle",()=>i],37091)},502275,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:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,r],502275)},724154,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-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 n=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(n.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["StopOutlined",0,o],724154)},475647,286536,77705,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 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};var n=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(n.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["PlusCircleOutlined",0,o],475647);var i=e.i(475254);let l=(0,i.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",()=>l],286536);let s=(0,i.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",()=>s],77705)},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),o=r.forwardRef(function(e,o){return r.createElement(n.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["MinusCircleOutlined",0,o],564897)},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),o=r.forwardRef(function(e,o){return r.createElement(n.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["SaveOutlined",0,o],987432)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},446891,836991,153472,e=>{"use strict";var t,r,a=e.i(843476),n=e.i(464571),o=e.i(326373),i=e.i(94629),l=e.i(360820),s=e.i(871943),u=e.i(271645);let c=u.forwardRef(function(e,t){return u.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),u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,c],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let r=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(l.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(s.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(c,{className:"h-4 w-4"})}];return(0,a.jsx)(o.Dropdown,{menu:{items:r,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(n.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(l.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(s.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(i.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var d=e.i(266027),m=e.i(954616),p=e.i(243652),f=e.i(135214),h=e.i(764205),g=((t={}).GENERAL_SETTINGS="general_settings",t),v=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let b=async(e,t)=>{try{let r=h.proxyBaseUrl?`${h.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(r,{method:"GET",headers:{[(0,h.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,h.deriveErrorMessage)(e);throw(0,h.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},y=(0,p.createQueryKeys)("proxyConfig"),A=async(e,t)=>{try{let r=h.proxyBaseUrl?`${h.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(r,{method:"POST",headers:{[(0,h.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,h.deriveErrorMessage)(e);throw(0,h.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>g,"GeneralSettingsFieldName",()=>v,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,f.default)();return(0,m.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await A(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,f.default)();return(0,d.useQuery)({queryKey:y.list({filters:{configType:e}}),queryFn:async()=>await b(t,e),enabled:!!t})}],153472)},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),a=e.i(371330),n=e.i(271645),o=e.i(394487),i=e.i(503269),l=e.i(214520),s=e.i(746725),u=e.i(914189),c=e.i(144279),d=e.i(294316),m=e.i(601893),p=e.i(140721),f=e.i(942803),h=e.i(233538),g=e.i(694421),v=e.i(700020),b=e.i(35889),y=e.i(998348),A=e.i(722678);let _=(0,n.createContext)(null);_.displayName="GroupContext";let C=n.Fragment,w=Object.assign((0,v.forwardRefWithAs)(function(e,t){var C;let w=(0,n.useId)(),S=(0,f.useProvidedId)(),E=(0,m.useDisabled)(),{id:x=S||`headlessui-switch-${w}`,disabled:I=E||!1,checked:T,defaultChecked:O,onChange:R,name:k,value:N,form:M,autoFocus:L=!1,...P}=e,j=(0,n.useContext)(_),[$,F]=(0,n.useState)(null),D=(0,n.useRef)(null),z=(0,d.useSyncRefs)(D,t,null===j?null:j.setSwitch,F),V=(0,l.useDefaultValue)(O),[B,H]=(0,i.useControllable)(T,R,null!=V&&V),G=(0,s.useDisposables)(),[U,W]=(0,n.useState)(!1),q=(0,u.useEvent)(()=>{W(!0),null==H||H(!B),G.nextFrame(()=>{W(!1)})}),K=(0,u.useEvent)(e=>{if((0,h.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),q()}),X=(0,u.useEvent)(e=>{e.key===y.Keys.Space?(e.preventDefault(),q()):e.key===y.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),Y=(0,u.useEvent)(e=>e.preventDefault()),Z=(0,A.useLabelledBy)(),Q=(0,b.useDescribedBy)(),{isFocusVisible:J,focusProps:ee}=(0,r.useFocusRing)({autoFocus:L}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:I}),{pressed:ea,pressProps:en}=(0,o.useActivePress)({disabled:I}),eo=(0,n.useMemo)(()=>({checked:B,disabled:I,hover:et,focus:J,active:ea,autofocus:L,changing:U}),[B,et,J,ea,I,U,L]),ei=(0,v.mergeProps)({id:x,ref:z,role:"switch",type:(0,c.useResolveButtonType)(e,$),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":B,"aria-labelledby":Z,"aria-describedby":Q,disabled:I||void 0,autoFocus:L,onClick:K,onKeyUp:X,onKeyPress:Y},ee,er,en),el=(0,n.useCallback)(()=>{if(void 0!==V)return null==H?void 0:H(V)},[H,V]),es=(0,v.useRender)();return n.default.createElement(n.default.Fragment,null,null!=k&&n.default.createElement(p.FormFields,{disabled:I,data:{[k]:N||"on"},overrides:{type:"checkbox",checked:B},form:M,onReset:el}),es({ourProps:ei,theirProps:P,slot:eo,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,n.useState)(null),[o,i]=(0,A.useLabels)(),[l,s]=(0,b.useDescriptions)(),u=(0,n.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),c=(0,v.useRender)();return n.default.createElement(s,{name:"Switch.Description",value:l},n.default.createElement(i,{name:"Switch.Label",value:o,props:{htmlFor:null==(t=u.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},n.default.createElement(_.Provider,{value:u},c({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:A.Label,Description:b.Description});var S=e.i(888288),E=e.i(95779),x=e.i(444755),I=e.i(673706),T=e.i(829087);let O=(0,I.makeClassName)("Switch"),R=n.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:o=!1,onChange:i,color:l,name:s,error:u,errorMessage:c,disabled:d,required:m,tooltip:p,id:f}=e,h=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:l?(0,I.getColorClassNames)(l,E.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:l?(0,I.getColorClassNames)(l,E.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[v,b]=(0,S.default)(o,a),[y,A]=(0,n.useState)(!1),{tooltipProps:_,getReferenceProps:C}=(0,T.useTooltip)(300);return n.default.createElement("div",{className:"flex flex-row items-center justify-start"},n.default.createElement(T.default,Object.assign({text:p},_)),n.default.createElement("div",Object.assign({ref:(0,I.mergeRefs)([r,_.refs.setReference]),className:(0,x.tremorTwMerge)(O("root"),"flex flex-row relative h-5")},h,C),n.default.createElement("input",{type:"checkbox",className:(0,x.tremorTwMerge)(O("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:s,required:m,checked:v,onChange:e=>{e.preventDefault()}}),n.default.createElement(w,{checked:v,onChange:e=>{b(e),null==i||i(e)},disabled:d,className:(0,x.tremorTwMerge)(O("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>A(!0),onBlur:()=>A(!1),id:f},n.default.createElement("span",{className:(0,x.tremorTwMerge)(O("sr-only"),"sr-only")},"Switch ",v?"on":"off"),n.default.createElement("span",{"aria-hidden":"true",className:(0,x.tremorTwMerge)(O("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")}),n.default.createElement("span",{"aria-hidden":"true",className:(0,x.tremorTwMerge)(O("round"),v?(0,x.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",y?(0,x.tremorTwMerge)("ring-2",g.ringColor):"")}))),u&&c?n.default.createElement("p",{className:(0,x.tremorTwMerge)(O("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});R.displayName="Switch",e.s(["Switch",()=>R],793130)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:n="w-4 h-4"})=>{let[o,i]=(0,r.useState)(!1),{logo:l}=(0,a.getProviderLogoAndName)(e);return o||!l?(0,t.jsx)("div",{className:`${n} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:l,alt:`${e} logo`,className:n,onError:()=>i(!0)})}])},368670,e=>{"use strict";var t=e.i(764205),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})])},664307,e=>{"use strict";var t=e.i(843476),r=e.i(135214),a=e.i(214541),n=e.i(271645),o=e.i(161059);e.s(["default",0,()=>{let{token:e,premiumUser:i}=(0,r.default)(),[l,s]=(0,n.useState)([]),{teams:u}=(0,a.default)();return(0,t.jsx)(o.default,{token:e,modelData:{data:[]},keys:l,setModelData:()=>{},premiumUser:i,teams:u})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/bbe974da1fd4f044.js b/litellm/proxy/_experimental/out/_next/static/chunks/bbe974da1fd4f044.js deleted file mode 100644 index 53de33a465..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/bbe974da1fd4f044.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37091,e=>{"use strict";var t=e.i(290571),s=e.i(95779),r=e.i(444755),a=e.i(673706),l=e.i(271645);let i=l.default.forwardRef((e,i)=>{let{color:n,children:o,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return l.default.createElement("p",Object.assign({ref:i,className:(0,r.tremorTwMerge)(n?(0,a.getColorClassNames)(n,s.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},d),o)});i.displayName="Subtitle",e.s(["Subtitle",()=>i],37091)},149121,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(152990),a=e.i(682830),l=e.i(269200),i=e.i(427612),n=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572);function u({data:e=[],columns:u,onRowClick:p,renderSubComponent:h,renderChildRows:m,getRowCanExpand:x,isLoading:g=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:b="No logs found",enableSorting:v=!1}){let y=!!(h||m)&&!!x,[j,w]=(0,s.useState)([]),N=(0,r.useReactTable)({data:e,columns:u,...v&&{state:{sorting:j},onSortingChange:w,enableSortingRemoval:!1},...y&&{getRowCanExpand:x},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,a.getCoreRowModel)(),...v&&{getSortedRowModel:(0,a.getSortedRowModel)()},...y&&{getExpandedRowModel:(0,a.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(l.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(i.TableHead,{children:N.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let s=v&&e.column.getCanSort(),a=e.column.getIsSorted();return(0,t.jsx)(n.TableHeaderCell,{className:`py-1 h-8 ${s?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:s?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.flexRender)(e.column.columnDef.header,e.getContext()),s&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===a?"↑":"desc"===a?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:g?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):N.getRowModel().rows.length>0?N.getRowModel().rows.map(e=>(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${p?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>p?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,r.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),y&&e.getIsExpanded()&&m&&m({row:e}),y&&e.getIsExpanded()&&h&&!m&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:h({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})})})]})})}e.s(["DataTable",()=>u])},954616,e=>{"use strict";var t=e.i(271645),s=e.i(114272),r=e.i(540143),a=e.i(915823),l=e.i(619273),i=class extends a.Subscribable{#e;#t=void 0;#s;#r;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,l.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#l()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#a(){let e=this.#s?.state??(0,s.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){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,s){let a=(0,n.useQueryClient)(s),[o]=t.useState(()=>new i(a,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(r.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=t.useCallback((e,t)=>{o.mutate(e,t).catch(l.noop)},[o]);if(c.error&&(0,l.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},888288,e=>{"use strict";var t=e.i(271645);let s=(e,s)=>{let r=void 0!==s,[a,l]=(0,t.useState)(e);return[r?s:a,e=>{r||l(e)}]};e.s(["default",()=>s])},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let s=e.i(264042).Row;e.s(["Row",0,s],621192)},214541,e=>{"use strict";var t=e.i(271645),s=e.i(135214),r=e.i(270345);e.s(["default",0,()=>{let[e,a]=(0,t.useState)([]),{accessToken:l,userId:i,userRole:n}=(0,s.default)();return(0,t.useEffect)(()=>{(async()=>{a(await (0,r.fetchTeams)(l,i,n,null))})()},[l,i,n]),{teams:e,setTeams:a}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function s(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function r(e,r){let a=t(e);return isNaN(r)?s(e,NaN):(r&&a.setDate(a.getDate()+r),a)}function a(e,r){let a=t(e);if(isNaN(r))return s(e,NaN);if(!r)return a;let l=a.getDate(),i=s(e,a.getTime());return(i.setMonth(a.getMonth()+r+1,0),l>=i.getDate())?i:(a.setFullYear(i.getFullYear(),i.getMonth(),l),a)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>s],96226),e.s(["addDays",()=>r],439189),e.s(["addMonths",()=>a],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),s=e.i(343794),r=e.i(529681),a=e.i(908286),l=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],d=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let r,a,l;return(0,s.default)(Object.assign(Object.assign(Object.assign({},(r=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${r}`]:r&&o.includes(r)})),(a={},d.forEach(s=>{a[`${e}-align-${s}`]=t.align===s}),a[`${e}-align-stretch`]=!t.align&&!!t.vertical,a)),(l={},c.forEach(s=>{l[`${e}-justify-${s}`]=t.justify===s}),l)))},p=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:s,paddingLG:r}=e,a=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:s,flexGapLG:r});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(a),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(a),(e=>{let{componentCls:t}=e,s={};return o.forEach(e=>{s[`${t}-wrap-${e}`]={flexWrap:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return d.forEach(e=>{s[`${t}-align-${e}`]={alignItems:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return c.forEach(e=>{s[`${t}-justify-${e}`]={justifyContent:e}}),s})(a)]},()=>({}),{resetStyle:!1});var h=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(s[r[a]]=e[r[a]]);return s};let m=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:d,flex:m,gap:x,vertical:g=!1,component:f="div",children:b}=e,v=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:y,direction:j,getPrefixCls:w}=t.default.useContext(l.ConfigContext),N=w("flex",n),[S,C,M]=p(N),_=null!=g?g:null==y?void 0:y.vertical,O=(0,s.default)(c,o,null==y?void 0:y.className,N,C,M,u(N,e),{[`${N}-rtl`]:"rtl"===j,[`${N}-gap-${x}`]:(0,a.isPresetSize)(x),[`${N}-vertical`]:_}),T=Object.assign(Object.assign({},null==y?void 0:y.style),d);return m&&(T.flex=m),x&&!(0,a.isPresetSize)(x)&&(T.gap=x),S(t.default.createElement(f,Object.assign({ref:i,className:O,style:T},(0,r.default)(v,["justify","wrap","align"])),b))});e.s(["Flex",0,m],525720)},891547,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,disabled:o})=>{let[c,d]=(0,s.useState)([]),[u,p]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,a.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{p(!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=>{console.log("Selected guardrails:",t),e(t)},value:l,loading:u,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),s=e.i(271645),r=e.i(199133),a=e.i(764205);function l(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let s=e.version_number??1,r=e.version_status??"draft";return{label:`${e.policy_name} — v${s} (${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:c,onPoliciesLoaded:d})=>{let[u,p]=(0,s.useState)([]),[h,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,a.getPoliciesList)(o);e.policies&&(p(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[o,d]),(0,t.jsx)("div",{children:(0,t.jsx)(r.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:i,loading:h,className:n,allowClear:!0,options:l(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>l])},384767,e=>{"use strict";var t=e.i(843476),s=e.i(599724),r=e.i(271645),a=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(764205);let n=function({vectorStores:e,accessToken:n}){let[o,c]=(0,r.useState)([]);return(0,r.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(n);e.data&&c(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)(s.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,s)=>{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},s)})}):(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)(s.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=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 c=e.i(871943),d=e.i(502547),u=e.i(592968);let p=function({mcpServers:e,mcpAccessGroups:l=[],mcpToolPermissions:n={},mcpToolsets:p=[],accessToken:h}){let[m,x]=(0,r.useState)([]),[g,f]=(0,r.useState)([]),[b,v]=(0,r.useState)(new Set),[y,j]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{(async()=>{if(h&&e.length>0)try{let e=await (0,i.fetchMCPServers)(h);e&&Array.isArray(e)?x(e):e.data&&Array.isArray(e.data)&&x(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[h,e.length]),(0,r.useEffect)(()=>{(async()=>{if(h&&p.length>0)try{let e=await (0,i.fetchMCPToolsets)(h),t=Array.isArray(e)?e.filter(e=>p.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[h,p.length]);let w=[...e.map(e=>({type:"server",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],N=w.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)(o,{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:"blue",size:"xs",children:N})]}),N>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[w.map((e,s)=>{let r="server"===e.type?n[e.value]:void 0,a=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 a&&(t=e.value,void v(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s}))},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)(u.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=m.find(t=>t.server_id===e);if(t){let s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),a&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(d.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&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,s)=>(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},s))})})]},s)}),p.length>0&&p.map((e,s)=>{let r=g.find(t=>t.toolset_id===e),a=y.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 s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),l>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),a?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(d.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l>0&&a&&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,s)=>(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]},s))})})]},`toolset-${s}`)})]}):(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)(o,{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"})]})]})},h=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"}))}),m=function({agents:e,agentAccessGroups:l=[],accessToken:n}){let[o,c]=(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)&&c(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let d=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],p=d.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)(h,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(a.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:d.map((e,s)=>(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)(u.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 flex-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 s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})})})},s))}):(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)(h,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.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:a="",accessToken:l}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],c=e?.mcp_access_groups||[],d=e?.mcp_tool_permissions||{},u=e?.mcp_toolsets||[],h=e?.agents||[],x=e?.agent_access_groups||[],g=(0,t.jsxs)("div",{className:"card"===r?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:i,accessToken:l}),(0,t.jsx)(p,{mcpServers:o,mcpAccessGroups:c,mcpToolPermissions:d,mcpToolsets:u,accessToken:l}),(0,t.jsx)(m,{agents:h,agentAccessGroups:x,accessToken:l})]});return"card"===r?(0,t.jsxs)("div",{className:`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)(s.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),g]}):(0,t.jsxs)("div",{className:`${a}`,children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),g]})}],384767)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/bdaa8fe6e6022114.js b/litellm/proxy/_experimental/out/_next/static/chunks/bdaa8fe6e6022114.js deleted file mode 100644 index 29229e4ec2..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/bdaa8fe6e6022114.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,l],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),l=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 s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ArrowLeftOutlined",0,r],447566)},891547,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,disabled:o})=>{let[c,d]=(0,l.useState)([]),[u,m]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,s.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:r,loading:u,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),l=e.i(271645),a=e.i(199133),s=e.i(764205);function r(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let l=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${l} (${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:i,className:n,accessToken:o,disabled:c,onPoliciesLoaded:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(o){g(!0);try{let e=await (0,s.getPoliciesList)(o);e.policies&&(m(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{g(!1)}}})()},[o,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:i,loading:h,className:n,allowClear:!0,options:r(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>r])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),l=e.i(114272),a=e.i(540143),s=e.i(915823),r=e.i(619273),i=class extends s.Subscribable{#e;#t=void 0;#l;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}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.#l,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#l?.state.status==="pending"&&this.#l.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#l?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#l?.removeObserver(this),this.#l=void 0,this.#s(),this.#r()}mutate(e,t){return this.#a=t,this.#l?.removeObserver(this),this.#l=this.#e.getMutationCache().build(this.#e,this.options),this.#l.addObserver(this),this.#l.execute(e)}#s(){let e=this.#l?.state??(0,l.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,l=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,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,l,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,l,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,l){let s=(0,n.useQueryClient)(l),[o]=t.useState(()=>new i(s,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=t.useCallback((e,t)=>{o.mutate(e,t).catch(r.noop)},[o]);if(c.error&&(0,r.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ClockCircleOutlined",0,r],637235)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let l=e.i(264042).Row;e.s(["Row",0,l],621192)},214541,e=>{"use strict";var t=e.i(271645),l=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,s]=(0,t.useState)([]),{accessToken:r,userId:i,userRole:n}=(0,l.default)();return(0,t.useEffect)(()=>{(async()=>{s(await (0,a.fetchTeams)(r,i,n,null))})()},[r,i,n]),{teams:e,setTeams:s}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function l(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let s=t(e);return isNaN(a)?l(e,NaN):(a&&s.setDate(s.getDate()+a),s)}function s(e,a){let s=t(e);if(isNaN(a))return l(e,NaN);if(!a)return s;let r=s.getDate(),i=l(e,s.getTime());return(i.setMonth(s.getMonth()+a+1,0),r>=i.getDate())?i:(s.setFullYear(i.getFullYear(),i.getMonth(),r),s)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>l],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>s],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(529681),s=e.i(908286),r=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],d=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let a,s,r;return(0,l.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(s={},d.forEach(l=>{s[`${e}-align-${l}`]=t.align===l}),s[`${e}-align-stretch`]=!t.align&&!!t.vertical,s)),(r={},c.forEach(l=>{r[`${e}-justify-${l}`]=t.justify===l}),r)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:l,paddingLG:a}=e,s=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:l,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"}}}})(s),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(s),(e=>{let{componentCls:t}=e,l={};return o.forEach(e=>{l[`${t}-wrap-${e}`]={flexWrap:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return d.forEach(e=>{l[`${t}-align-${e}`]={alignItems:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return c.forEach(e=>{l[`${t}-justify-${e}`]={justifyContent:e}}),l})(s)]},()=>({}),{resetStyle:!1});var h=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let g=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:d,flex:g,gap:f,vertical:p=!1,component:x="div",children:y}=e,w=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:b,getPrefixCls:j}=t.default.useContext(r.ConfigContext),S=j("flex",n),[_,N,C]=m(S),k=null!=p?p:null==v?void 0:v.vertical,z=(0,l.default)(c,o,null==v?void 0:v.className,S,N,C,u(S,e),{[`${S}-rtl`]:"rtl"===b,[`${S}-gap-${f}`]:(0,s.isPresetSize)(f),[`${S}-vertical`]:k}),O=Object.assign(Object.assign({},null==v?void 0:v.style),d);return g&&(O.flex=g),f&&!(0,s.isPresetSize)(f)&&(O.gap=f),_(t.default.createElement(x,Object.assign({ref:i,className:z,style:O},(0,a.default)(w,["justify","wrap","align"])),y))});e.s(["Flex",0,g],525720)},633627,e=>{"use strict";var t=e.i(764205);let l=(e,t,l,a)=>{for(let s of e){let e=s?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let r=s?.organization_id??s?.org_id;r&&"string"==typeof r&&l.add(r.trim());let i=s?.user_id;if(i&&"string"==typeof i){let e=s?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let s=new Set,r=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;l(o,s,r,i);let d=Math.min(c,10)-1;if(d>0){let n=Array.from({length:d},(l,s)=>(0,t.keyListCall)(e,null,a,null,null,null,s+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&l(e.value?.keys||[],s,r,i)}return{keyAliases:Array.from(s).sort(),organizationIds:Array.from(r).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},s=async(e,l)=>{if(!e)return[];try{let a=[],s=1,r=!0;for(;r;){let i=await (0,t.teamListCall)(e,l||null,null);a=[...a,...i],s{if(!e)return[];try{let l=[],a=1,s=!0;for(;s;){let r=await (0,t.organizationListCall)(e);l=[...l,...r],a{"use strict";var t=e.i(843476),l=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var s=e.i(464571),r=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:d={},buttonLabel:u="Filters"})=>{let[m,h]=(0,l.useState)(!1),[g,f]=(0,l.useState)(d),[p,x]=(0,l.useState)({}),[y,w]=(0,l.useState)({}),[v,b]=(0,l.useState)({}),[j,S]=(0,l.useState)({}),_=(0,l.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){w(e=>({...e,[t.name]:!0}));try{let l=await t.searchFn(e);x(e=>({...e,[t.name]:l}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{w(e=>({...e,[t.name]:!1}))}}},300),[]),N=(0,l.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!j[e.name]){w(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(l=>({...l,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{w(t=>({...t,[e.name]:!1}))}}},[j]);(0,l.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!j[e.name]&&N(e)})},[m,e,N,j]);let C=(e,t)=>{let l={...g,[e]:t};f(l),o(l)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(s.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:u}),(0,t.jsx)(s.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),f(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(l=>{let a,s=e.find(e=>e.label===l||e.name===l);return s?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:s.label||s.name}),s.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),onOpenChange:e=>{e&&s.isSearchable&&!j[s.name]&&N(s)},onSearch:e=>{b(t=>({...t,[s.name]:e})),s.searchFn&&_(e,s)},filterOption:!1,loading:y[s.name],options:p[s.name]||[],allowClear:!0,notFoundContent:y[s.name]?"Loading...":"No results found"}):s.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),allowClear:!0,children:s.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):s.customComponent?(a=s.customComponent,(0,t.jsx)(a,{value:g[s.name]||void 0,onChange:e=>C(s.name,e??""),placeholder:`Select ${s.label||s.name}...`,allFilters:g})):(0,t.jsx)(r.Input,{className:"w-full",placeholder:`Enter ${s.label||s.name}...`,value:g[s.name]||"",onChange:e=>C(s.name,e.target.value),allowClear:!0})]},s.name):null})})]})}],969550)},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,s,r)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,s?.organization_id||null,l):await (0,t.teamListCall)(e,s?.organization_id||null),console.log(`givenTeams: ${i}`),r(i)};e.s(["fetchTeams",0,l])},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),s=e.i(947293),r=e.i(764205),i=e.i(954616),n=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function f(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),x=e.i(808613),y=e.i(311451),w=e.i(898586);function v({variant:e,userEmail:a,isPending:s,claimError:r,onSubmit:i}){let[n]=x.Form.useForm();return l.default.useEffect(()=>{a&&n.setFieldValue("user_email",a)},[a,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(x.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>i({password:e.password}),children:[(0,t.jsx)(x.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(x.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),r&&(0,t.jsx)(h.Alert,{type:"error",message:r,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:s,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function b({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:p,isError:x}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,r.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:y,isPending:w}=(0,i.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,r.claimOnboardingToken)(e,t,l,a)}),b=g?.token?(0,s.jwtDecode)(g.token):null,j=b?.user_email??"",S=b?.user_id??null,_=b?.key??null,N=g?.token??null;return p?(0,t.jsx)(m,{}):x?(0,t.jsx)(f,{}):(0,t.jsx)(v,{variant:e,userEmail:j,isPending:w,claimError:u,onSubmit:e=>{_&&N&&S&&d&&(h(null),y({accessToken:_,inviteId:d,userId:S,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,r.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function j(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(b,{variant:"reset_password"===e?"reset_password":"signup"})}function S(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(j,{})})}e.s(["default",()=>S],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),s=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:f=!1,allFilters:p})=>{let[x,y]=(0,d.useState)(""),[w,v]=(0,o.useDebouncedState)("",{wait:300}),{data:b,fetchNextPage:j,hasNextPage:S,isFetchingNextPage:_,isLoading:N}=((e=50,t,a)=>{let{accessToken:n}=(0,r.default)();return(0,l.useInfiniteQuery)({queryKey:i.list({filters:{size:e,...t&&{search:t},...a&&{team_id:a}}}),queryFn:async({pageParam:l})=>await (0,s.keyAliasesCall)(n,l,e,t,a),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!b?.pages)return[];let e=new Set,t=[];for(let l of b.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[b]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:f,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),v(e)},searchValue:x,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&S&&!_&&j()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:C,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),s=e.i(350967),r=e.i(898586),i=e.i(947293),n=e.i(618566),o=e.i(271645),c=e.i(566606),d=e.i(584578),u=e.i(764205),m=e.i(702597),h=e.i(207082),g=e.i(109799),f=e.i(500330),p=e.i(871943),x=e.i(502547),y=e.i(360820),w=e.i(94629),v=e.i(152990),b=e.i(682830),j=e.i(389083),S=e.i(994388),_=e.i(752978),N=e.i(269200),C=e.i(942232),k=e.i(977572),z=e.i(427612),O=e.i(64848),I=e.i(496020),D=e.i(599724),T=e.i(827252),E=e.i(772345),M=e.i(464571),P=e.i(282786),A=e.i(981339),R=e.i(262218),L=e.i(592968),$=e.i(355619),U=e.i(633627),K=e.i(374009),F=e.i(700514),B=e.i(135214),V=e.i(50882),H=e.i(969550),G=e.i(304911),W=e.i(20147);function q({teams:e,organizations:l,onSortChange:a,currentSort:s}){let{data:i}=(0,g.useOrganizations)(),n=i??l??[],[c,d]=(0,o.useState)(null),[m,q]=o.default.useState(()=>s?[{id:s.sortBy,desc:"desc"===s.sortOrder}]:[{id:"created_at",desc:!0}]),[J,Q]=o.default.useState({pageIndex:0,pageSize:50}),Y=m.length>0?m[0].id:null,Z=m.length>0?m[0].desc?"desc":"asc":null,{data:X,isPending:ee,isFetching:et,isError:el,refetch:ea}=(0,h.useKeys)(J.pageIndex+1,J.pageSize,{sortBy:Y||void 0,sortOrder:Z||void 0,expand:"user"}),[es,er]=(0,o.useState)({}),{filters:ei,filteredKeys:en,filteredTotalCount:eo,allTeams:ec,allOrganizations:ed,handleFilterChange:eu,handleFilterReset:em}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:s}=(0,B.default)(),[r,i]=(0,o.useState)(a),[n,c]=(0,o.useState)(t||[]),[d,m]=(0,o.useState)(l||[]),[h,g]=(0,o.useState)(e),[f,p]=(0,o.useState)(null),x=(0,o.useRef)(0),y=(0,o.useCallback)((0,K.default)(async e=>{if(!s)return;let t=Date.now();x.current=t;try{let l=await (0,u.keyListCall)(s,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,F.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===x.current&&l&&(g(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[s]);return(0,o.useEffect)(()=>{if(!e)return void g([]);let t=[...e];r["Team ID"]&&(t=t.filter(e=>e.team_id===r["Team ID"])),r["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===r["Organization ID"])),g(t)},[e,r]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,U.fetchAllTeams)(s);e.length>0&&c(e);let t=await (0,U.fetchAllOrganizations)(s);t.length>0&&m(t)};s&&e()},[s]),(0,o.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{i({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...r,...e})},handleFilterReset:()=>{i(a),p(null),y(a)}}}({keys:X?.keys||[],teams:e,organizations:l}),eh=(0,o.useDeferredValue)(et),eg=(et||eh)&&!el,ef=eo??X?.total_count??0;(0,o.useEffect)(()=>{if(ea){let e=()=>{ea()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[ea]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(L.Tooltip,{title:l,children:(0,t.jsx)(S.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})}},{id:"status",header:"Status",size:100,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=!0===l.blocked,s=!0===(l.metadata??{}).scim_blocked;return a?(0,t.jsx)(L.Tooltip,{title:s?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401.",children:(0,t.jsx)(R.Tag,{color:"red","data-testid":`key-status-${l.token_id}`,children:"Blocked"})}):(0,t.jsx)(R.Tag,{color:"green","data-testid":`key-status-${l.token_id}`,children:"Active"})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let s=e?.find(e=>e.team_id===a),r=s?.team_alias||a,i=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=n.find(e=>e.organization_id===l),s=a?.organization_alias||l,r=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(P.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,s=l.user?.user_email??l.user_email??null,i=l.user_id??null,n="default_user_id"===i,o=a||s||i,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:s},{label:"User ID",value:i}].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)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||s?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(G.default,{userId:i})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,s=a?.user_alias??null,i=a?.user_email??null,n="default_user_id"===l,o=s||i||l,c=(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)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||i?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(G.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(P.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(L.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,f.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,f.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(j.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})}):(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)(_.Icon,{icon:es[e.row.id]?p.ChevronDownIcon:x.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{er(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)(j.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(j.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,$.getModelDisplayName)(e).slice(0,30)}...`:(0,$.getModelDisplayName)(e)})},l)),l.length>3&&!es[e.row.id]&&(0,t.jsx)(j.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(D.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),es[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)(j.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(j.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,$.getModelDisplayName)(e).slice(0,30)}...`:(0,$.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"]})]})}}],[e,n]),ex=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ey=(0,v.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:J},onSortingChange:e=>{let t="function"==typeof e?e(m):e;if(q(t),t&&t.length>0){let e=t[0],l=e.id,s=e.desc?"desc":"asc";eu({...ei,"Sort By":l,"Sort Order":s},!0),a?.(l,s)}},onPaginationChange:Q,getCoreRowModel:(0,b.getCoreRowModel)(),getSortedRowModel:(0,b.getSortedRowModel)(),getPaginationRowModel:(0,b.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(ef/J.pageSize)});o.default.useEffect(()=>{s&&q([{id:s.sortBy,desc:"desc"===s.sortOrder}])},[s]);let{pageIndex:ew,pageSize:ev}=ey.getState().pagination,eb=Math.min((ew+1)*ev,ef),ej=`${ew*ev+1} - ${eb}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:c?(0,t.jsx)(W.default,{keyId:c.token,onClose:()=>d(null),keyData:c,teams:ec,onDelete:ea}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(H.default,{options:ex,onApplyFilters:eu,initialValues:ei,onResetFilters:em})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",ej," of ",ef," results"]}),(0,t.jsx)(M.Button,{type:"default",icon:(0,t.jsx)(E.SyncOutlined,{spin:eg}),onClick:()=>{ea()},disabled:eg,title:"Fetch data",children:eg?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ew+1," of ",ey.getPageCount()]}),ee?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.previousPage(),disabled:ee||!ey.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),ee?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.nextPage(),disabled:ee||!ey.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ey.getCenterTotalSize()},children:[(0,t.jsx)(z.TableHead,{children:ey.getHeaderGroups().map(e=>(0,t.jsx)(I.TableRow,{children:e.headers.map(e=>(0,t.jsx)(O.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,v.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(y.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(w.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ey.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(C.TableBody,{children:ee?(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ey.getRowModel().rows.map(e=>(0,t.jsx)(I.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(k.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:h,teams:g,keys:f,setUserRole:p,userEmail:x,setUserEmail:y,setTeams:w,setKeys:v,premiumUser:b,organizations:j,addKey:S,createClicked:_,autoOpenCreate:N,prefillData:C})=>{let[k,z]=(0,o.useState)(null),[O,I]=(0,o.useState)(null),D=(0,n.useSearchParams)(),T=(0,l.getCookie)("token"),E=D.get("invitation_id"),[M,P]=(0,o.useState)(null),[A,R]=(0,o.useState)(null),[L,$]=(0,o.useState)([]),[U,K]=(0,o.useState)(null),[F,B]=(0,o.useState)(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(T){let e=(0,i.jwtDecode)(T);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),P(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),p(t)}else console.log("User role not defined");e.user_email?y(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&M&&h&&!k){let t=sessionStorage.getItem("userModels"+e);t?$(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(O)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(M);K(t);let l=await (0,u.userGetInfoV2)(M,e);z(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,u.modelAvailableCall)(M,e,h)).data.map(e=>e.id);console.log("available_model_names:",a),$(a),console.log("userModels:",L),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&V()}})(),(0,d.fetchTeams)(M,e,h,O,w))}},[e,T,M,h]),(0,o.useEffect)(()=>{M&&(async()=>{try{let e=await (0,u.keyInfoCall)(M,[M]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&V()}})()},[M]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(O)}, accessToken: ${M}, userID: ${e}, userRole: ${h}`),M&&(console.log("fetching teams"),(0,d.fetchTeams)(M,e,h,O,w))},[O]),(0,o.useEffect)(()=>{if(null!==f&&null!=F&&null!==F.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(f)}`),f))F.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===F.team_id&&(e+=t.spend);console.log(`sum: ${e}`),R(e)}else if(null!==f){let e=0;for(let t of f)e+=t.spend;R(e)}},[F]),null!=E)return(0,t.jsx)(c.default,{});function V(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==T)return console.log("All cookies before redirect:",document.cookie),V(),null;try{let e=(0,i.jwtDecode)(T);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),V(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),V(),null}if(null==M)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==h&&p("App Owner"),h&&"Admin Viewer"==h){let{Title:e,Paragraph:l}=r.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",F),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(m.default,{team:F,teams:g,data:f,addKey:S,autoOpenCreate:N,prefillData:C},F?F.team_id:null),(0,t.jsx)(q,{teams:g,organizations:j})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/c1def3f9c2ccf0b5.js b/litellm/proxy/_experimental/out/_next/static/chunks/c1def3f9c2ccf0b5.js deleted file mode 100644 index 7fde3d7d76..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/c1def3f9c2ccf0b5.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,l)=>(e[l.team_id]=l.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,l)=>{let a=l.find(l=>l.team_id===e);return a?a.team_alias:null}])},367240,555436,e=>{"use strict";let l=(0,e.i(475254).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>l],367240);var a=e.i(54943);e.s(["Search",()=>a.default],555436)},846753,e=>{"use strict";let l=(0,e.i(475254).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["default",()=>l])},655913,38419,78334,e=>{"use strict";var l=e.i(843476),a=e.i(115504),s=e.i(311451),i=e.i(374009),t=e.i(271645);e.s(["FilterInput",0,({placeholder:e,value:r,onChange:n,icon:o,className:d})=>{let[c,m]=(0,t.useState)(r);(0,t.useEffect)(()=>{m(r)},[r]);let u=(0,t.useMemo)(()=>(0,i.default)(e=>n(e),300),[n]);(0,t.useEffect)(()=>()=>{u.cancel()},[u]);let x=(0,t.useCallback)(e=>{let l=e.target.value;m(l),u(l)},[u]);return(0,l.jsx)(s.Input,{placeholder:e,value:c,onChange:x,prefix:o?(0,l.jsx)(o,{size:16,className:"text-gray-500"}):void 0,className:(0,a.cx)("w-64",d)})}],655913);var r=e.i(906579),n=e.i(464571);let o=(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"}]]);e.s(["FiltersButton",0,({onClick:e,active:a,hasActiveFilters:s,label:i="Filters"})=>(0,l.jsx)(r.Badge,{color:"blue",dot:s,children:(0,l.jsx)(n.Button,{type:"default",onClick:e,icon:(0,l.jsx)(o,{size:16}),className:a?"bg-gray-100":"",children:i})})],38419);var d=e.i(367240);e.s(["ResetFiltersButton",0,({onClick:e,label:a="Reset Filters"})=>(0,l.jsx)(n.Button,{type:"default",onClick:e,icon:(0,l.jsx)(d.RotateCcw,{size:16}),children:a})],78334)},284614,e=>{"use strict";var l=e.i(846753);e.s(["User",()=>l.default])},846835,e=>{"use strict";var l=e.i(843476),a=e.i(655913),s=e.i(38419),i=e.i(78334),t=e.i(555436),r=e.i(284614);let n=({filters:e,showFilters:n,onToggleFilters:o,onChange:d,onReset:c})=>{let m=!!(e.org_id||e.org_alias);return(0,l.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,l.jsx)(a.FilterInput,{placeholder:"Search by Organization Name",value:e.org_alias,onChange:e=>d("org_alias",e),icon:t.Search,className:"w-64"}),(0,l.jsx)(s.FiltersButton,{onClick:()=>o(!n),active:n,hasActiveFilters:m}),(0,l.jsx)(i.ResetFiltersButton,{onClick:c})]}),n&&(0,l.jsx)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:(0,l.jsx)(a.FilterInput,{placeholder:"Search by Organization ID",value:e.org_id,onChange:e=>d("org_id",e),icon:r.User,className:"w-64"})})]})};var o=e.i(827252),d=e.i(871943),c=e.i(502547),m=e.i(278587),u=e.i(389083),x=e.i(994388),g=e.i(304967),h=e.i(309426),_=e.i(350967),p=e.i(752978),j=e.i(197647),b=e.i(653824),v=e.i(269200),f=e.i(942232),y=e.i(977572),w=e.i(427612),z=e.i(64848),T=e.i(496020),C=e.i(881073),N=e.i(404206),S=e.i(723731),F=e.i(599724),M=e.i(779241),I=e.i(808613),O=e.i(311451),k=e.i(212931),B=e.i(199133),A=e.i(592968),D=e.i(271645),L=e.i(500330),P=e.i(127952),R=e.i(902555),U=e.i(355619),E=e.i(75921),V=e.i(162386),q=e.i(727749),H=e.i(764205),G=e.i(785242),K=e.i(109799),$=e.i(912598),W=e.i(980187),Q=e.i(530212),J=e.i(629569),Y=e.i(464571),X=e.i(653496),Z=e.i(898586),ee=e.i(678784),el=e.i(118366),ea=e.i(294612),es=e.i(907308),ei=e.i(384767),et=e.i(435451),er=e.i(276173),en=e.i(916940);let eo=({organizationId:e,onClose:a,accessToken:s,is_org_admin:i,is_proxy_admin:t,userModels:r,editOrg:n})=>{let o=(0,$.useQueryClient)(),{data:d,isLoading:c}=(0,K.useOrganization)(e),[m]=I.Form.useForm(),[h,p]=(0,D.useState)(!1),[j,b]=(0,D.useState)(!1),[v,f]=(0,D.useState)(!1),[y,w]=(0,D.useState)(null),[z,T]=(0,D.useState)({}),[C,N]=(0,D.useState)(!1),S=i||t,{data:k}=(0,G.useTeams)(),A=(0,D.useMemo)(()=>(0,W.createTeamAliasMap)(k),[k]),P=async l=>{try{if(null==s)return;let a={user_email:l.user_email,user_id:l.user_id,role:l.role};await (0,H.organizationMemberAddCall)(s,e,a),q.default.success("Organization member added successfully"),b(!1),m.resetFields(),o.invalidateQueries({queryKey:K.organizationKeys.all})}catch(e){q.default.fromBackend("Failed to add organization member"),console.error("Error adding organization member:",e)}},R=async l=>{try{if(!s)return;let a={user_email:l.user_email,user_id:l.user_id,role:l.role};await (0,H.organizationMemberUpdateCall)(s,e,a),q.default.success("Organization member updated successfully"),f(!1),m.resetFields(),o.invalidateQueries({queryKey:K.organizationKeys.all})}catch(e){q.default.fromBackend("Failed to update organization member"),console.error("Error updating organization member:",e)}},U=async l=>{try{if(!s)return;await (0,H.organizationMemberDeleteCall)(s,e,l.user_id),q.default.success("Organization member deleted successfully"),f(!1),m.resetFields(),o.invalidateQueries({queryKey:K.organizationKeys.all})}catch(e){q.default.fromBackend("Failed to delete organization member"),console.error("Error deleting organization member:",e)}},eo=async l=>{try{if(!s)return;N(!0);let a={organization_id:e,organization_alias:l.organization_alias,models:l.models,litellm_budget_table:{tpm_limit:l.tpm_limit,rpm_limit:l.rpm_limit,max_budget:l.max_budget,budget_duration:l.budget_duration},metadata:l.metadata?JSON.parse(l.metadata):null};if((void 0!==l.vector_stores||void 0!==l.mcp_servers_and_groups)&&(a.object_permission={...d?.object_permission,vector_stores:l.vector_stores||[]},void 0!==l.mcp_servers_and_groups)){let{servers:e,accessGroups:s}=l.mcp_servers_and_groups||{servers:[],accessGroups:[]};e&&e.length>0&&(a.object_permission.mcp_servers=e),s&&s.length>0&&(a.object_permission.mcp_access_groups=s)}await (0,H.organizationUpdateCall)(s,a),q.default.success("Organization settings updated successfully"),p(!1),o.invalidateQueries({queryKey:K.organizationKeys.all})}catch(e){q.default.fromBackend("Failed to update organization settings"),console.error("Error updating organization:",e)}finally{N(!1)}};if(c)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!d)return(0,l.jsx)("div",{className:"p-4",children:"Organization not found"});let ed=async(e,l)=>{await (0,L.copyToClipboard)(e)&&(T(e=>({...e,[l]:!0})),setTimeout(()=>{T(e=>({...e,[l]:!1}))},2e3))},ec=[{title:"Spend (USD)",key:"spend",render:(e,a)=>{let s=null!=a.user_id?(d.members||[]).find(e=>e.user_id===a.user_id):void 0;return(0,l.jsxs)(Z.Typography.Text,{children:["$",(0,L.formatNumberWithCommas)(s?.spend??0,4)]})}},{title:"Created At",key:"created_at",render:(e,a)=>{let s=null!=a.user_id?(d.members||[]).find(e=>e.user_id===a.user_id):void 0;return(0,l.jsx)(Z.Typography.Text,{children:s?.created_at?new Date(s.created_at).toLocaleString():"-"})}}];return(0,l.jsxs)("div",{className:"w-full h-screen p-4 bg-white",children:[(0,l.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Button,{icon:Q.ArrowLeftIcon,onClick:a,variant:"light",className:"mb-4",children:"Back to Organizations"}),(0,l.jsx)(J.Title,{children:d.organization_alias}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(F.Text,{className:"text-gray-500 font-mono",children:d.organization_id}),(0,l.jsx)(Y.Button,{type:"text",size:"small",icon:z["org-id"]?(0,l.jsx)(ee.CheckIcon,{size:12}):(0,l.jsx)(el.CopyIcon,{size:12}),onClick:()=>ed(d.organization_id,"org-id"),className:`left-2 z-10 transition-all duration-200 ${z["org-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,l.jsx)(X.Tabs,{defaultActiveKey:n?"settings":"overview",className:"mb-4",items:[{key:"overview",label:"Overview",children:(0,l.jsxs)(_.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(g.Card,{children:[(0,l.jsx)(F.Text,{children:"Organization Details"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(F.Text,{children:["Created: ",new Date(d.created_at).toLocaleDateString()]}),(0,l.jsxs)(F.Text,{children:["Updated: ",new Date(d.updated_at).toLocaleDateString()]}),(0,l.jsxs)(F.Text,{children:["Created By: ",d.created_by]})]})]}),(0,l.jsxs)(g.Card,{children:[(0,l.jsx)(F.Text,{children:"Budget Status"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(J.Title,{children:["$",(0,L.formatNumberWithCommas)(d.spend,4)]}),(0,l.jsxs)(F.Text,{children:["of"," ",null===d.litellm_budget_table.max_budget?"Unlimited":`$${(0,L.formatNumberWithCommas)(d.litellm_budget_table.max_budget,4)}`]}),d.litellm_budget_table.budget_duration&&(0,l.jsxs)(F.Text,{className:"text-gray-500",children:["Reset: ",d.litellm_budget_table.budget_duration]})]})]}),(0,l.jsxs)(g.Card,{children:[(0,l.jsx)(F.Text,{children:"Rate Limits"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(F.Text,{children:["TPM: ",d.litellm_budget_table.tpm_limit||"Unlimited"]}),(0,l.jsxs)(F.Text,{children:["RPM: ",d.litellm_budget_table.rpm_limit||"Unlimited"]}),d.litellm_budget_table.max_parallel_requests&&(0,l.jsxs)(F.Text,{children:["Max Parallel Requests: ",d.litellm_budget_table.max_parallel_requests]})]})]}),(0,l.jsxs)(g.Card,{children:[(0,l.jsx)(F.Text,{children:"Models"}),(0,l.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===d.models.length?(0,l.jsx)(u.Badge,{color:"red",children:"All proxy models"}):d.models.map((e,a)=>(0,l.jsx)(u.Badge,{color:"red",children:e},a))})]}),(0,l.jsxs)(g.Card,{children:[(0,l.jsx)(F.Text,{children:"Teams"}),(0,l.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:d.teams?.map((e,a)=>(0,l.jsx)(u.Badge,{color:"red",children:A[e.team_id]||e.team_id},a))})]}),(0,l.jsx)(ei.default,{objectPermission:d.object_permission,variant:"card",accessToken:s})]})},{key:"members",label:"Members",children:(0,l.jsx)("div",{className:"space-y-4",children:(0,l.jsx)(ea.default,{members:(d.members||[]).map(e=>({role:e.user_role||"",user_id:e.user_id,user_email:e.user_email})),canEdit:S,onEdit:e=>{w(e),f(!0)},onDelete:e=>U(e),onAddMember:()=>b(!0),roleColumnTitle:"Organization Role",extraColumns:ec,emptyText:"No members found"})})},{key:"settings",label:"Settings",children:(0,l.jsxs)(g.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(J.Title,{children:"Organization Settings"}),S&&!h&&(0,l.jsx)(x.Button,{onClick:()=>p(!0),children:"Edit Settings"})]}),h?(0,l.jsxs)(I.Form,{form:m,onFinish:eo,initialValues:{organization_alias:d.organization_alias,models:d.models,tpm_limit:d.litellm_budget_table.tpm_limit,rpm_limit:d.litellm_budget_table.rpm_limit,max_budget:d.litellm_budget_table.max_budget,budget_duration:d.litellm_budget_table.budget_duration,metadata:d.metadata?JSON.stringify(d.metadata,null,2):"",vector_stores:d.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:d.object_permission?.mcp_servers||[],accessGroups:d.object_permission?.mcp_access_groups||[]}},layout:"vertical",children:[(0,l.jsx)(I.Form.Item,{label:"Organization Name",name:"organization_alias",rules:[{required:!0,message:"Please input an organization name"}],children:(0,l.jsx)(M.TextInput,{})}),(0,l.jsx)(I.Form.Item,{label:"Models",name:"models",children:(0,l.jsx)(V.ModelSelect,{value:m.getFieldValue("models"),onChange:e=>m.setFieldValue("models",e),context:"organization",options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!0}})}),(0,l.jsx)(I.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,l.jsx)(et.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,l.jsx)(I.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,l.jsxs)(B.Select,{placeholder:"n/a",children:[(0,l.jsx)(B.Select.Option,{value:"24h",children:"daily"}),(0,l.jsx)(B.Select.Option,{value:"7d",children:"weekly"}),(0,l.jsx)(B.Select.Option,{value:"30d",children:"monthly"})]})}),(0,l.jsx)(I.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,l.jsx)(et.default,{step:1,style:{width:"100%"}})}),(0,l.jsx)(I.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,l.jsx)(et.default,{step:1,style:{width:"100%"}})}),(0,l.jsx)(I.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,l.jsx)(en.default,{onChange:e=>m.setFieldValue("vector_stores",e),value:m.getFieldValue("vector_stores"),accessToken:s||"",placeholder:"Select vector stores"})}),(0,l.jsx)(I.Form.Item,{label:"MCP Servers & Access Groups",name:"mcp_servers_and_groups",children:(0,l.jsx)(E.default,{onChange:e=>m.setFieldValue("mcp_servers_and_groups",e),value:m.getFieldValue("mcp_servers_and_groups"),accessToken:s||"",placeholder:"Select MCP servers and access groups"})}),(0,l.jsx)(I.Form.Item,{label:"Metadata",name:"metadata",children:(0,l.jsx)(O.Input.TextArea,{rows:4})}),(0,l.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,l.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,l.jsx)(x.Button,{variant:"secondary",onClick:()=>p(!1),disabled:C,children:"Cancel"}),(0,l.jsx)(x.Button,{type:"submit",loading:C,children:"Save Changes"})]})})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Organization Name"}),(0,l.jsx)("div",{children:d.organization_alias})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Organization ID"}),(0,l.jsx)("div",{className:"font-mono",children:d.organization_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:new Date(d.created_at).toLocaleString()})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Models"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:d.models.map((e,a)=>(0,l.jsx)(u.Badge,{color:"red",children:e},a))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Rate Limits"}),(0,l.jsxs)("div",{children:["TPM: ",d.litellm_budget_table.tpm_limit||"Unlimited"]}),(0,l.jsxs)("div",{children:["RPM: ",d.litellm_budget_table.rpm_limit||"Unlimited"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(F.Text,{className:"font-medium",children:"Budget"}),(0,l.jsxs)("div",{children:["Max:"," ",null!==d.litellm_budget_table.max_budget?`$${(0,L.formatNumberWithCommas)(d.litellm_budget_table.max_budget,4)}`:"No Limit"]}),(0,l.jsxs)("div",{children:["Reset: ",d.litellm_budget_table.budget_duration||"Never"]})]}),(0,l.jsx)(ei.default,{objectPermission:d.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:s})]})]})}]}),(0,l.jsx)(es.default,{isVisible:j,onCancel:()=>b(!1),onSubmit:P,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,l.jsx)(er.default,{visible:v,onCancel:()=>f(!1),onSubmit:R,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"}]}})]})},ed=async(e,l,a=null,s=null)=>{l(await (0,H.organizationListCall)(e,a,s))};e.s(["default",0,({organizations:e,userRole:a,userModels:s,accessToken:i,lastRefreshed:t,handleRefreshClick:r,currentOrg:G,guardrailsList:K=[],setOrganizations:$,premiumUser:W})=>{let[Q,J]=(0,D.useState)(null),[Y,X]=(0,D.useState)(!1),[Z,ee]=(0,D.useState)(!1),[el,ea]=(0,D.useState)(null),[es,ei]=(0,D.useState)(!1),[er,ec]=(0,D.useState)(!1),[em]=I.Form.useForm(),[eu,ex]=(0,D.useState)({}),[eg,eh]=(0,D.useState)(!1),[e_,ep]=(0,D.useState)({org_id:"",org_alias:"",sort_by:"created_at",sort_order:"desc"}),ej=async()=>{if(el&&i)try{ei(!0),await (0,H.organizationDeleteCall)(i,el),q.default.success("Organization deleted successfully"),ee(!1),ea(null),await ed(i,$,e_.org_id||null,e_.org_alias||null)}catch(e){console.error("Error deleting organization:",e)}finally{ei(!1)}},eb=async e=>{try{if(!i)return;console.log(`values in organizations new create call: ${JSON.stringify(e)}`),(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||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.object_permission={},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.object_permission.mcp_servers=e.allowed_mcp_servers_and_groups.servers),e.allowed_mcp_servers_and_groups.accessGroups?.length>0&&(e.object_permission.mcp_access_groups=e.allowed_mcp_servers_and_groups.accessGroups),delete e.allowed_mcp_servers_and_groups)),await (0,H.organizationCreateCall)(i,e),q.default.success("Organization created successfully"),ec(!1),em.resetFields(),ed(i,$,e_.org_id||null,e_.org_alias||null)}catch(e){console.error("Error creating organization:",e)}};return W?(0,l.jsxs)("div",{className:"w-full mx-4 h-[75vh]",children:[(0,l.jsx)(_.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,l.jsxs)(h.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[("Admin"===a||"Org Admin"===a)&&(0,l.jsx)(x.Button,{className:"w-fit",onClick:()=>ec(!0),children:"+ Create New Organization"}),Q?(0,l.jsx)(eo,{organizationId:Q,onClose:()=>{J(null),X(!1)},accessToken:i,is_org_admin:!0,is_proxy_admin:"Admin"===a,userModels:s,editOrg:Y}):(0,l.jsxs)(b.TabGroup,{className:"gap-2 h-[75vh] w-full",children:[(0,l.jsxs)(C.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,l.jsx)("div",{className:"flex",children:(0,l.jsx)(j.Tab,{children:"Your Organizations"})}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,l.jsxs)(F.Text,{children:["Last Refreshed: ",t]}),(0,l.jsx)(p.Icon,{icon:m.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:r})]})]}),(0,l.jsx)(S.TabPanels,{children:(0,l.jsxs)(N.TabPanel,{children:[(0,l.jsx)(F.Text,{children:"Click on “Organization ID” to view organization details."}),(0,l.jsx)(_.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,l.jsx)(h.Col,{numColSpan:1,children:(0,l.jsxs)(g.Card,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,l.jsx)("div",{className:"border-b px-6 py-4",children:(0,l.jsx)("div",{className:"flex flex-col space-y-4",children:(0,l.jsx)(n,{filters:e_,showFilters:eg,onToggleFilters:eh,onChange:(e,l)=>{let a={...e_,[e]:l};ep(a),i&&(0,H.organizationListCall)(i,a.org_id||null,a.org_alias||null).then(e=>{e&&$(e)}).catch(e=>{console.error("Error fetching organizations:",e)})},onReset:()=>{ep({org_id:"",org_alias:"",sort_by:"created_at",sort_order:"desc"}),i&&(0,H.organizationListCall)(i,null,null).then(e=>{e&&$(e)}).catch(e=>{console.error("Error fetching organizations:",e)})}})})}),(0,l.jsxs)(v.Table,{children:[(0,l.jsx)(w.TableHead,{children:(0,l.jsxs)(T.TableRow,{children:[(0,l.jsx)(z.TableHeaderCell,{children:"Organization ID"}),(0,l.jsx)(z.TableHeaderCell,{children:"Organization Name"}),(0,l.jsx)(z.TableHeaderCell,{children:"Created"}),(0,l.jsx)(z.TableHeaderCell,{children:"Spend (USD)"}),(0,l.jsx)(z.TableHeaderCell,{children:"Budget (USD)"}),(0,l.jsx)(z.TableHeaderCell,{children:"Models"}),(0,l.jsx)(z.TableHeaderCell,{children:"TPM / RPM Limits"}),(0,l.jsx)(z.TableHeaderCell,{children:"Info"}),(0,l.jsx)(z.TableHeaderCell,{children:"Actions"})]})}),(0,l.jsx)(f.TableBody,{children:e&&e.length>0?e.sort((e,l)=>new Date(l.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,l.jsxs)(T.TableRow,{children:[(0,l.jsx)(y.TableCell,{children:(0,l.jsx)("div",{className:"overflow-hidden",children:(0,l.jsx)(A.Tooltip,{title:e.organization_id,children:(0,l.jsxs)(x.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>J(e.organization_id),children:[e.organization_id?.slice(0,7),"..."]})})})}),(0,l.jsx)(y.TableCell,{children:e.organization_alias}),(0,l.jsx)(y.TableCell,{children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,l.jsx)(y.TableCell,{children:(0,L.formatNumberWithCommas)(e.spend,4)}),(0,l.jsx)(y.TableCell,{children:e.litellm_budget_table?.max_budget!==null&&e.litellm_budget_table?.max_budget!==void 0?e.litellm_budget_table?.max_budget:"No limit"}),(0,l.jsx)(y.TableCell,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:e.models.length>3?"px-0":"",children:(0,l.jsx)("div",{className:"flex flex-col",children:Array.isArray(e.models)?(0,l.jsx)("div",{className:"flex flex-col",children:0===e.models.length?(0,l.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,l.jsx)(F.Text,{children:"All Proxy Models"})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"flex items-start",children:[e.models.length>3&&(0,l.jsx)("div",{children:(0,l.jsx)(p.Icon,{icon:eu[e.organization_id||""]?d.ChevronDownIcon:c.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{ex(l=>({...l,[e.organization_id||""]:!l[e.organization_id||""]}))}})}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.models.slice(0,3).map((e,a)=>"all-proxy-models"===e?(0,l.jsx)(u.Badge,{size:"xs",color:"red",children:(0,l.jsx)(F.Text,{children:"All Proxy Models"})},a):(0,l.jsx)(u.Badge,{size:"xs",color:"blue",children:(0,l.jsx)(F.Text,{children:e.length>30?`${(0,U.getModelDisplayName)(e).slice(0,30)}...`:(0,U.getModelDisplayName)(e)})},a)),e.models.length>3&&!eu[e.organization_id||""]&&(0,l.jsx)(u.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,l.jsxs)(F.Text,{children:["+",e.models.length-3," ",e.models.length-3==1?"more model":"more models"]})}),eu[e.organization_id||""]&&(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:e.models.slice(3).map((e,a)=>"all-proxy-models"===e?(0,l.jsx)(u.Badge,{size:"xs",color:"red",children:(0,l.jsx)(F.Text,{children:"All Proxy Models"})},a+3):(0,l.jsx)(u.Badge,{size:"xs",color:"blue",children:(0,l.jsx)(F.Text,{children:e.length>30?`${(0,U.getModelDisplayName)(e).slice(0,30)}...`:(0,U.getModelDisplayName)(e)})},a+3))})]})]})})}):null})}),(0,l.jsx)(y.TableCell,{children:(0,l.jsxs)(F.Text,{children:["TPM:"," ",e.litellm_budget_table?.tpm_limit?e.litellm_budget_table?.tpm_limit:"Unlimited",(0,l.jsx)("br",{}),"RPM:"," ",e.litellm_budget_table?.rpm_limit?e.litellm_budget_table?.rpm_limit:"Unlimited"]})}),(0,l.jsx)(y.TableCell,{children:(0,l.jsxs)(F.Text,{children:[e.members?.length||0," Members"]})}),(0,l.jsx)(y.TableCell,{children:"Admin"===a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(R.default,{variant:"Edit",tooltipText:"Edit organization",onClick:()=>{J(e.organization_id),X(!0)}}),(0,l.jsx)(R.default,{variant:"Delete",tooltipText:"Delete organization",onClick:()=>{var l;(l=e.organization_id)&&(ea(l),ee(!0))}})]})})]},e.organization_id)):null})]})]})})})]})})]})]})}),(0,l.jsx)(k.Modal,{title:"Create Organization",visible:er,width:800,footer:null,onCancel:()=>{ec(!1),em.resetFields()},children:(0,l.jsxs)(I.Form,{form:em,onFinish:eb,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,l.jsx)(I.Form.Item,{label:"Organization Name",name:"organization_alias",rules:[{required:!0,message:"Please input an organization name"}],children:(0,l.jsx)(M.TextInput,{placeholder:""})}),(0,l.jsx)(I.Form.Item,{label:"Models",name:"models",children:(0,l.jsx)(V.ModelSelect,{options:{showAllProxyModelsOverride:!0,includeSpecialOptions:!0},value:em.getFieldValue("models"),onChange:e=>em.setFieldValue("models",e),context:"organization"})}),(0,l.jsx)(I.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,l.jsx)(et.default,{step:.01,precision:2,width:200})}),(0,l.jsx)(I.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,l.jsxs)(B.Select,{defaultValue:null,placeholder:"n/a",children:[(0,l.jsx)(B.Select.Option,{value:"24h",children:"daily"}),(0,l.jsx)(B.Select.Option,{value:"7d",children:"weekly"}),(0,l.jsx)(B.Select.Option,{value:"30d",children:"monthly"})]})}),(0,l.jsx)(I.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,l.jsx)(et.default,{step:1,width:400})}),(0,l.jsx)(I.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,l.jsx)(et.default,{step:1,width:400})}),(0,l.jsx)(I.Form.Item,{label:(0,l.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,l.jsx)(A.Tooltip,{title:"Select which vector stores this organization can access by default. Leave empty for access to all vector stores",children:(0,l.jsx)(o.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this organization can access. Leave empty for access to all vector stores",children:(0,l.jsx)(en.default,{onChange:e=>em.setFieldValue("allowed_vector_store_ids",e),value:em.getFieldValue("allowed_vector_store_ids"),accessToken:i||"",placeholder:"Select vector stores (optional)"})}),(0,l.jsx)(I.Form.Item,{label:(0,l.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,l.jsx)(A.Tooltip,{title:"Select which MCP servers and access groups this organization can access by default.",children:(0,l.jsx)(o.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers and access groups this organization can access.",children:(0,l.jsx)(E.default,{onChange:e=>em.setFieldValue("allowed_mcp_servers_and_groups",e),value:em.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:i||"",placeholder:"Select MCP servers and access groups (optional)"})}),(0,l.jsx)(I.Form.Item,{label:"Metadata",name:"metadata",children:(0,l.jsx)(O.Input.TextArea,{rows:4})}),(0,l.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,l.jsx)(x.Button,{type:"submit",children:"Create Organization"})})]})}),(0,l.jsx)(P.default,{isOpen:Z,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:el,code:!0}],onCancel:()=>{ee(!1),ea(null)},onOk:ej,confirmLoading:es})]}):(0,l.jsx)("div",{children:(0,l.jsxs)(F.Text,{children:["This is a LiteLLM Enterprise feature, and requires a valid key to use. Get a trial key"," ",(0,l.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})},"fetchOrganizations",0,ed],846835)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/c2f31fa6e9a867a9.js b/litellm/proxy/_experimental/out/_next/static/chunks/c2f31fa6e9a867a9.js deleted file mode 100644 index 2bc204cc45..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/c2f31fa6e9a867a9.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,457202,439061,182399,234779,374615,330995,592143,372943,899268,87316,655900,299023,25652,882293,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-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-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};var l=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["AuditOutlined",0,i],457202);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"};var n=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["BgColorsOutlined",0,n],439061);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"};var d=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["BlockOutlined",0,d],182399);let c={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-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"};var m=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:c}))});e.s(["BookOutlined",0,m],234779);let u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var g=s.forwardRef(function(e,a){return s.createElement(l.default,(0,t.default)({},e,{ref:a,icon:u}))});e.s(["CreditCardOutlined",0,g],374615);var x=e.i(366845);e.s(["FolderOutlined",()=>x.default],330995);var p=e.i(609587);e.s(["ConfigProvider",()=>p.default],592143);var h=e.i(8211),f=e.i(343794),y=e.i(529681),b=e.i(242064),j=e.i(704914),v=e.i(876556),N=e.i(290224),k=e.i(251224),w=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[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])&&(s[a[l]]=e[a[l]]);return s};function O({suffixCls:e,tagName:t,displayName:a}){return a=>s.forwardRef((l,i)=>s.createElement(a,Object.assign({ref:i,suffixCls:e,tagName:t},l)))}let _=s.forwardRef((e,t)=>{let{prefixCls:a,suffixCls:l,className:i,tagName:r}=e,n=w(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:o}=s.useContext(b.ConfigContext),d=o("layout",a),[c,m,u]=(0,k.default)(d),g=l?`${d}-${l}`:d;return c(s.createElement(r,Object.assign({className:(0,f.default)(a||g,i,m,u),ref:t},n)))}),L=s.forwardRef((e,t)=>{let{direction:a}=s.useContext(b.ConfigContext),[l,i]=s.useState([]),{prefixCls:r,className:n,rootClassName:o,children:d,hasSider:c,tagName:m,style:u}=e,g=w(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),x=(0,y.default)(g,["suffixCls"]),{getPrefixCls:p,className:O,style:_}=(0,b.useComponentConfig)("layout"),L=p("layout",r),C="boolean"==typeof c?c:!!l.length||(0,v.default)(d).some(e=>e.type===N.default),[S,M,P]=(0,k.default)(L),T=(0,f.default)(L,{[`${L}-has-sider`]:C,[`${L}-rtl`]:"rtl"===a},O,n,o,M,P),z=s.useMemo(()=>({siderHook:{addSider:e=>{i(t=>[].concat((0,h.default)(t),[e]))},removeSider:e=>{i(t=>t.filter(t=>t!==e))}}}),[]);return S(s.createElement(j.LayoutContext.Provider,{value:z},s.createElement(m,Object.assign({ref:t,className:T,style:Object.assign(Object.assign({},_),u)},x),d)))}),C=O({tagName:"div",displayName:"Layout"})(L),S=O({suffixCls:"header",tagName:"header",displayName:"Header"})(_),M=O({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(_),P=O({suffixCls:"content",tagName:"main",displayName:"Content"})(_);C.Header=S,C.Footer=M,C.Content=P,C.Sider=N.default,C._InternalSiderContext=N.SiderContext,e.s(["Layout",0,C],372943);var T=e.i(60699);e.s(["Menu",()=>T.default],899268);var z=e.i(475254);let E=(0,z.default)("calendar",[["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"}]]);e.s(["Calendar",()=>E],87316);var R=e.i(399219);e.s(["ChevronUp",()=>R.default],655900);let U=(0,z.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",()=>U],299023);let H=(0,z.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);e.s(["TrendingUp",()=>H],25652);let B=(0,z.default)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["UserCheck",()=>B],882293)},761911,98740,e=>{"use strict";let t=(0,e.i(475254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",()=>t],98740),e.s(["Users",()=>t],761911)},111672,e=>{"use strict";var t=e.i(247167),s=e.i(843476),a=e.i(109799),l=e.i(785242),i=e.i(135214),r=e.i(218129),n=e.i(477189),o=e.i(457202),d=e.i(299251),c=e.i(153702),m=e.i(439061),u=e.i(182399),g=e.i(234779),x=e.i(374615),p=e.i(210612),h=e.i(19732),f=e.i(872934),y=e.i(993914),b=e.i(330995),j=e.i(438957),v=e.i(777579),N=e.i(788191),k=e.i(983561),w=e.i(602073),O=e.i(928685),_=e.i(313603),L=e.i(232164),C=e.i(645526),S=e.i(366308),M=e.i(771674),P=e.i(592143),T=e.i(372943),z=e.i(899268),E=e.i(271645),R=e.i(708347),U=e.i(844444),H=e.i(371401);e.i(389083);var B=e.i(878894),A=e.i(87316);e.i(664659),e.i(655900);var $=e.i(531278),I=e.i(299023),V=e.i(25652),D=e.i(882293),K=e.i(761911),F=e.i(764205);let W=(...e)=>e.filter(Boolean).join(" ");function G({accessToken:e,width:t=220}){let a=(0,H.useDisableUsageIndicator)(),[l,i]=(0,E.useState)(!1),[r,n]=(0,E.useState)(!1),[o,d]=(0,E.useState)(null),[c,m]=(0,E.useState)(null),[u,g]=(0,E.useState)(!1),[x,p]=(0,E.useState)(null);(0,E.useEffect)(()=>{(async()=>{if(e){g(!0),p(null);try{let[t,s]=await Promise.all([(0,F.getRemainingUsers)(e),(0,F.getLicenseInfo)(e).catch(()=>null)]);d(t),m(s)}catch(e){console.error("Failed to fetch usage data:",e),p("Failed to load usage data")}finally{g(!1)}}})()},[e]);let h=c?.expiration_date?(e=>{if(!e)return null;let t=new Date(e+"T00:00:00Z"),s=new Date;return s.setHours(0,0,0,0),Math.ceil((t.getTime()-s.getTime())/864e5)})(c.expiration_date):null,f=null!==h&&h<0,y=null!==h&&h>=0&&h<30,{isOverLimit:b,isNearLimit:j,usagePercentage:v,userMetrics:N,teamMetrics:k}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let t=e.total_users?e.total_users_used/e.total_users*100:0,s=t>100,a=t>=80&&t<=100,l=e.total_teams?e.total_teams_used/e.total_teams*100:0,i=l>100,r=l>=80&&l<=100,n=s||i;return{isOverLimit:n,isNearLimit:(a||r)&&!n,usagePercentage:Math.max(t,l),userMetrics:{isOverLimit:s,isNearLimit:a,usagePercentage:t},teamMetrics:{isOverLimit:i,isNearLimit:r,usagePercentage:l}}})(o),w=b||j||f||y,O=b||f,_=(j||y)&&!O;return a||!e||o?.total_users===null&&o?.total_teams===null?null:(0,s.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:`${Math.min(t,220)}px`},children:(0,s.jsx)(()=>r?(0,s.jsx)("button",{onClick:()=>n(!1),className:W("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(K.Users,{className:"h-4 w-4 flex-shrink-0"}),w&&(0,s.jsx)("span",{className:"flex-shrink-0",children:O?(0,s.jsx)(B.AlertTriangle,{className:"h-3 w-3"}):_?(0,s.jsx)(V.TrendingUp,{className:"h-3 w-3"}):null}),(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[o&&null!==o.total_users&&(0,s.jsxs)("span",{className:W("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",o.total_users_used,"/",o.total_users]}),o&&null!==o.total_teams&&(0,s.jsxs)("span",{className:W("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",o.total_teams_used,"/",o.total_teams]}),c?.expiration_date&&null!==h&&(0,s.jsx)("span",{className:W("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-700 border-gray-200"),children:h<0?"Exp!":`${h}d`}),!o||null===o.total_users&&null===o.total_teams&&!c&&(0,s.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):u?(0,s.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,s.jsx)($.Loader2,{className:"h-4 w-4 animate-spin"}),(0,s.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):x||!o?(0,s.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:x||"No data"})}),(0,s.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,s.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]})}):(0,s.jsxs)("div",{className:W("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,s.jsx)(K.Users,{className:"h-4 w-4 flex-shrink-0"}),(0,s.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,s.jsx)("button",{onClick:()=>n(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,s.jsx)(I.Minus,{className:"h-3 w-3 text-gray-400"})})]}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[c?.has_license&&c.expiration_date&&(0,s.jsxs)("div",{className:W("space-y-1 border rounded-md p-2",f&&"border-red-200 bg-red-50",y&&"border-yellow-200 bg-yellow-50"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,s.jsx)(A.Calendar,{className:"h-3 w-3"}),(0,s.jsx)("span",{className:"font-medium",children:"License"}),(0,s.jsx)("span",{className:W("ml-1 px-1.5 py-0.5 rounded border",f&&"bg-red-50 text-red-700 border-red-200",y&&"bg-yellow-50 text-yellow-700 border-yellow-200",!f&&!y&&"bg-gray-50 text-gray-600 border-gray-200"),children:f?"Expired":y?"Expiring soon":"OK"})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-gray-600 text-xs",children:"Status:"}),(0,s.jsx)("span",{className:W("font-medium text-right",f&&"text-red-600",y&&"text-yellow-600"),children:(e=>{if(null===e)return"No expiration";if(e<0)return"Expired";if(0===e)return"Expires today";if(1===e)return"1 day remaining";if(e<30)return`${e} days remaining`;if(e<60)return"1 month remaining";let t=Math.floor(e/30);return`${t} months remaining`})(h)})]}),c.license_type&&(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-gray-600 text-xs",children:"Type:"}),(0,s.jsx)("span",{className:"font-medium text-right capitalize",children:c.license_type})]})]}),null!==o.total_users&&(0,s.jsxs)("div",{className:W("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,s.jsx)(K.Users,{className:"h-3 w-3"}),(0,s.jsx)("span",{className:"font-medium",children:"Users"}),(0,s.jsx)("span",{className:W("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,s.jsxs)("span",{className:"font-medium text-right",children:[o.total_users_used,"/",o.total_users]})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,s.jsx)("span",{className:W("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:o.total_users_remaining})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,s.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,s.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,s.jsx)("div",{className:W("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(N.usagePercentage,100)}%`}})})]}),null!==o.total_teams&&(0,s.jsxs)("div",{className:W("space-y-1 border rounded-md p-2",k.isOverLimit&&"border-red-200 bg-red-50",k.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,s.jsx)(D.UserCheck,{className:"h-3 w-3"}),(0,s.jsx)("span",{className:"font-medium",children:"Teams"}),(0,s.jsx)("span",{className:W("ml-1 px-1.5 py-0.5 rounded border",k.isOverLimit&&"bg-red-50 text-red-700 border-red-200",k.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!k.isOverLimit&&!k.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:k.isOverLimit?"Over limit":k.isNearLimit?"Near limit":"OK"})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,s.jsxs)("span",{className:"font-medium text-right",children:[o.total_teams_used,"/",o.total_teams]})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,s.jsx)("span",{className:W("font-medium text-right",k.isOverLimit&&"text-red-600",k.isNearLimit&&"text-yellow-600"),children:o.total_teams_remaining})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,s.jsxs)("span",{className:"font-medium text-right",children:[Math.round(k.usagePercentage),"%"]})]}),(0,s.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,s.jsx)("div",{className:W("h-2 rounded-full transition-all duration-300",k.isOverLimit&&"bg-red-500",k.isNearLimit&&"bg-yellow-500",!k.isOverLimit&&!k.isNearLimit&&"bg-green-500"),style:{width:`${Math.min(k.usagePercentage,100)}%`}})})]})]})]}),{})})}let{Sider:q}=T.Layout,Y={"api-reference":"api-reference"},X=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,s.jsx)(j.KeyOutlined,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,s.jsx)(N.PlayCircleOutlined,{}),roles:R.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,s.jsx)(u.BlockOutlined,{}),roles:R.rolesWithWriteAccess},{key:"agents",page:"agents",label:"Agents",icon:(0,s.jsx)(k.RobotOutlined,{}),roles:R.rolesWithWriteAccess},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,s.jsx)(S.ToolOutlined,{})},{key:"skills",page:"skills",label:"Skills",icon:(0,s.jsx)(r.ApiOutlined,{}),roles:R.all_admin_roles},{key:"memory",page:"memory",label:"Memory",icon:(0,s.jsx)(g.BookOutlined,{})},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,s.jsx)(w.SafetyOutlined,{})},{key:"policies",page:"policies",label:(0,s.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,s.jsx)(o.AuditOutlined,{}),roles:R.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,s.jsx)(S.ToolOutlined,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,s.jsx)(O.SearchOutlined,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,s.jsx)(p.DatabaseOutlined,{})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,s.jsx)(w.SafetyOutlined,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,s.jsx)(c.BarChartOutlined,{}),roles:[...R.all_admin_roles,...R.internalUserRoles],label:"Usage"},{key:"logs",page:"logs",label:"Logs",icon:(0,s.jsx)(v.LineChartOutlined,{})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,s.jsx)(w.SafetyOutlined,{}),roles:[...R.all_admin_roles,...R.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,s.jsx)(C.TeamOutlined,{})},{key:"projects",page:"projects",label:(0,s.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,s.jsx)(U.default,{})]}),icon:(0,s.jsx)(b.FolderOutlined,{}),roles:R.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,s.jsx)(M.UserOutlined,{}),roles:R.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,s.jsx)(d.BankOutlined,{}),roles:R.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,s.jsx)(u.BlockOutlined,{}),roles:R.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,s.jsx)(x.CreditCardOutlined,{}),roles:R.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api-reference",page:"api-reference",label:"API Reference",icon:(0,s.jsx)(r.ApiOutlined,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,s.jsx)(n.AppstoreOutlined,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,s.jsx)(g.BookOutlined,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,s.jsx)(h.ExperimentOutlined,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,s.jsx)(p.DatabaseOutlined,{}),roles:R.all_admin_roles},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,s.jsx)(y.FileTextOutlined,{}),roles:R.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,s.jsx)(r.ApiOutlined,{}),roles:[...R.all_admin_roles,...R.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,s.jsx)(L.TagsOutlined,{}),roles:R.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,s.jsx)(c.BarChartOutlined,{})}]}]},{groupLabel:"SETTINGS",roles:R.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,s.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,s.jsx)(U.default,{})]}),icon:(0,s.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,s.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,s.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,s.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings ",(0,s.jsx)(U.default,{dot:!0,children:(0,s.jsx)("span",{})})]}),icon:(0,s.jsx)(_.SettingOutlined,{}),roles:R.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,s.jsx)(c.BarChartOutlined,{}),roles:R.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,s.jsx)(m.BgColorsOutlined,{}),roles:R.all_admin_roles}]}]}];e.s(["default",0,({setPage:e,defaultSelectedKey:r,collapsed:n=!1,enabledPagesInternalUsers:o,enableProjectsUI:d,disableAgentsForInternalUsers:c,allowAgentsForTeamAdmins:m,disableVectorStoresForInternalUsers:u,allowVectorStoresForTeamAdmins:g})=>{let x,{userId:p,accessToken:h,userRole:y}=(0,i.default)(),{data:b}=(0,a.useOrganizations)(),{data:j}=(0,l.useTeams)(),v=(0,E.useMemo)(()=>!!p&&!!b&&b.some(e=>e.members?.some(e=>e.user_id===p&&"org_admin"===e.user_role)),[p,b]),N=(0,E.useMemo)(()=>(0,R.isUserTeamAdminForAnyTeam)(j??null,p??""),[j,p]),k=t=>{if(Y[t])return void e(t);let s=new URLSearchParams(window.location.search);s.set("page",t),window.history.pushState(null,"",`?${s.toString()}`),e(t)},w=(e,a,l)=>{let i;if(l)return(0,s.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),style:{color:"inherit",textDecoration:"none"},children:[e," ",(0,s.jsx)(f.ExportOutlined,{style:{fontSize:10,marginLeft:4}})]});let r=Y[a],n=r?function(e){let s=(t.default.env.NEXT_PUBLIC_BASE_URL??"").replace(/^\/+|\/+$/g,""),a=s?`/${s}/`:"/";if(F.serverRootPath&&"/"!==F.serverRootPath){let e=F.serverRootPath.replace(/\/+$/,""),t=a.replace(/^\/+/,"");a=`${e}/${t}`}return`${a}${e}`}(r):((i=new URLSearchParams(window.location.search)).set("page",a),`?${i.toString()}`);return(0,s.jsx)("a",{href:n,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button?e.stopPropagation():e.preventDefault()},style:{color:"inherit",textDecoration:"none"},children:e})},O=e=>{let t=(0,R.isAdminRole)(y);return null!=o&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:y,isAdmin:t,enabledPagesInternalUsers:o}),e.map(e=>({...e,children:e.children?O(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key){if(!(!e.roles||e.roles.includes(y)||v))return!1;if(!t&&null!=o){let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0}if("projects"===e.key&&!d||!t&&"agents"===e.key&&c&&!(m&&N)||!t&&"vector-stores"===e.key&&u&&!(g&&N)||e.roles&&!e.roles.includes(y))return!1;if(!t&&null!=o){if(e.children&&e.children.length>0&&e.children.some(e=>o.includes(e.page)))return console.log(`[LeftNav] Parent "${e.page}" (${e.key}): VISIBLE (has visible children)`),!0;let t=o.includes(e.page);return console.log(`[LeftNav] Page "${e.page}" (${e.key}): ${t?"VISIBLE":"HIDDEN"}`),t}return!0})},_=(e=>{for(let t of X)for(let s of t.items){if(s.page===e)return s.key;if(s.children){let t=s.children.find(t=>t.page===e);if(t)return t.key}}return"api-keys"})(r);return(0,s.jsx)(T.Layout,{children:(0,s.jsxs)(q,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,s.jsx)(P.ConfigProvider,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,s.jsx)(z.Menu,{mode:"inline",selectedKeys:[_],defaultOpenKeys:[],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(x=[],X.forEach(e=>{if(e.roles&&!e.roles.includes(y))return;let t=O(e.items);0!==t.length&&x.push({type:"group",label:n?null:(0,s.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:e.groupLabel}),children:t.map(e=>({key:e.key,icon:e.icon,label:w(e.label,e.page,e.external_url),children:e.children?.map(e=>({key:e.key,icon:e.icon,label:w(e.label,e.page,e.external_url),onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):k(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):k(e.page)}}))})}),x)})}),(0,R.isAdminRole)(y)&&!n&&(0,s.jsx)(G,{accessToken:h,width:220})]})})},"menuGroups",()=>X],111672)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5023bf9fd490e7e0.js b/litellm/proxy/_experimental/out/_next/static/chunks/c3c84f2fc1b1e9db.js similarity index 96% rename from litellm/proxy/_experimental/out/_next/static/chunks/5023bf9fd490e7e0.js rename to litellm/proxy/_experimental/out/_next/static/chunks/c3c84f2fc1b1e9db.js index 115b00c5a7..245bc4d365 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/5023bf9fd490e7e0.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/c3c84f2fc1b1e9db.js @@ -164,4 +164,4 @@ main();`}})())},[m,x,h,e,n,o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Butt border: 1px solid #fed7aa; font-family: monospace; } - `}),(0,t.jsx)(ew,{value:e,onChange:e=>r(e.target.value),placeholder:l,rows:a,className:"font-sans"}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 items-center",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Detected variables:"}),p.map((e,s)=>(0,t.jsx)(eb.Popover,{content:(0,t.jsxs)("div",{className:"p-2",style:{minWidth:"200px"},children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"Edit variable name"}),(0,t.jsx)(ei.Input,{size:"small",value:c,onChange:e=>d(e.target.value),onPressEnter:m,placeholder:"Variable name",autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,t.jsx)("button",{onClick:m,className:"text-xs px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save"}),(0,t.jsx)("button",{onClick:()=>{i(null),d("")},className:"text-xs px-2 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:"Cancel"})]})]}),open:o?.start===e.start,onOpenChange:e=>{e||(i(null),d(""))},trigger:"click",children:(0,t.jsx)(ey.Tag,{color:"orange",className:"cursor-pointer hover:opacity-80 transition-all m-0",icon:(0,t.jsx)(eN.EditOutlined,{}),onClick:()=>{i({oldName:e.name,start:e.start,end:e.end}),d(e.name)},children:e.name})},`${e.start}-${s}`))]})]})},e_=({value:e,onChange:s})=>(0,t.jsxs)(P.Card,{className:"p-3",children:[(0,t.jsx)(B.Text,{className:"block mb-2 text-sm font-medium",children:"Developer message"}),(0,t.jsx)(B.Text,{className:"text-gray-500 text-xs mb-2",children:"Optional system instructions for the model"}),(0,t.jsx)(eC,{value:e,onChange:s,rows:3,placeholder:"e.g., You are a helpful assistant..."})]}),ek=(0,ec.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),{Option:eT}=a.Select,eS=({messages:e,onAddMessage:r,onUpdateMessage:l,onRemoveMessage:n,onMoveMessage:o})=>{let[i,c]=(0,s.useState)(null),[d,m]=(0,s.useState)(null),p=()=>{c(null),m(null)};return(0,t.jsxs)(P.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)(B.Text,{className:"text-sm font-medium",children:"Prompt messages"}),(0,t.jsxs)(B.Text,{className:"text-gray-500 text-xs mt-1",children:["Use ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"{{variable}}"})," syntax for template variables"]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.map((s,r)=>(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{c(r)},onDragOver:e=>{e.preventDefault(),m(r)},onDrop:e=>{e.preventDefault(),null!==i&&i!==r&&o(i,r),c(null),m(null)},onDragEnd:p,className:`border border-gray-300 rounded overflow-hidden bg-white transition-all ${i===r?"opacity-50":""} ${d===r&&i!==r?"border-blue-500 border-2":""}`,children:[(0,t.jsxs)("div",{className:"bg-gray-50 px-2 py-1.5 border-b border-gray-300 flex items-center justify-between",children:[(0,t.jsxs)(a.Select,{value:s.role,onChange:e=>l(r,"role",e),style:{width:100},size:"small",bordered:!1,children:[(0,t.jsx)(eT,{value:"user",children:"User"}),(0,t.jsx)(eT,{value:"assistant",children:"Assistant"}),(0,t.jsx)(eT,{value:"system",children:"System"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[e.length>1&&(0,t.jsx)("button",{onClick:()=>n(r),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})}),(0,t.jsx)("div",{className:"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600",children:(0,t.jsx)(ek,{size:16})})]})]}),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)(eC,{value:s.content,onChange:e=>l(r,"content",e),rows:3,placeholder:"Enter prompt content..."})})]},r))}),(0,t.jsxs)("button",{onClick:r,className:"mt-2 text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add message"]})]})};var e$=e.i(447593);let eP=({extractedVariables:e,variables:s,onVariableChange:r})=>0===e.length?null:(0,t.jsxs)("div",{className:"p-4 border-b border-gray-200 bg-blue-50",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Fill in template variables to start testing"}),(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs text-gray-600 mb-1 font-medium",children:["{{",e,"}}"]}),(0,t.jsx)(ei.Input,{value:s[e]||"",onChange:t=>r(e,t.target.value),placeholder:`Enter value for ${e}`,size:"small"})]},e))})]});var eI=e.i(56456),eB=e.i(482725),eE=e.i(983561);let eO=({hasVariables:e})=>(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(eE.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)("span",{className:"text-base",children:e?"Fill in the variables above, then type a message to start testing":"Type a message below to start testing your prompt"})]});var eA=e.i(771674),eD=e.i(918789),eM=e.i(989022);let ez=({message:e})=>(0,t.jsx)("div",{className:`mb-4 flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,t.jsxs)("div",{className:"max-w-[85%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===e.role?"#f0f8ff":"#ffffff",border:"user"===e.role?"1px solid #e6f0fa":"1px solid #f0f0f0"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===e.role?"#e6f0fa":"#f5f5f5"},children:"user"===e.role?(0,t.jsx)(eA.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(eE.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:["assistant"===e.role?(0,t.jsx)(eD.default,{components:{code({node:e,inline:s,className:r,children:l,...a}){let n=/language-(\w+)/.exec(r||"");return!s&&n?(0,t.jsx)(G.Prism,{style:X.coy,language:n[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...a,children:String(l).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${r} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...a,children:l})},pre:({node:e,...s})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})},children:e.content}):(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:e.content}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&(0,t.jsx)(eM.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage})]})]})}),eR=({messages:e,isLoading:s,hasVariables:r,messagesEndRef:l})=>{let a=(0,t.jsx)(eI.LoadingOutlined,{style:{fontSize:24},spin:!0});return(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 pb-0",children:[0===e.length&&(0,t.jsx)(eO,{hasVariables:r}),e.map((e,s)=>(0,t.jsx)(ez,{message:e},s)),s&&(0,t.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,t.jsx)(eB.Spin,{indicator:a})}),(0,t.jsx)("div",{ref:l,style:{height:"1px"}})]})},eL=({extractedVariables:e,variables:s})=>{let r=e.filter(e=>!s[e]||""===s[e].trim());return 0===r.length?null:(0,t.jsx)("div",{className:"mb-3 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:"text-yellow-600 text-sm",children:"⚠️"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm text-yellow-800 font-medium mb-1",children:"Please fill in all template variables above"}),(0,t.jsxs)("p",{className:"text-xs text-yellow-700",children:["Missing: ",r.map(e=>`{{${e}}}`).join(", ")]})]})]})})};var eF=e.i(132104);let{TextArea:eU}=ei.Input,eV=({inputMessage:e,isLoading:s,isDisabled:l,onInputChange:a,onSend:n,onKeyDown:o,onCancel:i})=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,t.jsx)(eU,{value:e,onChange:e=>a(e.target.value),onKeyDown:o,placeholder:"Type your message... (Shift+Enter for new line)",disabled:s,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,t.jsx)(r.Button,{onClick:n,disabled:l,className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,t.jsx)(eF.ArrowUpOutlined,{style:{fontSize:"14px"}})})]}),s&&(0,t.jsx)(r.Button,{onClick:i,className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",children:"Cancel"})]}),eH=({prompt:e,accessToken:l})=>{let{isLoading:a,messages:o,inputMessage:i,variables:c,variablesFilled:d,extractedVariables:m,allVariablesFilled:p,messagesEndRef:x,setInputMessage:u,handleSendMessage:h,handleCancelRequest:g,handleClearConversation:f,handleKeyDown:v,handleVariableChange:j}=((e,t)=>{let[r,l]=(0,s.useState)(!1),[a,o]=(0,s.useState)([]),[i,c]=(0,s.useState)(""),[d,m]=(0,s.useState)({}),[p,x]=(0,s.useState)(!1),[u,h]=(0,s.useState)(null),g=(0,s.useRef)(null),f=N(e),v=f.every(e=>d[e]&&""!==d[e].trim());(0,s.useEffect)(()=>{g.current&&setTimeout(()=>{g.current?.scrollIntoView({behavior:"smooth",block:"end"})},100)},[a]);let j=async()=>{let s;if(!t)return void W.default.fromBackend("Access token is required");if(f.length>0&&!v)return void W.default.fromBackend("Please fill in all template variables");if(!i.trim())return;!p&&f.length>0&&x(!0);let r={role:"user",content:i};o(e=>[...e,r]),c("");let m=new AbortController;h(m),l(!0);let u=Date.now();try{let r,l,c=w(e),p=(0,n.getProxyBaseUrl)(),x={dotprompt_content:c};0===a.length?x.prompt_variables=d:x.conversation_history=[...a.map(e=>({role:e.role,content:e.content})),{role:"user",content:i}];let h=await fetch(`${p}/prompts/test`,{method:"POST",headers:{[(0,n.getGlobalLitellmHeaderName)()]:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(x),signal:m.signal});if(!h.ok){let e=await h.text();throw Error(`HTTP error! status: ${h.status}, ${e}`)}if(!h.body)throw Error("No response body");let g=h.body.getReader(),f=new TextDecoder,v="";for(o(e=>[...e,{role:"assistant",content:""}]);;){let{done:e,value:t}=await g.read();if(e)break;for(let e of f.decode(t).split("\n"))if(e.startsWith("data: ")){let t=e.slice(6);if("[DONE]"===t)continue;try{let e=JSON.parse(t);!r&&e.model&&(r=e.model),e.usage&&(l=e.usage);let a=e.choices?.[0]?.delta?.content;a&&(s||(s=Date.now()-u),v+=a,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",content:v,model:r,timeToFirstToken:s},t}))}catch(e){console.error("Error parsing chunk:",e)}}}let j=Date.now()-u;o(e=>{let t=[...e];return t[t.length-1]={...t[t.length-1],totalLatency:j,usage:l},t})}catch(e){"AbortError"===e.name?console.log("Request was cancelled"):(console.error("Error testing prompt:",e),o(t=>{let s=t[t.length-1];return s&&"assistant"===s.role&&""===s.content?[...t.slice(0,-1),{role:"assistant",content:`Error: ${e.message}`}]:[...t,{role:"assistant",content:`Error: ${e.message}`}]}))}finally{l(!1),h(null)}};return{isLoading:r,messages:a,inputMessage:i,variables:d,variablesFilled:p,extractedVariables:f,allVariablesFilled:v,messagesEndRef:g,setInputMessage:c,handleSendMessage:j,handleCancelRequest:()=>{u&&(u.abort(),h(null),l(!1),W.default.info("Request cancelled"))},handleClearConversation:()=>{o([]),x(!1),W.default.success("Chat history cleared.")},handleKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),j())},handleVariableChange:(e,t)=>{m({...d,[e]:t})}}})(e,l);return(0,t.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[!d&&(0,t.jsx)(eP,{extractedVariables:m,variables:c,onVariableChange:j}),o.length>0&&(0,t.jsx)("div",{className:"p-3 border-b border-gray-200 bg-white flex justify-end",children:(0,t.jsx)(r.Button,{onClick:f,className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:e$.ClearOutlined,children:"Clear Chat"})}),(0,t.jsx)(eR,{messages:o,isLoading:a,hasVariables:m.length>0,messagesEndRef:x}),(0,t.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[(0,t.jsx)(eL,{extractedVariables:m,variables:c}),(0,t.jsx)(eV,{inputMessage:i,isLoading:a,isDisabled:a||!i.trim()||m.length>0&&!p,onInputChange:u,onSend:h,onKeyDown:v,onCancel:g})]})]})},eJ=({visible:e,promptName:s,isSaving:a,onNameChange:n,onPublish:o,onCancel:i})=>(0,t.jsx)(l.Modal,{title:"Publish Prompt",open:e,onCancel:i,footer:[(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"secondary",onClick:i,children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:o,loading:a,children:"Publish"})]},"footer")],children:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)(B.Text,{className:"mb-2",children:"Name"}),(0,t.jsx)(ei.Input,{value:s,onChange:e=>n(e.target.value),placeholder:"Enter prompt name",onPressEnter:o,autoFocus:!0}),(0,t.jsx)(B.Text,{className:"text-gray-500 text-xs mt-2",children:"Published prompts can be used in API calls and are versioned for easy tracking."})]})}),eW=({prompt:e})=>{let s=w(e);return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Generated .prompt file"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This is the dotprompt format that will be saved to the database"})]}),(0,t.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-900 font-mono whitespace-pre-wrap",children:s})})]})};var eK=e.i(608856),eq=e.i(573421),eG=e.i(981339);let{Text:eX}=e.i(898586).Typography,eY=({isOpen:e,onClose:r,accessToken:l,promptId:a,activeVersionId:o,onSelectVersion:i})=>{let[c,d]=(0,s.useState)([]),[m,p]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&l&&a&&x()},[e,l,a]);let x=async()=>{p(!0);try{let e=a.includes(".v")?a.split(".v")[0]:a,t=await (0,n.getPromptVersions)(l,e);d(t.prompts)}catch(e){console.error("Error fetching prompt versions:",e)}finally{p(!1)}},u=e=>{if(e.version)return`v${e.version}`;let t=e.litellm_params?.prompt_id||e.prompt_id;return t.includes(".v")?`v${t.split(".v")[1]}`:t.includes("_v")?`v${t.split("_v")[1]}`:"v1"};return(0,t.jsx)(eK.Drawer,{title:"Version History",placement:"right",onClose:r,open:e,width:400,mask:!1,maskClosable:!1,children:m?(0,t.jsx)(eG.Skeleton,{active:!0,paragraph:{rows:4}}):0===c.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No version history available."}):(0,t.jsx)(eq.List,{dataSource:c,renderItem:(e,s)=>{var r;let l=e.version||parseInt(u(e).replace("v","")),a=null;o&&(o.includes(".v")?a=parseInt(o.split(".v")[1]):o.includes("_v")&&(a=parseInt(o.split("_v")[1])));let n=a?l===a:0===s;return(0,t.jsxs)("div",{className:`mb-4 p-4 rounded-lg border cursor-pointer transition-all hover:shadow-md ${n?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,onClick:()=>i?.(e),children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ey.Tag,{className:"m-0",children:u(e)}),0===s&&(0,t.jsx)(ey.Tag,{color:"blue",className:"m-0",children:"Latest"})]}),n&&(0,t.jsx)(ey.Tag,{color:"green",className:"m-0",children:"Active"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(eX,{className:"text-sm text-gray-600 font-medium",children:(r=e.created_at)?new Date(r).toLocaleString():"-"}),(0,t.jsx)(eX,{type:"secondary",className:"text-xs",children:e.prompt_info?.prompt_type==="db"?"Saved to Database":"Config Prompt"})]})]},`${e.prompt_id}-v${e.version||l}`)}})})},eZ=({onClose:e,onSuccess:r,accessToken:l,initialPromptData:a})=>{let[o,i]=(0,s.useState)((()=>{if(a)try{return _(a)}catch(e){console.error("Error parsing existing prompt:",e),W.default.fromBackend("Failed to parse prompt data")}return{name:"New prompt",model:"gpt-4o",config:{temperature:1,max_tokens:1e3},tools:[],developerMessage:"",messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}],environment:"development"}})()),[c,d]=(0,s.useState)(!!a),[m,p]=(0,s.useState)(!1),[x,u]=(0,s.useState)((()=>{if(!a?.prompt_spec)return;let e=a.prompt_spec.prompt_id,t=a.prompt_spec.version||a.prompt_spec.litellm_params?.prompt_id;return"number"==typeof t?`${e}.v${t}`:"string"==typeof t&&(t.includes(".v")||t.includes("_v"))?t:e})()),[h,g]=(0,s.useState)(!1),[f,v]=(0,s.useState)(!1),[j,b]=(0,s.useState)(null),[y,N]=(0,s.useState)(!1),[C,k]=(0,s.useState)("pretty"),T=e=>{void 0!==e?b(e):b(null),g(!0)},S=async()=>{if(!l)return void W.default.fromBackend("Access token is required");if(!o.name||""===o.name.trim())return void W.default.fromBackend("Please enter a valid prompt name");N(!0);try{let t=o.name.replace(/[^a-zA-Z0-9_-]/g,"_").toLowerCase(),s=w(o),i={prompt_id:t,litellm_params:{prompt_integration:"dotprompt",prompt_id:t,dotprompt_content:s},prompt_info:{prompt_type:"db",environment:o.environment}};c&&a?.prompt_spec?.prompt_id?(await (0,n.updatePromptCall)(l,a.prompt_spec.prompt_id,i),W.default.success("Prompt updated successfully!")):(await (0,n.createPromptCall)(l,i),W.default.success("Prompt created successfully!")),r(),e()}catch(e){console.error("Error saving prompt:",e),W.default.fromBackend(c?"Failed to update prompt":"Failed to save prompt")}finally{N(!1),v(!1)}},$=x&&x.includes(".v")?`v${x.split(".v")[1]}`:null;return(0,t.jsxs)("div",{className:"flex h-full bg-white",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,t.jsx)(ex,{promptName:o.name,onNameChange:e=>i({...o,name:e}),onBack:e,onSave:()=>{o.name&&""!==o.name.trim()&&"New prompt"!==o.name?S():v(!0)},isSaving:y,editMode:c,onShowHistory:()=>p(!0),version:$,promptModel:o.model,promptVariables:(()=>{let e,t={},s=[o.developerMessage,...o.messages.map(e=>e.content)].join(" "),r=/\{\{(\w+)\}\}/g;for(;null!==(e=r.exec(s));){let s=e[1];t[s]||(t[s]=`example_${s}`)}return t})(),accessToken:l,environment:o.environment,onEnvironmentChange:async e=>{if(i({...o,environment:e}),c&&l&&a?.prompt_spec?.prompt_id)try{let t=await (0,n.getPromptInfo)(l,a.prompt_spec.prompt_id,e);if(t?.prompt_spec){let s=_(t);i({...s,environment:e});let r=t.prompt_spec.version||1;u(`${t.prompt_spec.prompt_id}.v${r}`)}}catch{}}}),(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsxs)("div",{className:"w-1/2 overflow-y-auto bg-white border-r border-gray-200 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"border-b border-gray-200 bg-white px-6 py-4 flex items-center gap-3",children:[(0,t.jsx)(eg,{model:o.model,temperature:o.config.temperature,maxTokens:o.config.max_tokens,accessToken:l,onModelChange:e=>i({...o,model:e}),onTemperatureChange:e=>i({...o,config:{...o.config,temperature:e}}),onMaxTokensChange:e=>i({...o,config:{...o.config,max_tokens:e}})}),(0,t.jsxs)("div",{className:"ml-auto inline-flex items-center bg-gray-200 rounded-full p-0.5",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"pretty"===C?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("pretty"),children:"PRETTY"}),(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"dotprompt"===C?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("dotprompt"),children:"DOTPROMPT"})]})]}),"pretty"===C?(0,t.jsxs)("div",{className:"p-6 space-y-4 pb-20",children:[(0,t.jsx)(ej,{tools:o.tools,onAddTool:()=>T(),onEditTool:T,onRemoveTool:e=>{i({...o,tools:o.tools.filter((t,s)=>s!==e)})}}),(0,t.jsx)(e_,{value:o.developerMessage,onChange:e=>i({...o,developerMessage:e})}),(0,t.jsx)(eS,{messages:o.messages,onAddMessage:()=>{i({...o,messages:[...o.messages,{role:"user",content:""}]})},onUpdateMessage:(e,t,s)=>{let r=[...o.messages];r[e][t]=s,i({...o,messages:r})},onRemoveMessage:e=>{o.messages.length>1&&i({...o,messages:o.messages.filter((t,s)=>s!==e)})},onMoveMessage:(e,t)=>{let s=[...o.messages],[r]=s.splice(e,1);s.splice(t,0,r),i({...o,messages:s})}})]}):(0,t.jsx)(eW,{prompt:o})]}),(0,t.jsx)("div",{className:"w-1/2 flex-shrink-0",children:(0,t.jsx)(eH,{prompt:o,accessToken:l})})]})]}),(0,t.jsx)(eJ,{visible:f,promptName:o.name,isSaving:y,onNameChange:e=>i({...o,name:e}),onPublish:S,onCancel:()=>v(!1)}),h&&(0,t.jsx)(eo,{visible:h,initialJson:null!==j?o.tools[j].json:"",onSave:e=>{try{let t=JSON.parse(e),s={name:t.function?.name||"Unnamed Tool",description:t.function?.description||"",json:e};if(null!==j){let e=[...o.tools];e[j]=s,i({...o,tools:e})}else i({...o,tools:[...o.tools,s]});g(!1),b(null)}catch(e){W.default.fromBackend("Invalid JSON format")}},onClose:()=>{g(!1),b(null)}}),(0,t.jsx)(eY,{isOpen:m,onClose:()=>p(!1),accessToken:l,promptId:a?.prompt_spec?.prompt_id||o.name,activeVersionId:x,onSelectVersion:e=>{try{let t=_({prompt_spec:e});i(t);let s=e.version||1;u(`${e.prompt_id}.v${s}`)}catch(e){console.error("Error loading version:",e),W.default.fromBackend("Failed to load prompt version")}}})]})};var eQ=e.i(708347);e.s(["default",0,({accessToken:e,userRole:o})=>{let[i,c]=(0,s.useState)([]),[d,m]=(0,s.useState)(!1),[p,x]=(0,s.useState)(void 0),[u,h]=(0,s.useState)(null),[g,f]=(0,s.useState)(!1),[v,j]=(0,s.useState)(!1),[b,y]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[C,_]=(0,s.useState)(null),k=!!o&&(0,eQ.isAdminRole)(o),T=async()=>{if(e){m(!0);try{let t=await (0,n.getPromptsList)(e,p);console.log(`prompts: ${JSON.stringify(t)}`),c(t.prompts)}catch(e){console.error("Error fetching prompts:",e)}finally{m(!1)}}};(0,s.useEffect)(()=>{T()},[e,p]);let S=()=>{T(),j(!1),y(null),h(null)},P=async()=>{if(C&&e){w(!0);try{await (0,n.deletePromptCall)(e,C.id),W.default.success(`Prompt "${C.name}" deleted successfully`),T()}catch(e){console.error("Error deleting prompt:",e),W.default.fromBackend("Failed to delete prompt")}finally{w(!1),_(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[v?(0,t.jsx)(eZ,{onClose:()=>{j(!1),y(null)},onSuccess:S,accessToken:e,initialPromptData:b}):u?(0,t.jsx)(Z,{promptId:u,onClose:()=>h(null),accessToken:e,isAdmin:k,onDelete:T,onEdit:e=>{y(e),j(!0)}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Button,{onClick:()=>{u&&h(null),y(null),j(!0)},disabled:!e,children:"+ Add New Prompt"}),(0,t.jsx)(r.Button,{onClick:()=>{u&&h(null),f(!0)},disabled:!e,variant:"secondary",children:"Upload .prompt File"})]}),(0,t.jsx)(a.Select,{placeholder:"All Environments",allowClear:!0,value:p,onChange:e=>x(e),style:{width:180},options:[{label:"Development",value:"development"},{label:"Staging",value:"staging"},{label:"Production",value:"production"}]})]}),(0,t.jsx)($,{promptsList:i,isLoading:d,onPromptClick:e=>{h(e)},onDeleteClick:(e,t)=>{_({id:e,name:t})},accessToken:e,isAdmin:k})]}),(0,t.jsx)(ea,{visible:g,onClose:()=>{f(!1)},accessToken:e,onSuccess:S}),C&&(0,t.jsxs)(l.Modal,{title:"Delete Prompt",open:null!==C,onOk:P,onCancel:()=>{_(null)},confirmLoading:N,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",C.name," ?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],191403)}]); \ No newline at end of file + `}),(0,t.jsx)(ew,{value:e,onChange:e=>r(e.target.value),placeholder:l,rows:a,className:"font-sans"}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 items-center",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Detected variables:"}),p.map((e,s)=>(0,t.jsx)(eb.Popover,{content:(0,t.jsxs)("div",{className:"p-2",style:{minWidth:"200px"},children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"Edit variable name"}),(0,t.jsx)(ei.Input,{size:"small",value:c,onChange:e=>d(e.target.value),onPressEnter:m,placeholder:"Variable name",autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,t.jsx)("button",{onClick:m,className:"text-xs px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save"}),(0,t.jsx)("button",{onClick:()=>{i(null),d("")},className:"text-xs px-2 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:"Cancel"})]})]}),open:o?.start===e.start,onOpenChange:e=>{e||(i(null),d(""))},trigger:"click",children:(0,t.jsx)(ey.Tag,{color:"orange",className:"cursor-pointer hover:opacity-80 transition-all m-0",icon:(0,t.jsx)(eN.EditOutlined,{}),onClick:()=>{i({oldName:e.name,start:e.start,end:e.end}),d(e.name)},children:e.name})},`${e.start}-${s}`))]})]})},e_=({value:e,onChange:s})=>(0,t.jsxs)(P.Card,{className:"p-3",children:[(0,t.jsx)(B.Text,{className:"block mb-2 text-sm font-medium",children:"Developer message"}),(0,t.jsx)(B.Text,{className:"text-gray-500 text-xs mb-2",children:"Optional system instructions for the model"}),(0,t.jsx)(eC,{value:e,onChange:s,rows:3,placeholder:"e.g., You are a helpful assistant..."})]}),ek=(0,ec.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),{Option:eT}=a.Select,eS=({messages:e,onAddMessage:r,onUpdateMessage:l,onRemoveMessage:n,onMoveMessage:o})=>{let[i,c]=(0,s.useState)(null),[d,m]=(0,s.useState)(null),p=()=>{c(null),m(null)};return(0,t.jsxs)(P.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)(B.Text,{className:"text-sm font-medium",children:"Prompt messages"}),(0,t.jsxs)(B.Text,{className:"text-gray-500 text-xs mt-1",children:["Use ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"{{variable}}"})," syntax for template variables"]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.map((s,r)=>(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{c(r)},onDragOver:e=>{e.preventDefault(),m(r)},onDrop:e=>{e.preventDefault(),null!==i&&i!==r&&o(i,r),c(null),m(null)},onDragEnd:p,className:`border border-gray-300 rounded overflow-hidden bg-white transition-all ${i===r?"opacity-50":""} ${d===r&&i!==r?"border-blue-500 border-2":""}`,children:[(0,t.jsxs)("div",{className:"bg-gray-50 px-2 py-1.5 border-b border-gray-300 flex items-center justify-between",children:[(0,t.jsxs)(a.Select,{value:s.role,onChange:e=>l(r,"role",e),style:{width:100},size:"small",bordered:!1,children:[(0,t.jsx)(eT,{value:"user",children:"User"}),(0,t.jsx)(eT,{value:"assistant",children:"Assistant"}),(0,t.jsx)(eT,{value:"system",children:"System"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[e.length>1&&(0,t.jsx)("button",{onClick:()=>n(r),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})}),(0,t.jsx)("div",{className:"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600",children:(0,t.jsx)(ek,{size:16})})]})]}),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)(eC,{value:s.content,onChange:e=>l(r,"content",e),rows:3,placeholder:"Enter prompt content..."})})]},r))}),(0,t.jsxs)("button",{onClick:r,className:"mt-2 text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add message"]})]})};var e$=e.i(447593);let eP=({extractedVariables:e,variables:s,onVariableChange:r})=>0===e.length?null:(0,t.jsxs)("div",{className:"p-4 border-b border-gray-200 bg-blue-50",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Fill in template variables to start testing"}),(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs text-gray-600 mb-1 font-medium",children:["{{",e,"}}"]}),(0,t.jsx)(ei.Input,{value:s[e]||"",onChange:t=>r(e,t.target.value),placeholder:`Enter value for ${e}`,size:"small"})]},e))})]});var eI=e.i(56456),eB=e.i(482725),eE=e.i(983561);let eO=({hasVariables:e})=>(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(eE.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)("span",{className:"text-base",children:e?"Fill in the variables above, then type a message to start testing":"Type a message below to start testing your prompt"})]});var eA=e.i(771674),eD=e.i(918789),eM=e.i(989022);let ez=({message:e})=>(0,t.jsx)("div",{className:`mb-4 flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,t.jsxs)("div",{className:"max-w-[85%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===e.role?"#f0f8ff":"#ffffff",border:"user"===e.role?"1px solid #e6f0fa":"1px solid #f0f0f0"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===e.role?"#e6f0fa":"#f5f5f5"},children:"user"===e.role?(0,t.jsx)(eA.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(eE.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:["assistant"===e.role?(0,t.jsx)(eD.default,{components:{code({node:e,inline:s,className:r,children:l,...a}){let n=/language-(\w+)/.exec(r||"");return!s&&n?(0,t.jsx)(G.Prism,{style:X.coy,language:n[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...a,children:String(l).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${r} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...a,children:l})},pre:({node:e,...s})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})},children:e.content}):(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:e.content}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&(0,t.jsx)(eM.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage})]})]})}),eR=({messages:e,isLoading:s,hasVariables:r,messagesEndRef:l})=>{let a=(0,t.jsx)(eI.LoadingOutlined,{style:{fontSize:24},spin:!0});return(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 pb-0",children:[0===e.length&&(0,t.jsx)(eO,{hasVariables:r}),e.map((e,s)=>(0,t.jsx)(ez,{message:e},s)),s&&(0,t.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,t.jsx)(eB.Spin,{indicator:a})}),(0,t.jsx)("div",{ref:l,style:{height:"1px"}})]})},eL=({extractedVariables:e,variables:s})=>{let r=e.filter(e=>!s[e]||""===s[e].trim());return 0===r.length?null:(0,t.jsx)("div",{className:"mb-3 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:"text-yellow-600 text-sm",children:"⚠️"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm text-yellow-800 font-medium mb-1",children:"Please fill in all template variables above"}),(0,t.jsxs)("p",{className:"text-xs text-yellow-700",children:["Missing: ",r.map(e=>`{{${e}}}`).join(", ")]})]})]})})};var eF=e.i(132104);let{TextArea:eU}=ei.Input,eV=({inputMessage:e,isLoading:s,isDisabled:l,onInputChange:a,onSend:n,onKeyDown:o,onCancel:i})=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,t.jsx)(eU,{value:e,onChange:e=>a(e.target.value),onKeyDown:o,placeholder:"Type your message... (Shift+Enter for new line)",disabled:s,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,t.jsx)(r.Button,{onClick:n,disabled:l,className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,t.jsx)(eF.ArrowUpOutlined,{style:{fontSize:"14px"}})})]}),s&&(0,t.jsx)(r.Button,{onClick:i,className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",children:"Cancel"})]}),eH=({prompt:e,accessToken:l})=>{let{isLoading:a,messages:o,inputMessage:i,variables:c,variablesFilled:d,extractedVariables:m,allVariablesFilled:p,messagesEndRef:x,setInputMessage:u,handleSendMessage:h,handleCancelRequest:g,handleClearConversation:f,handleKeyDown:v,handleVariableChange:j}=((e,t)=>{let[r,l]=(0,s.useState)(!1),[a,o]=(0,s.useState)([]),[i,c]=(0,s.useState)(""),[d,m]=(0,s.useState)({}),[p,x]=(0,s.useState)(!1),[u,h]=(0,s.useState)(null),g=(0,s.useRef)(null),f=N(e),v=f.every(e=>d[e]&&""!==d[e].trim());(0,s.useEffect)(()=>{g.current&&setTimeout(()=>{g.current?.scrollIntoView({behavior:"smooth",block:"end"})},100)},[a]);let j=async()=>{let s;if(!t)return void W.default.fromBackend("Access token is required");if(f.length>0&&!v)return void W.default.fromBackend("Please fill in all template variables");if(!i.trim())return;!p&&f.length>0&&x(!0);let r={role:"user",content:i};o(e=>[...e,r]),c("");let m=new AbortController;h(m),l(!0);let u=Date.now();try{let r,l,c=w(e),p=(0,n.getProxyBaseUrl)(),x={dotprompt_content:c};0===a.length?x.prompt_variables=d:x.conversation_history=[...a.map(e=>({role:e.role,content:e.content})),{role:"user",content:i}];let h=await fetch(`${p}/prompts/test`,{method:"POST",headers:{[(0,n.getGlobalLitellmHeaderName)()]:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(x),signal:m.signal});if(!h.ok){let e=await h.text();throw Error(`HTTP error! status: ${h.status}, ${e}`)}if(!h.body)throw Error("No response body");let g=h.body.getReader(),f=new TextDecoder,v="";for(o(e=>[...e,{role:"assistant",content:""}]);;){let{done:e,value:t}=await g.read();if(e)break;for(let e of f.decode(t).split("\n"))if(e.startsWith("data: ")){let t=e.slice(6);if("[DONE]"===t)continue;try{let e=JSON.parse(t);!r&&e.model&&(r=e.model),e.usage&&(l=e.usage);let a=e.choices?.[0]?.delta?.content;a&&(s||(s=Date.now()-u),v+=a,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",content:v,model:r,timeToFirstToken:s},t}))}catch(e){console.error("Error parsing chunk:",e)}}}let j=Date.now()-u;o(e=>{let t=[...e];return t[t.length-1]={...t[t.length-1],totalLatency:j,usage:l},t})}catch(e){"AbortError"===e.name?console.log("Request was cancelled"):(console.error("Error testing prompt:",e),o(t=>{let s=t[t.length-1];return s&&"assistant"===s.role&&""===s.content?[...t.slice(0,-1),{role:"assistant",content:`Error: ${e.message}`}]:[...t,{role:"assistant",content:`Error: ${e.message}`}]}))}finally{l(!1),h(null)}};return{isLoading:r,messages:a,inputMessage:i,variables:d,variablesFilled:p,extractedVariables:f,allVariablesFilled:v,messagesEndRef:g,setInputMessage:c,handleSendMessage:j,handleCancelRequest:()=>{u&&(u.abort(),h(null),l(!1),W.default.info("Request cancelled"))},handleClearConversation:()=>{o([]),x(!1),W.default.success("Chat history cleared.")},handleKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),j())},handleVariableChange:(e,t)=>{m({...d,[e]:t})}}})(e,l);return(0,t.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[!d&&(0,t.jsx)(eP,{extractedVariables:m,variables:c,onVariableChange:j}),o.length>0&&(0,t.jsx)("div",{className:"p-3 border-b border-gray-200 bg-white flex justify-end",children:(0,t.jsx)(r.Button,{onClick:f,className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:e$.ClearOutlined,children:"Clear Chat"})}),(0,t.jsx)(eR,{messages:o,isLoading:a,hasVariables:m.length>0,messagesEndRef:x}),(0,t.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[(0,t.jsx)(eL,{extractedVariables:m,variables:c}),(0,t.jsx)(eV,{inputMessage:i,isLoading:a,isDisabled:a||!i.trim()||m.length>0&&!p,onInputChange:u,onSend:h,onKeyDown:v,onCancel:g})]})]})},eJ=({visible:e,promptName:s,isSaving:a,onNameChange:n,onPublish:o,onCancel:i})=>(0,t.jsx)(l.Modal,{title:"Publish Prompt",open:e,onCancel:i,footer:[(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"secondary",onClick:i,children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:o,loading:a,children:"Publish"})]},"footer")],children:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)(B.Text,{className:"mb-2",children:"Name"}),(0,t.jsx)(ei.Input,{value:s,onChange:e=>n(e.target.value),placeholder:"Enter prompt name",onPressEnter:o,autoFocus:!0}),(0,t.jsx)(B.Text,{className:"text-gray-500 text-xs mt-2",children:"Published prompts can be used in API calls and are versioned for easy tracking."})]})}),eW=({prompt:e})=>{let s=w(e);return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Generated .prompt file"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This is the dotprompt format that will be saved to the database"})]}),(0,t.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-900 font-mono whitespace-pre-wrap",children:s})})]})};var eK=e.i(608856),eq=e.i(573421),eG=e.i(981339);let{Text:eX}=e.i(898586).Typography,eY=({isOpen:e,onClose:r,accessToken:l,promptId:a,activeVersionId:o,onSelectVersion:i})=>{let[c,d]=(0,s.useState)([]),[m,p]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&l&&a&&x()},[e,l,a]);let x=async()=>{p(!0);try{let e=a.includes(".v")?a.split(".v")[0]:a,t=await (0,n.getPromptVersions)(l,e);d(t.prompts)}catch(e){console.error("Error fetching prompt versions:",e)}finally{p(!1)}},u=e=>{if(e.version)return`v${e.version}`;let t=e.litellm_params?.prompt_id||e.prompt_id;return t.includes(".v")?`v${t.split(".v")[1]}`:t.includes("_v")?`v${t.split("_v")[1]}`:"v1"};return(0,t.jsx)(eK.Drawer,{title:"Version History",placement:"right",onClose:r,open:e,width:400,mask:!1,maskClosable:!1,children:m?(0,t.jsx)(eG.Skeleton,{active:!0,paragraph:{rows:4}}):0===c.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No version history available."}):(0,t.jsx)(eq.List,{dataSource:c,renderItem:(e,s)=>{var r;let l=e.version||parseInt(u(e).replace("v","")),a=null;o&&(o.includes(".v")?a=parseInt(o.split(".v")[1]):o.includes("_v")&&(a=parseInt(o.split("_v")[1])));let n=a?l===a:0===s;return(0,t.jsxs)("div",{className:`mb-4 p-4 rounded-lg border cursor-pointer transition-all hover:shadow-md ${n?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,onClick:()=>i?.(e),children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ey.Tag,{className:"m-0",children:u(e)}),0===s&&(0,t.jsx)(ey.Tag,{color:"blue",className:"m-0",children:"Latest"})]}),n&&(0,t.jsx)(ey.Tag,{color:"green",className:"m-0",children:"Active"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(eX,{className:"text-sm text-gray-600 font-medium",children:(r=e.created_at)?new Date(r).toLocaleString():"-"}),(0,t.jsx)(eX,{type:"secondary",className:"text-xs",children:e.prompt_info?.prompt_type==="db"?"Saved to Database":"Config Prompt"})]})]},`${e.prompt_id}-v${e.version||l}`)}})})},eZ=({onClose:e,onSuccess:r,accessToken:l,initialPromptData:a})=>{let[o,i]=(0,s.useState)((()=>{if(a)try{return _(a)}catch(e){console.error("Error parsing existing prompt:",e),W.default.fromBackend("Failed to parse prompt data")}return{name:"New prompt",model:"gpt-4o",config:{temperature:1,max_tokens:1e3},tools:[],developerMessage:"",messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}],environment:"development"}})()),[c,d]=(0,s.useState)(!!a),[m,p]=(0,s.useState)(!1),[x,u]=(0,s.useState)((()=>{if(!a?.prompt_spec)return;let e=a.prompt_spec.prompt_id,t=a.prompt_spec.version||a.prompt_spec.litellm_params?.prompt_id;return"number"==typeof t?`${e}.v${t}`:"string"==typeof t&&(t.includes(".v")||t.includes("_v"))?t:e})()),[h,g]=(0,s.useState)(!1),[f,v]=(0,s.useState)(!1),[j,b]=(0,s.useState)(null),[y,N]=(0,s.useState)(!1),[C,k]=(0,s.useState)("pretty"),T=e=>{void 0!==e?b(e):b(null),g(!0)},S=async()=>{if(!l)return void W.default.fromBackend("Access token is required");if(!o.name||""===o.name.trim())return void W.default.fromBackend("Please enter a valid prompt name");N(!0);try{let t=o.name.replace(/[^a-zA-Z0-9_-]/g,"_").toLowerCase(),s=w(o),i={prompt_id:t,litellm_params:{prompt_integration:"dotprompt",prompt_id:t,dotprompt_content:s},prompt_info:{prompt_type:"db",environment:o.environment}};c&&a?.prompt_spec?.prompt_id?(await (0,n.updatePromptCall)(l,a.prompt_spec.prompt_id,i),W.default.success("Prompt updated successfully!")):(await (0,n.createPromptCall)(l,i),W.default.success("Prompt created successfully!")),r(),e()}catch(e){console.error("Error saving prompt:",e),W.default.fromBackend(c?"Failed to update prompt":"Failed to save prompt")}finally{N(!1),v(!1)}},$=x&&x.includes(".v")?`v${x.split(".v")[1]}`:null;return(0,t.jsxs)("div",{className:"flex h-full bg-white",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,t.jsx)(ex,{promptName:o.name,onNameChange:e=>i({...o,name:e}),onBack:e,onSave:()=>{o.name&&""!==o.name.trim()&&"New prompt"!==o.name?S():v(!0)},isSaving:y,editMode:c,onShowHistory:()=>p(!0),version:$,promptModel:o.model,promptVariables:(()=>{let e,t={},s=[o.developerMessage,...o.messages.map(e=>e.content)].join(" "),r=/\{\{(\w+)\}\}/g;for(;null!==(e=r.exec(s));){let s=e[1];t[s]||(t[s]=`example_${s}`)}return t})(),accessToken:l,environment:o.environment,onEnvironmentChange:async e=>{if(i({...o,environment:e}),c&&l&&a?.prompt_spec?.prompt_id)try{let t=await (0,n.getPromptInfo)(l,a.prompt_spec.prompt_id,e);if(t?.prompt_spec){let s=_(t);i({...s,environment:e});let r=t.prompt_spec.version||1;u(`${t.prompt_spec.prompt_id}.v${r}`)}}catch{}}}),(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsxs)("div",{className:"w-1/2 overflow-y-auto bg-white border-r border-gray-200 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"border-b border-gray-200 bg-white px-6 py-4 flex items-center gap-3",children:[(0,t.jsx)(eg,{model:o.model,temperature:o.config.temperature,maxTokens:o.config.max_tokens,accessToken:l,onModelChange:e=>i({...o,model:e}),onTemperatureChange:e=>i({...o,config:{...o.config,temperature:e}}),onMaxTokensChange:e=>i({...o,config:{...o.config,max_tokens:e}})}),(0,t.jsxs)("div",{className:"ml-auto inline-flex items-center bg-gray-200 rounded-full p-0.5",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"pretty"===C?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("pretty"),children:"PRETTY"}),(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"dotprompt"===C?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("dotprompt"),children:"DOTPROMPT"})]})]}),"pretty"===C?(0,t.jsxs)("div",{className:"p-6 space-y-4 pb-20",children:[(0,t.jsx)(ej,{tools:o.tools,onAddTool:()=>T(),onEditTool:T,onRemoveTool:e=>{i({...o,tools:o.tools.filter((t,s)=>s!==e)})}}),(0,t.jsx)(e_,{value:o.developerMessage,onChange:e=>i({...o,developerMessage:e})}),(0,t.jsx)(eS,{messages:o.messages,onAddMessage:()=>{i({...o,messages:[...o.messages,{role:"user",content:""}]})},onUpdateMessage:(e,t,s)=>{let r=[...o.messages];r[e][t]=s,i({...o,messages:r})},onRemoveMessage:e=>{o.messages.length>1&&i({...o,messages:o.messages.filter((t,s)=>s!==e)})},onMoveMessage:(e,t)=>{let s=[...o.messages],[r]=s.splice(e,1);s.splice(t,0,r),i({...o,messages:s})}})]}):(0,t.jsx)(eW,{prompt:o})]}),(0,t.jsx)("div",{className:"w-1/2 flex-shrink-0",children:(0,t.jsx)(eH,{prompt:o,accessToken:l})})]})]}),(0,t.jsx)(eJ,{visible:f,promptName:o.name,isSaving:y,onNameChange:e=>i({...o,name:e}),onPublish:S,onCancel:()=>v(!1)}),h&&(0,t.jsx)(eo,{visible:h,initialJson:null!==j?o.tools[j].json:"",onSave:e=>{try{let t=JSON.parse(e),s={name:t.function?.name||"Unnamed Tool",description:t.function?.description||"",json:e};if(null!==j){let e=[...o.tools];e[j]=s,i({...o,tools:e})}else i({...o,tools:[...o.tools,s]});g(!1),b(null)}catch(e){W.default.fromBackend("Invalid JSON format")}},onClose:()=>{g(!1),b(null)}}),(0,t.jsx)(eY,{isOpen:m,onClose:()=>p(!1),accessToken:l,promptId:a?.prompt_spec?.prompt_id||o.name,activeVersionId:x,onSelectVersion:e=>{try{let t=_({prompt_spec:e});i(t);let s=e.version||1;u(`${e.prompt_id}.v${s}`)}catch(e){console.error("Error loading version:",e),W.default.fromBackend("Failed to load prompt version")}}})]})};var eQ=e.i(708347);e.s(["default",0,({accessToken:e,userRole:o})=>{let[i,c]=(0,s.useState)([]),[d,m]=(0,s.useState)(!1),[p,x]=(0,s.useState)(void 0),[u,h]=(0,s.useState)(null),[g,f]=(0,s.useState)(!1),[v,j]=(0,s.useState)(!1),[b,y]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[C,_]=(0,s.useState)(null);o&&(0,eQ.isAdminRole)(o);let k=!!o&&(0,eQ.isProxyAdminRole)(o),T=async()=>{if(e){m(!0);try{let t=await (0,n.getPromptsList)(e,p);console.log(`prompts: ${JSON.stringify(t)}`),c(t.prompts)}catch(e){console.error("Error fetching prompts:",e)}finally{m(!1)}}};(0,s.useEffect)(()=>{T()},[e,p]);let S=()=>{T(),j(!1),y(null),h(null)},P=async()=>{if(C&&e){w(!0);try{await (0,n.deletePromptCall)(e,C.id),W.default.success(`Prompt "${C.name}" deleted successfully`),T()}catch(e){console.error("Error deleting prompt:",e),W.default.fromBackend("Failed to delete prompt")}finally{w(!1),_(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[v?(0,t.jsx)(eZ,{onClose:()=>{j(!1),y(null)},onSuccess:S,accessToken:e,initialPromptData:b}):u?(0,t.jsx)(Z,{promptId:u,onClose:()=>h(null),accessToken:e,isAdmin:k,onDelete:T,onEdit:e=>{y(e),j(!0)}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)("div",{className:"flex gap-2",children:k&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{onClick:()=>{u&&h(null),y(null),j(!0)},disabled:!e,children:"+ Add New Prompt"}),(0,t.jsx)(r.Button,{onClick:()=>{u&&h(null),f(!0)},disabled:!e,variant:"secondary",children:"Upload .prompt File"})]})}),(0,t.jsx)(a.Select,{placeholder:"All Environments",allowClear:!0,value:p,onChange:e=>x(e),style:{width:180},options:[{label:"Development",value:"development"},{label:"Staging",value:"staging"},{label:"Production",value:"production"}]})]}),(0,t.jsx)($,{promptsList:i,isLoading:d,onPromptClick:e=>{h(e)},onDeleteClick:(e,t)=>{_({id:e,name:t})},accessToken:e,isAdmin:k})]}),(0,t.jsx)(ea,{visible:g,onClose:()=>{f(!1)},accessToken:e,onSuccess:S}),C&&(0,t.jsxs)(l.Modal,{title:"Delete Prompt",open:null!==C,onOk:P,onCancel:()=>{_(null)},confirmLoading:N,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",C.name," ?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],191403)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/c7110a3f717e0317.js b/litellm/proxy/_experimental/out/_next/static/chunks/c7110a3f717e0317.js new file mode 100644 index 0000000000..bcaef89ef9 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/c7110a3f717e0317.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,91979,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ReloadOutlined",0,s],91979)},969550,e=>{"use strict";var t=e.i(843476),l=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var r=e.i(464571),s=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:d,initialValues:m={},buttonLabel:c="Filters"})=>{let[u,g]=(0,l.useState)(!1),[h,p]=(0,l.useState)(m),[x,b]=(0,l.useState)({}),[_,f]=(0,l.useState)({}),[y,j]=(0,l.useState)({}),[v,w]=(0,l.useState)({}),C=(0,l.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){f(e=>({...e,[t.name]:!0}));try{let l=await t.searchFn(e);b(e=>({...e,[t.name]:l}))}catch(e){console.error("Error searching:",e),b(e=>({...e,[t.name]:[]}))}finally{f(e=>({...e,[t.name]:!1}))}}},300),[]),S=(0,l.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!v[e.name]){f(t=>({...t,[e.name]:!0})),w(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");b(l=>({...l,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),b(t=>({...t,[e.name]:[]}))}finally{f(t=>({...t,[e.name]:!1}))}}},[v]);(0,l.useEffect)(()=>{u&&e.forEach(e=>{e.isSearchable&&!v[e.name]&&S(e)})},[u,e,S,v]);let T=(e,t)=>{let l={...h,[e]:t};p(l),o(l)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(r.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>g(!u),className:"flex items-center gap-2",children:c}),(0,t.jsx)(r.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),d()},children:"Reset Filters"})]}),u&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model","Public model / search tool"].map(l=>{let a,r=e.find(e=>e.label===l||e.name===l);return r?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:r.label||r.name}),r.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${r.label||r.name}...`,value:h[r.name]||void 0,onChange:e=>T(r.name,e),onOpenChange:e=>{e&&r.isSearchable&&!v[r.name]&&S(r)},onSearch:e=>{j(t=>({...t,[r.name]:e})),r.searchFn&&C(e,r)},filterOption:!1,loading:_[r.name],options:x[r.name]||[],allowClear:!0,notFoundContent:_[r.name]?"Loading...":"No results found"}):r.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${r.label||r.name}...`,value:h[r.name]||void 0,onChange:e=>T(r.name,e),allowClear:!0,children:r.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):r.customComponent?(a=r.customComponent,(0,t.jsx)(a,{value:h[r.name]||void 0,onChange:e=>T(r.name,e??""),placeholder:`Select ${r.label||r.name}...`,allFilters:h})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${r.label||r.name}...`,value:h[r.name]||"",onChange:e=>T(r.name,e.target.value),allowClear:!0})]},r.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let l=(e,t,l,a)=>{for(let r of e){let e=r?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=r?.organization_id??r?.org_id;s&&"string"==typeof s&&l.add(s.trim());let i=r?.user_id;if(i&&"string"==typeof i){let e=r?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let r=new Set,s=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],d=n?.total_pages??1;l(o,r,s,i);let m=Math.min(d,10)-1;if(m>0){let n=Array.from({length:m},(l,r)=>(0,t.keyListCall)(e,null,a,null,null,null,r+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&l(e.value?.keys||[],r,s,i)}return{keyAliases:Array.from(r).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},r=async(e,l)=>{if(!e)return[];try{let a=[],r=1,s=!0;for(;s;){let i=await (0,t.teamListCall)(e,l||null,null);a=[...a,...i],r{if(!e)return[];try{let l=[],a=1,r=!0;for(;r;){let s=await (0,t.organizationListCall)(e);l=[...l,...s],a{"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:"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"}))});e.s(["ClipboardCopyIcon",0,l],551332)},122577,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:"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,l],122577)},902555,e=>{"use strict";var t=e.i(843476),l=e.i(591935),a=e.i(122577),r=e.i(278587),s=e.i(68155),i=e.i(360820),n=e.i(871943),o=e.i(434626),d=e.i(551332),m=e.i(592968),c=e.i(115504),u=e.i(752978);function g({icon:e,onClick:l,className:a,disabled:r,dataTestId:s}){return r?(0,t.jsx)(u.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":s}):(0,t.jsx)(u.Icon,{icon:e,size:"sm",onClick:l,className:(0,c.cx)("cursor-pointer",a),"data-testid":s})}let h={Edit:{icon:l.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:r.RefreshIcon,className:"hover:text-green-600"},Up:{icon:i.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:n.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function p({onClick:e,tooltipText:l,disabled:a=!1,disabledTooltipText:r,dataTestId:s,variant:i}){let{icon:n,className:o}=h[i];return(0,t.jsx)(m.Tooltip,{title:a?r:l,children:(0,t.jsx)("span",{children:(0,t.jsx)(g,{icon:n,onClick:e,className:o,disabled:a,dataTestId:s})})})}e.s(["default",()=>p],902555)},434626,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 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,l],434626)},278587,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:"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,l],278587)},207670,e=>{"use strict";function t(){for(var e,t,l=0,a="",r=arguments.length;lt,"default",0,t])},728889,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(829087),r=e.i(480731),s=e.i(444755),i=e.i(673706),n=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"}},m={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"),u=l.default.forwardRef((e,u)=>{let{icon:g,variant:h="simple",tooltip:p,size:x=r.Sizes.SM,color:b,className:_}=e,f=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),y=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.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,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.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,n.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.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,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.getColorClassNames)(t,n.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,b),{tooltipProps:j,getReferenceProps:v}=(0,a.useTooltip)();return l.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([u,j.refs.setReference]),className:(0,s.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",y.bgColor,y.textColor,y.borderColor,y.ringColor,m[h].rounded,m[h].border,m[h].shadow,m[h].ring,o[x].paddingX,o[x].paddingY,_)},v,f),l.default.createElement(a.default,Object.assign({text:p},j)),l.default.createElement(g,{className:(0,s.tremorTwMerge)(c("icon"),"shrink-0",d[x].height,d[x].width)}))});u.displayName="Icon",e.s(["default",()=>u],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 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:"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,l],591935)},738014,e=>{"use strict";var t=e.i(135214),l=e.i(764205),a=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:s}=(0,t.default)();return(0,a.useQuery)({queryKey:r.detail(s),queryFn:async()=>await (0,l.userGetInfoV2)(e),enabled:!!(e&&s)})}])},625901,e=>{"use strict";var t=e.i(266027),l=e.i(621482),a=e.i(243652),r=e.i(764205),s=e.i(135214);let i=(0,a.createQueryKeys)("models"),n=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let d=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:l,userRole:a}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,r.modelAvailableCall)(e,l,a,!0,null,!0,!1,"expand"),enabled:!!(e&&l&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:i,userRole:n}=(0,s.default)();return(0,l.useInfiniteQuery)({queryKey:d.list({filters:{...i&&{userId:i},...n&&{userRole:n},size:e,...t&&{search:t}}}),queryFn:async({pageParam:l})=>await (0,r.modelInfoCall)(a,i,n,l,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,r.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,l=50,a,n,o,d,m)=>{let{accessToken:c,userId:u,userRole:g}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({filters:{...u&&{userId:u},...g&&{userRole:g},page:e,size:l,...a&&{search:a},...n&&{modelId:n},...o&&{teamId:o},...d&&{sortBy:d},...m&&{sortOrder:m}}}),queryFn:async()=>await (0,r.modelInfoCall)(c,u,g,e,l,a,n,o,d,m),enabled:!!(c&&u&&g)})}])},907308,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(212931),r=e.i(808613),s=e.i(464571),i=e.i(199133),n=e.i(592968),o=e.i(213205),d=e.i(374009),m=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:c,onSubmit:u,accessToken:g,title:h="Add Team Member",roles:p=[{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[_]=r.Form.useForm(),[f,y]=(0,l.useState)([]),[j,v]=(0,l.useState)(!1),[w,C]=(0,l.useState)("user_email"),[S,T]=(0,l.useState)(!1),N=async(e,t)=>{if(!e)return void y([]);v(!0);try{let l=new URLSearchParams;if(l.append(t,e),b&&l.append("team_id",b),null==g)return;let a=(await (0,m.userFilterUICall)(g,l)).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{v(!1)}},k=(0,l.useCallback)((0,d.default)((e,t)=>N(e,t),300),[]),I=(e,t)=>{C(t),k(e,t)},M=(e,t)=>{let l=t.user;_.setFieldsValue({user_email:l.user_email,user_id:l.user_id,role:_.getFieldValue("role")})},F=async e=>{T(!0);try{await u(e)}finally{T(!1)}};return(0,t.jsx)(a.Modal,{title:h,open:e,onCancel:()=>{_.resetFields(),y([]),c()},footer:null,width:800,maskClosable:!S,children:(0,t.jsxs)(r.Form,{form:_,onFinish:F,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:x},children:[(0,t.jsx)(r.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=>I(e,"user_email"),onSelect:(e,t)=>M(e,t),options:"user_email"===w?f:[],loading:j,allowClear:!0,"data-testid":"member-email-search"})}),(0,t.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,t.jsx)(r.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=>I(e,"user_id"),onSelect:(e,t)=>M(e,t),options:"user_id"===w?f:[],loading:j,allowClear:!0})}),(0,t.jsx)(r.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(i.Select,{defaultValue:x,children:p.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:(0,t.jsxs)(n.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:S,children:S?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var t=e.i(843476),l=e.i(625901),a=e.i(109799),r=e.i(785242),s=e.i(738014),i=e.i(199133),n=e.i(981339),o=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},m={label:"No Default Models",value:"no-default-models"},c=[d,m],u={user:({allProxyModels:e,userModels:t,options:l})=>t&&l?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:l})=>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(["ModelSelect",0,e=>{let{teamID:g,organizationID:h,options:p,context:x,dataTestId:b,value:_=[],onChange:f,style:y}=e,{includeUserModels:j,showAllTeamModelsOption:v,showAllProxyModelsOverride:w,includeSpecialOptions:C}=p||{},{data:S,isLoading:T}=(0,l.useAllProxyModels)(),{data:N,isLoading:k}=(0,r.useTeam)(g),{data:I,isLoading:M}=(0,a.useOrganization)(h),{data:F,isLoading:A}=(0,s.useCurrentUser)(),O=e=>c.some(t=>t.value===e),z=_.some(O),P=I?.models.includes(d.value)||I?.models.length===0;if(T||k||M||A)return(0,t.jsx)(n.Skeleton.Input,{active:!0,block:!0});let{wildcard:L,regular:D}=(e=>{let t=[],l=[];for(let a of e)a.endsWith("/*")?t.push(a):l.push(a);return{wildcard:t,regular:l}})(((e,t,l)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return a;let r=u[t.context];return r?r({allProxyModels:a,...l,options:t.options}):[]})(S?.data??[],e,{selectedTeam:N,selectedOrganization:I,userModels:F?.models}));return(0,t.jsx)(i.Select,{"data-testid":b,value:_,onChange:e=>{let t=e.filter(O);f(t.length>0?[t[t.length-1]]:e)},style:y,options:[C?{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...w||P&&C||"global"===x?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:_.length>0&&_.some(e=>O(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:m.value,disabled:_.length>0&&_.some(e=>O(e)&&e!==m.value),key:m.value}]}:[],...L.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:L.map(e=>{let l=e.replace("/*",""),a=l.charAt(0).toUpperCase()+l.slice(1);return{label:(0,t.jsx)("span",{children:`All ${a} models`}),value:e,disabled:z}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:D.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:z}))}],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)},276173,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(779241),r=e.i(464571),s=e.i(808613),i=e.i(212931),n=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:m,onSubmit:c,initialData:u,mode:g,config:h})=>{let p,[x]=s.Form.useForm(),[b,_]=(0,o.useState)(!1);console.log("Initial Data:",u),(0,o.useEffect)(()=>{if(e)if("edit"===g&&u){let e={...u,role:u.role||h.defaultRole,max_budget_in_team:u.max_budget_in_team||null,tpm_limit:u.tpm_limit||null,rpm_limit:u.rpm_limit||null,allowed_models:u.allowed_models||[]};console.log("Setting form values:",e),x.setFieldsValue(e)}else x.resetFields(),x.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,u,g,x,h.defaultRole,h.roleOptions]);let f=async e=>{try{_(!0);let t=Object.entries(e).reduce((e,[t,l])=>{if("string"==typeof l){let a=l.trim();return""===a&&("max_budget_in_team"===t||"tpm_limit"===t||"rpm_limit"===t)?{...e,[t]:null}:{...e,[t]:a}}return{...e,[t]:l}},{});console.log("Submitting form data:",t),await Promise.resolve(c(t)),x.resetFields()}catch(e){console.error("Form submission error:",e)}finally{_(!1)}};return(0,t.jsx)(i.Modal,{title:h.title||("add"===g?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:m,children:(0,t.jsxs)(s.Form,{form:x,onFinish:f,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.showEmail&&(0,t.jsx)(s.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,t.jsx)(a.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(l.Text,{children:"OR"})}),h.showUserId&&(0,t.jsx)(s.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(a.TextInput,{placeholder:"user_123"})}),(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Role"}),"edit"===g&&u&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(p=u.role,h.roleOptions.find(e=>e.value===p)?.label||p),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(n.Select,{children:"edit"===g&&u?[...h.roleOptions.filter(e=>e.value===u.role),...h.roleOptions.filter(e=>e.value!==u.role)].map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))})}),h.additionalFields?.map(e=>(0,t.jsx)(s.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)(a.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(d.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)(n.Select,{children:e.options?.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))});case"multi-select":return(0,t.jsx)(n.Select,{mode:"multiple",placeholder:e.placeholder||"Select options",options:e.options,allowClear:!0});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(r.Button,{onClick:m,className:"mr-2",disabled:b,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"default",htmlType:"submit",loading:b,children:"add"===g?b?"Adding...":"Add Member":b?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var t=e.i(843476),l=e.i(100486),a=e.i(827252),r=e.i(213205),s=e.i(771674),i=e.i(464571),n=e.i(770914),o=e.i(291542),d=e.i(262218),m=e.i(592968),c=e.i(898586),u=e.i(902555);let{Text:g}=c.Typography;function h({members:e,canEdit:c,onEdit:h,onDelete:p,onAddMember:x,roleColumnTitle:b="Role",roleTooltip:_,extraColumns:f=[],showDeleteForMember:y,emptyText:j}){let v=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,t.jsx)(g,{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)(g,{children:e||"-"})},{title:_?(0,t.jsxs)(n.Space,{direction:"horizontal",children:[b,(0,t.jsx)(m.Tooltip,{title:_,children:(0,t.jsx)(a.InfoCircleOutlined,{})})]}):b,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(n.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(l.CrownOutlined,{}):(0,t.jsx)(s.UserOutlined,{}),(0,t.jsx)(g,{style:{textTransform:"capitalize"},children:e||"-"})]})},...f,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,l)=>c?(0,t.jsxs)(n.Space,{children:[(0,t.jsx)(u.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(l)}),(!y||y(l))&&(0,t.jsx)(u.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>p(l)})]}):null}];return(0,t.jsxs)(n.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:v,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:j?{emptyText:j}:void 0}),x&&c&&(0,t.jsx)(i.Button,{icon:(0,t.jsx)(r.UserAddOutlined,{}),type:"primary",onClick:x,children:"Add Member"})]})}e.s(["default",()=>h])},56567,838932,471145,e=>{"use strict";var t=e.i(843476),l=e.i(135214),a=e.i(109799),r=e.i(912598),s=e.i(907308),i=e.i(764205),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,i.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),x=e.i(564897),b=e.i(646563),_=e.i(987432),f=e.i(530212),y=e.i(677667),j=e.i(130643),v=e.i(898667),w=e.i(389083),C=e.i(304967),S=e.i(350967),T=e.i(599724),N=e.i(779241),k=e.i(629569),I=e.i(464571),M=e.i(808613),F=e.i(311451),A=e.i(28651),O=e.i(199133),z=e.i(770914),P=e.i(790848),L=e.i(653496),D=e.i(262218),R=e.i(592968),E=e.i(888259),B=e.i(678784),U=e.i(118366),V=e.i(271645),K=e.i(9314),$=e.i(552130),G=e.i(127952);function W({className:e,value:l,onChange:a}){return(0,t.jsxs)(O.Select,{className:e,value:l,onChange:a,children:[(0,t.jsx)(O.Select.Option,{value:"24h",children:"Daily"}),(0,t.jsx)(O.Select.Option,{value:"7d",children:"Weekly"}),(0,t.jsx)(O.Select.Option,{value:"30d",children:"Monthly"})]})}var q=e.i(844565),H=e.i(355619);let Q=function({globalGuardrailNames:e,teamGuardrails:l=[],optedOutGlobalGuardrails:a=[],killSwitchOn:r=!1,variant:s="card",className:i=""}){let n=new Set(a),o=Array.from(e).filter(e=>!n.has(e)),d=l.filter(t=>!e.has(t)),m=r||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"]}),r?(0,t.jsx)(D.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)(D.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)(D.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"===s?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${i}`,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:`${i}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Guardrails Settings"}),m]})};var Y=e.i(643449),J=e.i(75921),X=e.i(390605),Z=e.i(162386),ee=e.i(727749),et=e.i(384767),el=e.i(435451),ea=e.i(916940);let er=({onChange:e,value:l,className:a,accessToken:r,placeholder:s="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(r){c(!0);try{let e=await (0,i.fetchSearchTools)(r),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)}}})()},[r]),(0,t.jsx)(O.Select,{mode:"multiple",allowClear:!0,showSearch:!0,optionFilterProp:"label",placeholder:s,onChange:e,value:l,loading:m,className:a,options:o,style:{width:"100%"},disabled:n})};e.s(["default",0,er],471145);var es=e.i(183588),ei=e.i(460285),en=e.i(276173),eo=e.i(91979),ed=e.i(269200),em=e.i(942232),ec=e.i(977572),eu=e.i(427612),eg=e.i(64848),eh=e.i(496020),ep=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","/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)"},e_=({teamId:e,accessToken:l,canEditTeam:a})=>{let[r,s]=(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,i.getTeamPermissionsCall)(l,e),a=t.all_available_permissions||[];s(a);let r=t.team_member_permissions||[];o(r),h(!1)}catch(e){ee.default.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{m(!1)}};(0,V.useEffect)(()=>{p()},[e,l]);let x=async()=>{try{if(!l)return;u(!0),await (0,i.teamPermissionsUpdateCall)(l,e,n),ee.default.success("Permissions updated successfully"),h(!1)}catch(e){ee.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 b=r.length>0;return(0,t.jsxs)(C.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)(I.Button,{icon:(0,t.jsx)(eo.ReloadOutlined,{}),onClick:()=>{p()},children:"Reset"}),(0,t.jsx)(I.Button,{onClick:x,loading:c,type:"primary",icon:(0,t.jsx)(_.SaveOutlined,{}),children:"Save Changes"})]})]}),(0,t.jsx)(T.Text,{className:"mb-6 text-gray-600",children:"Control what team members can do when they are not team admins."}),b?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(ed.Table,{className:" min-w-full",children:[(0,t.jsx)(eu.TableHead,{children:(0,t.jsxs)(eh.TableRow,{children:[(0,t.jsx)(eg.TableHeaderCell,{children:"Method"}),(0,t.jsx)(eg.TableHeaderCell,{children:"Endpoint"}),(0,t.jsx)(eg.TableHeaderCell,{children:"Description"}),(0,t.jsx)(eg.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)(em.TableBody,{children:r.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)(eh.TableRow,{className:"hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(ec.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)(ec.TableCell,{children:(0,t.jsx)("span",{className:"font-mono text-sm text-gray-800",children:l.endpoint})}),(0,t.jsx)(ec.TableCell,{className:"text-gray-700",children:l.description}),(0,t.jsx)(ec.TableCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,t.jsx)(ep.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 ef=e.i(822315);function ey(e){if(!e)return null;let t=(0,ef.default)(e);return t.isValid()?t.format("MMM D, YYYY"):null}var ej=e.i(175712),ev=e.i(178654),ew=e.i(621192),eC=e.i(898586);let eS=async(e,t)=>{let l=(0,i.getProxyBaseUrl)(),a=l?`${l}/team/${encodeURIComponent(t)}/members/me`:`/team/${encodeURIComponent(t)}/members/me`,r=await fetch(a,{method:"GET",headers:{[(0,i.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(404===r.status)return null;if(!r.ok){let e=await r.json().catch(()=>({}));throw Error((0,i.deriveErrorMessage)(e))}return await r.json()},eT=(e,l)=>(0,t.jsxs)(z.Space,{size:4,children:[(0,t.jsx)(eC.Typography.Text,{type:"secondary",children:e}),(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(p.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),eN=(e,t=4)=>null==e?"0":(0,m.formatNumberWithCommas)(e,t),ek=e=>null==e?"Unlimited":(0,m.formatNumberWithCommas)(e,0);function eI({teamId:e}){let{data:a,isLoading:r,error:s}=(e=>{let{accessToken:t}=(0,l.default)();return(0,n.useQuery)({queryKey:["team",e,"members","me"],queryFn:()=>eS(t,e),enabled:!!(t&&e)})})(e);if(r)return(0,t.jsx)(ej.Card,{children:(0,t.jsx)(eC.Typography.Text,{type:"secondary",children:"Loading your membership info…"})});if(s)return(0,t.jsx)(ej.Card,{children:(0,t.jsx)(eC.Typography.Text,{type:"danger",children:s instanceof Error?s.message:"Failed to load your membership info for this team."})});if(!a)return(0,t.jsx)(ej.Card,{children:(0,t.jsx)(eC.Typography.Text,{type:"secondary",children:"No membership info available for the current user in this team."})});let i=a.litellm_budget_table??null,o=i?.max_budget??null,d=a.spend??0,m=a.total_spend??0,c=i?.tpm_limit??null,u=i?.rpm_limit??null,g=ey(i?.budget_reset_at),h=i?.allowed_models??null;return(0,t.jsxs)(z.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(ej.Card,{children:(0,t.jsxs)(ew.Row,{gutter:[24,16],children:[(0,t.jsxs)(ev.Col,{xs:24,sm:12,md:8,children:[(0,t.jsx)(eC.Typography.Text,{type:"secondary",children:"User"}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(eC.Typography.Text,{strong:!0,children:a.user_email||a.user_id})}),(0,t.jsx)(eC.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)(eC.Typography.Text,{type:"secondary",children:"Team Role"}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(D.Tag,{color:"admin"===a.role?"blue":"default",children:a.role||"user"})})]})]})}),(0,t.jsxs)(ew.Row,{gutter:[16,16],children:[(0,t.jsx)(ev.Col,{xs:24,md:12,children:(0,t.jsxs)(ej.Card,{children:[eT("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)(eC.Typography.Title,{level:3,style:{margin:0},children:["$",eN(d,4)]}),(0,t.jsxs)(eC.Typography.Text,{type:"secondary",children:["of ",null===o?"Unlimited":`$${eN(o,4)}`]})]}),g&&(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsxs)(eC.Typography.Text,{type:"secondary",children:["Resets ",g]})})]})}),(0,t.jsx)(ev.Col,{xs:24,md:12,children:(0,t.jsxs)(ej.Card,{children:[eT("Rate Limits","Your per-member rate limits within this team."),(0,t.jsxs)("div",{style:{marginTop:8},children:[(0,t.jsxs)(eC.Typography.Text,{children:["TPM: ",ek(c)]}),(0,t.jsx)("br",{}),(0,t.jsxs)(eC.Typography.Text,{children:["RPM: ",ek(u)]})]})]})}),(0,t.jsx)(ev.Col,{xs:24,md:12,children:(0,t.jsxs)(ej.Card,{children:[eT("Total Spend (USD)","Cumulative spend across all budget cycles within this team."),(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsxs)(eC.Typography.Title,{level:4,style:{margin:0},children:["$",eN(m,4)]})})]})}),(0,t.jsx)(ev.Col,{xs:24,md:12,children:(0,t.jsxs)(ej.Card,{children:[eT("Model Scope","Models you can access within this team."),(0,t.jsx)("div",{style:{marginTop:8},children:h&&h.length>0?(0,t.jsx)(z.Space,{wrap:!0,children:h.map(e=>(0,t.jsx)(D.Tag,{children:e},e))}):(0,t.jsx)(eC.Typography.Text,{children:"All Team Models"})})]})})]})]})}let eM="overview",eF="my-user",eA="virtual-keys",eO="members",ez="member-permissions",eP="settings",eL={[eM]:"Overview",[eF]:"My User",[eA]:"Virtual Keys",[eO]:"Members",[ez]:"Member Permissions",[eP]:"Settings"};var eD=e.i(292639),eR=e.i(294612);function eE({teamData:e,canEditTeam:a,handleMemberDelete:r,setSelectedEditMember:s,setIsEditMemberModalVisible:i,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,eD.useUISettings)(),{userId:c,userRole:g}=(0,l.default)(),h=!!d?.values?.disable_team_admin_delete_team_user,x=(0,u.isUserTeamAdminForSingleTeam)(e.team_info.members_with_roles,c||""),b=(0,u.isProxyAdminRole)(g||""),_=[{title:(0,t.jsxs)(z.Space,{direction:"horizontal",children:["Model Scope",(0,t.jsx)(R.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 r=(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(!r)return(0,t.jsx)(eC.Typography.Text,{type:"secondary",children:"(all team models)"});let s=r.slice(0,2),i=r.length-s.length;return(0,t.jsxs)(z.Space,{wrap:!0,children:[s.map(e=>(0,t.jsx)(eC.Typography.Text,{code:!0,style:{fontSize:"12px"},children:e},e)),i>0&&(0,t.jsx)(R.Tooltip,{title:r.slice(2).join(", "),children:(0,t.jsxs)(eC.Typography.Text,{type:"secondary",children:["+",i," more"]})})]})}},{title:(0,t.jsxs)(z.Space,{direction:"horizontal",children:["Current Cycle Spend (USD)",(0,t.jsx)(R.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.jsxs)(eC.Typography.Text,{children:["$",(0,m.formatNumberWithCommas)((t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.spend??0})(a.user_id),4)]})},{title:(0,t.jsxs)(z.Space,{direction:"horizontal",children:["Total Spend (USD)",(0,t.jsx)(R.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.jsxs)(eC.Typography.Text,{children:["$",(0,m.formatNumberWithCommas)((t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.total_spend??0})(a.user_id),4)]})},{title:"Team Member Budget (USD)",key:"budget",render:(l,a)=>{let r=(t=>{if(!t)return null;let l=e.team_memberships.find(e=>e.user_id===t),a=l?.litellm_budget_table?.max_budget;return null==a?null:o(a)})(a.user_id);return(0,t.jsx)(eC.Typography.Text,{children:r?`$${(0,m.formatNumberWithCommas)(Number(r),4)}`:"No Limit"})}},{title:"Budget Reset",key:"budget_reset",render:(l,a)=>{let r=(t=>{if(!t)return null;let l=e.team_memberships.find(e=>e.user_id===t);return ey(l?.litellm_budget_table?.budget_reset_at)})(a.user_id);return r?(0,t.jsx)(eC.Typography.Text,{children:r}):(0,t.jsx)(eC.Typography.Text,{type:"secondary",children:"—"})}},{title:(0,t.jsxs)(z.Space,{direction:"horizontal",children:["Team Member Rate Limits",(0,t.jsx)(R.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)(eC.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,r=l?.litellm_budget_table?.tpm_limit,s=[a?`${o(a)} RPM`:null,r?`${o(r)} TPM`:null].filter(Boolean);return s.length>0?s.join(" / "):"No Limits"})(a.user_id)})}];return(0,t.jsx)(eR.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);s({...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,allowed_models:l?.litellm_budget_table?.allowed_models||[]}),i(!0)},onDelete:r,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:_,showDeleteForMember:()=>b||a&&!x||x&&!h})}var eB=e.i(207082),eU=e.i(871943),eV=e.i(502547),eK=e.i(360820),e$=e.i(94629),eG=e.i(152990),eW=e.i(682830),eq=e.i(994388),eH=e.i(752978),eQ=e.i(282786),eY=e.i(981339),eJ=e.i(969550),eX=e.i(20147),eZ=e.i(633627);function e0({teamId:e,teamAlias:a,organization:r}){let{accessToken:s}=(0,l.default)(),[i,o]=(0,V.useState)(null),[d,c]=(0,V.useState)([{id:"created_at",desc:!0}]),[u,g]=(0,V.useState)({pageIndex:0,pageSize:50}),[h,x]=(0,V.useState)({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),b=d.length>0?d[0].id:"created_at",_=d.length>0?d[0].desc?"desc":"asc":"desc",f=u.pageIndex,y=u.pageSize,{data:j,isPending:v,isFetching:C,refetch:S}=(0,eB.useKeys)(f+1,y,{teamID:e,organizationID:h["Organization ID"]?.trim()||void 0,selectedKeyAlias:h["Key Alias"]?.trim()||void 0,userID:h["User ID"]?.trim()||void 0,sortBy:b||void 0,sortOrder:_||void 0,expand:"user"}),N=(0,V.useMemo)(()=>{let e=j?.keys||[],t=r?.organization_id;return t?e.map(e=>({...e,organization_id:(e.organization_id??e.org_id)||t})):e},[j?.keys,r?.organization_id]),k=j?.total_pages??0,[I,M]=(0,V.useState)({}),F=(0,V.useMemo)(()=>({team_id:e,team_alias:a||e,models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:r?.organization_id||"",created_at:"",keys:[],members_with_roles:[],spend:0}),[e,a,r]),A=(0,n.useQuery)({queryKey:["teamFilterOptions",e,s],queryFn:async()=>(0,eZ.fetchTeamFilterOptions)(s,e),enabled:!!s&&!!e,staleTime:3e4}).data||{keyAliases:[],organizationIds:[],userIds:[]},O=(0,V.useCallback)(()=>{S?.()},[S]);(0,V.useEffect)(()=>(window.addEventListener("storage",O),()=>window.removeEventListener("storage",O)),[O]);let z=(0,V.useCallback)((e,t=!1)=>{x(t=>({...t,"Organization ID":e["Organization ID"]??t["Organization ID"],"Key Alias":e["Key Alias"]??t["Key Alias"],"User ID":e["User ID"]??t["User ID"],"Sort By":e["Sort By"]??t["Sort By"]??"created_at","Sort Order":e["Sort Order"]??t["Sort Order"]??"desc"})),t||g(e=>({...e,pageIndex:0}))},[]),P=(0,V.useCallback)(()=>{x({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),g(e=>({...e,pageIndex:0}))},[]),L=(0,V.useMemo)(()=>[{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>{let{organizationIds:t}=A;if(!t.length)return[];let l=e.toLowerCase();return(l?t.filter(e=>e.toLowerCase().includes(l)):t).map(e=>({label:e,value:e}))}},{name:"Key Alias",label:"Key Alias",isSearchable:!0,searchFn:async e=>{let{keyAliases:t}=A,l=e.toLowerCase();return(l?t.filter(e=>e.toLowerCase().includes(l)):t).map(e=>({label:e,value:e}))}},{name:"User ID",label:"User ID",isSearchable:!0,searchFn:async e=>{let{userIds:t}=A,l=e.toLowerCase();return(l?t.filter(e=>e.id.toLowerCase().includes(l)||e.email.toLowerCase().includes(l)):t).map(e=>({label:e.email?`${e.id} (${e.email})`:e.id,value:e.id}))}}],[A]),D=(0,V.useMemo)(()=>[{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(eq.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>o(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.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,r=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,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,r=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:a??"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:70,enableSorting:!1,cell:e=>{let l=e.getValue(),a="default_user_id"===l?"Default Proxy Admin":l,r=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:a??"-"})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(eQ.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(p.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(R.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,m.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,m.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(w.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})}):(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)(eH.Icon,{icon:I[e.row.id]?eU.ChevronDownIcon:eV.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>M(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)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,H.getModelDisplayName)(e).slice(0,30)}...`:(0,H.getModelDisplayName)(e)})},l)),l.length>3&&!I[e.row.id]&&(0,t.jsx)(w.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(T.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),I[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)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,H.getModelDisplayName)(e).slice(0,30)}...`:(0,H.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"]})]})}}],[I]),E=(0,V.useCallback)(e=>{let t="function"==typeof e?e(d):e;if(c(t),t?.length>0){let e=t[0];z({"Sort By":e.id,"Sort Order":e.desc?"desc":"asc"},!0)}},[d,z]),B=(0,eG.useReactTable)({data:N,columns:D,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:d,pagination:u},onSortingChange:E,onPaginationChange:g,getCoreRowModel:(0,eW.getCoreRowModel)(),enableSorting:!0,manualSorting:!0,manualPagination:!0,pageCount:k});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:i?(0,t.jsx)(eX.default,{keyId:i.token,onClose:()=>o(null),keyData:i,teams:[F],onDelete:S}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(eJ.default,{options:L,onApplyFilters:z,initialValues:h,onResetFilters:P})}),(0,t.jsx)("div",{className:"flex items-center justify-end w-full mb-4",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[v||C?(0,t.jsx)(eY.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",f+1," of ",B.getPageCount()]}),v||C?(0,t.jsx)(eY.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>B.previousPage(),disabled:v||C||!B.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),v||C?(0,t.jsx)(eY.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>B.nextPage(),disabled:v||C||!B.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(ed.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:B.getCenterTotalSize()},children:[(0,t.jsx)(eu.TableHead,{children:B.getHeaderGroups().map(e=>(0,t.jsx)(eh.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eg.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eG.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(eK.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(eU.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(e$.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${B.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(em.TableBody,{children:v||C?(0,t.jsx)(eh.TableRow,{children:(0,t.jsx)(ec.TableCell,{colSpan:D.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading keys..."})})})}):N.length>0?B.getRowModel().rows.map(e=>(0,t.jsx)(eh.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(ec.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,eG.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(eh.TableRow,{children:(0,t.jsx)(ec.TableCell,{colSpan:D.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({teamId:e,onClose:n,accessToken:o,is_team_admin:eo,is_proxy_admin:ed,is_org_admin:em=!1,userModels:ec,editTeam:eu,premiumUser:eg=!1,onUpdate:eh})=>{let ep,ex,eb,ef,ey,ej,[ev,ew]=(0,V.useState)(null),[eC,eS]=(0,V.useState)(!0),[eT,eN]=(0,V.useState)(!1),[ek]=M.Form.useForm(),[eD,eR]=(0,V.useState)(!1),[eB,eU]=(0,V.useState)(null),[eV,eK]=(0,V.useState)(!1),[e$,eG]=(0,V.useState)([]),[eW,eq]=(0,V.useState)(!1),[eH,eQ]=(0,V.useState)({}),{data:eY,isLoading:eJ}=d(),eX=eY?.globalGuardrailNames??new Set,[eZ,e1]=(0,V.useState)([]),[e2,e4]=(0,V.useState)({}),[e5,e3]=(0,V.useState)(!1),[e7,e6]=(0,V.useState)(null),[e9,e8]=(0,V.useState)(!1),[te,tt]=(0,V.useState)(!1),[tl,ta]=(0,V.useState)(!1),tr=V.default.useRef(null),[ts,ti]=(0,V.useState)(null),{userRole:tn,userId:to}=(0,l.default)(),{data:td=[]}=(0,a.useOrganizations)(),tm=(0,r.useQueryClient)(),tc=(0,V.useMemo)(()=>{let e=ev?.team_info?.organization_id;if(!e||!to)return!1;let t=td.find(t=>t.organization_id===e);return t?.members?.some(e=>e.user_id===to&&"org_admin"===e.user_role)??!1},[ev,td,to]),tu=M.Form.useWatch("models",ek),tg=M.Form.useWatch("disable_global_guardrails",ek),th=(0,V.useMemo)(()=>{let e=tu??ev?.team_info?.models??[];return e.includes("all-proxy-models")||e.includes("all-team-models")?ec:(0,H.unfurlWildcardModelsInList)(e,ec)},[tu,ev,ec]),tp=eo||ed||em||tc,tx=(0,V.useMemo)(()=>{let e;return e=[eM,eF,eA],tp?[...e,eO,ez,eP]:e},[tp]),tb=(0,V.useMemo)(()=>eu&&tp?eP:eM,[eu,tp]),t_=async()=>{try{if(eS(!0),!o)return;let t=await (0,i.teamInfoCall)(o,e);ew(t)}catch(e){ee.default.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{eS(!1)}};(0,V.useEffect)(()=>{t_()},[e,o]),(0,V.useEffect)(()=>{(async()=>{if(!o||!ev?.team_info?.organization_id)return ti(null);try{let e=await (0,i.organizationInfoCall)(o,ev.team_info.organization_id);ti(e)}catch(e){console.error("Error fetching organization info:",e),ti(null)}})()},[o,ev?.team_info?.organization_id]),(0,V.useMemo)(()=>{let e;return e=[],e=ts?ts.models.includes("all-proxy-models")?ec:ts.models.length>0?ts.models:ec:ec,(0,H.unfurlWildcardModelsInList)(e,ec)},[ts,ec]),(0,V.useEffect)(()=>{(async()=>{try{if(!o)return;let e=(await (0,i.getPoliciesList)(o)).policies.map(e=>e.policy_name);e1(e)}catch(e){console.error("Failed to fetch policies:",e)}})()},[o]),(0,V.useEffect)(()=>{(async()=>{if(!o||!ev?.team_info?.policies||0===ev.team_info.policies.length)return;e3(!0);let e={};try{await Promise.all(ev.team_info.policies.map(async t=>{try{let l=await (0,i.getPolicyInfoWithGuardrails)(o,t);e[t]=l.resolved_guardrails||[]}catch(l){console.error(`Failed to fetch guardrails for policy ${t}:`,l),e[t]=[]}})),e4(e)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{e3(!1)}})()},[o,ev?.team_info?.policies]);let tf=async t=>{try{if(null==o)return;let l={user_email:t.user_email,user_id:t.user_id,role:t.role};await (0,i.teamMemberAddCall)(o,e,l),ee.default.success("Team member added successfully"),eN(!1),ek.resetFields();let a=await (0,i.teamInfoCall)(o,e);ew(a),eh(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),ee.default.fromBackend(e),console.error("Error adding team member:",t)}},ty=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,allowed_models:t.allowed_models};E.default.destroy(),await (0,i.teamMemberUpdateCall)(o,e,l),ee.default.success("Team member updated successfully"),eR(!1);let a=await (0,i.teamInfoCall)(o,e);ew(a),eh(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),eR(!1),E.default.destroy(),ee.default.fromBackend(e),console.error("Error updating team member:",t)}},tj=async()=>{if(e7&&o){tt(!0);try{await (0,i.teamMemberDeleteCall)(o,e,e7),ee.default.success("Team member removed successfully");let t=await (0,i.teamInfoCall)(o,e);ew(t),eh(t)}catch(e){ee.default.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}finally{tt(!1),e8(!1),e6(null)}}},tv=async t=>{try{let l;if(!o)return;ta(!0);let r={};try{let{soft_budget_alerting_emails:e,...l}=t.metadata?JSON.parse(t.metadata):{};r=l}catch(e){ee.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){ee.default.fromBackend("Invalid JSON in secret manager settings");return}let s=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(eX):Array.from(eX).filter(e=>!(t.guardrails||[]).includes(e)),g={team_id:e,team_alias:t.team_alias,models:t.models,tpm_limit:s(t.tpm_limit),rpm_limit:s(t.rpm_limit),model_tpm_limit:n,model_rpm_limit:d,max_budget:t.max_budget,soft_budget:s(t.soft_budget),budget_duration:t.budget_duration,metadata:{...r,guardrails:(t.guardrails||[]).filter(e=>!eX.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!==tw.organization_id?{organization_id:t.organization_id??null}:{}};g.max_budget=(0,c.mapEmptyStringToNull)(g.max_budget),g.team_member_budget_duration=t.team_member_budget_duration,void 0!==t.team_member_budget&&(g.team_member_budget=Number(t.team_member_budget)),void 0!==t.team_member_key_duration&&(g.team_member_key_duration=t.team_member_key_duration),(void 0!==t.team_member_tpm_limit||void 0!==t.team_member_rpm_limit)&&(g.team_member_tpm_limit=s(t.team_member_tpm_limit),g.team_member_rpm_limit=s(t.team_member_rpm_limit));let{servers:h,accessGroups:p,toolsets:x}=t.mcp_servers_and_groups||{servers:[],accessGroups:[],toolsets:[]},b=new Set(h||[]),_=Object.fromEntries(Object.entries(t.mcp_tool_permissions||{}).filter(([e])=>b.has(e)));g.object_permission={},h&&(g.object_permission.mcp_servers=h),p&&(g.object_permission.mcp_access_groups=p),_&&(g.object_permission.mcp_tool_permissions=_),x&&(g.object_permission.mcp_toolsets=x),delete t.mcp_servers_and_groups,delete t.mcp_tool_permissions;let{agents:f,accessGroups:y}=t.agents_and_groups||{agents:[],accessGroups:[]};f&&f.length>0&&(g.object_permission.agents=f),y&&y.length>0&&(g.object_permission.agent_access_groups=y),delete t.agents_and_groups,t.vector_stores&&t.vector_stores.length>0&&(g.object_permission.vector_stores=t.vector_stores),Array.isArray(t.object_permission_search_tools)&&(g.object_permission.search_tools=t.object_permission_search_tools),void 0!==t.access_group_ids&&(g.access_group_ids=t.access_group_ids),void 0!==t.default_team_member_models&&(g.default_team_member_models=t.default_team_member_models);let j=tr.current?.getValue();if(j?.router_settings){let e=e=>null!=e&&""!==e&&!1!==e&&!(Array.isArray(e)&&0===e.length),t=Object.values(j.router_settings).some(e),l=tw.router_settings&&Object.values(tw.router_settings).some(e);(t||l)&&(g.router_settings=j.router_settings)}await (0,i.teamUpdateCall)(o,g),tm.invalidateQueries({queryKey:a.organizationKeys.all}),ee.default.success("Team settings updated successfully"),eK(!1),t_()}catch(e){console.error("Error updating team:",e)}finally{ta(!1)}};if(eC)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!ev?.team_info)return(0,t.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:tw}=ev,tC=tw.metadata?.disable_global_guardrails===!0,tS=new Set(tw.metadata?.opted_out_global_guardrails||[]),tT=(tw.metadata?.guardrails||[]).filter(e=>!eX.has(e)),tN=tC?tT:[...Array.from(eX).filter(e=>!tS.has(e)),...tT],tk=e=>{e.preventDefault(),e.stopPropagation()},tI=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)(I.Button,{type:"text",icon:(0,t.jsx)(f.ArrowLeftIcon,{className:"h-4 w-4"}),onClick:n,className:"mb-4",children:"Back to Teams"}),(0,t.jsx)(k.Title,{children:tw.team_alias}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(T.Text,{className:"text-gray-500 font-mono",children:tw.team_id}),(0,t.jsx)(I.Button,{type:"text",size:"small",icon:eH["team-id"]?(0,t.jsx)(B.CheckIcon,{size:12}):(0,t.jsx)(U.CopyIcon,{size:12}),onClick:()=>tI(tw.team_id,"team-id"),className:`left-2 z-10 transition-all duration-200 ${eH["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)(L.Tabs,{defaultActiveKey:tb,className:"mb-4",items:[{key:eM,label:eL[eM],children:(0,t.jsxs)(S.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(T.Text,{children:"Budget Status"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(k.Title,{children:["$",(0,m.formatNumberWithCommas)(tw.spend,4)]}),(0,t.jsxs)(T.Text,{children:["of ",null===tw.max_budget?"Unlimited":`$${(0,m.formatNumberWithCommas)(tw.max_budget,4)}`]}),tw.budget_duration&&(0,t.jsxs)(T.Text,{className:"text-gray-500",children:["Reset: ",tw.budget_duration]}),(0,t.jsx)("br",{}),tw.team_member_budget_table&&(0,t.jsxs)(T.Text,{className:"text-gray-500",children:["Team Member Budget: $",(0,m.formatNumberWithCommas)(tw.team_member_budget_table.max_budget,4)]})]})]}),(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(T.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(T.Text,{children:["TPM: ",tw.tpm_limit||"Unlimited"]}),(0,t.jsxs)(T.Text,{children:["RPM: ",tw.rpm_limit||"Unlimited"]}),tw.max_parallel_requests&&(0,t.jsxs)(T.Text,{children:["Max Parallel Requests: ",tw.max_parallel_requests]}),(ep=tw.metadata?.model_tpm_limit??{},ex=tw.metadata?.model_rpm_limit??{},0===(eb=Array.from(new Set([...Object.keys(ep),...Object.keys(ex)]))).length?null:(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)(T.Text,{className:"text-gray-500",children:"Per-model limits:"}),eb.map(e=>(0,t.jsxs)(T.Text,{className:"text-xs",children:[e,": TPM ",ep[e]??"—",", RPM ",ex[e]??"—"]},e))]}))]})]}),(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(T.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===tw.models.length||tw.models.includes("all-proxy-models")?(0,t.jsx)(w.Badge,{color:"red",children:"All proxy models"}):(0,t.jsxs)(t.Fragment,{children:[tw.models.map((e,l)=>(0,t.jsx)(w.Badge,{color:"blue",children:e},`direct-${l}`)),(tw.access_group_models||[]).map((e,l)=>(0,t.jsx)(w.Badge,{color:"green",title:"From access group",children:e},`ag-${l}`))]})})]}),(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Virtual Keys"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(T.Text,{children:["User Keys: ",ev.keys.filter(e=>e.user_id).length]}),(0,t.jsxs)(T.Text,{children:["Service Account Keys: ",ev.keys.filter(e=>!e.user_id).length]}),(0,t.jsxs)(T.Text,{className:"text-gray-500",children:["Total: ",ev.keys.length]})]})]}),(0,t.jsx)(et.default,{objectPermission:tw.object_permission,variant:"card",accessToken:o}),(0,t.jsx)(C.Card,{children:(0,t.jsx)(Q,{globalGuardrailNames:eX,teamGuardrails:tw.metadata?.guardrails||[],optedOutGlobalGuardrails:tw.metadata?.opted_out_global_guardrails||[],killSwitchOn:tC,variant:"inline"})}),(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900 mb-3",children:"Policies"}),tw.policies&&tw.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:tw.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)(w.Badge,{color:"purple",children:e}),e5&&(0,t.jsx)(T.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!e5&&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)(T.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)(w.Badge,{color:"blue",size:"xs",children:e},l))})]})]},l))}):(0,t.jsx)(T.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(Y.default,{loggingConfigs:tw.metadata?.logging||[],disabledCallbacks:[],variant:"card"})]})},{key:eF,label:eL[eF],children:(0,t.jsx)(eI,{teamId:e})},{key:eA,label:eL[eA],children:(0,t.jsx)(e0,{teamId:e,teamAlias:tw.team_alias,organization:ts})},{key:eO,label:eL[eO],children:(0,t.jsx)(eE,{teamData:ev,canEditTeam:tp,handleMemberDelete:e=>{e6(e),e8(!0)},setSelectedEditMember:eU,setIsEditMemberModalVisible:eR,setIsAddMemberModalVisible:eN})},{key:ez,label:eL[ez],children:(0,t.jsx)(e_,{teamId:e,accessToken:o,canEditTeam:tp})},{key:eP,label:eL[eP],children:(0,t.jsxs)(C.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"}),tp&&!eV&&(0,t.jsx)(I.Button,{icon:(0,t.jsx)(g.EditOutlined,{className:"h-4 w-4"}),onClick:()=>eK(!0),children:"Edit Settings"})]}),eV&&eJ?(0,t.jsx)("div",{className:"p-4",children:"Loading..."}):eV?(0,t.jsxs)(M.Form,{form:ek,onFinish:tv,onValuesChange:e=>{if("disable_global_guardrails"in e){let t=!0===e.disable_global_guardrails,l=(ek.getFieldValue("guardrails")||[]).filter(e=>!eX.has(e));ek.setFieldValue("guardrails",t?l:[...Array.from(eX),...l])}},initialValues:{...tw,team_alias:tw.team_alias,models:tw.models,tpm_limit:tw.tpm_limit,rpm_limit:tw.rpm_limit,object_permission_search_tools:tw.object_permission?.search_tools||[],modelLimits:Array.from(new Set([...Object.keys(tw.metadata?.model_tpm_limit??{}),...Object.keys(tw.metadata?.model_rpm_limit??{})])).map(e=>({model:e,tpm:tw.metadata?.model_tpm_limit?.[e],rpm:tw.metadata?.model_rpm_limit?.[e]})),max_budget:tw.max_budget,soft_budget:tw.soft_budget,budget_duration:tw.budget_duration,team_member_tpm_limit:tw.team_member_budget_table?.tpm_limit,team_member_rpm_limit:tw.team_member_budget_table?.rpm_limit,team_member_budget:tw.team_member_budget_table?.max_budget,team_member_budget_duration:tw.team_member_budget_table?.budget_duration,guardrails:tN,policies:tw.policies||[],disable_global_guardrails:tw.metadata?.disable_global_guardrails||!1,soft_budget_alerting_emails:Array.isArray(tw.metadata?.soft_budget_alerting_emails)?tw.metadata.soft_budget_alerting_emails.join(", "):"",metadata:tw.metadata?JSON.stringify((({logging:e,secret_manager_settings:t,soft_budget_alerting_emails:l,model_tpm_limit:a,model_rpm_limit:r,...s})=>s)(tw.metadata),null,2):"",logging_settings:tw.metadata?.logging||[],secret_manager_settings:tw.metadata?.secret_manager_settings?JSON.stringify(tw.metadata.secret_manager_settings,null,2):"",organization_id:tw.organization_id,vector_stores:tw.object_permission?.vector_stores||[],mcp_servers:tw.object_permission?.mcp_servers||[],mcp_access_groups:tw.object_permission?.mcp_access_groups||[],mcp_servers_and_groups:{servers:tw.object_permission?.mcp_servers||[],accessGroups:tw.object_permission?.mcp_access_groups||[],toolsets:tw.object_permission?.mcp_toolsets||[]},mcp_tool_permissions:tw.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:tw.object_permission?.agents||[],accessGroups:tw.object_permission?.agent_access_groups||[]},access_group_ids:tw.access_group_ids||[],default_team_member_models:tw.default_team_member_models||[]},layout:"vertical",children:[(0,t.jsx)(M.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(F.Input,{type:""})}),(0,t.jsx)(M.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Please select at least one model"}],children:(0,t.jsx)(Z.ModelSelect,{value:ek.getFieldValue("models")||[],onChange:e=>ek.setFieldValue("models",e),teamID:e,organizationID:ev?.team_info?.organization_id||void 0,options:{includeSpecialOptions:!0,includeUserModels:!ev?.team_info?.organization_id,showAllProxyModelsOverride:(0,u.isProxyAdminRole)(tn)&&!ev?.team_info?.organization_id},context:"team",dataTestId:"models-select"})}),(0,t.jsx)(M.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Soft Budget (USD)",name:"soft_budget",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.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)(F.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)(j.AccordionBody,{children:[(0,t.jsx)(T.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)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Default Model Access"," ",(0,t.jsx)(R.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)(M.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.models!==t.models,children:({getFieldValue:e})=>{let l=e("models")||tw.models||[];return(0,t.jsx)(O.Select,{mode:"multiple",placeholder:"Leave empty — all team models accessible to every member",value:ek.getFieldValue("default_team_member_models")||[],onChange:e=>ek.setFieldValue("default_team_member_models",e),options:l.map(e=>({label:e,value:e}))})}})}),(0,t.jsx)(M.Form.Item,{label:"Default Budget (USD)",name:"team_member_budget",tooltip:"Default spend budget for each member in this team.",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Default Budget Duration",name:"team_member_budget_duration",children:(0,t.jsx)(W,{onChange:e=>ek.setFieldValue("team_member_budget_duration",e),value:ek.getFieldValue("team_member_budget_duration")})}),(0,t.jsx)(M.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)(N.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(M.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)(el.default,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,t.jsx)(M.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)(el.default,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})})]})]}),(0,t.jsx)(M.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(O.Select,{placeholder:"n/a",children:[(0,t.jsx)(O.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(O.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(O.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(M.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(el.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(el.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Model-Specific Rate Limits",tooltip:"Set per-model TPM/RPM limits that apply across the whole team.",children:(0,t.jsx)(M.Form.List,{name:"modelLimits",children:(e,{add:l,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(({key:e,name:l,...r})=>(0,t.jsxs)(z.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(M.Form.Item,{...r,name:[l,"model"],rules:[{required:!0,message:"Missing model"},{validator:(e,t)=>t&&(ek.getFieldValue("modelLimits")??[]).filter(e=>e?.model===t).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],style:{minWidth:240},children:(0,t.jsx)(O.Select,{showSearch:!0,placeholder:"Select model",allowClear:!0,options:th.map(e=>({value:e,label:e}))})}),(0,t.jsx)(M.Form.Item,{...r,name:[l,"tpm"],rules:[{validator:async(e,t)=>{let a=(ek.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)(A.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(M.Form.Item,{...r,name:[l,"rpm"],children:(0,t.jsx)(A.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(x.MinusCircleOutlined,{onClick:()=>a(l),style:{color:"#ef4444"}})]},e)),(0,t.jsx)(M.Form.Item,{children:(0,t.jsx)(I.Button,{type:"dashed",onClick:()=>l(),block:!0,icon:(0,t.jsx)(b.PlusOutlined,{}),children:"Add Model Limit"})})]})})}),(0,t.jsx)(M.Form.Item,{label:"Router Settings",children:(0,t.jsx)(ei.default,{ref:tr,accessToken:o||"",value:tw.router_settings?{router_settings:tw.router_settings}:void 0})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(R.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.jsxs)(O.Select,{mode:"multiple",placeholder:"Select guardrails",optionLabelProp:"label",tagRender:({label:e,value:l,closable:a,onClose:r})=>{let s=eX.has(l);return(0,t.jsxs)(D.Tag,{color:"blue",closable:a,onClose:r,onMouseDown:tk,style:{marginInlineEnd:4},children:[s&&(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4},"aria-label":"Global guardrail"}),e]})},children:[(0,t.jsx)(O.Select.OptGroup,{label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4}}),"Global"]}),children:(eY?.guardrails??[]).filter(e=>e.litellm_params?.default_on).map(e=>(0,t.jsx)(O.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,disabled:tg,children:e.guardrail_name},e.guardrail_name))}),(0,t.jsx)(O.Select.OptGroup,{label:"Other",children:(eY?.guardrails??[]).filter(e=>!e.litellm_params?.default_on).map(e=>(0,t.jsx)(O.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,children:e.guardrail_name},e.guardrail_name))})]})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable all global guardrails"," ",(0,t.jsx)(R.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)(P.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(R.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)(O.Select,{mode:"tags",placeholder:"Select or enter policies",options:eZ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(R.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)(K.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(M.Form.Item,{label:"Vector Stores",name:"vector_stores","aria-label":"Vector Stores",children:(0,t.jsx)(ea.default,{onChange:e=>ek.setFieldValue("vector_stores",e),value:ek.getFieldValue("vector_stores"),accessToken:o||"",placeholder:"Select vector stores"})}),(0,t.jsx)(M.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(q.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:o||"",placeholder:"Select pass through routes"})}),(0,t.jsx)(M.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(J.default,{onChange:e=>ek.setFieldValue("mcp_servers_and_groups",e),value:ek.getFieldValue("mcp_servers_and_groups"),accessToken:o||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(M.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(F.Input,{type:"hidden"})}),(0,t.jsx)(M.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:ek.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(M.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)($.default,{onChange:e=>ek.setFieldValue("agents_and_groups",e),value:ek.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)(j.AccordionBody,{children:(0,t.jsx)(M.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)(er,{onChange:e=>ek.setFieldValue("object_permission_search_tools",e),value:ek.getFieldValue("object_permission_search_tools"),accessToken:o||"",placeholder:"Select search tools (optional, empty = all allowed)"})})})]}),(0,t.jsx)(M.Form.Item,{label:"Organization",name:"organization_id",children:(0,t.jsx)(O.Select,{allowClear:!0,placeholder:"Select an organization",showSearch:!0,optionFilterProp:"label",options:td.map(e=>({value:e.organization_id,label:e.organization_alias||e.organization_id}))})}),(0,t.jsx)(M.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(es.default,{value:ek.getFieldValue("logging_settings"),onChange:e=>ek.setFieldValue("logging_settings",e)})}),(0,t.jsx)(M.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:eg?"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)(F.Input.TextArea,{rows:6,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!eg})}),(0,t.jsx)(M.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(F.Input.TextArea,{rows:10})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 pr-0 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(I.Button,{onClick:()=>eK(!1),disabled:tl,children:"Cancel"}),(0,t.jsx)(I.Button,{icon:(0,t.jsx)(_.SaveOutlined,{className:"h-4 w-4"}),type:"primary",htmlType:"submit",loading:tl,children:"Save Changes"})]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Team Name"}),(0,t.jsx)("div",{children:tw.team_alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"font-mono",children:tw.team_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Created At"}),(0,t.jsx)("div",{children:new Date(tw.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:tw.models.map((e,l)=>(0,t.jsx)(w.Badge,{color:"red",children:e},l))})]}),tw.default_team_member_models&&tw.default_team_member_models.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Default Member Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:tw.default_team_member_models.map((e,l)=>(0,t.jsx)(w.Badge,{color:"blue",children:e},l))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",tw.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",tw.rpm_limit||"Unlimited"]}),(ef=tw.metadata?.model_tpm_limit??{},ey=tw.metadata?.model_rpm_limit??{},0===(ej=Array.from(new Set([...Object.keys(ef),...Object.keys(ey)]))).length?null:(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(T.Text,{className:"text-gray-500",children:"Per-model limits:"}),ej.map(e=>(0,t.jsxs)("div",{className:"text-xs ml-2",children:[e,": TPM ",ef[e]??"—",", RPM ",ey[e]??"—"]},e))]}))]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Team Budget"}),(0,t.jsxs)("div",{children:["Max Budget:"," ",null!==tw.max_budget?`$${(0,m.formatNumberWithCommas)(tw.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Soft Budget:"," ",null!==tw.soft_budget&&void 0!==tw.soft_budget?`$${(0,m.formatNumberWithCommas)(tw.soft_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Reset: ",tw.budget_duration||"Never"]}),tw.metadata?.soft_budget_alerting_emails&&Array.isArray(tw.metadata.soft_budget_alerting_emails)&&tw.metadata.soft_budget_alerting_emails.length>0&&(0,t.jsxs)("div",{children:["Soft Budget Alerting Emails: ",tw.metadata.soft_budget_alerting_emails.join(", ")]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(T.Text,{className:"font-medium",children:["Team Member Settings"," ",(0,t.jsx)(R.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: ",tw.team_member_budget_table?.max_budget||"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Duration: ",tw.team_member_budget_table?.budget_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["Key Duration: ",tw.metadata?.team_member_key_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["TPM Limit: ",tw.team_member_budget_table?.tpm_limit||"No Limit"]}),(0,t.jsxs)("div",{children:["RPM Limit: ",tw.team_member_budget_table?.rpm_limit||"No Limit"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Router Settings"}),tw.router_settings&&Object.values(tw.router_settings).some(e=>null!=e&&""!==e&&!(Array.isArray(e)&&0===e.length))?(0,t.jsxs)("div",{className:"mt-1 space-y-1",children:[tw.router_settings.routing_strategy&&(0,t.jsxs)("div",{children:["Routing Strategy:"," ",(0,t.jsx)(w.Badge,{color:"blue",children:tw.router_settings.routing_strategy})]}),null!=tw.router_settings.num_retries&&(0,t.jsxs)("div",{children:["Number of Retries: ",tw.router_settings.num_retries]}),null!=tw.router_settings.allowed_fails&&(0,t.jsxs)("div",{children:["Allowed Failures: ",tw.router_settings.allowed_fails]}),null!=tw.router_settings.cooldown_time&&(0,t.jsxs)("div",{children:["Cooldown Time: ",tw.router_settings.cooldown_time,"s"]}),null!=tw.router_settings.timeout&&(0,t.jsxs)("div",{children:["Timeout: ",tw.router_settings.timeout,"s"]}),null!=tw.router_settings.retry_after&&(0,t.jsxs)("div",{children:["Retry After: ",tw.router_settings.retry_after,"s"]}),tw.router_settings.fallbacks&&Array.isArray(tw.router_settings.fallbacks)&&tw.router_settings.fallbacks.length>0&&(0,t.jsxs)("div",{children:["Fallbacks: ",tw.router_settings.fallbacks.length," configured"]}),tw.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)(T.Text,{className:"font-medium",children:"Organization ID"}),(0,t.jsx)("div",{children:tw.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Status"}),(0,t.jsx)(w.Badge,{color:tw.blocked?"red":"green",children:tw.blocked?"Blocked":"Active"})]}),(0,t.jsx)(et.default,{objectPermission:tw.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:o}),(0,t.jsx)(Q,{globalGuardrailNames:eX,teamGuardrails:tw.metadata?.guardrails||[],optedOutGlobalGuardrails:tw.metadata?.opted_out_global_guardrails||[],killSwitchOn:tC,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsx)(Y.default,{loggingConfigs:tw.metadata?.logging||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"}),tw.metadata?.secret_manager_settings&&(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(T.Text,{className:"font-medium",children:"Secret Manager Settings"}),(0,t.jsx)("pre",{className:"mt-2 bg-gray-50 p-3 rounded text-xs overflow-x-auto",children:JSON.stringify(tw.metadata.secret_manager_settings,null,2)})]})]})]})}].filter(e=>tx.includes(e.key))}),(0,t.jsx)(en.default,{visible:eD,onCancel:()=>eR(!1),onSubmit:ty,initialData:eB,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)(R.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:"tpm_limit",label:(0,t.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,t.jsx)(R.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)(R.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)(R.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:(tw.models||[]).map(e=>({label:e,value:e})),placeholder:"Leave empty to inherit all team models"}]}}),(0,t.jsx)(s.default,{isVisible:eT,onCancel:()=>eN(!1),onSubmit:tf,accessToken:o,teamId:e}),(0,t.jsx)(G.default,{isOpen:e9,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:()=>{e8(!1),e6(null)},onOk:tj,confirmLoading:te})]})}],56567)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/cd677ff381b90c30.js b/litellm/proxy/_experimental/out/_next/static/chunks/cd677ff381b90c30.js deleted file mode 100644 index 4698cb47d6..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/cd677ff381b90c30.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,262218,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(529681),i=e.i(702779),a=e.i(563113),l=e.i(763731),o=e.i(121872),c=e.i(242064);e.i(296059);var s=e.i(915654);e.i(262370);var d=e.i(135551),u=e.i(183293),g=e.i(246422),m=e.i(838378);let p=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return(0,m.mergeToken)(e,{tagFontSize:i,tagLineHeight:(0,s.unit)(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},h=e=>({defaultBg:new d.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),f=(0,g.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,l=a(r).sub(n).equal(),o=a(t).sub(n).equal();return{[i]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,s.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:l}}),[`${i}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(p(e)),h);var b=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 $=t.forwardRef((e,r)=>{let{prefixCls:i,style:a,className:l,checked:o,children:s,icon:d,onChange:u,onClick:g}=e,m=b(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:h}=t.useContext(c.ConfigContext),$=p("tag",i),[y,S,v]=f($),k=(0,n.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==h?void 0:h.className,l,S,v);return y(t.createElement("span",Object.assign({},m,{ref:r,style:Object.assign(Object.assign({},a),null==h?void 0:h.style),className:k,onClick:e=>{null==u||u(!o),null==g||g(e)}}),d,t.createElement("span",null,s)))});var y=e.i(403541);let S=(0,g.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=p(e),(0,y.genPresetColor)(t,(e,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:a,borderColor:a},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},h),v=(e,t,n)=>{let r="string"!=typeof n?n:n.charAt(0).toUpperCase()+n.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},k=(0,g.genSubStyleComponent)(["Tag","status"],e=>{let t=p(e);return[v(t,"success","Success"),v(t,"processing","Info"),v(t,"error","Error"),v(t,"warning","Warning")]},h);var C=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 w=t.forwardRef((e,s)=>{let{prefixCls:d,className:u,rootClassName:g,style:m,children:p,icon:h,color:b,onClose:$,bordered:y=!0,visible:v}=e,w=C(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:I,direction:x,tag:O}=t.useContext(c.ConfigContext),[E,z]=t.useState(!0),j=(0,r.default)(w,["closeIcon","closable"]);t.useEffect(()=>{void 0!==v&&z(v)},[v]);let N=(0,i.isPresetColor)(b),P=(0,i.isPresetStatusColor)(b),T=N||P,M=Object.assign(Object.assign({backgroundColor:b&&!T?b:void 0},null==O?void 0:O.style),m),B=I("tag",d),[H,L,R]=f(B),q=(0,n.default)(B,null==O?void 0:O.className,{[`${B}-${b}`]:T,[`${B}-has-color`]:b&&!T,[`${B}-hidden`]:!E,[`${B}-rtl`]:"rtl"===x,[`${B}-borderless`]:!y},u,g,L,R),G=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||z(!1)},[,A]=(0,a.useClosable)((0,a.pickClosable)(e),(0,a.pickClosable)(O),{closable:!1,closeIconRender:e=>{let r=t.createElement("span",{className:`${B}-close-icon`,onClick:G},e);return(0,l.replaceElement)(e,r,e=>({onClick:t=>{var n;null==(n=null==e?void 0:e.onClick)||n.call(e,t),G(t)},className:(0,n.default)(null==e?void 0:e.className,`${B}-close-icon`)}))}}),W="function"==typeof w.onClick||p&&"a"===p.type,D=h||null,X=D?t.createElement(t.Fragment,null,D,p&&t.createElement("span",null,p)):p,F=t.createElement("span",Object.assign({},j,{ref:s,className:q,style:M}),X,A,N&&t.createElement(S,{key:"preset",prefixCls:B}),P&&t.createElement(k,{key:"status",prefixCls:B}));return H(W?t.createElement(o.default,{component:"Tag"},F):F)});w.CheckableTag=$,e.s(["Tag",0,w],262218)},801312,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:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var i=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["default",0,a],801312)},475254,e=>{"use strict";var t=e.i(271645);let n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},r=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:c,iconNode:s,...d},u)=>(0,t.createElement)("svg",{ref:u,...i,width:n,height:n,stroke:e,strokeWidth:l?24*Number(a)/Number(n):a,className:r("lucide",o),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...s.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(c)?c:[c]])),l=(e,i)=>{let l=(0,t.forwardRef)(({className:l,...o},c)=>(0,t.createElement)(a,{ref:c,iconNode:i,className:r(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=n(e),l};e.s(["default",()=>l],475254)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(242064),i=e.i(517455);e.i(296059);var a=e.i(915654),l=e.i(183293),o=e.i(246422),c=e.i(838378);let s=(0,o.genStyleHooks)("Divider",e=>{let t=(0,c.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:c,verticalMarginInline:s}=e;return{[t]:Object.assign(Object.assign({},(0,l.resetComponent)(e)),{borderBlockStart:`${(0,a.unit)(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,a.unit)(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,a.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,a.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,a.unit)(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${c} * 100%)`},"&::after":{width:`calc(100% - ${c} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${c} * 100%)`},"&::after":{width:`calc(${c} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var d=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 u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:a,direction:l,className:o,style:c}=(0,r.useComponentConfig)("divider"),{prefixCls:g,type:m="horizontal",orientation:p="center",orientationMargin:h,className:f,rootClassName:b,children:$,dashed:y,variant:S="solid",plain:v,style:k,size:C}=e,w=d(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),I=a("divider",g),[x,O,E]=s(I),z=u[(0,i.default)(C)],j=!!$,N=t.useMemo(()=>"left"===p?"rtl"===l?"end":"start":"right"===p?"rtl"===l?"start":"end":p,[l,p]),P="start"===N&&null!=h,T="end"===N&&null!=h,M=(0,n.default)(I,o,O,E,`${I}-${m}`,{[`${I}-with-text`]:j,[`${I}-with-text-${N}`]:j,[`${I}-dashed`]:!!y,[`${I}-${S}`]:"solid"!==S,[`${I}-plain`]:!!v,[`${I}-rtl`]:"rtl"===l,[`${I}-no-default-orientation-margin-start`]:P,[`${I}-no-default-orientation-margin-end`]:T,[`${I}-${z}`]:!!z},f,b),B=t.useMemo(()=>"number"==typeof h?h:/^\d+$/.test(h)?Number(h):h,[h]);return x(t.createElement("div",Object.assign({className:M,style:Object.assign(Object.assign({},c),k)},w,{role:"separator"}),$&&"vertical"!==m&&t.createElement("span",{className:`${I}-inner-text`,style:{marginInlineStart:P?B:void 0,marginInlineEnd:T?B:void 0}},$)))}],312361)},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(876556);function i(e){return["small","middle","large"].includes(e)}function a(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>i,"isValidGapNumber",()=>a],908286);var l=e.i(242064),o=e.i(249616),c=e.i(372409),s=e.i(246422);let d=(0,s.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:l,fontSizeSM:o,borderRadiusLG:s,borderRadiusSM:d,colorBgContainerDisabled:u,lineWidth:g}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,background:u,borderWidth:g,borderStyle:"solid",borderColor:i,borderRadius:n,"&-large":{fontSize:l,borderRadius:s},"&-small":{paddingInline:a,borderRadius:d,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,c.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 g=t.default.forwardRef((e,r)=>{let{className:i,children:a,style:c,prefixCls:s}=e,g=u(e,["className","children","style","prefixCls"]),{getPrefixCls:m,direction:p}=t.default.useContext(l.ConfigContext),h=m("space-addon",s),[f,b,$]=d(h),{compactItemClassnames:y,compactSize:S}=(0,o.useCompactItemContext)(h,p),v=(0,n.default)(h,b,y,$,{[`${h}-${S}`]:S},i);return f(t.default.createElement("div",Object.assign({ref:r,className:v,style:c},g),a))}),m=t.default.createContext({latestIndex:0}),p=m.Provider,h=({className:e,index:n,children:r,split:i,style:a})=>{let{latestIndex:l}=t.useContext(m);return null==r?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:a},r),n{let t=(0,f.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var $=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 y=t.forwardRef((e,o)=>{var c;let{getPrefixCls:s,direction:d,size:u,className:g,style:m,classNames:f,styles:y}=(0,l.useComponentConfig)("space"),{size:S=null!=u?u:"small",align:v,className:k,rootClassName:C,children:w,direction:I="horizontal",prefixCls:x,split:O,style:E,wrap:z=!1,classNames:j,styles:N}=e,P=$(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[T,M]=Array.isArray(S)?S:[S,S],B=i(M),H=i(T),L=a(M),R=a(T),q=(0,r.default)(w,{keepEmpty:!0}),G=void 0===v&&"horizontal"===I?"center":v,A=s("space",x),[W,D,X]=b(A),F=(0,n.default)(A,g,D,`${A}-${I}`,{[`${A}-rtl`]:"rtl"===d,[`${A}-align-${G}`]:G,[`${A}-gap-row-${M}`]:B,[`${A}-gap-col-${T}`]:H},k,C,X),K=(0,n.default)(`${A}-item`,null!=(c=null==j?void 0:j.item)?c:f.item),U=Object.assign(Object.assign({},y.item),null==N?void 0:N.item),V=q.map((e,n)=>{let r=(null==e?void 0:e.key)||`${K}-${n}`;return t.createElement(h,{className:K,key:r,index:n,split:O,style:U},e)}),Q=t.useMemo(()=>({latestIndex:q.reduce((e,t,n)=>null!=t?n:e,0)}),[q]);if(0===q.length)return null;let _={};return z&&(_.flexWrap="wrap"),!H&&R&&(_.columnGap=T),!B&&L&&(_.rowGap=M),W(t.createElement("div",Object.assign({ref:o,className:F,style:Object.assign(Object.assign(Object.assign({},_),m),E)},P),t.createElement(p,{value:Q},V)))});y.Compact=o.default,y.Addon=g,e.s(["default",0,y],38243)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(739295),r=e.i(343794),i=e.i(931067),a=e.i(211577),l=e.i(392221),o=e.i(703923),c=e.i(914949),s=e.i(404948),d=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,n){var u,g=e.prefixCls,m=void 0===g?"rc-switch":g,p=e.className,h=e.checked,f=e.defaultChecked,b=e.disabled,$=e.loadingIcon,y=e.checkedChildren,S=e.unCheckedChildren,v=e.onClick,k=e.onChange,C=e.onKeyDown,w=(0,o.default)(e,d),I=(0,c.default)(!1,{value:h,defaultValue:f}),x=(0,l.default)(I,2),O=x[0],E=x[1];function z(e,t){var n=O;return b||(E(n=e),null==k||k(n,t)),n}var j=(0,r.default)(m,p,(u={},(0,a.default)(u,"".concat(m,"-checked"),O),(0,a.default)(u,"".concat(m,"-disabled"),b),u));return t.createElement("button",(0,i.default)({},w,{type:"button",role:"switch","aria-checked":O,disabled:b,className:j,ref:n,onKeyDown:function(e){e.which===s.default.LEFT?z(!1,e):e.which===s.default.RIGHT&&z(!0,e),null==C||C(e)},onClick:function(e){var t=z(!O,e);null==v||v(t,e)}}),$,t.createElement("span",{className:"".concat(m,"-inner")},t.createElement("span",{className:"".concat(m,"-inner-checked")},y),t.createElement("span",{className:"".concat(m,"-inner-unchecked")},S)))});u.displayName="Switch";var g=e.i(121872),m=e.i(242064),p=e.i(937328),h=e.i(517455);e.i(296059);var f=e.i(915654);e.i(262370);var b=e.i(135551),$=e.i(183293),y=e.i(246422),S=e.i(838378);let v=(0,y.genStyleHooks)("Switch",e=>{let t=(0,S.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:(0,f.unit)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:l,calc:o}=e,c=`${t}-inner`,s=(0,f.unit)(o(l).add(o(r).mul(2)).equal()),d=(0,f.unit)(o(a).mul(2).equal());return{[t]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${c}-checked, ${c}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${d})`,marginInlineEnd:`calc(100% - ${s} + ${d})`},[`${c}-unchecked`]:{marginTop:o(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${c}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${d})`,marginInlineEnd:`calc(-100% + ${s} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:o(r).mul(2).equal(),marginInlineEnd:o(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:o(r).mul(-1).mul(2).equal(),marginInlineEnd:o(r).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:l(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(l(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:l,handleSizeSM:o,calc:c}=e,s=`${t}-inner`,d=(0,f.unit)(c(o).add(c(r).mul(2)).equal()),u=(0,f.unit)(c(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:(0,f.unit)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:a,[`${s}-checked, ${s}-unchecked`]:{minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${s}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:c(c(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(c(o).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,l=r/2,o=a-4,c=l-4;return{trackHeight:a,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:i,handleSize:o,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}});var k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 C=t.forwardRef((e,i)=>{let{prefixCls:a,size:l,disabled:o,loading:s,className:d,rootClassName:f,style:b,checked:$,value:y,defaultChecked:S,defaultValue:C,onChange:w}=e,I=k(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[x,O]=(0,c.default)(!1,{value:null!=$?$:y,defaultValue:null!=S?S:C}),{getPrefixCls:E,direction:z,switch:j}=t.useContext(m.ConfigContext),N=t.useContext(p.default),P=(null!=o?o:N)||s,T=E("switch",a),M=t.createElement("div",{className:`${T}-handle`},s&&t.createElement(n.default,{className:`${T}-loading-icon`})),[B,H,L]=v(T),R=(0,h.default)(l),q=(0,r.default)(null==j?void 0:j.className,{[`${T}-small`]:"small"===R,[`${T}-loading`]:s,[`${T}-rtl`]:"rtl"===z},d,f,H,L),G=Object.assign(Object.assign({},null==j?void 0:j.style),b);return B(t.createElement(g.default,{component:"Switch",disabled:P},t.createElement(u,Object.assign({},I,{checked:x,onChange:(...e)=>{O(e[0]),null==w||w.apply(void 0,e)},prefixCls:T,className:q,style:G,disabled:P,ref:i,loadingIcon:M}))))});C.__ANT_SWITCH=!0,e.s(["Switch",0,C],790848)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},292639,e=>{"use strict";var t=e.i(764205),n=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,n.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},250980,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 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,n],250980)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d415c843a5441964.js b/litellm/proxy/_experimental/out/_next/static/chunks/d415c843a5441964.js new file mode 100644 index 0000000000..f43252ff81 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/d415c843a5441964.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56567,838932,471145,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(764205),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),x=e.i(564897),_=e.i(646563),b=e.i(987432),y=e.i(530212),j=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),I=e.i(464571),M=e.i(808613),z=e.i(311451),F=e.i(28651),A=e.i(199133),O=e.i(770914),P=e.i(790848),D=e.i(653496),L=e.i(262218),R=e.i(592968),B=e.i(888259),V=e.i(678784),U=e.i(118366),E=e.i(271645),$=e.i(9314),K=e.i(552130),G=e.i(127952);function W({className:e,value:l,onChange:a}){return(0,t.jsxs)(A.Select,{className:e,value:l,onChange:a,children:[(0,t.jsx)(A.Select.Option,{value:"24h",children:"Daily"}),(0,t.jsx)(A.Select.Option,{value:"7d",children:"Weekly"}),(0,t.jsx)(A.Select.Option,{value:"30d",children:"Monthly"})]})}var q=e.i(844565),H=e.i(355619);let J=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),Y=e.i(75921),X=e.i(390605),Z=e.i(162386),ee=e.i(727749),et=e.i(384767),el=e.i(435451),ea=e.i(916940);let es=({onChange:e,value:l,className:a,accessToken:s,placeholder:i="Select search tools (optional)",disabled:n=!1})=>{let[o,d]=(0,E.useState)([]),[m,c]=(0,E.useState)(!1);return(0,E.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)(A.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,es],471145);var ei=e.i(183588),er=e.i(460285),en=e.i(276173),eo=e.i(91979),ed=e.i(269200),em=e.i(942232),ec=e.i(977572),eu=e.i(427612),eg=e.i(64848),eh=e.i(496020),ep=e.i(536916),ex=e.i(21548);let e_={"/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","/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)"},eb=({teamId:e,accessToken:l,canEditTeam:a})=>{let[s,i]=(0,E.useState)([]),[n,o]=(0,E.useState)([]),[d,m]=(0,E.useState)(!0),[c,u]=(0,E.useState)(!1),[g,h]=(0,E.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){ee.default.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{m(!1)}};(0,E.useEffect)(()=>{p()},[e,l]);let x=async()=>{try{if(!l)return;u(!0),await (0,r.teamPermissionsUpdateCall)(l,e,n),ee.default.success("Permissions updated successfully"),h(!1)}catch(e){ee.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 _=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)(I.Button,{icon:(0,t.jsx)(eo.ReloadOutlined,{}),onClick:()=>{p()},children:"Reset"}),(0,t.jsx)(I.Button,{onClick:x,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."}),_?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(ed.Table,{className:" min-w-full",children:[(0,t.jsx)(eu.TableHead,{children:(0,t.jsxs)(eh.TableRow,{children:[(0,t.jsx)(eg.TableHeaderCell,{children:"Method"}),(0,t.jsx)(eg.TableHeaderCell,{children:"Endpoint"}),(0,t.jsx)(eg.TableHeaderCell,{children:"Description"}),(0,t.jsx)(eg.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)(em.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=e_[e];if(!l){for(let[t,a]of Object.entries(e_))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)(eh.TableRow,{className:"hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(ec.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)(ec.TableCell,{children:(0,t.jsx)("span",{className:"font-mono text-sm text-gray-800",children:l.endpoint})}),(0,t.jsx)(ec.TableCell,{className:"text-gray-700",children:l.description}),(0,t.jsx)(ec.TableCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,t.jsx)(ep.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);function ej(e){if(!e)return null;let t=(0,ey.default)(e);return t.isValid()?t.format("MMM D, YYYY"):null}var ef=e.i(175712),ev=e.i(178654),eT=e.i(621192),eS=e.i(898586);let ew=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,r.deriveErrorMessage)(e))}return await s.json()},eN=(e,l)=>(0,t.jsxs)(O.Space,{size:4,children:[(0,t.jsx)(eS.Typography.Text,{type:"secondary",children:e}),(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(p.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),eC=(e,t=4)=>null==e?"0":(0,m.formatNumberWithCommas)(e,t),ek=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:()=>ew(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=ej(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:[eN("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:["$",eC(d,4)]}),(0,t.jsxs)(eS.Typography.Text,{type:"secondary",children:["of ",null===o?"Unlimited":`$${eC(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:[eN("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: ",ek(c)]}),(0,t.jsx)("br",{}),(0,t.jsxs)(eS.Typography.Text,{children:["RPM: ",ek(u)]})]})]})}),(0,t.jsx)(ev.Col,{xs:24,md:12,children:(0,t.jsxs)(ef.Card,{children:[eN("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:["$",eC(m,4)]})})]})}),(0,t.jsx)(ev.Col,{xs:24,md:12,children:(0,t.jsxs)(ef.Card,{children:[eN("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 eM="overview",ez="my-user",eF="virtual-keys",eA="members",eO="member-permissions",eP="settings",eD={[eM]:"Overview",[ez]:"My User",[eF]:"Virtual Keys",[eA]:"Members",[eO]:"Member Permissions",[eP]:"Settings"};var eL=e.i(292639),eR=e.i(294612);function eB({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,eL.useUISettings)(),{userId:c,userRole:g}=(0,l.default)(),h=!!d?.values?.disable_team_admin_delete_team_user,x=(0,u.isUserTeamAdminForSingleTeam)(e.team_info.members_with_roles,c||""),_=(0,u.isProxyAdminRole)(g||""),b=[{title:(0,t.jsxs)(O.Space,{direction:"horizontal",children:["Model Scope",(0,t.jsx)(R.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)(R.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)(R.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.jsxs)(eS.Typography.Text,{children:["$",(0,m.formatNumberWithCommas)((t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.spend??0})(a.user_id),4)]})},{title:(0,t.jsxs)(O.Space,{direction:"horizontal",children:["Total Spend (USD)",(0,t.jsx)(R.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.jsxs)(eS.Typography.Text,{children:["$",(0,m.formatNumberWithCommas)((t=>{if(!t)return 0;let l=e.team_memberships.find(e=>e.user_id===t);return l?.total_spend??0})(a.user_id),4)]})},{title:"Team Member Budget (USD)",key:"budget",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?.max_budget;return null==a?null:o(a)})(a.user_id);return(0,t.jsx)(eS.Typography.Text,{children:s?`$${(0,m.formatNumberWithCommas)(Number(s),4)}`:"No Limit"})}},{title:"Budget Reset",key:"budget_reset",render:(l,a)=>{let s=(t=>{if(!t)return null;let l=e.team_memberships.find(e=>e.user_id===t);return ej(l?.litellm_budget_table?.budget_reset_at)})(a.user_id);return s?(0,t.jsx)(eS.Typography.Text,{children:s}):(0,t.jsx)(eS.Typography.Text,{type:"secondary",children:"—"})}},{title:(0,t.jsxs)(O.Space,{direction:"horizontal",children:["Team Member Rate Limits",(0,t.jsx)(R.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)(eR.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,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:()=>_||a&&!x||x&&!h})}var eV=e.i(207082),eU=e.i(871943),eE=e.i(502547),e$=e.i(360820),eK=e.i(94629),eG=e.i(152990),eW=e.i(682830),eq=e.i(994388),eH=e.i(752978),eJ=e.i(282786),eQ=e.i(981339),eY=e.i(969550),eX=e.i(20147),eZ=e.i(633627);function e0({teamId:e,teamAlias:a,organization:s}){let{accessToken:i}=(0,l.default)(),[r,o]=(0,E.useState)(null),[d,c]=(0,E.useState)([{id:"created_at",desc:!0}]),[u,g]=(0,E.useState)({pageIndex:0,pageSize:50}),[h,x]=(0,E.useState)({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),_=d.length>0?d[0].id:"created_at",b=d.length>0?d[0].desc?"desc":"asc":"desc",y=u.pageIndex,j=u.pageSize,{data:f,isPending:v,isFetching:S,refetch:w}=(0,eV.useKeys)(y+1,j,{teamID:e,organizationID:h["Organization ID"]?.trim()||void 0,selectedKeyAlias:h["Key Alias"]?.trim()||void 0,userID:h["User ID"]?.trim()||void 0,sortBy:_||void 0,sortOrder:b||void 0,expand:"user"}),C=(0,E.useMemo)(()=>{let e=f?.keys||[],t=s?.organization_id;return t?e.map(e=>({...e,organization_id:(e.organization_id??e.org_id)||t})):e},[f?.keys,s?.organization_id]),k=f?.total_pages??0,[I,M]=(0,E.useState)({}),z=(0,E.useMemo)(()=>({team_id:e,team_alias:a||e,models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:s?.organization_id||"",created_at:"",keys:[],members_with_roles:[],spend:0}),[e,a,s]),F=(0,n.useQuery)({queryKey:["teamFilterOptions",e,i],queryFn:async()=>(0,eZ.fetchTeamFilterOptions)(i,e),enabled:!!i&&!!e,staleTime:3e4}).data||{keyAliases:[],organizationIds:[],userIds:[]},A=(0,E.useCallback)(()=>{w?.()},[w]);(0,E.useEffect)(()=>(window.addEventListener("storage",A),()=>window.removeEventListener("storage",A)),[A]);let O=(0,E.useCallback)((e,t=!1)=>{x(t=>({...t,"Organization ID":e["Organization ID"]??t["Organization ID"],"Key Alias":e["Key Alias"]??t["Key Alias"],"User ID":e["User ID"]??t["User ID"],"Sort By":e["Sort By"]??t["Sort By"]??"created_at","Sort Order":e["Sort Order"]??t["Sort Order"]??"desc"})),t||g(e=>({...e,pageIndex:0}))},[]),P=(0,E.useCallback)(()=>{x({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),g(e=>({...e,pageIndex:0}))},[]),D=(0,E.useMemo)(()=>[{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>{let{organizationIds:t}=F;if(!t.length)return[];let l=e.toLowerCase();return(l?t.filter(e=>e.toLowerCase().includes(l)):t).map(e=>({label:e,value:e}))}},{name:"Key Alias",label:"Key Alias",isSearchable:!0,searchFn:async e=>{let{keyAliases:t}=F,l=e.toLowerCase();return(l?t.filter(e=>e.toLowerCase().includes(l)):t).map(e=>({label:e,value:e}))}},{name:"User ID",label:"User ID",isSearchable:!0,searchFn:async e=>{let{userIds:t}=F,l=e.toLowerCase();return(l?t.filter(e=>e.id.toLowerCase().includes(l)||e.email.toLowerCase().includes(l)):t).map(e=>({label:e.email?`${e.id} (${e.email})`:e.id,value:e.id}))}}],[F]),L=(0,E.useMemo)(()=>[{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(eq.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>o(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.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)(R.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)(R.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",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",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)(R.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:a??"-"})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(eJ.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(p.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(R.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,m.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,m.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(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)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[l.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(eH.Icon,{icon:I[e.row.id]?eU.ChevronDownIcon:eE.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>M(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,H.getModelDisplayName)(e).slice(0,30)}...`:(0,H.getModelDisplayName)(e)})},l)),l.length>3&&!I[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"]})}),I[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,H.getModelDisplayName)(e).slice(0,30)}...`:(0,H.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"]})]})}}],[I]),B=(0,E.useCallback)(e=>{let t="function"==typeof e?e(d):e;if(c(t),t?.length>0){let e=t[0];O({"Sort By":e.id,"Sort Order":e.desc?"desc":"asc"},!0)}},[d,O]),V=(0,eG.useReactTable)({data:C,columns:L,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:d,pagination:u},onSortingChange:B,onPaginationChange:g,getCoreRowModel:(0,eW.getCoreRowModel)(),enableSorting:!0,manualSorting:!0,manualPagination:!0,pageCount:k});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:r?(0,t.jsx)(eX.default,{keyId:r.token,onClose:()=>o(null),keyData:r,teams:[z],onDelete:w}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(eY.default,{options:D,onApplyFilters:O,initialValues:h,onResetFilters:P})}),(0,t.jsx)("div",{className:"flex items-center justify-end w-full mb-4",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[v||S?(0,t.jsx)(eQ.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",y+1," of ",V.getPageCount()]}),v||S?(0,t.jsx)(eQ.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>V.previousPage(),disabled:v||S||!V.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),v||S?(0,t.jsx)(eQ.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>V.nextPage(),disabled:v||S||!V.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(ed.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:V.getCenterTotalSize()},children:[(0,t.jsx)(eu.TableHead,{children:V.getHeaderGroups().map(e=>(0,t.jsx)(eh.TableRow,{children:e.headers.map(e=>(0,t.jsx)(eg.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,eG.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(e$.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(eU.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eK.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${V.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(em.TableBody,{children:v||S?(0,t.jsx)(eh.TableRow,{children:(0,t.jsx)(ec.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading keys..."})})})}):C.length>0?V.getRowModel().rows.map(e=>(0,t.jsx)(eh.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(ec.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,eG.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(eh.TableRow,{children:(0,t.jsx)(ec.TableCell,{colSpan:L.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({teamId:e,onClose:n,accessToken:o,is_team_admin:eo,is_proxy_admin:ed,is_org_admin:em=!1,userModels:ec,editTeam:eu,premiumUser:eg=!1,onUpdate:eh})=>{let ep,ex,e_,ey,ej,ef,[ev,eT]=(0,E.useState)(null),[eS,ew]=(0,E.useState)(!0),[eN,eC]=(0,E.useState)(!1),[ek]=M.Form.useForm(),[eL,eR]=(0,E.useState)(!1),[eV,eU]=(0,E.useState)(null),[eE,e$]=(0,E.useState)(!1),[eK,eG]=(0,E.useState)([]),[eW,eq]=(0,E.useState)(!1),[eH,eJ]=(0,E.useState)({}),{data:eQ,isLoading:eY}=d(),eX=eQ?.globalGuardrailNames??new Set,[eZ,e1]=(0,E.useState)([]),[e4,e2]=(0,E.useState)({}),[e5,e3]=(0,E.useState)(!1),[e6,e8]=(0,E.useState)(null),[e7,e9]=(0,E.useState)(!1),[te,tt]=(0,E.useState)(!1),[tl,ta]=(0,E.useState)(!1),ts=E.default.useRef(null),[ti,tr]=(0,E.useState)(null),{userRole:tn,userId:to}=(0,l.default)(),{data:td=[]}=(0,a.useOrganizations)(),tm=(0,s.useQueryClient)(),tc=(0,E.useMemo)(()=>{let e=ev?.team_info?.organization_id;if(!e||!to)return!1;let t=td.find(t=>t.organization_id===e);return t?.members?.some(e=>e.user_id===to&&"org_admin"===e.user_role)??!1},[ev,td,to]),tu=M.Form.useWatch("models",ek),tg=M.Form.useWatch("disable_global_guardrails",ek),th=(0,E.useMemo)(()=>{let e=tu??ev?.team_info?.models??[];return e.includes("all-proxy-models")||e.includes("all-team-models")?ec:(0,H.unfurlWildcardModelsInList)(e,ec)},[tu,ev,ec]),tp=eo||ed||em||tc,tx=(0,E.useMemo)(()=>{let e;return e=[eM,ez,eF],tp?[...e,eA,eO,eP]:e},[tp]),t_=(0,E.useMemo)(()=>eu&&tp?eP:eM,[eu,tp]),tb=async()=>{try{if(ew(!0),!o)return;let t=await (0,r.teamInfoCall)(o,e);eT(t)}catch(e){ee.default.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{ew(!1)}};(0,E.useEffect)(()=>{tb()},[e,o]),(0,E.useEffect)(()=>{(async()=>{if(!o||!ev?.team_info?.organization_id)return tr(null);try{let e=await (0,r.organizationInfoCall)(o,ev.team_info.organization_id);tr(e)}catch(e){console.error("Error fetching organization info:",e),tr(null)}})()},[o,ev?.team_info?.organization_id]),(0,E.useMemo)(()=>{let e;return e=[],e=ti?ti.models.includes("all-proxy-models")?ec:ti.models.length>0?ti.models:ec:ec,(0,H.unfurlWildcardModelsInList)(e,ec)},[ti,ec]),(0,E.useEffect)(()=>{(async()=>{try{if(!o)return;let e=(await (0,r.getPoliciesList)(o)).policies.map(e=>e.policy_name);e1(e)}catch(e){console.error("Failed to fetch policies:",e)}})()},[o]),(0,E.useEffect)(()=>{(async()=>{if(!o||!ev?.team_info?.policies||0===ev.team_info.policies.length)return;e3(!0);let e={};try{await Promise.all(ev.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]=[]}})),e2(e)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{e3(!1)}})()},[o,ev?.team_info?.policies]);let ty=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),ee.default.success("Team member added successfully"),eC(!1),ek.resetFields();let a=await (0,r.teamInfoCall)(o,e);eT(a),eh(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),ee.default.fromBackend(e),console.error("Error adding team member:",t)}},tj=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,allowed_models:t.allowed_models};B.default.destroy(),await (0,r.teamMemberUpdateCall)(o,e,l),ee.default.success("Team member updated successfully"),eR(!1);let a=await (0,r.teamInfoCall)(o,e);eT(a),eh(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),eR(!1),B.default.destroy(),ee.default.fromBackend(e),console.error("Error updating team member:",t)}},tf=async()=>{if(e6&&o){tt(!0);try{await (0,r.teamMemberDeleteCall)(o,e,e6),ee.default.success("Team member removed successfully");let t=await (0,r.teamInfoCall)(o,e);eT(t),eh(t)}catch(e){ee.default.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}finally{tt(!1),e9(!1),e8(null)}}},tv=async t=>{try{let l;if(!o)return;ta(!0);let s={};try{let{soft_budget_alerting_emails:e,...l}=t.metadata?JSON.parse(t.metadata):{};s=l}catch(e){ee.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){ee.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(eX):Array.from(eX).filter(e=>!(t.guardrails||[]).includes(e)),g={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,guardrails:(t.guardrails||[]).filter(e=>!eX.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!==tT.organization_id?{organization_id:t.organization_id??null}:{}};g.max_budget=(0,c.mapEmptyStringToNull)(g.max_budget),g.team_member_budget_duration=t.team_member_budget_duration,void 0!==t.team_member_budget&&(g.team_member_budget=Number(t.team_member_budget)),void 0!==t.team_member_key_duration&&(g.team_member_key_duration=t.team_member_key_duration),(void 0!==t.team_member_tpm_limit||void 0!==t.team_member_rpm_limit)&&(g.team_member_tpm_limit=i(t.team_member_tpm_limit),g.team_member_rpm_limit=i(t.team_member_rpm_limit));let{servers:h,accessGroups:p,toolsets:x}=t.mcp_servers_and_groups||{servers:[],accessGroups:[],toolsets:[]},_=new Set(h||[]),b=Object.fromEntries(Object.entries(t.mcp_tool_permissions||{}).filter(([e])=>_.has(e)));g.object_permission={},h&&(g.object_permission.mcp_servers=h),p&&(g.object_permission.mcp_access_groups=p),b&&(g.object_permission.mcp_tool_permissions=b),x&&(g.object_permission.mcp_toolsets=x),delete t.mcp_servers_and_groups,delete t.mcp_tool_permissions;let{agents:y,accessGroups:j}=t.agents_and_groups||{agents:[],accessGroups:[]};y&&y.length>0&&(g.object_permission.agents=y),j&&j.length>0&&(g.object_permission.agent_access_groups=j),delete t.agents_and_groups,t.vector_stores&&t.vector_stores.length>0&&(g.object_permission.vector_stores=t.vector_stores),Array.isArray(t.object_permission_search_tools)&&(g.object_permission.search_tools=t.object_permission_search_tools),void 0!==t.access_group_ids&&(g.access_group_ids=t.access_group_ids),void 0!==t.default_team_member_models&&(g.default_team_member_models=t.default_team_member_models);let f=ts.current?.getValue();if(f?.router_settings){let e=e=>null!=e&&""!==e&&!1!==e&&!(Array.isArray(e)&&0===e.length),t=Object.values(f.router_settings).some(e),l=tT.router_settings&&Object.values(tT.router_settings).some(e);(t||l)&&(g.router_settings=f.router_settings)}await (0,r.teamUpdateCall)(o,g),tm.invalidateQueries({queryKey:a.organizationKeys.all}),ee.default.success("Team settings updated successfully"),e$(!1),tb()}catch(e){console.error("Error updating team:",e)}finally{ta(!1)}};if(eS)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!ev?.team_info)return(0,t.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:tT}=ev,tS=tT.metadata?.disable_global_guardrails===!0,tw=new Set(tT.metadata?.opted_out_global_guardrails||[]),tN=(tT.metadata?.guardrails||[]).filter(e=>!eX.has(e)),tC=tS?tN:[...Array.from(eX).filter(e=>!tw.has(e)),...tN],tk=e=>{e.preventDefault(),e.stopPropagation()},tI=async(e,t)=>{await (0,m.copyToClipboard)(e)&&(eJ(e=>({...e,[t]:!0})),setTimeout(()=>{eJ(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)(I.Button,{type:"text",icon:(0,t.jsx)(y.ArrowLeftIcon,{className:"h-4 w-4"}),onClick:n,className:"mb-4",children:"Back to Teams"}),(0,t.jsx)(k.Title,{children:tT.team_alias}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(N.Text,{className:"text-gray-500 font-mono",children:tT.team_id}),(0,t.jsx)(I.Button,{type:"text",size:"small",icon:eH["team-id"]?(0,t.jsx)(V.CheckIcon,{size:12}):(0,t.jsx)(U.CopyIcon,{size:12}),onClick:()=>tI(tT.team_id,"team-id"),className:`left-2 z-10 transition-all duration-200 ${eH["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)(D.Tabs,{defaultActiveKey:t_,className:"mb-4",items:[{key:eM,label:eD[eM],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)(tT.spend,4)]}),(0,t.jsxs)(N.Text,{children:["of ",null===tT.max_budget?"Unlimited":`$${(0,m.formatNumberWithCommas)(tT.max_budget,4)}`]}),tT.budget_duration&&(0,t.jsxs)(N.Text,{className:"text-gray-500",children:["Reset: ",tT.budget_duration]}),(0,t.jsx)("br",{}),tT.team_member_budget_table&&(0,t.jsxs)(N.Text,{className:"text-gray-500",children:["Team Member Budget: $",(0,m.formatNumberWithCommas)(tT.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: ",tT.tpm_limit||"Unlimited"]}),(0,t.jsxs)(N.Text,{children:["RPM: ",tT.rpm_limit||"Unlimited"]}),tT.max_parallel_requests&&(0,t.jsxs)(N.Text,{children:["Max Parallel Requests: ",tT.max_parallel_requests]}),(ep=tT.metadata?.model_tpm_limit??{},ex=tT.metadata?.model_rpm_limit??{},0===(e_=Array.from(new Set([...Object.keys(ep),...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:"}),e_.map(e=>(0,t.jsxs)(N.Text,{className:"text-xs",children:[e,": TPM ",ep[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===tT.models.length||tT.models.includes("all-proxy-models")?(0,t.jsx)(T.Badge,{color:"red",children:"All proxy models"}):(0,t.jsxs)(t.Fragment,{children:[tT.models.map((e,l)=>(0,t.jsx)(T.Badge,{color:"blue",children:e},`direct-${l}`)),(tT.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: ",ev.keys.filter(e=>e.user_id).length]}),(0,t.jsxs)(N.Text,{children:["Service Account Keys: ",ev.keys.filter(e=>!e.user_id).length]}),(0,t.jsxs)(N.Text,{className:"text-gray-500",children:["Total: ",ev.keys.length]})]})]}),(0,t.jsx)(et.default,{objectPermission:tT.object_permission,variant:"card",accessToken:o}),(0,t.jsx)(S.Card,{children:(0,t.jsx)(J,{globalGuardrailNames:eX,teamGuardrails:tT.metadata?.guardrails||[],optedOutGlobalGuardrails:tT.metadata?.opted_out_global_guardrails||[],killSwitchOn:tS,variant:"inline"})}),(0,t.jsxs)(S.Card,{children:[(0,t.jsx)(N.Text,{className:"font-semibold text-gray-900 mb-3",children:"Policies"}),tT.policies&&tT.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:tT.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}),e5&&(0,t.jsx)(N.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!e5&&e4[e]&&e4[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:e4[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:tT.metadata?.logging||[],disabledCallbacks:[],variant:"card"})]})},{key:ez,label:eD[ez],children:(0,t.jsx)(eI,{teamId:e})},{key:eF,label:eD[eF],children:(0,t.jsx)(e0,{teamId:e,teamAlias:tT.team_alias,organization:ti})},{key:eA,label:eD[eA],children:(0,t.jsx)(eB,{teamData:ev,canEditTeam:tp,handleMemberDelete:e=>{e8(e),e9(!0)},setSelectedEditMember:eU,setIsEditMemberModalVisible:eR,setIsAddMemberModalVisible:eC})},{key:eO,label:eD[eO],children:(0,t.jsx)(eb,{teamId:e,accessToken:o,canEditTeam:tp})},{key:eP,label:eD[eP],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"}),tp&&!eE&&(0,t.jsx)(I.Button,{icon:(0,t.jsx)(g.EditOutlined,{className:"h-4 w-4"}),onClick:()=>e$(!0),children:"Edit Settings"})]}),eE&&eY?(0,t.jsx)("div",{className:"p-4",children:"Loading..."}):eE?(0,t.jsxs)(M.Form,{form:ek,onFinish:tv,onValuesChange:e=>{if("disable_global_guardrails"in e){let t=!0===e.disable_global_guardrails,l=(ek.getFieldValue("guardrails")||[]).filter(e=>!eX.has(e));ek.setFieldValue("guardrails",t?l:[...Array.from(eX),...l])}},initialValues:{...tT,team_alias:tT.team_alias,models:tT.models,tpm_limit:tT.tpm_limit,rpm_limit:tT.rpm_limit,object_permission_search_tools:tT.object_permission?.search_tools||[],modelLimits:Array.from(new Set([...Object.keys(tT.metadata?.model_tpm_limit??{}),...Object.keys(tT.metadata?.model_rpm_limit??{})])).map(e=>({model:e,tpm:tT.metadata?.model_tpm_limit?.[e],rpm:tT.metadata?.model_rpm_limit?.[e]})),max_budget:tT.max_budget,soft_budget:tT.soft_budget,budget_duration:tT.budget_duration,team_member_tpm_limit:tT.team_member_budget_table?.tpm_limit,team_member_rpm_limit:tT.team_member_budget_table?.rpm_limit,team_member_budget:tT.team_member_budget_table?.max_budget,team_member_budget_duration:tT.team_member_budget_table?.budget_duration,guardrails:tC,policies:tT.policies||[],disable_global_guardrails:tT.metadata?.disable_global_guardrails||!1,soft_budget_alerting_emails:Array.isArray(tT.metadata?.soft_budget_alerting_emails)?tT.metadata.soft_budget_alerting_emails.join(", "):"",metadata:tT.metadata?JSON.stringify((({logging:e,secret_manager_settings:t,soft_budget_alerting_emails:l,model_tpm_limit:a,model_rpm_limit:s,...i})=>i)(tT.metadata),null,2):"",logging_settings:tT.metadata?.logging||[],secret_manager_settings:tT.metadata?.secret_manager_settings?JSON.stringify(tT.metadata.secret_manager_settings,null,2):"",organization_id:tT.organization_id,vector_stores:tT.object_permission?.vector_stores||[],mcp_servers:tT.object_permission?.mcp_servers||[],mcp_access_groups:tT.object_permission?.mcp_access_groups||[],mcp_servers_and_groups:{servers:tT.object_permission?.mcp_servers||[],accessGroups:tT.object_permission?.mcp_access_groups||[],toolsets:tT.object_permission?.mcp_toolsets||[]},mcp_tool_permissions:tT.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:tT.object_permission?.agents||[],accessGroups:tT.object_permission?.agent_access_groups||[]},access_group_ids:tT.access_group_ids||[],default_team_member_models:tT.default_team_member_models||[]},layout:"vertical",children:[(0,t.jsx)(M.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(z.Input,{type:""})}),(0,t.jsx)(M.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Please select at least one model"}],children:(0,t.jsx)(Z.ModelSelect,{value:ek.getFieldValue("models")||[],onChange:e=>ek.setFieldValue("models",e),teamID:e,organizationID:ev?.team_info?.organization_id||void 0,options:{includeSpecialOptions:!0,includeUserModels:!ev?.team_info?.organization_id,showAllProxyModelsOverride:(0,u.isProxyAdminRole)(tn)&&!ev?.team_info?.organization_id},context:"team",dataTestId:"models-select"})}),(0,t.jsx)(M.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Soft Budget (USD)",name:"soft_budget",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.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)(z.Input,{placeholder:"example1@test.com, example2@test.com"})}),(0,t.jsxs)(j.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)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Default Model Access"," ",(0,t.jsx)(R.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)(M.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.models!==t.models,children:({getFieldValue:e})=>{let l=e("models")||tT.models||[];return(0,t.jsx)(A.Select,{mode:"multiple",placeholder:"Leave empty — all team models accessible to every member",value:ek.getFieldValue("default_team_member_models")||[],onChange:e=>ek.setFieldValue("default_team_member_models",e),options:l.map(e=>({label:e,value:e}))})}})}),(0,t.jsx)(M.Form.Item,{label:"Default Budget (USD)",name:"team_member_budget",tooltip:"Default spend budget for each member in this team.",children:(0,t.jsx)(el.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Default Budget Duration",name:"team_member_budget_duration",children:(0,t.jsx)(W,{onChange:e=>ek.setFieldValue("team_member_budget_duration",e),value:ek.getFieldValue("team_member_budget_duration")})}),(0,t.jsx)(M.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)(M.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)(el.default,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,t.jsx)(M.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)(el.default,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})})]})]}),(0,t.jsx)(M.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(A.Select,{placeholder:"n/a",children:[(0,t.jsx)(A.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(A.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(A.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(M.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(el.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(el.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(M.Form.Item,{label:"Model-Specific Rate Limits",tooltip:"Set per-model TPM/RPM limits that apply across the whole team.",children:(0,t.jsx)(M.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)(M.Form.Item,{...s,name:[l,"model"],rules:[{required:!0,message:"Missing model"},{validator:(e,t)=>t&&(ek.getFieldValue("modelLimits")??[]).filter(e=>e?.model===t).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],style:{minWidth:240},children:(0,t.jsx)(A.Select,{showSearch:!0,placeholder:"Select model",allowClear:!0,options:th.map(e=>({value:e,label:e}))})}),(0,t.jsx)(M.Form.Item,{...s,name:[l,"tpm"],rules:[{validator:async(e,t)=>{let a=(ek.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)(M.Form.Item,{...s,name:[l,"rpm"],children:(0,t.jsx)(F.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(x.MinusCircleOutlined,{onClick:()=>a(l),style:{color:"#ef4444"}})]},e)),(0,t.jsx)(M.Form.Item,{children:(0,t.jsx)(I.Button,{type:"dashed",onClick:()=>l(),block:!0,icon:(0,t.jsx)(_.PlusOutlined,{}),children:"Add Model Limit"})})]})})}),(0,t.jsx)(M.Form.Item,{label:"Router Settings",children:(0,t.jsx)(er.default,{ref:ts,accessToken:o||"",value:tT.router_settings?{router_settings:tT.router_settings}:void 0})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(R.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.jsxs)(A.Select,{mode:"multiple",placeholder:"Select guardrails",optionLabelProp:"label",tagRender:({label:e,value:l,closable:a,onClose:s})=>{let i=eX.has(l);return(0,t.jsxs)(L.Tag,{color:"blue",closable:a,onClose:s,onMouseDown:tk,style:{marginInlineEnd:4},children:[i&&(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4},"aria-label":"Global guardrail"}),e]})},children:[(0,t.jsx)(A.Select.OptGroup,{label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.GlobalOutlined,{style:{marginInlineEnd:4}}),"Global"]}),children:(eQ?.guardrails??[]).filter(e=>e.litellm_params?.default_on).map(e=>(0,t.jsx)(A.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,disabled:tg,children:e.guardrail_name},e.guardrail_name))}),(0,t.jsx)(A.Select.OptGroup,{label:"Other",children:(eQ?.guardrails??[]).filter(e=>!e.litellm_params?.default_on).map(e=>(0,t.jsx)(A.Select.Option,{value:e.guardrail_name,label:e.guardrail_name,children:e.guardrail_name},e.guardrail_name))})]})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable all global guardrails"," ",(0,t.jsx)(R.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)(P.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(R.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)(A.Select,{mode:"tags",placeholder:"Select or enter policies",options:eZ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(M.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(R.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)($.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(M.Form.Item,{label:"Vector Stores",name:"vector_stores","aria-label":"Vector Stores",children:(0,t.jsx)(ea.default,{onChange:e=>ek.setFieldValue("vector_stores",e),value:ek.getFieldValue("vector_stores"),accessToken:o||"",placeholder:"Select vector stores"})}),(0,t.jsx)(M.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(q.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:o||"",placeholder:"Select pass through routes"})}),(0,t.jsx)(M.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(Y.default,{onChange:e=>ek.setFieldValue("mcp_servers_and_groups",e),value:ek.getFieldValue("mcp_servers_and_groups"),accessToken:o||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(M.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(z.Input,{type:"hidden"})}),(0,t.jsx)(M.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:ek.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(M.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(K.default,{onChange:e=>ek.setFieldValue("agents_and_groups",e),value:ek.getFieldValue("agents_and_groups"),accessToken:o||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsxs)(j.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)(M.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)(es,{onChange:e=>ek.setFieldValue("object_permission_search_tools",e),value:ek.getFieldValue("object_permission_search_tools"),accessToken:o||"",placeholder:"Select search tools (optional, empty = all allowed)"})})})]}),(0,t.jsx)(M.Form.Item,{label:"Organization",name:"organization_id",children:(0,t.jsx)(A.Select,{allowClear:!0,placeholder:"Select an organization",showSearch:!0,optionFilterProp:"label",options:td.map(e=>({value:e.organization_id,label:e.organization_alias||e.organization_id}))})}),(0,t.jsx)(M.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ei.default,{value:ek.getFieldValue("logging_settings"),onChange:e=>ek.setFieldValue("logging_settings",e)})}),(0,t.jsx)(M.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:eg?"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)(z.Input.TextArea,{rows:6,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!eg})}),(0,t.jsx)(M.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(z.Input.TextArea,{rows:10})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 pr-0 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(I.Button,{onClick:()=>e$(!1),disabled:tl,children:"Cancel"}),(0,t.jsx)(I.Button,{icon:(0,t.jsx)(b.SaveOutlined,{className:"h-4 w-4"}),type:"primary",htmlType:"submit",loading:tl,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:tT.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:tT.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(tT.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:tT.models.map((e,l)=>(0,t.jsx)(T.Badge,{color:"red",children:e},l))})]}),tT.default_team_member_models&&tT.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:tT.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:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",tT.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",tT.rpm_limit||"Unlimited"]}),(ey=tT.metadata?.model_tpm_limit??{},ej=tT.metadata?.model_rpm_limit??{},0===(ef=Array.from(new Set([...Object.keys(ey),...Object.keys(ej)]))).length?null:(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(N.Text,{className:"text-gray-500",children:"Per-model limits:"}),ef.map(e=>(0,t.jsxs)("div",{className:"text-xs ml-2",children:[e,": TPM ",ey[e]??"—",", RPM ",ej[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!==tT.max_budget?`$${(0,m.formatNumberWithCommas)(tT.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Soft Budget:"," ",null!==tT.soft_budget&&void 0!==tT.soft_budget?`$${(0,m.formatNumberWithCommas)(tT.soft_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Reset: ",tT.budget_duration||"Never"]}),tT.metadata?.soft_budget_alerting_emails&&Array.isArray(tT.metadata.soft_budget_alerting_emails)&&tT.metadata.soft_budget_alerting_emails.length>0&&(0,t.jsxs)("div",{children:["Soft Budget Alerting Emails: ",tT.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)(R.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: ",tT.team_member_budget_table?.max_budget||"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Duration: ",tT.team_member_budget_table?.budget_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["Key Duration: ",tT.metadata?.team_member_key_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["TPM Limit: ",tT.team_member_budget_table?.tpm_limit||"No Limit"]}),(0,t.jsxs)("div",{children:["RPM Limit: ",tT.team_member_budget_table?.rpm_limit||"No Limit"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Router Settings"}),tT.router_settings&&Object.values(tT.router_settings).some(e=>null!=e&&""!==e&&!(Array.isArray(e)&&0===e.length))?(0,t.jsxs)("div",{className:"mt-1 space-y-1",children:[tT.router_settings.routing_strategy&&(0,t.jsxs)("div",{children:["Routing Strategy:"," ",(0,t.jsx)(T.Badge,{color:"blue",children:tT.router_settings.routing_strategy})]}),null!=tT.router_settings.num_retries&&(0,t.jsxs)("div",{children:["Number of Retries: ",tT.router_settings.num_retries]}),null!=tT.router_settings.allowed_fails&&(0,t.jsxs)("div",{children:["Allowed Failures: ",tT.router_settings.allowed_fails]}),null!=tT.router_settings.cooldown_time&&(0,t.jsxs)("div",{children:["Cooldown Time: ",tT.router_settings.cooldown_time,"s"]}),null!=tT.router_settings.timeout&&(0,t.jsxs)("div",{children:["Timeout: ",tT.router_settings.timeout,"s"]}),null!=tT.router_settings.retry_after&&(0,t.jsxs)("div",{children:["Retry After: ",tT.router_settings.retry_after,"s"]}),tT.router_settings.fallbacks&&Array.isArray(tT.router_settings.fallbacks)&&tT.router_settings.fallbacks.length>0&&(0,t.jsxs)("div",{children:["Fallbacks: ",tT.router_settings.fallbacks.length," configured"]}),tT.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:tT.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(N.Text,{className:"font-medium",children:"Status"}),(0,t.jsx)(T.Badge,{color:tT.blocked?"red":"green",children:tT.blocked?"Blocked":"Active"})]}),(0,t.jsx)(et.default,{objectPermission:tT.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:o}),(0,t.jsx)(J,{globalGuardrailNames:eX,teamGuardrails:tT.metadata?.guardrails||[],optedOutGlobalGuardrails:tT.metadata?.opted_out_global_guardrails||[],killSwitchOn:tS,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsx)(Q.default,{loggingConfigs:tT.metadata?.logging||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"}),tT.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 text-xs overflow-x-auto",children:JSON.stringify(tT.metadata.secret_manager_settings,null,2)})]})]})]})}].filter(e=>tx.includes(e.key))}),(0,t.jsx)(en.default,{visible:eL,onCancel:()=>eR(!1),onSubmit:tj,initialData:eV,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)(R.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:"tpm_limit",label:(0,t.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,t.jsx)(R.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)(R.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)(R.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:(tT.models||[]).map(e=>({label:e,value:e})),placeholder:"Leave empty to inherit all team models"}]}}),(0,t.jsx)(i.default,{isVisible:eN,onCancel:()=>eC(!1),onSubmit:ty,accessToken:o,teamId:e}),(0,t.jsx)(G.default,{isOpen:e7,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:e6?.user_id,code:!0},{label:"Email",value:e6?.user_email},{label:"Role",value:e6?.role}],onCancel:()=>{e9(!1),e8(null)},onOk:tf,confirmLoading:te})]})}],56567)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d6be8091255a78cc.js b/litellm/proxy/_experimental/out/_next/static/chunks/d6be8091255a78cc.js deleted file mode 100644 index 65284309a0..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/d6be8091255a78cc.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(708347),r=e.i(135214);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&a.all_admin_roles.includes(s||"")})}])},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d705b57c88e51101.js b/litellm/proxy/_experimental/out/_next/static/chunks/d705b57c88e51101.js deleted file mode 100644 index a3f167f2ba..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/d705b57c88e51101.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),s=e.i(618566),a=e.i(947293),i=e.i(764205),r=e.i(954616),n=e.i(266027),o=e.i(612256);let d=(0,e.i(243652).createQueryKeys)("onboarding");var c=e.i(482725),u=e.i(56456);function g(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(c.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var m=e.i(560445),h=e.i(464571);function x(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(m.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(h.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),f=e.i(808613),y=e.i(311451),w=e.i(898586);function j({variant:e,userEmail:s,isPending:a,claimError:i,onSubmit:r}){let[n]=f.Form.useForm();return l.default.useEffect(()=>{s&&n.setFieldValue("user_email",s)},[s,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(m.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(h.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(f.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>r({password:e.password}),children:[(0,t.jsx)(f.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),i&&(0,t.jsx)(m.Alert,{type:"error",message:i,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(h.Button,{htmlType:"submit",loading:a,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function v({variant:e}){let c=(0,s.useSearchParams)().get("invitation_id"),[u,m]=l.default.useState(null),{data:h,isLoading:p,isError:f}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:d.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,i.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(c),{mutate:y,isPending:w}=(0,r.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:s})=>await (0,i.claimOnboardingToken)(e,t,l,s)}),v=h?.token?(0,a.jwtDecode)(h.token):null,S=v?.user_email??"",b=v?.user_id??null,_=v?.key??null,N=h?.token??null;return p?(0,t.jsx)(g,{}):f?(0,t.jsx)(x,{}):(0,t.jsx)(j,{variant:e,userEmail:S,isPending:w,claimError:u,onSubmit:e=>{_&&N&&b&&c&&(m(null),y({accessToken:_,inviteId:c,userId:b,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,i.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{m(e.message||"Failed to submit. Please try again.")}}))}})}function S(){let e=(0,s.useSearchParams)().get("action");return(0,t.jsx)(v,{variant:"reset_password"===e?"reset_password":"signup"})}function b(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(S,{})})}e.s(["default",()=>b],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),s=e.i(243652),a=e.i(764205),i=e.i(135214);let r=(0,s.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),d=e.i(199133),c=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:s,placeholder:u="Select a key alias",style:g,pageSize:m=50,allowClear:h=!0,disabled:x=!1,allFilters:p})=>{let[f,y]=(0,c.useState)(""),[w,j]=(0,o.useDebouncedState)("",{wait:300}),{data:v,fetchNextPage:S,hasNextPage:b,isFetchingNextPage:_,isLoading:N}=((e=50,t,s)=>{let{accessToken:n}=(0,i.default)();return(0,l.useInfiniteQuery)({queryKey:r.list({filters:{size:e,...t&&{search:t},...s&&{team_id:s}}}),queryFn:async({pageParam:l})=>await (0,a.keyAliasesCall)(n,l,e,t,s),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!v?.pages)return[];let e=new Set,t=[];for(let l of v.pages)for(let s of l.aliases)!s||e.has(s)||(e.add(s),t.push({label:s,value:s}));return t},[v]);return(0,t.jsx)(d.Select,{value:e||void 0,onChange:e=>{s?.(e??"")},placeholder:u,style:{width:"100%",...g},allowClear:h,disabled:x,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),j(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&b&&!_&&S()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:k,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),s=e.i(309426),a=e.i(350967),i=e.i(898586),r=e.i(947293),n=e.i(618566),o=e.i(271645),d=e.i(566606),c=e.i(584578),u=e.i(764205),g=e.i(702597),m=e.i(207082),h=e.i(109799),x=e.i(500330),p=e.i(871943),f=e.i(502547),y=e.i(360820),w=e.i(94629),j=e.i(152990),v=e.i(682830),S=e.i(389083),b=e.i(994388),_=e.i(752978),N=e.i(269200),k=e.i(942232),z=e.i(977572),I=e.i(427612),C=e.i(64848),D=e.i(496020),T=e.i(599724),A=e.i(827252),P=e.i(772345),O=e.i(464571),U=e.i(282786),R=e.i(981339),K=e.i(262218),L=e.i(592968),E=e.i(355619),B=e.i(633627),M=e.i(374009),$=e.i(700514),F=e.i(135214),V=e.i(50882),H=e.i(969550),W=e.i(304911),q=e.i(20147);function J({teams:e,organizations:l,onSortChange:s,currentSort:a}){let{data:r}=(0,h.useOrganizations)(),n=r??l??[],[d,c]=(0,o.useState)(null),[g,J]=o.default.useState(()=>a?[{id:a.sortBy,desc:"desc"===a.sortOrder}]:[{id:"created_at",desc:!0}]),[G,Q]=o.default.useState({pageIndex:0,pageSize:50}),Z=g.length>0?g[0].id:null,X=g.length>0?g[0].desc?"desc":"asc":null,{data:Y,isPending:ee,isFetching:et,isError:el,refetch:es}=(0,m.useKeys)(G.pageIndex+1,G.pageSize,{sortBy:Z||void 0,sortOrder:X||void 0,expand:"user"}),[ea,ei]=(0,o.useState)({}),{filters:er,filteredKeys:en,filteredTotalCount:eo,allTeams:ed,allOrganizations:ec,handleFilterChange:eu,handleFilterReset:eg}=function({keys:e,teams:t,organizations:l}){let s={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:a}=(0,F.default)(),[i,r]=(0,o.useState)(s),[n,d]=(0,o.useState)(t||[]),[c,g]=(0,o.useState)(l||[]),[m,h]=(0,o.useState)(e),[x,p]=(0,o.useState)(null),f=(0,o.useRef)(0),y=(0,o.useCallback)((0,M.default)(async e=>{if(!a)return;let t=Date.now();f.current=t;try{let l=await (0,u.keyListCall)(a,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,$.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===f.current&&l&&(h(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[a]);return(0,o.useEffect)(()=>{if(!e)return void h([]);let t=[...e];i["Team ID"]&&(t=t.filter(e=>e.team_id===i["Team ID"])),i["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===i["Organization ID"])),h(t)},[e,i]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,B.fetchAllTeams)(a);e.length>0&&d(e);let t=await (0,B.fetchAllOrganizations)(a);t.length>0&&g(t)};a&&e()},[a]),(0,o.useEffect)(()=>{t&&t.length>0&&d(e=>e.length{l&&l.length>0&&g(e=>e.length{r({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...i,...e})},handleFilterReset:()=>{r(s),p(null),y(s)}}}({keys:Y?.keys||[],teams:e,organizations:l}),em=(0,o.useDeferredValue)(et),eh=(et||em)&&!el,ex=eo??Y?.total_count??0;(0,o.useEffect)(()=>{if(es){let e=()=>{es()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[es]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)(L.Tooltip,{title:l,children:(0,t.jsx)(b.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:s,overflow:"hidden"},onClick:()=>c(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:l??"-"})}},{id:"status",header:"Status",size:100,enableSorting:!1,cell:({row:e})=>{let l=e.original;if(!0!==l.blocked)return(0,t.jsx)(K.Tag,{color:"green","data-testid":`key-status-${l.token_id}`,children:"Active"});let s=l.metadata?.scim_blocked===!0;return(0,t.jsx)(L.Tooltip,{title:s?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401.",children:(0,t.jsx)(K.Tag,{color:"red","data-testid":`key-status-${l.token_id}`,children:"Blocked"})})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let s=l.getValue();if(!s)return"-";let a=e?.find(e=>e.team_id===s),i=a?.team_alias||s,r=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:i})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let s=n.find(e=>e.organization_id===l),a=s?.organization_alias||l,i=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:a})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(U.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(A.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.user?.user_alias??null,a=l.user?.user_email??l.user_email??null,r=l.user_id??null,n="default_user_id"===r,o=s||a||r,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:a},{label:"User ID",value:r}].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)(i.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||a?(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(W.default,{userId:r})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let s=e.row.original.created_by_user,a=s?.user_alias??null,r=s?.user_email??null,n="default_user_id"===l,o=a||r||l,d=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:r},{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)(i.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||r?(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(U.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(W.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(U.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(A.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let s=new Date(l);return(0,t.jsx)(L.Tooltip,{title:s.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:s.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,x.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,x.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(S.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})}):(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)(_.Icon,{icon:ea[e.row.id]?p.ChevronDownIcon:f.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{ei(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)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,E.getModelDisplayName)(e).slice(0,30)}...`:(0,E.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(S.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(T.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[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)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(T.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(T.Text,{children:e.length>30?`${(0,E.getModelDisplayName)(e).slice(0,30)}...`:(0,E.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"]})]})}}],[e,n]),ef=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ey=(0,j.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:g,pagination:G},onSortingChange:e=>{let t="function"==typeof e?e(g):e;if(J(t),t&&t.length>0){let e=t[0],l=e.id,a=e.desc?"desc":"asc";eu({...er,"Sort By":l,"Sort Order":a},!0),s?.(l,a)}},onPaginationChange:Q,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),getPaginationRowModel:(0,v.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(ex/G.pageSize)});o.default.useEffect(()=>{a&&J([{id:a.sortBy,desc:"desc"===a.sortOrder}])},[a]);let{pageIndex:ew,pageSize:ej}=ey.getState().pagination,ev=Math.min((ew+1)*ej,ex),eS=`${ew*ej+1} - ${ev}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:d?(0,t.jsx)(q.default,{keyId:d.token,onClose:()=>c(null),keyData:d,teams:ed,onDelete:es}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(H.default,{options:ef,onApplyFilters:eu,initialValues:er,onResetFilters:eg})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(R.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",eS," of ",ex," results"]}),(0,t.jsx)(O.Button,{type:"default",icon:(0,t.jsx)(P.SyncOutlined,{spin:eh}),onClick:()=>{es()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(R.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ew+1," of ",ey.getPageCount()]}),ee?(0,t.jsx)(R.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.previousPage(),disabled:ee||!ey.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),ee?(0,t.jsx)(R.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.nextPage(),disabled:ee||!ey.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ey.getCenterTotalSize()},children:[(0,t.jsx)(I.TableHead,{children:ey.getHeaderGroups().map(e=>(0,t.jsx)(D.TableRow,{children:e.headers.map(e=>(0,t.jsx)(C.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(y.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(w.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ey.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(k.TableBody,{children:ee?(0,t.jsx)(D.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ey.getRowModel().rows.map(e=>(0,t.jsx)(D.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(z.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(D.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:m,teams:h,keys:x,setUserRole:p,userEmail:f,setUserEmail:y,setTeams:w,setKeys:j,premiumUser:v,organizations:S,addKey:b,createClicked:_,autoOpenCreate:N,prefillData:k})=>{let[z,I]=(0,o.useState)(null),[C,D]=(0,o.useState)(null),T=(0,n.useSearchParams)(),A=(0,l.getCookie)("token"),P=T.get("invitation_id"),[O,U]=(0,o.useState)(null),[R,K]=(0,o.useState)(null),[L,E]=(0,o.useState)([]),[B,M]=(0,o.useState)(null),[$,F]=(0,o.useState)(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(A){let e=(0,r.jwtDecode)(A);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),U(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),p(t)}else console.log("User role not defined");e.user_email?y(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&O&&m&&!z){let t=sessionStorage.getItem("userModels"+e);t?E(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(C)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(O);M(t);let l=await (0,u.userGetInfoV2)(O,e);I(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let s=(await (0,u.modelAvailableCall)(O,e,m)).data.map(e=>e.id);console.log("available_model_names:",s),E(s),console.log("userModels:",L),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")&&V()}})(),(0,c.fetchTeams)(O,e,m,C,w))}},[e,A,O,m]),(0,o.useEffect)(()=>{O&&(async()=>{try{let e=await (0,u.keyInfoCall)(O,[O]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&V()}})()},[O]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(C)}, accessToken: ${O}, userID: ${e}, userRole: ${m}`),O&&(console.log("fetching teams"),(0,c.fetchTeams)(O,e,m,C,w))},[C]),(0,o.useEffect)(()=>{if(null!==x&&null!=$&&null!==$.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(x)}`),x))$.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===$.team_id&&(e+=t.spend);console.log(`sum: ${e}`),K(e)}else if(null!==x){let e=0;for(let t of x)e+=t.spend;K(e)}},[$]),null!=P)return(0,t.jsx)(d.default,{});function V(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==A)return console.log("All cookies before redirect:",document.cookie),V(),null;try{let e=(0,r.jwtDecode)(A);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),V(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),V(),null}if(null==O)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==m&&p("App Owner"),m&&"Admin Viewer"==m){let{Title:e,Paragraph:l}=i.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",$),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(a.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(s.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(g.default,{team:$,teams:h,data:x,addKey:b,autoOpenCreate:N,prefillData:k},$?$.team_id:null),(0,t.jsx)(J,{teams:h,organizations:S})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d8cd2d44272d51c8.js b/litellm/proxy/_experimental/out/_next/static/chunks/d8cd2d44272d51c8.js deleted file mode 100644 index e23de22938..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/d8cd2d44272d51c8.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",()=>t],727612)},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},878894,664659,531278,e=>{"use strict";var t=e.i(582458);e.s(["AlertTriangle",()=>t.default],878894);var s=e.i(631171);e.s(["ChevronDown",()=>s.default],664659);let r=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>r],531278)},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",()=>t])},438957,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={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 l=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["KeyOutlined",0,i],438957)},366308,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={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 l=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ToolOutlined",0,i],366308)},313603,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={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 l=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["SettingOutlined",0,i],313603)},872934,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"};var l=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ExportOutlined",0,i],872934)},232164,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"};var l=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["TagsOutlined",0,i],232164)},210612,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={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 l=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["DatabaseOutlined",0,i],210612)},218129,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={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=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["ApiOutlined",0,i],218129)},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},475647,286536,77705,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};var l=e.i(9583),i=s.forwardRef(function(e,i){return s.createElement(l.default,(0,t.default)({},e,{ref:i,icon:r}))});e.s(["PlusCircleOutlined",0,i],475647);var a=e.i(475254);let n=(0,a.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",()=>n],286536);let o=(0,a.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",()=>o],77705)},366283,e=>{"use strict";var t=e.i(290571),s=e.i(271645),r=e.i(95779),l=e.i(444755),i=e.i(673706);let a=(0,i.makeClassName)("Callout"),n=s.default.forwardRef((e,n)=>{let{title:o,icon:c,color:d,className:u,children:p}=e,m=(0,t.__rest)(e,["title","icon","color","className","children"]);return s.default.createElement("div",Object.assign({ref:n,className:(0,l.tremorTwMerge)(a("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",d?(0,l.tremorTwMerge)((0,i.getColorClassNames)(d,r.colorPalette.background).bgColor,(0,i.getColorClassNames)(d,r.colorPalette.darkBorder).borderColor,(0,i.getColorClassNames)(d,r.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,l.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},m),s.default.createElement("div",{className:(0,l.tremorTwMerge)(a("header"),"flex items-start")},c?s.default.createElement(c,{className:(0,l.tremorTwMerge)(a("icon"),"flex-none h-5 w-5 mr-1.5")}):null,s.default.createElement("h4",{className:(0,l.tremorTwMerge)(a("title"),"font-semibold")},o)),s.default.createElement("p",{className:(0,l.tremorTwMerge)(a("body"),"overflow-y-auto",p?"mt-2":"")},p))});n.displayName="Callout",e.s(["Callout",()=>n],366283)},105278,e=>{"use strict";var t=e.i(843476),s=e.i(135214),r=e.i(994388),l=e.i(366283),i=e.i(304967),a=e.i(269200),n=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),p=e.i(560445),m=e.i(464571),h=e.i(808613),g=e.i(311451),_=e.i(212931),x=e.i(770914),f=e.i(653496),y=e.i(898586),j=e.i(271645),v=e.i(844444),S=e.i(700514),b=e.i(727749),w=e.i(764205),I=e.i(629569),C=e.i(599724),T=e.i(350967),k=e.i(779241),E=e.i(114600),N=e.i(237016),O=e.i(596239),M=e.i(438957),A=e.i(166406),F=e.i(270377),P=e.i(475647),z=e.i(190702);let B=({accessToken:e,userID:s,proxySettings:a})=>{let[n]=h.Form.useForm(),[o,c]=(0,j.useState)(!1),[d,u]=(0,j.useState)(null),[p,m]=(0,j.useState)("");(0,j.useEffect)(()=>{let e="";m(e=a&&a.PROXY_BASE_URL&&void 0!==a.PROXY_BASE_URL?a.PROXY_BASE_URL:window.location.origin)},[a]);let g=`${p}/scim/v2`,_=async t=>{if(!e||!s)return void b.default.fromBackend("You need to be logged in to create a SCIM token");try{c(!0);let r={key_alias:t.key_alias||"SCIM Access Token",team_id:null,models:[],allowed_routes:["/scim/*"]},l=await (0,w.keyCreateCall)(e,s,r);u(l),b.default.success("SCIM token created successfully")}catch(e){console.error("Error creating SCIM token:",e),b.default.fromBackend("Failed to create SCIM token: "+(0,z.parseErrorMessage)(e))}finally{c(!1)}};return(0,t.jsx)(T.Grid,{numItems:1,children:(0,t.jsxs)(i.Card,{children:[(0,t.jsx)("div",{className:"flex items-center mb-4",children:(0,t.jsx)(I.Title,{children:"SCIM Configuration"})}),(0,t.jsx)(C.Text,{className:"text-gray-600",children:"System for Cross-domain Identity Management (SCIM) allows you to automatically provision and manage users and groups in LiteLLM."}),(0,t.jsx)(E.Divider,{}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"1"}),(0,t.jsxs)(I.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(O.LinkOutlined,{className:"h-5 w-5 mr-2"}),"SCIM Tenant URL"]})]}),(0,t.jsx)(C.Text,{className:"text-gray-600 mb-3",children:"Use this URL in your identity provider SCIM integration settings."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:g,disabled:!0,className:"flex-grow"}),(0,t.jsx)(N.CopyToClipboard,{text:g,onCopy:()=>b.default.success("URL copied to clipboard"),children:(0,t.jsxs)(r.Button,{variant:"primary",className:"ml-2 flex items-center",children:[(0,t.jsx)(A.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"2"}),(0,t.jsxs)(I.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(M.KeyOutlined,{className:"h-5 w-5 mr-2"}),"Authentication Token"]})]}),(0,t.jsx)(l.Callout,{title:"Using SCIM",color:"blue",className:"mb-4",children:"You need a SCIM token to authenticate with the SCIM API. Create one below and use it in your SCIM provider configuration."}),d?(0,t.jsxs)(i.Card,{className:"border border-yellow-300 bg-yellow-50",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-yellow-800",children:[(0,t.jsx)(F.ExclamationCircleOutlined,{className:"h-5 w-5 mr-2"}),(0,t.jsx)(I.Title,{className:"text-lg text-yellow-800",children:"Your SCIM Token"})]}),(0,t.jsx)(C.Text,{className:"text-yellow-800 mb-4 font-medium",children:"Make sure to copy this token now. You will not be able to see it again."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:d.key,className:"flex-grow mr-2 bg-white",type:"password",disabled:!0}),(0,t.jsx)(N.CopyToClipboard,{text:d.key,onCopy:()=>b.default.success("Token copied to clipboard"),children:(0,t.jsxs)(r.Button,{variant:"primary",className:"flex items-center",children:[(0,t.jsx)(A.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]}),(0,t.jsxs)(r.Button,{className:"mt-4 flex items-center",variant:"secondary",onClick:()=>u(null),children:[(0,t.jsx)(P.PlusCircleOutlined,{className:"h-4 w-4 mr-1"}),"Create Another Token"]})]}):(0,t.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,t.jsxs)(h.Form,{form:n,onFinish:_,layout:"vertical",children:[(0,t.jsx)(h.Form.Item,{name:"key_alias",label:"Token Name",rules:[{required:!0,message:"Please enter a name for your token"}],children:(0,t.jsx)(k.TextInput,{placeholder:"SCIM Access Token"})}),(0,t.jsx)(h.Form.Item,{children:(0,t.jsxs)(r.Button,{variant:"primary",type:"submit",loading:o,className:"flex items-center",children:[(0,t.jsx)(M.KeyOutlined,{className:"h-4 w-4 mr-1"}),"Create SCIM Token"]})})]})})]})]})]})})};var L=e.i(266027),U=e.i(243652);let R=(0,U.createQueryKeys)("sso"),D=()=>{let{accessToken:e,userId:t,userRole:r}=(0,s.default)();return(0,L.useQuery)({queryKey:R.detail("settings"),queryFn:async()=>await (0,w.getSSOSettings)(e),enabled:!!(e&&t&&r)})};var V=e.i(175712),G=e.i(869216),q=e.i(262218),H=e.i(688511),K=e.i(98919),$=e.i(727612);let Q={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},Y={google:"Google SSO",microsoft:"Microsoft SSO",okta:"Okta / Auth0 SSO",generic:"Generic SSO"},W={internal_user_viewer:"Internal Viewer",internal_user:"Internal User",proxy_admin_viewer:"Proxy Admin Viewer",proxy_admin:"Proxy Admin"};var J=e.i(536916),Z=e.i(199133);let X={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},ee=({form:e,onFormSubmit:s})=>(0,t.jsx)("div",{children:(0,t.jsxs)(h.Form,{form:e,onFinish:s,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(h.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(Z.Select,{children:Object.entries(Q).map(([e,s])=>(0,t.jsx)(Z.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,t.jsx)("img",{src:s,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsx)("span",{children:Y[e]||e.charAt(0).toUpperCase()+e.slice(1)+" SSO"})]})},e))})}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s,r=e("sso_provider");return r&&(s=X[r])?s.fields.map(e=>(0,t.jsx)(h.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(g.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(h.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(h.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(h.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_role_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsx)(h.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_role_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(Z.Select,{children:[(0,t.jsx)(Z.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(h.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(h.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(h.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(h.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null}}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(h.Form.Item,{label:"Use Team Mappings",name:"use_team_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_team_mappings!==t.use_team_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_team_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsx)(h.Form.Item,{label:"Team IDs JWT Field",name:"team_ids_jwt_field",rules:[{required:!0,message:"Please enter the team IDs JWT field"}],children:(0,t.jsx)(k.TextInput,{})}):null}})]})});var et=e.i(954616);let es=()=>{let{accessToken:e}=(0,s.default)();return(0,et.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await (0,w.updateSSOSettings)(e,t)}})},er=e=>{let{proxy_admin_teams:t,admin_viewer_teams:s,internal_user_teams:r,internal_viewer_teams:l,default_role:i,group_claim:a,use_role_mappings:n,use_team_mappings:o,team_ids_jwt_field:c,...d}=e,u={...d},p=d.sso_provider;if(n&&("okta"===p||"generic"===p)){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:a,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[i]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(s),internal_user:e(r),internal_user_viewer:e(l)}}}return o&&("okta"===p||"generic"===p)&&(u.team_mappings={team_ids_jwt_field:c}),u},el=e=>e.google_client_id?"google":e.microsoft_client_id?"microsoft":e.generic_client_id?e.generic_authorization_endpoint?.includes("okta")||e.generic_authorization_endpoint?.includes("auth0")?"okta":"generic":null,ei=({isVisible:e,onCancel:s,onSuccess:r})=>{let[l]=h.Form.useForm(),{mutateAsync:i,isPending:a}=es(),n=async e=>{let t=er(e);await i(t,{onSuccess:()=>{b.default.success("SSO settings added successfully"),r()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,z.parseErrorMessage)(e))}})},o=()=>{l.resetFields(),s()};return(0,t.jsx)(_.Modal,{title:"Add SSO",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:o,disabled:a,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:a,onClick:()=>l.submit(),children:a?"Adding...":"Add SSO"})]}),onCancel:o,children:(0,t.jsx)(ee,{form:l,onFormSubmit:n})})};var ea=e.i(127952);let en=({isVisible:e,onCancel:s,onSuccess:r})=>{let{data:l}=D(),{mutateAsync:i,isPending:a}=es(),n=async()=>{await i({google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null,team_mappings:null},{onSuccess:()=>{b.default.success("SSO settings cleared successfully"),s(),r()},onError:e=>{b.default.fromBackend("Failed to clear SSO settings: "+(0,z.parseErrorMessage)(e))}})};return(0,t.jsx)(ea.default,{isOpen:e,title:"Confirm Clear SSO Settings",alertMessage:"This action cannot be undone.",message:"Are you sure you want to clear all SSO settings? Users will no longer be able to login using SSO after this change.",resourceInformationTitle:"SSO Settings",resourceInformation:[{label:"Provider",value:l?.values&&el(l?.values)||"Generic"}],onCancel:s,onOk:n,confirmLoading:a})},eo=({isVisible:e,onCancel:s,onSuccess:r})=>{let[l]=h.Form.useForm(),i=D(),{mutateAsync:a,isPending:n}=es();(0,j.useEffect)(()=>{if(e&&i.data&&i.data.values){let e=i.data;console.log("Raw SSO data received:",e),console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let s={};if(e.values.role_mappings){let t=e.values.role_mappings,r=e=>e&&0!==e.length?e.join(", "):"";s={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:r(t.roles?.proxy_admin),admin_viewer_teams:r(t.roles?.proxy_admin_viewer),internal_user_teams:r(t.roles?.internal_user),internal_viewer_teams:r(t.roles?.internal_user_viewer)}}let r={};e.values.team_mappings&&(r={use_team_mappings:!0,team_ids_jwt_field:e.values.team_mappings.team_ids_jwt_field});let a={sso_provider:t,...e.values,...s,...r};console.log("Setting form values:",a),l.resetFields(),setTimeout(()=>{l.setFieldsValue(a),console.log("Form values set, current form values:",l.getFieldsValue())},100)}},[e,i.data,l]);let o=async e=>{try{let t=er(e);await a(t,{onSuccess:()=>{b.default.success("SSO settings updated successfully"),r()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,z.parseErrorMessage)(e))}})}catch(e){b.default.fromBackend("Failed to process SSO settings: "+(0,z.parseErrorMessage)(e))}},c=()=>{l.resetFields(),s()};return(0,t.jsx)(_.Modal,{title:"Edit SSO Settings",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:c,disabled:n,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:n,onClick:()=>l.submit(),children:n?"Saving...":"Save"})]}),onCancel:c,children:(0,t.jsx)(ee,{form:l,onFormSubmit:o})})};var ec=e.i(286536),ed=e.i(77705);function eu({defaultHidden:e=!0,value:s}){let[r,l]=(0,j.useState)(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-gray-600 flex-1",children:s?r?"•".repeat(s.length):s:(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})}),s&&(0,t.jsx)(m.Button,{type:"text",size:"small",icon:r?(0,t.jsx)(ec.Eye,{className:"w-4 h-4"}):(0,t.jsx)(ed.EyeOff,{className:"w-4 h-4"}),onClick:()=>l(!r),className:"text-gray-400 hover:text-gray-600"})]})}var ep=e.i(312361),em=e.i(291542),eh=e.i(761911);let{Title:eg,Text:e_}=y.Typography;function ex({roleMappings:e}){if(!e)return null;let s=[{title:"Role",dataIndex:"role",key:"role",render:e=>(0,t.jsx)(e_,{strong:!0,children:W[e]})},{title:"Mapped Groups",dataIndex:"groups",key:"groups",render:e=>(0,t.jsx)(t.Fragment,{children:e.length>0?e.map((e,s)=>(0,t.jsx)(q.Tag,{color:"blue",children:e},s)):(0,t.jsx)(e_,{className:"text-gray-400 italic",children:"No groups mapped"})})}];return(0,t.jsxs)(V.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(eh.Users,{className:"w-6 h-6 text-gray-400 mb-2"}),(0,t.jsx)(eg,{level:3,children:"Role Mappings"})]}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eg,{level:5,children:"Group Claim"}),(0,t.jsx)("div",{children:(0,t.jsx)(e_,{code:!0,children:e.group_claim})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg,{level:5,children:"Default Role"}),(0,t.jsx)("div",{children:(0,t.jsx)(e_,{strong:!0,children:W[e.default_role]})})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(em.Table,{columns:s,dataSource:Object.entries(e.roles).map(([e,t])=>({role:e,groups:t})),pagination:!1,bordered:!0,size:"small",className:"w-full"})]})]})}var ef=e.i(21548);let{Title:ey,Paragraph:ej}=y.Typography;function ev({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(ef.Empty,{image:ef.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ey,{level:4,children:"No SSO Configuration Found"}),(0,t.jsx)(ej,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Single Sign-On (SSO) to enable seamless authentication for your team members using your identity provider."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure SSO"})})})}var eS=e.i(981339);let{Title:eb,Text:ew}=y.Typography;function eI(){return(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(K.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eb,{level:3,children:"SSO Configuration"}),(0,t.jsx)(ew,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(eS.Skeleton.Button,{active:!0,size:"default",style:{width:170,height:32}}),(0,t.jsx)(eS.Skeleton.Button,{active:!0,size:"default",style:{width:190,height:32}})]})]}),(0,t.jsxs)(G.Descriptions,{bordered:!0,...{column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},children:[(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:100,height:16}})})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:200,height:16}})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:250,height:16}})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:180,height:16}})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:220,height:16}})})]})]})})}let{Title:eC,Text:eT}=y.Typography;function ek(){let{data:e,refetch:s,isLoading:r}=D(),[l,i]=(0,j.useState)(!1),[a,n]=(0,j.useState)(!1),[o,c]=(0,j.useState)(!1),d=!!e?.values.google_client_id||!!e?.values.microsoft_client_id||!!e?.values.generic_client_id,u=e?.values?el(e.values):null,p=!!e?.values.role_mappings,h=!!e?.values.team_mappings,g=e=>(0,t.jsx)(eT,{className:"font-mono text-gray-600 text-sm",copyable:!!e,children:e||"-"}),_=e=>e||(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),f=e=>e.team_mappings?.team_ids_jwt_field?(0,t.jsx)(q.Tag,{children:e.team_mappings.team_ids_jwt_field}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),y={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},v={google:{providerText:Y.google,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.google_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.google_client_secret})},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)}]},microsoft:{providerText:Y.microsoft,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.microsoft_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.microsoft_client_secret})},{label:"Tenant",render:e=>_(e.microsoft_tenant)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)}]},okta:{providerText:Y.okta,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>g(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>g(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>g(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)},h?{label:"Team IDs JWT Field",render:e=>f(e)}:null]},generic:{providerText:Y.generic,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>g(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>g(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>g(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)},h?{label:"Team IDs JWT Field",render:e=>f(e)}:null]}};return(0,t.jsxs)(t.Fragment,{children:[r?(0,t.jsx)(eI,{}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(K.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eC,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eT,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(H.Edit,{className:"w-4 h-4"}),onClick:()=>c(!0),children:"Edit SSO Settings"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)($.Trash2,{className:"w-4 h-4"}),onClick:()=>i(!0),children:"Delete SSO Settings"})]})})]}),d?(()=>{if(!e?.values||!u)return null;let{values:s}=e,r=v[u];return r?(0,t.jsxs)(G.Descriptions,{bordered:!0,...y,children:[(0,t.jsx)(G.Descriptions.Item,{label:"Provider",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Q[u]&&(0,t.jsx)("img",{src:Q[u],alt:u,style:{height:24,width:24,objectFit:"contain"}}),(0,t.jsx)("span",{children:r.providerText})]})}),r.fields.map((e,r)=>e&&(0,t.jsx)(G.Descriptions.Item,{label:e.label,children:e.render(s)},r))]}):null})():(0,t.jsx)(ev,{onAdd:()=>n(!0)})]})}),p&&(0,t.jsx)(ex,{roleMappings:e?.values.role_mappings})]}),(0,t.jsx)(en,{isVisible:l,onCancel:()=>i(!1),onSuccess:()=>s()}),(0,t.jsx)(ei,{isVisible:a,onCancel:()=>n(!1),onSuccess:()=>{n(!1),s()}}),(0,t.jsx)(eo,{isVisible:o,onCancel:()=>c(!1),onSuccess:()=>{c(!1),s()}})]})}var eE=e.i(292639),eN=e.i(912598);let eO=(0,U.createQueryKeys)("uiSettings");var eM=e.i(111672);let eA={"api-keys":"Manage virtual keys for API access and authentication","llm-playground":"Interactive playground for testing LLM requests",models:"Configure and manage LLM models and endpoints",agents:"Create and manage AI agents","mcp-servers":"Configure Model Context Protocol servers",memory:"Inspect and manage agent memory entries stored under /v1/memory",guardrails:"Set up content moderation and safety guardrails",policies:"Define access control and usage policies","search-tools":"Configure RAG search and retrieval tools","tool-policies":"Configure tool use policies and permissions","vector-stores":"Manage vector databases for embeddings",new_usage:"View usage analytics and metrics",logs:"Access request and response logs","guardrails-monitor":"Monitor guardrail performance and view logs",users:"Manage internal user accounts and permissions",teams:"Create and manage teams for access control",organizations:"Manage organizations and their members",projects:"Manage projects within teams","access-groups":"Manage access groups for role-based permissions",budgets:"Set and monitor spending budgets","api-reference":"Browse API documentation and endpoints","model-hub-table":"Explore available AI models and providers","learning-resources":"Access tutorials and documentation",caching:"Configure response caching settings","transform-request":"Set up request transformation rules","cost-tracking":"Track and analyze API costs","ui-theme":"Customize dashboard appearance","tag-management":"Organize resources with tags",prompts:"Manage and version prompt templates",skills:"Browse and manage Claude Code skills",usage:"View legacy usage dashboard","router-settings":"Configure routing and load balancing settings","logging-and-alerts":"Set up logging and alert configurations","admin-panel":"Access admin panel and settings"};var eF=e.i(708347);let eP=e=>!e||0===e.length||e.some(e=>eF.internalUserRoles.includes(e));var ez=e.i(362024);function eB({enabledPagesInternalUsers:e,enabledPagesPropertyDescription:s,isUpdating:r,onUpdate:l}){let i=null!=e,a=(0,j.useMemo)(()=>{let e;return e=[],eM.menuGroups.forEach(t=>{t.items.forEach(s=>{if(s.page&&"tools"!==s.page&&"experimental"!==s.page&&"settings"!==s.page&&eP(s.roles)){let r="string"==typeof s.label?s.label:s.key;e.push({page:s.page,label:r,group:t.groupLabel,description:eA[s.page]||"No description available"})}if(s.children){let r="string"==typeof s.label?s.label:s.key;s.children.forEach(s=>{if(eP(s.roles)){let l="string"==typeof s.label?s.label:s.key;e.push({page:s.page,label:l,group:`${t.groupLabel} > ${r}`,description:eA[s.page]||"No description available"})}})}})}),e},[]),n=(0,j.useMemo)(()=>{let e={};return a.forEach(t=>{e[t.group]||(e[t.group]=[]),e[t.group].push(t)}),e},[a]),[o,c]=(0,j.useState)(e||[]);return(0,j.useMemo)(()=>{e?c(e):c([])},[e]),(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsxs)(x.Space,{align:"center",children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Internal User Page Visibility"}),!i&&(0,t.jsx)(q.Tag,{color:"default",style:{marginLeft:"8px"},children:"Not set (all pages visible)"}),i&&(0,t.jsxs)(q.Tag,{color:"blue",style:{marginLeft:"8px"},children:[o.length," page",1!==o.length?"s":""," selected"]})]}),s&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:s}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"By default, all pages are visible to internal users. Select specific pages to restrict visibility."}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",color:"#8b5cf6"},children:"Note: Only pages accessible to internal user roles are shown here. Admin-only pages are excluded as they cannot be made visible to internal users regardless of this setting."})]}),(0,t.jsx)(ez.Collapse,{items:[{key:"page-visibility",label:"Configure Page Visibility",children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(J.Checkbox.Group,{value:o,onChange:c,style:{width:"100%"},children:(0,t.jsx)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:Object.entries(n).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Typography.Text,{strong:!0,style:{fontSize:"11px",color:"#6b7280",letterSpacing:"0.05em",display:"block",marginBottom:"8px"},children:e}),(0,t.jsx)(x.Space,{direction:"vertical",size:"small",style:{marginLeft:"16px",width:"100%"},children:s.map(e=>(0,t.jsx)("div",{style:{marginBottom:"4px"},children:(0,t.jsx)(J.Checkbox,{value:e.page,children:(0,t.jsxs)(x.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(y.Typography.Text,{children:e.label}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px"},children:e.description})]})})},e.page))})]},e))})}),(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{type:"primary",onClick:()=>{l({enabled_ui_pages_internal_users:o.length>0?o:null})},loading:r,disabled:r,children:"Save Page Visibility Settings"}),i&&(0,t.jsx)(m.Button,{onClick:()=>{c([]),l({enabled_ui_pages_internal_users:null})},loading:r,disabled:r,children:"Reset to Default (All Pages)"})]})]})}]})]})}var eL=e.i(790848);function eU(){let e,{accessToken:r}=(0,s.default)(),{data:l,isLoading:i,isError:a,error:n}=(0,eE.useUISettings)(),{mutate:o,isPending:c,error:d}=(e=(0,eN.useQueryClient)(),(0,et.useMutation)({mutationFn:async e=>{if(!r)throw Error("Access token is required");return(0,w.updateUiSettings)(r,e)},onSuccess:()=>{e.invalidateQueries({queryKey:eO.all})}})),u=l?.field_schema,m=u?.properties?.disable_model_add_for_internal_users,h=u?.properties?.disable_team_admin_delete_team_user,g=u?.properties?.require_auth_for_public_ai_hub,_=u?.properties?.forward_client_headers_to_llm_api,f=u?.properties?.forward_llm_provider_auth_headers,j=u?.properties?.enable_projects_ui,v=u?.properties?.enabled_ui_pages_internal_users,S=u?.properties?.disable_agents_for_internal_users,I=u?.properties?.allow_agents_for_team_admins,C=u?.properties?.disable_vector_stores_for_internal_users,T=u?.properties?.allow_vector_stores_for_team_admins,k=u?.properties?.scope_user_search_to_org,E=u?.properties?.disable_custom_api_keys,N=l?.values??{},O=!!N.disable_model_add_for_internal_users,M=!!N.disable_team_admin_delete_team_user,A=!!N.disable_agents_for_internal_users,F=!!N.disable_vector_stores_for_internal_users;return(0,t.jsx)(V.Card,{title:"UI Settings",children:i?(0,t.jsx)(eS.Skeleton,{active:!0}):a?(0,t.jsx)(p.Alert,{type:"error",message:"Could not load UI settings",description:n instanceof Error?n.message:void 0}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[u?.description&&(0,t.jsx)(y.Typography.Paragraph,{style:{marginBottom:0},children:u.description}),d&&(0,t.jsx)(p.Alert,{type:"error",message:"Could not update UI settings",description:d instanceof Error?d.message:void 0}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:O,disabled:c,loading:c,onChange:e=>{o({disable_model_add_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":m?.description??"Disable model add for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable model add for internal users"}),m?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:m.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:M,disabled:c,loading:c,onChange:e=>{o({disable_team_admin_delete_team_user:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":h?.description??"Disable team admin delete team user"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable team admin delete team user"}),h?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:h.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:N.require_auth_for_public_ai_hub,disabled:c,loading:c,onChange:e=>{o({require_auth_for_public_ai_hub:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":g?.description??"Require authentication for public AI Hub"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Require authentication for public AI Hub"}),g?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:g.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:!!N.forward_client_headers_to_llm_api,disabled:c,loading:c,onChange:e=>{o({forward_client_headers_to_llm_api:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":_?.description??"Forward client headers to LLM API"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Forward client headers to LLM API"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:_?.description??"Forwards client headers (Authorization, anthropic-beta, and x-* custom headers) to the upstream LLM. Enable for Claude Code with a Max subscription (forwards the OAuth token) or to pass custom/tracing headers through to the provider. Independent of the BYOK toggle — enable only the one(s) you need."})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:!!N.forward_llm_provider_auth_headers,disabled:c,loading:c,onChange:e=>{o({forward_llm_provider_auth_headers:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":f?.description??"Forward LLM provider auth headers"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Forward LLM provider auth headers"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:f?.description??"Forwards provider auth headers (x-api-key, x-goog-api-key, api-key, ocp-apim-subscription-key) to the upstream LLM, overriding any deployment-configured key for that request. Enable for Claude Code BYOK (clients bring their own API key). Independent of the client-headers toggle — enable only the one(s) you need."})]})]}),j&&(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:!!N.enable_projects_ui,disabled:c,loading:c,onChange:e=>{o({enable_projects_ui:e},{onSuccess:()=>{b.default.success("UI settings updated successfully. Refreshing page..."),setTimeout(()=>window.location.reload(),1e3)},onError:e=>{b.default.fromBackend(e)}})},"aria-label":j.description??"Enable Projects UI"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"[BETA] Enable Projects (page will refresh)"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:j.description??"If enabled, shows the Projects feature in the UI sidebar and the project field in key management."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:A,disabled:c,loading:c,onChange:e=>{o({disable_agents_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":S?.description??"Disable agents for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable agents for internal users"}),S?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:S.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(eL.Switch,{checked:!!N.allow_agents_for_team_admins,disabled:c||!A,loading:c,onChange:e=>{o({allow_agents_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":I?.description??"Allow agents for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:A?void 0:"secondary",children:"Allow agents for team admins"}),I?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:I.description})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:F,disabled:c,loading:c,onChange:e=>{o({disable_vector_stores_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":C?.description??"Disable vector stores for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable vector stores for internal users"}),C?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:C.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(eL.Switch,{checked:!!N.allow_vector_stores_for_team_admins,disabled:c||!F,loading:c,onChange:e=>{o({allow_vector_stores_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":T?.description??"Allow vector stores for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:F?void 0:"secondary",children:"Allow vector stores for team admins"}),T?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:T.description})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:!!N.scope_user_search_to_org,disabled:c,loading:c,onChange:e=>{o({scope_user_search_to_org:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":k?.description??"Scope user search to organization"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Scope user search to organization"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:k?.description??"If enabled, the user search endpoint restricts results by organization. When off, any authenticated user can search all users."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eL.Switch,{checked:!!N.disable_custom_api_keys,disabled:c,loading:c,onChange:e=>{o({disable_custom_api_keys:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":E?.description??"Disable custom Virtual key values"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable custom Virtual key values"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:E?.description??"If true, users cannot specify custom key values. All keys must be auto-generated."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(eB,{enabledPagesInternalUsers:N.enabled_ui_pages_internal_users,enabledPagesPropertyDescription:v?.description,isUpdating:c,onUpdate:e=>{o(e,{onSuccess:()=>{b.default.success("Page visibility settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})}})]})})}let eR=async e=>{let t=(0,w.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",r=await fetch(s,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,w.deriveErrorMessage)(e))}return await r.json()},eD=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),r=s?`${s}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",l=await fetch(r,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json();throw Error((0,w.deriveErrorMessage)(e))}return await l.json()},eV=async e=>{let t=(0,w.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",r=await fetch(s,{method:"DELETE",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,w.deriveErrorMessage)(e))}return await r.json()},eG=async e=>{let t=(0,w.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault/test_connection`:"/config_overrides/hashicorp_vault/test_connection",r=await fetch(s,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,w.deriveErrorMessage)(e))}return await r.json()},eq=(0,U.createQueryKeys)("hashicorpVaultConfig"),eH=()=>{let{accessToken:e}=(0,s.default)();return(0,L.useQuery)({queryKey:eq.list({}),queryFn:async()=>{if(!e)throw Error("Access token is required");return eR(e)},enabled:!!e,staleTime:36e5,gcTime:36e5})},eK=e=>{let t=(0,eN.useQueryClient)();return(0,et.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return eD(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:eq.all})}})};var e$=e.i(525720),eQ=e.i(475254);let eY=(0,eQ.default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]),eW=(0,eQ.default)("plug-zap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]),eJ=new Set(["vault_token","approle_secret_id","client_key"]),eZ={vault_addr:"Vault Address",vault_namespace:"Namespace",vault_mount_name:"KV Mount Name",vault_path_prefix:"Path Prefix",vault_token:"Token",approle_role_id:"Role ID",approle_secret_id:"Secret ID",approle_mount_path:"Mount Path",client_cert:"Client Certificate",client_key:"Client Key",vault_cert_role:"Certificate Role"},eX=[{title:"Connection",fields:["vault_addr","vault_namespace","vault_mount_name","vault_path_prefix"]},{title:"Token Authentication",subtitle:"Use a Vault token to authenticate. Only one auth method is required.",fields:["vault_token"]},{title:"AppRole Authentication",subtitle:"Use AppRole credentials to authenticate. Only one auth method is required.",fields:["approle_role_id","approle_secret_id","approle_mount_path"]},{title:"TLS",subtitle:"Optional client certificate for mTLS.",fields:["client_cert","client_key","vault_cert_role"]}],e0=({isVisible:e,onCancel:r,onSuccess:l})=>{let[i]=h.Form.useForm(),{accessToken:a}=(0,s.default)(),{data:n}=eH(),{mutate:o,isPending:c}=eK(a),d=n?.field_schema,u=d?.properties??{},p=n?.values??{};(0,j.useEffect)(()=>{if(e&&n){i.resetFields();let e={};for(let[t,s]of Object.entries(p))eJ.has(t)||(e[t]=s);i.setFieldsValue(e)}},[e,n,i]);let f=()=>{i.resetFields(),r()},v=e=>{let s=u[e];if(!s)return null;let r="vault_addr"===e?[{pattern:/^https?:\/\/.+/,message:"Must start with http:// or https://"}]:void 0,l=eJ.has(e),i=p[e],a=l&&null!=i&&""!==i?`Leave blank to keep existing (${i})`:s?.description;return(0,t.jsx)(h.Form.Item,{name:e,label:eZ[e]??e,rules:r,children:l?(0,t.jsx)(g.Input.Password,{placeholder:a}):(0,t.jsx)(g.Input,{placeholder:s?.description})},e)};return(0,t.jsx)(_.Modal,{title:"Edit Hashicorp Vault Configuration",open:e,width:700,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:f,disabled:c,children:"Cancel"}),(0,t.jsx)(m.Button,{type:"primary",loading:c,onClick:()=>i.submit(),children:c?"Saving...":"Save"})]}),onCancel:f,children:(0,t.jsx)(h.Form,{form:i,layout:"vertical",onFinish:e=>{let t={};for(let[s,r]of Object.entries(e))null!=r&&""!==r?t[s]=r:eJ.has(s)||(t[s]="");o(t,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration updated successfully"),l()},onError:e=>{b.default.fromBackend(e)}})},children:eX.map((e,s)=>(0,t.jsxs)("div",{children:[s>0&&(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(y.Typography.Title,{level:5,style:{marginBottom:4},children:e.title}),e.subtitle&&(0,t.jsx)(y.Typography.Paragraph,{type:"secondary",style:{marginBottom:16},children:e.subtitle}),e.fields.map(v)]},e.title))})})},{Title:e1,Paragraph:e2}=y.Typography;function e3({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(ef.Empty,{image:ef.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(e1,{level:4,children:"No Vault Configuration Found"}),(0,t.jsx)(e2,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Hashicorp Vault to securely manage provider API keys and secrets for your LiteLLM deployment."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure Vault"})})})}let{Title:e4,Text:e6}=y.Typography,e8={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}};function e7(){let e,{accessToken:r}=(0,s.default)(),{data:l,isLoading:i,isError:a,error:n}=eH(),{mutate:o,isPending:c}=(e=(0,eN.useQueryClient)(),(0,et.useMutation)({mutationFn:async()=>{if(!r)throw Error("Access token is required");return eV(r)},onSuccess:()=>{e.invalidateQueries({queryKey:eq.all})}})),{mutate:d,isPending:u}=eK(r),[h,g]=(0,j.useState)(!1),[_,f]=(0,j.useState)(!1),[v,S]=(0,j.useState)(null),[w,I]=(0,j.useState)(!1),C=l?.values??{},T=!!C.vault_addr,k=async()=>{if(r){I(!0);try{let e=await eG(r);b.default.success(e.message||"Connection to Vault successful!")}catch(e){b.default.fromBackend(e)}finally{I(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[i?(0,t.jsx)(V.Card,{children:(0,t.jsx)(eS.Skeleton,{active:!0})}):a?(0,t.jsx)(V.Card,{children:(0,t.jsx)(p.Alert,{type:"error",message:"Could not load Hashicorp Vault configuration",description:n instanceof Error?n.message:void 0})}):(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)(e$.Flex,{justify:"space-between",align:"center",children:[(0,t.jsxs)(e$.Flex,{align:"center",gap:12,children:[(0,t.jsx)(eY,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(e4,{level:3,style:{marginBottom:0},children:"Hashicorp Vault"}),(0,t.jsx)(e6,{type:"secondary",children:"Manage secret manager configuration"})]})]}),(0,t.jsx)(x.Space,{children:T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(eW,{className:"w-4 h-4"}),loading:w,onClick:k,children:"Test Connection"}),(0,t.jsx)(m.Button,{icon:(0,t.jsx)(H.Edit,{className:"w-4 h-4"}),onClick:()=>g(!0),children:"Edit Configuration"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)($.Trash2,{className:"w-4 h-4"}),onClick:()=>f(!0),children:"Delete Configuration"})]})})]}),T&&(0,t.jsx)(p.Alert,{type:"info",showIcon:!0,message:'Secrets must be stored with the field name "key"',description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e6,{code:!0,children:"vault kv put secret/SECRET_NAME key=secret_value"}),(0,t.jsx)("br",{}),(0,t.jsx)(y.Typography.Link,{href:"https://docs.litellm.ai/docs/secret_managers/hashicorp_vault",target:"_blank",children:"View documentation"})]})}),T?(()=>{let e=Object.entries(C).filter(([e,t])=>null!=t&&""!==t);return 0===e.length?null:(0,t.jsxs)(G.Descriptions,{bordered:!0,...e8,children:[(0,t.jsx)(G.Descriptions.Item,{label:"Auth Method",children:(0,t.jsx)(e6,{children:C.approle_role_id||C.approle_secret_id?"AppRole":C.client_cert&&C.client_key?"TLS Certificate":C.vault_token?"Token":"None"})}),e.map(([e])=>{let s;return(0,t.jsx)(G.Descriptions.Item,{label:eZ[e]??e,children:(s=C[e])?eJ.has(e)?(0,t.jsxs)(e$.Flex,{justify:"space-between",align:"center",children:[(0,t.jsx)(e6,{className:"font-mono text-gray-600",children:s}),(0,t.jsx)(m.Button,{type:"text",size:"small",danger:!0,icon:(0,t.jsx)($.Trash2,{className:"w-3.5 h-3.5"}),onClick:()=>S(e)})]}):(0,t.jsx)(e6,{className:"font-mono text-gray-600",children:s}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})},e)})]})})():(0,t.jsx)(e3,{onAdd:()=>g(!0)})]})}),(0,t.jsx)(e0,{isVisible:h,onCancel:()=>g(!1),onSuccess:()=>g(!1)}),(0,t.jsx)(ea.default,{isOpen:_,title:"Delete Hashicorp Vault Configuration?",message:"Models using Vault secrets will lose access to their API keys until a new configuration is saved.",resourceInformationTitle:"Vault Configuration",resourceInformation:[{label:"Vault Address",value:C.vault_addr}],onCancel:()=>f(!1),onOk:()=>{o(void 0,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration deleted"),f(!1)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:c}),(0,t.jsx)(ea.default,{isOpen:null!==v,title:`Clear ${v?eZ[v]??v:""}?`,message:"This will remove the stored value.",resourceInformationTitle:"Field",resourceInformation:[{label:"Field",value:v?eZ[v]??v:""}],onCancel:()=>S(null),onOk:()=>{v&&d({[v]:""},{onSuccess:()=>{b.default.success(`${eZ[v]??v} cleared`),S(null)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:u})]})}let e5={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},e9={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},te=({isAddSSOModalVisible:e,isInstructionsModalVisible:s,handleAddSSOOk:r,handleAddSSOCancel:l,handleShowInstructions:i,handleInstructionsOk:a,handleInstructionsCancel:n,form:o,accessToken:c,ssoConfigured:d=!1})=>{let[u,p]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e&&c)try{let e=await (0,w.getSSOSettings)(c);if(console.log("Raw SSO data received:",e),e&&e.values){console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let s={};if(e.values.role_mappings){let t=e.values.role_mappings,r=e=>e&&0!==e.length?e.join(", "):"";s={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:r(t.roles?.proxy_admin),admin_viewer_teams:r(t.roles?.proxy_admin_viewer),internal_user_teams:r(t.roles?.internal_user),internal_viewer_teams:r(t.roles?.internal_user_viewer)}}let r={sso_provider:t,proxy_base_url:e.values.proxy_base_url,user_email:e.values.user_email,...e.values,...s};console.log("Setting form values:",r),o.resetFields(),setTimeout(()=>{o.setFieldsValue(r),console.log("Form values set, current form values:",o.getFieldsValue())},100)}}catch(e){console.error("Failed to load SSO settings:",e)}})()},[e,c,o]);let x=async e=>{if(!c)return void b.default.fromBackend("No access token available");try{let{proxy_admin_teams:t,admin_viewer_teams:s,internal_user_teams:r,internal_viewer_teams:l,default_role:a,group_claim:n,use_role_mappings:o,...d}=e,u={...d};if(o){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:n,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[a]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(s),internal_user:e(r),internal_user_viewer:e(l)}}}await (0,w.updateSSOSettings)(c,u),i(e)}catch(e){b.default.fromBackend("Failed to save SSO settings: "+(0,z.parseErrorMessage)(e))}},f=async()=>{if(!c)return void b.default.fromBackend("No access token available");try{await (0,w.updateSSOSettings)(c,{google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null}),o.resetFields(),p(!1),r(),b.default.success("SSO settings cleared successfully")}catch(e){console.error("Failed to clear SSO settings:",e),b.default.fromBackend("Failed to clear SSO settings")}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.Modal,{title:d?"Edit SSO Settings":"Add SSO",open:e,width:800,footer:null,onOk:r,onCancel:l,children:(0,t.jsxs)(h.Form,{form:o,onFinish:x,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(Z.Select,{children:Object.entries(e5).map(([e,s])=>(0,t.jsx)(Z.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,t.jsx)("img",{src:s,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsxs)("span",{children:["okta"===e.toLowerCase()?"Okta / Auth0":e.charAt(0).toUpperCase()+e.slice(1)," ","SSO"]})]})},e))})}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s,r=e("sso_provider");return r&&(s=e9[r])?s.fields.map(e=>(0,t.jsx)(h.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(g.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(h.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(h.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(h.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsx)(h.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(Z.Select,{children:[(0,t.jsx)(Z.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(h.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(h.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(h.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(h.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null})]}),(0,t.jsxs)("div",{style:{textAlign:"right",marginTop:"10px",display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px"},children:[d&&(0,t.jsx)(m.Button,{onClick:()=>p(!0),style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#5558eb",e.currentTarget.style.borderColor="#5558eb"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1",e.currentTarget.style.borderColor="#6366f1"},children:"Clear"}),(0,t.jsx)(m.Button,{htmlType:"submit",children:"Save"})]})]})}),(0,t.jsxs)(_.Modal,{title:"Confirm Clear SSO Settings",open:u,onOk:f,onCancel:()=>p(!1),okText:"Yes, Clear",cancelText:"Cancel",okButtonProps:{danger:!0,style:{backgroundColor:"#dc2626",borderColor:"#dc2626"}},children:[(0,t.jsx)("p",{children:"Are you sure you want to clear all SSO settings? This action cannot be undone."}),(0,t.jsx)("p",{children:"Users will no longer be able to login using SSO after this change."})]}),(0,t.jsxs)(_.Modal,{title:"SSO Setup Instructions",open:s,width:800,footer:null,onOk:a,onCancel:n,children:[(0,t.jsx)("p",{children:"Follow these steps to complete the SSO setup:"}),(0,t.jsx)(C.Text,{className:"mt-2",children:"1. DO NOT Exit this TAB"}),(0,t.jsx)(C.Text,{className:"mt-2",children:"2. Open a new tab, visit your proxy base url"}),(0,t.jsx)(C.Text,{className:"mt-2",children:"3. Confirm your SSO is configured correctly and you can login on the new Tab"}),(0,t.jsx)(C.Text,{className:"mt-2",children:"4. If Step 3 is successful, you can close this tab"}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(m.Button,{onClick:a,children:"Done"})})]})]})},tt=({accessToken:e,onSuccess:s})=>{let[r]=h.Form.useForm(),[l,i]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e)try{let t=await (0,w.getSSOSettings)(e);if(t&&t.values){let e=t.values.ui_access_mode,s={};e&&"object"==typeof e?s={ui_access_mode_type:e.type,restricted_sso_group:e.restricted_sso_group,sso_group_jwt_field:e.sso_group_jwt_field}:"string"==typeof e&&(s={ui_access_mode_type:e,restricted_sso_group:t.values.restricted_sso_group,sso_group_jwt_field:t.values.team_ids_jwt_field||t.values.sso_group_jwt_field}),r.setFieldsValue(s)}}catch(e){console.error("Failed to load UI access settings:",e)}})()},[e,r]);let a=async t=>{if(!e)return void b.default.fromBackend("No access token available");i(!0);try{let r;r="all_authenticated_users"===t.ui_access_mode_type?{ui_access_mode:"none"}:{ui_access_mode:{type:t.ui_access_mode_type,restricted_sso_group:t.restricted_sso_group,sso_group_jwt_field:t.sso_group_jwt_field}},await (0,w.updateSSOSettings)(e,r),s()}catch(e){console.error("Failed to save UI access settings:",e),b.default.fromBackend("Failed to save UI access settings")}finally{i(!1)}};return(0,t.jsxs)("div",{style:{padding:"16px"},children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},children:(0,t.jsx)(C.Text,{style:{fontSize:"14px",color:"#6b7280"},children:"Configure who can access the UI interface and how group information is extracted from JWT tokens."})}),(0,t.jsxs)(h.Form,{form:r,onFinish:a,layout:"vertical",children:[(0,t.jsx)(h.Form.Item,{label:"UI Access Mode",name:"ui_access_mode_type",tooltip:"Controls who can access the UI interface",children:(0,t.jsxs)(Z.Select,{placeholder:"Select access mode",children:[(0,t.jsx)(Z.Select.Option,{value:"all_authenticated_users",children:"All Authenticated Users"}),(0,t.jsx)(Z.Select.Option,{value:"restricted_sso_group",children:"Restricted SSO Group"})]})}),(0,t.jsx)(h.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.ui_access_mode_type!==t.ui_access_mode_type,children:({getFieldValue:e})=>"restricted_sso_group"===e("ui_access_mode_type")?(0,t.jsx)(h.Form.Item,{label:"Restricted SSO Group",name:"restricted_sso_group",rules:[{required:!0,message:"Please enter the restricted SSO group"}],children:(0,t.jsx)(k.TextInput,{placeholder:"ui-access-group"})}):null}),(0,t.jsx)(h.Form.Item,{label:"SSO Group JWT Field",name:"sso_group_jwt_field",tooltip:"JWT field name that contains team/group information. Use dot notation to access nested fields.",children:(0,t.jsx)(k.TextInput,{placeholder:"groups"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"16px"},children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:l,style:{backgroundColor:"#6366f1",borderColor:"#6366f1"},children:"Update UI Access Control"})})]})]})},{Title:ts,Paragraph:tr,Text:tl}=y.Typography;e.s(["default",0,({proxySettings:e})=>{let{premiumUser:y,accessToken:I,userId:C}=(0,s.default)(),[T]=h.Form.useForm(),[k,E]=(0,j.useState)(!1),[N,O]=(0,j.useState)(!1),[M,A]=(0,j.useState)(!1),[F,P]=(0,j.useState)(!1),[z,L]=(0,j.useState)(!1),[U,R]=(0,j.useState)(!1),[D,V]=(0,j.useState)([]),[G,q]=(0,j.useState)(null),[H,K]=(0,j.useState)(!1),$=(0,S.useBaseUrl)(),Q="All IP Addresses Allowed",Y=$;Y+="/fallback/login";let W=async()=>{if(I)try{let e=await (0,w.getSSOSettings)(I);if(e&&e.values){let t=e.values.google_client_id&&e.values.google_client_secret,s=e.values.microsoft_client_id&&e.values.microsoft_client_secret,r=e.values.generic_client_id&&e.values.generic_client_secret;K(t||s||r)}else K(!1)}catch(e){console.error("Error checking SSO configuration:",e),K(!1)}},J=async()=>{try{if(!0!==y)return void b.default.fromBackend("This feature is only available for premium users. Please upgrade your account.");if(I){let e=await (0,w.getAllowedIPs)(I);V(e&&e.length>0?e:[Q])}else V([Q])}catch(e){console.error("Error fetching allowed IPs:",e),b.default.fromBackend(`Failed to fetch allowed IPs ${e}`),V([Q])}finally{!0===y&&A(!0)}},Z=async e=>{try{if(I){await (0,w.addAllowedIP)(I,e.ip);let t=await (0,w.getAllowedIPs)(I);V(t),b.default.success("IP address added successfully")}}catch(e){console.error("Error adding IP:",e),b.default.fromBackend(`Failed to add IP address ${e}`)}finally{P(!1)}},X=async e=>{q(e),L(!0)},ee=async()=>{if(G&&I)try{await (0,w.deleteAllowedIP)(I,G);let e=await (0,w.getAllowedIPs)(I);V(e.length>0?e:[Q]),b.default.success("IP address deleted successfully")}catch(e){console.error("Error deleting IP:",e),b.default.fromBackend(`Failed to delete IP address ${e}`)}finally{L(!1),q(null)}};(0,j.useEffect)(()=>{W()},[I,y,W]);let et=()=>{R(!1)},es=[{key:"sso-settings",label:"SSO Settings",children:(0,t.jsx)(ek,{})},{key:"security-settings",label:"Security Settings",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(ts,{level:4,children:" ✨ Security Settings"}),(0,t.jsx)(p.Alert,{message:"SSO Configuration Deprecated",description:"Editing SSO Settings on this page is deprecated and will be removed in a future version. Please use the SSO Settings tab for SSO configuration.",type:"warning",showIcon:!0}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",marginTop:"1rem",marginLeft:"0.5rem"},children:[(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:()=>E(!0),children:H?"Edit SSO Settings":"Add SSO"})}),(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:J,children:"Allowed IPs"})}),(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:()=>!0===y?R(!0):b.default.fromBackend("Only premium users can configure UI access control"),children:"UI Access Control"})})]})]}),(0,t.jsxs)("div",{className:"flex justify-start mb-4",children:[(0,t.jsx)(te,{isAddSSOModalVisible:k,isInstructionsModalVisible:N,handleAddSSOOk:()=>{E(!1),T.resetFields(),I&&y&&W()},handleAddSSOCancel:()=>{E(!1),T.resetFields()},handleShowInstructions:e=>{E(!1),O(!0)},handleInstructionsOk:()=>{O(!1),I&&y&&W()},handleInstructionsCancel:()=>{O(!1),I&&y&&W()},form:T,accessToken:I,ssoConfigured:H}),(0,t.jsx)(_.Modal,{title:"Manage Allowed IP Addresses",width:800,open:M,onCancel:()=>A(!1),footer:[(0,t.jsx)(r.Button,{className:"mx-1",onClick:()=>P(!0),children:"Add IP Address"},"add"),(0,t.jsx)(r.Button,{onClick:()=>A(!1),children:"Close"},"close")],children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"IP Address"}),(0,t.jsx)(d.TableHeaderCell,{className:"text-right",children:"Action"})]})}),(0,t.jsx)(n.TableBody,{children:D.map((e,s)=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e}),(0,t.jsx)(o.TableCell,{className:"text-right",children:e!==Q&&(0,t.jsx)(r.Button,{onClick:()=>X(e),color:"red",size:"xs",children:"Delete"})})]},s))})]})}),(0,t.jsx)(_.Modal,{title:"Add Allowed IP Address",open:F,onCancel:()=>P(!1),footer:null,children:(0,t.jsxs)(h.Form,{onFinish:Z,children:[(0,t.jsx)(h.Form.Item,{name:"ip",rules:[{required:!0,message:"Please enter an IP address"}],children:(0,t.jsx)(g.Input,{placeholder:"Enter IP address"})}),(0,t.jsx)(h.Form.Item,{children:(0,t.jsx)(m.Button,{htmlType:"submit",children:"Add IP Address"})})]})}),(0,t.jsx)(_.Modal,{title:"Confirm Delete",open:z,onCancel:()=>L(!1),onOk:ee,footer:[(0,t.jsx)(r.Button,{className:"mx-1",onClick:()=>ee(),children:"Yes"},"delete"),(0,t.jsx)(r.Button,{onClick:()=>L(!1),children:"Close"},"close")],children:(0,t.jsxs)(tl,{children:["Are you sure you want to delete the IP address: ",G,"?"]})}),(0,t.jsx)(_.Modal,{title:"UI Access Control Settings",open:U,width:600,footer:null,onOk:et,onCancel:()=>{R(!1)},children:(0,t.jsx)(tt,{accessToken:I,onSuccess:()=>{et(),b.default.success("UI Access Control settings updated successfully")}})})]}),(0,t.jsxs)(l.Callout,{title:"Login without SSO",color:"teal",children:["If you need to login without sso, you can access"," ",(0,t.jsxs)("a",{href:Y,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)("b",{children:Y})," "]})]})]})},{key:"scim",label:"SCIM",children:(0,t.jsx)(B,{accessToken:I,userID:C,proxySettings:e})},{key:"ui-settings",label:(0,t.jsx)(x.Space,{children:(0,t.jsxs)(tl,{children:["UI Settings ",(0,t.jsx)(v.default,{})]})}),children:(0,t.jsx)(eU,{})},{key:"hashicorp-vault",label:"Hashicorp Vault",children:(0,t.jsx)(e7,{})}];return(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsx)(ts,{level:4,children:"Admin Access "}),(0,t.jsx)(tr,{children:"Go to 'Internal Users' page to add other admins."}),(0,t.jsx)(f.Tabs,{items:es})]})}],105278)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e0cb6755699177c1.css b/litellm/proxy/_experimental/out/_next/static/chunks/e0cb6755699177c1.css deleted file mode 100644 index 40c868d0e2..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/e0cb6755699177c1.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder{opacity:1;color:#9ca3af}textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}input:where([type=text]),input:where(:not([type])),input:where([type=email]),input:where([type=url]),input:where([type=password]),input:where([type=number]),input:where([type=date]),input:where([type=datetime-local]),input:where([type=month]),input:where([type=search]),input:where([type=tel]),input:where([type=time]),input:where([type=week]),select:where([multiple]),textarea,select{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:#6b7280;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}input:where([type=text]):focus,input:where(:not([type])):focus,input:where([type=email]):focus,input:where([type=url]):focus,input:where([type=password]):focus,input:where([type=number]):focus,input:where([type=date]):focus,input:where([type=datetime-local]):focus,input:where([type=month]):focus,input:where([type=search]):focus,input:where([type=tel]):focus,input:where([type=time]):focus,input:where([type=week]):focus,select:where([multiple]):focus,textarea:focus,select:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb;outline:2px solid #0000}input::-moz-placeholder{color:#6b7280;opacity:1}textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{-webkit-print-color-adjust:exact;print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}select:where([multiple]),select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;-webkit-print-color-adjust:unset;print-color-adjust:unset;padding-right:.75rem}input:where([type=checkbox]),input:where([type=radio]){appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:#2563eb;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:#6b7280;flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}input:where([type=checkbox]){border-radius:0}input:where([type=radio]){border-radius:100%}input:where([type=checkbox]):focus,input:where([type=radio]):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}input:where([type=checkbox]):checked,input:where([type=radio]):checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}input:where([type=checkbox]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors:active){input:where([type=checkbox]):checked{appearance:auto}}input:where([type=radio]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors:active){input:where([type=radio]):checked{appearance:auto}}input:where([type=checkbox]):checked:hover,input:where([type=checkbox]):checked:focus,input:where([type=radio]):checked:hover,input:where([type=radio]):checked:focus{background-color:currentColor;border-color:#0000}input:where([type=checkbox]):indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media (forced-colors:active){input:where([type=checkbox]):indeterminate{appearance:auto}}input:where([type=checkbox]):indeterminate:hover,input:where([type=checkbox]):indeterminate:focus{background-color:currentColor;border-color:#0000}input:where([type=file]){background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}input:where([type=file]):focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip:auto;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-inset-1{inset:-.25rem}.inset-0{inset:0}.inset-x-\[-1\.5rem\]{left:-1.5rem;right:-1.5rem}.inset-y-0{top:0;bottom:0}.-left-2{left:-.5rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.bottom-4{bottom:1rem}.bottom-6{bottom:1.5rem}.bottom-\[-1\.5rem\]{bottom:-1.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-4{left:1rem}.right-0{right:0}.right-1{right:.25rem}.right-1\/2{right:50%}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-4{top:1rem}.top-8{top:2rem}.top-full{top:100%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.col-span-1{grid-column:span 1/span 1}.col-span-10{grid-column:span 10/span 10}.col-span-11{grid-column:span 11/span 11}.col-span-12{grid-column:span 12/span 12}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-5{grid-column:span 5/span 5}.col-span-6{grid-column:span 6/span 6}.col-span-7{grid-column:span 7/span 7}.col-span-8{grid-column:span 8/span 8}.col-span-9{grid-column:span 9/span 9}.\!m-0{margin:0!important}.m-0{margin:0}.m-2{margin:.5rem}.m-8{margin:2rem}.-my-4{margin-top:-1rem;margin-bottom:-1rem}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-2\.5{margin-left:.625rem;margin-right:.625rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.\!mb-0{margin-bottom:0!important}.-mb-px{margin-bottom:-1px}.-ml-0{margin-left:0}.-ml-0\.5{margin-left:-.125rem}.-ml-1{margin-left:-.25rem}.-ml-1\.5{margin-left:-.375rem}.-ml-px{margin-left:-1px}.-mr-1{margin-right:-.25rem}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-11{margin-left:2.75rem}.ml-12{margin-left:3rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.ml-7{margin-left:1.75rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-10{margin-right:2.5rem}.mr-2{margin-right:.5rem}.mr-2\.5{margin-right:.625rem}.mr-20{margin-right:5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.box-border{box-sizing:border-box}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.inline{display:inline}.\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.size-12{width:3rem;height:3rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.\!h-8{height:2rem!important}.h-0{height:0}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-\[100vh\]{height:100vh}.h-\[1px\]{height:1px}.h-\[22\.4px\]{height:22.4px}.h-\[350px\]{height:350px}.h-\[600px\]{height:600px}.h-\[75vh\]{height:75vh}.h-\[80vh\]{height:80vh}.h-\[calc\(100vh-200px\)\]{height:calc(100vh - 200px)}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-28{max-height:7rem}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-8{max-height:2rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[228px\]{max-height:228px}.max-h-\[234px\]{max-height:234px}.max-h-\[400px\]{max-height:400px}.max-h-\[500px\]{max-height:500px}.max-h-\[50vh\]{max-height:50vh}.max-h-\[520px\]{max-height:520px}.max-h-\[600px\]{max-height:600px}.max-h-\[65vh\]{max-height:65vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(100vh-385px\)\]{max-height:calc(100vh - 385px)}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-8{min-height:2rem}.min-h-\[100px\]{min-height:100px}.min-h-\[120px\]{min-height:120px}.min-h-\[280px\]{min-height:280px}.min-h-\[380px\]{min-height:380px}.min-h-\[400px\]{min-height:400px}.min-h-\[44px\]{min-height:44px}.min-h-\[500px\]{min-height:500px}.min-h-\[750px\]{min-height:750px}.min-h-\[calc\(100vh-160px\)\]{min-height:calc(100vh - 160px)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.\!w-8{width:2rem!important}.w-0{width:0}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-1\/4{width:25%}.w-10{width:2.5rem}.w-11\/12{width:91.6667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[120px\]{width:120px}.w-\[180px\]{width:180px}.w-\[280px\]{width:280px}.w-\[300px\]{width:300px}.w-\[400px\]{width:400px}.w-\[90\%\]{width:90%}.w-\[var\(--button-width\)\]{width:var(--button-width)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.w-screen{width:100vw}.\!min-w-8{min-width:2rem!important}.min-w-0{min-width:0}.min-w-44{min-width:11rem}.min-w-\[100px\]{min-width:100px}.min-w-\[10rem\]{min-width:10rem}.min-w-\[150px\]{min-width:150px}.min-w-\[200px\]{min-width:200px}.min-w-\[220px\]{min-width:220px}.min-w-\[600px\]{min-width:600px}.min-w-\[88px\]{min-width:88px}.min-w-\[90px\]{min-width:90px}.min-w-full{min-width:100%}.min-w-min{min-width:min-content}.max-w-2xl{max-width:42rem}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-40{max-width:10rem}.max-w-48{max-width:12rem}.max-w-4xl{max-width:56rem}.max-w-64{max-width:16rem}.max-w-6xl{max-width:72rem}.max-w-\[100px\]{max-width:100px}.max-w-\[140px\]{max-width:140px}.max-w-\[150px\]{max-width:150px}.max-w-\[15ch\]{max-width:15ch}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[20ch\]{max-width:20ch}.max-w-\[240px\]{max-width:240px}.max-w-\[250px\]{max-width:250px}.max-w-\[300px\]{max-width:300px}.max-w-\[40ch\]{max-width:40ch}.max-w-\[75\%\]{max-width:75%}.max-w-\[80\%\]{max-width:80%}.max-w-\[85\%\]{max-width:85%}.max-w-\[88\%\]{max-width:88%}.max-w-\[95\%\]{max-width:95%}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1}.flex-\[2\]{flex:2}.flex-auto{flex:auto}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-translate-y-4{--tw-translate-y:-1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-0\.5{--tw-translate-x:.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-4{--tw-translate-x:1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x:1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y:1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate:-180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.animate-bounce{animation:1s infinite bounce}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:1s linear infinite spin}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x)var(--tw-pan-y)var(--tw-pinch-zoom)}.select-none{-webkit-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.snap-mandatory{--tw-scroll-snap-strictness:mandatory}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.auto-rows-\[minmax\(0\,1fr\)\]{grid-auto-rows:minmax(0,1fr)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.grid-cols-\[auto\]{grid-template-columns:auto}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-none{grid-template-columns:none}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.\!items-center{align-items:center!important}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.\!justify-center{justify-content:center!important}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-1{row-gap:.25rem}.gap-y-4{row-gap:1rem}.gap-y-5{row-gap:1.25rem}.space-x-0\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.125rem*var(--tw-space-x-reverse));margin-left:calc(.125rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.375rem*var(--tw-space-x-reverse));margin-left:calc(.375rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2.5rem*var(--tw-space-x-reverse));margin-left:calc(2.5rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-2\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.625rem*var(--tw-space-x-reverse));margin-left:calc(.625rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem*var(--tw-space-x-reverse));margin-left:calc(1.25rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.5rem*var(--tw-space-x-reverse));margin-left:calc(1.5rem*calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem*var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse:1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-right-width:calc(1px*var(--tw-divide-x-reverse));border-left-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:1}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity,1))}.divide-gray-50>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(249 250 251/var(--tw-divide-opacity,1))}.divide-tremor-border>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity,1))}.self-start{align-self:flex-start}.self-center{align-self:center}.justify-self-end{justify-self:end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-x-clip{overflow-x:clip}.overflow-x-scroll{overflow-x:scroll}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.\!rounded-md{border-radius:.375rem!important}.\!rounded-none{border-radius:0!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\[1px\]{border-radius:1px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-tremor-default{border-radius:.5rem}.rounded-tremor-full{border-radius:9999px}.rounded-tremor-small{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-2xl{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.rounded-b-lg,.rounded-b-tremor-default{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-l-tremor-default{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-tremor-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-l-tremor-small{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-r-tremor-default{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-r-tremor-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-r-tremor-small{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg,.rounded-t-tremor-default{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-br-md{border-bottom-right-radius:.375rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.\!border{border-width:1px!important}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-4{border-bottom-width:4px}.border-e{border-inline-end-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-4{border-right-width:4px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-t-\[1px\]{border-top-width:1px}.border-dashed{border-style:dashed}.\!border-none{border-style:none!important}.border-none{border-style:none}.\!border-slate-200{--tw-border-opacity:1!important;border-color:rgb(226 232 240/var(--tw-border-opacity,1))!important}.border-\[\#6366f1\]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-amber-100{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.border-amber-400{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.border-amber-50{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}.border-amber-500{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.border-amber-600{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}.border-amber-700{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}.border-amber-800{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}.border-amber-900{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}.border-amber-950{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}.border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.border-blue-50{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.border-blue-700{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}.border-blue-800{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.border-blue-900{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}.border-blue-950{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}.border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.border-cyan-300{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.border-cyan-400{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.border-cyan-50{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}.border-cyan-500{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.border-cyan-600{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}.border-cyan-700{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}.border-cyan-800{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}.border-cyan-900{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}.border-cyan-950{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}.border-dark-tremor-background{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.border-dark-tremor-border{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.border-dark-tremor-brand{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-dark-tremor-brand-emphasis{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.border-dark-tremor-brand-inverted{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.border-dark-tremor-brand-subtle{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.border-emerald-100{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}.border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.border-emerald-300{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.border-emerald-400{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}.border-emerald-50{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}.border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.border-emerald-600{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}.border-emerald-700{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}.border-emerald-800{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}.border-emerald-900{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}.border-emerald-950{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}.border-fuchsia-100{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}.border-fuchsia-200{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}.border-fuchsia-300{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.border-fuchsia-400{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}.border-fuchsia-50{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}.border-fuchsia-500{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}.border-fuchsia-600{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}.border-fuchsia-700{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}.border-fuchsia-800{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}.border-fuchsia-900{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}.border-fuchsia-950{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-200\/60{border-color:#e5e7eb99}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.border-gray-50{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}.border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.border-gray-900{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.border-gray-950{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}.border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.border-green-50{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-green-600{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}.border-green-700{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}.border-green-800{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.border-green-900{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}.border-green-950{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}.border-indigo-100{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}.border-indigo-200{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}.border-indigo-300{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.border-indigo-400{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.border-indigo-50{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}.border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-indigo-600{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}.border-indigo-700{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.border-indigo-800{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.border-indigo-900{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}.border-indigo-950{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.border-lime-100{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}.border-lime-200{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}.border-lime-300{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.border-lime-400{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}.border-lime-50{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}.border-lime-500{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}.border-lime-600{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}.border-lime-700{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}.border-lime-800{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}.border-lime-900{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}.border-lime-950{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}.border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.border-neutral-300{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.border-neutral-400{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.border-neutral-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.border-neutral-500{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}.border-neutral-600{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}.border-neutral-700{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.border-neutral-800{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}.border-neutral-900{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.border-neutral-950{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}.border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.border-orange-300{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.border-orange-400{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}.border-orange-50{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}.border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.border-orange-600{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}.border-orange-700{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}.border-orange-800{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}.border-orange-900{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}.border-orange-950{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}.border-pink-100{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}.border-pink-200{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}.border-pink-300{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.border-pink-400{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}.border-pink-50{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}.border-pink-500{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}.border-pink-600{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}.border-pink-700{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}.border-pink-800{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}.border-pink-900{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.border-pink-950{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}.border-purple-100{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}.border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.border-purple-300{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.border-purple-400{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}.border-purple-50{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}.border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.border-purple-600{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}.border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}.border-purple-800{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}.border-purple-900{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}.border-purple-950{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}.border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.border-red-50{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.border-red-900{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}.border-red-950{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}.border-rose-100{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}.border-rose-200{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}.border-rose-300{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.border-rose-400{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}.border-rose-50{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}.border-rose-500{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.border-rose-600{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}.border-rose-700{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}.border-rose-800{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}.border-rose-900{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}.border-rose-950{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}.border-sky-100{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}.border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.border-sky-400{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.border-sky-50{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}.border-sky-500{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}.border-sky-600{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}.border-sky-700{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}.border-sky-800{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}.border-sky-900{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}.border-sky-950{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}.border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}.border-slate-50{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.border-slate-900{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}.border-slate-950{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}.border-stone-100{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}.border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.border-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.border-stone-50{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}.border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.border-stone-700{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}.border-stone-800{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}.border-stone-900{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}.border-stone-950{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}.border-teal-100{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}.border-teal-200{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}.border-teal-300{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.border-teal-400{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}.border-teal-50{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}.border-teal-500{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}.border-teal-600{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}.border-teal-700{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}.border-teal-800{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}.border-teal-900{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}.border-teal-950{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}.border-transparent{border-color:#0000}.border-tremor-background{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-tremor-border{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-tremor-brand{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.border-tremor-brand-emphasis{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.border-tremor-brand-inverted{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-tremor-brand-subtle{--tw-border-opacity:1;border-color:rgb(142 145 235/var(--tw-border-opacity,1))}.border-violet-100{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}.border-violet-200{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}.border-violet-300{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.border-violet-400{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}.border-violet-50{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}.border-violet-500{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}.border-violet-600{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}.border-violet-700{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}.border-violet-800{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}.border-violet-900{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}.border-violet-950{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}.border-yellow-100{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.border-yellow-300{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}.border-yellow-50{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.border-yellow-600{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}.border-yellow-700{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}.border-yellow-800{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.border-yellow-900{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}.border-yellow-950{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}.border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.border-zinc-400{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.border-zinc-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.border-zinc-500{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.border-zinc-600{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}.border-zinc-700{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.border-zinc-950{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}.border-l-blue-500{--tw-border-opacity:1;border-left-color:rgb(59 130 246/var(--tw-border-opacity,1))}.border-l-transparent{border-left-color:#0000}.border-r-gray-200{--tw-border-opacity:1;border-right-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-t-transparent{border-top-color:#0000}.\!bg-blue-600{--tw-bg-opacity:1!important;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))!important}.\!bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bg-\[\#1e1e1e\]{--tw-bg-opacity:1;background-color:rgb(30 30 30/var(--tw-bg-opacity,1))}.bg-\[\#6366f1\]{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-amber-200{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}.bg-amber-300{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}.bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.bg-amber-700{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.bg-amber-800{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}.bg-amber-900{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}.bg-amber-950{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/90{background-color:#000000e6}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-blue-50\/30{background-color:#eff6ff4d}.bg-blue-50\/60{background-color:#eff6ff99}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-blue-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.bg-blue-800{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}.bg-blue-900{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.bg-blue-950{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-cyan-200{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}.bg-cyan-300{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}.bg-cyan-400{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.bg-cyan-700{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}.bg-cyan-800{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}.bg-cyan-900{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}.bg-cyan-950{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}.bg-dark-tremor-background{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.bg-dark-tremor-background-subtle{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand-emphasis{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand-faint{--tw-bg-opacity:1;background-color:rgb(11 18 41/var(--tw-bg-opacity,1))}.bg-dark-tremor-brand-muted{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.bg-dark-tremor-content-subtle{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.bg-emerald-200{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}.bg-emerald-300{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.bg-emerald-700{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.bg-emerald-800{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}.bg-emerald-900{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}.bg-emerald-950{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}.bg-fuchsia-100{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.bg-fuchsia-200{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}.bg-fuchsia-300{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}.bg-fuchsia-400{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}.bg-fuchsia-50{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}.bg-fuchsia-500{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.bg-fuchsia-600{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}.bg-fuchsia-700{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}.bg-fuchsia-800{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}.bg-fuchsia-900{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}.bg-fuchsia-950{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-100\/50{background-color:#f3f4f680}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-gray-50\/50{background-color:#f9fafb80}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.bg-gray-950{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}.bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.bg-green-800{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}.bg-green-900{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.bg-green-950{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}.bg-indigo-300{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}.bg-indigo-400{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}.bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}.bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}.bg-indigo-950{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.bg-lime-100{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.bg-lime-200{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}.bg-lime-300{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}.bg-lime-400{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}.bg-lime-50{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}.bg-lime-500{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.bg-lime-600{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}.bg-lime-700{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}.bg-lime-800{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}.bg-lime-900{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}.bg-lime-950{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-neutral-200{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.bg-neutral-400{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-neutral-500{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}.bg-neutral-600{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}.bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.bg-neutral-950{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}.bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}.bg-orange-300{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}.bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}.bg-orange-700{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}.bg-orange-800{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}.bg-orange-900{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}.bg-orange-950{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}.bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}.bg-pink-300{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}.bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}.bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.bg-pink-500{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.bg-pink-600{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}.bg-pink-700{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}.bg-pink-800{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}.bg-pink-900{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}.bg-pink-950{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}.bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.bg-purple-200{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}.bg-purple-300{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}.bg-purple-400{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}.bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}.bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.bg-purple-800{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}.bg-purple-900{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.bg-purple-950{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.bg-red-300{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-red-50\/30{background-color:#fef2f24d}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.bg-red-800{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}.bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.bg-rose-100{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.bg-rose-200{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}.bg-rose-300{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}.bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}.bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.bg-rose-700{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}.bg-rose-800{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}.bg-rose-900{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}.bg-rose-950{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}.bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-sky-200{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}.bg-sky-300{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}.bg-sky-400{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.bg-sky-700{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}.bg-sky-800{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}.bg-sky-900{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}.bg-sky-950{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.bg-slate-500{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}.bg-slate-600{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.bg-slate-950{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.bg-slate-950\/30{background-color:#0206174d}.bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.bg-stone-200{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.bg-stone-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}.bg-stone-50{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.bg-stone-700{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}.bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.bg-stone-950{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}.bg-teal-100{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.bg-teal-200{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}.bg-teal-300{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}.bg-teal-400{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}.bg-teal-50{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}.bg-teal-500{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.bg-teal-600{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}.bg-teal-700{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}.bg-teal-800{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}.bg-teal-900{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}.bg-teal-950{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}.bg-transparent{background-color:#0000}.bg-tremor-background{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-tremor-background-emphasis{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-tremor-background-muted{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-tremor-background-subtle{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-tremor-border{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-tremor-brand{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.bg-tremor-brand-muted{--tw-bg-opacity:1;background-color:rgb(134 136 239/var(--tw-bg-opacity,1))}.bg-tremor-brand-muted\/50{background-color:#8688ef80}.bg-tremor-brand-subtle{--tw-bg-opacity:1;background-color:rgb(142 145 235/var(--tw-bg-opacity,1))}.bg-tremor-content-subtle{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-violet-200{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}.bg-violet-300{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}.bg-violet-400{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}.bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.bg-violet-700{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}.bg-violet-800{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}.bg-violet-900{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}.bg-violet-950{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/80{background-color:#fffc}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}.bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}.bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.bg-yellow-700{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}.bg-yellow-800{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}.bg-yellow-900{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}.bg-yellow-950{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.bg-zinc-400{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.bg-zinc-500{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.bg-zinc-600{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.bg-zinc-700{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.bg-opacity-10{--tw-bg-opacity:.1}.bg-opacity-20{--tw-bg-opacity:.2}.bg-opacity-30{--tw-bg-opacity:.3}.bg-opacity-40{--tw-bg-opacity:.4}.bg-opacity-50{--tw-bg-opacity:.5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:#eff6ff var(--tw-gradient-from-position);--tw-gradient-to:#eff6ff00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-blue-600{--tw-gradient-from:#2563eb var(--tw-gradient-from-position);--tw-gradient-to:#2563eb00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-50{--tw-gradient-from:#ecfdf5 var(--tw-gradient-from-position);--tw-gradient-to:#ecfdf500 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-green-50{--tw-gradient-from:#f0fdf4 var(--tw-gradient-from-position);--tw-gradient-to:#f0fdf400 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-purple-50{--tw-gradient-from:#faf5ff var(--tw-gradient-from-position);--tw-gradient-to:#faf5ff00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-slate-50{--tw-gradient-from:#f8fafc var(--tw-gradient-from-position);--tw-gradient-to:#f8fafc00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-teal-400{--tw-gradient-from:#2dd4bf var(--tw-gradient-from-position);--tw-gradient-to:#2dd4bf00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-blue-50{--tw-gradient-to:#eff6ff var(--tw-gradient-to-position)}.to-cyan-600{--tw-gradient-to:#0891b2 var(--tw-gradient-to-position)}.to-green-50{--tw-gradient-to:#f0fdf4 var(--tw-gradient-to-position)}.to-indigo-50{--tw-gradient-to:#eef2ff var(--tw-gradient-to-position)}.to-indigo-800{--tw-gradient-to:#3730a3 var(--tw-gradient-to-position)}.to-purple-50{--tw-gradient-to:#faf5ff var(--tw-gradient-to-position)}.to-teal-50{--tw-gradient-to:#f0fdfa var(--tw-gradient-to-position)}.bg-repeat{background-repeat:repeat}.fill-amber-100{fill:#fef3c7}.fill-amber-200{fill:#fde68a}.fill-amber-300{fill:#fcd34d}.fill-amber-400{fill:#fbbf24}.fill-amber-50{fill:#fffbeb}.fill-amber-500{fill:#f59e0b}.fill-amber-600{fill:#d97706}.fill-amber-700{fill:#b45309}.fill-amber-800{fill:#92400e}.fill-amber-900{fill:#78350f}.fill-amber-950{fill:#451a03}.fill-blue-100{fill:#dbeafe}.fill-blue-200{fill:#bfdbfe}.fill-blue-300{fill:#93c5fd}.fill-blue-400{fill:#60a5fa}.fill-blue-50{fill:#eff6ff}.fill-blue-500{fill:#3b82f6}.fill-blue-600{fill:#2563eb}.fill-blue-700{fill:#1d4ed8}.fill-blue-800{fill:#1e40af}.fill-blue-900{fill:#1e3a8a}.fill-blue-950{fill:#172554}.fill-cyan-100{fill:#cffafe}.fill-cyan-200{fill:#a5f3fc}.fill-cyan-300{fill:#67e8f9}.fill-cyan-400{fill:#22d3ee}.fill-cyan-50{fill:#ecfeff}.fill-cyan-500{fill:#06b6d4}.fill-cyan-600{fill:#0891b2}.fill-cyan-700{fill:#0e7490}.fill-cyan-800{fill:#155e75}.fill-cyan-900{fill:#164e63}.fill-cyan-950{fill:#083344}.fill-dark-tremor-content{fill:#6b7280}.fill-dark-tremor-content-emphasis{fill:#e5e7eb}.fill-emerald-100{fill:#d1fae5}.fill-emerald-200{fill:#a7f3d0}.fill-emerald-300{fill:#6ee7b7}.fill-emerald-400{fill:#34d399}.fill-emerald-50{fill:#ecfdf5}.fill-emerald-500{fill:#10b981}.fill-emerald-600{fill:#059669}.fill-emerald-700{fill:#047857}.fill-emerald-800{fill:#065f46}.fill-emerald-900{fill:#064e3b}.fill-emerald-950{fill:#022c22}.fill-fuchsia-100{fill:#fae8ff}.fill-fuchsia-200{fill:#f5d0fe}.fill-fuchsia-300{fill:#f0abfc}.fill-fuchsia-400{fill:#e879f9}.fill-fuchsia-50{fill:#fdf4ff}.fill-fuchsia-500{fill:#d946ef}.fill-fuchsia-600{fill:#c026d3}.fill-fuchsia-700{fill:#a21caf}.fill-fuchsia-800{fill:#86198f}.fill-fuchsia-900{fill:#701a75}.fill-fuchsia-950{fill:#4a044e}.fill-gray-100{fill:#f3f4f6}.fill-gray-200{fill:#e5e7eb}.fill-gray-300{fill:#d1d5db}.fill-gray-400{fill:#9ca3af}.fill-gray-50{fill:#f9fafb}.fill-gray-500{fill:#6b7280}.fill-gray-600{fill:#4b5563}.fill-gray-700{fill:#374151}.fill-gray-800{fill:#1f2937}.fill-gray-900{fill:#111827}.fill-gray-950{fill:#030712}.fill-green-100{fill:#dcfce7}.fill-green-200{fill:#bbf7d0}.fill-green-300{fill:#86efac}.fill-green-400{fill:#4ade80}.fill-green-50{fill:#f0fdf4}.fill-green-500{fill:#22c55e}.fill-green-600{fill:#16a34a}.fill-green-700{fill:#15803d}.fill-green-800{fill:#166534}.fill-green-900{fill:#14532d}.fill-green-950{fill:#052e16}.fill-indigo-100{fill:#e0e7ff}.fill-indigo-200{fill:#c7d2fe}.fill-indigo-300{fill:#a5b4fc}.fill-indigo-400{fill:#818cf8}.fill-indigo-50{fill:#eef2ff}.fill-indigo-500{fill:#6366f1}.fill-indigo-600{fill:#4f46e5}.fill-indigo-700{fill:#4338ca}.fill-indigo-800{fill:#3730a3}.fill-indigo-900{fill:#312e81}.fill-indigo-950{fill:#1e1b4b}.fill-lime-100{fill:#ecfccb}.fill-lime-200{fill:#d9f99d}.fill-lime-300{fill:#bef264}.fill-lime-400{fill:#a3e635}.fill-lime-50{fill:#f7fee7}.fill-lime-500{fill:#84cc16}.fill-lime-600{fill:#65a30d}.fill-lime-700{fill:#4d7c0f}.fill-lime-800{fill:#3f6212}.fill-lime-900{fill:#365314}.fill-lime-950{fill:#1a2e05}.fill-neutral-100{fill:#f5f5f5}.fill-neutral-200{fill:#e5e5e5}.fill-neutral-300{fill:#d4d4d4}.fill-neutral-400{fill:#a3a3a3}.fill-neutral-50{fill:#fafafa}.fill-neutral-500{fill:#737373}.fill-neutral-600{fill:#525252}.fill-neutral-700{fill:#404040}.fill-neutral-800{fill:#262626}.fill-neutral-900{fill:#171717}.fill-neutral-950{fill:#0a0a0a}.fill-orange-100{fill:#ffedd5}.fill-orange-200{fill:#fed7aa}.fill-orange-300{fill:#fdba74}.fill-orange-400{fill:#fb923c}.fill-orange-50{fill:#fff7ed}.fill-orange-500{fill:#f97316}.fill-orange-600{fill:#ea580c}.fill-orange-700{fill:#c2410c}.fill-orange-800{fill:#9a3412}.fill-orange-900{fill:#7c2d12}.fill-orange-950{fill:#431407}.fill-pink-100{fill:#fce7f3}.fill-pink-200{fill:#fbcfe8}.fill-pink-300{fill:#f9a8d4}.fill-pink-400{fill:#f472b6}.fill-pink-50{fill:#fdf2f8}.fill-pink-500{fill:#ec4899}.fill-pink-600{fill:#db2777}.fill-pink-700{fill:#be185d}.fill-pink-800{fill:#9d174d}.fill-pink-900{fill:#831843}.fill-pink-950{fill:#500724}.fill-purple-100{fill:#f3e8ff}.fill-purple-200{fill:#e9d5ff}.fill-purple-300{fill:#d8b4fe}.fill-purple-400{fill:#c084fc}.fill-purple-50{fill:#faf5ff}.fill-purple-500{fill:#a855f7}.fill-purple-600{fill:#9333ea}.fill-purple-700{fill:#7e22ce}.fill-purple-800{fill:#6b21a8}.fill-purple-900{fill:#581c87}.fill-purple-950{fill:#3b0764}.fill-red-100{fill:#fee2e2}.fill-red-200{fill:#fecaca}.fill-red-300{fill:#fca5a5}.fill-red-400{fill:#f87171}.fill-red-50{fill:#fef2f2}.fill-red-500{fill:#ef4444}.fill-red-600{fill:#dc2626}.fill-red-700{fill:#b91c1c}.fill-red-800{fill:#991b1b}.fill-red-900{fill:#7f1d1d}.fill-red-950{fill:#450a0a}.fill-rose-100{fill:#ffe4e6}.fill-rose-200{fill:#fecdd3}.fill-rose-300{fill:#fda4af}.fill-rose-400{fill:#fb7185}.fill-rose-50{fill:#fff1f2}.fill-rose-500{fill:#f43f5e}.fill-rose-600{fill:#e11d48}.fill-rose-700{fill:#be123c}.fill-rose-800{fill:#9f1239}.fill-rose-900{fill:#881337}.fill-rose-950{fill:#4c0519}.fill-sky-100{fill:#e0f2fe}.fill-sky-200{fill:#bae6fd}.fill-sky-300{fill:#7dd3fc}.fill-sky-400{fill:#38bdf8}.fill-sky-50{fill:#f0f9ff}.fill-sky-500{fill:#0ea5e9}.fill-sky-600{fill:#0284c7}.fill-sky-700{fill:#0369a1}.fill-sky-800{fill:#075985}.fill-sky-900{fill:#0c4a6e}.fill-sky-950{fill:#082f49}.fill-slate-100{fill:#f1f5f9}.fill-slate-200{fill:#e2e8f0}.fill-slate-300{fill:#cbd5e1}.fill-slate-400{fill:#94a3b8}.fill-slate-50{fill:#f8fafc}.fill-slate-500{fill:#64748b}.fill-slate-600{fill:#475569}.fill-slate-700{fill:#334155}.fill-slate-800{fill:#1e293b}.fill-slate-900{fill:#0f172a}.fill-slate-950{fill:#020617}.fill-stone-100{fill:#f5f5f4}.fill-stone-200{fill:#e7e5e4}.fill-stone-300{fill:#d6d3d1}.fill-stone-400{fill:#a8a29e}.fill-stone-50{fill:#fafaf9}.fill-stone-500{fill:#78716c}.fill-stone-600{fill:#57534e}.fill-stone-700{fill:#44403c}.fill-stone-800{fill:#292524}.fill-stone-900{fill:#1c1917}.fill-stone-950{fill:#0c0a09}.fill-teal-100{fill:#ccfbf1}.fill-teal-200{fill:#99f6e4}.fill-teal-300{fill:#5eead4}.fill-teal-400{fill:#2dd4bf}.fill-teal-50{fill:#f0fdfa}.fill-teal-500{fill:#14b8a6}.fill-teal-600{fill:#0d9488}.fill-teal-700{fill:#0f766e}.fill-teal-800{fill:#115e59}.fill-teal-900{fill:#134e4a}.fill-teal-950{fill:#042f2e}.fill-tremor-content{fill:#6b7280}.fill-tremor-content-emphasis{fill:#374151}.fill-violet-100{fill:#ede9fe}.fill-violet-200{fill:#ddd6fe}.fill-violet-300{fill:#c4b5fd}.fill-violet-400{fill:#a78bfa}.fill-violet-50{fill:#f5f3ff}.fill-violet-500{fill:#8b5cf6}.fill-violet-600{fill:#7c3aed}.fill-violet-700{fill:#6d28d9}.fill-violet-800{fill:#5b21b6}.fill-violet-900{fill:#4c1d95}.fill-violet-950{fill:#2e1065}.fill-yellow-100{fill:#fef9c3}.fill-yellow-200{fill:#fef08a}.fill-yellow-300{fill:#fde047}.fill-yellow-400{fill:#facc15}.fill-yellow-50{fill:#fefce8}.fill-yellow-500{fill:#eab308}.fill-yellow-600{fill:#ca8a04}.fill-yellow-700{fill:#a16207}.fill-yellow-800{fill:#854d0e}.fill-yellow-900{fill:#713f12}.fill-yellow-950{fill:#422006}.fill-zinc-100{fill:#f4f4f5}.fill-zinc-200{fill:#e4e4e7}.fill-zinc-300{fill:#d4d4d8}.fill-zinc-400{fill:#a1a1aa}.fill-zinc-50{fill:#fafafa}.fill-zinc-500{fill:#71717a}.fill-zinc-600{fill:#52525b}.fill-zinc-700{fill:#3f3f46}.fill-zinc-800{fill:#27272a}.fill-zinc-900{fill:#18181b}.fill-zinc-950{fill:#09090b}.stroke-amber-100{stroke:#fef3c7}.stroke-amber-200{stroke:#fde68a}.stroke-amber-300{stroke:#fcd34d}.stroke-amber-400{stroke:#fbbf24}.stroke-amber-50{stroke:#fffbeb}.stroke-amber-500{stroke:#f59e0b}.stroke-amber-600{stroke:#d97706}.stroke-amber-700{stroke:#b45309}.stroke-amber-800{stroke:#92400e}.stroke-amber-900{stroke:#78350f}.stroke-amber-950{stroke:#451a03}.stroke-blue-100{stroke:#dbeafe}.stroke-blue-200{stroke:#bfdbfe}.stroke-blue-300{stroke:#93c5fd}.stroke-blue-400{stroke:#60a5fa}.stroke-blue-50{stroke:#eff6ff}.stroke-blue-500{stroke:#3b82f6}.stroke-blue-600{stroke:#2563eb}.stroke-blue-700{stroke:#1d4ed8}.stroke-blue-800{stroke:#1e40af}.stroke-blue-900{stroke:#1e3a8a}.stroke-blue-950{stroke:#172554}.stroke-cyan-100{stroke:#cffafe}.stroke-cyan-200{stroke:#a5f3fc}.stroke-cyan-300{stroke:#67e8f9}.stroke-cyan-400{stroke:#22d3ee}.stroke-cyan-50{stroke:#ecfeff}.stroke-cyan-500{stroke:#06b6d4}.stroke-cyan-600{stroke:#0891b2}.stroke-cyan-700{stroke:#0e7490}.stroke-cyan-800{stroke:#155e75}.stroke-cyan-900{stroke:#164e63}.stroke-cyan-950{stroke:#083344}.stroke-dark-tremor-background{stroke:#111827}.stroke-dark-tremor-border{stroke:#374151}.stroke-emerald-100{stroke:#d1fae5}.stroke-emerald-200{stroke:#a7f3d0}.stroke-emerald-300{stroke:#6ee7b7}.stroke-emerald-400{stroke:#34d399}.stroke-emerald-50{stroke:#ecfdf5}.stroke-emerald-500{stroke:#10b981}.stroke-emerald-600{stroke:#059669}.stroke-emerald-700{stroke:#047857}.stroke-emerald-800{stroke:#065f46}.stroke-emerald-900{stroke:#064e3b}.stroke-emerald-950{stroke:#022c22}.stroke-fuchsia-100{stroke:#fae8ff}.stroke-fuchsia-200{stroke:#f5d0fe}.stroke-fuchsia-300{stroke:#f0abfc}.stroke-fuchsia-400{stroke:#e879f9}.stroke-fuchsia-50{stroke:#fdf4ff}.stroke-fuchsia-500{stroke:#d946ef}.stroke-fuchsia-600{stroke:#c026d3}.stroke-fuchsia-700{stroke:#a21caf}.stroke-fuchsia-800{stroke:#86198f}.stroke-fuchsia-900{stroke:#701a75}.stroke-fuchsia-950{stroke:#4a044e}.stroke-gray-100{stroke:#f3f4f6}.stroke-gray-200{stroke:#e5e7eb}.stroke-gray-300{stroke:#d1d5db}.stroke-gray-400{stroke:#9ca3af}.stroke-gray-50{stroke:#f9fafb}.stroke-gray-500{stroke:#6b7280}.stroke-gray-600{stroke:#4b5563}.stroke-gray-700{stroke:#374151}.stroke-gray-800{stroke:#1f2937}.stroke-gray-900{stroke:#111827}.stroke-gray-950{stroke:#030712}.stroke-green-100{stroke:#dcfce7}.stroke-green-200{stroke:#bbf7d0}.stroke-green-300{stroke:#86efac}.stroke-green-400{stroke:#4ade80}.stroke-green-50{stroke:#f0fdf4}.stroke-green-500{stroke:#22c55e}.stroke-green-600{stroke:#16a34a}.stroke-green-700{stroke:#15803d}.stroke-green-800{stroke:#166534}.stroke-green-900{stroke:#14532d}.stroke-green-950{stroke:#052e16}.stroke-indigo-100{stroke:#e0e7ff}.stroke-indigo-200{stroke:#c7d2fe}.stroke-indigo-300{stroke:#a5b4fc}.stroke-indigo-400{stroke:#818cf8}.stroke-indigo-50{stroke:#eef2ff}.stroke-indigo-500{stroke:#6366f1}.stroke-indigo-600{stroke:#4f46e5}.stroke-indigo-700{stroke:#4338ca}.stroke-indigo-800{stroke:#3730a3}.stroke-indigo-900{stroke:#312e81}.stroke-indigo-950{stroke:#1e1b4b}.stroke-lime-100{stroke:#ecfccb}.stroke-lime-200{stroke:#d9f99d}.stroke-lime-300{stroke:#bef264}.stroke-lime-400{stroke:#a3e635}.stroke-lime-50{stroke:#f7fee7}.stroke-lime-500{stroke:#84cc16}.stroke-lime-600{stroke:#65a30d}.stroke-lime-700{stroke:#4d7c0f}.stroke-lime-800{stroke:#3f6212}.stroke-lime-900{stroke:#365314}.stroke-lime-950{stroke:#1a2e05}.stroke-neutral-100{stroke:#f5f5f5}.stroke-neutral-200{stroke:#e5e5e5}.stroke-neutral-300{stroke:#d4d4d4}.stroke-neutral-400{stroke:#a3a3a3}.stroke-neutral-50{stroke:#fafafa}.stroke-neutral-500{stroke:#737373}.stroke-neutral-600{stroke:#525252}.stroke-neutral-700{stroke:#404040}.stroke-neutral-800{stroke:#262626}.stroke-neutral-900{stroke:#171717}.stroke-neutral-950{stroke:#0a0a0a}.stroke-orange-100{stroke:#ffedd5}.stroke-orange-200{stroke:#fed7aa}.stroke-orange-300{stroke:#fdba74}.stroke-orange-400{stroke:#fb923c}.stroke-orange-50{stroke:#fff7ed}.stroke-orange-500{stroke:#f97316}.stroke-orange-600{stroke:#ea580c}.stroke-orange-700{stroke:#c2410c}.stroke-orange-800{stroke:#9a3412}.stroke-orange-900{stroke:#7c2d12}.stroke-orange-950{stroke:#431407}.stroke-pink-100{stroke:#fce7f3}.stroke-pink-200{stroke:#fbcfe8}.stroke-pink-300{stroke:#f9a8d4}.stroke-pink-400{stroke:#f472b6}.stroke-pink-50{stroke:#fdf2f8}.stroke-pink-500{stroke:#ec4899}.stroke-pink-600{stroke:#db2777}.stroke-pink-700{stroke:#be185d}.stroke-pink-800{stroke:#9d174d}.stroke-pink-900{stroke:#831843}.stroke-pink-950{stroke:#500724}.stroke-purple-100{stroke:#f3e8ff}.stroke-purple-200{stroke:#e9d5ff}.stroke-purple-300{stroke:#d8b4fe}.stroke-purple-400{stroke:#c084fc}.stroke-purple-50{stroke:#faf5ff}.stroke-purple-500{stroke:#a855f7}.stroke-purple-600{stroke:#9333ea}.stroke-purple-700{stroke:#7e22ce}.stroke-purple-800{stroke:#6b21a8}.stroke-purple-900{stroke:#581c87}.stroke-purple-950{stroke:#3b0764}.stroke-red-100{stroke:#fee2e2}.stroke-red-200{stroke:#fecaca}.stroke-red-300{stroke:#fca5a5}.stroke-red-400{stroke:#f87171}.stroke-red-50{stroke:#fef2f2}.stroke-red-500{stroke:#ef4444}.stroke-red-600{stroke:#dc2626}.stroke-red-700{stroke:#b91c1c}.stroke-red-800{stroke:#991b1b}.stroke-red-900{stroke:#7f1d1d}.stroke-red-950{stroke:#450a0a}.stroke-rose-100{stroke:#ffe4e6}.stroke-rose-200{stroke:#fecdd3}.stroke-rose-300{stroke:#fda4af}.stroke-rose-400{stroke:#fb7185}.stroke-rose-50{stroke:#fff1f2}.stroke-rose-500{stroke:#f43f5e}.stroke-rose-600{stroke:#e11d48}.stroke-rose-700{stroke:#be123c}.stroke-rose-800{stroke:#9f1239}.stroke-rose-900{stroke:#881337}.stroke-rose-950{stroke:#4c0519}.stroke-sky-100{stroke:#e0f2fe}.stroke-sky-200{stroke:#bae6fd}.stroke-sky-300{stroke:#7dd3fc}.stroke-sky-400{stroke:#38bdf8}.stroke-sky-50{stroke:#f0f9ff}.stroke-sky-500{stroke:#0ea5e9}.stroke-sky-600{stroke:#0284c7}.stroke-sky-700{stroke:#0369a1}.stroke-sky-800{stroke:#075985}.stroke-sky-900{stroke:#0c4a6e}.stroke-sky-950{stroke:#082f49}.stroke-slate-100{stroke:#f1f5f9}.stroke-slate-200{stroke:#e2e8f0}.stroke-slate-300{stroke:#cbd5e1}.stroke-slate-400{stroke:#94a3b8}.stroke-slate-50{stroke:#f8fafc}.stroke-slate-500{stroke:#64748b}.stroke-slate-600{stroke:#475569}.stroke-slate-700{stroke:#334155}.stroke-slate-800{stroke:#1e293b}.stroke-slate-900{stroke:#0f172a}.stroke-slate-950{stroke:#020617}.stroke-stone-100{stroke:#f5f5f4}.stroke-stone-200{stroke:#e7e5e4}.stroke-stone-300{stroke:#d6d3d1}.stroke-stone-400{stroke:#a8a29e}.stroke-stone-50{stroke:#fafaf9}.stroke-stone-500{stroke:#78716c}.stroke-stone-600{stroke:#57534e}.stroke-stone-700{stroke:#44403c}.stroke-stone-800{stroke:#292524}.stroke-stone-900{stroke:#1c1917}.stroke-stone-950{stroke:#0c0a09}.stroke-teal-100{stroke:#ccfbf1}.stroke-teal-200{stroke:#99f6e4}.stroke-teal-300{stroke:#5eead4}.stroke-teal-400{stroke:#2dd4bf}.stroke-teal-50{stroke:#f0fdfa}.stroke-teal-500{stroke:#14b8a6}.stroke-teal-600{stroke:#0d9488}.stroke-teal-700{stroke:#0f766e}.stroke-teal-800{stroke:#115e59}.stroke-teal-900{stroke:#134e4a}.stroke-teal-950{stroke:#042f2e}.stroke-tremor-background{stroke:#fff}.stroke-tremor-border{stroke:#e5e7eb}.stroke-tremor-brand{stroke:#6366f1}.stroke-tremor-brand-muted\/50{stroke:#8688ef80}.stroke-violet-100{stroke:#ede9fe}.stroke-violet-200{stroke:#ddd6fe}.stroke-violet-300{stroke:#c4b5fd}.stroke-violet-400{stroke:#a78bfa}.stroke-violet-50{stroke:#f5f3ff}.stroke-violet-500{stroke:#8b5cf6}.stroke-violet-600{stroke:#7c3aed}.stroke-violet-700{stroke:#6d28d9}.stroke-violet-800{stroke:#5b21b6}.stroke-violet-900{stroke:#4c1d95}.stroke-violet-950{stroke:#2e1065}.stroke-yellow-100{stroke:#fef9c3}.stroke-yellow-200{stroke:#fef08a}.stroke-yellow-300{stroke:#fde047}.stroke-yellow-400{stroke:#facc15}.stroke-yellow-50{stroke:#fefce8}.stroke-yellow-500{stroke:#eab308}.stroke-yellow-600{stroke:#ca8a04}.stroke-yellow-700{stroke:#a16207}.stroke-yellow-800{stroke:#854d0e}.stroke-yellow-900{stroke:#713f12}.stroke-yellow-950{stroke:#422006}.stroke-zinc-100{stroke:#f4f4f5}.stroke-zinc-200{stroke:#e4e4e7}.stroke-zinc-300{stroke:#d4d4d8}.stroke-zinc-400{stroke:#a1a1aa}.stroke-zinc-50{stroke:#fafafa}.stroke-zinc-500{stroke:#71717a}.stroke-zinc-600{stroke:#52525b}.stroke-zinc-700{stroke:#3f3f46}.stroke-zinc-800{stroke:#27272a}.stroke-zinc-900{stroke:#18181b}.stroke-zinc-950{stroke:#09090b}.stroke-1{stroke-width:1px}.stroke-\[2\.5\]{stroke-width:2.5px}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.\!p-3{padding:.75rem!important}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[10px\]{padding-top:10px;padding-bottom:10px}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-0{padding-left:0}.pl-10{padding-left:2.5rem}.pl-11{padding-left:2.75rem}.pl-12{padding-left:3rem}.pl-14{padding-left:3.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-7{padding-left:1.75rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-0{padding-right:0}.pr-1{padding-right:.25rem}.pr-1\.5{padding-right:.375rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-14{padding-right:3.5rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.\!text-tremor-label{font-size:.75rem!important;line-height:.3rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-tremor-default{font-size:.775rem;line-height:1.15rem}.text-tremor-label{font-size:.75rem;line-height:.3rem}.text-tremor-metric{font-size:1.675rem;line-height:2.15rem}.text-tremor-title{font-size:1.025rem;line-height:1.65rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal)var(--tw-slashed-zero)var(--tw-numeric-figure)var(--tw-numeric-spacing)var(--tw-numeric-fraction)}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.\!text-tremor-content-subtle{--tw-text-opacity:1!important;color:rgb(156 163 175/var(--tw-text-opacity,1))!important}.\!text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.text-\[\#6366f1\]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-\[\#d1d5db\]\/15{color:#d1d5db26}.text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-amber-50{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-amber-900{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}.text-amber-950{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-blue-100{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.text-blue-200{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.text-blue-300{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-blue-50{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.text-blue-950{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}.text-current{color:currentColor}.text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.text-cyan-500{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.text-dark-tremor-brand{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-dark-tremor-brand-emphasis{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.text-dark-tremor-brand-inverted{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.text-dark-tremor-content{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-dark-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-dark-tremor-content-subtle{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-emerald-900{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}.text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.text-fuchsia-200{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}.text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.text-fuchsia-50{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}.text-fuchsia-500{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}.text-fuchsia-600{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}.text-fuchsia-700{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.text-fuchsia-800{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}.text-fuchsia-900{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}.text-fuchsia-950{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-gray-950{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.text-green-100{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.text-green-200{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.text-green-300{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-green-50{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.text-green-950{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}.text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.text-indigo-400{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.text-indigo-50{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}.text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.text-indigo-900{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}.text-indigo-950{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.text-inherit{color:inherit}.text-lime-100{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}.text-lime-200{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}.text-lime-300{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}.text-lime-400{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.text-lime-50{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}.text-lime-500{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}.text-lime-600{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}.text-lime-700{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}.text-lime-800{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}.text-lime-900{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.text-lime-950{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}.text-neutral-100{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}.text-neutral-200{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.text-neutral-300{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.text-orange-100{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}.text-orange-200{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}.text-orange-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.text-orange-50{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}.text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.text-orange-900{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}.text-orange-950{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}.text-pink-100{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}.text-pink-200{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}.text-pink-300{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}.text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.text-pink-50{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}.text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.text-pink-800{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.text-pink-900{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}.text-pink-950{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}.text-purple-100{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}.text-purple-200{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}.text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.text-purple-50{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}.text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.text-purple-900{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}.text-purple-950{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}.text-red-100{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-red-50{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.text-red-950{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}.text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.text-rose-50{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}.text-rose-500{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}.text-rose-700{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.text-rose-800{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}.text-rose-900{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}.text-rose-950{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}.text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.text-sky-50{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}.text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-sky-800{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}.text-sky-900{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}.text-sky-950{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.text-stone-500{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}.text-stone-600{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}.text-stone-700{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.text-stone-950{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}.text-teal-100{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}.text-teal-200{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}.text-teal-300{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}.text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.text-teal-50{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}.text-teal-500{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}.text-teal-600{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}.text-teal-700{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}.text-teal-800{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}.text-teal-900{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.text-teal-950{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}.text-transparent{color:#0000}.text-tremor-brand{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.text-tremor-brand-emphasis{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-tremor-brand-inverted{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-tremor-content{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-tremor-content-strong{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-tremor-content-subtle{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.text-violet-50{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}.text-violet-500{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}.text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.text-violet-900{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}.text-violet-950{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-100{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.text-yellow-200{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}.text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.text-yellow-50{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.text-yellow-950{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}.text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.placeholder-gray-400::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}.accent-dark-tremor-brand,.accent-tremor-brand{accent-color:#6366f1}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px #00000040;--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[-4px_0_4px_-4px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:-4px 0 4px -4px #0000001a;--tw-shadow-colored:-4px 0 4px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[-4px_0_8px_-6px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:-4px 0 8px -6px #0000001a;--tw-shadow-colored:-4px 0 8px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-dark-tremor-card{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-dark-tremor-input{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-tremor-card{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-tremor-dropdown{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-tremor-input{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-indigo-500\/20{--tw-shadow-color:#6366f133;--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline-offset:2px;outline:2px solid #0000}.outline{outline-style:solid}.outline-tremor-brand{outline-color:#6366f1}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-amber-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 243 199/var(--tw-ring-opacity,1))}.ring-amber-200{--tw-ring-opacity:1;--tw-ring-color:rgb(253 230 138/var(--tw-ring-opacity,1))}.ring-amber-300{--tw-ring-opacity:1;--tw-ring-color:rgb(252 211 77/var(--tw-ring-opacity,1))}.ring-amber-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 191 36/var(--tw-ring-opacity,1))}.ring-amber-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 251 235/var(--tw-ring-opacity,1))}.ring-amber-500{--tw-ring-opacity:1;--tw-ring-color:rgb(245 158 11/var(--tw-ring-opacity,1))}.ring-amber-600{--tw-ring-opacity:1;--tw-ring-color:rgb(217 119 6/var(--tw-ring-opacity,1))}.ring-amber-700{--tw-ring-opacity:1;--tw-ring-color:rgb(180 83 9/var(--tw-ring-opacity,1))}.ring-amber-800{--tw-ring-opacity:1;--tw-ring-color:rgb(146 64 14/var(--tw-ring-opacity,1))}.ring-amber-900{--tw-ring-opacity:1;--tw-ring-color:rgb(120 53 15/var(--tw-ring-opacity,1))}.ring-amber-950{--tw-ring-opacity:1;--tw-ring-color:rgb(69 26 3/var(--tw-ring-opacity,1))}.ring-blue-100{--tw-ring-opacity:1;--tw-ring-color:rgb(219 234 254/var(--tw-ring-opacity,1))}.ring-blue-200{--tw-ring-opacity:1;--tw-ring-color:rgb(191 219 254/var(--tw-ring-opacity,1))}.ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}.ring-blue-400{--tw-ring-opacity:1;--tw-ring-color:rgb(96 165 250/var(--tw-ring-opacity,1))}.ring-blue-50{--tw-ring-opacity:1;--tw-ring-color:rgb(239 246 255/var(--tw-ring-opacity,1))}.ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.ring-blue-600{--tw-ring-opacity:1;--tw-ring-color:rgb(37 99 235/var(--tw-ring-opacity,1))}.ring-blue-700{--tw-ring-opacity:1;--tw-ring-color:rgb(29 78 216/var(--tw-ring-opacity,1))}.ring-blue-800{--tw-ring-opacity:1;--tw-ring-color:rgb(30 64 175/var(--tw-ring-opacity,1))}.ring-blue-900{--tw-ring-opacity:1;--tw-ring-color:rgb(30 58 138/var(--tw-ring-opacity,1))}.ring-blue-950{--tw-ring-opacity:1;--tw-ring-color:rgb(23 37 84/var(--tw-ring-opacity,1))}.ring-cyan-100{--tw-ring-opacity:1;--tw-ring-color:rgb(207 250 254/var(--tw-ring-opacity,1))}.ring-cyan-200{--tw-ring-opacity:1;--tw-ring-color:rgb(165 243 252/var(--tw-ring-opacity,1))}.ring-cyan-300{--tw-ring-opacity:1;--tw-ring-color:rgb(103 232 249/var(--tw-ring-opacity,1))}.ring-cyan-400{--tw-ring-opacity:1;--tw-ring-color:rgb(34 211 238/var(--tw-ring-opacity,1))}.ring-cyan-50{--tw-ring-opacity:1;--tw-ring-color:rgb(236 254 255/var(--tw-ring-opacity,1))}.ring-cyan-500{--tw-ring-opacity:1;--tw-ring-color:rgb(6 182 212/var(--tw-ring-opacity,1))}.ring-cyan-600{--tw-ring-opacity:1;--tw-ring-color:rgb(8 145 178/var(--tw-ring-opacity,1))}.ring-cyan-700{--tw-ring-opacity:1;--tw-ring-color:rgb(14 116 144/var(--tw-ring-opacity,1))}.ring-cyan-800{--tw-ring-opacity:1;--tw-ring-color:rgb(21 94 117/var(--tw-ring-opacity,1))}.ring-cyan-900{--tw-ring-opacity:1;--tw-ring-color:rgb(22 78 99/var(--tw-ring-opacity,1))}.ring-cyan-950{--tw-ring-opacity:1;--tw-ring-color:rgb(8 51 68/var(--tw-ring-opacity,1))}.ring-dark-tremor-ring{--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity,1))}.ring-emerald-100{--tw-ring-opacity:1;--tw-ring-color:rgb(209 250 229/var(--tw-ring-opacity,1))}.ring-emerald-200{--tw-ring-opacity:1;--tw-ring-color:rgb(167 243 208/var(--tw-ring-opacity,1))}.ring-emerald-300{--tw-ring-opacity:1;--tw-ring-color:rgb(110 231 183/var(--tw-ring-opacity,1))}.ring-emerald-400{--tw-ring-opacity:1;--tw-ring-color:rgb(52 211 153/var(--tw-ring-opacity,1))}.ring-emerald-50{--tw-ring-opacity:1;--tw-ring-color:rgb(236 253 245/var(--tw-ring-opacity,1))}.ring-emerald-500{--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity,1))}.ring-emerald-600{--tw-ring-opacity:1;--tw-ring-color:rgb(5 150 105/var(--tw-ring-opacity,1))}.ring-emerald-700{--tw-ring-opacity:1;--tw-ring-color:rgb(4 120 87/var(--tw-ring-opacity,1))}.ring-emerald-800{--tw-ring-opacity:1;--tw-ring-color:rgb(6 95 70/var(--tw-ring-opacity,1))}.ring-emerald-900{--tw-ring-opacity:1;--tw-ring-color:rgb(6 78 59/var(--tw-ring-opacity,1))}.ring-emerald-950{--tw-ring-opacity:1;--tw-ring-color:rgb(2 44 34/var(--tw-ring-opacity,1))}.ring-fuchsia-100{--tw-ring-opacity:1;--tw-ring-color:rgb(250 232 255/var(--tw-ring-opacity,1))}.ring-fuchsia-200{--tw-ring-opacity:1;--tw-ring-color:rgb(245 208 254/var(--tw-ring-opacity,1))}.ring-fuchsia-300{--tw-ring-opacity:1;--tw-ring-color:rgb(240 171 252/var(--tw-ring-opacity,1))}.ring-fuchsia-400{--tw-ring-opacity:1;--tw-ring-color:rgb(232 121 249/var(--tw-ring-opacity,1))}.ring-fuchsia-50{--tw-ring-opacity:1;--tw-ring-color:rgb(253 244 255/var(--tw-ring-opacity,1))}.ring-fuchsia-500{--tw-ring-opacity:1;--tw-ring-color:rgb(217 70 239/var(--tw-ring-opacity,1))}.ring-fuchsia-600{--tw-ring-opacity:1;--tw-ring-color:rgb(192 38 211/var(--tw-ring-opacity,1))}.ring-fuchsia-700{--tw-ring-opacity:1;--tw-ring-color:rgb(162 28 175/var(--tw-ring-opacity,1))}.ring-fuchsia-800{--tw-ring-opacity:1;--tw-ring-color:rgb(134 25 143/var(--tw-ring-opacity,1))}.ring-fuchsia-900{--tw-ring-opacity:1;--tw-ring-color:rgb(112 26 117/var(--tw-ring-opacity,1))}.ring-fuchsia-950{--tw-ring-opacity:1;--tw-ring-color:rgb(74 4 78/var(--tw-ring-opacity,1))}.ring-gray-100{--tw-ring-opacity:1;--tw-ring-color:rgb(243 244 246/var(--tw-ring-opacity,1))}.ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity,1))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity,1))}.ring-gray-400{--tw-ring-opacity:1;--tw-ring-color:rgb(156 163 175/var(--tw-ring-opacity,1))}.ring-gray-50{--tw-ring-opacity:1;--tw-ring-color:rgb(249 250 251/var(--tw-ring-opacity,1))}.ring-gray-500{--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity,1))}.ring-gray-600{--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity,1))}.ring-gray-700{--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity,1))}.ring-gray-800{--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity,1))}.ring-gray-900{--tw-ring-opacity:1;--tw-ring-color:rgb(17 24 39/var(--tw-ring-opacity,1))}.ring-gray-950{--tw-ring-opacity:1;--tw-ring-color:rgb(3 7 18/var(--tw-ring-opacity,1))}.ring-green-100{--tw-ring-opacity:1;--tw-ring-color:rgb(220 252 231/var(--tw-ring-opacity,1))}.ring-green-200{--tw-ring-opacity:1;--tw-ring-color:rgb(187 247 208/var(--tw-ring-opacity,1))}.ring-green-300{--tw-ring-opacity:1;--tw-ring-color:rgb(134 239 172/var(--tw-ring-opacity,1))}.ring-green-400{--tw-ring-opacity:1;--tw-ring-color:rgb(74 222 128/var(--tw-ring-opacity,1))}.ring-green-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 253 244/var(--tw-ring-opacity,1))}.ring-green-500{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity,1))}.ring-green-600{--tw-ring-opacity:1;--tw-ring-color:rgb(22 163 74/var(--tw-ring-opacity,1))}.ring-green-700{--tw-ring-opacity:1;--tw-ring-color:rgb(21 128 61/var(--tw-ring-opacity,1))}.ring-green-800{--tw-ring-opacity:1;--tw-ring-color:rgb(22 101 52/var(--tw-ring-opacity,1))}.ring-green-900{--tw-ring-opacity:1;--tw-ring-color:rgb(20 83 45/var(--tw-ring-opacity,1))}.ring-green-950{--tw-ring-opacity:1;--tw-ring-color:rgb(5 46 22/var(--tw-ring-opacity,1))}.ring-indigo-100{--tw-ring-opacity:1;--tw-ring-color:rgb(224 231 255/var(--tw-ring-opacity,1))}.ring-indigo-200{--tw-ring-opacity:1;--tw-ring-color:rgb(199 210 254/var(--tw-ring-opacity,1))}.ring-indigo-300{--tw-ring-opacity:1;--tw-ring-color:rgb(165 180 252/var(--tw-ring-opacity,1))}.ring-indigo-400{--tw-ring-opacity:1;--tw-ring-color:rgb(129 140 248/var(--tw-ring-opacity,1))}.ring-indigo-50{--tw-ring-opacity:1;--tw-ring-color:rgb(238 242 255/var(--tw-ring-opacity,1))}.ring-indigo-500{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity,1))}.ring-indigo-600{--tw-ring-opacity:1;--tw-ring-color:rgb(79 70 229/var(--tw-ring-opacity,1))}.ring-indigo-700{--tw-ring-opacity:1;--tw-ring-color:rgb(67 56 202/var(--tw-ring-opacity,1))}.ring-indigo-800{--tw-ring-opacity:1;--tw-ring-color:rgb(55 48 163/var(--tw-ring-opacity,1))}.ring-indigo-900{--tw-ring-opacity:1;--tw-ring-color:rgb(49 46 129/var(--tw-ring-opacity,1))}.ring-indigo-950{--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity,1))}.ring-lime-100{--tw-ring-opacity:1;--tw-ring-color:rgb(236 252 203/var(--tw-ring-opacity,1))}.ring-lime-200{--tw-ring-opacity:1;--tw-ring-color:rgb(217 249 157/var(--tw-ring-opacity,1))}.ring-lime-300{--tw-ring-opacity:1;--tw-ring-color:rgb(190 242 100/var(--tw-ring-opacity,1))}.ring-lime-400{--tw-ring-opacity:1;--tw-ring-color:rgb(163 230 53/var(--tw-ring-opacity,1))}.ring-lime-50{--tw-ring-opacity:1;--tw-ring-color:rgb(247 254 231/var(--tw-ring-opacity,1))}.ring-lime-500{--tw-ring-opacity:1;--tw-ring-color:rgb(132 204 22/var(--tw-ring-opacity,1))}.ring-lime-600{--tw-ring-opacity:1;--tw-ring-color:rgb(101 163 13/var(--tw-ring-opacity,1))}.ring-lime-700{--tw-ring-opacity:1;--tw-ring-color:rgb(77 124 15/var(--tw-ring-opacity,1))}.ring-lime-800{--tw-ring-opacity:1;--tw-ring-color:rgb(63 98 18/var(--tw-ring-opacity,1))}.ring-lime-900{--tw-ring-opacity:1;--tw-ring-color:rgb(54 83 20/var(--tw-ring-opacity,1))}.ring-lime-950{--tw-ring-opacity:1;--tw-ring-color:rgb(26 46 5/var(--tw-ring-opacity,1))}.ring-neutral-100{--tw-ring-opacity:1;--tw-ring-color:rgb(245 245 245/var(--tw-ring-opacity,1))}.ring-neutral-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 229 229/var(--tw-ring-opacity,1))}.ring-neutral-300{--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 212/var(--tw-ring-opacity,1))}.ring-neutral-400{--tw-ring-opacity:1;--tw-ring-color:rgb(163 163 163/var(--tw-ring-opacity,1))}.ring-neutral-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 250/var(--tw-ring-opacity,1))}.ring-neutral-500{--tw-ring-opacity:1;--tw-ring-color:rgb(115 115 115/var(--tw-ring-opacity,1))}.ring-neutral-600{--tw-ring-opacity:1;--tw-ring-color:rgb(82 82 82/var(--tw-ring-opacity,1))}.ring-neutral-700{--tw-ring-opacity:1;--tw-ring-color:rgb(64 64 64/var(--tw-ring-opacity,1))}.ring-neutral-800{--tw-ring-opacity:1;--tw-ring-color:rgb(38 38 38/var(--tw-ring-opacity,1))}.ring-neutral-900{--tw-ring-opacity:1;--tw-ring-color:rgb(23 23 23/var(--tw-ring-opacity,1))}.ring-neutral-950{--tw-ring-opacity:1;--tw-ring-color:rgb(10 10 10/var(--tw-ring-opacity,1))}.ring-orange-100{--tw-ring-opacity:1;--tw-ring-color:rgb(255 237 213/var(--tw-ring-opacity,1))}.ring-orange-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 215 170/var(--tw-ring-opacity,1))}.ring-orange-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 186 116/var(--tw-ring-opacity,1))}.ring-orange-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 146 60/var(--tw-ring-opacity,1))}.ring-orange-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 247 237/var(--tw-ring-opacity,1))}.ring-orange-500{--tw-ring-opacity:1;--tw-ring-color:rgb(249 115 22/var(--tw-ring-opacity,1))}.ring-orange-600{--tw-ring-opacity:1;--tw-ring-color:rgb(234 88 12/var(--tw-ring-opacity,1))}.ring-orange-700{--tw-ring-opacity:1;--tw-ring-color:rgb(194 65 12/var(--tw-ring-opacity,1))}.ring-orange-800{--tw-ring-opacity:1;--tw-ring-color:rgb(154 52 18/var(--tw-ring-opacity,1))}.ring-orange-900{--tw-ring-opacity:1;--tw-ring-color:rgb(124 45 18/var(--tw-ring-opacity,1))}.ring-orange-950{--tw-ring-opacity:1;--tw-ring-color:rgb(67 20 7/var(--tw-ring-opacity,1))}.ring-pink-100{--tw-ring-opacity:1;--tw-ring-color:rgb(252 231 243/var(--tw-ring-opacity,1))}.ring-pink-200{--tw-ring-opacity:1;--tw-ring-color:rgb(251 207 232/var(--tw-ring-opacity,1))}.ring-pink-300{--tw-ring-opacity:1;--tw-ring-color:rgb(249 168 212/var(--tw-ring-opacity,1))}.ring-pink-400{--tw-ring-opacity:1;--tw-ring-color:rgb(244 114 182/var(--tw-ring-opacity,1))}.ring-pink-50{--tw-ring-opacity:1;--tw-ring-color:rgb(253 242 248/var(--tw-ring-opacity,1))}.ring-pink-500{--tw-ring-opacity:1;--tw-ring-color:rgb(236 72 153/var(--tw-ring-opacity,1))}.ring-pink-600{--tw-ring-opacity:1;--tw-ring-color:rgb(219 39 119/var(--tw-ring-opacity,1))}.ring-pink-700{--tw-ring-opacity:1;--tw-ring-color:rgb(190 24 93/var(--tw-ring-opacity,1))}.ring-pink-800{--tw-ring-opacity:1;--tw-ring-color:rgb(157 23 77/var(--tw-ring-opacity,1))}.ring-pink-900{--tw-ring-opacity:1;--tw-ring-color:rgb(131 24 67/var(--tw-ring-opacity,1))}.ring-pink-950{--tw-ring-opacity:1;--tw-ring-color:rgb(80 7 36/var(--tw-ring-opacity,1))}.ring-purple-100{--tw-ring-opacity:1;--tw-ring-color:rgb(243 232 255/var(--tw-ring-opacity,1))}.ring-purple-200{--tw-ring-opacity:1;--tw-ring-color:rgb(233 213 255/var(--tw-ring-opacity,1))}.ring-purple-300{--tw-ring-opacity:1;--tw-ring-color:rgb(216 180 254/var(--tw-ring-opacity,1))}.ring-purple-400{--tw-ring-opacity:1;--tw-ring-color:rgb(192 132 252/var(--tw-ring-opacity,1))}.ring-purple-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 245 255/var(--tw-ring-opacity,1))}.ring-purple-500{--tw-ring-opacity:1;--tw-ring-color:rgb(168 85 247/var(--tw-ring-opacity,1))}.ring-purple-600{--tw-ring-opacity:1;--tw-ring-color:rgb(147 51 234/var(--tw-ring-opacity,1))}.ring-purple-700{--tw-ring-opacity:1;--tw-ring-color:rgb(126 34 206/var(--tw-ring-opacity,1))}.ring-purple-800{--tw-ring-opacity:1;--tw-ring-color:rgb(107 33 168/var(--tw-ring-opacity,1))}.ring-purple-900{--tw-ring-opacity:1;--tw-ring-color:rgb(88 28 135/var(--tw-ring-opacity,1))}.ring-purple-950{--tw-ring-opacity:1;--tw-ring-color:rgb(59 7 100/var(--tw-ring-opacity,1))}.ring-red-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 226 226/var(--tw-ring-opacity,1))}.ring-red-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 202 202/var(--tw-ring-opacity,1))}.ring-red-300{--tw-ring-opacity:1;--tw-ring-color:rgb(252 165 165/var(--tw-ring-opacity,1))}.ring-red-400{--tw-ring-opacity:1;--tw-ring-color:rgb(248 113 113/var(--tw-ring-opacity,1))}.ring-red-50{--tw-ring-opacity:1;--tw-ring-color:rgb(254 242 242/var(--tw-ring-opacity,1))}.ring-red-500{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.ring-red-600{--tw-ring-opacity:1;--tw-ring-color:rgb(220 38 38/var(--tw-ring-opacity,1))}.ring-red-700{--tw-ring-opacity:1;--tw-ring-color:rgb(185 28 28/var(--tw-ring-opacity,1))}.ring-red-800{--tw-ring-opacity:1;--tw-ring-color:rgb(153 27 27/var(--tw-ring-opacity,1))}.ring-red-900{--tw-ring-opacity:1;--tw-ring-color:rgb(127 29 29/var(--tw-ring-opacity,1))}.ring-red-950{--tw-ring-opacity:1;--tw-ring-color:rgb(69 10 10/var(--tw-ring-opacity,1))}.ring-rose-100{--tw-ring-opacity:1;--tw-ring-color:rgb(255 228 230/var(--tw-ring-opacity,1))}.ring-rose-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 205 211/var(--tw-ring-opacity,1))}.ring-rose-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 164 175/var(--tw-ring-opacity,1))}.ring-rose-400{--tw-ring-opacity:1;--tw-ring-color:rgb(251 113 133/var(--tw-ring-opacity,1))}.ring-rose-50{--tw-ring-opacity:1;--tw-ring-color:rgb(255 241 242/var(--tw-ring-opacity,1))}.ring-rose-500{--tw-ring-opacity:1;--tw-ring-color:rgb(244 63 94/var(--tw-ring-opacity,1))}.ring-rose-600{--tw-ring-opacity:1;--tw-ring-color:rgb(225 29 72/var(--tw-ring-opacity,1))}.ring-rose-700{--tw-ring-opacity:1;--tw-ring-color:rgb(190 18 60/var(--tw-ring-opacity,1))}.ring-rose-800{--tw-ring-opacity:1;--tw-ring-color:rgb(159 18 57/var(--tw-ring-opacity,1))}.ring-rose-900{--tw-ring-opacity:1;--tw-ring-color:rgb(136 19 55/var(--tw-ring-opacity,1))}.ring-rose-950{--tw-ring-opacity:1;--tw-ring-color:rgb(76 5 25/var(--tw-ring-opacity,1))}.ring-sky-100{--tw-ring-opacity:1;--tw-ring-color:rgb(224 242 254/var(--tw-ring-opacity,1))}.ring-sky-200{--tw-ring-opacity:1;--tw-ring-color:rgb(186 230 253/var(--tw-ring-opacity,1))}.ring-sky-300{--tw-ring-opacity:1;--tw-ring-color:rgb(125 211 252/var(--tw-ring-opacity,1))}.ring-sky-400{--tw-ring-opacity:1;--tw-ring-color:rgb(56 189 248/var(--tw-ring-opacity,1))}.ring-sky-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 249 255/var(--tw-ring-opacity,1))}.ring-sky-500{--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity,1))}.ring-sky-600{--tw-ring-opacity:1;--tw-ring-color:rgb(2 132 199/var(--tw-ring-opacity,1))}.ring-sky-700{--tw-ring-opacity:1;--tw-ring-color:rgb(3 105 161/var(--tw-ring-opacity,1))}.ring-sky-800{--tw-ring-opacity:1;--tw-ring-color:rgb(7 89 133/var(--tw-ring-opacity,1))}.ring-sky-900{--tw-ring-opacity:1;--tw-ring-color:rgb(12 74 110/var(--tw-ring-opacity,1))}.ring-sky-950{--tw-ring-opacity:1;--tw-ring-color:rgb(8 47 73/var(--tw-ring-opacity,1))}.ring-slate-100{--tw-ring-opacity:1;--tw-ring-color:rgb(241 245 249/var(--tw-ring-opacity,1))}.ring-slate-200{--tw-ring-opacity:1;--tw-ring-color:rgb(226 232 240/var(--tw-ring-opacity,1))}.ring-slate-300{--tw-ring-opacity:1;--tw-ring-color:rgb(203 213 225/var(--tw-ring-opacity,1))}.ring-slate-400{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.ring-slate-50{--tw-ring-opacity:1;--tw-ring-color:rgb(248 250 252/var(--tw-ring-opacity,1))}.ring-slate-500{--tw-ring-opacity:1;--tw-ring-color:rgb(100 116 139/var(--tw-ring-opacity,1))}.ring-slate-600{--tw-ring-opacity:1;--tw-ring-color:rgb(71 85 105/var(--tw-ring-opacity,1))}.ring-slate-700{--tw-ring-opacity:1;--tw-ring-color:rgb(51 65 85/var(--tw-ring-opacity,1))}.ring-slate-800{--tw-ring-opacity:1;--tw-ring-color:rgb(30 41 59/var(--tw-ring-opacity,1))}.ring-slate-900{--tw-ring-opacity:1;--tw-ring-color:rgb(15 23 42/var(--tw-ring-opacity,1))}.ring-slate-950{--tw-ring-opacity:1;--tw-ring-color:rgb(2 6 23/var(--tw-ring-opacity,1))}.ring-stone-100{--tw-ring-opacity:1;--tw-ring-color:rgb(245 245 244/var(--tw-ring-opacity,1))}.ring-stone-200{--tw-ring-opacity:1;--tw-ring-color:rgb(231 229 228/var(--tw-ring-opacity,1))}.ring-stone-300{--tw-ring-opacity:1;--tw-ring-color:rgb(214 211 209/var(--tw-ring-opacity,1))}.ring-stone-400{--tw-ring-opacity:1;--tw-ring-color:rgb(168 162 158/var(--tw-ring-opacity,1))}.ring-stone-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 249/var(--tw-ring-opacity,1))}.ring-stone-500{--tw-ring-opacity:1;--tw-ring-color:rgb(120 113 108/var(--tw-ring-opacity,1))}.ring-stone-600{--tw-ring-opacity:1;--tw-ring-color:rgb(87 83 78/var(--tw-ring-opacity,1))}.ring-stone-700{--tw-ring-opacity:1;--tw-ring-color:rgb(68 64 60/var(--tw-ring-opacity,1))}.ring-stone-800{--tw-ring-opacity:1;--tw-ring-color:rgb(41 37 36/var(--tw-ring-opacity,1))}.ring-stone-900{--tw-ring-opacity:1;--tw-ring-color:rgb(28 25 23/var(--tw-ring-opacity,1))}.ring-stone-950{--tw-ring-opacity:1;--tw-ring-color:rgb(12 10 9/var(--tw-ring-opacity,1))}.ring-teal-100{--tw-ring-opacity:1;--tw-ring-color:rgb(204 251 241/var(--tw-ring-opacity,1))}.ring-teal-200{--tw-ring-opacity:1;--tw-ring-color:rgb(153 246 228/var(--tw-ring-opacity,1))}.ring-teal-300{--tw-ring-opacity:1;--tw-ring-color:rgb(94 234 212/var(--tw-ring-opacity,1))}.ring-teal-400{--tw-ring-opacity:1;--tw-ring-color:rgb(45 212 191/var(--tw-ring-opacity,1))}.ring-teal-50{--tw-ring-opacity:1;--tw-ring-color:rgb(240 253 250/var(--tw-ring-opacity,1))}.ring-teal-500{--tw-ring-opacity:1;--tw-ring-color:rgb(20 184 166/var(--tw-ring-opacity,1))}.ring-teal-600{--tw-ring-opacity:1;--tw-ring-color:rgb(13 148 136/var(--tw-ring-opacity,1))}.ring-teal-700{--tw-ring-opacity:1;--tw-ring-color:rgb(15 118 110/var(--tw-ring-opacity,1))}.ring-teal-800{--tw-ring-opacity:1;--tw-ring-color:rgb(17 94 89/var(--tw-ring-opacity,1))}.ring-teal-900{--tw-ring-opacity:1;--tw-ring-color:rgb(19 78 74/var(--tw-ring-opacity,1))}.ring-teal-950{--tw-ring-opacity:1;--tw-ring-color:rgb(4 47 46/var(--tw-ring-opacity,1))}.ring-tremor-brand-inverted{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.ring-tremor-brand-muted{--tw-ring-opacity:1;--tw-ring-color:rgb(134 136 239/var(--tw-ring-opacity,1))}.ring-tremor-brand\/20{--tw-ring-color:#6366f133}.ring-tremor-ring{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity,1))}.ring-violet-100{--tw-ring-opacity:1;--tw-ring-color:rgb(237 233 254/var(--tw-ring-opacity,1))}.ring-violet-200{--tw-ring-opacity:1;--tw-ring-color:rgb(221 214 254/var(--tw-ring-opacity,1))}.ring-violet-300{--tw-ring-opacity:1;--tw-ring-color:rgb(196 181 253/var(--tw-ring-opacity,1))}.ring-violet-400{--tw-ring-opacity:1;--tw-ring-color:rgb(167 139 250/var(--tw-ring-opacity,1))}.ring-violet-50{--tw-ring-opacity:1;--tw-ring-color:rgb(245 243 255/var(--tw-ring-opacity,1))}.ring-violet-500{--tw-ring-opacity:1;--tw-ring-color:rgb(139 92 246/var(--tw-ring-opacity,1))}.ring-violet-600{--tw-ring-opacity:1;--tw-ring-color:rgb(124 58 237/var(--tw-ring-opacity,1))}.ring-violet-700{--tw-ring-opacity:1;--tw-ring-color:rgb(109 40 217/var(--tw-ring-opacity,1))}.ring-violet-800{--tw-ring-opacity:1;--tw-ring-color:rgb(91 33 182/var(--tw-ring-opacity,1))}.ring-violet-900{--tw-ring-opacity:1;--tw-ring-color:rgb(76 29 149/var(--tw-ring-opacity,1))}.ring-violet-950{--tw-ring-opacity:1;--tw-ring-color:rgb(46 16 101/var(--tw-ring-opacity,1))}.ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.ring-yellow-100{--tw-ring-opacity:1;--tw-ring-color:rgb(254 249 195/var(--tw-ring-opacity,1))}.ring-yellow-200{--tw-ring-opacity:1;--tw-ring-color:rgb(254 240 138/var(--tw-ring-opacity,1))}.ring-yellow-300{--tw-ring-opacity:1;--tw-ring-color:rgb(253 224 71/var(--tw-ring-opacity,1))}.ring-yellow-400{--tw-ring-opacity:1;--tw-ring-color:rgb(250 204 21/var(--tw-ring-opacity,1))}.ring-yellow-50{--tw-ring-opacity:1;--tw-ring-color:rgb(254 252 232/var(--tw-ring-opacity,1))}.ring-yellow-500{--tw-ring-opacity:1;--tw-ring-color:rgb(234 179 8/var(--tw-ring-opacity,1))}.ring-yellow-600{--tw-ring-opacity:1;--tw-ring-color:rgb(202 138 4/var(--tw-ring-opacity,1))}.ring-yellow-700{--tw-ring-opacity:1;--tw-ring-color:rgb(161 98 7/var(--tw-ring-opacity,1))}.ring-yellow-800{--tw-ring-opacity:1;--tw-ring-color:rgb(133 77 14/var(--tw-ring-opacity,1))}.ring-yellow-900{--tw-ring-opacity:1;--tw-ring-color:rgb(113 63 18/var(--tw-ring-opacity,1))}.ring-yellow-950{--tw-ring-opacity:1;--tw-ring-color:rgb(66 32 6/var(--tw-ring-opacity,1))}.ring-zinc-100{--tw-ring-opacity:1;--tw-ring-color:rgb(244 244 245/var(--tw-ring-opacity,1))}.ring-zinc-200{--tw-ring-opacity:1;--tw-ring-color:rgb(228 228 231/var(--tw-ring-opacity,1))}.ring-zinc-300{--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.ring-zinc-400{--tw-ring-opacity:1;--tw-ring-color:rgb(161 161 170/var(--tw-ring-opacity,1))}.ring-zinc-50{--tw-ring-opacity:1;--tw-ring-color:rgb(250 250 250/var(--tw-ring-opacity,1))}.ring-zinc-500{--tw-ring-opacity:1;--tw-ring-color:rgb(113 113 122/var(--tw-ring-opacity,1))}.ring-zinc-600{--tw-ring-opacity:1;--tw-ring-color:rgb(82 82 91/var(--tw-ring-opacity,1))}.ring-zinc-700{--tw-ring-opacity:1;--tw-ring-color:rgb(63 63 70/var(--tw-ring-opacity,1))}.ring-zinc-800{--tw-ring-opacity:1;--tw-ring-color:rgb(39 39 42/var(--tw-ring-opacity,1))}.ring-zinc-900{--tw-ring-opacity:1;--tw-ring-color:rgb(24 24 27/var(--tw-ring-opacity,1))}.ring-zinc-950{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.ring-opacity-20{--tw-ring-opacity:.2}.ring-opacity-40{--tw-ring-opacity:.4}.blur{--tw-blur:blur(8px);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px #00000012)drop-shadow(0 2px 2px #0000000f);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.filter{filter:var(--tw-blur)var(--tw-brightness)var(--tw-contrast)var(--tw-grayscale)var(--tw-hue-rotate)var(--tw-invert)var(--tw-saturate)var(--tw-sepia)var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur)var(--tw-backdrop-brightness)var(--tw-backdrop-contrast)var(--tw-backdrop-grayscale)var(--tw-backdrop-hue-rotate)var(--tw-backdrop-invert)var(--tw-backdrop-opacity)var(--tw-backdrop-saturate)var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-property:box-shadow;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[--anchor-gap\:4px\]{--anchor-gap:4px}.\[appearance\:textfield\]{appearance:textfield}.\[scrollbar-width\:none\]{scrollbar-width:none}:root{--foreground-rgb:0,0,0;--background-start-rgb:255,255,255;--background-end-rgb:255,255,255;--neutral-border:#dcddeb}body{color:rgb(var(--foreground-rgb));background:linear-gradient(to bottom,transparent,rgb(var(--background-end-rgb)))rgb(var(--background-start-rgb))}.table-wrapper{margin:0 24px;overflow-x:scroll}.custom-border{border:1px solid var(--neutral-border)}.placeholder\:text-gray-400::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.placeholder\:text-red-500::placeholder{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.placeholder\:text-tremor-content::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.placeholder\:text-tremor-content-subtle::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.first\:rounded-l-\[4px\]:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.first\:border-l-0:first-child{border-left-width:0}.last\:mb-0:last-child{margin-bottom:0}.last\:rounded-r-\[4px\]:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.last\:border-0:last-child{border-width:0}.last\:border-b-0:last-child{border-bottom-width:0}.focus-within\:relative:focus-within{position:relative}.focus-within\:border-blue-400:focus-within{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.focus-within\:ring-2:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\:ring-blue-500\/20:focus-within{--tw-ring-color:#3b82f633}.hover\:border-b-2:hover{border-bottom-width:2px}.hover\:border-\[\#5558e3\]:hover{--tw-border-opacity:1;border-color:rgb(85 88 227/var(--tw-border-opacity,1))}.hover\:border-amber-100:hover{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}.hover\:border-amber-200:hover{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.hover\:border-amber-300:hover{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.hover\:border-amber-400:hover{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.hover\:border-amber-50:hover{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}.hover\:border-amber-500:hover{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.hover\:border-amber-600:hover{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}.hover\:border-amber-700:hover{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}.hover\:border-amber-800:hover{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}.hover\:border-amber-900:hover{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}.hover\:border-amber-950:hover{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}.hover\:border-blue-100:hover{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.hover\:border-blue-200:hover{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.hover\:border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.hover\:border-blue-50:hover{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}.hover\:border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.hover\:border-blue-600:hover{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.hover\:border-blue-700:hover{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}.hover\:border-blue-800:hover{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.hover\:border-blue-900:hover{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}.hover\:border-blue-950:hover{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}.hover\:border-cyan-100:hover{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.hover\:border-cyan-200:hover{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.hover\:border-cyan-300:hover{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.hover\:border-cyan-400:hover{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.hover\:border-cyan-50:hover{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}.hover\:border-cyan-500:hover{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.hover\:border-cyan-600:hover{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}.hover\:border-cyan-700:hover{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}.hover\:border-cyan-800:hover{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}.hover\:border-cyan-900:hover{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}.hover\:border-cyan-950:hover{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}.hover\:border-emerald-100:hover{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}.hover\:border-emerald-200:hover{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.hover\:border-emerald-300:hover{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.hover\:border-emerald-400:hover{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}.hover\:border-emerald-50:hover{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}.hover\:border-emerald-500:hover{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.hover\:border-emerald-600:hover{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}.hover\:border-emerald-700:hover{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}.hover\:border-emerald-800:hover{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}.hover\:border-emerald-900:hover{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}.hover\:border-emerald-950:hover{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}.hover\:border-fuchsia-100:hover{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}.hover\:border-fuchsia-200:hover{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}.hover\:border-fuchsia-300:hover{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.hover\:border-fuchsia-400:hover{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}.hover\:border-fuchsia-50:hover{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}.hover\:border-fuchsia-500:hover{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}.hover\:border-fuchsia-600:hover{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}.hover\:border-fuchsia-700:hover{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}.hover\:border-fuchsia-800:hover{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}.hover\:border-fuchsia-900:hover{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}.hover\:border-fuchsia-950:hover{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}.hover\:border-gray-100:hover{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.hover\:border-gray-200:hover{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.hover\:border-gray-400:hover{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.hover\:border-gray-50:hover{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}.hover\:border-gray-500:hover{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.hover\:border-gray-600:hover{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.hover\:border-gray-700:hover{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.hover\:border-gray-800:hover{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.hover\:border-gray-900:hover{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.hover\:border-gray-950:hover{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}.hover\:border-green-100:hover{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.hover\:border-green-200:hover{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.hover\:border-green-300:hover{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.hover\:border-green-400:hover{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.hover\:border-green-50:hover{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}.hover\:border-green-500:hover{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.hover\:border-green-600:hover{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}.hover\:border-green-700:hover{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}.hover\:border-green-800:hover{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.hover\:border-green-900:hover{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}.hover\:border-green-950:hover{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}.hover\:border-indigo-100:hover{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}.hover\:border-indigo-200:hover{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}.hover\:border-indigo-300:hover{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.hover\:border-indigo-400:hover{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.hover\:border-indigo-50:hover{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}.hover\:border-indigo-500:hover{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.hover\:border-indigo-600:hover{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}.hover\:border-indigo-700:hover{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.hover\:border-indigo-800:hover{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.hover\:border-indigo-900:hover{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}.hover\:border-indigo-950:hover{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.hover\:border-lime-100:hover{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}.hover\:border-lime-200:hover{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}.hover\:border-lime-300:hover{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.hover\:border-lime-400:hover{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}.hover\:border-lime-50:hover{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}.hover\:border-lime-500:hover{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}.hover\:border-lime-600:hover{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}.hover\:border-lime-700:hover{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}.hover\:border-lime-800:hover{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}.hover\:border-lime-900:hover{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}.hover\:border-lime-950:hover{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}.hover\:border-neutral-100:hover{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.hover\:border-neutral-200:hover{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.hover\:border-neutral-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.hover\:border-neutral-400:hover{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.hover\:border-neutral-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.hover\:border-neutral-500:hover{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}.hover\:border-neutral-600:hover{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}.hover\:border-neutral-700:hover{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.hover\:border-neutral-800:hover{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}.hover\:border-neutral-900:hover{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.hover\:border-neutral-950:hover{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}.hover\:border-orange-100:hover{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.hover\:border-orange-200:hover{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.hover\:border-orange-300:hover{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.hover\:border-orange-400:hover{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}.hover\:border-orange-50:hover{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}.hover\:border-orange-500:hover{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.hover\:border-orange-600:hover{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}.hover\:border-orange-700:hover{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}.hover\:border-orange-800:hover{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}.hover\:border-orange-900:hover{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}.hover\:border-orange-950:hover{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}.hover\:border-pink-100:hover{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}.hover\:border-pink-200:hover{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}.hover\:border-pink-300:hover{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.hover\:border-pink-400:hover{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}.hover\:border-pink-50:hover{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}.hover\:border-pink-500:hover{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}.hover\:border-pink-600:hover{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}.hover\:border-pink-700:hover{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}.hover\:border-pink-800:hover{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}.hover\:border-pink-900:hover{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.hover\:border-pink-950:hover{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}.hover\:border-purple-100:hover{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}.hover\:border-purple-200:hover{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.hover\:border-purple-300:hover{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.hover\:border-purple-400:hover{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}.hover\:border-purple-50:hover{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}.hover\:border-purple-500:hover{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.hover\:border-purple-600:hover{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}.hover\:border-purple-700:hover{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}.hover\:border-purple-800:hover{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}.hover\:border-purple-900:hover{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}.hover\:border-purple-950:hover{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}.hover\:border-red-100:hover{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.hover\:border-red-200:hover{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.hover\:border-red-300:hover{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.hover\:border-red-400:hover{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.hover\:border-red-50:hover{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}.hover\:border-red-500:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.hover\:border-red-600:hover{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.hover\:border-red-700:hover{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.hover\:border-red-800:hover{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.hover\:border-red-900:hover{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}.hover\:border-red-950:hover{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}.hover\:border-rose-100:hover{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}.hover\:border-rose-200:hover{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}.hover\:border-rose-300:hover{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.hover\:border-rose-400:hover{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}.hover\:border-rose-50:hover{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}.hover\:border-rose-500:hover{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.hover\:border-rose-600:hover{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}.hover\:border-rose-700:hover{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}.hover\:border-rose-800:hover{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}.hover\:border-rose-900:hover{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}.hover\:border-rose-950:hover{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}.hover\:border-sky-100:hover{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}.hover\:border-sky-200:hover{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.hover\:border-sky-300:hover{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.hover\:border-sky-400:hover{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.hover\:border-sky-50:hover{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}.hover\:border-sky-500:hover{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}.hover\:border-sky-600:hover{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}.hover\:border-sky-700:hover{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}.hover\:border-sky-800:hover{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}.hover\:border-sky-900:hover{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}.hover\:border-sky-950:hover{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}.hover\:border-slate-100:hover{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.hover\:border-slate-200:hover{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.hover\:border-slate-300:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.hover\:border-slate-400:hover{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}.hover\:border-slate-50:hover{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.hover\:border-slate-500:hover{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.hover\:border-slate-600:hover{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.hover\:border-slate-700:hover{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.hover\:border-slate-800:hover{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.hover\:border-slate-900:hover{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}.hover\:border-slate-950:hover{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}.hover\:border-stone-100:hover{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}.hover\:border-stone-200:hover{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.hover\:border-stone-300:hover{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.hover\:border-stone-400:hover{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.hover\:border-stone-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}.hover\:border-stone-500:hover{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.hover\:border-stone-600:hover{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.hover\:border-stone-700:hover{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}.hover\:border-stone-800:hover{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}.hover\:border-stone-900:hover{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}.hover\:border-stone-950:hover{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}.hover\:border-teal-100:hover{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}.hover\:border-teal-200:hover{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}.hover\:border-teal-300:hover{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.hover\:border-teal-400:hover{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}.hover\:border-teal-50:hover{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}.hover\:border-teal-500:hover{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}.hover\:border-teal-600:hover{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}.hover\:border-teal-700:hover{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}.hover\:border-teal-800:hover{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}.hover\:border-teal-900:hover{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}.hover\:border-teal-950:hover{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}.hover\:border-tremor-brand-emphasis:hover{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.hover\:border-tremor-content:hover{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.hover\:border-violet-100:hover{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}.hover\:border-violet-200:hover{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}.hover\:border-violet-300:hover{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.hover\:border-violet-400:hover{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}.hover\:border-violet-50:hover{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}.hover\:border-violet-500:hover{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}.hover\:border-violet-600:hover{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}.hover\:border-violet-700:hover{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}.hover\:border-violet-800:hover{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}.hover\:border-violet-900:hover{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}.hover\:border-violet-950:hover{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}.hover\:border-yellow-100:hover{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}.hover\:border-yellow-200:hover{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.hover\:border-yellow-300:hover{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.hover\:border-yellow-400:hover{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}.hover\:border-yellow-50:hover{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}.hover\:border-yellow-500:hover{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.hover\:border-yellow-600:hover{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}.hover\:border-yellow-700:hover{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}.hover\:border-yellow-800:hover{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.hover\:border-yellow-900:hover{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}.hover\:border-yellow-950:hover{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}.hover\:border-zinc-100:hover{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.hover\:border-zinc-200:hover{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.hover\:border-zinc-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.hover\:border-zinc-400:hover{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.hover\:border-zinc-50:hover{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.hover\:border-zinc-500:hover{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.hover\:border-zinc-600:hover{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}.hover\:border-zinc-700:hover{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.hover\:border-zinc-800:hover{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.hover\:border-zinc-900:hover{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.hover\:border-zinc-950:hover{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}.hover\:\!bg-blue-500:hover{--tw-bg-opacity:1!important;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))!important}.hover\:\!bg-blue-700:hover{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))!important}.hover\:bg-\[\#5558e3\]:hover{--tw-bg-opacity:1;background-color:rgb(85 88 227/var(--tw-bg-opacity,1))}.hover\:bg-amber-100:hover{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.hover\:bg-amber-200:hover{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}.hover\:bg-amber-300:hover{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}.hover\:bg-amber-400:hover{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.hover\:bg-amber-50:hover{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.hover\:bg-amber-500:hover{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.hover\:bg-amber-600:hover{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.hover\:bg-amber-700:hover{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.hover\:bg-amber-800:hover{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}.hover\:bg-amber-900:hover{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}.hover\:bg-amber-950:hover{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}.hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.hover\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.hover\:bg-blue-300:hover{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}.hover\:bg-blue-400:hover{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.hover\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.hover\:bg-blue-50\/50:hover{background-color:#eff6ff80}.hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.hover\:bg-blue-600:hover{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-blue-800:hover{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}.hover\:bg-blue-900:hover{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.hover\:bg-blue-950:hover{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.hover\:bg-cyan-100:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.hover\:bg-cyan-200:hover{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}.hover\:bg-cyan-300:hover{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}.hover\:bg-cyan-400:hover{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}.hover\:bg-cyan-50:hover{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.hover\:bg-cyan-500:hover{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.hover\:bg-cyan-600:hover{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.hover\:bg-cyan-700:hover{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}.hover\:bg-cyan-800:hover{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}.hover\:bg-cyan-900:hover{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}.hover\:bg-cyan-950:hover{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}.hover\:bg-emerald-100:hover{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.hover\:bg-emerald-200:hover{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}.hover\:bg-emerald-300:hover{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}.hover\:bg-emerald-400:hover{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.hover\:bg-emerald-50:hover{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.hover\:bg-emerald-500:hover{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.hover\:bg-emerald-600:hover{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.hover\:bg-emerald-700:hover{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.hover\:bg-emerald-800:hover{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}.hover\:bg-emerald-900:hover{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}.hover\:bg-emerald-950:hover{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-100:hover{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-200:hover{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-300:hover{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-400:hover{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-50:hover{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-500:hover{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-600:hover{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-700:hover{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-800:hover{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-900:hover{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}.hover\:bg-fuchsia-950:hover{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.hover\:bg-gray-400:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.hover\:bg-gray-950:hover{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}.hover\:bg-green-100:hover{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.hover\:bg-green-200:hover{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}.hover\:bg-green-300:hover{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.hover\:bg-green-400:hover{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.hover\:bg-green-50:hover{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.hover\:bg-green-500:hover{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.hover\:bg-green-600:hover{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.hover\:bg-green-800:hover{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}.hover\:bg-green-900:hover{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.hover\:bg-green-950:hover{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.hover\:bg-indigo-100:hover{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.hover\:bg-indigo-200:hover{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}.hover\:bg-indigo-300:hover{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}.hover\:bg-indigo-400:hover{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.hover\:bg-indigo-50:hover{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.hover\:bg-indigo-500:hover{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.hover\:bg-indigo-600:hover{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.hover\:bg-indigo-800:hover{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}.hover\:bg-indigo-900:hover{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}.hover\:bg-indigo-950:hover{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.hover\:bg-lime-100:hover{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.hover\:bg-lime-200:hover{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}.hover\:bg-lime-300:hover{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}.hover\:bg-lime-400:hover{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}.hover\:bg-lime-50:hover{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}.hover\:bg-lime-500:hover{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.hover\:bg-lime-600:hover{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}.hover\:bg-lime-700:hover{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}.hover\:bg-lime-800:hover{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}.hover\:bg-lime-900:hover{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}.hover\:bg-lime-950:hover{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}.hover\:bg-neutral-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.hover\:bg-neutral-200:hover{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.hover\:bg-neutral-300:hover{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.hover\:bg-neutral-400:hover{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.hover\:bg-neutral-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\:bg-neutral-500:hover{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}.hover\:bg-neutral-600:hover{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}.hover\:bg-neutral-700:hover{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.hover\:bg-neutral-800:hover{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.hover\:bg-neutral-900:hover{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.hover\:bg-neutral-950:hover{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}.hover\:bg-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\:bg-orange-200:hover{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}.hover\:bg-orange-300:hover{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}.hover\:bg-orange-400:hover{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.hover\:bg-orange-50:hover{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.hover\:bg-orange-500:hover{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.hover\:bg-orange-600:hover{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}.hover\:bg-orange-700:hover{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}.hover\:bg-orange-800:hover{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}.hover\:bg-orange-900:hover{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}.hover\:bg-orange-950:hover{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}.hover\:bg-pink-100:hover{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.hover\:bg-pink-200:hover{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}.hover\:bg-pink-300:hover{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}.hover\:bg-pink-400:hover{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}.hover\:bg-pink-50:hover{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.hover\:bg-pink-500:hover{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.hover\:bg-pink-600:hover{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}.hover\:bg-pink-700:hover{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}.hover\:bg-pink-800:hover{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}.hover\:bg-pink-900:hover{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}.hover\:bg-pink-950:hover{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}.hover\:bg-purple-100:hover{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.hover\:bg-purple-200:hover{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}.hover\:bg-purple-300:hover{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}.hover\:bg-purple-400:hover{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}.hover\:bg-purple-50:hover{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.hover\:bg-purple-500:hover{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.hover\:bg-purple-600:hover{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}.hover\:bg-purple-700:hover{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.hover\:bg-purple-800:hover{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}.hover\:bg-purple-900:hover{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.hover\:bg-purple-950:hover{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}.hover\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.hover\:bg-red-300:hover{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}.hover\:bg-red-400:hover{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.hover\:bg-red-500:hover{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.hover\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.hover\:bg-red-800:hover{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}.hover\:bg-red-900:hover{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.hover\:bg-red-950:hover{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.hover\:bg-rose-100:hover{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.hover\:bg-rose-200:hover{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}.hover\:bg-rose-300:hover{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}.hover\:bg-rose-400:hover{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.hover\:bg-rose-50:hover{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}.hover\:bg-rose-500:hover{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.hover\:bg-rose-600:hover{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.hover\:bg-rose-700:hover{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}.hover\:bg-rose-800:hover{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}.hover\:bg-rose-900:hover{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}.hover\:bg-rose-950:hover{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}.hover\:bg-sky-100:hover{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.hover\:bg-sky-200:hover{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}.hover\:bg-sky-300:hover{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}.hover\:bg-sky-400:hover{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}.hover\:bg-sky-50:hover{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.hover\:bg-sky-500:hover{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.hover\:bg-sky-600:hover{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.hover\:bg-sky-700:hover{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}.hover\:bg-sky-800:hover{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}.hover\:bg-sky-900:hover{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}.hover\:bg-sky-950:hover{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\:bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\:bg-slate-300:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.hover\:bg-slate-400:hover{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.hover\:bg-slate-500:hover{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}.hover\:bg-slate-600:hover{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.hover\:bg-slate-700:hover{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.hover\:bg-slate-900:hover{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.hover\:bg-slate-950:hover{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.hover\:bg-stone-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.hover\:bg-stone-200:hover{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.hover\:bg-stone-300:hover{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.hover\:bg-stone-400:hover{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}.hover\:bg-stone-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.hover\:bg-stone-500:hover{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.hover\:bg-stone-600:hover{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.hover\:bg-stone-700:hover{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}.hover\:bg-stone-800:hover{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.hover\:bg-stone-900:hover{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.hover\:bg-stone-950:hover{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}.hover\:bg-teal-100:hover{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.hover\:bg-teal-200:hover{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}.hover\:bg-teal-300:hover{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}.hover\:bg-teal-400:hover{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}.hover\:bg-teal-50:hover{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}.hover\:bg-teal-500:hover{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.hover\:bg-teal-600:hover{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}.hover\:bg-teal-700:hover{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}.hover\:bg-teal-800:hover{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}.hover\:bg-teal-900:hover{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}.hover\:bg-teal-950:hover{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}.hover\:bg-tremor-background-muted:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-tremor-background-subtle:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-tremor-brand-emphasis:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.hover\:bg-violet-100:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.hover\:bg-violet-200:hover{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}.hover\:bg-violet-300:hover{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}.hover\:bg-violet-400:hover{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}.hover\:bg-violet-50:hover{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.hover\:bg-violet-500:hover{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.hover\:bg-violet-600:hover{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.hover\:bg-violet-700:hover{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}.hover\:bg-violet-800:hover{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}.hover\:bg-violet-900:hover{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}.hover\:bg-violet-950:hover{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}.hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.hover\:bg-yellow-100:hover{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.hover\:bg-yellow-200:hover{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}.hover\:bg-yellow-300:hover{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}.hover\:bg-yellow-400:hover{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.hover\:bg-yellow-50:hover{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.hover\:bg-yellow-500:hover{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.hover\:bg-yellow-600:hover{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.hover\:bg-yellow-700:hover{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}.hover\:bg-yellow-800:hover{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}.hover\:bg-yellow-900:hover{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}.hover\:bg-yellow-950:hover{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.hover\:bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\:bg-zinc-200:hover{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.hover\:bg-zinc-300:hover{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.hover\:bg-zinc-400:hover{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.hover\:bg-zinc-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\:bg-zinc-500:hover{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.hover\:bg-zinc-600:hover{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.hover\:bg-zinc-700:hover{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.hover\:bg-zinc-800:hover{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.hover\:bg-zinc-900:hover{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.hover\:bg-zinc-950:hover{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.hover\:bg-opacity-20:hover{--tw-bg-opacity:.2}.hover\:text-\[\#5558e3\]:hover{--tw-text-opacity:1;color:rgb(85 88 227/var(--tw-text-opacity,1))}.hover\:text-amber-100:hover{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.hover\:text-amber-200:hover{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.hover\:text-amber-300:hover{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.hover\:text-amber-400:hover{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.hover\:text-amber-50:hover{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}.hover\:text-amber-500:hover{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.hover\:text-amber-600:hover{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.hover\:text-amber-700:hover{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.hover\:text-amber-800:hover{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.hover\:text-amber-900:hover{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}.hover\:text-amber-950:hover{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}.hover\:text-blue-100:hover{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.hover\:text-blue-200:hover{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.hover\:text-blue-300:hover{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.hover\:text-blue-400:hover{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.hover\:text-blue-50:hover{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}.hover\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-blue-900:hover{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.hover\:text-blue-950:hover{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}.hover\:text-cyan-100:hover{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.hover\:text-cyan-200:hover{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.hover\:text-cyan-300:hover{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.hover\:text-cyan-400:hover{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.hover\:text-cyan-50:hover{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.hover\:text-cyan-500:hover{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.hover\:text-cyan-600:hover{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.hover\:text-cyan-700:hover{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.hover\:text-cyan-800:hover{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.hover\:text-cyan-900:hover{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.hover\:text-cyan-950:hover{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.hover\:text-emerald-100:hover{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.hover\:text-emerald-200:hover{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.hover\:text-emerald-300:hover{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.hover\:text-emerald-400:hover{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.hover\:text-emerald-50:hover{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.hover\:text-emerald-500:hover{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.hover\:text-emerald-600:hover{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.hover\:text-emerald-700:hover{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.hover\:text-emerald-800:hover{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.hover\:text-emerald-900:hover{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}.hover\:text-emerald-950:hover{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.hover\:text-fuchsia-100:hover{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.hover\:text-fuchsia-200:hover{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}.hover\:text-fuchsia-300:hover{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.hover\:text-fuchsia-400:hover{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.hover\:text-fuchsia-50:hover{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}.hover\:text-fuchsia-500:hover{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}.hover\:text-fuchsia-600:hover{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}.hover\:text-fuchsia-700:hover{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.hover\:text-fuchsia-800:hover{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}.hover\:text-fuchsia-900:hover{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}.hover\:text-fuchsia-950:hover{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}.hover\:text-gray-100:hover{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.hover\:text-gray-200:hover{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.hover\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.hover\:text-gray-400:hover{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.hover\:text-gray-50:hover{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.hover\:text-gray-950:hover{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.hover\:text-green-100:hover{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.hover\:text-green-200:hover{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.hover\:text-green-300:hover{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}.hover\:text-green-400:hover{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.hover\:text-green-50:hover{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}.hover\:text-green-500:hover{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.hover\:text-green-600:hover{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.hover\:text-green-700:hover{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.hover\:text-green-800:hover{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.hover\:text-green-900:hover{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.hover\:text-green-950:hover{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}.hover\:text-indigo-100:hover{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.hover\:text-indigo-200:hover{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.hover\:text-indigo-300:hover{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.hover\:text-indigo-400:hover{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.hover\:text-indigo-50:hover{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.hover\:text-indigo-600:hover{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}.hover\:text-indigo-700:hover{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.hover\:text-indigo-800:hover{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.hover\:text-indigo-900:hover{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}.hover\:text-indigo-950:hover{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.hover\:text-lime-100:hover{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}.hover\:text-lime-200:hover{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}.hover\:text-lime-300:hover{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}.hover\:text-lime-400:hover{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.hover\:text-lime-50:hover{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}.hover\:text-lime-500:hover{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}.hover\:text-lime-600:hover{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}.hover\:text-lime-700:hover{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}.hover\:text-lime-800:hover{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}.hover\:text-lime-900:hover{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.hover\:text-lime-950:hover{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}.hover\:text-neutral-100:hover{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}.hover\:text-neutral-200:hover{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.hover\:text-neutral-300:hover{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.hover\:text-neutral-400:hover{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.hover\:text-neutral-50:hover{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.hover\:text-neutral-500:hover{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.hover\:text-neutral-600:hover{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.hover\:text-neutral-700:hover{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.hover\:text-neutral-800:hover{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.hover\:text-neutral-900:hover{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.hover\:text-neutral-950:hover{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.hover\:text-orange-100:hover{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}.hover\:text-orange-200:hover{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}.hover\:text-orange-300:hover{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.hover\:text-orange-400:hover{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.hover\:text-orange-50:hover{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}.hover\:text-orange-500:hover{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.hover\:text-orange-600:hover{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.hover\:text-orange-700:hover{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.hover\:text-orange-800:hover{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.hover\:text-orange-900:hover{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}.hover\:text-orange-950:hover{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}.hover\:text-pink-100:hover{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}.hover\:text-pink-200:hover{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}.hover\:text-pink-300:hover{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}.hover\:text-pink-400:hover{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.hover\:text-pink-50:hover{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}.hover\:text-pink-500:hover{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.hover\:text-pink-600:hover{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.hover\:text-pink-700:hover{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.hover\:text-pink-800:hover{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.hover\:text-pink-900:hover{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}.hover\:text-pink-950:hover{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}.hover\:text-purple-100:hover{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}.hover\:text-purple-200:hover{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.hover\:text-purple-300:hover{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}.hover\:text-purple-400:hover{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.hover\:text-purple-50:hover{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}.hover\:text-purple-500:hover{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.hover\:text-purple-600:hover{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.hover\:text-purple-700:hover{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.hover\:text-purple-800:hover{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.hover\:text-purple-900:hover{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}.hover\:text-purple-950:hover{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}.hover\:text-red-100:hover{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.hover\:text-red-200:hover{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.hover\:text-red-300:hover{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.hover\:text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\:text-red-50:hover{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.hover\:text-red-600:hover{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.hover\:text-red-700:hover{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.hover\:text-red-800:hover{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.hover\:text-red-900:hover{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.hover\:text-red-950:hover{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}.hover\:text-rose-100:hover{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.hover\:text-rose-200:hover{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.hover\:text-rose-300:hover{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.hover\:text-rose-400:hover{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.hover\:text-rose-50:hover{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}.hover\:text-rose-500:hover{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.hover\:text-rose-600:hover{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}.hover\:text-rose-700:hover{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.hover\:text-rose-800:hover{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}.hover\:text-rose-900:hover{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}.hover\:text-rose-950:hover{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}.hover\:text-sky-100:hover{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.hover\:text-sky-200:hover{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.hover\:text-sky-300:hover{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.hover\:text-sky-400:hover{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.hover\:text-sky-50:hover{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}.hover\:text-sky-500:hover{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}.hover\:text-sky-600:hover{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.hover\:text-sky-700:hover{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.hover\:text-sky-800:hover{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}.hover\:text-sky-900:hover{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}.hover\:text-sky-950:hover{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}.hover\:text-slate-100:hover{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.hover\:text-slate-200:hover{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.hover\:text-slate-300:hover{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.hover\:text-slate-400:hover{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.hover\:text-slate-50:hover{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.hover\:text-slate-500:hover{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.hover\:text-slate-600:hover{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.hover\:text-slate-700:hover{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.hover\:text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\:text-slate-950:hover{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.hover\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.hover\:text-stone-200:hover{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.hover\:text-stone-300:hover{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.hover\:text-stone-400:hover{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.hover\:text-stone-50:hover{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.hover\:text-stone-500:hover{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}.hover\:text-stone-600:hover{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}.hover\:text-stone-700:hover{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.hover\:text-stone-800:hover{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.hover\:text-stone-900:hover{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.hover\:text-stone-950:hover{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}.hover\:text-teal-100:hover{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}.hover\:text-teal-200:hover{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}.hover\:text-teal-300:hover{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}.hover\:text-teal-400:hover{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.hover\:text-teal-50:hover{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}.hover\:text-teal-500:hover{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}.hover\:text-teal-600:hover{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}.hover\:text-teal-700:hover{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}.hover\:text-teal-800:hover{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}.hover\:text-teal-900:hover{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.hover\:text-teal-950:hover{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}.hover\:text-tremor-brand-emphasis:hover{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.hover\:text-tremor-content:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.hover\:text-tremor-content-emphasis:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-violet-100:hover{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.hover\:text-violet-200:hover{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.hover\:text-violet-300:hover{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.hover\:text-violet-400:hover{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.hover\:text-violet-50:hover{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}.hover\:text-violet-500:hover{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}.hover\:text-violet-600:hover{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.hover\:text-violet-700:hover{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.hover\:text-violet-800:hover{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.hover\:text-violet-900:hover{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}.hover\:text-violet-950:hover{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}.hover\:text-yellow-100:hover{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.hover\:text-yellow-200:hover{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}.hover\:text-yellow-300:hover{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.hover\:text-yellow-400:hover{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.hover\:text-yellow-50:hover{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}.hover\:text-yellow-500:hover{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.hover\:text-yellow-600:hover{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.hover\:text-yellow-700:hover{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.hover\:text-yellow-800:hover{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.hover\:text-yellow-900:hover{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.hover\:text-yellow-950:hover{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}.hover\:text-zinc-100:hover{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.hover\:text-zinc-200:hover{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.hover\:text-zinc-300:hover{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.hover\:text-zinc-400:hover{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.hover\:text-zinc-50:hover{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.hover\:text-zinc-500:hover{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\:text-zinc-600:hover{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.hover\:text-zinc-700:hover{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.hover\:text-zinc-800:hover{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.hover\:text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\:text-zinc-950:hover{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-indigo-500\/50:hover{--tw-shadow-color:#6366f180;--tw-shadow:var(--tw-shadow-colored)}.focus\:border-blue-400:focus{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.focus\:border-indigo-500:focus{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.focus\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.focus\:border-transparent:focus{border-color:#0000}.focus\:border-tremor-brand-subtle:focus{--tw-border-opacity:1;border-color:rgb(142 145 235/var(--tw-border-opacity,1))}.focus\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\:ring-blue-500\/20:focus{--tw-ring-color:#3b82f633}.focus\:ring-indigo-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity,1))}.focus\:ring-red-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(254 202 202/var(--tw-ring-opacity,1))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.focus\:ring-tremor-brand-muted:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(134 136 239/var(--tw-ring-opacity,1))}.focus\:ring-offset-1:focus{--tw-ring-offset-width:1px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:outline-none:focus-visible{outline-offset:2px;outline:2px solid #0000}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-blue-500:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.active\:translate-y-\[0\.5px\]:active{--tw-translate-y:.5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:\!bg-gray-300:disabled{--tw-bg-opacity:1!important;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))!important}.disabled\:bg-indigo-400:disabled{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.disabled\:\!text-gray-500:disabled{--tw-text-opacity:1!important;color:rgb(107 114 128/var(--tw-text-opacity,1))!important}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:hover\:bg-transparent:hover:disabled{background-color:#0000}.group:hover .group-hover\:bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.group:hover .group-hover\:bg-tremor-brand-subtle\/30{background-color:#8e91eb4d}.group:hover .group-hover\:bg-opacity-30{--tw-bg-opacity:.3}.group:hover .group-hover\:text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.group:hover .group-hover\:text-tremor-content-emphasis{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.group:hover .group-hover\:opacity-100{opacity:1}.group:active .group-active\:scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y))rotate(var(--tw-rotate))skewX(var(--tw-skew-x))skewY(var(--tw-skew-y))scaleX(var(--tw-scale-x))scaleY(var(--tw-scale-y))}.aria-selected\:\!bg-tremor-background-subtle[aria-selected=true]{--tw-bg-opacity:1!important;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))!important}.aria-selected\:bg-tremor-background-emphasis[aria-selected=true]{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.aria-selected\:\!text-tremor-content[aria-selected=true]{--tw-text-opacity:1!important;color:rgb(107 114 128/var(--tw-text-opacity,1))!important}.aria-selected\:text-dark-tremor-brand-inverted[aria-selected=true]{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.aria-selected\:text-tremor-brand-inverted[aria-selected=true],.aria-selected\:text-tremor-content-inverted[aria-selected=true]{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.data-\[selected\]\:border-b-2[data-selected]{border-bottom-width:2px}.data-\[selected\]\:border-tremor-border[data-selected]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.data-\[selected\]\:border-tremor-brand[data-selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.data-\[focus\]\:bg-tremor-background-muted[data-focus]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.data-\[selected\]\:bg-tremor-background[data-selected]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\[selected\]\:bg-tremor-background-muted[data-selected]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.data-\[focus\]\:text-tremor-content-strong[data-focus]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.data-\[selected\]\:text-tremor-brand[data-selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.data-\[selected\]\:text-tremor-content-strong[data-selected]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.data-\[closed\]\:opacity-0[data-closed]{opacity:0}.data-\[selected\]\:shadow-tremor-input[data-selected]{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\[enter\]\:duration-300[data-enter]{transition-duration:.3s}.data-\[leave\]\:duration-200[data-leave]{transition-duration:.2s}.data-\[enter\]\:ease-out[data-enter]{transition-timing-function:cubic-bezier(0,0,.2,1)}.data-\[leave\]\:ease-in[data-leave]{transition-timing-function:cubic-bezier(.4,0,1,1)}.ui-selected\:border-amber-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}.ui-selected\:border-amber-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.ui-selected\:border-amber-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.ui-selected\:border-amber-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.ui-selected\:border-amber-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}.ui-selected\:border-amber-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}.ui-selected\:border-amber-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}.ui-selected\:border-amber-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}.ui-selected\:border-amber-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}.ui-selected\:border-amber-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}.ui-selected\:border-amber-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}.ui-selected\:border-blue-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.ui-selected\:border-blue-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.ui-selected\:border-blue-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.ui-selected\:border-blue-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.ui-selected\:border-blue-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}.ui-selected\:border-blue-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.ui-selected\:border-blue-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.ui-selected\:border-blue-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}.ui-selected\:border-blue-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.ui-selected\:border-blue-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}.ui-selected\:border-blue-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}.ui-selected\:border-cyan-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}.ui-selected\:border-emerald-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}.ui-selected\:border-fuchsia-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}.ui-selected\:border-gray-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.ui-selected\:border-gray-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.ui-selected\:border-gray-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.ui-selected\:border-gray-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.ui-selected\:border-gray-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}.ui-selected\:border-gray-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.ui-selected\:border-gray-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.ui-selected\:border-gray-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.ui-selected\:border-gray-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}.ui-selected\:border-gray-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.ui-selected\:border-gray-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}.ui-selected\:border-green-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}.ui-selected\:border-green-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.ui-selected\:border-green-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}.ui-selected\:border-green-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.ui-selected\:border-green-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}.ui-selected\:border-green-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.ui-selected\:border-green-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}.ui-selected\:border-green-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}.ui-selected\:border-green-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.ui-selected\:border-green-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}.ui-selected\:border-green-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}.ui-selected\:border-indigo-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.ui-selected\:border-lime-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}.ui-selected\:border-lime-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}.ui-selected\:border-lime-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.ui-selected\:border-lime-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}.ui-selected\:border-lime-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}.ui-selected\:border-lime-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}.ui-selected\:border-lime-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}.ui-selected\:border-lime-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}.ui-selected\:border-lime-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}.ui-selected\:border-lime-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}.ui-selected\:border-lime-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}.ui-selected\:border-neutral-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}.ui-selected\:border-orange-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.ui-selected\:border-orange-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.ui-selected\:border-orange-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.ui-selected\:border-orange-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}.ui-selected\:border-orange-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}.ui-selected\:border-orange-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.ui-selected\:border-orange-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}.ui-selected\:border-orange-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}.ui-selected\:border-orange-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}.ui-selected\:border-orange-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}.ui-selected\:border-orange-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}.ui-selected\:border-pink-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}.ui-selected\:border-pink-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}.ui-selected\:border-pink-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.ui-selected\:border-pink-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}.ui-selected\:border-pink-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}.ui-selected\:border-pink-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}.ui-selected\:border-pink-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}.ui-selected\:border-pink-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}.ui-selected\:border-pink-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}.ui-selected\:border-pink-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}.ui-selected\:border-pink-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}.ui-selected\:border-purple-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}.ui-selected\:border-purple-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}.ui-selected\:border-purple-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}.ui-selected\:border-purple-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}.ui-selected\:border-purple-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}.ui-selected\:border-purple-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}.ui-selected\:border-purple-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}.ui-selected\:border-purple-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}.ui-selected\:border-purple-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}.ui-selected\:border-purple-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}.ui-selected\:border-purple-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}.ui-selected\:border-red-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.ui-selected\:border-red-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.ui-selected\:border-red-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.ui-selected\:border-red-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.ui-selected\:border-red-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}.ui-selected\:border-red-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.ui-selected\:border-red-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.ui-selected\:border-red-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.ui-selected\:border-red-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.ui-selected\:border-red-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}.ui-selected\:border-red-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}.ui-selected\:border-rose-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}.ui-selected\:border-rose-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}.ui-selected\:border-rose-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.ui-selected\:border-rose-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}.ui-selected\:border-rose-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}.ui-selected\:border-rose-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.ui-selected\:border-rose-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}.ui-selected\:border-rose-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}.ui-selected\:border-rose-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}.ui-selected\:border-rose-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}.ui-selected\:border-rose-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}.ui-selected\:border-sky-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}.ui-selected\:border-sky-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}.ui-selected\:border-sky-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.ui-selected\:border-sky-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.ui-selected\:border-sky-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}.ui-selected\:border-sky-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}.ui-selected\:border-sky-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}.ui-selected\:border-sky-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}.ui-selected\:border-sky-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}.ui-selected\:border-sky-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}.ui-selected\:border-sky-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}.ui-selected\:border-slate-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.ui-selected\:border-slate-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.ui-selected\:border-slate-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ui-selected\:border-slate-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}.ui-selected\:border-slate-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}.ui-selected\:border-slate-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.ui-selected\:border-slate-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.ui-selected\:border-slate-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.ui-selected\:border-slate-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.ui-selected\:border-slate-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}.ui-selected\:border-slate-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}.ui-selected\:border-stone-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}.ui-selected\:border-stone-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.ui-selected\:border-stone-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.ui-selected\:border-stone-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.ui-selected\:border-stone-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}.ui-selected\:border-stone-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.ui-selected\:border-stone-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.ui-selected\:border-stone-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}.ui-selected\:border-stone-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}.ui-selected\:border-stone-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}.ui-selected\:border-stone-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}.ui-selected\:border-teal-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}.ui-selected\:border-teal-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}.ui-selected\:border-teal-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.ui-selected\:border-teal-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}.ui-selected\:border-teal-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}.ui-selected\:border-teal-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}.ui-selected\:border-teal-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}.ui-selected\:border-teal-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}.ui-selected\:border-teal-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}.ui-selected\:border-teal-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}.ui-selected\:border-teal-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}.ui-selected\:border-violet-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}.ui-selected\:border-violet-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}.ui-selected\:border-violet-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.ui-selected\:border-violet-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}.ui-selected\:border-violet-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}.ui-selected\:border-violet-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}.ui-selected\:border-violet-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}.ui-selected\:border-violet-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}.ui-selected\:border-violet-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}.ui-selected\:border-violet-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}.ui-selected\:border-violet-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}.ui-selected\:border-yellow-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-100[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-200[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-300[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-400[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-50[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-500[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-600[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-700[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-800[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-900[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.ui-selected\:border-zinc-950[data-headlessui-state~=selected]{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}.ui-selected\:bg-amber-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}.ui-selected\:bg-amber-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.ui-selected\:bg-blue-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}.ui-selected\:bg-cyan-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}.ui-selected\:bg-emerald-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}.ui-selected\:bg-fuchsia-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.ui-selected\:bg-gray-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}.ui-selected\:bg-green-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}.ui-selected\:bg-indigo-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}.ui-selected\:bg-lime-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.ui-selected\:bg-neutral-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-orange-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}.ui-selected\:bg-pink-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}.ui-selected\:bg-purple-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.ui-selected\:bg-red-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}.ui-selected\:bg-rose-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}.ui-selected\:bg-sky-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.ui-selected\:bg-slate-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.ui-selected\:bg-stone-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}.ui-selected\:bg-teal-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}.ui-selected\:bg-violet-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}.ui-selected\:bg-yellow-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-100[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-200[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-300[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-400[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-50[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-500[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-600[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-700[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-800[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-900[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.ui-selected\:bg-zinc-950[data-headlessui-state~=selected]{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.ui-selected\:text-amber-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.ui-selected\:text-amber-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.ui-selected\:text-amber-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.ui-selected\:text-amber-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.ui-selected\:text-amber-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}.ui-selected\:text-amber-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.ui-selected\:text-amber-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.ui-selected\:text-amber-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.ui-selected\:text-amber-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.ui-selected\:text-amber-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}.ui-selected\:text-amber-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}.ui-selected\:text-blue-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.ui-selected\:text-blue-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}.ui-selected\:text-blue-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.ui-selected\:text-blue-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.ui-selected\:text-blue-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}.ui-selected\:text-blue-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.ui-selected\:text-blue-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.ui-selected\:text-blue-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.ui-selected\:text-blue-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.ui-selected\:text-blue-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.ui-selected\:text-blue-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.ui-selected\:text-cyan-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}.ui-selected\:text-emerald-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}.ui-selected\:text-fuchsia-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}.ui-selected\:text-gray-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.ui-selected\:text-gray-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.ui-selected\:text-gray-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.ui-selected\:text-gray-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.ui-selected\:text-gray-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.ui-selected\:text-gray-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.ui-selected\:text-gray-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.ui-selected\:text-gray-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.ui-selected\:text-gray-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.ui-selected\:text-gray-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.ui-selected\:text-gray-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.ui-selected\:text-green-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.ui-selected\:text-green-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}.ui-selected\:text-green-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}.ui-selected\:text-green-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.ui-selected\:text-green-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}.ui-selected\:text-green-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.ui-selected\:text-green-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.ui-selected\:text-green-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.ui-selected\:text-green-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.ui-selected\:text-green-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.ui-selected\:text-green-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}.ui-selected\:text-indigo-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.ui-selected\:text-lime-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}.ui-selected\:text-lime-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}.ui-selected\:text-lime-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}.ui-selected\:text-lime-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}.ui-selected\:text-lime-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}.ui-selected\:text-lime-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}.ui-selected\:text-lime-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}.ui-selected\:text-lime-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}.ui-selected\:text-lime-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}.ui-selected\:text-lime-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.ui-selected\:text-lime-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.ui-selected\:text-neutral-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.ui-selected\:text-orange-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}.ui-selected\:text-orange-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}.ui-selected\:text-orange-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}.ui-selected\:text-orange-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.ui-selected\:text-orange-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}.ui-selected\:text-orange-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.ui-selected\:text-orange-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.ui-selected\:text-orange-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.ui-selected\:text-orange-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.ui-selected\:text-orange-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}.ui-selected\:text-orange-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}.ui-selected\:text-pink-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}.ui-selected\:text-pink-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}.ui-selected\:text-pink-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}.ui-selected\:text-pink-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}.ui-selected\:text-pink-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}.ui-selected\:text-pink-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}.ui-selected\:text-pink-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}.ui-selected\:text-pink-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}.ui-selected\:text-pink-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.ui-selected\:text-pink-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}.ui-selected\:text-pink-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}.ui-selected\:text-purple-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}.ui-selected\:text-purple-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}.ui-selected\:text-purple-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}.ui-selected\:text-purple-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}.ui-selected\:text-purple-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}.ui-selected\:text-purple-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}.ui-selected\:text-purple-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.ui-selected\:text-purple-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}.ui-selected\:text-purple-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.ui-selected\:text-purple-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}.ui-selected\:text-purple-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}.ui-selected\:text-red-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.ui-selected\:text-red-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.ui-selected\:text-red-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.ui-selected\:text-red-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.ui-selected\:text-red-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.ui-selected\:text-red-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.ui-selected\:text-red-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.ui-selected\:text-red-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.ui-selected\:text-red-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.ui-selected\:text-red-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.ui-selected\:text-red-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}.ui-selected\:text-rose-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.ui-selected\:text-rose-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.ui-selected\:text-rose-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.ui-selected\:text-rose-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.ui-selected\:text-rose-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}.ui-selected\:text-rose-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.ui-selected\:text-rose-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}.ui-selected\:text-rose-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.ui-selected\:text-rose-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}.ui-selected\:text-rose-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}.ui-selected\:text-rose-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}.ui-selected\:text-sky-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.ui-selected\:text-sky-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.ui-selected\:text-sky-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.ui-selected\:text-sky-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.ui-selected\:text-sky-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}.ui-selected\:text-sky-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}.ui-selected\:text-sky-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}.ui-selected\:text-sky-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.ui-selected\:text-sky-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}.ui-selected\:text-sky-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}.ui-selected\:text-sky-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}.ui-selected\:text-slate-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.ui-selected\:text-slate-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.ui-selected\:text-slate-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.ui-selected\:text-slate-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.ui-selected\:text-slate-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.ui-selected\:text-slate-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.ui-selected\:text-slate-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.ui-selected\:text-slate-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.ui-selected\:text-slate-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.ui-selected\:text-slate-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.ui-selected\:text-slate-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}.ui-selected\:text-stone-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.ui-selected\:text-stone-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.ui-selected\:text-stone-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.ui-selected\:text-stone-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.ui-selected\:text-stone-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.ui-selected\:text-stone-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}.ui-selected\:text-stone-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}.ui-selected\:text-stone-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.ui-selected\:text-stone-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.ui-selected\:text-stone-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.ui-selected\:text-stone-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}.ui-selected\:text-teal-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}.ui-selected\:text-teal-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}.ui-selected\:text-teal-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}.ui-selected\:text-teal-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}.ui-selected\:text-teal-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}.ui-selected\:text-teal-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}.ui-selected\:text-teal-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}.ui-selected\:text-teal-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}.ui-selected\:text-teal-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}.ui-selected\:text-teal-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.ui-selected\:text-teal-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}.ui-selected\:text-violet-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.ui-selected\:text-violet-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.ui-selected\:text-violet-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.ui-selected\:text-violet-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.ui-selected\:text-violet-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}.ui-selected\:text-violet-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}.ui-selected\:text-violet-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.ui-selected\:text-violet-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.ui-selected\:text-violet-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.ui-selected\:text-violet-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}.ui-selected\:text-violet-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.ui-selected\:text-yellow-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-100[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-200[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-300[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-400[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-50[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-500[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-600[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-700[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-800[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-900[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.ui-selected\:text-zinc-950[data-headlessui-state~=selected]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-100{--tw-border-opacity:1;border-color:rgb(254 243 199/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-300{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-400{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-50{--tw-border-opacity:1;border-color:rgb(255 251 235/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-500{--tw-border-opacity:1;border-color:rgb(245 158 11/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-600{--tw-border-opacity:1;border-color:rgb(217 119 6/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-700{--tw-border-opacity:1;border-color:rgb(180 83 9/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-800{--tw-border-opacity:1;border-color:rgb(146 64 14/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-900{--tw-border-opacity:1;border-color:rgb(120 53 15/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-amber-950{--tw-border-opacity:1;border-color:rgb(69 26 3/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-50{--tw-border-opacity:1;border-color:rgb(239 246 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-700{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-800{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-900{--tw-border-opacity:1;border-color:rgb(30 58 138/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-blue-950{--tw-border-opacity:1;border-color:rgb(23 37 84/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-300{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-400{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-50{--tw-border-opacity:1;border-color:rgb(236 254 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-500{--tw-border-opacity:1;border-color:rgb(6 182 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-600{--tw-border-opacity:1;border-color:rgb(8 145 178/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-700{--tw-border-opacity:1;border-color:rgb(14 116 144/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-800{--tw-border-opacity:1;border-color:rgb(21 94 117/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-900{--tw-border-opacity:1;border-color:rgb(22 78 99/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-cyan-950{--tw-border-opacity:1;border-color:rgb(8 51 68/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-100{--tw-border-opacity:1;border-color:rgb(209 250 229/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-200{--tw-border-opacity:1;border-color:rgb(167 243 208/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-300{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-400{--tw-border-opacity:1;border-color:rgb(52 211 153/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-50{--tw-border-opacity:1;border-color:rgb(236 253 245/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-600{--tw-border-opacity:1;border-color:rgb(5 150 105/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-700{--tw-border-opacity:1;border-color:rgb(4 120 87/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-800{--tw-border-opacity:1;border-color:rgb(6 95 70/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-900{--tw-border-opacity:1;border-color:rgb(6 78 59/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-emerald-950{--tw-border-opacity:1;border-color:rgb(2 44 34/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-100{--tw-border-opacity:1;border-color:rgb(250 232 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-200{--tw-border-opacity:1;border-color:rgb(245 208 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-300{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-400{--tw-border-opacity:1;border-color:rgb(232 121 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-50{--tw-border-opacity:1;border-color:rgb(253 244 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-500{--tw-border-opacity:1;border-color:rgb(217 70 239/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-600{--tw-border-opacity:1;border-color:rgb(192 38 211/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-700{--tw-border-opacity:1;border-color:rgb(162 28 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-800{--tw-border-opacity:1;border-color:rgb(134 25 143/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-900{--tw-border-opacity:1;border-color:rgb(112 26 117/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-fuchsia-950{--tw-border-opacity:1;border-color:rgb(74 4 78/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-50{--tw-border-opacity:1;border-color:rgb(249 250 251/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-900{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-gray-950{--tw-border-opacity:1;border-color:rgb(3 7 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-100{--tw-border-opacity:1;border-color:rgb(220 252 231/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-300{--tw-border-opacity:1;border-color:rgb(134 239 172/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-50{--tw-border-opacity:1;border-color:rgb(240 253 244/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-600{--tw-border-opacity:1;border-color:rgb(22 163 74/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-700{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-800{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-900{--tw-border-opacity:1;border-color:rgb(20 83 45/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-green-950{--tw-border-opacity:1;border-color:rgb(5 46 22/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-100{--tw-border-opacity:1;border-color:rgb(224 231 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-200{--tw-border-opacity:1;border-color:rgb(199 210 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-300{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-400{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-50{--tw-border-opacity:1;border-color:rgb(238 242 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-600{--tw-border-opacity:1;border-color:rgb(79 70 229/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-700{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-800{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-900{--tw-border-opacity:1;border-color:rgb(49 46 129/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-indigo-950{--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-100{--tw-border-opacity:1;border-color:rgb(236 252 203/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-200{--tw-border-opacity:1;border-color:rgb(217 249 157/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-300{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-400{--tw-border-opacity:1;border-color:rgb(163 230 53/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-50{--tw-border-opacity:1;border-color:rgb(247 254 231/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-500{--tw-border-opacity:1;border-color:rgb(132 204 22/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-600{--tw-border-opacity:1;border-color:rgb(101 163 13/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-700{--tw-border-opacity:1;border-color:rgb(77 124 15/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-800{--tw-border-opacity:1;border-color:rgb(63 98 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-900{--tw-border-opacity:1;border-color:rgb(54 83 20/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-lime-950{--tw-border-opacity:1;border-color:rgb(26 46 5/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-100{--tw-border-opacity:1;border-color:rgb(245 245 245/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-300{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-400{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-500{--tw-border-opacity:1;border-color:rgb(115 115 115/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-600{--tw-border-opacity:1;border-color:rgb(82 82 82/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-700{--tw-border-opacity:1;border-color:rgb(64 64 64/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-800{--tw-border-opacity:1;border-color:rgb(38 38 38/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-900{--tw-border-opacity:1;border-color:rgb(23 23 23/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-neutral-950{--tw-border-opacity:1;border-color:rgb(10 10 10/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-300{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-400{--tw-border-opacity:1;border-color:rgb(251 146 60/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-50{--tw-border-opacity:1;border-color:rgb(255 247 237/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-600{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-700{--tw-border-opacity:1;border-color:rgb(194 65 12/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-800{--tw-border-opacity:1;border-color:rgb(154 52 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-900{--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-orange-950{--tw-border-opacity:1;border-color:rgb(67 20 7/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-100{--tw-border-opacity:1;border-color:rgb(252 231 243/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-200{--tw-border-opacity:1;border-color:rgb(251 207 232/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-300{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-400{--tw-border-opacity:1;border-color:rgb(244 114 182/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-50{--tw-border-opacity:1;border-color:rgb(253 242 248/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-500{--tw-border-opacity:1;border-color:rgb(236 72 153/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-600{--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-700{--tw-border-opacity:1;border-color:rgb(190 24 93/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-800{--tw-border-opacity:1;border-color:rgb(157 23 77/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-900{--tw-border-opacity:1;border-color:rgb(131 24 67/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-pink-950{--tw-border-opacity:1;border-color:rgb(80 7 36/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-100{--tw-border-opacity:1;border-color:rgb(243 232 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-200{--tw-border-opacity:1;border-color:rgb(233 213 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-300{--tw-border-opacity:1;border-color:rgb(216 180 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-400{--tw-border-opacity:1;border-color:rgb(192 132 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-50{--tw-border-opacity:1;border-color:rgb(250 245 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-600{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-800{--tw-border-opacity:1;border-color:rgb(107 33 168/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-900{--tw-border-opacity:1;border-color:rgb(88 28 135/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-purple-950{--tw-border-opacity:1;border-color:rgb(59 7 100/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-50{--tw-border-opacity:1;border-color:rgb(254 242 242/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-900{--tw-border-opacity:1;border-color:rgb(127 29 29/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-red-950{--tw-border-opacity:1;border-color:rgb(69 10 10/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-100{--tw-border-opacity:1;border-color:rgb(255 228 230/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-200{--tw-border-opacity:1;border-color:rgb(254 205 211/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-300{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-400{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-50{--tw-border-opacity:1;border-color:rgb(255 241 242/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-500{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-600{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-700{--tw-border-opacity:1;border-color:rgb(190 18 60/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-800{--tw-border-opacity:1;border-color:rgb(159 18 57/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-900{--tw-border-opacity:1;border-color:rgb(136 19 55/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-rose-950{--tw-border-opacity:1;border-color:rgb(76 5 25/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-100{--tw-border-opacity:1;border-color:rgb(224 242 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-200{--tw-border-opacity:1;border-color:rgb(186 230 253/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-300{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-400{--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-50{--tw-border-opacity:1;border-color:rgb(240 249 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-500{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-600{--tw-border-opacity:1;border-color:rgb(2 132 199/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-700{--tw-border-opacity:1;border-color:rgb(3 105 161/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-800{--tw-border-opacity:1;border-color:rgb(7 89 133/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-900{--tw-border-opacity:1;border-color:rgb(12 74 110/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-sky-950{--tw-border-opacity:1;border-color:rgb(8 47 73/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-50{--tw-border-opacity:1;border-color:rgb(248 250 252/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-900{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-slate-950{--tw-border-opacity:1;border-color:rgb(2 6 23/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-100{--tw-border-opacity:1;border-color:rgb(245 245 244/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-50{--tw-border-opacity:1;border-color:rgb(250 250 249/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-700{--tw-border-opacity:1;border-color:rgb(68 64 60/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-800{--tw-border-opacity:1;border-color:rgb(41 37 36/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-900{--tw-border-opacity:1;border-color:rgb(28 25 23/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-stone-950{--tw-border-opacity:1;border-color:rgb(12 10 9/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-100{--tw-border-opacity:1;border-color:rgb(204 251 241/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-200{--tw-border-opacity:1;border-color:rgb(153 246 228/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-300{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-400{--tw-border-opacity:1;border-color:rgb(45 212 191/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-50{--tw-border-opacity:1;border-color:rgb(240 253 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-500{--tw-border-opacity:1;border-color:rgb(20 184 166/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-600{--tw-border-opacity:1;border-color:rgb(13 148 136/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-700{--tw-border-opacity:1;border-color:rgb(15 118 110/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-800{--tw-border-opacity:1;border-color:rgb(17 94 89/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-900{--tw-border-opacity:1;border-color:rgb(19 78 74/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-teal-950{--tw-border-opacity:1;border-color:rgb(4 47 46/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-100{--tw-border-opacity:1;border-color:rgb(237 233 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-200{--tw-border-opacity:1;border-color:rgb(221 214 254/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-300{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-400{--tw-border-opacity:1;border-color:rgb(167 139 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-50{--tw-border-opacity:1;border-color:rgb(245 243 255/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-500{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-600{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-700{--tw-border-opacity:1;border-color:rgb(109 40 217/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-800{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-900{--tw-border-opacity:1;border-color:rgb(76 29 149/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-violet-950{--tw-border-opacity:1;border-color:rgb(46 16 101/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-100{--tw-border-opacity:1;border-color:rgb(254 249 195/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-300{--tw-border-opacity:1;border-color:rgb(253 224 71/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-50{--tw-border-opacity:1;border-color:rgb(254 252 232/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-600{--tw-border-opacity:1;border-color:rgb(202 138 4/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-700{--tw-border-opacity:1;border-color:rgb(161 98 7/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-800{--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-900{--tw-border-opacity:1;border-color:rgb(113 63 18/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-yellow-950{--tw-border-opacity:1;border-color:rgb(66 32 6/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-400{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-50{--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-500{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-600{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-700{--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:border-zinc-950{--tw-border-opacity:1;border-color:rgb(9 9 11/var(--tw-border-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-100{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-200{--tw-bg-opacity:1;background-color:rgb(253 230 138/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-300{--tw-bg-opacity:1;background-color:rgb(252 211 77/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-400{--tw-bg-opacity:1;background-color:rgb(251 191 36/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-700{--tw-bg-opacity:1;background-color:rgb(180 83 9/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-800{--tw-bg-opacity:1;background-color:rgb(146 64 14/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-900{--tw-bg-opacity:1;background-color:rgb(120 53 15/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-amber-950{--tw-bg-opacity:1;background-color:rgb(69 26 3/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-700{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-800{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-900{--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-blue-950{--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-200{--tw-bg-opacity:1;background-color:rgb(165 243 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-300{--tw-bg-opacity:1;background-color:rgb(103 232 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-400{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-500{--tw-bg-opacity:1;background-color:rgb(6 182 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-700{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-800{--tw-bg-opacity:1;background-color:rgb(21 94 117/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-900{--tw-bg-opacity:1;background-color:rgb(22 78 99/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-cyan-950{--tw-bg-opacity:1;background-color:rgb(8 51 68/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-100{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-200{--tw-bg-opacity:1;background-color:rgb(167 243 208/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-300{--tw-bg-opacity:1;background-color:rgb(110 231 183/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-700{--tw-bg-opacity:1;background-color:rgb(4 120 87/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-800{--tw-bg-opacity:1;background-color:rgb(6 95 70/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-900{--tw-bg-opacity:1;background-color:rgb(6 78 59/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-emerald-950{--tw-bg-opacity:1;background-color:rgb(2 44 34/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-100{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-200{--tw-bg-opacity:1;background-color:rgb(245 208 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-300{--tw-bg-opacity:1;background-color:rgb(240 171 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-400{--tw-bg-opacity:1;background-color:rgb(232 121 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-50{--tw-bg-opacity:1;background-color:rgb(253 244 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-500{--tw-bg-opacity:1;background-color:rgb(217 70 239/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-600{--tw-bg-opacity:1;background-color:rgb(192 38 211/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-700{--tw-bg-opacity:1;background-color:rgb(162 28 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-800{--tw-bg-opacity:1;background-color:rgb(134 25 143/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-900{--tw-bg-opacity:1;background-color:rgb(112 26 117/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-fuchsia-950{--tw-bg-opacity:1;background-color:rgb(74 4 78/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-gray-950{--tw-bg-opacity:1;background-color:rgb(3 7 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-400{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-700{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-800{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-900{--tw-bg-opacity:1;background-color:rgb(20 83 45/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-green-950{--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-300{--tw-bg-opacity:1;background-color:rgb(165 180 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-400{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-800{--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-indigo-950{--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-100{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-200{--tw-bg-opacity:1;background-color:rgb(217 249 157/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-300{--tw-bg-opacity:1;background-color:rgb(190 242 100/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-400{--tw-bg-opacity:1;background-color:rgb(163 230 53/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-50{--tw-bg-opacity:1;background-color:rgb(247 254 231/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-500{--tw-bg-opacity:1;background-color:rgb(132 204 22/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-600{--tw-bg-opacity:1;background-color:rgb(101 163 13/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-700{--tw-bg-opacity:1;background-color:rgb(77 124 15/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-800{--tw-bg-opacity:1;background-color:rgb(63 98 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-900{--tw-bg-opacity:1;background-color:rgb(54 83 20/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-lime-950{--tw-bg-opacity:1;background-color:rgb(26 46 5/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-200{--tw-bg-opacity:1;background-color:rgb(229 229 229/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-300{--tw-bg-opacity:1;background-color:rgb(212 212 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-400{--tw-bg-opacity:1;background-color:rgb(163 163 163/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-500{--tw-bg-opacity:1;background-color:rgb(115 115 115/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-600{--tw-bg-opacity:1;background-color:rgb(82 82 82/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-neutral-950{--tw-bg-opacity:1;background-color:rgb(10 10 10/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-300{--tw-bg-opacity:1;background-color:rgb(253 186 116/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-700{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-800{--tw-bg-opacity:1;background-color:rgb(154 52 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-900{--tw-bg-opacity:1;background-color:rgb(124 45 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-orange-950{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-100{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-300{--tw-bg-opacity:1;background-color:rgb(249 168 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-400{--tw-bg-opacity:1;background-color:rgb(244 114 182/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-50{--tw-bg-opacity:1;background-color:rgb(253 242 248/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-500{--tw-bg-opacity:1;background-color:rgb(236 72 153/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-600{--tw-bg-opacity:1;background-color:rgb(219 39 119/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-700{--tw-bg-opacity:1;background-color:rgb(190 24 93/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-800{--tw-bg-opacity:1;background-color:rgb(157 23 77/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-900{--tw-bg-opacity:1;background-color:rgb(131 24 67/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-pink-950{--tw-bg-opacity:1;background-color:rgb(80 7 36/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-100{--tw-bg-opacity:1;background-color:rgb(243 232 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-200{--tw-bg-opacity:1;background-color:rgb(233 213 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-300{--tw-bg-opacity:1;background-color:rgb(216 180 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-400{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-50{--tw-bg-opacity:1;background-color:rgb(250 245 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-800{--tw-bg-opacity:1;background-color:rgb(107 33 168/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-900{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-purple-950{--tw-bg-opacity:1;background-color:rgb(59 7 100/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-300{--tw-bg-opacity:1;background-color:rgb(252 165 165/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-800{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-100{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-200{--tw-bg-opacity:1;background-color:rgb(254 205 211/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-300{--tw-bg-opacity:1;background-color:rgb(253 164 175/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-700{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-800{--tw-bg-opacity:1;background-color:rgb(159 18 57/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-900{--tw-bg-opacity:1;background-color:rgb(136 19 55/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-rose-950{--tw-bg-opacity:1;background-color:rgb(76 5 25/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-100{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-200{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-300{--tw-bg-opacity:1;background-color:rgb(125 211 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-400{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-700{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-800{--tw-bg-opacity:1;background-color:rgb(7 89 133/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-900{--tw-bg-opacity:1;background-color:rgb(12 74 110/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-sky-950{--tw-bg-opacity:1;background-color:rgb(8 47 73/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-300{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-500{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-600{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-slate-950{--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-200{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-50{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-700{--tw-bg-opacity:1;background-color:rgb(68 64 60/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-stone-950{--tw-bg-opacity:1;background-color:rgb(12 10 9/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-100{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-200{--tw-bg-opacity:1;background-color:rgb(153 246 228/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-300{--tw-bg-opacity:1;background-color:rgb(94 234 212/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-400{--tw-bg-opacity:1;background-color:rgb(45 212 191/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-50{--tw-bg-opacity:1;background-color:rgb(240 253 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-500{--tw-bg-opacity:1;background-color:rgb(20 184 166/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-600{--tw-bg-opacity:1;background-color:rgb(13 148 136/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-700{--tw-bg-opacity:1;background-color:rgb(15 118 110/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-800{--tw-bg-opacity:1;background-color:rgb(17 94 89/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-900{--tw-bg-opacity:1;background-color:rgb(19 78 74/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-teal-950{--tw-bg-opacity:1;background-color:rgb(4 47 46/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-200{--tw-bg-opacity:1;background-color:rgb(221 214 254/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-300{--tw-bg-opacity:1;background-color:rgb(196 181 253/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-400{--tw-bg-opacity:1;background-color:rgb(167 139 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-500{--tw-bg-opacity:1;background-color:rgb(139 92 246/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-700{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-800{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-900{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-violet-950{--tw-bg-opacity:1;background-color:rgb(46 16 101/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-400{--tw-bg-opacity:1;background-color:rgb(250 204 21/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-700{--tw-bg-opacity:1;background-color:rgb(161 98 7/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-800{--tw-bg-opacity:1;background-color:rgb(133 77 14/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-900{--tw-bg-opacity:1;background-color:rgb(113 63 18/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-yellow-950{--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-400{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-500{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-600{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-700{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-50{--tw-text-opacity:1;color:rgb(255 251 235/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-900{--tw-text-opacity:1;color:rgb(120 53 15/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-amber-950{--tw-text-opacity:1;color:rgb(69 26 3/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-100{--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-200{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-300{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-50{--tw-text-opacity:1;color:rgb(239 246 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-blue-950{--tw-text-opacity:1;color:rgb(23 37 84/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-500{--tw-text-opacity:1;color:rgb(6 182 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-500{--tw-text-opacity:1;color:rgb(16 185 129/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-900{--tw-text-opacity:1;color:rgb(6 78 59/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-200{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-50{--tw-text-opacity:1;color:rgb(253 244 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-500{--tw-text-opacity:1;color:rgb(217 70 239/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-600{--tw-text-opacity:1;color:rgb(192 38 211/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-700{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-800{--tw-text-opacity:1;color:rgb(134 25 143/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-900{--tw-text-opacity:1;color:rgb(112 26 117/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-fuchsia-950{--tw-text-opacity:1;color:rgb(74 4 78/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-gray-950{--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-100{--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-200{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-300{--tw-text-opacity:1;color:rgb(134 239 172/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-50{--tw-text-opacity:1;color:rgb(240 253 244/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-green-950{--tw-text-opacity:1;color:rgb(5 46 22/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-400{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-50{--tw-text-opacity:1;color:rgb(238 242 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-900{--tw-text-opacity:1;color:rgb(49 46 129/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-indigo-950{--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-100{--tw-text-opacity:1;color:rgb(236 252 203/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-200{--tw-text-opacity:1;color:rgb(217 249 157/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-300{--tw-text-opacity:1;color:rgb(190 242 100/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-400{--tw-text-opacity:1;color:rgb(163 230 53/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-50{--tw-text-opacity:1;color:rgb(247 254 231/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-500{--tw-text-opacity:1;color:rgb(132 204 22/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-600{--tw-text-opacity:1;color:rgb(101 163 13/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-700{--tw-text-opacity:1;color:rgb(77 124 15/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-800{--tw-text-opacity:1;color:rgb(63 98 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-900{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-lime-950{--tw-text-opacity:1;color:rgb(26 46 5/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-100{--tw-text-opacity:1;color:rgb(245 245 245/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-200{--tw-text-opacity:1;color:rgb(229 229 229/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-300{--tw-text-opacity:1;color:rgb(212 212 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-400{--tw-text-opacity:1;color:rgb(163 163 163/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-600{--tw-text-opacity:1;color:rgb(82 82 82/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-700{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-800{--tw-text-opacity:1;color:rgb(38 38 38/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-100{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-200{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-50{--tw-text-opacity:1;color:rgb(255 247 237/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-900{--tw-text-opacity:1;color:rgb(124 45 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-orange-950{--tw-text-opacity:1;color:rgb(67 20 7/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-100{--tw-text-opacity:1;color:rgb(252 231 243/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-200{--tw-text-opacity:1;color:rgb(251 207 232/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-300{--tw-text-opacity:1;color:rgb(249 168 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-400{--tw-text-opacity:1;color:rgb(244 114 182/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-50{--tw-text-opacity:1;color:rgb(253 242 248/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-500{--tw-text-opacity:1;color:rgb(236 72 153/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-600{--tw-text-opacity:1;color:rgb(219 39 119/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-700{--tw-text-opacity:1;color:rgb(190 24 93/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-800{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-900{--tw-text-opacity:1;color:rgb(131 24 67/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-pink-950{--tw-text-opacity:1;color:rgb(80 7 36/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-100{--tw-text-opacity:1;color:rgb(243 232 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-200{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-300{--tw-text-opacity:1;color:rgb(216 180 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-400{--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-50{--tw-text-opacity:1;color:rgb(250 245 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-900{--tw-text-opacity:1;color:rgb(88 28 135/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-purple-950{--tw-text-opacity:1;color:rgb(59 7 100/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-100{--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-50{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-red-950{--tw-text-opacity:1;color:rgb(69 10 10/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-50{--tw-text-opacity:1;color:rgb(255 241 242/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-500{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-700{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-800{--tw-text-opacity:1;color:rgb(159 18 57/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-900{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-rose-950{--tw-text-opacity:1;color:rgb(76 5 25/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-50{--tw-text-opacity:1;color:rgb(240 249 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-800{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-900{--tw-text-opacity:1;color:rgb(12 74 110/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-sky-950{--tw-text-opacity:1;color:rgb(8 47 73/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-slate-950{--tw-text-opacity:1;color:rgb(2 6 23/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-500{--tw-text-opacity:1;color:rgb(120 113 108/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-600{--tw-text-opacity:1;color:rgb(87 83 78/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-700{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-stone-950{--tw-text-opacity:1;color:rgb(12 10 9/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-100{--tw-text-opacity:1;color:rgb(204 251 241/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-200{--tw-text-opacity:1;color:rgb(153 246 228/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-300{--tw-text-opacity:1;color:rgb(94 234 212/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-400{--tw-text-opacity:1;color:rgb(45 212 191/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-50{--tw-text-opacity:1;color:rgb(240 253 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-500{--tw-text-opacity:1;color:rgb(20 184 166/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-600{--tw-text-opacity:1;color:rgb(13 148 136/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-700{--tw-text-opacity:1;color:rgb(15 118 110/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-800{--tw-text-opacity:1;color:rgb(17 94 89/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-900{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-teal-950{--tw-text-opacity:1;color:rgb(4 47 46/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-50{--tw-text-opacity:1;color:rgb(245 243 255/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-500{--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-900{--tw-text-opacity:1;color:rgb(76 29 149/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-violet-950{--tw-text-opacity:1;color:rgb(46 16 101/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-100{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-200{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-50{--tw-text-opacity:1;color:rgb(254 252 232/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-yellow-950{--tw-text-opacity:1;color:rgb(66 32 6/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}:where([data-headlessui-state~=selected]) .ui-selected\:text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.dark\:divide-dark-tremor-border:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity,1))}.dark\:border-dark-tremor-background:is(.dark *){--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-border:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand:is(.dark *){--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand-emphasis:is(.dark *){--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand-inverted:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 27 75/var(--tw-border-opacity,1))}.dark\:border-dark-tremor-brand-subtle:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.dark\:border-red-500:is(.dark *){--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.dark\:bg-dark-tremor-background:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-background-emphasis:is(.dark *){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-background-muted:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-background-subtle:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-border:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-brand:is(.dark *){--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-brand-muted:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 27 75/var(--tw-bg-opacity,1))}.dark\:bg-dark-tremor-brand-muted\/50:is(.dark *){background-color:#1e1b4b80}.dark\:bg-dark-tremor-brand-muted\/70:is(.dark *){background-color:#1e1b4bb3}.dark\:bg-dark-tremor-brand-subtle\/60:is(.dark *){background-color:#3730a399}.dark\:bg-dark-tremor-content-subtle:is(.dark *){--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.dark\:bg-slate-950\/50:is(.dark *){background-color:#02061780}.dark\:bg-white:is(.dark *){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.dark\:bg-opacity-10:is(.dark *){--tw-bg-opacity:.1}.dark\:bg-opacity-5:is(.dark *){--tw-bg-opacity:.05}.dark\:fill-dark-tremor-content:is(.dark *){fill:#6b7280}.dark\:fill-dark-tremor-content-emphasis:is(.dark *){fill:#e5e7eb}.dark\:stroke-dark-tremor-background:is(.dark *){stroke:#111827}.dark\:stroke-dark-tremor-border:is(.dark *){stroke:#374151}.dark\:stroke-dark-tremor-brand:is(.dark *){stroke:#6366f1}.dark\:stroke-dark-tremor-brand-muted:is(.dark *){stroke:#1e1b4b}.dark\:text-dark-tremor-brand:is(.dark *){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-brand-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-brand-inverted:is(.dark *){--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content-strong:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.dark\:text-dark-tremor-content-subtle:is(.dark *){--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.dark\:text-red-500:is(.dark *){--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.dark\:text-tremor-content-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.dark\:accent-dark-tremor-brand:is(.dark *){accent-color:#6366f1}.dark\:opacity-25:is(.dark *){opacity:.25}.dark\:shadow-dark-tremor-card:is(.dark *){--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:shadow-dark-tremor-dropdown:is(.dark *){--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:shadow-dark-tremor-input:is(.dark *){--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark\:outline-dark-tremor-brand:is(.dark *){outline-color:#6366f1}.dark\:ring-dark-tremor-brand-inverted:is(.dark *),.dark\:ring-dark-tremor-brand-muted:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity,1))}.dark\:ring-dark-tremor-ring:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(31 41 55/var(--tw-ring-opacity,1))}.dark\:ring-opacity-60:is(.dark *){--tw-ring-opacity:.6}.dark\:placeholder\:text-dark-tremor-content:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-dark-tremor-content:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-dark-tremor-content-subtle:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.dark\:placeholder\:text-dark-tremor-content-subtle:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.dark\:placeholder\:text-red-500:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.dark\:placeholder\:text-red-500:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content-subtle:is(.dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.dark\:placeholder\:text-tremor-content-subtle:is(.dark *)::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.dark\:hover\:border-dark-tremor-brand-emphasis:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.dark\:hover\:bg-dark-tremor-background-muted:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:hover\:bg-dark-tremor-background-subtle:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\:hover\:bg-dark-tremor-background-subtle\/40:hover:is(.dark *){background-color:#1f293766}.dark\:hover\:bg-dark-tremor-brand-emphasis:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity,1))}.dark\:hover\:bg-dark-tremor-brand-faint:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(11 18 41/var(--tw-bg-opacity,1))}.hover\:dark\:\!bg-gray-100:is(.dark *):hover{--tw-bg-opacity:1!important;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))!important}.hover\:dark\:bg-gray-100:is(.dark *):hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.dark\:hover\:bg-opacity-20:hover:is(.dark *){--tw-bg-opacity:.2}.dark\:hover\:text-dark-tremor-brand-emphasis:hover:is(.dark *){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity,1))}.dark\:hover\:text-dark-tremor-content:hover:is(.dark *),.dark\:hover\:text-tremor-content:hover:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:hover\:text-tremor-content-emphasis:hover:is(.dark *){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:dark\:text-dark-tremor-content:is(.dark *):hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\:focus\:border-dark-tremor-brand-subtle:focus:is(.dark *),.focus\:dark\:border-dark-tremor-brand-subtle:is(.dark *):focus{--tw-border-opacity:1;border-color:rgb(55 48 163/var(--tw-border-opacity,1))}.dark\:focus\:ring-dark-tremor-brand-muted:focus:is(.dark *),.focus\:dark\:ring-dark-tremor-brand-muted:is(.dark *):focus{--tw-ring-opacity:1;--tw-ring-color:rgb(30 27 75/var(--tw-ring-opacity,1))}.group:hover .group-hover\:dark\:bg-dark-tremor-brand-subtle\/70:is(.dark *){background-color:#3730a3b3}.group:hover .dark\:group-hover\:text-dark-tremor-content-emphasis:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.aria-selected\:dark\:\!bg-dark-tremor-background-subtle:is(.dark *)[aria-selected=true]{--tw-bg-opacity:1!important;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))!important}.dark\:aria-selected\:bg-dark-tremor-background-emphasis[aria-selected=true]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.dark\:aria-selected\:text-dark-tremor-brand-inverted[aria-selected=true]:is(.dark *){--tw-text-opacity:1;color:rgb(30 27 75/var(--tw-text-opacity,1))}.dark\:aria-selected\:text-dark-tremor-content-inverted[aria-selected=true]:is(.dark *){--tw-text-opacity:1;color:rgb(3 7 18/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:border-dark-tremor-border[data-selected]:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.data-\[selected\]\:dark\:border-dark-tremor-brand:is(.dark *)[data-selected]{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity,1))}.dark\:data-\[focus\]\:bg-dark-tremor-background-muted[data-focus]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:data-\[selected\]\:bg-dark-tremor-background[data-selected]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.dark\:data-\[selected\]\:bg-dark-tremor-background-muted[data-selected]:is(.dark *){--tw-bg-opacity:1;background-color:rgb(19 26 43/var(--tw-bg-opacity,1))}.dark\:data-\[focus\]\:text-dark-tremor-content-strong[data-focus]:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:text-dark-tremor-brand[data-selected]:is(.dark *){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:text-dark-tremor-content-strong[data-selected]:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity,1))}.data-\[selected\]\:dark\:text-dark-tremor-brand:is(.dark *)[data-selected]{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity,1))}.dark\:data-\[selected\]\:shadow-dark-tremor-input[data-selected]:is(.dark *){--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:640px){.sm\:col-span-1{grid-column:span 1/span 1}.sm\:col-span-10{grid-column:span 10/span 10}.sm\:col-span-11{grid-column:span 11/span 11}.sm\:col-span-12{grid-column:span 12/span 12}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:col-span-4{grid-column:span 4/span 4}.sm\:col-span-5{grid-column:span 5/span 5}.sm\:col-span-6{grid-column:span 6/span 6}.sm\:col-span-7{grid-column:span 7/span 7}.sm\:col-span-8{grid-column:span 8/span 8}.sm\:col-span-9{grid-column:span 9/span 9}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:mb-0{margin-bottom:0}.sm\:ml-4{margin-left:1rem}.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:flex{display:flex}.sm\:h-screen{height:100vh}.sm\:w-64{width:16rem}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.sm\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.sm\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.sm\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.sm\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.sm\:grid-cols-none{grid-template-columns:none}.sm\:flex-row{flex-direction:row}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pb-4{padding-bottom:1rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}}@media (min-width:768px){.md\:col-span-1{grid-column:span 1/span 1}.md\:col-span-10{grid-column:span 10/span 10}.md\:col-span-11{grid-column:span 11/span 11}.md\:col-span-12{grid-column:span 12/span 12}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-span-3{grid-column:span 3/span 3}.md\:col-span-4{grid-column:span 4/span 4}.md\:col-span-5{grid-column:span 5/span 5}.md\:col-span-6{grid-column:span 6/span 6}.md\:col-span-7{grid-column:span 7/span 7}.md\:col-span-8{grid-column:span 8/span 8}.md\:col-span-9{grid-column:span 9/span 9}.md\:table-cell{display:table-cell}.md\:hidden{display:none}.md\:w-64{width:16rem}.md\:w-72{width:18rem}.md\:w-auto{width:auto}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.md\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.md\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.md\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.md\:grid-cols-none{grid-template-columns:none}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}}@media (min-width:1024px){.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-10{grid-column:span 10/span 10}.lg\:col-span-11{grid-column:span 11/span 11}.lg\:col-span-12{grid-column:span 12/span 12}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:col-span-4{grid-column:span 4/span 4}.lg\:col-span-5{grid-column:span 5/span 5}.lg\:col-span-6{grid-column:span 6/span 6}.lg\:col-span-7{grid-column:span 7/span 7}.lg\:col-span-8{grid-column:span 8/span 8}.lg\:col-span-9{grid-column:span 9/span 9}.lg\:inline{display:inline}.lg\:table-cell{display:table-cell}.lg\:hidden{display:none}.lg\:w-72{width:18rem}.lg\:max-w-\[200px\]{max-width:200px}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.lg\:grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.lg\:grid-cols-none{grid-template-columns:none}}@media (min-width:1280px){.xl\:table-cell{display:table-cell}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{appearance:none}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:not\(\[data-selected\]\)\]\:text-tremor-content:not([data-selected]){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:hover\:text-tremor-content-emphasis:hover:not([data-selected]){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:dark\:text-dark-tremor-content:is(.dark *):not([data-selected]),.dark\:\[\&\:not\(\[data-selected\]\)\]\:text-dark-tremor-content:not([data-selected]):is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:dark\:hover\:border-dark-tremor-content-emphasis:hover:is(.dark *):not([data-selected]){--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.\[\&\:not\(\[data-selected\]\)\]\:dark\:hover\:text-dark-tremor-content-emphasis:hover:is(.dark *):not([data-selected]),.dark\:\[\&\:not\(\[data-selected\]\)\]\:hover\:text-dark-tremor-content-emphasis:hover:not([data-selected]):is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.\[\&_\.ant-tabs-content\]\:h-full .ant-tabs-content{height:100%}.\[\&_\.ant-tabs-nav\]\:pl-4 .ant-tabs-nav{padding-left:1rem}.\[\&_\.ant-tabs-tabpane\]\:h-full .ant-tabs-tabpane{height:100%}.\[\&_\[role\=\'tree\'\]\]\:bg-white [role=tree]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\[\&_\[role\=\'tree\'\]\]\:text-slate-900 [role=tree]{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.\[\&_td\]\:py-0\.5 td{padding-top:.125rem;padding-bottom:.125rem}.\[\&_td\]\:py-2 td{padding-top:.5rem;padding-bottom:.5rem}.\[\&_th\]\:py-1 th{padding-top:.25rem;padding-bottom:.25rem}.\[\&_th\]\:py-2 th{padding-top:.5rem;padding-bottom:.5rem} diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e1ddb2a5fb23f5a5.js b/litellm/proxy/_experimental/out/_next/static/chunks/e1ddb2a5fb23f5a5.js deleted file mode 100644 index 3e95828137..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/e1ddb2a5fb23f5a5.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(876556);function i(e){return["small","middle","large"].includes(e)}function a(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>i,"isValidGapNumber",()=>a],908286);var l=e.i(242064),o=e.i(249616),d=e.i(372409),s=e.i(246422);let c=(0,s.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:l,fontSizeSM:o,borderRadiusLG:s,borderRadiusSM:c,colorBgContainerDisabled:u,lineWidth:m}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,background:u,borderWidth:m,borderStyle:"solid",borderColor:i,borderRadius:n,"&-large":{fontSize:l,borderRadius:s},"&-small":{paddingInline:a,borderRadius:c,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,d.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 m=t.default.forwardRef((e,r)=>{let{className:i,children:a,style:d,prefixCls:s}=e,m=u(e,["className","children","style","prefixCls"]),{getPrefixCls:g,direction:p}=t.default.useContext(l.ConfigContext),h=g("space-addon",s),[f,b,w]=c(h),{compactItemClassnames:$,compactSize:y}=(0,o.useCompactItemContext)(h,p),k=(0,n.default)(h,b,$,w,{[`${h}-${y}`]:y},i);return f(t.default.createElement("div",Object.assign({ref:r,className:k,style:d},m),a))}),g=t.default.createContext({latestIndex:0}),p=g.Provider,h=({className:e,index:n,children:r,split:i,style:a})=>{let{latestIndex:l}=t.useContext(g);return null==r?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:a},r),n{let t=(0,f.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var w=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 $=t.forwardRef((e,o)=>{var d;let{getPrefixCls:s,direction:c,size:u,className:m,style:g,classNames:f,styles:$}=(0,l.useComponentConfig)("space"),{size:y=null!=u?u:"small",align:k,className:S,rootClassName:v,children:x,direction:C="horizontal",prefixCls:I,split:E,style:O,wrap:z=!1,classNames:R,styles:j}=e,B=w(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[N,M]=Array.isArray(y)?y:[y,y],_=i(M),T=i(N),U=a(M),A=a(N),L=(0,r.default)(x,{keepEmpty:!0}),P=void 0===k&&"horizontal"===C?"center":k,W=s("space",I),[G,H,D]=b(W),q=(0,n.default)(W,m,H,`${W}-${C}`,{[`${W}-rtl`]:"rtl"===c,[`${W}-align-${P}`]:P,[`${W}-gap-row-${M}`]:_,[`${W}-gap-col-${N}`]:T},S,v,D),V=(0,n.default)(`${W}-item`,null!=(d=null==R?void 0:R.item)?d:f.item),X=Object.assign(Object.assign({},$.item),null==j?void 0:j.item),F=L.map((e,n)=>{let r=(null==e?void 0:e.key)||`${V}-${n}`;return t.createElement(h,{className:V,key:r,index:n,split:E,style:X},e)}),Y=t.useMemo(()=>({latestIndex:L.reduce((e,t,n)=>null!=t?n:e,0)}),[L]);if(0===L.length)return null;let K={};return z&&(K.flexWrap="wrap"),!T&&A&&(K.columnGap=N),!_&&U&&(K.rowGap=M),G(t.createElement("div",Object.assign({ref:o,className:q,style:Object.assign(Object.assign(Object.assign({},K),g),O)},B),t.createElement(p,{value:Y},F)))});$.Compact=o.default,$.Addon=m,e.s(["default",0,$],38243)},190144,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:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};var i=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["default",0,a],190144)},735049,e=>{"use strict";var t=e.i(654310),n=function(e){if((0,t.default)()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],r=window.document.documentElement;return n.some(function(e){return e in r.style})}return!1},r=function(e,t){if(!n(e))return!1;var r=document.createElement("div"),i=r.style[e];return r.style[e]=t,r.style[e]!==i};function i(e,t){return Array.isArray(e)||void 0===t?n(e):r(e,t)}e.s(["isStyleSupport",()=>i])},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},618566,(e,t,n)=>{t.exports=e.r(976562)},321836,e=>{"use strict";let t="litellm_return_url",n="redirect_to";function r(){return window.location.href}function i(){let e=r();e&&function(e,t,n=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function o(){return new URLSearchParams(window.location.search).get(n)}function d(e,t){let i=t||r();if(!i||i.includes("/login"))return e;let a=e.includes("?")?"&":"?";return`${e}${a}${n}=${encodeURIComponent(i)}`}function s(){let e=o();if(e)return e;let t=a();return t||null}function c(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function u(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),n=window.location.hostname;if(t.hostname!==n)return!1;if(c())return!0;return t.origin===window.location.origin}catch{return!1}}function m(e){try{let t=new URL(e,window.location.origin),n=t.pathname;n.length>1&&n.endsWith("/")&&(n=n.slice(0,-1));let r=new URLSearchParams(t.search),i=new URLSearchParams;Array.from(r.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{i.append(e,t)});let a=i.toString(),l=t.hash||"";return`${t.origin}${n}${a?`?${a}`:""}${l}`}catch{return e}}function g(){let e=o();if(e){if(u(e))return l(),e;c()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=a();if(t){if(u(t))return l(),t;c()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>d,"clearStoredReturnUrl",()=>l,"consumeReturnUrl",()=>g,"getReturnUrl",()=>s,"isValidReturnUrl",()=>u,"normalizeUrlForCompare",()=>m,"storeReturnUrl",()=>i])},161281,e=>{"use strict";var t=e.i(947293);function n(e){try{let n=(0,t.jwtDecode)(e);if(n&&"number"==typeof n.exp)return 1e3*n.exp<=Date.now();return!1}catch{return!0}}function r(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function i(e){return!!e&&null!==r(e)&&!n(e)}e.s(["checkTokenValidity",()=>i,"decodeToken",()=>r,"isJwtExpired",()=>n])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],n=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>n(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,n,"rolesWithWriteAccess",0,["Internal User","Admin","proxy_admin"]])},135214,e=>{"use strict";var t=e.i(764205),n=e.i(268004),r=e.i(161281),i=e.i(321836),a=e.i(618566),l=e.i(271645),o=e.i(708347),d=e.i(612256);e.s(["default",0,()=>{let e=(0,a.useRouter)(),{data:s,isLoading:c}=(0,d.useUIConfig)(),u="u">typeof document?(0,n.getCookie)("token"):null,m=(0,l.useMemo)(()=>(0,r.decodeToken)(u),[u]),g=(0,l.useMemo)(()=>(0,r.checkTokenValidity)(u),[u])&&!s?.admin_ui_disabled,p=(0,l.useCallback)(()=>{(0,i.storeReturnUrl)();let n=`${(0,t.getProxyBaseUrl)()}/ui/login`,r=(0,i.buildLoginUrlWithReturn)(n);e.replace(r)},[e]);return(0,l.useEffect)(()=>{!c&&(g||(u&&(0,n.clearTokenCookies)(),p()))},[c,g,u,p]),{isLoading:c,isAuthorized:g,token:g?u:null,accessToken:m?.key??null,userId:m?.user_id??null,userEmail:m?.user_email??null,userRole:(0,o.formatUserRole)(m?.user_role),premiumUser:m?.premium_user??null,disabledPersonalKeyCreation:m?.disabled_non_admin_personal_key_creation??null,showSSOBanner:m?.login_method==="username_password"}}])},95779,e=>{"use strict";var t=e.i(480731);let n={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},r=[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",()=>n,"themeColorRange",()=>r])},563113,887719,e=>{"use strict";var t=e.i(271645),n=e.i(864517),r=e.i(244009),i=e.i(408850),a=e.i(87414);let l=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{void 0!==e[n]&&(t[n]=e[n])})}),t};function o(e){if(!e)return;let{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function d(e){let{closable:n,closeIcon:r}=e||{};return t.default.useMemo(()=>{if(!n&&(!1===n||!1===r||null===r))return!1;if(void 0===n&&void 0===r)return null;let e={closeIcon:"boolean"!=typeof r&&null!==r?r:void 0};return n&&"object"==typeof n&&(e=Object.assign(Object.assign({},e),n)),e},[n,r])}e.s(["default",0,l],887719);let s={};e.s(["pickClosable",()=>o,"useClosable",0,(e,o,c=s)=>{let u=d(e),m=d(o),[g]=(0,i.useLocale)("global",a.default.global),p="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),h=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(n.default,null)},c),[c]),f=t.default.useMemo(()=>!1!==u&&(u?l(h,m,u):!1!==m&&(m?l(h,m):!!h.closable&&h)),[u,m,h]);return t.default.useMemo(()=>{var e,n;if(!1===f)return[!1,null,p,{}];let{closeIconRender:i}=h,{closeIcon:a}=f,l=a,o=(0,r.default)(f,!0);return null!=l&&(i&&(l=i(a)),l=t.default.isValidElement(l)?t.default.cloneElement(l,Object.assign(Object.assign(Object.assign({},l.props),{"aria-label":null!=(n=null==(e=l.props)?void 0:e["aria-label"])?n:g.close}),o)):t.default.createElement("span",Object.assign({"aria-label":g.close},o),l)),[!0,l,p,o]},[p,g.close,f,h])}],563113)},389083,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(829087),i=e.i(480731),a=e.i(95779),l=e.i(444755),o=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"}},s={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,o.makeClassName)("Badge"),u=n.default.forwardRef((e,u)=>{let{color:m,icon:g,size:p=i.Sizes.SM,tooltip:h,className:f,children:b}=e,w=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),$=g||null,{tooltipProps:y,getReferenceProps:k}=(0,r.useTooltip)();return n.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,y.refs.setReference]),className:(0,l.tremorTwMerge)(c("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,l.tremorTwMerge)((0,o.getColorClassNames)(m,a.colorPalette.background).bgColor,(0,o.getColorClassNames)(m,a.colorPalette.iconText).textColor,(0,o.getColorClassNames)(m,a.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,l.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[p].paddingX,d[p].paddingY,d[p].fontSize,f)},k,w),n.default.createElement(r.default,Object.assign({text:h},y)),$?n.default.createElement($,{className:(0,l.tremorTwMerge)(c("icon"),"shrink-0 -ml-1 mr-1.5",s[p].height,s[p].width)}):null,n.default.createElement("span",{className:(0,l.tremorTwMerge)(c("text"),"whitespace-nowrap")},b))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(242064),i=e.i(517455);e.i(296059);var a=e.i(915654),l=e.i(183293),o=e.i(246422),d=e.i(838378);let s=(0,o.genStyleHooks)("Divider",e=>{let t=(0,d.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:d,verticalMarginInline:s}=e;return{[t]:Object.assign(Object.assign({},(0,l.resetComponent)(e)),{borderBlockStart:`${(0,a.unit)(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,a.unit)(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,a.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,a.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,a.unit)(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${d} * 100%)`},"&::after":{width:`calc(100% - ${d} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${d} * 100%)`},"&::after":{width:`calc(${d} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var c=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 u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:a,direction:l,className:o,style:d}=(0,r.useComponentConfig)("divider"),{prefixCls:m,type:g="horizontal",orientation:p="center",orientationMargin:h,className:f,rootClassName:b,children:w,dashed:$,variant:y="solid",plain:k,style:S,size:v}=e,x=c(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),C=a("divider",m),[I,E,O]=s(C),z=u[(0,i.default)(v)],R=!!w,j=t.useMemo(()=>"left"===p?"rtl"===l?"end":"start":"right"===p?"rtl"===l?"start":"end":p,[l,p]),B="start"===j&&null!=h,N="end"===j&&null!=h,M=(0,n.default)(C,o,E,O,`${C}-${g}`,{[`${C}-with-text`]:R,[`${C}-with-text-${j}`]:R,[`${C}-dashed`]:!!$,[`${C}-${y}`]:"solid"!==y,[`${C}-plain`]:!!k,[`${C}-rtl`]:"rtl"===l,[`${C}-no-default-orientation-margin-start`]:B,[`${C}-no-default-orientation-margin-end`]:N,[`${C}-${z}`]:!!z},f,b),_=t.useMemo(()=>"number"==typeof h?h:/^\d+$/.test(h)?Number(h):h,[h]);return I(t.createElement("div",Object.assign({className:M,style:Object.assign(Object.assign({},d),S)},x,{role:"separator"}),w&&"vertical"!==g&&t.createElement("span",{className:`${C}-inner-text`,style:{marginInlineStart:B?_:void 0,marginInlineEnd:N?_:void 0}},w)))}],312361)},801312,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:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var i=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["default",0,a],801312)},475254,e=>{"use strict";var t=e.i(271645);let n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},r=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:d,iconNode:s,...c},u)=>(0,t.createElement)("svg",{ref:u,...i,width:n,height:n,stroke:e,strokeWidth:l?24*Number(a)/Number(n):a,className:r("lucide",o),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(c)&&{"aria-hidden":"true"},...c},[...s.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(d)?d:[d]])),l=(e,i)=>{let l=(0,t.forwardRef)(({className:l,...o},d)=>(0,t.createElement)(a,{ref:d,iconNode:i,className:r(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=n(e),l};e.s(["default",()=>l],475254)},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(739295),r=e.i(343794),i=e.i(931067),a=e.i(211577),l=e.i(392221),o=e.i(703923),d=e.i(914949),s=e.i(404948),c=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,n){var u,m=e.prefixCls,g=void 0===m?"rc-switch":m,p=e.className,h=e.checked,f=e.defaultChecked,b=e.disabled,w=e.loadingIcon,$=e.checkedChildren,y=e.unCheckedChildren,k=e.onClick,S=e.onChange,v=e.onKeyDown,x=(0,o.default)(e,c),C=(0,d.default)(!1,{value:h,defaultValue:f}),I=(0,l.default)(C,2),E=I[0],O=I[1];function z(e,t){var n=E;return b||(O(n=e),null==S||S(n,t)),n}var R=(0,r.default)(g,p,(u={},(0,a.default)(u,"".concat(g,"-checked"),E),(0,a.default)(u,"".concat(g,"-disabled"),b),u));return t.createElement("button",(0,i.default)({},x,{type:"button",role:"switch","aria-checked":E,disabled:b,className:R,ref:n,onKeyDown:function(e){e.which===s.default.LEFT?z(!1,e):e.which===s.default.RIGHT&&z(!0,e),null==v||v(e)},onClick:function(e){var t=z(!E,e);null==k||k(t,e)}}),w,t.createElement("span",{className:"".concat(g,"-inner")},t.createElement("span",{className:"".concat(g,"-inner-checked")},$),t.createElement("span",{className:"".concat(g,"-inner-unchecked")},y)))});u.displayName="Switch";var m=e.i(121872),g=e.i(242064),p=e.i(937328),h=e.i(517455);e.i(296059);var f=e.i(915654);e.i(262370);var b=e.i(135551),w=e.i(183293),$=e.i(246422),y=e.i(838378);let k=(0,$.genStyleHooks)("Switch",e=>{let t=(0,y.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,w.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:(0,f.unit)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,w.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:l,calc:o}=e,d=`${t}-inner`,s=(0,f.unit)(o(l).add(o(r).mul(2)).equal()),c=(0,f.unit)(o(a).mul(2).equal());return{[t]:{[d]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${d}-checked, ${d}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${c})`,marginInlineEnd:`calc(100% - ${s} + ${c})`},[`${d}-unchecked`]:{marginTop:o(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${d}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${c})`,marginInlineEnd:`calc(-100% + ${s} - ${c})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:o(r).mul(2).equal(),marginInlineEnd:o(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:o(r).mul(-1).mul(2).equal(),marginInlineEnd:o(r).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:l(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(l(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:l,handleSizeSM:o,calc:d}=e,s=`${t}-inner`,c=(0,f.unit)(d(o).add(d(r).mul(2)).equal()),u=(0,f.unit)(d(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:(0,f.unit)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:a,[`${s}-checked, ${s}-unchecked`]:{minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${s}-unchecked`]:{marginTop:d(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:d(d(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,f.unit)(d(o).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:d(e.marginXXS).div(2).equal(),marginInlineEnd:d(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:d(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:d(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,l=r/2,o=a-4,d=l-4;return{trackHeight:a,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*d+4,trackPadding:2,handleBg:i,handleSize:o,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:d/2,innerMaxMarginSM:d+2+4}});var S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 v=t.forwardRef((e,i)=>{let{prefixCls:a,size:l,disabled:o,loading:s,className:c,rootClassName:f,style:b,checked:w,value:$,defaultChecked:y,defaultValue:v,onChange:x}=e,C=S(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[I,E]=(0,d.default)(!1,{value:null!=w?w:$,defaultValue:null!=y?y:v}),{getPrefixCls:O,direction:z,switch:R}=t.useContext(g.ConfigContext),j=t.useContext(p.default),B=(null!=o?o:j)||s,N=O("switch",a),M=t.createElement("div",{className:`${N}-handle`},s&&t.createElement(n.default,{className:`${N}-loading-icon`})),[_,T,U]=k(N),A=(0,h.default)(l),L=(0,r.default)(null==R?void 0:R.className,{[`${N}-small`]:"small"===A,[`${N}-loading`]:s,[`${N}-rtl`]:"rtl"===z},c,f,T,U),P=Object.assign(Object.assign({},null==R?void 0:R.style),b);return _(t.createElement(m.default,{component:"Switch",disabled:B},t.createElement(u,Object.assign({},C,{checked:I,onChange:(...e)=>{E(e[0]),null==x||x.apply(void 0,e)},prefixCls:N,className:L,style:P,disabled:B,ref:i,loadingIcon:M}))))});v.__ANT_SWITCH=!0,e.s(["Switch",0,v],790848)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e1f572e8226962e3.js b/litellm/proxy/_experimental/out/_next/static/chunks/e1f572e8226962e3.js deleted file mode 100644 index 69ccede39a..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/e1f572e8226962e3.js +++ /dev/null @@ -1,72 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),Object.defineProperty(l,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},269200,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("Table"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement("div",{className:(0,a.tremorTwMerge)(r("root"),"overflow-auto",i)},l.default.createElement("table",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},o),n))});s.displayName="Table",e.s(["Table",()=>s],269200)},427612,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHead"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("thead",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},o),n))});s.displayName="TableHead",e.s(["TableHead",()=>s],427612)},64848,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableHeaderCell"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("th",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},o),n))});s.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>s],64848)},942232,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableBody"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("tbody",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},o),n))});s.displayName="TableBody",e.s(["TableBody",()=>s],942232)},496020,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableRow"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("tr",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("row"),i)},o),n))});s.displayName="TableRow",e.s(["TableRow",()=>s],496020)},977572,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(444755);let r=(0,e.i(673706).makeClassName)("TableCell"),s=l.default.forwardRef((e,s)=>{let{children:n,className:i}=e,o=(0,t.__rest)(e,["children","className"]);return l.default.createElement(l.default.Fragment,null,l.default.createElement("td",Object.assign({ref:s,className:(0,a.tremorTwMerge)(r("root"),"align-middle whitespace-nowrap text-left p-4",i)},o),n))});s.displayName="TableCell",e.s(["TableCell",()=>s],977572)},389083,e=>{"use strict";var t=e.i(290571),l=e.i(271645),a=e.i(829087),r=e.i(480731),s=e.i(95779),n=e.i(444755),i=e.i(673706);let o={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"}},c={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"}},d=(0,i.makeClassName)("Badge"),u=l.default.forwardRef((e,u)=>{let{color:m,icon:h,size:g=r.Sizes.SM,tooltip:p,className:x,children:f}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),y=h||null,{tooltipProps:j,getReferenceProps:v}=(0,a.useTooltip)();return l.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([u,j.refs.setReference]),className:(0,n.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,n.tremorTwMerge)((0,i.getColorClassNames)(m,s.colorPalette.background).bgColor,(0,i.getColorClassNames)(m,s.colorPalette.iconText).textColor,(0,i.getColorClassNames)(m,s.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,n.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"),o[g].paddingX,o[g].paddingY,o[g].fontSize,x)},v,b),l.default.createElement(a.default,Object.assign({text:p},j)),y?l.default.createElement(y,{className:(0,n.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[g].height,c[g].width)}):null,l.default.createElement("span",{className:(0,n.tremorTwMerge)(d("text"),"whitespace-nowrap")},f))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},68155,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:"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,l],68155)},360820,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:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,l],360820)},871943,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:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,l],871943)},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,l],94629)},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},848725,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:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});e.s(["EyeIcon",0,l],848725)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["StopOutlined",0,s],724154)},292335,122520,165615,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",AWS_SIGV4:"aws_sigv4"},l={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};function a(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(["AUTH_TYPE",0,t,"OAUTH_FLOW",0,{INTERACTIVE:"interactive",M2M:"m2m"},"TRANSPORT",0,l,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?l.SSE:t&&e!==l.STDIO?l.OPENAPI:e],292335),e.s(["extractErrorMessage",()=>a],122520);let r=e=>{let t=new Uint8Array(e),l="";return t.forEach(e=>l+=String.fromCharCode(e)),btoa(l).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},s=async e=>{let t=new TextEncoder().encode(e);return r(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,s,"generateCodeVerifier",0,()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),r(e.buffer)}],165615)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var l=e.i(546467);e.s(["ExternalLinkIcon",()=>l.default],634831);let a=(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(["KeyIcon",()=>a],438100)},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},264843,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["MessageOutlined",0,s],264843)},446891,836991,153472,e=>{"use strict";var t,l,a=e.i(843476),r=e.i(464571),s=e.i(326373),n=e.i(94629),i=e.i(360820),o=e.i(871943),c=e.i(271645);let d=c.forwardRef(function(e,t){return c.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),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,d],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let l=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(i.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(d,{className:"h-4 w-4"})}];return(0,a.jsx)(s.Dropdown,{menu:{items:l,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(r.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(i.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var u=e.i(266027),m=e.i(954616),h=e.i(243652),g=e.i(135214),p=e.i(764205),x=((t={}).GENERAL_SETTINGS="general_settings",t),f=((l={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",l);let b=async(e,t)=>{try{let l=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(l,{method:"GET",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},y=(0,h.createQueryKeys)("proxyConfig"),j=async(e,t)=>{try{let l=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(l,{method:"POST",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>x,"GeneralSettingsFieldName",()=>f,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,g.default)();return(0,m.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await j(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,g.default)();return(0,u.useQuery)({queryKey:y.list({filters:{configType:e}}),queryFn:async()=>await b(t,e),enabled:!!t})}],153472)},149121,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(152990),r=e.i(682830),s=e.i(269200),n=e.i(427612),i=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572);function u({data:e=[],columns:u,onRowClick:m,renderSubComponent:h,renderChildRows:g,getRowCanExpand:p,isLoading:x=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:b="No logs found",enableSorting:y=!1}){let j=!!(h||g)&&!!p,[v,w]=(0,l.useState)([]),_=(0,a.useReactTable)({data:e,columns:u,...y&&{state:{sorting:v},onSortingChange:w,enableSortingRemoval:!1},...j&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,r.getCoreRowModel)(),...y&&{getSortedRowModel:(0,r.getSortedRowModel)()},...j&&{getExpandedRowModel:(0,r.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(n.TableHead,{children:_.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let l=y&&e.column.getCanSort(),r=e.column.getIsSorted();return(0,t.jsx)(i.TableHeaderCell,{className:`py-1 h-8 ${l?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:l?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),l&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===r?"↑":"desc"===r?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:x?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):_.getRowModel().rows.length>0?_.getRowModel().rows.map(e=>(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),j&&e.getIsExpanded()&&g&&g({row:e}),j&&e.getIsExpanded()&&h&&!g&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:h({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})})})]})})}e.s(["DataTable",()=>u])},37091,e=>{"use strict";var t=e.i(290571),l=e.i(95779),a=e.i(444755),r=e.i(673706),s=e.i(271645);let n=s.default.forwardRef((e,n)=>{let{color:i,children:o,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return s.default.createElement("p",Object.assign({ref:n,className:(0,a.tremorTwMerge)(i?(0,r.getColorClassNames)(i,l.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},d),o)});n.displayName="Subtitle",e.s(["Subtitle",()=>n],37091)},888288,e=>{"use strict";var t=e.i(271645);let l=(e,l)=>{let a=void 0!==l,[r,s]=(0,t.useState)(e);return[a?l:r,e=>{a||s(e)}]};e.s(["default",()=>l])},793130,e=>{"use strict";var t=e.i(290571),l=e.i(429427),a=e.i(371330),r=e.i(271645),s=e.i(394487),n=e.i(503269),i=e.i(214520),o=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(601893),h=e.i(140721),g=e.i(942803),p=e.i(233538),x=e.i(694421),f=e.i(700020),b=e.i(35889),y=e.i(998348),j=e.i(722678);let v=(0,r.createContext)(null);v.displayName="GroupContext";let w=r.Fragment,_=Object.assign((0,f.forwardRefWithAs)(function(e,t){var w;let _=(0,r.useId)(),k=(0,g.useProvidedId)(),N=(0,m.useDisabled)(),{id:C=k||`headlessui-switch-${_}`,disabled:S=N||!1,checked:T,defaultChecked:I,onChange:E,name:M,value:O,form:D,autoFocus:A=!1,...P}=e,B=(0,r.useContext)(v),[R,F]=(0,r.useState)(null),$=(0,r.useRef)(null),L=(0,u.useSyncRefs)($,t,null===B?null:B.setSwitch,F),z=(0,i.useDefaultValue)(I),[H,V]=(0,n.useControllable)(T,E,null!=z&&z),U=(0,o.useDisposables)(),[q,K]=(0,r.useState)(!1),W=(0,c.useEvent)(()=>{K(!0),null==V||V(!H),U.nextFrame(()=>{K(!1)})}),G=(0,c.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),W()}),Y=(0,c.useEvent)(e=>{e.key===y.Keys.Space?(e.preventDefault(),W()):e.key===y.Keys.Enter&&(0,x.attemptSubmit)(e.currentTarget)}),J=(0,c.useEvent)(e=>e.preventDefault()),Q=(0,j.useLabelledBy)(),X=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,l.useFocusRing)({autoFocus:A}),{isHovered:et,hoverProps:el}=(0,a.useHover)({isDisabled:S}),{pressed:ea,pressProps:er}=(0,s.useActivePress)({disabled:S}),es=(0,r.useMemo)(()=>({checked:H,disabled:S,hover:et,focus:Z,active:ea,autofocus:A,changing:q}),[H,et,Z,ea,S,q,A]),en=(0,f.mergeProps)({id:C,ref:L,role:"switch",type:(0,d.useResolveButtonType)(e,R),tabIndex:-1===e.tabIndex?0:null!=(w=e.tabIndex)?w:0,"aria-checked":H,"aria-labelledby":Q,"aria-describedby":X,disabled:S||void 0,autoFocus:A,onClick:G,onKeyUp:Y,onKeyPress:J},ee,el,er),ei=(0,r.useCallback)(()=>{if(void 0!==z)return null==V?void 0:V(z)},[V,z]),eo=(0,f.useRender)();return r.default.createElement(r.default.Fragment,null,null!=M&&r.default.createElement(h.FormFields,{disabled:S,data:{[M]:O||"on"},overrides:{type:"checkbox",checked:H},form:D,onReset:ei}),eo({ourProps:en,theirProps:P,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[l,a]=(0,r.useState)(null),[s,n]=(0,j.useLabels)(),[i,o]=(0,b.useDescriptions)(),c=(0,r.useMemo)(()=>({switch:l,setSwitch:a}),[l,a]),d=(0,f.useRender)();return r.default.createElement(o,{name:"Switch.Description",value:i},r.default.createElement(n,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){l&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),l.click(),l.focus({preventScroll:!0}))}}},r.default.createElement(v.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:w,name:"Switch.Group"}))))},Label:j.Label,Description:b.Description});var k=e.i(888288),N=e.i(95779),C=e.i(444755),S=e.i(673706),T=e.i(829087);let I=(0,S.makeClassName)("Switch"),E=r.default.forwardRef((e,l)=>{let{checked:a,defaultChecked:s=!1,onChange:n,color:i,name:o,error:c,errorMessage:d,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"]),x={bgColor:i?(0,S.getColorClassNames)(i,N.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,S.getColorClassNames)(i,N.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[f,b]=(0,k.default)(s,a),[y,j]=(0,r.useState)(!1),{tooltipProps:v,getReferenceProps:w}=(0,T.useTooltip)(300);return r.default.createElement("div",{className:"flex flex-row items-center justify-start"},r.default.createElement(T.default,Object.assign({text:h},v)),r.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([l,v.refs.setReference]),className:(0,C.tremorTwMerge)(I("root"),"flex flex-row relative h-5")},p,w),r.default.createElement("input",{type:"checkbox",className:(0,C.tremorTwMerge)(I("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:m,checked:f,onChange:e=>{e.preventDefault()}}),r.default.createElement(_,{checked:f,onChange:e=>{b(e),null==n||n(e)},disabled:u,className:(0,C.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",u?"cursor-not-allowed":""),onFocus:()=>j(!0),onBlur:()=>j(!1),id:g},r.default.createElement("span",{className:(0,C.tremorTwMerge)(I("sr-only"),"sr-only")},"Switch ",f?"on":"off"),r.default.createElement("span",{"aria-hidden":"true",className:(0,C.tremorTwMerge)(I("background"),f?x.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")}),r.default.createElement("span",{"aria-hidden":"true",className:(0,C.tremorTwMerge)(I("round"),f?(0,C.tremorTwMerge)(x.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",y?(0,C.tremorTwMerge)("ring-2",x.ringColor):"")}))),c&&d?r.default.createElement("p",{className:(0,C.tremorTwMerge)(I("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});E.displayName="Switch",e.s(["Switch",()=>E],793130)},418371,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:r="w-4 h-4"})=>{let[s,n]=(0,l.useState)(!1),{logo:i}=(0,a.getProviderLogoAndName)(e);return s||!i?(0,t.jsx)("div",{className:`${r} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:i,alt:`${e} logo`,className:r,onError:()=>n(!0)})}])},704308,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(994388),r=e.i(212931),s=e.i(764205),n=e.i(808613),i=e.i(311451),o=e.i(199133),c=e.i(888259),d=e.i(209261);let{TextArea:u}=i.Input,{Option:m}=o.Select,h=["Development","Productivity","Learning","Security","Data & Analytics","Integration","Testing","Documentation"],g=({visible:e,onClose:g,accessToken:p,onSuccess:x})=>{let[f]=n.Form.useForm(),[b,y]=(0,l.useState)(!1),[j,v]=(0,l.useState)(null),w=async e=>{if(!p)return void c.default.error("No access token available");if(!j)return void c.default.error("Please enter a valid GitHub URL");if(!(0,d.validatePluginName)(e.name))return void c.default.error("Skill name must be kebab-case (lowercase letters, numbers, and hyphens only)");if(e.version&&!(0,d.isValidSemanticVersion)(e.version))return void c.default.error("Version must be in semantic versioning format (e.g., 1.0.0)");if(e.authorEmail&&!(0,d.isValidEmail)(e.authorEmail))return void c.default.error("Invalid email format");if(e.homepage&&!(0,d.isValidUrl)(e.homepage))return void c.default.error("Invalid homepage URL format");y(!0);try{let t={name:e.name.trim(),source:j.parsed};e.version&&(t.version=e.version.trim()),e.description&&(t.description=e.description.trim()),(e.authorName||e.authorEmail)&&(t.author={},e.authorName&&(t.author.name=e.authorName.trim()),e.authorEmail&&(t.author.email=e.authorEmail.trim())),e.homepage&&(t.homepage=e.homepage.trim()),e.category&&(t.category=e.category),e.keywords&&(t.keywords=(0,d.parseKeywords)(e.keywords)),e.domain&&(t.domain=e.domain.trim()),e.namespace&&(t.namespace=e.namespace.trim()),await (0,s.registerClaudeCodePlugin)(p,t),c.default.success("Skill registered successfully"),f.resetFields(),v(null),x(),g()}catch(e){console.error("Error registering skill:",e),c.default.error("Failed to register skill")}finally{y(!1)}},_=()=>{f.resetFields(),v(null),g()};return(0,t.jsx)(r.Modal,{title:"Add New Skill",open:e,onCancel:_,footer:null,width:700,className:"top-8",children:(0,t.jsxs)(n.Form,{form:f,layout:"vertical",onFinish:w,className:"mt-4",children:[(0,t.jsx)(n.Form.Item,{label:"GitHub URL",name:"skillUrl",rules:[{required:!0,message:"Please enter a GitHub URL"}],tooltip:"Paste a GitHub URL — repo, folder, or file link. E.g. github.com/org/repo or github.com/org/repo/tree/main/my-skill",children:(0,t.jsx)(i.Input,{placeholder:"https://github.com/org/repo/tree/main/my-skill",className:"rounded-lg",onChange:e=>{let t=function(e){let t=e.trim().replace(/^https?:\/\//,"").replace(/\/+$/,"");if(!t.startsWith("github.com/"))return null;let l=t.slice(11).split("/");if(l.length<2)return null;let a=l[0],r=l[1].replace(/\.git$/,"");if(2===l.length||2===l.length&&r)return{parsed:{source:"github",repo:`${a}/${r}`},label:`GitHub repo — ${a}/${r}`,suggestedName:r};if(l.length>=5&&("tree"===l[2]||"blob"===l[2])){let e=l.slice(4),t=e[e.length-1];if(t&&t.includes(".")&&e.pop(),0===e.length)return{parsed:{source:"github",repo:`${a}/${r}`},label:`GitHub repo — ${a}/${r}`,suggestedName:r};let s=e.join("/");return{parsed:{source:"git-subdir",url:`https://github.com/${a}/${r}`,path:s},label:`GitHub subdir — ${a}/${r} @ ${s}`,suggestedName:e[e.length-1]}}return null}(e.target.value);v(t),t&&(f.getFieldValue("name")||f.setFieldsValue({name:t.suggestedName}))}})}),j&&(0,t.jsxs)("div",{className:"mb-4 px-3 py-2 bg-blue-50 border border-blue-200 rounded-lg text-sm text-blue-700",children:["Detected: ",j.label]}),(0,t.jsx)(n.Form.Item,{label:"Skill Name",name:"name",rules:[{required:!0,message:"Please enter skill name"},{pattern:/^[a-z0-9-]+$/,message:"Name must be kebab-case (lowercase, numbers, hyphens only)"}],tooltip:"Unique identifier in kebab-case format (e.g., my-skill)",children:(0,t.jsx)(i.Input,{placeholder:"my-skill",className:"rounded-lg"})}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)(n.Form.Item,{label:"Domain (Optional)",name:"domain",tooltip:"Top-level grouping in the Skill Hub (e.g., Productivity)",className:"flex-1",children:(0,t.jsx)(i.Input,{placeholder:"Productivity",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Namespace (Optional)",name:"namespace",tooltip:"Sub-grouping within domain (e.g., workflows)",className:"flex-1",children:(0,t.jsx)(i.Input,{placeholder:"workflows",className:"rounded-lg"})})]}),(0,t.jsx)(n.Form.Item,{label:"Description (Optional)",name:"description",tooltip:"Brief description of what the skill does",children:(0,t.jsx)(u,{rows:3,placeholder:"A skill that helps with...",maxLength:500,className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Category (Optional)",name:"category",tooltip:"Select a category or enter a custom one",children:(0,t.jsx)(o.Select,{placeholder:"Select or type a category",allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"rounded-lg",children:h.map(e=>(0,t.jsx)(m,{value:e,children:e},e))})}),(0,t.jsx)(n.Form.Item,{label:"Keywords (Optional)",name:"keywords",tooltip:"Comma-separated list of keywords for search",children:(0,t.jsx)(i.Input,{placeholder:"search, web, api",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Version (Optional)",name:"version",tooltip:"Semantic version (e.g., 1.0.0)",children:(0,t.jsx)(i.Input,{placeholder:"1.0.0",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Author Name (Optional)",name:"authorName",tooltip:"Name of the skill author or organization",children:(0,t.jsx)(i.Input,{placeholder:"Your Name or Organization",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{label:"Author Email (Optional)",name:"authorEmail",rules:[{type:"email",message:"Please enter a valid email"}],tooltip:"Contact email for the skill author",children:(0,t.jsx)(i.Input,{type:"email",placeholder:"author@example.com",className:"rounded-lg"})}),(0,t.jsx)(n.Form.Item,{className:"mb-0 mt-6",children:(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(a.Button,{variant:"secondary",onClick:_,disabled:b,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"submit",loading:b,children:b?"Adding...":"Add Skill"})]})})]})})};var p=e.i(166406),x=e.i(871943),f=e.i(360820),b=e.i(94629),y=e.i(68155),j=e.i(152990),v=e.i(682830),w=e.i(389083),_=e.i(269200),k=e.i(942232),N=e.i(977572),C=e.i(427612),S=e.i(64848),T=e.i(496020),I=e.i(592968),E=e.i(727749);let M=({pluginsList:e,isLoading:r,onDeleteClick:s,accessToken:n,isAdmin:i,onPluginClick:o})=>{let[c,u]=(0,l.useState)([{id:"created_at",desc:!0}]),m=[{header:"Skill Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,r=l.name||"";return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(I.Tooltip,{title:r,children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[150px] justify-start",onClick:()=>o(l.id),children:r})}),(0,t.jsx)(I.Tooltip,{title:"Copy Plugin ID",children:(0,t.jsx)(p.CopyOutlined,{onClick:e=>{var t;e.stopPropagation(),t=l.id,navigator.clipboard.writeText(t),E.default.success("Copied to clipboard!")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Version",accessorKey:"version",cell:({row:e})=>{let l=e.original.version||"N/A";return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:l})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original.description||"No description";return(0,t.jsx)(I.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"text-xs text-gray-600 block max-w-[300px] truncate",children:l})})}},{header:"Category",accessorKey:"category",cell:({row:e})=>{let l=e.original.category;if(!l)return(0,t.jsx)(w.Badge,{color:"gray",className:"text-xs font-normal",size:"xs",children:"Uncategorized"});let a=(0,d.getCategoryBadgeColor)(l);return(0,t.jsx)(w.Badge,{color:a,className:"text-xs font-normal",size:"xs",children:l})}},{header:"Public",accessorKey:"enabled",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(w.Badge,{color:l.enabled?"green":"gray",className:"text-xs font-normal",size:"xs",children:l.enabled?"Yes":"No"})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{var l;let a=e.original;return(0,t.jsx)(I.Tooltip,{title:a.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:(l=a.created_at)?new Date(l).toLocaleString():"-"})})}},...i?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(I.Tooltip,{title:"Delete skill",children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),s(l.name,l.name)},icon:y.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],h=(0,j.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:u,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(_.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(C.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(T.TableRow,{children:e.headers.map(e=>(0,t.jsx)(S.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(f.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(x.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(b.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(k.TableBody,{children:r?(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(N.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e&&e.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(T.TableRow,{className:"h-8 cursor-pointer hover:bg-gray-50",onClick:()=>o(e.original.id),children:e.getVisibleCells().map(e=>(0,t.jsx)(N.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(N.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No skills found. Add one to get started."})})})})})]})})})};var O=e.i(652272),D=e.i(708347);e.s(["default",0,({accessToken:e,userRole:n})=>{let[i,o]=(0,l.useState)([]),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),[h,p]=(0,l.useState)(!1),[x,f]=(0,l.useState)(null),[b,y]=(0,l.useState)(null),j=!!n&&(0,D.isAdminRole)(n),v=async()=>{if(e){m(!0);try{let t=await (0,s.getClaudeCodePluginsList)(e,!1);o(t.plugins)}catch(e){console.error("Error fetching skills:",e)}finally{m(!1)}}};(0,l.useEffect)(()=>{v()},[e]);let w=async()=>{if(x&&e){p(!0);try{await (0,s.deleteClaudeCodePlugin)(e,x.name),E.default.success(`Skill "${x.displayName}" deleted successfully`),v()}catch(e){console.error("Error deleting skill:",e),E.default.error("Failed to delete skill")}finally{p(!1),f(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[b?(0,t.jsx)(O.default,{skill:b,onBack:()=>y(null),isAdmin:j,accessToken:e,onPublishClick:v}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Skills"}),(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["Register Claude Code skills. Published skills appear in the Skill Hub for all users and are served via"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"/claude-code/marketplace.json"}),"."]}),(0,t.jsx)("div",{className:"mt-2 flex gap-2",children:(0,t.jsx)(a.Button,{onClick:()=>d(!0),disabled:!e||!j,children:"+ Add Skill"})})]}),(0,t.jsx)(M,{pluginsList:i,isLoading:u,onDeleteClick:(e,t)=>{f({name:e,displayName:t})},accessToken:e,isAdmin:j,onPluginClick:e=>{let t=i.find(t=>t.id===e);t&&y(t)}})]}),(0,t.jsx)(g,{visible:c,onClose:()=>d(!1),accessToken:e,onSuccess:v}),x&&(0,t.jsxs)(r.Modal,{title:"Delete Skill",open:null!==x,onOk:w,onCancel:()=>f(null),confirmLoading:h,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete skill:"," ",(0,t.jsx)("strong",{children:x.displayName}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],704308)},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(562901),a=e.i(343794),r=e.i(914949),s=e.i(529681),n=e.i(242064),i=e.i(829672),o=e.i(285781),c=e.i(836938),d=e.i(920228),u=e.i(62405),m=e.i(408850),h=e.i(87414),g=e.i(310730);let p=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:l,antCls:a,zIndexPopup:r,colorText:s,colorWarning:n,marginXXS:i,marginXS:o,fontSize:c,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:r,[`&${a}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:o,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${l}`]:{color:n,fontSize:c,lineHeight:1,marginInlineEnd:o},[`${t}-title`]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:i,color:s}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:o}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var x=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let f=e=>{let{prefixCls:a,okButtonProps:r,cancelButtonProps:s,title:i,description:g,cancelText:p,okText:x,okType:f="primary",icon:b=t.createElement(l.default,null),showCancel:y=!0,close:j,onConfirm:v,onCancel:w,onPopupClick:_}=e,{getPrefixCls:k}=t.useContext(n.ConfigContext),[N]=(0,m.useLocale)("Popconfirm",h.default.Popconfirm),C=(0,c.getRenderPropValue)(i),S=(0,c.getRenderPropValue)(g);return t.createElement("div",{className:`${a}-inner-content`,onClick:_},t.createElement("div",{className:`${a}-message`},b&&t.createElement("span",{className:`${a}-message-icon`},b),t.createElement("div",{className:`${a}-message-text`},C&&t.createElement("div",{className:`${a}-title`},C),S&&t.createElement("div",{className:`${a}-description`},S))),t.createElement("div",{className:`${a}-buttons`},y&&t.createElement(d.default,Object.assign({onClick:w,size:"small"},s),p||(null==N?void 0:N.cancelText)),t.createElement(o.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,u.convertLegacyProps)(f)),r),actionFn:v,close:j,prefixCls:k("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},x||(null==N?void 0:N.okText))))};var b=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let y=t.forwardRef((e,o)=>{var c,d;let{prefixCls:u,placement:m="top",trigger:h="click",okType:g="primary",icon:x=t.createElement(l.default,null),children:y,overlayClassName:j,onOpenChange:v,onVisibleChange:w,overlayStyle:_,styles:k,classNames:N}=e,C=b(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:S,className:T,style:I,classNames:E,styles:M}=(0,n.useComponentConfig)("popconfirm"),[O,D]=(0,r.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(d=e.defaultOpen)?d:e.defaultVisible}),A=(e,t)=>{D(e,!0),null==w||w(e),null==v||v(e,t)},P=S("popconfirm",u),B=(0,a.default)(P,T,j,E.root,null==N?void 0:N.root),R=(0,a.default)(E.body,null==N?void 0:N.body),[F]=p(P);return F(t.createElement(i.default,Object.assign({},(0,s.default)(C,["title"]),{trigger:h,placement:m,onOpenChange:(t,l)=>{let{disabled:a=!1}=e;a||A(t,l)},open:O,ref:o,classNames:{root:B,body:R},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},M.root),I),_),null==k?void 0:k.root),body:Object.assign(Object.assign({},M.body),null==k?void 0:k.body)},content:t.createElement(f,Object.assign({okType:g,icon:x},e,{prefixCls:P,close:e=>{A(!1,e)},onConfirm:t=>{var l;return null==(l=e.onConfirm)?void 0:l.call(void 0,t)},onCancel:t=>{var l;A(!1,t),null==(l=e.onCancel)||l.call(void 0,t)}})),"data-popover-inject":!0}),y))});y._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:l,placement:r,className:s,style:i}=e,o=x(e,["prefixCls","placement","className","style"]),{getPrefixCls:c}=t.useContext(n.ConfigContext),d=c("popconfirm",l),[u]=p(d);return u(t.createElement(g.default,{placement:r,className:(0,a.default)(d,s),style:i,content:t.createElement(f,Object.assign({prefixCls:d},o))}))},e.s(["Popconfirm",0,y],883552)},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(914949),r=e.i(404948);let s=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,s],836938);var n=e.i(613541),i=e.i(763731),o=e.i(242064),c=e.i(491816);e.i(793154);var d=e.i(880476),u=e.i(183293),m=e.i(717356),h=e.i(320560),g=e.i(307358),p=e.i(246422),x=e.i(838378),f=e.i(617933);let b=(0,p.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:l}=e,a=(0,x.mergeToken)(e,{popoverBg:t,popoverColor:l});return[(e=>{let{componentCls:t,popoverColor:l,titleMinWidth:a,fontWeightStrong:r,innerPadding:s,boxShadowSecondary:n,colorTextHeading:i,borderRadiusLG:o,zIndexPopup:c,titleMarginBottom:d,colorBgElevated:m,popoverBg:g,titleBorderBottom:p,innerContentPadding:x,titlePadding:f}=e;return[{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:o,boxShadow:n,padding:s},[`${t}-title`]:{minWidth:a,marginBottom:d,color:i,fontWeight:r,borderBottom:p,padding:f},[`${t}-inner-content`]:{color:l,padding:x}})},(0,h.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:f.PresetColors.map(l=>{let a=e[`${l}6`];return{[`&${t}-${l}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:l,fontHeight:a,padding:r,wireframe:s,zIndexPopupBase:n,borderRadiusLG:i,marginXS:o,lineType:c,colorSplit:d,paddingSM:u}=e,m=l-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:n+30},(0,g.getArrowToken)(e)),(0,h.getArrowOffsetToken)({contentRadius:i,limitVerticalRadius:!0})),{innerPadding:12*!s,titleMarginBottom:s?0:o,titlePadding:s?`${m/2}px ${r}px ${m/2-t}px`:0,titleBorderBottom:s?`${t}px ${c} ${d}`:"none",innerContentPadding:s?`${u}px ${r}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var y=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let j=({title:e,content:l,prefixCls:a})=>e||l?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),l&&t.createElement("div",{className:`${a}-inner-content`},l)):null,v=e=>{let{hashId:a,prefixCls:r,className:n,style:i,placement:o="top",title:c,content:u,children:m}=e,h=s(c),g=s(u),p=(0,l.default)(a,r,`${r}-pure`,`${r}-placement-${o}`,n);return t.createElement("div",{className:p,style:i},t.createElement("div",{className:`${r}-arrow`}),t.createElement(d.Popup,Object.assign({},e,{className:a,prefixCls:r}),m||t.createElement(j,{prefixCls:r,title:h,content:g})))},w=e=>{let{prefixCls:a,className:r}=e,s=y(e,["prefixCls","className"]),{getPrefixCls:n}=t.useContext(o.ConfigContext),i=n("popover",a),[c,d,u]=b(i);return c(t.createElement(v,Object.assign({},s,{prefixCls:i,hashId:d,className:(0,l.default)(r,u)})))};e.s(["Overlay",0,j,"default",0,w],310730);var _=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[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])&&(l[a[r]]=e[a[r]]);return l};let k=t.forwardRef((e,d)=>{var u,m;let{prefixCls:h,title:g,content:p,overlayClassName:x,placement:f="top",trigger:y="hover",children:v,mouseEnterDelay:w=.1,mouseLeaveDelay:k=.1,onOpenChange:N,overlayStyle:C={},styles:S,classNames:T}=e,I=_(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:M,style:O,classNames:D,styles:A}=(0,o.useComponentConfig)("popover"),P=E("popover",h),[B,R,F]=b(P),$=E(),L=(0,l.default)(x,R,F,M,D.root,null==T?void 0:T.root),z=(0,l.default)(D.body,null==T?void 0:T.body),[H,V]=(0,a.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),U=(e,t)=>{V(e,!0),null==N||N(e,t)},q=s(g),K=s(p);return B(t.createElement(c.default,Object.assign({placement:f,trigger:y,mouseEnterDelay:w,mouseLeaveDelay:k},I,{prefixCls:P,classNames:{root:L,body:z},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},A.root),O),C),null==S?void 0:S.root),body:Object.assign(Object.assign({},A.body),null==S?void 0:S.body)},ref:d,open:H,onOpenChange:e=>{U(e)},overlay:q||K?t.createElement(j,{prefixCls:P,title:q,content:K}):null,transitionName:(0,n.getTransitionName)($,"zoom-big",I.transitionName),"data-popover-inject":!0}),(0,i.cloneElement)(v,{onKeyDown:e=>{var l,a;(0,t.isValidElement)(v)&&(null==(a=null==v?void 0:(l=v.props).onKeyDown)||a.call(l,e)),e.keyCode===r.default.ESC&&U(!1,e)}})))});k._InternalPanelDoNotUseOrYouWillBeFired=w,e.s(["default",0,k],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},822315,(e,t,l)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",l="minute",a="hour",r="week",s="month",n="quarter",i="year",o="date",c="Invalid Date",d=/^(\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,l){var a=String(e);return!a||a.length>=t?e:""+Array(t+1-a.length).join(l)+e},h="en",g={};g[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"],l=e%100;return"["+e+(t[(l-20)%10]||t[l]||t[0])+"]"}};var p="$isDayjsObject",x=function(e){return e instanceof j||!(!e||!e[p])},f=function e(t,l,a){var r;if(!t)return h;if("string"==typeof t){var s=t.toLowerCase();g[s]&&(r=s),l&&(g[s]=l,r=s);var n=t.split("-");if(!r&&n.length>1)return e(n[0])}else{var i=t.name;g[i]=t,r=i}return!a&&r&&(h=r),r||!a&&h},b=function(e,t){if(x(e))return e.clone();var l="object"==typeof t?t:{};return l.date=e,l.args=arguments,new j(l)},y={s:m,z:function(e){var t=-e.utcOffset(),l=Math.abs(t);return(t<=0?"+":"-")+m(Math.floor(l/60),2,"0")+":"+m(l%60,2,"0")},m:function e(t,l){if(t.date(){"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(115504);function r({className:e="",...r}){var s,n;let i=(0,l.useId)();return s=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===i),l=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==i);t&&l&&(t.currentTime=l.currentTime)},n=[i],(0,l.useLayoutEffect)(s,n),(0,t.jsxs)("svg",{"data-spinner-id":i,className:(0,a.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...r,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>r],571303)},936578,e=>{"use strict";var t=e.i(843476),l=e.i(115504),a=e.i(571303);function r(){return(0,t.jsxs)("div",{className:(0,l.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(a.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>r])},902739,e=>{"use strict";var t=e.i(843476),l=e.i(111672),a=e.i(764205),r=e.i(135214),s=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:n,sidebarCollapsed:i})=>{let{accessToken:o}=(0,r.default)(),[c,d]=(0,s.useState)(null),[u,m]=(0,s.useState)(!1),[h,g]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,b]=(0,s.useState)(!1),[y,j]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(!o)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,a.getUISettings)(o);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),d(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&m(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&x(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&b(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&j(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[o]),(0,t.jsx)(l.default,{setPage:e,defaultSelectedKey:n,collapsed:i,enabledPagesInternalUsers:c,enableProjectsUI:u,disableAgentsForInternalUsers:h,allowAgentsForTeamAdmins:p,disableVectorStoresForInternalUsers:f,allowVectorStoresForTeamAdmins:y})}])},208075,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),r=e.i(629569),s=e.i(599724),n=e.i(779241),i=e.i(994388),o=e.i(275144),c=e.i(764205),d=e.i(727749);e.s(["default",0,({userID:e,userRole:u,accessToken:m})=>{let{logoUrl:h,setLogoUrl:g,faviconUrl:p,setFaviconUrl:x}=(0,o.useTheme)(),[f,b]=(0,l.useState)(""),[y,j]=(0,l.useState)(""),[v,w]=(0,l.useState)(!1);(0,l.useEffect)(()=>{m&&_()},[m]);let _=async()=>{try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",l=await fetch(t,{method:"GET",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();b(e.values?.logo_url||""),j(e.values?.favicon_url||""),g(e.values?.logo_url||null),x(e.values?.favicon_url||null)}}catch(e){console.error("Error fetching theme settings:",e)}},k=async()=>{w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:f||null,favicon_url:y||null})})).ok)d.default.success("Theme settings updated successfully!"),g(f||null),x(y||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating theme settings:",e),d.default.fromBackend("Failed to update theme settings")}finally{w(!1)}},N=async()=>{b(""),j(""),g(null),x(null),w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:null,favicon_url:null})})).ok)d.default.success("Theme settings reset to default!");else throw Error("Failed to reset")}catch(e){console.error("Error resetting theme settings:",e),d.default.fromBackend("Failed to reset theme settings")}finally{w(!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)(r.Title,{className:"text-2xl font-bold mb-2",children:"UI Theme Customization"}),(0,t.jsx)(s.Text,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo and favicon."})]}),(0,t.jsx)(a.Card,{className:"shadow-sm p-6",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,t.jsx)(n.TextInput,{placeholder:"https://example.com/logo.png",value:f,onValueChange:e=>{b(e),g(e||null)},className:"w-full"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty for default"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Favicon URL"}),(0,t.jsx)(n.TextInput,{placeholder:"https://example.com/favicon.ico",value:y,onValueChange:e=>{j(e),x(e||null)},className:"w-full"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500 mt-1",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.jsx)(i.Button,{onClick:k,loading:v,disabled:v,color:"indigo",children:"Save Changes"}),(0,t.jsx)(i.Button,{onClick:N,loading:v,disabled:v,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}])},662316,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(464571),r=e.i(166406),s=e.i(629569),n=e.i(764205),i=e.i(727749);e.s(["default",0,({accessToken:e})=>{let[o,c]=(0,l.useState)(`{ - "model": "openai/gpt-4o", - "messages": [ - { - "role": "system", - "content": "You are a helpful assistant." - }, - { - "role": "user", - "content": "Explain quantum computing in simple terms" - } - ], - "temperature": 0.7, - "max_tokens": 500, - "stream": true -}`),[d,u]=(0,l.useState)(""),[m,h]=(0,l.useState)(!1),g=async()=>{h(!0);try{let r;try{r=JSON.parse(o)}catch(e){i.default.fromBackend("Invalid JSON in request body"),h(!1);return}let s={call_type:"completion",request_body:r};if(!e){i.default.fromBackend("No access token found"),h(!1);return}let c=await (0,n.transformRequestCall)(e,s);if(c.raw_request_api_base&&c.raw_request_body){var t,l,a;let e,r,s=(t=c.raw_request_api_base,l=c.raw_request_body,a=c.raw_request_headers||{},e=JSON.stringify(l,null,2).split("\n").map(e=>` ${e}`).join("\n"),r=Object.entries(a).map(([e,t])=>`-H '${e}: ${t}'`).join(" \\\n "),`curl -X POST \\ - ${t} \\ - ${r?`${r} \\ - `:""}-H 'Content-Type: application/json' \\ - -d '{ -${e} - }'`);u(s),i.default.success("Request transformed successfully")}else{let e="string"==typeof c?c:JSON.stringify(c);u(e),i.default.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),i.default.fromBackend("Failed to transform request")}finally{h(!1)}};return(0,t.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,t.jsx)(s.Title,{children:"Playground"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"See how LiteLLM transforms your request for the specified provider."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"16px",width:"100%",minWidth:0,overflow:"hidden"},className:"mt-4",children:[(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"600px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Original Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"The request you would send to LiteLLM /chat/completions endpoint."})]}),(0,t.jsx)("textarea",{style:{flex:"1 1 auto",width:"100%",minHeight:"240px",padding:"16px",border:"1px solid #e8e8e8",borderRadius:"6px",fontFamily:"monospace",fontSize:"14px",resize:"none",marginBottom:"24px",overflow:"auto"},value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),g())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,t.jsxs)(a.Button,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:g,loading:m,children:[(0,t.jsx)("span",{children:"Transform"}),(0,t.jsx)("span",{children:"→"})]})})]}),(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"800px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Transformed Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"How LiteLLM transforms your request for the specified provider."}),(0,t.jsx)("br",{}),(0,t.jsx)("p",{style:{color:"#666",margin:0},className:"text-xs",children:"Note: Sensitive headers are not shown."})]}),(0,t.jsxs)("div",{style:{position:"relative",backgroundColor:"#f5f5f5",borderRadius:"6px",flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsx)("pre",{style:{padding:"16px",fontFamily:"monospace",fontSize:"14px",margin:0,overflow:"auto",flex:"1 1 auto"},children:d||`curl -X POST \\ - https://api.openai.com/v1/chat/completions \\ - -H 'Authorization: Bearer sk-xxx' \\ - -H 'Content-Type: application/json' \\ - -d '{ - "model": "gpt-4", - "messages": [ - { - "role": "system", - "content": "You are a helpful assistant." - } - ], - "temperature": 0.7 - }'`}),(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(r.CopyOutlined,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(d||""),i.default.success("Copied to clipboard")}})]})]})]}),(0,t.jsx)("div",{className:"mt-4 text-right w-full",children:(0,t.jsxs)("p",{className:"text-sm text-gray-500",children:["Found an error? File an issue"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})]})}])},673709,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(678784);let r=(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 s=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:i})=>{let[o,c]=(0,l.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:o?(0,t.jsx)(a.CheckIcon,{size:16}):(0,t.jsx)(r,{size:16})}),(0,t.jsx)(s.Prism,{language:i,style:n,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],673709)},778917,e=>{"use strict";var t=e.i(546467);e.s(["ExternalLink",()=>t.default])},646050,e=>{"use strict";var t=e.i(843476),l=e.i(994388),a=e.i(304967),r=e.i(197647),s=e.i(653824),n=e.i(269200),i=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),m=e.i(881073),h=e.i(404206),g=e.i(723731),p=e.i(599724),x=e.i(271645),f=e.i(650056),b=e.i(127952),y=e.i(902555),j=e.i(727749),v=e.i(266027),w=e.i(954616),_=e.i(912598),k=e.i(243652),N=e.i(764205),C=e.i(135214);let S=(0,k.createQueryKeys)("budgets");var T=e.i(779241),I=e.i(677667),E=e.i(898667),M=e.i(130643),O=e.i(464571),D=e.i(212931),A=e.i(808613),P=e.i(28651),B=e.i(199133);let R=({isModalVisible:e,setIsModalVisible:l})=>{let[a]=A.Form.useForm(),r=(()=>{let{accessToken:e}=(0,C.default)(),t=(0,_.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,N.budgetCreateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),s=async e=>{try{j.default.info("Making API Call"),await r.mutateAsync(e),j.default.success("Budget Created"),a.resetFields(),l(!1)}catch(e){console.error("Error creating the budget:",e),j.default.fromBackend(`Error creating the budget: ${e}`)}};return(0,t.jsx)(D.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),a.resetFields()},onCancel:()=>{l(!1),a.resetFields()},children:(0,t.jsxs)(A.Form,{form:a,onFinish:s,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,t.jsx)(T.TextInput,{placeholder:""})}),(0,t.jsx)(A.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(P.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(A.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(P.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(I.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(M.AccordionBody,{children:[(0,t.jsx)(A.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(P.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(A.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(B.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(B.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(B.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(B.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(O.Button,{htmlType:"submit",children:"Create Budget"})})]})})},F=({isModalVisible:e,setIsModalVisible:l,existingBudget:a})=>{let[r]=A.Form.useForm(),s=(()=>{let{accessToken:e}=(0,C.default)(),t=(0,_.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,N.budgetUpdateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})();(0,x.useEffect)(()=>{r.setFieldsValue(a)},[a,r]);let n=async e=>{try{j.default.info("Making API Call"),await s.mutateAsync(e),j.default.success("Budget Updated"),r.resetFields(),l(!1)}catch(e){console.error("Error updating the budget:",e),j.default.fromBackend(`Error updating the budget: ${e}`)}};return(0,t.jsx)(D.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),r.resetFields()},onCancel:()=>{l(!1),r.resetFields()},children:(0,t.jsxs)(A.Form,{form:r,onFinish:n,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:a,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Form.Item,{label:"Budget ID",name:"budget_id",help:"Budget ID cannot be changed after creation",children:(0,t.jsx)(T.TextInput,{placeholder:"",disabled:!0})}),(0,t.jsx)(A.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(P.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(A.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(P.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(I.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(M.AccordionBody,{children:[(0,t.jsx)(A.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(P.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(A.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(B.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(B.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(B.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(B.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(O.Button,{htmlType:"submit",children:"Save"})})]})})},$=` -curl -X POST --location '/end_user/new' \\ - --H 'Authorization: Bearer ' \\ - --H 'Content-Type: application/json' \\ - --d '{"user_id": "my-customer-id', "budget_id": ""}' # 👈 KEY CHANGE - -`,L=` -curl -X POST --location '/chat/completions' \\ - --H 'Authorization: Bearer ' \\ - --H 'Content-Type: application/json' \\ - --d '{ - "model": "gpt-3.5-turbo', - "messages":[{"role": "user", "content": "Hey, how's it going?"}], - "user": "my-customer-id" -}' # 👈 KEY CHANGE - -`,z=`from openai import OpenAI -client = OpenAI( - base_url="", - api_key="" -) - -completion = client.chat.completions.create( - model="gpt-3.5-turbo", - messages=[ - {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Hello!"} - ], - user="my-customer-id" -) - -print(completion.choices[0].message)`;e.s(["default",0,({accessToken:e})=>{let[k,T]=(0,x.useState)(!1),[I,E]=(0,x.useState)(!1),[M,O]=(0,x.useState)(null),[D,A]=(0,x.useState)(!1),{data:P=[]}=(()=>{let{accessToken:e}=(0,C.default)();return(0,v.useQuery)({queryKey:S.list({}),queryFn:async()=>(await (0,N.getBudgetList)(e)??[]).filter(e=>null!=e),enabled:!!e})})(),B=(()=>{let{accessToken:e}=(0,C.default)(),t=(0,_.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,N.budgetDeleteCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),H=async t=>{null!=e&&(O(t),E(!0))},V=async()=>{if(M&&null!=e)try{await B.mutateAsync(M.budget_id),j.default.success("Budget deleted.")}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{A(!1),O(null)}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(l.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>T(!0),children:"+ Create Budget"}),(0,t.jsxs)(s.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Budgets"}),(0,t.jsx)(r.Tab,{children:"Examples"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(R,{isModalVisible:k,setIsModalVisible:T}),M&&(0,t.jsx)(F,{isModalVisible:I,setIsModalVisible:E,existingBudget:M}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(p.Text,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(n.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"Budget ID"}),(0,t.jsx)(d.TableHeaderCell,{children:"Max Budget"}),(0,t.jsx)(d.TableHeaderCell,{children:"TPM"}),(0,t.jsx)(d.TableHeaderCell,{children:"RPM"})]})}),(0,t.jsx)(i.TableBody,{children:P.slice().sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()).map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e.budget_id}),(0,t.jsx)(o.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(y.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>H(e),dataTestId:"edit-budget-button"}),(0,t.jsx)(y.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{O(e),A(!0)},dataTestId:"delete-budget-button"})]},e.budget_id))})]})]}),(0,t.jsx)(b.default,{isOpen:D,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:M?.budget_id,code:!0},{label:"Max Budget",value:M?.max_budget},{label:"TPM",value:M?.tpm_limit},{label:"RPM",value:M?.rpm_limit}],onCancel:()=>{A(!1)},onOk:V,confirmLoading:B.isPending})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(p.Text,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(s.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Assign Budget to Customer"}),(0,t.jsx)(r.Tab,{children:"Test it (Curl)"}),(0,t.jsx)(r.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:$})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:L})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"python",children:z})})]})]})]})})]})]})]})}],646050)},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,t)=>(e[t.team_id]=t.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,t)=>{let l=t.find(t=>t.team_id===e);return l?l.team_alias:null}])},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["GlobalOutlined",0,s],160818)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["MinusCircleOutlined",0,s],564897)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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 r=e.i(9583),s=l.forwardRef(function(e,s){return l.createElement(r.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["SaveOutlined",0,s],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,r,s)=>{let n;n="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,r?.organization_id||null,l):await (0,t.teamListCall)(e,r?.organization_id||null),console.log(`givenTeams: ${n}`),s(n)};e.s(["fetchTeams",0,l])},747871,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(269200),r=e.i(942232),s=e.i(977572),n=e.i(427612),i=e.i(64848),o=e.i(496020),c=e.i(304967),d=e.i(994388),u=e.i(599724),m=e.i(389083),h=e.i(764205),g=e.i(727749);e.s(["default",0,({accessToken:e,userID:p})=>{let[x,f]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{if(e&&p)try{let t=await (0,h.availableTeamListCall)(e);f(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,p]);let b=async t=>{if(e&&p)try{await (0,h.teamMemberAddCall)(e,t,{user_id:p,role:"user"}),g.default.success("Successfully joined team"),f(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),g.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(n.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(i.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(i.TableHeaderCell,{children:"Description"}),(0,t.jsx)(i.TableHeaderCell,{children:"Members"}),(0,t.jsx)(i.TableHeaderCell,{children:"Models"}),(0,t.jsx)(i.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(r.TableBody,{children:[x.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Text,{children:e.team_alias})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(u.Text,{children:e.description||"No description available"})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsxs)(u.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,l)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(u.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},l)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(u.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Button,{size:"xs",variant:"secondary",onClick:()=>b(e.team_id),children:"Join Team"})})]},e.team_id)),0===x.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(s.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(u.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])},468133,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(175712),r=e.i(464571),s=e.i(28651),n=e.i(898586),i=e.i(482725),o=e.i(199133),c=e.i(262218),d=e.i(621192),u=e.i(178654),m=e.i(751904),h=e.i(987432),g=e.i(764205),p=e.i(860585),x=e.i(355619),f=e.i(727749),b=e.i(162386);let{Title:y,Text:j}=n.Typography,v=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],w=({label:e,description:l,isEditing:a,viewContent:r,editContent:s})=>(0,t.jsxs)(d.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(u.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:l})]}),(0,t.jsx)(u.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:a?s:r})})]}),_=()=>(0,t.jsx)(j,{className:"text-gray-400 italic",children:"Not set"}),k=(e,l)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:l?l(e):e},e))}):(0,t.jsx)(_,{}),N={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[n,d]=(0,l.useState)(!0),[u,C]=(0,l.useState)(N),[S,T]=(0,l.useState)(!1),[I,E]=(0,l.useState)(N),[M,O]=(0,l.useState)(!1),[D,A]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(!e)return d(!1);try{let t=await (0,g.getDefaultTeamSettings)(e),l={...N,...t.values||{}};C(l),E(l)}catch(e){console.error("Error fetching team SSO settings:",e),A(!0),f.default.fromBackend("Failed to fetch team settings")}finally{d(!1)}})()},[e]);let P=async()=>{if(e){O(!0);try{let t=await (0,g.updateDefaultTeamSettings)(e,I),l={...N,...t.settings||{}};C(l),E(l),T(!1),f.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),f.default.fromBackend("Failed to update team settings")}finally{O(!1)}}},B=(e,t)=>{E(l=>({...l,[e]:t}))};return n?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(i.Spin,{size:"large"})}):D?(0,t.jsx)(a.Card,{children:(0,t.jsx)(j,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(a.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(y,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(j,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:S?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(r.Button,{onClick:()=>{T(!1),E(u)},disabled:M,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"primary",onClick:P,loading:M,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(r.Button,{onClick:()=>T(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:S,viewContent:null!=u.max_budget?(0,t.jsxs)(j,{children:["$",Number(u.max_budget).toLocaleString()]}):(0,t.jsx)(_,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:I.max_budget,onChange:e=>B("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(w,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:S,viewContent:u.budget_duration?(0,t.jsx)(j,{children:(0,p.getBudgetDurationLabel)(u.budget_duration)}):(0,t.jsx)(_,{}),editContent:(0,t.jsx)(p.default,{value:I.budget_duration||null,onChange:e=>B("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(w,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:S,viewContent:null!=u.tpm_limit?(0,t.jsx)(j,{children:u.tpm_limit.toLocaleString()}):(0,t.jsx)(_,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:I.tpm_limit,onChange:e=>B("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(w,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:S,viewContent:null!=u.rpm_limit?(0,t.jsx)(j,{children:u.rpm_limit.toLocaleString()}):(0,t.jsx)(_,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:I.rpm_limit,onChange:e=>B("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Models",description:"Default list of models that new teams can access.",isEditing:S,viewContent:k(u.models,x.getModelDisplayName),editContent:(0,t.jsx)(b.ModelSelect,{value:I.models||[],onChange:e=>B("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(w,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:S,viewContent:k(u.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:I.team_member_permissions||[],onChange:e=>B("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:l,onClose:a})=>(0,t.jsx)(c.Tag,{color:"blue",closable:l,onClose:a,className:"mr-1 mt-1 mb-1",children:e}),children:v.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},345244,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(752978),r=e.i(994388),s=e.i(309426),n=e.i(599724),i=e.i(350967),o=e.i(278587),c=e.i(304967),d=e.i(629569),u=e.i(389083),m=e.i(677667),h=e.i(898667),g=e.i(130643),p=e.i(808613),x=e.i(311451),f=e.i(199133),b=e.i(592968),y=e.i(827252),j=e.i(702597),v=e.i(355619),w=e.i(764205),_=e.i(727749),k=e.i(435451),N=e.i(860585),C=e.i(500330),S=e.i(678784),T=e.i(118366),I=e.i(464571);let E=({tagId:e,onClose:a,accessToken:s,is_admin:i,editTag:o})=>{let[E]=p.Form.useForm(),[M,O]=(0,l.useState)(null),[D,A]=(0,l.useState)(o),[P,B]=(0,l.useState)([]),[R,F]=(0,l.useState)({}),$=async(e,t)=>{await (0,C.copyToClipboard)(e)&&(F(e=>({...e,[t]:!0})),setTimeout(()=>{F(e=>({...e,[t]:!1}))},2e3))},L=async()=>{if(s)try{let t=(await (0,w.tagInfoCall)(s,[e]))[e];t&&(O(t),o&&E.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),_.default.fromBackend("Error fetching tag details: "+e)}};(0,l.useEffect)(()=>{L()},[e,s]),(0,l.useEffect)(()=>{s&&(0,j.fetchUserModels)("dummy-user","Admin",s,B)},[s]);let z=async e=>{if(s)try{await (0,w.tagUpdateCall)(s,{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}),_.default.success("Tag updated successfully"),A(!1),L()}catch(e){console.error("Error updating tag:",e),_.default.fromBackend("Error updating tag: "+e)}};return M?(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)(r.Button,{onClick:a,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 text-sm border border-gray-200",children:M.name}),(0,t.jsx)(I.Button,{type:"text",size:"small",icon:R["tag-name"]?(0,t.jsx)(S.CheckIcon,{size:12}):(0,t.jsx)(T.CopyIcon,{size:12}),onClick:()=>$(M.name,"tag-name"),className:`transition-all duration-200 ${R["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:M.description||"No description"})]}),i&&!D&&(0,t.jsx)(r.Button,{onClick:()=>A(!0),children:"Edit Tag"})]}),D?(0,t.jsx)(c.Card,{children:(0,t.jsxs)(p.Form,{form:E,onFinish:z,layout:"vertical",initialValues:M,children:[(0,t.jsx)(p.Form.Item,{label:"Tag Name",name:"name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(x.Input,{className:"rounded-md border-gray-300"})}),(0,t.jsx)(p.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(x.Input.TextArea,{rows:4})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process this type of data",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:P.map(e=>(0,t.jsx)(f.Select.Option,{value:e,children:(0,v.getModelDisplayName)(e)},e))})}),(0,t.jsxs)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(k.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(N.default,{onChange:e=>E.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)(r.Button,{onClick:()=>A(!1),children:"Cancel"}),(0,t.jsx)(r.Button,{type:"submit",children:"Save Changes"})]})]})}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.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:M.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Text,{className:"font-medium",children:"Description"}),(0,t.jsx)(n.Text,{children:M.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:M.models&&0!==M.models.length?M.models.map(e=>(0,t.jsx)(u.Badge,{color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:M.model_info?.[e]||e})},e)):(0,t.jsx)(u.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:M.created_at?new Date(M.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:M.updated_at?new Date(M.updated_at).toLocaleString():"-"})]})]})]}),M.litellm_budget_table&&(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.Title,{children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[void 0!==M.litellm_budget_table.max_budget&&null!==M.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:["$",M.litellm_budget_table.max_budget]})]}),M.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:M.litellm_budget_table.budget_duration})]}),void 0!==M.litellm_budget_table.tpm_limit&&null!==M.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:M.litellm_budget_table.tpm_limit.toLocaleString()})]}),void 0!==M.litellm_budget_table.rpm_limit&&null!==M.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:M.litellm_budget_table.rpm_limit.toLocaleString()})]})]})]})]})]}):(0,t.jsx)("div",{children:"Loading..."})};var M=e.i(871943),O=e.i(360820),D=e.i(591935),A=e.i(94629),P=e.i(68155),B=e.i(152990),R=e.i(682830),F=e.i(269200),$=e.i(942232),L=e.i(977572),z=e.i(427612),H=e.i(64848),V=e.i(496020);let U="This is just a spend tag that was passed dynamically in a request. It does not control any LLM models.",q=({data:e,onEdit:s,onDelete:i,onSelectTag:o})=>{let[c,d]=l.default.useState([{id:"created_at",desc:!0}]),m=[{header:"Tag Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,a=l.description===U;return(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(b.Tooltip,{title:a?"You cannot view the information of a dynamically generated spend tag":l.name,children:(0,t.jsx)(r.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5",onClick:()=>o(l.name),disabled:a,children:l.name})})})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(b.Tooltip,{title:l.description,children:(0,t.jsx)("span",{className:"text-xs",children:l.description||"-"})})}},{header:"Allowed Models",accessorKey:"models",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:l?.models?.length===0?(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"red",children:"All Models"}):l?.models?.map(e=>(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:(0,t.jsx)(n.Text,{children:l.model_info?.[e]||e})})},e))})}},{header:"Created",accessorKey:"created_at",sortingFn:"datetime",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("span",{className:"text-xs",children:new Date(l.created_at).toLocaleDateString()})}},{id:"actions",header:"Actions",cell:({row:e})=>{let l=e.original,r=l.description===U;return(0,t.jsxs)("div",{className:"flex space-x-2",children:[r?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be edited",children:(0,t.jsx)(a.Icon,{icon:D.PencilAltIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Edit tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Edit tag",children:(0,t.jsx)(a.Icon,{icon:D.PencilAltIcon,size:"sm",onClick:()=>s(l),className:"cursor-pointer hover:text-blue-500"})}),r?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be deleted",children:(0,t.jsx)(a.Icon,{icon:P.TrashIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Delete tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Delete tag",children:(0,t.jsx)(a.Icon,{icon:P.TrashIcon,size:"sm",onClick:()=>i(l.name),className:"cursor-pointer hover:text-red-500"})})]})}}],h=(0,B.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:d,getCoreRowModel:(0,R.getCoreRowModel)(),getSortedRowModel:(0,R.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(F.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(z.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(V.TableRow,{children:e.headers.map(e=>(0,t.jsx)(H.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,B.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(O.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(M.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(A.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)($.TableBody,{children:h.getRowModel().rows.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(V.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(L.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,B.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(V.TableRow,{children:(0,t.jsx)(L.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No tags found"})})})})})]})})})};var K=e.i(779241),W=e.i(212931);let G=({visible:e,onCancel:l,onSubmit:a,availableModels:s})=>{let[n]=p.Form.useForm();return(0,t.jsx)(W.Modal,{title:"Create New Tag",open:e,width:800,footer:null,onCancel:()=>{n.resetFields(),l()},children:(0,t.jsxs)(p.Form,{form:n,onFinish:e=>{a(e),n.resetFields()},labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(p.Form.Item,{label:"Tag Name",name:"tag_name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(p.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(x.Input.TextArea,{rows:4})}),(0,t.jsx)(p.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process requests from this tag",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_llms",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:s.map(e=>(0,t.jsx)(f.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)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits (Optional)"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(p.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend. When reached, requests with this tag will be blocked",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(k.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(p.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(N.default,{onChange:e=>n.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)(r.Button,{type:"submit",children:"Create Tag"})})]})})};e.s(["default",0,({accessToken:e,userID:c,userRole:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1),[p,x]=(0,l.useState)(null),[f,b]=(0,l.useState)(!1),[y,j]=(0,l.useState)(!1),[v,k]=(0,l.useState)(null),[N,C]=(0,l.useState)(""),[S,T]=(0,l.useState)([]),I=async()=>{if(e)try{let t=await (0,w.tagListCall)(e);console.log("List tags response:",t),m(Object.values(t))}catch(e){console.error("Error fetching tags:",e),_.default.fromBackend("Error fetching tags: "+e)}},M=async t=>{if(e)try{await (0,w.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}),_.default.success("Tag created successfully"),g(!1),I()}catch(e){console.error("Error creating tag:",e),_.default.fromBackend("Error creating tag: "+e)}},O=async e=>{k(e),j(!0)},D=async()=>{if(e&&v){try{await (0,w.tagDeleteCall)(e,v),_.default.success("Tag deleted successfully"),I()}catch(e){console.error("Error deleting tag:",e),_.default.fromBackend("Error deleting tag: "+e)}j(!1),k(null)}};return(0,l.useEffect)(()=>{c&&d&&e&&(async()=>{try{let t=await (0,w.modelInfoCall)(e,c,d);t&&t.data&&T(t.data)}catch(e){console.error("Error fetching models:",e),_.default.fromBackend("Error fetching models: "+e)}})()},[e,c,d]),(0,l.useEffect)(()=>{I()},[e]),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:p?(0,t.jsx)(E,{tagId:p,onClose:()=>{x(null),b(!1)},accessToken:e,is_admin:"Admin"===d,editTag:f}):(0,t.jsxs)("div",{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between mt-2 w-full items-center mb-4",children:[(0,t.jsx)("h1",{children:"Tag Management"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[N&&(0,t.jsxs)(n.Text,{children:["Last Refreshed: ",N]}),(0,t.jsx)(a.Icon,{icon:o.RefreshIcon,variant:"shadow",size:"xs",className:"self-center cursor-pointer",onClick:()=>{I(),C(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(n.Text,{className:"mb-4",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)(r.Button,{className:"mb-4",onClick:()=>g(!0),children:"+ Create New Tag"}),(0,t.jsx)(i.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,t.jsx)(s.Col,{numColSpan:1,children:(0,t.jsx)(q,{data:u,onEdit:e=>{x(e.name),b(!0)},onDelete:O,onSelectTag:x})})}),(0,t.jsx)(G,{visible:h,onCancel:()=>g(!1),onSubmit:M,availableModels:S}),y&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Tag"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this tag?"})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(r.Button,{onClick:D,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(r.Button,{onClick:()=>{j(!1),k(null)},children:"Cancel"})]})]})]})})]})})}],345244)},735042,e=>{"use strict";e.i(247167);var t=e.i(843476),l=e.i(584935),a=e.i(290571),r=e.i(271645),s=e.i(95779),n=e.i(444755),i=e.i(673706);let o=(0,i.makeClassName)("BarList");function c(e,t){let{data:l=[],color:c,valueFormatter:d=i.defaultValueFormatter,showAnimation:u=!1,onValueChange:m,sortOrder:h="descending",className:g}=e,p=(0,a.__rest)(e,["data","color","valueFormatter","showAnimation","onValueChange","sortOrder","className"]),x=m?"button":"div",f=r.default.useMemo(()=>"none"===h?l:[...l].sort((e,t)=>"ascending"===h?e.value-t.value:t.value-e.value),[l,h]),b=r.default.useMemo(()=>{let e=Math.max(...f.map(e=>e.value),0);return f.map(t=>0===t.value?0:Math.max(t.value/e*100,2))},[f]);return r.default.createElement("div",Object.assign({ref:t,className:(0,n.tremorTwMerge)(o("root"),"flex justify-between space-x-6",g),"aria-sort":h},p),r.default.createElement("div",{className:(0,n.tremorTwMerge)(o("bars"),"relative w-full space-y-1.5")},f.map((e,t)=>{var l,a,d;let h=e.icon;return r.default.createElement(x,{key:null!=(l=e.key)?l:t,onClick:()=>{null==m||m(e)},className:(0,n.tremorTwMerge)(o("bar"),"group w-full flex items-center rounded-tremor-small",m?["cursor-pointer","hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-subtle/40"]:"")},r.default.createElement("div",{className:(0,n.tremorTwMerge)("flex items-center rounded transition-all bg-opacity-40","h-8",e.color||c?[(0,i.getColorClassNames)(null!=(a=e.color)?a:c,s.colorPalette.background).bgColor,m?"group-hover:bg-opacity-30":""]:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle/60",!m||e.color||c?"":"group-hover:bg-tremor-brand-subtle/30 group-hover:dark:bg-dark-tremor-brand-subtle/70",t===f.length-1?"mb-0":"",u?"duration-500":""),style:{width:`${b[t]}%`,transition:u?"all 1s":""}},r.default.createElement("div",{className:(0,n.tremorTwMerge)("absolute left-2 pr-4 flex max-w-full")},h?r.default.createElement(h,{className:(0,n.tremorTwMerge)(o("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?r.default.createElement("a",{href:e.href,target:null!=(d=e.target)?d:"_blank",rel:"noreferrer",className:(0,n.tremorTwMerge)(o("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default",m?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:e=>e.stopPropagation()},e.name):r.default.createElement("p",{className:(0,n.tremorTwMerge)(o("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name))))})),r.default.createElement("div",{className:o("labels")},f.map((e,t)=>{var l;return r.default.createElement("div",{key:null!=(l=e.key)?l:t,className:(0,n.tremorTwMerge)(o("labelWrapper"),"flex justify-end items-center","h-8",t===f.length-1?"mb-0":"mb-1.5")},r.default.createElement("p",{className:(0,n.tremorTwMerge)(o("labelText"),"whitespace-nowrap leading-none truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},d(e.value)))})))}c.displayName="BarList";let d=r.default.forwardRef(c);var u=e.i(304967),m=e.i(629569),h=e.i(269200),g=e.i(427612),p=e.i(64848),x=e.i(496020),f=e.i(977572),b=e.i(942232),y=e.i(37091),j=e.i(617802),v=e.i(144267),w=e.i(350967),_=e.i(309426),k=e.i(599724),N=e.i(404206),C=e.i(723731),S=e.i(653824),T=e.i(881073),I=e.i(197647),E=e.i(206929),M=e.i(35983),O=e.i(413990),D=e.i(476961),A=e.i(994388),P=e.i(621642),B=e.i(25080),R=e.i(764205),F=e.i(1023),$=e.i(500330);console.log("process.env.NODE_ENV","production");let L=e=>null!==e&&("Admin"===e||"Admin Viewer"===e);e.s(["default",0,({accessToken:e,token:a,userRole:s,userID:n,keys:i,premiumUser:o})=>{let c=new Date,[z,H]=(0,r.useState)([]),[V,U]=(0,r.useState)([]),[q,K]=(0,r.useState)([]),[W,G]=(0,r.useState)([]),[Y,J]=(0,r.useState)([]),[Q,X]=(0,r.useState)([]),[Z,ee]=(0,r.useState)([]),[et,el]=(0,r.useState)([]),[ea,er]=(0,r.useState)([]),[es,en]=(0,r.useState)([]),[ei,eo]=(0,r.useState)({}),[ec,ed]=(0,r.useState)([]),[eu,em]=(0,r.useState)(""),[eh,eg]=(0,r.useState)(["all-tags"]),[ep,ex]=(0,r.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[ef,eb]=(0,r.useState)(null),[ey,ej]=(0,r.useState)(0),ev=new Date(c.getFullYear(),c.getMonth(),1),ew=new Date(c.getFullYear(),c.getMonth()+1,0),e_=eI(ev),ek=eI(ew);function eN(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}console.log("keys in usage",i),console.log("premium user in usage",o);let eC=async()=>{if(e)try{let t=await (0,R.getProxyUISettings)(e);return console.log("usage tab: proxy_settings",t),t}catch(e){console.error("Error fetching proxy settings:",e)}};(0,r.useEffect)(()=>{eT(ep.from,ep.to)},[ep,eh]);let eS=async(t,l,a)=>{if(!t||!l||!e)return;console.log("uiSelectedKey",a);let r=await (0,R.adminTopEndUsersCall)(e,a,t.toISOString(),l.toISOString());console.log("End user data updated successfully",r),G(r)},eT=async(t,l)=>{if(!t||!l||!e)return;let a=await eC();a?.DISABLE_EXPENSIVE_DB_QUERIES||(X((await (0,R.tagsSpendLogsCall)(e,t.toISOString(),l.toISOString(),0===eh.length?void 0:eh)).spend_per_tag),console.log("Tag spend data updated successfully"))};function eI(e){let t=e.getFullYear(),l=e.getMonth()+1,a=e.getDate();return`${t}-${l<10?"0"+l:l}-${a<10?"0"+a:a}`}console.log(`Start date is ${e_}`),console.log(`End date is ${ek}`);let eE=async(e,t,l)=>{try{let l=await e();t(l)}catch(e){console.error(l,e)}},eM=(e,t,l,a)=>{let r=[],s=new Date(t),n=new Map(e.map(e=>{let t=(e=>{if(e.includes("-"))return e;{let[t,l]=e.split(" ");return new Date(new Date().getFullYear(),new Date(`${t} 01 2024`).getMonth(),parseInt(l)).toISOString().split("T")[0]}})(e.date);return[t,{...e,date:t}]}));for(;s<=l;){let e=s.toISOString().split("T")[0];if(n.has(e))r.push(n.get(e));else{let t={date:e,api_requests:0,total_tokens:0};a.forEach(e=>{t[e]||(t[e]=0)}),r.push(t)}s.setDate(s.getDate()+1)}return r},eO=async()=>{if(e)try{let t=await (0,R.adminSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=eM(t,a,r,[]),n=Number(s.reduce((e,t)=>e+(t.spend||0),0).toFixed(2));ej(n),H(s)}catch(e){console.error("Error fetching overall spend:",e)}},eD=async()=>{e&&await eE(async()=>(await (0,R.adminTopKeysCall)(e)).map(e=>({key:e.api_key.substring(0,10),api_key:e.api_key,key_alias:e.key_alias,spend:Number(e.total_spend.toFixed(2))})),U,"Error fetching top keys")},eA=async()=>{e&&await eE(async()=>(await (0,R.adminTopModelsCall)(e)).map(e=>({key:e.model,spend:(0,$.formatNumberWithCommas)(e.total_spend,2)})),K,"Error fetching top models")},eP=async()=>{e&&await eE(async()=>{let t=await (0,R.teamSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0);return J(eM(t.daily_spend,a,r,t.teams)),el(t.teams),t.total_spend_per_team.map(e=>({name:e.team_id||"",value:(0,$.formatNumberWithCommas)(e.total_spend||0,2)}))},er,"Error fetching team spend")},eB=async()=>{if(e)try{let t=await (0,R.adminGlobalActivity)(e,e_,ek),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=eM(t.daily_data||[],a,r,["api_requests","total_tokens"]);eo({...t,daily_data:s})}catch(e){console.error("Error fetching global activity:",e)}},eR=async()=>{if(e)try{let t=await (0,R.adminGlobalActivityPerModel)(e,e_,ek),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),r=new Date(l.getFullYear(),l.getMonth()+1,0),s=t.map(e=>({...e,daily_data:eM(e.daily_data||[],a,r,["api_requests","total_tokens"])}));ed(s)}catch(e){console.error("Error fetching global activity per model:",e)}};return((0,r.useEffect)(()=>{(async()=>{if(e&&a&&s&&n){let t=await eC();!(t&&(eb(t),t?.DISABLE_EXPENSIVE_DB_QUERIES))&&(console.log("fetching data - valiue of proxySettings",ef),eO(),eE(()=>e&&a?(0,R.adminspendByProvider)(e,a,e_,ek):Promise.reject("No access token or token"),en,"Error fetching provider spend"),eD(),eA(),eB(),eR(),L(s)&&(eP(),e&&eE(async()=>(await (0,R.allTagNamesCall)(e)).tag_names,ee,"Error fetching tag names"),e&&eE(()=>(0,R.tagsSpendLogsCall)(e,ep.from?.toISOString(),ep.to?.toISOString(),void 0),e=>X(e.spend_per_tag),"Error fetching top tags"),e&&eE(()=>(0,R.adminTopEndUsersCall)(e,null,void 0,void 0),G,"Error fetching top end users")))}})()},[e,a,s,n,e_,ek]),ef?.DISABLE_EXPENSIVE_DB_QUERIES)?(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Database Query Limit Reached"}),(0,t.jsxs)(k.Text,{className:"mt-4",children:["SpendLogs in DB has ",ef.NUM_SPEND_LOGS_ROWS," rows.",(0,t.jsx)("br",{}),"Please follow our guide to view usage when SpendLogs has more than 1M rows."]}),(0,t.jsx)(A.Button,{className:"mt-4",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/spending_monitoring",target:"_blank",children:"View Usage Guide"})})]})}):(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{className:"mt-2",children:[(0,t.jsx)(I.Tab,{children:"All Up"}),L(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.Tab,{children:"Team Based Usage"}),(0,t.jsx)(I.Tab,{children:"Customer Usage"}),(0,t.jsx)(I.Tab,{children:"Tag Based Usage"})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{})})]}),(0,t.jsxs)(C.TabPanels,{children:[(0,t.jsx)(N.TabPanel,{children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(I.Tab,{children:"Cost"}),(0,t.jsx)(I.Tab,{children:"Activity"})]}),(0,t.jsxs)(C.TabPanels,{children:[(0,t.jsx)(N.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[100vh] w-full",children:[(0,t.jsxs)(_.Col,{numColSpan:2,children:[(0,t.jsxs)(k.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content mb-2 mt-2 text-lg",children:["Project Spend ",new Date().toLocaleString("default",{month:"long"})," 1 -"," ",new Date(new Date().getFullYear(),new Date().getMonth()+1,0).getDate()]}),(0,t.jsx)(j.default,{userSpend:ey,selectedTeam:null,userMaxBudget:null})]}),(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Monthly Spend"}),(0,t.jsx)(l.BarChart,{data:z,index:"date",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$ ${(0,$.formatNumberWithCommas)(e,2)}`,yAxisWidth:100,tickGap:5})]})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(F.default,{topKeys:V,teams:null,topKeysLimit:5,setTopKeysLimit:()=>{}})]})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Models"}),(0,t.jsx)(l.BarChart,{className:"mt-4 h-40",data:q,index:"key",categories:["spend"],colors:["cyan"],yAxisWidth:200,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>`$${(0,$.formatNumberWithCommas)(e,2)}`})]})}),(0,t.jsx)(_.Col,{numColSpan:1}),(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Spend by Provider"}),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsx)(O.DonutChart,{className:"mt-4 h-40",variant:"pie",data:es,index:"provider",category:"spend",colors:["cyan"],valueFormatter:e=>`$${(0,$.formatNumberWithCommas)(e,2)}`})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend"})]})}),(0,t.jsx)(b.TableBody,{children:es.map(e=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.provider}),(0,t.jsx)(f.TableCell,{children:1e-5>parseFloat(e.spend.toFixed(2))?"less than 0.00":(0,$.formatNumberWithCommas)(e.spend,2)})]},e.provider))})]})})]})})]})})]})}),(0,t.jsx)(N.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:1,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"All Up"}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",eN(ei.sum_api_requests)]}),(0,t.jsx)(D.AreaChart,{className:"h-40",data:ei.daily_data,valueFormatter:eN,index:"date",colors:["cyan"],categories:["api_requests"],onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",eN(ei.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:ei.daily_data,valueFormatter:eN,index:"date",colors:["cyan"],categories:["total_tokens"],onValueChange:e=>console.log(e)})]})]})]}),(0,t.jsx)(t.Fragment,{children:ec.map((e,a)=>(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:e.model}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",eN(e.sum_api_requests)]}),(0,t.jsx)(D.AreaChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["api_requests"],valueFormatter:eN,onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",eN(e.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["total_tokens"],valueFormatter:eN,onValueChange:e=>console.log(e)})]})]})]},a))})]})})]})]})}),(0,t.jsx)(N.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(_.Col,{numColSpan:2,children:[(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Total Spend Per Team"}),(0,t.jsx)(d,{data:ea})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Daily Spend Per Team"}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Y,showLegend:!0,index:"date",categories:et,yAxisWidth:80,stack:!0})]})]}),(0,t.jsx)(_.Col,{numColSpan:2})]})}),(0,t.jsxs)(N.TabPanel,{children:[(0,t.jsxs)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:["Customers of your LLM API calls. Tracked when a `user` param is passed in your LLM calls"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/users",target:"_blank",children:"docs here"})]}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{children:(0,t.jsx)(v.default,{value:ep,onValueChange:e=>{ex(e),eS(e.from,e.to,null)}})}),(0,t.jsxs)(_.Col,{children:[(0,t.jsx)(k.Text,{children:"Select Key"}),(0,t.jsxs)(E.Select,{defaultValue:"all-keys",children:[(0,t.jsx)(M.SelectItem,{value:"all-keys",onClick:()=>{eS(ep.from,ep.to,null)},children:"All Keys"},"all-keys"),i?.map((e,l)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,t.jsx)(M.SelectItem,{value:String(l),onClick:()=>{eS(ep.from,ep.to,e.token)},children:e.key_alias},l):null)]})]})]}),(0,t.jsx)(u.Card,{className:"mt-4",children:(0,t.jsxs)(h.Table,{className:"max-h-[70vh] min-h-[500px]",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Customer"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(p.TableHeaderCell,{children:"Total Events"})]})}),(0,t.jsx)(b.TableBody,{children:W?.map((e,l)=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.end_user}),(0,t.jsx)(f.TableCell,{children:(0,$.formatNumberWithCommas)(e.total_spend,2)}),(0,t.jsx)(f.TableCell,{children:e.total_count})]},l))})]})})]}),(0,t.jsxs)(N.TabPanel,{children:[(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsx)(v.default,{className:"mb-4",value:ep,onValueChange:e=>{ex(e),eT(e.from,e.to)}})}),(0,t.jsx)(_.Col,{children:o?(0,t.jsx)("div",{children:(0,t.jsxs)(P.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(B.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsx)(B.MultiSelectItem,{value:String(e),children:e},e))]})}):(0,t.jsx)("div",{children:(0,t.jsxs)(P.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(B.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsxs)(M.SelectItem,{value:String(e),disabled:!0,children:["✨ ",e," (Enterprise only Feature)"]},e))]})})})]}),(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full mb-4",children:[(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Spend Per Tag"}),(0,t.jsxs)(k.Text,{children:["Get Started by Tracking cost per tag"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/cost_tracking",target:"_blank",children:"here"})]}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Q,index:"name",categories:["spend"],colors:["cyan"]})]})}),(0,t.jsx)(_.Col,{numColSpan:2})]})]})]})]})})}],735042)},368670,e=>{"use strict";var t=e.i(764205),l=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,l.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},226898,972520,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(389083),o=e.i(64848),c=e.i(977572),d=e.i(942232),u=e.i(599724),m=e.i(994388),h=e.i(752978),g=e.i(793130),p=e.i(404206),x=e.i(723731),f=e.i(653824),b=e.i(881073),y=e.i(197647),j=e.i(764205),v=e.i(28651),w=e.i(68155),_=e.i(220508),k=e.i(464571),N=e.i(727749),C=e.i(158392);let S=({accessToken:e,userRole:a,userID:r,modelData:s})=>{let[n,i]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)({}),[m,h]=(0,l.useState)({});return((0,l.useEffect)(()=>{e&&a&&r&&((0,j.getCallbacksCall)(e,r,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy;let l=t.routing_strategy||null;i(e=>({...e,routerSettings:t,selectedStrategy:l}))}),(0,j.getRouterSettingsCall)(e).then(e=>{if(console.log("router settings from API",e),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}}),u(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&c(l.options),e.routing_strategy_descriptions&&h(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&&i(e=>({...e,enableTagFiltering:a.field_value}))}}))},[e,a,r]),e)?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(C.default,{value:n,onChange:i,routerFieldsMetadata:d,availableRoutingStrategies:o,routingStrategyDescriptions:m}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(k.Button,{onClick:()=>window.location.reload(),children:"Reset"}),(0,t.jsx)(k.Button,{type:"primary",onClick:()=>{if(!e)return;let t=n.routerSettings;console.log("router_settings",t);let l=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),a=new Set(["model_group_alias","retry_policy"]),r=Object.fromEntries(Object.entries({...t,enable_tag_filtering:n.enableTagFiltering}).map(([e,t])=>{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,n.selectedStrategy];if("enable_tag_filtering"===e)return[e,n.enableTagFiltering];if("routing_strategy_args"===e&&"latency-based-routing"===n.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)),console.log(`setRoutingStrategyArgs: ${e}`),["routing_strategy_args",e]}return null}).filter(e=>null!=e));console.log("updatedVariables",r);try{(0,j.setCallbacksCall)(e,{router_settings:r})}catch(e){N.default.fromBackend("Failed to update router settings: "+e)}N.default.success("router settings updated successfully")},children:"Save Changes"})]})]}):null};e.i(247167);var T=e.i(368670);let I=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 E=e.i(122577),M=e.i(592968),O=e.i(898586),D=e.i(356449),A=e.i(127952),P=e.i(418371),B=e.i(888259),R=e.i(689020),F=e.i(212931);let $=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function L({open:e,onCancel:l,children:a}){return(0,t.jsx)(F.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)($,{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})})}e.s(["ArrowRight",()=>$],972520);var z=e.i(419470);function H({models:e,accessToken:a,value:r=[],onChange:s}){let[n,i]=(0,l.useState)(!1),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)(0),[h,g]=(0,l.useState)(!1),[p,x]=(0,l.useState)([{id:"1",primaryModel:null,fallbackModels:[]}]);(0,l.useEffect)(()=>{n&&(x([{id:"1",primaryModel:null,fallbackModels:[]}]),u(e=>e+1))},[n]),(0,l.useEffect)(()=>{let e=async()=>{try{let e=await (0,R.fetchAvailableModels)(a);console.log("Fetched models for fallbacks:",e),c(e)}catch(e){console.error("Error fetching model info for fallbacks:",e)}};n&&e()},[a,n]);let f=Array.from(new Set(o.map(e=>e.model_group))).sort(),b=()=>{i(!1),x([{id:"1",primaryModel:null,fallbackModels:[]}])},y=async()=>{let e=p.filter(e=>!e.primaryModel||0===e.fallbackModels.length);if(e.length>0)return void B.default.error(`Please complete configuration for all groups. ${e.length} group(s) incomplete.`);let t=[...r||[],...p.map(e=>({[e.primaryModel]:e.fallbackModels}))];if(s){g(!0);try{await s(t),N.default.success(`${p.length} fallback configuration(s) added successfully!`),b()}catch(e){console.error("Error saving fallbacks:",e)}finally{g(!1)}}else N.default.fromBackend("onChange callback not provided")};return(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Button,{className:"mx-auto",onClick:()=>i(!0),icon:()=>(0,t.jsx)("span",{className:"mr-1",children:"+"}),children:"Add Fallbacks"}),(0,t.jsxs)(L,{open:n,onCancel:b,children:[(0,t.jsx)(z.FallbackSelectionForm,{groups:p,onGroupsChange:x,availableModels:f,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)(k.Button,{type:"default",onClick:b,disabled:h,children:"Cancel"}),(0,t.jsx)(k.Button,{type:"default",onClick:y,disabled:0===p.length||h,loading:h,children:h?"Saving Configuration...":"Save All Configurations"})]})]})]})}let V="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 U(e,l){console.log=function(){};let a=window.location.origin,r=new D.default.OpenAI({apiKey:l,baseURL:a,dangerouslyAllowBrowser:!0});try{N.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});N.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){N.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`)}}let q=({accessToken:e,userRole:a,userID:i,modelData:u})=>{let[m,g]=(0,l.useState)({}),[p,x]=(0,l.useState)(!1),[f,b]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),{data:_}=(0,T.useModelCostMap)(),k=e=>null!=_&&"object"==typeof _&&e in _?_[e].litellm_provider??"":"";(0,l.useEffect)(()=>{e&&a&&i&&(0,j.getCallbacksCall)(e,i,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)})},[e,a,i]);let C=e=>{b(e),v(!0)},S=async()=>{if(!f||!e)return;let t=Object.keys(f)[0];if(!t)return;x(!0);let l=m.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={...m,fallbacks:l};try{await (0,j.setCallbacksCall)(e,{router_settings:a}),g(a),N.default.success("Router settings updated successfully")}catch(e){N.default.fromBackend("Failed to update router settings: "+e)}finally{x(!1),v(!1),b(null)}};if(!e)return null;let D=async t=>{if(!e)return;let l={...m,fallbacks:t};try{await (0,j.setCallbacksCall)(e,{router_settings:l}),g(l)}catch(t){throw N.default.fromBackend("Failed to update router settings: "+t),e&&a&&i&&(0,j.getCallbacksCall)(e,i,a).then(e=>{let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)}),t}},B=Array.isArray(m.fallbacks)&&m.fallbacks.length>0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H,{models:u?.data?u.data.map(e=>e.model_name):[],accessToken:e||"",value:m.fallbacks||[],onChange:D}),B?(0,t.jsxs)(r.Table,{children:[(0,t.jsx)(s.TableHead,{children:(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(o.TableHeaderCell,{children:"Model Name"}),(0,t.jsx)(o.TableHeaderCell,{children:"Fallbacks"}),(0,t.jsx)(o.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(d.TableBody,{children:m.fallbacks.map((a,r)=>Object.entries(a).map(([s,i])=>{let o;return(0,t.jsxs)(n.TableRow,{children:[(0,t.jsx)(c.TableCell,{className:"align-top",children:(o=k?.(s)??s,(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(P.ProviderLogo,{provider:o,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:s})]}))}),(0,t.jsx)(c.TableCell,{className:"align-top",children:function(e,a,r){let s=Array.isArray(a)?a:[];if(0===s.length)return null;let n=({modelName:e})=>{let l=r?.(e)??e;return(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(P.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)(I,{className:"w-5 h-5 stroke-[2.5]"})}),(0,t.jsx)("span",{className:"flex flex-wrap items-start gap-1 min-w-0",children:s.map((e,a)=>(0,t.jsxs)(l.default.Fragment,{children:[a>0&&(0,t.jsx)(h.Icon,{icon:I,size:"xs",className:"shrink-0 text-gray-400"}),(0,t.jsx)(n,{modelName:e})]},e))})]})}(0,Array.isArray(i)?i:[],k)}),(0,t.jsxs)(c.TableCell,{className:"align-top",children:[(0,t.jsx)(M.Tooltip,{title:"Test fallback",children:(0,t.jsx)(h.Icon,{icon:E.PlayIcon,size:"sm",onClick:()=>U(Object.keys(a)[0],e||""),className:"cursor-pointer 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:()=>C(a),onKeyDown:e=>"Enter"===e.key&&C(a),className:"cursor-pointer inline-flex",children:(0,t.jsx)(h.Icon,{icon:w.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)(O.Typography.Text,{type:"secondary",children:"No fallbacks configured. Add fallbacks to automatically try another model when the primary fails."})}),(0,t.jsx)(A.default,{isOpen:y,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:f?Object.keys(f)[0]:"",code:!0}],onCancel:()=>{v(!1),b(null)},onOk:S,confirmLoading:p})]})};e.s(["default",0,({accessToken:e,userRole:k,userID:N,modelData:C})=>{let[T,I]=(0,l.useState)([]);(0,l.useEffect)(()=>{e&&(0,j.getGeneralSettingsCall)(e).then(e=>{I(e)})},[e]);let E=(e,t)=>{I(T.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.TabGroup,{className:"h-[75vh] w-full",children:[(0,t.jsxs)(b.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(y.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(y.Tab,{value:"2",children:"Fallbacks"}),(0,t.jsx)(y.Tab,{value:"3",children:"General"})]}),(0,t.jsxs)(x.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(S,{accessToken:e,userRole:k,userID:N,modelData:C})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:k,userID:N,modelData:C})}),(0,t.jsx)(p.TabPanel,{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)(o.TableHeaderCell,{children:"Setting"}),(0,t.jsx)(o.TableHeaderCell,{children:"Value"}),(0,t.jsx)(o.TableHeaderCell,{children:"Status"}),(0,t.jsx)(o.TableHeaderCell,{children:"Action"})]})}),(0,t.jsx)(d.TableBody,{children:T.filter(e=>"TypedDictionary"!==e.field_type).map((l,a)=>(0,t.jsxs)(n.TableRow,{children:[(0,t.jsxs)(c.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)(c.TableCell,{children:"Integer"==l.field_type?(0,t.jsx)(v.InputNumber,{step:1,value:l.field_value,onChange:e=>E(l.field_name,e)}):"Boolean"==l.field_type?(0,t.jsx)(g.Switch,{checked:!0===l.field_value||"true"===l.field_value,onChange:e=>E(l.field_name,e)}):null}),(0,t.jsx)(c.TableCell,{children:!0==l.stored_in_db?(0,t.jsx)(i.Badge,{icon:_.CheckCircleIcon,className:"text-white",children:"In DB"}):!1==l.stored_in_db?(0,t.jsx)(i.Badge,{className:"text-gray bg-white outline",children:"In Config"}):(0,t.jsx)(i.Badge,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,t.jsxs)(c.TableCell,{children:[(0,t.jsx)(m.Button,{onClick:()=>((t,l)=>{if(!e)return;let a=T[l].field_value;if(null!=a&&void 0!=a)try{(0,j.updateConfigFieldSetting)(e,t,a);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:!0}:e);I(l)}catch(e){}})(l.field_name,a),children:"Update"}),(0,t.jsx)(h.Icon,{icon:w.TrashIcon,color:"red",onClick:()=>((t,l)=>{if(e)try{(0,j.deleteConfigFieldSetting)(e,t);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:null,field_value:null}:e);I(l)}catch(e){}})(l.field_name,0),children:"Reset"})]})]},a))})]})})})]})]})}):null}],226898)},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),r=e.i(947293),s=e.i(764205),n=e.i(954616),i=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function p(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var x=e.i(175712),f=e.i(808613),b=e.i(311451),y=e.i(898586);function j({variant:e,userEmail:a,isPending:r,claimError:s,onSubmit:n}){let[i]=f.Form.useForm();return l.default.useEffect(()=>{a&&i.setFieldValue("user_email",a)},[a,i]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(x.Card,{children:[(0,t.jsx)(y.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(y.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(y.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(f.Form,{className:"mt-10 mb-5",layout:"vertical",form:i,onFinish:e=>n({password:e.password}),children:[(0,t.jsx)(f.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(b.Input,{type:"email",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(b.Input.Password,{})}),s&&(0,t.jsx)(h.Alert,{type:"error",message:s,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:r,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function v({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:x,isError:f}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,i.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,s.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:b,isPending:y}=(0,n.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,s.claimOnboardingToken)(e,t,l,a)}),v=g?.token?(0,r.jwtDecode)(g.token):null,w=v?.user_email??"",_=v?.user_id??null,k=v?.key??null,N=g?.token??null;return x?(0,t.jsx)(m,{}):f?(0,t.jsx)(p,{}):(0,t.jsx)(j,{variant:e,userEmail:w,isPending:y,claimError:u,onSubmit:e=>{k&&N&&_&&d&&(h(null),b({accessToken:k,inviteId:d,userId:_,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,s.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function w(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(v,{variant:"reset_password"===e?"reset_password":"signup"})}function _(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(w,{})})}e.s(["default",()=>_],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),r=e.i(764205),s=e.i(135214);let n=(0,a.createQueryKeys)("infiniteKeyAliases");var i=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:p=!1,allFilters:x})=>{let[f,b]=(0,d.useState)(""),[y,j]=(0,o.useDebouncedState)("",{wait:300}),{data:v,fetchNextPage:w,hasNextPage:_,isFetchingNextPage:k,isLoading:N}=((e=50,t,a)=>{let{accessToken:i}=(0,s.default)();return(0,l.useInfiniteQuery)({queryKey:n.list({filters:{size:e,...t&&{search:t},...a&&{team_id:a}}}),queryFn:async({pageParam:l})=>await (0,r.keyAliasesCall)(i,l,e,t,a),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!v?.pages)return[];let e=new Set,t=[];for(let l of v.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[v]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:p,showSearch:!0,filterOption:!1,onSearch:e=>{b(e),j(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&_&&!k&&w()},loading:N,notFoundContent:N?(0,t.jsx)(i.LoadingOutlined,{spin:!0}):"No key aliases found",options:C,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,k&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(i.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),r=e.i(350967),s=e.i(898586),n=e.i(947293),i=e.i(618566),o=e.i(271645),c=e.i(566606),d=e.i(584578),u=e.i(764205),m=e.i(702597),h=e.i(207082),g=e.i(109799),p=e.i(500330),x=e.i(871943),f=e.i(502547),b=e.i(360820),y=e.i(94629),j=e.i(152990),v=e.i(682830),w=e.i(389083),_=e.i(994388),k=e.i(752978),N=e.i(269200),C=e.i(942232),S=e.i(977572),T=e.i(427612),I=e.i(64848),E=e.i(496020),M=e.i(599724),O=e.i(827252),D=e.i(772345),A=e.i(464571),P=e.i(282786),B=e.i(981339),R=e.i(592968),F=e.i(355619),$=e.i(633627),L=e.i(374009),z=e.i(700514),H=e.i(135214),V=e.i(50882),U=e.i(969550),q=e.i(304911),K=e.i(20147);function W({teams:e,organizations:l,onSortChange:a,currentSort:r}){let{data:n}=(0,g.useOrganizations)(),i=n??l??[],[c,d]=(0,o.useState)(null),[m,W]=o.default.useState(()=>r?[{id:r.sortBy,desc:"desc"===r.sortOrder}]:[{id:"created_at",desc:!0}]),[G,Y]=o.default.useState({pageIndex:0,pageSize:50}),J=m.length>0?m[0].id:null,Q=m.length>0?m[0].desc?"desc":"asc":null,{data:X,isPending:Z,isFetching:ee,isError:et,refetch:el}=(0,h.useKeys)(G.pageIndex+1,G.pageSize,{sortBy:J||void 0,sortOrder:Q||void 0,expand:"user"}),[ea,er]=(0,o.useState)({}),{filters:es,filteredKeys:en,filteredTotalCount:ei,allTeams:eo,allOrganizations:ec,handleFilterChange:ed,handleFilterReset:eu}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:r}=(0,H.default)(),[s,n]=(0,o.useState)(a),[i,c]=(0,o.useState)(t||[]),[d,m]=(0,o.useState)(l||[]),[h,g]=(0,o.useState)(e),[p,x]=(0,o.useState)(null),f=(0,o.useRef)(0),b=(0,o.useCallback)((0,L.default)(async e=>{if(!r)return;let t=Date.now();f.current=t;try{let l=await (0,u.keyListCall)(r,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,z.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===f.current&&l&&(g(l.keys),x(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[r]);return(0,o.useEffect)(()=>{if(!e)return void g([]);let t=[...e];s["Team ID"]&&(t=t.filter(e=>e.team_id===s["Team ID"])),s["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===s["Organization ID"])),g(t)},[e,s]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,$.fetchAllTeams)(r);e.length>0&&c(e);let t=await (0,$.fetchAllOrganizations)(r);t.length>0&&m(t)};r&&e()},[r]),(0,o.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{n({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||b({...s,...e})},handleFilterReset:()=>{n(a),x(null),b(a)}}}({keys:X?.keys||[],teams:e,organizations:l}),em=(0,o.useDeferredValue)(ee),eh=(ee||em)&&!et,eg=ei??X?.total_count??0;(0,o.useEffect)(()=>{if(el){let e=()=>{el()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[el]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(_.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let r=e?.find(e=>e.team_id===a),s=r?.team_alias||a,n=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:n,overflow:"hidden"},children:s})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=i.find(e=>e.organization_id===l),r=a?.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",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(P.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,r=l.user?.user_email??l.user_email??null,n=l.user_id??null,i="default_user_id"===n,o=a||r||n,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:r},{label:"User ID",value:n}].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)(s.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!i||a||r?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(q.default,{userId:n})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,r=a?.user_alias??null,n=a?.user_email??null,i="default_user_id"===l,o=r||n||l,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:r},{label:"User Email",value:n},{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)(s.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!i||r||n?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(q.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(P.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(R.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,p.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,p.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(w.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(M.Text,{children:"All Proxy Models"})}):(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)(k.Icon,{icon:ea[e.row.id]?x.ChevronDownIcon:f.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{er(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)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(M.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(M.Text,{children:e.length>30?`${(0,F.getModelDisplayName)(e).slice(0,30)}...`:(0,F.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(w.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(M.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[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)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(M.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(M.Text,{children:e.length>30?`${(0,F.getModelDisplayName)(e).slice(0,30)}...`:(0,F.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"]})]})}}],[e,i]),ex=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>eo&&0!==eo.length?eo.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ef=(0,j.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:G},onSortingChange:e=>{let t="function"==typeof e?e(m):e;if(W(t),t&&t.length>0){let e=t[0],l=e.id,r=e.desc?"desc":"asc";ed({...es,"Sort By":l,"Sort Order":r},!0),a?.(l,r)}},onPaginationChange:Y,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),getPaginationRowModel:(0,v.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(eg/G.pageSize)});o.default.useEffect(()=>{r&&W([{id:r.sortBy,desc:"desc"===r.sortOrder}])},[r]);let{pageIndex:eb,pageSize:ey}=ef.getState().pagination,ej=Math.min((eb+1)*ey,eg),ev=`${eb*ey+1} - ${ej}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:c?(0,t.jsx)(K.default,{keyId:c.token,onClose:()=>d(null),keyData:c,teams:eo,onDelete:el}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(U.default,{options:ex,onApplyFilters:ed,initialValues:es,onResetFilters:eu})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[Z?(0,t.jsx)(B.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",ev," of ",eg," results"]}),(0,t.jsx)(A.Button,{type:"default",icon:(0,t.jsx)(D.SyncOutlined,{spin:eh}),onClick:()=>{el()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[Z?(0,t.jsx)(B.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",eb+1," of ",ef.getPageCount()]}),Z?(0,t.jsx)(B.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ef.previousPage(),disabled:Z||!ef.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Z?(0,t.jsx)(B.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ef.nextPage(),disabled:Z||!ef.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ef.getCenterTotalSize()},children:[(0,t.jsx)(T.TableHead,{children:ef.getHeaderGroups().map(e=>(0,t.jsx)(E.TableRow,{children:e.headers.map(e=>(0,t.jsx)(I.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(b.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(x.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(y.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ef.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(C.TableBody,{children:Z?(0,t.jsx)(E.TableRow,{children:(0,t.jsx)(S.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ef.getRowModel().rows.map(e=>(0,t.jsx)(E.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(S.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(E.TableRow,{children:(0,t.jsx)(S.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:h,teams:g,keys:p,setUserRole:x,userEmail:f,setUserEmail:b,setTeams:y,setKeys:j,premiumUser:v,organizations:w,addKey:_,createClicked:k,autoOpenCreate:N,prefillData:C})=>{let[S,T]=(0,o.useState)(null),[I,E]=(0,o.useState)(null),M=(0,i.useSearchParams)(),O=(0,l.getCookie)("token"),D=M.get("invitation_id"),[A,P]=(0,o.useState)(null),[B,R]=(0,o.useState)(null),[F,$]=(0,o.useState)([]),[L,z]=(0,o.useState)(null),[H,V]=(0,o.useState)(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(O){let e=(0,n.jwtDecode)(O);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),P(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),x(t)}else console.log("User role not defined");e.user_email?b(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&A&&h&&!S){let t=sessionStorage.getItem("userModels"+e);t?$(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(I)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(A);z(t);let l=await (0,u.userGetInfoV2)(A,e);T(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,u.modelAvailableCall)(A,e,h)).data.map(e=>e.id);console.log("available_model_names:",a),$(a),console.log("userModels:",F),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&U()}})(),(0,d.fetchTeams)(A,e,h,I,y))}},[e,O,A,h]),(0,o.useEffect)(()=>{A&&(async()=>{try{let e=await (0,u.keyInfoCall)(A,[A]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&U()}})()},[A]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(I)}, accessToken: ${A}, userID: ${e}, userRole: ${h}`),A&&(console.log("fetching teams"),(0,d.fetchTeams)(A,e,h,I,y))},[I]),(0,o.useEffect)(()=>{if(null!==p&&null!=H&&null!==H.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(p)}`),p))H.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===H.team_id&&(e+=t.spend);console.log(`sum: ${e}`),R(e)}else if(null!==p){let e=0;for(let t of p)e+=t.spend;R(e)}},[H]),null!=D)return(0,t.jsx)(c.default,{});function U(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==O)return console.log("All cookies before redirect:",document.cookie),U(),null;try{let e=(0,n.jwtDecode)(O);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),U(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),U(),null}if(null==A)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==h&&x("App Owner"),h&&"Admin Viewer"==h){let{Title:e,Paragraph:l}=s.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",H),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(r.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(m.default,{team:H,teams:g,data:p,addKey:_,autoOpenCreate:N,prefillData:C},H?H.team_id:null),(0,t.jsx)(W,{teams:g,organizations:w})]})})})}],693569)},559061,e=>{"use strict";var t=e.i(843476),l=e.i(584935),a=e.i(304967),r=e.i(309426),s=e.i(350967),n=e.i(752978),i=e.i(621642),o=e.i(25080),c=e.i(37091),d=e.i(197647),u=e.i(653824),m=e.i(881073),h=e.i(404206),g=e.i(723731),p=e.i(599724),x=e.i(271645),f=e.i(727749),b=e.i(144267),y=e.i(278587),j=e.i(764205),v=e.i(994388),w=e.i(220508),_=e.i(964306),k=e.i(551332);let N=({responseTimeMs:e})=>null==e?null:(0,t.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-500 font-mono",children:[(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 6V12L16 14M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,t.jsxs)("span",{children:[e.toFixed(0),"ms"]})]}),C=e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{}return t},S=({label:e,value:l})=>{let[a,r]=x.default.useState(!1),[s,n]=x.default.useState(!1),i=l?.toString()||"N/A",o=i.length>50?i.substring(0,50)+"...":i;return(0,t.jsx)("tr",{className:"hover:bg-gray-50",children:(0,t.jsx)("td",{className:"px-4 py-2 align-top",colSpan:2,children:(0,t.jsxs)("div",{className:"flex items-center justify-between group",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[(0,t.jsx)("button",{onClick:()=>r(!a),className:"text-gray-400 hover:text-gray-600 mr-2",children:a?"▼":"▶"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm text-gray-600",children:e}),(0,t.jsx)("pre",{className:"mt-1 text-sm font-mono text-gray-800 whitespace-pre-wrap",children:a?i:o})]})]}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(i),n(!0),setTimeout(()=>n(!1),2e3)},className:"opacity-0 group-hover:opacity-100 text-gray-400 hover:text-gray-600",children:(0,t.jsx)(k.ClipboardCopyIcon,{className:"h-4 w-4"})})]})})})},T=({response:e})=>{let l=null,a={},r={};try{if(e?.error)try{let t="string"==typeof e.error.message?JSON.parse(e.error.message):e.error.message;l={message:t?.message||"Unknown error",traceback:t?.traceback||"No traceback available",litellm_params:t?.litellm_cache_params||{},health_check_cache_params:t?.health_check_cache_params||{}},a=C(l.litellm_params)||{},r=C(l.health_check_cache_params)||{}}catch(t){console.warn("Error parsing error details:",t),l={message:String(e.error.message||"Unknown error"),traceback:"Error parsing details",litellm_params:{},health_check_cache_params:{}}}else a=C(e?.litellm_cache_params)||{},r=C(e?.health_check_cache_params)||{}}catch(e){console.warn("Error in response parsing:",e),a={},r={}}let s={redis_host:r?.redis_client?.connection_pool?.connection_kwargs?.host||r?.redis_async_client?.connection_pool?.connection_kwargs?.host||r?.connection_kwargs?.host||r?.host||"N/A",redis_port:r?.redis_client?.connection_pool?.connection_kwargs?.port||r?.redis_async_client?.connection_pool?.connection_kwargs?.port||r?.connection_kwargs?.port||r?.port||"N/A",redis_version:r?.redis_version||"N/A",startup_nodes:(()=>{try{if(r?.redis_kwargs?.startup_nodes)return JSON.stringify(r.redis_kwargs.startup_nodes);let e=r?.redis_client?.connection_pool?.connection_kwargs?.host||r?.redis_async_client?.connection_pool?.connection_kwargs?.host,t=r?.redis_client?.connection_pool?.connection_kwargs?.port||r?.redis_async_client?.connection_pool?.connection_kwargs?.port;return e&&t?JSON.stringify([{host:e,port:t}]):"N/A"}catch(e){return"N/A"}})(),namespace:r?.namespace||"N/A"};return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,t.jsxs)(u.TabGroup,{children:[(0,t.jsxs)(m.TabList,{className:"border-b border-gray-200 px-4",children:[(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Summary"}),(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Raw Response"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-6",children:[e?.status==="healthy"?(0,t.jsx)(w.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}):(0,t.jsx)(_.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsxs)(p.Text,{className:`text-sm font-medium ${e?.status==="healthy"?"text-green-500":"text-red-500"}`,children:["Cache Status: ",e?.status||"unhealthy"]})]}),(0,t.jsx)("table",{className:"w-full border-collapse",children:(0,t.jsxs)("tbody",{children:[l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold text-red-600",children:"Error Details"})}),(0,t.jsx)(S,{label:"Error Message",value:l.message}),(0,t.jsx)(S,{label:"Traceback",value:l.traceback})]}),(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Cache Details"})}),(0,t.jsx)(S,{label:"Cache Configuration",value:String(a?.type)}),(0,t.jsx)(S,{label:"Ping Response",value:String(e.ping_response)}),(0,t.jsx)(S,{label:"Set Cache Response",value:e.set_cache_response||"N/A"}),(0,t.jsx)(S,{label:"litellm_settings.cache_params",value:JSON.stringify(a,null,2)}),a?.type==="redis"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Redis Details"})}),(0,t.jsx)(S,{label:"Redis Host",value:s.redis_host||"N/A"}),(0,t.jsx)(S,{label:"Redis Port",value:s.redis_port||"N/A"}),(0,t.jsx)(S,{label:"Redis Version",value:s.redis_version||"N/A"}),(0,t.jsx)(S,{label:"Startup Nodes",value:s.startup_nodes||"N/A"}),(0,t.jsx)(S,{label:"Namespace",value:s.namespace||"N/A"})]})]})})]})}),(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded-md p-4 font-mono text-sm",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words overflow-auto max-h-[500px]",children:(()=>{try{let t={...e,litellm_cache_params:a,health_check_cache_params:r},l=JSON.parse(JSON.stringify(t,(e,t)=>{if("string"==typeof t)try{return JSON.parse(t)}catch{}return t}));return JSON.stringify(l,null,2)}catch(e){return"Error formatting JSON: "+e.message}})()})})})]})]})})},I=({accessToken:e,healthCheckResponse:l,runCachingHealthCheck:a,responseTimeMs:r})=>{let[s,n]=x.default.useState(null),[i,o]=x.default.useState(!1),c=async()=>{o(!0);let e=performance.now();await a(),n(performance.now()-e),o(!1)};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(v.Button,{onClick:c,disabled:i,className:"bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 text-white text-sm px-4 py-2 rounded-md",children:i?"Running Health Check...":"Run Health Check"}),(0,t.jsx)(N,{responseTimeMs:s})]}),l&&(0,t.jsx)(T,{response:l})]})};var E=e.i(677667),M=e.i(898667),O=e.i(130643),D=e.i(206929),A=e.i(35983);let P=({redisType:e,redisTypeDescriptions:l,onTypeChange:a})=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Redis Type"}),(0,t.jsxs)(D.Select,{value:e,onValueChange:a,children:[(0,t.jsx)(A.SelectItem,{value:"node",children:"Node (Single Instance)"}),(0,t.jsx)(A.SelectItem,{value:"cluster",children:"Cluster"}),(0,t.jsx)(A.SelectItem,{value:"sentinel",children:"Sentinel"}),(0,t.jsx)(A.SelectItem,{value:"semantic",children:"Semantic"})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:l[e]||"Select the type of Redis deployment you're using"})]});var B=e.i(135214),R=e.i(620250),F=e.i(779241),$=e.i(199133),L=e.i(689020),z=e.i(435451);let H=({field:e,currentValue:l})=>{let[a,r]=(0,x.useState)([]),[s,n]=(0,x.useState)(l||""),{accessToken:i}=(0,B.default)();if((0,x.useEffect)(()=>{i&&(async()=>{try{let e=await (0,L.fetchAvailableModels)(i);console.log("Fetched models for selector:",e),e.length>0&&r(e)}catch(e){console.error("Error fetching model info:",e)}})()},[i]),"Boolean"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",name:e.field_name,defaultChecked:!0===l||"true"===l,className:"h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:e.field_description})]})]});if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(z.default,{name:e.field_name,type:"number",defaultValue:l,placeholder:e.field_description}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("List"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)("textarea",{name:e.field_name,defaultValue:"object"==typeof l?JSON.stringify(l,null,2):l,placeholder:e.field_description,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500",rows:4}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("Models_Select"===e.field_type){let l=a.filter(e=>"embedding"===e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)($.Select,{value:s,onChange:n,showSearch:!0,placeholder:"Search and select a model...",options:l,style:{width:"100%"},className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("input",{type:"hidden",name:e.field_name,value:s}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})}if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(R.NumberInput,{name:e.field_name,defaultValue:l,placeholder:e.field_description,step:"Float"===e.field_type?.01:1}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});let o="password"===e.field_name||e.field_name.includes("password")?"password":"text";return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(F.TextInput,{name:e.field_name,type:o,defaultValue:l,placeholder:e.field_description}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})},V=(e,t)=>e.find(e=>e.field_name===t),U=(e,t)=>{let l={type:"redis"};return e.forEach(e=>{if("redis_type"===e.field_name||null!==e.redis_type&&void 0!==e.redis_type&&e.redis_type!==t)return;let a=e.field_name,r=null;if("Boolean"===e.field_type){let e=document.querySelector(`input[name="${a}"]`);e?.checked!==void 0&&(r=e.checked)}else if("List"===e.field_type){let e=document.querySelector(`textarea[name="${a}"]`);if(e?.value)try{r=JSON.parse(e.value)}catch(e){console.error(`Invalid JSON for ${a}:`,e)}}else{let t=document.querySelector(`input[name="${a}"]`);if(t?.value){let l=t.value.trim();if(""!==l)if("Integer"===e.field_type){let e=Number(l);isNaN(e)||(r=e)}else if("Float"===e.field_type){let e=Number(l);isNaN(e)||(r=e)}else r=l}}null!=r&&(l[a]=r)}),l},q=({accessToken:e,userRole:l,userID:a})=>{let r,s,n,i,o,[c,d]=(0,x.useState)({}),[u,m]=(0,x.useState)([]),[h,g]=(0,x.useState)({}),[p,b]=(0,x.useState)("node"),[y,w]=(0,x.useState)(!1),[_,k]=(0,x.useState)(!1),N=(0,x.useCallback)(async()=>{try{let t=await (0,j.getCacheSettingsCall)(e);console.log("cache settings from API",t),t.fields&&m(t.fields),t.current_values&&(d(t.current_values),t.current_values.redis_type&&b(t.current_values.redis_type)),t.redis_type_descriptions&&g(t.redis_type_descriptions)}catch(e){console.error("Failed to load cache settings:",e),f.default.fromBackend("Failed to load cache settings")}},[e]);(0,x.useEffect)(()=>{e&&N()},[e,N]);let C=async()=>{if(e){w(!0);try{let t=U(u,p),l=await (0,j.testCacheConnectionCall)(e,t);"success"===l.status?f.default.success("Cache connection test successful!"):f.default.fromBackend(`Connection test failed: ${l.message||l.error}`)}catch(e){console.error("Test connection error:",e),f.default.fromBackend(`Connection test failed: ${e.message||"Unknown error"}`)}finally{w(!1)}}},S=async()=>{if(e){k(!0);try{let t=U(u,p);"semantic"===p&&(t.type="redis-semantic"),await (0,j.updateCacheSettingsCall)(e,t),f.default.success("Cache settings updated successfully"),await N()}catch(e){console.error("Failed to save cache settings:",e),f.default.fromBackend("Failed to update cache settings")}finally{k(!1)}}};if(!e)return null;let{basicFields:T,sslFields:I,cacheManagementFields:D,gcpFields:A,clusterFields:B,sentinelFields:R,semanticFields:F}=(r=["host","port","password","username"].map(e=>V(u,e)).filter(Boolean),s=["ssl","ssl_cert_reqs","ssl_check_hostname"].map(e=>V(u,e)).filter(Boolean),n=["namespace","ttl","max_connections"].map(e=>V(u,e)).filter(Boolean),i=["gcp_service_account","gcp_ssl_ca_certs"].map(e=>V(u,e)).filter(Boolean),o=u.filter(e=>"cluster"===e.redis_type),{basicFields:r,sslFields:s,cacheManagementFields:n,gcpFields:i,clusterFields:o,sentinelFields:u.filter(e=>"sentinel"===e.redis_type),semanticFields:u.filter(e=>"semantic"===e.redis_type)});return(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:"Cache Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure Redis cache for LiteLLM"})]}),(0,t.jsx)(P,{redisType:p,redisTypeDescriptions:h,onTypeChange:b}),(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Connection Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:T.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),"cluster"===p&&B.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Cluster Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6",children:B.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),"sentinel"===p&&R.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Sentinel Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:R.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),"semantic"===p&&F.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Semantic Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:F.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),(0,t.jsxs)(E.Accordion,{className:"mt-4",children:[(0,t.jsx)(M.AccordionHeader,{children:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Advanced Settings"})}),(0,t.jsx)(O.AccordionBody,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[I.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"SSL Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:I.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),D.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"Cache Management"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:D.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),A.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"GCP Authentication"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:A.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]})]})})]})]}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(v.Button,{variant:"secondary",size:"sm",onClick:C,disabled:y,className:"text-sm",children:y?"Testing...":"Test Connection"}),(0,t.jsx)(v.Button,{size:"sm",onClick:S,disabled:_,className:"text-sm font-medium",children:_?"Saving...":"Save Changes"})]})]})},K=e=>{if(e)return e.toISOString().split("T")[0]};function W(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}e.s(["default",0,({accessToken:e,token:v,userRole:w,userID:_,premiumUser:k})=>{let[N,C]=(0,x.useState)([]),[S,T]=(0,x.useState)([]),[E,M]=(0,x.useState)([]),[O,D]=(0,x.useState)([]),[A,P]=(0,x.useState)("0"),[B,R]=(0,x.useState)("0"),[F,$]=(0,x.useState)("0"),[L,z]=(0,x.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[H,V]=(0,x.useState)(""),[U,G]=(0,x.useState)("");(0,x.useEffect)(()=>{e&&L&&((async()=>{D(await (0,j.adminGlobalCacheActivity)(e,K(L.from),K(L.to)))})(),V(new Date().toLocaleString()))},[e]);let Y=Array.from(new Set(O.map(e=>e?.api_key??""))),J=Array.from(new Set(O.map(e=>e?.model??"")));Array.from(new Set(O.map(e=>e?.call_type??"")));let Q=async(t,l)=>{t&&l&&e&&D(await (0,j.adminGlobalCacheActivity)(e,K(t),K(l)))};(0,x.useEffect)(()=>{console.log("DATA IN CACHE DASHBOARD",O);let e=O;S.length>0&&(e=e.filter(e=>S.includes(e.api_key))),E.length>0&&(e=e.filter(e=>E.includes(e.model))),console.log("before processed data in cache dashboard",e);let t=0,l=0,a=0,r=e.reduce((e,r)=>{console.log("Processing item:",r),r.call_type||(console.log("Item has no call_type:",r),r.call_type="Unknown"),t+=(r.total_rows||0)-(r.cache_hit_true_rows||0),l+=r.cache_hit_true_rows||0,a+=r.cached_completion_tokens||0;let s=e.find(e=>e.name===r.call_type);return s?(s["LLM API requests"]+=(r.total_rows||0)-(r.cache_hit_true_rows||0),s["Cache hit"]+=r.cache_hit_true_rows||0,s["Cached Completion Tokens"]+=r.cached_completion_tokens||0,s["Generated Completion Tokens"]+=r.generated_completion_tokens||0):e.push({name:r.call_type,"LLM API requests":(r.total_rows||0)-(r.cache_hit_true_rows||0),"Cache hit":r.cache_hit_true_rows||0,"Cached Completion Tokens":r.cached_completion_tokens||0,"Generated Completion Tokens":r.generated_completion_tokens||0}),e},[]);P(W(l)),R(W(a));let s=l+t;s>0?$((l/s*100).toFixed(2)):$("0"),C(r),console.log("PROCESSED DATA IN CACHE DASHBOARD",r)},[S,E,L,O]);let X=async()=>{try{f.default.info("Running cache health check..."),G("");let t=await (0,j.cachingHealthCheckCall)(null!==e?e:"");console.log("CACHING HEALTH CHECK RESPONSE",t),G(t)}catch(t){let e;if(console.error("Error running health check:",t),t&&t.message)try{let l=JSON.parse(t.message);l.error&&(l=l.error),e=l}catch(l){e={message:t.message}}else e={message:"Unknown error occurred"};G({error:e})}};return(0,t.jsxs)(u.TabGroup,{className:"gap-2 p-8 h-full w-full mt-2 mb-8",children:[(0,t.jsxs)(m.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(d.Tab,{children:"Cache Analytics"}),(0,t.jsx)(d.Tab,{children:"Cache Health"}),(0,t.jsx)(d.Tab,{children:"Cache Settings"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[H&&(0,t.jsxs)(p.Text,{children:["Last Refreshed: ",H]}),(0,t.jsx)(n.Icon,{icon:y.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:()=>{V(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(a.Card,{children:[(0,t.jsxs)(s.Grid,{numItems:3,className:"gap-4 mt-4",children:[(0,t.jsx)(r.Col,{children:(0,t.jsx)(i.MultiSelect,{placeholder:"Select Virtual Keys",value:S,onValueChange:T,children:Y.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(r.Col,{children:(0,t.jsx)(i.MultiSelect,{placeholder:"Select Models",value:E,onValueChange:M,children:J.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(r.Col,{children:(0,t.jsx)(b.default,{value:L,onValueChange:e=>{z(e),Q(e.from,e.to)}})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mt-4",children:[(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hit Ratio"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsxs)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:[F,"%"]})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hits"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:A})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cached Tokens"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:B})})]})]}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cache Hits vs API Requests"}),(0,t.jsx)(l.BarChart,{title:"Cache Hits vs API Requests",data:N,stack:!0,index:"name",valueFormatter:W,categories:["LLM API requests","Cache hit"],colors:["sky","teal"],yAxisWidth:48}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cached Completion Tokens vs Generated Completion Tokens"}),(0,t.jsx)(l.BarChart,{className:"mt-6",data:N,stack:!0,index:"name",valueFormatter:W,categories:["Generated Completion Tokens","Cached Completion Tokens"],colors:["sky","teal"],yAxisWidth:48})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(I,{accessToken:e,healthCheckResponse:U,runCachingHealthCheck:X})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:w,userID:_})})]})]})}],559061)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e2f70fb83dabbe21.js b/litellm/proxy/_experimental/out/_next/static/chunks/e2f70fb83dabbe21.js new file mode 100644 index 0000000000..09b00148a0 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/e2f70fb83dabbe21.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),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214),r=e.i(708347);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,a.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&r.all_admin_roles.includes(s)})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e637f1fc0218b4f2.js b/litellm/proxy/_experimental/out/_next/static/chunks/e637f1fc0218b4f2.js deleted file mode 100644 index 9d8a0583d7..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/e637f1fc0218b4f2.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,757440,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let a=e=>{var a=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},a),r.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>a])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),a=e.i(271645);let l=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.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"}))};e.s(["default",()=>l],446428);var n=e.i(746725),s=e.i(914189),i=e.i(553521),o=e.i(835696),u=e.i(941444),d=e.i(178677),c=e.i(294316),m=e.i(83733),f=e.i(233137),h=e.i(732607),p=e.i(397701),v=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:C)!==a.Fragment||1===a.default.Children.count(e.children)}let b=(0,a.createContext)(null);b.displayName="TransitionContext";var y=((t=y||{}).Visible="visible",t.Hidden="hidden",t);let x=(0,a.createContext)(null);function w(e){return"children"in e?w(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function S(e,t){let r=(0,u.useLatestValue)(e),l=(0,a.useRef)([]),o=(0,i.useIsMounted)(),d=(0,n.useDisposables)(),c=(0,s.useEvent)((e,t=v.RenderStrategy.Hidden)=>{let a=l.current.findIndex(({el:t})=>t===e);-1!==a&&((0,p.match)(t,{[v.RenderStrategy.Unmount](){l.current.splice(a,1)},[v.RenderStrategy.Hidden](){l.current[a].state="hidden"}}),d.microTask(()=>{var e;!w(l)&&o.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,s.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"}),()=>c(e,v.RenderStrategy.Unmount)}),f=(0,a.useRef)([]),h=(0,a.useRef)(Promise.resolve()),g=(0,a.useRef)({enter:[],leave:[]}),b=(0,s.useEvent)((e,r,a)=>{f.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=>{f.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(g.current[r].map(([e,t])=>t)).then(()=>e())})]),"enter"===r?h.current=h.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(r)):a(r)}),y=(0,s.useEvent)((e,t,r)=>{Promise.all(g.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=f.current.shift())||e()}).then(()=>r(t))});return(0,a.useMemo)(()=>({children:l,register:m,unregister:c,onStart:b,onStop:y,wait:h,chains:g}),[m,c,l,b,y,g,h])}x.displayName="NestingContext";let C=a.Fragment,j=v.RenderFeatures.RenderStrategy,M=(0,v.forwardRefWithAs)(function(e,t){let{show:r,appear:l=!1,unmount:n=!0,...i}=e,u=(0,a.useRef)(null),m=g(e),h=(0,c.useSyncRefs)(...m?[u,t]:null===t?[]:[t]);(0,d.useServerHandoffComplete)();let p=(0,f.useOpenClosed)();if(void 0===r&&null!==p&&(r=(p&f.State.Open)===f.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[y,C]=(0,a.useState)(r?"visible":"hidden"),M=S(()=>{r||C("hidden")}),[$,E]=(0,a.useState)(!0),k=(0,a.useRef)([r]);(0,o.useIsoMorphicEffect)(()=>{!1!==$&&k.current[k.current.length-1]!==r&&(k.current.push(r),E(!1))},[k,r]);let _=(0,a.useMemo)(()=>({show:r,appear:l,initial:$}),[r,l,$]);(0,o.useIsoMorphicEffect)(()=>{r?C("visible"):w(M)||null===u.current||C("hidden")},[r,M]);let N={unmount:n},T=(0,s.useEvent)(()=>{var t;$&&E(!1),null==(t=e.beforeEnter)||t.call(e)}),I=(0,s.useEvent)(()=>{var t;$&&E(!1),null==(t=e.beforeLeave)||t.call(e)}),D=(0,v.useRender)();return a.default.createElement(x.Provider,{value:M},a.default.createElement(b.Provider,{value:_},D({ourProps:{...N,as:a.Fragment,children:a.default.createElement(O,{ref:h,...N,...i,beforeEnter:T,beforeLeave:I})},theirProps:{},defaultTag:a.Fragment,features:j,visible:"visible"===y,name:"Transition"})))}),O=(0,v.forwardRefWithAs)(function(e,t){var r,l;let{transition:n=!0,beforeEnter:i,afterEnter:u,beforeLeave:y,afterLeave:M,enter:O,enterFrom:$,enterTo:E,entered:k,leave:_,leaveFrom:N,leaveTo:T,...I}=e,[D,F]=(0,a.useState)(null),A=(0,a.useRef)(null),L=g(e),P=(0,c.useSyncRefs)(...L?[A,t,F]:null===t?[]:[t]),R=null==(r=I.unmount)||r?v.RenderStrategy.Unmount:v.RenderStrategy.Hidden,{show:V,appear:U,initial:z}=function(){let e=(0,a.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[W,H]=(0,a.useState)(V?"visible":"hidden"),B=function(){let e=(0,a.useContext)(x);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:K,unregister:q}=B;(0,o.useIsoMorphicEffect)(()=>K(A),[K,A]),(0,o.useIsoMorphicEffect)(()=>{if(R===v.RenderStrategy.Hidden&&A.current)return V&&"visible"!==W?void H("visible"):(0,p.match)(W,{hidden:()=>q(A),visible:()=>K(A)})},[W,A,K,q,V,R]);let Y=(0,d.useServerHandoffComplete)();(0,o.useIsoMorphicEffect)(()=>{if(L&&Y&&"visible"===W&&null===A.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[A,W,Y,L]);let Q=z&&!U,Z=U&&V&&z,J=(0,a.useRef)(!1),G=S(()=>{J.current||(H("hidden"),q(A))},B),X=(0,s.useEvent)(e=>{J.current=!0,G.onStart(A,e?"enter":"leave",e=>{"enter"===e?null==i||i():"leave"===e&&(null==y||y())})}),ee=(0,s.useEvent)(e=>{let t=e?"enter":"leave";J.current=!1,G.onStop(A,t,e=>{"enter"===e?null==u||u():"leave"===e&&(null==M||M())}),"leave"!==t||w(G)||(H("hidden"),q(A))});(0,a.useEffect)(()=>{L&&n||(X(V),ee(V))},[V,L,n]);let et=!(!n||!L||!Y||Q),[,er]=(0,m.useTransition)(et,D,V,{start:X,end:ee}),ea=(0,v.compact)({ref:P,className:(null==(l=(0,h.classNames)(I.className,Z&&O,Z&&$,er.enter&&O,er.enter&&er.closed&&$,er.enter&&!er.closed&&E,er.leave&&_,er.leave&&!er.closed&&N,er.leave&&er.closed&&T,!er.transition&&V&&k))?void 0:l.trim())||void 0,...(0,m.transitionDataAttributes)(er)}),el=0;"visible"===W&&(el|=f.State.Open),"hidden"===W&&(el|=f.State.Closed),er.enter&&(el|=f.State.Opening),er.leave&&(el|=f.State.Closing);let en=(0,v.useRender)();return a.default.createElement(x.Provider,{value:G},a.default.createElement(f.OpenClosedProvider,{value:el},en({ourProps:ea,theirProps:I,defaultTag:C,features:j,visible:"visible"===W,name:"Transition.Child"})))}),$=(0,v.forwardRefWithAs)(function(e,t){let r=null!==(0,a.useContext)(b),l=null!==(0,f.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!r&&l?a.default.createElement(M,{ref:t,...e}):a.default.createElement(O,{ref:t,...e}))}),E=Object.assign(M,{Child:$,Root:M});e.s(["Transition",()=>E],854056)},206929,e=>{"use strict";var t=e.i(290571),r=e.i(757440),a=e.i(271645),l=e.i(446428),n=e.i(444755),s=e.i(673706),i=e.i(103471),o=e.i(495470),u=e.i(854056),d=e.i(888288);let c=(0,s.makeClassName)("Select"),m=a.default.forwardRef((e,s)=>{let{defaultValue:m="",value:f,onValueChange:h,placeholder:p="Select...",disabled:v=!1,icon:g,enableClear:b=!1,required:y,children:x,name:w,error:S=!1,errorMessage:C,className:j,id:M}=e,O=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),$=(0,a.useRef)(null),E=a.Children.toArray(x),[k,_]=(0,d.default)(m,f),N=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(x).filter(a.isValidElement);return(0,i.constructValueToNameMapping)(e)},[x]);return a.default.createElement("div",{className:(0,n.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",j)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:y,className:(0,n.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:k,onChange:e=>{e.preventDefault()},name:w,disabled:v,id:M,onFocus:()=>{let e=$.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},p),E.map(e=>{let t=e.props.value,r=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},r)})),a.default.createElement(o.Listbox,Object.assign({as:"div",ref:s,defaultValue:k,value:k,onChange:e=>{null==h||h(e),_(e)},disabled:v,id:M},O),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(o.ListboxButton,{ref:$,className:(0,n.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",g?"pl-10":"pl-3",(0,i.getSelectButtonColors)((0,i.hasValue)(e),v,S))},g&&a.default.createElement("span",{className:(0,n.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(g,{className:(0,n.tremorTwMerge)(c("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=N.get(e))?t:p),a.default.createElement("span",{className:(0,n.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(r.default,{className:(0,n.tremorTwMerge)(c("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&k?a.default.createElement("button",{type:"button",className:(0,n.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),_(""),null==h||h("")}},a.default.createElement(l.default,{className:(0,n.tremorTwMerge)(c("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(u.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.default.createElement(o.ListboxOptions,{anchor:"bottom start",className:(0,n.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},x)))})),S&&C?a.default.createElement("p",{className:(0,n.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},C):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},822315,(e,t,r)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",r="minute",a="hour",l="week",n="month",s="quarter",i="year",o="date",u="Invalid Date",d=/^(\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",v=function(e){return e instanceof x||!(!e||!e[p])},g=function e(t,r,a){var l;if(!t)return f;if("string"==typeof t){var n=t.toLowerCase();h[n]&&(l=n),r&&(h[n]=r,l=n);var s=t.split("-");if(!l&&s.length>1)return e(s[0])}else{var i=t.name;h[i]=t,l=i}return!a&&l&&(f=l),l||!a&&f},b=function(e,t){if(v(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new x(r)},y={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:"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 l=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(l.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ReloadOutlined",0,n],91979)},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var l=e.i(464571),n=e.i(311451),s=e.i(199133),i=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:u,initialValues:d={},buttonLabel:c="Filters"})=>{let[m,f]=(0,r.useState)(!1),[h,p]=(0,r.useState)(d),[v,g]=(0,r.useState)({}),[b,y]=(0,r.useState)({}),[x,w]=(0,r.useState)({}),[S,C]=(0,r.useState)({}),j=(0,r.useCallback)((0,i.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){y(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);g(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),g(e=>({...e,[t.name]:[]}))}finally{y(e=>({...e,[t.name]:!1}))}}},300),[]),M=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!S[e.name]){y(t=>({...t,[e.name]:!0})),C(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");g(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),g(t=>({...t,[e.name]:[]}))}finally{y(t=>({...t,[e.name]:!1}))}}},[S]);(0,r.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!S[e.name]&&M(e)})},[m,e,M,S]);let O=(e,t)=>{let r={...h,[e]:t};p(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>f(!m),className:"flex items-center gap-2",children:c}),(0,t.jsx)(l.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),u()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,l=e.find(e=>e.label===r||e.name===r);return l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:l.label||l.name}),l.isSearchable?(0,t.jsx)(s.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${l.label||l.name}...`,value:h[l.name]||void 0,onChange:e=>O(l.name,e),onOpenChange:e=>{e&&l.isSearchable&&!S[l.name]&&M(l)},onSearch:e=>{w(t=>({...t,[l.name]:e})),l.searchFn&&j(e,l)},filterOption:!1,loading:b[l.name],options:v[l.name]||[],allowClear:!0,notFoundContent:b[l.name]?"Loading...":"No results found"}):l.options?(0,t.jsx)(s.Select,{className:"w-full",placeholder:`Select ${l.label||l.name}...`,value:h[l.name]||void 0,onChange:e=>O(l.name,e),allowClear:!0,children:l.options.map(e=>(0,t.jsx)(s.Select.Option,{value:e.value,children:e.label},e.value))}):l.customComponent?(a=l.customComponent,(0,t.jsx)(a,{value:h[l.name]||void 0,onChange:e=>O(l.name,e??""),placeholder:`Select ${l.label||l.name}...`,allFilters:h})):(0,t.jsx)(n.Input,{className:"w-full",placeholder:`Enter ${l.label||l.name}...`,value:h[l.name]||"",onChange:e=>O(l.name,e.target.value),allowClear:!0})]},l.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let l of e){let e=l?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let n=l?.organization_id??l?.org_id;n&&"string"==typeof n&&r.add(n.trim());let s=l?.user_id;if(s&&"string"==typeof s){let e=l?.user?.user_email||s;a.set(s,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let l=new Set,n=new Set,s=new Map,i=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=i?.keys||[],u=i?.total_pages??1;r(o,l,n,s);let d=Math.min(u,10)-1;if(d>0){let i=Array.from({length:d},(r,l)=>(0,t.keyListCall)(e,null,a,null,null,null,l+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(i)))"fulfilled"===e.status&&r(e.value?.keys||[],l,n,s)}return{keyAliases:Array.from(l).sort(),organizationIds:Array.from(n).sort(),userIds:Array.from(s.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},l=async(e,r)=>{if(!e)return[];try{let a=[],l=1,n=!0;for(;n;){let s=await (0,t.teamListCall)(e,r||null,null);a=[...a,...s],l{if(!e)return[];try{let r=[],a=1,l=!0;for(;l;){let n=await (0,t.organizationListCall)(e);r=[...r,...n],a{"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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},678784,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",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(914949),l=e.i(404948);let n=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,n],836938);var s=e.i(613541),i=e.i(763731),o=e.i(242064),u=e.i(491816);e.i(793154);var d=e.i(880476),c=e.i(183293),m=e.i(717356),f=e.i(320560),h=e.i(307358),p=e.i(246422),v=e.i(838378),g=e.i(617933);let b=(0,p.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,a=(0,v.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:a,fontWeightStrong:l,innerPadding:n,boxShadowSecondary:s,colorTextHeading:i,borderRadiusLG:o,zIndexPopup:u,titleMarginBottom:d,colorBgElevated:m,popoverBg:h,titleBorderBottom:p,innerContentPadding:v,titlePadding:g}=e;return[{[t]:Object.assign(Object.assign({},(0,c.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:o,boxShadow:s,padding:n},[`${t}-title`]:{minWidth:a,marginBottom:d,color:i,fontWeight:l,borderBottom:p,padding:g},[`${t}-inner-content`]:{color:r,padding:v}})},(0,f.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:g.PresetColors.map(r=>{let a=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:a,padding:l,wireframe:n,zIndexPopupBase:s,borderRadiusLG:i,marginXS:o,lineType:u,colorSplit:d,paddingSM:c}=e,m=r-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:s+30},(0,h.getArrowToken)(e)),(0,f.getArrowOffsetToken)({contentRadius:i,limitVerticalRadius:!0})),{innerPadding:12*!n,titleMarginBottom:n?0:o,titlePadding:n?`${m/2}px ${l}px ${m/2-t}px`:0,titleBorderBottom:n?`${t}px ${u} ${d}`:"none",innerContentPadding:n?`${c}px ${l}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var 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 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 x=({title:e,content:r,prefixCls:a})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),r&&t.createElement("div",{className:`${a}-inner-content`},r)):null,w=e=>{let{hashId:a,prefixCls:l,className:s,style:i,placement:o="top",title:u,content:c,children:m}=e,f=n(u),h=n(c),p=(0,r.default)(a,l,`${l}-pure`,`${l}-placement-${o}`,s);return t.createElement("div",{className:p,style:i},t.createElement("div",{className:`${l}-arrow`}),t.createElement(d.Popup,Object.assign({},e,{className:a,prefixCls:l}),m||t.createElement(x,{prefixCls:l,title:f,content:h})))},S=e=>{let{prefixCls:a,className:l}=e,n=y(e,["prefixCls","className"]),{getPrefixCls:s}=t.useContext(o.ConfigContext),i=s("popover",a),[u,d,c]=b(i);return u(t.createElement(w,Object.assign({},n,{prefixCls:i,hashId:d,className:(0,r.default)(l,c)})))};e.s(["Overlay",0,x,"default",0,S],310730);var 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 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 j=t.forwardRef((e,d)=>{var c,m;let{prefixCls:f,title:h,content:p,overlayClassName:v,placement:g="top",trigger:y="hover",children:w,mouseEnterDelay:S=.1,mouseLeaveDelay:j=.1,onOpenChange:M,overlayStyle:O={},styles:$,classNames:E}=e,k=C(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:_,className:N,style:T,classNames:I,styles:D}=(0,o.useComponentConfig)("popover"),F=_("popover",f),[A,L,P]=b(F),R=_(),V=(0,r.default)(v,L,P,N,I.root,null==E?void 0:E.root),U=(0,r.default)(I.body,null==E?void 0:E.body),[z,W]=(0,a.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),H=(e,t)=>{W(e,!0),null==M||M(e,t)},B=n(h),K=n(p);return A(t.createElement(u.default,Object.assign({placement:g,trigger:y,mouseEnterDelay:S,mouseLeaveDelay:j},k,{prefixCls:F,classNames:{root:V,body:U},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},D.root),T),O),null==$?void 0:$.root),body:Object.assign(Object.assign({},D.body),null==$?void 0:$.body)},ref:d,open:z,onOpenChange:e=>{H(e)},overlay:B||K?t.createElement(x,{prefixCls:F,title:B,content:K}):null,transitionName:(0,s.getTransitionName)(R,"zoom-big",k.transitionName),"data-popover-inject":!0}),(0,i.cloneElement)(w,{onKeyDown:e=>{var r,a;(0,t.isValidElement)(w)&&(null==(a=null==w?void 0:(r=w.props).onKeyDown)||a.call(r,e)),e.keyCode===l.default.ESC&&H(!1,e)}})))});j._InternalPanelDoNotUseOrYouWillBeFired=S,e.s(["default",0,j],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},738014,e=>{"use strict";var t=e.i(135214),r=e.i(764205),a=e.i(266027);let l=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:n}=(0,t.default)();return(0,a.useQuery)({queryKey:l.detail(n),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&n)})}])},625901,e=>{"use strict";var t=e.i(266027),r=e.i(621482),a=e.i(243652),l=e.i(764205),n=e.i(135214);let s=(0,a.createQueryKeys)("models"),i=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let u=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:r,userRole:a}=(0,n.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,r,a,!0,null,!0,!1,"expand"),enabled:!!(e&&r&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:s,userRole:i}=(0,n.default)();return(0,r.useInfiniteQuery)({queryKey:u.list({filters:{...s&&{userId:s},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:r})=>await (0,l.modelInfoCall)(a,s,i,r,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,n.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,r=50,a,i,o,u,d)=>{let{accessToken:c,userId:m,userRole:f}=(0,n.default)();return(0,t.useQuery)({queryKey:s.list({filters:{...m&&{userId:m},...f&&{userRole:f},page:e,size:r,...a&&{search:a},...i&&{modelId:i},...o&&{teamId:o},...u&&{sortBy:u},...d&&{sortOrder:d}}}),queryFn:async()=>await (0,l.modelInfoCall)(c,m,f,e,r,a,i,o,u,d),enabled:!!(c&&m&&f)})}])},907308,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(212931),l=e.i(808613),n=e.i(464571),s=e.i(199133),i=e.i(592968),o=e.i(213205),u=e.i(374009),d=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:c,onSubmit:m,accessToken:f,title:h="Add Team Member",roles:p=[{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:v="user",teamId:g})=>{let[b]=l.Form.useForm(),[y,x]=(0,r.useState)([]),[w,S]=(0,r.useState)(!1),[C,j]=(0,r.useState)("user_email"),[M,O]=(0,r.useState)(!1),$=async(e,t)=>{if(!e)return void x([]);S(!0);try{let r=new URLSearchParams;if(r.append(t,e),g&&r.append("team_id",g),null==f)return;let a=(await (0,d.userFilterUICall)(f,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}));x(a)}catch(e){console.error("Error fetching users:",e)}finally{S(!1)}},E=(0,r.useCallback)((0,u.default)((e,t)=>$(e,t),300),[]),k=(e,t)=>{j(t),E(e,t)},_=(e,t)=>{let r=t.user;b.setFieldsValue({user_email:r.user_email,user_id:r.user_id,role:b.getFieldValue("role")})},N=async e=>{O(!0);try{await m(e)}finally{O(!1)}};return(0,t.jsx)(a.Modal,{title:h,open:e,onCancel:()=>{b.resetFields(),x([]),c()},footer:null,width:800,maskClosable:!M,children:(0,t.jsxs)(l.Form,{form:b,onFinish:N,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:v},children:[(0,t.jsx)(l.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,t.jsx)(s.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>k(e,"user_email"),onSelect:(e,t)=>_(e,t),options:"user_email"===C?y:[],loading:w,allowClear:!0,"data-testid":"member-email-search"})}),(0,t.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,t.jsx)(l.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(s.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>k(e,"user_id"),onSelect:(e,t)=>_(e,t),options:"user_id"===C?y:[],loading:w,allowClear:!0})}),(0,t.jsx)(l.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(s.Select,{defaultValue:v,children:p.map(e=>(0,t.jsx)(s.Select.Option,{value:e.value,children:(0,t.jsxs)(i.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)(o.UserAddOutlined,{}),loading:M,children:M?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var t=e.i(843476),r=e.i(625901),a=e.i(109799),l=e.i(785242),n=e.i(738014),s=e.i(199133),i=e.i(981339),o=e.i(592968);let u={label:"All Proxy Models",value:"all-proxy-models"},d={label:"No Default Models",value:"no-default-models"},c=[u,d],m={user:({allProxyModels:e,userModels:t,options:r})=>t&&r?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:r})=>t?t.models.includes(u.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:f,organizationID:h,options:p,context:v,dataTestId:g,value:b=[],onChange:y,style:x}=e,{includeUserModels:w,showAllTeamModelsOption:S,showAllProxyModelsOverride:C,includeSpecialOptions:j}=p||{},{data:M,isLoading:O}=(0,r.useAllProxyModels)(),{data:$,isLoading:E}=(0,l.useTeam)(f),{data:k,isLoading:_}=(0,a.useOrganization)(h),{data:N,isLoading:T}=(0,n.useCurrentUser)(),I=e=>c.some(t=>t.value===e),D=b.some(I),F=k?.models.includes(u.value)||k?.models.length===0;if(O||E||_||T)return(0,t.jsx)(i.Skeleton.Input,{active:!0,block:!0});let{wildcard:A,regular:L}=(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 l=m[t.context];return l?l({allProxyModels:a,...r,options:t.options}):[]})(M?.data??[],e,{selectedTeam:$,selectedOrganization:k,userModels:N?.models}));return(0,t.jsx)(s.Select,{"data-testid":g,value:b,onChange:e=>{let t=e.filter(I);y(t.length>0?[t[t.length-1]]:e)},style:x,options:[j?{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...C||F&&j||"global"===v?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:u.value,disabled:b.length>0&&b.some(e=>I(e)&&e!==u.value),key:u.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:d.value,disabled:b.length>0&&b.some(e=>I(e)&&e!==d.value),key:d.value}]}:[],...A.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:A.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:L.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)},276173,e=>{"use strict";var t=e.i(843476),r=e.i(599724),a=e.i(779241),l=e.i(464571),n=e.i(808613),s=e.i(212931),i=e.i(199133),o=e.i(271645),u=e.i(435451);e.s(["default",0,({visible:e,onCancel:d,onSubmit:c,initialData:m,mode:f,config:h})=>{let p,[v]=n.Form.useForm(),[g,b]=(0,o.useState)(!1);console.log("Initial Data:",m),(0,o.useEffect)(()=>{if(e)if("edit"===f&&m){let e={...m,role:m.role||h.defaultRole,max_budget_in_team:m.max_budget_in_team||null,tpm_limit:m.tpm_limit||null,rpm_limit:m.rpm_limit||null,allowed_models:m.allowed_models||[]};console.log("Setting form values:",e),v.setFieldsValue(e)}else v.resetFields(),v.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,m,f,v,h.defaultRole,h.roleOptions]);let y=async e=>{try{b(!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}},{});console.log("Submitting form data:",t),await Promise.resolve(c(t)),v.resetFields()}catch(e){console.error("Form submission error:",e)}finally{b(!1)}};return(0,t.jsx)(s.Modal,{title:h.title||("add"===f?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:d,children:(0,t.jsxs)(n.Form,{form:v,onFinish:y,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.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)(a.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(r.Text,{children:"OR"})}),h.showUserId&&(0,t.jsx)(n.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(a.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"===f&&m&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(p=m.role,h.roleOptions.find(e=>e.value===p)?.label||p),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(i.Select,{children:"edit"===f&&m?[...h.roleOptions.filter(e=>e.value===m.role),...h.roleOptions.filter(e=>e.value!==m.role)].map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))})}),h.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)(a.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(u.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});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(l.Button,{onClick:d,className:"mr-2",disabled:g,children:"Cancel"}),(0,t.jsx)(l.Button,{type:"default",htmlType:"submit",loading:g,children:"add"===f?g?"Adding...":"Add Member":g?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var t=e.i(843476),r=e.i(100486),a=e.i(827252),l=e.i(213205),n=e.i(771674),s=e.i(464571),i=e.i(770914),o=e.i(291542),u=e.i(262218),d=e.i(592968),c=e.i(898586),m=e.i(902555);let{Text:f}=c.Typography;function h({members:e,canEdit:c,onEdit:h,onDelete:p,onAddMember:v,roleColumnTitle:g="Role",roleTooltip:b,extraColumns:y=[],showDeleteForMember:x,emptyText:w}){let S=[{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)(u.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(f,{children:e||"-"})},{title:b?(0,t.jsxs)(i.Space,{direction:"horizontal",children:[g,(0,t.jsx)(d.Tooltip,{title:b,children:(0,t.jsx)(a.InfoCircleOutlined,{})})]}):g,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(i.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(r.CrownOutlined,{}):(0,t.jsx)(n.UserOutlined,{}),(0,t.jsx)(f,{style:{textTransform:"capitalize"},children:e||"-"})]})},...y,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,r)=>c?(0,t.jsxs)(i.Space,{children:[(0,t.jsx)(m.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(r)}),(!x||x(r))&&(0,t.jsx)(m.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>p(r)})]}):null}];return(0,t.jsxs)(i.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:S,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}),v&&c&&(0,t.jsx)(s.Button,{icon:(0,t.jsx)(l.UserAddOutlined,{}),type:"primary",onClick:v,children:"Add Member"})]})}e.s(["default",()=>h])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e79e33b8b366ae69.js b/litellm/proxy/_experimental/out/_next/static/chunks/e79e33b8b366ae69.js deleted file mode 100644 index a987d4d9ec..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/e79e33b8b366ae69.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,446891,836991,e=>{"use strict";var t=e.i(843476),r=e.i(464571),a=e.i(326373),l=e.i(94629),s=e.i(360820),n=e.i(871943),i=e.i(271645);let o=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,o],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:i})=>{let c=[{key:"asc",label:"Ascending",icon:(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,t.jsx)(o,{className:"h-4 w-4"})}];return(0,t.jsx)(a.Dropdown,{menu:{items:c,onClick:({key:e})=>{"asc"===e?i("asc"):"desc"===e?i("desc"):"reset"===e&&i(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,t.jsx)(r.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"}):(0,t.jsx)(l.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891)},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ArrowLeftOutlined",0,s],447566)},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var l=e.i(464571),s=e.i(311451),n=e.i(199133),i=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[h,m]=(0,r.useState)(!1),[f,p]=(0,r.useState)(u),[g,b]=(0,r.useState)({}),[y,v]=(0,r.useState)({}),[w,x]=(0,r.useState)({}),[C,S]=(0,r.useState)({}),j=(0,r.useCallback)((0,i.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){v(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);b(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),b(e=>({...e,[t.name]:[]}))}finally{v(e=>({...e,[t.name]:!1}))}}},300),[]),k=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!C[e.name]){v(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");b(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),b(t=>({...t,[e.name]:[]}))}finally{v(t=>({...t,[e.name]:!1}))}}},[C]);(0,r.useEffect)(()=>{h&&e.forEach(e=>{e.isSearchable&&!C[e.name]&&k(e)})},[h,e,k,C]);let M=(e,t)=>{let r={...f,[e]:t};p(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>m(!h),className:"flex items-center gap-2",children:d}),(0,t.jsx)(l.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),h&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,l=e.find(e=>e.label===r||e.name===r);return l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:l.label||l.name}),l.isSearchable?(0,t.jsx)(n.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${l.label||l.name}...`,value:f[l.name]||void 0,onChange:e=>M(l.name,e),onOpenChange:e=>{e&&l.isSearchable&&!C[l.name]&&k(l)},onSearch:e=>{x(t=>({...t,[l.name]:e})),l.searchFn&&j(e,l)},filterOption:!1,loading:y[l.name],options:g[l.name]||[],allowClear:!0,notFoundContent:y[l.name]?"Loading...":"No results found"}):l.options?(0,t.jsx)(n.Select,{className:"w-full",placeholder:`Select ${l.label||l.name}...`,value:f[l.name]||void 0,onChange:e=>M(l.name,e),allowClear:!0,children:l.options.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))}):l.customComponent?(a=l.customComponent,(0,t.jsx)(a,{value:f[l.name]||void 0,onChange:e=>M(l.name,e??""),placeholder:`Select ${l.label||l.name}...`,allFilters:f})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${l.label||l.name}...`,value:f[l.name]||"",onChange:e=>M(l.name,e.target.value),allowClear:!0})]},l.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let l of e){let e=l?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=l?.organization_id??l?.org_id;s&&"string"==typeof s&&r.add(s.trim());let n=l?.user_id;if(n&&"string"==typeof n){let e=l?.user?.user_email||n;a.set(n,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let l=new Set,s=new Set,n=new Map,i=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=i?.keys||[],c=i?.total_pages??1;r(o,l,s,n);let u=Math.min(c,10)-1;if(u>0){let i=Array.from({length:u},(r,l)=>(0,t.keyListCall)(e,null,a,null,null,null,l+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(i)))"fulfilled"===e.status&&r(e.value?.keys||[],l,s,n)}return{keyAliases:Array.from(l).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(n.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},l=async(e,r)=>{if(!e)return[];try{let a=[],l=1,s=!0;for(;s;){let n=await (0,t.teamListCall)(e,r||null,null);a=[...a,...n],l{if(!e)return[];try{let r=[],a=1,l=!0;for(;l;){let s=await (0,t.organizationListCall)(e);r=[...r,...s],a{"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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ReloadOutlined",0,s],91979)},625901,e=>{"use strict";var t=e.i(266027),r=e.i(621482),a=e.i(243652),l=e.i(764205),s=e.i(135214);let n=(0,a.createQueryKeys)("models"),i=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let c=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:r,userRole:a}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,r,a,!0,null,!0,!1,"expand"),enabled:!!(e&&r&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:n,userRole:i}=(0,s.default)();return(0,r.useInfiniteQuery)({queryKey:c.list({filters:{...n&&{userId:n},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:r})=>await (0,l.modelInfoCall)(a,n,i,r,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,r=50,a,i,o,c,u)=>{let{accessToken:d,userId:h,userRole:m}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({filters:{...h&&{userId:h},...m&&{userRole:m},page:e,size:r,...a&&{search:a},...i&&{modelId:i},...o&&{teamId:o},...c&&{sortBy:c},...u&&{sortOrder:u}}}),queryFn:async()=>await (0,l.modelInfoCall)(d,h,m,e,r,a,i,o,c,u),enabled:!!(d&&h&&m)})}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),a=e.i(371330),l=e.i(271645),s=e.i(394487),n=e.i(503269),i=e.i(214520),o=e.i(746725),c=e.i(914189),u=e.i(144279),d=e.i(294316),h=e.i(601893),m=e.i(140721),f=e.i(942803),p=e.i(233538),g=e.i(694421),b=e.i(700020),y=e.i(35889),v=e.i(998348),w=e.i(722678);let x=(0,l.createContext)(null);x.displayName="GroupContext";let C=l.Fragment,S=Object.assign((0,b.forwardRefWithAs)(function(e,t){var C;let S=(0,l.useId)(),j=(0,f.useProvidedId)(),k=(0,h.useDisabled)(),{id:M=j||`headlessui-switch-${S}`,disabled:E=k||!1,checked:N,defaultChecked:R,onChange:O,name:T,value:P,form:D,autoFocus:I=!1,...F}=e,L=(0,l.useContext)(x),[$,_]=(0,l.useState)(null),K=(0,l.useRef)(null),A=(0,d.useSyncRefs)(K,t,null===L?null:L.setSwitch,_),z=(0,i.useDefaultValue)(R),[B,H]=(0,n.useControllable)(N,O,null!=z&&z),G=(0,o.useDisposables)(),[q,Q]=(0,l.useState)(!1),U=(0,c.useEvent)(()=>{Q(!0),null==H||H(!B),G.nextFrame(()=>{Q(!1)})}),V=(0,c.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),U()}),W=(0,c.useEvent)(e=>{e.key===v.Keys.Space?(e.preventDefault(),U()):e.key===v.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),Y=(0,c.useEvent)(e=>e.preventDefault()),X=(0,w.useLabelledBy)(),J=(0,y.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:I}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:E}),{pressed:ea,pressProps:el}=(0,s.useActivePress)({disabled:E}),es=(0,l.useMemo)(()=>({checked:B,disabled:E,hover:et,focus:Z,active:ea,autofocus:I,changing:q}),[B,et,Z,ea,E,q,I]),en=(0,b.mergeProps)({id:M,ref:A,role:"switch",type:(0,u.useResolveButtonType)(e,$),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":B,"aria-labelledby":X,"aria-describedby":J,disabled:E||void 0,autoFocus:I,onClick:V,onKeyUp:W,onKeyPress:Y},ee,er,el),ei=(0,l.useCallback)(()=>{if(void 0!==z)return null==H?void 0:H(z)},[H,z]),eo=(0,b.useRender)();return l.default.createElement(l.default.Fragment,null,null!=T&&l.default.createElement(m.FormFields,{disabled:E,data:{[T]:P||"on"},overrides:{type:"checkbox",checked:B},form:D,onReset:ei}),eo({ourProps:en,theirProps:F,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,l.useState)(null),[s,n]=(0,w.useLabels)(),[i,o]=(0,y.useDescriptions)(),c=(0,l.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),u=(0,b.useRender)();return l.default.createElement(o,{name:"Switch.Description",value:i},l.default.createElement(n,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},l.default.createElement(x.Provider,{value:c},u({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:w.Label,Description:y.Description});var j=e.i(888288),k=e.i(95779),M=e.i(444755),E=e.i(673706),N=e.i(829087);let R=(0,E.makeClassName)("Switch"),O=l.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:s=!1,onChange:n,color:i,name:o,error:c,errorMessage:u,disabled:d,required:h,tooltip:m,id:f}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:i?(0,E.getColorClassNames)(i,k.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,E.getColorClassNames)(i,k.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[b,y]=(0,j.default)(s,a),[v,w]=(0,l.useState)(!1),{tooltipProps:x,getReferenceProps:C}=(0,N.useTooltip)(300);return l.default.createElement("div",{className:"flex flex-row items-center justify-start"},l.default.createElement(N.default,Object.assign({text:m},x)),l.default.createElement("div",Object.assign({ref:(0,E.mergeRefs)([r,x.refs.setReference]),className:(0,M.tremorTwMerge)(R("root"),"flex flex-row relative h-5")},p,C),l.default.createElement("input",{type:"checkbox",className:(0,M.tremorTwMerge)(R("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:h,checked:b,onChange:e=>{e.preventDefault()}}),l.default.createElement(S,{checked:b,onChange:e=>{y(e),null==n||n(e)},disabled:d,className:(0,M.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",d?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:f},l.default.createElement("span",{className:(0,M.tremorTwMerge)(R("sr-only"),"sr-only")},"Switch ",b?"on":"off"),l.default.createElement("span",{"aria-hidden":"true",className:(0,M.tremorTwMerge)(R("background"),b?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")}),l.default.createElement("span",{"aria-hidden":"true",className:(0,M.tremorTwMerge)(R("round"),b?(0,M.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",v?(0,M.tremorTwMerge)("ring-2",g.ringColor):"")}))),c&&u?l.default.createElement("p",{className:(0,M.tremorTwMerge)(R("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});O.displayName="Switch",e.s(["Switch",()=>O],793130)},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),l=e.i(682830),s=e.i(269200),n=e.i(427612),i=e.i(64848),o=e.i(942232),c=e.i(496020),u=e.i(977572);function d({data:e=[],columns:d,onRowClick:h,renderSubComponent:m,renderChildRows:f,getRowCanExpand:p,isLoading:g=!1,loadingMessage:b="🚅 Loading logs...",noDataMessage:y="No logs found",enableSorting:v=!1}){let w=!!(m||f)&&!!p,[x,C]=(0,r.useState)([]),S=(0,a.useReactTable)({data:e,columns:d,...v&&{state:{sorting:x},onSortingChange:C,enableSortingRemoval:!1},...w&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,l.getCoreRowModel)(),...v&&{getSortedRowModel:(0,l.getSortedRowModel)()},...w&&{getExpandedRowModel:(0,l.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(n.TableHead,{children:S.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let r=v&&e.column.getCanSort(),l=e.column.getIsSorted();return(0,t.jsx)(i.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===l?"↑":"desc"===l?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:g?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})}):S.getRowModel().rows.length>0?S.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${h?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>h?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),w&&e.getIsExpanded()&&f&&f({row:e}),w&&e.getIsExpanded()&&m&&!f&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:m({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:y})})})})})]})})}e.s(["DataTable",()=>d])},888288,e=>{"use strict";var t=e.i(271645);let r=(e,r)=>{let a=void 0!==r,[l,s]=(0,t.useState)(e);return[a?r:l,e=>{a||s(e)}]};e.s(["default",()=>r])},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:n,accessToken:i,disabled:o})=>{let[c,u]=(0,r.useState)([]),[d,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(i){h(!0);try{let e=await (0,l.getGuardrailsList)(i);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{h(!1)}}})()},[i]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:s,loading:d,className:n,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),a=e.i(199133),l=e.i(764205);function s(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:n,className:i,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,h]=(0,r.useState)([]),[m,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){f(!0);try{let e=await (0,l.getPoliciesList)(o);e.policies&&(h(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{f(!1)}}})()},[o,u]),(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:n,loading:m,className:i,allowClear:!0,options:s(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>s])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),l=e.i(915823),s=e.i(619273),n=class extends l.Subscribable{#e;#t=void 0;#r;#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,s.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.hashKey)(t.mutationKey)!==(0,s.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.#l(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#l(),this.#s()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#l(){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}}#s(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=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,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},i=e.i(912598);function o(e,r){let l=(0,i.useQueryClient)(r),[o]=t.useState(()=>new n(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(s.noop)},[o]);if(c.error&&(0,s.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ClockCircleOutlined",0,s],637235)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let r=e.i(264042).Row;e.s(["Row",0,r],621192)},214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,l]=(0,t.useState)([]),{accessToken:s,userId:n,userRole:i}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{l(await (0,a.fetchTeams)(s,n,i,null))})()},[s,n,i]),{teams:e,setTeams:l}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let l=t(e);return isNaN(a)?r(e,NaN):(a&&l.setDate(l.getDate()+a),l)}function l(e,a){let l=t(e);if(isNaN(a))return r(e,NaN);if(!a)return l;let s=l.getDate(),n=r(e,l.getTime());return(n.setMonth(l.getMonth()+a+1,0),s>=n.getDate())?n:(l.setFullYear(n.getFullYear(),n.getMonth(),s),l)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>l],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(908286),s=e.i(242064),n=e.i(246422),i=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["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"],d=function(e,t){let a,l,s;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(l={},u.forEach(r=>{l[`${e}-align-${r}`]=t.align===r}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(s={},c.forEach(r=>{s[`${e}-justify-${r}`]=t.justify===r}),s)))},h=(0,n.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,l=(0,i.mergeToken)(e,{flexGapSM:t,flexGap:r,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,r={};return o.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(l)]},()=>({}),{resetStyle:!1});var m=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 f=t.default.forwardRef((e,n)=>{let{prefixCls:i,rootClassName:o,className:c,style:u,flex:f,gap:p,vertical:g=!1,component:b="div",children:y}=e,v=m(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:w,direction:x,getPrefixCls:C}=t.default.useContext(s.ConfigContext),S=C("flex",i),[j,k,M]=h(S),E=null!=g?g:null==w?void 0:w.vertical,N=(0,r.default)(c,o,null==w?void 0:w.className,S,k,M,d(S,e),{[`${S}-rtl`]:"rtl"===x,[`${S}-gap-${p}`]:(0,l.isPresetSize)(p),[`${S}-vertical`]:E}),R=Object.assign(Object.assign({},null==w?void 0:w.style),u);return f&&(R.flex=f),p&&!(0,l.isPresetSize)(p)&&(R.gap=p),j(t.default.createElement(b,Object.assign({ref:n,className:N,style:R},(0,a.default)(v,["justify","wrap","align"])),y))});e.s(["Flex",0,f],525720)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e7cc7b98b893b20d.js b/litellm/proxy/_experimental/out/_next/static/chunks/e7cc7b98b893b20d.js deleted file mode 100644 index 24f9fb3c7e..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/e7cc7b98b893b20d.js +++ /dev/null @@ -1,231 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,952683,e=>{"use strict";var t=e.i(843476),s=e.i(902739),a=e.i(161059),l=e.i(213970),r=e.i(105278),i=e.i(271645),n=e.i(994388),o=e.i(304967),d=e.i(269200),c=e.i(942232),m=e.i(977572),u=e.i(427612),p=e.i(64848),x=e.i(496020),h=e.i(389083),g=e.i(599724),y=e.i(212931),j=e.i(560445),f=e.i(592968),b=e.i(981339),_=e.i(790848),v=e.i(245704),w=e.i(764205),N=e.i(808613),k=e.i(199133),S=e.i(311451),C=e.i(280898),T=e.i(91739),I=e.i(262218),F=e.i(312361),L=e.i(28651),A=e.i(888259),P=e.i(826910),M=e.i(438957),D=e.i(983561),E=e.i(477189),O=e.i(827252),z=e.i(364769),R=e.i(135214),B=e.i(355619),q=e.i(663435),$=e.i(362024),U=e.i(770914),V=e.i(464571),H=e.i(646563),G=e.i(564897);let K={basic:{key:"basic",title:"Basic Information",defaultExpanded:!0,fields:[{name:"name",label:"Display Name",type:"text",required:!0,placeholder:"e.g., Customer Support Agent"},{name:"description",label:"Description",type:"textarea",required:!0,placeholder:"Describe what this agent does...",rows:3},{name:"url",label:"URL",type:"url",required:!1,placeholder:"http://localhost:9999/",tooltip:"Base URL where the agent is hosted (optional)"},{name:"version",label:"Version",type:"text",placeholder:"1.0.0",defaultValue:"1.0.0"},{name:"protocolVersion",label:"Protocol Version",type:"text",placeholder:"1.0",defaultValue:"1.0"}]},skills:{key:"skills",title:"Skills",fields:[{name:"skills",label:"Skills",type:"list",defaultValue:[]}]},capabilities:{key:"capabilities",title:"Capabilities",fields:[{name:"streaming",label:"Streaming",type:"switch",defaultValue:!1},{name:"pushNotifications",label:"Push Notifications",type:"switch"},{name:"stateTransitionHistory",label:"State Transition History",type:"switch"}]},optional:{key:"optional",title:"Optional Settings",fields:[{name:"iconUrl",label:"Icon URL",type:"url",placeholder:"https://example.com/icon.png"},{name:"documentationUrl",label:"Documentation URL",type:"url",placeholder:"https://docs.example.com"},{name:"supportsAuthenticatedExtendedCard",label:"Supports Authenticated Extended Card",type:"switch"}]},litellm:{key:"litellm",title:"LiteLLM Parameters",fields:[{name:"model",label:"Model (Optional)",type:"text"},{name:"make_public",label:"Make Public",type:"switch"}]},cost:{key:"cost",title:"Cost Configuration",fields:[{name:"cost_per_query",label:"Cost Per Query ($)",type:"text",placeholder:"0.0",tooltip:"Fixed cost per query"},{name:"input_cost_per_token",label:"Input Cost Per Token ($)",type:"text",placeholder:"0.000001",tooltip:"Cost per input token"},{name:"output_cost_per_token",label:"Output Cost Per Token ($)",type:"text",placeholder:"0.000002",tooltip:"Cost per output token"}]},tracing:{key:"tracing",title:"Tracing",fields:[{name:"enable_tracing",label:"Enable Tracing",type:"switch",defaultValue:!1,tooltip:"Enable request tracing for this agent"}]}},W="Skill ID",Q=!0,Y="e.g., hello_world",J="Skill Name",X=!0,Z="e.g., Returns hello world",ee="Description",et=!0,es="What this skill does",ea=2,el="Tags (comma-separated)",er=!0,ei="e.g., hello world, greeting",en="Examples (comma-separated)",eo="e.g., hi, hello world",ed=(e,t)=>{let s={agent_name:e.agent_name,agent_card_params:{protocolVersion:e.protocolVersion||"1.0",name:e.name||e.agent_name,description:e.description||"",url:e.url||"",version:e.version||"1.0.0",defaultInputModes:t?.agent_card_params?.defaultInputModes||["text"],defaultOutputModes:t?.agent_card_params?.defaultOutputModes||["text"],capabilities:{streaming:!0===e.streaming,...void 0!==e.pushNotifications&&{pushNotifications:e.pushNotifications},...void 0!==e.stateTransitionHistory&&{stateTransitionHistory:e.stateTransitionHistory}},skills:e.skills||[],...e.iconUrl&&{iconUrl:e.iconUrl},...e.documentationUrl&&{documentationUrl:e.documentationUrl},...void 0!==e.supportsAuthenticatedExtendedCard&&{supportsAuthenticatedExtendedCard:e.supportsAuthenticatedExtendedCard}}},a={};if(e.model&&(a.model=e.model),void 0!==e.make_public&&(a.make_public=e.make_public),e.cost_per_query&&(a.cost_per_query=parseFloat(e.cost_per_query)),e.input_cost_per_token&&(a.input_cost_per_token=parseFloat(e.input_cost_per_token)),e.output_cost_per_token&&(a.output_cost_per_token=parseFloat(e.output_cost_per_token)),Object.keys(a).length>0&&(s.litellm_params=a),null!=e.tpm_limit&&(s.tpm_limit=e.tpm_limit),null!=e.rpm_limit&&(s.rpm_limit=e.rpm_limit),null!=e.session_tpm_limit&&(s.session_tpm_limit=e.session_tpm_limit),null!=e.session_rpm_limit&&(s.session_rpm_limit=e.session_rpm_limit),Array.isArray(e.static_headers)&&e.static_headers.length>0){let t={};e.static_headers.forEach(e=>{let s=e?.header?.trim();s&&(t[s]=e?.value??"")}),Object.keys(t).length>0&&(s.static_headers=t)}return Array.isArray(e.extra_headers)&&e.extra_headers.length>0&&(s.extra_headers=e.extra_headers),s},ec=e=>{let t=e.agent_card_params?.skills?.map(e=>({...e,tags:e.tags,examples:e.examples||[]}))||[];return{agent_name:e.agent_name,name:e.agent_card_params?.name,description:e.agent_card_params?.description,url:e.agent_card_params?.url,version:e.agent_card_params?.version,protocolVersion:e.agent_card_params?.protocolVersion,streaming:e.agent_card_params?.capabilities?.streaming,pushNotifications:e.agent_card_params?.capabilities?.pushNotifications,stateTransitionHistory:e.agent_card_params?.capabilities?.stateTransitionHistory,skills:t,iconUrl:e.agent_card_params?.iconUrl,documentationUrl:e.agent_card_params?.documentationUrl,supportsAuthenticatedExtendedCard:e.agent_card_params?.supportsAuthenticatedExtendedCard,model:e.litellm_params?.model,make_public:e.litellm_params?.make_public,cost_per_query:e.litellm_params?.cost_per_query,input_cost_per_token:e.litellm_params?.input_cost_per_token,output_cost_per_token:e.litellm_params?.output_cost_per_token,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,session_tpm_limit:e.session_tpm_limit,session_rpm_limit:e.session_rpm_limit,static_headers:e.static_headers?Object.entries(e.static_headers).map(([e,t])=>({header:e,value:t})):[],extra_headers:e.extra_headers??[]}},em=()=>(0,t.jsx)(t.Fragment,{children:K.cost.fields.map(e=>(0,t.jsx)(N.Form.Item,{label:e.label,name:e.name,tooltip:e.tooltip,children:(0,t.jsx)(S.Input,{placeholder:e.placeholder,type:"number",step:"0.000001"})},e.name))}),{Panel:eu}=$.Collapse,ep=({showAgentName:e=!0,visiblePanels:s})=>{let a=e=>!s||s.includes(e);return(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)(N.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter a unique agent name"}],tooltip:"Unique identifier for the agent",children:(0,t.jsx)(S.Input,{placeholder:"e.g., customer-support-agent"})}),(0,t.jsxs)($.Collapse,{defaultActiveKey:["basic"],style:{marginBottom:16},children:[a(K.basic.key)&&(0,t.jsx)(eu,{header:`${K.basic.title} (Required)`,children:K.basic.fields.map(e=>(0,t.jsx)(N.Form.Item,{label:e.label,name:e.name,rules:e.required?[{required:!0,message:`Please enter ${e.label.toLowerCase()}`}]:void 0,tooltip:e.tooltip,children:"textarea"===e.type?(0,t.jsx)(S.Input.TextArea,{rows:e.rows,placeholder:e.placeholder}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.basic.key),a(K.skills.key)&&(0,t.jsx)(eu,{header:`${K.skills.title} (Required)`,children:(0,t.jsx)(N.Form.List,{name:"skills",children:(e,{add:s,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(e=>(0,t.jsxs)("div",{style:{marginBottom:16,padding:16,border:"1px solid #d9d9d9",borderRadius:4},children:[(0,t.jsx)(N.Form.Item,{...e,label:W,name:[e.name,"id"],rules:[{required:Q,message:"Required"}],children:(0,t.jsx)(S.Input,{placeholder:Y})}),(0,t.jsx)(N.Form.Item,{...e,label:J,name:[e.name,"name"],rules:[{required:X,message:"Required"}],children:(0,t.jsx)(S.Input,{placeholder:Z})}),(0,t.jsx)(N.Form.Item,{...e,label:ee,name:[e.name,"description"],rules:[{required:et,message:"Required"}],children:(0,t.jsx)(S.Input.TextArea,{rows:ea,placeholder:es})}),(0,t.jsx)(N.Form.Item,{...e,label:el,name:[e.name,"tags"],rules:[{required:er,message:"Required"}],getValueFromEvent:e=>e.target.value.split(",").map(e=>e.trim()),getValueProps:e=>({value:Array.isArray(e)?e.join(", "):e}),children:(0,t.jsx)(S.Input,{placeholder:ei})}),(0,t.jsx)(N.Form.Item,{...e,label:en,name:[e.name,"examples"],getValueFromEvent:e=>e.target.value.split(",").map(e=>e.trim()).filter(e=>e),getValueProps:e=>({value:Array.isArray(e)?e.join(", "):""}),children:(0,t.jsx)(S.Input,{placeholder:eo})}),(0,t.jsx)(V.Button,{type:"link",danger:!0,onClick:()=>a(e.name),icon:(0,t.jsx)(G.MinusCircleOutlined,{}),children:"Remove Skill"})]},e.key)),(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(H.PlusOutlined,{}),style:{width:"100%"},children:"Add Skill"})]})})},K.skills.key),a(K.capabilities.key)&&(0,t.jsx)(eu,{header:K.capabilities.title,children:K.capabilities.fields.map(e=>(0,t.jsx)(N.Form.Item,{label:e.label,name:e.name,valuePropName:"checked",children:(0,t.jsx)(_.Switch,{})},e.name))},K.capabilities.key),a(K.optional.key)&&(0,t.jsx)(eu,{header:K.optional.title,children:K.optional.fields.map(e=>(0,t.jsx)(N.Form.Item,{label:e.label,name:e.name,valuePropName:"switch"===e.type?"checked":void 0,children:"switch"===e.type?(0,t.jsx)(_.Switch,{}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.optional.key),a(K.cost.key)&&(0,t.jsx)(eu,{header:K.cost.title,children:(0,t.jsx)(em,{})},K.cost.key),a(K.litellm.key)&&(0,t.jsx)(eu,{header:K.litellm.title,children:K.litellm.fields.map(e=>(0,t.jsx)(N.Form.Item,{label:e.label,name:e.name,valuePropName:"switch"===e.type?"checked":void 0,children:"switch"===e.type?(0,t.jsx)(_.Switch,{}):(0,t.jsx)(S.Input,{placeholder:e.placeholder})},e.name))},K.litellm.key),a("auth_headers")&&(0,t.jsxs)(eu,{header:"Authentication Headers",children:[(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Static Headers"," ",(0,t.jsx)(f.Tooltip,{title:"Headers always sent to the backend agent, regardless of the client request. Admin-configured, static wins on conflict.",children:(0,t.jsx)(O.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,t.jsx)(N.Form.List,{name:"static_headers",children:(e,{add:s,remove:a})=>(0,t.jsxs)(t.Fragment,{children:[e.map(({key:e,name:s,...l})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(N.Form.Item,{...l,name:[s,"header"],rules:[{required:!0,message:"Header name required"}],children:(0,t.jsx)(S.Input,{placeholder:"Header name (e.g. Authorization)",style:{width:220}})}),(0,t.jsx)(N.Form.Item,{...l,name:[s,"value"],rules:[{required:!0,message:"Value required"}],children:(0,t.jsx)(S.Input,{placeholder:"Value (e.g. Bearer token123)",style:{width:260}})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>a(s),style:{color:"#ff4d4f"}})]},e)),(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>s(),icon:(0,t.jsx)(H.PlusOutlined,{}),style:{width:"100%"},children:"Add Static Header"})]})})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Forward Client Headers"," ",(0,t.jsx)(f.Tooltip,{title:"Header names to extract from the client's request and forward to the agent. Type a name and press Enter.",children:(0,t.jsx)(O.InfoCircleOutlined,{style:{color:"#8c8c8c"}})})]}),name:"extra_headers",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"e.g. x-api-key, Authorization",tokenSeparators:[","]})})]},"auth_headers")]})]})},{Panel:ex}=$.Collapse,eh=(e,t)=>{let s={...t.litellm_params_template||{}};for(let a of t.credential_fields){let t=e[a.key];t&&!1!==a.include_in_litellm_params&&(s[a.key]=t)}if(e.cost_per_query&&(s.cost_per_query=parseFloat(e.cost_per_query)),e.input_cost_per_token&&(s.input_cost_per_token=parseFloat(e.input_cost_per_token)),e.output_cost_per_token&&(s.output_cost_per_token=parseFloat(e.output_cost_per_token)),t.model_template){let a=t.model_template;for(let s of t.credential_fields){let t=`{${s.key}}`;a.includes(t)&&e[s.key]&&(a=a.replace(t,e[s.key]))}s.model=a}let a={agent_name:e.agent_name,agent_card_params:{protocolVersion:"1.0",name:e.display_name||e.agent_name,description:e.description||`${t.agent_type_display_name} agent`,url:e.api_base||"",version:"1.0.0",defaultInputModes:["text"],defaultOutputModes:["text"],capabilities:{streaming:!0},skills:[{id:"chat",name:"Chat",description:"General chat capability",tags:["chat","conversation"]}]},litellm_params:s};return null!=e.tpm_limit&&(a.tpm_limit=e.tpm_limit),null!=e.rpm_limit&&(a.rpm_limit=e.rpm_limit),null!=e.session_tpm_limit&&(a.session_tpm_limit=e.session_tpm_limit),null!=e.session_rpm_limit&&(a.session_rpm_limit=e.session_rpm_limit),a},eg=({agentTypeInfo:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter a unique agent name"}],tooltip:"Unique identifier for the agent",children:(0,t.jsx)(S.Input,{placeholder:"e.g., my-langgraph-agent"})}),(0,t.jsx)(N.Form.Item,{label:"Description",name:"description",tooltip:"Brief description of what this agent does",children:(0,t.jsx)(S.Input.TextArea,{rows:2,placeholder:"Describe what this agent does..."})}),e.credential_fields.map(e=>(0,t.jsx)(N.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:`Please enter ${e.label}`}]:void 0,tooltip:e.tooltip,initialValue:e.default_value,children:"password"===e.field_type?(0,t.jsx)(S.Input.Password,{placeholder:e.placeholder||""}):"textarea"===e.field_type?(0,t.jsx)(S.Input.TextArea,{rows:3,placeholder:e.placeholder||""}):"select"===e.field_type&&e.options?(0,t.jsx)(k.Select,{placeholder:e.placeholder||"",children:e.options.map(e=>(0,t.jsx)(k.Select.Option,{value:e,children:e},e))}):(0,t.jsx)(S.Input,{placeholder:e.placeholder||""})},e.key)),(0,t.jsx)($.Collapse,{style:{marginBottom:16},children:(0,t.jsx)(ex,{header:K.cost.title,children:(0,t.jsx)(em,{})},K.cost.key)})]});var ey=e.i(75921),ej=e.i(390605),ef=e.i(891547);let{Step:eb}=C.Steps,e_="custom",ev=({visible:e,onClose:s,accessToken:a,onSuccess:l,teams:r})=>{let o,d,{userId:c,userRole:m}=(0,R.default)(),[u]=N.Form.useForm(),[p,x]=(0,i.useState)(0),[h,g]=(0,i.useState)(!1),[j,f]=(0,i.useState)("a2a"),[b,v]=(0,i.useState)([]),[$,U]=(0,i.useState)(!1),[V,H]=(0,i.useState)("create_new"),[G,W]=(0,i.useState)(""),[Q,Y]=(0,i.useState)([]),[J,X]=(0,i.useState)([]),[Z,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)(!1),[ea,el]=(0,i.useState)([]),[er,ei]=(0,i.useState)(!1),[en,eo]=(0,i.useState)([]),[ec,em]=(0,i.useState)(!1),[eu,ex]=(0,i.useState)(""),[ev,ew]=(0,i.useState)(null),[eN,ek]=(0,i.useState)(null),[eS,eC]=(0,i.useState)(!1),[eT,eI]=(0,i.useState)(!1),[eF,eL]=(0,i.useState)(null),[eA,eP]=(0,i.useState)(null);(0,i.useEffect)(()=>{(async()=>{U(!0);try{let e=await (0,w.getAgentCreateMetadata)();v(e)}catch(e){console.error("Error fetching agent metadata:",e)}finally{U(!1)}})()},[]),(0,i.useEffect)(()=>{3===p&&a&&0===J.length&&(async()=>{es(!0);try{let e=await (0,w.keyListCall)(a,null,null,null,null,null,1,100);X(e?.keys||[])}catch(e){console.error("Error fetching keys:",e)}finally{es(!1)}})()},[p,a]),(0,i.useEffect)(()=>{if(1!==p&&3!==p||!a||!c||!m)return;let e=!1;return ei(!0),(0,w.modelAvailableCall)(a,c,m).then(t=>{e||el((t?.data??(Array.isArray(t)?t:[])).map(e=>e.id??e.model_name).filter(Boolean))}).catch(t=>{e||console.error("Error fetching models:",t)}).finally(()=>{e||ei(!1)}),()=>{e=!0}},[p,a,c,m]),(0,i.useEffect)(()=>{if(1!==p||!a)return;let e=!1;return em(!0),(0,w.getAgentsList)(a).then(t=>{e||eo((t?.agents??[]).map(e=>({agent_id:e.agent_id,agent_name:e.agent_name})))}).catch(t=>{e||console.error("Error fetching agents:",t)}).finally(()=>{e||em(!1)}),()=>{e=!0}},[p,a]);let eM=b.find(e=>e.agent_type===j),eD=async()=>{try{if(0===p){await u.validateFields(["agent_name"]);let e=u.getFieldValue("agent_name");e&&!G&&W(`${e}-key`)}x(e=>e+1)}catch{}},eE=async()=>{if(!a)return void A.default.error("No access token available");g(!0);try{await u.validateFields();let e={...u.getFieldsValue(!0)},t=(e=>{if(j===e_)return{agent_name:e.agent_name,agent_card_params:{protocolVersion:"1.0",name:e.agent_name,description:e.description||"",url:"",version:"1.0.0",defaultInputModes:["text"],defaultOutputModes:["text"],capabilities:{streaming:!1},skills:[]}};if("a2a"===j)return ed(e);if(eM?.use_a2a_form_fields){let t=ed(e);for(let s of(eM.litellm_params_template&&(t.litellm_params={...t.litellm_params,...eM.litellm_params_template}),eM.credential_fields)){let a=e[s.key];a&&!1!==s.include_in_litellm_params&&(t.litellm_params[s.key]=a)}return t}return eM?eh(e,eM):null})(e);if(!t){A.default.error("Failed to build agent data"),g(!1);return}let s=e.allowed_mcp_servers_and_groups,r=e.mcp_tool_permissions||{},i=e.entitlement_models||[],n=e.entitlement_agents||[];(s?.servers?.length>0||s?.accessGroups?.length>0||Object.keys(r).length>0||i.length>0||n.length>0)&&(t.object_permission={},s?.servers?.length>0&&(t.object_permission.mcp_servers=s.servers),s?.accessGroups?.length>0&&(t.object_permission.mcp_access_groups=s.accessGroups),Object.keys(r).length>0&&(t.object_permission.mcp_tool_permissions=r),i.length>0&&(t.object_permission.models=i),n.length>0&&(t.object_permission.agents=n)),(eS||eT)&&(t.litellm_params||(t.litellm_params={}),eS&&(t.litellm_params.require_trace_id_on_calls_to_agent=!0),eT&&(t.litellm_params.require_trace_id_on_calls_by_agent=!0,eF&&(t.litellm_params.max_iterations=eF),eA&&(t.litellm_params.max_budget_per_session=eA)));let o=e.guardrails||[];o.length>0&&(t.litellm_params||(t.litellm_params={}),t.litellm_params.guardrails=o);let d=e.team_id||null;d&&(t.team_id=d);let c=await (0,w.createAgentCall)(a,t),m=c.agent_id,p=c.agent_name||e.agent_name||m;if(ex(p),"create_new"===V&&G){let e=await (0,w.keyCreateForAgentCall)(a,m,G,Q,void 0,d);ew(e.key||null)}else if("existing_key"===V){if(!Z){A.default.error("Please select an existing key to assign"),g(!1);return}await (0,w.keyUpdateCall)(a,{key:Z,agent_id:m});let e=J.find(e=>e.token===Z);ek(e?.key_alias||Z.slice(0,12)+"…")}x(4),l()}catch(t){console.error("Error creating agent:",t);let e=t instanceof Error?t.message:String(t);A.default.error(e?`Failed to create agent: ${e}`:"Failed to create agent")}finally{g(!1)}},eO=()=>{u.resetFields(),f("a2a"),x(0),H("create_new"),W(""),Y([]),ee(null),ex(""),ew(null),ek(null),eC(!1),eI(!1),eL(null),eP(null),s()},ez=e=>{f(e),u.resetFields()},eR=j===e_?null:eM?.logo_url||b.find(e=>"a2a"===e.agent_type)?.logo_url;return(0,t.jsx)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[eR&&p<1&&(0,t.jsx)("img",{src:eR,alt:"Agent",className:"w-6 h-6 object-contain"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Agent"})]}),open:e,onCancel:eO,footer:null,width:900,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)(C.Steps,{current:p,size:"small",className:"mb-8",children:[(0,t.jsx)(eb,{title:"Configure"}),(0,t.jsx)(eb,{title:"Entitlements"}),(0,t.jsx)(eb,{title:"Governance"}),(0,t.jsx)(eb,{title:"Agent Management"}),(0,t.jsx)(eb,{title:"Ready"})]}),(0,t.jsxs)(N.Form,{form:u,layout:"vertical",initialValues:"a2a"===j?{...(o={defaultInputModes:["text"],defaultOutputModes:["text"]},Object.values(K).forEach(e=>{e.fields.forEach(e=>{void 0!==e.defaultValue&&(o[e.name]=e.defaultValue)})}),o),allowed_mcp_servers_and_groups:{servers:[],accessGroups:[]},mcp_tool_permissions:{},entitlement_models:[],entitlement_agents:[],guardrails:[]}:{allowed_mcp_servers_and_groups:{servers:[],accessGroups:[]},mcp_tool_permissions:{},entitlement_models:[],entitlement_agents:[],guardrails:[]},className:"space-y-4",children:[0===p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Agent Type"}),required:!0,tooltip:"Select the type of agent you want to create",children:(0,t.jsx)(k.Select,{value:j,onChange:ez,size:"large",style:{width:"100%"},optionLabelProp:"label",dropdownRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,(0,t.jsx)(F.Divider,{style:{margin:"4px 0"}}),(0,t.jsxs)("div",{className:"px-2 py-1",children:[(0,t.jsx)("div",{className:"text-xs text-gray-400 font-medium mb-1 uppercase tracking-wide px-2",children:"Not listed?"}),(0,t.jsxs)("div",{className:`flex items-center gap-3 px-2 py-2 rounded cursor-pointer transition-colors ${j===e_?"bg-amber-50":"hover:bg-amber-50"}`,onClick:()=>ez(e_),children:[(0,t.jsx)(E.AppstoreOutlined,{className:"text-amber-600 text-lg"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-amber-700",children:"Custom / Other"}),(0,t.jsx)(I.Tag,{color:"orange",style:{fontSize:10,padding:"0 4px"},children:"GENERIC"})]}),(0,t.jsx)("div",{className:"text-xs text-amber-600",children:"For agents that don't follow a standard protocol — just needs a virtual key"})]})]})]})]}),children:b.map(e=>(0,t.jsx)(k.Select.Option,{value:e.agent_type,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("img",{src:e.logo_url||"",alt:"",className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e.agent_type_display_name})]}),children:(0,t.jsxs)("div",{className:"flex items-center gap-3 py-1",children:[(0,t.jsx)("img",{src:e.logo_url||"",alt:e.agent_type_display_name,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium",children:e.agent_type_display_name}),e.description&&(0,t.jsx)("div",{className:"text-xs text-gray-500",children:e.description})]})]})},e.agent_type))})}),(0,t.jsx)("div",{className:"mt-4",children:j===e_?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(N.Form.Item,{label:"Agent Name",name:"agent_name",rules:[{required:!0,message:"Please enter an agent name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. my-custom-agent"})}),(0,t.jsx)(N.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(S.Input.TextArea,{placeholder:"Describe what this agent does…",rows:3})})]}):"a2a"===j?(0,t.jsx)(ep,{showAgentName:!0}):eM?.use_a2a_form_fields?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ep,{showAgentName:!0}),eM.credential_fields.length>0&&(0,t.jsxs)("div",{className:"mt-4 p-4 border border-gray-200 rounded-lg",children:[(0,t.jsxs)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:[eM.agent_type_display_name," Settings"]}),eM.credential_fields.map(e=>(0,t.jsx)(N.Form.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:`Please enter ${e.label}`}]:void 0,tooltip:e.tooltip,initialValue:e.default_value,children:"password"===e.field_type?(0,t.jsx)(S.Input.Password,{placeholder:e.placeholder||""}):(0,t.jsx)(S.Input,{placeholder:e.placeholder||""})},e.key))]})]}):eM?(0,t.jsx)(eg,{agentTypeInfo:eM}):null})]}),1===p&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Configure which models, agents, and MCP tools this agent is allowed to use. Leave fields empty to allow all (subject to key/team permissions)."}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allowed Models"}),name:"entitlement_models",tooltip:"Restrict which models this agent can call. Leave empty to allow all.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:er?"Loading models...":"Select models (leave empty for all)",tokenSeparators:[","],loading:er,showSearch:!0,options:ea.map(e=>({label:(0,B.getModelDisplayName)(e),value:e}))})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allowed Agents (Sub-Agents)"}),name:"entitlement_agents",tooltip:"Restrict which other agents this agent can invoke as sub-agents. Leave empty to allow all.",children:(0,t.jsx)(k.Select,{mode:"multiple",style:{width:"100%"},placeholder:ec?"Loading agents...":"Select agents (leave empty for all)",loading:ec,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:en.map(e=>({label:e.agent_name,value:e.agent_id}))})}),(0,t.jsx)(F.Divider,{className:"my-2"}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(O.InfoCircleOutlined,{title:"Select which MCP servers or access groups this agent can access",style:{marginLeft:"4px"}})]}),name:"allowed_mcp_servers_and_groups",initialValue:{servers:[],accessGroups:[]},children:(0,t.jsx)(ey.default,{onChange:e=>u.setFieldValue("allowed_mcp_servers_and_groups",e),value:u.getFieldValue("allowed_mcp_servers_and_groups")||{servers:[],accessGroups:[]},accessToken:a??"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(N.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(S.Input,{type:"hidden"})}),(0,t.jsx)(N.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-4",children:(0,t.jsx)(ej.default,{accessToken:a??"",selectedServers:u.getFieldValue("allowed_mcp_servers_and_groups")?.servers??[],toolPermissions:u.getFieldValue("mcp_tool_permissions")??{},onChange:e=>u.setFieldsValue({mcp_tool_permissions:e})})})})]}),2===p&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Tracing"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Require x-litellm-trace-id on calls TO this agent"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Only accept this agent being invoked with a trace-id (e.g. when used as a sub-agent)."})]}),(0,t.jsx)(_.Switch,{checked:eS,onChange:eC})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Require x-litellm-trace-id on calls BY this agent"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Requires LLM/MCP calls made by this agent to include x-litellm-trace-id for session tracking."})]}),(0,t.jsx)(_.Switch,{checked:eT,onChange:e=>{eI(e),e||(eL(null),eP(null))}})]})]})]}),(0,t.jsx)(F.Divider,{className:"my-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Budgets & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4",children:[!eT&&(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg text-sm text-yellow-800",children:'Enable "Require x-litellm-trace-id on calls BY this agent" in Tracing to configure budgets and rate limits.'}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Session Budgets"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Max Iterations"}),(0,t.jsx)(L.InputNumber,{className:"w-full",min:1,placeholder:"e.g. 25",disabled:!eT,value:eF,onChange:e=>eL(e)}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Hard cap on LLM calls per session"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Max Budget Per Session ($)"}),(0,t.jsx)(L.InputNumber,{className:"w-full",min:.01,step:.5,placeholder:"e.g. 5.00",disabled:!eT,value:eA,onChange:e=>eP(e)}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Max spend per trace before returning 429"})]})]}),(0,t.jsx)(F.Divider,{className:"my-2"}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Agent Rate Limits"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Global rate limits applied across all callers of this agent."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(N.Form.Item,{label:"TPM Limit",name:"tpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 100000",disabled:!eT})}),(0,t.jsx)(N.Form.Item,{label:"RPM Limit",name:"rpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 100",disabled:!eT})})]}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700 mt-4",children:"Per-Session Rate Limits"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Rate limits per session (x-litellm-trace-id). Each session gets its own counters."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(N.Form.Item,{label:"Session TPM Limit",name:"session_tpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 10000",disabled:!eT})}),(0,t.jsx)(N.Form.Item,{label:"Session RPM Limit",name:"session_rpm_limit",className:"mb-0",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"e.g. 20",disabled:!eT})})]})]})]}),(0,t.jsx)(F.Divider,{className:"my-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:"Guardrails"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Apply guardrails to this agent. Selected guardrails will run on all calls made by this agent."}),(0,t.jsx)(N.Form.Item,{name:"guardrails",initialValue:[],children:(0,t.jsx)(ef.default,{accessToken:a??"",value:u.getFieldValue("guardrails")??[],onChange:e=>u.setFieldsValue({guardrails:e})})})]})]}),3===p&&(d=u.getFieldValue("agent_name")||"your-agent",(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-center mb-6",children:(0,t.jsx)(I.Tag,{icon:(0,t.jsx)(D.RobotOutlined,{}),color:"purple",className:"px-3 py-1 text-sm",children:d})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Assign to Team"}),name:"team_id",tooltip:"Optionally assign this agent to a team. The agent and its key will belong to the selected team.",children:(0,t.jsx)(q.default,{})}),(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:`p-4 border-2 rounded-lg cursor-pointer transition-colors ${"create_new"===V?"border-indigo-600 bg-indigo-50":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>H("create_new"),children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 flex-1",children:[(0,t.jsx)(T.Radio,{value:"create_new",checked:"create_new"===V,onChange:()=>H("create_new")}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.KeyOutlined,{className:"text-indigo-600"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"Create a new key for this agent"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"A dedicated key scoped to this agent."}),"create_new"===V&&(0,t.jsx)("div",{className:"mt-3 space-y-3",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-600 block mb-1",children:"Key Name"}),(0,t.jsx)(S.Input,{value:G,onChange:e=>W(e.target.value),placeholder:"e.g. my-agent-key"})]})})]})]}),(0,t.jsx)(I.Tag,{color:"green",children:"Recommended"})]})}),(0,t.jsx)("div",{className:`p-4 border-2 rounded-lg cursor-pointer transition-colors ${"existing_key"===V?"border-indigo-600 bg-indigo-50":"border-gray-200 bg-white hover:border-gray-300"}`,onClick:()=>H("existing_key"),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(T.Radio,{value:"existing_key",checked:"existing_key"===V,onChange:()=>H("existing_key")}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.KeyOutlined,{className:"text-gray-500"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"Assign an existing key"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Re-assign a key you already have to this agent."}),"existing_key"===V&&(0,t.jsx)("div",{className:"mt-3",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(k.Select,{showSearch:!0,style:{width:"100%"},placeholder:"Search by key name…",loading:et,value:Z,onChange:e=>ee(e),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:J.map(e=>({label:e.key_alias||e.token?.slice(0,12)+"…",value:e.token}))})})]})]})})]}),(0,t.jsx)("div",{className:"text-center mt-4",children:(0,t.jsx)("button",{type:"button",className:"text-sm text-gray-500 underline hover:text-gray-700",onClick:()=>H("skip"),children:"Skip for now — I'll assign a key later"})})]})),4===p&&(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)(P.CheckCircleFilled,{className:"text-5xl text-green-500 mb-4",style:{fontSize:48}}),(0,t.jsx)("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Agent Created!"}),(0,t.jsx)("div",{className:"flex justify-center mb-4",children:(0,t.jsx)(I.Tag,{icon:(0,t.jsx)(D.RobotOutlined,{}),color:"purple",className:"px-3 py-1 text-sm",children:eu})}),ev&&(0,t.jsx)("div",{className:"mt-4 text-left max-w-md mx-auto",children:(0,t.jsx)(z.default,{apiKey:ev})}),eN&&(0,t.jsxs)("p",{className:"text-sm text-gray-600 mt-2",children:["Key ",(0,t.jsx)("span",{className:"font-medium",children:eN})," has been assigned to this agent."]}),!ev&&!eN&&"skip"===V&&(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"No key assigned. You can create one from the Virtual Keys page."})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-6 border-t border-gray-100 mt-6",children:[(0,t.jsx)("div",{children:p>0&&p<4&&(0,t.jsx)("button",{type:"button",onClick:()=>{x(e=>Math.max(0,e-1))},className:"text-sm text-gray-600 border border-gray-300 rounded px-4 py-2 hover:bg-gray-50",children:"← Back"})}),(0,t.jsxs)("div",{className:"flex gap-3",children:[p<4&&(0,t.jsx)(n.Button,{variant:"secondary",onClick:eO,children:"Cancel"}),0===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),1===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),2===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eD,children:"Next →"}),3===p&&(0,t.jsx)(n.Button,{variant:"primary",loading:h,onClick:eE,children:h?"Creating...":"Create Agent →"}),4===p&&(0,t.jsx)(n.Button,{variant:"primary",onClick:eO,children:"Done"})]})]})]})})};var ew=e.i(708347),eN=e.i(629569),ek=e.i(197647),eS=e.i(653824),eC=e.i(881073),eT=e.i(404206),eI=e.i(723731),eF=e.i(482725),eL=e.i(869216),eA=e.i(530212);let eP=({agent:e})=>{let s=e.litellm_params;return s?.cost_per_query===void 0&&s?.input_cost_per_token===void 0&&s?.output_cost_per_token===void 0?null:(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(eN.Title,{children:"Cost Configuration"}),(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:[void 0!==s.cost_per_query&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Cost Per Query",children:["$",s.cost_per_query]}),void 0!==s.input_cost_per_token&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Input Cost Per Token",children:["$",s.input_cost_per_token]}),void 0!==s.output_cost_per_token&&(0,t.jsxs)(eL.Descriptions.Item,{label:"Output Cost Per Token",children:["$",s.output_cost_per_token]})]})]})},eM=e=>{let t=e.litellm_params?.model||"",s=e.litellm_params?.custom_llm_provider;return"langgraph"===s?"langgraph":"azure_ai"===s?"azure_ai_foundry":"bedrock"===s?"bedrock_agentcore":t.startsWith("langgraph/")?"langgraph":t.startsWith("azure_ai/agents/")?"azure_ai_foundry":t.startsWith("bedrock/agentcore/")?"bedrock_agentcore":"a2a"},eD=(e,t)=>{let s={agent_name:e.agent_name,description:e.agent_card_params?.description||""};for(let a of t.credential_fields)if(!1!==a.include_in_litellm_params)s[a.key]=e.litellm_params?.[a.key]||a.default_value||"";else if(t.model_template&&e.litellm_params?.model){let l=e.litellm_params.model,r=t.model_template.split("/"),i=l.split("/");r.forEach((e,t)=>{e===`{${a.key}}`&&i[t]&&(s[a.key]=i[t])})}return s.cost_per_query=e.litellm_params?.cost_per_query,s.input_cost_per_token=e.litellm_params?.input_cost_per_token,s.output_cost_per_token=e.litellm_params?.output_cost_per_token,s},eE=({agentId:e,onClose:s,accessToken:a,isAdmin:l})=>{let[r,d]=(0,i.useState)(null),[c,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(!1),[y]=N.Form.useForm(),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)("a2a");(0,i.useEffect)(()=>{(async()=>{try{let e=await (0,w.getAgentCreateMetadata)();f(e)}catch(e){console.error("Error fetching agent metadata:",e)}})()},[]),(0,i.useEffect)(()=>{v()},[e,a]);let v=async()=>{if(a){m(!0);try{let t=await (0,w.getAgentInfo)(a,e);d(t);let s=eM(t);if(_(s),"a2a"===s)y.setFieldsValue(ec(t));else{let e=j.find(e=>e.agent_type===s);e?y.setFieldsValue(eD(t,e)):y.setFieldsValue(ec(t))}}catch(e){console.error("Error fetching agent info:",e),A.default.error("Failed to load agent information")}finally{m(!1)}}};(0,i.useEffect)(()=>{if(r&&j.length>0){let e=eM(r);if("a2a"!==e){let t=j.find(t=>t.agent_type===e);t&&y.setFieldsValue(eD(r,t))}}},[j,r]);let k=j.find(e=>e.agent_type===b),C=async t=>{if(a&&r){h(!0);try{let s;"a2a"===b?s=ed(t,r):k?(s=eh(t,k)).agent_name=t.agent_name:s=ed(t,r),await (0,w.patchAgentCall)(a,e,s),A.default.success("Agent updated successfully"),p(!1),v()}catch(e){console.error("Error updating agent:",e),A.default.error("Failed to update agent")}finally{h(!1)}}};if(c)return(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!r)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"text-center",children:"Agent not found"}),(0,t.jsx)(n.Button,{onClick:s,className:"mt-4",children:"Back to Agents List"})]});let T=e=>e?new Date(e).toLocaleString():"-";return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eA.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Agents"}),(0,t.jsx)(eN.Title,{children:r.agent_name||"Unnamed Agent"}),(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:r.agent_id})]}),(0,t.jsxs)(eS.TabGroup,{children:[(0,t.jsxs)(eC.TabList,{className:"mb-4",children:[(0,t.jsx)(ek.Tab,{children:"Overview"},"overview"),l?(0,t.jsx)(ek.Tab,{children:"Settings"},"settings"):(0,t.jsx)(t.Fragment,{})]}),(0,t.jsxs)(eI.TabPanels,{children:[(0,t.jsxs)(eT.TabPanel,{children:[(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Agent ID",children:r.agent_id}),(0,t.jsx)(eL.Descriptions.Item,{label:"Agent Name",children:r.agent_name}),(0,t.jsx)(eL.Descriptions.Item,{label:"Display Name",children:r.agent_card_params?.name||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:r.agent_card_params?.description||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"URL",children:r.agent_card_params?.url||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Version",children:r.agent_card_params?.version||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Protocol Version",children:r.agent_card_params?.protocolVersion||"-"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Streaming",children:r.agent_card_params?.capabilities?.streaming?"Yes":"No"}),r.agent_card_params?.capabilities?.pushNotifications&&(0,t.jsx)(eL.Descriptions.Item,{label:"Push Notifications",children:"Yes"}),r.agent_card_params?.capabilities?.stateTransitionHistory&&(0,t.jsx)(eL.Descriptions.Item,{label:"State Transition History",children:"Yes"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Skills",children:[r.agent_card_params?.skills?.length||0," configured"]}),r.litellm_params?.model&&(0,t.jsx)(eL.Descriptions.Item,{label:"Model",children:r.litellm_params.model}),r.litellm_params?.make_public!==void 0&&(0,t.jsx)(eL.Descriptions.Item,{label:"Make Public",children:r.litellm_params.make_public?"Yes":"No"}),r.agent_card_params?.iconUrl&&(0,t.jsx)(eL.Descriptions.Item,{label:"Icon URL",children:r.agent_card_params.iconUrl}),r.agent_card_params?.documentationUrl&&(0,t.jsx)(eL.Descriptions.Item,{label:"Documentation URL",children:r.agent_card_params.documentationUrl}),(0,t.jsx)(eL.Descriptions.Item,{label:"TPM Limit",children:r.tpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"RPM Limit",children:r.rpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Session TPM Limit",children:r.session_tpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Session RPM Limit",children:r.session_rpm_limit??"Unlimited"}),(0,t.jsx)(eL.Descriptions.Item,{label:"Created At",children:T(r.created_at)}),(0,t.jsx)(eL.Descriptions.Item,{label:"Updated At",children:T(r.updated_at)})]}),r.object_permission&&(r.object_permission.mcp_servers?.length||r.object_permission.mcp_access_groups?.length||r.object_permission.mcp_tool_permissions&&Object.keys(r.object_permission.mcp_tool_permissions).length>0)&&(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(eN.Title,{children:"MCP Tool Permissions"}),(0,t.jsxs)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:[r.object_permission.mcp_servers&&r.object_permission.mcp_servers.length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"MCP Servers",children:r.object_permission.mcp_servers.join(", ")}),r.object_permission.mcp_access_groups&&r.object_permission.mcp_access_groups.length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"MCP Access Groups",children:r.object_permission.mcp_access_groups.join(", ")}),r.object_permission.mcp_tool_permissions&&Object.keys(r.object_permission.mcp_tool_permissions).length>0&&(0,t.jsx)(eL.Descriptions.Item,{label:"Tool permissions per server",children:(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(r.object_permission.mcp_tool_permissions).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"font-medium",children:[e,":"]})," ",Array.isArray(s)?s.join(", "):String(s)]},e))})})]})]}),(0,t.jsx)(eP,{agent:r}),r.agent_card_params?.skills&&r.agent_card_params.skills.length>0&&(0,t.jsxs)("div",{style:{marginTop:24},children:[(0,t.jsx)(eN.Title,{children:"Skills"}),(0,t.jsx)(eL.Descriptions,{bordered:!0,column:1,style:{marginTop:16},children:r.agent_card_params.skills.map((e,s)=>(0,t.jsx)(eL.Descriptions.Item,{label:e.name||`Skill ${s+1}`,children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"ID:"})," ",e.id]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Description:"})," ",e.description]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Tags:"})," ",Array.isArray(e.tags)?e.tags.join(", "):e.tags]}),e.examples&&e.examples.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Examples:"})," ",Array.isArray(e.examples)?e.examples.join(", "):e.examples]})]})},s))})]})]}),l&&(0,t.jsx)(eT.TabPanel,{children:(0,t.jsxs)(o.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eN.Title,{children:"Agent Settings"}),!u&&(0,t.jsx)(n.Button,{onClick:()=>p(!0),children:"Edit Settings"})]}),u?(0,t.jsxs)(N.Form,{form:y,layout:"vertical",onFinish:C,children:[(0,t.jsx)(N.Form.Item,{label:"Agent ID",children:(0,t.jsx)(S.Input,{value:r.agent_id,disabled:!0})}),"a2a"===b?(0,t.jsx)(ep,{showAgentName:!0}):k?(0,t.jsx)(eg,{agentTypeInfo:k}):(0,t.jsx)(ep,{showAgentName:!0}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(eN.Title,{className:"mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(N.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})}),(0,t.jsx)(N.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(N.Form.Item,{label:"Session TPM Limit",name:"session_tpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})}),(0,t.jsx)(N.Form.Item,{label:"Session RPM Limit",name:"session_rpm_limit",children:(0,t.jsx)(L.InputNumber,{className:"w-full",min:0,placeholder:"Unlimited"})})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,t.jsx)(V.Button,{onClick:()=>{p(!1),v()},children:"Cancel"}),(0,t.jsx)(n.Button,{loading:x,children:"Save Changes"})]})]}):(0,t.jsx)(g.Text,{children:'Click "Edit Settings" to modify agent configuration.'})]})})]})]})]})};var eO=e.i(727749),ez=e.i(500330),eR=e.i(902555);let eB=({accessToken:e,userRole:s,teams:a})=>{let[l,r]=(0,i.useState)([]),[N,k]=(0,i.useState)({}),[S,C]=(0,i.useState)(!1),[T,I]=(0,i.useState)(!1),[F,L]=(0,i.useState)(!1),[A,P]=(0,i.useState)(null),[M,D]=(0,i.useState)(null),[E,O]=(0,i.useState)(!1),z=!!s&&(0,ew.isAdminRole)(s),R=async t=>{if(e){I(!0);try{let s=await (0,w.getAgentsList)(e,t??E);r(s.agents||[])}catch(e){console.error("Error fetching agents:",e)}finally{I(!1)}}},B=async()=>{if(e)try{let{keys:t=[]}=await (0,w.keyListCall)(e,null,null,null,null,null,1,500),s={};for(let e of t){let t=e.agent_id;t&&!s[t]&&(s[t]={has_key:!0,key_alias:e.key_alias,token_prefix:e.token?`${e.token.slice(0,8)}…`:void 0})}k(s)}catch(e){console.error("Error fetching keys for agents:",e)}};(0,i.useEffect)(()=>{R()},[e]),(0,i.useEffect)(()=>{e&&l.length>0?B():0===l.length&&k({})},[e,l.length]);let q=async()=>{if(A&&e){L(!0);try{await (0,w.deleteAgentCall)(e,A.id),eO.default.success(`Agent "${A.name}" deleted successfully`),R()}catch(e){console.error("Error deleting agent:",e),eO.default.fromBackend("Failed to delete agent")}finally{L(!1),P(null)}}},$=[...l].sort((e,t)=>{let s=e.created_at?new Date(e.created_at).getTime():0;return(t.created_at?new Date(t.created_at).getTime():0)-s}),U=z?7:6;return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Agents"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"List of A2A-spec agents that are available to be used in your organization. Go to AI Hub, to make agents public."}),(0,t.jsx)(j.Alert,{message:"Why do agents need keys?",description:"Keys scope access to an agent and allow it to call MCP tools. Assign a key when creating an agent or from the Virtual Keys page.",type:"info",showIcon:!0,className:"mb-3"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-4",children:[z&&(0,t.jsx)(n.Button,{onClick:()=>{M&&D(null),C(!0)},disabled:!e,children:"+ Add New Agent"}),(0,t.jsx)(f.Tooltip,{title:"When enabled, only agents with reachable URLs are shown",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(v.CheckCircleOutlined,{className:E?"text-green-500":"text-gray-400"}),(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"Health Check"}),(0,t.jsx)(_.Switch,{size:"small",checked:E,onChange:e=>{O(e),R(e)},loading:T&&E})]})})]})]}),M?(0,t.jsx)(eE,{agentId:M,onClose:()=>D(null),accessToken:e,isAdmin:z}):(0,t.jsx)(o.Card,{children:T?(0,t.jsx)(b.Skeleton,{active:!0,paragraph:{rows:3}}):(0,t.jsxs)(d.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{children:"Agent Name"}),(0,t.jsx)(p.TableHeaderCell,{children:"Agent ID"}),(0,t.jsx)(p.TableHeaderCell,{children:"Spend (USD)"}),(0,t.jsx)(p.TableHeaderCell,{children:"Model"}),(0,t.jsx)(p.TableHeaderCell,{children:"Created"}),(0,t.jsx)(p.TableHeaderCell,{children:"Status"}),z&&(0,t.jsx)(p.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(c.TableBody,{children:0===$.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:U,children:(0,t.jsx)(g.Text,{className:"text-center",children:'No agents found. Click "+ Add New Agent" to create one.'})})}):$.map(e=>(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:e.agent_name})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(f.Tooltip,{title:e.agent_id,children:(0,t.jsxs)(n.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>D(e.agent_id),children:[e.agent_id.slice(0,7),"..."]})})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:(0,ez.formatNumberWithCommas)(e.spend,4)})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(h.Badge,{size:"xs",color:"blue",children:e.litellm_params?.model||"N/A"})}),(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"})}),(0,t.jsx)(m.TableCell,{children:N[e.agent_id]?.has_key?(0,t.jsx)(h.Badge,{color:"green",children:"Active"}):(0,t.jsx)(h.Badge,{color:"yellow",children:"Needs Setup"})}),z&&(0,t.jsx)(m.TableCell,{children:(0,t.jsx)(eR.default,{variant:"Delete",onClick:()=>{P({id:e.agent_id,name:e.agent_name})}})})]},e.agent_id))})]})}),(0,t.jsx)(ev,{visible:S,onClose:()=>{C(!1)},accessToken:e,onSuccess:()=>{R()},teams:a}),A&&(0,t.jsxs)(y.Modal,{title:"Delete Agent",open:null!==A,onOk:q,onCancel:()=>{P(null)},confirmLoading:F,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete agent: ",A.name,"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var eq=e.i(646050),e$=e.i(559061),eU=e.i(704308),eV=e.i(785242),eH=e.i(936578),eG=e.i(677667),eK=e.i(898667),eW=e.i(130643),eQ=e.i(779241),eY=e.i(752978),eJ=e.i(68155),eX=e.i(591935);let eZ=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))});var e0=e.i(836991);function e1({data:e,columns:s,isLoading:a=!1,loadingMessage:l="Loading...",emptyMessage:r="No data",getRowKey:i}){return(0,t.jsxs)(d.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsx)(x.TableRow,{children:s.map((e,s)=>(0,t.jsx)(p.TableHeaderCell,{style:{width:e.width},children:e.header},s))})}),(0,t.jsx)(c.TableBody,{children:a?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:s.length,className:"text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:l})})}):e.length>0?e.map((e,a)=>(0,t.jsx)(x.TableRow,{children:s.map((s,a)=>(0,t.jsx)(m.TableCell,{children:s.cell?s.cell(e):String(e[s.accessor]??"")},a))},i?i(e,a):a)):(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:s.length,className:"text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:r})})})})]})}var e2=e.i(916925);let e4=e=>{let t=Object.keys(e2.provider_map).find(t=>e2.provider_map[t]===e);if(t){let e=e2.Providers[t],s=e2.providerLogoMap[e];return{displayName:e,logo:s,enumKey:t}}return{displayName:e,logo:"",enumKey:null}},e5=e=>e2.provider_map[e]||null,e6=(e,t)=>{let s=e.target,a=s.parentElement;if(a){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=t.charAt(0),a.replaceChild(e,s)}},e3=({discountConfig:e,onDiscountChange:s,onRemoveProvider:a})=>{let[l,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(""),d=e=>{let t=parseFloat(n);!isNaN(t)&&t>=0&&t<=100&&s(e,(t/100).toString()),r(null),o("")},c=()=>{r(null),o("")},m=Object.entries(e).map(([e,t])=>({provider:e,discount:t})).sort((e,t)=>{let s=e4(e.provider).displayName,a=e4(t.provider).displayName;return s.localeCompare(a)});return(0,t.jsx)(e1,{data:m,columns:[{header:"Provider",cell:e=>{let{displayName:s,logo:a}=e4(e.provider);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,s)}),(0,t.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Discount Percentage",cell:e=>(0,t.jsx)("div",{className:"flex items-center gap-2",children:l===e.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eQ.TextInput,{value:n,onValueChange:o,onKeyDown:t=>{var s;return s=e.provider,void("Enter"===t.key?d(s):"Escape"===t.key&&c())},placeholder:"5",className:"w-20",autoFocus:!0}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"}),(0,t.jsx)(eY.Icon,{icon:eZ,size:"sm",onClick:()=>d(e.provider),className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,t.jsx)(eY.Icon,{icon:e0.XIcon,size:"sm",onClick:c,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(g.Text,{className:"font-medium",children:[(100*e.discount).toFixed(1),"%"]}),(0,t.jsx)(eY.Icon,{icon:eX.PencilAltIcon,size:"sm",onClick:()=>{var t,s;return t=e.provider,s=e.discount,void(r(t),o((100*s).toString()))},className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"250px"},{header:"Actions",cell:e=>{let{displayName:s}=e4(e.provider);return(0,t.jsx)(eY.Icon,{icon:eJ.TrashIcon,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider discounts configured"})},e8=({discountConfig:e,selectedProvider:s,newDiscount:a,onProviderChange:l,onDiscountChange:r,onAddProvider:i})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,t.jsx)(f.Tooltip,{title:"Select the LLM provider you want to configure a discount for",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select provider",value:s,onChange:l,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),children:Object.entries(e2.Providers).map(([s,a])=>{let l=e2.provider_map[s];return l&&e[l]?null:(0,t.jsx)(k.Select.Option,{value:s,label:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:e2.providerLogoMap[a],alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,a)}),(0,t.jsx)("span",{children:a})]})},s)})})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Discount Percentage",(0,t.jsx)(f.Tooltip,{title:"Enter a percentage value (e.g., 5 for 5% discount)",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a discount percentage"}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{placeholder:"5",value:a,onValueChange:r,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,t.jsx)(n.Button,{variant:"primary",onClick:i,disabled:!s||!a,children:"Add Provider Discount"})})]}),e7=({marginConfig:e,onMarginChange:s,onRemoveProvider:a})=>{let[l,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(""),[d,c]=(0,i.useState)(""),m=()=>{r(null),o(""),c("")},u=Object.entries(e).map(([e,t])=>({provider:e,margin:t})).sort((e,t)=>{if("global"===e.provider)return -1;if("global"===t.provider)return 1;let s=e4(e.provider).displayName,a=e4(t.provider).displayName;return s.localeCompare(a)});return(0,t.jsx)(e1,{data:u,columns:[{header:"Provider",cell:e=>{if("global"===e.provider)return(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsx)("span",{className:"font-medium",children:"Global (All Providers)"})});let{displayName:s,logo:a}=e4(e.provider);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,s)}),(0,t.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Margin",cell:e=>(0,t.jsx)("div",{className:"flex items-center gap-2",children:l===e.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{value:n,onValueChange:o,placeholder:"10",className:"w-20",autoFocus:!0}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"}),(0,t.jsx)("span",{className:"text-gray-400",children:"+"}),(0,t.jsx)("span",{className:"text-gray-600",children:"$"}),(0,t.jsx)(eQ.TextInput,{value:d,onValueChange:c,placeholder:"0.001",className:"w-24"})]}),(0,t.jsx)(eY.Icon,{icon:eZ,size:"sm",onClick:()=>{var t;let a,l;return t=e.provider,a=n?parseFloat(n):void 0,l=d?parseFloat(d):void 0,void(void 0!==a&&!isNaN(a)&&a>=0&&a<=1e3?void 0!==l&&!isNaN(l)&&l>=0?s(t,{percentage:a/100,fixed_amount:l}):s(t,a/100):void 0!==l&&!isNaN(l)&&l>=0&&s(t,{fixed_amount:l}),r(null),o(""),c(""))},className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,t.jsx)(eY.Icon,{icon:e0.XIcon,size:"sm",onClick:m,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Text,{className:"font-medium",children:(e=>{if("number"==typeof e)return`${(100*e).toFixed(1)}%`;let t=[];return void 0!==e.percentage&&t.push(`${(100*e.percentage).toFixed(1)}%`),void 0!==e.fixed_amount&&t.push(`$${e.fixed_amount.toFixed(6)}`),t.join(" + ")||"0%"})(e.margin)}),(0,t.jsx)(eY.Icon,{icon:eX.PencilAltIcon,size:"sm",onClick:()=>{var t,s;return t=e.provider,s=e.margin,void(r(t),"number"==typeof s?(o((100*s).toString()),c("")):(o(s.percentage?(100*s.percentage).toString():""),c(s.fixed_amount?s.fixed_amount.toString():"")))},className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"350px"},{header:"Actions",cell:e=>{let s="global"===e.provider?"Global":e4(e.provider).displayName;return(0,t.jsx)(eY.Icon,{icon:eJ.TrashIcon,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider margins configured"})},e9=({marginConfig:e,selectedProvider:s,marginType:a,percentageValue:l,fixedAmountValue:r,onProviderChange:i,onMarginTypeChange:o,onPercentageChange:d,onFixedAmountChange:c,onAddProvider:m})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,t.jsx)(f.Tooltip,{title:"Select 'Global' to apply margin to all providers, or select a specific provider",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,t.jsxs)(k.Select,{showSearch:!0,placeholder:"Select provider or 'Global'",value:s,onChange:i,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),children:[(0,t.jsx)(k.Select.Option,{value:"global",label:"Global (All Providers)",children:(0,t.jsx)("div",{className:"flex items-center space-x-2",children:(0,t.jsx)("span",{className:"font-medium",children:"Global (All Providers)"})})},"global"),Object.entries(e2.Providers).map(([s,a])=>{let l=e2.provider_map[s];return l&&e[l]?null:(0,t.jsx)(k.Select.Option,{value:s,label:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("img",{src:e2.providerLogoMap[a],alt:`${s} logo`,className:"w-5 h-5",onError:e=>e6(e,a)}),(0,t.jsx)("span",{children:a})]})},s)})]})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Margin Type",(0,t.jsx)(f.Tooltip,{title:"Choose how to apply the margin: percentage-based or fixed amount",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a margin type"}],children:(0,t.jsxs)(T.Radio.Group,{value:a,onChange:e=>o(e.target.value),className:"w-full",children:[(0,t.jsx)(T.Radio,{value:"percentage",children:"Percentage-based"}),(0,t.jsx)(T.Radio,{value:"fixed",children:"Fixed Amount"})]})}),"percentage"===a&&(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Margin Percentage",(0,t.jsx)(f.Tooltip,{title:"Enter a percentage value (e.g., 10 for 10% margin)",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a margin percentage"},{validator:(e,t)=>{if(!t)return Promise.reject(Error("Please enter a margin percentage"));let s=parseFloat(t);return isNaN(s)||s<0||s>1e3?Promise.reject(Error("Percentage must be between 0 and 1000")):Promise.resolve()}}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eQ.TextInput,{placeholder:"10",value:l,onValueChange:d,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,t.jsx)("span",{className:"text-gray-600",children:"%"})]})}),"fixed"===a&&(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Fixed Margin Amount",(0,t.jsx)(f.Tooltip,{title:"Enter a fixed amount in USD (e.g., 0.001 for $0.001 per request)",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a fixed amount"},{validator:(e,t)=>{if(!t)return Promise.reject(Error("Please enter a fixed amount"));let s=parseFloat(t);return isNaN(s)||s<0?Promise.reject(Error("Fixed amount must be non-negative")):Promise.resolve()}}],children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"$"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.001",value:r,onValueChange:c,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"})]})}),(0,t.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,t.jsx)(n.Button,{variant:"primary",onClick:m,disabled:!s||"percentage"===a&&!l||"fixed"===a&&!r,children:"Add Provider Margin"})})]});var te=e.i(291542),tt=e.i(955135),ts=e.i(175712);e.i(247167),e.i(62664);var ta=e.i(697539),tl=e.i(963188),tr=e.i(763731),ti=e.i(343794),tn=e.i(244009),to=e.i(242064),td=e.i(185793);let tc=e=>{let t,{value:s,formatter:a,precision:l,decimalSeparator:r,groupSeparator:n="",prefixCls:o}=e;if("function"==typeof a)t=a(s);else{let e=String(s),a=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(a&&"-"!==e){let e=a[1],s=a[2]||"0",d=a[4]||"";s=s.replace(/\B(?=(\d{3})+(?!\d))/g,n),"number"==typeof l&&(d=d.padEnd(l,"0").slice(0,l>0?l:0)),d&&(d=`${r}${d}`),t=[i.createElement("span",{key:"int",className:`${o}-content-value-int`},e,s),d&&i.createElement("span",{key:"decimal",className:`${o}-content-value-decimal`},d)]}else t=e}return i.createElement("span",{className:`${o}-content-value`},t)};var tm=e.i(183293),tu=e.i(246422),tp=e.i(838378);let tx=(0,tu.genStyleHooks)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:s,padding:a,colorTextDescription:l,titleFontSize:r,colorTextHeading:i,contentFontSize:n,fontFamily:o}=e;return{[t]:Object.assign(Object.assign({},(0,tm.resetComponent)(e)),{[`${t}-title`]:{marginBottom:s,color:l,fontSize:r},[`${t}-skeleton`]:{paddingTop:a},[`${t}-content`]:{color:i,fontSize:n,fontFamily:o,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:s},[`${t}-content-suffix`]:{marginInlineStart:s}}})}})((0,tp.mergeToken)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:s}=e;return{titleFontSize:s,contentFontSize:t}});var th=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[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])&&(s[a[l]]=e[a[l]]);return s};let tg=i.forwardRef((e,t)=>{let{prefixCls:s,className:a,rootClassName:l,style:r,valueStyle:n,value:o=0,title:d,valueRender:c,prefix:m,suffix:u,loading:p=!1,formatter:x,precision:h,decimalSeparator:g=".",groupSeparator:y=",",onMouseEnter:j,onMouseLeave:f}=e,b=th(e,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:_,direction:v,className:w,style:N}=(0,to.useComponentConfig)("statistic"),k=_("statistic",s),[S,C,T]=tx(k),I=i.createElement(tc,{decimalSeparator:g,groupSeparator:y,prefixCls:k,formatter:x,precision:h,value:o}),F=(0,ti.default)(k,{[`${k}-rtl`]:"rtl"===v},w,a,l,C,T),L=i.useRef(null);i.useImperativeHandle(t,()=>({nativeElement:L.current}));let A=(0,tn.default)(b,{aria:!0,data:!0});return S(i.createElement("div",Object.assign({},A,{ref:L,className:F,style:Object.assign(Object.assign({},N),r),onMouseEnter:j,onMouseLeave:f}),d&&i.createElement("div",{className:`${k}-title`},d),i.createElement(td.default,{paragraph:!1,loading:p,className:`${k}-skeleton`,active:!0},i.createElement("div",{style:n,className:`${k}-content`},m&&i.createElement("span",{className:`${k}-content-prefix`},m),c?c(I):I,u&&i.createElement("span",{className:`${k}-content-suffix`},u)))))}),ty=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];var tj=function(e,t){var s={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(s[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])&&(s[a[l]]=e[a[l]]);return s};let tf=e=>{let{value:t,format:s="HH:mm:ss",onChange:a,onFinish:l,type:r}=e,n=tj(e,["value","format","onChange","onFinish","type"]),o="countdown"===r,[d,c]=i.useState(null),m=(0,ta.useEvent)(()=>{let e=Date.now(),s=new Date(t).getTime();return c({}),null==a||a(o?s-e:e-s),!o||!(s{let e,t=()=>{e=(0,tl.default)(()=>{m()&&t()})};return t(),()=>tl.default.cancel(e)},[t,o]),i.useEffect(()=>{c({})},[]),i.createElement(tg,Object.assign({},n,{value:t,valueRender:e=>(0,tr.cloneElement)(e,{title:void 0}),formatter:(e,t)=>d?function(e,t,s){let a,l,r,i,n,o,{format:d=""}=t,c=new Date(e).getTime(),m=Date.now();return a=s?Math.max(c-m,0):Math.max(m-c,0),l=/\[[^\]]*]/g,r=(d.match(l)||[]).map(e=>e.slice(1,-1)),i=d.replace(l,"[]"),n=ty.reduce((e,[t,s])=>{if(e.includes(t)){let l=Math.floor(a/s);return a-=l*s,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return l.toString().padStart(t,"0")})}return e},i),o=0,n.replace(l,()=>{let e=r[o];return o+=1,e})}(e,Object.assign(Object.assign({},t),{format:s}),o):"-"}))},tb=i.memo(e=>i.createElement(tf,Object.assign({},e,{type:"countdown"})));tg.Timer=tf,tg.Countdown=tb;var t_=e.i(621192),tv=e.i(178654),tw=e.i(56456),tN=e.i(755151),tk=e.i(240647),tS=e.i(737434),tC=e.i(91500),tT=e.i(931067);let tI={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 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"}}]},name:"file-excel",theme:"outlined"};var tF=e.i(9583),tL=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:tI}))});let tA=e=>null==e?"-":0===e?"$0.00":e<.01?`$${e.toFixed(6)}`:e<1?`$${e.toFixed(4)}`:`$${(0,ez.formatNumberWithCommas)(e,2)}`,tP=e=>null==e?"-":(0,ez.formatNumberWithCommas)(e,0),tM=({multiResult:e})=>{let[s,a]=(0,i.useState)(!1),l=(0,i.useRef)(null),r=e.entries.some(e=>null!==e.result);return((0,i.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&a(!1)};return s&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[s]),r)?(0,t.jsxs)("div",{className:"relative inline-block",ref:l,children:[(0,t.jsx)(n.Button,{size:"xs",variant:"secondary",icon:tS.DownloadOutlined,onClick:()=>a(!s),children:"Export"}),s&&(0,t.jsxs)("div",{className:"absolute right-0 mt-1 w-44 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:[(0,t.jsxs)("button",{className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>{(e=>{let t=window.open("","_blank");if(!t)return alert("Please allow popups to export PDF");let s=e.entries.filter(e=>null!==e.result),a=s.length,l=` - - - - Multi-Model Cost Estimate Report - - - -

LLM Cost Estimate Report

-

${a} model${1!==a?"s":""} configured

- -
-

Combined Totals

-
-
-
Total Per Request
-
${tA(e.totals.cost_per_request)}
-
-
-
Total Daily
-
${tA(e.totals.daily_cost)}
-
-
-
Total Monthly
-
${tA(e.totals.monthly_cost)}
-
-
- ${e.totals.margin_per_request>0?` -
-
-
Margin/Request
-
${tA(e.totals.margin_per_request)}
-
-
-
Daily Margin
-
${tA(e.totals.daily_margin)}
-
-
-
Monthly Margin
-
${tA(e.totals.monthly_margin)}
-
-
- `:""} -
- -

Model Breakdown

- ${s.map(e=>{let t;return t=e.result,` -
-

${t.model} ${t.provider?`(${t.provider})`:""}

- -
-

Input Tokens per Request: ${tP(t.input_tokens)}

-

Output Tokens per Request: ${tP(t.output_tokens)}

- ${t.num_requests_per_day?`

Requests per Day: ${tP(t.num_requests_per_day)}

`:""} - ${t.num_requests_per_month?`

Requests per Month: ${tP(t.num_requests_per_month)}

`:""} -
- - - - - - ${null!==t.daily_cost?"":""} - ${null!==t.monthly_cost?"":""} - - - - - ${null!==t.daily_cost?``:""} - ${null!==t.monthly_cost?``:""} - - - - - ${null!==t.daily_cost?``:""} - ${null!==t.monthly_cost?``:""} - - - - - ${null!==t.daily_cost?``:""} - ${null!==t.monthly_cost?``:""} - - - - - ${null!==t.daily_cost?``:""} - ${null!==t.monthly_cost?``:""} - -
Cost TypePer RequestDailyMonthly
Input Cost${tA(t.input_cost_per_request)}${tA(t.daily_input_cost)}${tA(t.monthly_input_cost)}
Output Cost${tA(t.output_cost_per_request)}${tA(t.daily_output_cost)}${tA(t.monthly_output_cost)}
Margin/Fee${tA(t.margin_cost_per_request)}${tA(t.daily_margin_cost)}${tA(t.monthly_margin_cost)}
Total${tA(t.cost_per_request)}${tA(t.daily_cost)}${tA(t.monthly_cost)}
-
- `}).join("")} - - - - - `;t.document.write(l),t.document.close(),t.onload=()=>{t.print()}})(e),a(!1)},children:[(0,t.jsx)(tC.FilePdfOutlined,{className:"mr-3 text-red-500"}),"Export as PDF"]}),(0,t.jsxs)("button",{className:"flex items-center w-full px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>{(e=>{let t=e.entries.filter(e=>null!==e.result),s=[["LLM Multi-Model Cost Estimate Report"],["Generated",new Date().toLocaleString()],[""]];for(let a of(s.push(["COMBINED TOTALS"],["Total Per Request",e.totals.cost_per_request.toString()],["Total Daily",e.totals.daily_cost?.toString()||"-"],["Total Monthly",e.totals.monthly_cost?.toString()||"-"],["Margin Per Request",e.totals.margin_per_request.toString()],["Daily Margin",e.totals.daily_margin?.toString()||"-"],["Monthly Margin",e.totals.monthly_margin?.toString()||"-"],[""]),s.push(["Model","Provider","Input Tokens","Output Tokens","Requests/Day","Requests/Month","Cost/Request","Daily Cost","Monthly Cost","Input Cost/Req","Output Cost/Req","Margin/Req"]),t)){let e=a.result;s.push([e.model,e.provider||"-",e.input_tokens.toString(),e.output_tokens.toString(),e.num_requests_per_day?.toString()||"-",e.num_requests_per_month?.toString()||"-",e.cost_per_request.toString(),e.daily_cost?.toString()||"-",e.monthly_cost?.toString()||"-",e.input_cost_per_request.toString(),e.output_cost_per_request.toString(),e.margin_cost_per_request.toString()])}let a=new Blob([s.map(e=>e.map(e=>`"${e}"`).join(",")).join("\n")],{type:"text/csv;charset=utf-8;"}),l=window.URL.createObjectURL(a),r=document.createElement("a");r.href=l,r.download=`cost_estimate_multi_model_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(l)})(e),a(!1)},children:[(0,t.jsx)(tL,{className:"mr-3 text-green-600"}),"Export as CSV"]})]})]}):null},tD=e=>null==e?"-":0===e?"$0":e<1e-4?`$${e.toExponential(2)}`:e<1?`$${e.toFixed(4)}`:`$${(0,ez.formatNumberWithCommas)(e,2,!0)}`,tE=({result:e,loading:s,timePeriod:a})=>{let l="day"===a?"Daily":"Monthly",r="day"===a?e.daily_cost:e.monthly_cost,i="day"===a?e.daily_input_cost:e.monthly_input_cost,n="day"===a?e.daily_output_cost:e.monthly_output_cost,o="day"===a?e.daily_margin_cost:e.monthly_margin_cost,d="day"===a?e.num_requests_per_day:e.num_requests_per_month;return(0,t.jsxs)("div",{className:"space-y-3 bg-gray-50 p-4 rounded-lg",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-500 text-sm",children:[(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}),(0,t.jsx)("span",{children:"Updating..."})]}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Total/Request"}),(0,t.jsx)(g.Text,{className:"text-base font-semibold text-blue-600",children:tD(e.cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Input Cost"}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(e.input_cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Output Cost"}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(e.output_cost_per_request)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"text-xs text-gray-500 block",children:"Margin Fee"}),(0,t.jsx)(g.Text,{className:`text-sm ${e.margin_cost_per_request>0?"text-amber-600":""}`,children:tD(e.margin_cost_per_request)})]})]}),null!==r&&(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 pt-2 border-t border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Total (",null==d?"-":(0,ez.formatNumberWithCommas)(d,0,!0)," req)"]}),(0,t.jsx)(g.Text,{className:`text-base font-semibold ${"day"===a?"text-green-600":"text-purple-600"}`,children:tD(r)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Input"]}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(i)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Output"]}),(0,t.jsx)(g.Text,{className:"text-sm",children:tD(n)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(g.Text,{className:"text-xs text-gray-500 block",children:[l," Margin Fee"]}),(0,t.jsx)(g.Text,{className:`text-sm ${(o??0)>0?"text-amber-600":""}`,children:tD(o)})]})]}),(e.input_cost_per_token||e.output_cost_per_token)&&(0,t.jsxs)("div",{className:"text-xs text-gray-400 pt-2 border-t border-gray-200",children:["Token Pricing: "," ",e.input_cost_per_token&&(0,t.jsxs)("span",{children:["Input $",(0,ez.formatNumberWithCommas)(1e6*e.input_cost_per_token,2),"/1M"]}),e.input_cost_per_token&&e.output_cost_per_token&&" | ",e.output_cost_per_token&&(0,t.jsxs)("span",{children:["Output $",(0,ez.formatNumberWithCommas)(1e6*e.output_cost_per_token,2),"/1M"]})]})]})},tO=({multiResult:e,timePeriod:s})=>{let[a,l]=(0,i.useState)(new Set),r=e.entries.filter(e=>null!==e.result),o=e.entries.filter(e=>e.loading),d=e.entries.filter(e=>null!==e.error),c=r.length>0,m=o.length>0,u=d.length>0;if(!c&&!m&&!u)return(0,t.jsx)("div",{className:"py-6 text-center border border-dashed border-gray-300 rounded-lg bg-gray-50",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Select models above to see cost estimates"})});if(!c&&m&&!u)return(0,t.jsxs)("div",{className:"py-6 text-center",children:[(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0})}),(0,t.jsx)(g.Text,{className:"text-gray-500 block mt-2",children:"Calculating costs..."})]});if(!c&&u)return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-base font-semibold text-gray-900",children:"Cost Estimates"}),m&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})]}),d.map(e=>(0,t.jsxs)("div",{className:"text-sm text-red-600 bg-red-50 p-3 rounded-lg border border-red-200",children:[(0,t.jsxs)("span",{className:"font-medium",children:[e.entry.model||"Unknown model",": "]}),e.error]},e.entry.id))]});let p=e.totals.margin_per_request>0,x="day"===s?"Daily":"Monthly",h=[{title:"Model",dataIndex:"model",key:"model",render:(e,s)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e}),s.provider&&(0,t.jsx)(I.Tag,{color:"blue",className:"text-xs",children:s.provider}),s.loading&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})]}),s.error&&(0,t.jsxs)("div",{className:"text-xs text-red-600 bg-red-50 px-2 py-1 rounded",children:["⚠️ ",s.error]}),s.hasZeroCost&&!s.error&&(0,t.jsx)("div",{className:"text-xs text-amber-600 bg-amber-50 px-2 py-1 rounded",children:"⚠️ No pricing data found for this model. Set base_model in config."})]})},{title:"Per Request",dataIndex:"cost_per_request",key:"cost_per_request",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:"font-mono text-sm",children:tD(e)})},{title:"Margin Fee",dataIndex:"margin_cost_per_request",key:"margin_cost_per_request",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:`font-mono text-sm ${(e??0)>0?"text-amber-600":"text-gray-400"}`,children:tD(e)})},{title:x,dataIndex:"day"===s?"daily_cost":"monthly_cost",key:"period_cost",align:"right",render:(e,s)=>s.error?(0,t.jsx)("span",{className:"text-gray-400",children:"-"}):(0,t.jsx)("span",{className:"font-mono text-sm",children:tD(e)})},{title:"",key:"expand",width:40,render:(e,s)=>s.error?null:(0,t.jsx)(n.Button,{size:"xs",variant:"light",onClick:()=>{var e;return e=s.id,void l(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},className:"text-gray-400 hover:text-gray-600",children:a.has(s.id)?(0,t.jsx)(tN.DownOutlined,{}):(0,t.jsx)(tk.RightOutlined,{})})}],y=e.entries.filter(e=>e.entry.model).map(e=>({key:e.entry.id,id:e.entry.id,model:e.result?.model||e.entry.model,provider:e.result?.provider,cost_per_request:e.result?.cost_per_request??null,margin_cost_per_request:e.result?.margin_cost_per_request??null,daily_cost:e.result?.daily_cost??null,monthly_cost:e.result?.monthly_cost??null,error:e.error,loading:e.loading,hasZeroCost:e.result&&0===e.result.cost_per_request}));return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(F.Divider,{className:"my-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-base font-semibold text-gray-900",children:"Cost Estimates"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[m&&(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}),(0,t.jsx)(tM,{multiResult:e})]})]}),(0,t.jsxs)(ts.Card,{size:"small",className:"bg-gradient-to-r from-slate-50 to-blue-50 border-slate-200",children:[(0,t.jsxs)(t_.Row,{gutter:[16,8],children:[(0,t.jsx)(tv.Col,{xs:24,sm:12,children:(0,t.jsx)(tg,{title:(0,t.jsx)("span",{className:"text-xs",children:"Total Per Request"}),value:tD(e.totals.cost_per_request),valueStyle:{color:"#1890ff",fontSize:"18px",fontFamily:"monospace"}})}),(0,t.jsx)(tv.Col,{xs:24,sm:12,children:(0,t.jsx)(tg,{title:(0,t.jsxs)("span",{className:"text-xs",children:["Total ",x]}),value:tD("day"===s?e.totals.daily_cost:e.totals.monthly_cost),valueStyle:{color:"day"===s?"#52c41a":"#722ed1",fontSize:"18px",fontFamily:"monospace"}})})]}),p&&(0,t.jsxs)(t_.Row,{gutter:[16,8],className:"mt-3 pt-3 border-t border-slate-200",children:[(0,t.jsxs)(tv.Col,{xs:24,sm:12,children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Margin Fee/Request"}),(0,t.jsx)("div",{className:"text-sm font-mono text-amber-600",children:tD(e.totals.margin_per_request)})]}),(0,t.jsxs)(tv.Col,{xs:24,sm:12,children:[(0,t.jsxs)("div",{className:"text-xs text-gray-500",children:[x," Margin Fee"]}),(0,t.jsx)("div",{className:"text-sm font-mono text-amber-600",children:tD("day"===s?e.totals.daily_margin:e.totals.monthly_margin)})]})]})]}),y.length>0&&(0,t.jsx)(te.Table,{columns:h,dataSource:y,pagination:!1,size:"small",className:"border border-gray-200 rounded-lg",expandable:{expandedRowKeys:Array.from(a),expandedRowRender:e=>{let a=r.find(t=>t.entry.id===e.id);return a?.result?(0,t.jsx)("div",{className:"py-2",children:(0,t.jsx)(tE,{result:a.result,loading:a.loading,timePeriod:s})}):null},showExpandColumn:!1}})]})},tz=()=>({id:`entry-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,model:"",input_tokens:1e3,output_tokens:500,num_requests_per_day:void 0,num_requests_per_month:void 0}),tR=({accessToken:e,models:s})=>{let[a,l]=(0,i.useState)([tz()]),[r,n]=(0,i.useState)("month"),{debouncedFetchForEntry:o,removeEntry:d,getMultiModelResult:c}=function(e){let[t,s]=(0,i.useState)(new Map),a=(0,i.useRef)(new Map),l=(0,i.useCallback)(async t=>{if(!e||!t.model)return void s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:null}),s});s(e=>{let s=new Map(e),a=s.get(t.id);return s.set(t.id,{entry:t,result:a?.result??null,loading:!0,error:null}),s});try{let a=(0,w.getProxyBaseUrl)(),l=a?`${a}/cost/estimate`:"/cost/estimate",r={model:t.model,input_tokens:t.input_tokens||0,output_tokens:t.output_tokens||0,num_requests_per_day:t.num_requests_per_day||null,num_requests_per_month:t.num_requests_per_month||null},i=await fetch(l,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(i.ok){let e=await i.json();s(s=>{let a=new Map(s);return a.set(t.id,{entry:t,result:e,loading:!1,error:null}),a})}else{let e=await i.json(),a=e.detail?.error||e.detail||"Failed to estimate cost";s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:a}),s})}}catch(e){console.error("Error estimating cost:",e),s(e=>{let s=new Map(e);return s.set(t.id,{entry:t,result:null,loading:!1,error:"Network error"}),s})}},[e]),r=(0,i.useCallback)(e=>{let t=a.current.get(e.id);t&&clearTimeout(t);let s=setTimeout(()=>{l(e)},500);a.current.set(e.id,s)},[l]),n=(0,i.useCallback)(e=>{let t=a.current.get(e);t&&(clearTimeout(t),a.current.delete(e)),s(t=>{let s=new Map(t);return s.delete(e),s})},[]);return(0,i.useEffect)(()=>{let e=a.current;return()=>{e.forEach(e=>clearTimeout(e)),e.clear()}},[]),{debouncedFetchForEntry:r,removeEntry:n,getMultiModelResult:(0,i.useCallback)(e=>{let s=e.map(e=>{let s=t.get(e.id);return{entry:e,result:s?.result??null,loading:s?.loading??!1,error:s?.error??null}}),a=0,l=null,r=null,i=0,n=null,o=null;for(let e of s)e.result&&(a+=e.result.cost_per_request,i+=e.result.margin_cost_per_request,null!==e.result.daily_cost&&(l=(l??0)+e.result.daily_cost),null!==e.result.daily_margin_cost&&(n=(n??0)+e.result.daily_margin_cost),null!==e.result.monthly_cost&&(r=(r??0)+e.result.monthly_cost),null!==e.result.monthly_margin_cost&&(o=(o??0)+e.result.monthly_margin_cost));return{entries:s,totals:{cost_per_request:a,daily_cost:l,monthly_cost:r,margin_per_request:i,daily_margin:n,monthly_margin:o}}},[t])}}(e),m=(0,i.useCallback)((e,t,s)=>{l(a=>{let l=a.map(a=>a.id===e?{...a,[t]:s}:a),r=l.find(t=>t.id===e);return r&&r.model&&o(r),l})},[o]),u=(0,i.useCallback)(e=>{n(e),l(t=>t.map(t=>({...t,num_requests_per_day:"day"===e?t.num_requests_per_day:void 0,num_requests_per_month:"month"===e?t.num_requests_per_month:void 0})))},[]),p=(0,i.useCallback)(()=>{l(e=>[...e,tz()])},[]),x=(0,i.useCallback)(e=>{l(t=>t.filter(t=>t.id!==e)),d(e)},[d]),h=c(a),g=[{title:"Model",dataIndex:"model",key:"model",width:"35%",render:(e,a)=>(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select a model",value:a.model||void 0,onChange:e=>m(a.id,"model",e),optionFilterProp:"label",filterOption:(e,t)=>String(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:s.map(e=>({value:e,label:e})),style:{width:"100%"},size:"small"})},{title:"Input Tokens",dataIndex:"input_tokens",key:"input_tokens",width:"18%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:s.input_tokens,onChange:e=>m(s.id,"input_tokens",e??0),style:{width:"100%"},size:"small",formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")})},{title:"Output Tokens",dataIndex:"output_tokens",key:"output_tokens",width:"18%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:s.output_tokens,onChange:e=>m(s.id,"output_tokens",e??0),style:{width:"100%"},size:"small",formatter:e=>`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")})},{title:`Requests/${"day"===r?"Day":"Month"}`,dataIndex:"day"===r?"num_requests_per_day":"num_requests_per_month",key:"num_requests",width:"20%",render:(e,s)=>(0,t.jsx)(L.InputNumber,{min:0,value:"day"===r?s.num_requests_per_day:s.num_requests_per_month,onChange:e=>m(s.id,"day"===r?"num_requests_per_day":"num_requests_per_month",e??void 0),style:{width:"100%"},size:"small",placeholder:"-",formatter:e=>e?`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,","):""})},{title:"",key:"actions",width:50,render:(e,s)=>(0,t.jsx)(V.Button,{type:"text",icon:(0,t.jsx)(tt.DeleteOutlined,{}),onClick:()=>x(s.id),disabled:1===a.length,danger:!0,size:"small"})}];return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-2",children:(0,t.jsxs)(T.Radio.Group,{value:r,onChange:e=>u(e.target.value),size:"small",optionType:"button",buttonStyle:"solid",children:[(0,t.jsx)(T.Radio.Button,{value:"day",children:"Per Day"}),(0,t.jsx)(T.Radio.Button,{value:"month",children:"Per Month"})]})}),(0,t.jsx)(te.Table,{columns:g,dataSource:a,rowKey:"id",pagination:!1,size:"small",footer:()=>(0,t.jsx)(V.Button,{type:"dashed",onClick:p,icon:(0,t.jsx)(H.PlusOutlined,{}),className:"w-full",children:"Add Another Model"})}),(0,t.jsx)(tO,{multiResult:h,timePeriod:r})]})};var tB=e.i(270377),tq=e.i(778917),t$=e.i(664659);let tU=({items:e,children:s="Docs",className:a=""})=>{let[l,r]=(0,i.useState)(!1),n=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=e=>{n.current&&!n.current.contains(e.target)&&r(!1)};return l&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l]),(0,t.jsxs)("div",{className:`relative inline-block ${a}`,ref:n,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>r(!l),className:"inline-flex items-center gap-1 text-gray-500 hover:text-gray-700 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded px-2 py-1","aria-expanded":l,"aria-haspopup":"true",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)(t$.ChevronDown,{className:`h-3 w-3 transition-transform ${l?"rotate-180":""}`,"aria-hidden":"true"})]}),l&&(0,t.jsx)("div",{className:"absolute right-0 mt-1 w-56 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:e.map((e,s)=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>r(!1),children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)(tq.ExternalLink,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 ml-2","aria-hidden":"true"})]},s))})]})};var tV=e.i(673709);let tH=()=>{let[e,s]=(0,i.useState)(""),[a,l]=(0,i.useState)(""),r=(0,i.useMemo)(()=>{let t=parseFloat(e),s=parseFloat(a);if(isNaN(t)||isNaN(s)||0===t||0===s)return null;let l=t+s,r=s/l*100;return{originalCost:l.toFixed(10),finalCost:t.toFixed(10),discountAmount:s.toFixed(10),discountPercentage:r.toFixed(2)}},[e,a]);return(0,t.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Cost Calculation"}),(0,t.jsxs)(g.Text,{className:"text-xs text-gray-600",children:["Discounts are applied to provider costs: ",(0,t.jsx)("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-xs",children:"final_cost = base_cost × (1 - discount%/100)"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Example"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"A 5% discount on a $10.00 request results in: $10.00 × (1 - 0.05) = $9.50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-1",children:"Valid Range"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Discount percentages must be between 0% and 100%"})]}),(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-2",children:"Validating Discounts"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mb-3",children:"Make a test request and check the response headers to verify discounts are applied:"}),(0,t.jsx)(tV.default,{language:"bash",code:`curl -X POST -i http://your-proxy:4000/chat/completions \\ - -H "Content-Type: application/json" \\ - -H "Authorization: Bearer sk-1234" \\ - -d '{ - "model": "gemini/gemini-2.5-pro", - "messages": [{"role": "user", "content": "Hello"}] - }'`}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mt-3 mb-2",children:"Look for these headers in the response:"}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Final cost after discount"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-original"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Original cost before discount"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-discount-amount"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600",children:"Amount discounted"})]})]})]}),(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(g.Text,{className:"font-medium text-gray-900 text-sm mb-3",children:"Discount Calculator"}),(0,t.jsx)(g.Text,{className:"text-xs text-gray-600 mb-3",children:"Enter values from your response headers to verify the discount:"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Response Cost (x-litellm-response-cost)"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.0171938125",value:e,onValueChange:s,className:"text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Discount Amount (x-litellm-response-cost-discount-amount)"}),(0,t.jsx)(eQ.TextInput,{placeholder:"0.0009049375",value:a,onValueChange:l,className:"text-sm"})]})]}),r&&(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,t.jsx)(g.Text,{className:"text-sm font-medium text-blue-900 mb-2",children:"Calculated Results"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Original Cost:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.originalCost]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Final Cost:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.finalCost]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(g.Text,{className:"text-xs text-blue-800",children:"Discount Amount:"}),(0,t.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",r.discountAmount]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-blue-300",children:[(0,t.jsx)(g.Text,{className:"text-xs font-semibold text-blue-900",children:"Discount Applied:"}),(0,t.jsxs)(g.Text,{className:"text-sm font-bold text-blue-900",children:[r.discountPercentage,"%"]})]})]})]})]})]})};var tG=e.i(689020);let tK=[{label:"Custom pricing for models",href:"https://docs.litellm.ai/docs/proxy/custom_pricing"},{label:"Spend tracking",href:"https://docs.litellm.ai/docs/proxy/cost_tracking"}],tW=({userID:e,userRole:s,accessToken:a})=>{let[l,r]=(0,i.useState)(void 0),[o,d]=(0,i.useState)(""),[c,m]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(void 0),[b,_]=(0,i.useState)("percentage"),[v,k]=(0,i.useState)(""),[S,C]=(0,i.useState)(""),[T,I]=(0,i.useState)([]),[F]=N.Form.useForm(),[L]=N.Form.useForm(),[A,P]=y.Modal.useModal(),M="proxy_admin"===s||"Admin"===s,{discountConfig:D,fetchDiscountConfig:E,handleAddProvider:O,handleRemoveProvider:z,handleDiscountChange:R}=function({accessToken:e}){let[t,s]=(0,i.useState)({}),a=(0,i.useCallback)(async()=>{try{let t=(0,w.getProxyBaseUrl)(),a=t?`${t}/config/cost_discount_config`:"/config/cost_discount_config",l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();s(e.values||{})}else console.error("Failed to fetch discount config")}catch(e){console.error("Error fetching discount config:",e),eO.default.fromBackend("Failed to fetch discount configuration")}},[e]),l=(0,i.useCallback)(async t=>{try{let s=(0,w.getProxyBaseUrl)(),l=s?`${s}/config/cost_discount_config`:"/config/cost_discount_config",r=await fetch(l,{method:"PATCH",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok)eO.default.success("Discount configuration updated successfully"),await a();else{let e=await r.json(),t=e.detail?.error||e.detail||"Failed to update settings";eO.default.fromBackend(t)}}catch(e){console.error("Error updating discount config:",e),eO.default.fromBackend("Failed to update discount configuration")}},[e,a]),r=(0,i.useCallback)(async(e,a)=>{if(!e||!a)return eO.default.fromBackend("Please select a provider and enter discount percentage"),!1;let r=parseFloat(a);if(isNaN(r)||r<0||r>100)return eO.default.fromBackend("Discount must be between 0% and 100%"),!1;let i=e5(e);if(!i)return eO.default.fromBackend("Invalid provider selected"),!1;if(t[i])return eO.default.fromBackend(`Discount for ${e2.Providers[e]} already exists. Edit it in the table above.`),!1;let n={...t,[i]:r/100};return s(n),await l(n),!0},[t,l]),n=(0,i.useCallback)(async e=>{let a={...t};delete a[e],s(a),await l(a)},[t,l]),o=(0,i.useCallback)(async(e,a)=>{let r=parseFloat(a);if(!isNaN(r)&&r>=0&&r<=1){let a={...t,[e]:r};s(a),await l(a)}},[t,l]);return{discountConfig:t,setDiscountConfig:s,fetchDiscountConfig:a,saveDiscountConfig:l,handleAddProvider:r,handleRemoveProvider:n,handleDiscountChange:o}}({accessToken:a}),{marginConfig:B,fetchMarginConfig:q,handleAddMargin:$,handleRemoveMargin:U,handleMarginChange:V}=function({accessToken:e}){let[t,s]=(0,i.useState)({}),a=(0,i.useCallback)(async()=>{try{let t=(0,w.getProxyBaseUrl)(),a=t?`${t}/config/cost_margin_config`:"/config/cost_margin_config",l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();s(e.values||{})}else console.error("Failed to fetch margin config")}catch(e){console.error("Error fetching margin config:",e),eO.default.fromBackend("Failed to fetch margin configuration")}},[e]),l=(0,i.useCallback)(async t=>{try{let s=(0,w.getProxyBaseUrl)(),l=s?`${s}/config/cost_margin_config`:"/config/cost_margin_config",r=await fetch(l,{method:"PATCH",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok)eO.default.success("Margin configuration updated successfully"),await a();else{let e=await r.json(),t=e.detail?.error||e.detail||"Failed to update settings";eO.default.fromBackend(t)}}catch(e){console.error("Error updating margin config:",e),eO.default.fromBackend("Failed to update margin configuration")}},[e,a]),r=(0,i.useCallback)(async e=>{let a,r,{selectedProvider:i,marginType:n,percentageValue:o,fixedAmountValue:d}=e;if(!i)return eO.default.fromBackend("Please select a provider"),!1;if("global"===i)a="global";else{let e=e5(i);if(!e)return eO.default.fromBackend("Invalid provider selected"),!1;a=e}if(t[a]){let e="global"===a?"Global":e2.Providers[i];return eO.default.fromBackend(`Margin for ${e} already exists. Edit it in the table above.`),!1}if("percentage"===n){let e=parseFloat(o);if(isNaN(e)||e<0||e>1e3)return eO.default.fromBackend("Percentage must be between 0% and 1000%"),!1;r=e/100}else{let e=parseFloat(d);if(isNaN(e)||e<0)return eO.default.fromBackend("Fixed amount must be non-negative"),!1;r={fixed_amount:e}}let c={...t,[a]:r};return s(c),await l(c),!0},[t,l]),n=(0,i.useCallback)(async e=>{let a={...t};delete a[e],s(a),await l(a)},[t,l]),o=(0,i.useCallback)(async(e,a)=>{let r={...t,[e]:a};s(r),await l(r)},[t,l]);return{marginConfig:t,setMarginConfig:s,fetchMarginConfig:a,saveMarginConfig:l,handleAddMargin:r,handleRemoveMargin:n,handleMarginChange:o}}({accessToken:a});(0,i.useEffect)(()=>{a&&(Promise.all([E(),q()]).finally(()=>{m(!1)}),(async()=>{try{let e=await (0,tG.fetchAvailableModels)(a);I(e.map(e=>e.model_group))}catch(e){console.error("Error fetching models:",e)}})())},[a,E,q]);let H=async()=>{await O(l,o)&&(r(void 0),d(""),p(!1))},G=async(e,s)=>{A.confirm({title:"Remove Provider Discount",icon:(0,t.jsx)(tB.ExclamationCircleOutlined,{}),content:`Are you sure you want to remove the discount for ${s}?`,okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:()=>z(e)})},K=async()=>{await $({selectedProvider:j,marginType:b,percentageValue:v,fixedAmountValue:S})&&(f(void 0),k(""),C(""),_("percentage"),h(!1))},W=async(e,s)=>{A.confirm({title:"Remove Provider Margin",icon:(0,t.jsx)(tB.ExclamationCircleOutlined,{}),content:`Are you sure you want to remove the margin for ${s}?`,okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:()=>U(e)})};return a?(0,t.jsxs)("div",{className:"w-full p-8",children:[P,(0,t.jsx)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eN.Title,{children:"Cost Tracking Settings"}),(0,t.jsx)(tU,{items:tK})]}),(0,t.jsx)(g.Text,{className:"text-gray-500 mt-1",children:"Configure cost discounts and margins for different LLM providers. Changes are saved automatically."})]})}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full space-y-4",children:[M&&(0,t.jsxs)(eG.Accordion,{children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Provider Discounts"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Apply percentage-based discounts to reduce costs for specific providers"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsxs)(eS.TabGroup,{children:[(0,t.jsxs)(eC.TabList,{className:"px-6 pt-4",children:[(0,t.jsx)(ek.Tab,{children:"Discounts"}),(0,t.jsx)(ek.Tab,{children:"Test It"})]}),(0,t.jsxs)(eI.TabPanels,{children:[(0,t.jsx)(eT.TabPanel,{children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(n.Button,{onClick:()=>p(!0),children:"+ Add Provider Discount"})}),c?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(D).length>0?(0,t.jsx)(e3,{discountConfig:D,onDiscountChange:R,onRemoveProvider:G}):(0,t.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)(g.Text,{className:"text-gray-700 font-medium mb-2",children:"No provider discounts configured"}),(0,t.jsx)(g.Text,{className:"text-gray-500 text-sm",children:'Click "Add Provider Discount" to get started'})]})]})}),(0,t.jsx)(eT.TabPanel,{children:(0,t.jsx)("div",{className:"px-6 pb-4",children:(0,t.jsx)(tH,{})})})]})]})})]}),M&&(0,t.jsxs)(eG.Accordion,{children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Fee/Price Margin"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Add fees or margins to LLM costs for internal billing and cost recovery"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"flex justify-end mb-4",children:(0,t.jsx)(n.Button,{onClick:()=>h(!0),children:"+ Add Provider Margin"})}),c?(0,t.jsx)("div",{className:"py-12 text-center",children:(0,t.jsx)(g.Text,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(B).length>0?(0,t.jsx)(e7,{marginConfig:B,onMarginChange:V,onRemoveProvider:W}):(0,t.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)(g.Text,{className:"text-gray-700 font-medium mb-2",children:"No provider margins configured"}),(0,t.jsx)(g.Text,{className:"text-gray-500 text-sm",children:'Click "Add Provider Margin" to get started'})]})]})})]}),(0,t.jsxs)(eG.Accordion,{defaultOpen:!0,children:[(0,t.jsx)(eK.AccordionHeader,{className:"px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,t.jsx)(g.Text,{className:"text-lg font-semibold text-gray-900",children:"Pricing Calculator"}),(0,t.jsx)(g.Text,{className:"text-sm text-gray-500 mt-1",children:"Estimate LLM costs based on expected token usage and request volume"})]})}),(0,t.jsx)(eW.AccordionBody,{className:"px-0",children:(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(tR,{accessToken:a,models:T})})})]})]}),(0,t.jsx)(y.Modal,{title:(0,t.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Discount"})}),open:u,width:1e3,onCancel:()=>{p(!1),F.resetFields(),r(void 0),d("")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(g.Text,{className:"text-sm text-gray-600 mb-6",children:"Select a provider and set its discount percentage. Enter a value between 0% and 100% (e.g., 5 for a 5% discount)."}),(0,t.jsx)(N.Form,{form:F,onFinish:()=>{H()},layout:"vertical",className:"space-y-6",children:(0,t.jsx)(e8,{discountConfig:D,selectedProvider:l,newDiscount:o,onProviderChange:r,onDiscountChange:d,onAddProvider:H})})]})}),(0,t.jsx)(y.Modal,{title:(0,t.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Margin"})}),open:x,width:1e3,onCancel:()=>{h(!1),L.resetFields(),f(void 0),k(""),C(""),_("percentage")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(g.Text,{className:"text-sm text-gray-600 mb-6",children:'Select a provider (or "Global" for all providers) and configure the margin. You can use percentage-based or fixed amount.'}),(0,t.jsx)(N.Form,{form:L,layout:"vertical",className:"space-y-6",children:(0,t.jsx)(e9,{marginConfig:B,selectedProvider:j,marginType:b,percentageValue:v,fixedAmountValue:S,onProviderChange:f,onMarginTypeChange:_,onPercentageChange:k,onFixedAmountChange:C,onAddProvider:K})})]})})]}):null};var tQ=e.i(226898),tY=e.i(973706),tJ=e.i(447566),tX=e.i(602073),tZ=e.i(313603),t0=e.i(285027),t1=e.i(266027),t2=e.i(653496),t4=e.i(149192),t5=e.i(788191);let t6=`Evaluate whether this guardrail's decision was correct. -Analyze the user input, the guardrail action taken, and determine if it was appropriate. - -Consider: -— Was the user's intent genuinely harmful or policy-violating? -— Was the guardrail's action (block / flag / pass) appropriate? -— Could this be a false positive or false negative? - -Return a structured verdict with confidence and justification.`,t3=`{ - "verdict": "correct" | "false_positive" | "false_negative", - "confidence": 0.0, - "justification": "string", - "risk_category": "string", - "suggested_action": "keep" | "adjust threshold" | "add allowlist" -} -`;function t8({open:e,onClose:s,guardrailName:a,accessToken:l,onRunEvaluation:r}){let[n,o]=(0,i.useState)(t6),[d,c]=(0,i.useState)(t3),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)([]),[h,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!e||!l)return void x([]);let t=!1;return g(!0),(0,tG.fetchAvailableModels)(l).then(e=>{t||x(e)}).catch(()=>{t||x([])}).finally(()=>{t||g(!1)}),()=>{t=!0}},[e,l]);let j=p.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)(y.Modal,{title:"Evaluation Settings",open:e,onCancel:s,width:640,footer:null,closeIcon:(0,t.jsx)(t4.CloseOutlined,{}),destroyOnClose:!0,children:[(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-4",children:a?`Configure AI evaluation for ${a}`:"Configure AI evaluation for re-running on logs"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Evaluation Prompt"}),(0,t.jsx)("button",{type:"button",onClick:()=>o(t6),className:"text-xs text-indigo-600 hover:text-indigo-700",children:"Reset to default"})]}),(0,t.jsx)(S.Input.TextArea,{value:n,onChange:e=>o(e.target.value),rows:6,className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"System prompt sent to the evaluation model. Output is structured via response_format."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Response Schema"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:"response_format: json_schema"}),(0,t.jsx)(S.Input.TextArea,{value:d,onChange:e=>c(e.target.value),rows:6,className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Model"}),(0,t.jsx)(k.Select,{placeholder:h?"Loading models…":"Select a model",value:m??void 0,onChange:u,options:j,style:{width:"100%"},showSearch:!0,optionFilterProp:"label",loading:h,notFoundContent:l?"No models available":"Sign in to see models"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsx)(V.Button,{onClick:s,children:"Cancel"}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(t5.PlayCircleOutlined,{}),onClick:()=>{m&&(r?.({prompt:n,schema:d,model:m}),s())},disabled:!m,children:"Run Evaluation"})]})]})}var t7=e.i(166540);e.i(3565);var t9=e.i(502626);let se={blocked:{icon:t4.CloseOutlined,color:"text-red-600",bg:"bg-red-50",border:"border-red-200",label:"Blocked"},passed:{icon:v.CheckCircleOutlined,color:"text-green-600",bg:"bg-green-50",border:"border-green-200",label:"Passed"},flagged:{icon:t0.WarningOutlined,color:"text-amber-600",bg:"bg-amber-50",border:"border-amber-200",label:"Flagged"}};function st({guardrailName:e,filterAction:s="all",logs:a=[],logsLoading:l=!1,totalLogs:r,accessToken:n=null,startDate:o="",endDate:d=""}){let[c,m]=(0,i.useState)(10),[u,p]=(0,i.useState)(s),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(!1),j=a.filter(e=>"all"===u||e.action===u).slice(0,c),f=r??a.length,b=o?(0,t7.default)(o).utc().format("YYYY-MM-DD HH:mm:ss"):(0,t7.default)().subtract(24,"hours").utc().format("YYYY-MM-DD HH:mm:ss"),_=d?(0,t7.default)(d).utc().endOf("day").format("YYYY-MM-DD HH:mm:ss"):(0,t7.default)().utc().format("YYYY-MM-DD HH:mm:ss"),{data:v}=(0,t1.useQuery)({queryKey:["spend-log-by-request",x,b,_],queryFn:async()=>n&&x?await (0,w.uiSpendLogsCall)({accessToken:n,start_date:b,end_date:_,page:1,page_size:10,params:{request_id:x}}):null,enabled:!!(n&&x&&g)}),N=v?.data?.[0]??null;return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:e?`Logs — ${e}`:"Request Logs"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:l?"Loading…":a.length>0?`Showing ${j.length} of ${f} entries`:"No logs for this period. Select a guardrail and date range."})]}),a.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-1",children:["all","blocked","flagged","passed"].map(e=>(0,t.jsx)(V.Button,{type:u===e?"primary":"default",size:"small",onClick:()=>p(e),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,t.jsx)("div",{className:"h-4 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Sample:"}),[10,50,100].map(e=>(0,t.jsx)(V.Button,{type:c===e?"primary":"default",size:"small",onClick:()=>m(e),children:e},e))]})]})]})}),l&&(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{})}),!l&&0===j.length&&(0,t.jsx)("div",{className:"py-12 text-center text-sm text-gray-500",children:"No logs to display. Adjust filters or date range."}),!l&&j.length>0&&(0,t.jsx)("div",{className:"divide-y divide-gray-100",children:j.map(e=>{let s=se[e.action],a=s.icon;return(0,t.jsxs)("button",{type:"button",onClick:()=>{h(e.id),y(!0)},className:"w-full text-left px-4 py-3 hover:bg-gray-50 transition-colors flex items-start gap-3",children:[(0,t.jsx)(a,{className:`w-4 h-4 mt-0.5 flex-shrink-0 ${s.color}`}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${s.bg} ${s.color} ${s.border}`,children:s.label}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:e.timestamp}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"·"}),e.model&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.model})]}),(0,t.jsx)("p",{className:"text-sm text-gray-800 truncate",children:e.input_snippet??e.input??"—"})]}),(0,t.jsx)(tN.DownOutlined,{className:"w-4 h-4 text-gray-400 flex-shrink-0 mt-1"})]},e.id)})}),(0,t.jsx)(t9.LogDetailsDrawer,{open:g,onClose:()=>{y(!1),h(null)},logEntry:N,accessToken:n,allLogs:N?[N]:[],startTime:b})]})}function ss({label:e,value:s,valueColor:a="text-gray-900",icon:l,subtitle:r}){return(0,t.jsxs)("div",{className:"h-full bg-white border border-gray-200 rounded-lg p-5 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-600",children:e}),l&&(0,t.jsx)("span",{className:"text-gray-400",children:l})]}),(0,t.jsx)("div",{className:`text-3xl font-semibold ${a} tracking-tight`,children:s}),r&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:r})]})}let sa={healthy:{bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},warning:{bg:"bg-amber-50",text:"text-amber-700",dot:"bg-amber-500"},critical:{bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}};function sl({guardrailId:e,onBack:s,accessToken:a=null,startDate:l,endDate:r}){let[n,o]=(0,i.useState)("overview"),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(1),{data:p,isLoading:x,error:h}=(0,t1.useQuery)({queryKey:["guardrails-usage-detail",e,l,r],queryFn:()=>(0,w.getGuardrailsUsageDetail)(a,e,l,r),enabled:!!a&&!!e}),{data:g,isLoading:y}=(0,t1.useQuery)({queryKey:["guardrails-usage-logs",e,m,50],queryFn:()=>(0,w.getGuardrailsUsageLogs)(a,{guardrailId:e,page:m,pageSize:50,startDate:l,endDate:r}),enabled:!!a&&!!e}),j=(0,i.useMemo)(()=>(g?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:e.action,score:e.score,model:e.model,input_snippet:e.input_snippet,output_snippet:e.output_snippet,reason:e.reason})),[g?.logs]),f=p?{name:p.guardrail_name,description:p.description??"",status:p.status,provider:p.provider,type:p.type,requestsEvaluated:p.requestsEvaluated,failRate:p.failRate,avgScore:p.avgScore,avgLatency:p.avgLatency}:{name:e,description:"",status:"healthy",provider:"—",type:"—",requestsEvaluated:0,failRate:0,avgScore:void 0,avgLatency:void 0},b=sa[f.status]??sa.healthy;return x&&!p?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})}):h&&!p?(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load guardrail details."})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:f.name}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 text-xs font-medium rounded-full ${b.bg} ${b.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${b.dot}`}),f.status.charAt(0).toUpperCase()+f.status.slice(1)]})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 ml-8",children:f.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:f.provider}),(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>c(!0),title:"Evaluation settings"})]})]})]}),(0,t.jsx)(t2.Tabs,{activeKey:n,onChange:o,items:[{key:"overview",label:"Overview"},{key:"logs",label:"Logs"}]}),"overview"===n&&(0,t.jsxs)("div",{className:"space-y-6 mt-4",children:[(0,t.jsxs)(t_.Row,{gutter:[16,16],children:[(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Requests Evaluated",value:f.requestsEvaluated.toLocaleString()})}),(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Fail Rate",value:`${f.failRate}%`,valueColor:f.failRate>15?"text-red-600":f.failRate>5?"text-amber-600":"text-green-600",subtitle:`${Math.round(f.requestsEvaluated*f.failRate/100).toLocaleString()} blocked`,icon:f.failRate>15?(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"}):void 0})}),(0,t.jsx)(tv.Col,{xs:12,md:8,children:(0,t.jsx)(ss,{label:"Avg. latency added",value:null!=f.avgLatency?`${Math.round(f.avgLatency)}ms`:"—",valueColor:null!=f.avgLatency?f.avgLatency>150?"text-red-600":f.avgLatency>50?"text-amber-600":"text-green-600":"text-gray-500",subtitle:null!=f.avgLatency?"Per request (avg)":"No data"})})]}),(0,t.jsx)(st,{guardrailName:f.name,filterAction:"all",logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})]}),"logs"===n&&(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(st,{guardrailName:f.name,logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})}),(0,t.jsx)(t8,{open:d,onClose:()=>c(!1),guardrailName:f.name,accessToken:a})]})}let sr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z"}}]},name:"rise",theme:"outlined"};var si=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:sr}))}),sn=e.i(898586),so=e.i(584935);function sd({data:e}){let s=e&&e.length>0?e:[];return(0,t.jsxs)(o.Card,{className:"bg-white border border-gray-200",children:[(0,t.jsx)(eN.Title,{className:"text-base font-semibold text-gray-900 mb-4",children:"Request Outcomes Over Time"}),(0,t.jsx)("div",{className:"h-80 min-h-[280px]",children:s.length>0?(0,t.jsx)(so.BarChart,{data:s,index:"date",categories:["passed","blocked"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),yAxisWidth:48,showLegend:!0,stack:!0}):(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-gray-500",children:"No chart data for this period"})})]})}let sc={Bedrock:"bg-orange-100 text-orange-700 border-orange-200","Google Cloud":"bg-sky-100 text-sky-700 border-sky-200",LiteLLM:"bg-indigo-100 text-indigo-700 border-indigo-200",Custom:"bg-gray-100 text-gray-600 border-gray-200"};function sm({accessToken:e=null,startDate:s,endDate:a,onSelectGuardrail:l}){let[r,n]=(0,i.useState)("failRate"),[o,d]=(0,i.useState)("desc"),[c,m]=(0,i.useState)(!1),{data:u,isLoading:p,error:x}=(0,t1.useQuery)({queryKey:["guardrails-usage-overview",s,a],queryFn:()=>(0,w.getGuardrailsUsageOverview)(e,s,a),enabled:!!e}),h=u?.rows??[],g=(0,i.useMemo)(()=>{let e,t,s,a;return u?{totalRequests:u.totalRequests??0,totalBlocked:u.totalBlocked??0,passRate:String(u.passRate??0),avgLatency:h.length?Math.round(h.reduce((e,t)=>e+(t.avgLatency??0),0)/h.length):0,count:h.length}:(e=h.reduce((e,t)=>e+t.requestsEvaluated,0),t=h.reduce((e,t)=>e+Math.round(t.requestsEvaluated*t.failRate/100),0),s=e>0?((1-t/e)*100).toFixed(1):"0",{totalRequests:e,totalBlocked:t,passRate:s,avgLatency:(a=h.filter(e=>null!=e.avgLatency)).length>0?Math.round(a.reduce((e,t)=>e+(t.avgLatency??0),0)/a.length):0,count:h.length})},[u,h]),y=u?.chart,j=(0,i.useMemo)(()=>[...h].sort((e,t)=>{let s="desc"===o?-1:1,a=e[r]??0,l=t[r]??0;return(Number(a)-Number(l))*s}),[h,r,o]),f=[{title:"Guardrail",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsx)("button",{type:"button",className:"text-sm font-medium text-gray-900 hover:text-indigo-600 text-left",onClick:()=>l(s.id),children:e})},{title:"Provider",dataIndex:"provider",key:"provider",render:e=>(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${sc[e]??sc.Custom}`,children:e})},{title:"Requests",dataIndex:"requestsEvaluated",key:"requestsEvaluated",align:"right",sorter:!0,sortOrder:"requestsEvaluated"===r?"desc"===o?"descend":"ascend":null,render:e=>e.toLocaleString()},{title:"Fail Rate",dataIndex:"failRate",key:"failRate",align:"right",sorter:!0,sortOrder:"failRate"===r?"desc"===o?"descend":"ascend":null,render:(e,s)=>(0,t.jsxs)("span",{className:e>15?"text-red-600":e>5?"text-amber-600":"text-green-600",children:[e,"%","up"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-red-400",children:"↑"}),"down"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-green-400",children:"↓"})]})},{title:"Avg. latency added",dataIndex:"avgLatency",key:"avgLatency",align:"right",sorter:!0,sortOrder:"avgLatency"===r?"desc"===o?"descend":"ascend":null,render:e=>(0,t.jsx)("span",{className:null==e?"text-gray-400":e>150?"text-red-600":e>50?"text-amber-600":"text-green-600",children:null!=e?`${e}ms`:"—"})},{title:"Status",dataIndex:"status",key:"status",align:"center",render:e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${"healthy"===e?"bg-green-500":"warning"===e?"bg-amber-500":"bg-red-500"}`}),(0,t.jsx)("span",{className:"text-xs text-gray-600 capitalize",children:e})]})}],b=["failRate","requestsEvaluated","avgLatency"];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-lg text-indigo-500"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:"Guardrails Monitor"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Monitor guardrail performance across all requests"})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tS.DownloadOutlined,{}),title:"Coming soon",children:"Export Data"})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],className:"mb-6",children:[(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Total Evaluations",value:g.totalRequests.toLocaleString()})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Blocked Requests",value:g.totalBlocked.toLocaleString(),valueColor:"text-red-600",icon:(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"})})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Pass Rate",value:`${g.passRate}%`,valueColor:"text-green-600",icon:(0,t.jsx)(si,{className:"text-green-400"})})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Avg. latency added",value:`${g.avgLatency}ms`,valueColor:g.avgLatency>150?"text-red-600":g.avgLatency>50?"text-amber-600":"text-green-600"})}),(0,t.jsx)(tv.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(ss,{label:"Active Guardrails",value:g.count})})]}),(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(sd,{data:y})}),(0,t.jsxs)(ts.Card,{className:"border border-gray-200 rounded-lg bg-white",styles:{body:{padding:0}},children:[(p||x)&&(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-center gap-2",children:[p&&(0,t.jsx)(eF.Spin,{size:"small"}),x&&(0,t.jsx)("span",{className:"text-sm text-red-600",children:"Failed to load data. Try again."})]}),(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(sn.Typography.Title,{level:5,className:"!mb-0 text-gray-900",children:"Guardrail Performance"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Click a guardrail to view details, logs, and configuration"})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>m(!0),title:"Evaluation settings"})})]}),(0,t.jsx)(te.Table,{columns:f,dataSource:j,rowKey:"id",pagination:!1,loading:p,onChange:(e,t,s)=>{s?.field&&b.includes(s.field)&&(n(s.field),d("ascend"===s.order?"asc":"desc"))},locale:0!==h.length||p?void 0:{emptyText:"No data for this period"},onRow:e=>({onClick:()=>l(e.id),style:{cursor:"pointer"}})})]}),(0,t.jsx)(t8,{open:c,onClose:()=>m(!1),accessToken:e})]})}let su=new Date,sp=new Date;function sx({accessToken:e=null}){let[s,a]=(0,i.useState)({type:"overview"}),l=(0,i.useMemo)(()=>new Date(sp),[]),r=(0,i.useMemo)(()=>new Date(su),[]),[n,o]=(0,i.useState)({from:l,to:r}),d=n.from?(0,w.formatDate)(n.from):"",c=n.to?(0,w.formatDate)(n.to):"",m=(0,i.useCallback)(e=>{o(e)},[]);return(0,t.jsxs)("div",{className:"p-6 w-full min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-4",children:(0,t.jsx)(tY.default,{value:n,onValueChange:m,label:"",showTimeRange:!1})}),"overview"===s.type?(0,t.jsx)(sm,{accessToken:e,startDate:d,endDate:c,onSelectGuardrail:e=>{a({type:"detail",guardrailId:e})}}):(0,t.jsx)(sl,{guardrailId:s.guardrailId,onBack:()=>{a({type:"overview"})},accessToken:e,startDate:d,endDate:c})]})}sp.setDate(sp.getDate()-7);var sh=e.i(487304),sg=e.i(760221);e.i(111790);var sy=e.i(280881),sj=e.i(934879),sf=e.i(402874),sb=e.i(797305),s_=e.i(109799),sv=e.i(747871),sw=e.i(56567),sN=e.i(468133),sk=e.i(645526),sS=e.i(91979),sC=e.i(525720),sT=e.i(372943),sI=e.i(95684),sF=e.i(497650),sL=e.i(368869),sA=e.i(998573),sP=e.i(438100),sM=e.i(475254);let sD=(0,sM.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"}]]);var sE=e.i(988846),sO=e.i(98740),sO=sO;function sz({size:e,fontSize:s}){let a=(0,t.jsx)(tw.LoadingOutlined,{style:s?{fontSize:s}:void 0,spin:!0});return(0,t.jsx)(eF.Spin,{indicator:a,size:e})}var sR=e.i(363256),sB=e.i(9314),sq=e.i(552130),s$=e.i(533882),sU=e.i(651904),sV=e.i(460285),sH=e.i(435451),sG=e.i(916940),sK=e.i(127952),sW=e.i(162386);let sQ=(e,t,s)=>"Admin"===e||!!s&&!!t&&s.some(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)),sY=(e,t,s)=>"Admin"===e?s||[]:s&&t?s.filter(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)):[],sJ=({teams:e,searchParams:s,accessToken:a,setTeams:l,userID:r,userRole:n,organizations:o,premiumUser:d=!1})=>{let c,m,u,p;console.log(`organizations: ${JSON.stringify(o)}`);let{data:x}=(0,s_.useOrganizations)(),[h,g]=(0,i.useState)(!0),[j,b]=(0,i.useState)(null),[v,C]=(0,i.useState)(1),[T,F]=(0,i.useState)(10),[L,A]=(0,i.useState)(0),[P,M]=(0,i.useState)(null),[D,E]=(0,i.useState)(null),[z,R]=(0,i.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),q=(0,i.useRef)(null),[$,G]=(0,i.useState)(!1),K=async(e={})=>{if(!a)return;let t=e.page??v,s=e.size??T,i=e.sortBy??z.sort_by,o=e.sortOrder??z.sort_order,d=e.organizationID??z.organization_id,c=e.teamAlias??z.team_alias;g(!0),b(null);try{let e=await (0,eV.teamListCall)(a,t,s,{organizationID:d||null,team_alias:c||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:i||null,sortOrder:o||null});l(e.teams??[]),A(e.total??0)}catch(e){b(e?.message||"Failed to fetch teams")}finally{g(!1)}};(0,i.useEffect)(()=>{K()},[a]);let[W]=N.Form.useForm(),[Q]=N.Form.useForm(),[Y,J]=(0,i.useState)(""),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(null),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),[ei,en]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(!1),[eu,ep]=(0,i.useState)([]),[ex,eh]=(0,i.useState)(!1),[eg,ef]=(0,i.useState)(null),[eb,e_]=(0,i.useState)([]),[ev,eN]=(0,i.useState)({}),[ek,eS]=(0,i.useState)(!1),[eC,eT]=(0,i.useState)([]),[eI,eF]=(0,i.useState)([]),[eL,eA]=(0,i.useState)([]),[eP,eM]=(0,i.useState)([]),[eD,eE]=(0,i.useState)(!1),[eB,eq]=(0,i.useState)({}),[e$,eU]=(0,i.useState)(null),[eH,eY]=(0,i.useState)(0);(0,i.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${D}`);let t=(e=[],D&&D.models.length>0?(console.log(`organization.models: ${D.models}`),e=D.models):e=eu,(0,B.unfurlWildcardModelsInList)(e,eu));console.log(`models: ${t}`),e_(t),W.setFieldValue("models",[])},[D,eu]),(0,i.useEffect)(()=>{if(ei){let e=sY(n,r,o);if(1===e.length){let t=e[0];W.setFieldValue("organization_id",t.organization_id),E(t)}else W.setFieldValue("organization_id",P?.organization_id||null),E(P)}},[ei,n,r,o,P]),(0,i.useEffect)(()=>{let e=async()=>{try{if(null==a)return;let e=(await (0,w.getPoliciesList)(a)).policies.map(e=>e.policy_name);eF(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==a)return;let e=(await (0,w.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);eT(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[a]);let eJ=async()=>{try{if(null==a)return;let e=await (0,w.fetchMCPAccessGroups)(a);eM(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,i.useEffect)(()=>{eJ()},[a]),(0,i.useEffect)(()=>{e&&eN(e.reduce((e,t)=>(e[t.team_id]={keys:t.keys||[],team_info:{members_with_roles:t.members_with_roles||[]}},e),{}))},[e]);let eX=async e=>{ef(e),eh(!0)},eZ=async()=>{if(null!=eg&&null!=e&&null!=a)try{eS(!0),await (0,w.teamDeleteCall)(a,eg.team_id),await K(),eO.default.success("Team deleted successfully")}catch(e){eO.default.fromBackend("Error deleting the team: "+e)}finally{eS(!1),eh(!1),ef(null)}};(0,i.useEffect)(()=>{(async()=>{try{if(null===r||null===n||null===a)return;let e=await (0,B.fetchAvailableModelsForTeamOrKey)(r,n,a);e&&ep(e)}catch(e){console.error("Error fetching user models:",e)}})()},[a,r,n,e]);let e0=async t=>{try{if(console.log(`formValues: ${JSON.stringify(t)}`),null!=a){let s=t?.team_alias,l=e?.map(e=>e.team_alias)??[],r=t?.organization_id||P?.organization_id;if(""===r||"string"!=typeof r?t.organization_id=null:t.organization_id=r.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(eO.default.info("Creating Team"),eL.length>0){let e={};if(t.metadata)try{e=JSON.parse(t.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}e={...e,logging:eL.filter(e=>e.callback_name)},t.metadata=JSON.stringify(e)}if(t.secret_manager_settings&&"string"==typeof t.secret_manager_settings)if(""===t.secret_manager_settings.trim())delete t.secret_manager_settings;else try{t.secret_manager_settings=JSON.parse(t.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}if(t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0||t.allowed_mcp_servers_and_groups&&(t.allowed_mcp_servers_and_groups.servers?.length>0||t.allowed_mcp_servers_and_groups.accessGroups?.length>0||t.allowed_mcp_servers_and_groups.toolPermissions)){if(t.object_permission={},t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0&&(t.object_permission.vector_stores=t.allowed_vector_store_ids,delete t.allowed_vector_store_ids),t.allowed_mcp_servers_and_groups){let{servers:e,accessGroups:s}=t.allowed_mcp_servers_and_groups;e&&e.length>0&&(t.object_permission.mcp_servers=e),s&&s.length>0&&(t.object_permission.mcp_access_groups=s),delete t.allowed_mcp_servers_and_groups}t.mcp_tool_permissions&&Object.keys(t.mcp_tool_permissions).length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_tool_permissions=t.mcp_tool_permissions,delete t.mcp_tool_permissions)}if(t.allowed_mcp_access_groups&&t.allowed_mcp_access_groups.length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_access_groups=t.allowed_mcp_access_groups,delete t.allowed_mcp_access_groups),t.allowed_agents_and_groups){let{agents:e,accessGroups:s}=t.allowed_agents_and_groups;t.object_permission||(t.object_permission={}),e&&e.length>0&&(t.object_permission.agents=e),s&&s.length>0&&(t.object_permission.agent_access_groups=s),delete t.allowed_agents_and_groups}Object.keys(eB).length>0&&(t.model_aliases=eB),e$?.router_settings&&Object.values(e$.router_settings).some(e=>null!=e&&""!==e)&&(t.router_settings=e$.router_settings),await (0,w.teamCreateCall)(a,t),eO.default.success("Team created"),await K({page:v,size:T}),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1),en(!1)}}catch(e){console.error("Error creating the team:",e),eO.default.fromBackend("Error creating the team: "+e)}},e1=async(e,t)=>{let s={...z,[e]:t};if(R(s),C(1),a)try{let e=await (0,eV.teamListCall)(a,1,T,{organizationID:s.organization_id||null,team_alias:s.team_alias||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:s.sort_by||null,sortOrder:s.sort_order||null});l(e.teams??[]),A(e.total??0)}catch(e){console.error("Error fetching teams:",e)}},{token:e2}=sL.theme.useToken(),{Title:e4,Text:e5}=sn.Typography,{Content:e6}=sT.Layout,e3=(0,i.useMemo)(()=>[{title:"Team ID",dataIndex:"team_id",key:"team_id",width:170,ellipsis:!0,render:(e,s)=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(e5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>ea(s.team_id),"data-testid":"team-id-cell",children:e})})},{title:"Team Alias",dataIndex:"team_alias",key:"team_alias",ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{style:{fontSize:14},children:e||(0,t.jsx)(e5,{type:"secondary",italic:!0,children:"—"})})},{title:"Organization",key:"organization",width:160,ellipsis:!0,render:(e,s)=>{let a=((e,t)=>{if(!e||!t)return e||"N/A";let s=t.find(t=>t.organization_id===e);return s?.organization_alias||e})(s.organization_id,x||o);return s.organization_id?(0,t.jsx)(e5,{ellipsis:!0,style:{fontSize:14},children:a}):(0,t.jsx)(e5,{type:"secondary",children:"—"})}},{title:"Resources",key:"resources",width:240,render:(e,s)=>{let a=ev?.[s.team_id]?.team_info?.members_with_roles?.length??0,l=s.models?.length??0,r=ev?.[s.team_id]?.keys?.length??0;return(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a} Members`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sO.default,{size:14}),a]})})}),(0,t.jsx)(f.Tooltip,{title:`${l} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),l]})})}),(0,t.jsx)(f.Tooltip,{title:`${r} Keys`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sP.KeyIcon,{size:14}),r]})})})]})}},{title:"Spend / Budget",key:"spend",width:200,sorter:!0,render:(e,s)=>{let a=s.spend??0,l=s.max_budget,r=`$${a.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`,i=null!=l?`$${l.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:"Unlimited",n=null!=l&&l>0?Math.min(a/l*100,100):null;return(0,t.jsxs)(sC.Flex,{vertical:!0,gap:2,children:[(0,t.jsxs)(e5,{style:{fontSize:13},children:[r,(0,t.jsxs)(e5,{type:"secondary",style:{fontSize:12},children:[" / ",i]})]}),null!=n&&(0,t.jsx)(sF.Progress,{percent:n,size:"small",showInfo:!1,strokeColor:n>=90?"#ff4d4f":n>=70?"#faad14":"#1677ff",style:{marginBottom:0}})]})}},{title:"Created",dataIndex:"created_at",key:"created_at",width:130,ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:e?new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"—"})},{title:"Actions",key:"actions",width:120,align:"right",render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(eR.default,{variant:"Copy",tooltipText:"Copy Team ID",onClick:()=>{navigator.clipboard.writeText(s.team_id).then(()=>sA.message.success("Team ID copied")).catch(()=>sA.message.error("Failed to copy"))}}),"Admin"===n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit team",dataTestId:"edit-team-button",onClick:()=>{ea(s.team_id),er(!0)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete team",dataTestId:"delete-team-button",onClick:()=>eX(s)})]})]})}],[n,ev,x,o]),e8=(0,i.useMemo)(()=>e??[],[e]),e7=[{key:"your-teams",label:"Your Teams",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sE.SearchIcon,{size:16}),suffix:$?(0,t.jsx)(sz,{size:"small"}):null,placeholder:"Search teams by name...",onChange:e=>{var t;return t=e.target.value,void(q.current&&clearTimeout(q.current),G(!0),q.current=setTimeout(async()=>{try{R(e=>({...e,team_alias:t})),C(1),await K({page:1,teamAlias:t})}finally{G(!1)}},300))},allowClear:!0,style:{maxWidth:400}}),(0,t.jsx)(sR.default,{organizations:o,value:z.organization_id||void 0,onChange:e=>e1("organization_id",e||""),loading:h})]}),(0,t.jsx)(sI.Pagination,{current:v,total:L,pageSize:T,onChange:(e,t)=>{C(e),F(t),K({page:e,size:t})},size:"small",showTotal:e=>`${e} teams`,showSizeChanger:!0,pageSizeOptions:["10","20","50"]})]}),h?(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{padding:"80px 0"},children:(0,t.jsx)(sz,{fontSize:48})}):j?(0,t.jsxs)(sC.Flex,{vertical:!0,align:"center",gap:16,style:{padding:"64px 0"},children:[(0,t.jsx)(e5,{type:"danger",style:{fontSize:15},children:"Failed to load teams"}),(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:j}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>{K()},children:"Retry"})]}):(0,t.jsx)(te.Table,{columns:e3,dataSource:e8,rowKey:"team_id",pagination:!1,onChange:(e,t,s)=>{let a=Array.isArray(s)?s[0]:s,l=a.order?a.columnKey:"created_at",r="ascend"===a.order?"asc":(a.order,"desc");R(e=>({...e,sort_by:l,sort_order:r})),K({sortBy:l,sortOrder:r})},locale:{emptyText:(0,t.jsxs)("div",{style:{padding:"64px 0",textAlign:"center"},children:[(0,t.jsx)(sk.TeamOutlined,{style:{fontSize:40,color:"#d9d9d9",marginBottom:12}}),(0,t.jsx)("div",{children:(0,t.jsx)(e5,{style:{fontSize:15,color:"#595959"},children:"No teams yet"})}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:"Create your first team to organize members and manage access to models."})}),sQ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),style:{marginTop:16},"data-testid":"create-team-button",children:"Create Team"})]})},scroll:{x:1e3},size:"middle"})]}),(0,t.jsx)(sK.default,{isOpen:ex,title:"Delete Team?",alertMessage:eg?.keys?.length===0?void 0:`Warning: This team has ${eg?.keys?.length} keys associated with it. Deleting the team will also delete all associated keys. This action is irreversible.`,message:"Are you sure you want to delete this team and all its keys? This action cannot be undone.",resourceInformationTitle:"Team Information",resourceInformation:[{label:"Team ID",value:eg?.team_id,code:!0},{label:"Team Name",value:eg?.team_alias},{label:"Keys",value:eg?.keys?.length},{label:"Members",value:eg?.members_with_roles?.length}],requiredConfirmation:eg?.team_alias,onCancel:()=>{eh(!1),ef(null)},onOk:eZ,confirmLoading:ek})]})},{key:"available-teams",label:"Available Teams",children:(0,t.jsx)(sv.default,{accessToken:a,userID:r})},...(0,ew.isProxyAdminRole)(n||"")?[{key:"default-settings",label:"Default Team Settings",children:(0,t.jsx)(sN.default,{accessToken:a,userID:r||"",userRole:n||""})}]:[]];return(0,t.jsxs)(e6,{style:{padding:e2.paddingLG,paddingInline:2*e2.paddingLG},children:[es?(0,t.jsx)(sw.default,{teamId:es,onUpdate:e=>{l(t=>null==t?t:t.map(t=>e.team_id===t.team_id?(0,ez.updateExistingKeys)(t,e):t)),K()},onClose:()=>{ea(null),er(!1)},accessToken:a,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let t=0;te.team_id===es)),is_proxy_admin:"Admin"==n,userModels:eu,editTeam:el,premiumUser:d}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsxs)(e4,{level:2,style:{margin:0},children:[(0,t.jsx)(sk.TeamOutlined,{style:{marginRight:8}}),"Teams"]}),(0,t.jsx)(e5,{type:"secondary",children:"Manage teams, members, and their access to models and budgets"})]}),sQ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),"data-testid":"create-team-button",children:"Create Team"})]}),(0,t.jsx)(t2.Tabs,{items:e7})]}),sQ(n,r,o)&&(0,t.jsx)(y.Modal,{title:"Create Team",open:ei,width:1e3,footer:null,onOk:()=>{en(!1),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1)},onCancel:()=>{en(!1),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1)},children:(0,t.jsxs)(N.Form,{form:W,onFinish:e0,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"","data-testid":"team-name-input"})}),(c=sY(n,r,o),m="Admin"!==n,u=1===c.length,p=0===c.length,(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(f.Tooltip,{title:(0,t.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,t.jsx)(O.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:P?P.organization_id:null,className:"mt-8",rules:m?[{required:!0,message:"Please select an organization"}]:[],help:u?"You can only create teams within this organization":m?"required":"",children:(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!m,disabled:u,placeholder:p?"No organizations available":"Search or select an Organization",onChange:e=>{W.setFieldValue("organization_id",e),E(c?.find(t=>t.organization_id===e)||null)},filterOption:(e,t)=>!!t&&(t.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:c?.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),m&&!u&&c.length>1&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(e5,{style:{color:"#1e40af",fontSize:14},children:"Please select an organization to create a team for. You can only create teams within organizations where you are an admin."})})]})),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(f.Tooltip,{title:"These are the models that your selected team has access to",children:(0,t.jsx)(O.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),rules:[{required:!0,message:"Please select at least one model"}],name:"models",children:(0,t.jsx)(sW.ModelSelect,{value:W.getFieldValue("models")||[],onChange:e=>W.setFieldValue("models",e),organizationID:W.getFieldValue("organization_id"),options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!W.getFieldValue("organization_id")},context:"team",dataTestId:"create-team-models-select"})}),(0,t.jsx)(N.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(sH.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(N.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(k.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(k.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(k.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(k.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(N.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(N.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsxs)(eG.Accordion,{className:"mt-20 mb-8",onClick:()=>{eD||(eJ(),eE(!0))},children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Additional Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(N.Form.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,t.jsx)(eQ.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,t.jsx)(N.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(sH.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(N.Form.Item,{label:"Team Member 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)(eQ.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(N.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(N.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,t.jsx)(sH.default,{step:1,width:400})}),(0,t.jsx)(N.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,t.jsx)(S.Input.TextArea,{rows:4})}),(0,t.jsx)(N.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:d?"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)(S.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!d})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"Setup your first guardrail",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)(O.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:eC.map(e=>({value:e,label:e}))})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(O.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(_.Switch,{disabled:!d,checkedChildren:d?"Yes":"Premium feature - Upgrade to disable global guardrails by team",unCheckedChildren:d?"No":"Premium feature - Upgrade to disable global guardrails by team"})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(f.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)(O.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:eI.map(e=>({value:e,label:e}))})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(f.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)(O.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-8",help:"Select access groups to assign to this team",children:(0,t.jsx)(sB.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(f.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,t.jsx)(O.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,t.jsx)(sG.default,{onChange:e=>W.setFieldValue("allowed_vector_store_ids",e),value:W.getFieldValue("allowed_vector_store_ids"),accessToken:a||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(f.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,t.jsx)(O.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,t.jsx)(ey.default,{onChange:e=>W.setFieldValue("allowed_mcp_servers_and_groups",e),value:W.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:a||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(N.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(S.Input,{type:"hidden"})}),(0,t.jsx)(N.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)(ej.default,{accessToken:a||"",selectedServers:W.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:W.getFieldValue("mcp_tool_permissions")||{},onChange:e=>W.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(f.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,t.jsx)(O.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,t.jsx)(sq.default,{onChange:e=>W.setFieldValue("allowed_agents_and_groups",e),value:W.getFieldValue("allowed_agents_and_groups"),accessToken:a||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(sU.default,{value:eL,onChange:eA,premiumUser:d})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(sV.default,{accessToken:a||"",value:e$||void 0,onChange:eU,modelData:eu.length>0?{data:eu.map(e=>({model_name:e}))}:void 0},eH)})})]},`router-settings-accordion-${eH}`),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(e5,{type:"secondary",style:{fontSize:14,marginBottom:16,display:"block"},children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(s$.default,{accessToken:a||"",initialModelAliases:eB,onAliasUpdate:eq,showExampleConfig:!1})]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(V.Button,{htmlType:"submit","data-testid":"create-team-submit",children:"Create Team"})})]})})]})};var sX=e.i(702597),sZ=e.i(846835),s0=e.i(147612),s1=e.i(191403),s2=e.i(976883),s4=e.i(657688),s5=e.i(437902);let{Text:s6}=sn.Typography,s3=({litellmParams:e,accessToken:s,onTestComplete:a})=>{let[l,r]=(0,i.useState)(!0),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{r(!0);try{let t=await (0,w.testSearchToolConnection)(s,e);o(t),"success"===t.status&&eO.default.success("Connection test successful!")}catch(e){o({status:"error",message:e instanceof Error?e.message:"Unknown error occurred",error_type:"NetworkError"})}finally{r(!1),a&&a()}})()},[s,e,a]);let m=n?.message?(e=>{if(!e)return"Unknown error";let t=e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error:\s*/,"").replace(/^AuthenticationError:\s*/,"");if(t.includes("")||t.includes("(.*?)<\/title>/);return e?e[1]:t.includes("401")||t.includes("Authorization Required")?"Authentication failed: Invalid API key or credentials":"Authentication error - please check your API key"}return t.length>200?t.substring(0,200)+"...":t})(n.message):"Unknown error";return l?(0,t.jsx)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,t.jsxs)(s6,{style:{fontSize:"16px"},children:["Testing connection to ",e.search_provider||"search provider","..."]}),(0,t.jsx)(s5.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]})}):n?(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:["success"===n.status?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.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.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,t.jsxs)("div",{style:{marginLeft:"12px"},children:[(0,t.jsxs)(s6,{type:"success",style:{fontSize:"18px",fontWeight:500,display:"block"},children:["Connection to ",e.search_provider," successful!"]}),n.test_query&&(0,t.jsxs)(s6,{style:{fontSize:"14px",color:"#666",marginTop:"8px",display:"block"},children:["Test query: ",(0,t.jsx)("code",{style:{backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"4px"},children:n.test_query})]}),void 0!==n.results_count&&(0,t.jsxs)(s6,{style:{fontSize:"14px",color:"#666",display:"block"},children:["Results retrieved: ",n.results_count]})]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(t0.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(s6,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",e.search_provider||"search provider"," failed"]})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,t.jsxs)(s6,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(s6,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:m}),n.error_type&&(0,t.jsx)("div",{style:{marginTop:"8px"},children:(0,t.jsxs)(s6,{style:{fontSize:"13px",color:"#666"},children:["Error type:"," ",(0,t.jsx)("code",{style:{backgroundColor:"#ffebee",padding:"2px 6px",borderRadius:"4px",color:"#d32f2f"},children:n.error_type})]})}),n.message&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),style:{paddingLeft:0,height:"auto"},children:d?"Hide Details":"Show Details"})})]}),d&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(s6,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Full Error Details"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:n.message})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fffbf0",border:"1px solid #ffe58f",borderLeft:"4px solid #faad14",borderRadius:"8px",padding:"16px"},children:[(0,t.jsx)(s6,{strong:!0,style:{display:"block",marginBottom:"8px",color:"#d48806"},children:"Troubleshooting tips:"}),(0,t.jsxs)("ul",{style:{margin:"8px 0",paddingLeft:"20px",color:"#ad6800"},children:[(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Verify your API key is correct and active"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Check if the search provider service is operational"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Ensure you have sufficient credits/quota with the provider"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Review the provider's documentation for any additional requirements"})]})]})]})}),(0,t.jsx)(F.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(V.Button,{type:"link",href:"https://docs.litellm.ai/docs/search",target:"_blank",icon:(0,t.jsx)(O.InfoCircleOutlined,{}),children:"View Search Documentation"})})]}):null},{TextArea:s8}=S.Input,s7=({providerName:e,displayName:s})=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)(s4.default,{src:`../ui/assets/logos/${e}.png`,alt:"",width:20,height:20,style:{marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,t.jsx)("span",{children:s})]}),s9=({userRole:e,accessToken:s,onCreateSuccess:a,isModalVisible:l,setModalVisible:r})=>{let[o]=N.Form.useForm(),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)({}),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),[j,b]=(0,i.useState)(""),{data:_,isLoading:v}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,w.fetchAvailableSearchProviders)(s)},enabled:!!s&&l}),S=_?.providers||[],C=async e=>{c(!0);try{let t={search_tool_name:e.search_tool_name,litellm_params:{search_provider:e.search_provider,api_key:e.api_key,api_base:e.api_base,timeout:e.timeout?parseFloat(e.timeout):void 0,max_retries:e.max_retries?parseInt(e.max_retries):void 0},search_tool_info:e.description?{description:e.description}:void 0};if(console.log("Creating search tool with payload:",t),null!=s){let e=await (0,w.createSearchTool)(s,t);eO.default.success("Search tool created successfully"),o.resetFields(),u({}),r(!1),a(e)}}catch(e){eO.default.error("Error creating search tool: "+e)}finally{c(!1)}},T=async()=>{try{await o.validateFields(["search_provider","api_key"]),g(!0),b(`test-${Date.now()}`),x(!0)}catch(e){eO.default.error("Please fill in Search Provider and API Key before testing")}};return(i.default.useEffect(()=>{l||u({})},[l]),(0,ew.isAdminRole)(e))?(0,t.jsxs)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)("span",{className:"text-2xl",children:"🔍"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Search Tool"})]}),open:l,width:800,onCancel:()=>{o.resetFields(),u({}),r(!1)},footer:null,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)(N.Form,{form:o,onFinish:C,onValuesChange:(e,t)=>u(t),layout:"vertical",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Tool Name",(0,t.jsx)(f.Tooltip,{title:"A unique name to identify this search tool configuration (e.g., 'perplexity-search', 'tavily-news-search').",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_tool_name",rules:[{required:!0,message:"Please enter a search tool name"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Name can only contain letters, numbers, hyphens, and underscores"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"e.g., perplexity-search, my-tavily-tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Provider",(0,t.jsx)(f.Tooltip,{title:"Select the search provider you want to use. Each provider has different capabilities and pricing.",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(k.Select,{placeholder:"Select a search provider",className:"rounded-lg",size:"large",loading:v,showSearch:!0,optionFilterProp:"children",optionLabelProp:"label",children:S.map(e=>(0,t.jsx)(k.Select.Option,{value:e.provider_name,label:(0,t.jsx)(s7,{providerName:e.provider_name,displayName:e.ui_friendly_name}),children:(0,t.jsx)(s7,{providerName:e.provider_name,displayName:e.ui_friendly_name})},e.provider_name))})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["API Key",(0,t.jsx)(f.Tooltip,{title:"The API key for authenticating with the search provider. This will be securely stored.",children:(0,t.jsx)(O.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"api_key",rules:[{required:!1,message:"Please enter an API key"}],children:(0,t.jsx)(eQ.TextInput,{type:"password",placeholder:"Enter your API key",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description (Optional)"}),name:"description",children:(0,t.jsx)(s8,{rows:3,placeholder:"Brief description of this search tool's purpose",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center pt-6 border-t border-gray-100",children:[(0,t.jsx)(f.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(sn.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(n.Button,{onClick:T,loading:h,children:"Test Connection"}),(0,t.jsx)(n.Button,{loading:d,type:"submit",children:"Add Search Tool"})]})]})]})}),(0,t.jsx)(y.Modal,{title:"Connection Test Results",open:p,onCancel:()=>{x(!1),g(!1)},footer:[(0,t.jsx)(n.Button,{onClick:()=>{x(!1),g(!1)},children:"Close"},"close")],width:700,children:p&&s&&(0,t.jsx)(s3,{litellmParams:{search_provider:m.search_provider,api_key:m.api_key,api_base:m.api_base},accessToken:s,onTestComplete:()=>g(!1)},j)})]}):null};var ae=e.i(350967),at=e.i(678784),as=e.i(118366),aa=e.i(928685);let{Text:al}=sn.Typography,ar=({searchToolName:e,accessToken:s,className:a=""})=>{let[l,r]=(0,i.useState)(""),[n,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)([]),[u,p]=(0,i.useState)({}),[x,h]=(0,i.useState)(!1),g=async()=>{if(!l.trim())return void A.default.warning("Please enter a search query");d(!0);let t=performance.now();try{let a=await (0,w.searchToolQueryCall)(s,e,l),r=performance.now(),i=Math.round(r-t),n={query:l,response:a,timestamp:Date.now(),latency:i};m(e=>[n,...e])}catch(e){console.error("Error querying search tool:",e),eO.default.fromBackend("Failed to query search tool")}finally{d(!1)}},y=e=>new Date(e).toLocaleString(),j=(0,t.jsx)(tw.LoadingOutlined,{style:{fontSize:24},spin:!0}),f=c.length>0?c[0]:null;return(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(eN.Title,{children:"Test Search Tool"})}),(0,t.jsxs)("div",{className:"flex flex-col",style:{minHeight:"600px"},children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex items-stretch gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white rounded-lg px-4 transition-all duration-200",style:{border:x?"2px solid #3b82f6":"2px solid #e5e7eb",boxShadow:x?"0 0 0 3px rgba(59, 130, 246, 0.1)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",height:"48px"},children:[(0,t.jsx)(aa.SearchOutlined,{className:"text-gray-400 mr-3",style:{fontSize:"18px"}}),(0,t.jsx)(S.Input,{value:l,onChange:e=>r(e.target.value),onFocus:()=>h(!0),onBlur:()=>h(!1),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),g())},placeholder:"Enter your search query...",disabled:n,bordered:!1,style:{fontSize:"15px",padding:0,height:"100%",boxShadow:"none"}})]}),(0,t.jsx)(V.Button,{type:"primary",onClick:g,disabled:n||!l.trim(),icon:(0,t.jsx)(aa.SearchOutlined,{}),loading:n,style:{height:"48px",paddingLeft:"24px",paddingRight:"24px",borderRadius:"8px",fontWeight:500,fontSize:"15px",backgroundColor:n||!l.trim()?void 0:"#1890ff",borderColor:n||!l.trim()?void 0:"#1890ff",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:"Search"})]})}),(0,t.jsx)("div",{className:"flex-1",children:f||n?(0,t.jsxs)("div",{children:[n&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center py-16",children:[(0,t.jsx)(eF.Spin,{indicator:j}),(0,t.jsx)(al,{className:"mt-4 text-gray-600 font-medium",children:"Searching..."})]}),f&&!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(al,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Search Query"}),(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mt-1.5",children:f.query})]}),(0,t.jsxs)("div",{className:"text-right ml-4",children:[(0,t.jsx)(al,{className:"text-xs text-gray-500",children:y(f.timestamp)}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,t.jsxs)("div",{className:"text-sm font-semibold text-blue-600",children:[f.response?.results?.length||0," ",f.response?.results?.length===1?"result":"results"]}),void 0!==f.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("div",{className:"text-sm font-semibold text-green-600",children:[f.latency,"ms"]})]})]})]})]})}),f.response&&f.response.results&&f.response.results.length>0?(0,t.jsx)("div",{className:"space-y-3",children:f.response.results.map((e,s)=>{let a=u[`0-${s}`]||!1;return(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",e.currentTarget.style.borderColor="#e0e7ff"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)",e.currentTarget.style.borderColor="#e5e7eb"},children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-600 hover:text-blue-700 flex-1 leading-snug",style:{textDecoration:"none"},onMouseEnter:e=>e.currentTarget.style.textDecoration="underline",onMouseLeave:e=>e.currentTarget.style.textDecoration="none",children:e.title}),(0,t.jsx)(V.Button,{type:"text",size:"small",className:"flex-shrink-0",icon:(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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),onClick:()=>window.open(e.url,"_blank"),style:{color:"#6b7280"}})]}),(0,t.jsx)("div",{className:"text-sm text-green-700 mb-3 truncate font-medium",children:e.url}),(0,t.jsx)("div",{className:"text-sm text-gray-700 leading-relaxed",children:a?e.snippet:`${e.snippet.substring(0,200)}${e.snippet.length>200?"...":""}`}),e.snippet.length>200&&(0,t.jsx)(V.Button,{type:"link",size:"small",className:"mt-3 p-0 h-auto",onClick:()=>{let e;return e=`0-${s}`,void p(t=>({...t,[e]:!t[e]}))},style:{fontSize:"13px",fontWeight:500,color:"#3b82f6"},children:a?"Show less":"Show more"})]})},s)})}):(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 mx-auto mb-4",children:(0,t.jsx)(aa.SearchOutlined,{style:{fontSize:"24px",color:"#9ca3af"}})}),(0,t.jsx)(al,{className:"text-gray-600 font-medium",children:"No results found"}),(0,t.jsx)(al,{className:"text-sm text-gray-500 mt-1",children:"Try a different search query"})]})]}),c.length>1&&(0,t.jsxs)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)(al,{className:"text-sm font-semibold text-gray-700",children:"Previous Searches"}),(0,t.jsx)(V.Button,{onClick:()=>{m([]),p({}),eO.default.success("Search history cleared")},size:"small",type:"link",style:{fontSize:"13px",fontWeight:500},children:"Clear All"})]}),(0,t.jsx)("div",{className:"space-y-2",children:c.slice(1,6).map((e,s)=>(0,t.jsxs)("div",{className:"p-3 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:border-gray-300",onClick:()=>{r(e.query)},children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800 truncate",children:e.query}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-1.5 flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"font-medium text-blue-600",children:[e.response?.results?.length||0," ",e.response?.results?.length===1?"result":"results"]}),void 0!==e.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"•"}),(0,t.jsxs)("span",{className:"font-medium text-green-600",children:[e.latency,"ms"]})]}),(0,t.jsx)("span",{children:"•"}),(0,t.jsx)("span",{children:y(e.timestamp)})]})]},s+1))})]})]}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center p-8",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-24 h-24 rounded-full bg-gray-100 mb-6",children:(0,t.jsx)(aa.SearchOutlined,{style:{fontSize:"48px",color:"#9ca3af"}})}),(0,t.jsx)(al,{className:"text-lg text-gray-600 font-medium",children:"Test your search tool"}),(0,t.jsx)(al,{className:"text-sm text-gray-500 mt-2",children:"Enter a query above to see search results"})]})})]})]})},ai=({searchTool:e,onBack:s,isEditing:a,accessToken:l,availableProviders:r})=>{var d;let c,[m,u]=(0,i.useState)({}),p=async(e,t)=>{await (0,ez.copyToClipboard)(e)&&(u(e=>({...e,[t]:!0})),setTimeout(()=>{u(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eA.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Search Tools"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(eN.Title,{children:e.search_tool_name}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-name"]?(0,t.jsx)(at.CheckIcon,{size:12}):(0,t.jsx)(as.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_name,"search-tool-name"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:e.search_tool_id}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-id"]?(0,t.jsx)(at.CheckIcon,{size:12}):(0,t.jsx)(as.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_id,"search-tool-id"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsxs)(ae.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Provider"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(eN.Title,{children:(d=e.litellm_params.search_provider,c=r.find(e=>e.provider_name===d),c?.ui_friendly_name||d)})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"API Key"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.litellm_params.api_key?"****":"Not set"})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Created At"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleString():"Unknown"})})]})]}),e.search_tool_info?.description&&(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)(g.Text,{children:"Description"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.search_tool_info.description})})]}),(0,t.jsx)("div",{className:"mt-6",children:l&&(0,t.jsx)(ar,{searchToolName:e.search_tool_name,accessToken:l})})]})},an=({accessToken:e,userRole:s,userID:a})=>{let{data:l,isLoading:r,refetch:o}=(0,t1.useQuery)({queryKey:["searchTools"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,w.fetchSearchTools)(e).then(e=>e.search_tools||[])},enabled:!!e}),{data:d,isLoading:c}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,w.fetchAvailableSearchProviders)(e)},enabled:!!e}),m=d?.providers||[],[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(!1),[b,_]=(0,i.useState)(null),[v,C]=(0,i.useState)(!1),[T,F]=(0,i.useState)(!1),[L,A]=(0,i.useState)(!1),[P]=N.Form.useForm(),M=i.default.useMemo(()=>{let e,s,a;return e=e=>{_(e),C(!1)},s=e=>{let t=l?.find(t=>t.search_tool_id===e);t&&(P.setFieldsValue({search_tool_name:t.search_tool_name,search_provider:t.litellm_params.search_provider,api_key:t.litellm_params.api_key,api_base:t.litellm_params.api_base,timeout:t.litellm_params.timeout,max_retries:t.litellm_params.max_retries,description:t.search_tool_info?.description}),_(e),A(!0))},a=D,[{title:"Search Tool ID",dataIndex:"search_tool_id",key:"search_tool_id",render:(s,a)=>a.is_from_config?(0,t.jsx)("span",{className:"text-xs",children:"-"}):(0,t.jsx)("button",{onClick:()=>e(a.search_tool_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left cursor-pointer max-w-40",children:(0,t.jsx)("span",{className:"truncate block",children:a.search_tool_id})})},{title:"Name",dataIndex:"search_tool_name",key:"search_tool_name",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Provider",key:"provider",render:(e,s)=>{let a=s.litellm_params.search_provider,l=m.find(e=>e.provider_name===a),r=l?.ui_friendly_name||a;return(0,t.jsx)("span",{className:"text-sm",children:r})}},{title:"Created At",dataIndex:"created_at",key:"created_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.created_at?new Date(s.created_at).toLocaleDateString():"-"})},{title:"Updated At",dataIndex:"updated_at",key:"updated_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.updated_at?new Date(s.updated_at).toLocaleDateString():"-"})},{title:"Source",key:"source",render:(e,s)=>{let a=s.is_from_config??!1;return(0,t.jsx)(I.Tag,{color:a?"default":"blue",children:a?"Config":"DB"})}},{title:"Actions",key:"actions",render:(e,l)=>{let r=l.search_tool_id,i=l.is_from_config??!1;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit search tool",disabled:i,disabledTooltipText:"Config search tool cannot be edited on the dashboard. Please edit it from the config file.",onClick:()=>{r&&!i&&s(r)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete search tool",disabled:i,disabledTooltipText:"Config search tool cannot be deleted on the dashboard. Please delete it from the config file.",onClick:()=>{r&&!i&&a(r)}})]})}}]},[m,l,P]);function D(e){p(e),h(!0)}let E=async()=>{if(null!=u&&null!=e){f(!0);try{await (0,w.deleteSearchTool)(e,u),eO.default.success("Deleted search tool successfully"),h(!1),p(null),o()}catch(e){console.error("Error deleting the search tool:",e),eO.default.error("Failed to delete search tool")}finally{f(!1)}}},O=l?.find(e=>e.search_tool_id===u),z=O?m.find(e=>e.provider_name===O.litellm_params.search_provider):null,R=async()=>{if(e&&b)try{let t=await P.validateFields(),s={search_tool_name:t.search_tool_name,litellm_params:{search_provider:t.search_provider,api_key:t.api_key,api_base:t.api_base,timeout:t.timeout?parseFloat(t.timeout):void 0,max_retries:t.max_retries?parseInt(t.max_retries):void 0},search_tool_info:t.description?{description:t.description}:void 0};await (0,w.updateSearchTool)(e,b,s),eO.default.success("Search tool updated successfully"),A(!1),P.resetFields(),_(null),o()}catch(e){console.error("Failed to update search tool:",e),eO.default.error("Failed to update search tool")}};return e&&s&&a?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(sK.default,{isOpen:x,title:"Delete Search Tool",message:"Are you sure you want to delete this search tool? This action cannot be undone.",resourceInformationTitle:"Search Tool Information",resourceInformation:O?[{label:"Name",value:O.search_tool_name},{label:"ID",value:O.search_tool_id,code:!0},{label:"Provider",value:z?.ui_friendly_name||O.litellm_params.search_provider},{label:"Description",value:O.search_tool_info?.description||"-"}]:[],onCancel:()=>{h(!1),p(null)},onOk:E,confirmLoading:j}),(0,t.jsx)(s9,{userRole:s,accessToken:e,onCreateSuccess:e=>{F(!1),o()},isModalVisible:T,setModalVisible:F}),(0,t.jsx)(y.Modal,{title:"Edit Search Tool",open:L,onOk:R,onCancel:()=>{A(!1),P.resetFields(),_(null)},width:600,children:(0,t.jsxs)(N.Form,{form:P,layout:"vertical",children:[(0,t.jsx)(N.Form.Item,{name:"search_tool_name",label:"Search Tool Name",rules:[{required:!0,message:"Please enter a search tool name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g., my-perplexity-search"})}),(0,t.jsx)(N.Form.Item,{name:"search_provider",label:"Search Provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(k.Select,{placeholder:"Select a search provider",loading:c,children:m.map(e=>(0,t.jsx)(k.Select.Option,{value:e.provider_name,children:e.ui_friendly_name},e.provider_name))})}),(0,t.jsx)(N.Form.Item,{name:"api_key",label:"API Key",extra:"API key for the search provider",children:(0,t.jsx)(S.Input.Password,{placeholder:"Enter API key"})}),(0,t.jsx)(N.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(S.Input.TextArea,{rows:3,placeholder:"Description of this search tool"})})]})}),(0,t.jsx)(eN.Title,{children:"Search Tools"}),(0,t.jsx)(g.Text,{className:"text-tremor-content mt-2",children:"Configure and manage your search providers"}),(0,ew.isAdminRole)(s)&&(0,t.jsx)(n.Button,{className:"mt-4 mb-4",onClick:()=>F(!0),children:"+ Add New Search Tool"}),(0,t.jsx)(()=>b?(0,t.jsx)(ai,{searchTool:l?.find(e=>e.search_tool_id===b)||{search_tool_id:"",search_tool_name:"",litellm_params:{search_provider:""}},onBack:()=>{C(!1),_(null),o()},isEditing:v,accessToken:e,availableProviders:m}):(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(eF.Spin,{spinning:r,indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"large",children:(0,t.jsx)(te.Table,{bordered:!0,dataSource:l||[],columns:M,rowKey:e=>e.search_tool_id||e.search_tool_name,pagination:!1,locale:{emptyText:"No search tools configured"},size:"small"})})}),{})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:s,userID:a}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))};var ao=e.i(700904),ad=e.i(686311),ac=e.i(37727),am=e.i(643531),au=e.i(636772),ap=e.i(115571);function ax({onOpen:e,onDismiss:s,isVisible:a,title:l,description:r,buttonText:n,icon:o,accentColor:d,buttonStyle:c}){let m=(0,au.useDisableShowPrompts)(),[u,p]=(0,i.useState)(100),[x,h]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{if(!a){p(100),h(!1);return}let e=Date.now(),t=setInterval(()=>{let s=Math.max(0,100-(Date.now()-e)/15e3*100);p(s),s<=0&&clearInterval(t)},50);return()=>clearInterval(t)},[a]),(0,i.useEffect)(()=>{if(x){let e=setTimeout(()=>{h(!1),s()},5e3);return()=>clearTimeout(e)}},[x,s]),x)?(0,t.jsx)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center",children:(0,t.jsx)(am.Check,{className:"h-5 w-5 text-green-600"})}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)("p",{className:"text-sm text-gray-700 font-medium",children:"Got it, we will not ask again. Reactivate this at any time in the User Menu."})})]})})}):!a||m?null:(0,t.jsxs)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:[(0,t.jsx)("div",{className:"h-1 bg-gray-100 w-full",children:(0,t.jsx)("div",{className:"h-full transition-all duration-100 ease-linear",style:{width:`${u}%`,backgroundColor:d}})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",style:{color:d},children:[(0,t.jsx)(o,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm",children:l})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-0.5 rounded hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-3",children:r}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(V.Button,{type:"primary",block:!0,onClick:e,style:c,children:n}),(0,t.jsx)(V.Button,{variant:"outlined",danger:!0,block:!0,onClick:()=>{(0,ap.setLocalStorageItem)("disableShowPrompts","true"),(0,ap.emitLocalStorageChange)("disableShowPrompts"),h(!0)},className:"text-xs",children:"Don't ask me again"})]})]})]})}function ah({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ax,{onOpen:e,onDismiss:s,isVisible:a,title:"Quick feedback",description:"Help us improve LiteLLM! Share your experience in 5 quick questions.",buttonText:"Share feedback",icon:ad.MessageSquare,accentColor:"#3b82f6"})}var ag=e.i(972520),ay=e.i(180127),ay=ay,aj=e.i(536916);let af=[{id:"oss_adoption",label:"OSS Adoption",description:"Stars, contributors, forks, community support"},{id:"ai_integration",label:"AI Integration",description:"LiteLLM had the logging/guardrail integration we needed - Langfuse, OTEL, S3 logging, Azure Content Safety guardrails"},{id:"unified_api",label:"Unified API",description:"LiteLLM had the best OpenAI-compatible API across providers - OpenAI, Anthropic, Gemini, etc."},{id:"breadth_of_models",label:"Breadth of Models/Providers",description:"LiteLLM had the provider + endpoint combinations we needed - /ocr endpoint with Mistral OCR, /batches endppint with Bedrock API, etc."},{id:"other",label:"Other",description:"Something else not listed above"}];function ab({isOpen:e,onClose:s,onComplete:a}){let[l,r]=(0,i.useState)(1),[n,o]=(0,i.useState)({usingAtCompany:null,companyName:"",startDate:"",reasons:[],otherReason:"",email:""}),[d,c]=(0,i.useState)(!1),m=!0===n.usingAtCompany?5:4;if(!e)return null;let u=async()=>{c(!0);try{let e={oss_adoption:"OSS Adoption (stars, contributors, forks)",ai_integration:"AI Integration (Langfuse, OTEL, S3, Azure Content Safety)",unified_api:"Unified API (OpenAI-compatible)",breadth_of_models:"Breadth of Models/Providers (/ocr, /batches, Bedrock, Azure OCR)"},t=n.reasons.map(t=>"other"===t&&n.otherReason?`Other: ${n.otherReason}`:e[t]||t),s=new URLSearchParams({"entry.2015264290":n.usingAtCompany?"Yes":"No","entry.1876243786":n.companyName||"","entry.1282591459":n.startDate,"entry.393456108":t.join(", "),"entry.928142208":n.email||""});await fetch("https://feedback.litellm.ai/survey",{method:"POST",mode:"no-cors",body:s})}catch(e){console.error("Failed to submit survey:",e)}c(!1),a()},p=(e,t)=>{o(s=>({...s,[e]:t}))},x=e=>{o(t=>({...t,reasons:t.reasons.includes(e)?t.reasons.filter(t=>t!==e):[...t.reasons,e]}))},h=()=>{if(!1===n.usingAtCompany){if(1===l)return 1;if(3===l)return 2;if(4===l)return 3;if(5===l)return 4}return l},g=5===l;return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-lg bg-white rounded-xl shadow-2xl overflow-hidden flex flex-col max-h-[90vh] transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-blue-600",children:[(0,t.jsx)(ad.MessageSquare,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Quick Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-5 w-5"})})]}),(0,t.jsx)(sF.Progress,{percent:h()/m*100,showInfo:!1,strokeColor:"#2563eb",className:"m-0"}),(0,t.jsx)("div",{className:"p-8 flex-1 overflow-y-auto",children:1===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Are you using LiteLLM at your company?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Help us understand how our product is being used in professional environments."}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 pt-4",children:[(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!0),className:`p-6 rounded-lg border-2 text-left transition-all ${!0===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"Yes"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"We use it for work"})]}),(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!1),className:`p-6 rounded-lg border-2 text-left transition-all ${!1===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"No"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Personal project / Hobby"})]})]})]}):2===l&&!0===n.usingAtCompany?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"What company are you using LiteLLM at?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"This helps us understand our user base better."}),(0,t.jsx)(S.Input,{size:"large",placeholder:"Enter your company name",value:n.companyName,onChange:e=>p("companyName",e.target.value),autoFocus:!0})]}):3===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"When did you start using LiteLLM?"}),(0,t.jsx)(T.Radio.Group,{value:n.startDate,onChange:e=>p("startDate",e.target.value),className:"w-full",children:(0,t.jsx)(U.Space,{direction:"vertical",className:"w-full",children:["Less than a month ago","1-3 months ago","3-6 months ago","More than 6 months ago"].map(e=>(0,t.jsx)("label",{className:`flex items-center p-4 rounded-lg border cursor-pointer transition-all w-full ${n.startDate===e?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:(0,t.jsx)(T.Radio,{value:e,children:e})},e))})})]}):4===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Why did you pick LiteLLM over other AI Gateways?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Select all that apply."}),(0,t.jsx)("div",{className:"space-y-3",children:af.map(e=>{let s=n.reasons.includes(e.id);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>x(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),x(e.id))},className:`flex items-start p-4 rounded-lg border cursor-pointer transition-all ${s?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:[(0,t.jsx)(aj.Checkbox,{checked:s,className:"mt-0.5 pointer-events-none"}),(0,t.jsxs)("div",{className:"ml-3",children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900",children:e.label}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.description})]})]}),"other"===e.id&&s&&(0,t.jsx)(S.Input,{className:"mt-2 ml-7",placeholder:"Please specify...",value:n.otherReason,onChange:e=>p("otherReason",e.target.value),onClick:e=>e.stopPropagation(),autoFocus:!0})]},e.id)})})]}):5===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Want to share more?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Leave your email and we may reach out to learn more about your experience. This is completely optional."}),(0,t.jsx)(S.Input,{size:"large",type:"email",placeholder:"your@email.com (optional)",value:n.email,onChange:e=>p("email",e.target.value),autoFocus:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"We will only use this to follow up on your feedback. No spam, ever."})]}):null}),(0,t.jsxs)("div",{className:"px-6 py-4 bg-gray-50 border-t border-gray-200 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-sm text-gray-500 font-medium",children:["Step ",h()," of ",m]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[l>1&&(0,t.jsx)(V.Button,{onClick:()=>{3===l&&!1===n.usingAtCompany?r(1):r(l-1)},disabled:d,icon:(0,t.jsx)(ay.default,{className:"h-4 w-4"}),children:"Back"}),(0,t.jsxs)(V.Button,{type:"primary",onClick:()=>{1===l&&!1===n.usingAtCompany?r(3):l<5?r(l+1):u()},disabled:!(1===l?null!==n.usingAtCompany:2===l?n.companyName.trim().length>0:3===l?""!==n.startDate:4===l?n.reasons.includes("other")?n.reasons.length>0&&n.otherReason.trim().length>0:n.reasons.length>0:5===l)||d,loading:d,className:"min-w-[100px]",children:[g?"Submit":"Next",!g&&(0,t.jsx)(ag.ArrowRight,{className:"ml-2 h-4 w-4"})]})]})]})]})]})}var a_=e.i(758472);function av({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ax,{onOpen:e,onDismiss:s,isVisible:a,title:"Claude Code Feedback",description:"Help us improve your Claude Code experience with LiteLLM! Share your feedback in 4 quick questions.",buttonText:"Share feedback",icon:a_.Code,accentColor:"#7c3aed",buttonStyle:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"}})}function aw({isOpen:e,onClose:s,onComplete:a}){return e?(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-md bg-white rounded-xl shadow-2xl overflow-hidden transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-purple-600",children:[(0,t.jsx)(a_.Code,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Claude Code Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(ac.X,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"p-8",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Help us improve your experience"}),(0,t.jsx)("p",{className:"text-gray-600 mb-6",children:"We'd love to hear about your experience using LiteLLM with Claude Code. Your feedback helps us improve the product for everyone."}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-6",children:"This brief survey takes about 2-3 minutes to complete."}),(0,t.jsx)(V.Button,{type:"primary",size:"large",block:!0,onClick:()=>{window.open("https://forms.gle/LZeJQ3XytBakckYa9","_blank","noopener,noreferrer"),a()},icon:(0,t.jsx)(tq.ExternalLink,{className:"h-4 w-4"}),style:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"},children:"Open Feedback Form"})]})]})]}):null}var aN=e.i(345244),ak=e.i(662316),aS=e.i(208075),aC=e.i(735042),aT=e.i(693569),aI=e.i(263147),aF=e.i(954616),aL=e.i(912598);let aA=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"DELETE",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}};var aP=e.i(152990),aM=e.i(682830),aD=e.i(657150),aD=aD,aE=e.i(302202),aO=e.i(446891);let az=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};var aR=e.i(21548),aB=e.i(573421),aq=e.i(516430),aD=aD,a$=e.i(823429),a$=a$,sO=sO,aU=e.i(304911),aV=e.i(289793),aH=e.i(500727),aD=aD,aG=e.i(168118);let{TextArea:aK}=S.Input;function aW({form:e,isNameDisabled:s=!1}){let{data:a}=(0,aV.useAgents)(),{data:l}=(0,aH.useMCPServers)(),r=a?.agents??[],i=[{key:"1",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aG.InfoIcon,{size:16}),"General Info"]}),children:(0,t.jsxs)("div",{style:{paddingTop:16},children:[(0,t.jsx)(N.Form.Item,{name:"name",label:"Group Name",rules:[{required:!0,message:"Please enter the access group name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. Engineering Team",disabled:s})}),(0,t.jsx)(N.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(aK,{rows:4,placeholder:"Describe the purpose of this access group..."})})]})},{key:"2",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(sD,{size:16}),"Models"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(N.Form.Item,{name:"modelIds",label:"Allowed Models",children:(0,t.jsx)(sW.ModelSelect,{context:"global",value:e.getFieldValue("modelIds")??[],onChange:t=>e.setFieldsValue({modelIds:t}),style:{width:"100%"}})})})},{key:"3",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aE.ServerIcon,{size:16}),"MCP Servers"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(N.Form.Item,{name:"mcpServerIds",label:"Allowed MCP Servers",children:(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"Select MCP servers",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:(l??[]).map(e=>({label:e.server_name??e.server_id,value:e.server_id}))})})})},{key:"4",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aD.default,{size:16}),"Agents"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(N.Form.Item,{name:"agentIds",label:"Allowed Agents",children:(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"Select agents",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:r.map(e=>({label:e.agent_name,value:e.agent_id}))})})})}];return(0,t.jsx)(N.Form,{form:e,layout:"vertical",name:"access_group_form",initialValues:{modelIds:[],mcpServerIds:[],agentIds:[]},children:(0,t.jsx)(t2.Tabs,{defaultActiveKey:"1",items:i})})}let aQ=async(e,t,s)=>{let a=(0,w.getProxyBaseUrl)(),l=`${a}/v1/access_group/${encodeURIComponent(t)}`,r=await fetch(l,{method:"PUT",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){let e=await r.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return r.json()};function aY({visible:e,accessGroup:s,onCancel:a,onSuccess:l}){let[r]=N.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async({accessGroupId:t,params:s})=>{if(!e)throw Error("Access token is required");return aQ(e,t,s)},onSuccess:(e,{accessGroupId:s})=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all}),t.invalidateQueries({queryKey:aI.accessGroupKeys.detail(s)})}})})();return(0,i.useEffect)(()=>{e&&s&&r.setFieldsValue({name:s.access_group_name,description:s.description??"",modelIds:s.access_model_names??[],mcpServerIds:s.access_mcp_server_ids??[],agentIds:s.access_agent_ids??[]})},[e,s,r]),(0,t.jsx)(y.Modal,{title:"Edit Access Group",open:e,onOk:()=>{r.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};n.mutate({accessGroupId:s.access_group_id,params:t},{onSuccess:()=>{A.default.success("Access group updated successfully"),l?.(),a()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:a,width:700,okText:"Save Changes",cancelText:"Cancel",confirmLoading:n.isPending,destroyOnHidden:!0,children:(0,t.jsx)(aW,{form:r})})}let{Title:aJ,Text:aX}=sn.Typography,{Content:aZ}=sT.Layout;function a0({accessGroupId:e,onBack:s}){let{data:a,isLoading:l}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aL.useQueryClient)();return(0,t1.useQuery)({queryKey:aI.accessGroupKeys.detail(e),queryFn:async()=>az(t,e),enabled:!!(t&&e)&&ew.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(aI.accessGroupKeys.list({}));return t?.find(t=>t.access_group_id===e)}})})(e),{token:r}=sL.theme.useToken(),[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(!1);if(l)return(0,t.jsx)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!a)return(0,t.jsxs)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aR.Empty,{description:"Access group not found"})]});let p=a.access_model_names??[],x=a.access_mcp_server_ids??[],h=a.access_agent_ids??[],g=a.assigned_key_ids??[],y=a.assigned_team_ids??[],j=d?g:g.slice(0,5),f=m?y:y.slice(0,5),b=[{key:"models",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sD,{size:16}),"Models",(0,t.jsx)(I.Tag,{style:{marginInlineEnd:0},children:p?.length})]}),children:p?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:p,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No models assigned to this group"})},{key:"mcp",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(aE.ServerIcon,{size:16}),"MCP Servers",(0,t.jsx)(I.Tag,{children:x?.length})]}),children:x?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:x,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No MCP servers assigned to this group"})},{key:"agents",label:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(aD.default,{size:16}),"Agents",(0,t.jsx)(I.Tag,{children:h?.length})]}),children:h?.length>0?(0,t.jsx)(aB.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:h,renderItem:e=>(0,t.jsx)(aB.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aX,{code:!0,children:e})})})}):(0,t.jsx)(aR.Empty,{description:"No agents assigned to this group"})}];return(0,t.jsxs)(aZ,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(aJ,{level:2,style:{margin:0},children:a.access_group_name}),(0,t.jsxs)(aX,{type:"secondary",children:["ID: ",(0,t.jsx)(aX,{copyable:!0,children:a.access_group_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(a$.default,{size:16}),onClick:()=>{o(!0)},children:"Edit Access Group"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Group Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:a.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(a.created_at).toLocaleString(),a.created_by&&(0,t.jsxs)(aX,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:a.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(a.updated_at).toLocaleString(),a.updated_by&&(0,t.jsxs)(aX,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:a.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sP.KeyIcon,{size:16}),"Attached Keys",(0,t.jsx)(I.Tag,{children:g?.length})]}),extra:g?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),children:d?"Show Less":`View All (${g?.length})`}):null,children:g?.length>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:8,children:j.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aX,{code:!0,style:{fontSize:12},children:e.length>20?`${e.slice(0,10)}...${e.slice(-6)}`:e})},e))}):(0,t.jsx)(aR.Empty,{description:"No keys attached",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sO.default,{size:16}),"Attached Teams",(0,t.jsx)(I.Tag,{children:y?.length})]}),extra:y?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>u(!m),children:m?"Show Less":`View All (${y?.length})`}):null,children:y?.length>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:8,children:f.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aX,{code:!0,style:{fontSize:12},children:e})},e))}):(0,t.jsx)(aR.Empty,{description:"No teams attached",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ts.Card,{children:(0,t.jsx)(t2.Tabs,{defaultActiveKey:"models",items:b})}),(0,t.jsx)(aY,{visible:n,accessGroup:a,onCancel:()=>o(!1)})]})}let a1=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/v1/access_group`,l=await fetch(a,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};function a2({visible:e,onCancel:s,onSuccess:a}){let[l]=N.Form.useForm(),r=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return a1(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all})}})})();return(0,t.jsx)(y.Modal,{title:"Create Access Group",open:e,onOk:()=>{l.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};r.mutate(t,{onSuccess:()=>{A.default.success("Access group created successfully"),l.resetFields(),a?.(),s()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:s,width:700,okText:"Create Group",cancelText:"Cancel",confirmLoading:r.isPending,destroyOnClose:!0,children:(0,t.jsx)(aW,{form:l})})}let{Title:a4,Text:a5}=sn.Typography,{Content:a6}=sT.Layout;function a3(e){return{id:e.access_group_id,name:e.access_group_name,description:e.description??"",modelIds:e.access_model_names,mcpServerIds:e.access_mcp_server_ids,agentIds:e.access_agent_ids,keyIds:e.assigned_key_ids,teamIds:e.assigned_team_ids,createdAt:e.created_at,createdBy:e.created_by??"",updatedAt:e.updated_at,updatedBy:e.updated_by??""}}function a8(){let{token:e}=sL.theme.useToken(),{data:s,isLoading:a}=(0,aI.useAccessGroups)(),l=(0,i.useMemo)(()=>(s??[]).map(a3),[s]),[r,n]=(0,i.useState)(null),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[u,p]=(0,i.useState)(1),[x,h]=(0,i.useState)([]),[g,y]=(0,i.useState)(null),j=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return aA(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aI.accessGroupKeys.all})}})})();(0,i.useEffect)(()=>{p(1)},[c]);let b=(0,i.useMemo)(()=>l.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())||e.id.toLowerCase().includes(c.toLowerCase())||e.description.toLowerCase().includes(c.toLowerCase())),[l,c]),_=(0,i.useMemo)(()=>[{id:"id",accessorKey:"id",header:()=>(0,t.jsx)("span",{children:"ID"}),enableSorting:!1,size:170,cell:({row:e})=>{let s=e.original;return(0,t.jsx)(f.Tooltip,{title:s.id,children:(0,t.jsx)(a5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>n(s.id),children:s.id})})}},{id:"name",accessorKey:"name",header:()=>(0,t.jsx)("span",{children:"Name"}),enableSorting:!0,cell:({getValue:e})=>e()},{id:"resources",header:()=>(0,t.jsx)("span",{children:"Resources"}),enableSorting:!1,cell:({row:e})=>{let s=e.original,a=s.modelIds??[],l=s.mcpServerIds??[],r=s.agentIds??[];return(0,t.jsxs)(sC.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a?.length} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),a?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${l?.length} MCP Servers`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(aE.ServerIcon,{size:14}),l?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${r?.length} Agents`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(aD.default,{size:14}),r?.length]})})})]})}},{id:"createdAt",accessorKey:"createdAt",header:()=>(0,t.jsx)("span",{children:"Created"}),enableSorting:!0,sortingFn:"datetime",cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["lg"]}},{id:"updatedAt",accessorKey:"updatedAt",header:()=>(0,t.jsx)("span",{children:"Updated"}),enableSorting:!1,cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["xl"]}},{id:"actions",header:()=>(0,t.jsx)("span",{children:"Actions"}),enableSorting:!1,cell:({row:e})=>(0,t.jsx)(U.Space,{children:(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete access group",onClick:()=>y(e.original)})})}],[]),v=(0,aP.useReactTable)({data:b,columns:_,state:{sorting:x},onSortingChange:h,getCoreRowModel:(0,aM.getCoreRowModel)(),getSortedRowModel:(0,aM.getSortedRowModel)(),getRowId:e=>e.id}),w=v.getRowModel().rows,N=w.slice((u-1)*10,10*u),k=(0,i.useMemo)(()=>new Map(N.map(e=>[e.original.id,e])),[N]),C=(v.getHeaderGroups()[0]?.headers??[]).map(e=>{let s=e.column.getCanSort(),a=e.column.getIsSorted(),l=e.column.columnDef.meta,r={title:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[e.isPlaceholder?null:(0,aP.flexRender)(e.column.columnDef.header,e.getContext()),s&&(0,t.jsx)(aO.TableHeaderSortDropdown,{sortState:!1!==a&&a,onSortChange:t=>{h(!1===t?[]:[{id:e.column.id,desc:"desc"===t}])},columnId:e.column.id})]}),key:e.id,width:e.column.columnDef.size,render:(t,s)=>{let a=k.get(s.id);if(!a)return null;let l=a.getVisibleCells().find(t=>t.column.id===e.id);return l?(0,aP.flexRender)(l.column.columnDef.cell,l.getContext()):null}};return l?.responsive&&(r.responsive=l.responsive),r}),T=N.map(e=>e.original);return r?(0,t.jsx)(a0,{accessGroupId:r,onBack:()=>n(null)}):(0,t.jsxs)(a6,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(a4,{level:2,style:{margin:0},children:"Access Groups"}),(0,t.jsx)(a5,{type:"secondary",children:"Manage resource permissions for your organization"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>d(!0),children:"Create Access Group"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sE.SearchIcon,{size:16}),placeholder:"Search groups by name, ID, or description...",style:{maxWidth:400},value:c,onChange:e=>m(e.target.value),allowClear:!0}),(0,t.jsx)(sI.Pagination,{current:u,total:w?.length,pageSize:10,onChange:e=>p(e),size:"small",showTotal:e=>`${e} groups`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:C,dataSource:T,rowKey:"id",loading:a,pagination:!1})]}),(0,t.jsx)(a2,{visible:o,onCancel:()=>d(!1)}),(0,t.jsx)(sK.default,{isOpen:!!g,title:"Delete Access Group",message:"Are you sure you want to delete this access group? This action cannot be undone.",resourceInformationTitle:"Access Group Information",resourceInformation:[{label:"ID",value:g?.id,code:!0},{label:"Name",value:g?.name},{label:"Description",value:g?.description||"—"}],onCancel:()=>y(null),onOk:()=>{g&&j.mutate(g.id,{onSuccess:()=>{y(null)}})},confirmLoading:j.isPending})]})}var a7=e.i(510674);let a9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder-add",theme:"outlined"};var le=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:a9}))});let lt=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/project/new`,l=await fetch(a,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()};function ls({form:e}){let{accessToken:s,userId:a,userRole:l}=(0,R.default)(),{data:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)([]);(0,i.useEffect)(()=>{(async()=>{if(s)try{let e=(await (0,w.getGuardrailsList)(s)).guardrails.map(e=>e.guardrail_name);u(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[s]);let p=N.Form.useWatch("team_id",e);return(0,i.useEffect)(()=>{if(p&&r){let e=r.find(e=>e.team_id===p)??null;e&&e.team_id!==n?.team_id&&o(e)}},[p,r,n?.team_id]),(0,i.useEffect)(()=>{a&&l&&s&&n?(0,sX.fetchTeamModels)(a,l,s,n.team_id).then(e=>{c(Array.from(new Set([...n.models??[],...e])))}):c([])},[n,s,a,l]),(0,t.jsxs)(N.Form,{form:e,layout:"vertical",name:"project_form",initialValues:{isBlocked:!1},style:{marginTop:24},children:[(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:13,color:"#374151",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Basic Information"}),(0,t.jsx)(F.Divider,{style:{marginTop:8,marginBottom:16}}),(0,t.jsxs)(t_.Row,{gutter:24,children:[(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(N.Form.Item,{name:"project_alias",label:"Project Name",rules:[{required:!0,message:"Please enter a project name"}],children:(0,t.jsx)(S.Input,{placeholder:"e.g. Customer Support Bot"})})}),(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(N.Form.Item,{name:"team_id",label:"Team",rules:[{required:!0,message:"Please select a team"}],children:(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Search or select a team",onChange:t=>{o(r?.find(e=>e.team_id===t)??null),e.setFieldValue("models",[])},allowClear:!0,optionLabelProp:"label",filterOption:(e,t)=>{let s=r?.find(e=>e.team_id===t?.value);if(!s)return!1;let a=e.toLowerCase().trim();return(s.team_alias||"").toLowerCase().includes(a)||s.team_id.toLowerCase().includes(a)},children:r?.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.team_id,label:e.team_alias||e.team_id,children:[(0,t.jsx)("span",{style:{fontWeight:500},children:e.team_alias})," ",(0,t.jsxs)("span",{style:{color:"#9ca3af"},children:["(",e.team_id,")"]})]},e.team_id))})})})]}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(N.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(S.Input.TextArea,{placeholder:"Describe the purpose of this project",rows:3})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(N.Form.Item,{name:"models",label:"Allowed Models (scoped to selected team's models)",help:n?void 0:"Select a team first to see available models",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:n?"Select models":"Select a team first",disabled:!n,allowClear:!0,maxTagCount:"responsive",onChange:t=>{t.includes("all-team-models")&&e.setFieldsValue({models:["all-team-models"]})},children:[(0,t.jsx)(k.Select.Option,{value:"all-team-models",children:"All Team Models"},"all-team-models"),d.map(e=>(0,t.jsx)(k.Select.Option,{value:e,children:(0,B.getModelDisplayName)(e)},e))]})})})}),(0,t.jsx)(t_.Row,{gutter:24,children:(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(N.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,t.jsx)(L.InputNumber,{prefix:"$",style:{width:"100%"},placeholder:"0.00",min:0,precision:2})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)($.Collapse,{ghost:!0,style:{background:"#f9fafb",borderRadius:8,border:"1px solid #e5e7eb"},items:[{key:"1",label:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{color:"#374151"},children:"Advanced Settings"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sC.Flex,{align:"center",gap:12,children:[(0,t.jsx)(sn.Typography.Text,{strong:!0,children:"Block Project"}),(0,t.jsx)(N.Form.Item,{name:"isBlocked",valuePropName:"checked",noStyle:!0,children:(0,t.jsx)(_.Switch,{})})]}),(0,t.jsx)(N.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.isBlocked!==t.isBlocked,children:({getFieldValue:e})=>e("isBlocked")?(0,t.jsx)(j.Alert,{banner:!0,type:"warning",showIcon:!0,message:"All API requests using keys under this project will be rejected.",style:{marginTop:12}}):null}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(N.Form.Item,{label:"Guardrails",name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:m.map(e=>({value:e,label:e}))})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Model-Specific Limits"}),(0,t.jsx)(N.Form.List,{name:"modelLimits",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(N.Form.Item,{...r,name:[a,"model"],rules:[{required:!0,message:"Missing model"},{validator:(t,s)=>s&&(e.getFieldValue("modelLimits")??[]).filter(e=>e?.model===s).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],children:(0,t.jsx)(S.Input,{placeholder:"Model name (e.g. gpt-4)"})}),(0,t.jsx)(N.Form.Item,{...r,name:[a,"tpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(N.Form.Item,{...r,name:[a,"rpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(N.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Model Limit"})})]})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Metadata"}),(0,t.jsx)(N.Form.List,{name:"metadata",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(N.Form.Item,{...r,name:[a,"key"],rules:[{required:!0,message:"Missing key"},{validator:(t,s)=>s&&(e.getFieldValue("metadata")??[]).filter(e=>e?.key===s).length>1?Promise.reject(Error("Duplicate key")):Promise.resolve()}],children:(0,t.jsx)(S.Input,{placeholder:"Key"})}),(0,t.jsx)(N.Form.Item,{...r,name:[a,"value"],rules:[{required:!0,message:"Missing value"}],children:(0,t.jsx)(S.Input,{placeholder:"Value"})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(N.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Key-Value Pair"})})]})})]})}]})})})]})}function la(e){let t={},s={};for(let a of e.modelLimits??[])a.model&&(null!=a.rpm&&(t[a.model]=a.rpm),null!=a.tpm&&(s[a.model]=a.tpm));let a={};for(let t of e.metadata??[])t.key&&(a[t.key]=t.value);return{project_alias:e.project_alias,description:e.description,models:e.models??[],max_budget:e.max_budget,blocked:e.isBlocked??!1,...e.guardrails&&e.guardrails.length>0&&{guardrails:e.guardrails},...Object.keys(t).length>0&&{model_rpm_limit:t},...Object.keys(s).length>0&&{model_tpm_limit:s},...Object.keys(a).length>0&&{metadata:a}}}function ll({isOpen:e,onClose:s}){let[a]=N.Form.useForm(),l=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return lt(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:a7.projectKeys.all})}})})(),r=async()=>{try{let e=await a.validateFields(),t={...la(e),team_id:e.team_id};l.mutate(t,{onSuccess:()=>{A.default.success("Project created successfully"),a.resetFields(),s()},onError:e=>{A.default.error(e.message||"Failed to create project")}})}catch(e){console.error("Validation failed:",e)}},i=()=>{a.resetFields(),s()};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:18},children:"Create New Project"}),open:e,onCancel:i,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:i,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(le,{}),loading:l.isPending,onClick:r,children:"Create Project"},"submit")],children:(0,t.jsx)(ls,{form:a})})}let lr=async(e,t)=>{let s=(0,w.getProxyBaseUrl)(),a=`${s}/project/info?project_id=${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return l.json()},li=(0,sM.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"}]]);var a$=a$,sO=sO,ln=e.i(987432);let lo=async(e,t,s)=>{let a=(0,w.getProxyBaseUrl)(),l=`${a}/project/update`,r=await fetch(l,{method:"POST",headers:{[(0,w.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({project_id:t,...s})});if(!r.ok){let e=await r.json(),t=(0,w.deriveErrorMessage)(e);throw(0,w.handleError)(t),Error(t)}return r.json()};function ld({isOpen:e,project:s,onClose:a,onSuccess:l}){let[r]=N.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aL.useQueryClient)();return(0,aF.useMutation)({mutationFn:async({projectId:t,params:s})=>{if(!e)throw Error("Access token is required");return lo(e,t,s)},onSuccess:()=>{t.invalidateQueries({queryKey:a7.projectKeys.all})}})})();(0,i.useEffect)(()=>{if(e&&s){let e=s.metadata??{},t=e.model_rpm_limit??{},a=e.model_tpm_limit??{},l=Array.isArray(e.guardrails)?e.guardrails:[],i=[];for(let e of new Set([...Object.keys(t),...Object.keys(a)]))i.push({model:e,rpm:t[e],tpm:a[e]});let n=new Set(["model_rpm_limit","model_tpm_limit","guardrails"]),o=[];for(let[t,s]of Object.entries(e))n.has(t)||o.push({key:t,value:String(s)});r.setFieldsValue({project_alias:s.project_alias??"",team_id:s.team_id??"",description:s.description??"",models:s.models??[],max_budget:s.litellm_budget_table?.max_budget??void 0,isBlocked:s.blocked,guardrails:l.length>0?l:void 0,modelLimits:i.length>0?i:void 0,metadata:o.length>0?o:void 0})}},[e,s,r]);let o=async()=>{try{let e=await r.validateFields(),t={...la(e),team_id:e.team_id};n.mutate({projectId:s.project_id,params:t},{onSuccess:()=>{A.default.success("Project updated successfully"),l?.(),a()},onError:e=>{A.default.error(e.message||"Failed to update project")}})}catch(e){console.error("Validation failed:",e)}};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sn.Typography.Text,{strong:!0,style:{fontSize:18},children:"Edit Project"}),open:e,onCancel:a,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:a,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(ln.SaveOutlined,{}),loading:n.isPending,onClick:o,children:"Save Changes"},"submit")],children:(0,t.jsx)(ls,{form:r})})}let{Title:lc,Text:lm}=sn.Typography,{Content:lu}=sT.Layout;function lp({projectId:e,onBack:s}){let a,l,r,n,{data:o,isLoading:d}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aL.useQueryClient)();return(0,t1.useQuery)({queryKey:a7.projectKeys.detail(e),queryFn:async()=>lr(t,e),enabled:!!(t&&e)&&ew.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(a7.projectKeys.list({}));return t?.find(t=>t.project_id===e)}})})(e),{data:c}=(0,eV.useTeam)(o?.team_id??void 0),m=c?.team_info??c,{token:u}=sL.theme.useToken(),[p,x]=(0,i.useState)(!1),h=o?.spend??0,g=o?.litellm_budget_table?.max_budget??null,y=null!=g&&g>0,j=y?Math.min(h/g*100,100):0,f=(0,i.useMemo)(()=>Object.entries(o?.model_spend??{}).map(([e,t])=>({model:e,spend:t})).sort((e,t)=>t.spend-e.spend),[o?.model_spend]);return d?(0,t.jsx)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"large"})})}):o?(0,t.jsxs)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(lc,{level:2,style:{margin:0},children:o.project_alias??o.project_id}),(0,t.jsx)(I.Tag,{color:o.blocked?"red":"green",children:o.blocked?"Blocked":"Active"})]}),(0,t.jsxs)(lm,{type:"secondary",children:["ID: ",(0,t.jsx)(lm,{copyable:!0,children:o.project_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(a$.default,{size:16}),onClick:()=>x(!0),children:"Edit Project"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Project Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:o.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(o.created_at).toLocaleString(),o.created_by&&(0,t.jsxs)(lm,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:o.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(o.updated_at).toLocaleString(),o.updated_by&&(0,t.jsxs)(lm,{children:[" ","by"," ",(0,t.jsx)(aU.default,{userId:o.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:8,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(li,{size:16}),"Budget"]}),style:{height:"100%"},children:(0,t.jsxs)(sC.Flex,{vertical:!0,gap:16,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(lm,{strong:!0,style:{fontSize:28,lineHeight:1},children:["$",h.toFixed(2)]}),(0,t.jsx)("br",{}),(0,t.jsx)(lm,{type:"secondary",children:y?`of $${g.toFixed(2)} budget`:"No budget limit"})]}),y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(sF.Progress,{percent:Math.round(10*j)/10,strokeColor:j>=90?"#f5222d":j>=70?"#faad14":"#52c41a",showInfo:!1}),(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[(Math.round(10*j)/10).toFixed(1),"% utilized"]})]})]})})}),(0,t.jsx)(tv.Col,{xs:24,lg:16,children:(0,t.jsx)(ts.Card,{title:"Spend by Model",style:{height:"100%"},children:f.length>0?(0,t.jsx)(so.BarChart,{data:f,index:"model",categories:["spend"],colors:["cyan"],layout:"vertical",valueFormatter:e=>`$${e.toFixed(4)}`,yAxisWidth:140,showLegend:!1,style:{height:Math.max(40*f.length,120)}}):(0,t.jsx)(aR.Empty,{description:"No model spend recorded yet",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sP.KeyIcon,{size:16}),"Keys"]}),style:{height:"100%"},children:(0,t.jsx)(aR.Empty,{description:"No keys to display",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sC.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sO.default,{size:16}),"Team"]}),style:{height:"100%"},children:m?(a=m.max_budget??null,l=m.spend??0,n=(r=null!=a&&a>0)?Math.min(l/a*100,100):0,(0,t.jsxs)(sC.Flex,{vertical:!0,gap:12,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lm,{strong:!0,style:{fontSize:16},children:m.team_alias||m.team_id}),(0,t.jsx)("br",{}),(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:["ID:"," ",(0,t.jsx)(lm,{copyable:!0,style:{fontSize:12},children:m.team_id})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"Models"}),(m.models?.length??0)>0?(0,t.jsx)(sC.Flex,{wrap:"wrap",gap:4,style:{maxHeight:60,overflow:"hidden"},children:m.models?.map(e=>(0,t.jsx)(I.Tag,{style:{margin:0},children:e},e))}):(0,t.jsx)(lm,{type:"secondary",children:"All models"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:2},children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12},children:"Spend"}),(0,t.jsxs)(lm,{style:{fontSize:12},children:["$",l.toFixed(2),r?(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[" ","/ $",a.toFixed(2)]}):(0,t.jsxs)(lm,{type:"secondary",style:{fontSize:12},children:[" ","(Unlimited)"]})]})]}),r&&(0,t.jsx)(sF.Progress,{percent:Math.round(10*n)/10,strokeColor:n>=90?"#f5222d":n>=70?"#faad14":"#52c41a",size:"small",showInfo:!1})]}),(0,t.jsxs)(sC.Flex,{justify:"space-between",children:[(0,t.jsx)(lm,{type:"secondary",style:{fontSize:12},children:"Members"}),(0,t.jsx)(lm,{style:{fontSize:12},children:m.members_with_roles?.length??0})]})]})):o.team_id?(0,t.jsx)(sC.Flex,{justify:"center",align:"center",style:{padding:16},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"})}):(0,t.jsx)(aR.Empty,{description:"No team assigned",image:aR.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ld,{isOpen:p,project:o,onClose:()=>x(!1)})]}):(0,t.jsxs)(lu,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(aq.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aR.Empty,{description:"Project not found"})]})}let{Title:lx,Text:lh}=sn.Typography,{Content:lg}=sT.Layout;function ly(){let{token:e}=sL.theme.useToken(),{data:s,isLoading:a}=(0,a7.useProjects)(),{data:l,isLoading:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(""),[p,x]=(0,i.useState)(1);(0,i.useEffect)(()=>{x(1)},[m]);let h=(0,i.useMemo)(()=>{let e=new Map;for(let t of l??[])e.set(t.team_id,t.team_alias??t.team_id);return e},[l]),g=(0,i.useMemo)(()=>{let e=s??[];if(!m)return e;let t=m.toLowerCase();return e.filter(e=>{let s=h.get(e.team_id??"")??"";return(e.project_alias??"").toLowerCase().includes(t)||e.project_id.toLowerCase().includes(t)||(e.description??"").toLowerCase().includes(t)||s.toLowerCase().includes(t)})},[s,m,h]),y=[{title:"ID",dataIndex:"project_id",key:"project_id",width:170,render:e=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(lh,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>o(e),children:e})})},{title:"Name",dataIndex:"project_alias",key:"project_alias",sorter:(e,t)=>(e.project_alias??"").localeCompare(t.project_alias??""),render:e=>e??"—"},{title:"Team",key:"team",sorter:(e,t)=>{let s=h.get(e.team_id??"")??"",a=h.get(t.team_id??"")??"";return s.localeCompare(a)},render:(e,s)=>{if(!s.team_id)return"—";let a=h.get(s.team_id);return a||(r?(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tw.LoadingOutlined,{spin:!0}),size:"small"}):s.team_id)}},{title:"Models",key:"models",render:(e,s)=>{let a=s.models??[];return(0,t.jsx)(f.Tooltip,{title:a.length>0?a.join(", "):"No models",children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sC.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD,{size:14}),a.length]})})})}},{title:"Status",dataIndex:"blocked",key:"status",render:e=>(0,t.jsx)(I.Tag,{color:e?"red":"green",children:e?"Blocked":"Active"})},{title:"Created",dataIndex:"created_at",key:"created_at",sorter:(e,t)=>new Date(e.created_at).getTime()-new Date(t.created_at).getTime(),responsive:["lg"],render:e=>new Date(e).toLocaleDateString()},{title:"Updated",dataIndex:"updated_at",key:"updated_at",responsive:["xl"],render:e=>new Date(e).toLocaleDateString()}];return n?(0,t.jsx)(lp,{projectId:n,onBack:()=>o(null)}):(0,t.jsxs)(lg,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(lx,{level:2,style:{margin:0},children:"Projects"}),(0,t.jsx)(lh,{type:"secondary",children:"Manage projects within your teams"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>c(!0),children:"Create Project"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sC.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(S.Input,{prefix:(0,t.jsx)(sE.SearchIcon,{size:16}),placeholder:"Search projects by name, ID, description, or team...",style:{maxWidth:400},value:m,onChange:e=>u(e.target.value),allowClear:!0}),(0,t.jsx)(sI.Pagination,{current:p,total:g.length,pageSize:10,onChange:e=>x(e),size:"small",showTotal:e=>`${e} projects`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:y,dataSource:g.slice((p-1)*10,10*p),rowKey:"project_id",loading:a,pagination:!1})]}),(0,t.jsx)(ll,{isOpen:d,onClose:()=>c(!1)})]})}var lj=e.i(241902);let lf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"};var lb=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:lf}))}),l_=e.i(366308);let lv=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"},{value:"blocked",label:"blocked",color:"#991b1b",bg:"#fee2e2",border:"#fca5a5"}],lw=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"}],lN=({value:e,toolName:s,saving:a,onChange:l,policyType:r="input",size:i="small",minWidth:n=110,stopPropagation:o=!0})=>{let d="output"===r?lw:lv,c=lv.find(t=>t.value===e)??lv[0];return(0,t.jsx)(k.Select,{size:i,value:e,disabled:a,loading:a,onChange:e=>l(s,e),onClick:e=>o&&e.stopPropagation(),style:{minWidth:n,fontWeight:500,backgroundColor:c.bg,borderColor:c.border,color:c.color,borderRadius:999,fontSize:"small"===i?11:12},popupMatchSelectWidth:!1,options:d.map(e=>({value:e.value,label:(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,fontWeight:500,color:e.color},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:e.color,display:"inline-block",flexShrink:0}}),e.label]})}))})},lk="tool-detail";function lS({toolName:e,onBack:s,accessToken:a}){let l=(0,aL.useQueryClient)(),[r,n]=(0,i.useState)(!1),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)("team"),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(null),j=(0,i.useMemo)(()=>{let e,t,s;return e=new Date,(t=new Date).setDate(t.getDate()-90),{start:(s=e=>e.toISOString().slice(0,19).replace("T"," "))(t),end:s(e)}},[]),{data:f,isLoading:b,error:_}=(0,t1.useQuery)({queryKey:[lk,e],queryFn:()=>(0,w.fetchToolDetail)(a,e),enabled:!!a&&!!e}),{data:v}=(0,t1.useQuery)({queryKey:["tool-policy-options"],queryFn:()=>(0,w.fetchToolPolicyOptions)(a),enabled:!!a,staleTime:6e4}),{data:N}=(0,t1.useQuery)({queryKey:["teams-list-tool-detail"],queryFn:()=>(0,w.teamListCall)(a,null,null),enabled:!!a}),{data:S}=(0,t1.useQuery)({queryKey:["keys-list-tool-detail"],queryFn:()=>(0,w.keyListCall)(a,null,null,null,null,null,1,100),enabled:!!a}),{data:C,isLoading:T}=(0,t1.useQuery)({queryKey:["tool-usage-logs",e,j.start,j.end],queryFn:()=>(0,w.getToolUsageLogs)(a,e,{page:1,pageSize:50,startDate:j.start,endDate:j.end}),enabled:!!a&&!!e}),I=(0,i.useMemo)(()=>(C?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:"passed",model:e.model??void 0,input_snippet:e.input_snippet??void 0})),[C?.logs]);(0,i.useMemo)(()=>(Array.isArray(N)?N:N?.data??[]).map(e=>({team_id:e.team_id??e.id??"",team_alias:e.team_alias??e.team_id??"",models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:"",created_at:"",keys:[],members_with_roles:[],spend:0})),[N]);let F=(0,i.useMemo)(()=>(S?.keys??S?.data??[]).map(e=>({token:e.token??e.api_key??e.key_hash??"",key_alias:e.key_alias??(e.token??e.api_key??e.key_hash)?.toString?.()?.substring?.(0,8)})),[S]),L=(0,i.useCallback)(()=>{l.invalidateQueries({queryKey:[lk,e]})},[l,e]),A=(0,i.useCallback)(async(t,s)=>{if(a){d(!0);try{await (0,w.updateToolPolicy)(a,e,{input_policy:s}),L()}catch(e){alert(`Failed to update input policy: ${e instanceof Error?e.message:String(e)}`)}finally{d(!1)}}},[a,e,L]),P=(0,i.useCallback)(async(t,s)=>{if(a){m(!0);try{await (0,w.updateToolPolicy)(a,e,{output_policy:s}),L()}catch(e){alert(`Failed to update output policy: ${e instanceof Error?e.message:String(e)}`)}finally{m(!1)}}},[a,e,L]),M=(0,i.useCallback)(async()=>{if(!a||!e)return;let t="team"===u;if((!t||x)&&(t||g?.token)){n(!0);try{await (0,w.updateToolPolicy)(a,e,{input_policy:"blocked"},{team_id:t?x:void 0,key_hash:t?void 0:g.token,key_alias:t?void 0:g.key_alias}),L(),h(null),y(null)}catch(e){alert(`Failed to add override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,u,x,g,L]),D=(0,i.useCallback)(async t=>{if(a&&e){n(!0);try{await (0,w.deleteToolPolicyOverride)(a,e,{team_id:t.team_id??void 0,key_hash:t.key_hash??void 0}),L()}catch(e){alert(`Failed to remove override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,L]);if(b&&!f)return(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})});if(_&&!f)return(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load tool details."})]});if(!f)return null;let{tool:E,overrides:O}=f,z=v?.input_policies?.find(e=>e.value===E.input_policy)?.description,R=v?.output_policies?.find(e=>e.value===E.output_policy)?.description;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1 flex-wrap",children:[(0,t.jsx)(l_.ToolOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900 font-mono",children:E.tool_name}),(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-gray-100 text-gray-700 border border-gray-200",children:E.origin??"—"}),(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:[(E.call_count??0).toLocaleString()," calls"]})]}),(0,t.jsxs)("dl",{className:"mt-3 flex flex-wrap gap-x-6 gap-y-1 text-sm text-gray-600",children:[E.user_agent&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"User Agent:"}),(0,t.jsx)("dd",{className:"font-mono truncate max-w-[40ch]",title:E.user_agent,children:E.user_agent})]}),E.created_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"First Discovered:"}),(0,t.jsx)("dd",{children:new Date(E.created_at).toLocaleString()})]}),E.last_used_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"Last Used:"}),(0,t.jsx)("dd",{children:new Date(E.last_used_at).toLocaleString()})]})]})]})})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Input Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:z??"Controls what data this tool is allowed to accept."}),(0,t.jsx)(lN,{value:E.input_policy,toolName:E.tool_name,saving:o,onChange:A,policyType:"input",size:"middle",minWidth:140,stopPropagation:!1})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Output Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:R??"Controls how this tool's output is trusted by downstream tools."}),(0,t.jsx)(lN,{value:E.output_policy,toolName:E.tool_name,saving:c,onChange:P,policyType:"output",size:"middle",minWidth:140,stopPropagation:!1})]})]}),O.length>0&&(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Blocked for team or key"}),(0,t.jsx)("ul",{className:"border rounded-md divide-y divide-gray-100 bg-red-50/30",children:O.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between px-3 py-2.5 text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-700",children:[e.team_id?`Team: ${e.team_id}`:"",e.team_id&&e.key_hash?" · ":"",e.key_hash?`Key: ${e.key_alias||e.key_hash.substring(0,8)}`:"",e.team_id||e.key_hash?"":"—"]}),(0,t.jsx)(V.Button,{type:"link",danger:!0,size:"small",disabled:r,onClick:()=>D(e),children:"Remove"})]},e.override_id))})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Block for team or key"}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 max-w-md",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Scope"}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"team"===u,onChange:()=>p("team"),className:"align-middle"}),"Team"]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"key"===u,onChange:()=>p("key"),className:"align-middle"}),"Key"]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"team"===u?"Team":"Key"}),"team"===u?(0,t.jsx)(q.default,{value:x??void 0,onChange:e=>h(e||null)}):(0,t.jsx)(k.Select,{placeholder:"Select key",allowClear:!0,showSearch:!0,optionFilterProp:"label",value:g?g.token:void 0,onChange:e=>{y(F.find(t=>t.token===e)??null)},options:F.map(e=>({value:e.token,label:e.key_alias||e.token?.substring?.(0,12)||e.token})),className:"w-full",style:{minWidth:200}})]}),(0,t.jsxs)(V.Button,{type:"primary",danger:!0,disabled:r||("team"===u?!x:!g?.token),loading:r,onClick:M,children:["Block for ",u]})]})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2",children:[(0,t.jsx)(lb,{}),"Recent logs"]}),(0,t.jsx)(st,{guardrailName:E.tool_name,filterAction:"passed",logs:I,logsLoading:T,totalLogs:C?.total??0,accessToken:a,startDate:j.start,endDate:j.end})]})]})]})}var lC=e.i(307582),lT=e.i(969550);function lI(e){return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`}function lF(e,t){if(!e)return!1;try{let s=new Date(e);return lI(s)===t}catch{return!1}}function lL(e,t){return e.filter(e=>lF(e.created_at,t)).length}let lA=({accessToken:e,onSelectTool:s})=>{let[a,l]=(0,i.useState)([]),[r,n]=(0,i.useState)(!0),[o,h]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[j,b]=(0,i.useState)(null),[v,N]=(0,i.useState)(null),[k,S]=(0,i.useState)(""),[C,T]=(0,i.useState)("created_at"),[I,F]=(0,i.useState)("desc"),[L,A]=(0,i.useState)(1),[P,M]=(0,i.useState)(!0),[D,E]=(0,i.useState)({}),O=(0,i.useDeferredValue)(o),z=o||O,R=(0,i.useCallback)(async()=>{if(e){h(!0),y(null);try{let t=await (0,w.fetchToolsList)(e);l(t)}catch(e){y(e.message??"Failed to load tools")}finally{h(!1),n(!1)}}},[e]);(0,i.useEffect)(()=>{R()},[R]),(0,i.useEffect)(()=>{if(!P)return;let e=setInterval(R,15e3);return()=>clearInterval(e)},[P,R]);let B=async(t,s)=>{if(e){b(t);try{await (0,w.updateToolPolicy)(e,t,{input_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,input_policy:s}:e))}catch(e){alert(`Failed to update input policy: ${e.message}`)}finally{b(null)}}},q=async(t,s)=>{if(e){N(t);try{await (0,w.updateToolPolicy)(e,t,{output_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,output_policy:s}:e))}catch(e){alert(`Failed to update output policy: ${e.message}`)}finally{N(null)}}},$=Array.from(new Set(a.map(e=>e.team_id).filter(Boolean))).map(e=>({label:e,value:e})),U=Array.from(new Set(a.map(e=>e.key_alias).filter(Boolean))).map(e=>({label:e,value:e})),V=[{name:"Input Policy",label:"Input Policy",options:lv.map(e=>({label:e.label,value:e.value}))},{name:"Output Policy",label:"Output Policy",options:lw.map(e=>({label:e.label,value:e.value}))},{name:"Team Name",label:"Team Name",options:$},{name:"Key Name",label:"Key Name",options:U}],{newToday:H,newYesterday:G,trendSubtitle:K,totalTools:W,blockedCount:Q,activeTeamsCount:Y,needsReviewTools:J}=(0,i.useMemo)(()=>{let e=new Date,t=lI(e),s=new Date(e);s.setUTCDate(s.getUTCDate()-1);let l=lI(s),r=lL(a,t),i=lL(a,l),n=function(e,t){let s=e-t;if(0!==s)return s>0?`+${s} since yesterday`:`${s} since yesterday`}(r,i),o=a.length,d=a.filter(e=>"blocked"===e.input_policy).length;return{newToday:r,newYesterday:i,trendSubtitle:n,totalTools:o,blockedCount:d,activeTeamsCount:new Set(a.map(e=>e.team_id).filter(Boolean)).size,needsReviewTools:a.filter(e=>lF(e.created_at,t)&&"untrusted"===e.input_policy)}},[a]),X=({label:e,field:s})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(aO.TableHeaderSortDropdown,{sortState:C===s&&I,onSortChange:e=>{!1===e?(T("created_at"),F("desc")):(T(s),F(e)),A(1)}})]}),Z=a.filter(e=>{if(k){let t=k.toLowerCase();if(!(e.tool_name.toLowerCase().includes(t)||(e.team_id??"").toLowerCase().includes(t)||(e.key_alias??"").toLowerCase().includes(t)||(e.key_hash??"").toLowerCase().includes(t)||e.input_policy.toLowerCase().includes(t)||e.output_policy.toLowerCase().includes(t)))return!1}return(!D["Input Policy"]||e.input_policy===D["Input Policy"])&&(!D["Output Policy"]||e.output_policy===D["Output Policy"])&&(!D["Team Name"]||e.team_id===D["Team Name"])&&(!D["Key Name"]||e.key_alias===D["Key Name"])}),ee=[...Z].sort((e,t)=>{let s=e[C]??"",a=t[C]??"";return sa?"desc"===I?-1:1:0}),et=Math.max(1,Math.ceil(ee.length/50)),es=ee.slice((L-1)*50,50*L);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Tool Policies"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(ss,{label:"New Today",value:H,valueColor:"text-green-600",subtitle:K,icon:(0,t.jsx)("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})})}),(0,t.jsx)(ss,{label:"Total Tools Discovered",value:W}),(0,t.jsx)(ss,{label:"Blocked Tools",value:Q,valueColor:Q>0?"text-red-600":void 0}),(0,t.jsx)(ss,{label:"Active Teams",value:Y>0?Y:"—"})]}),J.length>0&&(0,t.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-6",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-amber-900 mb-1",children:"Needs Review"}),(0,t.jsxs)("p",{className:"text-sm text-amber-800 mb-3",children:[J.length," new tool",1!==J.length?"s":""," discovered that require policy decisions."]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:J.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-white border border-amber-200 rounded-md text-sm",children:[(0,t.jsx)("span",{className:"font-mono text-amber-900 truncate max-w-[200px]",title:e.tool_name,children:e.tool_name}),(0,t.jsx)("button",{type:"button",onClick:()=>(e=>{let t=ee.findIndex(t=>t.tool_id===e);if(t>=0){let s=Math.floor(t/50)+1;s!==L&&A(s),requestAnimationFrame(()=>{setTimeout(()=>{document.getElementById(`tool-row-${e}`)?.scrollIntoView({behavior:"smooth",block:"center"})},100)})}})(e.tool_id),className:"text-amber-700 hover:text-amber-900 font-medium text-xs whitespace-nowrap",children:"Review"})]},e.tool_id))})]}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("div",{className:"relative w-64",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Tool Name",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:k,onChange:e=>{S(e.target.value),A(1)}}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(_.Switch,{checked:P,onChange:M})]}),(0,t.jsxs)("button",{onClick:R,disabled:z,className:"flex items-center gap-1.5 px-3 py-2 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-60",children:[(0,t.jsx)("svg",{className:`w-4 h-4 ${z?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),z?"Fetching":"Fetch"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm text-gray-600 whitespace-nowrap",children:[(0,t.jsxs)("span",{children:["Showing ",0===Z.length?0:(L-1)*50+1," -"," ",Math.min(50*L,Z.length)," of ",Z.length," results"]}),(0,t.jsxs)("span",{children:["Page ",L," of ",et]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(lT.default,{options:V,onApplyFilters:e=>{E(e),A(1)},onResetFilters:()=>{E({}),A(1)},buttonLabel:"Filters"})})]}),P&&(0,t.jsxs)("div",{className:"bg-green-50 border-b border-green-100 px-6 py-2 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"}),(0,t.jsx)("button",{onClick:()=>M(!1),className:"text-xs text-green-600 underline",children:"Stop"})]}),g&&(0,t.jsx)("div",{className:"mx-6 mt-4 p-3 bg-red-50 border border-red-200 rounded text-sm text-red-700",children:g}),(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 w-full",children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Discovered",field:"created_at"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Tool Name",field:"tool_name"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Input Policy",field:"input_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Output Policy",field:"output_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"# Calls",field:"call_count"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Team Name",field:"team_id"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"Key Hash"}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Key Name",field:"key_alias"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"User Agent"})]})}),(0,t.jsx)(c.TableBody,{children:r?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"Loading tools…"})}):0===es.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"No tools discovered yet. Make a chat completion that returns tool_calls to start auto-discovery."})}):es.map(e=>(0,t.jsxs)(x.TableRow,{id:`tool-row-${e.tool_id}`,className:"h-8 hover:bg-gray-50",children:[(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(lC.TimeCell,{utcTime:e.created_at??""})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden",children:(0,t.jsx)("button",{type:"button",onClick:()=>s?.(e.tool_name),className:"text-left w-full font-mono text-xs max-w-[20ch] truncate block font-medium text-blue-600 hover:text-blue-800 hover:underline focus:outline-none focus:ring-0",children:(0,t.jsx)(f.Tooltip,{title:s?"Click to view details and block for team/key":e.tool_name,children:(0,t.jsx)("span",{children:e.tool_name})})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lN,{value:e.input_policy,toolName:e.tool_name,saving:j===e.tool_name,onChange:B,policyType:"input"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lN,{value:e.output_policy,toolName:e.tool_name,saving:v===e.tool_name,onChange:q,policyType:"output"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)("div",{className:"flex items-center justify-end h-8 tabular-nums text-sm font-mono text-gray-700",children:(e.call_count??0).toLocaleString()})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.team_id??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.team_id??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_hash??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block text-blue-600",children:e.key_hash??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_alias??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.key_alias??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.user_agent??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[20ch] truncate block text-xs text-gray-500",children:e.user_agent??"-"})})})]},e.tool_id))})]}),et>1&&(0,t.jsxs)("div",{className:"border-t px-6 py-3 flex items-center justify-between text-sm text-gray-600",children:[(0,t.jsxs)("span",{children:["Showing ",(L-1)*50+1," - ",Math.min(50*L,ee.length)," of"," ",ee.length]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]})]})};function lP({accessToken:e,userRole:s}){let[a,l]=(0,i.useState)({type:"overview"});return(0,t.jsx)("div",{className:"p-6 w-full min-w-0 flex-1",children:"detail"===a.type?(0,t.jsx)(lS,{toolName:a.toolName,onBack:()=>{l({type:"overview"})},accessToken:e}):(0,t.jsx)(lA,{accessToken:e,userRole:s,onSelectTool:e=>{l({type:"detail",toolName:e})}})})}var lM=e.i(608856),lD=e.i(751904),lE=e.i(123521);let{Text:lO}=sn.Typography,lz=({open:e,mode:s,initialRow:a,onClose:l,onSave:r})=>{let[n]=N.Form.useForm(),[o,d]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&("edit"===s&&a?n.setFieldsValue({key:a.key,value:a.value,metadata:null!=a.metadata?JSON.stringify(a.metadata,null,2):""}):n.resetFields())},[e,s,a,n]);let c=async()=>{let e=await n.validateFields();d(!0);let t=await r(e.key.trim(),e.value??"",e.metadata??"","create"===s);d(!1),t&&(n.resetFields(),l())};return(0,t.jsx)(y.Modal,{open:e,title:"create"===s?"Create memory":`Edit ${a?.key??""}`,onCancel:()=>{n.resetFields(),l()},onOk:c,okText:"create"===s?"Create":"Save",confirmLoading:o,width:640,destroyOnClose:!0,children:(0,t.jsxs)(N.Form,{form:n,layout:"vertical",children:[(0,t.jsx)(N.Form.Item,{label:"Key",name:"key",rules:[{required:!0,message:"Key is required"}],tooltip:"Globally unique — two memories cannot share a key. Namespace your own keys if you need per-user isolation (e.g. user:123:notes).",children:(0,t.jsx)(S.Input,{placeholder:"e.g. user_role",disabled:"edit"===s})}),(0,t.jsx)(N.Form.Item,{label:"Value",name:"value",rules:[{required:!0,message:"Value is required"}],tooltip:"Markdown/text injected into LLM context. Plain strings are fine.",children:(0,t.jsx)(S.Input.TextArea,{rows:8,placeholder:"What the agent should remember…"})}),(0,t.jsx)(N.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata ",(0,t.jsx)(lO,{type:"secondary",children:"(optional JSON)"})]}),name:"metadata",tooltip:"Optional structured metadata — must be valid JSON if provided.",children:(0,t.jsx)(S.Input.TextArea,{rows:4,placeholder:'{"tags": ["example"]}',style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"}})})]})})},{Text:lR,Paragraph:lB,Title:lq}=sn.Typography;function l$(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}let lU=({accessToken:e})=>{let[s,a]=(0,i.useState)(""),[l,r]=(0,i.useState)(""),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(null),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(1);i.default.useEffect(()=>{g(1)},[l]);let y=(0,aL.useQueryClient)(),j="memoryList",{data:b,isLoading:_,isFetching:v}=(0,t1.useQuery)({queryKey:[j,l,h],queryFn:()=>{if(!e)throw Error("Access token required");return(0,w.fetchMemoryList)(e,{keyPrefix:l||void 0,page:h,pageSize:50})},enabled:!!e}),N=(0,i.useMemo)(()=>b?.memories??[],[b]),k=b?.total??0,C=()=>y.invalidateQueries({queryKey:[j]}),T=(0,aF.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");return(0,w.createMemory)(e,t)},onSuccess:e=>{sA.message.success(`Created ${e.key}`),C()},onError:e=>{sA.message.error(`Save failed: ${e.message}`)}}),I=(0,aF.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");let{key:s,...a}=t;return(0,w.updateMemory)(e,s,a)},onSuccess:e=>{sA.message.success(`Updated ${e.key}`),C()},onError:e=>{sA.message.error(`Save failed: ${e.message}`)}}),F=(0,aF.useMutation)({mutationFn:t=>{if(!e)throw Error("Access token required");return(0,w.deleteMemory)(e,t).then(()=>t)},onSuccess:e=>{sA.message.success(`Deleted ${e}`),C()},onError:e=>{sA.message.error(`Delete failed: ${e.message}`)}}),L=async()=>{if(m)try{await F.mutateAsync(m.key),u(null)}catch{}},A=async(t,s,a,l)=>{let r;if(!e)return!1;if(a.trim())try{r=JSON.parse(a)}catch{return sA.message.error("Metadata must be valid JSON (or leave empty)."),!1}else r=l?void 0:null;try{return l?await T.mutateAsync({key:t,value:s,metadata:r}):await I.mutateAsync({key:t,value:s,metadata:r}),!0}catch{return!1}},P=(e,s)=>{if(!e)return(0,t.jsx)(lR,{type:"secondary",children:"-"});let a=e.length>10?`${e.slice(0,7)}...`:e,l="font-mono text-blue-600 bg-blue-50 text-xs font-medium px-2 py-0.5 rounded-md border border-blue-200 inline-block max-w-[15ch] truncate whitespace-nowrap";return(0,t.jsx)(f.Tooltip,{title:e,children:s?(0,t.jsx)("button",{onClick:s,className:`${l} hover:bg-blue-100 cursor-pointer transition-colors text-left`,children:a}):(0,t.jsx)("span",{className:l,children:a})})},M=[{title:"ID",dataIndex:"memory_id",key:"memory_id",width:140,render:(e,t)=>P(t.memory_id,()=>o(t))},{title:"Name",dataIndex:"key",key:"key",width:200,render:e=>(0,t.jsx)(lR,{code:!0,children:e})},{title:"Preview",dataIndex:"value",key:"value",render:e=>(0,t.jsx)(lR,{type:"secondary",style:{whiteSpace:"pre-wrap"},children:function(e,t=120){if(!e)return"";let s=e.trim();return s.length<=t?s:`${s.slice(0,t)}…`}(e)})},{title:"User ID",dataIndex:"user_id",key:"user_id",width:160,render:e=>P(e)},{title:"Team ID",dataIndex:"team_id",key:"team_id",width:160,render:e=>P(e)},{title:"Updated",dataIndex:"updated_at",key:"updated_at",width:180,render:e=>(0,t.jsx)(lR,{type:"secondary",children:l$(e)})},{title:"",key:"actions",width:140,render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(V.Button,{size:"small",type:"text",icon:(0,t.jsx)(lE.EyeOutlined,{}),onClick:()=>o(s),"aria-label":"View"}),(0,t.jsx)(V.Button,{size:"small",type:"text",icon:(0,t.jsx)(lD.EditOutlined,{}),onClick:()=>c(s),"aria-label":"Edit"}),(0,t.jsx)(V.Button,{size:"small",type:"text",danger:!0,icon:(0,t.jsx)(tt.DeleteOutlined,{}),onClick:()=>{u(s)},"aria-label":"Delete"})]})}];return(0,t.jsxs)("div",{className:"w-full",style:{padding:24},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lq,{level:3,style:{marginBottom:4},children:"Memory"}),(0,t.jsxs)(lB,{type:"secondary",style:{marginBottom:0},children:["Inspect what your agents have stored under ",(0,t.jsx)(lR,{code:!0,children:"/v1/memory"}),". Scoped to memories visible to your user / team (admins see all)."]})]}),(0,t.jsxs)(ts.Card,{children:[(0,t.jsxs)(U.Space,{style:{width:"100%",justifyContent:"space-between",marginBottom:16},wrap:!0,children:[(0,t.jsxs)(U.Space,{children:[(0,t.jsx)(S.Input,{allowClear:!0,placeholder:'Filter by key prefix, e.g. "user:"',prefix:(0,t.jsx)(aa.SearchOutlined,{}),value:s,onChange:e=>a(e.target.value),onPressEnter:()=>r(s.trim()),onClear:()=>{a(""),r("")},style:{width:280}}),(0,t.jsx)(V.Button,{type:"primary",ghost:!0,onClick:()=>r(s.trim()),children:"Search"}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>C(),loading:v&&!_,children:"Refresh"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>x(!0),children:"New memory"})]}),(0,t.jsx)(te.Table,{rowKey:"memory_id",loading:_,dataSource:N,columns:M,pagination:{current:h,pageSize:50,total:k,showSizeChanger:!1,showTotal:(e,t)=>`${t[0]}–${t[1]} of ${e}`,onChange:e=>g(e)},locale:{emptyText:(0,t.jsx)(aR.Empty,{description:l?`No memories with keys starting with "${l}"`:"No memories stored yet"})}})]})]}),(0,t.jsx)(lM.Drawer,{open:!!n,onClose:()=>o(null),title:n?(0,t.jsx)(U.Space,{children:(0,t.jsx)(lR,{code:!0,children:n.key})}):"Memory",width:720,destroyOnClose:!0,children:n&&(0,t.jsxs)(U.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(U.Space,{size:"large",wrap:!0,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,style:{display:"block"},children:"Memory ID"}),(0,t.jsx)(lR,{code:!0,style:{fontSize:12},children:n.memory_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,style:{display:"block"},children:"User ID"}),(0,t.jsx)(lR,{type:n.user_id?void 0:"secondary",children:n.user_id??"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,style:{display:"block"},children:"Team ID"}),(0,t.jsx)(lR,{type:n.team_id?void 0:"secondary",children:n.team_id??"-"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,children:"Value"}),(0,t.jsx)(lB,{style:{background:"#fafafa",padding:12,borderRadius:6,whiteSpace:"pre-wrap",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:13},children:n.value})]}),void 0!==n.metadata&&null!==n.metadata&&(0,t.jsxs)("div",{children:[(0,t.jsx)(lR,{strong:!0,children:"Metadata"}),(0,t.jsx)(lB,{style:{background:"#fafafa",padding:12,borderRadius:6,whiteSpace:"pre-wrap",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:12},children:JSON.stringify(n.metadata,null,2)})]}),(0,t.jsxs)(U.Space,{split:(0,t.jsx)(lR,{type:"secondary",children:"·"}),wrap:!0,size:"small",style:{color:"rgba(0,0,0,0.45)"},children:[(0,t.jsxs)(lR,{type:"secondary",children:["Created ",l$(n.created_at),n.created_by?` by ${n.created_by}`:""]}),(0,t.jsxs)(lR,{type:"secondary",children:["Updated ",l$(n.updated_at),n.updated_by?` by ${n.updated_by}`:""]})]})]})}),(0,t.jsx)(lz,{open:p||!!d,mode:d?"edit":"create",initialRow:d??void 0,onClose:()=>{x(!1),c(null)},onSave:A}),(0,t.jsx)(sK.default,{isOpen:!!m,title:"Delete memory",message:"This action cannot be undone.",resourceInformationTitle:"Memory",resourceInformation:m?[{label:"Key",value:m.key,code:!0},{label:"Memory ID",value:m.memory_id,code:!0},{label:"User ID",value:m.user_id??"-",code:!0},{label:"Team ID",value:m.team_id??"-",code:!0}]:[],onCancel:()=>{F.isPending||u(null)},onOk:L,confirmLoading:F.isPending,requiredConfirmation:m?.key})]})};var lV=e.i(936190),lH=e.i(910119),lG=e.i(275144),lK=e.i(268004),lW=e.i(161281),lQ=e.i(321836),lY=e.i(947293),lJ=e.i(618566),lX=e.i(592143);function lZ(e,t="/"){document.cookie=`${e}=; Max-Age=0; Path=${t}`,"token"===e&&(0,lK.clearTokenCookies)()}let l0={api_ref:"api-reference","api-reference":"api-reference"};function l1(){let[e,n]=(0,i.useState)(""),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)([]),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)([]),[v,N]=(0,i.useState)({PROXY_BASE_URL:"",PROXY_LOGOUT_URL:""}),[k,S]=(0,i.useState)(!0),C=(0,lJ.useRouter)(),T=(0,lJ.useSearchParams)(),[I,F]=(0,i.useState)({data:[]}),[L,A]=(0,i.useState)(null),[P,M]=(0,i.useState)(!1),[D,E]=(0,i.useState)(!0),[O,z]=(0,i.useState)(null),[R,B]=(0,i.useState)(!0),[q,$]=(0,i.useState)(!1),[U,V]=(0,i.useState)(!1),[H,G]=(0,i.useState)(!1),[K,W]=(0,i.useState)(!1),[Q,Y]=(0,i.useState)(!1),J=T.get("invitation_id"),X="true"===T.get("create"),Z=(0,i.useMemo)(()=>{if(!X)return;let e=T.get("owned_by"),t=T.get("team_id"),s=T.get("key_alias"),a=T.get("models"),l=T.get("key_type");if(!e&&!t&&!s&&!a&&!l)return;let r=e&&["you","service_account","another_user"].includes(e)?e:void 0,i=l&&["default","llm_api","management"].includes(l)?l:void 0,n=s?s.trim().slice(0,256):void 0,o=a?a.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:i}},[T,X]),[ee,et]=(0,i.useState)(()=>T.get("page")||"api-keys"),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),ei=(0,i.useRef)(!1),en=e=>{y(t=>t?[...t,e]:[e]),M(()=>!P)},eo=!1===D&&null===L&&null===J;(0,i.useEffect)(()=>{let e=!1;return(async()=>{try{await (0,w.getUiConfig)()}catch{}if(e)return;let t=(0,lK.getCookie)("token"),s=t&&!(0,lW.isJwtExpired)(t)?t:null;t&&!s&&lZ("token","/"),e||(A(s),E(!1))})(),()=>{e=!0}},[]),(0,i.useEffect)(()=>{if(eo){(0,lQ.storeReturnUrl)();let e=(w.proxyBaseUrl||"")+"/ui/login",t=(0,lQ.buildLoginUrlWithReturn)(e);window.location.replace(t)}},[eo]);let ed=ee in l0;return((0,i.useEffect)(()=>{if(!D&&ed){let e=(w.proxyBaseUrl||"")+"/ui";C.replace(`${e}/${l0[ee]}`)}},[D,ed,ee,C]),(0,i.useEffect)(()=>{if(D||!L||ei.current)return;ei.current=!0;let e=(0,lQ.consumeReturnUrl)();if(e&&(0,lQ.isValidReturnUrl)(e)){let t=new URL(e,window.location.origin);if(t.origin!==window.location.origin)return;let s=window.location.href;(0,lQ.normalizeUrlForCompare)(e)!==(0,lQ.normalizeUrlForCompare)(s)&&window.location.replace(t.href)}},[D,L]),(0,i.useEffect)(()=>{L||(ei.current=!1)},[L]),(0,i.useEffect)(()=>{if(!L)return;if((0,lW.isJwtExpired)(L)){lZ("token","/"),A(null);return}let e=null;try{e=(0,lY.jwtDecode)(L)}catch{lZ("token","/"),A(null);return}if(e){if(ea(e.key),m(e.disabled_non_admin_personal_key_creation),e.user_role){let t=(0,ew.formatUserRole)(e.user_role);n(t),"Admin Viewer"==t&&et("usage")}e.user_email&&p(e.user_email),e.login_method&&S("username_password"==e.login_method),e.premium_user&&d(e.premium_user),e.auth_header_name&&(0,w.setGlobalLitellmHeaderName)(e.auth_header_name),e.user_id&&z(e.user_id)}},[L]),(0,i.useEffect)(()=>{es&&O&&e&&(0,sX.fetchUserModels)(O,e,es,_),es&&O&&e&&(0,eV.teamListCall)(es,1,100,{userID:"Admin"!==e&&"Admin Viewer"!==e?O:null}).then(e=>h(e.teams??[])).catch(console.error),es&&(0,sZ.fetchOrganizations)(es,f)},[es,O,e]),(0,i.useEffect)(()=>{es&&L&&(async()=>{try{let e=await (0,w.getInProductNudgesCall)(es),t=e?.is_claude_code_enabled||!1;V(t),t&&(G(!0),B(!1))}catch(e){console.error("Failed to fetch in-product nudges:",e)}})()},[es,L]),(0,i.useEffect)(()=>{if(R&&!q){let e=setTimeout(()=>{B(!1)},15e3);return()=>clearTimeout(e)}},[R,q]),(0,i.useEffect)(()=>{if(H&&!K){let e=setTimeout(()=>{G(!1)},15e3);return()=>clearTimeout(e)}},[H,K]),D||eo||ed)?(0,t.jsx)(eH.default,{}):(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(lX.ConfigProvider,{theme:{algorithm:Q?sL.theme.darkAlgorithm:sL.theme.defaultAlgorithm},children:(0,t.jsx)(lG.ThemeProvider,{accessToken:es,children:J?(0,t.jsx)(aT.default,{userID:O,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:P}):(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,t.jsx)(sf.default,{userID:O,userRole:e,premiumUser:o,userEmail:u,setProxySettings:N,proxySettings:v,accessToken:es,isPublicPage:!1,sidebarCollapsed:el,onToggleSidebar:()=>{er(!el)},isDarkMode:Q,toggleDarkMode:()=>{Y(!Q)}}),(0,t.jsxs)("div",{className:"flex flex-1",children:[(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(s.default,{setPage:e=>{let t=new URLSearchParams(T);t.set("page",e),window.history.pushState(null,"",`?${t.toString()}`),et(e)},defaultSelectedKey:ee,sidebarCollapsed:el})}),"api-keys"==ee?(0,t.jsx)(aT.default,{userID:O,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:P,autoOpenCreate:X,prefillData:Z}):"models"==ee?(0,t.jsx)(a.default,{token:L,keys:g,modelData:I,setModelData:F,premiumUser:o,teams:x}):"llm-playground"==ee?(0,t.jsx)(l.default,{}):"users"==ee?(0,t.jsx)(lH.default,{userID:O,userRole:e,token:L,keys:g,teams:x,accessToken:es,setKeys:y}):"teams"==ee?(0,t.jsx)(sJ,{teams:x,setTeams:h,accessToken:es,userID:O,userRole:e,organizations:j,premiumUser:o,searchParams:T}):"organizations"==ee?(0,t.jsx)(sZ.default,{organizations:j,setOrganizations:f,userModels:b,accessToken:es,userRole:e,premiumUser:o}):"admin-panel"==ee?(0,t.jsx)(r.default,{proxySettings:v}):"logging-and-alerts"==ee?(0,t.jsx)(ao.default,{userID:O,userRole:e,accessToken:es,premiumUser:o}):"budgets"==ee?(0,t.jsx)(eq.default,{accessToken:es}):"guardrails"==ee?(0,t.jsx)(sh.default,{accessToken:es,userRole:e}):"policies"==ee?(0,t.jsx)(sg.default,{accessToken:es,userRole:e}):"agents"==ee?(0,t.jsx)(eB,{accessToken:es,userRole:e,teams:x}):"prompts"==ee?(0,t.jsx)(s1.default,{accessToken:es,userRole:e}):"transform-request"==ee?(0,t.jsx)(ak.default,{accessToken:es}):"router-settings"==ee?(0,t.jsx)(tQ.default,{userID:O,userRole:e,accessToken:es,modelData:I}):"ui-theme"==ee?(0,t.jsx)(aS.default,{userID:O,userRole:e,accessToken:es}):"cost-tracking"==ee?(0,t.jsx)(tW,{userID:O,userRole:e,accessToken:es}):"model-hub-table"==ee?(0,ew.isAdminRole)(e)?(0,t.jsx)(sj.default,{accessToken:es,publicPage:!1,premiumUser:o,userRole:e}):(0,t.jsx)(s2.default,{accessToken:es,isEmbedded:!0}):"caching"==ee?(0,t.jsx)(e$.default,{userID:O,userRole:e,token:L,accessToken:es,premiumUser:o}):"pass-through-settings"==ee?(0,t.jsx)(s0.default,{userID:O,userRole:e,accessToken:es,modelData:I,premiumUser:o}):"logs"==ee?(0,t.jsx)(lV.default,{userID:O,userRole:e,token:L,accessToken:es,premiumUser:o}):"mcp-servers"==ee?(0,t.jsx)(sy.MCPServers,{accessToken:es,userRole:e,userID:O}):"search-tools"==ee?(0,t.jsx)(an,{accessToken:es,userRole:e,userID:O}):"tag-management"==ee?(0,t.jsx)(aN.default,{accessToken:es,userRole:e,userID:O}):"skills"==ee||"claude-code-plugins"==ee?(0,t.jsx)(eU.default,{accessToken:es,userRole:e}):"access-groups"==ee?(0,t.jsx)(a8,{}):"projects"==ee?(0,t.jsx)(ly,{}):"vector-stores"==ee?(0,t.jsx)(lj.default,{accessToken:es,userRole:e,userID:O}):"tool-policies"==ee?(0,t.jsx)(lP,{accessToken:es,userRole:e}):"memory"==ee?(0,t.jsx)(lU,{accessToken:es,userID:O,userRole:e}):"guardrails-monitor"==ee?(0,t.jsx)(sx,{accessToken:es}):"new_usage"==ee?(0,t.jsx)(sb.default,{teams:x??[],organizations:j??[]}):(0,t.jsx)(aC.default,{userID:O,userRole:e,token:L,accessToken:es,keys:g,premiumUser:o})]}),(0,t.jsx)(ah,{isVisible:R,onOpen:()=>{B(!1),$(!0)},onDismiss:()=>{B(!1)}}),(0,t.jsx)(ab,{isOpen:q,onClose:()=>{$(!1),B(!0)},onComplete:()=>{$(!1)}}),(0,t.jsx)(av,{isVisible:H,onOpen:()=>{G(!1),W(!0)},onDismiss:()=>{G(!1)}}),(0,t.jsx)(aw,{isOpen:K,onClose:()=>{W(!1),G(!0)},onComplete:()=>{W(!1)}})]})})})})}function l2(){return(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(l1,{})})}e.s(["default",()=>l2],952683)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e871b803455fadee.js b/litellm/proxy/_experimental/out/_next/static/chunks/e871b803455fadee.js deleted file mode 100644 index c33b6ad1c4..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/e871b803455fadee.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,149121,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(152990),a=e.i(682830),l=e.i(269200),i=e.i(427612),n=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572);function u({data:e=[],columns:u,onRowClick:p,renderSubComponent:h,renderChildRows:m,getRowCanExpand:g,isLoading:x=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:v="No logs found",enableSorting:b=!1}){let y=!!(h||m)&&!!g,[j,w]=(0,s.useState)([]),N=(0,r.useReactTable)({data:e,columns:u,...b&&{state:{sorting:j},onSortingChange:w,enableSortingRemoval:!1},...y&&{getRowCanExpand:g},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,a.getCoreRowModel)(),...b&&{getSortedRowModel:(0,a.getSortedRowModel)()},...y&&{getExpandedRowModel:(0,a.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(l.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(i.TableHead,{children:N.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let s=b&&e.column.getCanSort(),a=e.column.getIsSorted();return(0,t.jsx)(n.TableHeaderCell,{className:`py-1 h-8 ${s?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:s?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.flexRender)(e.column.columnDef.header,e.getContext()),s&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===a?"↑":"desc"===a?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:x?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):N.getRowModel().rows.length>0?N.getRowModel().rows.map(e=>(0,t.jsxs)(s.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${p?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>p?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,r.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),y&&e.getIsExpanded()&&m&&m({row:e}),y&&e.getIsExpanded()&&h&&!m&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:h({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:v})})})})})]})})}e.s(["DataTable",()=>u])},954616,e=>{"use strict";var t=e.i(271645),s=e.i(114272),r=e.i(540143),a=e.i(915823),l=e.i(619273),i=class extends a.Subscribable{#e;#t=void 0;#s;#r;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,l.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#l()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#a(){let e=this.#s?.state??(0,s.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){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,s){let a=(0,n.useQueryClient)(s),[o]=t.useState(()=>new i(a,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(r.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=t.useCallback((e,t)=>{o.mutate(e,t).catch(l.noop)},[o]);if(c.error&&(0,l.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},888288,e=>{"use strict";var t=e.i(271645);let s=(e,s)=>{let r=void 0!==s,[a,l]=(0,t.useState)(e);return[r?s:a,e=>{r||l(e)}]};e.s(["default",()=>s])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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),s=e.i(271645);let r={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 a=e.i(9583),l=s.forwardRef(function(e,l){return s.createElement(a.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["ArrowLeftOutlined",0,l],447566)},292639,e=>{"use strict";var t=e.i(764205),s=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,s.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},250980,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],250980)},502547,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,s],502547)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let s=e.i(264042).Row;e.s(["Row",0,s],621192)},214541,e=>{"use strict";var t=e.i(271645),s=e.i(135214),r=e.i(270345);e.s(["default",0,()=>{let[e,a]=(0,t.useState)([]),{accessToken:l,userId:i,userRole:n}=(0,s.default)();return(0,t.useEffect)(()=>{(async()=>{a(await (0,r.fetchTeams)(l,i,n,null))})()},[l,i,n]),{teams:e,setTeams:a}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function s(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function r(e,r){let a=t(e);return isNaN(r)?s(e,NaN):(r&&a.setDate(a.getDate()+r),a)}function a(e,r){let a=t(e);if(isNaN(r))return s(e,NaN);if(!r)return a;let l=a.getDate(),i=s(e,a.getTime());return(i.setMonth(a.getMonth()+r+1,0),l>=i.getDate())?i:(a.setFullYear(i.getFullYear(),i.getMonth(),l),a)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>s],96226),e.s(["addDays",()=>r],439189),e.s(["addMonths",()=>a],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),s=e.i(343794),r=e.i(529681),a=e.i(908286),l=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],d=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let r,a,l;return(0,s.default)(Object.assign(Object.assign(Object.assign({},(r=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${r}`]:r&&o.includes(r)})),(a={},d.forEach(s=>{a[`${e}-align-${s}`]=t.align===s}),a[`${e}-align-stretch`]=!t.align&&!!t.vertical,a)),(l={},c.forEach(s=>{l[`${e}-justify-${s}`]=t.justify===s}),l)))},p=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:s,paddingLG:r}=e,a=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:s,flexGapLG:r});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(a),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(a),(e=>{let{componentCls:t}=e,s={};return o.forEach(e=>{s[`${t}-wrap-${e}`]={flexWrap:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return d.forEach(e=>{s[`${t}-align-${e}`]={alignItems:e}}),s})(a),(e=>{let{componentCls:t}=e,s={};return c.forEach(e=>{s[`${t}-justify-${e}`]={justifyContent:e}}),s})(a)]},()=>({}),{resetStyle:!1});var h=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(s[r[a]]=e[r[a]]);return s};let m=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:d,flex:m,gap:g,vertical:x=!1,component:f="div",children:v}=e,b=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:y,direction:j,getPrefixCls:w}=t.default.useContext(l.ConfigContext),N=w("flex",n),[S,C,M]=p(N),k=null!=x?x:null==y?void 0:y.vertical,O=(0,s.default)(c,o,null==y?void 0:y.className,N,C,M,u(N,e),{[`${N}-rtl`]:"rtl"===j,[`${N}-gap-${g}`]:(0,a.isPresetSize)(g),[`${N}-vertical`]:k}),_=Object.assign(Object.assign({},null==y?void 0:y.style),d);return m&&(_.flex=m),g&&!(0,a.isPresetSize)(g)&&(_.gap=g),S(t.default.createElement(f,Object.assign({ref:i,className:O,style:_},(0,r.default)(b,["justify","wrap","align"])),v))});e.s(["Flex",0,m],525720)},891547,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,disabled:o})=>{let[c,d]=(0,s.useState)([]),[u,p]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,a.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{p(!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=>{console.log("Selected guardrails:",t),e(t)},value:l,loading:u,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),s=e.i(271645),r=e.i(199133),a=e.i(764205);function l(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let s=e.version_number??1,r=e.version_status??"draft";return{label:`${e.policy_name} — v${s} (${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:c,onPoliciesLoaded:d})=>{let[u,p]=(0,s.useState)([]),[h,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,a.getPoliciesList)(o);e.policies&&(p(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[o,d]),(0,t.jsx)("div",{children:(0,t.jsx)(r.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:i,loading:h,className:n,allowClear:!0,options:l(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>l])},384767,e=>{"use strict";var t=e.i(843476),s=e.i(599724),r=e.i(271645),a=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(764205);let n=function({vectorStores:e,accessToken:n}){let[o,c]=(0,r.useState)([]);return(0,r.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(n);e.data&&c(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)(s.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,s)=>{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},s)})}):(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)(s.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=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 c=e.i(871943),d=e.i(502547),u=e.i(592968);let p=function({mcpServers:e,mcpAccessGroups:l=[],mcpToolPermissions:n={},mcpToolsets:p=[],accessToken:h}){let[m,g]=(0,r.useState)([]),[x,f]=(0,r.useState)([]),[v,b]=(0,r.useState)(new Set),[y,j]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{(async()=>{if(h&&e.length>0)try{let e=await (0,i.fetchMCPServers)(h);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[h,e.length]),(0,r.useEffect)(()=>{(async()=>{if(h&&p.length>0)try{let e=await (0,i.fetchMCPToolsets)(h),t=Array.isArray(e)?e.filter(e=>p.includes(e.toolset_id)):[];f(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[h,p.length]);let w=[...e.map(e=>({type:"server",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],N=w.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)(o,{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:"blue",size:"xs",children:N})]}),N>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[w.map((e,s)=>{let r="server"===e.type?n[e.value]:void 0,a=r&&r.length>0,l=v.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 b(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s}))},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)(u.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 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=m.find(t=>t.server_id===e);if(t){let s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),a&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(d.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&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,s)=>(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},s))})})]},s)}),p.length>0&&p.map((e,s)=>{let r=x.find(t=>t.toolset_id===e),a=y.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 s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Toolset"})]}),l>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-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"}),a?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(d.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l>0&&a&&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,s)=>(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]},s))})})]},`toolset-${s}`)})]}):(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)(o,{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"})]})]})},h=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"}))}),m=function({agents:e,agentAccessGroups:l=[],accessToken:n}){let[o,c]=(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)&&c(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let d=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],p=d.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)(h,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(a.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:d.map((e,s)=>(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)(u.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 flex-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 s=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${s})`}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 flex-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 uppercase tracking-wide flex-shrink-0",children:"Group"})]})})})},s))}):(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)(h,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(s.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:a="",accessToken:l}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],c=e?.mcp_access_groups||[],d=e?.mcp_tool_permissions||{},u=e?.mcp_toolsets||[],h=e?.agents||[],g=e?.agent_access_groups||[],x=(0,t.jsxs)("div",{className:"card"===r?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:i,accessToken:l}),(0,t.jsx)(p,{mcpServers:o,mcpAccessGroups:c,mcpToolPermissions:d,mcpToolsets:u,accessToken:l}),(0,t.jsx)(m,{agents:h,agentAccessGroups:g,accessToken:l})]});return"card"===r?(0,t.jsxs)("div",{className:`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)(s.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(s.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),x]}):(0,t.jsxs)("div",{className:`${a}`,children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e8b12a8b1fe94fe9.js b/litellm/proxy/_experimental/out/_next/static/chunks/e8b12a8b1fe94fe9.js deleted file mode 100644 index ea899cbb60..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/e8b12a8b1fe94fe9.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),l=e.i(480731),o=e.i(444755),n=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,n.makeClassName)("Icon"),g=r.default.forwardRef((e,g)=>{let{icon:m,variant:h="simple",tooltip:p,size:f=l.Sizes.SM,color:x,className:b}=e,y=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),w=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,n.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,n.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,o.tremorTwMerge)((0,n.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,n.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,o.tremorTwMerge)((0,n.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,n.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,o.tremorTwMerge)((0,n.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,n.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,o.tremorTwMerge)((0,n.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,n.getColorClassNames)(t,s.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,o.tremorTwMerge)((0,n.getColorClassNames)(t,s.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,x),{tooltipProps:v,getReferenceProps:C}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,n.mergeRefs)([g,v.refs.setReference]),className:(0,o.tremorTwMerge)(u("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,c[h].rounded,c[h].border,c[h].shadow,c[h].ring,i[f].paddingX,i[f].paddingY,b)},C,y),r.default.createElement(a.default,Object.assign({text:p},v)),r.default.createElement(m,{className:(0,o.tremorTwMerge)(u("icon"),"shrink-0",d[f].height,d[f].width)}))});g.displayName="Icon",e.s(["default",()=>g],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};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(["default",0,o],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(529681);let o=e=>{let{prefixCls:a,className:l,style:o,size:n,shape:s}=e,i=(0,r.default)({[`${a}-lg`]:"large"===n,[`${a}-sm`]:"small"===n}),d=(0,r.default)({[`${a}-circle`]:"circle"===s,[`${a}-square`]:"square"===s,[`${a}-round`]:"round"===s}),c=t.useMemo(()=>"number"==typeof n?{width:n,height:n,lineHeight:`${n}px`}:{},[n]);return t.createElement("span",{className:(0,r.default)(a,i,d,l),style:Object.assign(Object.assign({},c),o)})};e.i(296059);var n=e.i(694758),s=e.i(915654),i=e.i(246422),d=e.i(838378);let c=new n.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,s.unit)(e)}),g=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)),p=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},f=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),x=(0,i.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:l,skeletonButtonCls:o,skeletonInputCls:n,skeletonImageCls:s,controlHeight:i,controlHeightLG:d,controlHeightSM:u,gradientFromColor:x,padding:b,marginSM:y,borderRadius:w,titleHeight:v,blockRadius:C,paragraphLiHeight:k,controlHeightXS:j,paragraphMarginTop:N}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:b,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:x},g(i)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},g(d)),[`${r}-sm`]:Object.assign({},g(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:v,background:x,borderRadius:C,[`+ ${l}`]:{marginBlockStart:u}},[l]:{padding:0,"> li":{width:"100%",height:k,listStyle:"none",background:x,borderRadius:C,"+ li":{marginBlockStart:j}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${l} > li`]:{borderRadius:w}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:y,[`+ ${l}`]:{marginBlockStart:N}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:l,controlHeightSM:o,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(a).mul(2).equal(),minWidth:s(a).mul(2).equal()},f(a,s))},p(e,a,r)),{[`${r}-lg`]:Object.assign({},f(l,s))}),p(e,l,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},f(o,s))}),p(e,o,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:l,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},g(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},g(l)),[`${t}${t}-sm`]:Object.assign({},g(o))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:l,controlHeightSM:o,gradientFromColor:n,calc:s}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:n,borderRadius:r},m(t,s)),[`${a}-lg`]:Object.assign({},m(l,s)),[`${a}-sm`]:Object.assign({},m(o,s))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:l,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:l},h(o(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},h(r)),{maxWidth:o(r).mul(4).equal(),maxHeight:o(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[n]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${a}, - ${l} > li, - ${r}, - ${o}, - ${n}, - ${s} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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"]]}),b=e=>{let{prefixCls:a,className:l,style:o,rows:n=0}=e,s=Array.from({length:n}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:o},s)},y=({prefixCls:e,className:a,width:l,style:o})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},o)});function w(e){return e&&"object"==typeof e?e:{}}let v=e=>{let{prefixCls:l,loading:n,className:s,rootClassName:i,style:d,children:c,avatar:u=!1,title:g=!0,paragraph:m=!0,active:h,round:p}=e,{getPrefixCls:f,direction:v,className:C,style:k}=(0,a.useComponentConfig)("skeleton"),j=f("skeleton",l),[N,S,O]=x(j);if(n||!("loading"in e)){let e,a,l=!!u,n=!!g,c=!!m;if(l){let r=Object.assign(Object.assign({prefixCls:`${j}-avatar`},n&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),w(u));e=t.createElement("div",{className:`${j}-header`},t.createElement(o,Object.assign({},r)))}if(n||c){let e,r;if(n){let r=Object.assign(Object.assign({prefixCls:`${j}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),w(g));e=t.createElement(y,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${j}-paragraph`},(e={},l&&n||(e.width="61%"),!l&&n?e.rows=3:e.rows=2,e)),w(m));r=t.createElement(b,Object.assign({},a))}a=t.createElement("div",{className:`${j}-content`},e,r)}let f=(0,r.default)(j,{[`${j}-with-avatar`]:l,[`${j}-active`]:h,[`${j}-rtl`]:"rtl"===v,[`${j}-round`]:p},C,s,i,S,O);return N(t.createElement("div",{className:f,style:Object.assign(Object.assign({},k),d)},e,a))}return null!=c?c:null};v.Button=e=>{let{prefixCls:n,className:s,rootClassName:i,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),m=g("skeleton",n),[h,p,f]=x(m),b=(0,l.default)(e,["prefixCls"]),y=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:d,[`${m}-block`]:c},s,i,p,f);return h(t.createElement("div",{className:y},t.createElement(o,Object.assign({prefixCls:`${m}-button`,size:u},b))))},v.Avatar=e=>{let{prefixCls:n,className:s,rootClassName:i,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),m=g("skeleton",n),[h,p,f]=x(m),b=(0,l.default)(e,["prefixCls","className"]),y=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:d},s,i,p,f);return h(t.createElement("div",{className:y},t.createElement(o,Object.assign({prefixCls:`${m}-avatar`,shape:c,size:u},b))))},v.Input=e=>{let{prefixCls:n,className:s,rootClassName:i,active:d,block:c,size:u="default"}=e,{getPrefixCls:g}=t.useContext(a.ConfigContext),m=g("skeleton",n),[h,p,f]=x(m),b=(0,l.default)(e,["prefixCls"]),y=(0,r.default)(m,`${m}-element`,{[`${m}-active`]:d,[`${m}-block`]:c},s,i,p,f);return h(t.createElement("div",{className:y},t.createElement(o,Object.assign({prefixCls:`${m}-input`,size:u},b))))},v.Image=e=>{let{prefixCls:l,className:o,rootClassName:n,style:s,active:i}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[u,g,m]=x(c),h=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:i},o,n,g,m);return u(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${c}-image`,o),style:s},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`})))))},v.Node=e=>{let{prefixCls:l,className:o,rootClassName:n,style:s,active:i,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",l),[g,m,h]=x(u),p=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:i},m,o,n,h);return g(t.createElement("div",{className:p},t.createElement("div",{className:(0,r.default)(`${u}-image`,o),style:s},d)))},e.s(["default",0,v],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],o=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),n=e=>e?6:5,s=(e,t,r,a,l)=>{clearTimeout(a.current);let n=o(e);t(n),r.current=n,l&&l({current:n})};var i=e.i(480731),d=e.i(444755),c=e.i(673706);let u=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 g=e.i(95779);let m={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"}},h=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.getColorClassNames)(t,g.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,c.getColorClassNames)(t,g.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,g.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,g.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},p=(0,c.makeClassName)("Button"),f=({loading:e,iconSize:t,iconPosition:r,Icon:l,needMargin:o,transitionStatus:n})=>{let s=o?r===i.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),g={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(u,{className:(0,d.tremorTwMerge)(p("icon"),"animate-spin shrink-0",s,g.default,g[n]),style:{transition:"width 150ms"}}):a.default.createElement(l,{className:(0,d.tremorTwMerge)(p("icon"),"shrink-0",t,s)})},x=a.default.forwardRef((e,l)=>{let{icon:u,iconPosition:g=i.HorizontalPositions.Left,size:x=i.Sizes.SM,color:b,variant:y="primary",disabled:w,loading:v=!1,loadingText:C,children:k,tooltip:j,className:N}=e,S=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),O=v||w,$=void 0!==u||v,T=v&&C,_=!(!k&&!T),z=(0,d.tremorTwMerge)(m[x].height,m[x].width),E="light"!==y?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",P=h(y,b),I=("light"!==y?{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"}})[x],{tooltipProps:R,getReferenceProps:M}=(0,r.useTooltip)(300),[D,A]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:l,timeout:i,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:g}={})=>{let[m,h]=(0,a.useState)(()=>o(d?2:n(c))),p=(0,a.useRef)(m),f=(0,a.useRef)(0),[x,b]="object"==typeof i?[i.enter,i.exit]:[i,i],y=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return n(t)}})(p.current._s,u);e&&s(e,h,p,f,g)},[g,u]);return[m,(0,a.useCallback)(a=>{let o=e=>{switch(s(e,h,p,f,g),e){case 1:x>=0&&(f.current=((...e)=>setTimeout(...e))(y,x));break;case 4:b>=0&&(f.current=((...e)=>setTimeout(...e))(y,b));break;case 0:case 3:f.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||o(e+1)},0)}},i=p.current.isEnter;"boolean"!=typeof a&&(a=!i),a?i||o(e?+!r:2):i&&o(t?l?3:4:n(u))},[y,g,e,t,r,l,x,b,u]),y]})({timeout:50});return(0,a.useEffect)(()=>{A(v)},[v]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([l,R.refs.setReference]),className:(0,d.tremorTwMerge)(p("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",E,I.paddingX,I.paddingY,I.fontSize,P.textColor,P.bgColor,P.borderColor,P.hoverBorderColor,O?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(h(y,b).hoverTextColor,h(y,b).hoverBgColor,h(y,b).hoverBorderColor),N),disabled:O},M,S),a.default.createElement(r.default,Object.assign({text:j},R)),$&&g!==i.HorizontalPositions.Right?a.default.createElement(f,{loading:v,iconSize:z,iconPosition:g,Icon:u,transitionStatus:D.status,needMargin:_}):null,T||k?a.default.createElement("span",{className:(0,d.tremorTwMerge)(p("text"),"text-tremor-default whitespace-nowrap")},T?C:k):null,$&&g===i.HorizontalPositions.Right?a.default.createElement(f,{loading:v,iconSize:z,iconPosition:g,Icon:u,transitionStatus:D.status,needMargin:_}):null)});x.displayName="Button",e.s(["Button",()=>x],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),o=r.default.forwardRef((e,o)=>{let{children:n,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",s)},r.default.createElement("table",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},i),n))});o.displayName="Table",e.s(["Table",()=>o],269200)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),o=r.default.forwardRef((e,o)=>{let{children:n,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",s)},i),n))});o.displayName="TableHead",e.s(["TableHead",()=>o],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),o=r.default.forwardRef((e,o)=>{let{children:n,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:o,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)},i),n))});o.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>o],64848)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),o=r.default.forwardRef((e,o)=>{let{children:n,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",s)},i),n))});o.displayName="TableBody",e.s(["TableBody",()=>o],942232)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),o=r.default.forwardRef((e,o)=>{let{children:n,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("row"),s)},i),n))});o.displayName="TableRow",e.s(["TableRow",()=>o],496020)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),o=r.default.forwardRef((e,o)=>{let{children:n,className:s}=e,i=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",s)},i),n))});o.displayName="TableCell",e.s(["TableCell",()=>o],977572)},68155,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 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,r],68155)},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)},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)},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)},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(914949),l=e.i(404948);let o=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,o],836938);var n=e.i(613541),s=e.i(763731),i=e.i(242064),d=e.i(491816);e.i(793154);var c=e.i(880476),u=e.i(183293),g=e.i(717356),m=e.i(320560),h=e.i(307358),p=e.i(246422),f=e.i(838378),x=e.i(617933);let b=(0,p.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,a=(0,f.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:a,fontWeightStrong:l,innerPadding:o,boxShadowSecondary:n,colorTextHeading:s,borderRadiusLG:i,zIndexPopup:d,titleMarginBottom:c,colorBgElevated:g,popoverBg:h,titleBorderBottom:p,innerContentPadding:f,titlePadding:x}=e;return[{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":g,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:i,boxShadow:n,padding:o},[`${t}-title`]:{minWidth:a,marginBottom:c,color:s,fontWeight:l,borderBottom:p,padding:x},[`${t}-inner-content`]:{color:r,padding:f}})},(0,m.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:x.PresetColors.map(r=>{let a=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,g.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:a,padding:l,wireframe:o,zIndexPopupBase:n,borderRadiusLG:s,marginXS:i,lineType:d,colorSplit:c,paddingSM:u}=e,g=r-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:n+30},(0,h.getArrowToken)(e)),(0,m.getArrowOffsetToken)({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:12*!o,titleMarginBottom:o?0:i,titlePadding:o?`${g/2}px ${l}px ${g/2-t}px`:0,titleBorderBottom:o?`${t}px ${d} ${c}`:"none",innerContentPadding:o?`${u}px ${l}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var 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 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=({title:e,content:r,prefixCls:a})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),r&&t.createElement("div",{className:`${a}-inner-content`},r)):null,v=e=>{let{hashId:a,prefixCls:l,className:n,style:s,placement:i="top",title:d,content:u,children:g}=e,m=o(d),h=o(u),p=(0,r.default)(a,l,`${l}-pure`,`${l}-placement-${i}`,n);return t.createElement("div",{className:p,style:s},t.createElement("div",{className:`${l}-arrow`}),t.createElement(c.Popup,Object.assign({},e,{className:a,prefixCls:l}),g||t.createElement(w,{prefixCls:l,title:m,content:h})))},C=e=>{let{prefixCls:a,className:l}=e,o=y(e,["prefixCls","className"]),{getPrefixCls:n}=t.useContext(i.ConfigContext),s=n("popover",a),[d,c,u]=b(s);return d(t.createElement(v,Object.assign({},o,{prefixCls:s,hashId:c,className:(0,r.default)(l,u)})))};e.s(["Overlay",0,w,"default",0,C],310730);var 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 j=t.forwardRef((e,c)=>{var u,g;let{prefixCls:m,title:h,content:p,overlayClassName:f,placement:x="top",trigger:y="hover",children:v,mouseEnterDelay:C=.1,mouseLeaveDelay:j=.1,onOpenChange:N,overlayStyle:S={},styles:O,classNames:$}=e,T=k(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:_,className:z,style:E,classNames:P,styles:I}=(0,i.useComponentConfig)("popover"),R=_("popover",m),[M,D,A]=b(R),B=_(),L=(0,r.default)(f,D,A,z,P.root,null==$?void 0:$.root),U=(0,r.default)(P.body,null==$?void 0:$.body),[K,q]=(0,a.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(g=e.defaultOpen)?g:e.defaultVisible}),F=(e,t)=>{q(e,!0),null==N||N(e,t)},H=o(h),V=o(p);return M(t.createElement(d.default,Object.assign({placement:x,trigger:y,mouseEnterDelay:C,mouseLeaveDelay:j},T,{prefixCls:R,classNames:{root:L,body:U},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},I.root),E),S),null==O?void 0:O.root),body:Object.assign(Object.assign({},I.body),null==O?void 0:O.body)},ref:c,open:K,onOpenChange:e=>{F(e)},overlay:H||V?t.createElement(w,{prefixCls:R,title:H,content:V}):null,transitionName:(0,n.getTransitionName)(B,"zoom-big",T.transitionName),"data-popover-inject":!0}),(0,s.cloneElement)(v,{onKeyDown:e=>{var r,a;(0,t.isValidElement)(v)&&(null==(a=null==v?void 0:(r=v.props).onKeyDown)||a.call(r,e)),e.keyCode===l.default.ESC&&F(!1,e)}})))});j._InternalPanelDoNotUseOrYouWillBeFired=C,e.s(["default",0,j],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},566606,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),l=e.i(947293),o=e.i(764205),n=e.i(954616),s=e.i(266027),i=e.i(612256);let d=(0,e.i(243652).createQueryKeys)("onboarding");var c=e.i(482725),u=e.i(56456);function g(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(c.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var m=e.i(560445),h=e.i(464571);function p(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(m.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(h.Button,{href:"/ui/login",children:"Back to Login"})})]})}var f=e.i(175712),x=e.i(808613),b=e.i(311451),y=e.i(898586);function w({variant:e,userEmail:a,isPending:l,claimError:o,onSubmit:n}){let[s]=x.Form.useForm();return r.default.useEffect(()=>{a&&s.setFieldValue("user_email",a)},[a,s]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(f.Card,{children:[(0,t.jsx)(y.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(y.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(y.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(m.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(h.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(x.Form,{className:"mt-10 mb-5",layout:"vertical",form:s,onFinish:e=>n({password:e.password}),children:[(0,t.jsx)(x.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(b.Input,{type:"email",disabled:!0})}),(0,t.jsx)(x.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(b.Input.Password,{})}),o&&(0,t.jsx)(m.Alert,{type:"error",message:o,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(h.Button,{htmlType:"submit",loading:l,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function v({variant:e}){let c=(0,a.useSearchParams)().get("invitation_id"),[u,m]=r.default.useState(null),{data:h,isLoading:f,isError:x}=(e=>{let{isLoading:t}=(0,i.useUIConfig)();return(0,s.useQuery)({queryKey:d.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,o.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(c),{mutate:b,isPending:y}=(0,n.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:r,password:a})=>await (0,o.claimOnboardingToken)(e,t,r,a)}),v=h?.token?(0,l.jwtDecode)(h.token):null,C=v?.user_email??"",k=v?.user_id??null,j=v?.key??null,N=h?.token??null;return f?(0,t.jsx)(g,{}):x?(0,t.jsx)(p,{}):(0,t.jsx)(w,{variant:e,userEmail:C,isPending:y,claimError:u,onSubmit:e=>{j&&N&&k&&c&&(m(null),b({accessToken:j,inviteId:c,userId:k,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,o.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{m(e.message||"Failed to submit. Please try again.")}}))}})}function C(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(v,{variant:"reset_password"===e?"reset_password":"signup"})}function k(){return(0,t.jsx)(r.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(C,{})})}e.s(["default",()=>k],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,r]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;r(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),r=e.i(621482),a=e.i(243652),l=e.i(764205),o=e.i(135214);let n=(0,a.createQueryKeys)("infiniteKeyAliases");var s=e.i(56456),i=e.i(152473),d=e.i(199133),c=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:g,pageSize:m=50,allowClear:h=!0,disabled:p=!1,allFilters:f})=>{let[x,b]=(0,c.useState)(""),[y,w]=(0,i.useDebouncedState)("",{wait:300}),{data:v,fetchNextPage:C,hasNextPage:k,isFetchingNextPage:j,isLoading:N}=((e=50,t,a)=>{let{accessToken:s}=(0,o.default)();return(0,r.useInfiniteQuery)({queryKey:n.list({filters:{size:e,...t&&{search:t},...a&&{team_id:a}}}),queryFn:async({pageParam:r})=>await (0,l.keyAliasesCall)(s,r,e,t,a),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!v?.pages)return[];let e=new Set,t=[];for(let r of v.pages)for(let a of r.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[v]);return(0,t.jsx)(d.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...g},allowClear:h,disabled:p,showSearch:!0,filterOption:!1,onSearch:e=>{b(e),w(e)},searchValue:x,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&k&&!j&&C()},loading:N,notFoundContent:N?(0,t.jsx)(s.LoadingOutlined,{spin:!0}):"No key aliases found",options:S,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,j&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(s.LoadingOutlined,{spin:!0})})]})})}],50882)},584578,e=>{"use strict";var t=e.i(764205);let r=async(e,r,a,l,o)=>{let n;n="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,l?.organization_id||null,r):await (0,t.teamListCall)(e,l?.organization_id||null),console.log(`givenTeams: ${n}`),o(n)};e.s(["fetchTeams",0,r])},693569,e=>{"use strict";var t=e.i(843476),r=e.i(268004),a=e.i(309426),l=e.i(350967),o=e.i(898586),n=e.i(947293),s=e.i(618566),i=e.i(271645),d=e.i(566606),c=e.i(584578),u=e.i(764205),g=e.i(702597),m=e.i(207082),h=e.i(109799),p=e.i(500330),f=e.i(871943),x=e.i(502547),b=e.i(360820),y=e.i(94629),w=e.i(152990),v=e.i(682830),C=e.i(389083),k=e.i(994388),j=e.i(752978),N=e.i(269200),S=e.i(942232),O=e.i(977572),$=e.i(427612),T=e.i(64848),_=e.i(496020),z=e.i(599724),E=e.i(827252),P=e.i(772345),I=e.i(464571),R=e.i(282786),M=e.i(981339),D=e.i(592968),A=e.i(355619),B=e.i(633627),L=e.i(374009),U=e.i(700514),K=e.i(135214),q=e.i(50882),F=e.i(969550),H=e.i(304911),V=e.i(20147);function W({teams:e,organizations:r,onSortChange:a,currentSort:l}){let{data:n}=(0,h.useOrganizations)(),s=n??r??[],[d,c]=(0,i.useState)(null),[g,W]=i.default.useState(()=>l?[{id:l.sortBy,desc:"desc"===l.sortOrder}]:[{id:"created_at",desc:!0}]),[X,Y]=i.default.useState({pageIndex:0,pageSize:50}),J=g.length>0?g[0].id:null,G=g.length>0?g[0].desc?"desc":"asc":null,{data:Q,isPending:Z,isFetching:ee,isError:et,refetch:er}=(0,m.useKeys)(X.pageIndex+1,X.pageSize,{sortBy:J||void 0,sortOrder:G||void 0,expand:"user"}),[ea,el]=(0,i.useState)({}),{filters:eo,filteredKeys:en,filteredTotalCount:es,allTeams:ei,allOrganizations:ed,handleFilterChange:ec,handleFilterReset:eu}=function({keys:e,teams:t,organizations:r}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:l}=(0,K.default)(),[o,n]=(0,i.useState)(a),[s,d]=(0,i.useState)(t||[]),[c,g]=(0,i.useState)(r||[]),[m,h]=(0,i.useState)(e),[p,f]=(0,i.useState)(null),x=(0,i.useRef)(0),b=(0,i.useCallback)((0,L.default)(async e=>{if(!l)return;let t=Date.now();x.current=t;try{let r=await (0,u.keyListCall)(l,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,U.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===x.current&&r&&(h(r.keys),f(r.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(r)))}catch(e){console.error("Error searching users:",e)}},300),[l]);return(0,i.useEffect)(()=>{if(!e)return void h([]);let t=[...e];o["Team ID"]&&(t=t.filter(e=>e.team_id===o["Team ID"])),o["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===o["Organization ID"])),h(t)},[e,o]),(0,i.useEffect)(()=>{let e=async()=>{let e=await (0,B.fetchAllTeams)(l);e.length>0&&d(e);let t=await (0,B.fetchAllOrganizations)(l);t.length>0&&g(t)};l&&e()},[l]),(0,i.useEffect)(()=>{t&&t.length>0&&d(e=>e.length{r&&r.length>0&&g(e=>e.length{n({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||b({...o,...e})},handleFilterReset:()=>{n(a),f(null),b(a)}}}({keys:Q?.keys||[],teams:e,organizations:r}),eg=(0,i.useDeferredValue)(ee),em=(ee||eg)&&!et,eh=es??Q?.total_count??0;(0,i.useEffect)(()=>{if(er){let e=()=>{er()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[er]);let ep=(0,i.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let r=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(D.Tooltip,{title:r,children:(0,t.jsx)(k.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>c(e.row.original),children:r??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let r=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:r??"-"})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:r=>{let a=r.getValue();if(!a)return"-";let l=e?.find(e=>e.team_id===a),o=l?.team_alias||a,n=r.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:n,overflow:"hidden"},children:o})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let r=e.getValue();if(!r)return"-";let a=s.find(e=>e.organization_id===r),l=a?.organization_alias||r,o=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:o,overflow:"hidden"},children:l})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(R.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let r=e.original,a=r.user?.user_alias??null,l=r.user?.user_email??r.user_email??null,n=r.user_id??null,s="default_user_id"===n,i=a||l||n,d=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:l},{label:"User ID",value:n}].map(({label:e,value:r})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),r?(0,t.jsx)(o.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:r},copyable:!0,children:r}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!s||a||l?(0,t.jsx)(R.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:i||"-"})}):(0,t.jsx)(R.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(H.default,{userId:n})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let r=e.getValue();if(!r)return"-";let a=e.row.original.created_by_user,l=a?.user_alias??null,n=a?.user_email??null,s="default_user_id"===r,i=l||n||r,d=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:l},{label:"User Email",value:n},{label:"User ID",value:r}].map(({label:e,value:r})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),r?(0,t.jsx)(o.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:r},copyable:!0,children:r}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!s||l||n?(0,t.jsx)(R.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:i})}):(0,t.jsx)(R.Popover,{content:d,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(H.default,{userId:r})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(R.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let r=e.getValue();if(!r)return"Unknown";let a=new Date(r);return(0,t.jsx)(D.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,p.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,p.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let r=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(r)?(0,t.jsx)("div",{className:"flex flex-col",children:0===r.length?(0,t.jsx)(C.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(z.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[r.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(j.Icon,{icon:ea[e.row.id]?f.ChevronDownIcon:x.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{el(t=>({...t,[e.row.id]:!t[e.row.id]}))}})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[r.slice(0,3).map((e,r)=>"all-proxy-models"===e?(0,t.jsx)(C.Badge,{size:"xs",color:"red",children:(0,t.jsx)(z.Text,{children:"All Proxy Models"})},r):(0,t.jsx)(C.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(z.Text,{children:e.length>30?`${(0,A.getModelDisplayName)(e).slice(0,30)}...`:(0,A.getModelDisplayName)(e)})},r)),r.length>3&&!ea[e.row.id]&&(0,t.jsx)(C.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(z.Text,{children:["+",r.length-3," ",r.length-3==1?"more model":"more models"]})}),ea[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:r.slice(3).map((e,r)=>"all-proxy-models"===e?(0,t.jsx)(C.Badge,{size:"xs",color:"red",children:(0,t.jsx)(z.Text,{children:"All Proxy Models"})},r+3):(0,t.jsx)(C.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(z.Text,{children:e.length>30?`${(0,A.getModelDisplayName)(e).slice(0,30)}...`:(0,A.getModelDisplayName)(e)})},r+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let r=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==r.tpm_limit?r.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==r.rpm_limit?r.rpm_limit:"Unlimited"]})]})}}],[e,s]),ef=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ei&&0!==ei.length?ei.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:q.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ex=(0,w.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:g,pagination:X},onSortingChange:e=>{let t="function"==typeof e?e(g):e;if(W(t),t&&t.length>0){let e=t[0],r=e.id,l=e.desc?"desc":"asc";ec({...eo,"Sort By":r,"Sort Order":l},!0),a?.(r,l)}},onPaginationChange:Y,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),getPaginationRowModel:(0,v.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(eh/X.pageSize)});i.default.useEffect(()=>{l&&W([{id:l.sortBy,desc:"desc"===l.sortOrder}])},[l]);let{pageIndex:eb,pageSize:ey}=ex.getState().pagination,ew=Math.min((eb+1)*ey,eh),ev=`${eb*ey+1} - ${ew}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:d?(0,t.jsx)(V.default,{keyId:d.token,onClose:()=>c(null),keyData:d,teams:ei,onDelete:er}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(F.default,{options:ef,onApplyFilters:ec,initialValues:eo,onResetFilters:eu})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[Z?(0,t.jsx)(M.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",ev," of ",eh," results"]}),(0,t.jsx)(I.Button,{type:"default",icon:(0,t.jsx)(P.SyncOutlined,{spin:em}),onClick:()=>{er()},disabled:em,title:"Fetch data",children:em?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[Z?(0,t.jsx)(M.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",eb+1," of ",ex.getPageCount()]}),Z?(0,t.jsx)(M.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ex.previousPage(),disabled:Z||!ex.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Z?(0,t.jsx)(M.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ex.nextPage(),disabled:Z||!ex.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ex.getCenterTotalSize()},children:[(0,t.jsx)($.TableHead,{children:ex.getHeaderGroups().map(e=>(0,t.jsx)(_.TableRow,{children:e.headers.map(e=>(0,t.jsx)(T.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,w.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(b.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(f.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(y.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ex.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(S.TableBody,{children:Z?(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(O.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ex.getRowModel().rows.map(e=>(0,t.jsx)(_.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(O.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,w.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(O.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:m,teams:h,keys:p,setUserRole:f,userEmail:x,setUserEmail:b,setTeams:y,setKeys:w,premiumUser:v,organizations:C,addKey:k,createClicked:j,autoOpenCreate:N,prefillData:S})=>{let[O,$]=(0,i.useState)(null),[T,_]=(0,i.useState)(null),z=(0,s.useSearchParams)(),E=(0,r.getCookie)("token"),P=z.get("invitation_id"),[I,R]=(0,i.useState)(null),[M,D]=(0,i.useState)(null),[A,B]=(0,i.useState)([]),[L,U]=(0,i.useState)(null),[K,q]=(0,i.useState)(null);if((0,i.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,i.useEffect)(()=>{if(E){let e=(0,n.jwtDecode)(E);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),R(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),f(t)}else console.log("User role not defined");e.user_email?b(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&I&&m&&!O){let t=sessionStorage.getItem("userModels"+e);t?B(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(T)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(I);U(t);let r=await (0,u.userGetInfoV2)(I,e);$(r),sessionStorage.setItem("userSpendData"+e,JSON.stringify(r));let a=(await (0,u.modelAvailableCall)(I,e,m)).data.map(e=>e.id);console.log("available_model_names:",a),B(a),console.log("userModels:",A),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&F()}})(),(0,c.fetchTeams)(I,e,m,T,y))}},[e,E,I,m]),(0,i.useEffect)(()=>{I&&(async()=>{try{let e=await (0,u.keyInfoCall)(I,[I]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&F()}})()},[I]),(0,i.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(T)}, accessToken: ${I}, userID: ${e}, userRole: ${m}`),I&&(console.log("fetching teams"),(0,c.fetchTeams)(I,e,m,T,y))},[T]),(0,i.useEffect)(()=>{if(null!==p&&null!=K&&null!==K.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(p)}`),p))K.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===K.team_id&&(e+=t.spend);console.log(`sum: ${e}`),D(e)}else if(null!==p){let e=0;for(let t of p)e+=t.spend;D(e)}},[K]),null!=P)return(0,t.jsx)(d.default,{});function F(){(0,r.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==E)return console.log("All cookies before redirect:",document.cookie),F(),null;try{let e=(0,n.jwtDecode)(E);console.log("Decoded token:",e);let t=e.exp,r=Math.floor(Date.now()/1e3);if(t&&r>=t)return console.log("Token expired, redirecting to login"),F(),null}catch(e){return console.error("Error decoding token:",e),(0,r.clearTokenCookies)(),F(),null}if(null==I)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==m&&f("App Owner"),m&&"Admin Viewer"==m){let{Title:e,Paragraph:r}=o.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(r,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",K),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(l.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(g.default,{team:K,teams:h,data:p,addKey:k,autoOpenCreate:N,prefillData:S},K?K.team_id:null),(0,t.jsx)(W,{teams:h,organizations:C})]})})})}],693569)},995118,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(764205),l=e.i(135214),o=e.i(693569),n=e.i(214541);e.s(["default",0,()=>{let{accessToken:e,userRole:s,userId:i,premiumUser:d,userEmail:c}=(0,l.default)(),{teams:u,setTeams:g}=(0,n.default)(),[m,h]=(0,r.useState)(!1),[p,f]=(0,r.useState)([]),{keys:x,isLoading:b,error:y,pagination:w,refresh:v,setKeys:C}=(({selectedTeam:e,currentOrg:t,selectedKeyAlias:l,accessToken:o,createClicked:n,expand:s=[]})=>{let[i,d]=(0,r.useState)({keys:[],total_count:0,current_page:1,total_pages:0}),[c,u]=(0,r.useState)(!0),[g,m]=(0,r.useState)(null),h=async(e={})=>{try{if(console.log("calling fetchKeys"),!o)return void console.log("accessToken",o);u(!0);let t="number"==typeof e.page?e.page:1,r="number"==typeof e.pageSize?e.pageSize:100,l=await (0,a.keyListCall)(o,null,null,null,null,null,t,r,null,null,s.join(","));console.log("data",l),d(l),m(null)}catch(e){m(e instanceof Error?e:Error("An error occurred"))}finally{u(!1)}};return(0,r.useEffect)(()=>{h(),console.log("selectedTeam",e,"currentOrg",t,"accessToken",o,"selectedKeyAlias",l)},[e,t,o,l,n]),{keys:i.keys,isLoading:c,error:g,pagination:{currentPage:i.current_page,totalPages:i.total_pages,totalCount:i.total_count},refresh:h,setKeys:e=>{d(t=>{let r="function"==typeof e?e(t.keys):e;return{...t,keys:r}})}}})({selectedKeyAlias:null,currentOrg:null,accessToken:e||"",createClicked:m});return(0,t.jsx)(o.default,{userID:i,userRole:s,userEmail:c,teams:u,keys:x,setUserRole:()=>{},setUserEmail:()=>{},setTeams:g,setKeys:C,premiumUser:d,organizations:p,addKey:e=>{C(t=>t?[...t,e]:[e]),h(()=>!m)},createClicked:m})}],995118)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e9906ef85805c46e.js b/litellm/proxy/_experimental/out/_next/static/chunks/e9906ef85805c46e.js new file mode 100644 index 0000000000..9c3b17cdc8 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/e9906ef85805c46e.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),s=e.i(618566),a=e.i(947293),i=e.i(764205),r=e.i(954616),n=e.i(266027),o=e.i(612256);let d=(0,e.i(243652).createQueryKeys)("onboarding");var c=e.i(482725),u=e.i(56456);function g(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(c.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var m=e.i(560445),h=e.i(464571);function x(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(m.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(h.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),f=e.i(808613),y=e.i(311451),w=e.i(898586);function j({variant:e,userEmail:s,isPending:a,claimError:i,onSubmit:r}){let[n]=f.Form.useForm();return l.default.useEffect(()=>{s&&n.setFieldValue("user_email",s)},[s,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(m.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(h.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(f.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>r({password:e.password}),children:[(0,t.jsx)(f.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),i&&(0,t.jsx)(m.Alert,{type:"error",message:i,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(h.Button,{htmlType:"submit",loading:a,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function v({variant:e}){let c=(0,s.useSearchParams)().get("invitation_id"),[u,m]=l.default.useState(null),{data:h,isLoading:p,isError:f}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:d.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,i.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(c),{mutate:y,isPending:w}=(0,r.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:s})=>await (0,i.claimOnboardingToken)(e,t,l,s)}),v=h?.token?(0,a.jwtDecode)(h.token):null,S=v?.user_email??"",b=v?.user_id??null,_=v?.key??null;return p?(0,t.jsx)(g,{}):f?(0,t.jsx)(x,{}):(0,t.jsx)(j,{variant:e,userEmail:S,isPending:w,claimError:u,onSubmit:e=>{_&&b&&c&&(m(null),y({accessToken:_,inviteId:c,userId:b,password:e.password},{onSuccess:e=>{if(!e?.token)return void m("Failed to start session. Please try again.");document.cookie=`token=${e.token}; path=/; SameSite=Lax`;let t=(0,i.getProxyBaseUrl)();window.location.href=t?`${t}/ui/?login=success`:"/ui/?login=success"},onError:e=>{m(e.message||"Failed to submit. Please try again.")}}))}})}function S(){let e=(0,s.useSearchParams)().get("action");return(0,t.jsx)(v,{variant:"reset_password"===e?"reset_password":"signup"})}function b(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(S,{})})}e.s(["default",()=>b],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),s=e.i(243652),a=e.i(764205),i=e.i(135214);let r=(0,s.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),d=e.i(199133),c=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:s,placeholder:u="Select a key alias",style:g,pageSize:m=50,allowClear:h=!0,disabled:x=!1,allFilters:p})=>{let[f,y]=(0,c.useState)(""),[w,j]=(0,o.useDebouncedState)("",{wait:300}),{data:v,fetchNextPage:S,hasNextPage:b,isFetchingNextPage:_,isLoading:N}=((e=50,t,s)=>{let{accessToken:n}=(0,i.default)();return(0,l.useInfiniteQuery)({queryKey:r.list({filters:{size:e,...t&&{search:t},...s&&{team_id:s}}}),queryFn:async({pageParam:l})=>await (0,a.keyAliasesCall)(n,l,e,t,s),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!v?.pages)return[];let e=new Set,t=[];for(let l of v.pages)for(let s of l.aliases)!s||e.has(s)||(e.add(s),t.push({label:s,value:s}));return t},[v]);return(0,t.jsx)(d.Select,{value:e||void 0,onChange:e=>{s?.(e??"")},placeholder:u,style:{width:"100%",...g},allowClear:h,disabled:x,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),j(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&b&&!_&&S()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:k,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),s=e.i(309426),a=e.i(350967),i=e.i(947293),r=e.i(618566),n=e.i(271645),o=e.i(566606),d=e.i(584578),c=e.i(764205),u=e.i(702597),g=e.i(207082),m=e.i(109799),h=e.i(500330),x=e.i(871943),p=e.i(502547),f=e.i(360820),y=e.i(94629),w=e.i(152990),j=e.i(682830),v=e.i(389083),S=e.i(994388),b=e.i(752978),_=e.i(269200),N=e.i(942232),k=e.i(977572),z=e.i(427612),I=e.i(64848),C=e.i(496020),D=e.i(599724),T=e.i(827252),P=e.i(772345),A=e.i(464571),O=e.i(282786),U=e.i(981339),R=e.i(262218),K=e.i(592968),L=e.i(898586),E=e.i(355619),B=e.i(633627),M=e.i(374009),$=e.i(700514),F=e.i(135214),V=e.i(50882),H=e.i(969550),W=e.i(304911),q=e.i(20147);function J({teams:e,organizations:l,onSortChange:s,currentSort:a}){let{data:i}=(0,m.useOrganizations)(),r=i??l??[],[o,d]=(0,n.useState)(null),[u,J]=n.default.useState(()=>a?[{id:a.sortBy,desc:"desc"===a.sortOrder}]:[{id:"created_at",desc:!0}]),[G,Q]=n.default.useState({pageIndex:0,pageSize:50}),Z=u.length>0?u[0].id:null,X=u.length>0?u[0].desc?"desc":"asc":null,{data:Y,isPending:ee,isFetching:et,isError:el,refetch:es}=(0,g.useKeys)(G.pageIndex+1,G.pageSize,{sortBy:Z||void 0,sortOrder:X||void 0,expand:"user"}),[ea,ei]=(0,n.useState)({}),{filters:er,filteredKeys:en,filteredTotalCount:eo,allTeams:ed,allOrganizations:ec,handleFilterChange:eu,handleFilterReset:eg}=function({keys:e,teams:t,organizations:l}){let s={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:a}=(0,F.default)(),[i,r]=(0,n.useState)(s),[o,d]=(0,n.useState)(t||[]),[u,g]=(0,n.useState)(l||[]),[m,h]=(0,n.useState)(e),[x,p]=(0,n.useState)(null),f=(0,n.useRef)(0),y=(0,n.useCallback)((0,M.default)(async e=>{if(!a)return;let t=Date.now();f.current=t;try{let l=await (0,c.keyListCall)(a,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,$.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===f.current&&l&&(h(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[a]);return(0,n.useEffect)(()=>{if(!e)return void h([]);let t=[...e];i["Team ID"]&&(t=t.filter(e=>e.team_id===i["Team ID"])),i["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===i["Organization ID"])),h(t)},[e,i]),(0,n.useEffect)(()=>{let e=async()=>{let e=await (0,B.fetchAllTeams)(a);e.length>0&&d(e);let t=await (0,B.fetchAllOrganizations)(a);t.length>0&&g(t)};a&&e()},[a]),(0,n.useEffect)(()=>{t&&t.length>0&&d(e=>e.length{l&&l.length>0&&g(e=>e.length{r({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...i,...e})},handleFilterReset:()=>{r(s),p(null),y(s)}}}({keys:Y?.keys||[],teams:e,organizations:l}),em=(0,n.useDeferredValue)(et),eh=(et||em)&&!el,ex=eo??Y?.total_count??0;(0,n.useEffect)(()=>{if(es){let e=()=>{es()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[es]);let ep=(0,n.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)(K.Tooltip,{title:l,children:(0,t.jsx)(S.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:s,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:l??"-"})}},{id:"status",header:"Status",size:100,enableSorting:!1,cell:({row:e})=>{let l=e.original;if(!0!==l.blocked)return(0,t.jsx)(R.Tag,{color:"green","data-testid":`key-status-${l.token_id}`,children:"Active"});let s=l.metadata?.scim_blocked===!0;return(0,t.jsx)(K.Tooltip,{title:s?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401.",children:(0,t.jsx)(R.Tag,{color:"red","data-testid":`key-status-${l.token_id}`,children:"Blocked"})})}},{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:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let s=l.getValue();if(!s)return"-";let a=e?.find(e=>e.team_id===s),i=a?.team_alias||s,r=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:i})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let s=r.find(e=>e.organization_id===l),a=s?.organization_alias||l,i=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:a})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(O.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.user?.user_alias??null,a=l.user?.user_email??l.user_email??null,i=l.user_id??null,r="default_user_id"===i,n=s||a||i,o=(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:a},{label:"User ID",value:i}].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)(L.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||a?(0,t.jsx)(O.Popover,{content:o,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:n||"-"})}):(0,t.jsx)(O.Popover,{content:o,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(W.default,{userId:i})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let s=e.row.original.created_by_user,a=s?.user_alias??null,i=s?.user_email??null,r="default_user_id"===l,n=a||i||l,o=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{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)(L.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||a||i?(0,t.jsx)(O.Popover,{content:o,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:n})}):(0,t.jsx)(O.Popover,{content:o,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(W.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(O.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let s=new Date(l);return(0,t.jsx)(K.Tooltip,{title:s.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:s.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,h.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,h.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();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?(0,t.jsx)(v.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})}):(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)(b.Icon,{icon:ea[e.row.id]?x.ChevronDownIcon:p.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{ei(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)(v.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(v.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,E.getModelDisplayName)(e).slice(0,30)}...`:(0,E.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(v.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(D.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[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)(v.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(v.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,E.getModelDisplayName)(e).slice(0,30)}...`:(0,E.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"]})]})}}],[e,r]),ef=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>ed&&0!==ed.length?ed.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ey=(0,w.useReactTable)({data:en,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:u,pagination:G},onSortingChange:e=>{let t="function"==typeof e?e(u):e;if(J(t),t&&t.length>0){let e=t[0],l=e.id,a=e.desc?"desc":"asc";eu({...er,"Sort By":l,"Sort Order":a},!0),s?.(l,a)}},onPaginationChange:Q,getCoreRowModel:(0,j.getCoreRowModel)(),getSortedRowModel:(0,j.getSortedRowModel)(),getPaginationRowModel:(0,j.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(ex/G.pageSize)});n.default.useEffect(()=>{a&&J([{id:a.sortBy,desc:"desc"===a.sortOrder}])},[a]);let{pageIndex:ew,pageSize:ej}=ey.getState().pagination,ev=Math.min((ew+1)*ej,ex),eS=`${ew*ej+1} - ${ev}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:o?(0,t.jsx)(q.default,{keyId:o.token,onClose:()=>d(null),keyData:o,teams:ed,onDelete:es}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(H.default,{options:ef,onApplyFilters:eu,initialValues:er,onResetFilters:eg})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(U.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",eS," of ",ex," results"]}),(0,t.jsx)(A.Button,{type:"default",icon:(0,t.jsx)(P.SyncOutlined,{spin:eh}),onClick:()=>{es()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[ee?(0,t.jsx)(U.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ew+1," of ",ey.getPageCount()]}),ee?(0,t.jsx)(U.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.previousPage(),disabled:ee||!ey.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),ee?(0,t.jsx)(U.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ey.nextPage(),disabled:ee||!ey.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(_.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ey.getCenterTotalSize()},children:[(0,t.jsx)(z.TableHead,{children:ey.getHeaderGroups().map(e=>(0,t.jsx)(C.TableRow,{children:e.headers.map(e=>(0,t.jsx)(I.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,w.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(f.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(x.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(y.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ey.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(N.TableBody,{children:ee?(0,t.jsx)(C.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):en.length>0?ey.getRowModel().rows.map(e=>(0,t.jsx)(C.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(k.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,w.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(C.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:g,teams:m,keys:h,setUserRole:x,userEmail:p,setUserEmail:f,setTeams:y,setKeys:w,premiumUser:j,organizations:v,addKey:S,createClicked:b,autoOpenCreate:_,prefillData:N})=>{let[k,z]=(0,n.useState)(null),[I,C]=(0,n.useState)(null),D=(0,r.useSearchParams)(),T=(0,l.getCookie)("token"),P=D.get("invitation_id"),[A,O]=(0,n.useState)(null),[U,R]=(0,n.useState)(null),[K,L]=(0,n.useState)([]),[E,B]=(0,n.useState)(null),[M,$]=(0,n.useState)(null);if((0,n.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,n.useEffect)(()=>{if(T){let e=(0,i.jwtDecode)(T);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),O(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),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);console.log("Decoded user_role:",t),x(t)}else console.log("User role not defined");e.user_email?f(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&A&&g&&!k){let t=sessionStorage.getItem("userModels"+e);t?L(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(I)}`),(async()=>{try{let t=await (0,c.getProxyUISettings)(A);B(t);let l=await (0,c.userGetInfoV2)(A,e);z(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let s=(await (0,c.modelAvailableCall)(A,e,g)).data.map(e=>e.id);console.log("available_model_names:",s),L(s),console.log("userModels:",K),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")&&F()}})(),(0,d.fetchTeams)(A,e,g,I,y))}},[e,T,A,g]),(0,n.useEffect)(()=>{A&&(async()=>{try{let e=await (0,c.keyInfoCall)(A,[A]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&F()}})()},[A]),(0,n.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(I)}, accessToken: ${A}, userID: ${e}, userRole: ${g}`),A&&(console.log("fetching teams"),(0,d.fetchTeams)(A,e,g,I,y))},[I]),(0,n.useEffect)(()=>{if(null!==h&&null!=M&&null!==M.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(h)}`),h))M.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===M.team_id&&(e+=t.spend);console.log(`sum: ${e}`),R(e)}else if(null!==h){let e=0;for(let t of h)e+=t.spend;R(e)}},[M]),null!=P)return(0,t.jsx)(o.default,{});function F(){(0,l.clearTokenCookies)();let e=(0,c.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==T)return console.log("All cookies before redirect:",document.cookie),F(),null;try{let e=(0,i.jwtDecode)(T);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),F(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),F(),null}if(null==A)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});null==g&&x("App Owner");let V="Admin Viewer"!==g&&"proxy_admin_viewer"!==g;return console.log("inside user dashboard, selected team",M),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(a.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(s.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[V&&(0,t.jsx)(u.default,{team:M,teams:m,data:h,addKey:S,autoOpenCreate:_,prefillData:N},M?M.team_id:null),(0,t.jsx)(J,{teams:m,organizations:v})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ee7884930918dcb9.js b/litellm/proxy/_experimental/out/_next/static/chunks/ee7884930918dcb9.js new file mode 100644 index 0000000000..bfbe44dee1 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/ee7884930918dcb9.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,801312,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:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var i=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["default",0,a],801312)},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(529681),i=e.i(702779),a=e.i(563113),l=e.i(763731),o=e.i(121872),s=e.i(242064);e.i(296059);var c=e.i(915654);e.i(262370);var d=e.i(135551),u=e.i(183293),m=e.i(246422),g=e.i(838378);let p=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return(0,g.mergeToken)(e,{tagFontSize:i,tagLineHeight:(0,c.unit)(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},f=e=>({defaultBg:new d.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),h=(0,m.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:a}=e,l=a(r).sub(n).equal(),o=a(t).sub(n).equal();return{[i]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:l}}),[`${i}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(p(e)),f);var b=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 $=t.forwardRef((e,r)=>{let{prefixCls:i,style:a,className:l,checked:o,children:c,icon:d,onChange:u,onClick:m}=e,g=b(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:f}=t.useContext(s.ConfigContext),$=p("tag",i),[y,w,C]=h($),k=(0,n.default)($,`${$}-checkable`,{[`${$}-checkable-checked`]:o},null==f?void 0:f.className,l,w,C);return y(t.createElement("span",Object.assign({},g,{ref:r,style:Object.assign(Object.assign({},a),null==f?void 0:f.style),className:k,onClick:e=>{null==u||u(!o),null==m||m(e)}}),d,t.createElement("span",null,c)))});var y=e.i(403541);let w=(0,m.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=p(e),(0,y.genPresetColor)(t,(e,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:a,borderColor:a},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},f),C=(e,t,n)=>{let r="string"!=typeof n?n:n.charAt(0).toUpperCase()+n.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},k=(0,m.genSubStyleComponent)(["Tag","status"],e=>{let t=p(e);return[C(t,"success","Success"),C(t,"processing","Info"),C(t,"error","Error"),C(t,"warning","Warning")]},f);var v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 S=t.forwardRef((e,c)=>{let{prefixCls:d,className:u,rootClassName:m,style:g,children:p,icon:f,color:b,onClose:$,bordered:y=!0,visible:C}=e,S=v(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:x,direction:I,tag:O}=t.useContext(s.ConfigContext),[E,j]=t.useState(!0),z=(0,r.default)(S,["closeIcon","closable"]);t.useEffect(()=>{void 0!==C&&j(C)},[C]);let B=(0,i.isPresetColor)(b),R=(0,i.isPresetStatusColor)(b),N=B||R,T=Object.assign(Object.assign({backgroundColor:b&&!N?b:void 0},null==O?void 0:O.style),g),P=x("tag",d),[M,_,A]=h(P),U=(0,n.default)(P,null==O?void 0:O.className,{[`${P}-${b}`]:N,[`${P}-has-color`]:b&&!N,[`${P}-hidden`]:!E,[`${P}-rtl`]:"rtl"===I,[`${P}-borderless`]:!y},u,m,_,A),L=e=>{e.stopPropagation(),null==$||$(e),e.defaultPrevented||j(!1)},[,H]=(0,a.useClosable)((0,a.pickClosable)(e),(0,a.pickClosable)(O),{closable:!1,closeIconRender:e=>{let r=t.createElement("span",{className:`${P}-close-icon`,onClick:L},e);return(0,l.replaceElement)(e,r,e=>({onClick:t=>{var n;null==(n=null==e?void 0:e.onClick)||n.call(e,t),L(t)},className:(0,n.default)(null==e?void 0:e.className,`${P}-close-icon`)}))}}),W="function"==typeof S.onClick||p&&"a"===p.type,G=f||null,q=G?t.createElement(t.Fragment,null,G,p&&t.createElement("span",null,p)):p,D=t.createElement("span",Object.assign({},z,{ref:c,className:U,style:T}),q,H,B&&t.createElement(w,{key:"preset",prefixCls:P}),R&&t.createElement(k,{key:"status",prefixCls:P}));return M(W?t.createElement(o.default,{component:"Tag"},D):D)});S.CheckableTag=$,e.s(["Tag",0,S],262218)},190144,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:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};var i=e.i(9583),a=n.forwardRef(function(e,a){return n.createElement(i.default,(0,t.default)({},e,{ref:a,icon:r}))});e.s(["default",0,a],190144)},735049,e=>{"use strict";var t=e.i(654310),n=function(e){if((0,t.default)()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],r=window.document.documentElement;return n.some(function(e){return e in r.style})}return!1},r=function(e,t){if(!n(e))return!1;var r=document.createElement("div"),i=r.style[e];return r.style[e]=t,r.style[e]!==i};function i(e,t){return Array.isArray(e)||void 0===t?n(e):r(e,t)}e.s(["isStyleSupport",()=>i])},464571,e=>{"use strict";var t=e.i(920228);e.s(["Button",()=>t.default])},618566,(e,t,n)=>{t.exports=e.r(976562)},321836,e=>{"use strict";let t="litellm_return_url",n="redirect_to";function r(){return window.location.href}function i(){let e=r();e&&function(e,t,n=300){if("u"typeof document&&(document.cookie=`${t}=; path=/; max-age=0`)}catch(e){console.error("Failed to clear return URL cookie:",e)}}function o(){return new URLSearchParams(window.location.search).get(n)}function s(e,t){let i=t||r();if(!i||i.includes("/login"))return e;let a=e.includes("?")?"&":"?";return`${e}${a}${n}=${encodeURIComponent(i)}`}function c(){let e=o();if(e)return e;let t=a();return t||null}function d(){let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||e.startsWith("127.")||e.endsWith(".local")}function u(e){if(!e)return!1;if(e.startsWith("/")&&!e.startsWith("//"))return!0;try{let t=new URL(e),n=window.location.hostname;if(t.hostname!==n)return!1;if(d())return!0;return t.origin===window.location.origin}catch{return!1}}function m(e){try{let t=new URL(e,window.location.origin),n=t.pathname;n.length>1&&n.endsWith("/")&&(n=n.slice(0,-1));let r=new URLSearchParams(t.search),i=new URLSearchParams;Array.from(r.entries()).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{i.append(e,t)});let a=i.toString(),l=t.hash||"";return`${t.origin}${n}${a?`?${a}`:""}${l}`}catch{return e}}function g(){let e=o();if(e){if(u(e))return l(),e;d()&&console.warn("[returnUrlUtils] Invalid return URL in params rejected:",e)}let t=a();if(t){if(u(t))return l(),t;d()&&console.warn("[returnUrlUtils] Invalid return URL in cookie rejected:",t)}return null}e.s(["buildLoginUrlWithReturn",()=>s,"clearStoredReturnUrl",()=>l,"consumeReturnUrl",()=>g,"getReturnUrl",()=>c,"isValidReturnUrl",()=>u,"normalizeUrlForCompare",()=>m,"storeReturnUrl",()=>i])},161281,e=>{"use strict";var t=e.i(947293);function n(e){try{let n=(0,t.jwtDecode)(e);if(n&&"number"==typeof n.exp)return 1e3*n.exp<=Date.now();return!1}catch{return!0}}function r(e){if(!e)return null;try{return(0,t.jwtDecode)(e)}catch{return null}}function i(e){return!!e&&null!==r(e)&&!n(e)}e.s(["checkTokenValidity",()=>i,"decodeToken",()=>r,"isJwtExpired",()=>n])},708347,e=>{"use strict";let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],n=["Internal User","Admin","proxy_admin"],r=[...n,"Admin Viewer","proxy_admin_viewer"],i=(e,t)=>null!=e&&e.some(e=>e.user_id===t&&"admin"===e.role);e.s(["all_admin_roles",0,t,"formatUserRole",0,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"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}},"internalUserRoles",0,["Internal User","Internal Viewer"],"isAdminRole",0,e=>t.includes(e),"isProxyAdminRole",0,e=>"proxy_admin"===e||"Admin"===e,"isUserTeamAdminForAnyTeam",0,(e,t)=>null!=e&&e.some(e=>i(e.members_with_roles,t)),"isUserTeamAdminForSingleTeam",0,i,"rolesAllowedToViewWriteScopedPages",0,r,"rolesWithWriteAccess",0,n])},135214,e=>{"use strict";var t=e.i(764205),n=e.i(268004),r=e.i(161281),i=e.i(321836),a=e.i(618566),l=e.i(271645),o=e.i(708347),s=e.i(612256);e.s(["default",0,()=>{let e=(0,a.useRouter)(),{data:c,isLoading:d}=(0,s.useUIConfig)(),u="u">typeof document?(0,n.getCookie)("token"):null,m=(0,l.useMemo)(()=>(0,r.decodeToken)(u),[u]),g=(0,l.useMemo)(()=>(0,r.checkTokenValidity)(u),[u])&&!c?.admin_ui_disabled,p=(0,l.useCallback)(()=>{(0,i.storeReturnUrl)();let n=`${(0,t.getProxyBaseUrl)()}/ui/login`,r=(0,i.buildLoginUrlWithReturn)(n);e.replace(r)},[e]);return(0,l.useEffect)(()=>{!d&&(g||(u&&(0,n.clearTokenCookies)(),p()))},[d,g,u,p]),{isLoading:d,isAuthorized:g,token:g?u:null,accessToken:m?.key??null,userId:m?.user_id??null,userEmail:m?.user_email??null,userRole:(0,o.formatUserRole)(m?.user_role),premiumUser:m?.premium_user??null,disabledPersonalKeyCreation:m?.disabled_non_admin_personal_key_creation??null,showSSOBanner:m?.login_method==="username_password"}}])},95779,e=>{"use strict";var t=e.i(480731);let n={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},r=[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",()=>n,"themeColorRange",()=>r])},563113,887719,e=>{"use strict";var t=e.i(271645),n=e.i(864517),r=e.i(244009),i=e.i(408850),a=e.i(87414);let l=function(...e){let t={};return e.forEach(e=>{e&&Object.keys(e).forEach(n=>{void 0!==e[n]&&(t[n]=e[n])})}),t};function o(e){if(!e)return;let{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function s(e){let{closable:n,closeIcon:r}=e||{};return t.default.useMemo(()=>{if(!n&&(!1===n||!1===r||null===r))return!1;if(void 0===n&&void 0===r)return null;let e={closeIcon:"boolean"!=typeof r&&null!==r?r:void 0};return n&&"object"==typeof n&&(e=Object.assign(Object.assign({},e),n)),e},[n,r])}e.s(["default",0,l],887719);let c={};e.s(["pickClosable",()=>o,"useClosable",0,(e,o,d=c)=>{let u=s(e),m=s(o),[g]=(0,i.useLocale)("global",a.default.global),p="boolean"!=typeof u&&!!(null==u?void 0:u.disabled),f=t.default.useMemo(()=>Object.assign({closeIcon:t.default.createElement(n.default,null)},d),[d]),h=t.default.useMemo(()=>!1!==u&&(u?l(f,m,u):!1!==m&&(m?l(f,m):!!f.closable&&f)),[u,m,f]);return t.default.useMemo(()=>{var e,n;if(!1===h)return[!1,null,p,{}];let{closeIconRender:i}=f,{closeIcon:a}=h,l=a,o=(0,r.default)(h,!0);return null!=l&&(i&&(l=i(a)),l=t.default.isValidElement(l)?t.default.cloneElement(l,Object.assign(Object.assign(Object.assign({},l.props),{"aria-label":null!=(n=null==(e=l.props)?void 0:e["aria-label"])?n:g.close}),o)):t.default.createElement("span",Object.assign({"aria-label":g.close},o),l)),[!0,l,p,o]},[p,g.close,h,f])}],563113)},389083,e=>{"use strict";var t=e.i(290571),n=e.i(271645),r=e.i(829087),i=e.i(480731),a=e.i(95779),l=e.i(444755),o=e.i(673706);let s={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"}},c={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"}},d=(0,o.makeClassName)("Badge"),u=n.default.forwardRef((e,u)=>{let{color:m,icon:g,size:p=i.Sizes.SM,tooltip:f,className:h,children:b}=e,$=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),y=g||null,{tooltipProps:w,getReferenceProps:C}=(0,r.useTooltip)();return n.default.createElement("span",Object.assign({ref:(0,o.mergeRefs)([u,w.refs.setReference]),className:(0,l.tremorTwMerge)(d("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",m?(0,l.tremorTwMerge)((0,o.getColorClassNames)(m,a.colorPalette.background).bgColor,(0,o.getColorClassNames)(m,a.colorPalette.iconText).textColor,(0,o.getColorClassNames)(m,a.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,l.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"),s[p].paddingX,s[p].paddingY,s[p].fontSize,h)},C,$),n.default.createElement(r.default,Object.assign({text:f},w)),y?n.default.createElement(y,{className:(0,l.tremorTwMerge)(d("icon"),"shrink-0 -ml-1 mr-1.5",c[p].height,c[p].width)}):null,n.default.createElement("span",{className:(0,l.tremorTwMerge)(d("text"),"whitespace-nowrap")},b))});u.displayName="Badge",e.s(["Badge",()=>u],389083)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(242064),i=e.i(517455);e.i(296059);var a=e.i(915654),l=e.i(183293),o=e.i(246422),s=e.i(838378);let c=(0,o.genStyleHooks)("Divider",e=>{let t=(0,s.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:s,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,l.resetComponent)(e)),{borderBlockStart:`${(0,a.unit)(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,a.unit)(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,a.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,a.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,a.unit)(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${s} * 100%)`},"&::after":{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${s} * 100%)`},"&::after":{width:`calc(${s} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${(0,a.unit)(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var d=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 u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:a,direction:l,className:o,style:s}=(0,r.useComponentConfig)("divider"),{prefixCls:m,type:g="horizontal",orientation:p="center",orientationMargin:f,className:h,rootClassName:b,children:$,dashed:y,variant:w="solid",plain:C,style:k,size:v}=e,S=d(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),x=a("divider",m),[I,O,E]=c(x),j=u[(0,i.default)(v)],z=!!$,B=t.useMemo(()=>"left"===p?"rtl"===l?"end":"start":"right"===p?"rtl"===l?"start":"end":p,[l,p]),R="start"===B&&null!=f,N="end"===B&&null!=f,T=(0,n.default)(x,o,O,E,`${x}-${g}`,{[`${x}-with-text`]:z,[`${x}-with-text-${B}`]:z,[`${x}-dashed`]:!!y,[`${x}-${w}`]:"solid"!==w,[`${x}-plain`]:!!C,[`${x}-rtl`]:"rtl"===l,[`${x}-no-default-orientation-margin-start`]:R,[`${x}-no-default-orientation-margin-end`]:N,[`${x}-${j}`]:!!j},h,b),P=t.useMemo(()=>"number"==typeof f?f:/^\d+$/.test(f)?Number(f):f,[f]);return I(t.createElement("div",Object.assign({className:T,style:Object.assign(Object.assign({},s),k)},S,{role:"separator"}),$&&"vertical"!==g&&t.createElement("span",{className:`${x}-inner-text`,style:{marginInlineStart:R?P:void 0,marginInlineEnd:N?P:void 0}},$)))}],312361)},475254,e=>{"use strict";var t=e.i(271645);let n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},r=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:s,iconNode:c,...d},u)=>(0,t.createElement)("svg",{ref:u,...i,width:n,height:n,stroke:e,strokeWidth:l?24*Number(a)/Number(n):a,className:r("lucide",o),...!s&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(s)?s:[s]])),l=(e,i)=>{let l=(0,t.forwardRef)(({className:l,...o},s)=>(0,t.createElement)(a,{ref:s,iconNode:i,className:r(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=n(e),l};e.s(["default",()=>l],475254)},790848,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(739295),r=e.i(343794),i=e.i(931067),a=e.i(211577),l=e.i(392221),o=e.i(703923),s=e.i(914949),c=e.i(404948),d=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],u=t.forwardRef(function(e,n){var u,m=e.prefixCls,g=void 0===m?"rc-switch":m,p=e.className,f=e.checked,h=e.defaultChecked,b=e.disabled,$=e.loadingIcon,y=e.checkedChildren,w=e.unCheckedChildren,C=e.onClick,k=e.onChange,v=e.onKeyDown,S=(0,o.default)(e,d),x=(0,s.default)(!1,{value:f,defaultValue:h}),I=(0,l.default)(x,2),O=I[0],E=I[1];function j(e,t){var n=O;return b||(E(n=e),null==k||k(n,t)),n}var z=(0,r.default)(g,p,(u={},(0,a.default)(u,"".concat(g,"-checked"),O),(0,a.default)(u,"".concat(g,"-disabled"),b),u));return t.createElement("button",(0,i.default)({},S,{type:"button",role:"switch","aria-checked":O,disabled:b,className:z,ref:n,onKeyDown:function(e){e.which===c.default.LEFT?j(!1,e):e.which===c.default.RIGHT&&j(!0,e),null==v||v(e)},onClick:function(e){var t=j(!O,e);null==C||C(t,e)}}),$,t.createElement("span",{className:"".concat(g,"-inner")},t.createElement("span",{className:"".concat(g,"-inner-checked")},y),t.createElement("span",{className:"".concat(g,"-inner-unchecked")},w)))});u.displayName="Switch";var m=e.i(121872),g=e.i(242064),p=e.i(937328),f=e.i(517455);e.i(296059);var h=e.i(915654);e.i(262370);var b=e.i(135551),$=e.i(183293),y=e.i(246422),w=e.i(838378);let C=(0,y.genStyleHooks)("Switch",e=>{let t=(0,w.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.resetComponent)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:(0,h.unit)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),(0,$.genFocusStyle)(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}})(t),(e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:l,calc:o}=e,s=`${t}-inner`,c=(0,h.unit)(o(l).add(o(r).mul(2)).equal()),d=(0,h.unit)(o(a).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${d})`,marginInlineEnd:`calc(100% - ${c} + ${d})`},[`${s}-unchecked`]:{marginTop:o(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${d})`,marginInlineEnd:`calc(-100% + ${c} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:o(r).mul(2).equal(),marginInlineEnd:o(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:o(r).mul(-1).mul(2).equal(),marginInlineEnd:o(r).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:l(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,h.unit)(l(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:l,handleSizeSM:o,calc:s}=e,c=`${t}-inner`,d=(0,h.unit)(s(o).add(s(r).mul(2)).equal()),u=(0,h.unit)(s(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:(0,h.unit)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:a,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${c}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:s(s(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,h.unit)(s(o).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:s(e.marginXXS).div(2).equal(),marginInlineEnd:s(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:s(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:s(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,l=r/2,o=a-4,s=l-4;return{trackHeight:a,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*s+4,trackPadding:2,handleBg:i,handleSize:o,handleSizeSM:s,handleShadow:`0 2px 4px 0 ${new b.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:s/2,innerMaxMarginSM:s+2+4}});var k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 v=t.forwardRef((e,i)=>{let{prefixCls:a,size:l,disabled:o,loading:c,className:d,rootClassName:h,style:b,checked:$,value:y,defaultChecked:w,defaultValue:v,onChange:S}=e,x=k(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[I,O]=(0,s.default)(!1,{value:null!=$?$:y,defaultValue:null!=w?w:v}),{getPrefixCls:E,direction:j,switch:z}=t.useContext(g.ConfigContext),B=t.useContext(p.default),R=(null!=o?o:B)||c,N=E("switch",a),T=t.createElement("div",{className:`${N}-handle`},c&&t.createElement(n.default,{className:`${N}-loading-icon`})),[P,M,_]=C(N),A=(0,f.default)(l),U=(0,r.default)(null==z?void 0:z.className,{[`${N}-small`]:"small"===A,[`${N}-loading`]:c,[`${N}-rtl`]:"rtl"===j},d,h,M,_),L=Object.assign(Object.assign({},null==z?void 0:z.style),b);return P(t.createElement(m.default,{component:"Switch",disabled:R},t.createElement(u,Object.assign({},x,{checked:I,onChange:(...e)=>{O(e[0]),null==S||S.apply(void 0,e)},prefixCls:N,className:U,style:L,disabled:R,ref:i,loadingIcon:T}))))});v.__ANT_SWITCH=!0,e.s(["Switch",0,v],790848)},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(876556);function i(e){return["small","middle","large"].includes(e)}function a(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>i,"isValidGapNumber",()=>a],908286);var l=e.i(242064),o=e.i(249616),s=e.i(372409),c=e.i(246422);let d=(0,c.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:a,fontSizeLG:l,fontSizeSM:o,borderRadiusLG:c,borderRadiusSM:d,colorBgContainerDisabled:u,lineWidth:m}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,background:u,borderWidth:m,borderStyle:"solid",borderColor:i,borderRadius:n,"&-large":{fontSize:l,borderRadius:c},"&-small":{paddingInline:a,borderRadius:d,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,s.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var 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 m=t.default.forwardRef((e,r)=>{let{className:i,children:a,style:s,prefixCls:c}=e,m=u(e,["className","children","style","prefixCls"]),{getPrefixCls:g,direction:p}=t.default.useContext(l.ConfigContext),f=g("space-addon",c),[h,b,$]=d(f),{compactItemClassnames:y,compactSize:w}=(0,o.useCompactItemContext)(f,p),C=(0,n.default)(f,b,y,$,{[`${f}-${w}`]:w},i);return h(t.default.createElement("div",Object.assign({ref:r,className:C,style:s},m),a))}),g=t.default.createContext({latestIndex:0}),p=g.Provider,f=({className:e,index:n,children:r,split:i,style:a})=>{let{latestIndex:l}=t.useContext(g);return null==r?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:a},r),n{let t=(0,h.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var $=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 y=t.forwardRef((e,o)=>{var s;let{getPrefixCls:c,direction:d,size:u,className:m,style:g,classNames:h,styles:y}=(0,l.useComponentConfig)("space"),{size:w=null!=u?u:"small",align:C,className:k,rootClassName:v,children:S,direction:x="horizontal",prefixCls:I,split:O,style:E,wrap:j=!1,classNames:z,styles:B}=e,R=$(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[N,T]=Array.isArray(w)?w:[w,w],P=i(T),M=i(N),_=a(T),A=a(N),U=(0,r.default)(S,{keepEmpty:!0}),L=void 0===C&&"horizontal"===x?"center":C,H=c("space",I),[W,G,q]=b(H),D=(0,n.default)(H,m,G,`${H}-${x}`,{[`${H}-rtl`]:"rtl"===d,[`${H}-align-${L}`]:L,[`${H}-gap-row-${T}`]:P,[`${H}-gap-col-${N}`]:M},k,v,q),V=(0,n.default)(`${H}-item`,null!=(s=null==z?void 0:z.item)?s:h.item),X=Object.assign(Object.assign({},y.item),null==B?void 0:B.item),F=U.map((e,n)=>{let r=(null==e?void 0:e.key)||`${V}-${n}`;return t.createElement(f,{className:V,key:r,index:n,split:O,style:X},e)}),Y=t.useMemo(()=>({latestIndex:U.reduce((e,t,n)=>null!=t?n:e,0)}),[U]);if(0===U.length)return null;let K={};return j&&(K.flexWrap="wrap"),!M&&A&&(K.columnGap=N),!P&&_&&(K.rowGap=T),W(t.createElement("div",Object.assign({ref:o,className:D,style:Object.assign(Object.assign(Object.assign({},K),g),E)},R),t.createElement(p,{value:Y},F)))});y.Compact=o.default,y.Addon=m,e.s(["default",0,y],38243)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ef8798600e862605.js b/litellm/proxy/_experimental/out/_next/static/chunks/ef8798600e862605.js deleted file mode 100644 index 7a2f142734..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/ef8798600e862605.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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),i=l.forwardRef(function(e,i){return l.createElement(a.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["MinusCircleOutlined",0,i],564897)},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",()=>t])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),l=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),i=l.forwardRef(function(e,i){return l.createElement(a.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["SaveOutlined",0,i],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,s,a,i)=>{let r;r="Admin"!=s&&"Admin Viewer"!=s?await (0,t.teamListCall)(e,a?.organization_id||null,l):await (0,t.teamListCall)(e,a?.organization_id||null),console.log(`givenTeams: ${r}`),i(r)};e.s(["fetchTeams",0,l])},468133,e=>{"use strict";var t=e.i(843476),l=e.i(271645),s=e.i(175712),a=e.i(464571),i=e.i(28651),r=e.i(898586),n=e.i(482725),d=e.i(199133),c=e.i(262218),o=e.i(621192),m=e.i(178654),u=e.i(751904),x=e.i(987432),h=e.i(764205),g=e.i(860585),b=e.i(355619),j=e.i(727749),f=e.i(162386);let{Title:p,Text:y}=r.Typography,v=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],C=({label:e,description:l,isEditing:s,viewContent:a,editContent:i})=>(0,t.jsxs)(o.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(m.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:l})]}),(0,t.jsx)(m.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:s?i:a})})]}),w=()=>(0,t.jsx)(y,{className:"text-gray-400 italic",children:"Not set"}),_=(e,l)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:l?l(e):e},e))}):(0,t.jsx)(w,{}),N={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[r,o]=(0,l.useState)(!0),[m,T]=(0,l.useState)(N),[k,S]=(0,l.useState)(!1),[M,B]=(0,l.useState)(N),[E,z]=(0,l.useState)(!1),[D,H]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(!e)return o(!1);try{let t=await (0,h.getDefaultTeamSettings)(e),l={...N,...t.values||{}};T(l),B(l)}catch(e){console.error("Error fetching team SSO settings:",e),H(!0),j.default.fromBackend("Failed to fetch team settings")}finally{o(!1)}})()},[e]);let L=async()=>{if(e){z(!0);try{let t=await (0,h.updateDefaultTeamSettings)(e,M),l={...N,...t.settings||{}};T(l),B(l),S(!1),j.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),j.default.fromBackend("Failed to update team settings")}finally{z(!1)}}},R=(e,t)=>{B(l=>({...l,[e]:t}))};return r?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(n.Spin,{size:"large"})}):D?(0,t.jsx)(s.Card,{children:(0,t.jsx)(y,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(s.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(p,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(y,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:k?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(a.Button,{onClick:()=>{S(!1),B(m)},disabled:E,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"primary",onClick:L,loading:E,icon:(0,t.jsx)(x.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(a.Button,{onClick:()=>S(!0),icon:(0,t.jsx)(u.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(C,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:k,viewContent:null!=m.max_budget?(0,t.jsxs)(y,{children:["$",Number(m.max_budget).toLocaleString()]}):(0,t.jsx)(w,{}),editContent:(0,t.jsx)(i.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.max_budget,onChange:e=>R("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(C,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:k,viewContent:m.budget_duration?(0,t.jsx)(y,{children:(0,g.getBudgetDurationLabel)(m.budget_duration)}):(0,t.jsx)(w,{}),editContent:(0,t.jsx)(g.default,{value:M.budget_duration||null,onChange:e=>R("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(C,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:k,viewContent:null!=m.tpm_limit?(0,t.jsx)(y,{children:m.tpm_limit.toLocaleString()}):(0,t.jsx)(w,{}),editContent:(0,t.jsx)(i.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.tpm_limit,onChange:e=>R("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(C,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:k,viewContent:null!=m.rpm_limit?(0,t.jsx)(y,{children:m.rpm_limit.toLocaleString()}):(0,t.jsx)(w,{}),editContent:(0,t.jsx)(i.InputNumber,{className:"w-full",style:{maxWidth:320},value:M.rpm_limit,onChange:e=>R("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(C,{label:"Models",description:"Default list of models that new teams can access.",isEditing:k,viewContent:_(m.models,b.getModelDisplayName),editContent:(0,t.jsx)(f.ModelSelect,{value:M.models||[],onChange:e=>R("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(C,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:k,viewContent:_(m.team_member_permissions),editContent:(0,t.jsx)(d.Select,{mode:"multiple",style:{width:"100%"},value:M.team_member_permissions||[],onChange:e=>R("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:l,onClose:s})=>(0,t.jsx)(c.Tag,{color:"blue",closable:l,onClose:s,className:"mr-1 mt-1 mb-1",children:e}),children:v.map(e=>(0,t.jsx)(d.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},747871,e=>{"use strict";var t=e.i(843476),l=e.i(271645),s=e.i(269200),a=e.i(942232),i=e.i(977572),r=e.i(427612),n=e.i(64848),d=e.i(496020),c=e.i(304967),o=e.i(994388),m=e.i(599724),u=e.i(389083),x=e.i(764205),h=e.i(727749);e.s(["default",0,({accessToken:e,userID:g})=>{let[b,j]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{if(e&&g)try{let t=await (0,x.availableTeamListCall)(e);j(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,g]);let f=async t=>{if(e&&g)try{await (0,x.teamMemberAddCall)(e,t,{user_id:g,role:"user"}),h.default.success("Successfully joined team"),j(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),h.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(s.Table,{children:[(0,t.jsx)(r.TableHead,{children:(0,t.jsxs)(d.TableRow,{children:[(0,t.jsx)(n.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(n.TableHeaderCell,{children:"Description"}),(0,t.jsx)(n.TableHeaderCell,{children:"Members"}),(0,t.jsx)(n.TableHeaderCell,{children:"Models"}),(0,t.jsx)(n.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(a.TableBody,{children:[b.map(e=>(0,t.jsxs)(d.TableRow,{children:[(0,t.jsx)(i.TableCell,{children:(0,t.jsx)(m.Text,{children:e.team_alias})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsx)(m.Text,{children:e.description||"No description available"})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsxs)(m.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,l)=>(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(m.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},l)):(0,t.jsx)(u.Badge,{size:"xs",color:"red",children:(0,t.jsx)(m.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsx)(o.Button,{size:"xs",variant:"secondary",onClick:()=>f(e.team_id),children:"Join Team"})})]},e.team_id)),0===b.length&&(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(i.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(m.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/951e5ff2dc4928c2.js b/litellm/proxy/_experimental/out/_next/static/chunks/efea414bda877fd0.js similarity index 85% rename from litellm/proxy/_experimental/out/_next/static/chunks/951e5ff2dc4928c2.js rename to litellm/proxy/_experimental/out/_next/static/chunks/efea414bda877fd0.js index 2806236a38..f841030250 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/951e5ff2dc4928c2.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/efea414bda877fd0.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},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),r=e.i(174428);let s=80*Math.PI,l=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})},d=({percent:e,prefixCls:t})=>{let o=`${t}-dot`,a=`${o}-holder`,d=`${a}-hidden`,[c,u]=i.useState(!1);(0,r.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let p={strokeDashoffset:`${s/4}`,strokeDasharray:`${s*m/100} ${s*(100-m)/100}`};return i.createElement("span",{className:(0,n.default)(a,`${o}-progress`,m<=0&&d)},i.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},i.createElement(l,{dotClassName:o,hasCircleCls:!0}),i.createElement(l,{dotClassName:o,style:p})))};function c(e){let{prefixCls:t,percent:o=0}=e,a=`${t}-dot`,r=`${a}-holder`,s=`${r}-hidden`;return i.createElement(i.Fragment,null,i.createElement("span",{className:(0,n.default)(r,o>0&&s)},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(d,{prefixCls:t,percent:o}))}function u(e){var t;let{prefixCls:o,indicator:r,percent:s}=e,l=`${o}-dot`;return r&&i.isValidElement(r)?(0,a.cloneElement)(r,{className:(0,n.default)(null==(t=r.props)?void 0:t.className,l),percent:s}):i.createElement(c,{prefixCls:o,percent:s})}e.i(296059);var m=e.i(694758),p=e.i(183293),f=e.i(246422),h=e.i(838378);let g=new m.Keyframes("antSpinMove",{to:{opacity:1}}),v=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),y=(0,f.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: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: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}}),S=[[30,.05],[70,.03],[96,.01]];var x=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 b=e=>{var a;let{prefixCls:r,spinning:s=!0,delay:l=0,className:d,rootClassName:c,size:m="default",tip:p,wrapperClassName:f,style:h,children:g,fullscreen:v=!1,indicator:b,percent:w}=e,$=x(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:j,direction:z,className:E,style:k,indicator:N}=(0,o.useComponentConfig)("spin"),I=j("spin",r),[T,C,O]=y(I),[D,q]=i.useState(()=>s&&(!s||!l||!!Number.isNaN(Number(l)))),L=function(e,t){let[n,o]=i.useState(0),a=i.useRef(null),r="auto"===t;return i.useEffect(()=>(r&&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)}),[r,e]),r?n:t}(D,w);i.useEffect(()=>{if(s){let e=function(e,t,i){var n,o=i||{},a=o.noTrailing,r=void 0!==a&&a,s=o.noLeading,l=void 0!==s&&s,d=o.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function p(){n&&clearTimeout(n)}function f(){for(var i=arguments.length,o=Array(i),a=0;ae?l?(m=Date.now(),r||(n=setTimeout(c?h:f,e))):f():!0!==r&&(n=setTimeout(c?h:f,void 0===c?e-d:e)))}return f.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},f}(l,()=>{q(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}q(!1)},[l,s]);let P=i.useMemo(()=>void 0!==g&&!v,[g,v]),M=(0,n.default)(I,E,{[`${I}-sm`]:"small"===m,[`${I}-lg`]:"large"===m,[`${I}-spinning`]:D,[`${I}-show-text`]:!!p,[`${I}-rtl`]:"rtl"===z},d,!v&&c,C,O),F=(0,n.default)(`${I}-container`,{[`${I}-blur`]:D}),A=null!=(a=null!=b?b:N)?a:t,B=Object.assign(Object.assign({},k),h),X=i.createElement("div",Object.assign({},$,{style:B,className:M,"aria-live":"polite","aria-busy":D}),i.createElement(u,{prefixCls:I,indicator:A,percent:L}),p&&(P||v)?i.createElement("div",{className:`${I}-text`},p):null);return T(P?i.createElement("div",Object.assign({},$,{className:(0,n.default)(`${I}-nested-loading`,f,C,O)}),D&&i.createElement("div",{key:"loading"},X),i.createElement("div",{className:F,key:"container"},g)):v?i.createElement("div",{className:(0,n.default)(`${I}-fullscreen`,{[`${I}-fullscreen-show`]:D},c,C,O)},X):X)};b.setDefaultIndicator=e=>{t=e},e.s(["default",0,b],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},566606,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(618566),o=e.i(947293),a=e.i(764205),r=e.i(954616),s=e.i(266027),l=e.i(612256);let d=(0,e.i(243652).createQueryKeys)("onboarding");var c=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(c.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var p=e.i(560445),f=e.i(464571);function h(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(p.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(f.Button,{href:"/ui/login",children:"Back to Login"})})]})}var g=e.i(175712),v=e.i(808613),y=e.i(311451),S=e.i(898586);function x({variant:e,userEmail:n,isPending:o,claimError:a,onSubmit:r}){let[s]=v.Form.useForm();return i.default.useEffect(()=>{n&&s.setFieldValue("user_email",n)},[n,s]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(g.Card,{children:[(0,t.jsx)(S.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(S.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(S.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(p.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(f.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(v.Form,{className:"mt-10 mb-5",layout:"vertical",form:s,onFinish:e=>r({password:e.password}),children:[(0,t.jsx)(v.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(v.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),a&&(0,t.jsx)(p.Alert,{type:"error",message:a,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(f.Button,{htmlType:"submit",loading:o,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function b({variant:e}){let c=(0,n.useSearchParams)().get("invitation_id"),[u,p]=i.default.useState(null),{data:f,isLoading:g,isError:v}=(e=>{let{isLoading:t}=(0,l.useUIConfig)();return(0,s.useQuery)({queryKey:d.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,a.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(c),{mutate:y,isPending:S}=(0,r.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:i,password:n})=>await (0,a.claimOnboardingToken)(e,t,i,n)}),b=f?.token?(0,o.jwtDecode)(f.token):null,w=b?.user_email??"",$=b?.user_id??null,j=b?.key??null,z=f?.token??null;return g?(0,t.jsx)(m,{}):v?(0,t.jsx)(h,{}):(0,t.jsx)(x,{variant:e,userEmail:w,isPending:S,claimError:u,onSubmit:e=>{j&&z&&$&&c&&(p(null),y({accessToken:j,inviteId:c,userId:$,password:e.password},{onSuccess:()=>{document.cookie=`token=${z}; path=/; SameSite=Lax`;let e=(0,a.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{p(e.message||"Failed to submit. Please try again.")}}))}})}function w(){let e=(0,n.useSearchParams)().get("action");return(0,t.jsx)(b,{variant:"reset_password"===e?"reset_password":"signup"})}function $(){return(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(w,{})})}e.s(["default",()=>$],566606)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},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),r=e.i(174428);let s=80*Math.PI,l=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})},d=({percent:e,prefixCls:t})=>{let o=`${t}-dot`,a=`${o}-holder`,d=`${a}-hidden`,[c,u]=i.useState(!1);(0,r.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let p={strokeDashoffset:`${s/4}`,strokeDasharray:`${s*m/100} ${s*(100-m)/100}`};return i.createElement("span",{className:(0,n.default)(a,`${o}-progress`,m<=0&&d)},i.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},i.createElement(l,{dotClassName:o,hasCircleCls:!0}),i.createElement(l,{dotClassName:o,style:p})))};function c(e){let{prefixCls:t,percent:o=0}=e,a=`${t}-dot`,r=`${a}-holder`,s=`${r}-hidden`;return i.createElement(i.Fragment,null,i.createElement("span",{className:(0,n.default)(r,o>0&&s)},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(d,{prefixCls:t,percent:o}))}function u(e){var t;let{prefixCls:o,indicator:r,percent:s}=e,l=`${o}-dot`;return r&&i.isValidElement(r)?(0,a.cloneElement)(r,{className:(0,n.default)(null==(t=r.props)?void 0:t.className,l),percent:s}):i.createElement(c,{prefixCls:o,percent:s})}e.i(296059);var m=e.i(694758),p=e.i(183293),f=e.i(246422),g=e.i(838378);let h=new m.Keyframes("antSpinMove",{to:{opacity:1}}),v=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),y=(0,f.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: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: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: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,g.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 x=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 b=e=>{var a;let{prefixCls:r,spinning:s=!0,delay:l=0,className:d,rootClassName:c,size:m="default",tip:p,wrapperClassName:f,style:g,children:h,fullscreen:v=!1,indicator:b,percent:w}=e,$=x(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:j,direction:z,className:E,style:k,indicator:N}=(0,o.useComponentConfig)("spin"),I=j("spin",r),[T,C,O]=y(I),[D,q]=i.useState(()=>s&&(!s||!l||!!Number.isNaN(Number(l)))),L=function(e,t){let[n,o]=i.useState(0),a=i.useRef(null),r="auto"===t;return i.useEffect(()=>(r&&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)}),[r,e]),r?n:t}(D,w);i.useEffect(()=>{if(s){let e=function(e,t,i){var n,o=i||{},a=o.noTrailing,r=void 0!==a&&a,s=o.noLeading,l=void 0!==s&&s,d=o.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function p(){n&&clearTimeout(n)}function f(){for(var i=arguments.length,o=Array(i),a=0;ae?l?(m=Date.now(),r||(n=setTimeout(c?g:f,e))):f():!0!==r&&(n=setTimeout(c?g:f,void 0===c?e-d:e)))}return f.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},f}(l,()=>{q(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}q(!1)},[l,s]);let P=i.useMemo(()=>void 0!==h&&!v,[h,v]),F=(0,n.default)(I,E,{[`${I}-sm`]:"small"===m,[`${I}-lg`]:"large"===m,[`${I}-spinning`]:D,[`${I}-show-text`]:!!p,[`${I}-rtl`]:"rtl"===z},d,!v&&c,C,O),M=(0,n.default)(`${I}-container`,{[`${I}-blur`]:D}),A=null!=(a=null!=b?b:N)?a:t,B=Object.assign(Object.assign({},k),g),X=i.createElement("div",Object.assign({},$,{style:B,className:F,"aria-live":"polite","aria-busy":D}),i.createElement(u,{prefixCls:I,indicator:A,percent:L}),p&&(P||v)?i.createElement("div",{className:`${I}-text`},p):null);return T(P?i.createElement("div",Object.assign({},$,{className:(0,n.default)(`${I}-nested-loading`,f,C,O)}),D&&i.createElement("div",{key:"loading"},X),i.createElement("div",{className:M,key:"container"},h)):v?i.createElement("div",{className:(0,n.default)(`${I}-fullscreen`,{[`${I}-fullscreen-show`]:D},c,C,O)},X):X)};b.setDefaultIndicator=e=>{t=e},e.s(["default",0,b],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},566606,e=>{"use strict";var t=e.i(843476),i=e.i(271645),n=e.i(618566),o=e.i(947293),a=e.i(764205),r=e.i(954616),s=e.i(266027),l=e.i(612256);let d=(0,e.i(243652).createQueryKeys)("onboarding");var c=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(c.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var p=e.i(560445),f=e.i(464571);function g(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(p.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(f.Button,{href:"/ui/login",children:"Back to Login"})})]})}var h=e.i(175712),v=e.i(808613),y=e.i(311451),S=e.i(898586);function x({variant:e,userEmail:n,isPending:o,claimError:a,onSubmit:r}){let[s]=v.Form.useForm();return i.default.useEffect(()=>{n&&s.setFieldValue("user_email",n)},[n,s]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(S.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(S.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(S.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(p.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(f.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(v.Form,{className:"mt-10 mb-5",layout:"vertical",form:s,onFinish:e=>r({password:e.password}),children:[(0,t.jsx)(v.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(v.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),a&&(0,t.jsx)(p.Alert,{type:"error",message:a,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(f.Button,{htmlType:"submit",loading:o,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function b({variant:e}){let c=(0,n.useSearchParams)().get("invitation_id"),[u,p]=i.default.useState(null),{data:f,isLoading:h,isError:v}=(e=>{let{isLoading:t}=(0,l.useUIConfig)();return(0,s.useQuery)({queryKey:d.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,a.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(c),{mutate:y,isPending:S}=(0,r.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:i,password:n})=>await (0,a.claimOnboardingToken)(e,t,i,n)}),b=f?.token?(0,o.jwtDecode)(f.token):null,w=b?.user_email??"",$=b?.user_id??null,j=b?.key??null;return h?(0,t.jsx)(m,{}):v?(0,t.jsx)(g,{}):(0,t.jsx)(x,{variant:e,userEmail:w,isPending:S,claimError:u,onSubmit:e=>{j&&$&&c&&(p(null),y({accessToken:j,inviteId:c,userId:$,password:e.password},{onSuccess:e=>{if(!e?.token)return void p("Failed to start session. Please try again.");document.cookie=`token=${e.token}; path=/; SameSite=Lax`;let t=(0,a.getProxyBaseUrl)();window.location.href=t?`${t}/ui/?login=success`:"/ui/?login=success"},onError:e=>{p(e.message||"Failed to submit. Please try again.")}}))}})}function w(){let e=(0,n.useSearchParams)().get("action");return(0,t.jsx)(b,{variant:"reset_password"===e?"reset_password":"signup"})}function $(){return(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(w,{})})}e.s(["default",()=>$],566606)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/f520a8d0cb8aca9e.js b/litellm/proxy/_experimental/out/_next/static/chunks/f520a8d0cb8aca9e.js new file mode 100644 index 0000000000..a60ee81e4d --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/f520a8d0cb8aca9e.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,446891,836991,e=>{"use strict";var t=e.i(843476),r=e.i(464571),a=e.i(326373),l=e.i(94629),s=e.i(360820),n=e.i(871943),i=e.i(271645);let o=i.forwardRef(function(e,t){return i.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),i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,o],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:i})=>{let c=[{key:"asc",label:"Ascending",icon:(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,t.jsx)(o,{className:"h-4 w-4"})}];return(0,t.jsx)(a.Dropdown,{menu:{items:c,onClick:({key:e})=>{"asc"===e?i("asc"):"desc"===e?i("desc"):"reset"===e&&i(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,t.jsx)(r.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,t.jsx)(s.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,t.jsx)(n.ChevronDownIcon,{className:"h-4 w-4"}):(0,t.jsx)(l.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891)},94629,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:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ArrowLeftOutlined",0,s],447566)},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=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:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var l=e.i(464571),s=e.i(311451),n=e.i(199133),i=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[h,m]=(0,r.useState)(!1),[f,p]=(0,r.useState)(u),[g,b]=(0,r.useState)({}),[y,v]=(0,r.useState)({}),[w,x]=(0,r.useState)({}),[C,S]=(0,r.useState)({}),j=(0,r.useCallback)((0,i.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){v(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);b(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),b(e=>({...e,[t.name]:[]}))}finally{v(e=>({...e,[t.name]:!1}))}}},300),[]),k=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!C[e.name]){v(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");b(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),b(t=>({...t,[e.name]:[]}))}finally{v(t=>({...t,[e.name]:!1}))}}},[C]);(0,r.useEffect)(()=>{h&&e.forEach(e=>{e.isSearchable&&!C[e.name]&&k(e)})},[h,e,k,C]);let M=(e,t)=>{let r={...f,[e]:t};p(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>m(!h),className:"flex items-center gap-2",children:d}),(0,t.jsx)(l.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),h&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model","Public model / search tool"].map(r=>{let a,l=e.find(e=>e.label===r||e.name===r);return l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:l.label||l.name}),l.isSearchable?(0,t.jsx)(n.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${l.label||l.name}...`,value:f[l.name]||void 0,onChange:e=>M(l.name,e),onOpenChange:e=>{e&&l.isSearchable&&!C[l.name]&&k(l)},onSearch:e=>{x(t=>({...t,[l.name]:e})),l.searchFn&&j(e,l)},filterOption:!1,loading:y[l.name],options:g[l.name]||[],allowClear:!0,notFoundContent:y[l.name]?"Loading...":"No results found"}):l.options?(0,t.jsx)(n.Select,{className:"w-full",placeholder:`Select ${l.label||l.name}...`,value:f[l.name]||void 0,onChange:e=>M(l.name,e),allowClear:!0,children:l.options.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))}):l.customComponent?(a=l.customComponent,(0,t.jsx)(a,{value:f[l.name]||void 0,onChange:e=>M(l.name,e??""),placeholder:`Select ${l.label||l.name}...`,allFilters:f})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${l.label||l.name}...`,value:f[l.name]||"",onChange:e=>M(l.name,e.target.value),allowClear:!0})]},l.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let l of e){let e=l?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=l?.organization_id??l?.org_id;s&&"string"==typeof s&&r.add(s.trim());let n=l?.user_id;if(n&&"string"==typeof n){let e=l?.user?.user_email||n;a.set(n,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let l=new Set,s=new Set,n=new Map,i=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=i?.keys||[],c=i?.total_pages??1;r(o,l,s,n);let u=Math.min(c,10)-1;if(u>0){let i=Array.from({length:u},(r,l)=>(0,t.keyListCall)(e,null,a,null,null,null,l+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(i)))"fulfilled"===e.status&&r(e.value?.keys||[],l,s,n)}return{keyAliases:Array.from(l).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(n.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},l=async(e,r)=>{if(!e)return[];try{let a=[],l=1,s=!0;for(;s;){let n=await (0,t.teamListCall)(e,r||null,null);a=[...a,...n],l{if(!e)return[];try{let r=[],a=1,l=!0;for(;l;){let s=await (0,t.organizationListCall)(e);r=[...r,...s],a{"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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ReloadOutlined",0,s],91979)},625901,e=>{"use strict";var t=e.i(266027),r=e.i(621482),a=e.i(243652),l=e.i(764205),s=e.i(135214);let n=(0,a.createQueryKeys)("models"),i=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let c=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:r,userRole:a}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,r,a,!0,null,!0,!1,"expand"),enabled:!!(e&&r&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:n,userRole:i}=(0,s.default)();return(0,r.useInfiniteQuery)({queryKey:c.list({filters:{...n&&{userId:n},...i&&{userRole:i},size:e,...t&&{search:t}}}),queryFn:async({pageParam:r})=>await (0,l.modelInfoCall)(a,n,i,r,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,r=50,a,i,o,c,u)=>{let{accessToken:d,userId:h,userRole:m}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({filters:{...h&&{userId:h},...m&&{userRole:m},page:e,size:r,...a&&{search:a},...i&&{modelId:i},...o&&{teamId:o},...c&&{sortBy:c},...u&&{sortOrder:u}}}),queryFn:async()=>await (0,l.modelInfoCall)(d,h,m,e,r,a,i,o,c,u),enabled:!!(d&&h&&m)})}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),a=e.i(371330),l=e.i(271645),s=e.i(394487),n=e.i(503269),i=e.i(214520),o=e.i(746725),c=e.i(914189),u=e.i(144279),d=e.i(294316),h=e.i(601893),m=e.i(140721),f=e.i(942803),p=e.i(233538),g=e.i(694421),b=e.i(700020),y=e.i(35889),v=e.i(998348),w=e.i(722678);let x=(0,l.createContext)(null);x.displayName="GroupContext";let C=l.Fragment,S=Object.assign((0,b.forwardRefWithAs)(function(e,t){var C;let S=(0,l.useId)(),j=(0,f.useProvidedId)(),k=(0,h.useDisabled)(),{id:M=j||`headlessui-switch-${S}`,disabled:E=k||!1,checked:N,defaultChecked:R,onChange:O,name:T,value:P,form:D,autoFocus:I=!1,...F}=e,L=(0,l.useContext)(x),[$,_]=(0,l.useState)(null),K=(0,l.useRef)(null),A=(0,d.useSyncRefs)(K,t,null===L?null:L.setSwitch,_),z=(0,i.useDefaultValue)(R),[B,H]=(0,n.useControllable)(N,O,null!=z&&z),G=(0,o.useDisposables)(),[q,Q]=(0,l.useState)(!1),U=(0,c.useEvent)(()=>{Q(!0),null==H||H(!B),G.nextFrame(()=>{Q(!1)})}),V=(0,c.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),U()}),W=(0,c.useEvent)(e=>{e.key===v.Keys.Space?(e.preventDefault(),U()):e.key===v.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),Y=(0,c.useEvent)(e=>e.preventDefault()),X=(0,w.useLabelledBy)(),J=(0,y.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:I}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:E}),{pressed:ea,pressProps:el}=(0,s.useActivePress)({disabled:E}),es=(0,l.useMemo)(()=>({checked:B,disabled:E,hover:et,focus:Z,active:ea,autofocus:I,changing:q}),[B,et,Z,ea,E,q,I]),en=(0,b.mergeProps)({id:M,ref:A,role:"switch",type:(0,u.useResolveButtonType)(e,$),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":B,"aria-labelledby":X,"aria-describedby":J,disabled:E||void 0,autoFocus:I,onClick:V,onKeyUp:W,onKeyPress:Y},ee,er,el),ei=(0,l.useCallback)(()=>{if(void 0!==z)return null==H?void 0:H(z)},[H,z]),eo=(0,b.useRender)();return l.default.createElement(l.default.Fragment,null,null!=T&&l.default.createElement(m.FormFields,{disabled:E,data:{[T]:P||"on"},overrides:{type:"checkbox",checked:B},form:D,onReset:ei}),eo({ourProps:en,theirProps:F,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,l.useState)(null),[s,n]=(0,w.useLabels)(),[i,o]=(0,y.useDescriptions)(),c=(0,l.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),u=(0,b.useRender)();return l.default.createElement(o,{name:"Switch.Description",value:i},l.default.createElement(n,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},l.default.createElement(x.Provider,{value:c},u({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:w.Label,Description:y.Description});var j=e.i(888288),k=e.i(95779),M=e.i(444755),E=e.i(673706),N=e.i(829087);let R=(0,E.makeClassName)("Switch"),O=l.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:s=!1,onChange:n,color:i,name:o,error:c,errorMessage:u,disabled:d,required:h,tooltip:m,id:f}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:i?(0,E.getColorClassNames)(i,k.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,E.getColorClassNames)(i,k.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[b,y]=(0,j.default)(s,a),[v,w]=(0,l.useState)(!1),{tooltipProps:x,getReferenceProps:C}=(0,N.useTooltip)(300);return l.default.createElement("div",{className:"flex flex-row items-center justify-start"},l.default.createElement(N.default,Object.assign({text:m},x)),l.default.createElement("div",Object.assign({ref:(0,E.mergeRefs)([r,x.refs.setReference]),className:(0,M.tremorTwMerge)(R("root"),"flex flex-row relative h-5")},p,C),l.default.createElement("input",{type:"checkbox",className:(0,M.tremorTwMerge)(R("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:h,checked:b,onChange:e=>{e.preventDefault()}}),l.default.createElement(S,{checked:b,onChange:e=>{y(e),null==n||n(e)},disabled:d,className:(0,M.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",d?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:f},l.default.createElement("span",{className:(0,M.tremorTwMerge)(R("sr-only"),"sr-only")},"Switch ",b?"on":"off"),l.default.createElement("span",{"aria-hidden":"true",className:(0,M.tremorTwMerge)(R("background"),b?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")}),l.default.createElement("span",{"aria-hidden":"true",className:(0,M.tremorTwMerge)(R("round"),b?(0,M.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",v?(0,M.tremorTwMerge)("ring-2",g.ringColor):"")}))),c&&u?l.default.createElement("p",{className:(0,M.tremorTwMerge)(R("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});O.displayName="Switch",e.s(["Switch",()=>O],793130)},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),l=e.i(682830),s=e.i(269200),n=e.i(427612),i=e.i(64848),o=e.i(942232),c=e.i(496020),u=e.i(977572);function d({data:e=[],columns:d,onRowClick:h,renderSubComponent:m,renderChildRows:f,getRowCanExpand:p,isLoading:g=!1,loadingMessage:b="🚅 Loading logs...",noDataMessage:y="No logs found",enableSorting:v=!1}){let w=!!(m||f)&&!!p,[x,C]=(0,r.useState)([]),S=(0,a.useReactTable)({data:e,columns:d,...v&&{state:{sorting:x},onSortingChange:C,enableSortingRemoval:!1},...w&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,l.getCoreRowModel)(),...v&&{getSortedRowModel:(0,l.getSortedRowModel)()},...w&&{getExpandedRowModel:(0,l.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(n.TableHead,{children:S.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let r=v&&e.column.getCanSort(),l=e.column.getIsSorted();return(0,t.jsx)(i.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===l?"↑":"desc"===l?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:g?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})}):S.getRowModel().rows.length>0?S.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${h?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>h?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),w&&e.getIsExpanded()&&f&&f({row:e}),w&&e.getIsExpanded()&&m&&!f&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:m({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:y})})})})})]})})}e.s(["DataTable",()=>d])},888288,e=>{"use strict";var t=e.i(271645);let r=(e,r)=>{let a=void 0!==r,[l,s]=(0,t.useState)(e);return[a?r:l,e=>{a||s(e)}]};e.s(["default",()=>r])},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:n,accessToken:i,disabled:o})=>{let[c,u]=(0,r.useState)([]),[d,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(i){h(!0);try{let e=await (0,l.getGuardrailsList)(i);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{h(!1)}}})()},[i]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:s,loading:d,className:n,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",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),a=e.i(199133),l=e.i(764205);function s(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:n,className:i,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,h]=(0,r.useState)([]),[m,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){f(!0);try{let e=await (0,l.getPoliciesList)(o);e.policies&&(h(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{f(!1)}}})()},[o,u]),(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:n,loading:m,className:i,allowClear:!0,options:s(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>s])},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),l=e.i(915823),s=e.i(619273),n=class extends l.Subscribable{#e;#t=void 0;#r;#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,s.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.hashKey)(t.mutationKey)!==(0,s.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.#l(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#l(),this.#s()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#l(){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}}#s(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=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,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},i=e.i(912598);function o(e,r){let l=(0,i.useQueryClient)(r),[o]=t.useState(()=>new n(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(s.noop)},[o]);if(c.error&&(0,s.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},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 l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ClockCircleOutlined",0,s],637235)},178654,621192,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654);let r=e.i(264042).Row;e.s(["Row",0,r],621192)},214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,l]=(0,t.useState)([]),{accessToken:s,userId:n,userRole:i}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{l(await (0,a.fetchTeams)(s,n,i,null))})()},[s,n,i]),{teams:e,setTeams:l}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let l=t(e);return isNaN(a)?r(e,NaN):(a&&l.setDate(l.getDate()+a),l)}function l(e,a){let l=t(e);if(isNaN(a))return r(e,NaN);if(!a)return l;let s=l.getDate(),n=r(e,l.getTime());return(n.setMonth(l.getMonth()+a+1,0),s>=n.getDate())?n:(l.setFullYear(n.getFullYear(),n.getMonth(),s),l)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>l],497245)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(908286),s=e.i(242064),n=e.i(246422),i=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["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"],d=function(e,t){let a,l,s;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(l={},u.forEach(r=>{l[`${e}-align-${r}`]=t.align===r}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(s={},c.forEach(r=>{s[`${e}-justify-${r}`]=t.justify===r}),s)))},h=(0,n.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,l=(0,i.mergeToken)(e,{flexGapSM:t,flexGap:r,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,r={};return o.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(l)]},()=>({}),{resetStyle:!1});var m=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 f=t.default.forwardRef((e,n)=>{let{prefixCls:i,rootClassName:o,className:c,style:u,flex:f,gap:p,vertical:g=!1,component:b="div",children:y}=e,v=m(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:w,direction:x,getPrefixCls:C}=t.default.useContext(s.ConfigContext),S=C("flex",i),[j,k,M]=h(S),E=null!=g?g:null==w?void 0:w.vertical,N=(0,r.default)(c,o,null==w?void 0:w.className,S,k,M,d(S,e),{[`${S}-rtl`]:"rtl"===x,[`${S}-gap-${p}`]:(0,l.isPresetSize)(p),[`${S}-vertical`]:E}),R=Object.assign(Object.assign({},null==w?void 0:w.style),u);return f&&(R.flex=f),p&&!(0,l.isPresetSize)(p)&&(R.gap=p),j(t.default.createElement(b,Object.assign({ref:n,className:N,style:R},(0,a.default)(v,["justify","wrap","align"])),y))});e.s(["Flex",0,f],525720)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/f5fc27663c2424f7.js b/litellm/proxy/_experimental/out/_next/static/chunks/f5fc27663c2424f7.js deleted file mode 100644 index 81f32e137e..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/f5fc27663c2424f7.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(708347),r=e.i(135214);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&a.all_admin_roles.includes(s||"")})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/f7c95eaa060d1f99.js b/litellm/proxy/_experimental/out/_next/static/chunks/f7c95eaa060d1f99.js deleted file mode 100644 index e1a292251f..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/f7c95eaa060d1f99.js +++ /dev/null @@ -1,3 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},771674,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:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",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(["UserOutlined",0,n],771674)},948401,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:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",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(["MailOutlined",0,n],948401)},645526,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:"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 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(["TeamOutlined",0,n],645526)},366845,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:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};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(["default",0,n],366845)},993914,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:"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 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(["FileTextOutlined",0,n],993914)},621482,e=>{"use strict";var t=e.i(869230),r=e.i(992571),a=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,r.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,r.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:a}=e,o=super.createResult(e,t),{isFetching:n,isRefetching:i,isError:l,isRefetchError:s}=o,c=a.fetchMeta?.fetchMore?.direction,u=l&&"forward"===c,d=n&&"forward"===c,f=l&&"backward"===c,m=n&&"backward"===c;return{...o,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,r.hasNextPage)(t,a.data),hasPreviousPage:(0,r.hasPreviousPage)(t,a.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:m,isRefetchError:s&&!u&&!f,isRefetching:i&&!d&&!m}}},o=e.i(469637);function n(e,t){return(0,o.useBaseQuery)(e,a,t)}e.s(["useInfiniteQuery",()=>n],621482)},270345,e=>{"use strict";var t=e.i(764205);let r=async(e,r,a,o)=>"Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,o?.organization_id||null,r):await (0,t.teamListCall)(e,o?.organization_id||null);e.s(["fetchTeams",0,r])},785242,e=>{"use strict";var t=e.i(619273),r=e.i(621482),a=e.i(266027),o=e.i(912598),n=e.i(135214),i=e.i(270345),l=e.i(243652),s=e.i(764205);let c=async(e,t,r,a={})=>{try{let o=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,organization_id:a.organizationID,team_alias:a.team_alias,user_id:a.userID,page:t,page_size:r,sort_by:a.sortBy,sort_order:a.sortOrder,status:a.status}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${o?`${o}/v2/team/list`:"/v2/team/list"}?${n}`,l=await fetch(i,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}let c=await l.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to list teams:",e),e}},u=(0,l.createQueryKeys)("teams"),d=(0,l.createQueryKeys)("infiniteTeams"),f=async(e,t,r,a={})=>{try{let o=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,organization_id:a.organizationID,team_alias:a.team_alias,user_id:a.userID,page:t,page_size:r,sort_by:a.sortBy,sort_order:a.sortOrder,status:"deleted"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${o?`${o}/v2/team/list`:"/v2/team/list"}?${n}`,l=await fetch(i,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}let c=await l.json();if(console.log("/team/list?status=deleted API Response:",c),c&&"object"==typeof c&&"teams"in c)return c.teams;return c}catch(e){throw console.error("Failed to list deleted teams:",e),e}},m=(0,l.createQueryKeys)("deletedTeams");e.s(["teamListCall",0,c,"useDeletedTeams",0,(e,r,o={})=>{let{accessToken:i}=(0,n.default)();return(0,a.useQuery)({queryKey:m.list({page:e,limit:r,...o}),queryFn:async()=>await f(i,e,r,o),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useInfiniteTeams",0,(e=50,t,a)=>{let{accessToken:o,userId:i,userRole:l}=(0,n.default)(),s="Admin"===l||"Admin Viewer"===l;return(0,r.useInfiniteQuery)({queryKey:d.list({filters:{pageSize:e,...t&&{search:t},...a&&{organizationId:a},...i&&{userId:i}}}),queryFn:async({pageParam:r})=>await c(o,r,e,{team_alias:t||void 0,organizationID:a,userID:s?void 0:i}),initialPageParam:1,getNextPageParam:e=>{if(e.page{let{accessToken:t}=(0,n.default)(),r=(0,o.useQueryClient)();return(0,a.useQuery)({queryKey:u.detail(e),enabled:!!(t&&e),queryFn:async()=>{if(!t||!e)throw Error("Missing auth or teamId");return(0,s.teamInfoCall)(t,e)},initialData:()=>{if(!e)return;let t=r.getQueryData(u.list({}));return t?.find(t=>t.team_id===e)}})},"useTeams",0,()=>{let{accessToken:e,userId:t,userRole:r}=(0,n.default)();return(0,a.useQuery)({queryKey:u.list({}),queryFn:async()=>await (0,i.fetchTeams)(e,t,r,null),enabled:!!e})}])},109799,e=>{"use strict";var t=e.i(135214),r=e.i(764205),a=e.i(266027),o=e.i(912598);let n=(0,e.i(243652).createQueryKeys)("organizations");e.s(["organizationKeys",0,n,"useOrganization",0,e=>{let i=(0,o.useQueryClient)(),{accessToken:l}=(0,t.default)();return(0,a.useQuery)({queryKey:n.detail(e),enabled:!!(l&&e),queryFn:async()=>{if(!l||!e)throw Error("Missing auth or teamId");return(0,r.organizationInfoCall)(l,e)},initialData:()=>{if(!e)return;let t=i.getQueryData(n.list({}));return t?.find(t=>t.organization_id===e)}})},"useOrganizations",0,()=>{let{accessToken:e,userId:o,userRole:i}=(0,t.default)();return(0,a.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,r.organizationListCall)(e),enabled:!!(e&&o&&i)})}])},560445,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(201072),a=e.i(726289),o=e.i(864517),n=e.i(562901),i=e.i(779573),l=e.i(343794),s=e.i(361275),c=e.i(244009),u=e.i(611935),d=e.i(763731),f=e.i(242064);e.i(296059);var m=e.i(915654),g=e.i(183293),p=e.i(246422);let h=(e,t,r,a,o)=>({background:e,border:`${(0,m.unit)(a.lineWidth)} ${a.lineType} ${t}`,[`${o}-icon`]:{color:r}}),b=(0,p.genStyleHooks)("Alert",e=>[(e=>{let{componentCls:t,motionDurationSlow:r,marginXS:a,marginSM:o,fontSize:n,fontSizeLG:i,lineHeight:l,borderRadiusLG:s,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:m,defaultPadding:p}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"relative",display:"flex",alignItems:"center",padding:p,wordWrap:"break-word",borderRadius:s,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:a,lineHeight:0},"&-description":{display:"none",fontSize:n,lineHeight:l},"&-message":{color:f},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${r} ${c}, opacity ${r} ${c}, - padding-top ${r} ${c}, padding-bottom ${r} ${c}, - margin-bottom ${r} ${c}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",padding:m,[`${t}-icon`]:{marginInlineEnd:o,fontSize:u,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:a,color:f,fontSize:i},[`${t}-description`]:{display:"block",color:d}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}})(e),(e=>{let{componentCls:t,colorSuccess:r,colorSuccessBorder:a,colorSuccessBg:o,colorWarning:n,colorWarningBorder:i,colorWarningBg:l,colorError:s,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:m}=e;return{[t]:{"&-success":h(o,a,r,e,t),"&-info":h(m,f,d,e,t),"&-warning":h(l,i,n,e,t),"&-error":Object.assign(Object.assign({},h(u,c,s,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}})(e),(e=>{let{componentCls:t,iconCls:r,motionDurationMid:a,marginXS:o,fontSizeIcon:n,colorIcon:i,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:o},[`${t}-close-icon`]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:n,lineHeight:(0,m.unit)(n),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${r}-close`]:{color:i,transition:`color ${a}`,"&:hover":{color:l}}},"&-close-text":{color:i,transition:`color ${a}`,"&:hover":{color:l}}}}})(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}));var 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 y={success:r.default,info:i.default,error:a.default,warning:n.default},C=e=>{let{icon:r,prefixCls:a,type:o}=e,n=y[o]||null;return r?(0,d.replaceElement)(r,t.createElement("span",{className:`${a}-icon`},r),()=>({className:(0,l.default)(`${a}-icon`,r.props.className)})):t.createElement(n,{className:`${a}-icon`})},$=e=>{let{isClosable:r,prefixCls:a,closeIcon:n,handleClose:i,ariaProps:l}=e,s=!0===n||void 0===n?t.createElement(o.default,null):n;return r?t.createElement("button",Object.assign({type:"button",onClick:i,className:`${a}-close-icon`,tabIndex:0},l),s):null},w=t.forwardRef((e,r)=>{let{description:a,prefixCls:o,message:n,banner:i,className:d,rootClassName:m,style:g,onMouseEnter:p,onMouseLeave:h,onClick:y,afterClose:w,showIcon:O,closable:x,closeText:S,closeIcon:E,action:P,id:k}=e,z=v(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[I,j]=t.useState(!1),M=t.useRef(null);t.useImperativeHandle(r,()=>({nativeElement:M.current}));let{getPrefixCls:H,direction:N,closable:T,closeIcon:B,className:R,style:L}=(0,f.useComponentConfig)("alert"),D=H("alert",o),[_,Q,q]=b(D),A=t=>{var r;j(!0),null==(r=e.onClose)||r.call(e,t)},F=t.useMemo(()=>void 0!==e.type?e.type:i?"warning":"info",[e.type,i]),V=t.useMemo(()=>"object"==typeof x&&!!x.closeIcon||!!S||("boolean"==typeof x?x:!1!==E&&null!=E||!!T),[S,E,x,T]),K=!!i&&void 0===O||O,U=(0,l.default)(D,`${D}-${F}`,{[`${D}-with-description`]:!!a,[`${D}-no-icon`]:!K,[`${D}-banner`]:!!i,[`${D}-rtl`]:"rtl"===N},R,d,m,q,Q),G=(0,c.default)(z,{aria:!0,data:!0}),W=t.useMemo(()=>"object"==typeof x&&x.closeIcon?x.closeIcon:S||(void 0!==E?E:"object"==typeof T&&T.closeIcon?T.closeIcon:B),[E,x,T,S,B]),X=t.useMemo(()=>{let e=null!=x?x:T;if("object"==typeof e){let{closeIcon:t}=e;return v(e,["closeIcon"])}return{}},[x,T]);return _(t.createElement(s.default,{visible:!I,motionName:`${D}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:w},({className:r,style:o},i)=>t.createElement("div",Object.assign({id:k,ref:(0,u.composeRef)(M,i),"data-show":!I,className:(0,l.default)(U,r),style:Object.assign(Object.assign(Object.assign({},L),g),o),onMouseEnter:p,onMouseLeave:h,onClick:y,role:"alert"},G),K?t.createElement(C,{description:a,icon:e.icon,prefixCls:D,type:F}):null,t.createElement("div",{className:`${D}-content`},n?t.createElement("div",{className:`${D}-message`},n):null,a?t.createElement("div",{className:`${D}-description`},a):null),P?t.createElement("div",{className:`${D}-action`},P):null,t.createElement($,{isClosable:V,prefixCls:D,closeIcon:W,handleClose:A,ariaProps:X}))))});var O=e.i(278409),x=e.i(233848),S=e.i(487806),E=e.i(479671),P=e.i(480002),k=e.i(868917);let z=function(e){function r(){var e,t,a;return(0,O.default)(this,r),t=r,a=arguments,t=(0,S.default)(t),(e=(0,P.default)(this,(0,E.default)()?Reflect.construct(t,a||[],(0,S.default)(this).constructor):t.apply(this,a))).state={error:void 0,info:{componentStack:""}},e}return(0,k.default)(r,e),(0,x.default)(r,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,description:r,id:a,children:o}=this.props,{error:n,info:i}=this.state,l=(null==i?void 0:i.componentStack)||null,s=void 0===e?(n||"").toString():e;return n?t.createElement(w,{id:a,type:"error",message:s,description:t.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},void 0===r?l:r)}):o}}])}(t.Component);w.ErrorBoundary=z,e.s(["Alert",0,w],560445)},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),o=e.i(702779),n=e.i(563113),i=e.i(763731),l=e.i(121872),s=e.i(242064);e.i(296059);var c=e.i(915654);e.i(262370);var u=e.i(135551),d=e.i(183293),f=e.i(246422),m=e.i(838378);let g=e=>{let{lineWidth:t,fontSizeIcon:r,calc:a}=e,o=e.fontSizeSM;return(0,m.mergeToken)(e,{tagFontSize:o,tagLineHeight:(0,c.unit)(a(e.lineHeightSM).mul(o).equal()),tagIconSize:a(r).sub(a(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},p=e=>({defaultBg:new u.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),h=(0,f.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:a,componentCls:o,calc:n}=e,i=n(a).sub(r).equal(),l=n(t).sub(r).equal();return{[o]:Object.assign(Object.assign({},(0,d.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${o}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(g(e)),p);var b=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 v=t.forwardRef((e,a)=>{let{prefixCls:o,style:n,className:i,checked:l,children:c,icon:u,onChange:d,onClick:f}=e,m=b(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:g,tag:p}=t.useContext(s.ConfigContext),v=g("tag",o),[y,C,$]=h(v),w=(0,r.default)(v,`${v}-checkable`,{[`${v}-checkable-checked`]:l},null==p?void 0:p.className,i,C,$);return y(t.createElement("span",Object.assign({},m,{ref:a,style:Object.assign(Object.assign({},n),null==p?void 0:p.style),className:w,onClick:e=>{null==d||d(!l),null==f||f(e)}}),u,t.createElement("span",null,c)))});var y=e.i(403541);let C=(0,f.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=g(e),(0,y.genPresetColor)(t,(e,{textColor:r,lightBorderColor:a,lightColor:o,darkColor:n})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:r,background:o,borderColor:a,"&-inverse":{color:t.colorTextLightSolid,background:n,borderColor:n},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},p),$=(e,t,r)=>{let a="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${a}Bg`],borderColor:e[`color${a}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},w=(0,f.genSubStyleComponent)(["Tag","status"],e=>{let t=g(e);return[$(t,"success","Success"),$(t,"processing","Info"),$(t,"error","Error"),$(t,"warning","Warning")]},p);var O=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 x=t.forwardRef((e,c)=>{let{prefixCls:u,className:d,rootClassName:f,style:m,children:g,icon:p,color:b,onClose:v,bordered:y=!0,visible:$}=e,x=O(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:S,direction:E,tag:P}=t.useContext(s.ConfigContext),[k,z]=t.useState(!0),I=(0,a.default)(x,["closeIcon","closable"]);t.useEffect(()=>{void 0!==$&&z($)},[$]);let j=(0,o.isPresetColor)(b),M=(0,o.isPresetStatusColor)(b),H=j||M,N=Object.assign(Object.assign({backgroundColor:b&&!H?b:void 0},null==P?void 0:P.style),m),T=S("tag",u),[B,R,L]=h(T),D=(0,r.default)(T,null==P?void 0:P.className,{[`${T}-${b}`]:H,[`${T}-has-color`]:b&&!H,[`${T}-hidden`]:!k,[`${T}-rtl`]:"rtl"===E,[`${T}-borderless`]:!y},d,f,R,L),_=e=>{e.stopPropagation(),null==v||v(e),e.defaultPrevented||z(!1)},[,Q]=(0,n.useClosable)((0,n.pickClosable)(e),(0,n.pickClosable)(P),{closable:!1,closeIconRender:e=>{let a=t.createElement("span",{className:`${T}-close-icon`,onClick:_},e);return(0,i.replaceElement)(e,a,e=>({onClick:t=>{var r;null==(r=null==e?void 0:e.onClick)||r.call(e,t),_(t)},className:(0,r.default)(null==e?void 0:e.className,`${T}-close-icon`)}))}}),q="function"==typeof x.onClick||g&&"a"===g.type,A=p||null,F=A?t.createElement(t.Fragment,null,A,g&&t.createElement("span",null,g)):g,V=t.createElement("span",Object.assign({},I,{ref:c,className:D,style:N}),F,Q,j&&t.createElement(C,{key:"preset",prefixCls:T}),M&&t.createElement(w,{key:"status",prefixCls:T}));return B(q?t.createElement(l.default,{component:"Tag"},V):V)});x.CheckableTag=v,e.s(["Tag",0,x],262218)},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 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(["RobotOutlined",0,n],983561)},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",()=>t])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9c8c73d0d20d640f.js b/litellm/proxy/_experimental/out/_next/static/chunks/fa36bea8808c8054.js similarity index 78% rename from litellm/proxy/_experimental/out/_next/static/chunks/9c8c73d0d20d640f.js rename to litellm/proxy/_experimental/out/_next/static/chunks/fa36bea8808c8054.js index 284ad5304f..95a21e7bbd 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/9c8c73d0d20d640f.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/fa36bea8808c8054.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,289793,952840,617885,286718,23371,487147,498610,785952,193523,260573,e=>{"use strict";var t=e.i(764205),s=e.i(266027),a=e.i(243652),r=e.i(708347),l=e.i(135214);let i=(0,a.createQueryKeys)("agents");e.s(["useAgents",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,t.getAgentsList)(e),enabled:!!e&&r.all_admin_roles.includes(a||"")})}],289793);let n=(0,a.createQueryKeys)("customers");e.s(["useCustomers",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,t.allEndUsersCall)(e),enabled:!!e&&r.all_admin_roles.includes(a)})}],952840);var o=e.i(621482);let c=(0,a.createQueryKeys)("infiniteUsers"),d=50;e.s(["useInfiniteUsers",0,(e=d,s)=>{let{accessToken:a,userRole:i}=(0,l.default)();return(0,o.useInfiniteQuery)({queryKey:c.list({filters:{pageSize:e,...s&&{searchEmail:s}}}),queryFn:async({pageParam:r})=>await (0,t.userListCall)(a,null,r,e,s||null),initialPageParam:1,getNextPageParam:e=>{if(e.pagee&&t&&t.length?(0,u.jsxs)("div",{className:"w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[(0,u.jsx)("p",{className:"text-tremor-content-strong",children:s}),t.map(e=>{let t=e.dataKey?.toString();if(!t||!e.payload)return null;let s=((e,t)=>{let s=t.substring(t.indexOf(".")+1);if(e.metrics&&s in e.metrics)return e.metrics[s]})(e.payload,t),a=t.includes("spend"),r=void 0!==s?a?`$${s.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:s.toLocaleString():"N/A",l=b[e.color]||e.color;return(0,u.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-2 ring-white drop-shadow-md",style:{backgroundColor:l}}),(0,u.jsx)("p",{className:"font-medium text-tremor-content dark:text-dark-tremor-content",children:t.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]}),(0,u.jsx)("p",{className:"font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",children:r})]},t)})]}):null,v=({categories:e,colors:t})=>(0,u.jsx)("div",{className:"flex items-center justify-end space-x-4",children:e.map((e,s)=>{let a=b[t[s]]||t[s];return(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-4 ring-white",style:{backgroundColor:a}}),(0,u.jsx)("p",{className:"text-sm text-tremor-content dark:text-dark-tremor-content",children:e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]},e)})});e.s(["CustomLegend",0,v,"CustomTooltip",0,k],286718);var N=e.i(291542),T=e.i(271645);let C=[{title:"Model",dataIndex:"model",key:"model",render:e=>e||"-"},{title:"Spend (USD)",dataIndex:"spend",key:"spend",render:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`},{title:"Successful",dataIndex:"successful_requests",key:"successful_requests",render:e=>(0,u.jsx)("span",{className:"text-green-600",children:e?.toLocaleString()||0})},{title:"Failed",dataIndex:"failed_requests",key:"failed_requests",render:e=>(0,u.jsx)("span",{className:"text-red-600",children:e?.toLocaleString()||0})},{title:"Tokens",dataIndex:"tokens",key:"tokens",render:e=>e?.toLocaleString()||0}],w=({topModels:e})=>{let[t,s]=(0,T.useState)("table");return 0===e.length?null:(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,u.jsx)(_.Title,{children:"Model Usage"}),(0,u.jsxs)("div",{className:"flex space-x-2",children:[(0,u.jsx)("button",{onClick:()=>s("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,u.jsx)("button",{onClick:()=>s("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"})]})]}),"chart"===t?(0,u.jsx)("div",{className:"max-h-[234px] overflow-y-auto",children:(0,u.jsx)(p.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,m.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:180,tickGap:5,showLegend:!1})}):(0,u.jsx)(N.Table,{columns:C,dataSource:e,rowKey:"model",size:"small",pagination:!1,scroll:e.length>5?{y:195}:void 0})]})};function S(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function q(e){return 0===e?"$0":e>=1e6?"$"+e/1e6+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}e.s(["valueFormatter",()=>S,"valueFormatterSpend",()=>q],23371);let L=({modelName:e,metrics:t,hidePromptCachingMetrics:s=!1})=>(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:t.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:t.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:t.total_tokens.toLocaleString()}),(0,u.jsxs)(j.Text,{children:[Math.round(t.total_tokens/t.total_successful_requests)," avg per successful request"]})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend,2)]}),(0,u.jsxs)(j.Text,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend/t.total_successful_requests,3)," per successful request"]})]})]}),t.top_api_keys&&t.top_api_keys.length>0&&(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsx)(_.Title,{children:"Top Virtual Keys by Spend"}),(0,u.jsx)("div",{className:"mt-3",children:(0,u.jsx)("div",{className:"grid grid-cols-1 gap-2",children:t.top_api_keys.map((e,t)=>(0,u.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium",children:e.key_alias||`${e.api_key.substring(0,10)}...`}),e.team_id&&(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,u.jsxs)("div",{className:"text-right",children:[(0,u.jsxs)(j.Text,{className:"font-medium",children:["$",(0,m.formatNumberWithCommas)(e.spend,2)]}),(0,u.jsxs)(j.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,u.jsx)(w,{topModels:t.top_models}),(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Spend per day"}),(0,u.jsx)(v,{categories:["metrics.spend"],colors:["green"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2,!0)}`,yAxisWidth:72})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4 mt-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.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:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Requests per day"}),(0,u.jsx)(v,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Success vs Failed Requests"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),!s&&(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Prompt Caching Metrics"}),(0,u.jsx)(v,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,u.jsxs)("div",{className:"mb-2",children:[(0,u.jsxs)(j.Text,{children:["Cache Read: ",t.total_cache_read_input_tokens?.toLocaleString()||0," tokens"]}),(0,u.jsxs)(j.Text,{children:["Cache Creation: ",t.total_cache_creation_input_tokens?.toLocaleString()||0," tokens"]})]}),(0,u.jsx)(h.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:S,customTooltip:k,showLegend:!1})]})]})]});e.s(["ActivityMetrics",0,({modelMetrics:e,hidePromptCachingMetrics:t=!1})=>{let s=Object.keys(e).sort((t,s)=>""===t?1:""===s?-1:e[s].total_spend-e[t].total_spend),a={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=>{a.total_requests+=e.total_requests,a.total_successful_requests+=e.total_successful_requests,a.total_tokens+=e.total_tokens,a.total_spend+=e.total_spend,a.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,a.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{a.daily_data[e.date]||(a.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}),a.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,a.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,a.daily_data[e.date].total_tokens+=e.metrics.total_tokens,a.daily_data[e.date].api_requests+=e.metrics.api_requests,a.daily_data[e.date].spend+=e.metrics.spend,a.daily_data[e.date].successful_requests+=e.metrics.successful_requests,a.daily_data[e.date].failed_requests+=e.metrics.failed_requests,a.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,a.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let r=Object.entries(a.daily_data).map(([e,t])=>({date:e,metrics:t})).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,u.jsxs)("div",{className:"space-y-8",children:[(0,u.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,u.jsx)(_.Title,{children:"Overall Usage"}),(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4 mb-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:a.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:a.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:a.total_tokens.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(a.total_spend,2)]})]})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens Over Time"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Requests Over Time"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:k,showLegend:!1})]})]})]}),(0,u.jsx)(y.Collapse,{defaultActiveKey:s[0],children:s.map(s=>(0,u.jsx)(y.Collapse.Panel,{header:(0,u.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,u.jsx)(_.Title,{children:e[s].label||"Unknown Item"}),(0,u.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,u.jsxs)("span",{children:["$",(0,m.formatNumberWithCommas)(e[s].total_spend,2)]}),(0,u.jsxs)("span",{children:[e[s].total_requests.toLocaleString()," requests"]})]})]}),children:(0,u.jsx)(L,{modelName:s||"Unknown Model",metrics:e[s],hidePromptCachingMetrics:t})},s))})]})},"processActivityData",0,(e,t,s=[])=>{let a={};return e.results.forEach(e=>{Object.entries(e.breakdown[t]||{}).forEach(([r,l])=>{a[r]||(a[r]={label:"api_keys"===t?((e,t,s)=>{let a=e.metadata.key_alias||`key-hash-${t}`,r=e.metadata.team_id;if(r){let e=(0,x.resolveTeamAliasFromTeamID)(r,s);return e?`${a} (team: ${e})`:`${a} (team_id: ${r})`}return a})(l,r,s):"entities"===t&&(l.metadata?.agent_name||l.metadata?.team_alias)||r,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[r].total_requests+=l.metrics.api_requests,a[r].prompt_tokens+=l.metrics.prompt_tokens,a[r].completion_tokens+=l.metrics.completion_tokens,a[r].total_tokens+=l.metrics.total_tokens,a[r].total_spend+=l.metrics.spend,a[r].total_successful_requests+=l.metrics.successful_requests,a[r].total_failed_requests+=l.metrics.failed_requests,a[r].total_cache_read_input_tokens+=l.metrics.cache_read_input_tokens||0,a[r].total_cache_creation_input_tokens+=l.metrics.cache_creation_input_tokens||0,a[r].daily_data.push({date:e.date,metrics:{prompt_tokens:l.metrics.prompt_tokens,completion_tokens:l.metrics.completion_tokens,total_tokens:l.metrics.total_tokens,api_requests:l.metrics.api_requests,spend:l.metrics.spend,successful_requests:l.metrics.successful_requests,failed_requests:l.metrics.failed_requests,cache_read_input_tokens:l.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:l.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==t&&Object.entries(a).forEach(([s,r])=>{let l={};e.results.forEach(e=>{let a=e.breakdown[t]?.[s];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(([e,t])=>{l[e]||(l[e]={api_key:e,key_alias:t.metadata.key_alias,team_id:t.metadata.team_id,spend:0,requests:0,tokens:0}),l[e].spend+=t.metrics.spend,l[e].requests+=t.metrics.api_requests,l[e].tokens+=t.metrics.total_tokens})}),a[s].top_api_keys=Object.values(l).sort((e,t)=>t.spend-e.spend).slice(0,5)}),"api_keys"===t&&Object.entries(a).forEach(([t,s])=>{let r={};e.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,s])=>{if(s&&"api_key_breakdown"in s){let a=s.api_key_breakdown?.[t];a&&(r[e]||(r[e]={model:e,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0}),r[e].spend+=a.metrics.spend,r[e].requests+=a.metrics.api_requests,r[e].successful_requests+=a.metrics.successful_requests||0,r[e].failed_requests+=a.metrics.failed_requests||0,r[e].tokens+=a.metrics.total_tokens)}})}),a[t].top_models=Object.values(r).sort((e,t)=>t.spend-e.spend)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())}),a}],487147);var D=e.i(994388),A=e.i(366283),M=e.i(779241),E=e.i(212931),O=e.i(808613),F=e.i(482725),$=e.i(199133),U=e.i(727749);e.s(["default",0,({isOpen:e,onClose:s,accessToken:a})=>{let[r]=O.Form.useForm(),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(null),[c,d]=(0,T.useState)(!1),[m,x]=(0,T.useState)("cloudzero"),[h,p]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e&&a&&g()},[e,a]);let g=async()=>{d(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"}});if(e.ok){let t=await e.json();o(t),r.setFieldsValue({connection_id:t.connection_id})}else if(404!==e.status){let t=await e.json();U.default.fromBackend(`Failed to load existing settings: ${t.error||"Unknown error"}`)}}catch(e){console.error("Error loading CloudZero settings:",e),U.default.fromBackend("Failed to load existing settings")}finally{d(!1)}},f=async e=>{if(!a)return void U.default.fromBackend("No access token available");i(!0);try{let s=n?"/cloudzero/settings":"/cloudzero/init",r=n?"PUT":"POST",l={...e,timezone:"UTC"},i=await fetch(s,{method:r,headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(l)}),c=await i.json();if(i.ok)return U.default.success(c.message||"CloudZero settings saved successfully"),o({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return U.default.fromBackend(c.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),U.default.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},_=async()=>{if(!a)return void U.default.fromBackend("No access token available");p(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),r=await e.json();e.ok?(U.default.success(r.message||"Export to CloudZero completed successfully"),s()):U.default.fromBackend(r.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),U.default.fromBackend("Failed to export to CloudZero")}finally{p(!1)}},y=async()=>{p(!0);try{U.default.info("CSV export functionality coming soon!"),s()}catch(e){console.error("Error exporting CSV:",e),U.default.fromBackend("Failed to export CSV")}finally{p(!1)}},b=async()=>{if("cloudzero"===m){if(!n){let e=await r.validateFields();if(!await f(e))return}await _()}else await y()},k=()=>{r.resetFields(),x("cloudzero"),o(null),s()},v=[{value:"cloudzero",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,u.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsx)("span",{children:"Export to CSV"})]})}];return(0,u.jsx)(E.Modal,{title:"Export Data",open:e,onCancel:k,footer:null,width:600,destroyOnHidden:!0,children:(0,u.jsxs)("div",{className:"space-y-4",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,u.jsx)($.Select,{value:m,onChange:x,options:v,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,u.jsx)("div",{children:c?(0,u.jsx)("div",{className:"flex justify-center py-8",children:(0,u.jsx)(F.Spin,{size:"large"})}):(0,u.jsxs)(u.Fragment,{children:[n&&(0,u.jsx)(A.Callout,{title:"Existing CloudZero Configuration",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsxs)(j.Text,{children:["API Key: ",n.api_key_masked,(0,u.jsx)("br",{}),"Connection ID: ",n.connection_id]})}),!n&&(0,u.jsxs)(O.Form,{form:r,layout:"vertical",children:[(0,u.jsx)(O.Form.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,u.jsx)(M.TextInput,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,u.jsx)(O.Form.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,u.jsx)(M.TextInput,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,u.jsx)(A.Callout,{title:"CSV Export",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,u.jsx)(j.Text,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,u.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,u.jsx)(D.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,u.jsx)(D.Button,{onClick:b,loading:l||h,disabled:l||h,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})}],498610);var P=e.i(785242),R=e.i(464571),V=e.i(981339);let I=({value:e,onChange:t})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,u.jsx)($.Select,{value:e,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]}),B=({dateRange:e,selectedFilters:t})=>(0,u.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 W=e.i(91739);let z=({value:e,onChange:t,entityType:s})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,u.jsx)(W.Radio.Group,{value:e,onChange:e=>t(e.target.value),className:"w-full",children:(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily_with_keys",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s," and key"]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s,", split by API key"]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily_with_models",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",s," and model"]}),(0,u.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]});var K=e.i(59935);let Y=(e,t)=>({id:e,alias:t[e]||e}),H=["spend","api_requests","successful_requests","failed_requests","total_tokens","prompt_tokens","completion_tokens","cache_read_input_tokens","cache_creation_input_tokens"],G=e=>{let t=e.entities;return t&&Object.keys(t).length>0?t:(e=>{let t=e.api_keys;if(!t||0===Object.keys(t).length)return{};let s={};for(let[e,a]of Object.entries(t)){let t=a?.metadata?.team_id||"Unassigned";s[t]||(s[t]={metrics:Object.fromEntries(H.map(e=>[e,0])),api_key_breakdown:{}});let r=s[t].metrics,l=a?.metrics||{};for(let e of H)r[e]+=l[e]||0;s[t].api_key_breakdown[e]=a}return s})(e)},Z=(e,t,s,a={})=>{switch(t){case"daily":default:return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([r,l])=>{let{id:i,alias:n}=Y(r,s);a.push({Date:e.date,[t]:n,[`${t} ID`]:i,"Spend ($)":(0,m.formatNumberWithCommas)(l.metrics.spend,4),Requests:l.metrics.api_requests,"Successful Requests":l.metrics.successful_requests,"Failed Requests":l.metrics.failed_requests,"Total Tokens":l.metrics.total_tokens,"Prompt Tokens":l.metrics.prompt_tokens||0,"Completion Tokens":l.metrics.completion_tokens||0})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_keys":return((e,t,s={})=>{let a={};return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([t,r])=>{let{id:l,alias:i}=Y(t,s);Object.entries(r.api_key_breakdown||{}).forEach(([t,s])=>{let r=s?.metadata?.key_alias||null,n=`${e.date}_${l}_${t}`;a[n]?(a[n].metrics.spend+=s.metrics?.spend||0,a[n].metrics.api_requests+=s.metrics?.api_requests||0,a[n].metrics.successful_requests+=s.metrics?.successful_requests||0,a[n].metrics.failed_requests+=s.metrics?.failed_requests||0,a[n].metrics.total_tokens+=s.metrics?.total_tokens||0,a[n].metrics.prompt_tokens+=s.metrics?.prompt_tokens||0,a[n].metrics.completion_tokens+=s.metrics?.completion_tokens||0):a[n]={Date:e.date,entityId:l,entityAlias:i,keyId:t,keyAlias:r,metrics:{spend:s.metrics?.spend||0,api_requests:s.metrics?.api_requests||0,successful_requests:s.metrics?.successful_requests||0,failed_requests:s.metrics?.failed_requests||0,total_tokens:s.metrics?.total_tokens||0,prompt_tokens:s.metrics?.prompt_tokens||0,completion_tokens:s.metrics?.completion_tokens||0}}})})}),Object.values(a).map(e=>({Date:e.Date,[t]:e.entityAlias,[`${t} ID`]:e.entityId,"Key Alias":e.keyAlias||"-","Key ID":e.keyId,"Spend ($)":(0,m.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})).sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_models":return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{let r={};Object.entries(G(e.breakdown)).forEach(([t,s])=>{r[t]||(r[t]={}),Object.entries(e.breakdown.models||{}).forEach(([e,a])=>{Object.entries(s.api_key_breakdown||{}).forEach(([s,a])=>{r[t][e]||(r[t][e]={spend:0,requests:0,successful:0,failed:0,tokens:0}),r[t][e].spend+=a.metrics.spend||0,r[t][e].requests+=a.metrics.api_requests||0,r[t][e].successful+=a.metrics.successful_requests||0,r[t][e].failed+=a.metrics.failed_requests||0,r[t][e].tokens+=a.metrics.total_tokens||0})})}),Object.entries(r).forEach(([r,l])=>{let{id:i,alias:n}=Y(r,s);Object.entries(l).forEach(([s,r])=>{a.push({Date:e.date,[t]:n,[`${t} ID`]:i,Model:s,"Spend ($)":(0,m.formatNumberWithCommas)(r.spend,4),Requests:r.requests,Successful:r.successful,Failed:r.failed,"Total Tokens":r.tokens})})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a)}},J=({isOpen:e,onClose:t,entityType:s,spendData:a,dateRange:r,selectedFilters:l,customTitle:i})=>{let[n,o]=(0,T.useState)("csv"),[c,d]=(0,T.useState)("daily"),[m,h]=(0,T.useState)(!1),{data:p,isLoading:g}=(0,P.useTeams)(),f=s.charAt(0).toUpperCase()+s.slice(1),j=i||`Export ${f} Usage`,_=(0,T.useMemo)(()=>(0,x.createTeamAliasMap)(p),[p]),y=async e=>{let i=e||n;h(!0);try{"csv"===i?(((e,t,s,a,r={})=>{let l=Z(e,t,s,r),i=new Blob([K.default.unparse(l)],{type:"text/csv;charset=utf-8;"}),n=window.URL.createObjectURL(i),o=document.createElement("a");o.href=n,o.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(n)})(a,c,f,s,_),U.default.success(`${f} usage data exported successfully as CSV`)):(((e,t,s,a,r,l,i={})=>{let n=Z(e,t,s,i),o={export_date:new Date().toISOString(),entity_type:a,date_range:{from:r.from?.toISOString(),to:r.to?.toISOString()},filters_applied:l.length>0?l:"None",export_scope:t,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}},c=new Blob([JSON.stringify({metadata:o,data:n},null,2)],{type:"application/json"}),d=window.URL.createObjectURL(c),u=document.createElement("a");u.href=d,u.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(d)})(a,c,f,s,r,l,_),U.default.success(`${f} usage data exported successfully as JSON`)),t()}catch(e){console.error("Error exporting data:",e),U.default.fromBackend("Failed to export data")}finally{h(!1)}};return(0,u.jsx)(E.Modal,{title:(0,u.jsx)("span",{className:"text-base font-semibold",children:j}),open:e,onCancel:t,footer:null,width:480,children:(0,u.jsxs)("div",{className:"space-y-5 py-2",children:[g?(0,u.jsx)(V.Skeleton,{active:!0}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(B,{dateRange:r,selectedFilters:l}),(0,u.jsx)(z,{value:c,onChange:d,entityType:s}),(0,u.jsx)(I,{value:n,onChange:o})]}),g?(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(V.Skeleton.Button,{active:!0}),(0,u.jsx)(V.Skeleton.Button,{active:!0})]}):(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(R.Button,{variant:"outlined",onClick:t,disabled:m,children:"Cancel"}),(0,u.jsx)(R.Button,{onClick:()=>y(),loading:m||g,disabled:m||g,type:"primary",children:m?"Exporting...":`Export ${n.toUpperCase()}`})]})]})})};e.s(["default",0,J],785952),e.s(["default",0,({dateValue:e,entityType:t,spendData:s,showFilters:a=!1,filterLabel:r,filterPlaceholder:l,selectedFilters:i=[],onFiltersChange:n,filterOptions:o=[],filterMode:c="multiple",customTitle:d,compactLayout:m=!1,teams:x=[]})=>{let[h,p]=(0,T.useState)(!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"mb-4",children:(0,u.jsxs)("div",{className:`grid ${a&&o.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"} items-end gap-4`,children:[a&&o.length>0&&(0,u.jsxs)("div",{children:[r&&(0,u.jsx)(j.Text,{className:"mb-2",children:r}),(0,u.jsx)($.Select,{mode:"single"===c?void 0:"multiple",style:{width:"100%"},placeholder:l,value:"single"===c?i[0]??void 0:i,onChange:e=>{"single"===c?n?.(e?[e]:[]):n?.(e)},options:o,allowClear:!0})]}),(0,u.jsx)("div",{className:"justify-self-end",children:(0,u.jsx)(D.Button,{onClick:()=>p(!0),icon:()=>(0,u.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsx)(J,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:s,dateRange:e,selectedFilters:i,customTitle:d,teams:x})]})}],193523),e.s([],260573)},973706,e=>{"use strict";var t=e.i(843476),s=e.i(72713),a=e.i(637235),r=e.i(994388),l=e.i(599724),i=e.i(166540),n=e.i(271645);let o=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,i.default)().startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,i.default)().subtract(7,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,i.default)().subtract(30,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,i.default)().startOf("month").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,i.default)().startOf("year").toDate(),to:(0,i.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:c,label:d="Select Time Range",showTimeRange:u=!0})=>{let[m,x]=(0,n.useState)(!1),[h,p]=(0,n.useState)(e),[g,f]=(0,n.useState)(null),[j,_]=(0,n.useState)(""),[y,b]=(0,n.useState)(""),k=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of o){let s=t.getValue(),a=(0,i.default)(e.from).isSame((0,i.default)(s.from),"day"),r=(0,i.default)(e.to).isSame((0,i.default)(s.to),"day");if(a&&r)return t.shortLabel}return null},[]);(0,n.useEffect)(()=>{f(v(e))},[e,v]);let N=(0,n.useCallback)(()=>{if(!j||!y)return{isValid:!0,error:""};let e=(0,i.default)(j,"YYYY-MM-DD"),t=(0,i.default)(y,"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"}},[j,y])();(0,n.useEffect)(()=>{e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,n.useEffect)(()=>{let e=e=>{k.current&&!k.current.contains(e.target)&&x(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let T=(0,n.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let s=e=>(0,i.default)(e).format("D MMM, HH:mm");return`${s(e)} - ${s(t)}`},[]),C=(0,n.useCallback)(e=>{let t;if(!e.from)return e;let s={...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),s.from=a,s.to=t,s},[]),w=(0,n.useCallback)(()=>{try{if(j&&y&&N.isValid){let e=(0,i.default)(j,"YYYY-MM-DD").startOf("day"),t=(0,i.default)(y,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let s={from:e.toDate(),to:t.toDate()};p(s);let a=v(s);f(a)}}}catch(e){console.warn("Invalid date format:",e)}},[j,y,N.isValid,v]);return(0,n.useEffect)(()=>{w()},[w]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d&&(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:d}),(0,t.jsxs)("div",{className:"relative",ref:k,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:()=>x(!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:T(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:o.map(e=>{let s=g===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 ${s?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:s}=e.getValue();p({from:t,to:s}),f(e.shortLabel),_((0,i.default)(t).format("YYYY-MM-DD")),b((0,i.default)(s).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${s?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${s?"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)(s.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:j,onChange:e=>_(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 ${!N.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:y,onChange:e=>b(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 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!N.isValid&&N.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:N.error})]})}),h.from&&h.to&&N.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,i.default)(h.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,i.default)(h.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)(r.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),f(v(e)),x(!1)},children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:()=>{h.from&&h.to&&N.isValid&&(c(h),requestIdleCallback(()=>{c(C(h))},{timeout:100}),x(!1))},disabled:!h.from||!h.to||!N.isValid,children:"Apply"})]})})]})]})})]})]})}])},797305,497650,e=>{"use strict";var t=e.i(843476),s=e.i(755151),a=e.i(872934),r=e.i(827252),l=e.i(56456),i=e.i(240647),n=e.i(152473),o=e.i(584935),c=e.i(304967),d=e.i(309426),u=e.i(350967),m=e.i(197647),x=e.i(653824),h=e.i(881073),p=e.i(404206),g=e.i(723731),f=e.i(599724),j=e.i(629569),_=e.i(560445),y=e.i(464571),b=e.i(560025),k=e.i(199133),v=e.i(592968),N=e.i(898586),T=e.i(271645),C=e.i(289793),w=e.i(952840),S=e.i(135214),q=e.i(738014),L=e.i(617885),D=e.i(500330),A=e.i(708347),M=e.i(487147),E=e.i(498610);e.i(260573);var O=e.i(785952),F=e.i(764205),$=e.i(973706),U=e.i(571303);let P=({isDateChanging:e=!1})=>(0,t.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)(U.UiLoadingSpinner,{className:"size-5"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:e?"Processing date selection...":"Loading chart data..."}),(0,t.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:e?"This will only take a moment":"Fetching your data"})]})]})});var R=e.i(290571),V=e.i(95779),I=e.i(444755),B=e.i(673706);let W=T.default.forwardRef((e,t)=>{let{color:s,children:a,className:r}=e,l=(0,R.__rest)(e,["color","children","className"]);return T.default.createElement("p",Object.assign({ref:t,className:(0,I.tremorTwMerge)("font-semibold text-tremor-metric",s?(0,B.getColorClassNames)(s,V.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",r)},l),a)});W.displayName="Metric";var z=e.i(37091),K=e.i(269200),Y=e.i(427612),H=e.i(496020),G=e.i(64848),Z=e.i(942232),J=e.i(977572),Q=e.i(994388);let X=({accessToken:e,selectedTags:s,formatAbbreviatedNumber:a})=>{let r,l,i,n,[c,d]=(0,T.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[u,_]=(0,T.useState)(!1),[y,b]=(0,T.useState)(1),k=async()=>{if(e){_(!0);try{let t=await (0,F.perUserAnalyticsCall)(e,y,50,s.length>0?s:void 0);d(t)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{_(!1)}}};return(0,T.useEffect)(()=>{k()},[e,s,y]),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"Per User Usage"}),(0,t.jsx)(z.Subtitle,{children:"Individual developer usage metrics"}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"User Details"}),(0,t.jsx)(m.Tab,{children:"Usage Distribution"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"User ID"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Email"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Agent"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Success Generations"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Tokens"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Failed Requests"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Cost"})]})}),(0,t.jsx)(Z.TableBody,{children:c.results.slice(0,10).map((e,s)=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{className:"font-medium",children:e.user_id})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_email||"N/A"})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_agent||"Unknown"})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.successful_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.total_tokens)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.failed_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsxs)(f.Text,{children:["$",a(e.spend,4)]})})]},s))})]}),c.results.length>10&&(0,t.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,t.jsxs)(f.Text,{className:"text-sm text-gray-500",children:["Showing 10 of ",c.total_count," results"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y>1&&b(y-1)},disabled:1===y,children:"Previous"}),(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y=c.total_pages,children:"Next"})]})]})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(j.Title,{className:"text-lg",children:"User Usage Distribution"}),(0,t.jsx)(z.Subtitle,{children:"Number of users by successful request frequency"})]}),(0,t.jsx)(o.BarChart,{data:(r=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";r.set(t,(r.get(t)||0)+1)}),l=Array.from(r.entries()).sort(([,e],[,t])=>t-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 t=e.successful_requests,s=e.user_agent||"Unknown";l.includes(s)&&Object.entries(i).forEach(([e,a])=>{t>=a.range[0]&&t<=a.range[1]&&(a.agents[s]||(a.agents[s]=0),a.agents[s]++)})}),Object.entries(i).map(([e,t])=>{let s={category:e};return l.forEach(e=>{s[e]=t.agents[e]||0}),s})),index:"category",categories:(n=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";n.set(t,(n.get(t)||0)+1)}),Array.from(n.entries()).sort(([,e],[,t])=>t-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})]})]})]})]})},ee=({accessToken:e,userRole:s,dateValue:a,onDateChange:r})=>{let[l,i]=(0,T.useState)({results:[]}),[n,d]=(0,T.useState)({results:[]}),[_,y]=(0,T.useState)({results:[]}),[b,N]=(0,T.useState)({results:[]}),[C,w]=(0,T.useState)(""),[S,q]=(0,T.useState)([]),[L,D]=(0,T.useState)([]),[A,M]=(0,T.useState)(!1),[E,O]=(0,T.useState)(!1),[$,U]=(0,T.useState)(!1),[R,V]=(0,T.useState)(!1),[I,B]=(0,T.useState)(!1),K=new Date,Y=async()=>{if(e){M(!0);try{let t=await (0,F.tagDistinctCall)(e);q(t.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{M(!1)}}},H=async()=>{if(e){O(!0);try{let t=await (0,F.tagDauCall)(e,K,C||void 0,L.length>0?L:void 0);i(t)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{O(!1)}}},G=async()=>{if(e){U(!0);try{let t=await (0,F.tagWauCall)(e,K,C||void 0,L.length>0?L:void 0);d(t)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{U(!1)}}},Z=async()=>{if(e){V(!0);try{let t=await (0,F.tagMauCall)(e,K,C||void 0,L.length>0?L:void 0);y(t)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{V(!1)}}},J=async()=>{if(e&&a.from&&a.to){B(!0);try{let t=await (0,F.userAgentSummaryCall)(e,a.from,a.to,L.length>0?L:void 0);N(t)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{B(!1)}}};(0,T.useEffect)(()=>{Y()},[e]),(0,T.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{H(),G(),Z()},50);return()=>clearTimeout(t)},[e,C,L]),(0,T.useEffect)(()=>{if(!a.from||!a.to)return;let e=setTimeout(()=>{J()},50);return()=>clearTimeout(e)},[e,a,L]);let Q=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,ee=e=>Object.entries(e.reduce((e,t)=>(e[t.tag]=(e[t.tag]||0)+t.active_users,e),{})).sort(([,e],[,t])=>t-e).map(([e])=>e),et=ee(l.results).slice(0,10),es=ee(n.results).slice(0,10),ea=ee(_.results).slice(0,10),er=(()=>{let e=[],t=new Date;for(let s=6;s>=0;s--){let a=new Date(t);a.setDate(a.getDate()-s);let r={date:a.toISOString().split("T")[0]};et.forEach(e=>{r[Q(e)]=0}),e.push(r)}return l.results.forEach(t=>{let s=Q(t.tag),a=e.find(e=>e.date===t.date);a&&(a[s]=t.active_users)}),e})(),el=(()=>{let e=[];for(let t=1;t<=7;t++){let s={week:`Week ${t}`};es.forEach(e=>{s[Q(e)]=0}),e.push(s)}return n.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Week (\d+)/);if(a){let r=`Week ${a[1]}`,l=e.find(e=>e.week===r);l&&(l[s]=t.active_users)}}),e})(),ei=(()=>{let e=[];for(let t=1;t<=7;t++){let s={month:`Month ${t}`};ea.forEach(e=>{s[Q(e)]=0}),e.push(s)}return _.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Month (\d+)/);if(a){let r=`Month ${a[1]}`,l=e.find(e=>e.month===r);l&&(l[s]=t.active_users)}}),e})(),en=(e,t=0)=>{if(e>=1e8||e>=1e7)return(e/1e6).toFixed(t)+"M";if(e>=1e6)return(e/1e6).toFixed(t)+"M";if(e>=1e4)return(e/1e3).toFixed(t)+"K";if(e>=1e3)return(e/1e3).toFixed(t)+"K";else return e.toFixed(t)};return(0,t.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Title,{children:"Summary by User Agent"}),(0,t.jsx)(z.Subtitle,{children:"Performance metrics for different user agents"})]}),(0,t.jsxs)("div",{className:"w-96",children:[(0,t.jsx)(f.Text,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"All User Agents",value:L,onChange:D,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:A,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:S.map(e=>{let s=Q(e),a=s.length>50?`${s.substring(0,50)}...`:s;return(0,t.jsx)(k.Select.Option,{value:e,label:a,title:s,children:a},e)})})]})]}),I?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4",children:[(b.results||[]).slice(0,4).map((e,s)=>{let a=Q(e.tag),r=a.length>15?a.substring(0,15)+"...":a;return(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(v.Tooltip,{title:a,placement:"top",children:(0,t.jsx)(j.Title,{className:"truncate",children:r})}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(W,{className:"text-lg",children:en(e.successful_requests)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(W,{className:"text-lg",children:en(e.total_tokens)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsxs)(W,{className:"text-lg",children:["$",en(e.total_spend,4)]})]})]})]},s)}),Array.from({length:Math.max(0,4-(b.results||[]).length)}).map((e,s)=>(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"No Data"}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]})]})]},`empty-${s}`))]})]})}),(0,t.jsx)(c.Card,{children:(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU/WAU/MAU"}),(0,t.jsx)(m.Tab,{children:"Per User Usage (Last 30 Days)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"DAU, WAU & MAU per Agent"}),(0,t.jsx)(z.Subtitle,{children:"Active users across different time periods"})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU"}),(0,t.jsx)(m.Tab,{children:"WAU"}),(0,t.jsx)(m.Tab,{children:"MAU"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),E?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:er,index:"date",categories:et.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),$?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:el,index:"week",categories:es.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),R?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:ei,index:"month",categories:ea.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(X,{accessToken:e,selectedTags:L,formatAbbreviatedNumber:en})})]})]})})]})};var et=e.i(617802);let es=["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"],ea={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}};function er({fetchFn:e,args:t,enabled:s}){let[a,r]=(0,T.useState)(ea),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),[c,d]=(0,T.useState)({currentPage:0,totalPages:0}),[u,m]=(0,T.useState)(!1),x=(0,T.useRef)(0),h=(0,T.useRef)(!1),p=(0,T.useRef)(null),g=(0,T.useRef)(t);g.current=t;let f=JSON.stringify(t),j=(0,T.useCallback)(()=>{h.current=!0,m(!0),o(!1),null!==p.current&&(clearTimeout(p.current),p.current=null)},[]);return(0,T.useEffect)(()=>{if(!s){r(ea),i(!1),o(!1),d({currentPage:0,totalPages:0}),m(!1);return}let t=++x.current;h.current=!1,m(!1);let a=()=>x.current!==t||h.current,l=e=>new Promise(t=>{p.current=setTimeout(()=>{p.current=null,t()},e)});return(async()=>{let t=g.current;i(!0),o(!1),d({currentPage:1,totalPages:1});try{let s=[...t.slice(0,3),1,...t.slice(3)],n=await e(...s);if(a())return;r(n);let c=n.metadata?.total_pages||1;if(d({currentPage:1,totalPages:c}),c<=1)return void i(!1);i(!1),o(!0);let u=[...n.results],m={...n.metadata};for(let s=2;s<=c;s++){if(a()||(await l(300),a()))return;let i=[...t.slice(0,3),s,...t.slice(3)],n=await e(...i);if(a())return;u=[...u,...n.results],(m=function(e,t){let s={...e};for(let a of es)s[a]=(e[a]||0)+(t[a]||0);return s}(m,n.metadata)).total_pages=c,m.has_more=s{x.current++,null!==p.current&&(clearTimeout(p.current),p.current=null)}},[s,e,f]),{data:a,loading:l,isFetchingMore:n,progress:c,cancelled:u,cancel:j}}var el=e.i(23371),ei=e.i(286718);let en=({endpointData:e})=>{let s=e||{},a=T.default.useMemo(()=>Object.entries(s).map(([e,t])=>({endpoint:e,"metrics.successful_requests":t.metrics.successful_requests,"metrics.failed_requests":t.metrics.failed_requests,metrics:{successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests}})),[s]);return(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(j.Title,{children:"Success vs Failed Requests by Endpoint"}),(0,t.jsx)(ei.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,t.jsx)(o.BarChart,{className:"mt-4",data:a,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:ei.CustomTooltip,showLegend:!1,stack:!0,yAxisWidth:60})]})};var eo=e.i(731195),ec=e.i(883966),ed=e.i(555706),eu=e.i(785183),em=e.i(93230),ex=e.i(844171),eh=(0,ec.generateCategoricalChart)({chartName:"LineChart",GraphicalChild:ed.Line,axisComponents:[{axisType:"xAxis",AxisComp:eu.XAxis},{axisType:"yAxis",AxisComp:em.YAxis}],formatAxisMap:ex.formatAxisMap}),ep=e.i(872526),eg=e.i(800494),ef=e.i(234239),ej=e.i(559559),e_=e.i(238279),ey=e.i(114887),eb=e.i(933303),ek=e.i(628781),ev=e.i(472007),eN=e.i(480731);let eT=T.default.forwardRef((e,t)=>{let{data:s=[],categories:a=[],index:r,colors:l=V.themeColorRange,valueFormatter:i=B.defaultValueFormatter,startEndOnly:n=!1,showXAxis:o=!0,showYAxis:c=!0,yAxisWidth:d=56,intervalType:u="equidistantPreserveStart",animationDuration:m=900,showAnimation:x=!1,showTooltip:h=!0,showLegend:p=!0,showGridLines:g=!0,autoMinValue:f=!1,curveType:j="linear",minValue:_,maxValue:y,connectNulls:b=!1,allowDecimals:k=!0,noDataText:v,className:N,onValueChange:C,enableLegendSlider:w=!1,customTooltip:S,rotateLabelX:q,padding:L=o||c?{left:20,right:20}:{left:0,right:0},tickGap:D=5,xAxisLabel:A,yAxisLabel:M}=e,E=(0,R.__rest)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[O,F]=(0,T.useState)(60),[$,U]=(0,T.useState)(void 0),[P,W]=(0,T.useState)(void 0),z=(0,ev.constructCategoryColors)(a,l),K=(0,ev.getYAxisDomain)(f,_,y),Y=!!C;function H(e){Y&&(e===P&&!$||(0,ev.hasOnlyOneValueForThisKey)(s,e)&&$&&$.dataKey===e?(W(void 0),null==C||C(null)):(W(e),null==C||C({eventType:"category",categoryClicked:e})),U(void 0))}return T.default.createElement("div",Object.assign({ref:t,className:(0,I.tremorTwMerge)("w-full h-80",N)},E),T.default.createElement(eo.ResponsiveContainer,{className:"h-full w-full"},(null==s?void 0:s.length)?T.default.createElement(eh,{data:s,onClick:Y&&(P||$)?()=>{U(void 0),W(void 0),null==C||C(null)}:void 0,margin:{bottom:A?30:void 0,left:M?20:void 0,right:M?5:void 0,top:5}},g?T.default.createElement(ep.CartesianGrid,{className:(0,I.tremorTwMerge)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,T.default.createElement(eu.XAxis,{padding:L,hide:!o,dataKey:r,interval:n?"preserveStartEnd":u,tick:{transform:"translate(0, 6)"},ticks:n?[s[0][r],s[s.length-1][r]]:void 0,fill:"",stroke:"",className:(0,I.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:D,angle:null==q?void 0:q.angle,dy:null==q?void 0:q.verticalShift,height:null==q?void 0:q.xAxisHeight},A&&T.default.createElement(eg.Label,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},A)),T.default.createElement(em.YAxis,{width:d,hide:!c,axisLine:!1,tickLine:!1,type:"number",domain:K,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,I.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:i,allowDecimals:k},M&&T.default.createElement(eg.Label,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},M)),T.default.createElement(ef.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:h?({active:e,payload:t,label:s})=>S?T.default.createElement(S,{payload:null==t?void 0:t.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!=(t=z.get(e.dataKey))?t:eN.BaseColors.Gray})}),active:e,label:s}):T.default.createElement(eb.default,{active:e,payload:t,label:s,valueFormatter:i,categoryColors:z}):T.default.createElement(T.default.Fragment,null),position:{y:0}}),p?T.default.createElement(ej.Legend,{verticalAlign:"top",height:O,content:({payload:e})=>(0,ey.default)({payload:e},z,F,P,Y?e=>H(e):void 0,w)}):null,a.map(e=>{var t;return T.default.createElement(ed.Line,{className:(0,I.tremorTwMerge)((0,B.getColorClassNames)(null!=(t=z.get(e))?t:eN.BaseColors.Gray,V.colorPalette.text).strokeColor),strokeOpacity:$||P&&P!==e?.3:1,activeDot:e=>{var t;let{cx:a,cy:r,stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,dataKey:c}=e;return T.default.createElement(e_.Dot,{className:(0,I.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,B.getColorClassNames)(null!=(t=z.get(c))?t:eN.BaseColors.Gray,V.colorPalette.text).fillColor),cx:a,cy:r,r:5,fill:"",stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,onClick:(t,a)=>{a.stopPropagation(),Y&&(e.index===(null==$?void 0:$.index)&&e.dataKey===(null==$?void 0:$.dataKey)||(0,ev.hasOnlyOneValueForThisKey)(s,e.dataKey)&&P&&P===e.dataKey?(W(void 0),U(void 0),null==C||C(null)):(W(e.dataKey),U({index:e.index,dataKey:e.dataKey}),null==C||C(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var a;let{stroke:r,strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,cx:o,cy:c,dataKey:d,index:u}=t;return(0,ev.hasOnlyOneValueForThisKey)(s,e)&&!($||P&&P!==e)||(null==$?void 0:$.index)===u&&(null==$?void 0:$.dataKey)===e?T.default.createElement(e_.Dot,{key:u,cx:o,cy:c,r:5,stroke:r,fill:"",strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,className:(0,I.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,B.getColorClassNames)(null!=(a=z.get(d))?a:eN.BaseColors.Gray,V.colorPalette.text).fillColor)}):T.default.createElement(T.Fragment,{key:u})},key:e,name:e,type:j,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:x,animationDuration:m,connectNulls:b})}),C?a.map(e=>T.default.createElement(ed.Line,{className:(0,I.tremorTwMerge)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:j,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:b,onClick:(e,t)=>{t.stopPropagation();let{name:s}=e;H(s)}})):null):T.default.createElement(ek.default,{noDataText:v})))});eT.displayName="LineChart";let eC=function({dailyData:e,endpointData:s}){let a=(0,T.useMemo)(()=>{var t;let s,a;return e?.results&&0!==e.results.length?(t=e.results,s=[],a=new Set,t.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>a.add(e))}),t.forEach(e=>{let t={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};a.forEach(s=>{let a=e.breakdown.endpoints?.[s];t[s]=a?.metrics.api_requests||0}),s.push(t)}),s.reverse()):[]},[e]),r=(0,T.useMemo)(()=>0===a.length?[]:Object.keys(a[0]).filter(e=>"date"!==e),[a]);return(0,t.jsxs)(c.Card,{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)(j.Title,{children:"Endpoint Usage Trends"})}),(0,t.jsx)(eT,{className:"h-80",data:a,index:"date",categories:r,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,r.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})]})};var ew=e.i(291542),eS=e.i(309821);e.s(["Progress",()=>eS.default],497650);var eS=eS;let eq=({endpointData:e})=>{let s=Object.entries(e).map(([e,t])=>{var s,a;return{key:e,endpoint:e,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,api_requests:t.metrics.api_requests,total_tokens:t.metrics.total_tokens,spend:t.metrics.spend,successRate:(s=t.metrics.successful_requests,0===(a=t.metrics.api_requests)?0:s/a*100)}}),a=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,s)=>{let a=s.api_requests>0?s.successful_requests/s.api_requests*100:0,r=s.api_requests>0?s.failed_requests/s.api_requests*100:0,l={"0%":"#22c55e"};return a>0&&a<100&&(l[`${a}%`]="#22c55e",l[`${a+.01}%`]="#ef4444"),l["100%"]=r>0?"#ef4444":"#22c55e",(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"flex-1 relative",children:(0,t.jsx)(eS.default,{percent:a+r,size:"small",strokeColor:l,showInfo:!1})}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,t.jsx)("span",{className:"text-green-600 font-medium",children:s.successful_requests.toLocaleString()}),(0,t.jsx)("span",{className:"text-gray-400",children:"/"}),(0,t.jsx)("span",{className:"text-red-600 font-medium",children:s.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 s=e.toFixed(2);return(0,t.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[s,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`}];return(0,t.jsx)(ew.Table,{columns:a,dataSource:s,pagination:!1})},eL=({userSpendData:e})=>{let s=(0,T.useMemo)(()=>{let t={};return e?.results&&e.results.forEach(e=>{Object.entries(e.breakdown.endpoints||{}).forEach(([e,s])=>{t[e]||(t[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:s.metadata||{},api_key_breakdown:{}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.prompt_tokens+=s.metrics.prompt_tokens,t[e].metrics.completion_tokens+=s.metrics.completion_tokens,t[e].metrics.total_tokens+=s.metrics.total_tokens,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests||0,t[e].metrics.failed_requests+=s.metrics.failed_requests||0,t[e].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,t[e].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),t},[e]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(eq,{endpointData:s}),(0,t.jsx)(en,{endpointData:s}),(0,t.jsx)(eC,{dailyData:e,endpointData:s})]})};var eD=e.i(214541),eA=e.i(413990),eM=e.i(785242);let{Text:eE}=N.Typography,eO=({value:e=[],onChange:s,disabled:a,organizationId:r,pageSize:i=20,placeholder:o="Search teams by alias..."})=>{let[c,d]=(0,T.useState)(""),[u,m]=(0,n.useDebouncedState)("",{wait:300}),{data:x,fetchNextPage:h,hasNextPage:p,isFetchingNextPage:g,isLoading:f}=(0,eM.useInfiniteTeams)(i,u||void 0,r),j=(0,T.useMemo)(()=>{if(!x?.pages)return[];let e=new Set,t=[];for(let s of x.pages)for(let a of s.teams)e.has(a.team_id)||(e.add(a.team_id),t.push(a));return t},[x]);return(0,t.jsx)(k.Select,{mode:"multiple",showSearch:!0,placeholder:o,value:e,onChange:e=>s?.(e),disabled:a,allowClear:!0,filterOption:!1,onSearch:e=>{d(e),m(e)},searchValue:c,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&p&&!g&&h()},loading:f,notFoundContent:f?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No teams found",style:{width:"100%"},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]}),children:j.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(eE,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})};var eF=e.i(193523),eF=eF,e$=e.i(916925),eU=e.i(1023),eP=e.i(149121);function eR({topModels:e,topModelsLimit:s,setTopModelsLimit:a}){let[r,l]=(0,T.useState)("table"),i=[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>{let t=e.getValue();return`$${(0,D.formatNumberWithCommas)(t,2)}`}},{header:"Successful",accessorKey:"successful_requests",cell:e=>(0,t.jsx)("span",{className:"text-green-600",children:e.getValue()?.toLocaleString()||0})},{header:"Failed",accessorKey:"failed_requests",cell:e=>(0,t.jsx)("span",{className:"text-red-600",children:e.getValue()?.toLocaleString()||0})},{header:"Tokens",accessorKey:"tokens",cell:e=>e.getValue()?.toLocaleString()||0}],n=e.slice(0,s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:s,onChange:e=>a(e)}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>l("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,t.jsx)("button",{onClick:()=>l("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===r?(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,t.jsx)(o.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(n.length,s)},data:n,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,t.jsx)(eP.DataTable,{columns:i,data:n,renderSubComponent:()=>(0,t.jsx)(t.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})})]})}let eV={tag:F.tagDailyActivityCall,team:F.teamDailyActivityCall,organization:F.organizationDailyActivityCall,customer:F.customerDailyActivityCall,agent:F.agentDailyActivityCall,user:F.userDailyActivityCall},eI=({accessToken:e,entityType:s,entityId:r,entityList:i,dateValue:n})=>{let b,k,v,{teams:N}=(0,eD.default)(),[C,w]=(0,T.useState)([]),[S,q]=(0,T.useState)(5),[L,A]=(0,T.useState)(5),[E,O]=(0,T.useState)(5),$=(0,T.useMemo)(()=>n.from?new Date(n.from):null,[n.from]),U=(0,T.useMemo)(()=>n.to?new Date(n.to):null,[n.to]),P=(0,T.useMemo)(()=>"user"===s?C.length>0?C[0]:null:C.length>0?C:null,[s,C]),R=eV[s],V=!!e&&!!$&&!!U,{data:I,isFetchingMore:B,progress:W,cancelled:Q,cancel:X}=er({fetchFn:R,args:[e,$,U,P],enabled:V}),{data:ee,isFetchingMore:et,progress:es,cancelled:ea,cancel:ei}=er({fetchFn:F.agentDailyActivityCall,args:[e,$,U,null],enabled:V&&"team"===s}),en=(0,M.processActivityData)(I,"models",N||[]),eo=(0,M.processActivityData)(I,"api_keys",N||[]),ec="team"===s?(0,M.processActivityData)(ee,"entities",N||[]):{},ed=()=>{let e={};return I.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={provider:t,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=s.metrics.spend,e[t].requests+=s.metrics.api_requests,e[t].successful_requests+=s.metrics.successful_requests,e[t].failed_requests+=s.metrics.failed_requests,e[t].tokens+=s.metrics.total_tokens}catch(e){console.error(`Error processing provider ${t}: ${e}`)}})}),Object.values(e).filter(e=>e.spend>0).sort((e,t)=>t.spend-e.spend)},eu=(e,t)=>{if(i){let t=i.find(t=>t.value===e);if(t)return t.label}return t?.team_alias?t.team_alias:e},em=()=>{var e;let t={};return I.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,s])=>{t[e]||(t[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:eu(e,s.metadata),id:e}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests,t[e].metrics.failed_requests+=s.metrics.failed_requests,t[e].metrics.total_tokens+=s.metrics.total_tokens})}),e=Object.values(t).sort((e,t)=>t.metrics.spend-e.metrics.spend),0===C.length?e:e.filter(e=>C.includes(e.metadata.id))},ex=s.charAt(0).toUpperCase()+s.slice(1);return(0,t.jsxs)("div",{style:{width:"100%"},className:"relative",children:[B&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",W.currentPage," / ",W.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:X,children:"Stop"})]})}),Q&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",W.currentPage,"/",W.totalPages," pages loaded)"]})}),et&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:ei,children:"Stop"})]})}),ea&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial agent data (",es.currentPage,"/",es.totalPages," pages loaded)"]})}),"team"===s&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by team"}),(0,t.jsx)(eO,{value:C,onChange:w})]}),(0,t.jsx)(eF.default,{dateValue:n,entityType:s,spendData:I,showFilters:"team"!==s&&null!==i&&i.length>0,filterLabel:`Filter by ${s}`,filterPlaceholder:`Select ${s} to filter...`,selectedFilters:C,onFiltersChange:w,filterOptions:(()=>{if(i)return i})()||void 0,filterMode:"user"===s?"single":"multiple",teams:N||[]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"agent"===s?"Request / Token Consumption":"Model Activity"}),"team"===s?(0,t.jsx)(m.Tab,{children:"Agent Activity"}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)(j.Title,{children:[ex," Spend Overview"]}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Spend"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)(I.metadata.total_spend,2)]})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:I.metadata.total_api_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:I.metadata.total_successful_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:I.metadata.total_failed_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:I.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),(0,t.jsx)(o.BarChart,{data:[...I.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload,r=Object.keys(a.breakdown.entities||{}).length;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",a.metrics.total_tokens]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total ",ex,"s: ",r]}),(0,t.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,t.jsxs)("p",{className:"font-semibold",children:["Spend by ",ex,":"]}),Object.entries(a.breakdown.entities||{}).sort(([,e],[,t])=>{let s=e.metrics.spend;return t.metrics.spend-s}).slice(0,5).map(([e,s])=>(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:[eu(e,s.metadata),": $",(0,D.formatNumberWithCommas)(s.metrics.spend,2)]},e)),r>5&&(0,t.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",r-5," more"]})]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,t.jsxs)(j.Title,{children:["Spend Per ",ex]}),(0,t.jsx)(z.Subtitle,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,t.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,t.jsxs)("span",{children:["Get Started by Tracking cost per ",ex," "]}),(0,t.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,t.jsxs)(u.Grid,{numItems:2,className:"gap-6",children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(o.BarChart,{className:"mt-4 h-52",data:em().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:el.valueFormatterSpend,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.metadata.alias}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,4)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.metrics.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.metrics.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens.toLocaleString()]})]})}})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:ex}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:em().filter(e=>e.metrics.spend>0).map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:e.metadata.alias}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.metrics.spend,4)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:(console.log("debugTags",{spendData:I}),b={},I.results.forEach(e=>{let{breakdown:t}=e,{entities:s}=t;console.log("debugTags",{entities:s});let a=Object.keys(s).reduce((e,t)=>{let{api_key_breakdown:a}=s[t];return Object.keys(a).forEach(s=>{let r={tag:t,usage:a[s].metrics.spend};e[s]?e[s].push(r):e[s]=[r]}),e},{});console.log("debugTags",{tagDictionary:a}),Object.entries(e.breakdown.api_keys||{}).forEach(([e,t])=>{b[e]||(b[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:t.metadata.key_alias,team_id:t.metadata.team_id||null,tags:a[e]||[]}},console.log("debugTags",{keySpend:b})),b[e].metrics.spend+=t.metrics.spend,b[e].metrics.prompt_tokens+=t.metrics.prompt_tokens,b[e].metrics.completion_tokens+=t.metrics.completion_tokens,b[e].metrics.total_tokens+=t.metrics.total_tokens,b[e].metrics.api_requests+=t.metrics.api_requests,b[e].metrics.successful_requests+=t.metrics.successful_requests,b[e].metrics.failed_requests+=t.metrics.failed_requests,b[e].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,b[e].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(b).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||"-",spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,S)),teams:null,showTags:"tag"===s,topKeysLimit:S,setTopKeysLimit:q})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"agent"===s?"Top Agents":"Top Models"}),(0,t.jsx)(eR,{topModels:(k={},I.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,t])=>{k[e]||(k[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{k[e].spend+=t.metrics.spend}catch(s){console.error(`Error adding spend for ${e}: ${s}, got metrics: ${JSON.stringify(t)}`)}k[e].requests+=t.metrics.api_requests,k[e].successful_requests+=t.metrics.successful_requests,k[e].failed_requests+=t.metrics.failed_requests,k[e].tokens+=t.metrics.total_tokens})}),Object.entries(k).map(([e,t])=>({key:e,...t})).sort((e,t)=>t.spend-e.spend).slice(0,L)),topModelsLimit:L,setTopModelsLimit:A})]})}),"team"===s&&(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Agents Driving Spend"}),(0,t.jsx)(eR,{topModels:(v={},ee.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,t])=>{v[e]||(v[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0,agent_name:t.metadata?.agent_name||e}),v[e].spend+=t.metrics.spend,v[e].requests+=t.metrics.api_requests,v[e].successful_requests+=t.metrics.successful_requests,v[e].failed_requests+=t.metrics.failed_requests,v[e].tokens+=t.metrics.total_tokens})}),Object.entries(v).map(([e,t])=>({key:t.agent_name,...t})).sort((e,t)=>t.spend-e.spend).slice(0,E)),topModelsLimit:E,setTopModelsLimit:O})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsx)(j.Title,{children:"Provider Usage"}),(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:ed(),index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan","blue","indigo","violet","purple"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:ed().map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)("img",{src:(0,e$.getProviderLogoAndName)(e.provider).logo,alt:`${e.provider} logo`,className:"w-4 h-4",onError:t=>{let s=t.target,a=s.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.provider?.charAt(0)||"-",a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:en,hidePromptCachingMetrics:"agent"===s})}),"team"===s?(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:ec})}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:eo,hidePromptCachingMetrics:"agent"===s})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:I})})]})]})]})};var eB=e.i(793130),eW=e.i(418371);let ez=({loading:e,isDateChanging:s,providerSpend:a})=>{let[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),m=a.filter(e=>e.provider?.toLowerCase()==="unknown"?n:!!l||e.spend>0);return(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(j.Title,{children:"Spend by Provider"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Zero Spend"}),(0,t.jsx)(eB.Switch,{checked:l,onChange:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Unknown"}),(0,t.jsx)(v.Tooltip,{title:"Requests that failed to route to a provider",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(eB.Switch,{checked:n,onChange:o})]})]})]}),e?(0,t.jsx)(P,{isDateChanging:s}):(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:m,index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:m.map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)(eW.ProviderLogo,{provider:e.provider,className:"w-4 h-4"}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})};var eK=e.i(311451),eY=e.i(482725),eH=e.i(918789);let{TextArea:eG}=eK.Input,eZ={get_usage_data:"📊",get_team_usage_data:"👥",get_tag_usage_data:"🏷️"},eJ=({step:e})=>{let s=eZ[e.tool_name]||"🔧",a=e.arguments,r=a.start_date&&a.end_date?`${a.start_date} → ${a.end_date}`:"",l=a.team_ids||a.tags||a.user_id||"";return(0,t.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,t.jsx)("span",{className:"flex-shrink-0 mt-0.5",children:"running"===e.status?(0,t.jsx)(eY.Spin,{size:"small"}):"error"===e.status?(0,t.jsx)("span",{className:"text-red-500",children:"✗"}):(0,t.jsx)("span",{className:"text-green-600",children:"✓"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"font-medium text-gray-700",children:[s," ",e.tool_label]}),r&&(0,t.jsx)("div",{className:"text-gray-500 mt-0.5",children:r}),l&&(0,t.jsxs)("div",{className:"text-gray-500 mt-0.5",children:["Filter: ",l]}),"error"===e.status&&e.error&&(0,t.jsx)("div",{className:"text-red-600 mt-0.5",children:e.error})]})]})},eQ=({content:e})=>(0,t.jsx)(eH.default,{components:{p:({children:e})=>(0,t.jsx)("p",{className:"mb-2 last:mb-0",children:e}),strong:({children:e})=>(0,t.jsx)("strong",{className:"font-semibold",children:e}),ul:({children:e})=>(0,t.jsx)("ul",{className:"list-disc pl-4 mb-2 space-y-0.5",children:e}),ol:({children:e})=>(0,t.jsx)("ol",{className:"list-decimal pl-4 mb-2 space-y-0.5",children:e}),li:({children:e})=>(0,t.jsx)("li",{children:e}),h1:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h2:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h3:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),code:({children:e,className:s})=>s?.includes("language-")?(0,t.jsx)("pre",{className:"bg-gray-100 rounded p-2 my-1 overflow-x-auto text-xs",children:(0,t.jsx)("code",{children:e})}):(0,t.jsx)("code",{className:"px-1 py-0.5 rounded bg-gray-100 text-xs font-mono",children:e}),table:({children:e})=>(0,t.jsx)("div",{className:"overflow-x-auto my-2",children:(0,t.jsx)("table",{className:"text-xs border-collapse w-full",children:e})}),th:({children:e})=>(0,t.jsx)("th",{className:"border border-gray-200 px-2 py-1 bg-gray-50 font-medium text-left",children:e}),td:({children:e})=>(0,t.jsx)("td",{className:"border border-gray-200 px-2 py-1",children:e})},children:e}),eX=({open:e,onClose:s,accessToken:a})=>{let[r,l]=(0,T.useState)([]),[i,n]=(0,T.useState)(""),[o,c]=(0,T.useState)(!1),[d,u]=(0,T.useState)(void 0),[m,x]=(0,T.useState)([]),[h,p]=(0,T.useState)(!1),[g,f]=(0,T.useState)(""),[j,_]=(0,T.useState)(null),[b,v]=(0,T.useState)([]),N=(0,T.useRef)(null),C=(0,T.useRef)(null);(0,T.useEffect)(()=>{e&&0===m.length&&w()},[e]),(0,T.useEffect)(()=>{"function"==typeof N.current?.scrollIntoView&&N.current.scrollIntoView({behavior:"smooth"})},[r,g,b,j]);let w=async()=>{if(a){p(!0);try{let e=await (0,F.modelHubCall)(a);if(e?.data?.length>0){let t=e.data.map(e=>e.model_group).sort();x(t)}}catch(e){console.error("Failed to load models:",e)}finally{p(!1)}}},S=async()=>{if(!a||!i.trim()||o)return;let e=[...r,{role:"user",content:i.trim()}];l(e),n(""),c(!0),f(""),_(null),v([]);let t=new AbortController;C.current=t;let s="",u=[];try{await (0,F.usageAiChatStream)(a,e.slice(-20).map(e=>({role:e.role,content:e.content})),d||"",e=>{_(null),s+=e,f(s)},()=>{_(null),v([]),l(e=>[...e,{role:"assistant",content:s,toolCalls:u.length>0?[...u]:void 0}]),f("")},e=>{_(null),v([]),l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")},e=>{_(e)},e=>{let t=u.findIndex(t=>t.tool_name===e.tool_name);t>=0?u[t]={...e}:u.push({...e}),v([...u])},t.signal)}catch(s){if(s?.name==="AbortError"||t.signal.aborted)return;let e=s?.message||"Failed to get response. Please try again.";l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")}finally{c(!1),C.current=null}};return(0,t.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,t.jsxs)("div",{className:"px-5 pt-5 pb-3 border-b border-gray-100 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-blue-600",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.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,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"Ask AI"})]}),(0,t.jsx)("button",{onClick:()=>{C.current&&C.current.abort(),s()},className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100",children:(0,t.jsx)("svg",{className:"w-5 h-5",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.jsx)("p",{className:"text-xs text-gray-500",children:"Ask about your spend, models, keys, and trends"})]}),(0,t.jsx)("div",{className:"px-5 py-3 border-b border-gray-100 flex-shrink-0",children:(0,t.jsx)(k.Select,{placeholder:"Select a model (optional, defaults to gpt-4o-mini)",value:d,onChange:e=>u(e),loading:h,showSearch:!0,allowClear:!0,size:"small",className:"w-full",options:m.map(e=>({label:e,value:e})),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-gray-50",children:[0===r.length&&!g&&!o&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[(0,t.jsx)("svg",{className:"w-8 h-8 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.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,t.jsx)("p",{className:"text-sm font-medium",children:"Ask a question about your usage"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:'e.g. "Which model costs me the most?"'})]}),r.map((e,s)=>(0,t.jsx)("div",{children:"user"===e.role?(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.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,t.jsxs)("div",{className:"space-y-2",children:[e.toolCalls&&e.toolCalls.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:e.toolCalls.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),(0,t.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,t.jsx)(eQ,{content:e.content})})]})},s)),o&&b.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:b.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),o&&!g&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-gray-500",children:[(0,t.jsx)(eY.Spin,{size:"small"}),(0,t.jsx)("span",{className:"italic",children:j||"Thinking..."})]}),g&&(0,t.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,t.jsx)(eQ,{content:g})}),(0,t.jsx)("div",{ref:N})]}),(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-gray-200 bg-white flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(eG,{value:i,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),S())},placeholder:"Ask about your usage...",autoSize:{minRows:1,maxRows:3},className:"flex-1",disabled:o}),(0,t.jsx)(y.Button,{type:"primary",onClick:S,disabled:!i.trim()||o,loading:o,children:"Send"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,t.jsx)("button",{onClick:()=>{l([]),f(""),v([]),_(null)},className:"text-xs text-gray-400 hover:text-gray-600 transition-colors",disabled:0===r.length,children:"Clear chat"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Enter to send"})]})]})]})};var e0=e.i(299251),e1=e.i(153702),e2=e.i(160818),e5=e.i(777579),e4=e.i(983561);e.i(247167);var e6=e.i(931067);let e3={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 e7=e.i(9583),e9=T.forwardRef(function(e,t){return T.createElement(e7.default,(0,e6.default)({},e,{ref:t,icon:e3}))}),e8=e.i(232164),te=e.i(645526),tt=e.i(771674),ts=e.i(906579);let ta=[{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,t.jsx)(e2.GlobalOutlined,{style:{fontSize:"16px"}})},{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,t.jsx)(e0.BankOutlined,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,t.jsx)(te.TeamOutlined,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,t.jsx)(e9,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,t.jsx)(e8.TagsOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,t.jsx)(e4.RobotOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user",label:"User Usage",description:"View usage by individual users",icon:(0,t.jsx)(tt.UserOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,t.jsx)(e5.LineChartOutlined,{style:{fontSize:"16px"}}),adminOnly:!0}],tr=({value:e,onChange:s,isAdmin:a,title:r="Usage View",description:l="Select the usage data you want to view","data-id":i})=>{let n=ta.filter(e=>!e.adminOnly||!!a).map(e=>{let t=e.label,s=e.description;return e.showForAdmin&&e.showForNonAdmin&&(t=a?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(s=a?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:t,description:s,icon:e.icon,badgeText:e.badgeText}});return(0,t.jsx)("div",{className:"w-full","data-id":i,children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,t.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,t.jsx)("div",{className:"flex-shrink-0 flex items-center",children:(0,t.jsx)(e1.BarChartOutlined,{style:{fontSize:"32px"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:r}),(0,t.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:l})]})]}),(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)(k.Select,{value:e,onChange:s,className:"w-54 sm:w-64 md:w-72",size:"large",options:n.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:s.icon}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.label}),(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:s.description})]}),s.badgeText&&(0,t.jsx)("div",{className:"items-center",children:(0,t.jsx)(ts.Badge,{color:"blue",count:s.badgeText})})]}):e.label},labelRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:s.icon}),(0,t.jsx)("span",{className:"text-sm",children:s.label})]}):e.label}})})]})})};e.s(["default",0,({teams:e,organizations:U})=>{let R,{accessToken:V,userRole:I,userId:B,premiumUser:W}=(0,S.default)(),[z,K]=(0,T.useState)(null),[Y,H]=(0,T.useState)(!1),[G,Z]=(0,T.useState)(!1),[J,Q]=(0,T.useState)(!1),X=(0,T.useMemo)(()=>new Date(Date.now()-6048e5),[]),es=(0,T.useMemo)(()=>new Date,[]),[ea,ei]=(0,T.useState)({from:X,to:es}),[en,eo]=(0,T.useState)([]),{data:ec=[]}=(0,w.useCustomers)(),{data:ed}=(0,C.useAgents)(),{data:eu}=(0,q.useCurrentUser)();console.log(`currentUser: ${JSON.stringify(eu)}`),console.log(`currentUser max budget: ${eu?.max_budget}`);let em=A.all_admin_roles.includes(I||""),[ex,eh]=(0,T.useState)(""),[ep,eg]=(0,n.useDebouncedState)("",{wait:300}),{data:ef,fetchNextPage:ej,hasNextPage:e_,isFetchingNextPage:ey,isLoading:eb}=(0,L.useInfiniteUsers)(50,ep||void 0),ek=(0,T.useMemo)(()=>{if(!ef?.pages)return[];let e=new Set,t=[];for(let s of ef.pages)for(let a of s.users)e.has(a.user_id)||(e.add(a.user_id),t.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 t},[ef]),[ev,eN]=(0,T.useState)(em?null:B||null),[eT,eC]=(0,T.useState)("groups"),[ew,eS]=(0,T.useState)(!1),[eq,eD]=(0,T.useState)(!1),[eA,eM]=(0,T.useState)(!1),[eE,eO]=(0,T.useState)("global"),[eF,e$]=(0,T.useState)(!0),[eP,eR]=(0,T.useState)(5),[eV,eB]=(0,T.useState)(5),[eW,eK]=(0,T.useState)(!1),eY=async()=>{V&&eo(Object.values(await (0,F.tagListCall)(V)).map(e=>({label:e.name,value:e.name})))};(0,T.useEffect)(()=>{eY()},[V]),(0,T.useEffect)(()=>{!em&&B&&eN(B)},[em,B]);let eH=em?ev:B||null,eG=(0,T.useMemo)(()=>ea.from?new Date(ea.from):null,[ea.from]),eZ=(0,T.useMemo)(()=>ea.to?new Date(ea.to):null,[ea.to]),eJ=(0,T.useRef)(0);(0,T.useEffect)(()=>{if(!V||!eG||!eZ)return;let e=++eJ.current;Z(!0),H(!1),K(null),(0,F.userDailyActivityAggregatedCall)(V,eG,eZ,eH).then(t=>{eJ.current===e&&(K(t),Z(!1),Q(!1))}).catch(()=>{eJ.current===e&&(H(!0),Z(!1))})},[V,eG,eZ,eH]);let eQ=er({fetchFn:F.userDailyActivityCall,args:[V,eG,eZ,eH],enabled:Y&&!!V&&!!eG&&!!eZ}),e0=(0,T.useMemo)(()=>z||(Y?eQ.data:{results:[],metadata:{}}),[z,Y,eQ.data]),e1=G||eQ.loading;(0,T.useEffect)(()=>{Y&&!eQ.loading&&eQ.data.results.length>0&&Q(!1)},[Y,eQ.loading,eQ.data.results.length]);let e2=(0,T.useCallback)(e=>{Q(!0),ei(e)},[]),e5=e0.metadata?.total_spend||0,e4=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.models||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e6=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.model_groups||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e3=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({provider:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}))},[e0.results]),e7=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.api_keys||{}).forEach(([t,s])=>{e[t]||(e[t]={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:null,tags:s.metadata.tags||[]}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests,e[t].metrics.failed_requests+=s.metrics.failed_requests,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||[],spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,eP)},[e0.results,eP]),e9=(0,T.useMemo)(()=>[...e0.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),[e0.results]),e8=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"models",e),[e0,e]),te=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"api_keys",e),[e0,e]),tt=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"mcp_servers",e),[e0,e]);return(0,t.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,t.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,t.jsx)(tr,{value:eE,onChange:e=>eO(e),isAdmin:em}),(0,t.jsx)($.default,{value:ea,onValueChange:e2})]}),eQ.isFetchingMore&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",eQ.progress.currentPage," /"," ",eQ.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:eQ.cancel,children:"Stop"})]})}),eQ.cancelled&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",eQ.progress.currentPage,"/",eQ.progress.totalPages," ","pages loaded)"]})}),"global"===eE&&(0,t.jsxs)(t.Fragment,{children:[em&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by user"}),(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!0,style:{width:"100%"},placeholder:"Select user to filter...",value:ev,onChange:e=>eN(e??null),filterOption:!1,onSearch:e=>{eh(e),eg(e)},searchValue:ex,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&e_&&!ey&&ej()},loading:eb,notFoundContent:eb?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No users found",options:ek,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,ey&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]})})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"Model Activity"}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"MCP Server Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Button,{onClick:()=>eM(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.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,t.jsx)(y.Button,{onClick:()=>eD(!0),icon:(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:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsxs)(d.Col,{numColSpan:2,children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mt-2 mb-2",children:(0,t.jsxs)(f.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content text-lg",children:["Project Spend"," ",ea.from&&ea.to&&(0,t.jsxs)(t.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,t.jsx)(et.default,{userSpend:e5,selectedTeam:null,userMaxBudget:eu?.max_budget||null})]}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Usage Metrics"}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_api_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_successful_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.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,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:e0.metadata?.total_failed_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Average Cost per Request"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)((e5||0)/(e0.metadata?.total_api_requests||1),4)]})]}),(0,t.jsxs)(c.Card,{className:"cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>eK(!eW),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),eW?(0,t.jsx)(s.DownOutlined,{className:"text-gray-400 text-xs"}):(0,t.jsx)(i.RightOutlined,{className:"text-gray-400 text-xs"})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_tokens?.toLocaleString()||0})]})]}),eW&&(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Input Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-blue-600",children:Math.max(0,(e0.metadata?.total_prompt_tokens||0)-(e0.metadata?.total_cache_read_input_tokens||0)-(e0.metadata?.total_cache_creation_input_tokens||0)).toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Output Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-cyan-600",children:e0.metadata?.total_completion_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Read Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_cache_read_input_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Write Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-purple-600",children:e0.metadata?.total_cache_creation_input_tokens?.toLocaleString()||0})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)(o.BarChart,{data:e9,index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:e7,teams:null,topKeysLimit:eP,setTopKeysLimit:eR})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"groups"===eT?"Top Public Model Names":"Top Litellm Models"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eV,onChange:e=>eB(e)}),(0,t.jsxs)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"groups"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("groups"),children:"Public Model Name"}),(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"individual"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("individual"),children:"Litellm Model Name"})]})]}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(R="groups"===eT?e6:e4,(0,t.jsx)(o.BarChart,{className:"mt-4",style:{height:52*Math.min(R.length,eV)},data:R,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.key}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.tokens.toLocaleString()]})]})}}))})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(ez,{loading:e1,isDateChanging:J,providerSpend:e3})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:e8})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:te})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:tt})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:e0})})]})]})]}),"organization"===eE&&(0,t.jsx)(eI,{accessToken:V,entityType:"organization",userID:B,userRole:I,dateValue:ea,entityList:U?.map(e=>({label:e.organization_alias,value:e.organization_id}))||null,premiumUser:W}),"team"===eE&&(0,t.jsx)(eI,{accessToken:V,entityType:"team",userID:B,userRole:I,entityList:e?.map(e=>({label:e.team_alias,value:e.team_id}))||null,premiumUser:W,dateValue:ea}),"customer"===eE&&(0,t.jsx)(eI,{accessToken:V,entityType:"customer",userID:B,userRole:I,entityList:ec?.map(e=>({label:e.alias||e.user_id,value:e.user_id}))||null,premiumUser:W,dateValue:ea}),"tag"===eE&&(0,t.jsxs)(t.Fragment,{children:[eF&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",message:"Reusable credentials are automatically tracked as tags",description:(0,t.jsxs)(N.Typography.Text,{children:["When a reusable credential is used, it will appear as a tag prefixed with"," ",(0,t.jsx)(N.Typography.Text,{code:!0,children:"Credential: "}),"in this view."]}),closable:!0,onClose:()=>e$(!1),className:"mb-5"}),(0,t.jsx)(eI,{accessToken:V,entityType:"tag",userID:B,userRole:I,entityList:en,premiumUser:W,dateValue:ea})]}),"agent"===eE&&(0,t.jsx)(eI,{accessToken:V,entityType:"agent",userID:B,userRole:I,entityList:ed?.agents?.map(e=>({label:e.agent_name,value:e.agent_id}))||null,premiumUser:W,dateValue:ea}),"user"===eE&&(0,t.jsx)(eI,{accessToken:V,entityType:"user",userID:B,userRole:I,entityList:ek.length>0?ek:null,premiumUser:W,dateValue:ea}),"user-agent-activity"===eE&&(0,t.jsx)(ee,{accessToken:V,userRole:I,dateValue:ea})]})}),(0,t.jsx)(E.default,{isOpen:ew,onClose:()=>eS(!1),accessToken:V}),(0,t.jsx)(O.default,{isOpen:eq,onClose:()=>eD(!1),entityType:"team",spendData:{results:e0.results,metadata:e0.metadata},dateRange:ea,selectedFilters:[],customTitle:"Export Usage Data"}),(0,t.jsx)(eX,{open:eA,onClose:()=>eM(!1),accessToken:V})]})}],797305)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,289793,952840,617885,286718,23371,487147,498610,785952,193523,260573,e=>{"use strict";var t=e.i(764205),s=e.i(266027),a=e.i(243652),r=e.i(708347),l=e.i(135214);let i=(0,a.createQueryKeys)("agents");e.s(["useAgents",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,t.getAgentsList)(e),enabled:!!e&&r.all_admin_roles.includes(a||"")})}],289793);let n=(0,a.createQueryKeys)("customers");e.s(["useCustomers",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,t.allEndUsersCall)(e),enabled:!!e&&r.all_admin_roles.includes(a)})}],952840);var o=e.i(621482);let c=(0,a.createQueryKeys)("infiniteUsers"),d=50;e.s(["useInfiniteUsers",0,(e=d,s)=>{let{accessToken:a,userRole:i}=(0,l.default)();return(0,o.useInfiniteQuery)({queryKey:c.list({filters:{pageSize:e,...s&&{searchEmail:s}}}),queryFn:async({pageParam:r})=>await (0,t.userListCall)(a,null,r,e,s||null),initialPageParam:1,getNextPageParam:e=>{if(e.pagee&&t&&t.length?(0,u.jsxs)("div",{className:"w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[(0,u.jsx)("p",{className:"text-tremor-content-strong",children:s}),t.map(e=>{let t=e.dataKey?.toString();if(!t||!e.payload)return null;let s=((e,t)=>{let s=t.substring(t.indexOf(".")+1);if(e.metrics&&s in e.metrics)return e.metrics[s]})(e.payload,t),a=t.includes("spend"),r=void 0!==s?a?`$${s.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:s.toLocaleString():"N/A",l=b[e.color]||e.color;return(0,u.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-2 ring-white drop-shadow-md",style:{backgroundColor:l}}),(0,u.jsx)("p",{className:"font-medium text-tremor-content dark:text-dark-tremor-content",children:t.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]}),(0,u.jsx)("p",{className:"font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",children:r})]},t)})]}):null,v=({categories:e,colors:t})=>(0,u.jsx)("div",{className:"flex items-center justify-end space-x-4",children:e.map((e,s)=>{let a=b[t[s]]||t[s];return(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-4 ring-white",style:{backgroundColor:a}}),(0,u.jsx)("p",{className:"text-sm text-tremor-content dark:text-dark-tremor-content",children:e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]},e)})});e.s(["CustomLegend",0,v,"CustomTooltip",0,k],286718);var N=e.i(291542),T=e.i(271645);let C=[{title:"Model",dataIndex:"model",key:"model",render:e=>e||"-"},{title:"Spend (USD)",dataIndex:"spend",key:"spend",render:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`},{title:"Successful",dataIndex:"successful_requests",key:"successful_requests",render:e=>(0,u.jsx)("span",{className:"text-green-600",children:e?.toLocaleString()||0})},{title:"Failed",dataIndex:"failed_requests",key:"failed_requests",render:e=>(0,u.jsx)("span",{className:"text-red-600",children:e?.toLocaleString()||0})},{title:"Tokens",dataIndex:"tokens",key:"tokens",render:e=>e?.toLocaleString()||0}],w=({topModels:e})=>{let[t,s]=(0,T.useState)("table");return 0===e.length?null:(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,u.jsx)(_.Title,{children:"Model Usage"}),(0,u.jsxs)("div",{className:"flex space-x-2",children:[(0,u.jsx)("button",{onClick:()=>s("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,u.jsx)("button",{onClick:()=>s("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"})]})]}),"chart"===t?(0,u.jsx)("div",{className:"max-h-[234px] overflow-y-auto",children:(0,u.jsx)(p.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,m.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:180,tickGap:5,showLegend:!1})}):(0,u.jsx)(N.Table,{columns:C,dataSource:e,rowKey:"model",size:"small",pagination:!1,scroll:e.length>5?{y:195}:void 0})]})};function S(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function q(e){return 0===e?"$0":e>=1e6?"$"+e/1e6+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}e.s(["valueFormatter",()=>S,"valueFormatterSpend",()=>q],23371);let L=({modelName:e,metrics:t,hidePromptCachingMetrics:s=!1})=>(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:t.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:t.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:t.total_tokens.toLocaleString()}),(0,u.jsxs)(j.Text,{children:[Math.round(t.total_tokens/t.total_successful_requests)," avg per successful request"]})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend,2)]}),(0,u.jsxs)(j.Text,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend/t.total_successful_requests,3)," per successful request"]})]})]}),t.top_api_keys&&t.top_api_keys.length>0&&(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsx)(_.Title,{children:"Top Virtual Keys by Spend"}),(0,u.jsx)("div",{className:"mt-3",children:(0,u.jsx)("div",{className:"grid grid-cols-1 gap-2",children:t.top_api_keys.map((e,t)=>(0,u.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium",children:e.key_alias||`${e.api_key.substring(0,10)}...`}),e.team_id&&(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,u.jsxs)("div",{className:"text-right",children:[(0,u.jsxs)(j.Text,{className:"font-medium",children:["$",(0,m.formatNumberWithCommas)(e.spend,2)]}),(0,u.jsxs)(j.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,u.jsx)(w,{topModels:t.top_models}),(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Spend per day"}),(0,u.jsx)(v,{categories:["metrics.spend"],colors:["green"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2,!0)}`,yAxisWidth:72})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4 mt-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.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:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Requests per day"}),(0,u.jsx)(v,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Success vs Failed Requests"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),!s&&(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Prompt Caching Metrics"}),(0,u.jsx)(v,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,u.jsxs)("div",{className:"mb-2",children:[(0,u.jsxs)(j.Text,{children:["Cache Read: ",t.total_cache_read_input_tokens?.toLocaleString()||0," tokens"]}),(0,u.jsxs)(j.Text,{children:["Cache Creation: ",t.total_cache_creation_input_tokens?.toLocaleString()||0," tokens"]})]}),(0,u.jsx)(h.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:S,customTooltip:k,showLegend:!1})]})]})]});e.s(["ActivityMetrics",0,({modelMetrics:e,hidePromptCachingMetrics:t=!1})=>{let s=Object.keys(e).sort((t,s)=>""===t?1:""===s?-1:e[s].total_spend-e[t].total_spend),a={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=>{a.total_requests+=e.total_requests,a.total_successful_requests+=e.total_successful_requests,a.total_tokens+=e.total_tokens,a.total_spend+=e.total_spend,a.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,a.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{a.daily_data[e.date]||(a.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}),a.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,a.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,a.daily_data[e.date].total_tokens+=e.metrics.total_tokens,a.daily_data[e.date].api_requests+=e.metrics.api_requests,a.daily_data[e.date].spend+=e.metrics.spend,a.daily_data[e.date].successful_requests+=e.metrics.successful_requests,a.daily_data[e.date].failed_requests+=e.metrics.failed_requests,a.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,a.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let r=Object.entries(a.daily_data).map(([e,t])=>({date:e,metrics:t})).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,u.jsxs)("div",{className:"space-y-8",children:[(0,u.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,u.jsx)(_.Title,{children:"Overall Usage"}),(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4 mb-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:a.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:a.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:a.total_tokens.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(a.total_spend,2)]})]})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens Over Time"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Requests Over Time"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:k,showLegend:!1})]})]})]}),(0,u.jsx)(y.Collapse,{defaultActiveKey:s[0],children:s.map(s=>(0,u.jsx)(y.Collapse.Panel,{header:(0,u.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,u.jsx)(_.Title,{children:e[s].label||"Unknown Item"}),(0,u.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,u.jsxs)("span",{children:["$",(0,m.formatNumberWithCommas)(e[s].total_spend,2)]}),(0,u.jsxs)("span",{children:[e[s].total_requests.toLocaleString()," requests"]})]})]}),children:(0,u.jsx)(L,{modelName:s||"Unknown Model",metrics:e[s],hidePromptCachingMetrics:t})},s))})]})},"processActivityData",0,(e,t,s=[])=>{let a={};return e.results.forEach(e=>{Object.entries(e.breakdown[t]||{}).forEach(([r,l])=>{a[r]||(a[r]={label:"api_keys"===t?((e,t,s)=>{let a=e.metadata.key_alias||`key-hash-${t}`,r=e.metadata.team_id;if(r){let e=(0,x.resolveTeamAliasFromTeamID)(r,s);return e?`${a} (team: ${e})`:`${a} (team_id: ${r})`}return a})(l,r,s):"entities"===t&&(l.metadata?.agent_name||l.metadata?.team_alias)||r,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[r].total_requests+=l.metrics.api_requests,a[r].prompt_tokens+=l.metrics.prompt_tokens,a[r].completion_tokens+=l.metrics.completion_tokens,a[r].total_tokens+=l.metrics.total_tokens,a[r].total_spend+=l.metrics.spend,a[r].total_successful_requests+=l.metrics.successful_requests,a[r].total_failed_requests+=l.metrics.failed_requests,a[r].total_cache_read_input_tokens+=l.metrics.cache_read_input_tokens||0,a[r].total_cache_creation_input_tokens+=l.metrics.cache_creation_input_tokens||0,a[r].daily_data.push({date:e.date,metrics:{prompt_tokens:l.metrics.prompt_tokens,completion_tokens:l.metrics.completion_tokens,total_tokens:l.metrics.total_tokens,api_requests:l.metrics.api_requests,spend:l.metrics.spend,successful_requests:l.metrics.successful_requests,failed_requests:l.metrics.failed_requests,cache_read_input_tokens:l.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:l.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==t&&Object.entries(a).forEach(([s,r])=>{let l={};e.results.forEach(e=>{let a=e.breakdown[t]?.[s];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(([e,t])=>{l[e]||(l[e]={api_key:e,key_alias:t.metadata.key_alias,team_id:t.metadata.team_id,spend:0,requests:0,tokens:0}),l[e].spend+=t.metrics.spend,l[e].requests+=t.metrics.api_requests,l[e].tokens+=t.metrics.total_tokens})}),a[s].top_api_keys=Object.values(l).sort((e,t)=>t.spend-e.spend).slice(0,5)}),"api_keys"===t&&Object.entries(a).forEach(([t,s])=>{let r={};e.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,s])=>{if(s&&"api_key_breakdown"in s){let a=s.api_key_breakdown?.[t];a&&(r[e]||(r[e]={model:e,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0}),r[e].spend+=a.metrics.spend,r[e].requests+=a.metrics.api_requests,r[e].successful_requests+=a.metrics.successful_requests||0,r[e].failed_requests+=a.metrics.failed_requests||0,r[e].tokens+=a.metrics.total_tokens)}})}),a[t].top_models=Object.values(r).sort((e,t)=>t.spend-e.spend)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())}),a}],487147);var D=e.i(994388),A=e.i(366283),M=e.i(779241),O=e.i(212931),E=e.i(808613),F=e.i(482725),$=e.i(199133),U=e.i(727749);e.s(["default",0,({isOpen:e,onClose:s,accessToken:a})=>{let[r]=E.Form.useForm(),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(null),[c,d]=(0,T.useState)(!1),[m,x]=(0,T.useState)("cloudzero"),[h,p]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e&&a&&g()},[e,a]);let g=async()=>{d(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"}});if(e.ok){let t=await e.json();o(t),r.setFieldsValue({connection_id:t.connection_id})}else if(404!==e.status){let t=await e.json();U.default.fromBackend(`Failed to load existing settings: ${t.error||"Unknown error"}`)}}catch(e){console.error("Error loading CloudZero settings:",e),U.default.fromBackend("Failed to load existing settings")}finally{d(!1)}},f=async e=>{if(!a)return void U.default.fromBackend("No access token available");i(!0);try{let s=n?"/cloudzero/settings":"/cloudzero/init",r=n?"PUT":"POST",l={...e,timezone:"UTC"},i=await fetch(s,{method:r,headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(l)}),c=await i.json();if(i.ok)return U.default.success(c.message||"CloudZero settings saved successfully"),o({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return U.default.fromBackend(c.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),U.default.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},_=async()=>{if(!a)return void U.default.fromBackend("No access token available");p(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),r=await e.json();e.ok?(U.default.success(r.message||"Export to CloudZero completed successfully"),s()):U.default.fromBackend(r.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),U.default.fromBackend("Failed to export to CloudZero")}finally{p(!1)}},y=async()=>{p(!0);try{U.default.info("CSV export functionality coming soon!"),s()}catch(e){console.error("Error exporting CSV:",e),U.default.fromBackend("Failed to export CSV")}finally{p(!1)}},b=async()=>{if("cloudzero"===m){if(!n){let e=await r.validateFields();if(!await f(e))return}await _()}else await y()},k=()=>{r.resetFields(),x("cloudzero"),o(null),s()},v=[{value:"cloudzero",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,u.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsx)("span",{children:"Export to CSV"})]})}];return(0,u.jsx)(O.Modal,{title:"Export Data",open:e,onCancel:k,footer:null,width:600,destroyOnHidden:!0,children:(0,u.jsxs)("div",{className:"space-y-4",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,u.jsx)($.Select,{value:m,onChange:x,options:v,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,u.jsx)("div",{children:c?(0,u.jsx)("div",{className:"flex justify-center py-8",children:(0,u.jsx)(F.Spin,{size:"large"})}):(0,u.jsxs)(u.Fragment,{children:[n&&(0,u.jsx)(A.Callout,{title:"Existing CloudZero Configuration",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsxs)(j.Text,{children:["API Key: ",n.api_key_masked,(0,u.jsx)("br",{}),"Connection ID: ",n.connection_id]})}),!n&&(0,u.jsxs)(E.Form,{form:r,layout:"vertical",children:[(0,u.jsx)(E.Form.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,u.jsx)(M.TextInput,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,u.jsx)(E.Form.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,u.jsx)(M.TextInput,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,u.jsx)(A.Callout,{title:"CSV Export",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,u.jsx)(j.Text,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,u.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,u.jsx)(D.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,u.jsx)(D.Button,{onClick:b,loading:l||h,disabled:l||h,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})}],498610);var P=e.i(785242),R=e.i(464571),V=e.i(981339);let I=({value:e,onChange:t})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,u.jsx)($.Select,{value:e,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]}),B=({dateRange:e,selectedFilters:t})=>(0,u.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 W=e.i(91739);let z=({value:e,onChange:t,entityType:s})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,u.jsx)(W.Radio.Group,{value:e,onChange:e=>t(e.target.value),className:"w-full",children:(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily_with_keys",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s," and key"]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s,", split by API key"]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily_with_models",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",s," and model"]}),(0,u.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]});var Y=e.i(59935);let K=(e,t)=>({id:e,alias:t[e]||e}),H=["spend","api_requests","successful_requests","failed_requests","total_tokens","prompt_tokens","completion_tokens","cache_read_input_tokens","cache_creation_input_tokens"],G=e=>{let t=e.entities;return t&&Object.keys(t).length>0?t:(e=>{let t=e.api_keys;if(!t||0===Object.keys(t).length)return{};let s={};for(let[e,a]of Object.entries(t)){let t=a?.metadata?.team_id||"Unassigned";s[t]||(s[t]={metrics:Object.fromEntries(H.map(e=>[e,0])),api_key_breakdown:{}});let r=s[t].metrics,l=a?.metrics||{};for(let e of H)r[e]+=l[e]||0;s[t].api_key_breakdown[e]=a}return s})(e)},Z=(e,t,s,a={})=>{switch(t){case"daily":default:return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([r,l])=>{let{id:i,alias:n}=K(r,s);a.push({Date:e.date,[t]:n,[`${t} ID`]:i,"Spend ($)":(0,m.formatNumberWithCommas)(l.metrics.spend,4),Requests:l.metrics.api_requests,"Successful Requests":l.metrics.successful_requests,"Failed Requests":l.metrics.failed_requests,"Total Tokens":l.metrics.total_tokens,"Prompt Tokens":l.metrics.prompt_tokens||0,"Completion Tokens":l.metrics.completion_tokens||0})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_keys":return((e,t,s={})=>{let a={};return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([t,r])=>{let{id:l,alias:i}=K(t,s);Object.entries(r.api_key_breakdown||{}).forEach(([t,s])=>{let r=s?.metadata?.key_alias||null,n=`${e.date}_${l}_${t}`;a[n]?(a[n].metrics.spend+=s.metrics?.spend||0,a[n].metrics.api_requests+=s.metrics?.api_requests||0,a[n].metrics.successful_requests+=s.metrics?.successful_requests||0,a[n].metrics.failed_requests+=s.metrics?.failed_requests||0,a[n].metrics.total_tokens+=s.metrics?.total_tokens||0,a[n].metrics.prompt_tokens+=s.metrics?.prompt_tokens||0,a[n].metrics.completion_tokens+=s.metrics?.completion_tokens||0):a[n]={Date:e.date,entityId:l,entityAlias:i,keyId:t,keyAlias:r,metrics:{spend:s.metrics?.spend||0,api_requests:s.metrics?.api_requests||0,successful_requests:s.metrics?.successful_requests||0,failed_requests:s.metrics?.failed_requests||0,total_tokens:s.metrics?.total_tokens||0,prompt_tokens:s.metrics?.prompt_tokens||0,completion_tokens:s.metrics?.completion_tokens||0}}})})}),Object.values(a).map(e=>({Date:e.Date,[t]:e.entityAlias,[`${t} ID`]:e.entityId,"Key Alias":e.keyAlias||"-","Key ID":e.keyId,"Spend ($)":(0,m.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})).sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_models":return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{let r={};Object.entries(G(e.breakdown)).forEach(([t,s])=>{r[t]||(r[t]={}),Object.entries(e.breakdown.models||{}).forEach(([e,a])=>{Object.entries(s.api_key_breakdown||{}).forEach(([s,a])=>{r[t][e]||(r[t][e]={spend:0,requests:0,successful:0,failed:0,tokens:0}),r[t][e].spend+=a.metrics.spend||0,r[t][e].requests+=a.metrics.api_requests||0,r[t][e].successful+=a.metrics.successful_requests||0,r[t][e].failed+=a.metrics.failed_requests||0,r[t][e].tokens+=a.metrics.total_tokens||0})})}),Object.entries(r).forEach(([r,l])=>{let{id:i,alias:n}=K(r,s);Object.entries(l).forEach(([s,r])=>{a.push({Date:e.date,[t]:n,[`${t} ID`]:i,Model:s,"Spend ($)":(0,m.formatNumberWithCommas)(r.spend,4),Requests:r.requests,Successful:r.successful,Failed:r.failed,"Total Tokens":r.tokens})})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a)}},J=({isOpen:e,onClose:t,entityType:s,spendData:a,dateRange:r,selectedFilters:l,customTitle:i})=>{let[n,o]=(0,T.useState)("csv"),[c,d]=(0,T.useState)("daily"),[m,h]=(0,T.useState)(!1),{data:p,isLoading:g}=(0,P.useTeams)(),f=s.charAt(0).toUpperCase()+s.slice(1),j=i||`Export ${f} Usage`,_=(0,T.useMemo)(()=>(0,x.createTeamAliasMap)(p),[p]),y=async e=>{let i=e||n;h(!0);try{"csv"===i?(((e,t,s,a,r={})=>{let l=Z(e,t,s,r),i=new Blob([Y.default.unparse(l)],{type:"text/csv;charset=utf-8;"}),n=window.URL.createObjectURL(i),o=document.createElement("a");o.href=n,o.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(n)})(a,c,f,s,_),U.default.success(`${f} usage data exported successfully as CSV`)):(((e,t,s,a,r,l,i={})=>{let n=Z(e,t,s,i),o={export_date:new Date().toISOString(),entity_type:a,date_range:{from:r.from?.toISOString(),to:r.to?.toISOString()},filters_applied:l.length>0?l:"None",export_scope:t,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}},c=new Blob([JSON.stringify({metadata:o,data:n},null,2)],{type:"application/json"}),d=window.URL.createObjectURL(c),u=document.createElement("a");u.href=d,u.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(d)})(a,c,f,s,r,l,_),U.default.success(`${f} usage data exported successfully as JSON`)),t()}catch(e){console.error("Error exporting data:",e),U.default.fromBackend("Failed to export data")}finally{h(!1)}};return(0,u.jsx)(O.Modal,{title:(0,u.jsx)("span",{className:"text-base font-semibold",children:j}),open:e,onCancel:t,footer:null,width:480,children:(0,u.jsxs)("div",{className:"space-y-5 py-2",children:[g?(0,u.jsx)(V.Skeleton,{active:!0}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(B,{dateRange:r,selectedFilters:l}),(0,u.jsx)(z,{value:c,onChange:d,entityType:s}),(0,u.jsx)(I,{value:n,onChange:o})]}),g?(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(V.Skeleton.Button,{active:!0}),(0,u.jsx)(V.Skeleton.Button,{active:!0})]}):(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(R.Button,{variant:"outlined",onClick:t,disabled:m,children:"Cancel"}),(0,u.jsx)(R.Button,{onClick:()=>y(),loading:m||g,disabled:m||g,type:"primary",children:m?"Exporting...":`Export ${n.toUpperCase()}`})]})]})})};e.s(["default",0,J],785952),e.s(["default",0,({dateValue:e,entityType:t,spendData:s,showFilters:a=!1,filterLabel:r,filterPlaceholder:l,selectedFilters:i=[],onFiltersChange:n,filterOptions:o=[],filterMode:c="multiple",customTitle:d,compactLayout:m=!1,teams:x=[]})=>{let[h,p]=(0,T.useState)(!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"mb-4",children:(0,u.jsxs)("div",{className:`grid ${a&&o.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"} items-end gap-4`,children:[a&&o.length>0&&(0,u.jsxs)("div",{children:[r&&(0,u.jsx)(j.Text,{className:"mb-2",children:r}),(0,u.jsx)($.Select,{mode:"single"===c?void 0:"multiple",style:{width:"100%"},placeholder:l,value:"single"===c?i[0]??void 0:i,onChange:e=>{"single"===c?n?.(e?[e]:[]):n?.(e)},options:o,allowClear:!0})]}),(0,u.jsx)("div",{className:"justify-self-end",children:(0,u.jsx)(D.Button,{onClick:()=>p(!0),icon:()=>(0,u.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsx)(J,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:s,dateRange:e,selectedFilters:i,customTitle:d,teams:x})]})}],193523),e.s([],260573)},973706,e=>{"use strict";var t=e.i(843476),s=e.i(72713),a=e.i(637235),r=e.i(994388),l=e.i(599724),i=e.i(166540),n=e.i(271645);let o=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,i.default)().startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,i.default)().subtract(7,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,i.default)().subtract(30,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,i.default)().startOf("month").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,i.default)().startOf("year").toDate(),to:(0,i.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:c,label:d="Select Time Range",showTimeRange:u=!0})=>{let[m,x]=(0,n.useState)(!1),[h,p]=(0,n.useState)(e),[g,f]=(0,n.useState)(null),[j,_]=(0,n.useState)(""),[y,b]=(0,n.useState)(""),k=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of o){let s=t.getValue(),a=(0,i.default)(e.from).isSame((0,i.default)(s.from),"day"),r=(0,i.default)(e.to).isSame((0,i.default)(s.to),"day");if(a&&r)return t.shortLabel}return null},[]);(0,n.useEffect)(()=>{f(v(e))},[e,v]);let N=(0,n.useCallback)(()=>{if(!j||!y)return{isValid:!0,error:""};let e=(0,i.default)(j,"YYYY-MM-DD"),t=(0,i.default)(y,"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"}},[j,y])();(0,n.useEffect)(()=>{e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,n.useEffect)(()=>{let e=e=>{k.current&&!k.current.contains(e.target)&&x(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let T=(0,n.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let s=e=>(0,i.default)(e).format("D MMM, HH:mm");return`${s(e)} - ${s(t)}`},[]),C=(0,n.useCallback)(e=>{let t;if(!e.from)return e;let s={...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),s.from=a,s.to=t,s},[]),w=(0,n.useCallback)(()=>{try{if(j&&y&&N.isValid){let e=(0,i.default)(j,"YYYY-MM-DD").startOf("day"),t=(0,i.default)(y,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let s={from:e.toDate(),to:t.toDate()};p(s);let a=v(s);f(a)}}}catch(e){console.warn("Invalid date format:",e)}},[j,y,N.isValid,v]);return(0,n.useEffect)(()=>{w()},[w]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d&&(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:d}),(0,t.jsxs)("div",{className:"relative",ref:k,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:()=>x(!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:T(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:o.map(e=>{let s=g===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 ${s?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:s}=e.getValue();p({from:t,to:s}),f(e.shortLabel),_((0,i.default)(t).format("YYYY-MM-DD")),b((0,i.default)(s).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${s?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${s?"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)(s.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:j,onChange:e=>_(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 ${!N.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:y,onChange:e=>b(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 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!N.isValid&&N.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:N.error})]})}),h.from&&h.to&&N.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,i.default)(h.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,i.default)(h.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)(r.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),f(v(e)),x(!1)},children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:()=>{h.from&&h.to&&N.isValid&&(c(h),requestIdleCallback(()=>{c(C(h))},{timeout:100}),x(!1))},disabled:!h.from||!h.to||!N.isValid,children:"Apply"})]})})]})]})})]})]})}])},797305,497650,e=>{"use strict";var t=e.i(843476),s=e.i(755151),a=e.i(872934),r=e.i(827252),l=e.i(56456),i=e.i(240647),n=e.i(152473),o=e.i(584935),c=e.i(304967),d=e.i(309426),u=e.i(350967),m=e.i(197647),x=e.i(653824),h=e.i(881073),p=e.i(404206),g=e.i(723731),f=e.i(599724),j=e.i(629569),_=e.i(560445),y=e.i(464571),b=e.i(560025),k=e.i(199133),v=e.i(592968),N=e.i(898586),T=e.i(271645),C=e.i(289793),w=e.i(952840),S=e.i(135214),q=e.i(738014),L=e.i(617885),D=e.i(500330),A=e.i(708347),M=e.i(487147),O=e.i(498610);e.i(260573);var E=e.i(785952),F=e.i(764205),$=e.i(973706),U=e.i(571303);let P=({isDateChanging:e=!1})=>(0,t.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)(U.UiLoadingSpinner,{className:"size-5"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:e?"Processing date selection...":"Loading chart data..."}),(0,t.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:e?"This will only take a moment":"Fetching your data"})]})]})});var R=e.i(290571),V=e.i(95779),I=e.i(444755),B=e.i(673706);let W=T.default.forwardRef((e,t)=>{let{color:s,children:a,className:r}=e,l=(0,R.__rest)(e,["color","children","className"]);return T.default.createElement("p",Object.assign({ref:t,className:(0,I.tremorTwMerge)("font-semibold text-tremor-metric",s?(0,B.getColorClassNames)(s,V.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",r)},l),a)});W.displayName="Metric";var z=e.i(37091),Y=e.i(269200),K=e.i(427612),H=e.i(496020),G=e.i(64848),Z=e.i(942232),J=e.i(977572),Q=e.i(994388);let X=({accessToken:e,selectedTags:s,formatAbbreviatedNumber:a})=>{let r,l,i,n,[c,d]=(0,T.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[u,_]=(0,T.useState)(!1),[y,b]=(0,T.useState)(1),k=async()=>{if(e){_(!0);try{let t=await (0,F.perUserAnalyticsCall)(e,y,50,s.length>0?s:void 0);d(t)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{_(!1)}}};return(0,T.useEffect)(()=>{k()},[e,s,y]),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"Per User Usage"}),(0,t.jsx)(z.Subtitle,{children:"Individual developer usage metrics"}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"User Details"}),(0,t.jsx)(m.Tab,{children:"Usage Distribution"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)(Y.Table,{children:[(0,t.jsx)(K.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"User ID"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Email"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Agent"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Success Generations"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Tokens"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Failed Requests"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Cost"})]})}),(0,t.jsx)(Z.TableBody,{children:c.results.slice(0,10).map((e,s)=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{className:"font-medium",children:e.user_id})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_email||"N/A"})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_agent||"Unknown"})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.successful_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.total_tokens)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.failed_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsxs)(f.Text,{children:["$",a(e.spend,4)]})})]},s))})]}),c.results.length>10&&(0,t.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,t.jsxs)(f.Text,{className:"text-sm text-gray-500",children:["Showing 10 of ",c.total_count," results"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y>1&&b(y-1)},disabled:1===y,children:"Previous"}),(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y=c.total_pages,children:"Next"})]})]})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(j.Title,{className:"text-lg",children:"User Usage Distribution"}),(0,t.jsx)(z.Subtitle,{children:"Number of users by successful request frequency"})]}),(0,t.jsx)(o.BarChart,{data:(r=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";r.set(t,(r.get(t)||0)+1)}),l=Array.from(r.entries()).sort(([,e],[,t])=>t-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 t=e.successful_requests,s=e.user_agent||"Unknown";l.includes(s)&&Object.entries(i).forEach(([e,a])=>{t>=a.range[0]&&t<=a.range[1]&&(a.agents[s]||(a.agents[s]=0),a.agents[s]++)})}),Object.entries(i).map(([e,t])=>{let s={category:e};return l.forEach(e=>{s[e]=t.agents[e]||0}),s})),index:"category",categories:(n=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";n.set(t,(n.get(t)||0)+1)}),Array.from(n.entries()).sort(([,e],[,t])=>t-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})]})]})]})]})},ee=({accessToken:e,userRole:s,dateValue:a,onDateChange:r})=>{let[l,i]=(0,T.useState)({results:[]}),[n,d]=(0,T.useState)({results:[]}),[_,y]=(0,T.useState)({results:[]}),[b,N]=(0,T.useState)({results:[]}),[C,w]=(0,T.useState)(""),[S,q]=(0,T.useState)([]),[L,D]=(0,T.useState)([]),[A,M]=(0,T.useState)(!1),[O,E]=(0,T.useState)(!1),[$,U]=(0,T.useState)(!1),[R,V]=(0,T.useState)(!1),[I,B]=(0,T.useState)(!1),Y=new Date,K=async()=>{if(e){M(!0);try{let t=await (0,F.tagDistinctCall)(e);q(t.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{M(!1)}}},H=async()=>{if(e){E(!0);try{let t=await (0,F.tagDauCall)(e,Y,C||void 0,L.length>0?L:void 0);i(t)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{E(!1)}}},G=async()=>{if(e){U(!0);try{let t=await (0,F.tagWauCall)(e,Y,C||void 0,L.length>0?L:void 0);d(t)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{U(!1)}}},Z=async()=>{if(e){V(!0);try{let t=await (0,F.tagMauCall)(e,Y,C||void 0,L.length>0?L:void 0);y(t)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{V(!1)}}},J=async()=>{if(e&&a.from&&a.to){B(!0);try{let t=await (0,F.userAgentSummaryCall)(e,a.from,a.to,L.length>0?L:void 0);N(t)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{B(!1)}}};(0,T.useEffect)(()=>{K()},[e]),(0,T.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{H(),G(),Z()},50);return()=>clearTimeout(t)},[e,C,L]),(0,T.useEffect)(()=>{if(!a.from||!a.to)return;let e=setTimeout(()=>{J()},50);return()=>clearTimeout(e)},[e,a,L]);let Q=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,ee=e=>Object.entries(e.reduce((e,t)=>(e[t.tag]=(e[t.tag]||0)+t.active_users,e),{})).sort(([,e],[,t])=>t-e).map(([e])=>e),et=ee(l.results).slice(0,10),es=ee(n.results).slice(0,10),ea=ee(_.results).slice(0,10),er=(()=>{let e=[],t=new Date;for(let s=6;s>=0;s--){let a=new Date(t);a.setDate(a.getDate()-s);let r={date:a.toISOString().split("T")[0]};et.forEach(e=>{r[Q(e)]=0}),e.push(r)}return l.results.forEach(t=>{let s=Q(t.tag),a=e.find(e=>e.date===t.date);a&&(a[s]=t.active_users)}),e})(),el=(()=>{let e=[];for(let t=1;t<=7;t++){let s={week:`Week ${t}`};es.forEach(e=>{s[Q(e)]=0}),e.push(s)}return n.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Week (\d+)/);if(a){let r=`Week ${a[1]}`,l=e.find(e=>e.week===r);l&&(l[s]=t.active_users)}}),e})(),ei=(()=>{let e=[];for(let t=1;t<=7;t++){let s={month:`Month ${t}`};ea.forEach(e=>{s[Q(e)]=0}),e.push(s)}return _.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Month (\d+)/);if(a){let r=`Month ${a[1]}`,l=e.find(e=>e.month===r);l&&(l[s]=t.active_users)}}),e})(),en=(e,t=0)=>{if(e>=1e8||e>=1e7)return(e/1e6).toFixed(t)+"M";if(e>=1e6)return(e/1e6).toFixed(t)+"M";if(e>=1e4)return(e/1e3).toFixed(t)+"K";if(e>=1e3)return(e/1e3).toFixed(t)+"K";else return e.toFixed(t)};return(0,t.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Title,{children:"Summary by User Agent"}),(0,t.jsx)(z.Subtitle,{children:"Performance metrics for different user agents"})]}),(0,t.jsxs)("div",{className:"w-96",children:[(0,t.jsx)(f.Text,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"All User Agents",value:L,onChange:D,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:A,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:S.map(e=>{let s=Q(e),a=s.length>50?`${s.substring(0,50)}...`:s;return(0,t.jsx)(k.Select.Option,{value:e,label:a,title:s,children:a},e)})})]})]}),I?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4",children:[(b.results||[]).slice(0,4).map((e,s)=>{let a=Q(e.tag),r=a.length>15?a.substring(0,15)+"...":a;return(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(v.Tooltip,{title:a,placement:"top",children:(0,t.jsx)(j.Title,{className:"truncate",children:r})}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(W,{className:"text-lg",children:en(e.successful_requests)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(W,{className:"text-lg",children:en(e.total_tokens)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsxs)(W,{className:"text-lg",children:["$",en(e.total_spend,4)]})]})]})]},s)}),Array.from({length:Math.max(0,4-(b.results||[]).length)}).map((e,s)=>(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"No Data"}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]})]})]},`empty-${s}`))]})]})}),(0,t.jsx)(c.Card,{children:(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU/WAU/MAU"}),(0,t.jsx)(m.Tab,{children:"Per User Usage (Last 30 Days)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"DAU, WAU & MAU per Agent"}),(0,t.jsx)(z.Subtitle,{children:"Active users across different time periods"})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU"}),(0,t.jsx)(m.Tab,{children:"WAU"}),(0,t.jsx)(m.Tab,{children:"MAU"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),O?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:er,index:"date",categories:et.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),$?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:el,index:"week",categories:es.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),R?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:ei,index:"month",categories:ea.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(X,{accessToken:e,selectedTags:L,formatAbbreviatedNumber:en})})]})]})})]})};var et=e.i(617802);let es=["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"],ea={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}};function er({fetchFn:e,args:t,enabled:s}){let[a,r]=(0,T.useState)(ea),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),[c,d]=(0,T.useState)({currentPage:0,totalPages:0}),[u,m]=(0,T.useState)(!1),x=(0,T.useRef)(0),h=(0,T.useRef)(!1),p=(0,T.useRef)(null),g=(0,T.useRef)(t);g.current=t;let f=JSON.stringify(t),j=(0,T.useCallback)(()=>{h.current=!0,m(!0),o(!1),null!==p.current&&(clearTimeout(p.current),p.current=null)},[]);return(0,T.useEffect)(()=>{if(!s){r(ea),i(!1),o(!1),d({currentPage:0,totalPages:0}),m(!1);return}let t=++x.current;h.current=!1,m(!1);let a=()=>x.current!==t||h.current,l=e=>new Promise(t=>{p.current=setTimeout(()=>{p.current=null,t()},e)});return(async()=>{let t=g.current;i(!0),o(!1),d({currentPage:1,totalPages:1});try{let s=[...t.slice(0,3),1,...t.slice(3)],n=await e(...s);if(a())return;r(n);let c=n.metadata?.total_pages||1;if(d({currentPage:1,totalPages:c}),c<=1)return void i(!1);i(!1),o(!0);let u=[...n.results],m={...n.metadata};for(let s=2;s<=c;s++){if(a()||(await l(300),a()))return;let i=[...t.slice(0,3),s,...t.slice(3)],n=await e(...i);if(a())return;u=[...u,...n.results],(m=function(e,t){let s={...e};for(let a of es)s[a]=(e[a]||0)+(t[a]||0);return s}(m,n.metadata)).total_pages=c,m.has_more=s{x.current++,null!==p.current&&(clearTimeout(p.current),p.current=null)}},[s,e,f]),{data:a,loading:l,isFetchingMore:n,progress:c,cancelled:u,cancel:j}}var el=e.i(23371),ei=e.i(286718);let en=({endpointData:e})=>{let s=e||{},a=T.default.useMemo(()=>Object.entries(s).map(([e,t])=>({endpoint:e,"metrics.successful_requests":t.metrics.successful_requests,"metrics.failed_requests":t.metrics.failed_requests,metrics:{successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests}})),[s]);return(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(j.Title,{children:"Success vs Failed Requests by Endpoint"}),(0,t.jsx)(ei.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,t.jsx)(o.BarChart,{className:"mt-4",data:a,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:ei.CustomTooltip,showLegend:!1,stack:!0,yAxisWidth:60})]})};var eo=e.i(731195),ec=e.i(883966),ed=e.i(555706),eu=e.i(785183),em=e.i(93230),ex=e.i(844171),eh=(0,ec.generateCategoricalChart)({chartName:"LineChart",GraphicalChild:ed.Line,axisComponents:[{axisType:"xAxis",AxisComp:eu.XAxis},{axisType:"yAxis",AxisComp:em.YAxis}],formatAxisMap:ex.formatAxisMap}),ep=e.i(872526),eg=e.i(800494),ef=e.i(234239),ej=e.i(559559),e_=e.i(238279),ey=e.i(114887),eb=e.i(933303),ek=e.i(628781),ev=e.i(472007),eN=e.i(480731);let eT=T.default.forwardRef((e,t)=>{let{data:s=[],categories:a=[],index:r,colors:l=V.themeColorRange,valueFormatter:i=B.defaultValueFormatter,startEndOnly:n=!1,showXAxis:o=!0,showYAxis:c=!0,yAxisWidth:d=56,intervalType:u="equidistantPreserveStart",animationDuration:m=900,showAnimation:x=!1,showTooltip:h=!0,showLegend:p=!0,showGridLines:g=!0,autoMinValue:f=!1,curveType:j="linear",minValue:_,maxValue:y,connectNulls:b=!1,allowDecimals:k=!0,noDataText:v,className:N,onValueChange:C,enableLegendSlider:w=!1,customTooltip:S,rotateLabelX:q,padding:L=o||c?{left:20,right:20}:{left:0,right:0},tickGap:D=5,xAxisLabel:A,yAxisLabel:M}=e,O=(0,R.__rest)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[E,F]=(0,T.useState)(60),[$,U]=(0,T.useState)(void 0),[P,W]=(0,T.useState)(void 0),z=(0,ev.constructCategoryColors)(a,l),Y=(0,ev.getYAxisDomain)(f,_,y),K=!!C;function H(e){K&&(e===P&&!$||(0,ev.hasOnlyOneValueForThisKey)(s,e)&&$&&$.dataKey===e?(W(void 0),null==C||C(null)):(W(e),null==C||C({eventType:"category",categoryClicked:e})),U(void 0))}return T.default.createElement("div",Object.assign({ref:t,className:(0,I.tremorTwMerge)("w-full h-80",N)},O),T.default.createElement(eo.ResponsiveContainer,{className:"h-full w-full"},(null==s?void 0:s.length)?T.default.createElement(eh,{data:s,onClick:K&&(P||$)?()=>{U(void 0),W(void 0),null==C||C(null)}:void 0,margin:{bottom:A?30:void 0,left:M?20:void 0,right:M?5:void 0,top:5}},g?T.default.createElement(ep.CartesianGrid,{className:(0,I.tremorTwMerge)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,T.default.createElement(eu.XAxis,{padding:L,hide:!o,dataKey:r,interval:n?"preserveStartEnd":u,tick:{transform:"translate(0, 6)"},ticks:n?[s[0][r],s[s.length-1][r]]:void 0,fill:"",stroke:"",className:(0,I.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:D,angle:null==q?void 0:q.angle,dy:null==q?void 0:q.verticalShift,height:null==q?void 0:q.xAxisHeight},A&&T.default.createElement(eg.Label,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},A)),T.default.createElement(em.YAxis,{width:d,hide:!c,axisLine:!1,tickLine:!1,type:"number",domain:Y,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,I.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:i,allowDecimals:k},M&&T.default.createElement(eg.Label,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},M)),T.default.createElement(ef.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:h?({active:e,payload:t,label:s})=>S?T.default.createElement(S,{payload:null==t?void 0:t.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!=(t=z.get(e.dataKey))?t:eN.BaseColors.Gray})}),active:e,label:s}):T.default.createElement(eb.default,{active:e,payload:t,label:s,valueFormatter:i,categoryColors:z}):T.default.createElement(T.default.Fragment,null),position:{y:0}}),p?T.default.createElement(ej.Legend,{verticalAlign:"top",height:E,content:({payload:e})=>(0,ey.default)({payload:e},z,F,P,K?e=>H(e):void 0,w)}):null,a.map(e=>{var t;return T.default.createElement(ed.Line,{className:(0,I.tremorTwMerge)((0,B.getColorClassNames)(null!=(t=z.get(e))?t:eN.BaseColors.Gray,V.colorPalette.text).strokeColor),strokeOpacity:$||P&&P!==e?.3:1,activeDot:e=>{var t;let{cx:a,cy:r,stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,dataKey:c}=e;return T.default.createElement(e_.Dot,{className:(0,I.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,B.getColorClassNames)(null!=(t=z.get(c))?t:eN.BaseColors.Gray,V.colorPalette.text).fillColor),cx:a,cy:r,r:5,fill:"",stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,onClick:(t,a)=>{a.stopPropagation(),K&&(e.index===(null==$?void 0:$.index)&&e.dataKey===(null==$?void 0:$.dataKey)||(0,ev.hasOnlyOneValueForThisKey)(s,e.dataKey)&&P&&P===e.dataKey?(W(void 0),U(void 0),null==C||C(null)):(W(e.dataKey),U({index:e.index,dataKey:e.dataKey}),null==C||C(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var a;let{stroke:r,strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,cx:o,cy:c,dataKey:d,index:u}=t;return(0,ev.hasOnlyOneValueForThisKey)(s,e)&&!($||P&&P!==e)||(null==$?void 0:$.index)===u&&(null==$?void 0:$.dataKey)===e?T.default.createElement(e_.Dot,{key:u,cx:o,cy:c,r:5,stroke:r,fill:"",strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,className:(0,I.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,B.getColorClassNames)(null!=(a=z.get(d))?a:eN.BaseColors.Gray,V.colorPalette.text).fillColor)}):T.default.createElement(T.Fragment,{key:u})},key:e,name:e,type:j,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:x,animationDuration:m,connectNulls:b})}),C?a.map(e=>T.default.createElement(ed.Line,{className:(0,I.tremorTwMerge)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:j,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:b,onClick:(e,t)=>{t.stopPropagation();let{name:s}=e;H(s)}})):null):T.default.createElement(ek.default,{noDataText:v})))});eT.displayName="LineChart";let eC=function({dailyData:e,endpointData:s}){let a=(0,T.useMemo)(()=>{var t;let s,a;return e?.results&&0!==e.results.length?(t=e.results,s=[],a=new Set,t.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>a.add(e))}),t.forEach(e=>{let t={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};a.forEach(s=>{let a=e.breakdown.endpoints?.[s];t[s]=a?.metrics.api_requests||0}),s.push(t)}),s.reverse()):[]},[e]),r=(0,T.useMemo)(()=>0===a.length?[]:Object.keys(a[0]).filter(e=>"date"!==e),[a]);return(0,t.jsxs)(c.Card,{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)(j.Title,{children:"Endpoint Usage Trends"})}),(0,t.jsx)(eT,{className:"h-80",data:a,index:"date",categories:r,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,r.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})]})};var ew=e.i(291542),eS=e.i(309821);e.s(["Progress",()=>eS.default],497650);var eS=eS;let eq=({endpointData:e})=>{let s=Object.entries(e).map(([e,t])=>{var s,a;return{key:e,endpoint:e,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,api_requests:t.metrics.api_requests,total_tokens:t.metrics.total_tokens,spend:t.metrics.spend,successRate:(s=t.metrics.successful_requests,0===(a=t.metrics.api_requests)?0:s/a*100)}}),a=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,s)=>{let a=s.api_requests>0?s.successful_requests/s.api_requests*100:0,r=s.api_requests>0?s.failed_requests/s.api_requests*100:0,l={"0%":"#22c55e"};return a>0&&a<100&&(l[`${a}%`]="#22c55e",l[`${a+.01}%`]="#ef4444"),l["100%"]=r>0?"#ef4444":"#22c55e",(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"flex-1 relative",children:(0,t.jsx)(eS.default,{percent:a+r,size:"small",strokeColor:l,showInfo:!1})}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,t.jsx)("span",{className:"text-green-600 font-medium",children:s.successful_requests.toLocaleString()}),(0,t.jsx)("span",{className:"text-gray-400",children:"/"}),(0,t.jsx)("span",{className:"text-red-600 font-medium",children:s.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 s=e.toFixed(2);return(0,t.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[s,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`}];return(0,t.jsx)(ew.Table,{columns:a,dataSource:s,pagination:!1})},eL=({userSpendData:e})=>{let s=(0,T.useMemo)(()=>{let t={};return e?.results&&e.results.forEach(e=>{Object.entries(e.breakdown.endpoints||{}).forEach(([e,s])=>{t[e]||(t[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:s.metadata||{},api_key_breakdown:{}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.prompt_tokens+=s.metrics.prompt_tokens,t[e].metrics.completion_tokens+=s.metrics.completion_tokens,t[e].metrics.total_tokens+=s.metrics.total_tokens,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests||0,t[e].metrics.failed_requests+=s.metrics.failed_requests||0,t[e].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,t[e].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),t},[e]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(eq,{endpointData:s}),(0,t.jsx)(en,{endpointData:s}),(0,t.jsx)(eC,{dailyData:e,endpointData:s})]})};var eD=e.i(214541),eA=e.i(413990),eM=e.i(785242);let{Text:eO}=N.Typography,eE=({value:e=[],onChange:s,disabled:a,organizationId:r,pageSize:i=20,placeholder:o="Search teams by alias..."})=>{let[c,d]=(0,T.useState)(""),[u,m]=(0,n.useDebouncedState)("",{wait:300}),{data:x,fetchNextPage:h,hasNextPage:p,isFetchingNextPage:g,isLoading:f}=(0,eM.useInfiniteTeams)(i,u||void 0,r),j=(0,T.useMemo)(()=>{if(!x?.pages)return[];let e=new Set,t=[];for(let s of x.pages)for(let a of s.teams)e.has(a.team_id)||(e.add(a.team_id),t.push(a));return t},[x]);return(0,t.jsx)(k.Select,{mode:"multiple",showSearch:!0,placeholder:o,value:e,onChange:e=>s?.(e),disabled:a,allowClear:!0,filterOption:!1,onSearch:e=>{d(e),m(e)},searchValue:c,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&p&&!g&&h()},loading:f,notFoundContent:f?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No teams found",style:{width:"100%"},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]}),children:j.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(eO,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})};var eF=e.i(193523),eF=eF,e$=e.i(916925),eU=e.i(1023),eP=e.i(149121);function eR({topModels:e,topModelsLimit:s,setTopModelsLimit:a}){let[r,l]=(0,T.useState)("table"),i=[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>{let t=e.getValue();return`$${(0,D.formatNumberWithCommas)(t,2)}`}},{header:"Successful",accessorKey:"successful_requests",cell:e=>(0,t.jsx)("span",{className:"text-green-600",children:e.getValue()?.toLocaleString()||0})},{header:"Failed",accessorKey:"failed_requests",cell:e=>(0,t.jsx)("span",{className:"text-red-600",children:e.getValue()?.toLocaleString()||0})},{header:"Tokens",accessorKey:"tokens",cell:e=>e.getValue()?.toLocaleString()||0}],n=e.slice(0,s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:s,onChange:e=>a(e)}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>l("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,t.jsx)("button",{onClick:()=>l("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===r?(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,t.jsx)(o.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(n.length,s)},data:n,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,t.jsx)(eP.DataTable,{columns:i,data:n,renderSubComponent:()=>(0,t.jsx)(t.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})})]})}let eV={tag:F.tagDailyActivityCall,team:F.teamDailyActivityCall,organization:F.organizationDailyActivityCall,customer:F.customerDailyActivityCall,agent:F.agentDailyActivityCall,user:F.userDailyActivityCall},eI=({accessToken:e,entityType:s,entityId:r,entityList:i,dateValue:n})=>{let b,k,v,{teams:N}=(0,eD.default)(),[C,w]=(0,T.useState)([]),[S,q]=(0,T.useState)(5),[L,A]=(0,T.useState)(5),[O,E]=(0,T.useState)(5),$=(0,T.useMemo)(()=>n.from?new Date(n.from):null,[n.from]),U=(0,T.useMemo)(()=>n.to?new Date(n.to):null,[n.to]),P=(0,T.useMemo)(()=>"user"===s?C.length>0?C[0]:null:C.length>0?C:null,[s,C]),R=eV[s],V=!!e&&!!$&&!!U,{data:I,isFetchingMore:B,progress:W,cancelled:Q,cancel:X}=er({fetchFn:R,args:[e,$,U,P],enabled:V}),{data:ee,isFetchingMore:et,progress:es,cancelled:ea,cancel:ei}=er({fetchFn:F.agentDailyActivityCall,args:[e,$,U,null],enabled:V&&"team"===s}),en=(0,M.processActivityData)(I,"models",N||[]),eo=(0,M.processActivityData)(I,"api_keys",N||[]),ec="team"===s?(0,M.processActivityData)(ee,"entities",N||[]):{},ed=()=>{let e={};return I.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={provider:t,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=s.metrics.spend,e[t].requests+=s.metrics.api_requests,e[t].successful_requests+=s.metrics.successful_requests,e[t].failed_requests+=s.metrics.failed_requests,e[t].tokens+=s.metrics.total_tokens}catch(e){console.error(`Error processing provider ${t}: ${e}`)}})}),Object.values(e).filter(e=>e.spend>0).sort((e,t)=>t.spend-e.spend)},eu=(e,t)=>{if(i){let t=i.find(t=>t.value===e);if(t)return t.label}return t?.team_alias?t.team_alias:e},em=()=>{var e;let t={};return I.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,s])=>{t[e]||(t[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:eu(e,s.metadata),id:e}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests,t[e].metrics.failed_requests+=s.metrics.failed_requests,t[e].metrics.total_tokens+=s.metrics.total_tokens})}),e=Object.values(t).sort((e,t)=>t.metrics.spend-e.metrics.spend),0===C.length?e:e.filter(e=>C.includes(e.metadata.id))},ex=s.charAt(0).toUpperCase()+s.slice(1);return(0,t.jsxs)("div",{style:{width:"100%"},className:"relative",children:[B&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",W.currentPage," / ",W.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:X,children:"Stop"})]})}),Q&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",W.currentPage,"/",W.totalPages," pages loaded)"]})}),et&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:ei,children:"Stop"})]})}),ea&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial agent data (",es.currentPage,"/",es.totalPages," pages loaded)"]})}),"team"===s&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by team"}),(0,t.jsx)(eE,{value:C,onChange:w})]}),(0,t.jsx)(eF.default,{dateValue:n,entityType:s,spendData:I,showFilters:"team"!==s&&null!==i&&i.length>0,filterLabel:`Filter by ${s}`,filterPlaceholder:`Select ${s} to filter...`,selectedFilters:C,onFiltersChange:w,filterOptions:(()=>{if(i)return i})()||void 0,filterMode:"user"===s?"single":"multiple",teams:N||[]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"agent"===s?"Request / Token Consumption":"Model Activity"}),"team"===s?(0,t.jsx)(m.Tab,{children:"Agent Activity"}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)(j.Title,{children:[ex," Spend Overview"]}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Spend"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)(I.metadata.total_spend,2)]})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:I.metadata.total_api_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:I.metadata.total_successful_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:I.metadata.total_failed_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:I.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),(0,t.jsx)(o.BarChart,{data:[...I.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload,r=Object.keys(a.breakdown.entities||{}).length;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",a.metrics.total_tokens]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total ",ex,"s: ",r]}),(0,t.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,t.jsxs)("p",{className:"font-semibold",children:["Spend by ",ex,":"]}),Object.entries(a.breakdown.entities||{}).sort(([,e],[,t])=>{let s=e.metrics.spend;return t.metrics.spend-s}).slice(0,5).map(([e,s])=>(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:[eu(e,s.metadata),": $",(0,D.formatNumberWithCommas)(s.metrics.spend,2)]},e)),r>5&&(0,t.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",r-5," more"]})]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,t.jsxs)(j.Title,{children:["Spend Per ",ex]}),(0,t.jsx)(z.Subtitle,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,t.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,t.jsxs)("span",{children:["Get Started by Tracking cost per ",ex," "]}),(0,t.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,t.jsxs)(u.Grid,{numItems:2,className:"gap-6",children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(o.BarChart,{className:"mt-4 h-52",data:em().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:el.valueFormatterSpend,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.metadata.alias}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,4)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.metrics.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.metrics.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens.toLocaleString()]})]})}})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,t.jsxs)(Y.Table,{children:[(0,t.jsx)(K.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:ex}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:em().filter(e=>e.metrics.spend>0).map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:e.metadata.alias}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.metrics.spend,4)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:(console.log("debugTags",{spendData:I}),b={},I.results.forEach(e=>{let{breakdown:t}=e,{entities:s}=t;console.log("debugTags",{entities:s});let a=Object.keys(s).reduce((e,t)=>{let{api_key_breakdown:a}=s[t];return Object.keys(a).forEach(s=>{let r={tag:t,usage:a[s].metrics.spend};e[s]?e[s].push(r):e[s]=[r]}),e},{});console.log("debugTags",{tagDictionary:a}),Object.entries(e.breakdown.api_keys||{}).forEach(([e,t])=>{b[e]||(b[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:t.metadata.key_alias,team_id:t.metadata.team_id||null,tags:a[e]||[]}},console.log("debugTags",{keySpend:b})),b[e].metrics.spend+=t.metrics.spend,b[e].metrics.prompt_tokens+=t.metrics.prompt_tokens,b[e].metrics.completion_tokens+=t.metrics.completion_tokens,b[e].metrics.total_tokens+=t.metrics.total_tokens,b[e].metrics.api_requests+=t.metrics.api_requests,b[e].metrics.successful_requests+=t.metrics.successful_requests,b[e].metrics.failed_requests+=t.metrics.failed_requests,b[e].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,b[e].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(b).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||"-",spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,S)),teams:null,showTags:"tag"===s,topKeysLimit:S,setTopKeysLimit:q})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"agent"===s?"Top Agents":"Top Models"}),(0,t.jsx)(eR,{topModels:(k={},I.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,t])=>{k[e]||(k[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{k[e].spend+=t.metrics.spend}catch(s){console.error(`Error adding spend for ${e}: ${s}, got metrics: ${JSON.stringify(t)}`)}k[e].requests+=t.metrics.api_requests,k[e].successful_requests+=t.metrics.successful_requests,k[e].failed_requests+=t.metrics.failed_requests,k[e].tokens+=t.metrics.total_tokens})}),Object.entries(k).map(([e,t])=>({key:e,...t})).sort((e,t)=>t.spend-e.spend).slice(0,L)),topModelsLimit:L,setTopModelsLimit:A})]})}),"team"===s&&(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Agents Driving Spend"}),(0,t.jsx)(eR,{topModels:(v={},ee.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,t])=>{v[e]||(v[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0,agent_name:t.metadata?.agent_name||e}),v[e].spend+=t.metrics.spend,v[e].requests+=t.metrics.api_requests,v[e].successful_requests+=t.metrics.successful_requests,v[e].failed_requests+=t.metrics.failed_requests,v[e].tokens+=t.metrics.total_tokens})}),Object.entries(v).map(([e,t])=>({key:t.agent_name,...t})).sort((e,t)=>t.spend-e.spend).slice(0,O)),topModelsLimit:O,setTopModelsLimit:E})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsx)(j.Title,{children:"Provider Usage"}),(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:ed(),index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan","blue","indigo","violet","purple"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(Y.Table,{children:[(0,t.jsx)(K.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:ed().map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)("img",{src:(0,e$.getProviderLogoAndName)(e.provider).logo,alt:`${e.provider} logo`,className:"w-4 h-4",onError:t=>{let s=t.target,a=s.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.provider?.charAt(0)||"-",a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:en,hidePromptCachingMetrics:"agent"===s})}),"team"===s?(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:ec})}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:eo,hidePromptCachingMetrics:"agent"===s})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:I})})]})]})]})};var eB=e.i(793130),eW=e.i(418371);let ez=({loading:e,isDateChanging:s,providerSpend:a})=>{let[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),m=a.filter(e=>e.provider?.toLowerCase()==="unknown"?n:!!l||e.spend>0);return(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(j.Title,{children:"Spend by Provider"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Zero Spend"}),(0,t.jsx)(eB.Switch,{checked:l,onChange:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Unknown"}),(0,t.jsx)(v.Tooltip,{title:"Requests that failed to route to a provider",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(eB.Switch,{checked:n,onChange:o})]})]})]}),e?(0,t.jsx)(P,{isDateChanging:s}):(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:m,index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(Y.Table,{children:[(0,t.jsx)(K.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:m.map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)(eW.ProviderLogo,{provider:e.provider,className:"w-4 h-4"}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})};var eY=e.i(311451),eK=e.i(482725),eH=e.i(918789);let{TextArea:eG}=eY.Input,eZ={get_usage_data:"📊",get_team_usage_data:"👥",get_tag_usage_data:"🏷️"},eJ=({step:e})=>{let s=eZ[e.tool_name]||"🔧",a=e.arguments,r=a.start_date&&a.end_date?`${a.start_date} → ${a.end_date}`:"",l=a.team_ids||a.tags||a.user_id||"";return(0,t.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,t.jsx)("span",{className:"flex-shrink-0 mt-0.5",children:"running"===e.status?(0,t.jsx)(eK.Spin,{size:"small"}):"error"===e.status?(0,t.jsx)("span",{className:"text-red-500",children:"✗"}):(0,t.jsx)("span",{className:"text-green-600",children:"✓"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"font-medium text-gray-700",children:[s," ",e.tool_label]}),r&&(0,t.jsx)("div",{className:"text-gray-500 mt-0.5",children:r}),l&&(0,t.jsxs)("div",{className:"text-gray-500 mt-0.5",children:["Filter: ",l]}),"error"===e.status&&e.error&&(0,t.jsx)("div",{className:"text-red-600 mt-0.5",children:e.error})]})]})},eQ=({content:e})=>(0,t.jsx)(eH.default,{components:{p:({children:e})=>(0,t.jsx)("p",{className:"mb-2 last:mb-0",children:e}),strong:({children:e})=>(0,t.jsx)("strong",{className:"font-semibold",children:e}),ul:({children:e})=>(0,t.jsx)("ul",{className:"list-disc pl-4 mb-2 space-y-0.5",children:e}),ol:({children:e})=>(0,t.jsx)("ol",{className:"list-decimal pl-4 mb-2 space-y-0.5",children:e}),li:({children:e})=>(0,t.jsx)("li",{children:e}),h1:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h2:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h3:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),code:({children:e,className:s})=>s?.includes("language-")?(0,t.jsx)("pre",{className:"bg-gray-100 rounded p-2 my-1 overflow-x-auto text-xs",children:(0,t.jsx)("code",{children:e})}):(0,t.jsx)("code",{className:"px-1 py-0.5 rounded bg-gray-100 text-xs font-mono",children:e}),table:({children:e})=>(0,t.jsx)("div",{className:"overflow-x-auto my-2",children:(0,t.jsx)("table",{className:"text-xs border-collapse w-full",children:e})}),th:({children:e})=>(0,t.jsx)("th",{className:"border border-gray-200 px-2 py-1 bg-gray-50 font-medium text-left",children:e}),td:({children:e})=>(0,t.jsx)("td",{className:"border border-gray-200 px-2 py-1",children:e})},children:e}),eX=({open:e,onClose:s,accessToken:a})=>{let[r,l]=(0,T.useState)([]),[i,n]=(0,T.useState)(""),[o,c]=(0,T.useState)(!1),[d,u]=(0,T.useState)(void 0),[m,x]=(0,T.useState)([]),[h,p]=(0,T.useState)(!1),[g,f]=(0,T.useState)(""),[j,_]=(0,T.useState)(null),[b,v]=(0,T.useState)([]),N=(0,T.useRef)(null),C=(0,T.useRef)(null);(0,T.useEffect)(()=>{e&&0===m.length&&w()},[e]),(0,T.useEffect)(()=>{"function"==typeof N.current?.scrollIntoView&&N.current.scrollIntoView({behavior:"smooth"})},[r,g,b,j]);let w=async()=>{if(a){p(!0);try{let e=await (0,F.modelHubCall)(a);if(e?.data?.length>0){let t=e.data.map(e=>e.model_group).sort();x(t)}}catch(e){console.error("Failed to load models:",e)}finally{p(!1)}}},S=async()=>{if(!a||!i.trim()||o)return;let e=[...r,{role:"user",content:i.trim()}];l(e),n(""),c(!0),f(""),_(null),v([]);let t=new AbortController;C.current=t;let s="",u=[];try{await (0,F.usageAiChatStream)(a,e.slice(-20).map(e=>({role:e.role,content:e.content})),d||"",e=>{_(null),s+=e,f(s)},()=>{_(null),v([]),l(e=>[...e,{role:"assistant",content:s,toolCalls:u.length>0?[...u]:void 0}]),f("")},e=>{_(null),v([]),l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")},e=>{_(e)},e=>{let t=u.findIndex(t=>t.tool_name===e.tool_name);t>=0?u[t]={...e}:u.push({...e}),v([...u])},t.signal)}catch(s){if(s?.name==="AbortError"||t.signal.aborted)return;let e=s?.message||"Failed to get response. Please try again.";l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")}finally{c(!1),C.current=null}};return(0,t.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,t.jsxs)("div",{className:"px-5 pt-5 pb-3 border-b border-gray-100 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-blue-600",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.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,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"Ask AI"})]}),(0,t.jsx)("button",{onClick:()=>{C.current&&C.current.abort(),s()},className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100",children:(0,t.jsx)("svg",{className:"w-5 h-5",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.jsx)("p",{className:"text-xs text-gray-500",children:"Ask about your spend, models, keys, and trends"})]}),(0,t.jsx)("div",{className:"px-5 py-3 border-b border-gray-100 flex-shrink-0",children:(0,t.jsx)(k.Select,{placeholder:"Select a model (optional, defaults to gpt-4o-mini)",value:d,onChange:e=>u(e),loading:h,showSearch:!0,allowClear:!0,size:"small",className:"w-full",options:m.map(e=>({label:e,value:e})),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-gray-50",children:[0===r.length&&!g&&!o&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[(0,t.jsx)("svg",{className:"w-8 h-8 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.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,t.jsx)("p",{className:"text-sm font-medium",children:"Ask a question about your usage"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:'e.g. "Which model costs me the most?"'})]}),r.map((e,s)=>(0,t.jsx)("div",{children:"user"===e.role?(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.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,t.jsxs)("div",{className:"space-y-2",children:[e.toolCalls&&e.toolCalls.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:e.toolCalls.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),(0,t.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,t.jsx)(eQ,{content:e.content})})]})},s)),o&&b.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:b.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),o&&!g&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-gray-500",children:[(0,t.jsx)(eK.Spin,{size:"small"}),(0,t.jsx)("span",{className:"italic",children:j||"Thinking..."})]}),g&&(0,t.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,t.jsx)(eQ,{content:g})}),(0,t.jsx)("div",{ref:N})]}),(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-gray-200 bg-white flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(eG,{value:i,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),S())},placeholder:"Ask about your usage...",autoSize:{minRows:1,maxRows:3},className:"flex-1",disabled:o}),(0,t.jsx)(y.Button,{type:"primary",onClick:S,disabled:!i.trim()||o,loading:o,children:"Send"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,t.jsx)("button",{onClick:()=>{l([]),f(""),v([]),_(null)},className:"text-xs text-gray-400 hover:text-gray-600 transition-colors",disabled:0===r.length,children:"Clear chat"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Enter to send"})]})]})]})};var e0=e.i(299251),e1=e.i(153702),e2=e.i(160818),e5=e.i(777579),e4=e.i(983561);e.i(247167);var e6=e.i(931067);let e3={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 e7=e.i(9583),e9=T.forwardRef(function(e,t){return T.createElement(e7.default,(0,e6.default)({},e,{ref:t,icon:e3}))}),e8=e.i(232164),te=e.i(645526),tt=e.i(771674),ts=e.i(906579);let ta=[{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,t.jsx)(e2.GlobalOutlined,{style:{fontSize:"16px"}})},{value:"my-usage",label:"Your Usage",description:"View your own usage",icon:(0,t.jsx)(tt.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,t.jsx)(e0.BankOutlined,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,t.jsx)(te.TeamOutlined,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,t.jsx)(e9,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,t.jsx)(e8.TagsOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,t.jsx)(e4.RobotOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user",label:"User Usage",description:"View usage by individual users",icon:(0,t.jsx)(tt.UserOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,t.jsx)(e5.LineChartOutlined,{style:{fontSize:"16px"}}),adminOnly:!0}],tr=({value:e,onChange:s,isAdmin:a,title:r="Usage View",description:l="Select the usage data you want to view","data-id":i})=>{let n=ta.filter(e=>!e.adminOnly||!!a).map(e=>{let t=e.label,s=e.description;return e.showForAdmin&&e.showForNonAdmin&&(t=a?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(s=a?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:t,description:s,icon:e.icon,badgeText:e.badgeText}});return(0,t.jsx)("div",{className:"w-full","data-id":i,children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,t.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,t.jsx)("div",{className:"flex-shrink-0 flex items-center",children:(0,t.jsx)(e1.BarChartOutlined,{style:{fontSize:"32px"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:r}),(0,t.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:l})]})]}),(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)(k.Select,{value:e,onChange:s,className:"w-54 sm:w-64 md:w-72",size:"large",options:n.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:s.icon}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.label}),(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:s.description})]}),s.badgeText&&(0,t.jsx)("div",{className:"items-center",children:(0,t.jsx)(ts.Badge,{color:"blue",count:s.badgeText})})]}):e.label},labelRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:s.icon}),(0,t.jsx)("span",{className:"text-sm",children:s.label})]}):e.label}})})]})})};e.s(["default",0,({teams:e,organizations:U})=>{let R,{accessToken:V,userRole:I,userId:B,premiumUser:W}=(0,S.default)(),[z,Y]=(0,T.useState)(null),[K,H]=(0,T.useState)(!1),[G,Z]=(0,T.useState)(!1),[J,Q]=(0,T.useState)(!1),X=(0,T.useMemo)(()=>new Date(Date.now()-6048e5),[]),es=(0,T.useMemo)(()=>new Date,[]),[ea,ei]=(0,T.useState)({from:X,to:es}),[en,eo]=(0,T.useState)([]),{data:ec=[]}=(0,w.useCustomers)(),{data:ed}=(0,C.useAgents)(),{data:eu}=(0,q.useCurrentUser)();console.log(`currentUser: ${JSON.stringify(eu)}`),console.log(`currentUser max budget: ${eu?.max_budget}`);let em=A.all_admin_roles.includes(I||""),[ex,eh]=(0,T.useState)(""),[ep,eg]=(0,n.useDebouncedState)("",{wait:300}),{data:ef,fetchNextPage:ej,hasNextPage:e_,isFetchingNextPage:ey,isLoading:eb}=(0,L.useInfiniteUsers)(50,ep||void 0),ek=(0,T.useMemo)(()=>{if(!ef?.pages)return[];let e=new Set,t=[];for(let s of ef.pages)for(let a of s.users)e.has(a.user_id)||(e.add(a.user_id),t.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 t},[ef]),[ev,eN]=(0,T.useState)(em?null:B||null),[eT,eC]=(0,T.useState)("groups"),[ew,eS]=(0,T.useState)(!1),[eq,eD]=(0,T.useState)(!1),[eA,eM]=(0,T.useState)(!1),[eO,eE]=(0,T.useState)("global"),[eF,e$]=(0,T.useState)(!0),[eP,eR]=(0,T.useState)(5),[eV,eB]=(0,T.useState)(5),[eW,eY]=(0,T.useState)(!1),eK=async()=>{V&&eo(Object.values(await (0,F.tagListCall)(V)).map(e=>({label:e.name,value:e.name})))};(0,T.useEffect)(()=>{eK()},[V]),(0,T.useEffect)(()=>{!em&&B&&eN(B)},[em,B]);let eH="my-usage"!==eO&&em?ev:B||null,eG=(0,T.useMemo)(()=>ea.from?new Date(ea.from):null,[ea.from]),eZ=(0,T.useMemo)(()=>ea.to?new Date(ea.to):null,[ea.to]),eJ=(0,T.useRef)(0);(0,T.useEffect)(()=>{if(!V||!eG||!eZ)return;let e=++eJ.current;Z(!0),H(!1),Y(null),(0,F.userDailyActivityAggregatedCall)(V,eG,eZ,eH).then(t=>{eJ.current===e&&(Y(t),Z(!1),Q(!1))}).catch(()=>{eJ.current===e&&(H(!0),Z(!1))})},[V,eG,eZ,eH]);let eQ=er({fetchFn:F.userDailyActivityCall,args:[V,eG,eZ,eH],enabled:K&&!!V&&!!eG&&!!eZ}),e0=(0,T.useMemo)(()=>z||(K?eQ.data:{results:[],metadata:{}}),[z,K,eQ.data]),e1=G||eQ.loading;(0,T.useEffect)(()=>{K&&!eQ.loading&&eQ.data.results.length>0&&Q(!1)},[K,eQ.loading,eQ.data.results.length]);let e2=(0,T.useCallback)(e=>{Q(!0),ei(e)},[]),e5=e0.metadata?.total_spend||0,e4=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.models||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e6=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.model_groups||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e3=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({provider:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}))},[e0.results]),e7=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.api_keys||{}).forEach(([t,s])=>{e[t]||(e[t]={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:null,tags:s.metadata.tags||[]}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests,e[t].metrics.failed_requests+=s.metrics.failed_requests,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||[],spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,eP)},[e0.results,eP]),e9=(0,T.useMemo)(()=>[...e0.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),[e0.results]),e8=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"models",e),[e0,e]),te=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"api_keys",e),[e0,e]),tt=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"mcp_servers",e),[e0,e]);return(0,t.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,t.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,t.jsx)(tr,{value:eO,onChange:e=>eE(e),isAdmin:em}),(0,t.jsx)($.default,{value:ea,onValueChange:e2})]}),eQ.isFetchingMore&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",eQ.progress.currentPage," /"," ",eQ.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:eQ.cancel,children:"Stop"})]})}),eQ.cancelled&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",eQ.progress.currentPage,"/",eQ.progress.totalPages," ","pages loaded)"]})}),("global"===eO||"my-usage"===eO)&&(0,t.jsxs)(t.Fragment,{children:[em&&"global"===eO&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by user"}),(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!0,style:{width:"100%"},placeholder:"Select user to filter...",value:ev,onChange:e=>eN(e??null),filterOption:!1,onSearch:e=>{eh(e),eg(e)},searchValue:ex,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&e_&&!ey&&ej()},loading:eb,notFoundContent:eb?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No users found",options:ek,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,ey&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]})})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"Model Activity"}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"MCP Server Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Button,{onClick:()=>eM(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.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,t.jsx)(y.Button,{onClick:()=>eD(!0),icon:(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:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsxs)(d.Col,{numColSpan:2,children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mt-2 mb-2",children:(0,t.jsxs)(f.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content text-lg",children:["Project Spend"," ",ea.from&&ea.to&&(0,t.jsxs)(t.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,t.jsx)(et.default,{userSpend:e5,selectedTeam:null,userMaxBudget:eu?.max_budget||null})]}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Usage Metrics"}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_api_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_successful_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.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,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:e0.metadata?.total_failed_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Average Cost per Request"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)((e5||0)/(e0.metadata?.total_api_requests||1),4)]})]}),(0,t.jsxs)(c.Card,{className:"cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>eY(!eW),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),eW?(0,t.jsx)(s.DownOutlined,{className:"text-gray-400 text-xs"}):(0,t.jsx)(i.RightOutlined,{className:"text-gray-400 text-xs"})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_tokens?.toLocaleString()||0})]})]}),eW&&(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Input Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-blue-600",children:Math.max(0,(e0.metadata?.total_prompt_tokens||0)-(e0.metadata?.total_cache_read_input_tokens||0)-(e0.metadata?.total_cache_creation_input_tokens||0)).toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Output Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-cyan-600",children:e0.metadata?.total_completion_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Read Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_cache_read_input_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Write Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-purple-600",children:e0.metadata?.total_cache_creation_input_tokens?.toLocaleString()||0})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)(o.BarChart,{data:e9,index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:e7,teams:null,topKeysLimit:eP,setTopKeysLimit:eR})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"groups"===eT?"Top Public Model Names":"Top Litellm Models"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eV,onChange:e=>eB(e)}),(0,t.jsxs)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"groups"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("groups"),children:"Public Model Name"}),(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"individual"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("individual"),children:"Litellm Model Name"})]})]}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(R="groups"===eT?e6:e4,(0,t.jsx)(o.BarChart,{className:"mt-4",style:{height:52*Math.min(R.length,eV)},data:R,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.key}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.tokens.toLocaleString()]})]})}}))})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(ez,{loading:e1,isDateChanging:J,providerSpend:e3})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:e8})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:te})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:tt})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:e0})})]})]})]}),"organization"===eO&&(0,t.jsx)(eI,{accessToken:V,entityType:"organization",userID:B,userRole:I,dateValue:ea,entityList:U?.map(e=>({label:e.organization_alias,value:e.organization_id}))||null,premiumUser:W}),"team"===eO&&(0,t.jsx)(eI,{accessToken:V,entityType:"team",userID:B,userRole:I,entityList:e?.map(e=>({label:e.team_alias,value:e.team_id}))||null,premiumUser:W,dateValue:ea}),"customer"===eO&&(0,t.jsx)(eI,{accessToken:V,entityType:"customer",userID:B,userRole:I,entityList:ec?.map(e=>({label:e.alias||e.user_id,value:e.user_id}))||null,premiumUser:W,dateValue:ea}),"tag"===eO&&(0,t.jsxs)(t.Fragment,{children:[eF&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",message:"Reusable credentials are automatically tracked as tags",description:(0,t.jsxs)(N.Typography.Text,{children:["When a reusable credential is used, it will appear as a tag prefixed with"," ",(0,t.jsx)(N.Typography.Text,{code:!0,children:"Credential: "}),"in this view."]}),closable:!0,onClose:()=>e$(!1),className:"mb-5"}),(0,t.jsx)(eI,{accessToken:V,entityType:"tag",userID:B,userRole:I,entityList:en,premiumUser:W,dateValue:ea})]}),"agent"===eO&&(0,t.jsx)(eI,{accessToken:V,entityType:"agent",userID:B,userRole:I,entityList:ed?.agents?.map(e=>({label:e.agent_name,value:e.agent_id}))||null,premiumUser:W,dateValue:ea}),"user"===eO&&(0,t.jsx)(eI,{accessToken:V,entityType:"user",userID:B,userRole:I,entityList:ek.length>0?ek:null,premiumUser:W,dateValue:ea}),"user-agent-activity"===eO&&(0,t.jsx)(ee,{accessToken:V,userRole:I,dateValue:ea})]})}),(0,t.jsx)(O.default,{isOpen:ew,onClose:()=>eS(!1),accessToken:V}),(0,t.jsx)(E.default,{isOpen:eq,onClose:()=>eD(!1),entityType:"team",spendData:{results:e0.results,metadata:e0.metadata},dateRange:ea,selectedFilters:[],customTitle:"Export Usage Data"}),(0,t.jsx)(eX,{open:eA,onClose:()=>eM(!1),accessToken:V})]})}],797305)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/fa8dcdcf9803fe4f.js b/litellm/proxy/_experimental/out/_next/static/chunks/fa8dcdcf9803fe4f.js deleted file mode 100644 index e4c18b6c1d..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/fa8dcdcf9803fe4f.js +++ /dev/null @@ -1,8 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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 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(["ClockCircleOutlined",0,o],637235)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},959013,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:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};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(["default",0,o],959013)},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(529681);let o=e=>{let{prefixCls:a,className:l,style:o,size:i,shape:n}=e,s=(0,r.default)({[`${a}-lg`]:"large"===i,[`${a}-sm`]:"small"===i}),d=(0,r.default)({[`${a}-circle`]:"circle"===n,[`${a}-square`]:"square"===n,[`${a}-round`]:"round"===n}),c=t.useMemo(()=>"number"==typeof i?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return t.createElement("span",{className:(0,r.default)(a,s,d,l),style:Object.assign(Object.assign({},c),o)})};e.i(296059);var i=e.i(694758),n=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new i.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,n.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),f=e=>Object.assign({width:e},u(e)),h=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),p=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:l,skeletonButtonCls:o,skeletonInputCls:i,skeletonImageCls:n,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:p,padding:v,marginSM:C,borderRadius:x,titleHeight:w,blockRadius:k,paragraphLiHeight:$,controlHeightXS:y,paragraphMarginTop:N}=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:p},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:w,background:p,borderRadius:k,[`+ ${l}`]:{marginBlockStart:u}},[l]:{padding:0,"> li":{width:"100%",height:$,listStyle:"none",background:p,borderRadius:k,"+ li":{marginBlockStart:y}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${l} > li`]:{borderRadius:x}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:C,[`+ ${l}`]:{marginBlockStart:N}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:l,controlHeightSM:o,gradientFromColor:i,calc:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:n(a).mul(2).equal(),minWidth:n(a).mul(2).equal()},b(a,n))},h(e,a,r)),{[`${r}-lg`]:Object.assign({},b(l,n))}),h(e,l,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(o,n))}),h(e,o,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:l,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(l)),[`${t}${t}-sm`]:Object.assign({},m(o))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:l,controlHeightSM:o,gradientFromColor:i,calc:n}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:r},g(t,n)),[`${a}-lg`]:Object.assign({},g(l,n)),[`${a}-sm`]:Object.assign({},g(o,n))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:l,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:l},f(o(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},f(r)),{maxWidth:o(r).mul(4).equal(),maxHeight:o(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[` - ${a}, - ${l} > li, - ${r}, - ${o}, - ${i}, - ${n} - `]:Object.assign({},{background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:c,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: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:a,className:l,style:o,rows:i=0}=e,n=Array.from({length:i}).map((r,a)=>t.createElement("li",{key:a,style:{width:((e,t)=>{let{width:r,rows:a=2}=t;return Array.isArray(r)?r[e]:a-1===e?r:void 0})(a,e)}}));return t.createElement("ul",{className:(0,r.default)(a,l),style:o},n)},C=({prefixCls:e,className:a,width:l,style:o})=>t.createElement("h3",{className:(0,r.default)(e,a),style:Object.assign({width:l},o)});function x(e){return e&&"object"==typeof e?e:{}}let w=e=>{let{prefixCls:l,loading:i,className:n,rootClassName:s,style:d,children:c,avatar:u=!1,title:m=!0,paragraph:g=!0,active:f,round:h}=e,{getPrefixCls:b,direction:w,className:k,style:$}=(0,a.useComponentConfig)("skeleton"),y=b("skeleton",l),[N,j,E]=p(y);if(i||!("loading"in e)){let e,a,l=!!u,i=!!m,c=!!g;if(l){let r=Object.assign(Object.assign({prefixCls:`${y}-avatar`},i&&!c?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),x(u));e=t.createElement("div",{className:`${y}-header`},t.createElement(o,Object.assign({},r)))}if(i||c){let e,r;if(i){let r=Object.assign(Object.assign({prefixCls:`${y}-title`},!l&&c?{width:"38%"}:l&&c?{width:"50%"}:{}),x(m));e=t.createElement(C,Object.assign({},r))}if(c){let e,a=Object.assign(Object.assign({prefixCls:`${y}-paragraph`},(e={},l&&i||(e.width="61%"),!l&&i?e.rows=3:e.rows=2,e)),x(g));r=t.createElement(v,Object.assign({},a))}a=t.createElement("div",{className:`${y}-content`},e,r)}let b=(0,r.default)(y,{[`${y}-with-avatar`]:l,[`${y}-active`]:f,[`${y}-rtl`]:"rtl"===w,[`${y}-round`]:h},k,n,s,j,E);return N(t.createElement("div",{className:b,style:Object.assign(Object.assign({},$),d)},e,a))}return null!=c?c:null};w.Button=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,block:c=!1,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-button`,size:u},v))))},w.Avatar=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,shape:c="circle",size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls","className"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-avatar`,shape:c,size:u},v))))},w.Input=e=>{let{prefixCls:i,className:n,rootClassName:s,active:d,block:c,size:u="default"}=e,{getPrefixCls:m}=t.useContext(a.ConfigContext),g=m("skeleton",i),[f,h,b]=p(g),v=(0,l.default)(e,["prefixCls"]),C=(0,r.default)(g,`${g}-element`,{[`${g}-active`]:d,[`${g}-block`]:c},n,s,h,b);return f(t.createElement("div",{className:C},t.createElement(o,Object.assign({prefixCls:`${g}-input`,size:u},v))))},w.Image=e=>{let{prefixCls:l,className:o,rootClassName:i,style:n,active:s}=e,{getPrefixCls:d}=t.useContext(a.ConfigContext),c=d("skeleton",l),[u,m,g]=p(c),f=(0,r.default)(c,`${c}-element`,{[`${c}-active`]:s},o,i,m,g);return u(t.createElement("div",{className:f},t.createElement("div",{className:(0,r.default)(`${c}-image`,o),style:n},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`})))))},w.Node=e=>{let{prefixCls:l,className:o,rootClassName:i,style:n,active:s,children:d}=e,{getPrefixCls:c}=t.useContext(a.ConfigContext),u=c("skeleton",l),[m,g,f]=p(u),h=(0,r.default)(u,`${u}-element`,{[`${u}-active`]:s},g,o,i,f);return m(t.createElement("div",{className:h},t.createElement("div",{className:(0,r.default)(`${u}-image`,o),style:n},d)))},e.s(["default",0,w],185793)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),a=e.i(271645);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],o=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,n=(e,t,r,a,l)=>{clearTimeout(a.current);let i=o(e);t(i),r.current=i,l&&l({current:i})};var s=e.i(480731),d=e.i(444755),c=e.i(673706);let u=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 g={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"}},f=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,c.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,d.tremorTwMerge)((0,c.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,c.getColorClassNames)(t,m.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,c.getColorClassNames)(t,m.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,c.getColorClassNames)(t,m.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,c.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},h=(0,c.makeClassName)("Button"),b=({loading:e,iconSize:t,iconPosition:r,Icon:l,needMargin:o,transitionStatus:i})=>{let n=o?r===s.HorizontalPositions.Left?(0,d.tremorTwMerge)("-ml-1","mr-1.5"):(0,d.tremorTwMerge)("-mr-1","ml-1.5"):"",c=(0,d.tremorTwMerge)("w-0 h-0"),m={default:c,entering:c,entered:t,exiting:t,exited:c};return e?a.default.createElement(u,{className:(0,d.tremorTwMerge)(h("icon"),"animate-spin shrink-0",n,m.default,m[i]),style:{transition:"width 150ms"}}):a.default.createElement(l,{className:(0,d.tremorTwMerge)(h("icon"),"shrink-0",t,n)})},p=a.default.forwardRef((e,l)=>{let{icon:u,iconPosition:m=s.HorizontalPositions.Left,size:p=s.Sizes.SM,color:v,variant:C="primary",disabled:x,loading:w=!1,loadingText:k,children:$,tooltip:y,className:N}=e,j=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),E=w||x,T=void 0!==u||w,O=w&&k,M=!(!$&&!O),S=(0,d.tremorTwMerge)(g[p].height,g[p].width),R="light"!==C?(0,d.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",z=f(C,v),B=("light"!==C?{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"}})[p],{tooltipProps:q,getReferenceProps:P}=(0,r.useTooltip)(300),[H,L]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:l,timeout:s,initialEntered:d,mountOnEnter:c,unmountOnExit:u,onStateChange:m}={})=>{let[g,f]=(0,a.useState)(()=>o(d?2:i(c))),h=(0,a.useRef)(g),b=(0,a.useRef)(0),[p,v]="object"==typeof s?[s.enter,s.exit]:[s,s],C=(0,a.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(h.current._s,u);e&&n(e,f,h,b,m)},[m,u]);return[g,(0,a.useCallback)(a=>{let o=e=>{switch(n(e,f,h,b,m),e){case 1:p>=0&&(b.current=((...e)=>setTimeout(...e))(C,p));break;case 4:v>=0&&(b.current=((...e)=>setTimeout(...e))(C,v));break;case 0:case 3:b.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||o(e+1)},0)}},s=h.current.isEnter;"boolean"!=typeof a&&(a=!s),a?s||o(e?+!r:2):s&&o(t?l?3:4:i(u))},[C,m,e,t,r,l,p,v,u]),C]})({timeout:50});return(0,a.useEffect)(()=>{L(w)},[w]),a.default.createElement("button",Object.assign({ref:(0,c.mergeRefs)([l,q.refs.setReference]),className:(0,d.tremorTwMerge)(h("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",R,B.paddingX,B.paddingY,B.fontSize,z.textColor,z.bgColor,z.borderColor,z.hoverBorderColor,E?"opacity-50 cursor-not-allowed":(0,d.tremorTwMerge)(f(C,v).hoverTextColor,f(C,v).hoverBgColor,f(C,v).hoverBorderColor),N),disabled:E},P,j),a.default.createElement(r.default,Object.assign({text:y},q)),T&&m!==s.HorizontalPositions.Right?a.default.createElement(b,{loading:w,iconSize:S,iconPosition:m,Icon:u,transitionStatus:H.status,needMargin:M}):null,O||$?a.default.createElement("span",{className:(0,d.tremorTwMerge)(h("text"),"text-tremor-default whitespace-nowrap")},O?k:$):null,T&&m===s.HorizontalPositions.Right?a.default.createElement(b,{loading:w,iconSize:S,iconPosition:m,Icon:u,transitionStatus:H.status,needMargin:M}):null)});p.displayName="Button",e.s(["Button",()=>p],994388)},269200,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("Table"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement("div",{className:(0,a.tremorTwMerge)(l("root"),"overflow-auto",n)},r.default.createElement("table",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),i))});o.displayName="Table",e.s(["Table",()=>o],269200)},942232,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableBody"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tbody",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",n)},s),i))});o.displayName="TableBody",e.s(["TableBody",()=>o],942232)},977572,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableCell"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("td",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"align-middle whitespace-nowrap text-left p-4",n)},s),i))});o.displayName="TableCell",e.s(["TableCell",()=>o],977572)},427612,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHead"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("thead",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",n)},s),i))});o.displayName="TableHead",e.s(["TableHead",()=>o],427612)},64848,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableHeaderCell"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("th",Object.assign({ref:o,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",n)},s),i))});o.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>o],64848)},496020,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(444755);let l=(0,e.i(673706).makeClassName)("TableRow"),o=r.default.forwardRef((e,o)=>{let{children:i,className:n}=e,s=(0,t.__rest)(e,["children","className"]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("tr",Object.assign({ref:o,className:(0,a.tremorTwMerge)(l("row"),n)},s),i))});o.displayName="TableRow",e.s(["TableRow",()=>o],496020)},68155,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 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,r],68155)},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)},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)},530212,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 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,r],530212)},519756,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:"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 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(["UploadOutlined",0,o],519756)},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),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])},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",()=>t])},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),i=e.i(983561),n=e.i(689020);e.s(["default",0,({accessToken:e,value:s,placeholder:d="Select a Model",onChange:c,disabled:u=!1,style:m,className:g,showLabel:f=!0,labelText:h="Select Model"})=>{let[b,p]=(0,r.useState)(s),[v,C]=(0,r.useState)(!1),[x,w]=(0,r.useState)([]),k=(0,r.useRef)(null);return(0,r.useEffect)(()=>{p(s)},[s]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,n.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&w(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[f&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.RobotOutlined,{className:"mr-2"})," ",h]}),(0,t.jsx)(o.Select,{value:b,placeholder:d,onChange:e=>{"custom"===e?(C(!0),p(void 0)):(C(!1),p(e),c&&c(e))},options:[...Array.from(new Set(x.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 ${g||""}`,disabled:u}),v&&(0,t.jsx)(a.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{p(e),c&&c(e)},500)},disabled:u})]})}])},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])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,a]of Object.entries(t))e in r&&(r[e]=a);return r}let a=(e,t=0,r=!1,a=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!a)return"-";let l={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",l);let o=e<0?"-":"",i=Math.abs(e),n=i,s="";return i>=1e6?(n=i/1e6,s="M"):i>=1e3&&(n=i/1e3,s="K"),`${o}${n.toLocaleString("en-US",l)}${s}`},l=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return o(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),o(e,r)}},o=(e,r)=>{try{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",a.setAttribute("readonly",""),document.body.appendChild(a),a.focus(),a.select();let l=document.execCommand("copy");if(document.body.removeChild(a),l)return t.default.success(r),!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,l,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=a(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ca91b0fa4d619698.js b/litellm/proxy/_experimental/out/_next/static/chunks/fb125648f2dae104.js similarity index 78% rename from litellm/proxy/_experimental/out/_next/static/chunks/ca91b0fa4d619698.js rename to litellm/proxy/_experimental/out/_next/static/chunks/fb125648f2dae104.js index 926d5fe533..3ec1d0d853 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/ca91b0fa4d619698.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/fb125648f2dae104.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,973706,e=>{"use strict";var t=e.i(843476),s=e.i(72713),a=e.i(637235),r=e.i(994388),l=e.i(599724),i=e.i(166540),n=e.i(271645);let o=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,i.default)().startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,i.default)().subtract(7,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,i.default)().subtract(30,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,i.default)().startOf("month").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,i.default)().startOf("year").toDate(),to:(0,i.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:c,label:d="Select Time Range",showTimeRange:u=!0})=>{let[m,x]=(0,n.useState)(!1),[h,p]=(0,n.useState)(e),[g,f]=(0,n.useState)(null),[j,_]=(0,n.useState)(""),[y,b]=(0,n.useState)(""),k=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of o){let s=t.getValue(),a=(0,i.default)(e.from).isSame((0,i.default)(s.from),"day"),r=(0,i.default)(e.to).isSame((0,i.default)(s.to),"day");if(a&&r)return t.shortLabel}return null},[]);(0,n.useEffect)(()=>{f(v(e))},[e,v]);let N=(0,n.useCallback)(()=>{if(!j||!y)return{isValid:!0,error:""};let e=(0,i.default)(j,"YYYY-MM-DD"),t=(0,i.default)(y,"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"}},[j,y])();(0,n.useEffect)(()=>{e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,n.useEffect)(()=>{let e=e=>{k.current&&!k.current.contains(e.target)&&x(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let T=(0,n.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let s=e=>(0,i.default)(e).format("D MMM, HH:mm");return`${s(e)} - ${s(t)}`},[]),C=(0,n.useCallback)(e=>{let t;if(!e.from)return e;let s={...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),s.from=a,s.to=t,s},[]),w=(0,n.useCallback)(()=>{try{if(j&&y&&N.isValid){let e=(0,i.default)(j,"YYYY-MM-DD").startOf("day"),t=(0,i.default)(y,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let s={from:e.toDate(),to:t.toDate()};p(s);let a=v(s);f(a)}}}catch(e){console.warn("Invalid date format:",e)}},[j,y,N.isValid,v]);return(0,n.useEffect)(()=>{w()},[w]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d&&(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:d}),(0,t.jsxs)("div",{className:"relative",ref:k,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:()=>x(!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:T(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:o.map(e=>{let s=g===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 ${s?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:s}=e.getValue();p({from:t,to:s}),f(e.shortLabel),_((0,i.default)(t).format("YYYY-MM-DD")),b((0,i.default)(s).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${s?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${s?"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)(s.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:j,onChange:e=>_(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 ${!N.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:y,onChange:e=>b(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 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!N.isValid&&N.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:N.error})]})}),h.from&&h.to&&N.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,i.default)(h.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,i.default)(h.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)(r.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),f(v(e)),x(!1)},children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:()=>{h.from&&h.to&&N.isValid&&(c(h),requestIdleCallback(()=>{c(C(h))},{timeout:100}),x(!1))},disabled:!h.from||!h.to||!N.isValid,children:"Apply"})]})})]})]})})]})]})}])},289793,952840,617885,286718,23371,487147,498610,785952,193523,260573,e=>{"use strict";var t=e.i(764205),s=e.i(266027),a=e.i(243652),r=e.i(708347),l=e.i(135214);let i=(0,a.createQueryKeys)("agents");e.s(["useAgents",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,t.getAgentsList)(e),enabled:!!e&&r.all_admin_roles.includes(a||"")})}],289793);let n=(0,a.createQueryKeys)("customers");e.s(["useCustomers",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,t.allEndUsersCall)(e),enabled:!!e&&r.all_admin_roles.includes(a)})}],952840);var o=e.i(621482);let c=(0,a.createQueryKeys)("infiniteUsers"),d=50;e.s(["useInfiniteUsers",0,(e=d,s)=>{let{accessToken:a,userRole:i}=(0,l.default)();return(0,o.useInfiniteQuery)({queryKey:c.list({filters:{pageSize:e,...s&&{searchEmail:s}}}),queryFn:async({pageParam:r})=>await (0,t.userListCall)(a,null,r,e,s||null),initialPageParam:1,getNextPageParam:e=>{if(e.pagee&&t&&t.length?(0,u.jsxs)("div",{className:"w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[(0,u.jsx)("p",{className:"text-tremor-content-strong",children:s}),t.map(e=>{let t=e.dataKey?.toString();if(!t||!e.payload)return null;let s=((e,t)=>{let s=t.substring(t.indexOf(".")+1);if(e.metrics&&s in e.metrics)return e.metrics[s]})(e.payload,t),a=t.includes("spend"),r=void 0!==s?a?`$${s.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:s.toLocaleString():"N/A",l=b[e.color]||e.color;return(0,u.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-2 ring-white drop-shadow-md",style:{backgroundColor:l}}),(0,u.jsx)("p",{className:"font-medium text-tremor-content dark:text-dark-tremor-content",children:t.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]}),(0,u.jsx)("p",{className:"font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",children:r})]},t)})]}):null,v=({categories:e,colors:t})=>(0,u.jsx)("div",{className:"flex items-center justify-end space-x-4",children:e.map((e,s)=>{let a=b[t[s]]||t[s];return(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-4 ring-white",style:{backgroundColor:a}}),(0,u.jsx)("p",{className:"text-sm text-tremor-content dark:text-dark-tremor-content",children:e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]},e)})});e.s(["CustomLegend",0,v,"CustomTooltip",0,k],286718);var N=e.i(291542),T=e.i(271645);let C=[{title:"Model",dataIndex:"model",key:"model",render:e=>e||"-"},{title:"Spend (USD)",dataIndex:"spend",key:"spend",render:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`},{title:"Successful",dataIndex:"successful_requests",key:"successful_requests",render:e=>(0,u.jsx)("span",{className:"text-green-600",children:e?.toLocaleString()||0})},{title:"Failed",dataIndex:"failed_requests",key:"failed_requests",render:e=>(0,u.jsx)("span",{className:"text-red-600",children:e?.toLocaleString()||0})},{title:"Tokens",dataIndex:"tokens",key:"tokens",render:e=>e?.toLocaleString()||0}],w=({topModels:e})=>{let[t,s]=(0,T.useState)("table");return 0===e.length?null:(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,u.jsx)(_.Title,{children:"Model Usage"}),(0,u.jsxs)("div",{className:"flex space-x-2",children:[(0,u.jsx)("button",{onClick:()=>s("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,u.jsx)("button",{onClick:()=>s("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"})]})]}),"chart"===t?(0,u.jsx)("div",{className:"max-h-[234px] overflow-y-auto",children:(0,u.jsx)(p.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,m.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:180,tickGap:5,showLegend:!1})}):(0,u.jsx)(N.Table,{columns:C,dataSource:e,rowKey:"model",size:"small",pagination:!1,scroll:e.length>5?{y:195}:void 0})]})};function S(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function q(e){return 0===e?"$0":e>=1e6?"$"+e/1e6+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}e.s(["valueFormatter",()=>S,"valueFormatterSpend",()=>q],23371);let L=({modelName:e,metrics:t,hidePromptCachingMetrics:s=!1})=>(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:t.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:t.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:t.total_tokens.toLocaleString()}),(0,u.jsxs)(j.Text,{children:[Math.round(t.total_tokens/t.total_successful_requests)," avg per successful request"]})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend,2)]}),(0,u.jsxs)(j.Text,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend/t.total_successful_requests,3)," per successful request"]})]})]}),t.top_api_keys&&t.top_api_keys.length>0&&(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsx)(_.Title,{children:"Top Virtual Keys by Spend"}),(0,u.jsx)("div",{className:"mt-3",children:(0,u.jsx)("div",{className:"grid grid-cols-1 gap-2",children:t.top_api_keys.map((e,t)=>(0,u.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium",children:e.key_alias||`${e.api_key.substring(0,10)}...`}),e.team_id&&(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,u.jsxs)("div",{className:"text-right",children:[(0,u.jsxs)(j.Text,{className:"font-medium",children:["$",(0,m.formatNumberWithCommas)(e.spend,2)]}),(0,u.jsxs)(j.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,u.jsx)(w,{topModels:t.top_models}),(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Spend per day"}),(0,u.jsx)(v,{categories:["metrics.spend"],colors:["green"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2,!0)}`,yAxisWidth:72})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4 mt-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.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:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Requests per day"}),(0,u.jsx)(v,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Success vs Failed Requests"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),!s&&(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Prompt Caching Metrics"}),(0,u.jsx)(v,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,u.jsxs)("div",{className:"mb-2",children:[(0,u.jsxs)(j.Text,{children:["Cache Read: ",t.total_cache_read_input_tokens?.toLocaleString()||0," tokens"]}),(0,u.jsxs)(j.Text,{children:["Cache Creation: ",t.total_cache_creation_input_tokens?.toLocaleString()||0," tokens"]})]}),(0,u.jsx)(h.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:S,customTooltip:k,showLegend:!1})]})]})]});e.s(["ActivityMetrics",0,({modelMetrics:e,hidePromptCachingMetrics:t=!1})=>{let s=Object.keys(e).sort((t,s)=>""===t?1:""===s?-1:e[s].total_spend-e[t].total_spend),a={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=>{a.total_requests+=e.total_requests,a.total_successful_requests+=e.total_successful_requests,a.total_tokens+=e.total_tokens,a.total_spend+=e.total_spend,a.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,a.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{a.daily_data[e.date]||(a.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}),a.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,a.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,a.daily_data[e.date].total_tokens+=e.metrics.total_tokens,a.daily_data[e.date].api_requests+=e.metrics.api_requests,a.daily_data[e.date].spend+=e.metrics.spend,a.daily_data[e.date].successful_requests+=e.metrics.successful_requests,a.daily_data[e.date].failed_requests+=e.metrics.failed_requests,a.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,a.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let r=Object.entries(a.daily_data).map(([e,t])=>({date:e,metrics:t})).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,u.jsxs)("div",{className:"space-y-8",children:[(0,u.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,u.jsx)(_.Title,{children:"Overall Usage"}),(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4 mb-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:a.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:a.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:a.total_tokens.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(a.total_spend,2)]})]})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens Over Time"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Requests Over Time"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:k,showLegend:!1})]})]})]}),(0,u.jsx)(y.Collapse,{defaultActiveKey:s[0],children:s.map(s=>(0,u.jsx)(y.Collapse.Panel,{header:(0,u.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,u.jsx)(_.Title,{children:e[s].label||"Unknown Item"}),(0,u.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,u.jsxs)("span",{children:["$",(0,m.formatNumberWithCommas)(e[s].total_spend,2)]}),(0,u.jsxs)("span",{children:[e[s].total_requests.toLocaleString()," requests"]})]})]}),children:(0,u.jsx)(L,{modelName:s||"Unknown Model",metrics:e[s],hidePromptCachingMetrics:t})},s))})]})},"processActivityData",0,(e,t,s=[])=>{let a={};return e.results.forEach(e=>{Object.entries(e.breakdown[t]||{}).forEach(([r,l])=>{a[r]||(a[r]={label:"api_keys"===t?((e,t,s)=>{let a=e.metadata.key_alias||`key-hash-${t}`,r=e.metadata.team_id;if(r){let e=(0,x.resolveTeamAliasFromTeamID)(r,s);return e?`${a} (team: ${e})`:`${a} (team_id: ${r})`}return a})(l,r,s):"entities"===t&&(l.metadata?.agent_name||l.metadata?.team_alias)||r,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[r].total_requests+=l.metrics.api_requests,a[r].prompt_tokens+=l.metrics.prompt_tokens,a[r].completion_tokens+=l.metrics.completion_tokens,a[r].total_tokens+=l.metrics.total_tokens,a[r].total_spend+=l.metrics.spend,a[r].total_successful_requests+=l.metrics.successful_requests,a[r].total_failed_requests+=l.metrics.failed_requests,a[r].total_cache_read_input_tokens+=l.metrics.cache_read_input_tokens||0,a[r].total_cache_creation_input_tokens+=l.metrics.cache_creation_input_tokens||0,a[r].daily_data.push({date:e.date,metrics:{prompt_tokens:l.metrics.prompt_tokens,completion_tokens:l.metrics.completion_tokens,total_tokens:l.metrics.total_tokens,api_requests:l.metrics.api_requests,spend:l.metrics.spend,successful_requests:l.metrics.successful_requests,failed_requests:l.metrics.failed_requests,cache_read_input_tokens:l.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:l.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==t&&Object.entries(a).forEach(([s,r])=>{let l={};e.results.forEach(e=>{let a=e.breakdown[t]?.[s];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(([e,t])=>{l[e]||(l[e]={api_key:e,key_alias:t.metadata.key_alias,team_id:t.metadata.team_id,spend:0,requests:0,tokens:0}),l[e].spend+=t.metrics.spend,l[e].requests+=t.metrics.api_requests,l[e].tokens+=t.metrics.total_tokens})}),a[s].top_api_keys=Object.values(l).sort((e,t)=>t.spend-e.spend).slice(0,5)}),"api_keys"===t&&Object.entries(a).forEach(([t,s])=>{let r={};e.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,s])=>{if(s&&"api_key_breakdown"in s){let a=s.api_key_breakdown?.[t];a&&(r[e]||(r[e]={model:e,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0}),r[e].spend+=a.metrics.spend,r[e].requests+=a.metrics.api_requests,r[e].successful_requests+=a.metrics.successful_requests||0,r[e].failed_requests+=a.metrics.failed_requests||0,r[e].tokens+=a.metrics.total_tokens)}})}),a[t].top_models=Object.values(r).sort((e,t)=>t.spend-e.spend)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())}),a}],487147);var D=e.i(994388),A=e.i(366283),M=e.i(779241),E=e.i(212931),O=e.i(808613),F=e.i(482725),$=e.i(199133),U=e.i(727749);e.s(["default",0,({isOpen:e,onClose:s,accessToken:a})=>{let[r]=O.Form.useForm(),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(null),[c,d]=(0,T.useState)(!1),[m,x]=(0,T.useState)("cloudzero"),[h,p]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e&&a&&g()},[e,a]);let g=async()=>{d(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"}});if(e.ok){let t=await e.json();o(t),r.setFieldsValue({connection_id:t.connection_id})}else if(404!==e.status){let t=await e.json();U.default.fromBackend(`Failed to load existing settings: ${t.error||"Unknown error"}`)}}catch(e){console.error("Error loading CloudZero settings:",e),U.default.fromBackend("Failed to load existing settings")}finally{d(!1)}},f=async e=>{if(!a)return void U.default.fromBackend("No access token available");i(!0);try{let s=n?"/cloudzero/settings":"/cloudzero/init",r=n?"PUT":"POST",l={...e,timezone:"UTC"},i=await fetch(s,{method:r,headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(l)}),c=await i.json();if(i.ok)return U.default.success(c.message||"CloudZero settings saved successfully"),o({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return U.default.fromBackend(c.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),U.default.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},_=async()=>{if(!a)return void U.default.fromBackend("No access token available");p(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),r=await e.json();e.ok?(U.default.success(r.message||"Export to CloudZero completed successfully"),s()):U.default.fromBackend(r.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),U.default.fromBackend("Failed to export to CloudZero")}finally{p(!1)}},y=async()=>{p(!0);try{U.default.info("CSV export functionality coming soon!"),s()}catch(e){console.error("Error exporting CSV:",e),U.default.fromBackend("Failed to export CSV")}finally{p(!1)}},b=async()=>{if("cloudzero"===m){if(!n){let e=await r.validateFields();if(!await f(e))return}await _()}else await y()},k=()=>{r.resetFields(),x("cloudzero"),o(null),s()},v=[{value:"cloudzero",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,u.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsx)("span",{children:"Export to CSV"})]})}];return(0,u.jsx)(E.Modal,{title:"Export Data",open:e,onCancel:k,footer:null,width:600,destroyOnHidden:!0,children:(0,u.jsxs)("div",{className:"space-y-4",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,u.jsx)($.Select,{value:m,onChange:x,options:v,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,u.jsx)("div",{children:c?(0,u.jsx)("div",{className:"flex justify-center py-8",children:(0,u.jsx)(F.Spin,{size:"large"})}):(0,u.jsxs)(u.Fragment,{children:[n&&(0,u.jsx)(A.Callout,{title:"Existing CloudZero Configuration",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsxs)(j.Text,{children:["API Key: ",n.api_key_masked,(0,u.jsx)("br",{}),"Connection ID: ",n.connection_id]})}),!n&&(0,u.jsxs)(O.Form,{form:r,layout:"vertical",children:[(0,u.jsx)(O.Form.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,u.jsx)(M.TextInput,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,u.jsx)(O.Form.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,u.jsx)(M.TextInput,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,u.jsx)(A.Callout,{title:"CSV Export",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,u.jsx)(j.Text,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,u.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,u.jsx)(D.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,u.jsx)(D.Button,{onClick:b,loading:l||h,disabled:l||h,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})}],498610);var P=e.i(785242),R=e.i(464571),V=e.i(981339);let I=({value:e,onChange:t})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,u.jsx)($.Select,{value:e,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]}),B=({dateRange:e,selectedFilters:t})=>(0,u.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 W=e.i(91739);let z=({value:e,onChange:t,entityType:s})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,u.jsx)(W.Radio.Group,{value:e,onChange:e=>t(e.target.value),className:"w-full",children:(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily_with_keys",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s," and key"]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s,", split by API key"]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily_with_models",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",s," and model"]}),(0,u.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]});var K=e.i(59935);let Y=(e,t)=>({id:e,alias:t[e]||e}),H=["spend","api_requests","successful_requests","failed_requests","total_tokens","prompt_tokens","completion_tokens","cache_read_input_tokens","cache_creation_input_tokens"],G=e=>{let t=e.entities;return t&&Object.keys(t).length>0?t:(e=>{let t=e.api_keys;if(!t||0===Object.keys(t).length)return{};let s={};for(let[e,a]of Object.entries(t)){let t=a?.metadata?.team_id||"Unassigned";s[t]||(s[t]={metrics:Object.fromEntries(H.map(e=>[e,0])),api_key_breakdown:{}});let r=s[t].metrics,l=a?.metrics||{};for(let e of H)r[e]+=l[e]||0;s[t].api_key_breakdown[e]=a}return s})(e)},Z=(e,t,s,a={})=>{switch(t){case"daily":default:return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([r,l])=>{let{id:i,alias:n}=Y(r,s);a.push({Date:e.date,[t]:n,[`${t} ID`]:i,"Spend ($)":(0,m.formatNumberWithCommas)(l.metrics.spend,4),Requests:l.metrics.api_requests,"Successful Requests":l.metrics.successful_requests,"Failed Requests":l.metrics.failed_requests,"Total Tokens":l.metrics.total_tokens,"Prompt Tokens":l.metrics.prompt_tokens||0,"Completion Tokens":l.metrics.completion_tokens||0})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_keys":return((e,t,s={})=>{let a={};return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([t,r])=>{let{id:l,alias:i}=Y(t,s);Object.entries(r.api_key_breakdown||{}).forEach(([t,s])=>{let r=s?.metadata?.key_alias||null,n=`${e.date}_${l}_${t}`;a[n]?(a[n].metrics.spend+=s.metrics?.spend||0,a[n].metrics.api_requests+=s.metrics?.api_requests||0,a[n].metrics.successful_requests+=s.metrics?.successful_requests||0,a[n].metrics.failed_requests+=s.metrics?.failed_requests||0,a[n].metrics.total_tokens+=s.metrics?.total_tokens||0,a[n].metrics.prompt_tokens+=s.metrics?.prompt_tokens||0,a[n].metrics.completion_tokens+=s.metrics?.completion_tokens||0):a[n]={Date:e.date,entityId:l,entityAlias:i,keyId:t,keyAlias:r,metrics:{spend:s.metrics?.spend||0,api_requests:s.metrics?.api_requests||0,successful_requests:s.metrics?.successful_requests||0,failed_requests:s.metrics?.failed_requests||0,total_tokens:s.metrics?.total_tokens||0,prompt_tokens:s.metrics?.prompt_tokens||0,completion_tokens:s.metrics?.completion_tokens||0}}})})}),Object.values(a).map(e=>({Date:e.Date,[t]:e.entityAlias,[`${t} ID`]:e.entityId,"Key Alias":e.keyAlias||"-","Key ID":e.keyId,"Spend ($)":(0,m.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})).sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_models":return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{let r={};Object.entries(G(e.breakdown)).forEach(([t,s])=>{r[t]||(r[t]={}),Object.entries(e.breakdown.models||{}).forEach(([e,a])=>{Object.entries(s.api_key_breakdown||{}).forEach(([s,a])=>{r[t][e]||(r[t][e]={spend:0,requests:0,successful:0,failed:0,tokens:0}),r[t][e].spend+=a.metrics.spend||0,r[t][e].requests+=a.metrics.api_requests||0,r[t][e].successful+=a.metrics.successful_requests||0,r[t][e].failed+=a.metrics.failed_requests||0,r[t][e].tokens+=a.metrics.total_tokens||0})})}),Object.entries(r).forEach(([r,l])=>{let{id:i,alias:n}=Y(r,s);Object.entries(l).forEach(([s,r])=>{a.push({Date:e.date,[t]:n,[`${t} ID`]:i,Model:s,"Spend ($)":(0,m.formatNumberWithCommas)(r.spend,4),Requests:r.requests,Successful:r.successful,Failed:r.failed,"Total Tokens":r.tokens})})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a)}},J=({isOpen:e,onClose:t,entityType:s,spendData:a,dateRange:r,selectedFilters:l,customTitle:i})=>{let[n,o]=(0,T.useState)("csv"),[c,d]=(0,T.useState)("daily"),[m,h]=(0,T.useState)(!1),{data:p,isLoading:g}=(0,P.useTeams)(),f=s.charAt(0).toUpperCase()+s.slice(1),j=i||`Export ${f} Usage`,_=(0,T.useMemo)(()=>(0,x.createTeamAliasMap)(p),[p]),y=async e=>{let i=e||n;h(!0);try{"csv"===i?(((e,t,s,a,r={})=>{let l=Z(e,t,s,r),i=new Blob([K.default.unparse(l)],{type:"text/csv;charset=utf-8;"}),n=window.URL.createObjectURL(i),o=document.createElement("a");o.href=n,o.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(n)})(a,c,f,s,_),U.default.success(`${f} usage data exported successfully as CSV`)):(((e,t,s,a,r,l,i={})=>{let n=Z(e,t,s,i),o={export_date:new Date().toISOString(),entity_type:a,date_range:{from:r.from?.toISOString(),to:r.to?.toISOString()},filters_applied:l.length>0?l:"None",export_scope:t,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}},c=new Blob([JSON.stringify({metadata:o,data:n},null,2)],{type:"application/json"}),d=window.URL.createObjectURL(c),u=document.createElement("a");u.href=d,u.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(d)})(a,c,f,s,r,l,_),U.default.success(`${f} usage data exported successfully as JSON`)),t()}catch(e){console.error("Error exporting data:",e),U.default.fromBackend("Failed to export data")}finally{h(!1)}};return(0,u.jsx)(E.Modal,{title:(0,u.jsx)("span",{className:"text-base font-semibold",children:j}),open:e,onCancel:t,footer:null,width:480,children:(0,u.jsxs)("div",{className:"space-y-5 py-2",children:[g?(0,u.jsx)(V.Skeleton,{active:!0}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(B,{dateRange:r,selectedFilters:l}),(0,u.jsx)(z,{value:c,onChange:d,entityType:s}),(0,u.jsx)(I,{value:n,onChange:o})]}),g?(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(V.Skeleton.Button,{active:!0}),(0,u.jsx)(V.Skeleton.Button,{active:!0})]}):(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(R.Button,{variant:"outlined",onClick:t,disabled:m,children:"Cancel"}),(0,u.jsx)(R.Button,{onClick:()=>y(),loading:m||g,disabled:m||g,type:"primary",children:m?"Exporting...":`Export ${n.toUpperCase()}`})]})]})})};e.s(["default",0,J],785952),e.s(["default",0,({dateValue:e,entityType:t,spendData:s,showFilters:a=!1,filterLabel:r,filterPlaceholder:l,selectedFilters:i=[],onFiltersChange:n,filterOptions:o=[],filterMode:c="multiple",customTitle:d,compactLayout:m=!1,teams:x=[]})=>{let[h,p]=(0,T.useState)(!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"mb-4",children:(0,u.jsxs)("div",{className:`grid ${a&&o.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"} items-end gap-4`,children:[a&&o.length>0&&(0,u.jsxs)("div",{children:[r&&(0,u.jsx)(j.Text,{className:"mb-2",children:r}),(0,u.jsx)($.Select,{mode:"single"===c?void 0:"multiple",style:{width:"100%"},placeholder:l,value:"single"===c?i[0]??void 0:i,onChange:e=>{"single"===c?n?.(e?[e]:[]):n?.(e)},options:o,allowClear:!0})]}),(0,u.jsx)("div",{className:"justify-self-end",children:(0,u.jsx)(D.Button,{onClick:()=>p(!0),icon:()=>(0,u.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsx)(J,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:s,dateRange:e,selectedFilters:i,customTitle:d,teams:x})]})}],193523),e.s([],260573)},797305,497650,e=>{"use strict";var t=e.i(843476),s=e.i(755151),a=e.i(872934),r=e.i(827252),l=e.i(56456),i=e.i(240647),n=e.i(152473),o=e.i(584935),c=e.i(304967),d=e.i(309426),u=e.i(350967),m=e.i(197647),x=e.i(653824),h=e.i(881073),p=e.i(404206),g=e.i(723731),f=e.i(599724),j=e.i(629569),_=e.i(560445),y=e.i(464571),b=e.i(560025),k=e.i(199133),v=e.i(592968),N=e.i(898586),T=e.i(271645),C=e.i(289793),w=e.i(952840),S=e.i(135214),q=e.i(738014),L=e.i(617885),D=e.i(500330),A=e.i(708347),M=e.i(487147),E=e.i(498610);e.i(260573);var O=e.i(785952),F=e.i(764205),$=e.i(973706),U=e.i(571303);let P=({isDateChanging:e=!1})=>(0,t.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)(U.UiLoadingSpinner,{className:"size-5"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:e?"Processing date selection...":"Loading chart data..."}),(0,t.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:e?"This will only take a moment":"Fetching your data"})]})]})});var R=e.i(290571),V=e.i(95779),I=e.i(444755),B=e.i(673706);let W=T.default.forwardRef((e,t)=>{let{color:s,children:a,className:r}=e,l=(0,R.__rest)(e,["color","children","className"]);return T.default.createElement("p",Object.assign({ref:t,className:(0,I.tremorTwMerge)("font-semibold text-tremor-metric",s?(0,B.getColorClassNames)(s,V.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",r)},l),a)});W.displayName="Metric";var z=e.i(37091),K=e.i(269200),Y=e.i(427612),H=e.i(496020),G=e.i(64848),Z=e.i(942232),J=e.i(977572),Q=e.i(994388);let X=({accessToken:e,selectedTags:s,formatAbbreviatedNumber:a})=>{let r,l,i,n,[c,d]=(0,T.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[u,_]=(0,T.useState)(!1),[y,b]=(0,T.useState)(1),k=async()=>{if(e){_(!0);try{let t=await (0,F.perUserAnalyticsCall)(e,y,50,s.length>0?s:void 0);d(t)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{_(!1)}}};return(0,T.useEffect)(()=>{k()},[e,s,y]),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"Per User Usage"}),(0,t.jsx)(z.Subtitle,{children:"Individual developer usage metrics"}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"User Details"}),(0,t.jsx)(m.Tab,{children:"Usage Distribution"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"User ID"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Email"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Agent"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Success Generations"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Tokens"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Failed Requests"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Cost"})]})}),(0,t.jsx)(Z.TableBody,{children:c.results.slice(0,10).map((e,s)=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{className:"font-medium",children:e.user_id})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_email||"N/A"})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_agent||"Unknown"})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.successful_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.total_tokens)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.failed_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsxs)(f.Text,{children:["$",a(e.spend,4)]})})]},s))})]}),c.results.length>10&&(0,t.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,t.jsxs)(f.Text,{className:"text-sm text-gray-500",children:["Showing 10 of ",c.total_count," results"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y>1&&b(y-1)},disabled:1===y,children:"Previous"}),(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y=c.total_pages,children:"Next"})]})]})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(j.Title,{className:"text-lg",children:"User Usage Distribution"}),(0,t.jsx)(z.Subtitle,{children:"Number of users by successful request frequency"})]}),(0,t.jsx)(o.BarChart,{data:(r=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";r.set(t,(r.get(t)||0)+1)}),l=Array.from(r.entries()).sort(([,e],[,t])=>t-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 t=e.successful_requests,s=e.user_agent||"Unknown";l.includes(s)&&Object.entries(i).forEach(([e,a])=>{t>=a.range[0]&&t<=a.range[1]&&(a.agents[s]||(a.agents[s]=0),a.agents[s]++)})}),Object.entries(i).map(([e,t])=>{let s={category:e};return l.forEach(e=>{s[e]=t.agents[e]||0}),s})),index:"category",categories:(n=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";n.set(t,(n.get(t)||0)+1)}),Array.from(n.entries()).sort(([,e],[,t])=>t-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})]})]})]})]})},ee=({accessToken:e,userRole:s,dateValue:a,onDateChange:r})=>{let[l,i]=(0,T.useState)({results:[]}),[n,d]=(0,T.useState)({results:[]}),[_,y]=(0,T.useState)({results:[]}),[b,N]=(0,T.useState)({results:[]}),[C,w]=(0,T.useState)(""),[S,q]=(0,T.useState)([]),[L,D]=(0,T.useState)([]),[A,M]=(0,T.useState)(!1),[E,O]=(0,T.useState)(!1),[$,U]=(0,T.useState)(!1),[R,V]=(0,T.useState)(!1),[I,B]=(0,T.useState)(!1),K=new Date,Y=async()=>{if(e){M(!0);try{let t=await (0,F.tagDistinctCall)(e);q(t.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{M(!1)}}},H=async()=>{if(e){O(!0);try{let t=await (0,F.tagDauCall)(e,K,C||void 0,L.length>0?L:void 0);i(t)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{O(!1)}}},G=async()=>{if(e){U(!0);try{let t=await (0,F.tagWauCall)(e,K,C||void 0,L.length>0?L:void 0);d(t)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{U(!1)}}},Z=async()=>{if(e){V(!0);try{let t=await (0,F.tagMauCall)(e,K,C||void 0,L.length>0?L:void 0);y(t)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{V(!1)}}},J=async()=>{if(e&&a.from&&a.to){B(!0);try{let t=await (0,F.userAgentSummaryCall)(e,a.from,a.to,L.length>0?L:void 0);N(t)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{B(!1)}}};(0,T.useEffect)(()=>{Y()},[e]),(0,T.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{H(),G(),Z()},50);return()=>clearTimeout(t)},[e,C,L]),(0,T.useEffect)(()=>{if(!a.from||!a.to)return;let e=setTimeout(()=>{J()},50);return()=>clearTimeout(e)},[e,a,L]);let Q=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,ee=e=>Object.entries(e.reduce((e,t)=>(e[t.tag]=(e[t.tag]||0)+t.active_users,e),{})).sort(([,e],[,t])=>t-e).map(([e])=>e),et=ee(l.results).slice(0,10),es=ee(n.results).slice(0,10),ea=ee(_.results).slice(0,10),er=(()=>{let e=[],t=new Date;for(let s=6;s>=0;s--){let a=new Date(t);a.setDate(a.getDate()-s);let r={date:a.toISOString().split("T")[0]};et.forEach(e=>{r[Q(e)]=0}),e.push(r)}return l.results.forEach(t=>{let s=Q(t.tag),a=e.find(e=>e.date===t.date);a&&(a[s]=t.active_users)}),e})(),el=(()=>{let e=[];for(let t=1;t<=7;t++){let s={week:`Week ${t}`};es.forEach(e=>{s[Q(e)]=0}),e.push(s)}return n.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Week (\d+)/);if(a){let r=`Week ${a[1]}`,l=e.find(e=>e.week===r);l&&(l[s]=t.active_users)}}),e})(),ei=(()=>{let e=[];for(let t=1;t<=7;t++){let s={month:`Month ${t}`};ea.forEach(e=>{s[Q(e)]=0}),e.push(s)}return _.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Month (\d+)/);if(a){let r=`Month ${a[1]}`,l=e.find(e=>e.month===r);l&&(l[s]=t.active_users)}}),e})(),en=(e,t=0)=>{if(e>=1e8||e>=1e7)return(e/1e6).toFixed(t)+"M";if(e>=1e6)return(e/1e6).toFixed(t)+"M";if(e>=1e4)return(e/1e3).toFixed(t)+"K";if(e>=1e3)return(e/1e3).toFixed(t)+"K";else return e.toFixed(t)};return(0,t.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Title,{children:"Summary by User Agent"}),(0,t.jsx)(z.Subtitle,{children:"Performance metrics for different user agents"})]}),(0,t.jsxs)("div",{className:"w-96",children:[(0,t.jsx)(f.Text,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"All User Agents",value:L,onChange:D,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:A,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:S.map(e=>{let s=Q(e),a=s.length>50?`${s.substring(0,50)}...`:s;return(0,t.jsx)(k.Select.Option,{value:e,label:a,title:s,children:a},e)})})]})]}),I?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4",children:[(b.results||[]).slice(0,4).map((e,s)=>{let a=Q(e.tag),r=a.length>15?a.substring(0,15)+"...":a;return(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(v.Tooltip,{title:a,placement:"top",children:(0,t.jsx)(j.Title,{className:"truncate",children:r})}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(W,{className:"text-lg",children:en(e.successful_requests)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(W,{className:"text-lg",children:en(e.total_tokens)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsxs)(W,{className:"text-lg",children:["$",en(e.total_spend,4)]})]})]})]},s)}),Array.from({length:Math.max(0,4-(b.results||[]).length)}).map((e,s)=>(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"No Data"}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]})]})]},`empty-${s}`))]})]})}),(0,t.jsx)(c.Card,{children:(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU/WAU/MAU"}),(0,t.jsx)(m.Tab,{children:"Per User Usage (Last 30 Days)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"DAU, WAU & MAU per Agent"}),(0,t.jsx)(z.Subtitle,{children:"Active users across different time periods"})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU"}),(0,t.jsx)(m.Tab,{children:"WAU"}),(0,t.jsx)(m.Tab,{children:"MAU"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),E?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:er,index:"date",categories:et.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),$?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:el,index:"week",categories:es.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),R?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:ei,index:"month",categories:ea.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(X,{accessToken:e,selectedTags:L,formatAbbreviatedNumber:en})})]})]})})]})};var et=e.i(617802);let es=["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"],ea={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}};function er({fetchFn:e,args:t,enabled:s}){let[a,r]=(0,T.useState)(ea),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),[c,d]=(0,T.useState)({currentPage:0,totalPages:0}),[u,m]=(0,T.useState)(!1),x=(0,T.useRef)(0),h=(0,T.useRef)(!1),p=(0,T.useRef)(null),g=(0,T.useRef)(t);g.current=t;let f=JSON.stringify(t),j=(0,T.useCallback)(()=>{h.current=!0,m(!0),o(!1),null!==p.current&&(clearTimeout(p.current),p.current=null)},[]);return(0,T.useEffect)(()=>{if(!s){r(ea),i(!1),o(!1),d({currentPage:0,totalPages:0}),m(!1);return}let t=++x.current;h.current=!1,m(!1);let a=()=>x.current!==t||h.current,l=e=>new Promise(t=>{p.current=setTimeout(()=>{p.current=null,t()},e)});return(async()=>{let t=g.current;i(!0),o(!1),d({currentPage:1,totalPages:1});try{let s=[...t.slice(0,3),1,...t.slice(3)],n=await e(...s);if(a())return;r(n);let c=n.metadata?.total_pages||1;if(d({currentPage:1,totalPages:c}),c<=1)return void i(!1);i(!1),o(!0);let u=[...n.results],m={...n.metadata};for(let s=2;s<=c;s++){if(a()||(await l(300),a()))return;let i=[...t.slice(0,3),s,...t.slice(3)],n=await e(...i);if(a())return;u=[...u,...n.results],(m=function(e,t){let s={...e};for(let a of es)s[a]=(e[a]||0)+(t[a]||0);return s}(m,n.metadata)).total_pages=c,m.has_more=s{x.current++,null!==p.current&&(clearTimeout(p.current),p.current=null)}},[s,e,f]),{data:a,loading:l,isFetchingMore:n,progress:c,cancelled:u,cancel:j}}var el=e.i(23371),ei=e.i(286718);let en=({endpointData:e})=>{let s=e||{},a=T.default.useMemo(()=>Object.entries(s).map(([e,t])=>({endpoint:e,"metrics.successful_requests":t.metrics.successful_requests,"metrics.failed_requests":t.metrics.failed_requests,metrics:{successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests}})),[s]);return(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(j.Title,{children:"Success vs Failed Requests by Endpoint"}),(0,t.jsx)(ei.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,t.jsx)(o.BarChart,{className:"mt-4",data:a,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:ei.CustomTooltip,showLegend:!1,stack:!0,yAxisWidth:60})]})};var eo=e.i(731195),ec=e.i(883966),ed=e.i(555706),eu=e.i(785183),em=e.i(93230),ex=e.i(844171),eh=(0,ec.generateCategoricalChart)({chartName:"LineChart",GraphicalChild:ed.Line,axisComponents:[{axisType:"xAxis",AxisComp:eu.XAxis},{axisType:"yAxis",AxisComp:em.YAxis}],formatAxisMap:ex.formatAxisMap}),ep=e.i(872526),eg=e.i(800494),ef=e.i(234239),ej=e.i(559559),e_=e.i(238279),ey=e.i(114887),eb=e.i(933303),ek=e.i(628781),ev=e.i(472007),eN=e.i(480731);let eT=T.default.forwardRef((e,t)=>{let{data:s=[],categories:a=[],index:r,colors:l=V.themeColorRange,valueFormatter:i=B.defaultValueFormatter,startEndOnly:n=!1,showXAxis:o=!0,showYAxis:c=!0,yAxisWidth:d=56,intervalType:u="equidistantPreserveStart",animationDuration:m=900,showAnimation:x=!1,showTooltip:h=!0,showLegend:p=!0,showGridLines:g=!0,autoMinValue:f=!1,curveType:j="linear",minValue:_,maxValue:y,connectNulls:b=!1,allowDecimals:k=!0,noDataText:v,className:N,onValueChange:C,enableLegendSlider:w=!1,customTooltip:S,rotateLabelX:q,padding:L=o||c?{left:20,right:20}:{left:0,right:0},tickGap:D=5,xAxisLabel:A,yAxisLabel:M}=e,E=(0,R.__rest)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[O,F]=(0,T.useState)(60),[$,U]=(0,T.useState)(void 0),[P,W]=(0,T.useState)(void 0),z=(0,ev.constructCategoryColors)(a,l),K=(0,ev.getYAxisDomain)(f,_,y),Y=!!C;function H(e){Y&&(e===P&&!$||(0,ev.hasOnlyOneValueForThisKey)(s,e)&&$&&$.dataKey===e?(W(void 0),null==C||C(null)):(W(e),null==C||C({eventType:"category",categoryClicked:e})),U(void 0))}return T.default.createElement("div",Object.assign({ref:t,className:(0,I.tremorTwMerge)("w-full h-80",N)},E),T.default.createElement(eo.ResponsiveContainer,{className:"h-full w-full"},(null==s?void 0:s.length)?T.default.createElement(eh,{data:s,onClick:Y&&(P||$)?()=>{U(void 0),W(void 0),null==C||C(null)}:void 0,margin:{bottom:A?30:void 0,left:M?20:void 0,right:M?5:void 0,top:5}},g?T.default.createElement(ep.CartesianGrid,{className:(0,I.tremorTwMerge)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,T.default.createElement(eu.XAxis,{padding:L,hide:!o,dataKey:r,interval:n?"preserveStartEnd":u,tick:{transform:"translate(0, 6)"},ticks:n?[s[0][r],s[s.length-1][r]]:void 0,fill:"",stroke:"",className:(0,I.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:D,angle:null==q?void 0:q.angle,dy:null==q?void 0:q.verticalShift,height:null==q?void 0:q.xAxisHeight},A&&T.default.createElement(eg.Label,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},A)),T.default.createElement(em.YAxis,{width:d,hide:!c,axisLine:!1,tickLine:!1,type:"number",domain:K,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,I.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:i,allowDecimals:k},M&&T.default.createElement(eg.Label,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},M)),T.default.createElement(ef.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:h?({active:e,payload:t,label:s})=>S?T.default.createElement(S,{payload:null==t?void 0:t.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!=(t=z.get(e.dataKey))?t:eN.BaseColors.Gray})}),active:e,label:s}):T.default.createElement(eb.default,{active:e,payload:t,label:s,valueFormatter:i,categoryColors:z}):T.default.createElement(T.default.Fragment,null),position:{y:0}}),p?T.default.createElement(ej.Legend,{verticalAlign:"top",height:O,content:({payload:e})=>(0,ey.default)({payload:e},z,F,P,Y?e=>H(e):void 0,w)}):null,a.map(e=>{var t;return T.default.createElement(ed.Line,{className:(0,I.tremorTwMerge)((0,B.getColorClassNames)(null!=(t=z.get(e))?t:eN.BaseColors.Gray,V.colorPalette.text).strokeColor),strokeOpacity:$||P&&P!==e?.3:1,activeDot:e=>{var t;let{cx:a,cy:r,stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,dataKey:c}=e;return T.default.createElement(e_.Dot,{className:(0,I.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,B.getColorClassNames)(null!=(t=z.get(c))?t:eN.BaseColors.Gray,V.colorPalette.text).fillColor),cx:a,cy:r,r:5,fill:"",stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,onClick:(t,a)=>{a.stopPropagation(),Y&&(e.index===(null==$?void 0:$.index)&&e.dataKey===(null==$?void 0:$.dataKey)||(0,ev.hasOnlyOneValueForThisKey)(s,e.dataKey)&&P&&P===e.dataKey?(W(void 0),U(void 0),null==C||C(null)):(W(e.dataKey),U({index:e.index,dataKey:e.dataKey}),null==C||C(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var a;let{stroke:r,strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,cx:o,cy:c,dataKey:d,index:u}=t;return(0,ev.hasOnlyOneValueForThisKey)(s,e)&&!($||P&&P!==e)||(null==$?void 0:$.index)===u&&(null==$?void 0:$.dataKey)===e?T.default.createElement(e_.Dot,{key:u,cx:o,cy:c,r:5,stroke:r,fill:"",strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,className:(0,I.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,B.getColorClassNames)(null!=(a=z.get(d))?a:eN.BaseColors.Gray,V.colorPalette.text).fillColor)}):T.default.createElement(T.Fragment,{key:u})},key:e,name:e,type:j,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:x,animationDuration:m,connectNulls:b})}),C?a.map(e=>T.default.createElement(ed.Line,{className:(0,I.tremorTwMerge)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:j,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:b,onClick:(e,t)=>{t.stopPropagation();let{name:s}=e;H(s)}})):null):T.default.createElement(ek.default,{noDataText:v})))});eT.displayName="LineChart";let eC=function({dailyData:e,endpointData:s}){let a=(0,T.useMemo)(()=>{var t;let s,a;return e?.results&&0!==e.results.length?(t=e.results,s=[],a=new Set,t.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>a.add(e))}),t.forEach(e=>{let t={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};a.forEach(s=>{let a=e.breakdown.endpoints?.[s];t[s]=a?.metrics.api_requests||0}),s.push(t)}),s.reverse()):[]},[e]),r=(0,T.useMemo)(()=>0===a.length?[]:Object.keys(a[0]).filter(e=>"date"!==e),[a]);return(0,t.jsxs)(c.Card,{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)(j.Title,{children:"Endpoint Usage Trends"})}),(0,t.jsx)(eT,{className:"h-80",data:a,index:"date",categories:r,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,r.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})]})};var ew=e.i(291542),eS=e.i(309821);e.s(["Progress",()=>eS.default],497650);var eS=eS;let eq=({endpointData:e})=>{let s=Object.entries(e).map(([e,t])=>{var s,a;return{key:e,endpoint:e,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,api_requests:t.metrics.api_requests,total_tokens:t.metrics.total_tokens,spend:t.metrics.spend,successRate:(s=t.metrics.successful_requests,0===(a=t.metrics.api_requests)?0:s/a*100)}}),a=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,s)=>{let a=s.api_requests>0?s.successful_requests/s.api_requests*100:0,r=s.api_requests>0?s.failed_requests/s.api_requests*100:0,l={"0%":"#22c55e"};return a>0&&a<100&&(l[`${a}%`]="#22c55e",l[`${a+.01}%`]="#ef4444"),l["100%"]=r>0?"#ef4444":"#22c55e",(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"flex-1 relative",children:(0,t.jsx)(eS.default,{percent:a+r,size:"small",strokeColor:l,showInfo:!1})}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,t.jsx)("span",{className:"text-green-600 font-medium",children:s.successful_requests.toLocaleString()}),(0,t.jsx)("span",{className:"text-gray-400",children:"/"}),(0,t.jsx)("span",{className:"text-red-600 font-medium",children:s.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 s=e.toFixed(2);return(0,t.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[s,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`}];return(0,t.jsx)(ew.Table,{columns:a,dataSource:s,pagination:!1})},eL=({userSpendData:e})=>{let s=(0,T.useMemo)(()=>{let t={};return e?.results&&e.results.forEach(e=>{Object.entries(e.breakdown.endpoints||{}).forEach(([e,s])=>{t[e]||(t[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:s.metadata||{},api_key_breakdown:{}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.prompt_tokens+=s.metrics.prompt_tokens,t[e].metrics.completion_tokens+=s.metrics.completion_tokens,t[e].metrics.total_tokens+=s.metrics.total_tokens,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests||0,t[e].metrics.failed_requests+=s.metrics.failed_requests||0,t[e].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,t[e].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),t},[e]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(eq,{endpointData:s}),(0,t.jsx)(en,{endpointData:s}),(0,t.jsx)(eC,{dailyData:e,endpointData:s})]})};var eD=e.i(214541),eA=e.i(413990),eM=e.i(785242);let{Text:eE}=N.Typography,eO=({value:e=[],onChange:s,disabled:a,organizationId:r,pageSize:i=20,placeholder:o="Search teams by alias..."})=>{let[c,d]=(0,T.useState)(""),[u,m]=(0,n.useDebouncedState)("",{wait:300}),{data:x,fetchNextPage:h,hasNextPage:p,isFetchingNextPage:g,isLoading:f}=(0,eM.useInfiniteTeams)(i,u||void 0,r),j=(0,T.useMemo)(()=>{if(!x?.pages)return[];let e=new Set,t=[];for(let s of x.pages)for(let a of s.teams)e.has(a.team_id)||(e.add(a.team_id),t.push(a));return t},[x]);return(0,t.jsx)(k.Select,{mode:"multiple",showSearch:!0,placeholder:o,value:e,onChange:e=>s?.(e),disabled:a,allowClear:!0,filterOption:!1,onSearch:e=>{d(e),m(e)},searchValue:c,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&p&&!g&&h()},loading:f,notFoundContent:f?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No teams found",style:{width:"100%"},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]}),children:j.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(eE,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})};var eF=e.i(193523),eF=eF,e$=e.i(916925),eU=e.i(1023),eP=e.i(149121);function eR({topModels:e,topModelsLimit:s,setTopModelsLimit:a}){let[r,l]=(0,T.useState)("table"),i=[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>{let t=e.getValue();return`$${(0,D.formatNumberWithCommas)(t,2)}`}},{header:"Successful",accessorKey:"successful_requests",cell:e=>(0,t.jsx)("span",{className:"text-green-600",children:e.getValue()?.toLocaleString()||0})},{header:"Failed",accessorKey:"failed_requests",cell:e=>(0,t.jsx)("span",{className:"text-red-600",children:e.getValue()?.toLocaleString()||0})},{header:"Tokens",accessorKey:"tokens",cell:e=>e.getValue()?.toLocaleString()||0}],n=e.slice(0,s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:s,onChange:e=>a(e)}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>l("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,t.jsx)("button",{onClick:()=>l("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===r?(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,t.jsx)(o.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(n.length,s)},data:n,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,t.jsx)(eP.DataTable,{columns:i,data:n,renderSubComponent:()=>(0,t.jsx)(t.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})})]})}let eV={tag:F.tagDailyActivityCall,team:F.teamDailyActivityCall,organization:F.organizationDailyActivityCall,customer:F.customerDailyActivityCall,agent:F.agentDailyActivityCall,user:F.userDailyActivityCall},eI=({accessToken:e,entityType:s,entityId:r,entityList:i,dateValue:n})=>{let b,k,v,{teams:N}=(0,eD.default)(),[C,w]=(0,T.useState)([]),[S,q]=(0,T.useState)(5),[L,A]=(0,T.useState)(5),[E,O]=(0,T.useState)(5),$=(0,T.useMemo)(()=>n.from?new Date(n.from):null,[n.from]),U=(0,T.useMemo)(()=>n.to?new Date(n.to):null,[n.to]),P=(0,T.useMemo)(()=>"user"===s?C.length>0?C[0]:null:C.length>0?C:null,[s,C]),R=eV[s],V=!!e&&!!$&&!!U,{data:I,isFetchingMore:B,progress:W,cancelled:Q,cancel:X}=er({fetchFn:R,args:[e,$,U,P],enabled:V}),{data:ee,isFetchingMore:et,progress:es,cancelled:ea,cancel:ei}=er({fetchFn:F.agentDailyActivityCall,args:[e,$,U,null],enabled:V&&"team"===s}),en=(0,M.processActivityData)(I,"models",N||[]),eo=(0,M.processActivityData)(I,"api_keys",N||[]),ec="team"===s?(0,M.processActivityData)(ee,"entities",N||[]):{},ed=()=>{let e={};return I.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={provider:t,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=s.metrics.spend,e[t].requests+=s.metrics.api_requests,e[t].successful_requests+=s.metrics.successful_requests,e[t].failed_requests+=s.metrics.failed_requests,e[t].tokens+=s.metrics.total_tokens}catch(e){console.error(`Error processing provider ${t}: ${e}`)}})}),Object.values(e).filter(e=>e.spend>0).sort((e,t)=>t.spend-e.spend)},eu=(e,t)=>{if(i){let t=i.find(t=>t.value===e);if(t)return t.label}return t?.team_alias?t.team_alias:e},em=()=>{var e;let t={};return I.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,s])=>{t[e]||(t[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:eu(e,s.metadata),id:e}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests,t[e].metrics.failed_requests+=s.metrics.failed_requests,t[e].metrics.total_tokens+=s.metrics.total_tokens})}),e=Object.values(t).sort((e,t)=>t.metrics.spend-e.metrics.spend),0===C.length?e:e.filter(e=>C.includes(e.metadata.id))},ex=s.charAt(0).toUpperCase()+s.slice(1);return(0,t.jsxs)("div",{style:{width:"100%"},className:"relative",children:[B&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",W.currentPage," / ",W.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:X,children:"Stop"})]})}),Q&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",W.currentPage,"/",W.totalPages," pages loaded)"]})}),et&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:ei,children:"Stop"})]})}),ea&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial agent data (",es.currentPage,"/",es.totalPages," pages loaded)"]})}),"team"===s&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by team"}),(0,t.jsx)(eO,{value:C,onChange:w})]}),(0,t.jsx)(eF.default,{dateValue:n,entityType:s,spendData:I,showFilters:"team"!==s&&null!==i&&i.length>0,filterLabel:`Filter by ${s}`,filterPlaceholder:`Select ${s} to filter...`,selectedFilters:C,onFiltersChange:w,filterOptions:(()=>{if(i)return i})()||void 0,filterMode:"user"===s?"single":"multiple",teams:N||[]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"agent"===s?"Request / Token Consumption":"Model Activity"}),"team"===s?(0,t.jsx)(m.Tab,{children:"Agent Activity"}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)(j.Title,{children:[ex," Spend Overview"]}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Spend"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)(I.metadata.total_spend,2)]})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:I.metadata.total_api_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:I.metadata.total_successful_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:I.metadata.total_failed_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:I.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),(0,t.jsx)(o.BarChart,{data:[...I.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload,r=Object.keys(a.breakdown.entities||{}).length;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",a.metrics.total_tokens]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total ",ex,"s: ",r]}),(0,t.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,t.jsxs)("p",{className:"font-semibold",children:["Spend by ",ex,":"]}),Object.entries(a.breakdown.entities||{}).sort(([,e],[,t])=>{let s=e.metrics.spend;return t.metrics.spend-s}).slice(0,5).map(([e,s])=>(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:[eu(e,s.metadata),": $",(0,D.formatNumberWithCommas)(s.metrics.spend,2)]},e)),r>5&&(0,t.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",r-5," more"]})]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,t.jsxs)(j.Title,{children:["Spend Per ",ex]}),(0,t.jsx)(z.Subtitle,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,t.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,t.jsxs)("span",{children:["Get Started by Tracking cost per ",ex," "]}),(0,t.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,t.jsxs)(u.Grid,{numItems:2,className:"gap-6",children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(o.BarChart,{className:"mt-4 h-52",data:em().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:el.valueFormatterSpend,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.metadata.alias}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,4)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.metrics.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.metrics.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens.toLocaleString()]})]})}})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:ex}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:em().filter(e=>e.metrics.spend>0).map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:e.metadata.alias}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.metrics.spend,4)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:(console.log("debugTags",{spendData:I}),b={},I.results.forEach(e=>{let{breakdown:t}=e,{entities:s}=t;console.log("debugTags",{entities:s});let a=Object.keys(s).reduce((e,t)=>{let{api_key_breakdown:a}=s[t];return Object.keys(a).forEach(s=>{let r={tag:t,usage:a[s].metrics.spend};e[s]?e[s].push(r):e[s]=[r]}),e},{});console.log("debugTags",{tagDictionary:a}),Object.entries(e.breakdown.api_keys||{}).forEach(([e,t])=>{b[e]||(b[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:t.metadata.key_alias,team_id:t.metadata.team_id||null,tags:a[e]||[]}},console.log("debugTags",{keySpend:b})),b[e].metrics.spend+=t.metrics.spend,b[e].metrics.prompt_tokens+=t.metrics.prompt_tokens,b[e].metrics.completion_tokens+=t.metrics.completion_tokens,b[e].metrics.total_tokens+=t.metrics.total_tokens,b[e].metrics.api_requests+=t.metrics.api_requests,b[e].metrics.successful_requests+=t.metrics.successful_requests,b[e].metrics.failed_requests+=t.metrics.failed_requests,b[e].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,b[e].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(b).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||"-",spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,S)),teams:null,showTags:"tag"===s,topKeysLimit:S,setTopKeysLimit:q})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"agent"===s?"Top Agents":"Top Models"}),(0,t.jsx)(eR,{topModels:(k={},I.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,t])=>{k[e]||(k[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{k[e].spend+=t.metrics.spend}catch(s){console.error(`Error adding spend for ${e}: ${s}, got metrics: ${JSON.stringify(t)}`)}k[e].requests+=t.metrics.api_requests,k[e].successful_requests+=t.metrics.successful_requests,k[e].failed_requests+=t.metrics.failed_requests,k[e].tokens+=t.metrics.total_tokens})}),Object.entries(k).map(([e,t])=>({key:e,...t})).sort((e,t)=>t.spend-e.spend).slice(0,L)),topModelsLimit:L,setTopModelsLimit:A})]})}),"team"===s&&(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Agents Driving Spend"}),(0,t.jsx)(eR,{topModels:(v={},ee.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,t])=>{v[e]||(v[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0,agent_name:t.metadata?.agent_name||e}),v[e].spend+=t.metrics.spend,v[e].requests+=t.metrics.api_requests,v[e].successful_requests+=t.metrics.successful_requests,v[e].failed_requests+=t.metrics.failed_requests,v[e].tokens+=t.metrics.total_tokens})}),Object.entries(v).map(([e,t])=>({key:t.agent_name,...t})).sort((e,t)=>t.spend-e.spend).slice(0,E)),topModelsLimit:E,setTopModelsLimit:O})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsx)(j.Title,{children:"Provider Usage"}),(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:ed(),index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan","blue","indigo","violet","purple"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:ed().map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)("img",{src:(0,e$.getProviderLogoAndName)(e.provider).logo,alt:`${e.provider} logo`,className:"w-4 h-4",onError:t=>{let s=t.target,a=s.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.provider?.charAt(0)||"-",a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:en,hidePromptCachingMetrics:"agent"===s})}),"team"===s?(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:ec})}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:eo,hidePromptCachingMetrics:"agent"===s})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:I})})]})]})]})};var eB=e.i(793130),eW=e.i(418371);let ez=({loading:e,isDateChanging:s,providerSpend:a})=>{let[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),m=a.filter(e=>e.provider?.toLowerCase()==="unknown"?n:!!l||e.spend>0);return(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(j.Title,{children:"Spend by Provider"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Zero Spend"}),(0,t.jsx)(eB.Switch,{checked:l,onChange:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Unknown"}),(0,t.jsx)(v.Tooltip,{title:"Requests that failed to route to a provider",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(eB.Switch,{checked:n,onChange:o})]})]})]}),e?(0,t.jsx)(P,{isDateChanging:s}):(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:m,index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:m.map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)(eW.ProviderLogo,{provider:e.provider,className:"w-4 h-4"}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})};var eK=e.i(311451),eY=e.i(482725),eH=e.i(918789);let{TextArea:eG}=eK.Input,eZ={get_usage_data:"📊",get_team_usage_data:"👥",get_tag_usage_data:"🏷️"},eJ=({step:e})=>{let s=eZ[e.tool_name]||"🔧",a=e.arguments,r=a.start_date&&a.end_date?`${a.start_date} → ${a.end_date}`:"",l=a.team_ids||a.tags||a.user_id||"";return(0,t.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,t.jsx)("span",{className:"flex-shrink-0 mt-0.5",children:"running"===e.status?(0,t.jsx)(eY.Spin,{size:"small"}):"error"===e.status?(0,t.jsx)("span",{className:"text-red-500",children:"✗"}):(0,t.jsx)("span",{className:"text-green-600",children:"✓"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"font-medium text-gray-700",children:[s," ",e.tool_label]}),r&&(0,t.jsx)("div",{className:"text-gray-500 mt-0.5",children:r}),l&&(0,t.jsxs)("div",{className:"text-gray-500 mt-0.5",children:["Filter: ",l]}),"error"===e.status&&e.error&&(0,t.jsx)("div",{className:"text-red-600 mt-0.5",children:e.error})]})]})},eQ=({content:e})=>(0,t.jsx)(eH.default,{components:{p:({children:e})=>(0,t.jsx)("p",{className:"mb-2 last:mb-0",children:e}),strong:({children:e})=>(0,t.jsx)("strong",{className:"font-semibold",children:e}),ul:({children:e})=>(0,t.jsx)("ul",{className:"list-disc pl-4 mb-2 space-y-0.5",children:e}),ol:({children:e})=>(0,t.jsx)("ol",{className:"list-decimal pl-4 mb-2 space-y-0.5",children:e}),li:({children:e})=>(0,t.jsx)("li",{children:e}),h1:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h2:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h3:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),code:({children:e,className:s})=>s?.includes("language-")?(0,t.jsx)("pre",{className:"bg-gray-100 rounded p-2 my-1 overflow-x-auto text-xs",children:(0,t.jsx)("code",{children:e})}):(0,t.jsx)("code",{className:"px-1 py-0.5 rounded bg-gray-100 text-xs font-mono",children:e}),table:({children:e})=>(0,t.jsx)("div",{className:"overflow-x-auto my-2",children:(0,t.jsx)("table",{className:"text-xs border-collapse w-full",children:e})}),th:({children:e})=>(0,t.jsx)("th",{className:"border border-gray-200 px-2 py-1 bg-gray-50 font-medium text-left",children:e}),td:({children:e})=>(0,t.jsx)("td",{className:"border border-gray-200 px-2 py-1",children:e})},children:e}),eX=({open:e,onClose:s,accessToken:a})=>{let[r,l]=(0,T.useState)([]),[i,n]=(0,T.useState)(""),[o,c]=(0,T.useState)(!1),[d,u]=(0,T.useState)(void 0),[m,x]=(0,T.useState)([]),[h,p]=(0,T.useState)(!1),[g,f]=(0,T.useState)(""),[j,_]=(0,T.useState)(null),[b,v]=(0,T.useState)([]),N=(0,T.useRef)(null),C=(0,T.useRef)(null);(0,T.useEffect)(()=>{e&&0===m.length&&w()},[e]),(0,T.useEffect)(()=>{"function"==typeof N.current?.scrollIntoView&&N.current.scrollIntoView({behavior:"smooth"})},[r,g,b,j]);let w=async()=>{if(a){p(!0);try{let e=await (0,F.modelHubCall)(a);if(e?.data?.length>0){let t=e.data.map(e=>e.model_group).sort();x(t)}}catch(e){console.error("Failed to load models:",e)}finally{p(!1)}}},S=async()=>{if(!a||!i.trim()||o)return;let e=[...r,{role:"user",content:i.trim()}];l(e),n(""),c(!0),f(""),_(null),v([]);let t=new AbortController;C.current=t;let s="",u=[];try{await (0,F.usageAiChatStream)(a,e.slice(-20).map(e=>({role:e.role,content:e.content})),d||"",e=>{_(null),s+=e,f(s)},()=>{_(null),v([]),l(e=>[...e,{role:"assistant",content:s,toolCalls:u.length>0?[...u]:void 0}]),f("")},e=>{_(null),v([]),l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")},e=>{_(e)},e=>{let t=u.findIndex(t=>t.tool_name===e.tool_name);t>=0?u[t]={...e}:u.push({...e}),v([...u])},t.signal)}catch(s){if(s?.name==="AbortError"||t.signal.aborted)return;let e=s?.message||"Failed to get response. Please try again.";l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")}finally{c(!1),C.current=null}};return(0,t.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,t.jsxs)("div",{className:"px-5 pt-5 pb-3 border-b border-gray-100 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-blue-600",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.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,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"Ask AI"})]}),(0,t.jsx)("button",{onClick:()=>{C.current&&C.current.abort(),s()},className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100",children:(0,t.jsx)("svg",{className:"w-5 h-5",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.jsx)("p",{className:"text-xs text-gray-500",children:"Ask about your spend, models, keys, and trends"})]}),(0,t.jsx)("div",{className:"px-5 py-3 border-b border-gray-100 flex-shrink-0",children:(0,t.jsx)(k.Select,{placeholder:"Select a model (optional, defaults to gpt-4o-mini)",value:d,onChange:e=>u(e),loading:h,showSearch:!0,allowClear:!0,size:"small",className:"w-full",options:m.map(e=>({label:e,value:e})),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-gray-50",children:[0===r.length&&!g&&!o&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[(0,t.jsx)("svg",{className:"w-8 h-8 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.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,t.jsx)("p",{className:"text-sm font-medium",children:"Ask a question about your usage"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:'e.g. "Which model costs me the most?"'})]}),r.map((e,s)=>(0,t.jsx)("div",{children:"user"===e.role?(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.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,t.jsxs)("div",{className:"space-y-2",children:[e.toolCalls&&e.toolCalls.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:e.toolCalls.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),(0,t.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,t.jsx)(eQ,{content:e.content})})]})},s)),o&&b.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:b.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),o&&!g&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-gray-500",children:[(0,t.jsx)(eY.Spin,{size:"small"}),(0,t.jsx)("span",{className:"italic",children:j||"Thinking..."})]}),g&&(0,t.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,t.jsx)(eQ,{content:g})}),(0,t.jsx)("div",{ref:N})]}),(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-gray-200 bg-white flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(eG,{value:i,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),S())},placeholder:"Ask about your usage...",autoSize:{minRows:1,maxRows:3},className:"flex-1",disabled:o}),(0,t.jsx)(y.Button,{type:"primary",onClick:S,disabled:!i.trim()||o,loading:o,children:"Send"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,t.jsx)("button",{onClick:()=>{l([]),f(""),v([]),_(null)},className:"text-xs text-gray-400 hover:text-gray-600 transition-colors",disabled:0===r.length,children:"Clear chat"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Enter to send"})]})]})]})};var e0=e.i(299251),e1=e.i(153702),e2=e.i(160818),e5=e.i(777579),e4=e.i(983561);e.i(247167);var e6=e.i(931067);let e3={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 e7=e.i(9583),e9=T.forwardRef(function(e,t){return T.createElement(e7.default,(0,e6.default)({},e,{ref:t,icon:e3}))}),e8=e.i(232164),te=e.i(645526),tt=e.i(771674),ts=e.i(906579);let ta=[{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,t.jsx)(e2.GlobalOutlined,{style:{fontSize:"16px"}})},{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,t.jsx)(e0.BankOutlined,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,t.jsx)(te.TeamOutlined,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,t.jsx)(e9,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,t.jsx)(e8.TagsOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,t.jsx)(e4.RobotOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user",label:"User Usage",description:"View usage by individual users",icon:(0,t.jsx)(tt.UserOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,t.jsx)(e5.LineChartOutlined,{style:{fontSize:"16px"}}),adminOnly:!0}],tr=({value:e,onChange:s,isAdmin:a,title:r="Usage View",description:l="Select the usage data you want to view","data-id":i})=>{let n=ta.filter(e=>!e.adminOnly||!!a).map(e=>{let t=e.label,s=e.description;return e.showForAdmin&&e.showForNonAdmin&&(t=a?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(s=a?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:t,description:s,icon:e.icon,badgeText:e.badgeText}});return(0,t.jsx)("div",{className:"w-full","data-id":i,children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,t.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,t.jsx)("div",{className:"flex-shrink-0 flex items-center",children:(0,t.jsx)(e1.BarChartOutlined,{style:{fontSize:"32px"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:r}),(0,t.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:l})]})]}),(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)(k.Select,{value:e,onChange:s,className:"w-54 sm:w-64 md:w-72",size:"large",options:n.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:s.icon}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.label}),(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:s.description})]}),s.badgeText&&(0,t.jsx)("div",{className:"items-center",children:(0,t.jsx)(ts.Badge,{color:"blue",count:s.badgeText})})]}):e.label},labelRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:s.icon}),(0,t.jsx)("span",{className:"text-sm",children:s.label})]}):e.label}})})]})})};e.s(["default",0,({teams:e,organizations:U})=>{let R,{accessToken:V,userRole:I,userId:B,premiumUser:W}=(0,S.default)(),[z,K]=(0,T.useState)(null),[Y,H]=(0,T.useState)(!1),[G,Z]=(0,T.useState)(!1),[J,Q]=(0,T.useState)(!1),X=(0,T.useMemo)(()=>new Date(Date.now()-6048e5),[]),es=(0,T.useMemo)(()=>new Date,[]),[ea,ei]=(0,T.useState)({from:X,to:es}),[en,eo]=(0,T.useState)([]),{data:ec=[]}=(0,w.useCustomers)(),{data:ed}=(0,C.useAgents)(),{data:eu}=(0,q.useCurrentUser)();console.log(`currentUser: ${JSON.stringify(eu)}`),console.log(`currentUser max budget: ${eu?.max_budget}`);let em=A.all_admin_roles.includes(I||""),[ex,eh]=(0,T.useState)(""),[ep,eg]=(0,n.useDebouncedState)("",{wait:300}),{data:ef,fetchNextPage:ej,hasNextPage:e_,isFetchingNextPage:ey,isLoading:eb}=(0,L.useInfiniteUsers)(50,ep||void 0),ek=(0,T.useMemo)(()=>{if(!ef?.pages)return[];let e=new Set,t=[];for(let s of ef.pages)for(let a of s.users)e.has(a.user_id)||(e.add(a.user_id),t.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 t},[ef]),[ev,eN]=(0,T.useState)(em?null:B||null),[eT,eC]=(0,T.useState)("groups"),[ew,eS]=(0,T.useState)(!1),[eq,eD]=(0,T.useState)(!1),[eA,eM]=(0,T.useState)(!1),[eE,eO]=(0,T.useState)("global"),[eF,e$]=(0,T.useState)(!0),[eP,eR]=(0,T.useState)(5),[eV,eB]=(0,T.useState)(5),[eW,eK]=(0,T.useState)(!1),eY=async()=>{V&&eo(Object.values(await (0,F.tagListCall)(V)).map(e=>({label:e.name,value:e.name})))};(0,T.useEffect)(()=>{eY()},[V]),(0,T.useEffect)(()=>{!em&&B&&eN(B)},[em,B]);let eH=em?ev:B||null,eG=(0,T.useMemo)(()=>ea.from?new Date(ea.from):null,[ea.from]),eZ=(0,T.useMemo)(()=>ea.to?new Date(ea.to):null,[ea.to]),eJ=(0,T.useRef)(0);(0,T.useEffect)(()=>{if(!V||!eG||!eZ)return;let e=++eJ.current;Z(!0),H(!1),K(null),(0,F.userDailyActivityAggregatedCall)(V,eG,eZ,eH).then(t=>{eJ.current===e&&(K(t),Z(!1),Q(!1))}).catch(()=>{eJ.current===e&&(H(!0),Z(!1))})},[V,eG,eZ,eH]);let eQ=er({fetchFn:F.userDailyActivityCall,args:[V,eG,eZ,eH],enabled:Y&&!!V&&!!eG&&!!eZ}),e0=(0,T.useMemo)(()=>z||(Y?eQ.data:{results:[],metadata:{}}),[z,Y,eQ.data]),e1=G||eQ.loading;(0,T.useEffect)(()=>{Y&&!eQ.loading&&eQ.data.results.length>0&&Q(!1)},[Y,eQ.loading,eQ.data.results.length]);let e2=(0,T.useCallback)(e=>{Q(!0),ei(e)},[]),e5=e0.metadata?.total_spend||0,e4=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.models||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e6=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.model_groups||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e3=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({provider:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}))},[e0.results]),e7=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.api_keys||{}).forEach(([t,s])=>{e[t]||(e[t]={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:null,tags:s.metadata.tags||[]}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests,e[t].metrics.failed_requests+=s.metrics.failed_requests,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||[],spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,eP)},[e0.results,eP]),e9=(0,T.useMemo)(()=>[...e0.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),[e0.results]),e8=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"models",e),[e0,e]),te=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"api_keys",e),[e0,e]),tt=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"mcp_servers",e),[e0,e]);return(0,t.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,t.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,t.jsx)(tr,{value:eE,onChange:e=>eO(e),isAdmin:em}),(0,t.jsx)($.default,{value:ea,onValueChange:e2})]}),eQ.isFetchingMore&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",eQ.progress.currentPage," /"," ",eQ.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:eQ.cancel,children:"Stop"})]})}),eQ.cancelled&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",eQ.progress.currentPage,"/",eQ.progress.totalPages," ","pages loaded)"]})}),"global"===eE&&(0,t.jsxs)(t.Fragment,{children:[em&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by user"}),(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!0,style:{width:"100%"},placeholder:"Select user to filter...",value:ev,onChange:e=>eN(e??null),filterOption:!1,onSearch:e=>{eh(e),eg(e)},searchValue:ex,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&e_&&!ey&&ej()},loading:eb,notFoundContent:eb?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No users found",options:ek,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,ey&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]})})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"Model Activity"}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"MCP Server Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Button,{onClick:()=>eM(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.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,t.jsx)(y.Button,{onClick:()=>eD(!0),icon:(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:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsxs)(d.Col,{numColSpan:2,children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mt-2 mb-2",children:(0,t.jsxs)(f.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content text-lg",children:["Project Spend"," ",ea.from&&ea.to&&(0,t.jsxs)(t.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,t.jsx)(et.default,{userSpend:e5,selectedTeam:null,userMaxBudget:eu?.max_budget||null})]}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Usage Metrics"}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_api_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_successful_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.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,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:e0.metadata?.total_failed_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Average Cost per Request"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)((e5||0)/(e0.metadata?.total_api_requests||1),4)]})]}),(0,t.jsxs)(c.Card,{className:"cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>eK(!eW),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),eW?(0,t.jsx)(s.DownOutlined,{className:"text-gray-400 text-xs"}):(0,t.jsx)(i.RightOutlined,{className:"text-gray-400 text-xs"})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_tokens?.toLocaleString()||0})]})]}),eW&&(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Input Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-blue-600",children:Math.max(0,(e0.metadata?.total_prompt_tokens||0)-(e0.metadata?.total_cache_read_input_tokens||0)-(e0.metadata?.total_cache_creation_input_tokens||0)).toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Output Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-cyan-600",children:e0.metadata?.total_completion_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Read Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_cache_read_input_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Write Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-purple-600",children:e0.metadata?.total_cache_creation_input_tokens?.toLocaleString()||0})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)(o.BarChart,{data:e9,index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:e7,teams:null,topKeysLimit:eP,setTopKeysLimit:eR})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"groups"===eT?"Top Public Model Names":"Top Litellm Models"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eV,onChange:e=>eB(e)}),(0,t.jsxs)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"groups"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("groups"),children:"Public Model Name"}),(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"individual"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("individual"),children:"Litellm Model Name"})]})]}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(R="groups"===eT?e6:e4,(0,t.jsx)(o.BarChart,{className:"mt-4",style:{height:52*Math.min(R.length,eV)},data:R,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.key}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.tokens.toLocaleString()]})]})}}))})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(ez,{loading:e1,isDateChanging:J,providerSpend:e3})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:e8})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:te})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:tt})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:e0})})]})]})]}),"organization"===eE&&(0,t.jsx)(eI,{accessToken:V,entityType:"organization",userID:B,userRole:I,dateValue:ea,entityList:U?.map(e=>({label:e.organization_alias,value:e.organization_id}))||null,premiumUser:W}),"team"===eE&&(0,t.jsx)(eI,{accessToken:V,entityType:"team",userID:B,userRole:I,entityList:e?.map(e=>({label:e.team_alias,value:e.team_id}))||null,premiumUser:W,dateValue:ea}),"customer"===eE&&(0,t.jsx)(eI,{accessToken:V,entityType:"customer",userID:B,userRole:I,entityList:ec?.map(e=>({label:e.alias||e.user_id,value:e.user_id}))||null,premiumUser:W,dateValue:ea}),"tag"===eE&&(0,t.jsxs)(t.Fragment,{children:[eF&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",message:"Reusable credentials are automatically tracked as tags",description:(0,t.jsxs)(N.Typography.Text,{children:["When a reusable credential is used, it will appear as a tag prefixed with"," ",(0,t.jsx)(N.Typography.Text,{code:!0,children:"Credential: "}),"in this view."]}),closable:!0,onClose:()=>e$(!1),className:"mb-5"}),(0,t.jsx)(eI,{accessToken:V,entityType:"tag",userID:B,userRole:I,entityList:en,premiumUser:W,dateValue:ea})]}),"agent"===eE&&(0,t.jsx)(eI,{accessToken:V,entityType:"agent",userID:B,userRole:I,entityList:ed?.agents?.map(e=>({label:e.agent_name,value:e.agent_id}))||null,premiumUser:W,dateValue:ea}),"user"===eE&&(0,t.jsx)(eI,{accessToken:V,entityType:"user",userID:B,userRole:I,entityList:ek.length>0?ek:null,premiumUser:W,dateValue:ea}),"user-agent-activity"===eE&&(0,t.jsx)(ee,{accessToken:V,userRole:I,dateValue:ea})]})}),(0,t.jsx)(E.default,{isOpen:ew,onClose:()=>eS(!1),accessToken:V}),(0,t.jsx)(O.default,{isOpen:eq,onClose:()=>eD(!1),entityType:"team",spendData:{results:e0.results,metadata:e0.metadata},dateRange:ea,selectedFilters:[],customTitle:"Export Usage Data"}),(0,t.jsx)(eX,{open:eA,onClose:()=>eM(!1),accessToken:V})]})}],797305)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,973706,e=>{"use strict";var t=e.i(843476),s=e.i(72713),a=e.i(637235),r=e.i(994388),l=e.i(599724),i=e.i(166540),n=e.i(271645);let o=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,i.default)().startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,i.default)().subtract(7,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,i.default)().subtract(30,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,i.default)().startOf("month").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,i.default)().startOf("year").toDate(),to:(0,i.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:c,label:d="Select Time Range",showTimeRange:u=!0})=>{let[m,x]=(0,n.useState)(!1),[h,p]=(0,n.useState)(e),[g,f]=(0,n.useState)(null),[j,_]=(0,n.useState)(""),[y,b]=(0,n.useState)(""),k=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of o){let s=t.getValue(),a=(0,i.default)(e.from).isSame((0,i.default)(s.from),"day"),r=(0,i.default)(e.to).isSame((0,i.default)(s.to),"day");if(a&&r)return t.shortLabel}return null},[]);(0,n.useEffect)(()=>{f(v(e))},[e,v]);let N=(0,n.useCallback)(()=>{if(!j||!y)return{isValid:!0,error:""};let e=(0,i.default)(j,"YYYY-MM-DD"),t=(0,i.default)(y,"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"}},[j,y])();(0,n.useEffect)(()=>{e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,n.useEffect)(()=>{let e=e=>{k.current&&!k.current.contains(e.target)&&x(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let T=(0,n.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let s=e=>(0,i.default)(e).format("D MMM, HH:mm");return`${s(e)} - ${s(t)}`},[]),C=(0,n.useCallback)(e=>{let t;if(!e.from)return e;let s={...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),s.from=a,s.to=t,s},[]),w=(0,n.useCallback)(()=>{try{if(j&&y&&N.isValid){let e=(0,i.default)(j,"YYYY-MM-DD").startOf("day"),t=(0,i.default)(y,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let s={from:e.toDate(),to:t.toDate()};p(s);let a=v(s);f(a)}}}catch(e){console.warn("Invalid date format:",e)}},[j,y,N.isValid,v]);return(0,n.useEffect)(()=>{w()},[w]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d&&(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:d}),(0,t.jsxs)("div",{className:"relative",ref:k,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:()=>x(!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:T(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:o.map(e=>{let s=g===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 ${s?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:s}=e.getValue();p({from:t,to:s}),f(e.shortLabel),_((0,i.default)(t).format("YYYY-MM-DD")),b((0,i.default)(s).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${s?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${s?"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)(s.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:j,onChange:e=>_(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 ${!N.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:y,onChange:e=>b(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 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!N.isValid&&N.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:N.error})]})}),h.from&&h.to&&N.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,i.default)(h.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,i.default)(h.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)(r.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),f(v(e)),x(!1)},children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:()=>{h.from&&h.to&&N.isValid&&(c(h),requestIdleCallback(()=>{c(C(h))},{timeout:100}),x(!1))},disabled:!h.from||!h.to||!N.isValid,children:"Apply"})]})})]})]})})]})]})}])},289793,952840,617885,286718,23371,487147,498610,785952,193523,260573,e=>{"use strict";var t=e.i(764205),s=e.i(266027),a=e.i(243652),r=e.i(708347),l=e.i(135214);let i=(0,a.createQueryKeys)("agents");e.s(["useAgents",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,t.getAgentsList)(e),enabled:!!e&&r.all_admin_roles.includes(a||"")})}],289793);let n=(0,a.createQueryKeys)("customers");e.s(["useCustomers",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,t.allEndUsersCall)(e),enabled:!!e&&r.all_admin_roles.includes(a)})}],952840);var o=e.i(621482);let c=(0,a.createQueryKeys)("infiniteUsers"),d=50;e.s(["useInfiniteUsers",0,(e=d,s)=>{let{accessToken:a,userRole:i}=(0,l.default)();return(0,o.useInfiniteQuery)({queryKey:c.list({filters:{pageSize:e,...s&&{searchEmail:s}}}),queryFn:async({pageParam:r})=>await (0,t.userListCall)(a,null,r,e,s||null),initialPageParam:1,getNextPageParam:e=>{if(e.pagee&&t&&t.length?(0,u.jsxs)("div",{className:"w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[(0,u.jsx)("p",{className:"text-tremor-content-strong",children:s}),t.map(e=>{let t=e.dataKey?.toString();if(!t||!e.payload)return null;let s=((e,t)=>{let s=t.substring(t.indexOf(".")+1);if(e.metrics&&s in e.metrics)return e.metrics[s]})(e.payload,t),a=t.includes("spend"),r=void 0!==s?a?`$${s.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:s.toLocaleString():"N/A",l=b[e.color]||e.color;return(0,u.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-2 ring-white drop-shadow-md",style:{backgroundColor:l}}),(0,u.jsx)("p",{className:"font-medium text-tremor-content dark:text-dark-tremor-content",children:t.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]}),(0,u.jsx)("p",{className:"font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",children:r})]},t)})]}):null,v=({categories:e,colors:t})=>(0,u.jsx)("div",{className:"flex items-center justify-end space-x-4",children:e.map((e,s)=>{let a=b[t[s]]||t[s];return(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-4 ring-white",style:{backgroundColor:a}}),(0,u.jsx)("p",{className:"text-sm text-tremor-content dark:text-dark-tremor-content",children:e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]},e)})});e.s(["CustomLegend",0,v,"CustomTooltip",0,k],286718);var N=e.i(291542),T=e.i(271645);let C=[{title:"Model",dataIndex:"model",key:"model",render:e=>e||"-"},{title:"Spend (USD)",dataIndex:"spend",key:"spend",render:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`},{title:"Successful",dataIndex:"successful_requests",key:"successful_requests",render:e=>(0,u.jsx)("span",{className:"text-green-600",children:e?.toLocaleString()||0})},{title:"Failed",dataIndex:"failed_requests",key:"failed_requests",render:e=>(0,u.jsx)("span",{className:"text-red-600",children:e?.toLocaleString()||0})},{title:"Tokens",dataIndex:"tokens",key:"tokens",render:e=>e?.toLocaleString()||0}],w=({topModels:e})=>{let[t,s]=(0,T.useState)("table");return 0===e.length?null:(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,u.jsx)(_.Title,{children:"Model Usage"}),(0,u.jsxs)("div",{className:"flex space-x-2",children:[(0,u.jsx)("button",{onClick:()=>s("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,u.jsx)("button",{onClick:()=>s("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"})]})]}),"chart"===t?(0,u.jsx)("div",{className:"max-h-[234px] overflow-y-auto",children:(0,u.jsx)(p.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,m.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:180,tickGap:5,showLegend:!1})}):(0,u.jsx)(N.Table,{columns:C,dataSource:e,rowKey:"model",size:"small",pagination:!1,scroll:e.length>5?{y:195}:void 0})]})};function S(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function q(e){return 0===e?"$0":e>=1e6?"$"+e/1e6+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}e.s(["valueFormatter",()=>S,"valueFormatterSpend",()=>q],23371);let L=({modelName:e,metrics:t,hidePromptCachingMetrics:s=!1})=>(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:t.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:t.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:t.total_tokens.toLocaleString()}),(0,u.jsxs)(j.Text,{children:[Math.round(t.total_tokens/t.total_successful_requests)," avg per successful request"]})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend,2)]}),(0,u.jsxs)(j.Text,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend/t.total_successful_requests,3)," per successful request"]})]})]}),t.top_api_keys&&t.top_api_keys.length>0&&(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsx)(_.Title,{children:"Top Virtual Keys by Spend"}),(0,u.jsx)("div",{className:"mt-3",children:(0,u.jsx)("div",{className:"grid grid-cols-1 gap-2",children:t.top_api_keys.map((e,t)=>(0,u.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium",children:e.key_alias||`${e.api_key.substring(0,10)}...`}),e.team_id&&(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,u.jsxs)("div",{className:"text-right",children:[(0,u.jsxs)(j.Text,{className:"font-medium",children:["$",(0,m.formatNumberWithCommas)(e.spend,2)]}),(0,u.jsxs)(j.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,u.jsx)(w,{topModels:t.top_models}),(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Spend per day"}),(0,u.jsx)(v,{categories:["metrics.spend"],colors:["green"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2,!0)}`,yAxisWidth:72})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4 mt-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.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:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Requests per day"}),(0,u.jsx)(v,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Success vs Failed Requests"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),!s&&(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Prompt Caching Metrics"}),(0,u.jsx)(v,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,u.jsxs)("div",{className:"mb-2",children:[(0,u.jsxs)(j.Text,{children:["Cache Read: ",t.total_cache_read_input_tokens?.toLocaleString()||0," tokens"]}),(0,u.jsxs)(j.Text,{children:["Cache Creation: ",t.total_cache_creation_input_tokens?.toLocaleString()||0," tokens"]})]}),(0,u.jsx)(h.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:S,customTooltip:k,showLegend:!1})]})]})]});e.s(["ActivityMetrics",0,({modelMetrics:e,hidePromptCachingMetrics:t=!1})=>{let s=Object.keys(e).sort((t,s)=>""===t?1:""===s?-1:e[s].total_spend-e[t].total_spend),a={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=>{a.total_requests+=e.total_requests,a.total_successful_requests+=e.total_successful_requests,a.total_tokens+=e.total_tokens,a.total_spend+=e.total_spend,a.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,a.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{a.daily_data[e.date]||(a.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}),a.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,a.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,a.daily_data[e.date].total_tokens+=e.metrics.total_tokens,a.daily_data[e.date].api_requests+=e.metrics.api_requests,a.daily_data[e.date].spend+=e.metrics.spend,a.daily_data[e.date].successful_requests+=e.metrics.successful_requests,a.daily_data[e.date].failed_requests+=e.metrics.failed_requests,a.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,a.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let r=Object.entries(a.daily_data).map(([e,t])=>({date:e,metrics:t})).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,u.jsxs)("div",{className:"space-y-8",children:[(0,u.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,u.jsx)(_.Title,{children:"Overall Usage"}),(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4 mb-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:a.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:a.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:a.total_tokens.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(a.total_spend,2)]})]})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens Over Time"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Requests Over Time"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:k,showLegend:!1})]})]})]}),(0,u.jsx)(y.Collapse,{defaultActiveKey:s[0],children:s.map(s=>(0,u.jsx)(y.Collapse.Panel,{header:(0,u.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,u.jsx)(_.Title,{children:e[s].label||"Unknown Item"}),(0,u.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,u.jsxs)("span",{children:["$",(0,m.formatNumberWithCommas)(e[s].total_spend,2)]}),(0,u.jsxs)("span",{children:[e[s].total_requests.toLocaleString()," requests"]})]})]}),children:(0,u.jsx)(L,{modelName:s||"Unknown Model",metrics:e[s],hidePromptCachingMetrics:t})},s))})]})},"processActivityData",0,(e,t,s=[])=>{let a={};return e.results.forEach(e=>{Object.entries(e.breakdown[t]||{}).forEach(([r,l])=>{a[r]||(a[r]={label:"api_keys"===t?((e,t,s)=>{let a=e.metadata.key_alias||`key-hash-${t}`,r=e.metadata.team_id;if(r){let e=(0,x.resolveTeamAliasFromTeamID)(r,s);return e?`${a} (team: ${e})`:`${a} (team_id: ${r})`}return a})(l,r,s):"entities"===t&&(l.metadata?.agent_name||l.metadata?.team_alias)||r,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[r].total_requests+=l.metrics.api_requests,a[r].prompt_tokens+=l.metrics.prompt_tokens,a[r].completion_tokens+=l.metrics.completion_tokens,a[r].total_tokens+=l.metrics.total_tokens,a[r].total_spend+=l.metrics.spend,a[r].total_successful_requests+=l.metrics.successful_requests,a[r].total_failed_requests+=l.metrics.failed_requests,a[r].total_cache_read_input_tokens+=l.metrics.cache_read_input_tokens||0,a[r].total_cache_creation_input_tokens+=l.metrics.cache_creation_input_tokens||0,a[r].daily_data.push({date:e.date,metrics:{prompt_tokens:l.metrics.prompt_tokens,completion_tokens:l.metrics.completion_tokens,total_tokens:l.metrics.total_tokens,api_requests:l.metrics.api_requests,spend:l.metrics.spend,successful_requests:l.metrics.successful_requests,failed_requests:l.metrics.failed_requests,cache_read_input_tokens:l.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:l.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==t&&Object.entries(a).forEach(([s,r])=>{let l={};e.results.forEach(e=>{let a=e.breakdown[t]?.[s];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(([e,t])=>{l[e]||(l[e]={api_key:e,key_alias:t.metadata.key_alias,team_id:t.metadata.team_id,spend:0,requests:0,tokens:0}),l[e].spend+=t.metrics.spend,l[e].requests+=t.metrics.api_requests,l[e].tokens+=t.metrics.total_tokens})}),a[s].top_api_keys=Object.values(l).sort((e,t)=>t.spend-e.spend).slice(0,5)}),"api_keys"===t&&Object.entries(a).forEach(([t,s])=>{let r={};e.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,s])=>{if(s&&"api_key_breakdown"in s){let a=s.api_key_breakdown?.[t];a&&(r[e]||(r[e]={model:e,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0}),r[e].spend+=a.metrics.spend,r[e].requests+=a.metrics.api_requests,r[e].successful_requests+=a.metrics.successful_requests||0,r[e].failed_requests+=a.metrics.failed_requests||0,r[e].tokens+=a.metrics.total_tokens)}})}),a[t].top_models=Object.values(r).sort((e,t)=>t.spend-e.spend)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())}),a}],487147);var D=e.i(994388),A=e.i(366283),M=e.i(779241),O=e.i(212931),E=e.i(808613),F=e.i(482725),$=e.i(199133),U=e.i(727749);e.s(["default",0,({isOpen:e,onClose:s,accessToken:a})=>{let[r]=E.Form.useForm(),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(null),[c,d]=(0,T.useState)(!1),[m,x]=(0,T.useState)("cloudzero"),[h,p]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e&&a&&g()},[e,a]);let g=async()=>{d(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"}});if(e.ok){let t=await e.json();o(t),r.setFieldsValue({connection_id:t.connection_id})}else if(404!==e.status){let t=await e.json();U.default.fromBackend(`Failed to load existing settings: ${t.error||"Unknown error"}`)}}catch(e){console.error("Error loading CloudZero settings:",e),U.default.fromBackend("Failed to load existing settings")}finally{d(!1)}},f=async e=>{if(!a)return void U.default.fromBackend("No access token available");i(!0);try{let s=n?"/cloudzero/settings":"/cloudzero/init",r=n?"PUT":"POST",l={...e,timezone:"UTC"},i=await fetch(s,{method:r,headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(l)}),c=await i.json();if(i.ok)return U.default.success(c.message||"CloudZero settings saved successfully"),o({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return U.default.fromBackend(c.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),U.default.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},_=async()=>{if(!a)return void U.default.fromBackend("No access token available");p(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),r=await e.json();e.ok?(U.default.success(r.message||"Export to CloudZero completed successfully"),s()):U.default.fromBackend(r.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),U.default.fromBackend("Failed to export to CloudZero")}finally{p(!1)}},y=async()=>{p(!0);try{U.default.info("CSV export functionality coming soon!"),s()}catch(e){console.error("Error exporting CSV:",e),U.default.fromBackend("Failed to export CSV")}finally{p(!1)}},b=async()=>{if("cloudzero"===m){if(!n){let e=await r.validateFields();if(!await f(e))return}await _()}else await y()},k=()=>{r.resetFields(),x("cloudzero"),o(null),s()},v=[{value:"cloudzero",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,u.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsx)("span",{children:"Export to CSV"})]})}];return(0,u.jsx)(O.Modal,{title:"Export Data",open:e,onCancel:k,footer:null,width:600,destroyOnHidden:!0,children:(0,u.jsxs)("div",{className:"space-y-4",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,u.jsx)($.Select,{value:m,onChange:x,options:v,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,u.jsx)("div",{children:c?(0,u.jsx)("div",{className:"flex justify-center py-8",children:(0,u.jsx)(F.Spin,{size:"large"})}):(0,u.jsxs)(u.Fragment,{children:[n&&(0,u.jsx)(A.Callout,{title:"Existing CloudZero Configuration",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsxs)(j.Text,{children:["API Key: ",n.api_key_masked,(0,u.jsx)("br",{}),"Connection ID: ",n.connection_id]})}),!n&&(0,u.jsxs)(E.Form,{form:r,layout:"vertical",children:[(0,u.jsx)(E.Form.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,u.jsx)(M.TextInput,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,u.jsx)(E.Form.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,u.jsx)(M.TextInput,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,u.jsx)(A.Callout,{title:"CSV Export",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,u.jsx)(j.Text,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,u.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,u.jsx)(D.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,u.jsx)(D.Button,{onClick:b,loading:l||h,disabled:l||h,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})}],498610);var P=e.i(785242),R=e.i(464571),V=e.i(981339);let I=({value:e,onChange:t})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,u.jsx)($.Select,{value:e,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]}),B=({dateRange:e,selectedFilters:t})=>(0,u.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 W=e.i(91739);let z=({value:e,onChange:t,entityType:s})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,u.jsx)(W.Radio.Group,{value:e,onChange:e=>t(e.target.value),className:"w-full",children:(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily_with_keys",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s," and key"]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s,", split by API key"]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(W.Radio,{value:"daily_with_models",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",s," and model"]}),(0,u.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]});var Y=e.i(59935);let K=(e,t)=>({id:e,alias:t[e]||e}),H=["spend","api_requests","successful_requests","failed_requests","total_tokens","prompt_tokens","completion_tokens","cache_read_input_tokens","cache_creation_input_tokens"],G=e=>{let t=e.entities;return t&&Object.keys(t).length>0?t:(e=>{let t=e.api_keys;if(!t||0===Object.keys(t).length)return{};let s={};for(let[e,a]of Object.entries(t)){let t=a?.metadata?.team_id||"Unassigned";s[t]||(s[t]={metrics:Object.fromEntries(H.map(e=>[e,0])),api_key_breakdown:{}});let r=s[t].metrics,l=a?.metrics||{};for(let e of H)r[e]+=l[e]||0;s[t].api_key_breakdown[e]=a}return s})(e)},Z=(e,t,s,a={})=>{switch(t){case"daily":default:return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([r,l])=>{let{id:i,alias:n}=K(r,s);a.push({Date:e.date,[t]:n,[`${t} ID`]:i,"Spend ($)":(0,m.formatNumberWithCommas)(l.metrics.spend,4),Requests:l.metrics.api_requests,"Successful Requests":l.metrics.successful_requests,"Failed Requests":l.metrics.failed_requests,"Total Tokens":l.metrics.total_tokens,"Prompt Tokens":l.metrics.prompt_tokens||0,"Completion Tokens":l.metrics.completion_tokens||0})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_keys":return((e,t,s={})=>{let a={};return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([t,r])=>{let{id:l,alias:i}=K(t,s);Object.entries(r.api_key_breakdown||{}).forEach(([t,s])=>{let r=s?.metadata?.key_alias||null,n=`${e.date}_${l}_${t}`;a[n]?(a[n].metrics.spend+=s.metrics?.spend||0,a[n].metrics.api_requests+=s.metrics?.api_requests||0,a[n].metrics.successful_requests+=s.metrics?.successful_requests||0,a[n].metrics.failed_requests+=s.metrics?.failed_requests||0,a[n].metrics.total_tokens+=s.metrics?.total_tokens||0,a[n].metrics.prompt_tokens+=s.metrics?.prompt_tokens||0,a[n].metrics.completion_tokens+=s.metrics?.completion_tokens||0):a[n]={Date:e.date,entityId:l,entityAlias:i,keyId:t,keyAlias:r,metrics:{spend:s.metrics?.spend||0,api_requests:s.metrics?.api_requests||0,successful_requests:s.metrics?.successful_requests||0,failed_requests:s.metrics?.failed_requests||0,total_tokens:s.metrics?.total_tokens||0,prompt_tokens:s.metrics?.prompt_tokens||0,completion_tokens:s.metrics?.completion_tokens||0}}})})}),Object.values(a).map(e=>({Date:e.Date,[t]:e.entityAlias,[`${t} ID`]:e.entityId,"Key Alias":e.keyAlias||"-","Key ID":e.keyId,"Spend ($)":(0,m.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})).sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_models":return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{let r={};Object.entries(G(e.breakdown)).forEach(([t,s])=>{r[t]||(r[t]={}),Object.entries(e.breakdown.models||{}).forEach(([e,a])=>{Object.entries(s.api_key_breakdown||{}).forEach(([s,a])=>{r[t][e]||(r[t][e]={spend:0,requests:0,successful:0,failed:0,tokens:0}),r[t][e].spend+=a.metrics.spend||0,r[t][e].requests+=a.metrics.api_requests||0,r[t][e].successful+=a.metrics.successful_requests||0,r[t][e].failed+=a.metrics.failed_requests||0,r[t][e].tokens+=a.metrics.total_tokens||0})})}),Object.entries(r).forEach(([r,l])=>{let{id:i,alias:n}=K(r,s);Object.entries(l).forEach(([s,r])=>{a.push({Date:e.date,[t]:n,[`${t} ID`]:i,Model:s,"Spend ($)":(0,m.formatNumberWithCommas)(r.spend,4),Requests:r.requests,Successful:r.successful,Failed:r.failed,"Total Tokens":r.tokens})})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a)}},J=({isOpen:e,onClose:t,entityType:s,spendData:a,dateRange:r,selectedFilters:l,customTitle:i})=>{let[n,o]=(0,T.useState)("csv"),[c,d]=(0,T.useState)("daily"),[m,h]=(0,T.useState)(!1),{data:p,isLoading:g}=(0,P.useTeams)(),f=s.charAt(0).toUpperCase()+s.slice(1),j=i||`Export ${f} Usage`,_=(0,T.useMemo)(()=>(0,x.createTeamAliasMap)(p),[p]),y=async e=>{let i=e||n;h(!0);try{"csv"===i?(((e,t,s,a,r={})=>{let l=Z(e,t,s,r),i=new Blob([Y.default.unparse(l)],{type:"text/csv;charset=utf-8;"}),n=window.URL.createObjectURL(i),o=document.createElement("a");o.href=n,o.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(n)})(a,c,f,s,_),U.default.success(`${f} usage data exported successfully as CSV`)):(((e,t,s,a,r,l,i={})=>{let n=Z(e,t,s,i),o={export_date:new Date().toISOString(),entity_type:a,date_range:{from:r.from?.toISOString(),to:r.to?.toISOString()},filters_applied:l.length>0?l:"None",export_scope:t,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}},c=new Blob([JSON.stringify({metadata:o,data:n},null,2)],{type:"application/json"}),d=window.URL.createObjectURL(c),u=document.createElement("a");u.href=d,u.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(d)})(a,c,f,s,r,l,_),U.default.success(`${f} usage data exported successfully as JSON`)),t()}catch(e){console.error("Error exporting data:",e),U.default.fromBackend("Failed to export data")}finally{h(!1)}};return(0,u.jsx)(O.Modal,{title:(0,u.jsx)("span",{className:"text-base font-semibold",children:j}),open:e,onCancel:t,footer:null,width:480,children:(0,u.jsxs)("div",{className:"space-y-5 py-2",children:[g?(0,u.jsx)(V.Skeleton,{active:!0}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(B,{dateRange:r,selectedFilters:l}),(0,u.jsx)(z,{value:c,onChange:d,entityType:s}),(0,u.jsx)(I,{value:n,onChange:o})]}),g?(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(V.Skeleton.Button,{active:!0}),(0,u.jsx)(V.Skeleton.Button,{active:!0})]}):(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(R.Button,{variant:"outlined",onClick:t,disabled:m,children:"Cancel"}),(0,u.jsx)(R.Button,{onClick:()=>y(),loading:m||g,disabled:m||g,type:"primary",children:m?"Exporting...":`Export ${n.toUpperCase()}`})]})]})})};e.s(["default",0,J],785952),e.s(["default",0,({dateValue:e,entityType:t,spendData:s,showFilters:a=!1,filterLabel:r,filterPlaceholder:l,selectedFilters:i=[],onFiltersChange:n,filterOptions:o=[],filterMode:c="multiple",customTitle:d,compactLayout:m=!1,teams:x=[]})=>{let[h,p]=(0,T.useState)(!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"mb-4",children:(0,u.jsxs)("div",{className:`grid ${a&&o.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"} items-end gap-4`,children:[a&&o.length>0&&(0,u.jsxs)("div",{children:[r&&(0,u.jsx)(j.Text,{className:"mb-2",children:r}),(0,u.jsx)($.Select,{mode:"single"===c?void 0:"multiple",style:{width:"100%"},placeholder:l,value:"single"===c?i[0]??void 0:i,onChange:e=>{"single"===c?n?.(e?[e]:[]):n?.(e)},options:o,allowClear:!0})]}),(0,u.jsx)("div",{className:"justify-self-end",children:(0,u.jsx)(D.Button,{onClick:()=>p(!0),icon:()=>(0,u.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.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,u.jsx)(J,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:s,dateRange:e,selectedFilters:i,customTitle:d,teams:x})]})}],193523),e.s([],260573)},797305,497650,e=>{"use strict";var t=e.i(843476),s=e.i(755151),a=e.i(872934),r=e.i(827252),l=e.i(56456),i=e.i(240647),n=e.i(152473),o=e.i(584935),c=e.i(304967),d=e.i(309426),u=e.i(350967),m=e.i(197647),x=e.i(653824),h=e.i(881073),p=e.i(404206),g=e.i(723731),f=e.i(599724),j=e.i(629569),_=e.i(560445),y=e.i(464571),b=e.i(560025),k=e.i(199133),v=e.i(592968),N=e.i(898586),T=e.i(271645),C=e.i(289793),w=e.i(952840),S=e.i(135214),q=e.i(738014),L=e.i(617885),D=e.i(500330),A=e.i(708347),M=e.i(487147),O=e.i(498610);e.i(260573);var E=e.i(785952),F=e.i(764205),$=e.i(973706),U=e.i(571303);let P=({isDateChanging:e=!1})=>(0,t.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)(U.UiLoadingSpinner,{className:"size-5"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:e?"Processing date selection...":"Loading chart data..."}),(0,t.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:e?"This will only take a moment":"Fetching your data"})]})]})});var R=e.i(290571),V=e.i(95779),I=e.i(444755),B=e.i(673706);let W=T.default.forwardRef((e,t)=>{let{color:s,children:a,className:r}=e,l=(0,R.__rest)(e,["color","children","className"]);return T.default.createElement("p",Object.assign({ref:t,className:(0,I.tremorTwMerge)("font-semibold text-tremor-metric",s?(0,B.getColorClassNames)(s,V.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",r)},l),a)});W.displayName="Metric";var z=e.i(37091),Y=e.i(269200),K=e.i(427612),H=e.i(496020),G=e.i(64848),Z=e.i(942232),J=e.i(977572),Q=e.i(994388);let X=({accessToken:e,selectedTags:s,formatAbbreviatedNumber:a})=>{let r,l,i,n,[c,d]=(0,T.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[u,_]=(0,T.useState)(!1),[y,b]=(0,T.useState)(1),k=async()=>{if(e){_(!0);try{let t=await (0,F.perUserAnalyticsCall)(e,y,50,s.length>0?s:void 0);d(t)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{_(!1)}}};return(0,T.useEffect)(()=>{k()},[e,s,y]),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"Per User Usage"}),(0,t.jsx)(z.Subtitle,{children:"Individual developer usage metrics"}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"User Details"}),(0,t.jsx)(m.Tab,{children:"Usage Distribution"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)(Y.Table,{children:[(0,t.jsx)(K.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"User ID"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Email"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Agent"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Success Generations"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Tokens"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Failed Requests"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Cost"})]})}),(0,t.jsx)(Z.TableBody,{children:c.results.slice(0,10).map((e,s)=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{className:"font-medium",children:e.user_id})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_email||"N/A"})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_agent||"Unknown"})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.successful_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.total_tokens)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.failed_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsxs)(f.Text,{children:["$",a(e.spend,4)]})})]},s))})]}),c.results.length>10&&(0,t.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,t.jsxs)(f.Text,{className:"text-sm text-gray-500",children:["Showing 10 of ",c.total_count," results"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y>1&&b(y-1)},disabled:1===y,children:"Previous"}),(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y=c.total_pages,children:"Next"})]})]})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(j.Title,{className:"text-lg",children:"User Usage Distribution"}),(0,t.jsx)(z.Subtitle,{children:"Number of users by successful request frequency"})]}),(0,t.jsx)(o.BarChart,{data:(r=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";r.set(t,(r.get(t)||0)+1)}),l=Array.from(r.entries()).sort(([,e],[,t])=>t-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 t=e.successful_requests,s=e.user_agent||"Unknown";l.includes(s)&&Object.entries(i).forEach(([e,a])=>{t>=a.range[0]&&t<=a.range[1]&&(a.agents[s]||(a.agents[s]=0),a.agents[s]++)})}),Object.entries(i).map(([e,t])=>{let s={category:e};return l.forEach(e=>{s[e]=t.agents[e]||0}),s})),index:"category",categories:(n=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";n.set(t,(n.get(t)||0)+1)}),Array.from(n.entries()).sort(([,e],[,t])=>t-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})]})]})]})]})},ee=({accessToken:e,userRole:s,dateValue:a,onDateChange:r})=>{let[l,i]=(0,T.useState)({results:[]}),[n,d]=(0,T.useState)({results:[]}),[_,y]=(0,T.useState)({results:[]}),[b,N]=(0,T.useState)({results:[]}),[C,w]=(0,T.useState)(""),[S,q]=(0,T.useState)([]),[L,D]=(0,T.useState)([]),[A,M]=(0,T.useState)(!1),[O,E]=(0,T.useState)(!1),[$,U]=(0,T.useState)(!1),[R,V]=(0,T.useState)(!1),[I,B]=(0,T.useState)(!1),Y=new Date,K=async()=>{if(e){M(!0);try{let t=await (0,F.tagDistinctCall)(e);q(t.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{M(!1)}}},H=async()=>{if(e){E(!0);try{let t=await (0,F.tagDauCall)(e,Y,C||void 0,L.length>0?L:void 0);i(t)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{E(!1)}}},G=async()=>{if(e){U(!0);try{let t=await (0,F.tagWauCall)(e,Y,C||void 0,L.length>0?L:void 0);d(t)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{U(!1)}}},Z=async()=>{if(e){V(!0);try{let t=await (0,F.tagMauCall)(e,Y,C||void 0,L.length>0?L:void 0);y(t)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{V(!1)}}},J=async()=>{if(e&&a.from&&a.to){B(!0);try{let t=await (0,F.userAgentSummaryCall)(e,a.from,a.to,L.length>0?L:void 0);N(t)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{B(!1)}}};(0,T.useEffect)(()=>{K()},[e]),(0,T.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{H(),G(),Z()},50);return()=>clearTimeout(t)},[e,C,L]),(0,T.useEffect)(()=>{if(!a.from||!a.to)return;let e=setTimeout(()=>{J()},50);return()=>clearTimeout(e)},[e,a,L]);let Q=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,ee=e=>Object.entries(e.reduce((e,t)=>(e[t.tag]=(e[t.tag]||0)+t.active_users,e),{})).sort(([,e],[,t])=>t-e).map(([e])=>e),et=ee(l.results).slice(0,10),es=ee(n.results).slice(0,10),ea=ee(_.results).slice(0,10),er=(()=>{let e=[],t=new Date;for(let s=6;s>=0;s--){let a=new Date(t);a.setDate(a.getDate()-s);let r={date:a.toISOString().split("T")[0]};et.forEach(e=>{r[Q(e)]=0}),e.push(r)}return l.results.forEach(t=>{let s=Q(t.tag),a=e.find(e=>e.date===t.date);a&&(a[s]=t.active_users)}),e})(),el=(()=>{let e=[];for(let t=1;t<=7;t++){let s={week:`Week ${t}`};es.forEach(e=>{s[Q(e)]=0}),e.push(s)}return n.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Week (\d+)/);if(a){let r=`Week ${a[1]}`,l=e.find(e=>e.week===r);l&&(l[s]=t.active_users)}}),e})(),ei=(()=>{let e=[];for(let t=1;t<=7;t++){let s={month:`Month ${t}`};ea.forEach(e=>{s[Q(e)]=0}),e.push(s)}return _.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Month (\d+)/);if(a){let r=`Month ${a[1]}`,l=e.find(e=>e.month===r);l&&(l[s]=t.active_users)}}),e})(),en=(e,t=0)=>{if(e>=1e8||e>=1e7)return(e/1e6).toFixed(t)+"M";if(e>=1e6)return(e/1e6).toFixed(t)+"M";if(e>=1e4)return(e/1e3).toFixed(t)+"K";if(e>=1e3)return(e/1e3).toFixed(t)+"K";else return e.toFixed(t)};return(0,t.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Title,{children:"Summary by User Agent"}),(0,t.jsx)(z.Subtitle,{children:"Performance metrics for different user agents"})]}),(0,t.jsxs)("div",{className:"w-96",children:[(0,t.jsx)(f.Text,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"All User Agents",value:L,onChange:D,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:A,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:S.map(e=>{let s=Q(e),a=s.length>50?`${s.substring(0,50)}...`:s;return(0,t.jsx)(k.Select.Option,{value:e,label:a,title:s,children:a},e)})})]})]}),I?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4",children:[(b.results||[]).slice(0,4).map((e,s)=>{let a=Q(e.tag),r=a.length>15?a.substring(0,15)+"...":a;return(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(v.Tooltip,{title:a,placement:"top",children:(0,t.jsx)(j.Title,{className:"truncate",children:r})}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(W,{className:"text-lg",children:en(e.successful_requests)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(W,{className:"text-lg",children:en(e.total_tokens)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsxs)(W,{className:"text-lg",children:["$",en(e.total_spend,4)]})]})]})]},s)}),Array.from({length:Math.max(0,4-(b.results||[]).length)}).map((e,s)=>(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"No Data"}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsx)(W,{className:"text-lg",children:"-"})]})]})]},`empty-${s}`))]})]})}),(0,t.jsx)(c.Card,{children:(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU/WAU/MAU"}),(0,t.jsx)(m.Tab,{children:"Per User Usage (Last 30 Days)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"DAU, WAU & MAU per Agent"}),(0,t.jsx)(z.Subtitle,{children:"Active users across different time periods"})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU"}),(0,t.jsx)(m.Tab,{children:"WAU"}),(0,t.jsx)(m.Tab,{children:"MAU"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),O?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:er,index:"date",categories:et.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),$?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:el,index:"week",categories:es.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),R?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:ei,index:"month",categories:ea.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(X,{accessToken:e,selectedTags:L,formatAbbreviatedNumber:en})})]})]})})]})};var et=e.i(617802);let es=["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"],ea={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}};function er({fetchFn:e,args:t,enabled:s}){let[a,r]=(0,T.useState)(ea),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),[c,d]=(0,T.useState)({currentPage:0,totalPages:0}),[u,m]=(0,T.useState)(!1),x=(0,T.useRef)(0),h=(0,T.useRef)(!1),p=(0,T.useRef)(null),g=(0,T.useRef)(t);g.current=t;let f=JSON.stringify(t),j=(0,T.useCallback)(()=>{h.current=!0,m(!0),o(!1),null!==p.current&&(clearTimeout(p.current),p.current=null)},[]);return(0,T.useEffect)(()=>{if(!s){r(ea),i(!1),o(!1),d({currentPage:0,totalPages:0}),m(!1);return}let t=++x.current;h.current=!1,m(!1);let a=()=>x.current!==t||h.current,l=e=>new Promise(t=>{p.current=setTimeout(()=>{p.current=null,t()},e)});return(async()=>{let t=g.current;i(!0),o(!1),d({currentPage:1,totalPages:1});try{let s=[...t.slice(0,3),1,...t.slice(3)],n=await e(...s);if(a())return;r(n);let c=n.metadata?.total_pages||1;if(d({currentPage:1,totalPages:c}),c<=1)return void i(!1);i(!1),o(!0);let u=[...n.results],m={...n.metadata};for(let s=2;s<=c;s++){if(a()||(await l(300),a()))return;let i=[...t.slice(0,3),s,...t.slice(3)],n=await e(...i);if(a())return;u=[...u,...n.results],(m=function(e,t){let s={...e};for(let a of es)s[a]=(e[a]||0)+(t[a]||0);return s}(m,n.metadata)).total_pages=c,m.has_more=s{x.current++,null!==p.current&&(clearTimeout(p.current),p.current=null)}},[s,e,f]),{data:a,loading:l,isFetchingMore:n,progress:c,cancelled:u,cancel:j}}var el=e.i(23371),ei=e.i(286718);let en=({endpointData:e})=>{let s=e||{},a=T.default.useMemo(()=>Object.entries(s).map(([e,t])=>({endpoint:e,"metrics.successful_requests":t.metrics.successful_requests,"metrics.failed_requests":t.metrics.failed_requests,metrics:{successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests}})),[s]);return(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(j.Title,{children:"Success vs Failed Requests by Endpoint"}),(0,t.jsx)(ei.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,t.jsx)(o.BarChart,{className:"mt-4",data:a,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:ei.CustomTooltip,showLegend:!1,stack:!0,yAxisWidth:60})]})};var eo=e.i(731195),ec=e.i(883966),ed=e.i(555706),eu=e.i(785183),em=e.i(93230),ex=e.i(844171),eh=(0,ec.generateCategoricalChart)({chartName:"LineChart",GraphicalChild:ed.Line,axisComponents:[{axisType:"xAxis",AxisComp:eu.XAxis},{axisType:"yAxis",AxisComp:em.YAxis}],formatAxisMap:ex.formatAxisMap}),ep=e.i(872526),eg=e.i(800494),ef=e.i(234239),ej=e.i(559559),e_=e.i(238279),ey=e.i(114887),eb=e.i(933303),ek=e.i(628781),ev=e.i(472007),eN=e.i(480731);let eT=T.default.forwardRef((e,t)=>{let{data:s=[],categories:a=[],index:r,colors:l=V.themeColorRange,valueFormatter:i=B.defaultValueFormatter,startEndOnly:n=!1,showXAxis:o=!0,showYAxis:c=!0,yAxisWidth:d=56,intervalType:u="equidistantPreserveStart",animationDuration:m=900,showAnimation:x=!1,showTooltip:h=!0,showLegend:p=!0,showGridLines:g=!0,autoMinValue:f=!1,curveType:j="linear",minValue:_,maxValue:y,connectNulls:b=!1,allowDecimals:k=!0,noDataText:v,className:N,onValueChange:C,enableLegendSlider:w=!1,customTooltip:S,rotateLabelX:q,padding:L=o||c?{left:20,right:20}:{left:0,right:0},tickGap:D=5,xAxisLabel:A,yAxisLabel:M}=e,O=(0,R.__rest)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[E,F]=(0,T.useState)(60),[$,U]=(0,T.useState)(void 0),[P,W]=(0,T.useState)(void 0),z=(0,ev.constructCategoryColors)(a,l),Y=(0,ev.getYAxisDomain)(f,_,y),K=!!C;function H(e){K&&(e===P&&!$||(0,ev.hasOnlyOneValueForThisKey)(s,e)&&$&&$.dataKey===e?(W(void 0),null==C||C(null)):(W(e),null==C||C({eventType:"category",categoryClicked:e})),U(void 0))}return T.default.createElement("div",Object.assign({ref:t,className:(0,I.tremorTwMerge)("w-full h-80",N)},O),T.default.createElement(eo.ResponsiveContainer,{className:"h-full w-full"},(null==s?void 0:s.length)?T.default.createElement(eh,{data:s,onClick:K&&(P||$)?()=>{U(void 0),W(void 0),null==C||C(null)}:void 0,margin:{bottom:A?30:void 0,left:M?20:void 0,right:M?5:void 0,top:5}},g?T.default.createElement(ep.CartesianGrid,{className:(0,I.tremorTwMerge)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,T.default.createElement(eu.XAxis,{padding:L,hide:!o,dataKey:r,interval:n?"preserveStartEnd":u,tick:{transform:"translate(0, 6)"},ticks:n?[s[0][r],s[s.length-1][r]]:void 0,fill:"",stroke:"",className:(0,I.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:D,angle:null==q?void 0:q.angle,dy:null==q?void 0:q.verticalShift,height:null==q?void 0:q.xAxisHeight},A&&T.default.createElement(eg.Label,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},A)),T.default.createElement(em.YAxis,{width:d,hide:!c,axisLine:!1,tickLine:!1,type:"number",domain:Y,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,I.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:i,allowDecimals:k},M&&T.default.createElement(eg.Label,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},M)),T.default.createElement(ef.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:h?({active:e,payload:t,label:s})=>S?T.default.createElement(S,{payload:null==t?void 0:t.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!=(t=z.get(e.dataKey))?t:eN.BaseColors.Gray})}),active:e,label:s}):T.default.createElement(eb.default,{active:e,payload:t,label:s,valueFormatter:i,categoryColors:z}):T.default.createElement(T.default.Fragment,null),position:{y:0}}),p?T.default.createElement(ej.Legend,{verticalAlign:"top",height:E,content:({payload:e})=>(0,ey.default)({payload:e},z,F,P,K?e=>H(e):void 0,w)}):null,a.map(e=>{var t;return T.default.createElement(ed.Line,{className:(0,I.tremorTwMerge)((0,B.getColorClassNames)(null!=(t=z.get(e))?t:eN.BaseColors.Gray,V.colorPalette.text).strokeColor),strokeOpacity:$||P&&P!==e?.3:1,activeDot:e=>{var t;let{cx:a,cy:r,stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,dataKey:c}=e;return T.default.createElement(e_.Dot,{className:(0,I.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,B.getColorClassNames)(null!=(t=z.get(c))?t:eN.BaseColors.Gray,V.colorPalette.text).fillColor),cx:a,cy:r,r:5,fill:"",stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,onClick:(t,a)=>{a.stopPropagation(),K&&(e.index===(null==$?void 0:$.index)&&e.dataKey===(null==$?void 0:$.dataKey)||(0,ev.hasOnlyOneValueForThisKey)(s,e.dataKey)&&P&&P===e.dataKey?(W(void 0),U(void 0),null==C||C(null)):(W(e.dataKey),U({index:e.index,dataKey:e.dataKey}),null==C||C(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var a;let{stroke:r,strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,cx:o,cy:c,dataKey:d,index:u}=t;return(0,ev.hasOnlyOneValueForThisKey)(s,e)&&!($||P&&P!==e)||(null==$?void 0:$.index)===u&&(null==$?void 0:$.dataKey)===e?T.default.createElement(e_.Dot,{key:u,cx:o,cy:c,r:5,stroke:r,fill:"",strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,className:(0,I.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,B.getColorClassNames)(null!=(a=z.get(d))?a:eN.BaseColors.Gray,V.colorPalette.text).fillColor)}):T.default.createElement(T.Fragment,{key:u})},key:e,name:e,type:j,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:x,animationDuration:m,connectNulls:b})}),C?a.map(e=>T.default.createElement(ed.Line,{className:(0,I.tremorTwMerge)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:j,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:b,onClick:(e,t)=>{t.stopPropagation();let{name:s}=e;H(s)}})):null):T.default.createElement(ek.default,{noDataText:v})))});eT.displayName="LineChart";let eC=function({dailyData:e,endpointData:s}){let a=(0,T.useMemo)(()=>{var t;let s,a;return e?.results&&0!==e.results.length?(t=e.results,s=[],a=new Set,t.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>a.add(e))}),t.forEach(e=>{let t={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};a.forEach(s=>{let a=e.breakdown.endpoints?.[s];t[s]=a?.metrics.api_requests||0}),s.push(t)}),s.reverse()):[]},[e]),r=(0,T.useMemo)(()=>0===a.length?[]:Object.keys(a[0]).filter(e=>"date"!==e),[a]);return(0,t.jsxs)(c.Card,{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)(j.Title,{children:"Endpoint Usage Trends"})}),(0,t.jsx)(eT,{className:"h-80",data:a,index:"date",categories:r,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,r.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})]})};var ew=e.i(291542),eS=e.i(309821);e.s(["Progress",()=>eS.default],497650);var eS=eS;let eq=({endpointData:e})=>{let s=Object.entries(e).map(([e,t])=>{var s,a;return{key:e,endpoint:e,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,api_requests:t.metrics.api_requests,total_tokens:t.metrics.total_tokens,spend:t.metrics.spend,successRate:(s=t.metrics.successful_requests,0===(a=t.metrics.api_requests)?0:s/a*100)}}),a=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,s)=>{let a=s.api_requests>0?s.successful_requests/s.api_requests*100:0,r=s.api_requests>0?s.failed_requests/s.api_requests*100:0,l={"0%":"#22c55e"};return a>0&&a<100&&(l[`${a}%`]="#22c55e",l[`${a+.01}%`]="#ef4444"),l["100%"]=r>0?"#ef4444":"#22c55e",(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"flex-1 relative",children:(0,t.jsx)(eS.default,{percent:a+r,size:"small",strokeColor:l,showInfo:!1})}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,t.jsx)("span",{className:"text-green-600 font-medium",children:s.successful_requests.toLocaleString()}),(0,t.jsx)("span",{className:"text-gray-400",children:"/"}),(0,t.jsx)("span",{className:"text-red-600 font-medium",children:s.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 s=e.toFixed(2);return(0,t.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[s,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`}];return(0,t.jsx)(ew.Table,{columns:a,dataSource:s,pagination:!1})},eL=({userSpendData:e})=>{let s=(0,T.useMemo)(()=>{let t={};return e?.results&&e.results.forEach(e=>{Object.entries(e.breakdown.endpoints||{}).forEach(([e,s])=>{t[e]||(t[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:s.metadata||{},api_key_breakdown:{}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.prompt_tokens+=s.metrics.prompt_tokens,t[e].metrics.completion_tokens+=s.metrics.completion_tokens,t[e].metrics.total_tokens+=s.metrics.total_tokens,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests||0,t[e].metrics.failed_requests+=s.metrics.failed_requests||0,t[e].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,t[e].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),t},[e]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(eq,{endpointData:s}),(0,t.jsx)(en,{endpointData:s}),(0,t.jsx)(eC,{dailyData:e,endpointData:s})]})};var eD=e.i(214541),eA=e.i(413990),eM=e.i(785242);let{Text:eO}=N.Typography,eE=({value:e=[],onChange:s,disabled:a,organizationId:r,pageSize:i=20,placeholder:o="Search teams by alias..."})=>{let[c,d]=(0,T.useState)(""),[u,m]=(0,n.useDebouncedState)("",{wait:300}),{data:x,fetchNextPage:h,hasNextPage:p,isFetchingNextPage:g,isLoading:f}=(0,eM.useInfiniteTeams)(i,u||void 0,r),j=(0,T.useMemo)(()=>{if(!x?.pages)return[];let e=new Set,t=[];for(let s of x.pages)for(let a of s.teams)e.has(a.team_id)||(e.add(a.team_id),t.push(a));return t},[x]);return(0,t.jsx)(k.Select,{mode:"multiple",showSearch:!0,placeholder:o,value:e,onChange:e=>s?.(e),disabled:a,allowClear:!0,filterOption:!1,onSearch:e=>{d(e),m(e)},searchValue:c,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&p&&!g&&h()},loading:f,notFoundContent:f?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No teams found",style:{width:"100%"},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]}),children:j.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(eO,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})};var eF=e.i(193523),eF=eF,e$=e.i(916925),eU=e.i(1023),eP=e.i(149121);function eR({topModels:e,topModelsLimit:s,setTopModelsLimit:a}){let[r,l]=(0,T.useState)("table"),i=[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>{let t=e.getValue();return`$${(0,D.formatNumberWithCommas)(t,2)}`}},{header:"Successful",accessorKey:"successful_requests",cell:e=>(0,t.jsx)("span",{className:"text-green-600",children:e.getValue()?.toLocaleString()||0})},{header:"Failed",accessorKey:"failed_requests",cell:e=>(0,t.jsx)("span",{className:"text-red-600",children:e.getValue()?.toLocaleString()||0})},{header:"Tokens",accessorKey:"tokens",cell:e=>e.getValue()?.toLocaleString()||0}],n=e.slice(0,s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:s,onChange:e=>a(e)}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>l("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,t.jsx)("button",{onClick:()=>l("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===r?(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,t.jsx)(o.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(n.length,s)},data:n,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,t.jsx)(eP.DataTable,{columns:i,data:n,renderSubComponent:()=>(0,t.jsx)(t.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})})]})}let eV={tag:F.tagDailyActivityCall,team:F.teamDailyActivityCall,organization:F.organizationDailyActivityCall,customer:F.customerDailyActivityCall,agent:F.agentDailyActivityCall,user:F.userDailyActivityCall},eI=({accessToken:e,entityType:s,entityId:r,entityList:i,dateValue:n})=>{let b,k,v,{teams:N}=(0,eD.default)(),[C,w]=(0,T.useState)([]),[S,q]=(0,T.useState)(5),[L,A]=(0,T.useState)(5),[O,E]=(0,T.useState)(5),$=(0,T.useMemo)(()=>n.from?new Date(n.from):null,[n.from]),U=(0,T.useMemo)(()=>n.to?new Date(n.to):null,[n.to]),P=(0,T.useMemo)(()=>"user"===s?C.length>0?C[0]:null:C.length>0?C:null,[s,C]),R=eV[s],V=!!e&&!!$&&!!U,{data:I,isFetchingMore:B,progress:W,cancelled:Q,cancel:X}=er({fetchFn:R,args:[e,$,U,P],enabled:V}),{data:ee,isFetchingMore:et,progress:es,cancelled:ea,cancel:ei}=er({fetchFn:F.agentDailyActivityCall,args:[e,$,U,null],enabled:V&&"team"===s}),en=(0,M.processActivityData)(I,"models",N||[]),eo=(0,M.processActivityData)(I,"api_keys",N||[]),ec="team"===s?(0,M.processActivityData)(ee,"entities",N||[]):{},ed=()=>{let e={};return I.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={provider:t,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=s.metrics.spend,e[t].requests+=s.metrics.api_requests,e[t].successful_requests+=s.metrics.successful_requests,e[t].failed_requests+=s.metrics.failed_requests,e[t].tokens+=s.metrics.total_tokens}catch(e){console.error(`Error processing provider ${t}: ${e}`)}})}),Object.values(e).filter(e=>e.spend>0).sort((e,t)=>t.spend-e.spend)},eu=(e,t)=>{if(i){let t=i.find(t=>t.value===e);if(t)return t.label}return t?.team_alias?t.team_alias:e},em=()=>{var e;let t={};return I.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,s])=>{t[e]||(t[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:eu(e,s.metadata),id:e}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests,t[e].metrics.failed_requests+=s.metrics.failed_requests,t[e].metrics.total_tokens+=s.metrics.total_tokens})}),e=Object.values(t).sort((e,t)=>t.metrics.spend-e.metrics.spend),0===C.length?e:e.filter(e=>C.includes(e.metadata.id))},ex=s.charAt(0).toUpperCase()+s.slice(1);return(0,t.jsxs)("div",{style:{width:"100%"},className:"relative",children:[B&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",W.currentPage," / ",W.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:X,children:"Stop"})]})}),Q&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",W.currentPage,"/",W.totalPages," pages loaded)"]})}),et&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:ei,children:"Stop"})]})}),ea&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial agent data (",es.currentPage,"/",es.totalPages," pages loaded)"]})}),"team"===s&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by team"}),(0,t.jsx)(eE,{value:C,onChange:w})]}),(0,t.jsx)(eF.default,{dateValue:n,entityType:s,spendData:I,showFilters:"team"!==s&&null!==i&&i.length>0,filterLabel:`Filter by ${s}`,filterPlaceholder:`Select ${s} to filter...`,selectedFilters:C,onFiltersChange:w,filterOptions:(()=>{if(i)return i})()||void 0,filterMode:"user"===s?"single":"multiple",teams:N||[]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"agent"===s?"Request / Token Consumption":"Model Activity"}),"team"===s?(0,t.jsx)(m.Tab,{children:"Agent Activity"}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)(j.Title,{children:[ex," Spend Overview"]}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Spend"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)(I.metadata.total_spend,2)]})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:I.metadata.total_api_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:I.metadata.total_successful_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:I.metadata.total_failed_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:I.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),(0,t.jsx)(o.BarChart,{data:[...I.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload,r=Object.keys(a.breakdown.entities||{}).length;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",a.metrics.total_tokens]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total ",ex,"s: ",r]}),(0,t.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,t.jsxs)("p",{className:"font-semibold",children:["Spend by ",ex,":"]}),Object.entries(a.breakdown.entities||{}).sort(([,e],[,t])=>{let s=e.metrics.spend;return t.metrics.spend-s}).slice(0,5).map(([e,s])=>(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:[eu(e,s.metadata),": $",(0,D.formatNumberWithCommas)(s.metrics.spend,2)]},e)),r>5&&(0,t.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",r-5," more"]})]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,t.jsxs)(j.Title,{children:["Spend Per ",ex]}),(0,t.jsx)(z.Subtitle,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,t.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,t.jsxs)("span",{children:["Get Started by Tracking cost per ",ex," "]}),(0,t.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,t.jsxs)(u.Grid,{numItems:2,className:"gap-6",children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(o.BarChart,{className:"mt-4 h-52",data:em().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:el.valueFormatterSpend,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.metadata.alias}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,4)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.metrics.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.metrics.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens.toLocaleString()]})]})}})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,t.jsxs)(Y.Table,{children:[(0,t.jsx)(K.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:ex}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:em().filter(e=>e.metrics.spend>0).map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:e.metadata.alias}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.metrics.spend,4)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:(console.log("debugTags",{spendData:I}),b={},I.results.forEach(e=>{let{breakdown:t}=e,{entities:s}=t;console.log("debugTags",{entities:s});let a=Object.keys(s).reduce((e,t)=>{let{api_key_breakdown:a}=s[t];return Object.keys(a).forEach(s=>{let r={tag:t,usage:a[s].metrics.spend};e[s]?e[s].push(r):e[s]=[r]}),e},{});console.log("debugTags",{tagDictionary:a}),Object.entries(e.breakdown.api_keys||{}).forEach(([e,t])=>{b[e]||(b[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:t.metadata.key_alias,team_id:t.metadata.team_id||null,tags:a[e]||[]}},console.log("debugTags",{keySpend:b})),b[e].metrics.spend+=t.metrics.spend,b[e].metrics.prompt_tokens+=t.metrics.prompt_tokens,b[e].metrics.completion_tokens+=t.metrics.completion_tokens,b[e].metrics.total_tokens+=t.metrics.total_tokens,b[e].metrics.api_requests+=t.metrics.api_requests,b[e].metrics.successful_requests+=t.metrics.successful_requests,b[e].metrics.failed_requests+=t.metrics.failed_requests,b[e].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,b[e].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(b).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||"-",spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,S)),teams:null,showTags:"tag"===s,topKeysLimit:S,setTopKeysLimit:q})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"agent"===s?"Top Agents":"Top Models"}),(0,t.jsx)(eR,{topModels:(k={},I.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,t])=>{k[e]||(k[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{k[e].spend+=t.metrics.spend}catch(s){console.error(`Error adding spend for ${e}: ${s}, got metrics: ${JSON.stringify(t)}`)}k[e].requests+=t.metrics.api_requests,k[e].successful_requests+=t.metrics.successful_requests,k[e].failed_requests+=t.metrics.failed_requests,k[e].tokens+=t.metrics.total_tokens})}),Object.entries(k).map(([e,t])=>({key:e,...t})).sort((e,t)=>t.spend-e.spend).slice(0,L)),topModelsLimit:L,setTopModelsLimit:A})]})}),"team"===s&&(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Agents Driving Spend"}),(0,t.jsx)(eR,{topModels:(v={},ee.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,t])=>{v[e]||(v[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0,agent_name:t.metadata?.agent_name||e}),v[e].spend+=t.metrics.spend,v[e].requests+=t.metrics.api_requests,v[e].successful_requests+=t.metrics.successful_requests,v[e].failed_requests+=t.metrics.failed_requests,v[e].tokens+=t.metrics.total_tokens})}),Object.entries(v).map(([e,t])=>({key:t.agent_name,...t})).sort((e,t)=>t.spend-e.spend).slice(0,O)),topModelsLimit:O,setTopModelsLimit:E})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsx)(j.Title,{children:"Provider Usage"}),(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:ed(),index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan","blue","indigo","violet","purple"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(Y.Table,{children:[(0,t.jsx)(K.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:ed().map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)("img",{src:(0,e$.getProviderLogoAndName)(e.provider).logo,alt:`${e.provider} logo`,className:"w-4 h-4",onError:t=>{let s=t.target,a=s.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.provider?.charAt(0)||"-",a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:en,hidePromptCachingMetrics:"agent"===s})}),"team"===s?(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:ec})}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:eo,hidePromptCachingMetrics:"agent"===s})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:I})})]})]})]})};var eB=e.i(793130),eW=e.i(418371);let ez=({loading:e,isDateChanging:s,providerSpend:a})=>{let[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),m=a.filter(e=>e.provider?.toLowerCase()==="unknown"?n:!!l||e.spend>0);return(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(j.Title,{children:"Spend by Provider"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Zero Spend"}),(0,t.jsx)(eB.Switch,{checked:l,onChange:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Unknown"}),(0,t.jsx)(v.Tooltip,{title:"Requests that failed to route to a provider",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(eB.Switch,{checked:n,onChange:o})]})]})]}),e?(0,t.jsx)(P,{isDateChanging:s}):(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:m,index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(Y.Table,{children:[(0,t.jsx)(K.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:m.map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)(eW.ProviderLogo,{provider:e.provider,className:"w-4 h-4"}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})};var eY=e.i(311451),eK=e.i(482725),eH=e.i(918789);let{TextArea:eG}=eY.Input,eZ={get_usage_data:"📊",get_team_usage_data:"👥",get_tag_usage_data:"🏷️"},eJ=({step:e})=>{let s=eZ[e.tool_name]||"🔧",a=e.arguments,r=a.start_date&&a.end_date?`${a.start_date} → ${a.end_date}`:"",l=a.team_ids||a.tags||a.user_id||"";return(0,t.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,t.jsx)("span",{className:"flex-shrink-0 mt-0.5",children:"running"===e.status?(0,t.jsx)(eK.Spin,{size:"small"}):"error"===e.status?(0,t.jsx)("span",{className:"text-red-500",children:"✗"}):(0,t.jsx)("span",{className:"text-green-600",children:"✓"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"font-medium text-gray-700",children:[s," ",e.tool_label]}),r&&(0,t.jsx)("div",{className:"text-gray-500 mt-0.5",children:r}),l&&(0,t.jsxs)("div",{className:"text-gray-500 mt-0.5",children:["Filter: ",l]}),"error"===e.status&&e.error&&(0,t.jsx)("div",{className:"text-red-600 mt-0.5",children:e.error})]})]})},eQ=({content:e})=>(0,t.jsx)(eH.default,{components:{p:({children:e})=>(0,t.jsx)("p",{className:"mb-2 last:mb-0",children:e}),strong:({children:e})=>(0,t.jsx)("strong",{className:"font-semibold",children:e}),ul:({children:e})=>(0,t.jsx)("ul",{className:"list-disc pl-4 mb-2 space-y-0.5",children:e}),ol:({children:e})=>(0,t.jsx)("ol",{className:"list-decimal pl-4 mb-2 space-y-0.5",children:e}),li:({children:e})=>(0,t.jsx)("li",{children:e}),h1:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h2:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h3:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),code:({children:e,className:s})=>s?.includes("language-")?(0,t.jsx)("pre",{className:"bg-gray-100 rounded p-2 my-1 overflow-x-auto text-xs",children:(0,t.jsx)("code",{children:e})}):(0,t.jsx)("code",{className:"px-1 py-0.5 rounded bg-gray-100 text-xs font-mono",children:e}),table:({children:e})=>(0,t.jsx)("div",{className:"overflow-x-auto my-2",children:(0,t.jsx)("table",{className:"text-xs border-collapse w-full",children:e})}),th:({children:e})=>(0,t.jsx)("th",{className:"border border-gray-200 px-2 py-1 bg-gray-50 font-medium text-left",children:e}),td:({children:e})=>(0,t.jsx)("td",{className:"border border-gray-200 px-2 py-1",children:e})},children:e}),eX=({open:e,onClose:s,accessToken:a})=>{let[r,l]=(0,T.useState)([]),[i,n]=(0,T.useState)(""),[o,c]=(0,T.useState)(!1),[d,u]=(0,T.useState)(void 0),[m,x]=(0,T.useState)([]),[h,p]=(0,T.useState)(!1),[g,f]=(0,T.useState)(""),[j,_]=(0,T.useState)(null),[b,v]=(0,T.useState)([]),N=(0,T.useRef)(null),C=(0,T.useRef)(null);(0,T.useEffect)(()=>{e&&0===m.length&&w()},[e]),(0,T.useEffect)(()=>{"function"==typeof N.current?.scrollIntoView&&N.current.scrollIntoView({behavior:"smooth"})},[r,g,b,j]);let w=async()=>{if(a){p(!0);try{let e=await (0,F.modelHubCall)(a);if(e?.data?.length>0){let t=e.data.map(e=>e.model_group).sort();x(t)}}catch(e){console.error("Failed to load models:",e)}finally{p(!1)}}},S=async()=>{if(!a||!i.trim()||o)return;let e=[...r,{role:"user",content:i.trim()}];l(e),n(""),c(!0),f(""),_(null),v([]);let t=new AbortController;C.current=t;let s="",u=[];try{await (0,F.usageAiChatStream)(a,e.slice(-20).map(e=>({role:e.role,content:e.content})),d||"",e=>{_(null),s+=e,f(s)},()=>{_(null),v([]),l(e=>[...e,{role:"assistant",content:s,toolCalls:u.length>0?[...u]:void 0}]),f("")},e=>{_(null),v([]),l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")},e=>{_(e)},e=>{let t=u.findIndex(t=>t.tool_name===e.tool_name);t>=0?u[t]={...e}:u.push({...e}),v([...u])},t.signal)}catch(s){if(s?.name==="AbortError"||t.signal.aborted)return;let e=s?.message||"Failed to get response. Please try again.";l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")}finally{c(!1),C.current=null}};return(0,t.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,t.jsxs)("div",{className:"px-5 pt-5 pb-3 border-b border-gray-100 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-blue-600",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.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,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"Ask AI"})]}),(0,t.jsx)("button",{onClick:()=>{C.current&&C.current.abort(),s()},className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100",children:(0,t.jsx)("svg",{className:"w-5 h-5",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.jsx)("p",{className:"text-xs text-gray-500",children:"Ask about your spend, models, keys, and trends"})]}),(0,t.jsx)("div",{className:"px-5 py-3 border-b border-gray-100 flex-shrink-0",children:(0,t.jsx)(k.Select,{placeholder:"Select a model (optional, defaults to gpt-4o-mini)",value:d,onChange:e=>u(e),loading:h,showSearch:!0,allowClear:!0,size:"small",className:"w-full",options:m.map(e=>({label:e,value:e})),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-gray-50",children:[0===r.length&&!g&&!o&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[(0,t.jsx)("svg",{className:"w-8 h-8 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.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,t.jsx)("p",{className:"text-sm font-medium",children:"Ask a question about your usage"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:'e.g. "Which model costs me the most?"'})]}),r.map((e,s)=>(0,t.jsx)("div",{children:"user"===e.role?(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.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,t.jsxs)("div",{className:"space-y-2",children:[e.toolCalls&&e.toolCalls.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:e.toolCalls.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),(0,t.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,t.jsx)(eQ,{content:e.content})})]})},s)),o&&b.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:b.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),o&&!g&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-gray-500",children:[(0,t.jsx)(eK.Spin,{size:"small"}),(0,t.jsx)("span",{className:"italic",children:j||"Thinking..."})]}),g&&(0,t.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,t.jsx)(eQ,{content:g})}),(0,t.jsx)("div",{ref:N})]}),(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-gray-200 bg-white flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(eG,{value:i,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),S())},placeholder:"Ask about your usage...",autoSize:{minRows:1,maxRows:3},className:"flex-1",disabled:o}),(0,t.jsx)(y.Button,{type:"primary",onClick:S,disabled:!i.trim()||o,loading:o,children:"Send"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,t.jsx)("button",{onClick:()=>{l([]),f(""),v([]),_(null)},className:"text-xs text-gray-400 hover:text-gray-600 transition-colors",disabled:0===r.length,children:"Clear chat"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Enter to send"})]})]})]})};var e0=e.i(299251),e1=e.i(153702),e2=e.i(160818),e5=e.i(777579),e4=e.i(983561);e.i(247167);var e6=e.i(931067);let e3={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 e7=e.i(9583),e9=T.forwardRef(function(e,t){return T.createElement(e7.default,(0,e6.default)({},e,{ref:t,icon:e3}))}),e8=e.i(232164),te=e.i(645526),tt=e.i(771674),ts=e.i(906579);let ta=[{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,t.jsx)(e2.GlobalOutlined,{style:{fontSize:"16px"}})},{value:"my-usage",label:"Your Usage",description:"View your own usage",icon:(0,t.jsx)(tt.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,t.jsx)(e0.BankOutlined,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,t.jsx)(te.TeamOutlined,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,t.jsx)(e9,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,t.jsx)(e8.TagsOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,t.jsx)(e4.RobotOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user",label:"User Usage",description:"View usage by individual users",icon:(0,t.jsx)(tt.UserOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,t.jsx)(e5.LineChartOutlined,{style:{fontSize:"16px"}}),adminOnly:!0}],tr=({value:e,onChange:s,isAdmin:a,title:r="Usage View",description:l="Select the usage data you want to view","data-id":i})=>{let n=ta.filter(e=>!e.adminOnly||!!a).map(e=>{let t=e.label,s=e.description;return e.showForAdmin&&e.showForNonAdmin&&(t=a?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(s=a?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:t,description:s,icon:e.icon,badgeText:e.badgeText}});return(0,t.jsx)("div",{className:"w-full","data-id":i,children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,t.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,t.jsx)("div",{className:"flex-shrink-0 flex items-center",children:(0,t.jsx)(e1.BarChartOutlined,{style:{fontSize:"32px"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:r}),(0,t.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:l})]})]}),(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)(k.Select,{value:e,onChange:s,className:"w-54 sm:w-64 md:w-72",size:"large",options:n.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:s.icon}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.label}),(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:s.description})]}),s.badgeText&&(0,t.jsx)("div",{className:"items-center",children:(0,t.jsx)(ts.Badge,{color:"blue",count:s.badgeText})})]}):e.label},labelRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:s.icon}),(0,t.jsx)("span",{className:"text-sm",children:s.label})]}):e.label}})})]})})};e.s(["default",0,({teams:e,organizations:U})=>{let R,{accessToken:V,userRole:I,userId:B,premiumUser:W}=(0,S.default)(),[z,Y]=(0,T.useState)(null),[K,H]=(0,T.useState)(!1),[G,Z]=(0,T.useState)(!1),[J,Q]=(0,T.useState)(!1),X=(0,T.useMemo)(()=>new Date(Date.now()-6048e5),[]),es=(0,T.useMemo)(()=>new Date,[]),[ea,ei]=(0,T.useState)({from:X,to:es}),[en,eo]=(0,T.useState)([]),{data:ec=[]}=(0,w.useCustomers)(),{data:ed}=(0,C.useAgents)(),{data:eu}=(0,q.useCurrentUser)();console.log(`currentUser: ${JSON.stringify(eu)}`),console.log(`currentUser max budget: ${eu?.max_budget}`);let em=A.all_admin_roles.includes(I||""),[ex,eh]=(0,T.useState)(""),[ep,eg]=(0,n.useDebouncedState)("",{wait:300}),{data:ef,fetchNextPage:ej,hasNextPage:e_,isFetchingNextPage:ey,isLoading:eb}=(0,L.useInfiniteUsers)(50,ep||void 0),ek=(0,T.useMemo)(()=>{if(!ef?.pages)return[];let e=new Set,t=[];for(let s of ef.pages)for(let a of s.users)e.has(a.user_id)||(e.add(a.user_id),t.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 t},[ef]),[ev,eN]=(0,T.useState)(em?null:B||null),[eT,eC]=(0,T.useState)("groups"),[ew,eS]=(0,T.useState)(!1),[eq,eD]=(0,T.useState)(!1),[eA,eM]=(0,T.useState)(!1),[eO,eE]=(0,T.useState)("global"),[eF,e$]=(0,T.useState)(!0),[eP,eR]=(0,T.useState)(5),[eV,eB]=(0,T.useState)(5),[eW,eY]=(0,T.useState)(!1),eK=async()=>{V&&eo(Object.values(await (0,F.tagListCall)(V)).map(e=>({label:e.name,value:e.name})))};(0,T.useEffect)(()=>{eK()},[V]),(0,T.useEffect)(()=>{!em&&B&&eN(B)},[em,B]);let eH="my-usage"!==eO&&em?ev:B||null,eG=(0,T.useMemo)(()=>ea.from?new Date(ea.from):null,[ea.from]),eZ=(0,T.useMemo)(()=>ea.to?new Date(ea.to):null,[ea.to]),eJ=(0,T.useRef)(0);(0,T.useEffect)(()=>{if(!V||!eG||!eZ)return;let e=++eJ.current;Z(!0),H(!1),Y(null),(0,F.userDailyActivityAggregatedCall)(V,eG,eZ,eH).then(t=>{eJ.current===e&&(Y(t),Z(!1),Q(!1))}).catch(()=>{eJ.current===e&&(H(!0),Z(!1))})},[V,eG,eZ,eH]);let eQ=er({fetchFn:F.userDailyActivityCall,args:[V,eG,eZ,eH],enabled:K&&!!V&&!!eG&&!!eZ}),e0=(0,T.useMemo)(()=>z||(K?eQ.data:{results:[],metadata:{}}),[z,K,eQ.data]),e1=G||eQ.loading;(0,T.useEffect)(()=>{K&&!eQ.loading&&eQ.data.results.length>0&&Q(!1)},[K,eQ.loading,eQ.data.results.length]);let e2=(0,T.useCallback)(e=>{Q(!0),ei(e)},[]),e5=e0.metadata?.total_spend||0,e4=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.models||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e6=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.model_groups||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e3=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={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[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({provider:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}))},[e0.results]),e7=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.api_keys||{}).forEach(([t,s])=>{e[t]||(e[t]={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:null,tags:s.metadata.tags||[]}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests,e[t].metrics.failed_requests+=s.metrics.failed_requests,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||[],spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,eP)},[e0.results,eP]),e9=(0,T.useMemo)(()=>[...e0.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),[e0.results]),e8=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"models",e),[e0,e]),te=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"api_keys",e),[e0,e]),tt=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"mcp_servers",e),[e0,e]);return(0,t.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,t.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,t.jsx)(tr,{value:eO,onChange:e=>eE(e),isAdmin:em}),(0,t.jsx)($.default,{value:ea,onValueChange:e2})]}),eQ.isFetchingMore&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",eQ.progress.currentPage," /"," ",eQ.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,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:eQ.cancel,children:"Stop"})]})}),eQ.cancelled&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",eQ.progress.currentPage,"/",eQ.progress.totalPages," ","pages loaded)"]})}),("global"===eO||"my-usage"===eO)&&(0,t.jsxs)(t.Fragment,{children:[em&&"global"===eO&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by user"}),(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!0,style:{width:"100%"},placeholder:"Select user to filter...",value:ev,onChange:e=>eN(e??null),filterOption:!1,onSearch:e=>{eh(e),eg(e)},searchValue:ex,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&e_&&!ey&&ej()},loading:eb,notFoundContent:eb?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No users found",options:ek,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,ey&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]})})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"Model Activity"}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"MCP Server Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Button,{onClick:()=>eM(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.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,t.jsx)(y.Button,{onClick:()=>eD(!0),icon:(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:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsxs)(d.Col,{numColSpan:2,children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mt-2 mb-2",children:(0,t.jsxs)(f.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content text-lg",children:["Project Spend"," ",ea.from&&ea.to&&(0,t.jsxs)(t.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,t.jsx)(et.default,{userSpend:e5,selectedTeam:null,userMaxBudget:eu?.max_budget||null})]}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Usage Metrics"}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_api_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_successful_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.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,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:e0.metadata?.total_failed_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Average Cost per Request"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)((e5||0)/(e0.metadata?.total_api_requests||1),4)]})]}),(0,t.jsxs)(c.Card,{className:"cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>eY(!eW),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),eW?(0,t.jsx)(s.DownOutlined,{className:"text-gray-400 text-xs"}):(0,t.jsx)(i.RightOutlined,{className:"text-gray-400 text-xs"})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_tokens?.toLocaleString()||0})]})]}),eW&&(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Input Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-blue-600",children:Math.max(0,(e0.metadata?.total_prompt_tokens||0)-(e0.metadata?.total_cache_read_input_tokens||0)-(e0.metadata?.total_cache_creation_input_tokens||0)).toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Output Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-cyan-600",children:e0.metadata?.total_completion_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Read Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_cache_read_input_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Write Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-purple-600",children:e0.metadata?.total_cache_creation_input_tokens?.toLocaleString()||0})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)(o.BarChart,{data:e9,index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:e7,teams:null,topKeysLimit:eP,setTopKeysLimit:eR})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"groups"===eT?"Top Public Model Names":"Top Litellm Models"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eV,onChange:e=>eB(e)}),(0,t.jsxs)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"groups"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("groups"),children:"Public Model Name"}),(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"individual"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("individual"),children:"Litellm Model Name"})]})]}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(R="groups"===eT?e6:e4,(0,t.jsx)(o.BarChart,{className:"mt-4",style:{height:52*Math.min(R.length,eV)},data:R,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.key}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.tokens.toLocaleString()]})]})}}))})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(ez,{loading:e1,isDateChanging:J,providerSpend:e3})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:e8})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:te})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:tt})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:e0})})]})]})]}),"organization"===eO&&(0,t.jsx)(eI,{accessToken:V,entityType:"organization",userID:B,userRole:I,dateValue:ea,entityList:U?.map(e=>({label:e.organization_alias,value:e.organization_id}))||null,premiumUser:W}),"team"===eO&&(0,t.jsx)(eI,{accessToken:V,entityType:"team",userID:B,userRole:I,entityList:e?.map(e=>({label:e.team_alias,value:e.team_id}))||null,premiumUser:W,dateValue:ea}),"customer"===eO&&(0,t.jsx)(eI,{accessToken:V,entityType:"customer",userID:B,userRole:I,entityList:ec?.map(e=>({label:e.alias||e.user_id,value:e.user_id}))||null,premiumUser:W,dateValue:ea}),"tag"===eO&&(0,t.jsxs)(t.Fragment,{children:[eF&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",message:"Reusable credentials are automatically tracked as tags",description:(0,t.jsxs)(N.Typography.Text,{children:["When a reusable credential is used, it will appear as a tag prefixed with"," ",(0,t.jsx)(N.Typography.Text,{code:!0,children:"Credential: "}),"in this view."]}),closable:!0,onClose:()=>e$(!1),className:"mb-5"}),(0,t.jsx)(eI,{accessToken:V,entityType:"tag",userID:B,userRole:I,entityList:en,premiumUser:W,dateValue:ea})]}),"agent"===eO&&(0,t.jsx)(eI,{accessToken:V,entityType:"agent",userID:B,userRole:I,entityList:ed?.agents?.map(e=>({label:e.agent_name,value:e.agent_id}))||null,premiumUser:W,dateValue:ea}),"user"===eO&&(0,t.jsx)(eI,{accessToken:V,entityType:"user",userID:B,userRole:I,entityList:ek.length>0?ek:null,premiumUser:W,dateValue:ea}),"user-agent-activity"===eO&&(0,t.jsx)(ee,{accessToken:V,userRole:I,dateValue:ea})]})}),(0,t.jsx)(O.default,{isOpen:ew,onClose:()=>eS(!1),accessToken:V}),(0,t.jsx)(E.default,{isOpen:eq,onClose:()=>eD(!1),entityType:"team",spendData:{results:e0.results,metadata:e0.metadata},dateRange:ea,selectedFilters:[],customTitle:"Export Usage Data"}),(0,t.jsx)(eX,{open:eA,onClose:()=>eM(!1),accessToken:V})]})}],797305)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/fba48608afe1d559.js b/litellm/proxy/_experimental/out/_next/static/chunks/fba48608afe1d559.js deleted file mode 100644 index 6b34c8a72c..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/fba48608afe1d559.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,a.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,l.tagListCall)(e),enabled:!!(e&&s&&i)})}])},9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(981339),a=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),s=`${t}/v1/access_group`,l=await fetch(s,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return l.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(l.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,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)},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,a.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}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=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(l.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:g,className:i,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)(l.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))})})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,a.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,s=e.methods;return s&&s.length>0?s.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(l.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let l=t.forwardRef(function(e,s){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:s},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,l],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],l=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),a=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,l,"callback_map",0,a,"mapDisplayToInternalNames",0,e=>e.map(e=>a[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:l,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:y}=(0,n.useMCPServers)(h),{data:f=[],isLoading:_}=(()=>{let{accessToken:e}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:b=[],isLoading:j}=(0,o.useMCPToolsets)(),v=new Set(f),w=[...f.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`})),...b.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},k={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...l?.servers||[],...l?.accessGroups||[],...(l?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let s=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),l=t.filter(e=>!e.startsWith(c));e({servers:l.filter(e=>!v.has(e)),accessGroups:l.filter(e=>v.has(e)),toolsets:s})},value:S,loading:y||_||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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: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:k[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(764205),a=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,b]=(0,s.useState)({}),[j,v]=(0,s.useState)({}),w=(0,s.useRef)(u);(0,s.useEffect)(()=>{w.current=u},[u]);let N=(0,s.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),b(t=>({...t,[e]:""}));try{let s=await (0,l.listMCPTools)(t,e);if(s.error)b(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let l=w.current;if(!l[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...l,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),b(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{N.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[N,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:N.map(e=>{let s=e.server_name||e.alias||e.server_id,l=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=_[e.server_id],g=j[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)(a.Text,{className:"font-semibold text-gray-900",children:s}),e.description&&(0,t.jsx)(a.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&l.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>v(s=>({...s,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.Spin,{size:"large"}),(0,t.jsx)(a.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)(a.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(a.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&l.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:l,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&l.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:l.map(s=>{let l=n.includes(s.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l,onChange:()=>{if(p)return;let t=l?n.filter(e=>e!==s.name):[...n,s.name];S(e.server_id,t)},disabled:p,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)(a.Text,{className:"font-medium text-gray-900",children:s.name}),(0,t.jsxs)(a.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.name)})}),!d&&!c&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(a.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(592968),a=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),b=Object.keys(p.callbackInfo),j=e=>{x?.(e)},v=(t,s,l)=>{let a=[...e];if("callback_name"===s){let e=p.callback_map[l]||l;a[t]={...a[t],[s]:e,callback_vars:{}}}else a[t]={...a[t],[s]:l};j(a)},w=(t,s,l)=>{let a=[...e];a[t]={...a[t],callback_vars:{...a[t].callback_vars,[s]:l}},j(a)};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)(l.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(a.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)(l.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((a,d)=>{let u=a.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===a.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=p.callbackInfo[e]?.logo,a=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(l.Tooltip,{title:a,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let s=t.target,l=s.parentElement;if(l){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),l.replaceChild(t,s)}}}),(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)(s.Select,{value:a.callback_type,onChange:e=>v(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,s)=>{if(!e.callback_name)return null;let a=Object.entries(p.callback_map).find(([t,s])=>s===e.callback_name)?.[0];if(!a)return null;let i=p.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([a,i])=>(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," ")}),(0,t.jsx)(l.Tooltip,{title:`Environment variable reference recommended: os.environ/${a.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(s,a,e.target.value)})]},a))})]})})(a,d)]})]},d)})}),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'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(404206),a=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)([]),[N,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let l=e.fallbacks||[];_(l),j(l&&0!==l.length?l.map((e,t)=>{let[s,l]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:l||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.useEffect)(()=>{e&&(0,o.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 s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let F=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,l])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let a=document.querySelector(`input[name="${s}"]`);if(a){if(void 0!==a.value&&""!==a.value){let r=((s,l,a)=>{if(null==l)return a;let r=String(l).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?a:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return a}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,a.value,l);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,l]}).filter(e=>null!=e)),l=(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:l(s.routing_strategy),allowed_fails:l(s.allowed_fails,!0),cooldown_time:l(s.cooldown_time,!0),num_retries:l(s.num_retries,!0),timeout:l(s.timeout,!0),retry_after:l(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:l(s.context_window_fallbacks),retry_policy:l(s.retry_policy),model_group_alias:l(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:l(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:F()})},100);return()=>clearTimeout(e)},[x,f]);let O=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:F()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(a.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:N,routingStrategyDescriptions:T})}),(0,t.jsx)(l.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:b,onGroupsChange:e=>{j(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:O,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),l=e.i(243652),a=e.i(764205),r=e.i(135214);let i=(0,l.createQueryKeys)("keys"),n=async(e,t,s,l={})=>{try{let r=(0,a.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:l.teamID,project_id:l.projectID,organization_id:l.organizationID,key_alias:l.selectedKeyAlias,key_hash:l.keyHash,user_id:l.userID,page:t,size:s,sort_by:l.sortBy,sort_order:l.sortOrder,expand:l.expand,status:l.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,l.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,l,a={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:o.list({page:e,limit:l,...a}),queryFn:async()=>await n(i,e,l,{...a,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,l,a={})=>{let{accessToken:o}=(0,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:l,...a}),queryFn:async()=>await n(o,e,l,a),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),l=e.i(764205),a=e.i(708347),r=e.i(135214);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,l.getProxyBaseUrl)(),s=`${t}/project/list`,a=await fetch(s,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}return a.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:s}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&a.all_admin_roles.includes(s||"")})}])},392110,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(199133),a=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=l.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,b]=(0,s.useState)(f),[j,v]=(0,s.useState)(f?p:""),[w,N]=(0,s.useState)(e?.getFieldValue?.("duration")||"");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)(a.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(N(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{N(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(a.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(a.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(l.Select,{value:_?"custom":p,onChange:e=>{"custom"===e?b(!0):(b(!1),v(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;v(t),g(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)"})]})]})]})]}),u&&(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."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),l=e.i(199133),a=e.i(592968),r=e.i(827252);let{Option:i}=l.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(a.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(l.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),s=e.i(199133);let{Text:l}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:a,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:a,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let l=e?.find(e=>e.organization_id===s.key);if(!l)return!1;let a=t.toLowerCase().trim(),r=(l.organization_alias||"").toLowerCase(),i=(l.organization_id||"").toLowerCase();return r.includes(a)||i.includes(a)},children:e?.map(e=>(0,t.jsxs)(s.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(l,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),l=e.i(28651),a=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,s,l)=>{i(e.map((e,a)=>a===t?{...e,[s]:l}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(l.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),l=e.i(250980),a=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[b,j]=(0,s.useState)([]),[v,w]=(0,s.useState)({aliasName:"",targetModel:""}),[N,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{j(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!N)return;if(!N.aliasName||!N.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(b.some(e=>e.id!==N.id&&e.aliasName===N.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=b.map(e=>e.id===N.id?N:e);j(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=b.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=>w({...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=>w({...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(b.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...b,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];j(e),w({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)(l.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)(p.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:[b.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:N&&N.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:N.aliasName,onChange:e=>k({...N,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:N.targetModel,onChange:e=>k({...N,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...s})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(a.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,l;return e=s.id,j(t=b.filter(t=>t.id!==e)),l={},void(t.forEach(e=>{l[e.aliasName]=e.targetModel}),f&&f(l),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===b.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),_&&(0,t.jsxs)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),s=e.i(599724),l=e.i(266484);e.s(["default",0,function({value:e,onChange:a,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(l.default,{value:e,onChange:a,disabledCallbacks:i,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)(s.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"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),l=e.i(482725),a=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(l.Spin,{indicator:(0,t.jsx)(a.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let s=c?.find(e=>e.project_id===t.key);if(!s)return!1;let l=e.toLowerCase().trim(),a=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return a.includes(l)||r.includes(l)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(s.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),s=e.i(207082),l=e.i(109799),a=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),b=e.i(464571),j=e.i(808613),v=e.i(311451),w=e.i(212931),N=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),A=e.i(271645),L=e.i(708347),F=e.i(552130),O=e.i(557662),M=e.i(9314),P=e.i(860585),E=e.i(82946),$=e.i(392110),B=e.i(533882),V=e.i(844565),R=e.i(651904),D=e.i(939510),G=e.i(460285),z=e.i(663435),K=e.i(363256),U=e.i(575260),q=e.i(371455),W=e.i(319312),H=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[s,l]=(0,A.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{l(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>l(!1),2e3)},children:(0,t.jsx)(b.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var es=e.i(435451),el=e.i(916940);let{Option:ea}=k.Select,er=async(e,t,s,l)=>{try{if(null===e||null===t)return[];if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t,!0,l,!0)).data.map(e=>e.id);return console.log("available_model_names:",a),a}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,s,l)=>{try{if(null===e||null===t)return;if(null!==s){let a=(await (0,X.modelAvailableCall)(s,e,t)).data.map(e=>e.id);console.log("available_model_names:",a),l(a)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&L.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,l.useOrganizations)(),{data:ey,isLoading:ef}=(0,a.useProjects)(),{data:e_}=(0,i.useUISettings)(),{data:eb}=(0,r.useTags)(),ej=!!e_?.values?.enable_projects_ui,ev=!!e_?.values?.disable_custom_api_keys,ew=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],eN=(0,c.useQueryClient)(),[ek]=j.Form.useForm(),[eS,eC]=(0,A.useState)(!1),[eT,eI]=(0,A.useState)(null),[eA,eL]=(0,A.useState)(null),[eF,eO]=(0,A.useState)([]),[eM,eP]=(0,A.useState)([]),[eE,e$]=(0,A.useState)("you"),[eB,eV]=(0,A.useState)(!1),[eR,eD]=(0,A.useState)(null),[eG,ez]=(0,A.useState)([]),[eK,eU]=(0,A.useState)([]),[eq,eW]=(0,A.useState)([]),[eH,eQ]=(0,A.useState)([]),[eJ,eY]=(0,A.useState)(e),[eX,eZ]=(0,A.useState)(null),[e0,e1]=(0,A.useState)(null),[e2,e4]=(0,A.useState)(!1),[e5,e3]=(0,A.useState)(null),[e6,e7]=(0,A.useState)({}),[e9,e8]=(0,A.useState)([]),[te,tt]=(0,A.useState)(!1),[ts,tl]=(0,A.useState)([]),[ta,tr]=(0,A.useState)([]),[ti,tn]=(0,A.useState)("llm_api"),[to,td]=(0,A.useState)({}),[tc,tu]=(0,A.useState)(!1),[tm,tp]=(0,A.useState)("30d"),[tg,th]=(0,A.useState)(null),[tx,ty]=(0,A.useState)([]),[tf,t_]=(0,A.useState)(0),[tb,tj]=(0,A.useState)([]),[tv,tw]=(0,A.useState)(null),tN=()=>{eC(!1),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])},tk=()=>{eC(!1),eI(null),eY(null),ek.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),t_(e=>e+1),tw(null),eZ(null),e1(null),ty([])};(0,A.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eO)},[ec,eu,em]),(0,A.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,A.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eU(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);ez(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,A.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,A.useEffect)(()=>{if(eo&&!eB&&Z&&em&&L.rolesWithWriteAccess.includes(em)&&(eC(!0),eV(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?e$("you"):e$(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),ek.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&ek.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&eD(ed.models),ed.key_type&&(tn(ed.key_type),ek.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eB,ek,em]);let tS=eM.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,l=e?.key_alias??"",a=e?.team_id??null;if((ee?.filter(e=>e.team_id===a).map(e=>e.key_alias)??[]).includes(l))throw Error(`Key alias ${l} already exists for team with ID ${a}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eE)e.user_id=eu;else if("agent"===eE){if(!tv)return void Y.default.fromBackend("Please select an agent");e.agent_id=tv}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eE&&(r.service_account_id=e.key_alias),eH.length>0&&(r={...r,logging:eH.filter(e=>e.callback_name)}),ta.length>0){let e=(0,O.mapDisplayToInternalNames)(ta);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eE?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),eN.invalidateQueries({queryKey:s.keyKeys.lists()}),eI(t.key),eL(t.soft_budget),Y.default.success("Virtual Key Created"),ek.resetFields(),ty([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 s=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),l=t?.error||t;l?.message&&(s=l.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Y.default.fromBackend(e)}};(0,A.useEffect)(()=>{if(e0){let e=ey?.find(e=>e.project_id===e0);eP(e?.models??[]),ek.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eP(Array.from(new Set([...eJ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,ek]),(0,A.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),eD(null)},[eR,eM,ek]),(0,A.useEffect)(()=>{if(!e0||!Z)return;let e=ey?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),ek.setFieldValue("team_id",t.team_id))},[Z,e0,ey]);let tT=async e=>{if(!e)return void e8([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let s=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(s)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,A.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&L.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tN,onCancel:tk,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tC,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(N.Radio.Group,{onChange:e=>e$(e.target.value),value:eE,children:[(0,t.jsx)(N.Radio,{value:"you",children:"You"}),(0,t.jsx)(N.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(N.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(N.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eE&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eE,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:e=>{tI(e)},onSelect:(e,t)=>{let s;return s=t.user,void ek.setFieldsValue({user_id:s.user_id})},options:e9,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(b.Button,{onClick:()=>e4(!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"===eE&&(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:tv,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tb.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(K.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eE,message:"Please select a team for the service account"}],help:"service_account"===eE?"required":"",children:(0,t.jsx)(z.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),ek.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(U.default,{projects:ey,teamId:eJ?.team_id,loading:ef||!Z,onChange:e=>{if(!e){e1(null),eY(null),ek.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eE||"another_user"===eE?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eE||"another_user"===eE?"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"===eE?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"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"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,H.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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=>{tn(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(es.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(W.BudgetWindowsEditor,{value:tx,onChange:ty})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(es.default,{step:1,width:400})}),(0,t.jsx)(D.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"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:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eG.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"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:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(V.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(el.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(R.default,{value:eH,onChange:eQ,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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:ec||"",value:tg||void 0,onChange:th,modelData:eF.length>0?{data:eF.map(e=>({model_name:e}))}:void 0},tf)})})]},`router-settings-accordion-${tf}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)($.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(E.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ev?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(b.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tN,onCancel:tk,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/fe5abdcdb57db543.js b/litellm/proxy/_experimental/out/_next/static/chunks/fe5abdcdb57db543.js deleted file mode 100644 index 870af20d0d..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/fe5abdcdb57db543.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},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",()=>t])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},988297,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:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,a],988297)},797672,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:"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,a],797672)},992619,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(779241),l=e.i(599724),r=e.i(199133),i=e.i(983561),n=e.i(689020);e.s(["default",0,({accessToken:e,value:o,placeholder:d="Select a Model",onChange:c,disabled:u=!1,style:m,className:p,showLabel:g=!0,labelText:h="Select Model"})=>{let[x,f]=(0,a.useState)(o),[y,b]=(0,a.useState)(!1),[v,j]=(0,a.useState)([]),_=(0,a.useRef)(null);return(0,a.useEffect)(()=>{f(o)},[o]),(0,a.useEffect)(()=>{e&&(async()=>{try{let t=await (0,n.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&j(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[g&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.RobotOutlined,{className:"mr-2"})," ",h]}),(0,t.jsx)(r.Select,{value:x,placeholder:d,onChange:e=>{"custom"===e?(b(!0),f(void 0)):(b(!1),f(e),c&&c(e))},options:[...Array.from(new Set(v.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:u}),y&&(0,t.jsx)(s.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{f(e),c&&c(e)},500)},disabled:u})]})}])},500727,699857,696609,531516,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(135214);let r=(0,a.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:a}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,s.fetchMCPServers)(a,e),enabled:!!a})}],500727);let i=(0,a.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list(),queryFn:async()=>await (0,s.fetchMCPToolsets)(e),enabled:!!e})}],699857);var n=e.i(843476),o=e.i(271645),d=e.i(536916),c=e.i(599724),u=e.i(409797),m=e.i(246349),m=m;let p=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,g=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,h=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,x=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function f(e,t=""){let a=e.toLowerCase();if(x.test(a))return"read";if(p.test(a))return"delete";if(h.test(a))return"update";if(g.test(a))return"create";if(t){let e=t.toLowerCase();if(x.test(e))return"read";if(p.test(e))return"delete";if(h.test(e))return"update";if(g.test(e))return"create"}return"unknown"}function y(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let a of e)t[f(a.name,a.description)].push(a);return t}let b={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,b,"classifyToolOp",()=>f,"groupToolsByCrud",()=>y],696609);let v=["read","create","update","delete","unknown"],j={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"},_={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={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:t,onChange:a,readOnly:s=!1,searchFilter:l=""})=>{let[r,i]=(0,o.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),p=(0,o.useMemo)(()=>y(e),[e]),g=(0,o.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),h=e=>{if(s)return;let t=new Set(g);t.has(e)?t.delete(e):t.add(e),a(Array.from(t))};return 0===e.length?null:(0,n.jsx)("div",{className:"space-y-3",children:v.map(e=>{let t,o=p[e];if(0===o.length)return null;if(l){let e=l.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let x=b[e],f=(t=p[e]).length>0&&t.every(e=>g.has(e.name)),y=(e=>{let t=p[e];if(0===t.length)return!1;let a=t.filter(e=>g.has(e.name)).length;return a>0&&a{i(t=>({...t,[e]:!t[e]}))},children:[v?(0,n.jsx)(m.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,n.jsx)(u.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,n.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:x.label}),(0,n.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${j[x.risk]}`,children:"high"===x.risk?"High Risk":"medium"===x.risk?"Medium Risk":"low"===x.risk?"Safe":"Unclassified"}),(0,n.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>g.has(e.name)).length,"/",o.length," allowed"]})]}),!s&&(0,n.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,n.jsx)(c.Text,{className:"text-xs text-gray-500",children:f?"All on":y?"Partial":"All off"}),(0,n.jsx)(d.Checkbox,{checked:f,indeterminate:y,onChange:t=>((e,t)=>{if(s)return;let l=new Set(g);for(let a of p[e])t?l.add(a.name):l.delete(a.name);a(Array.from(l))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!v&&(0,n.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:x.description}),!v&&(0,n.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!l||e.name.toLowerCase().includes(l.toLowerCase())||(e.description??"").toLowerCase().includes(l.toLowerCase())).map(e=>{let t,a=(t=e.name,g.has(t));return(0,n.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!s?"cursor-pointer":""} ${a?"":"opacity-60"}`,onClick:()=>h(e.name),children:[(0,n.jsx)(d.Checkbox,{checked:a,onChange:()=>h(e.name),disabled:s,onClick:e=>e.stopPropagation()}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,n.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,n.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${a?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:a?"on":"off"})]},e.name)})})]},e)})})}],531516)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var a=e.i(841947);e.s(["X",()=>a.default],37727)},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",()=>t])},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",()=>t])},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",()=>t])},158392,419470,e=>{"use strict";var t=e.i(843476),a=e.i(311451);let s={ttl:3600,lowest_latency_buffer:0},l=({routingStrategyArgs:e})=>{let l={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||s).map(([e,s])=>(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:l[e]||""}),(0,t.jsx)(a.Input,{name:e,defaultValue:"object"==typeof s?JSON.stringify(s,null,2):s?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},r=({routerSettings:e,routerFieldsMetadata:s})=>(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,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).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:s[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:s[e]?.field_description||""}),(0,t.jsx)(a.Input,{name:e,defaultValue:null==l||"null"===l?"":"object"==typeof l?JSON.stringify(l,null,2):l?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var i=e.i(199133);let n=({selectedStrategy:e,availableStrategies:a,routingStrategyDescriptions:s,routerFieldsMetadata:l,onStrategyChange:r})=>(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:l.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(i.Select,{value:e,onChange:r,style:{width:"100%"},size:"large",children:a.map(e=>(0,t.jsx)(i.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}),s[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:s[e]})]})},e))})})]});var o=e.i(790848);let d=({enabled:e,routerFieldsMetadata:a,onToggle:s})=>(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:a.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[a.enable_tag_filtering?.field_description||"",a.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:a.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(o.Switch,{checked:e,onChange:s,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:a,routerFieldsMetadata:s,availableRoutingStrategies:i,routingStrategyDescriptions:o})=>(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"})]}),i.length>0&&(0,t.jsx)(n,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:i,routingStrategyDescriptions:o,routerFieldsMetadata:s,onStrategyChange:t=>{a({...e,selectedStrategy:t})}}),(0,t.jsx)(d,{enabled:e.enableTagFiltering,routerFieldsMetadata:s,onToggle:t=>{a({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(l,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(r,{routerSettings:e.routerSettings,routerFieldsMetadata:s})]})],158392);var c=e.i(994388),u=e.i(653496),m=e.i(107233),p=e.i(271645),g=e.i(888259),h=e.i(592968),x=e.i(361653),x=x;let f=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var y=e.i(37727);function b({group:e,onChange:a,availableModels:s,maxFallbacks:l}){let r=s.filter(t=>t!==e.primaryModel),n=e.fallbackModels.length{let s=[...e.fallbackModels];s.includes(t)&&(s=s.filter(e=>e!==t)),a({...e,primaryModel:t,fallbackModels:s})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:s.map(e=>({label:e,value:e}))}),!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",children:[(0,t.jsx)(x.default,{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-sm",children:[(0,t.jsx)(f,{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 ",l," 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)(i.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:n?"Select fallback models to add...":`Maximum ${l} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let s=t.slice(0,l);a({...e,fallbackModels:s})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:r.map(e=>({label:e,value:e})),optionRender:(a,s)=>{let l=e.fallbackModels.includes(a.value),r=l?e.fallbackModels.indexOf(a.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[l&&null!==r&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:r}),(0,t.jsx)("span",{children:a.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(h.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:n?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${l} used)`:`Maximum ${l} 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((s,l)=>(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-sm 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 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:l+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:s})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==l),void a({...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)(y.X,{className:"w-4 h-4"})})]},`${s}-${l}`))})]})]})]})}function v({groups:e,onGroupsChange:a,availableModels:s,maxFallbacks:l=10,maxGroups:r=5}){let[i,n]=(0,p.useState)(e.length>0?e[0].id:"1");(0,p.useEffect)(()=>{e.length>0?e.some(e=>e.id===i)||n(e[0].id):n("1")},[e]);let o=()=>{if(e.length>=r)return;let t=Date.now().toString();a([...e,{id:t,primaryModel:null,fallbackModels:[]}]),n(t)},d=t=>{a(e.map(e=>e.id===t.id?t:e))},h=e.map((a,r)=>{let i=a.primaryModel?a.primaryModel:`Group ${r+1}`;return{key:a.id,label:i,closable:e.length>1,children:(0,t.jsx)(b,{group:a,onChange:d,availableModels:s,maxFallbacks:l})}});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)(c.Button,{variant:"primary",onClick:o,icon:()=>(0,t.jsx)(m.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:i,onChange:n,onEdit:(t,s)=>{"add"===s?o():"remove"===s&&e.length>1&&(t=>{if(1===e.length)return g.default.warning("At least one group is required");let s=e.filter(e=>e.id!==t);a(s),i===t&&s.length>0&&n(s[s.length-1].id)})(t)},items:h,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=r})}e.s(["FallbackSelectionForm",()=>v],419470)},645526,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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 l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["TeamOutlined",0,r],645526)},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["RobotOutlined",0,r],983561)},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",()=>t])},621482,e=>{"use strict";var t=e.i(869230),a=e.i(992571),s=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,a.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,a.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:s}=e,l=super.createResult(e,t),{isFetching:r,isRefetching:i,isError:n,isRefetchError:o}=l,d=s.fetchMeta?.fetchMore?.direction,c=n&&"forward"===d,u=r&&"forward"===d,m=n&&"backward"===d,p=r&&"backward"===d;return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a.hasNextPage)(t,s.data),hasPreviousPage:(0,a.hasPreviousPage)(t,s.data),isFetchNextPageError:c,isFetchingNextPage:u,isFetchPreviousPageError:m,isFetchingPreviousPage:p,isRefetchError:o&&!c&&!m,isRefetching:i&&!u&&!p}}},l=e.i(469637);function r(e,t){return(0,l.useBaseQuery)(e,s,t)}e.s(["useInfiniteQuery",()=>r],621482)},270345,e=>{"use strict";var t=e.i(764205);let a=async(e,a,s,l)=>"Admin"!=s&&"Admin Viewer"!=s?await (0,t.teamListCall)(e,l?.organization_id||null,a):await (0,t.teamListCall)(e,l?.organization_id||null);e.s(["fetchTeams",0,a])},785242,e=>{"use strict";var t=e.i(619273),a=e.i(621482),s=e.i(266027),l=e.i(912598),r=e.i(135214),i=e.i(270345),n=e.i(243652),o=e.i(764205);let d=async(e,t,a,s={})=>{try{let l=(0,o.getProxyBaseUrl)(),r=new URLSearchParams(Object.entries({team_id:s.teamID,organization_id:s.organizationID,team_alias:s.team_alias,user_id:s.userID,page:t,page_size:a,sort_by:s.sortBy,sort_order:s.sortOrder,status:s.status}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${r}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let d=await n.json();return console.log("/v2/team/list API Response:",d),d}catch(e){throw console.error("Failed to list teams:",e),e}},c=(0,n.createQueryKeys)("teams"),u=(0,n.createQueryKeys)("infiniteTeams"),m=async(e,t,a,s={})=>{try{let l=(0,o.getProxyBaseUrl)(),r=new URLSearchParams(Object.entries({team_id:s.teamID,organization_id:s.organizationID,team_alias:s.team_alias,user_id:s.userID,page:t,page_size:a,sort_by:s.sortBy,sort_order:s.sortOrder,status:"deleted"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${r}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let d=await n.json();if(console.log("/team/list?status=deleted API Response:",d),d&&"object"==typeof d&&"teams"in d)return d.teams;return d}catch(e){throw console.error("Failed to list deleted teams:",e),e}},p=(0,n.createQueryKeys)("deletedTeams");e.s(["teamListCall",0,d,"useDeletedTeams",0,(e,a,l={})=>{let{accessToken:i}=(0,r.default)();return(0,s.useQuery)({queryKey:p.list({page:e,limit:a,...l}),queryFn:async()=>await m(i,e,a,l),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useInfiniteTeams",0,(e=50,t,s)=>{let{accessToken:l,userId:i,userRole:n}=(0,r.default)(),o="Admin"===n||"Admin Viewer"===n;return(0,a.useInfiniteQuery)({queryKey:u.list({filters:{pageSize:e,...t&&{search:t},...s&&{organizationId:s},...i&&{userId:i}}}),queryFn:async({pageParam:a})=>await d(l,a,e,{team_alias:t||void 0,organizationID:s,userID:o?void 0:i}),initialPageParam:1,getNextPageParam:e=>{if(e.page{let{accessToken:t}=(0,r.default)(),a=(0,l.useQueryClient)();return(0,s.useQuery)({queryKey:c.detail(e),enabled:!!(t&&e),queryFn:async()=>{if(!t||!e)throw Error("Missing auth or teamId");return(0,o.teamInfoCall)(t,e)},initialData:()=>{if(!e)return;let t=a.getQueryData(c.list({}));return t?.find(t=>t.team_id===e)}})},"useTeams",0,()=>{let{accessToken:e,userId:t,userRole:a}=(0,r.default)();return(0,s.useQuery)({queryKey:c.list({}),queryFn:async()=>await (0,i.fetchTeams)(e,t,a,null),enabled:!!e})}])},109799,e=>{"use strict";var t=e.i(135214),a=e.i(764205),s=e.i(266027),l=e.i(912598);let r=(0,e.i(243652).createQueryKeys)("organizations");e.s(["organizationKeys",0,r,"useOrganization",0,e=>{let i=(0,l.useQueryClient)(),{accessToken:n}=(0,t.default)();return(0,s.useQuery)({queryKey:r.detail(e),enabled:!!(n&&e),queryFn:async()=>{if(!n||!e)throw Error("Missing auth or teamId");return(0,a.organizationInfoCall)(n,e)},initialData:()=>{if(!e)return;let t=i.getQueryData(r.list({}));return t?.find(t=>t.organization_id===e)}})},"useOrganizations",0,()=>{let{accessToken:e,userId:l,userRole:i}=(0,t.default)();return(0,s.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,a.organizationListCall)(e),enabled:!!(e&&l&&i)})}])},309426,e=>{"use strict";var t=e.i(290571),a=e.i(444755),s=e.i(673706),l=e.i(271645),r=e.i(46757);let i=(0,s.makeClassName)("Col"),n=l.default.forwardRef((e,s)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:p,numColSpanLg:g,children:h,className:x}=e,f=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),y=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return l.default.createElement("div",Object.assign({ref:s,className:(0,a.tremorTwMerge)(i("root"),(n=y(u,r.colSpan),o=y(m,r.colSpanSm),d=y(p,r.colSpanMd),c=y(g,r.colSpanLg),(0,a.tremorTwMerge)(n,o,d,c)),x)},f),h)});n.displayName="Col",e.s(["Col",()=>n],309426)},950724,(e,t,a)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},100236,(e,t,a)=>{t.exports=e.g&&e.g.Object===Object&&e.g},139088,(e,t,a)=>{var s=e.r(100236),l="object"==typeof self&&self&&self.Object===Object&&self;t.exports=s||l||Function("return this")()},631926,(e,t,a)=>{var s=e.r(139088);t.exports=function(){return s.Date.now()}},748891,(e,t,a)=>{var s=/\s/;t.exports=function(e){for(var t=e.length;t--&&s.test(e.charAt(t)););return t}},830364,(e,t,a)=>{var s=e.r(748891),l=/^\s+/;t.exports=function(e){return e?e.slice(0,s(e)+1).replace(l,""):e}},630353,(e,t,a)=>{t.exports=e.r(139088).Symbol},243436,(e,t,a)=>{var s=e.r(630353),l=Object.prototype,r=l.hasOwnProperty,i=l.toString,n=s?s.toStringTag:void 0;t.exports=function(e){var t=r.call(e,n),a=e[n];try{e[n]=void 0;var s=!0}catch(e){}var l=i.call(e);return s&&(t?e[n]=a:delete e[n]),l}},223243,(e,t,a)=>{var s=Object.prototype.toString;t.exports=function(e){return s.call(e)}},377684,(e,t,a)=>{var s=e.r(630353),l=e.r(243436),r=e.r(223243),i=s?s.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?l(e):r(e)}},877289,(e,t,a)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},361884,(e,t,a)=>{var s=e.r(377684),l=e.r(877289);t.exports=function(e){return"symbol"==typeof e||l(e)&&"[object Symbol]"==s(e)}},773759,(e,t,a)=>{var s=e.r(830364),l=e.r(950724),r=e.r(361884),i=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(r(e))return i;if(l(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=l(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var a=o.test(e);return a||d.test(e)?c(e.slice(2),a?2:8):n.test(e)?i:+e}},374009,(e,t,a)=>{var s=e.r(950724),l=e.r(631926),r=e.r(773759),i=Math.max,n=Math.min;t.exports=function(e,t,a){var o,d,c,u,m,p,g=0,h=!1,x=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var a=o,s=d;return o=d=void 0,g=t,u=e.apply(s,a)}function b(e){var a=e-p,s=e-g;return void 0===p||a>=t||a<0||x&&s>=c}function v(){var e,a,s,r=l();if(b(r))return j(r);m=setTimeout(v,(e=r-p,a=r-g,s=t-e,x?n(s,c-a):s))}function j(e){return(m=void 0,f&&o)?y(e):(o=d=void 0,u)}function _(){var e,a=l(),s=b(a);if(o=arguments,d=this,p=a,s){if(void 0===m)return g=e=p,m=setTimeout(v,t),h?y(e):u;if(x)return clearTimeout(m),m=setTimeout(v,t),y(p)}return void 0===m&&(m=setTimeout(v,t)),u}return t=r(t)||0,s(a)&&(h=!!a.leading,c=(x="maxWait"in a)?i(r(a.maxWait)||0,t):c,f="trailing"in a?!!a.trailing:f),_.cancel=function(){void 0!==m&&clearTimeout(m),g=0,o=p=d=m=void 0},_.flush=function(){return void 0===m?u:j(l())},_}},964306,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:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["XCircleIcon",0,a],964306)},435451,620250,e=>{"use strict";var t=e.i(843476),a=e.i(290571),s=e.i(271645);let l=e=>{var t=(0,a.__rest)(e,[]);return s.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"}),s.default.createElement("path",{d:"M12 4v16m8-8H4"}))},r=e=>{var t=(0,a.__rest)(e,[]);return s.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"}),s.default.createElement("path",{d:"M20 12H4"}))};var i=e.i(444755),n=e.i(673706),o=e.i(677955);let d="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",c="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",u=s.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:p,onValueChange:g,onChange:h}=e,x=(0,a.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),f=(0,s.useRef)(null),[y,b]=s.default.useState(!1),v=s.default.useCallback(()=>{b(!0)},[]),j=s.default.useCallback(()=>{b(!1)},[]),[_,w]=s.default.useState(!1),k=s.default.useCallback(()=>{w(!0)},[]),N=s.default.useCallback(()=>{w(!1)},[]);return s.default.createElement(o.default,Object.assign({type:"number",ref:(0,n.mergeRefs)([f,t]),disabled:p,makeInputClassName:(0,n.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=f.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&v(),"ArrowUp"===e.key&&k()},onKeyUp:e=>{"ArrowDown"===e.key&&j(),"ArrowUp"===e.key&&N()},onChange:e=>{p||(null==g||g(parseFloat(e.target.value)),null==h||h(e))},stepper:m?s.default.createElement("div",{className:(0,i.tremorTwMerge)("flex justify-center align-middle")},s.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=f.current)||e.stepDown(),null==(t=f.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},s.default.createElement(r,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),s.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=f.current)||e.stepUp(),null==(t=f.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&c,d,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},s.default.createElement(l,{"data-testid":"step-up",className:(_?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},x))});u.displayName="NumberInput",e.s(["NumberInput",()=>u],620250),e.s(["default",0,({step:e=.01,style:a={width:"100%"},placeholder:s="Enter a numerical value",min:l,max:r,onChange:i,...n})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:a,placeholder:s,min:l,max:r,onChange:i,...n})],435451)},677667,674175,886148,543086,e=>{"use strict";let t,a;var s,l=e.i(290571),r=e.i(429427),i=e.i(371330),n=e.i(271645),o=e.i(394487),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(83733);let p=(0,n.createContext)(()=>{});function g({value:e,children:t}){return n.default.createElement(p.Provider,{value:e},t)}e.s(["CloseProvider",()=>g],674175);var h=e.i(233137),x=e.i(233538),f=e.i(397701),y=e.i(402155),b=e.i(700020);let v=null!=(s=n.default.startTransition)?s:function(e){e()};var j=e.i(998348),_=((t=_||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),w=((a=w||{})[a.ToggleDisclosure=0]="ToggleDisclosure",a[a.CloseDisclosure=1]="CloseDisclosure",a[a.SetButtonId=2]="SetButtonId",a[a.SetPanelId=3]="SetPanelId",a[a.SetButtonElement=4]="SetButtonElement",a[a.SetPanelElement=5]="SetPanelElement",a);let k={0:e=>({...e,disclosureState:(0,f.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}},N=(0,n.createContext)(null);function S(e){let t=(0,n.useContext)(N);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,S),t}return t}N.displayName="DisclosureContext";let C=(0,n.createContext)(null);C.displayName="DisclosureAPIContext";let T=(0,n.createContext)(null);function I(e,t){return(0,f.match)(t.type,k,e,t)}T.displayName="DisclosurePanelContext";let M=n.Fragment,E=b.RenderFeatures.RenderStrategy|b.RenderFeatures.Static,A=Object.assign((0,b.forwardRefWithAs)(function(e,t){let{defaultOpen:a=!1,...s}=e,l=(0,n.useRef)(null),r=(0,u.useSyncRefs)(t,(0,u.optionalRef)(e=>{l.current=e},void 0===e.as||e.as===n.Fragment)),i=(0,n.useReducer)(I,{disclosureState:+!a,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:c},m]=i,p=(0,d.useEvent)(e=>{m({type:1});let t=(0,y.getOwnerDocument)(l);if(!t||!c)return;let a=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(c):t.getElementById(c);null==a||a.focus()}),x=(0,n.useMemo)(()=>({close:p}),[p]),v=(0,n.useMemo)(()=>({open:0===o,close:p}),[o,p]),j=(0,b.useRender)();return n.default.createElement(N.Provider,{value:i},n.default.createElement(C.Provider,{value:x},n.default.createElement(g,{value:p},n.default.createElement(h.OpenClosedProvider,{value:(0,f.match)(o,{0:h.State.Open,1:h.State.Closed})},j({ourProps:{ref:r},theirProps:s,slot:v,defaultTag:M,name:"Disclosure"})))))}),{Button:(0,b.forwardRefWithAs)(function(e,t){let a=(0,n.useId)(),{id:s=`headlessui-disclosure-button-${a}`,disabled:l=!1,autoFocus:m=!1,...p}=e,[g,h]=S("Disclosure.Button"),f=(0,n.useContext)(T),y=null!==f&&f===g.panelId,v=(0,n.useRef)(null),_=(0,u.useSyncRefs)(v,t,(0,d.useEvent)(e=>{if(!y)return h({type:4,element:e})}));(0,n.useEffect)(()=>{if(!y)return h({type:2,buttonId:s}),()=>{h({type:2,buttonId:null})}},[s,h,y]);let w=(0,d.useEvent)(e=>{var t;if(y){if(1===g.disclosureState)return;switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0}),null==(t=g.buttonElement)||t.focus()}}else switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0})}}),k=(0,d.useEvent)(e=>{e.key===j.Keys.Space&&e.preventDefault()}),N=(0,d.useEvent)(e=>{var t;(0,x.isDisabledReactIssue7711)(e.currentTarget)||l||(y?(h({type:0}),null==(t=g.buttonElement)||t.focus()):h({type:0}))}),{isFocusVisible:C,focusProps:I}=(0,r.useFocusRing)({autoFocus:m}),{isHovered:M,hoverProps:E}=(0,i.useHover)({isDisabled:l}),{pressed:A,pressProps:P}=(0,o.useActivePress)({disabled:l}),L=(0,n.useMemo)(()=>({open:0===g.disclosureState,hover:M,active:A,disabled:l,focus:C,autofocus:m}),[g,M,A,C,l,m]),O=(0,c.useResolveButtonType)(e,g.buttonElement),F=y?(0,b.mergeProps)({ref:_,type:O,disabled:l||void 0,autoFocus:m,onKeyDown:w,onClick:N},I,E,P):(0,b.mergeProps)({ref:_,id:s,type:O,"aria-expanded":0===g.disclosureState,"aria-controls":g.panelElement?g.panelId:void 0,disabled:l||void 0,autoFocus:m,onKeyDown:w,onKeyUp:k,onClick:N},I,E,P);return(0,b.useRender)()({ourProps:F,theirProps:p,slot:L,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,b.forwardRefWithAs)(function(e,t){let a=(0,n.useId)(),{id:s=`headlessui-disclosure-panel-${a}`,transition:l=!1,...r}=e,[i,o]=S("Disclosure.Panel"),{close:c}=function e(t){let a=(0,n.useContext)(C);if(null===a){let a=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,e),a}return a}("Disclosure.Panel"),[p,g]=(0,n.useState)(null),x=(0,u.useSyncRefs)(t,(0,d.useEvent)(e=>{v(()=>o({type:5,element:e}))}),g);(0,n.useEffect)(()=>(o({type:3,panelId:s}),()=>{o({type:3,panelId:null})}),[s,o]);let f=(0,h.useOpenClosed)(),[y,j]=(0,m.useTransition)(l,p,null!==f?(f&h.State.Open)===h.State.Open:0===i.disclosureState),_=(0,n.useMemo)(()=>({open:0===i.disclosureState,close:c}),[i.disclosureState,c]),w={ref:x,id:s,...(0,m.transitionDataAttributes)(j)},k=(0,b.useRender)();return n.default.createElement(h.ResetOpenClosedProvider,null,n.default.createElement(T.Provider,{value:i.panelId},k({ourProps:w,theirProps:r,slot:_,defaultTag:"div",features:E,visible:y,name:"Disclosure.Panel"})))})});e.s(["Disclosure",()=>A],886148);let P=(0,n.createContext)(void 0);var L=e.i(444755);let O=(0,e.i(673706).makeClassName)("Accordion"),F=(0,n.createContext)({isOpen:!1}),D=n.default.forwardRef((e,t)=>{var a;let{defaultOpen:s=!1,children:r,className:i}=e,o=(0,l.__rest)(e,["defaultOpen","children","className"]),d=null!=(a=(0,n.useContext)(P))?a:(0,L.tremorTwMerge)("rounded-tremor-default border");return n.default.createElement(A,Object.assign({as:"div",ref:t,className:(0,L.tremorTwMerge)(O("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",d,i),defaultOpen:s},o),({open:e})=>n.default.createElement(F.Provider,{value:{isOpen:e}},r))});D.displayName="Accordion",e.s(["OpenContext",()=>F,"default",()=>D],543086),e.s(["Accordion",()=>D],677667)},898667,e=>{"use strict";var t=e.i(290571),a=e.i(271645),s=e.i(886148);let l=e=>{var s=(0,t.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},s),a.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),i=e.i(444755);let n=(0,e.i(673706).makeClassName)("AccordionHeader"),o=a.default.forwardRef((e,o)=>{let{children:d,className:c}=e,u=(0,t.__rest)(e,["children","className"]),{isOpen:m}=(0,a.useContext)(r.OpenContext);return a.default.createElement(s.Disclosure.Button,Object.assign({ref:o,className:(0,i.tremorTwMerge)(n("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",c)},u),a.default.createElement("div",{className:(0,i.tremorTwMerge)(n("children"),"flex flex-1 text-inherit mr-4")},d),a.default.createElement("div",null,a.default.createElement(l,{className:(0,i.tremorTwMerge)(n("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",()=>o],898667)},130643,e=>{"use strict";var t=e.i(290571),a=e.i(271645),s=e.i(886148),l=e.i(444755);let r=(0,e.i(673706).makeClassName)("AccordionBody"),i=a.default.forwardRef((e,i)=>{let{children:n,className:o}=e,d=(0,t.__rest)(e,["children","className"]);return a.default.createElement(s.Disclosure.Panel,Object.assign({ref:i,className:(0,l.tremorTwMerge)(r("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",o)},d),n)});i.displayName="AccordionBody",e.s(["AccordionBody",()=>i],130643)},109034,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(135214);let r=(0,a.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:a,userRole:i}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,s.tagListCall)(e),enabled:!!(e&&a&&i)})}])},9314,263147,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(981339),l=e.i(645526),r=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),d=e.i(708347),c=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),a=`${t}/v1/access_group`,s=await fetch(a,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return s.json()},p=()=>{let{accessToken:e,userRole:t}=(0,c.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&d.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:d,className:c,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:x,isError:f}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Skeleton.Input,{active:!0,block:!0,style:{height:32,...d}})]});let y=(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:[u&&(0,t.jsxs)(r.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(a.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...d},className:`rounded-md ${c??""}`,notFoundContent:f?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(y.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:y.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},552130,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,a.useState)([]),[m,p]=(0,a.useState)([]),[g,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getAgentsList)(n),t=e?.agents||[];u(t);let a=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>a.add(e))}),p(Array.from(a))}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`}))],f=[...r?.agents||[],...(r?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(s.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:f,loading:g,className:i,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)(s.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))})})}])},844565,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,a.useState)([]),[p,g]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,l.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,a=e.methods;return a&&a.length>0?a.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,c]),(0,t.jsx)(s.Select,{mode:"tags",placeholder:o,onChange:e,value:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,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:"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,a],810757);let s=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:"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,s],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",a=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,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",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,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:`${t}langfuse.png`,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:`${t}langfuse.png`,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:`${t}langsmith.png`,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:`${t}openmeter.png`,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:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,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:`${t}aws.svg`,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"}],s=a.reduce((e,t)=>(e[t.displayName]=t,e),{}),l=a.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=a.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,s,"callback_map",0,l,"mapDisplayToInternalNames",0,e=>e.map(e=>l[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>r[e]||e),"reverse_callback_map",0,r])},75921,e=>{"use strict";var t=e.i(843476),a=e.i(266027),s=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,s.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(699857),d=e.i(199133);let c="toolset:";e.s(["default",0,({onChange:e,value:s,className:u,accessToken:m,placeholder:p="Select MCP servers",disabled:g=!1,teamId:h})=>{let{data:x=[],isLoading:f}=(0,n.useMCPServers)(h),{data:y=[],isLoading:b}=(()=>{let{accessToken:e}=(0,r.default)();return(0,a.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:v=[],isLoading:j}=(0,o.useMCPToolsets)(),_=new Set(y),w=[...y.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`})),...v.map(e=>({label:e.toolset_name,value:`${c}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],k={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},N={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},S=[...s?.servers||[],...s?.accessGroups||[],...(s?.toolsets||[]).map(e=>`${c}${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(d.Select,{mode:"multiple",placeholder:p,onChange:t=>{let a=t.filter(e=>e.startsWith(c)).map(e=>e.slice(c.length)),s=t.filter(e=>!e.startsWith(c));e({servers:s.filter(e=>!_.has(e)),accessGroups:s.filter(e=>_.has(e)),toolsets:a})},value:S,loading:f||b||j,className:u,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:g,filterOption:(e,t)=>(w.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:w.map(e=>(0,t.jsx)(d.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:k[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:k[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:N[e.type]})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(764205),l=e.i(599724),r=e.i(482725),i=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:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,x]=(0,a.useState)({}),[f,y]=(0,a.useState)({}),[b,v]=(0,a.useState)({}),[j,_]=(0,a.useState)({}),w=(0,a.useRef)(u);(0,a.useEffect)(()=>{w.current=u},[u]);let k=(0,a.useMemo)(()=>0===c.length?[]:g.filter(e=>c.includes(e.server_id)),[g,c]),N=async(e,t)=>{y(t=>({...t,[e]:!0})),v(t=>({...t,[e]:""}));try{let a=await (0,s.listMCPTools)(t,e);if(a.error)v(t=>({...t,[e]:a.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=a.tools||[];x(a=>({...a,[e]:t}));let s=w.current;if(!s[e]&&t.length>0){let a=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...s,[e]:a})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),v(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{y(t=>({...t,[e]:!1}))}};(0,a.useEffect)(()=>{k.forEach(t=>{h[t.server_id]||f[t.server_id]||N(t.server_id,e)})},[k,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:k.map(e=>{let a=e.server_name||e.alias||e.server_id,s=h[e.server_id]||[],n=u[e.server_id]||[],d=f[e.server_id],c=b[e.server_id],g=j[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)(l.Text,{className:"font-semibold text-gray-900",children:a}),e.description&&(0,t.jsx)(l.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&s.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>_(a=>({...a,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(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 a;return a=h[t=e.server_id]||[],void m({...u,[t]:a.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)(r.Spin,{size:"large"}),(0,t.jsx)(l.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)(l.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(l.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&s.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:s,value:u[e.server_id]?n:void 0,onChange:t=>S(e.server_id,t),readOnly:p}),!d&&!c&&s.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:s.map(a=>{let s=n.includes(a.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{if(p)return;let t=s?n.filter(e=>e!==a.name):[...n,a.name];S(e.server_id,t)},disabled:p,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)(l.Text,{className:"font-medium text-gray-900",children:a.name}),(0,t.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["- ",a.description||"No description"]})]})})]},a.name)})}),!d&&!c&&0===s.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(l.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(592968),l=e.i(312361),r=e.i(827252),i=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),p=e.i(557662),g=e.i(435451);let{Option:h}=a.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:f=[],onDisabledCallbacksChange:y})=>{let b=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),v=Object.keys(p.callbackInfo),j=e=>{x?.(e)},_=(t,a,s)=>{let l=[...e];if("callback_name"===a){let e=p.callback_map[s]||s;l[t]={...l[t],[a]:e,callback_vars:{}}}else l[t]={...l[t],[a]:s};j(l)},w=(t,a,s)=>{let l=[...e];l[t]={...l[t],callback_vars:{...l[t].callback_vars,[a]:s}},j(l)};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)(s.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(r.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)(a.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);y?.(t)},style:{width:"100%"},optionLabelProp:"label",children:v.map(e=>{let a=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(s.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(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)(l.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)(s.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...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((l,d)=>{let u=l.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===l.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm 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:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==d))},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)(a.Select,{value:u,placeholder:"Select integration",onChange:e=>_(d,"callback_name",e),className:"w-full",optionLabelProp:"label",children:b.map(e=>{let a=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(s.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(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)(a.Select,{value:l.callback_type,onChange:e=>_(d,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{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)(h,{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)(h,{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,a)=>{if(!e.callback_name)return null;let l=Object.entries(p.callback_map).find(([t,a])=>a===e.callback_name)?.[0];if(!l)return null;let i=p.callbackInfo[l]?.dynamic_params||{};return 0===Object.keys(i).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(i).map(([l,i])=>(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:l.replace(/_/g," ")}),(0,t.jsx)(s.Tooltip,{title:`Environment variable reference recommended: os.environ/${l.toUpperCase()}`,children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(a,l,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(a,l,e.target.value)})]},l))})]})})(l,d)]})]},d)})}),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'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(404206),l=e.i(723731),r=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),d=e.i(158392),c=e.i(419470),u=e.i(689020);let m=(0,a.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,f]=(0,a.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[y,b]=(0,a.useState)([]),[v,j]=(0,a.useState)([]),[_,w]=(0,a.useState)([]),[k,N]=(0,a.useState)([]),[S,C]=(0,a.useState)({}),[T,I]=(0,a.useState)({}),M=(0,a.useRef)(!1),E=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(M.current&&e===E.current){M.current=!1;return}if(M.current&&e!==E.current&&(M.current=!1),e!==E.current)if(E.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...a}=e;f({routerSettings:a,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let s=e.fallbacks||[];b(s),j(s&&0!==s.length?s.map((e,t)=>{let[a,s]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:a||null,fallbackModels:s||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),b([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,a.useEffect)(()=>{e&&(0,o.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 a=e.fields.find(e=>"routing_strategy"===e.field_name);a?.options&&N(a.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,a.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let A=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),a=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:y.length>0?y:null}).map(([a,s])=>{if("routing_strategy_args"!==a&&"routing_strategy"!==a&&"enable_tag_filtering"!==a&&"fallbacks"!==a){let l=document.querySelector(`input[name="${a}"]`);if(l){if(void 0!==l.value&&""!==l.value){let r=((a,s,l)=>{if(null==s)return l;let r=String(s).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(a)){let e=Number(r);return Number.isNaN(e)?l:e}if(t.has(a)){if(""===r)return null;try{return JSON.parse(r)}catch{return l}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(a,l.value,s);return[a,r]}return[a,null]}}else if("routing_strategy"===a)return[a,x.selectedStrategy];else if("enable_tag_filtering"===a)return[a,x.enableTagFiltering];else if("fallbacks"===a)return[a,y.length>0?y:null];else if("routing_strategy_args"===a&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),a={};return e?.value&&(a.lowest_latency_buffer=Number(e.value)),t?.value&&(a.ttl=Number(t.value)),["routing_strategy_args",Object.keys(a).length>0?a:null]}return[a,s]}).filter(e=>null!=e)),s=(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:s(a.routing_strategy),allowed_fails:s(a.allowed_fails,!0),cooldown_time:s(a.cooldown_time,!0),num_retries:s(a.num_retries,!0),timeout:s(a.timeout,!0),retry_after:s(a.retry_after,!0),fallbacks:y.length>0?y:null,context_window_fallbacks:s(a.context_window_fallbacks),retry_policy:s(a.retry_policy),model_group_alias:s(a.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:s(a.routing_strategy_args)}};(0,a.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{M.current=!0,p({router_settings:A()})},100);return()=>clearTimeout(e)},[x,y]);let P=Array.from(new Set(_.map(e=>e.model_group))).sort();return((0,a.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:A()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.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)(l.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(s.TabPanel,{children:(0,t.jsx)(d.default,{value:x,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(s.TabPanel,{children:(0,t.jsx)(c.FallbackSelectionForm,{groups:v,onGroupsChange:e=>{j(e),b(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:P,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},207082,e=>{"use strict";var t=e.i(619273),a=e.i(266027),s=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,s.createQueryKeys)("keys"),n=async(e,t,a,s={})=>{try{let r=(0,l.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:s.teamID,project_id:s.projectID,organization_id:s.organizationID,key_alias:s.selectedKeyAlias,key_hash:s.keyHash,user_id:s.userID,page:t,size:a,sort_by:s.sortBy,sort_order:s.sortOrder,expand:s.expand,status:s.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${r?`${r}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}let d=await o.json();return console.log("/key/list API Response:",d),d}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,s.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,s,l={})=>{let{accessToken:i}=(0,r.default)();return(0,a.useQuery)({queryKey:o.list({page:e,limit:s,...l}),queryFn:async()=>await n(i,e,s,{...l,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,s,l={})=>{let{accessToken:o}=(0,r.default)();return(0,a.useQuery)({queryKey:i.list({page:e,limit:s,...l}),queryFn:async()=>await n(o,e,s,l),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),a=e.i(243652),s=e.i(764205),l=e.i(708347),r=e.i(135214);let i=(0,a.createQueryKeys)("projects"),n=async e=>{let t=(0,s.getProxyBaseUrl)(),a=`${t}/project/list`,l=await fetch(a,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return l.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:a}=(0,r.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&l.all_admin_roles.includes(a||"")})}])},392110,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(592968),r=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),d=e.i(779241);let{Option:c}=s.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:x=!1,onNeverExpireChange:f})=>{let y=p&&!["7d","30d","90d","180d","365d"].includes(p),[b,v]=(0,a.useState)(y),[j,_]=(0,a.useState)(y?p:""),[w,k]=(0,a.useState)(e?.getFieldValue?.("duration")||"");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)(l.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)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&f&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let a=t.target.checked;f(a),a&&(k(""),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)(d.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{k(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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)(l.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(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)(l.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(s.Select,{value:b?"custom":p,onChange:e=>{"custom"===e?v(!0):(v(!1),_(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(c,{value:"7d",children:"7 days"}),(0,t.jsx)(c,{value:"30d",children:"30 days"}),(0,t.jsx)(c,{value:"90d",children:"90 days"}),(0,t.jsx)(c,{value:"180d",children:"180 days"}),(0,t.jsx)(c,{value:"365d",children:"365 days"}),(0,t.jsx)(c,{value:"custom",children:"Custom interval"})]}),b&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(d.TextInput,{value:j,onChange:e=>{let t=e.target.value;_(t),g(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)"})]})]})]})]}),u&&(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."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),a=e.i(808613),s=e.i(199133),l=e.i(592968),r=e.i(827252);let{Option:i}=s.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(a.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(l.Tooltip,{title:h,children:(0,t.jsx)(r.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(s.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)(i,{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 ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{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 ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{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 ",p," (e.g. 2 ",p,") 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)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),a=e.i(199133);let{Text:s}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:l,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(a.Select,{showSearch:!0,placeholder:"All Organizations",value:l,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,a)=>{if(!a)return!1;let s=e?.find(e=>e.organization_id===a.key);if(!s)return!1;let l=t.toLowerCase().trim(),r=(s.organization_alias||"").toLowerCase(),i=(s.organization_id||"").toLowerCase();return r.includes(l)||i.includes(l)},children:e?.map(e=>(0,t.jsxs)(a.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(s,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},319312,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(28651),l=e.i(199133);let r=[{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"}];function i({value:e,onChange:i}){let n=(t,a,s)=>{i(e.map((e,l)=>l===t?{...e,[a]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((o,d)=>{let c=r.find(e=>e.value===o.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)(l.Select,{value:o.budget_duration,onChange:e=>n(d,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(s.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(d,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(a.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==d))},style:{padding:"0 4px"},children:"✕"})]}),c&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",c]})]},d)}),(0,t.jsx)(a.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}e.s(["BudgetWindowsEditor",()=>i])},533882,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(250980),l=e.i(797672),r=e.i(68155),i=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),p=e.i(496020),g=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:f={},onAliasUpdate:y,showExampleConfig:b=!0})=>{let[v,j]=(0,a.useState)([]),[_,w]=(0,a.useState)({aliasName:"",targetModel:""}),[k,N]=(0,a.useState)(null);(0,a.useEffect)(()=>{j(Object.entries(f).map(([e,t],a)=>({id:`${a}-${e}`,aliasName:e,targetModel:t})))},[f]);let S=()=>{if(!k)return;if(!k.aliasName||!k.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.id!==k.id&&e.aliasName===k.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=v.map(e=>e.id===k.id?k:e);j(e),N(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),x.default.success("Alias updated successfully")},C=()=>{N(null)},T=v.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:_.aliasName,onChange:e=>w({..._,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:_.targetModel,placeholder:"Select target model",onChange:e=>w({..._,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!_.aliasName||!_.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.aliasName===_.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...v,{id:`${Date.now()}-${_.aliasName}`,aliasName:_.aliasName,targetModel:_.targetModel}];j(e),w({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),x.default.success("Alias added successfully")},disabled:!_.aliasName||!_.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!_.aliasName||!_.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(s.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)(p.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:[v.map(a=>(0,t.jsx)(p.TableRow,{className:"h-8",children:k&&k.id===a.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:k.aliasName,onChange:e=>N({...k,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:k.targetModel,onChange:e=>N({...k,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:S,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:C,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:a.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:a.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{N({...a})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(l.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,s;return e=a.id,j(t=v.filter(t=>t.id!==e)),s={},void(t.forEach(e=>{s[e.aliasName]=e.targetModel}),y&&y(s),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},a.id)),0===v.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.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)(i.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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,a])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',a,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(266484);e.s(["default",0,function({value:e,onChange:l,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(0,t.jsx)(s.default,{value:e,onChange:l,disabledCallbacks:i,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)(a.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"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),a=e.i(199133),s=e.i(482725),l=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(a.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(s.Spin,{indicator:(0,t.jsx)(l.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let a=c?.find(e=>e.project_id===t.key);if(!a)return!1;let s=e.toLowerCase().trim(),l=(a.project_alias||"").toLowerCase(),r=(a.project_id||"").toLowerCase();return l.includes(s)||r.includes(s)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(a.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))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),a=e.i(207082),s=e.i(109799),l=e.i(510674),r=e.i(109034),i=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),p=e.i(898667),g=e.i(994388),h=e.i(309426),x=e.i(350967),f=e.i(599724),y=e.i(779241),b=e.i(629569),v=e.i(464571),j=e.i(808613),_=e.i(311451),w=e.i(212931),k=e.i(91739),N=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(374009),M=e.i(271645),E=e.i(708347),A=e.i(552130),P=e.i(557662),L=e.i(9314),O=e.i(860585),F=e.i(82946),D=e.i(392110),R=e.i(533882),$=e.i(844565),B=e.i(651904),z=e.i(939510),K=e.i(460285),V=e.i(663435),U=e.i(363256),G=e.i(575260),q=e.i(371455),H=e.i(319312),W=e.i(355619),Q=e.i(75921),J=e.i(390605),Y=e.i(727749),X=e.i(764205),Z=e.i(237016),ee=e.i(888259);let et=({apiKey:e})=>{let[a,s]=(0,M.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)(Z.CopyToClipboard,{text:e,onCopy:()=>{s(!0),ee.default.success("Key copied to clipboard"),setTimeout(()=>s(!1),2e3)},children:(0,t.jsx)(v.Button,{type:"primary",style:{marginTop:12},children:a?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,et],364769);var ea=e.i(435451),es=e.i(916940);let{Option:el}=N.Select,er=async(e,t,a,s)=>{try{if(null===e||null===t)return[];if(null!==a){let l=(await (0,X.modelAvailableCall)(a,e,t,!0,s,!0)).data.map(e=>e.id);return console.log("available_model_names:",l),l}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ei=async(e,t,a,s)=>{try{if(null===e||null===t)return;if(null!==a){let l=(await (0,X.modelAvailableCall)(a,e,t)).data.map(e=>e.id);console.log("available_model_names:",l),s(l)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Z,data:ee,addKey:en,autoOpenCreate:eo,prefillData:ed})=>{let{accessToken:ec,userId:eu,userRole:em,premiumUser:ep}=(0,n.default)(),eg=ep||null!=em&&E.rolesWithWriteAccess.includes(em),{data:eh,isLoading:ex}=(0,s.useOrganizations)(),{data:ef,isLoading:ey}=(0,l.useProjects)(),{data:eb}=(0,i.useUISettings)(),{data:ev}=(0,r.useTags)(),ej=!!eb?.values?.enable_projects_ui,e_=!!eb?.values?.disable_custom_api_keys,ew=ev?Object.values(ev).map(e=>({value:e.name,label:e.name})):[],ek=(0,c.useQueryClient)(),[eN]=j.Form.useForm(),[eS,eC]=(0,M.useState)(!1),[eT,eI]=(0,M.useState)(null),[eM,eE]=(0,M.useState)(null),[eA,eP]=(0,M.useState)([]),[eL,eO]=(0,M.useState)([]),[eF,eD]=(0,M.useState)("you"),[eR,e$]=(0,M.useState)(!1),[eB,ez]=(0,M.useState)(null),[eK,eV]=(0,M.useState)([]),[eU,eG]=(0,M.useState)([]),[eq,eH]=(0,M.useState)([]),[eW,eQ]=(0,M.useState)([]),[eJ,eY]=(0,M.useState)(e),[eX,eZ]=(0,M.useState)(null),[e0,e1]=(0,M.useState)(null),[e2,e4]=(0,M.useState)(!1),[e3,e6]=(0,M.useState)(null),[e5,e7]=(0,M.useState)({}),[e8,e9]=(0,M.useState)([]),[te,tt]=(0,M.useState)(!1),[ta,ts]=(0,M.useState)([]),[tl,tr]=(0,M.useState)([]),[ti,tn]=(0,M.useState)("llm_api"),[to,td]=(0,M.useState)({}),[tc,tu]=(0,M.useState)(!1),[tm,tp]=(0,M.useState)("30d"),[tg,th]=(0,M.useState)(null),[tx,tf]=(0,M.useState)([]),[ty,tb]=(0,M.useState)(0),[tv,tj]=(0,M.useState)([]),[t_,tw]=(0,M.useState)(null),tk=()=>{eC(!1),eN.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),tb(e=>e+1),tw(null),eZ(null),e1(null),tf([])},tN=()=>{eC(!1),eI(null),eY(null),eN.resetFields(),eQ([]),tr([]),tn("llm_api"),td({}),tu(!1),tp("30d"),th(null),tb(e=>e+1),tw(null),eZ(null),e1(null),tf([])};(0,M.useEffect)(()=>{eu&&em&&ec&&ei(eu,em,ec,eP)},[ec,eu,em]),(0,M.useEffect)(()=>{ec&&(0,X.getAgentsList)(ec).then(e=>tj(e?.agents||[])).catch(()=>tj([]))},[ec]),(0,M.useEffect)(()=>{let e=async()=>{try{let e=(await (0,X.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eG(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,X.getPromptsList)(ec);eH(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,X.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);eV(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,M.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e7(JSON.parse(e));else{let e=await (0,X.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e7(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,M.useEffect)(()=>{if(eo&&!eR&&Z&&em&&E.rolesWithWriteAccess.includes(em)&&(eC(!0),e$(!0),ed)){if(ed.owned_by&&("another_user"===ed.owned_by&&"Admin"!==em?eD("you"):eD(ed.owned_by)),ed.team_id){let e=Z?.find(e=>e.team_id===ed.team_id)||null;e&&(eY(e),eN.setFieldsValue({team_id:ed.team_id}))}ed.key_alias&&eN.setFieldsValue({key_alias:ed.key_alias}),ed.models&&ed.models.length>0&&ez(ed.models),ed.key_type&&(tn(ed.key_type),eN.setFieldsValue({key_type:ed.key_type}))}},[eo,ed,Z,eR,eN,em]);let tS=eL.includes("no-default-models")&&!eJ,tC=async e=>{try{let t,s=e?.key_alias??"",l=e?.team_id??null;if((ee?.filter(e=>e.team_id===l).map(e=>e.key_alias)??[]).includes(s))throw Error(`Key alias ${s} already exists for team with ID ${l}, please provide another key alias`);if(Y.default.info("Making API Call"),eC(!0),"you"===eF)e.user_id=eu;else if("agent"===eF){if(!t_)return void Y.default.fromBackend("Please select an agent");e.agent_id=t_}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eF&&(r.service_account_id=e.key_alias),eW.length>0&&(r={...r,logging:eW.filter(e=>e.callback_name)}),tl.length>0){let e=(0,P.mapDisplayToInternalNames)(tl);r={...r,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tm),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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.object_permission||(e.object_permission={});let{servers:t,accessGroups:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),a&&a.length>0&&(e.object_permission.mcp_access_groups=a),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),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:a}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),a&&a.length>0&&(e.object_permission.agent_access_groups=a),delete e.allowed_agents_and_groups}Object.keys(to).length>0&&(e.aliases=JSON.stringify(to)),tg?.router_settings&&Object.values(tg.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tg.router_settings);let n=tx.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eF?await (0,X.keyCreateServiceAccountCall)(ec,e):await (0,X.keyCreateCall)(ec,eu,e),console.log("key create Response:",t),en(t),ek.invalidateQueries({queryKey:a.keyKeys.lists()}),eI(t.key),eE(t.soft_budget),Y.default.success("Virtual Key Created"),eN.resetFields(),tf([]),localStorage.removeItem("userData"+eu)}catch(t){console.log("error in create key:",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 a=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),s=t?.error||t;s?.message&&(a=s.message)}}else{let t=e?.error||e;t?.message&&(a=t.message)}}catch(e){}return t.includes("team_member_permission_error")||a.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);Y.default.fromBackend(e)}};(0,M.useEffect)(()=>{if(e0){let e=ef?.find(e=>e.project_id===e0);eO(e?.models??[]),eN.setFieldValue("models",[]);return}eu&&em&&ec&&er(eu,em,ec,eJ?.team_id??null).then(e=>{eO(Array.from(new Set([...eJ?.models??[],...e])))}),eB||eN.setFieldValue("models",[]),eN.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eJ,e0,ec,eu,em,eN]),(0,M.useEffect)(()=>{if(!eB||0===eB.length||!eL||0===eL.length)return;let e=eB.filter(e=>eL.includes(e));e.length>0&&eN.setFieldsValue({models:e}),ez(null)},[eB,eL,eN]),(0,M.useEffect)(()=>{if(!e0||!Z)return;let e=ef?.find(e=>e.project_id===e0);if(!e?.team_id||eJ?.team_id===e.team_id)return;let t=Z.find(t=>t.team_id===e.team_id)||null;t&&(eY(t),eN.setFieldValue("team_id",t.team_id))},[Z,e0,ef]);let tT=async e=>{if(!e)return void e9([]);tt(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let a=(await (0,X.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e9(a)}catch(e){console.error("Error fetching users:",e),Y.default.fromBackend("Failed to search for users")}finally{tt(!1)}},tI=(0,M.useCallback)((0,I.default)(e=>tT(e),300),[ec]);return(0,t.jsxs)("div",{children:[em&&E.rolesWithWriteAccess.includes(em)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eC(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eS,width:1e3,footer:null,onOk:tk,onCancel:tN,children:(0,t.jsxs)(j.Form,{form:eN,onFinish:tC,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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(k.Radio.Group,{onChange:e=>eD(e.target.value),value:eF,children:[(0,t.jsx)(k.Radio,{value:"you",children:"You"}),(0,t.jsx)(k.Radio,{value:"service_account",children:"Service Account"}),"Admin"===em&&(0,t.jsx)(k.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(k.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eF&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eF,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)(N.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tI(e)},onSelect:(e,t)=>{let a;return a=t.user,void eN.setFieldsValue({user_id:a.user_id})},options:e8,loading:te,allowClear:!0,style:{width:"100%"},notFoundContent:te?"Searching...":"No users found"}),(0,t.jsx)(v.Button,{onClick:()=>e4(!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"===eF&&(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)(N.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:t_,onChange:e=>tw(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tv.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)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(U.default,{organizations:eh,loading:ex,disabled:"Admin"!==em,onChange:e=>{eZ(e||null),eY(null),e1(null),eN.setFieldValue("team_id",void 0),eN.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eF,message:"Please select a team for the service account"}],help:"service_account"===eF?"required":"",children:(0,t.jsx)(V.default,{disabled:null!==e0,organizationId:eX,onTeamSelect:e=>{eY(e),e1(null),eN.setFieldValue("project_id",void 0),e?.organization_id?(eZ(e.organization_id),eN.setFieldValue("organization_id",e.organization_id)):e||(eZ(null),eN.setFieldValue("organization_id",void 0))}})}),ej&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(G.default,{projects:ef,teamId:eJ?.team_id,loading:ey||!Z,onChange:e=>{if(!e){e1(null),eY(null),eN.setFieldValue("team_id",void 0);return}e1(e)}})})]}),tS&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(f.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."})}),!tS&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eF||"another_user"===eF?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eF||"another_user"===eF?"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"===eF?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(y.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===ti||"read_only"===ti?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(N.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===ti||"read_only"===ti,onChange:e=>{e.includes("all-team-models")&&eN.setFieldsValue({models:["all-team-models"]})},children:[!e0&&(0,t.jsx)(el,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eL.map(e=>(0,t.jsx)(el,{value:e,children:(0,W.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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)(N.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tn(e),("management"===e||"read_only"===e)&&eN.setFieldsValue({models:[]})},children:[(0,t.jsx)(el,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(el,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(el,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tS&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.max_budget&&a>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ea.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(O.default,{onChange:e=>eN.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.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)(H.BudgetWindowsEditor,{value:tx,onChange:tf})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.tpm_limit&&a>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ea.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eN,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,a)=>{if(a&&e&&null!==e.rpm_limit&&a>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ea.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eN,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:eg?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!eg,placeholder:eg?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:eg?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!eg,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:ep?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eU.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:ep?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(N.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(L.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:ep?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)($.default,{onChange:e=>eN.setFieldValue("allowed_passthrough_routes",e),value:eN.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:ep?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ep,teamId:eJ?eJ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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)(es.default,{onChange:e=>eN.setFieldValue("allowed_vector_store_ids",e),value:eN.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(_.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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)(N.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:ew})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(Q.default,{onChange:e=>eN.setFieldValue("allowed_mcp_servers_and_groups",e),value:eN.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eJ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(_.Input,{type:"hidden"})}),(0,t.jsx)(j.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)(J.default,{accessToken:ec,selectedServers:eN.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:eN.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eN.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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)(A.default,{onChange:e=>eN.setFieldValue("allowed_agents_and_groups",e),value:eN.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),ep?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(B.default,{value:eW,onChange:eQ,premiumUser:!0,disabledCallbacks:tl,onDisabledCallbacksChange:tr})})})]}):(0,t.jsx)(T.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)(p.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)(B.default,{value:eW,onChange:eQ,premiumUser:!1,disabledCallbacks:tl,onDisabledCallbacksChange:tr})})})]})}),(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)(p.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)(K.default,{accessToken:ec||"",value:tg||void 0,onChange:th,modelData:eA.length>0?{data:eA.map(e=>({model_name:e}))}:void 0},ty)})})]},`router-settings-accordion-${ty}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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)(f.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)(R.default,{accessToken:ec,initialModelAliases:to,onAliasUpdate:td,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.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:eN,autoRotationEnabled:tc,onAutoRotationChange:tu,rotationInterval:tm,onRotationIntervalChange:tp,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(_.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:X.proxyBaseUrl?`${X.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)(F.default,{schemaComponent:"GenerateKeyRequest",form:eN,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...e_?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(v.Button,{htmlType:"submit",disabled:tS,style:{opacity:tS?.5:1},children:"Create Key"})})]})}),e2&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e2,onCancel:()=>e4(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:eu,accessToken:ec,teams:Z,possibleUIRoles:e5,onUserCreated:e=>{e6(e),eN.setFieldsValue({user_id:e}),e4(!1)},isEmbedded:!0})}),eT&&(0,t.jsx)(w.Modal,{open:eS,onOk:tk,onCancel:tN,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!=eT?(0,t.jsx)(et,{apiKey:eT}):(0,t.jsx)(f.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,er,"fetchUserModels",0,ei],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_buildManifest.js deleted file mode 100644 index d74e1661bb..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_buildManifest.js +++ /dev/null @@ -1,16 +0,0 @@ -self.__BUILD_MANIFEST = { - "__rewrites": { - "afterFiles": [], - "beforeFiles": [ - { - "source": "/litellm-asset-prefix/_next/:path+", - "destination": "/_next/:path+" - } - ], - "fallback": [] - }, - "sortedPages": [ - "/_app", - "/_error" - ] -};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_clientMiddlewareManifest.json b/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_clientMiddlewareManifest.json deleted file mode 100644 index 0637a088a0..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_clientMiddlewareManifest.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_ssgManifest.js deleted file mode 100644 index 5b3ff592fd..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/lw0pr129QWvsGxcNhZmh0/_ssgManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_buildManifest.js deleted file mode 100644 index d74e1661bb..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_buildManifest.js +++ /dev/null @@ -1,16 +0,0 @@ -self.__BUILD_MANIFEST = { - "__rewrites": { - "afterFiles": [], - "beforeFiles": [ - { - "source": "/litellm-asset-prefix/_next/:path+", - "destination": "/_next/:path+" - } - ], - "fallback": [] - }, - "sortedPages": [ - "/_app", - "/_error" - ] -};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_clientMiddlewareManifest.json b/litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_clientMiddlewareManifest.json deleted file mode 100644 index 0637a088a0..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_clientMiddlewareManifest.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_ssgManifest.js deleted file mode 100644 index 5b3ff592fd..0000000000 --- a/litellm/proxy/_experimental/out/_next/static/zxkD4-EPlgfKHDTw8O869/_ssgManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_not-found/index.html b/litellm/proxy/_experimental/out/_not-found.html similarity index 96% rename from litellm/proxy/_experimental/out/_not-found/index.html rename to litellm/proxy/_experimental/out/_not-found.html index a3e8dd80e8..7271449e12 100644 --- a/litellm/proxy/_experimental/out/_not-found/index.html +++ b/litellm/proxy/_experimental/out/_not-found.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/_not-found.txt b/litellm/proxy/_experimental/out/_not-found.txt index eb4013b00e..fa58adfb93 100644 --- a/litellm/proxy/_experimental/out/_not-found.txt +++ b/litellm/proxy/_experimental/out/_not-found.txt @@ -10,7 +10,7 @@ b:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li d:I[168027,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] e:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] 8:null diff --git a/litellm/proxy/_experimental/out/_not-found/__next._full.txt b/litellm/proxy/_experimental/out/_not-found/__next._full.txt index eb4013b00e..fa58adfb93 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._full.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._full.txt @@ -10,7 +10,7 @@ b:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li d:I[168027,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] e:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] 8:null diff --git a/litellm/proxy/_experimental/out/_not-found/__next._head.txt b/litellm/proxy/_experimental/out/_not-found/__next._head.txt index 34d932d6d5..c56c2bae66 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._head.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/_not-found/__next._index.txt b/litellm/proxy/_experimental/out/_not-found/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._index.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt b/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt index bf3c2c3f02..2fe32b876b 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt @@ -1,5 +1,5 @@ 1:"$Sreact.fragment" 2:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 3:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","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."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","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."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false} 4:null diff --git a/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt b/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/_not-found/__next._tree.txt b/litellm/proxy/_experimental/out/_not-found/__next._tree.txt index 9c9e6e22e0..ab39885924 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._tree.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._tree.txt @@ -1,3 +1,3 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/api-reference.html b/litellm/proxy/_experimental/out/api-reference.html new file mode 100644 index 0000000000..094421ffbd --- /dev/null +++ b/litellm/proxy/_experimental/out/api-reference.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/api-reference.txt b/litellm/proxy/_experimental/out/api-reference.txt index 322af719e2..e48db6551f 100644 --- a/litellm/proxy/_experimental/out/api-reference.txt +++ b/litellm/proxy/_experimental/out/api-reference.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +e:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt index a024f0dd51..64f70e8d57 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +3:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/api-reference/__next._full.txt b/litellm/proxy/_experimental/out/api-reference/__next._full.txt index 322af719e2..e48db6551f 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._full.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +e:I[191905,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/api-reference/__next._head.txt b/litellm/proxy/_experimental/out/api-reference/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._head.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/api-reference/__next._index.txt b/litellm/proxy/_experimental/out/api-reference/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._index.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/api-reference/__next._tree.txt b/litellm/proxy/_experimental/out/api-reference/__next._tree.txt index 5c091b7e11..dd3c678c4d 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._tree.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-reference","paramType":null,"paramKey":"api-reference","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-reference","paramType":null,"paramKey":"api-reference","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/api-reference/index.html b/litellm/proxy/_experimental/out/api-reference/index.html deleted file mode 100644 index eafed28d07..0000000000 --- a/litellm/proxy/_experimental/out/api-reference/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/assets/logos/qohash.jpg b/litellm/proxy/_experimental/out/assets/logos/qohash.jpg new file mode 100644 index 0000000000000000000000000000000000000000..50227ab3910ca8874f2e9ca744fbe03af1462a3b GIT binary patch literal 11581 zcmdtIc|4Tw|1W;qB4V;{$-ZUFUQEWmhU{CYWDlt@GK?i_mMDZ!*^(`?WXWV1LWu0L z%qSwuOflUt#<}Z#KA&^G=kfiX$9bId`2F)6<1udcHP?N;uIu%BzMik=bsfzdEdwV_ z4NVLIDk>_#82SN@<^jDwSN~71Kb`zPb@1oQNACbu2H-vLo`#AQpk}3_VWm3i1q1{eIl zMS?k$VltmGi0amNaaxZN#FVeyiapNA#m&RZCoUl=C4ELkRZacec?~^%14AQY6H^;o zJ9`I5CufiAo?hNQzJ9mwgoK76!|%r3i%&>QN>0go_$WIk_iIH7>BaW-zaJPJ|1>c>tDa7rUTIprWRwrJ<$&V;2>581zfSN=qlKc#KWQivDUayNFT@1BY(rv-+;%qRQ3; z&TF^E7`en$aN@*2rv0_-|ID!1|0~P>ZP@>?YYsR;Lj^4!4J&{EC=@B+DRnd>@c;b> z#r+6a?!XY-1$mBuE(Lfb0kd4Z3H`4)VTm7~mE zviR+Dj*@cfZl8K>AiJNO9B?ImM6&XANdanx-F1hck@5~~O09rH$=J(f+R7U{o z19X=T`r8ub`Vl~8C0ic>Yq{F=WJ8@JfR646D2Y0JcmxoPh-ODXkt=|9fG%`*KpE^b znbUt6k-B#TB)JI?5@RSD-y(HFacr?2A8i{~NghfQ&n!Rh+%XX%gOtZJ2ZfxP zi^rFJv8eyx5KVPZtW5`S0GFu#%MYrxBY=}40h%q3_PC!y*%KGbj%DIti4>kGxC5S9 z7q6ct^r_Kby3U(%T&Xh0iu)lWoBEK5!d>79;8OslDz?(_#q<57ci_;0DKaPGb-;=x z+d|j!md3V;QzL@f*JjukXD%+1WkT2Tu>9VeH!Z12B^|A;3}BIgbATA1; z_os;@hC>XT9*s|Pi$pB%^!?sF0^$)Iw(#=tDQ34_BV1urL`X>T5m3K3l%zK#k{J{b z9(>-@`0+>j{fRkO7kB4*x7kt7;j%9$7o0zLe-~4pALSc5F=kv^)h`=Zn_ik=PkV|F zsQ)i#$jyU??i-Np64;+m!#!MFp14e3hoxt!LjaM)GCP>=e}fl8gb z(T%U>!PwthyPKSb`7|Dakb(3p3YSLo247=w=}C=)I-XgCXOdpV^lO~|8V*`tkPuKu=HRwHOhX4* z(v#JQT#Yw6nJD97q$L>HGay(jc*b{8qSern0Zh?-?+91l$alGM=S0i5%bXXZVSDyQ zPMoeh8X8q4(sWLa)YYXo^{5#{V_6IUjsFckz*Yq*EccFp*hHtOL3F+AugxtSbCj#* z3T(^71C1+S*c6yLumB^1R6Dd3Cq592vu1c}w%IM4-n^GnedqY&b~NnA5%7KLe>?(H zwvnHnT)DnKk{NNk!mrJIuePk*kLy+kcc?l^xoo&>p>ga1(K0BQ*pz~I5)KQ8zcrnH zk4cF9@UXhiz-t(YYWlCE)~@qy^QY?CJ*L^L#gXnQ{Ev-r9@(4o&b>cJW$JO(=Q0bE zmjQDC{a}>LZAAK#OWKC!BLU@3+|Il^jbM&Cy`hYf1>Jcb4KN`ix?jI7qr8YV5z}l+ z3s9)dF%GS6zVGG8Wuq;azWc|G1&XQ&Kl|Dw<4}r3dON~mmB%uM*L8z*nwKbmEv;X7 z#%{;U-rSgK4!iMO+N&YUmff)0@fdUJZS7N@f1H7SPx=TrRvooyMHzN)Uf9`OTM@YE zj5>GtVw2sVLHVNfVh=tvwJ0cIZC30)W14fXo9}C5jt}E{o^0E+bkHdBYk9ZWc$PRHnwmfS@uJ3)}ObDSeD5!pawa@9wJuoINX8w z9sjE*BhHQfRqI5D15pyYFM02dijW*j&72Y?EVvNU<}~J5_e~YbO|U6)lo2k1}Om z6;OX1U)E;CuP7Fce*ATz2AeiHoc&qJWnuQSxqnE|nMXNH_rv+5ahWWP0~|^3H^S|$ zVIt8&5TI&U(jzgw7#P_JS9c0jcj)*Ccfv8>zDSfz*lRxyuUe3C9;*|^drRtg1D9t zJ&rP9{(y8yFxd%M+~UmE>sNZ8XK1aBF#7hNCU0t)WL#5hL_so_lpHQA{Oj#|={#1Y zS%#9)FH%1A?gIJHB1;|t;JFG4BfIxOSkz*Xa1+6>EG(E1x6D~M-HoBw{?tC>r?H*= z(yih?*)rgymc6POxZIdvyU;mpnKnrpGytNG{f!v3M=`5n9|MAgW6vcT*M0yzlMd}lfHNc-Q>zvw^VvJ+E?6d#qq1c0}n^`hv?qPu_!GA`41wrtw zAaiJ51bGj%!BLVTm{I-N1vDeYzj-x5;o(nS+T?TSO*=D3*x=GR_4^Wxb^Yf2%d=9> z+wY}Vex?HGlDGdt-T#>Eqo8qhg&_i;9UO!HxS%D6{G~l{r3oxvInW1P34=4kY;FQ* zEUt0>t@E7Zl^^mkWo8jo7ca3@`UU?yDMdq0k}UGiD{p<1W3nwTo)x~9H)rCN@1SHR z+i+e%EK5_lyqQZ1 zdQP3O-Lq^waheoTh!^8=MxNbc(TLdy%JH&;)5tIq=i&WMhNzK!@oK9LH!eb9+OIT) zoU;!%C~8yJ%=LQJr_CFc2U~9Qt1cAQJ3r;1`V|kL;qHW6iJRO32iMSDhz^GpG_&uq z9sKC#niz(SEEnwW=l%9AVXIWOQ(;WEH%%p3?MYRbpr)`|!+Cl*fXk=-X|kg5HNS$%`}!O+=9it zO(V;tDix)H8^UigG`(7~9E+tk8R!q-ly^r!lTjif05QwG?7k(68@eCno~%XvaW67( zkoS3xD}QhI$T^f=i5o-SJ%_uYl>);Z#8aFhqGdp2%zr{p*Z{Ey0IwJU5HPtA4Y}St z#2E@PLGu}N{iGjLohLwr-f3K68PPM6zhNfn!1w%o& zUAc#}`H?>|_7b8I`E7qt74{uLVgBRDNN38JdlM`P)!Hy zNw(^EsK(mI__&-;E;sLmDbIrjh6!8>M7wN1Qfc$Hjbv8%?;BP<^CQ)}`)W)TMwV{m zI53=M8rHOG&KV(1T|W=w#5Rs&MKTkNg!Z8E^FdEsih8FGFE%(+I|B0yxF{S%1?>>^H)uIKjItg|5%aDk~}Ou^MC9ip{X?$h{-iE8;b zUN_fN4hRk(EA|XNJ8+4C9^3>U_G)16qYUbhb?zMnR?{f+8owf;sV1gGU&+qNrh@f7 z0mC1@JUQWkf!kjBhS$uLvrHtS6@7rG%*8Co2q$77<~iuz(-zrRRfkNptslD+pf;|S zvw8$rPtFsvUiJ3%pkxiT8JL|ZFc(o7sFDVNNk zNPh4zXnWZ2CfC%|IVoE!X4N{9!4r3p;lmI|&d=XSmRnT&X@6Xfirfl;#3#%v*`>x` zo0k3udPqtAf=giDf&9V(n7*#^-A1dVimWk-dJNa|`OcSDe&6V^(aXLR*rT)%>Fz(g z_u8F5gyHnofg&o3n6cS(piLG#d*K zOfbnN2U^d{-NQ)^Ih$d6aQQ@tb?HOi_#X=%!By-LK<`aiJWd=UwGfIoGnR`_@?)qe z!+bY#wN#qwAFCCkiDp>)oUknMo*q%75cNbA`sOC>cLipJ*86N+wl|*&4v7EdF}t%+ zgtbL=)g4$<7Md~q+c0#QE-rKaLj2)3oICsU@v8VZF{*3|F{-I)x zTpwmuglG=+pm6(B*h)>G>gHc_ZdJajX?xXU zZ#AqUqr=I6v*7{y}Z zrgDEuAqW|+s@WN-yUgdyB1f9}I;PsXoei1JY_!NHf9?IMjcC35zwj{7hQerfa0Q7b zaUG^mG$~{I6CVrpx{4Sl@Pxnu*-G~BMH-V&Bh|a_!o~NSR$t%tYv4TL5p5<-EBq8j zECDDjdI)tff9FuUf~ATymcvo8bklHw?2P7HsTVBdYQWKfh*uOA->>O0%P9 zqyvH>AER5)w0JwY$0Q(Q-kkIE(nRf6wQPWp?$65$3m+c1bg@avj+?0@B|T+xg1~a` z3j{U-ly`gzWcFVqHqd{0pjscn9wq6^r{24CUp=+dQZl(|K~1yWTwZ$_?xFjscIB0i ziHyMe*12OV4`4I@Hk)FCUj7~gO4?!icV-j%Nn-@h)N!)mVg8+&O_UYg6A7b93eQG< zbC5*Nx!e!=0qiz!Q|_Rj^!vl}sLv$>f~!4$<7`iI)Ahgxxk6GnERSNNj4c9hiY|EI zMpGIWEcOR^FX~+;thYxaXbiDG`w9JIwsVu#=O(RK0b6}-PCMHx zXI@5gKq40v7OMB)2l$}gB}SAup=>D?=t~_&-TR@k4^lvN)f5^{cj(1moC~HuYKU2)Mx3wnO+3dgx`Ol!N;R4kb1N2c?8@; zAATfPQ6xlrMt>gxd1##A5pYLqgg|L8M;7aklXXfim#yYjJGm^)e3mqk+ZJUL7JZ@w zNeSTPvs>;ho-<^5|CsL8b7x*Qv-9f~iNrf@oe2>sjpXtqYCbw-IpW3FMon#`-sbH&LBSce?ZgeOqurQ(%3Sf`osROv8C2A}{nO?zyM|VpE?SJB-CF)D7SLUwYiY3 zRKF8G)Y0hcyZ=Zfe?3$19A(&s&XdyxTEOCBC5GuHQEK@P;QR?76aR+skXx5ki zD=lQb$k*F(M|J3TE%phU#g4+P3V2$ENi0;$uB=h<#2Em9KZnpci^ua#z6{c;G(Vh; z$3rJK%gIs9=jkn{h1eGYCe+c0DGv(s^5H$pO#`S@B7&$z@lPK0U?uUZT&Emadm%7$ zVa}*(z8Ex6aVl3V9hXap6H|8)KLViK3BQ8M6B2BH1hGqe7@0$F#h7T6dV|8TuC!)O zxZb_vi2R}{uUhq3krdA9SjA-QWK3W3MvPhp3|bfL`>s0jf{?=&*8Sxn=}kYcrfuJ3 z1^K+#Z}<8*`^~RE5lLE^9RY`xPd?({Vmt8z-dpuq_X=Nn_i8j#k<;AUP@S=HSnTbq}I-lH!(j@lVY*D?xFH3cooFLV0 zBTCTxJ<0=T2BH}vx@Qc|V zVMVo)t6t;OY!Ky0?9w{>QA-%9*}bSqs3G&!C3JY;4kdf%SjqxKhJqqX{X@_CX+%ya z313I9HN8pKhYG;6LYdkE7yey!QIQ4ET}w-ZOU$O4OYsSyzQ^A;fLivF%e+h9t1eo_r%b0V^(LS4d3r`9{t`s`u0_MYS{_(v#Q|Vkv8wwFNn-2z%L5*+{D1V@}?wirgU9BGf~ECVlYwnev&V^ zeR42RL#F*Q@!&uoNs6PkjXR9*C*XnL!=X4Ua1E6n`1jIs8Bq#rfwF{B+$6FSGK z+#`AT^{GJb`vsNB{nz~P{wD1$8V$GZl1yIIiDmp)Q~nTqzS$$~1Mzl<;<-(O%jUjX zud5^_-m>}042ZJ4VPT(x;4OK&__&q~XoDsF;A~2u$RQjuq9zKAC&bd3CLg|#;bT=7 zS{Yh7*16QvDOJ;b%Jq@AO6iIzPtsLl=G#XEWU^slh}>ieSH;T%$$4Zrmh+9?{aa7) zPx8x7=${4OFAh4w^-C<;a?(_JIzvJ_?h1aAC`S9gbe!E#Qx+qIO?_N&G3P&KaXQ9!k&Wra0H# znyPm#q3Jq5f~qAH-DXC#d;)854{kM5QIw8=7KhCme8x-_sTLeNP(#-8H?@NSD*|R0 z$7^@wzBEU=^xVEUttBue;&fa|r_xtx?lV^Db?M;2WYYPkuq>!dfq-zlpTevSIcm%X zx-n=o10OVNgqKV*tRym#Y>Q1_5ehcc{q~zH2ywmUcTvhG%p@e+nh9xNv)2;i5^^{1 z-u3xt?BOKDLUrizFVaqbA1XlwI*uPGp;*9Y#GiPt=WX6G6i%e36EOjE%Sk`W#n(Q| zQXuZM)-2^CS7L??)~n<8KIPy-4g?i%Jo8m^3X6~>FPQ9DPrDP4vs4Z zyxw6~UZl{A=OqCwrBG=y@twk43>kcP15qEesT@FL!b`*im7_ckOY64akyV=ARh7QQ zurIHga=Z9Ad+)ujQn6X^n^r`{MSg8FIStaBgniqFVw@ZXb&`p?%)LJnLwIP?9wcdO zHw`y@@E+CD-fC#ZWYT@Oa^h-*&rD&hRnh<_`RZ=o3TIN^SF&JS_3yL39zUhJ-8QT2 z%&&eM8A2MIf784<*Jebl8+S?NM0vS)^O%l*=_3s(*nnzY&$Q8yM(&UJP)=HK}hq<1j-?Ps6D1>D^{ zF8Pj^tLHg>+f+(Qk5V~X&ZtI)`>L#OFBVqke&a;z6@PrDE!g8g7WfL~(ESOrPB}{X zurrDuyzXX#J3xRA7yN=&S7i=U9AYump z3K$cRa42fIwV+OBA0>exf;eQ~IUxdiMutT!yQlJbrj|L_5+qXs#Orgyp9_@^A^ zYl+1ee;zJtJo8QRwzlA=FmCju4@H(hNycZumUJq=xrvP5ISewKsJUzsfG+pTsdt-M z=n}%=-ZbZ*_XzHhq1O0#Z1^AW7sO)70y_s03NcZ~Q7VVAWY(%@(@`o*{Y3f|+R!lR zHQ!D;f<;x?5@@4~F)sh<5yS?TU7gfd)_+NgIwiK9{#A*J68@J2309*C29`5kDlOpyL?7bK6^g$TY4utNHBGRq9MX*Km2!F#Zvn zHvIveqvPy)sM_7YLVvoP;)=QXnVH#n!&mdpPIJ8vTwHY6=!~Dm@{CKBXmhgK*#f{* zraM%9C|zQC0b!>rN|abst=;fZrM>ExZWn4@BrWx{$aX*FCM{&CMGUNyAo$rit4E8`UR~7K|X(8@OMM^|i>R!bHx^BaPdtB(+K+vgl)P2VRvEQMDd&%d&$Xkj{ z|Mu;5T2)9^?ikYSYsV{}vb(5X5;}QqfU^C_0EIsXwzr2T&wWTi+vS&>henThpXIPguT`0FP+|$e;e+rc>6phJ9`st zoHKoP(M2ch52Lt!;&#`WllI1CI%0tgVkZaR5&RF8%IrBSZE8$S?`(9d3X5%*9mkr= zsV=CD?$%~I+Lu{0NlSmKVwkx1uOf@|x8)pqSs~>J z@Z6b$;g5jL!xjHprW2@5hO6syoO?K*G`aPrFsTTBrSS zr@dSAnF1vAaQBmEIhbk~a?TfBcqcd>|5s$;CGz(#a)WluFn*LdvAHtfIZ_h`Z3BlK z0lZ*|V@J-pfIGu9J$GHF>Z;r?o5}Q_3U;2Evs8ZF_QLl3Rj9H#4pla^ht(Z62SHIY z=+hWqOZFw#%l$-l{IR#;I2oBNTOT)|{%x)WK`o9$Gf$Y$J$~!XP()hduj%{2w}pMZ zLWKnR{-z{!MFp7;Qd(($zdC%3xn^cLr`Jc}GKUo4EoC@GsA(b)pQ$QJI_xy7s+t8Mj!n$(bnRJ-KGWoQy#^cJ!2$guXf;2vBcZU+I zN;mo2zkc&gDTa+ff|OLGI1+2s^(Q;j7GAtOrLLUHhiZH=5b2g?ScqR!-#YI+r8sRa zxH5_6E$-|3E00m@ygw)U!01w>&-@j{)8d&R{0x{)@V6M>*`e!CLa_|s4t1`39_Tk` z8uDATU47H>l7zJ?7tP~%cAk@x48r=Dl0g~fd%gCgyd2#r*JNw|Ig3XQYJ61=fu^=K z+=x~43s#f_kRAIy8B}17|I;pA|6lDy$`W2qel9IDdC}TLG^iOPMMljj+aUDNPCvF5&Ft)y(L$6 zZ2L_^%##7RVF1mn@~55@Y(Nln5%Uf1GYS+&NkUNnT}tOZq8pYp7e|%=2TqN@^zG>` zQluU=pW1=XipJ6rFe!%dwZnHeYgmfC(Y(PNKd7lF9XE#sdKE31svivVnQBoN&w0M^Jg_eb3!s7f zZEjFe`WD#;oyp5+M$o@2imyJ-jIeg^4zpm721`KzA2#S}iH~z+XKuMu7ayH|%G}@- zkCmNnyfy%B9r6J^MD-+ICG{C&+|K@GZ_ASnI!t|`wA7QWg)cQ2LEOV*jq z4GkB6P{0PA-VkJu5(2CG=I*7B*7{95aE-Nd9bAZh(0?_s^_xhOV|Fyaz4-3LGCBwD z(#w-BjhCH=_YPV(Zn`=@Dv?BcCt3$TGY=q)TUi=}yUyE?-{3z$CvC8&3<|uF$tFVr zsa4jGT!LnC6HjjLPLjTsJ}<0((ps23dZF%#)}8+@#qPJ0&V%ie-NmVGOs=0z1QX#_ zN=URzMg+qHw^wE|eW{*K%WXfV#i;Awe>qD-zc)(vrth+NUu#5-z15JiQ@?z_QQixq z`6fQqC!x3E-5i&Uh9oQZr{myP<=Iy*($rX64c&I?SLnl<{4kntd@&Uay2QKb&pTK> z^j-Hpw5Q5WtfyslUq5xdj8m$;&%{LawYe)IA2BvFV0y+XEHx|3 z-z&cjt)lUGH0uZmtebV|5p2e6<`H{HoeyAoM`zy=W}MH=Rub09}nB z^FyKn9Ven?dXpPBFUak>4Gtfu50{Ynz%&7DZ!Y)TR!$~vL6I!HQYjWf_o;XP+9>mY zSGa@YxT@WQhTqm7s18;jbVAD@2-bC=T9qr5OCCi{xoIB0h!T$aJhv3j-K*9n5x2aQ zNOC_Ww^u0n?lcQwyMQjC0Jo(^S;HHYEHqBbMAmGyJRkYs?(f`O658B6HYCuYEl7** z<)m;yC#}fS(2i4=?-KdvHz@rj$&lra0Hfc~$Z@fsFu&LS9M(GN0J=~zenN-Cdgv<9 zKS!U!KD&dW8RU~oxLh)u^$vb5xw=#OGx-jfOf(dL8OQbAt&6=u=10WC6-t{XhZp0@ z=5%Vo_%G)EmvTmStXlowLxPl-v;KpZ$xP8vn-Dsk)+CPNqAG}q@Az_~H{ni__vH3+ zQ!ZFuN;KDaG|k0;`&!Q$*@?B*jHMpLe&+enu5}|Lb!CJT8(a*#hD5`jm`PNm-AtEZ zw`AI@oan(;n#Lwhon1F9t5N$Z)3?#z7re%F?afeP{rO{p>N%E{{8C1oNeTSll`9kP zTi9|$b_y7(%K5fPOA4H~9EIp}$k*IMF8(^Q=<_3BH5OBZz}uZY0(PD4p*avk{QiQz z03B_szH|gUAFQMBLR%4|(Bvh$Iibg{wjBZ88VVF2sUslSw&w^K^L04_PCS4#(g*1O z|9*vP0AdB0rsQ#BisGVJW<#3>QcL{K9pUWk#3UVid!Ul`q_${&@V<;yYKauF2018a zs^lcgp8BxOw|a2Byf%MQvHx3>sZwf5Ur32mlhnX^xyW2 z6FU^2eY@LNe~5Xpt`SfZKhhAO)jJpG-21BLL(Y;<+mA1I4CHCInXa#5DjRNa$;c1B z;yK}^e4xjEugAJ)vhP6f3Q_)%EvJ(;DLdR#ELVw?=5Dk9P_hf(uvteF)8~O`R6KW4 zRrbQ=pn4MQB6Hj(J)J=NF2N`t z9hP2`+VL4IzRu|MMgetPT1M&?+#K&JHGBhZ8^n+8$0T)aG1fFq+89jCc_!om2Bti0?)ZgIjfHJGmVJ#Yu zm_h%XcnX^u1;r%ECmnj12qqcnTFPKC&V63g7OY>+NLpkl=sv9ux>TaX?|09IR)zVa z11drPUQ$~PrdPo8#vX>{Gd4Vcw!zoIS1Y%AW9nl4gLiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/chat.txt b/litellm/proxy/_experimental/out/chat.txt index 0958fa472a..31909f13f2 100644 --- a/litellm/proxy/_experimental/out/chat.txt +++ b/litellm/proxy/_experimental/out/chat.txt @@ -4,7 +4,7 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[321443,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js"],"default"] +7:I[321443,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/82a3cc31a8cf4b5f.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","chat"],"q":"","i":false,"f":[[["",{"children":["chat",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","chat"],"q":"","i":false,"f":[[["",{"children":["chat",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/82a3cc31a8cf4b5f.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/chat/__next._full.txt b/litellm/proxy/_experimental/out/chat/__next._full.txt index 0958fa472a..31909f13f2 100644 --- a/litellm/proxy/_experimental/out/chat/__next._full.txt +++ b/litellm/proxy/_experimental/out/chat/__next._full.txt @@ -4,7 +4,7 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[321443,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js"],"default"] +7:I[321443,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/82a3cc31a8cf4b5f.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","chat"],"q":"","i":false,"f":[[["",{"children":["chat",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","chat"],"q":"","i":false,"f":[[["",{"children":["chat",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/82a3cc31a8cf4b5f.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/chat/__next._head.txt b/litellm/proxy/_experimental/out/chat/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/chat/__next._head.txt +++ b/litellm/proxy/_experimental/out/chat/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/chat/__next._index.txt b/litellm/proxy/_experimental/out/chat/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/chat/__next._index.txt +++ b/litellm/proxy/_experimental/out/chat/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/chat/__next._tree.txt b/litellm/proxy/_experimental/out/chat/__next._tree.txt index c9219f0c13..41901b31bb 100644 --- a/litellm/proxy/_experimental/out/chat/__next._tree.txt +++ b/litellm/proxy/_experimental/out/chat/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"chat","paramType":null,"paramKey":"chat","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"chat","paramType":null,"paramKey":"chat","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/chat/__next.chat.__PAGE__.txt b/litellm/proxy/_experimental/out/chat/__next.chat.__PAGE__.txt index 264e6ffa5f..5fc70e3351 100644 --- a/litellm/proxy/_experimental/out/chat/__next.chat.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/chat/__next.chat.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[321443,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js"],"default"] +3:I[321443,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/82a3cc31a8cf4b5f.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1abfc2f35c701cc.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cf9c81fc7166f4d4.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/82a3cc31a8cf4b5f.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/119ecee91f911bc8.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/89aa55578de861b7.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/chat/__next.chat.txt b/litellm/proxy/_experimental/out/chat/__next.chat.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/chat/__next.chat.txt +++ b/litellm/proxy/_experimental/out/chat/__next.chat.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground.html b/litellm/proxy/_experimental/out/experimental/api-playground.html new file mode 100644 index 0000000000..b8d0446ae0 --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/api-playground.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/api-playground.txt b/litellm/proxy/_experimental/out/experimental/api-playground.txt index e8b0d957fc..ab91b4a169 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] +f:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt index 5648c8ddca..1795db0dac 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] +3:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt index e8b0d957fc..ab91b4a169 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] +f:I[715288,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt index 97224d7836..25cae0c7db 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-playground","paramType":null,"paramKey":"api-playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-playground","paramType":null,"paramKey":"api-playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/index.html b/litellm/proxy/_experimental/out/experimental/api-playground/index.html deleted file mode 100644 index 7e6e4ccf26..0000000000 --- a/litellm/proxy/_experimental/out/experimental/api-playground/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/budgets.html b/litellm/proxy/_experimental/out/experimental/budgets.html new file mode 100644 index 0000000000..df6772e292 --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/budgets.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/budgets.txt b/litellm/proxy/_experimental/out/experimental/budgets.txt index c6a83a1663..dd7ba2bca7 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +f:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/426f2755d11d3697.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/426f2755d11d3697.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt index 82feeffdad..63532afeb9 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +3:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/426f2755d11d3697.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/426f2755d11d3697.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt index c6a83a1663..dd7ba2bca7 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +f:I[267167,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/426f2755d11d3697.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/8908525d8a1d1a33.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/426f2755d11d3697.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/aac7c99aa647e49d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt index 9baf2d01d9..334fdc0f28 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"budgets","paramType":null,"paramKey":"budgets","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"budgets","paramType":null,"paramKey":"budgets","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/index.html b/litellm/proxy/_experimental/out/experimental/budgets/index.html deleted file mode 100644 index 8268cb14da..0000000000 --- a/litellm/proxy/_experimental/out/experimental/budgets/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/caching.html b/litellm/proxy/_experimental/out/experimental/caching.html new file mode 100644 index 0000000000..b156efaca2 --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/caching.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/caching.txt b/litellm/proxy/_experimental/out/experimental/caching.txt index aff3811698..9c765c1f81 100644 --- a/litellm/proxy/_experimental/out/experimental/caching.txt +++ b/litellm/proxy/_experimental/out/experimental/caching.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] +f:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt index be57c7b988..b362fd1ff4 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] +3:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt index aff3811698..9c765c1f81 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] +f:I[891881,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/1e1da84ff36bc348.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt index eec08e5f5c..ceecc99c53 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"caching","paramType":null,"paramKey":"caching","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"caching","paramType":null,"paramKey":"caching","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/caching/index.html b/litellm/proxy/_experimental/out/experimental/caching/index.html deleted file mode 100644 index 1f6fd19f6b..0000000000 --- a/litellm/proxy/_experimental/out/experimental/caching/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins.html b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.html new file mode 100644 index 0000000000..56353cec7f --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt index 1a0d75faef..4eef212abf 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] +f:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt index 63225e7764..8355f92b1f 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] +3:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt index 1a0d75faef..4eef212abf 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] +f:I[883109,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/8c4d9ca78c194144.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt index 271ce874f0..e23659e2aa 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"claude-code-plugins","paramType":null,"paramKey":"claude-code-plugins","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"claude-code-plugins","paramType":null,"paramKey":"claude-code-plugins","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.html b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.html deleted file mode 100644 index 88b24643af..0000000000 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/old-usage.html b/litellm/proxy/_experimental/out/experimental/old-usage.html new file mode 100644 index 0000000000..20a469c86f --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/old-usage.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/old-usage.txt b/litellm/proxy/_experimental/out/experimental/old-usage.txt index 835500182c..e7b0cbee45 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] +f:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt index c7de0d0838..4c9dbd42e2 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] +3:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt index 835500182c..e7b0cbee45 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] +f:I[999333,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c5b9f85e6738bf6f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/f62432147248db5e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/568d74e159313220.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt index 5ce3bc97b5..c327f97158 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"old-usage","paramType":null,"paramKey":"old-usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"old-usage","paramType":null,"paramKey":"old-usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/index.html b/litellm/proxy/_experimental/out/experimental/old-usage/index.html deleted file mode 100644 index 25bcc72777..0000000000 --- a/litellm/proxy/_experimental/out/experimental/old-usage/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/prompts.html b/litellm/proxy/_experimental/out/experimental/prompts.html new file mode 100644 index 0000000000..9c7cd93e6e --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/prompts.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/prompts.txt b/litellm/proxy/_experimental/out/experimental/prompts.txt index 2fe32d4770..2c60e2220f 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] +f:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c3c84f2fc1b1e9db.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c3c84f2fc1b1e9db.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt index ec08482e5a..b37c951297 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] +3:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c3c84f2fc1b1e9db.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c3c84f2fc1b1e9db.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt index 2fe32d4770..2c60e2220f 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] +f:I[675879,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c3c84f2fc1b1e9db.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e000783224957b5f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/980f4b2cf05dae8e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c3c84f2fc1b1e9db.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt index 8fa48d923d..1ac59aac01 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"prompts","paramType":null,"paramKey":"prompts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"prompts","paramType":null,"paramKey":"prompts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/index.html b/litellm/proxy/_experimental/out/experimental/prompts/index.html deleted file mode 100644 index c66ad265fb..0000000000 --- a/litellm/proxy/_experimental/out/experimental/prompts/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/tag-management.html b/litellm/proxy/_experimental/out/experimental/tag-management.html new file mode 100644 index 0000000000..337f7d5fc0 --- /dev/null +++ b/litellm/proxy/_experimental/out/experimental/tag-management.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/tag-management.txt b/litellm/proxy/_experimental/out/experimental/tag-management.txt index 053cb2a9e5..55a29d07ba 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] +f:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt index e3518cd46e..26b7d8735c 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] +3:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt index 053cb2a9e5..55a29d07ba 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] +f:I[954210,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/79080debc00288de.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/d11611f992bddf33.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt index 3e610f1ac1..1633565f06 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"tag-management","paramType":null,"paramKey":"tag-management","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"tag-management","paramType":null,"paramKey":"tag-management","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/index.html b/litellm/proxy/_experimental/out/experimental/tag-management/index.html deleted file mode 100644 index 9e94806796..0000000000 --- a/litellm/proxy/_experimental/out/experimental/tag-management/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/guardrails.html b/litellm/proxy/_experimental/out/guardrails.html new file mode 100644 index 0000000000..54617ab4dc --- /dev/null +++ b/litellm/proxy/_experimental/out/guardrails.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/guardrails.txt b/litellm/proxy/_experimental/out/guardrails.txt index e80fae1338..a44b321472 100644 --- a/litellm/proxy/_experimental/out/guardrails.txt +++ b/litellm/proxy/_experimental/out/guardrails.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +d:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/171a03c36a999407.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/171a03c36a999407.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt index 7f5073f9e2..8e5bf1468f 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +3:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/171a03c36a999407.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/171a03c36a999407.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/guardrails/__next._full.txt b/litellm/proxy/_experimental/out/guardrails/__next._full.txt index e80fae1338..a44b321472 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._full.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +d:I[509345,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/171a03c36a999407.js","/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/18a5548f64cd2f73.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/703b445810a4c51f.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/171a03c36a999407.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9ce7fbf2fad5f6f4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/guardrails/__next._head.txt b/litellm/proxy/_experimental/out/guardrails/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._head.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/guardrails/__next._index.txt b/litellm/proxy/_experimental/out/guardrails/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._index.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/guardrails/__next._tree.txt b/litellm/proxy/_experimental/out/guardrails/__next._tree.txt index 7af2d90b22..e67aaa4beb 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._tree.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"guardrails","paramType":null,"paramKey":"guardrails","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"guardrails","paramType":null,"paramKey":"guardrails","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/guardrails/index.html b/litellm/proxy/_experimental/out/guardrails/index.html deleted file mode 100644 index 14d1de44b5..0000000000 --- a/litellm/proxy/_experimental/out/guardrails/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/index.html b/litellm/proxy/_experimental/out/index.html index 3ac492fc95..ec4bf8845f 100644 --- a/litellm/proxy/_experimental/out/index.html +++ b/litellm/proxy/_experimental/out/index.html @@ -1 +1 @@ -LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file +LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/index.txt b/litellm/proxy/_experimental/out/index.txt index ce6e57a795..1e2df6be8a 100644 --- a/litellm/proxy/_experimental/out/index.txt +++ b/litellm/proxy/_experimental/out/index.txt @@ -4,52 +4,52 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js"],"default"] +7:I[952683,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","/litellm-asset-prefix/_next/static/chunks/e9906ef85805c46e.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/907d812b2431487b.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3e917c79aadd945b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/9bbebdeb3f1cb03f.js","/litellm-asset-prefix/_next/static/chunks/8c17e934bd227606.js","/litellm-asset-prefix/_next/static/chunks/0dbc6df9aa2513ad.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/5f2d62a75803a3f7.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/c7110a3f717e0317.js","/litellm-asset-prefix/_next/static/chunks/fb125648f2dae104.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/94f7208f5087e27c.js","/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","/litellm-asset-prefix/_next/static/chunks/5da3aa6d4034aceb.js"],"default"] 2f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/d705b57c88e51101.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cbab30fb3f911abc.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/8c6f8ac32c75a373.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c"],"$L2d"]}],{},null,false,false]},null,false,false],"$L2e",false]],"m":"$undefined","G":["$2f",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/83b7a29872dd94fb.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e9906ef85805c46e.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/738efbc0d941f9d2.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c0b640cc12a2b90e.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/35e1b31334447d6e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/907d812b2431487b.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c"],"$L2d"]}],{},null,false,false]},null,false,false],"$L2e",false]],"m":"$undefined","G":["$2f",[]],"S":true} 30:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 31:"$Sreact.suspense" 33:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 35:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/47a838c67cdd745e.js","async":true,"nonce":"$undefined"}] +a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}] c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true,"nonce":"$undefined"}] d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true,"nonce":"$undefined"}] -e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/7149faf92f484aca.js","async":true,"nonce":"$undefined"}] +e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","async":true,"nonce":"$undefined"}] f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}] 10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true,"nonce":"$undefined"}] 11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","async":true,"nonce":"$undefined"}] -12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/4b8dcb3ad5dfb8de.js","async":true,"nonce":"$undefined"}] +12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","async":true,"nonce":"$undefined"}] 13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/ac3cf77acb5bf234.js","async":true,"nonce":"$undefined"}] 14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/ddcd1fd842a79e55.js","async":true,"nonce":"$undefined"}] 15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] -16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/ccda7c12f9795cba.js","async":true,"nonce":"$undefined"}] +16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/3e917c79aadd945b.js","async":true,"nonce":"$undefined"}] 17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] 18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/052aaa8d01e02cd3.js","async":true,"nonce":"$undefined"}] 19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] -1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/29eca5447bef7f55.js","async":true,"nonce":"$undefined"}] -1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/38db69571fd2ddd2.js","async":true,"nonce":"$undefined"}] -1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/f27456ba72075ad9.js","async":true,"nonce":"$undefined"}] +1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/9bbebdeb3f1cb03f.js","async":true,"nonce":"$undefined"}] +1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/8c17e934bd227606.js","async":true,"nonce":"$undefined"}] +1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbc6df9aa2513ad.js","async":true,"nonce":"$undefined"}] 1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] -1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] +1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/5f2d62a75803a3f7.js","async":true,"nonce":"$undefined"}] 1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}] 20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/341e7c75250f4f40.js","async":true,"nonce":"$undefined"}] -21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}] +21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js","async":true,"nonce":"$undefined"}] 22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}] 23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true,"nonce":"$undefined"}] -24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/50d8a95e62930b35.js","async":true,"nonce":"$undefined"}] -25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/ca91b0fa4d619698.js","async":true,"nonce":"$undefined"}] +24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/c7110a3f717e0317.js","async":true,"nonce":"$undefined"}] +25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/fb125648f2dae104.js","async":true,"nonce":"$undefined"}] 26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] 27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] -28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/d57a01eeb0a140e9.js","async":true,"nonce":"$undefined"}] -29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}] +28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/94f7208f5087e27c.js","async":true,"nonce":"$undefined"}] +29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","async":true,"nonce":"$undefined"}] 2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}] 2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true,"nonce":"$undefined"}] -2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/432e162c2ee31f73.js","async":true,"nonce":"$undefined"}] +2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/5da3aa6d4034aceb.js","async":true,"nonce":"$undefined"}] 2d:["$","$L30",null,{"children":["$","$31",null,{"name":"Next.MetadataOutlet","children":"$@32"}]}] 2e:["$","$1","h",{"children":[null,["$","$L33",null,{"children":"$L34"}],["$","div",null,{"hidden":true,"children":["$","$L35",null,{"children":["$","$31",null,{"name":"Next.Metadata","children":"$L36"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:{} diff --git a/litellm/proxy/_experimental/out/login/index.html b/litellm/proxy/_experimental/out/login.html similarity index 87% rename from litellm/proxy/_experimental/out/login/index.html rename to litellm/proxy/_experimental/out/login.html index 03ac99b420..0cc721845b 100644 --- a/litellm/proxy/_experimental/out/login/index.html +++ b/litellm/proxy/_experimental/out/login.html @@ -1 +1 @@ -LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file +LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/login.txt b/litellm/proxy/_experimental/out/login.txt index f37dae0d07..ad676a8c2c 100644 --- a/litellm/proxy/_experimental/out/login.txt +++ b/litellm/proxy/_experimental/out/login.txt @@ -4,7 +4,7 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[594542,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js"],"default"] +7:I[594542,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/570d770996d98e0f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/570d770996d98e0f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/login/__next._full.txt b/litellm/proxy/_experimental/out/login/__next._full.txt index f37dae0d07..ad676a8c2c 100644 --- a/litellm/proxy/_experimental/out/login/__next._full.txt +++ b/litellm/proxy/_experimental/out/login/__next._full.txt @@ -4,7 +4,7 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[594542,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js"],"default"] +7:I[594542,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/570d770996d98e0f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/570d770996d98e0f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/login/__next._head.txt b/litellm/proxy/_experimental/out/login/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/login/__next._head.txt +++ b/litellm/proxy/_experimental/out/login/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/login/__next._index.txt b/litellm/proxy/_experimental/out/login/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/login/__next._index.txt +++ b/litellm/proxy/_experimental/out/login/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/login/__next._tree.txt b/litellm/proxy/_experimental/out/login/__next._tree.txt index b4f68c41b5..c6435d527f 100644 --- a/litellm/proxy/_experimental/out/login/__next._tree.txt +++ b/litellm/proxy/_experimental/out/login/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"login","paramType":null,"paramKey":"login","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"login","paramType":null,"paramKey":"login","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/login/__next.login.__PAGE__.txt b/litellm/proxy/_experimental/out/login/__next.login.__PAGE__.txt index e87a73fd92..e241377736 100644 --- a/litellm/proxy/_experimental/out/login/__next.login.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/login/__next.login.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[594542,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js"],"default"] +3:I[594542,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/570d770996d98e0f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6392214b899e5c07.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/570d770996d98e0f.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/22f83f649bef2adf.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/fcad393dcc862a21.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/login/__next.login.txt b/litellm/proxy/_experimental/out/login/__next.login.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/login/__next.login.txt +++ b/litellm/proxy/_experimental/out/login/__next.login.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs.html b/litellm/proxy/_experimental/out/logs.html new file mode 100644 index 0000000000..b6562c616e --- /dev/null +++ b/litellm/proxy/_experimental/out/logs.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/logs.txt b/litellm/proxy/_experimental/out/logs.txt index f90cf1a062..e3fd99afe1 100644 --- a/litellm/proxy/_experimental/out/logs.txt +++ b/litellm/proxy/_experimental/out/logs.txt @@ -4,20 +4,20 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +d:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/f520a8d0cb8aca9e.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/17816faaae727f81.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/673491d4036a0cfe.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/b533b97d3f73eba2.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/f520a8d0cb8aca9e.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/17816faaae727f81.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/673491d4036a0cfe.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/b533b97d3f73eba2.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt index 467de592b3..7d5e7dfb4f 100644 --- a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +3:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/f520a8d0cb8aca9e.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/17816faaae727f81.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/673491d4036a0cfe.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/b533b97d3f73eba2.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/f520a8d0cb8aca9e.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/17816faaae727f81.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/673491d4036a0cfe.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/b533b97d3f73eba2.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.txt b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.txt +++ b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/logs/__next._full.txt b/litellm/proxy/_experimental/out/logs/__next._full.txt index f90cf1a062..e3fd99afe1 100644 --- a/litellm/proxy/_experimental/out/logs/__next._full.txt +++ b/litellm/proxy/_experimental/out/logs/__next._full.txt @@ -4,20 +4,20 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +d:I[799062,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/f520a8d0cb8aca9e.js","/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/17816faaae727f81.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/673491d4036a0cfe.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/b533b97d3f73eba2.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e79e33b8b366ae69.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/656330759aeeb883.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9b19f9f63c383201.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7736882a2e4e2f73.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/f520a8d0cb8aca9e.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/f48aa7c7bdc85371.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a9d351f6a8fa66f1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a766b162f45f2229.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/17816faaae727f81.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/673491d4036a0cfe.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/b533b97d3f73eba2.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/logs/__next._head.txt b/litellm/proxy/_experimental/out/logs/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/logs/__next._head.txt +++ b/litellm/proxy/_experimental/out/logs/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs/__next._index.txt b/litellm/proxy/_experimental/out/logs/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/logs/__next._index.txt +++ b/litellm/proxy/_experimental/out/logs/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs/__next._tree.txt b/litellm/proxy/_experimental/out/logs/__next._tree.txt index d691aaa8b9..3c9f56b05a 100644 --- a/litellm/proxy/_experimental/out/logs/__next._tree.txt +++ b/litellm/proxy/_experimental/out/logs/__next._tree.txt @@ -2,4 +2,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"logs","paramType":null,"paramKey":"logs","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"logs","paramType":null,"paramKey":"logs","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/logs/index.html b/litellm/proxy/_experimental/out/logs/index.html deleted file mode 100644 index 2a821f6095..0000000000 --- a/litellm/proxy/_experimental/out/logs/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/index.html b/litellm/proxy/_experimental/out/mcp/oauth/callback.html similarity index 95% rename from litellm/proxy/_experimental/out/mcp/oauth/callback/index.html rename to litellm/proxy/_experimental/out/mcp/oauth/callback.html index e4bf0671b1..0b3ffb895e 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/index.html +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback.txt index ee0847db50..273bb3f739 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback.txt @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt index ee0847db50..273bb3f739 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt index a40f7f5316..7daa9b52de 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp","paramType":null,"paramKey":"mcp","hasRuntimePrefetch":false,"slots":{"children":{"name":"oauth","paramType":null,"paramKey":"oauth","hasRuntimePrefetch":false,"slots":{"children":{"name":"callback","paramType":null,"paramKey":"callback","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp","paramType":null,"paramKey":"mcp","hasRuntimePrefetch":false,"slots":{"children":{"name":"oauth","paramType":null,"paramKey":"oauth","hasRuntimePrefetch":false,"slots":{"children":{"name":"callback","paramType":null,"paramKey":"callback","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt index 7ae3166f84..72e7d9bb1e 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt @@ -3,7 +3,7 @@ 3:I[346328,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b6c1a99750c8786e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub.html b/litellm/proxy/_experimental/out/model-hub.html new file mode 100644 index 0000000000..1f1c7bff02 --- /dev/null +++ b/litellm/proxy/_experimental/out/model-hub.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/model-hub.txt b/litellm/proxy/_experimental/out/model-hub.txt index 469e859050..ae95e2416a 100644 --- a/litellm/proxy/_experimental/out/model-hub.txt +++ b/litellm/proxy/_experimental/out/model-hub.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +d:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt index c03265c707..71c2dd275a 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +3:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/model-hub/__next._full.txt b/litellm/proxy/_experimental/out/model-hub/__next._full.txt index 469e859050..ae95e2416a 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._full.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +d:I[195529,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/95bd09d7d0345fe5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/b83ca9892d2d63cf.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/e0371069bf08d367.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/4dfbb7412144f148.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/model-hub/__next._head.txt b/litellm/proxy/_experimental/out/model-hub/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._head.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub/__next._index.txt b/litellm/proxy/_experimental/out/model-hub/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._index.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub/__next._tree.txt b/litellm/proxy/_experimental/out/model-hub/__next._tree.txt index 6a35dc3c4e..92e5f9929c 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._tree.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"model-hub","paramType":null,"paramKey":"model-hub","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"model-hub","paramType":null,"paramKey":"model-hub","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/model-hub/index.html b/litellm/proxy/_experimental/out/model-hub/index.html deleted file mode 100644 index 692fdb42fa..0000000000 --- a/litellm/proxy/_experimental/out/model-hub/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/model_hub/index.html b/litellm/proxy/_experimental/out/model_hub.html similarity index 91% rename from litellm/proxy/_experimental/out/model_hub/index.html rename to litellm/proxy/_experimental/out/model_hub.html index 5ce9435f99..7c2b84e7df 100644 --- a/litellm/proxy/_experimental/out/model_hub/index.html +++ b/litellm/proxy/_experimental/out/model_hub.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/model_hub.txt b/litellm/proxy/_experimental/out/model_hub.txt index 8a40bb763e..272d2a57ce 100644 --- a/litellm/proxy/_experimental/out/model_hub.txt +++ b/litellm/proxy/_experimental/out/model_hub.txt @@ -4,7 +4,7 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] +7:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/92516c9f878f0819.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -12,7 +12,7 @@ d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],"$Lf","$L10"]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92516c9f878f0819.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],"$Lf","$L10"]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] f:["$","div",null,{"hidden":true,"children":["$","$L12",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L13"}]}]}] 10:["$","meta",null,{"name":"next-size-adjust","content":""}] diff --git a/litellm/proxy/_experimental/out/model_hub/__next._full.txt b/litellm/proxy/_experimental/out/model_hub/__next._full.txt index 8a40bb763e..272d2a57ce 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._full.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._full.txt @@ -4,7 +4,7 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] +7:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/92516c9f878f0819.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -12,7 +12,7 @@ d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],"$Lf","$L10"]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92516c9f878f0819.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],"$Lf","$L10"]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] f:["$","div",null,{"hidden":true,"children":["$","$L12",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L13"}]}]}] 10:["$","meta",null,{"name":"next-size-adjust","content":""}] diff --git a/litellm/proxy/_experimental/out/model_hub/__next._head.txt b/litellm/proxy/_experimental/out/model_hub/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._head.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub/__next._index.txt b/litellm/proxy/_experimental/out/model_hub/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._index.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub/__next._tree.txt b/litellm/proxy/_experimental/out/model_hub/__next._tree.txt index 1e6fe9eb4c..ef83e7ba5b 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._tree.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub","paramType":null,"paramKey":"model_hub","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub","paramType":null,"paramKey":"model_hub","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__PAGE__.txt b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__PAGE__.txt index 62dede6e1c..bf66535b52 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] +3:I[560280,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","/litellm-asset-prefix/_next/static/chunks/92516c9f878f0819.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/58170e1c551aede4.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/5282ed7355826608.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/43a9809839de4e6f.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/92516c9f878f0819.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3003a112e50662f4.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/9ddd2809961d4f8c.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub_table/index.html b/litellm/proxy/_experimental/out/model_hub_table.html similarity index 91% rename from litellm/proxy/_experimental/out/model_hub_table/index.html rename to litellm/proxy/_experimental/out/model_hub_table.html index 4e8d3e2f2f..eb977ce670 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/index.html +++ b/litellm/proxy/_experimental/out/model_hub_table.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/model_hub_table.txt b/litellm/proxy/_experimental/out/model_hub_table.txt index 91d5b18df0..a6adf7ae39 100644 --- a/litellm/proxy/_experimental/out/model_hub_table.txt +++ b/litellm/proxy/_experimental/out/model_hub_table.txt @@ -4,17 +4,17 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] +7:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/9fbdf10b9cf445d9.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9fbdf10b9cf445d9.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -a:["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true,"nonce":"$undefined"}] +a:["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","async":true,"nonce":"$undefined"}] b:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","async":true,"nonce":"$undefined"}] c:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}] d:["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}] diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt index 91d5b18df0..a6adf7ae39 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt @@ -4,17 +4,17 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] +7:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/9fbdf10b9cf445d9.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9fbdf10b9cf445d9.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -a:["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true,"nonce":"$undefined"}] +a:["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","async":true,"nonce":"$undefined"}] b:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","async":true,"nonce":"$undefined"}] c:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}] d:["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}] diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt index a8031c66a6..51427d172a 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub_table","paramType":null,"paramKey":"model_hub_table","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub_table","paramType":null,"paramKey":"model_hub_table","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__PAGE__.txt b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__PAGE__.txt index 682b8ffbb3..a07b129700 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] +3:I[86408,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/9fbdf10b9cf445d9.js","/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eabd1c9341cacb49.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7c36bfe1ba5e3ba8.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9fbdf10b9cf445d9.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e77ff93ed9180690.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0bcb5f632525f5f8.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/46d42331373d9805.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9bb2d8f2de5a0c01.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/0c3e8651e0e97232.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/05b999e05913f877.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints.html b/litellm/proxy/_experimental/out/models-and-endpoints.html new file mode 100644 index 0000000000..abc22f9456 --- /dev/null +++ b/litellm/proxy/_experimental/out/models-and-endpoints.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/models-and-endpoints.txt b/litellm/proxy/_experimental/out/models-and-endpoints.txt index 3731a8b43d..34e6ed5ece 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints.txt @@ -4,20 +4,20 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js"],"default"] +e:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/4142aa9f47c16185.js","/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/276409aa6cbc14db.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4142aa9f47c16185.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/276409aa6cbc14db.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt index f993e06b91..9f042d871e 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js"],"default"] +3:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/4142aa9f47c16185.js","/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/276409aa6cbc14db.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4142aa9f47c16185.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/276409aa6cbc14db.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt index 3731a8b43d..34e6ed5ece 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt @@ -4,20 +4,20 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js"],"default"] +e:I[664307,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","/litellm-asset-prefix/_next/static/chunks/4142aa9f47c16185.js","/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/276409aa6cbc14db.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/cc5fe661d375c3b5.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/fba48608afe1d559.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4f6e5b838f18b8e6.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bfbc736ab510b9aa.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/f4cb209365e2229d.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/1a9ab640dd574eca.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4142aa9f47c16185.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/9b3228c4ea02711c.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/276409aa6cbc14db.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/5ca32057c3affe38.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/98c440d12846fe99.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt index 0a26ae8292..6b4a5f276a 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"models-and-endpoints","paramType":null,"paramKey":"models-and-endpoints","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"models-and-endpoints","paramType":null,"paramKey":"models-and-endpoints","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/index.html b/litellm/proxy/_experimental/out/models-and-endpoints/index.html deleted file mode 100644 index 3fcc719d88..0000000000 --- a/litellm/proxy/_experimental/out/models-and-endpoints/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/onboarding/index.html b/litellm/proxy/_experimental/out/onboarding.html similarity index 94% rename from litellm/proxy/_experimental/out/onboarding/index.html rename to litellm/proxy/_experimental/out/onboarding.html index cc54e35e28..efe408e2ab 100644 --- a/litellm/proxy/_experimental/out/onboarding/index.html +++ b/litellm/proxy/_experimental/out/onboarding.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/onboarding.txt b/litellm/proxy/_experimental/out/onboarding.txt index f78943759c..6232f248bc 100644 --- a/litellm/proxy/_experimental/out/onboarding.txt +++ b/litellm/proxy/_experimental/out/onboarding.txt @@ -4,7 +4,7 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[566606,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] +7:I[566606,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/efea414bda877fd0.js","/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/efea414bda877fd0.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/onboarding/__next._full.txt b/litellm/proxy/_experimental/out/onboarding/__next._full.txt index f78943759c..6232f248bc 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._full.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._full.txt @@ -4,7 +4,7 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[566606,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] +7:I[566606,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/efea414bda877fd0.js","/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/efea414bda877fd0.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/onboarding/__next._head.txt b/litellm/proxy/_experimental/out/onboarding/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._head.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/onboarding/__next._index.txt b/litellm/proxy/_experimental/out/onboarding/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._index.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/onboarding/__next._tree.txt b/litellm/proxy/_experimental/out/onboarding/__next._tree.txt index 11a069ff3c..2a09d84a11 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._tree.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"onboarding","paramType":null,"paramKey":"onboarding","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"onboarding","paramType":null,"paramKey":"onboarding","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__PAGE__.txt b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__PAGE__.txt index 2fe7b920ab..16dc228806 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[566606,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] +3:I[566606,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/efea414bda877fd0.js","/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/951e5ff2dc4928c2.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/efea414bda877fd0.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e5af85ebd6f84f2f.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/94dbdc1bda79d6d1.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations.html b/litellm/proxy/_experimental/out/organizations.html new file mode 100644 index 0000000000..fa57071d1e --- /dev/null +++ b/litellm/proxy/_experimental/out/organizations.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/organizations.txt b/litellm/proxy/_experimental/out/organizations.txt index 33405900b0..a4b506be81 100644 --- a/litellm/proxy/_experimental/out/organizations.txt +++ b/litellm/proxy/_experimental/out/organizations.txt @@ -4,20 +4,20 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +e:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7e2dbe0d25a79405.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e2dbe0d25a79405.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt index ccce0cce71..cce01d6972 100644 --- a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +3:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7e2dbe0d25a79405.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e2dbe0d25a79405.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt +++ b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/organizations/__next._full.txt b/litellm/proxy/_experimental/out/organizations/__next._full.txt index 33405900b0..a4b506be81 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._full.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._full.txt @@ -4,20 +4,20 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +e:I[526612,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/7e2dbe0d25a79405.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7ede3688da5c7a5f.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/70591b116c194481.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/de0c9305cb137e96.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/abf1a802816f8f5a.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/7e2dbe0d25a79405.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b01279f88358b7f5.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/organizations/__next._head.txt b/litellm/proxy/_experimental/out/organizations/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._head.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations/__next._index.txt b/litellm/proxy/_experimental/out/organizations/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._index.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations/__next._tree.txt b/litellm/proxy/_experimental/out/organizations/__next._tree.txt index 3554a16a36..632c729fb6 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._tree.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"organizations","paramType":null,"paramKey":"organizations","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"organizations","paramType":null,"paramKey":"organizations","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/organizations/index.html b/litellm/proxy/_experimental/out/organizations/index.html deleted file mode 100644 index 1f504b2b31..0000000000 --- a/litellm/proxy/_experimental/out/organizations/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/playground.html b/litellm/proxy/_experimental/out/playground.html new file mode 100644 index 0000000000..5f8718319b --- /dev/null +++ b/litellm/proxy/_experimental/out/playground.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/playground.txt b/litellm/proxy/_experimental/out/playground.txt index 39ad161bab..20cb5cdb57 100644 --- a/litellm/proxy/_experimental/out/playground.txt +++ b/litellm/proxy/_experimental/out/playground.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js"],"default"] +d:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt index 6b5ce8a2e8..edb8e65201 100644 --- a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js"],"default"] +3:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.txt b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.txt +++ b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/playground/__next._full.txt b/litellm/proxy/_experimental/out/playground/__next._full.txt index 39ad161bab..20cb5cdb57 100644 --- a/litellm/proxy/_experimental/out/playground/__next._full.txt +++ b/litellm/proxy/_experimental/out/playground/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js"],"default"] +d:I[213970,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/eaa9f9b9bb3e054b.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a408f05ec0cdac4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a2ba050d0179d93d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/76b6374a992fbca0.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/0cdfadbcf4b8c9e4.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/playground/__next._head.txt b/litellm/proxy/_experimental/out/playground/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/playground/__next._head.txt +++ b/litellm/proxy/_experimental/out/playground/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/playground/__next._index.txt b/litellm/proxy/_experimental/out/playground/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/playground/__next._index.txt +++ b/litellm/proxy/_experimental/out/playground/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/playground/__next._tree.txt b/litellm/proxy/_experimental/out/playground/__next._tree.txt index 3e3e41774c..cfd4db7656 100644 --- a/litellm/proxy/_experimental/out/playground/__next._tree.txt +++ b/litellm/proxy/_experimental/out/playground/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"playground","paramType":null,"paramKey":"playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"playground","paramType":null,"paramKey":"playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/playground/index.html b/litellm/proxy/_experimental/out/playground/index.html deleted file mode 100644 index 8e91026de7..0000000000 --- a/litellm/proxy/_experimental/out/playground/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/policies.html b/litellm/proxy/_experimental/out/policies.html new file mode 100644 index 0000000000..97f405501f --- /dev/null +++ b/litellm/proxy/_experimental/out/policies.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/policies.txt b/litellm/proxy/_experimental/out/policies.txt index fd180d548d..1bd6947bc1 100644 --- a/litellm/proxy/_experimental/out/policies.txt +++ b/litellm/proxy/_experimental/out/policies.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] +d:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt index 8516ae0082..634dfdeb57 100644 --- a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] +3:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.txt b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.txt +++ b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/policies/__next._full.txt b/litellm/proxy/_experimental/out/policies/__next._full.txt index fd180d548d..1bd6947bc1 100644 --- a/litellm/proxy/_experimental/out/policies/__next._full.txt +++ b/litellm/proxy/_experimental/out/policies/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] +d:I[102616,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/a4949852bdd27c8e.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/9b8d229c6e7826fb.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/policies/__next._head.txt b/litellm/proxy/_experimental/out/policies/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/policies/__next._head.txt +++ b/litellm/proxy/_experimental/out/policies/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/policies/__next._index.txt b/litellm/proxy/_experimental/out/policies/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/policies/__next._index.txt +++ b/litellm/proxy/_experimental/out/policies/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/policies/__next._tree.txt b/litellm/proxy/_experimental/out/policies/__next._tree.txt index f6aa8091b3..9efe1cb9a3 100644 --- a/litellm/proxy/_experimental/out/policies/__next._tree.txt +++ b/litellm/proxy/_experimental/out/policies/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"policies","paramType":null,"paramKey":"policies","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"policies","paramType":null,"paramKey":"policies","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/policies/index.html b/litellm/proxy/_experimental/out/policies/index.html deleted file mode 100644 index f3c426c4e7..0000000000 --- a/litellm/proxy/_experimental/out/policies/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/admin-settings.html b/litellm/proxy/_experimental/out/settings/admin-settings.html new file mode 100644 index 0000000000..e8c59885a3 --- /dev/null +++ b/litellm/proxy/_experimental/out/settings/admin-settings.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/admin-settings.txt b/litellm/proxy/_experimental/out/settings/admin-settings.txt index 2323d96d82..0dc19254ff 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +f:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt index 8719d198ab..b73857be88 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +3:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt index 2323d96d82..0dc19254ff 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] +f:I[514236,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/41378fecd72892ff.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/844dee1ac01fba04.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9969d80f8608d1dc.js","/litellm-asset-prefix/_next/static/chunks/3c2d67ecf9619f2b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt index 2794e09e6e..ca3662348a 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"admin-settings","paramType":null,"paramKey":"admin-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"admin-settings","paramType":null,"paramKey":"admin-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/index.html b/litellm/proxy/_experimental/out/settings/admin-settings/index.html deleted file mode 100644 index d885cfec64..0000000000 --- a/litellm/proxy/_experimental/out/settings/admin-settings/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts.html b/litellm/proxy/_experimental/out/settings/logging-and-alerts.html new file mode 100644 index 0000000000..918c9b73fc --- /dev/null +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt index 4975b821e8..337823d342 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +f:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt index 335ee76251..85367626e1 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +3:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt index 4975b821e8..337823d342 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +f:I[764367,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/acd6db33552053fb.js","/litellm-asset-prefix/_next/static/chunks/9492aee8924914ae.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/bf30ce92e35d0d54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt index b4b039407a..b1ae1510ed 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"logging-and-alerts","paramType":null,"paramKey":"logging-and-alerts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"logging-and-alerts","paramType":null,"paramKey":"logging-and-alerts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/index.html b/litellm/proxy/_experimental/out/settings/logging-and-alerts/index.html deleted file mode 100644 index 3a9be8feef..0000000000 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/router-settings.html b/litellm/proxy/_experimental/out/settings/router-settings.html new file mode 100644 index 0000000000..f1c20c3ca5 --- /dev/null +++ b/litellm/proxy/_experimental/out/settings/router-settings.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/router-settings.txt b/litellm/proxy/_experimental/out/settings/router-settings.txt index 0b3a779195..40172b3fb3 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js"],"default"] +f:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/3a35f4a4b0831887.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3a35f4a4b0831887.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt index cc00121b6c..96f7858bae 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js"],"default"] +3:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/3a35f4a4b0831887.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3a35f4a4b0831887.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt index 0b3a779195..40172b3fb3 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt @@ -4,21 +4,21 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js"],"default"] +f:I[511715,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/3a35f4a4b0831887.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L5",null,{}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/b12bdf0901df004a.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/da87cea37abf71ef.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/4b9bda626d5a281b.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3a35f4a4b0831887.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt index 7c194e0e27..5786ee8e3f 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"router-settings","paramType":null,"paramKey":"router-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"router-settings","paramType":null,"paramKey":"router-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/index.html b/litellm/proxy/_experimental/out/settings/router-settings/index.html deleted file mode 100644 index 66de33bc6f..0000000000 --- a/litellm/proxy/_experimental/out/settings/router-settings/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/ui-theme.html b/litellm/proxy/_experimental/out/settings/ui-theme.html new file mode 100644 index 0000000000..8e73457584 --- /dev/null +++ b/litellm/proxy/_experimental/out/settings/ui-theme.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/ui-theme.txt b/litellm/proxy/_experimental/out/settings/ui-theme.txt index cd736f01eb..50102eb406 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] +f:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt index 0f502ef779..fff2dd9910 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] +3:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt index cd736f01eb..50102eb406 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] +f:I[922049,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/2bca6e6a96b0858a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt index c8533eafe2..f00706ffd7 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"ui-theme","paramType":null,"paramKey":"ui-theme","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"ui-theme","paramType":null,"paramKey":"ui-theme","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/index.html b/litellm/proxy/_experimental/out/settings/ui-theme/index.html deleted file mode 100644 index 08b2a7bbf9..0000000000 --- a/litellm/proxy/_experimental/out/settings/ui-theme/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/skills.html b/litellm/proxy/_experimental/out/skills.html new file mode 100644 index 0000000000..f833007933 --- /dev/null +++ b/litellm/proxy/_experimental/out/skills.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/skills.txt b/litellm/proxy/_experimental/out/skills.txt index 7d44660f49..cd8ab9647f 100644 --- a/litellm/proxy/_experimental/out/skills.txt +++ b/litellm/proxy/_experimental/out/skills.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","skills"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["skills",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","skills"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["skills",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] +d:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt index 253da51c71..e2150e1bc6 100644 --- a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] +3:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.txt b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.txt +++ b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.skills.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/skills/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/skills/__next._full.txt b/litellm/proxy/_experimental/out/skills/__next._full.txt index 7d44660f49..cd8ab9647f 100644 --- a/litellm/proxy/_experimental/out/skills/__next._full.txt +++ b/litellm/proxy/_experimental/out/skills/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","skills"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["skills",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","skills"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["skills",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] +d:I[974992,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/76d25012c7da52a0.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/skills/__next._head.txt b/litellm/proxy/_experimental/out/skills/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/skills/__next._head.txt +++ b/litellm/proxy/_experimental/out/skills/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/skills/__next._index.txt b/litellm/proxy/_experimental/out/skills/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/skills/__next._index.txt +++ b/litellm/proxy/_experimental/out/skills/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/skills/__next._tree.txt b/litellm/proxy/_experimental/out/skills/__next._tree.txt index 6b1577550b..f04020a22e 100644 --- a/litellm/proxy/_experimental/out/skills/__next._tree.txt +++ b/litellm/proxy/_experimental/out/skills/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"skills","paramType":null,"paramKey":"skills","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"skills","paramType":null,"paramKey":"skills","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/skills/index.html b/litellm/proxy/_experimental/out/skills/index.html deleted file mode 100644 index 6a97b95616..0000000000 --- a/litellm/proxy/_experimental/out/skills/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/teams.html b/litellm/proxy/_experimental/out/teams.html new file mode 100644 index 0000000000..9a585f704f --- /dev/null +++ b/litellm/proxy/_experimental/out/teams.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/teams.txt b/litellm/proxy/_experimental/out/teams.txt index a043c5809e..678965bec4 100644 --- a/litellm/proxy/_experimental/out/teams.txt +++ b/litellm/proxy/_experimental/out/teams.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js"],"default"] +d:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/54563d12ee8915f4.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","/litellm-asset-prefix/_next/static/chunks/7a2c975c414f5b5b.js","/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","/litellm-asset-prefix/_next/static/chunks/11429586d5e74f7f.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/54563d12ee8915f4.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7a2c975c414f5b5b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/11429586d5e74f7f.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt index 79e078d73b..f3c5fcf367 100644 --- a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js"],"default"] +3:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/54563d12ee8915f4.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","/litellm-asset-prefix/_next/static/chunks/7a2c975c414f5b5b.js","/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","/litellm-asset-prefix/_next/static/chunks/11429586d5e74f7f.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/54563d12ee8915f4.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7a2c975c414f5b5b.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/11429586d5e74f7f.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.txt b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.txt +++ b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/teams/__next._full.txt b/litellm/proxy/_experimental/out/teams/__next._full.txt index a043c5809e..678965bec4 100644 --- a/litellm/proxy/_experimental/out/teams/__next._full.txt +++ b/litellm/proxy/_experimental/out/teams/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js"],"default"] +d:I[596115,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/54563d12ee8915f4.js","/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","/litellm-asset-prefix/_next/static/chunks/7a2c975c414f5b5b.js","/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","/litellm-asset-prefix/_next/static/chunks/11429586d5e74f7f.js","/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7e4551c11f7f1e8a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/91a13e42c88cfff6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d0991370c308b4d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/47be83d4515c6599.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/d0510af52e5b6373.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/54563d12ee8915f4.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a8de8fe39e2c0fd8.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/05fcbaa2a2d4ce24.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1efbd5b35545b10a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7a2c975c414f5b5b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d415c843a5441964.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/11429586d5e74f7f.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5af64513ec893347.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/2888b590cf1e5a4a.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/teams/__next._head.txt b/litellm/proxy/_experimental/out/teams/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/teams/__next._head.txt +++ b/litellm/proxy/_experimental/out/teams/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/teams/__next._index.txt b/litellm/proxy/_experimental/out/teams/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/teams/__next._index.txt +++ b/litellm/proxy/_experimental/out/teams/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/teams/__next._tree.txt b/litellm/proxy/_experimental/out/teams/__next._tree.txt index d60a7f15be..a074f1da79 100644 --- a/litellm/proxy/_experimental/out/teams/__next._tree.txt +++ b/litellm/proxy/_experimental/out/teams/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"teams","paramType":null,"paramKey":"teams","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"teams","paramType":null,"paramKey":"teams","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/teams/index.html b/litellm/proxy/_experimental/out/teams/index.html deleted file mode 100644 index 7f849a1f39..0000000000 --- a/litellm/proxy/_experimental/out/teams/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/test-key.html b/litellm/proxy/_experimental/out/test-key.html new file mode 100644 index 0000000000..5778eabed9 --- /dev/null +++ b/litellm/proxy/_experimental/out/test-key.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/test-key.txt b/litellm/proxy/_experimental/out/test-key.txt index 8e42724c98..ce2e35dc23 100644 --- a/litellm/proxy/_experimental/out/test-key.txt +++ b/litellm/proxy/_experimental/out/test-key.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] +d:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/406bbb9c89fee7ee.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/406bbb9c89fee7ee.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt index 3c6cae9ad2..6b129d9e43 100644 --- a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] +3:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/406bbb9c89fee7ee.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/406bbb9c89fee7ee.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt +++ b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/test-key/__next._full.txt b/litellm/proxy/_experimental/out/test-key/__next._full.txt index 8e42724c98..ce2e35dc23 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._full.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] +d:I[133574,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/406bbb9c89fee7ee.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a230559fcabaea23.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/73b50c3314123d9d.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ec6c2f1c9b8d05be.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/406bbb9c89fee7ee.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/e436f7eccebb809d.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/test-key/__next._head.txt b/litellm/proxy/_experimental/out/test-key/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._head.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/test-key/__next._index.txt b/litellm/proxy/_experimental/out/test-key/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._index.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/test-key/__next._tree.txt b/litellm/proxy/_experimental/out/test-key/__next._tree.txt index 020f14ed7f..d1a7da2cda 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._tree.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"test-key","paramType":null,"paramKey":"test-key","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"test-key","paramType":null,"paramKey":"test-key","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/test-key/index.html b/litellm/proxy/_experimental/out/test-key/index.html deleted file mode 100644 index 799635f0ba..0000000000 --- a/litellm/proxy/_experimental/out/test-key/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers.html b/litellm/proxy/_experimental/out/tools/mcp-servers.html new file mode 100644 index 0000000000..fa3fba79af --- /dev/null +++ b/litellm/proxy/_experimental/out/tools/mcp-servers.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers.txt b/litellm/proxy/_experimental/out/tools/mcp-servers.txt index b08d892065..ddc98bb7fa 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js"],"default"] +f:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt index 3f806301ef..954a4b1c77 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js"],"default"] +3:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt index b08d892065..ddc98bb7fa 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js"],"default"] +f:I[338468,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/7e830ceee904c386.js","/litellm-asset-prefix/_next/static/chunks/c0a1c5ed19f4bfe2.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/fef9c8b7c44b1dfc.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/520f8fdc54fcd4f0.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt index fa19b6cac9..c9d5d439ca 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp-servers","paramType":null,"paramKey":"mcp-servers","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp-servers","paramType":null,"paramKey":"mcp-servers","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/index.html b/litellm/proxy/_experimental/out/tools/mcp-servers/index.html deleted file mode 100644 index cf7d075237..0000000000 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/tools/vector-stores.html b/litellm/proxy/_experimental/out/tools/vector-stores.html new file mode 100644 index 0000000000..f81844211d --- /dev/null +++ b/litellm/proxy/_experimental/out/tools/vector-stores.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/tools/vector-stores.txt b/litellm/proxy/_experimental/out/tools/vector-stores.txt index db29739014..0d41cd529a 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] +f:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt index 70daa4e64e..b836218232 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] +3:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt index db29739014..0d41cd529a 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt @@ -4,14 +4,14 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] +f:I[800944,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/9b4c8a50e297b9ad.js","/litellm-asset-prefix/_next/static/chunks/0f59b35ee0664fe0.js","/litellm-asset-prefix/_next/static/chunks/1d37f4159623f97f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/496544a8be968b8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/6eee262391715440.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt index 4b302e1578..1979ce576e 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"vector-stores","paramType":null,"paramKey":"vector-stores","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"vector-stores","paramType":null,"paramKey":"vector-stores","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/index.html b/litellm/proxy/_experimental/out/tools/vector-stores/index.html deleted file mode 100644 index 0d338c17a6..0000000000 --- a/litellm/proxy/_experimental/out/tools/vector-stores/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/usage.html b/litellm/proxy/_experimental/out/usage.html new file mode 100644 index 0000000000..da859e3216 --- /dev/null +++ b/litellm/proxy/_experimental/out/usage.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/usage.txt b/litellm/proxy/_experimental/out/usage.txt index 3ada0bc4ee..c7b9017d80 100644 --- a/litellm/proxy/_experimental/out/usage.txt +++ b/litellm/proxy/_experimental/out/usage.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js"],"default"] +d:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/fa36bea8808c8054.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/fa36bea8808c8054.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt index 3edfd53dd6..af6834ecb8 100644 --- a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js"],"default"] +3:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/fa36bea8808c8054.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/fa36bea8808c8054.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.txt b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.txt +++ b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/usage/__next._full.txt b/litellm/proxy/_experimental/out/usage/__next._full.txt index 3ada0bc4ee..c7b9017d80 100644 --- a/litellm/proxy/_experimental/out/usage/__next._full.txt +++ b/litellm/proxy/_experimental/out/usage/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js"],"default"] +d:I[986888,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/fa36bea8808c8054.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4d3700bffc110569.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d6be8091255a78cc.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8c73d0d20d640f.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/57d42681e5c19818.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/1189e4151a93f058.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/8a26922c4b7235a4.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/fa36bea8808c8054.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e87fad8e1b2f35cb.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/daaa2e6529d97969.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0fa4668d6cf24773.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/usage/__next._head.txt b/litellm/proxy/_experimental/out/usage/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/usage/__next._head.txt +++ b/litellm/proxy/_experimental/out/usage/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/usage/__next._index.txt b/litellm/proxy/_experimental/out/usage/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/usage/__next._index.txt +++ b/litellm/proxy/_experimental/out/usage/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/usage/__next._tree.txt b/litellm/proxy/_experimental/out/usage/__next._tree.txt index 6a33df1d27..6544968cc7 100644 --- a/litellm/proxy/_experimental/out/usage/__next._tree.txt +++ b/litellm/proxy/_experimental/out/usage/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"usage","paramType":null,"paramKey":"usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"usage","paramType":null,"paramKey":"usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/usage/index.html b/litellm/proxy/_experimental/out/usage/index.html deleted file mode 100644 index 5af23eb881..0000000000 --- a/litellm/proxy/_experimental/out/usage/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/users.html b/litellm/proxy/_experimental/out/users.html new file mode 100644 index 0000000000..54623bdf19 --- /dev/null +++ b/litellm/proxy/_experimental/out/users.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/users.txt b/litellm/proxy/_experimental/out/users.txt index b1d14c0ff6..1fe2c38d29 100644 --- a/litellm/proxy/_experimental/out/users.txt +++ b/litellm/proxy/_experimental/out/users.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] +d:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/8489ea6f0be86483.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/8489ea6f0be86483.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt index 3f3c26d23c..88a741cbe0 100644 --- a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] +3:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/8489ea6f0be86483.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/8489ea6f0be86483.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.txt b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.txt +++ b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/users/__next._full.txt b/litellm/proxy/_experimental/out/users/__next._full.txt index b1d14c0ff6..1fe2c38d29 100644 --- a/litellm/proxy/_experimental/out/users/__next._full.txt +++ b/litellm/proxy/_experimental/out/users/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] +d:I[198134,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/8489ea6f0be86483.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/05cc063d4c1cb77b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3648e0a5f38c5d36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/adfd07c864335b45.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/9bfe1d85217d0efc.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/8489ea6f0be86483.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/a5de56db893c490c.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/2f29909dc244a7c0.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/users/__next._head.txt b/litellm/proxy/_experimental/out/users/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/users/__next._head.txt +++ b/litellm/proxy/_experimental/out/users/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/users/__next._index.txt b/litellm/proxy/_experimental/out/users/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/users/__next._index.txt +++ b/litellm/proxy/_experimental/out/users/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/users/__next._tree.txt b/litellm/proxy/_experimental/out/users/__next._tree.txt index ed62249698..95bda9f7ca 100644 --- a/litellm/proxy/_experimental/out/users/__next._tree.txt +++ b/litellm/proxy/_experimental/out/users/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"users","paramType":null,"paramKey":"users","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"users","paramType":null,"paramKey":"users","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/users/index.html b/litellm/proxy/_experimental/out/users/index.html deleted file mode 100644 index 89d914e848..0000000000 --- a/litellm/proxy/_experimental/out/users/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/virtual-keys.html b/litellm/proxy/_experimental/out/virtual-keys.html new file mode 100644 index 0000000000..008fe7e8d0 --- /dev/null +++ b/litellm/proxy/_experimental/out/virtual-keys.html @@ -0,0 +1 @@ +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/virtual-keys.txt b/litellm/proxy/_experimental/out/virtual-keys.txt index 4abf2301fc..bf761423f4 100644 --- a/litellm/proxy/_experimental/out/virtual-keys.txt +++ b/litellm/proxy/_experimental/out/virtual-keys.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js"],"default"] +d:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/039fd44300b25e02.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/039fd44300b25e02.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt index dd07602c56..2abe4bf23d 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.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"]}}]]}],"loading":null,"isPartial":false} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt index 4f10494a2e..dfedf1e8d8 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -3:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js"],"default"] +3:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/039fd44300b25e02.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/039fd44300b25e02.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt index fce37fb5ff..0eaad0063a 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt @@ -1,4 +1,4 @@ 1:"$Sreact.fragment" 2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt index 4abf2301fc..bf761423f4 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt @@ -4,19 +4,19 @@ 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js"],"default"] b:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"lw0pr129QWvsGxcNhZmh0","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} +0:{"P":null,"b":"Qm-T2egqyzNalOph06c_b","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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: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: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: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:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true} c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -d:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/466ba0a8a546c4fd.js","/litellm-asset-prefix/_next/static/chunks/7fe89dd32bb4f5b6.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js"],"default"] +d:I[995118,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee7884930918dcb9.js","/litellm-asset-prefix/_next/static/chunks/0377ae18aae60c57.js","/litellm-asset-prefix/_next/static/chunks/996933f13e574998.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/5fe49a1e116126de.js","/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/039fd44300b25e02.js"],"default"] 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 11:"$Sreact.suspense" 13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/f5fc27663c2424f7.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/be5ddb5784b2b78a.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/a542eaa81bba9029.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] +9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/cbdff18b8d0102ff.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/de6dee28e382bd35.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/518eb8c7598afad6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/74ce31aa0fb2adc9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/34465d13a9152473.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/6dac954f65d9af43.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/e55673f6717e443a.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/e2f70fb83dabbe21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0636443d6303b49b.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/039fd44300b25e02.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}] a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" e:{} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt index c99f06703d..5c36fabdcc 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","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.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt index e999484c30..9e507c81df 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt @@ -5,4 +5,4 @@ 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt index a4b60293af..e582e246ad 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/67de745d18bddc74.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"lw0pr129QWvsGxcNhZmh0","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"virtual-keys","paramType":null,"paramKey":"virtual-keys","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"Qm-T2egqyzNalOph06c_b","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"virtual-keys","paramType":null,"paramKey":"virtual-keys","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/virtual-keys/index.html b/litellm/proxy/_experimental/out/virtual-keys/index.html deleted file mode 100644 index 1513d871d7..0000000000 --- a/litellm/proxy/_experimental/out/virtual-keys/index.html +++ /dev/null @@ -1 +0,0 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file From 8cf3bf11bd874c0621ccc4bb67bda2cb065d15d4 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 2 May 2026 04:15:25 +0000 Subject: [PATCH 8/8] fix(scim): preserve scim_active on PUT when client omits the field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A SCIM PUT may legally omit `active` (full-replace with the field absent). Pydantic fills the SCIMUser.active default of True, so the PUT handler was overwriting metadata.scim_active with True even when the client never sent it — silently reactivating a previously SCIM-blocked user and unblocking their keys. Use model_fields_set to detect whether the client actually sent `active`. If omitted, preserve the prior scim_active value and skip the cascade to virtual keys. Also drop comments added in this PR that just narrate what the code does; keep only the docstrings and the SQL-NULL pitfall note that explain non-obvious behaviour. Co-authored-by: Mateo Wang --- litellm/proxy/auth/user_api_key_auth.py | 4 - .../scim/scim_transformations.py | 3 - .../management_endpoints/scim/scim_v2.py | 58 ++++----- .../scim/test_scim_key_deactivation.py | 123 ++++++++++++++++++ 4 files changed, 147 insertions(+), 41 deletions(-) diff --git a/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.py index 0ad2fb22ff..86081eb21a 100644 --- a/litellm/proxy/auth/user_api_key_auth.py +++ b/litellm/proxy/auth/user_api_key_auth.py @@ -1307,10 +1307,6 @@ async def _user_api_key_auth_builder( # noqa: PLR0915 ) user_obj = None - # Defense in depth for SCIM-deprovisioned users: even if a - # cached key snuck past the blocked-flag check, refuse the - # request when the owning user has been marked inactive by - # the SCIM provider. if ( user_obj is not None and isinstance(user_obj.metadata, dict) diff --git a/litellm/proxy/management_endpoints/scim/scim_transformations.py b/litellm/proxy/management_endpoints/scim/scim_transformations.py index 68c06173fd..28fb87d9b3 100644 --- a/litellm/proxy/management_endpoints/scim/scim_transformations.py +++ b/litellm/proxy/management_endpoints/scim/scim_transformations.py @@ -45,9 +45,6 @@ class ScimTransformations: if user.user_email and "@" in user.user_email: emails.append(SCIMUserEmail(value=user.user_email, primary=True)) - # Reflect SCIM-provider-controlled active state. Default to True for - # users that have never had the flag set (e.g. created before this - # field existed, or created outside SCIM). metadata = user.metadata or {} scim_active = metadata.get("scim_active") active = True if scim_active is None else bool(scim_active) diff --git a/litellm/proxy/management_endpoints/scim/scim_v2.py b/litellm/proxy/management_endpoints/scim/scim_v2.py index 5692ed5bc5..04699f19ff 100644 --- a/litellm/proxy/management_endpoints/scim/scim_v2.py +++ b/litellm/proxy/management_endpoints/scim/scim_v2.py @@ -363,9 +363,9 @@ async def _set_user_keys_blocked(user_id: str, blocked: bool) -> int: prisma_client = await _get_prisma_client_or_raise_exception() if blocked: - # Block keys that aren't already blocked. `blocked` is a nullable column - # with no default so existing rows typically hold NULL; treat NULL as - # "not blocked" so SQL equality on NULL doesn't silently skip them. + # `blocked` is a nullable column with no default, so existing rows + # typically hold NULL; treat NULL as "not blocked" since SQL equality + # on NULL would otherwise silently skip them. candidates = await prisma_client.db.litellm_verificationtoken.find_many( where={ "user_id": user_id, @@ -374,8 +374,6 @@ async def _set_user_keys_blocked(user_id: str, blocked: bool) -> int: ) affected_keys = candidates else: - # Only unblock keys that SCIM previously blocked. An admin-managed - # block has no `scim_blocked` marker and must not be reversed here. candidates = await prisma_client.db.litellm_verificationtoken.find_many( where={"user_id": user_id, "blocked": True}, ) @@ -384,9 +382,6 @@ async def _set_user_keys_blocked(user_id: str, blocked: bool) -> int: if not affected_keys: return 0 - # Per-key updates: we need to add/remove the SCIM-block marker in JSON - # metadata, which `update_many` can't express. Cardinality is bounded by - # the number of keys a single user owns. for key_row in affected_keys: current_metadata: Dict[str, Any] = ( dict(key_row.metadata) if isinstance(key_row.metadata, dict) else {} @@ -1048,47 +1043,49 @@ async def update_user( prev_active = _scim_active_value(existing_user.metadata) - # Extract data from SCIM user user_data = _extract_scim_user_data(user) - # Build metadata with SCIM data - metadata = _build_scim_metadata( - user_data["given_name"], user_data["family_name"], user_data["active"] + # SCIM PUT may legally omit `active` (full-replace with the field absent). + # Pydantic fills the model default, so distinguish "client sent active" + # from "client omitted it" via model_fields_set, and preserve the prior + # SCIM active state when omitted — otherwise a vanilla PUT to a + # deactivated user would silently re-enable them and unblock their keys. + client_set_active = "active" in user.model_fields_set + scim_active_for_metadata = ( + user_data["active"] if client_set_active else prev_active + ) + + metadata = _build_scim_metadata( + user_data["given_name"], + user_data["family_name"], + scim_active_for_metadata, ) - # Handle team membership changes await _handle_team_membership_changes( user_id=user_id, existing_teams=existing_user.teams or [], new_teams=user_data["teams"], ) - # Update user with all new data (full replacement) update_data = { "user_email": user_data["user_email"], "user_alias": user_data["user_alias"], "sso_user_id": user_data["sso_user_id"], "teams": user_data["teams"], - "metadata": metadata, + "metadata": safe_dumps(metadata), } - # Serialize metadata to JSON string for Prisma to avoid GraphQL parsing issues - if "metadata" in update_data and isinstance(update_data["metadata"], dict): - from litellm.litellm_core_utils.safe_json_dumps import safe_dumps - - update_data["metadata"] = safe_dumps(update_data["metadata"]) - updated_user = await prisma_client.db.litellm_usertable.update( where={"user_id": user_id}, data=update_data, ) - # Cascade SCIM active transitions to virtual keys (mirrors PATCH). - new_active = _scim_active_value(metadata) - if new_active is not None and new_active != ( - True if prev_active is None else prev_active - ): - await _set_user_keys_blocked(user_id=user_id, blocked=not new_active) + if client_set_active: + new_active = _scim_active_value(metadata) + if new_active is not None and new_active != ( + True if prev_active is None else prev_active + ): + await _set_user_keys_blocked(user_id=user_id, blocked=not new_active) # Convert back to SCIM format scim_user = await ScimTransformations.transform_litellm_user_to_scim_user( @@ -1136,10 +1133,6 @@ async def delete_user( where={"team_id": team.team_id}, data={"members": new_members} ) - # Block the user's virtual keys before deleting the user record. - # The user row going away leaves the keys orphaned; without this - # they'd keep working because the auth path silently tolerates a - # missing owner. await _set_user_keys_blocked(user_id=user_id, blocked=True) await _delete_rows_referencing_user(prisma_client, user_id=user_id) @@ -1406,9 +1399,6 @@ async def patch_user( data=update_data, ) - # Cascade SCIM active transitions to virtual keys. Treat "previously - # unset" as active=True so a first-time PATCH with active=false still - # blocks any pre-existing keys. if new_active is not None and new_active != ( True if prev_active is None else prev_active ): diff --git a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py index ad02c0e2a8..0a9cf8b84c 100644 --- a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py +++ b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py @@ -14,6 +14,7 @@ from litellm.proxy.management_endpoints.scim.scim_v2 import ( _set_user_keys_blocked, delete_user, patch_user, + update_user, ) from litellm.types.proxy.management_endpoints.scim_v2 import ( SCIMPatchOp, @@ -418,3 +419,125 @@ async def test_scim_patch_user_no_active_change_does_not_touch_keys(): mock_db.litellm_verificationtoken.find_many.assert_not_called() mock_db.litellm_verificationtoken.update_many.assert_not_called() + + +def _build_put_user_payload(user_id: str, **overrides) -> dict: + payload = { + "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], + "id": user_id, + "userName": user_id, + "name": {"givenName": "Y", "familyName": "X"}, + "emails": [{"value": "x@example.com", "primary": True}], + } + payload.update(overrides) + return payload + + +@pytest.mark.asyncio +async def test_scim_put_user_omitting_active_preserves_deactivated_state(): + """PUT without `active` must not silently reactivate a SCIM-deactivated user + nor unblock their SCIM-blocked keys.""" + user_id = "scim-user" + deactivated = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias=None, + teams=[], + metadata={"scim_active": False}, + ) + keys = [ + _build_token_row( + "hash-keep-blocked", user_id, blocked=True, metadata={"scim_blocked": True} + ) + ] + mock_client, mock_db = _build_prisma_with_keys( + keys, mock_user=deactivated, updated_user=deactivated + ) + + put_user = SCIMUser.model_validate(_build_put_user_payload(user_id)) + + mock_scim_user = SCIMUser( + schemas=["urn:ietf:params:scim:schemas:core:2.0:User"], + id=user_id, + userName=user_id, + name=SCIMUserName(familyName="X", givenName="Y"), + emails=[SCIMUserEmail(value="x@example.com")], + active=False, + ) + + with ( + patch("litellm.proxy.proxy_server.prisma_client", mock_client), + patch("litellm.proxy.proxy_server.user_api_key_cache", MagicMock()), + patch("litellm.proxy.proxy_server.proxy_logging_obj", MagicMock()), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2.ScimTransformations.transform_litellm_user_to_scim_user", + AsyncMock(return_value=mock_scim_user), + ), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2._delete_cache_key_object", + AsyncMock(), + ), + ): + await update_user(user_id=user_id, user=put_user) + + mock_db.litellm_verificationtoken.update.assert_not_called() + mock_db.litellm_verificationtoken.update_many.assert_not_called() + mock_db.litellm_usertable.update.assert_awaited_once() + update_kwargs = mock_db.litellm_usertable.update.await_args.kwargs + assert '"scim_active": false' in update_kwargs["data"]["metadata"] + + +@pytest.mark.asyncio +async def test_scim_put_user_explicit_active_false_blocks_keys(): + """PUT explicitly setting active=False on an active user must cascade to keys.""" + user_id = "scim-user" + active = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias=None, + teams=[], + metadata={"scim_active": True}, + ) + deactivated = LiteLLM_UserTable( + user_id=user_id, + user_email="x@example.com", + user_alias=None, + teams=[], + metadata={"scim_active": False, "scim_metadata": {}}, + ) + keys = [_build_token_row("hash-block-me", user_id, blocked=False)] + mock_client, mock_db = _build_prisma_with_keys( + keys, mock_user=active, updated_user=deactivated + ) + + put_user = SCIMUser.model_validate(_build_put_user_payload(user_id, active=False)) + + mock_scim_user = SCIMUser( + schemas=["urn:ietf:params:scim:schemas:core:2.0:User"], + id=user_id, + userName=user_id, + name=SCIMUserName(familyName="X", givenName="Y"), + emails=[SCIMUserEmail(value="x@example.com")], + active=False, + ) + + with ( + patch("litellm.proxy.proxy_server.prisma_client", mock_client), + patch("litellm.proxy.proxy_server.user_api_key_cache", MagicMock()), + patch("litellm.proxy.proxy_server.proxy_logging_obj", MagicMock()), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2.ScimTransformations.transform_litellm_user_to_scim_user", + AsyncMock(return_value=mock_scim_user), + ), + patch( + "litellm.proxy.management_endpoints.scim.scim_v2._delete_cache_key_object", + AsyncMock(), + ), + ): + await update_user(user_id=user_id, user=put_user) + + mock_db.litellm_verificationtoken.update.assert_awaited_once() + update_kwargs = mock_db.litellm_verificationtoken.update.await_args.kwargs + assert update_kwargs["where"] == {"token": "hash-block-me"} + assert update_kwargs["data"]["blocked"] is True + assert '"scim_blocked": true' in update_kwargs["data"]["metadata"]